@mastra/deployer-cloud 1.0.0-beta.26 → 1.0.0-beta.27
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/CHANGELOG.md +8 -0
- package/dist/studio/assets/{abap-UAOxytaT.js → abap-DVU-ofbM.js} +1 -1
- package/dist/studio/assets/{abnf-f201O2TV.js → abnf-Da_wzX5p.js} +1 -1
- package/dist/studio/assets/{actionscript-CFYQpjRA.js → actionscript--riGP-zJ.js} +1 -1
- package/dist/studio/assets/{ada-PVk2oet6.js → ada-B9GTh25F.js} +1 -1
- package/dist/studio/assets/{agda-CEA3_0wj.js → agda-DKRYW57V.js} +1 -1
- package/dist/studio/assets/{al-CuhjmLCq.js → al-DCJrjpkj.js} +1 -1
- package/dist/studio/assets/{antlr4-0HHc-YMK.js → antlr4-DRXg42oz.js} +1 -1
- package/dist/studio/assets/{apacheconf-CLL6u7Xy.js → apacheconf-DjmQa1Zk.js} +1 -1
- package/dist/studio/assets/{apex-DVfDukn1.js → apex-Bf78Wtcr.js} +1 -1
- package/dist/studio/assets/{apl-BglDHwLd.js → apl-3p2LbP5y.js} +1 -1
- package/dist/studio/assets/{applescript-Brt-zOQF.js → applescript-GS7YwJ8l.js} +1 -1
- package/dist/studio/assets/{aql-CHMoIV4I.js → aql-CsjwPKZq.js} +1 -1
- package/dist/studio/assets/{arduino-YMaLOn1a.js → arduino-CRCMXEMi.js} +1 -1
- package/dist/studio/assets/{arff-BCAgcWnu.js → arff-DWJwlhTd.js} +1 -1
- package/dist/studio/assets/{asciidoc-BpvYl8Gn.js → asciidoc-CDPcK3Wm.js} +1 -1
- package/dist/studio/assets/{asm6502-D3xiUVOX.js → asm6502-B9F-fxOb.js} +1 -1
- package/dist/studio/assets/{asmatmel-Cy1yBA9v.js → asmatmel-DWABos8u.js} +1 -1
- package/dist/studio/assets/{aspnet-DRtOmGIV.js → aspnet-D_QFSJhV.js} +1 -1
- package/dist/studio/assets/{autohotkey-CIMXohBu.js → autohotkey-_yEqGigm.js} +1 -1
- package/dist/studio/assets/{autoit-CWIItf1g.js → autoit-RsXUmjUX.js} +1 -1
- package/dist/studio/assets/{avisynth-CopMCzfB.js → avisynth-BFBG-FML.js} +1 -1
- package/dist/studio/assets/{avro-idl-CPftrvCO.js → avro-idl-BRv2_ktP.js} +1 -1
- package/dist/studio/assets/{bash-CjlgezRh.js → bash-C_hNVE7G.js} +1 -1
- package/dist/studio/assets/{basic-Csn8Gpzx.js → basic-CRyKmNKD.js} +1 -1
- package/dist/studio/assets/{batch-DlN-P5Fe.js → batch-CkRKj7ZM.js} +1 -1
- package/dist/studio/assets/{bbcode-CEOl73Dm.js → bbcode-CV4D0YDt.js} +1 -1
- package/dist/studio/assets/{bicep-BQM5xXtt.js → bicep-40DlwBUv.js} +1 -1
- package/dist/studio/assets/{birb-36vvPNFq.js → birb-CpXJCW6U.js} +1 -1
- package/dist/studio/assets/{bison-DQ5FSPFj.js → bison-CMDPnogF.js} +1 -1
- package/dist/studio/assets/{bnf-BhJct9qg.js → bnf-Da_6ItkH.js} +1 -1
- package/dist/studio/assets/{brainfuck-LYTNku7k.js → brainfuck-T7HwKFjM.js} +1 -1
- package/dist/studio/assets/{brightscript-BLQ_tU8X.js → brightscript-C7J4Nr9Q.js} +1 -1
- package/dist/studio/assets/{bro-B_ZwnuE5.js → bro-D6vBXdtC.js} +1 -1
- package/dist/studio/assets/{bsl-C__FgbnV.js → bsl-k_gTB0Le.js} +1 -1
- package/dist/studio/assets/{c-Da6oMqNs.js → c-DBQxp504.js} +1 -1
- package/dist/studio/assets/{cfscript-DxKw985L.js → cfscript-rlyZf9pm.js} +1 -1
- package/dist/studio/assets/{chaiscript-BMgZAaWb.js → chaiscript-BlW62OoP.js} +1 -1
- package/dist/studio/assets/{chunk-55VPMN3N-B3nEoNj8.js → chunk-55VPMN3N-7h-uvGxn.js} +1 -1
- package/dist/studio/assets/{chunk-55VPMN3N-Ax1F4Y75-Dsi-mC_1.js → chunk-55VPMN3N-Ax1F4Y75-w2NrKP2P.js} +1 -1
- package/dist/studio/assets/{cil-DYcj4sAX.js → cil-B5hufUJA.js} +1 -1
- package/dist/studio/assets/{clike-3Gwnz1DR.js → clike-B5SB4vO2.js} +1 -1
- package/dist/studio/assets/{clojure-BXQE2wLv.js → clojure-DiO-udpv.js} +1 -1
- package/dist/studio/assets/{cmake-DR9SJwZz.js → cmake-BvYjy735.js} +1 -1
- package/dist/studio/assets/{cobol-8IjHMWy5.js → cobol-CINUQt_M.js} +1 -1
- package/dist/studio/assets/{coffeescript-CElPWilL.js → coffeescript-BA5ml6_3.js} +1 -1
- package/dist/studio/assets/{concurnas-BYju_Nji.js → concurnas-BPYO7IaU.js} +1 -1
- package/dist/studio/assets/{coq-DoOsKl0P.js → coq-DzH5AepQ.js} +1 -1
- package/dist/studio/assets/{core-BWEeT8rO.js → core-D14Evsir.js} +1 -1
- package/dist/studio/assets/{cpp-HxMR3o0K.js → cpp-D5uvEtNZ.js} +1 -1
- package/dist/studio/assets/{crystal-hU8Yxent.js → crystal-C2RXXfYu.js} +1 -1
- package/dist/studio/assets/{csharp-N12vbSHZ.js → csharp-Cz6i68UO.js} +1 -1
- package/dist/studio/assets/{cshtml-BouH_m62.js → cshtml-S_c0BAX_.js} +1 -1
- package/dist/studio/assets/{csp-EVWCLjcL.js → csp-DUhugXqP.js} +1 -1
- package/dist/studio/assets/{css-Dwc61us6.js → css-BeiCa0aq.js} +1 -1
- package/dist/studio/assets/{css-extras-DmGsYn3r.js → css-extras-FkenCC1V.js} +1 -1
- package/dist/studio/assets/{csv-CJ5Zahea.js → csv-B44Rcmvq.js} +1 -1
- package/dist/studio/assets/{cypher-BzLSBwKS.js → cypher-BXkM4IT4.js} +1 -1
- package/dist/studio/assets/{d-DgPURJAS.js → d-BoFrnxdw.js} +1 -1
- package/dist/studio/assets/{dart-dFMVczdC.js → dart-BT4h9m-a.js} +1 -1
- package/dist/studio/assets/{dataweave-BThU-h0a.js → dataweave-DhPyKDVS.js} +1 -1
- package/dist/studio/assets/{dax-CBPGTCoK.js → dax-Bywh8rcF.js} +1 -1
- package/dist/studio/assets/{dhall-BwBUQ1Ug.js → dhall-B0PbZHVJ.js} +1 -1
- package/dist/studio/assets/{diff-Bqt5S_kK.js → diff-CzJZo9jr.js} +1 -1
- package/dist/studio/assets/{django-BJUDEYJO.js → django-DC0hqXDy.js} +1 -1
- package/dist/studio/assets/{dns-zone-file-BrtfE1In.js → dns-zone-file-BDko0hWU.js} +1 -1
- package/dist/studio/assets/{docker-Ba38DY6O.js → docker-BtL8_hUo.js} +1 -1
- package/dist/studio/assets/{dot-MsGhs1Ya.js → dot-CiHoXELh.js} +1 -1
- package/dist/studio/assets/{ebnf-Cqwn06tf.js → ebnf-Bx_UFIWA.js} +1 -1
- package/dist/studio/assets/{editorconfig-CproTkGu.js → editorconfig-BfRJwb48.js} +1 -1
- package/dist/studio/assets/{eiffel-C4r-u-Fx.js → eiffel-DLByY_pS.js} +1 -1
- package/dist/studio/assets/{ejs-B3iQkgGA.js → ejs-DIbOzUlF.js} +1 -1
- package/dist/studio/assets/{elixir-CaPEZFF9.js → elixir-Bi2R_h_x.js} +1 -1
- package/dist/studio/assets/{elm-C3rx8oF2.js → elm-D_VD4ZOp.js} +1 -1
- package/dist/studio/assets/{erb-CuLBsQqp.js → erb-D_EXn0DN.js} +1 -1
- package/dist/studio/assets/{erlang-So8aw46J.js → erlang-Bu77bU_K.js} +1 -1
- package/dist/studio/assets/{etlua-DGdG9laD.js → etlua-BFFGhY-Z.js} +1 -1
- package/dist/studio/assets/{excel-formula-AUFAEONv.js → excel-formula-f4K7jnHq.js} +1 -1
- package/dist/studio/assets/{factor-DdlDrZE_.js → factor-B8vabn_x.js} +1 -1
- package/dist/studio/assets/{false-DtblEWaC.js → false-BdyrKSsM.js} +1 -1
- package/dist/studio/assets/{firestore-security-rules-BbX9d522.js → firestore-security-rules-Ck8l8MrW.js} +1 -1
- package/dist/studio/assets/{flow-B8s0l3oy.js → flow-CVxRkGDU.js} +1 -1
- package/dist/studio/assets/{fortran-BYl7Pf4z.js → fortran-DHK41TlN.js} +1 -1
- package/dist/studio/assets/{fsharp-CNXwc1wD.js → fsharp-AP1QXbiZ.js} +1 -1
- package/dist/studio/assets/{ftl-DhY6cxmh.js → ftl-DxopztnG.js} +1 -1
- package/dist/studio/assets/{gap-DfBF1Xpf.js → gap-DNAq7wcM.js} +1 -1
- package/dist/studio/assets/{gcode-BYD243CF.js → gcode-BEkcwFqs.js} +1 -1
- package/dist/studio/assets/{gdscript-BatYKQwu.js → gdscript-D3MrQB3A.js} +1 -1
- package/dist/studio/assets/{gedcom-C1S1YOp8.js → gedcom-D2xe_i6p.js} +1 -1
- package/dist/studio/assets/{gherkin-CggmAq_8.js → gherkin-CfD7h3px.js} +1 -1
- package/dist/studio/assets/{git-RLK0j3fM.js → git-Cwq_cahj.js} +1 -1
- package/dist/studio/assets/{glsl-B_NpiysH.js → glsl-D0CcO2Td.js} +1 -1
- package/dist/studio/assets/{gml-CfLWJ4mr.js → gml-D8d_W44x.js} +1 -1
- package/dist/studio/assets/{gn-BL2jwMxv.js → gn-CbO48UZX.js} +1 -1
- package/dist/studio/assets/{go-module-CfFxJhJ9.js → go-module-BPhqAln4.js} +1 -1
- package/dist/studio/assets/{go-DPHhTC7b.js → go-wqlRrtGA.js} +1 -1
- package/dist/studio/assets/{graphql-AEIhHPxy.js → graphql-DS8lBS8q.js} +1 -1
- package/dist/studio/assets/{groovy-DfNXG4BV.js → groovy-yCLF92cg.js} +1 -1
- package/dist/studio/assets/{haml-CXZSeYw-.js → haml-C2D_wcSJ.js} +1 -1
- package/dist/studio/assets/{handlebars-Yx3XW7j0.js → handlebars-BJmaPf4W.js} +1 -1
- package/dist/studio/assets/{haskell-CQdMWXNQ.js → haskell-Db91ltIz.js} +1 -1
- package/dist/studio/assets/{haxe-DCn-WCth.js → haxe-DtQpabsz.js} +1 -1
- package/dist/studio/assets/{hcl-BNJMZW2-.js → hcl-CbacBelw.js} +1 -1
- package/dist/studio/assets/{hlsl-BBLGIO82.js → hlsl-e6zZVoMh.js} +1 -1
- package/dist/studio/assets/{hoon-BDwAubZo.js → hoon-CAqp0j78.js} +1 -1
- package/dist/studio/assets/{hpkp-BovGDeby.js → hpkp-BOaZa6mB.js} +1 -1
- package/dist/studio/assets/{hsts-B4JaBFJQ.js → hsts-TD6vgckh.js} +1 -1
- package/dist/studio/assets/{http-CbyMf9D0.js → http-BlYRAYrd.js} +1 -1
- package/dist/studio/assets/{ichigojam-B5MFMtDf.js → ichigojam-DVXXE57k.js} +1 -1
- package/dist/studio/assets/{icon-BjdQp-Pn.js → icon-CBwNKgiU.js} +1 -1
- package/dist/studio/assets/{icu-message-format-DWw_jfY-.js → icu-message-format-CTXlEXJ_.js} +1 -1
- package/dist/studio/assets/{idris-CXbjL0QD.js → idris-CKV_ZHev.js} +1 -1
- package/dist/studio/assets/{iecst-DxQV2xDC.js → iecst-CWKVHx8I.js} +1 -1
- package/dist/studio/assets/{ignore-DFDicCus.js → ignore-BX-NgcSW.js} +1 -1
- package/dist/studio/assets/{index-TIlNv6VR.js → index-0x85l-03.js} +1 -1
- package/dist/studio/assets/{index-DrVeTSUu.js → index-B0aY8xCv.js} +1 -1
- package/dist/studio/assets/{index-DO46LT0S.js → index-B0tcDSiK.js} +1 -1
- package/dist/studio/assets/{index-BU9NMmGV.js → index-BMyOXiDz.js} +1 -1
- package/dist/studio/assets/{index-VLo9WrPH.js → index-C4BgqleR.js} +1 -1
- package/dist/studio/assets/{index-BmFV2eHo.js → index-CLF5MOZc.js} +1 -1
- package/dist/studio/assets/{index-BBTTW9jF.js → index-CWJKgNzp.js} +1 -1
- package/dist/studio/assets/{index-DHf5pZzx.js → index-D3hLiQ9M.js} +1 -1
- package/dist/studio/assets/{index-gP5QyDke.js → index-D50NAMXb.js} +1 -1
- package/dist/studio/assets/{index-PMVd-qOe.js → index-D6oDWlFG.js} +1 -1
- package/dist/studio/assets/{index-DJCrcU8M.js → index-DEkLVfwM.js} +1 -1
- package/dist/studio/assets/{index-B1egYoJi.js → index-D_hlidfO.js} +1 -1
- package/dist/studio/assets/{index-CHp0WaEJ.js → index-DeIo3CRw.js} +1 -1
- package/dist/studio/assets/{index-SRXj7vHt.js → index-Dg7Uh3mq.js} +1 -1
- package/dist/studio/assets/{index-CghV83pI.js → index-Dhd4AX7M.js} +1 -1
- package/dist/studio/assets/{index-DOh_HhC0.js → index-Y-u089Pk.js} +1 -1
- package/dist/studio/assets/{index-DObhJRgr.js → index-bcR-2sVb.js} +1 -1
- package/dist/studio/assets/{index-D4B5WqKQ.js → index-kn0O4fHS.js} +1 -1
- package/dist/studio/assets/{inform7-CXmpdphJ.js → inform7-BdOciMok.js} +1 -1
- package/dist/studio/assets/{ini-BhJlnZOW.js → ini-CeRgq-XD.js} +1 -1
- package/dist/studio/assets/{io-CKpbVI5V.js → io-DzCODMZd.js} +1 -1
- package/dist/studio/assets/{j-DyjePjrg.js → j-DglnaoKA.js} +1 -1
- package/dist/studio/assets/{java-D078uuY8.js → java-BXNdL3_O.js} +1 -1
- package/dist/studio/assets/{javadoc-CZb86AgG.js → javadoc-C2hj9616.js} +1 -1
- package/dist/studio/assets/{javadoclike-DoPOKYqD.js → javadoclike-CU_5SYEF.js} +1 -1
- package/dist/studio/assets/{javascript-GHnqrQfc.js → javascript-CFpiL51s.js} +1 -1
- package/dist/studio/assets/{javastacktrace-BiDjdmj0.js → javastacktrace-1hzn-skp.js} +1 -1
- package/dist/studio/assets/{jexl-CPj_eAp_.js → jexl-rksmWFIv.js} +1 -1
- package/dist/studio/assets/{jolie-CwT8JhJy.js → jolie-BTgzxBGF.js} +1 -1
- package/dist/studio/assets/{jq-BG39Yd9C.js → jq-LwC475l-.js} +1 -1
- package/dist/studio/assets/{js-extras-BDkj_9Mv.js → js-extras-Dq1IQqJz.js} +1 -1
- package/dist/studio/assets/{js-templates-C3KMxytZ.js → js-templates-CIizD0dy.js} +1 -1
- package/dist/studio/assets/{jsdoc-bPhV31Pa.js → jsdoc-BvfZSEIj.js} +1 -1
- package/dist/studio/assets/{json-CKZnHAT9.js → json-CpoNWqhD.js} +1 -1
- package/dist/studio/assets/{json5-CMGpzdLJ.js → json5-4YDdKCjg.js} +1 -1
- package/dist/studio/assets/{jsonp-4Nb9Metf.js → jsonp-B9RN6rNt.js} +1 -1
- package/dist/studio/assets/{jsstacktrace-D_2bDALk.js → jsstacktrace-Bdkpzn9x.js} +1 -1
- package/dist/studio/assets/{jsx-CFQtO2WJ.js → jsx-Ce6r0QDB.js} +1 -1
- package/dist/studio/assets/{julia-CVJcpt4K.js → julia-BthWUGeW.js} +1 -1
- package/dist/studio/assets/{keepalived-bWj2Rg7F.js → keepalived-CVPMyTyQ.js} +1 -1
- package/dist/studio/assets/{keyman-DuFkvC0r.js → keyman-DtsZcO8D.js} +1 -1
- package/dist/studio/assets/{kotlin-BTzNdJe3.js → kotlin-D3Y9uj4Z.js} +1 -1
- package/dist/studio/assets/{kumir-7C_78aNf.js → kumir-CPOJ0tSZ.js} +1 -1
- package/dist/studio/assets/{kusto-DZXm5Qio.js → kusto-C1HNQLhw.js} +1 -1
- package/dist/studio/assets/{latex-DriY0SMX.js → latex-CUckh63h.js} +1 -1
- package/dist/studio/assets/{latte-BWBPzn4f.js → latte-a2qg_yKy.js} +1 -1
- package/dist/studio/assets/{less-DN7qgunI.js → less-Cd_iHyqE.js} +1 -1
- package/dist/studio/assets/{lilypond-4YxFRcRw.js → lilypond-B8hVJI5I.js} +1 -1
- package/dist/studio/assets/{liquid-Cd_uIucl.js → liquid-5G90bCFj.js} +1 -1
- package/dist/studio/assets/{lisp-BP7jBTTA.js → lisp-DSOgflCq.js} +1 -1
- package/dist/studio/assets/{livescript-DJbIh_S5.js → livescript-DZJcluwV.js} +1 -1
- package/dist/studio/assets/{llvm-CBlfYoCs.js → llvm-DojEBdwB.js} +1 -1
- package/dist/studio/assets/{log-CSOFdK9w.js → log-Cd7KinAa.js} +1 -1
- package/dist/studio/assets/{lolcode-n-3luXdm.js → lolcode-DX9zAWw1.js} +1 -1
- package/dist/studio/assets/{lua-wiUrGgC9.js → lua-C8cShngG.js} +1 -1
- package/dist/studio/assets/{magma-CgD2fglf.js → magma-COS_CW3Z.js} +1 -1
- package/dist/studio/assets/{main-D2cPBeEE.js → main-CumjYRdB.js} +10 -10
- package/dist/studio/assets/{makefile-BQuhQXBU.js → makefile-ORwm4Dxo.js} +1 -1
- package/dist/studio/assets/{markdown-sY-jFJHf.js → markdown-CxyFHfrN.js} +1 -1
- package/dist/studio/assets/{markup-jfJpUKiV.js → markup-Bxhiqoiv.js} +1 -1
- package/dist/studio/assets/{markup-templating-DABQEWXi.js → markup-templating-DIsW9U8u.js} +1 -1
- package/dist/studio/assets/{matlab-B_G6jTNW.js → matlab-rRh44SMn.js} +1 -1
- package/dist/studio/assets/{maxscript-CRcjupwZ.js → maxscript-v-vMqCOK.js} +1 -1
- package/dist/studio/assets/{mel-CyHAybsi.js → mel-DVtn-zLf.js} +1 -1
- package/dist/studio/assets/{mermaid-CCEf4T8b.js → mermaid-Ux-WLZnN.js} +1 -1
- package/dist/studio/assets/{mizar-T2V4Ckms.js → mizar-dqohFMx8.js} +1 -1
- package/dist/studio/assets/{mongodb-DPNUWex7.js → mongodb-fK_-f4CD.js} +1 -1
- package/dist/studio/assets/{monkey-C4Z0BOAl.js → monkey-DTNMXJ5-.js} +1 -1
- package/dist/studio/assets/{moonscript-CELEbpU7.js → moonscript-DKopagrx.js} +1 -1
- package/dist/studio/assets/{n1ql-DnJCzhhr.js → n1ql-lpQ_cspy.js} +1 -1
- package/dist/studio/assets/{n4js-BSptiOL2.js → n4js-Bx5Z4KrV.js} +1 -1
- package/dist/studio/assets/{nand2tetris-hdl-Cmovt5Z5.js → nand2tetris-hdl-BdTMRXcX.js} +1 -1
- package/dist/studio/assets/{naniscript-DRSA-W4A.js → naniscript-BclpQnt-.js} +1 -1
- package/dist/studio/assets/{nasm-LeEJPYox.js → nasm-C6cNE2oB.js} +1 -1
- package/dist/studio/assets/{neon-BTgE4VrP.js → neon-CXy4pjE-.js} +1 -1
- package/dist/studio/assets/{nevod-CyJ75ZZ5.js → nevod-ChY3OBYE.js} +1 -1
- package/dist/studio/assets/{nginx-CMMQHhYQ.js → nginx-BDtTo2o_.js} +1 -1
- package/dist/studio/assets/{nim-DRii4PU9.js → nim-SJx4qRTA.js} +1 -1
- package/dist/studio/assets/{nix-BV3FRdHT.js → nix-CXEVkUTZ.js} +1 -1
- package/dist/studio/assets/{nsis-CG7pg5w1.js → nsis-ChqUTN3_.js} +1 -1
- package/dist/studio/assets/{objectivec-D1qkHI61.js → objectivec-Bif_Vq9x.js} +1 -1
- package/dist/studio/assets/{ocaml-G5UXRffb.js → ocaml-BsfIKJGt.js} +1 -1
- package/dist/studio/assets/{opencl-DH9om3Nj.js → opencl-DjXC2MGY.js} +1 -1
- package/dist/studio/assets/{openqasm-DUINt85m.js → openqasm-7hKOwGQD.js} +1 -1
- package/dist/studio/assets/{oz-DunlG4Xc.js → oz-CTS5SQXW.js} +1 -1
- package/dist/studio/assets/{parigp-DVPv9_GX.js → parigp-SK80Nczo.js} +1 -1
- package/dist/studio/assets/{parser-DIKcLF4Z.js → parser-DxI4vRR1.js} +1 -1
- package/dist/studio/assets/{pascal-DbPFyIjb.js → pascal-OnGuEytz.js} +1 -1
- package/dist/studio/assets/{pascaligo-oEFelDrB.js → pascaligo-B8M5TYvp.js} +1 -1
- package/dist/studio/assets/{pcaxis-DQdkdIra.js → pcaxis-BpNm2SVK.js} +1 -1
- package/dist/studio/assets/{peoplecode-BF8i0aVJ.js → peoplecode-DXY_RaD2.js} +1 -1
- package/dist/studio/assets/{perl-BPmDn3xJ.js → perl-Dtuqn4Xp.js} +1 -1
- package/dist/studio/assets/{php-DFx87xJ2.js → php-CFo6_Ryj.js} +1 -1
- package/dist/studio/assets/{php-extras-TAjpo9ic.js → php-extras-0Nh2gQq-.js} +1 -1
- package/dist/studio/assets/{phpdoc-BBrzwTbq.js → phpdoc-CARYGbOK.js} +1 -1
- package/dist/studio/assets/{plsql-DxkEtHA-.js → plsql-CQbqaNGP.js} +1 -1
- package/dist/studio/assets/{powerquery-EIiOTmVH.js → powerquery-Dx9Pb2Np.js} +1 -1
- package/dist/studio/assets/{powershell-1pCzWd7H.js → powershell-Cx1zuFmv.js} +1 -1
- package/dist/studio/assets/{processing-O3xM6oaT.js → processing-Beh-k7Ml.js} +1 -1
- package/dist/studio/assets/{prolog-BBW1KKhd.js → prolog-BI5KFAjm.js} +1 -1
- package/dist/studio/assets/{promql-BmAWnd7K.js → promql-dcfsqAsj.js} +1 -1
- package/dist/studio/assets/{properties-93zmgEVF.js → properties-MtCfVUMd.js} +1 -1
- package/dist/studio/assets/{protobuf-BpXa51SY.js → protobuf-BjdKLAKV.js} +1 -1
- package/dist/studio/assets/{psl-B8xEWuyj.js → psl-Cx9r6CNV.js} +1 -1
- package/dist/studio/assets/{pug-DXABnYPh.js → pug-D8RUoMYP.js} +1 -1
- package/dist/studio/assets/{puppet-Bpo-cj4c.js → puppet-Dvn9LSEU.js} +1 -1
- package/dist/studio/assets/{pure-I_oldbAL.js → pure-Dh0IChNO.js} +1 -1
- package/dist/studio/assets/{purebasic-DKhyd2nf.js → purebasic-CWrbMTTI.js} +1 -1
- package/dist/studio/assets/{purescript-CaJ0yzj4.js → purescript-BiNDKE2B.js} +1 -1
- package/dist/studio/assets/{python-B_DfaSuB.js → python-BVcF3XYn.js} +1 -1
- package/dist/studio/assets/{q-BmKhVqrW.js → q-DURbmdfQ.js} +1 -1
- package/dist/studio/assets/{qml-CiaCtvhx.js → qml-Cy8hlIHY.js} +1 -1
- package/dist/studio/assets/{qore-zqdgeLCw.js → qore-CHMHlojV.js} +1 -1
- package/dist/studio/assets/{qsharp-Bfpk-Ju6.js → qsharp-GjRoYO-1.js} +1 -1
- package/dist/studio/assets/{r-ZAhBjghW.js → r-EhOfI32_.js} +1 -1
- package/dist/studio/assets/{racket-D2jHd5Y5.js → racket-CzMK9lE_.js} +1 -1
- package/dist/studio/assets/{reason-DgfE5uJL.js → reason-BxZCBWhb.js} +1 -1
- package/dist/studio/assets/{regex-BfxeHUtm.js → regex-CwKKPxpn.js} +1 -1
- package/dist/studio/assets/{rego-Cv_EslLl.js → rego-BWYj8GyT.js} +1 -1
- package/dist/studio/assets/{renpy-D3wvGV7S.js → renpy-CUMBlHSw.js} +1 -1
- package/dist/studio/assets/{rest-D8vtQK8P.js → rest-CoMyBcfK.js} +1 -1
- package/dist/studio/assets/{rip-DG6svBOt.js → rip-BAZ3OuaT.js} +1 -1
- package/dist/studio/assets/{roboconf-UKYtERSh.js → roboconf-Dw65xRZt.js} +1 -1
- package/dist/studio/assets/{robotframework-CxmbkvPF.js → robotframework-Cv6qjp7o.js} +1 -1
- package/dist/studio/assets/{ruby-BTDDgzKQ.js → ruby-NcOTuLXn.js} +1 -1
- package/dist/studio/assets/{rust-Dp_h83kI.js → rust-C3HDlluF.js} +1 -1
- package/dist/studio/assets/{sas-obx5GLrt.js → sas-D12iQUos.js} +1 -1
- package/dist/studio/assets/{sass-B_0rm2vy.js → sass-DCTMN0Y7.js} +1 -1
- package/dist/studio/assets/{scala-CP4ekM-D.js → scala-Wa0ZF1ri.js} +1 -1
- package/dist/studio/assets/{scheme-DBjjeeFg.js → scheme-9DdswwZg.js} +1 -1
- package/dist/studio/assets/{scss-Bwa0z1tj.js → scss-CQJKLxeQ.js} +1 -1
- package/dist/studio/assets/{shell-session-DwtZ-Fh4.js → shell-session-DxI_HxuI.js} +1 -1
- package/dist/studio/assets/{smali-CSJQP7J9.js → smali-DVtPm_Sa.js} +1 -1
- package/dist/studio/assets/{smalltalk-C40XJmMG.js → smalltalk-BZevhEKI.js} +1 -1
- package/dist/studio/assets/{smarty-BUjSSkdu.js → smarty-BpeAPf9k.js} +1 -1
- package/dist/studio/assets/{sml-IKAOe6zG.js → sml-CmNxklqM.js} +1 -1
- package/dist/studio/assets/{solidity-CCGf2MwZ.js → solidity-DdvPhBnT.js} +1 -1
- package/dist/studio/assets/{solution-file-X7RSrghd.js → solution-file-BnNvcZ_P.js} +1 -1
- package/dist/studio/assets/{soy-BqKQ5sQi.js → soy-Bf9GqMGA.js} +1 -1
- package/dist/studio/assets/{sparql-CIT1UlX4.js → sparql-DliRUlpE.js} +1 -1
- package/dist/studio/assets/{splunk-spl-BpbkQdY_.js → splunk-spl-BWusPVvn.js} +1 -1
- package/dist/studio/assets/{sqf-CC54F0Ux.js → sqf-hF6h2sKG.js} +1 -1
- package/dist/studio/assets/{sql-BYiJj09k.js → sql-B5yz3AH1.js} +1 -1
- package/dist/studio/assets/{squirrel-2GZtIBTP.js → squirrel-C2gy7Nv9.js} +1 -1
- package/dist/studio/assets/{stan-DOiorWGs.js → stan-Qm-xpAJa.js} +1 -1
- package/dist/studio/assets/{stylus-B5cwUYSp.js → stylus-CM8v5z-b.js} +1 -1
- package/dist/studio/assets/{swift-ixw0N4HA.js → swift-Bi4v7ufT.js} +1 -1
- package/dist/studio/assets/{systemd-DsZjZ8a0.js → systemd-DQdULvua.js} +1 -1
- package/dist/studio/assets/{t4-cs-Cm1EfTPA.js → t4-cs-CzTp815y.js} +1 -1
- package/dist/studio/assets/{t4-templating-2YhQTmjq.js → t4-templating-D1ysDxO3.js} +1 -1
- package/dist/studio/assets/{t4-vb-8aHjRbIm.js → t4-vb--eQX5vRL.js} +1 -1
- package/dist/studio/assets/{tap-CRHlY1Or.js → tap-BOPibrmg.js} +1 -1
- package/dist/studio/assets/{tcl-7npovFvo.js → tcl-B4PPgerr.js} +1 -1
- package/dist/studio/assets/{textile-BUlvhhf1.js → textile-gSC3r8Yp.js} +1 -1
- package/dist/studio/assets/{token-6GSAFR2W-SPYPLMBM-Bf7GlBcT.js → token-6GSAFR2W-SPYPLMBM-C784OxO0.js} +1 -1
- package/dist/studio/assets/{token-6GSAFR2W-SPYPLMBM-ChURikIE-CNho2omN.js → token-6GSAFR2W-SPYPLMBM-ChURikIE-BlqIoOXF.js} +1 -1
- package/dist/studio/assets/token-util-NEHG7TUY-JRJTGTAB-CVJARfpb.js +1 -0
- package/dist/studio/assets/token-util-NEHG7TUY-JRJTGTAB-hEay2AHp-AlRwFCRt.js +1 -0
- package/dist/studio/assets/{toml-BNPtcwqv.js → toml-BYnAhcZD.js} +1 -1
- package/dist/studio/assets/{tremor-DLtZvonv.js → tremor-Dd-aiIOm.js} +1 -1
- package/dist/studio/assets/{tsx-DT09a_iL.js → tsx-BOnlGcr5.js} +1 -1
- package/dist/studio/assets/{tt2-x_j3kSs9.js → tt2-EB8SrkH7.js} +1 -1
- package/dist/studio/assets/{turtle-B8loHm6K.js → turtle-DzHqcrlc.js} +1 -1
- package/dist/studio/assets/{twig-D1zdFXdr.js → twig-BK8xKWFN.js} +1 -1
- package/dist/studio/assets/{typescript-Bel8F5GH.js → typescript-BkAudIJR.js} +1 -1
- package/dist/studio/assets/{typoscript-v72Q67tZ.js → typoscript-BnNQGdrR.js} +1 -1
- package/dist/studio/assets/{unrealscript-B2jMCb53.js → unrealscript-BwpVl9EE.js} +1 -1
- package/dist/studio/assets/{uorazor-DohiT_We.js → uorazor-Pq9IA5Ki.js} +1 -1
- package/dist/studio/assets/{uri-DLgQjSQL.js → uri-DYwX1YAI.js} +1 -1
- package/dist/studio/assets/{v-MZEOrqGC.js → v-BsrzWyGG.js} +1 -1
- package/dist/studio/assets/{vala-DwfqEZ42.js → vala-BQXRv1lI.js} +1 -1
- package/dist/studio/assets/{vbnet-Bfmp59ad.js → vbnet-pcWsRFHp.js} +1 -1
- package/dist/studio/assets/{velocity-BW0rn6q8.js → velocity-DYQxzAUs.js} +1 -1
- package/dist/studio/assets/{verilog-CciPbndg.js → verilog-D3sf-ez_.js} +1 -1
- package/dist/studio/assets/{vhdl-CcsUo07t.js → vhdl-dLP7vBSQ.js} +1 -1
- package/dist/studio/assets/{vim-BYrWQT4U.js → vim-DjAIRcct.js} +1 -1
- package/dist/studio/assets/{visual-basic-DEkVTY1u.js → visual-basic-Ac03-cCA.js} +1 -1
- package/dist/studio/assets/{warpscript-DrS6Lwf1.js → warpscript-k0YStayz.js} +1 -1
- package/dist/studio/assets/{wasm-SvSErsNr.js → wasm-CnP0DGRU.js} +1 -1
- package/dist/studio/assets/{web-idl-L4D9BFZn.js → web-idl-BR71SOwz.js} +1 -1
- package/dist/studio/assets/{wiki-1KcTXRBD.js → wiki-zBomQTkt.js} +1 -1
- package/dist/studio/assets/{wolfram-xAhrDLAD.js → wolfram-Db54pnru.js} +1 -1
- package/dist/studio/assets/{wren-DWt6yoPK.js → wren-Bn8TVzYG.js} +1 -1
- package/dist/studio/assets/{xeora-D686sMu3.js → xeora-DEoFxQcY.js} +1 -1
- package/dist/studio/assets/{xml-doc-Bquf1yJt.js → xml-doc-BKZOEifv.js} +1 -1
- package/dist/studio/assets/{xojo-DZfdDq2N.js → xojo-C3-iy602.js} +1 -1
- package/dist/studio/assets/{xquery-DdtAZAmm.js → xquery-Bt3VaJqs.js} +1 -1
- package/dist/studio/assets/{yaml-D4fft3QZ.js → yaml-Btor8OBf.js} +1 -1
- package/dist/studio/assets/{yang-L0gWA1f7.js → yang-ZhWc3hEx.js} +1 -1
- package/dist/studio/assets/{zig-BhGfFrYV.js → zig-_nTJz54-.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/package.json +5 -5
- package/dist/studio/assets/token-util-NEHG7TUY-JRJTGTAB-CC_oJ7-c.js +0 -1
- package/dist/studio/assets/token-util-NEHG7TUY-JRJTGTAB-hEay2AHp-MVB0L1CT.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./apex-
|
|
2
|
-
import{_ as G}from"./index-gP5QyDke.js";function vXe(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(n,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var JRr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Wh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yj={exports:{}},TO={};var kie;function bXe(){if(kie)return TO;kie=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,s,i){var o=null;if(i!==void 0&&(o=""+i),s.key!==void 0&&(o=""+s.key),"key"in s){i={};for(var a in s)a!=="key"&&(i[a]=s[a])}else i=s;return s=i.ref,{$$typeof:e,type:n,key:o,ref:s!==void 0?s:null,props:i}}return TO.Fragment=t,TO.jsx=r,TO.jsxs=r,TO}var Eie;function xXe(){return Eie||(Eie=1,yj.exports=bXe()),yj.exports}var f=xXe(),vj={exports:{}},br={},Cie;function wXe(){if(Cie)return br;Cie=1;var e={env:{}};var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),m=Symbol.iterator;function g(Z){return Z===null||typeof Z!="object"?null:(Z=m&&Z[m]||Z["@@iterator"],typeof Z=="function"?Z:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,w={};function S(Z,F,W){this.props=Z,this.context=F,this.refs=w,this.updater=W||v}S.prototype.isReactComponent={},S.prototype.setState=function(Z,F){if(typeof Z!="object"&&typeof Z!="function"&&Z!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,Z,F,"setState")},S.prototype.forceUpdate=function(Z){this.updater.enqueueForceUpdate(this,Z,"forceUpdate")};function O(){}O.prototype=S.prototype;function k(Z,F,W){this.props=Z,this.context=F,this.refs=w,this.updater=W||v}var C=k.prototype=new O;C.constructor=k,b(C,S.prototype),C.isPureReactComponent=!0;var T=Array.isArray;function P(){}var A={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function M(Z,F,W){var K=W.ref;return{$$typeof:t,type:Z,key:F,ref:K!==void 0?K:null,props:W}}function z(Z,F){return M(Z.type,F,Z.props)}function Q(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===t}function U(Z){var F={"=":"=0",":":"=2"};return"$"+Z.replace(/[=:]/g,function(W){return F[W]})}var L=/\/+/g;function V(Z,F){return typeof Z=="object"&&Z!==null&&Z.key!=null?U(""+Z.key):F.toString(36)}function j(Z){switch(Z.status){case"fulfilled":return Z.value;case"rejected":throw Z.reason;default:switch(typeof Z.status=="string"?Z.then(P,P):(Z.status="pending",Z.then(function(F){Z.status==="pending"&&(Z.status="fulfilled",Z.value=F)},function(F){Z.status==="pending"&&(Z.status="rejected",Z.reason=F)})),Z.status){case"fulfilled":return Z.value;case"rejected":throw Z.reason}}throw Z}function N(Z,F,W,K,se){var X=typeof Z;(X==="undefined"||X==="boolean")&&(Z=null);var te=!1;if(Z===null)te=!0;else switch(X){case"bigint":case"string":case"number":te=!0;break;case"object":switch(Z.$$typeof){case t:case r:te=!0;break;case d:return te=Z._init,N(te(Z._payload),F,W,K,se)}}if(te)return se=se(Z),te=K===""?"."+V(Z,0):K,T(se)?(W="",te!=null&&(W=te.replace(L,"$&/")+"/"),N(se,F,W,"",function(Ae){return Ae})):se!=null&&(Q(se)&&(se=z(se,W+(se.key==null||Z&&Z.key===se.key?"":(""+se.key).replace(L,"$&/")+"/")+te)),F.push(se)),1;te=0;var de=K===""?".":K+":";if(T(Z))for(var ue=0;ue<Z.length;ue++)K=Z[ue],X=de+V(K,ue),te+=N(K,F,W,X,se);else if(ue=g(Z),typeof ue=="function")for(Z=ue.call(Z),ue=0;!(K=Z.next()).done;)K=K.value,X=de+V(K,ue++),te+=N(K,F,W,X,se);else if(X==="object"){if(typeof Z.then=="function")return N(j(Z),F,W,K,se);throw F=String(Z),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(Z).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return te}function I(Z,F,W){if(Z==null)return Z;var K=[],se=0;return N(Z,K,"","",function(X){return F.call(W,X,se++)}),K}function H(Z){if(Z._status===-1){var F=Z._result;F=F(),F.then(function(W){(Z._status===0||Z._status===-1)&&(Z._status=1,Z._result=W)},function(W){(Z._status===0||Z._status===-1)&&(Z._status=2,Z._result=W)}),Z._status===-1&&(Z._status=0,Z._result=F)}if(Z._status===1)return Z._result.default;throw Z._result}var B=typeof reportError=="function"?reportError:function(Z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof Z=="object"&&Z!==null&&typeof Z.message=="string"?String(Z.message):String(Z),error:Z});if(!window.dispatchEvent(F))return}else if(typeof e=="object"&&typeof e.emit=="function"){e.emit("uncaughtException",Z);return}console.error(Z)},J={map:I,forEach:function(Z,F,W){I(Z,function(){F.apply(this,arguments)},W)},count:function(Z){var F=0;return I(Z,function(){F++}),F},toArray:function(Z){return I(Z,function(F){return F})||[]},only:function(Z){if(!Q(Z))throw Error("React.Children.only expected to receive a single React element child.");return Z}};return br.Activity=p,br.Children=J,br.Component=S,br.Fragment=n,br.Profiler=i,br.PureComponent=k,br.StrictMode=s,br.Suspense=c,br.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,br.__COMPILER_RUNTIME={__proto__:null,c:function(Z){return A.H.useMemoCache(Z)}},br.cache=function(Z){return function(){return Z.apply(null,arguments)}},br.cacheSignal=function(){return null},br.cloneElement=function(Z,F,W){if(Z==null)throw Error("The argument must be a React element, but you passed "+Z+".");var K=b({},Z.props),se=Z.key;if(F!=null)for(X in F.key!==void 0&&(se=""+F.key),F)!R.call(F,X)||X==="key"||X==="__self"||X==="__source"||X==="ref"&&F.ref===void 0||(K[X]=F[X]);var X=arguments.length-2;if(X===1)K.children=W;else if(1<X){for(var te=Array(X),de=0;de<X;de++)te[de]=arguments[de+2];K.children=te}return M(Z.type,se,K)},br.createContext=function(Z){return Z={$$typeof:a,_currentValue:Z,_currentValue2:Z,_threadCount:0,Provider:null,Consumer:null},Z.Provider=Z,Z.Consumer={$$typeof:o,_context:Z},Z},br.createElement=function(Z,F,W){var K,se={},X=null;if(F!=null)for(K in F.key!==void 0&&(X=""+F.key),F)R.call(F,K)&&K!=="key"&&K!=="__self"&&K!=="__source"&&(se[K]=F[K]);var te=arguments.length-2;if(te===1)se.children=W;else if(1<te){for(var de=Array(te),ue=0;ue<te;ue++)de[ue]=arguments[ue+2];se.children=de}if(Z&&Z.defaultProps)for(K in te=Z.defaultProps,te)se[K]===void 0&&(se[K]=te[K]);return M(Z,X,se)},br.createRef=function(){return{current:null}},br.forwardRef=function(Z){return{$$typeof:l,render:Z}},br.isValidElement=Q,br.lazy=function(Z){return{$$typeof:d,_payload:{_status:-1,_result:Z},_init:H}},br.memo=function(Z,F){return{$$typeof:u,type:Z,compare:F===void 0?null:F}},br.startTransition=function(Z){var F=A.T,W={};A.T=W;try{var K=Z(),se=A.S;se!==null&&se(W,K),typeof K=="object"&&K!==null&&typeof K.then=="function"&&K.then(P,B)}catch(X){B(X)}finally{F!==null&&W.types!==null&&(F.types=W.types),A.T=F}},br.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},br.use=function(Z){return A.H.use(Z)},br.useActionState=function(Z,F,W){return A.H.useActionState(Z,F,W)},br.useCallback=function(Z,F){return A.H.useCallback(Z,F)},br.useContext=function(Z){return A.H.useContext(Z)},br.useDebugValue=function(){},br.useDeferredValue=function(Z,F){return A.H.useDeferredValue(Z,F)},br.useEffect=function(Z,F){return A.H.useEffect(Z,F)},br.useEffectEvent=function(Z){return A.H.useEffectEvent(Z)},br.useId=function(){return A.H.useId()},br.useImperativeHandle=function(Z,F,W){return A.H.useImperativeHandle(Z,F,W)},br.useInsertionEffect=function(Z,F){return A.H.useInsertionEffect(Z,F)},br.useLayoutEffect=function(Z,F){return A.H.useLayoutEffect(Z,F)},br.useMemo=function(Z,F){return A.H.useMemo(Z,F)},br.useOptimistic=function(Z,F){return A.H.useOptimistic(Z,F)},br.useReducer=function(Z,F,W){return A.H.useReducer(Z,F,W)},br.useRef=function(Z){return A.H.useRef(Z)},br.useState=function(Z){return A.H.useState(Z)},br.useSyncExternalStore=function(Z,F,W){return A.H.useSyncExternalStore(Z,F,W)},br.useTransition=function(){return A.H.useTransition()},br.version="19.2.3",br}var Tie;function $w(){return Tie||(Tie=1,vj.exports=wXe()),vj.exports}var E=$w();const me=Wh(E),Nq=vXe({__proto__:null,default:me},[E]);var bj={exports:{}},DO={},xj={exports:{}},wj={};var Die;function SXe(){return Die||(Die=1,(function(e){function t(j,N){var I=j.length;j.push(N);e:for(;0<I;){var H=I-1>>>1,B=j[H];if(0<s(B,N))j[H]=N,j[I]=B,I=H;else break e}}function r(j){return j.length===0?null:j[0]}function n(j){if(j.length===0)return null;var N=j[0],I=j.pop();if(I!==N){j[0]=I;e:for(var H=0,B=j.length,J=B>>>1;H<J;){var Z=2*(H+1)-1,F=j[Z],W=Z+1,K=j[W];if(0>s(F,I))W<B&&0>s(K,F)?(j[H]=K,j[W]=I,H=W):(j[H]=F,j[Z]=I,H=Z);else if(W<B&&0>s(K,I))j[H]=K,j[W]=I,H=W;else break e}}return N}function s(j,N){var I=j.sortIndex-N.sortIndex;return I!==0?I:j.id-N.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,d=null,p=3,m=!1,g=!1,v=!1,b=!1,w=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function k(j){for(var N=r(c);N!==null;){if(N.callback===null)n(c);else if(N.startTime<=j)n(c),N.sortIndex=N.expirationTime,t(l,N);else break;N=r(c)}}function C(j){if(v=!1,k(j),!g)if(r(l)!==null)g=!0,T||(T=!0,Q());else{var N=r(c);N!==null&&V(C,N.startTime-j)}}var T=!1,P=-1,A=5,R=-1;function M(){return b?!0:!(e.unstable_now()-R<A)}function z(){if(b=!1,T){var j=e.unstable_now();R=j;var N=!0;try{e:{g=!1,v&&(v=!1,S(P),P=-1),m=!0;var I=p;try{t:{for(k(j),d=r(l);d!==null&&!(d.expirationTime>j&&M());){var H=d.callback;if(typeof H=="function"){d.callback=null,p=d.priorityLevel;var B=H(d.expirationTime<=j);if(j=e.unstable_now(),typeof B=="function"){d.callback=B,k(j),N=!0;break t}d===r(l)&&n(l),k(j)}else n(l);d=r(l)}if(d!==null)N=!0;else{var J=r(c);J!==null&&V(C,J.startTime-j),N=!1}}break e}finally{d=null,p=I,m=!1}N=void 0}}finally{N?Q():T=!1}}}var Q;if(typeof O=="function")Q=function(){O(z)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,L=U.port2;U.port1.onmessage=z,Q=function(){L.postMessage(null)}}else Q=function(){w(z,0)};function V(j,N){P=w(function(){j(e.unstable_now())},N)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(j){j.callback=null},e.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<j?Math.floor(1e3/j):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_next=function(j){switch(p){case 1:case 2:case 3:var N=3;break;default:N=p}var I=p;p=N;try{return j()}finally{p=I}},e.unstable_requestPaint=function(){b=!0},e.unstable_runWithPriority=function(j,N){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var I=p;p=j;try{return N()}finally{p=I}},e.unstable_scheduleCallback=function(j,N,I){var H=e.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?H+I:H):I=H,j){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=I+B,j={id:u++,callback:N,priorityLevel:j,startTime:I,expirationTime:B,sortIndex:-1},I>H?(j.sortIndex=I,t(c,j),r(l)===null&&j===r(c)&&(v?(S(P),P=-1):v=!0,V(C,I-H))):(j.sortIndex=B,t(l,j),g||m||(g=!0,T||(T=!0,Q()))),j},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(j){var N=p;return function(){var I=p;p=N;try{return j.apply(this,arguments)}finally{p=I}}}})(wj)),wj}var Aie;function OXe(){return Aie||(Aie=1,xj.exports=SXe()),xj.exports}var Sj={exports:{}},Bo={};var Pie;function _Xe(){if(Pie)return Bo;Pie=1;var e=$w();function t(l){var c="https://react.dev/errors/"+l;if(1<arguments.length){c+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)c+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+l+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},s=Symbol.for("react.portal");function i(l,c,u){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:d==null?null:""+d,children:l,containerInfo:c,implementation:u}}var o=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(l,c){if(l==="font")return"";if(typeof c=="string")return c==="use-credentials"?c:""}return Bo.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,Bo.createPortal=function(l,c){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11)throw Error(t(299));return i(l,c,null,u)},Bo.flushSync=function(l){var c=o.T,u=n.p;try{if(o.T=null,n.p=2,l)return l()}finally{o.T=c,n.p=u,n.d.f()}},Bo.preconnect=function(l,c){typeof l=="string"&&(c?(c=c.crossOrigin,c=typeof c=="string"?c==="use-credentials"?c:"":void 0):c=null,n.d.C(l,c))},Bo.prefetchDNS=function(l){typeof l=="string"&&n.d.D(l)},Bo.preinit=function(l,c){if(typeof l=="string"&&c&&typeof c.as=="string"){var u=c.as,d=a(u,c.crossOrigin),p=typeof c.integrity=="string"?c.integrity:void 0,m=typeof c.fetchPriority=="string"?c.fetchPriority:void 0;u==="style"?n.d.S(l,typeof c.precedence=="string"?c.precedence:void 0,{crossOrigin:d,integrity:p,fetchPriority:m}):u==="script"&&n.d.X(l,{crossOrigin:d,integrity:p,fetchPriority:m,nonce:typeof c.nonce=="string"?c.nonce:void 0})}},Bo.preinitModule=function(l,c){if(typeof l=="string")if(typeof c=="object"&&c!==null){if(c.as==null||c.as==="script"){var u=a(c.as,c.crossOrigin);n.d.M(l,{crossOrigin:u,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0})}}else c==null&&n.d.M(l)},Bo.preload=function(l,c){if(typeof l=="string"&&typeof c=="object"&&c!==null&&typeof c.as=="string"){var u=c.as,d=a(u,c.crossOrigin);n.d.L(l,u,{crossOrigin:d,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0,type:typeof c.type=="string"?c.type:void 0,fetchPriority:typeof c.fetchPriority=="string"?c.fetchPriority:void 0,referrerPolicy:typeof c.referrerPolicy=="string"?c.referrerPolicy:void 0,imageSrcSet:typeof c.imageSrcSet=="string"?c.imageSrcSet:void 0,imageSizes:typeof c.imageSizes=="string"?c.imageSizes:void 0,media:typeof c.media=="string"?c.media:void 0})}},Bo.preloadModule=function(l,c){if(typeof l=="string")if(c){var u=a(c.as,c.crossOrigin);n.d.m(l,{as:typeof c.as=="string"&&c.as!=="script"?c.as:void 0,crossOrigin:u,integrity:typeof c.integrity=="string"?c.integrity:void 0})}else n.d.m(l)},Bo.requestFormReset=function(l){n.d.r(l)},Bo.unstable_batchedUpdates=function(l,c){return l(c)},Bo.useFormState=function(l,c,u){return o.H.useFormState(l,c,u)},Bo.useFormStatus=function(){return o.H.useHostTransitionStatus()},Bo.version="19.2.3",Bo}var $ie;function Q1e(){if($ie)return Sj.exports;$ie=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Sj.exports=_Xe(),Sj.exports}var Iie;function kXe(){if(Iie)return DO;Iie=1;var e={env:{}};var t=OXe(),r=$w(),n=Q1e();function s(h){var y="https://react.dev/errors/"+h;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)y+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+h+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(h){return!(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)}function o(h){var y=h,x=h;if(h.alternate)for(;y.return;)y=y.return;else{h=y;do y=h,(y.flags&4098)!==0&&(x=y.return),h=y.return;while(h)}return y.tag===3?x:null}function a(h){if(h.tag===13){var y=h.memoizedState;if(y===null&&(h=h.alternate,h!==null&&(y=h.memoizedState)),y!==null)return y.dehydrated}return null}function l(h){if(h.tag===31){var y=h.memoizedState;if(y===null&&(h=h.alternate,h!==null&&(y=h.memoizedState)),y!==null)return y.dehydrated}return null}function c(h){if(o(h)!==h)throw Error(s(188))}function u(h){var y=h.alternate;if(!y){if(y=o(h),y===null)throw Error(s(188));return y!==h?null:h}for(var x=h,_=y;;){var D=x.return;if(D===null)break;var $=D.alternate;if($===null){if(_=D.return,_!==null){x=_;continue}break}if(D.child===$.child){for($=D.child;$;){if($===x)return c(D),h;if($===_)return c(D),y;$=$.sibling}throw Error(s(188))}if(x.return!==_.return)x=D,_=$;else{for(var q=!1,ee=D.child;ee;){if(ee===x){q=!0,x=D,_=$;break}if(ee===_){q=!0,_=D,x=$;break}ee=ee.sibling}if(!q){for(ee=$.child;ee;){if(ee===x){q=!0,x=$,_=D;break}if(ee===_){q=!0,_=$,x=D;break}ee=ee.sibling}if(!q)throw Error(s(189))}}if(x.alternate!==_)throw Error(s(190))}if(x.tag!==3)throw Error(s(188));return x.stateNode.current===x?h:y}function d(h){var y=h.tag;if(y===5||y===26||y===27||y===6)return h;for(h=h.child;h!==null;){if(y=d(h),y!==null)return y;h=h.sibling}return null}var p=Object.assign,m=Symbol.for("react.element"),g=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),k=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),Q=Symbol.iterator;function U(h){return h===null||typeof h!="object"?null:(h=Q&&h[Q]||h["@@iterator"],typeof h=="function"?h:null)}var L=Symbol.for("react.client.reference");function V(h){if(h==null)return null;if(typeof h=="function")return h.$$typeof===L?null:h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case b:return"Fragment";case S:return"Profiler";case w:return"StrictMode";case T:return"Suspense";case P:return"SuspenseList";case M:return"Activity"}if(typeof h=="object")switch(h.$$typeof){case v:return"Portal";case k:return h.displayName||"Context";case O:return(h._context.displayName||"Context")+".Consumer";case C:var y=h.render;return h=h.displayName,h||(h=y.displayName||y.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case A:return y=h.displayName||null,y!==null?y:V(h.type)||"Memo";case R:y=h._payload,h=h._init;try{return V(h(y))}catch{}}return null}var j=Array.isArray,N=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H={pending:!1,data:null,method:null,action:null},B=[],J=-1;function Z(h){return{current:h}}function F(h){0>J||(h.current=B[J],B[J]=null,J--)}function W(h,y){J++,B[J]=h.current,h.current=y}var K=Z(null),se=Z(null),X=Z(null),te=Z(null);function de(h,y){switch(W(X,y),W(se,h),W(K,null),y.nodeType){case 9:case 11:h=(h=y.documentElement)&&(h=h.namespaceURI)?Wse(h):0;break;default:if(h=y.tagName,y=y.namespaceURI)y=Wse(y),h=Gse(y,h);else switch(h){case"svg":h=1;break;case"math":h=2;break;default:h=0}}F(K),W(K,h)}function ue(){F(K),F(se),F(X)}function Ae(h){h.memoizedState!==null&&W(te,h);var y=K.current,x=Gse(y,h.type);y!==x&&(W(se,h),W(K,x))}function _e(h){se.current===h&&(F(K),F(se)),te.current===h&&(F(te),_O._currentValue=H)}var De,Me;function We(h){if(De===void 0)try{throw Error()}catch(x){var y=x.stack.trim().match(/\n( *(at )?)/);De=y&&y[1]||"",Me=-1<x.stack.indexOf(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./apex-Bf78Wtcr.js","./sql-CJATM1Qp.js","./arduino-CRCMXEMi.js","./cpp-BdJVwJpi.js","./c-kgVuzdLE.js","./aspnet-D_QFSJhV.js","./csharp-Cd5Udg29.js","./bash-C_hNVE7G.js","./bash-CefCgV5_.js","./basic-CRyKmNKD.js","./basic-DBS9NaGG.js","./bison-CMDPnogF.js","./c-DBQxp504.js","./chaiscript-BlW62OoP.js","./clike-B5SB4vO2.js","./clike-B5tY_8Hg.js","./cpp-D5uvEtNZ.js","./crystal-C2RXXfYu.js","./ruby-DYsn9XfW.js","./csharp-Cz6i68UO.js","./cshtml-S_c0BAX_.js","./css-BeiCa0aq.js","./css-CF9HHZb0.js","./django-DC0hqXDy.js","./markup-templating-BxAVv-bL.js","./ejs-DIbOzUlF.js","./erb-D_EXn0DN.js","./etlua-BFFGhY-Z.js","./lua-DER4jxlW.js","./ftl-DxopztnG.js","./glsl-D0CcO2Td.js","./haml-C2D_wcSJ.js","./handlebars-BJmaPf4W.js","./haskell-Db91ltIz.js","./haskell-Ds42Eazu.js","./hlsl-e6zZVoMh.js","./idris-CKV_ZHev.js","./java-BXNdL3_O.js","./java-BxMbkJZ_.js","./javadoc-C2hj9616.js","./javadoclike-myFApC35.js","./javadoclike-CU_5SYEF.js","./javascript-CFpiL51s.js","./javascript-D8vYUPHd.js","./jsdoc-BvfZSEIj.js","./typescript-CVO-8GEc.js","./json-CpoNWqhD.js","./json-BESjz4hO.js","./json5-4YDdKCjg.js","./jsonp-B9RN6rNt.js","./jsx-Ce6r0QDB.js","./jsx-CWP8P1mH.js","./latte-a2qg_yKy.js","./php-iTdQntIy.js","./lilypond-B8hVJI5I.js","./scheme-Cscf027c.js","./liquid-5G90bCFj.js","./lua-C8cShngG.js","./markup-templating-DIsW9U8u.js","./markup-Bxhiqoiv.js","./markup-BONeskWm.js","./objectivec-Bif_Vq9x.js","./opencl-DjXC2MGY.js","./php-extras-0Nh2gQq-.js","./php-CFo6_Ryj.js","./phpdoc-CARYGbOK.js","./plsql-CQbqaNGP.js","./purescript-BiNDKE2B.js","./racket-CzMK9lE_.js","./ruby-NcOTuLXn.js","./scala-Wa0ZF1ri.js","./scheme-9DdswwZg.js","./shell-session-DxI_HxuI.js","./smarty-BpeAPf9k.js","./soy-Bf9GqMGA.js","./sparql-DliRUlpE.js","./turtle-Ro1R6Je7.js","./sql-B5yz3AH1.js","./t4-cs-CzTp815y.js","./t4-templating-B5EzSFYT.js","./t4-templating-D1ysDxO3.js","./t4-vb--eQX5vRL.js","./vbnet-BhrUc4aD.js","./tap-BOPibrmg.js","./yaml-pHjxJgpq.js","./tsx-BOnlGcr5.js","./tt2-EB8SrkH7.js","./turtle-DzHqcrlc.js","./twig-BK8xKWFN.js","./typescript-BkAudIJR.js","./vbnet-pcWsRFHp.js","./yaml-Btor8OBf.js","./core-D14Evsir.js","./token-util-NEHG7TUY-JRJTGTAB-hEay2AHp-AlRwFCRt.js","./chunk-55VPMN3N-Ax1F4Y75-w2NrKP2P.js","./index-D50NAMXb.js","./token-6GSAFR2W-SPYPLMBM-ChURikIE-BlqIoOXF.js","./token-util-NEHG7TUY-JRJTGTAB-CVJARfpb.js","./chunk-55VPMN3N-7h-uvGxn.js","./token-6GSAFR2W-SPYPLMBM-C784OxO0.js","./index-Dg7Uh3mq.js","./index-BMyOXiDz.js","./index-D6oDWlFG.js","./index-DeIo3CRw.js","./index-B0aY8xCv.js","./index-bcR-2sVb.js","./index-kn0O4fHS.js","./index-CLF5MOZc.js","./index-B0tcDSiK.js","./index-Dhd4AX7M.js","./index-C4BgqleR.js","./index-D_hlidfO.js","./index-DEkLVfwM.js","./index-0x85l-03.js","./dockerfile-BKs6k2Af.js","./simple-mode-GW_nhZxv.js","./factor-kuTfRLto.js","./nsis-LdVXkNf5.js","./pug-DeIclll2.js","./javascript-iXu5QeM3.js","./index-CWJKgNzp.js","./index-Y-u089Pk.js","./index-D3hLiQ9M.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as G}from"./index-D50NAMXb.js";function vXe(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(n,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var JRr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Wh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yj={exports:{}},TO={};var kie;function bXe(){if(kie)return TO;kie=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,s,i){var o=null;if(i!==void 0&&(o=""+i),s.key!==void 0&&(o=""+s.key),"key"in s){i={};for(var a in s)a!=="key"&&(i[a]=s[a])}else i=s;return s=i.ref,{$$typeof:e,type:n,key:o,ref:s!==void 0?s:null,props:i}}return TO.Fragment=t,TO.jsx=r,TO.jsxs=r,TO}var Eie;function xXe(){return Eie||(Eie=1,yj.exports=bXe()),yj.exports}var f=xXe(),vj={exports:{}},br={},Cie;function wXe(){if(Cie)return br;Cie=1;var e={env:{}};var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),m=Symbol.iterator;function g(Z){return Z===null||typeof Z!="object"?null:(Z=m&&Z[m]||Z["@@iterator"],typeof Z=="function"?Z:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,w={};function S(Z,F,W){this.props=Z,this.context=F,this.refs=w,this.updater=W||v}S.prototype.isReactComponent={},S.prototype.setState=function(Z,F){if(typeof Z!="object"&&typeof Z!="function"&&Z!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,Z,F,"setState")},S.prototype.forceUpdate=function(Z){this.updater.enqueueForceUpdate(this,Z,"forceUpdate")};function O(){}O.prototype=S.prototype;function k(Z,F,W){this.props=Z,this.context=F,this.refs=w,this.updater=W||v}var C=k.prototype=new O;C.constructor=k,b(C,S.prototype),C.isPureReactComponent=!0;var T=Array.isArray;function P(){}var A={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function M(Z,F,W){var K=W.ref;return{$$typeof:t,type:Z,key:F,ref:K!==void 0?K:null,props:W}}function z(Z,F){return M(Z.type,F,Z.props)}function Q(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===t}function U(Z){var F={"=":"=0",":":"=2"};return"$"+Z.replace(/[=:]/g,function(W){return F[W]})}var L=/\/+/g;function V(Z,F){return typeof Z=="object"&&Z!==null&&Z.key!=null?U(""+Z.key):F.toString(36)}function j(Z){switch(Z.status){case"fulfilled":return Z.value;case"rejected":throw Z.reason;default:switch(typeof Z.status=="string"?Z.then(P,P):(Z.status="pending",Z.then(function(F){Z.status==="pending"&&(Z.status="fulfilled",Z.value=F)},function(F){Z.status==="pending"&&(Z.status="rejected",Z.reason=F)})),Z.status){case"fulfilled":return Z.value;case"rejected":throw Z.reason}}throw Z}function N(Z,F,W,K,se){var X=typeof Z;(X==="undefined"||X==="boolean")&&(Z=null);var te=!1;if(Z===null)te=!0;else switch(X){case"bigint":case"string":case"number":te=!0;break;case"object":switch(Z.$$typeof){case t:case r:te=!0;break;case d:return te=Z._init,N(te(Z._payload),F,W,K,se)}}if(te)return se=se(Z),te=K===""?"."+V(Z,0):K,T(se)?(W="",te!=null&&(W=te.replace(L,"$&/")+"/"),N(se,F,W,"",function(Ae){return Ae})):se!=null&&(Q(se)&&(se=z(se,W+(se.key==null||Z&&Z.key===se.key?"":(""+se.key).replace(L,"$&/")+"/")+te)),F.push(se)),1;te=0;var de=K===""?".":K+":";if(T(Z))for(var ue=0;ue<Z.length;ue++)K=Z[ue],X=de+V(K,ue),te+=N(K,F,W,X,se);else if(ue=g(Z),typeof ue=="function")for(Z=ue.call(Z),ue=0;!(K=Z.next()).done;)K=K.value,X=de+V(K,ue++),te+=N(K,F,W,X,se);else if(X==="object"){if(typeof Z.then=="function")return N(j(Z),F,W,K,se);throw F=String(Z),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(Z).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return te}function I(Z,F,W){if(Z==null)return Z;var K=[],se=0;return N(Z,K,"","",function(X){return F.call(W,X,se++)}),K}function H(Z){if(Z._status===-1){var F=Z._result;F=F(),F.then(function(W){(Z._status===0||Z._status===-1)&&(Z._status=1,Z._result=W)},function(W){(Z._status===0||Z._status===-1)&&(Z._status=2,Z._result=W)}),Z._status===-1&&(Z._status=0,Z._result=F)}if(Z._status===1)return Z._result.default;throw Z._result}var B=typeof reportError=="function"?reportError:function(Z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof Z=="object"&&Z!==null&&typeof Z.message=="string"?String(Z.message):String(Z),error:Z});if(!window.dispatchEvent(F))return}else if(typeof e=="object"&&typeof e.emit=="function"){e.emit("uncaughtException",Z);return}console.error(Z)},J={map:I,forEach:function(Z,F,W){I(Z,function(){F.apply(this,arguments)},W)},count:function(Z){var F=0;return I(Z,function(){F++}),F},toArray:function(Z){return I(Z,function(F){return F})||[]},only:function(Z){if(!Q(Z))throw Error("React.Children.only expected to receive a single React element child.");return Z}};return br.Activity=p,br.Children=J,br.Component=S,br.Fragment=n,br.Profiler=i,br.PureComponent=k,br.StrictMode=s,br.Suspense=c,br.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,br.__COMPILER_RUNTIME={__proto__:null,c:function(Z){return A.H.useMemoCache(Z)}},br.cache=function(Z){return function(){return Z.apply(null,arguments)}},br.cacheSignal=function(){return null},br.cloneElement=function(Z,F,W){if(Z==null)throw Error("The argument must be a React element, but you passed "+Z+".");var K=b({},Z.props),se=Z.key;if(F!=null)for(X in F.key!==void 0&&(se=""+F.key),F)!R.call(F,X)||X==="key"||X==="__self"||X==="__source"||X==="ref"&&F.ref===void 0||(K[X]=F[X]);var X=arguments.length-2;if(X===1)K.children=W;else if(1<X){for(var te=Array(X),de=0;de<X;de++)te[de]=arguments[de+2];K.children=te}return M(Z.type,se,K)},br.createContext=function(Z){return Z={$$typeof:a,_currentValue:Z,_currentValue2:Z,_threadCount:0,Provider:null,Consumer:null},Z.Provider=Z,Z.Consumer={$$typeof:o,_context:Z},Z},br.createElement=function(Z,F,W){var K,se={},X=null;if(F!=null)for(K in F.key!==void 0&&(X=""+F.key),F)R.call(F,K)&&K!=="key"&&K!=="__self"&&K!=="__source"&&(se[K]=F[K]);var te=arguments.length-2;if(te===1)se.children=W;else if(1<te){for(var de=Array(te),ue=0;ue<te;ue++)de[ue]=arguments[ue+2];se.children=de}if(Z&&Z.defaultProps)for(K in te=Z.defaultProps,te)se[K]===void 0&&(se[K]=te[K]);return M(Z,X,se)},br.createRef=function(){return{current:null}},br.forwardRef=function(Z){return{$$typeof:l,render:Z}},br.isValidElement=Q,br.lazy=function(Z){return{$$typeof:d,_payload:{_status:-1,_result:Z},_init:H}},br.memo=function(Z,F){return{$$typeof:u,type:Z,compare:F===void 0?null:F}},br.startTransition=function(Z){var F=A.T,W={};A.T=W;try{var K=Z(),se=A.S;se!==null&&se(W,K),typeof K=="object"&&K!==null&&typeof K.then=="function"&&K.then(P,B)}catch(X){B(X)}finally{F!==null&&W.types!==null&&(F.types=W.types),A.T=F}},br.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},br.use=function(Z){return A.H.use(Z)},br.useActionState=function(Z,F,W){return A.H.useActionState(Z,F,W)},br.useCallback=function(Z,F){return A.H.useCallback(Z,F)},br.useContext=function(Z){return A.H.useContext(Z)},br.useDebugValue=function(){},br.useDeferredValue=function(Z,F){return A.H.useDeferredValue(Z,F)},br.useEffect=function(Z,F){return A.H.useEffect(Z,F)},br.useEffectEvent=function(Z){return A.H.useEffectEvent(Z)},br.useId=function(){return A.H.useId()},br.useImperativeHandle=function(Z,F,W){return A.H.useImperativeHandle(Z,F,W)},br.useInsertionEffect=function(Z,F){return A.H.useInsertionEffect(Z,F)},br.useLayoutEffect=function(Z,F){return A.H.useLayoutEffect(Z,F)},br.useMemo=function(Z,F){return A.H.useMemo(Z,F)},br.useOptimistic=function(Z,F){return A.H.useOptimistic(Z,F)},br.useReducer=function(Z,F,W){return A.H.useReducer(Z,F,W)},br.useRef=function(Z){return A.H.useRef(Z)},br.useState=function(Z){return A.H.useState(Z)},br.useSyncExternalStore=function(Z,F,W){return A.H.useSyncExternalStore(Z,F,W)},br.useTransition=function(){return A.H.useTransition()},br.version="19.2.3",br}var Tie;function $w(){return Tie||(Tie=1,vj.exports=wXe()),vj.exports}var E=$w();const me=Wh(E),Nq=vXe({__proto__:null,default:me},[E]);var bj={exports:{}},DO={},xj={exports:{}},wj={};var Die;function SXe(){return Die||(Die=1,(function(e){function t(j,N){var I=j.length;j.push(N);e:for(;0<I;){var H=I-1>>>1,B=j[H];if(0<s(B,N))j[H]=N,j[I]=B,I=H;else break e}}function r(j){return j.length===0?null:j[0]}function n(j){if(j.length===0)return null;var N=j[0],I=j.pop();if(I!==N){j[0]=I;e:for(var H=0,B=j.length,J=B>>>1;H<J;){var Z=2*(H+1)-1,F=j[Z],W=Z+1,K=j[W];if(0>s(F,I))W<B&&0>s(K,F)?(j[H]=K,j[W]=I,H=W):(j[H]=F,j[Z]=I,H=Z);else if(W<B&&0>s(K,I))j[H]=K,j[W]=I,H=W;else break e}}return N}function s(j,N){var I=j.sortIndex-N.sortIndex;return I!==0?I:j.id-N.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,d=null,p=3,m=!1,g=!1,v=!1,b=!1,w=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function k(j){for(var N=r(c);N!==null;){if(N.callback===null)n(c);else if(N.startTime<=j)n(c),N.sortIndex=N.expirationTime,t(l,N);else break;N=r(c)}}function C(j){if(v=!1,k(j),!g)if(r(l)!==null)g=!0,T||(T=!0,Q());else{var N=r(c);N!==null&&V(C,N.startTime-j)}}var T=!1,P=-1,A=5,R=-1;function M(){return b?!0:!(e.unstable_now()-R<A)}function z(){if(b=!1,T){var j=e.unstable_now();R=j;var N=!0;try{e:{g=!1,v&&(v=!1,S(P),P=-1),m=!0;var I=p;try{t:{for(k(j),d=r(l);d!==null&&!(d.expirationTime>j&&M());){var H=d.callback;if(typeof H=="function"){d.callback=null,p=d.priorityLevel;var B=H(d.expirationTime<=j);if(j=e.unstable_now(),typeof B=="function"){d.callback=B,k(j),N=!0;break t}d===r(l)&&n(l),k(j)}else n(l);d=r(l)}if(d!==null)N=!0;else{var J=r(c);J!==null&&V(C,J.startTime-j),N=!1}}break e}finally{d=null,p=I,m=!1}N=void 0}}finally{N?Q():T=!1}}}var Q;if(typeof O=="function")Q=function(){O(z)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,L=U.port2;U.port1.onmessage=z,Q=function(){L.postMessage(null)}}else Q=function(){w(z,0)};function V(j,N){P=w(function(){j(e.unstable_now())},N)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(j){j.callback=null},e.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<j?Math.floor(1e3/j):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_next=function(j){switch(p){case 1:case 2:case 3:var N=3;break;default:N=p}var I=p;p=N;try{return j()}finally{p=I}},e.unstable_requestPaint=function(){b=!0},e.unstable_runWithPriority=function(j,N){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var I=p;p=j;try{return N()}finally{p=I}},e.unstable_scheduleCallback=function(j,N,I){var H=e.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?H+I:H):I=H,j){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=I+B,j={id:u++,callback:N,priorityLevel:j,startTime:I,expirationTime:B,sortIndex:-1},I>H?(j.sortIndex=I,t(c,j),r(l)===null&&j===r(c)&&(v?(S(P),P=-1):v=!0,V(C,I-H))):(j.sortIndex=B,t(l,j),g||m||(g=!0,T||(T=!0,Q()))),j},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(j){var N=p;return function(){var I=p;p=N;try{return j.apply(this,arguments)}finally{p=I}}}})(wj)),wj}var Aie;function OXe(){return Aie||(Aie=1,xj.exports=SXe()),xj.exports}var Sj={exports:{}},Bo={};var Pie;function _Xe(){if(Pie)return Bo;Pie=1;var e=$w();function t(l){var c="https://react.dev/errors/"+l;if(1<arguments.length){c+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)c+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+l+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},s=Symbol.for("react.portal");function i(l,c,u){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:d==null?null:""+d,children:l,containerInfo:c,implementation:u}}var o=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(l,c){if(l==="font")return"";if(typeof c=="string")return c==="use-credentials"?c:""}return Bo.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,Bo.createPortal=function(l,c){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11)throw Error(t(299));return i(l,c,null,u)},Bo.flushSync=function(l){var c=o.T,u=n.p;try{if(o.T=null,n.p=2,l)return l()}finally{o.T=c,n.p=u,n.d.f()}},Bo.preconnect=function(l,c){typeof l=="string"&&(c?(c=c.crossOrigin,c=typeof c=="string"?c==="use-credentials"?c:"":void 0):c=null,n.d.C(l,c))},Bo.prefetchDNS=function(l){typeof l=="string"&&n.d.D(l)},Bo.preinit=function(l,c){if(typeof l=="string"&&c&&typeof c.as=="string"){var u=c.as,d=a(u,c.crossOrigin),p=typeof c.integrity=="string"?c.integrity:void 0,m=typeof c.fetchPriority=="string"?c.fetchPriority:void 0;u==="style"?n.d.S(l,typeof c.precedence=="string"?c.precedence:void 0,{crossOrigin:d,integrity:p,fetchPriority:m}):u==="script"&&n.d.X(l,{crossOrigin:d,integrity:p,fetchPriority:m,nonce:typeof c.nonce=="string"?c.nonce:void 0})}},Bo.preinitModule=function(l,c){if(typeof l=="string")if(typeof c=="object"&&c!==null){if(c.as==null||c.as==="script"){var u=a(c.as,c.crossOrigin);n.d.M(l,{crossOrigin:u,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0})}}else c==null&&n.d.M(l)},Bo.preload=function(l,c){if(typeof l=="string"&&typeof c=="object"&&c!==null&&typeof c.as=="string"){var u=c.as,d=a(u,c.crossOrigin);n.d.L(l,u,{crossOrigin:d,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0,type:typeof c.type=="string"?c.type:void 0,fetchPriority:typeof c.fetchPriority=="string"?c.fetchPriority:void 0,referrerPolicy:typeof c.referrerPolicy=="string"?c.referrerPolicy:void 0,imageSrcSet:typeof c.imageSrcSet=="string"?c.imageSrcSet:void 0,imageSizes:typeof c.imageSizes=="string"?c.imageSizes:void 0,media:typeof c.media=="string"?c.media:void 0})}},Bo.preloadModule=function(l,c){if(typeof l=="string")if(c){var u=a(c.as,c.crossOrigin);n.d.m(l,{as:typeof c.as=="string"&&c.as!=="script"?c.as:void 0,crossOrigin:u,integrity:typeof c.integrity=="string"?c.integrity:void 0})}else n.d.m(l)},Bo.requestFormReset=function(l){n.d.r(l)},Bo.unstable_batchedUpdates=function(l,c){return l(c)},Bo.useFormState=function(l,c,u){return o.H.useFormState(l,c,u)},Bo.useFormStatus=function(){return o.H.useHostTransitionStatus()},Bo.version="19.2.3",Bo}var $ie;function Q1e(){if($ie)return Sj.exports;$ie=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Sj.exports=_Xe(),Sj.exports}var Iie;function kXe(){if(Iie)return DO;Iie=1;var e={env:{}};var t=OXe(),r=$w(),n=Q1e();function s(h){var y="https://react.dev/errors/"+h;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)y+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+h+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(h){return!(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)}function o(h){var y=h,x=h;if(h.alternate)for(;y.return;)y=y.return;else{h=y;do y=h,(y.flags&4098)!==0&&(x=y.return),h=y.return;while(h)}return y.tag===3?x:null}function a(h){if(h.tag===13){var y=h.memoizedState;if(y===null&&(h=h.alternate,h!==null&&(y=h.memoizedState)),y!==null)return y.dehydrated}return null}function l(h){if(h.tag===31){var y=h.memoizedState;if(y===null&&(h=h.alternate,h!==null&&(y=h.memoizedState)),y!==null)return y.dehydrated}return null}function c(h){if(o(h)!==h)throw Error(s(188))}function u(h){var y=h.alternate;if(!y){if(y=o(h),y===null)throw Error(s(188));return y!==h?null:h}for(var x=h,_=y;;){var D=x.return;if(D===null)break;var $=D.alternate;if($===null){if(_=D.return,_!==null){x=_;continue}break}if(D.child===$.child){for($=D.child;$;){if($===x)return c(D),h;if($===_)return c(D),y;$=$.sibling}throw Error(s(188))}if(x.return!==_.return)x=D,_=$;else{for(var q=!1,ee=D.child;ee;){if(ee===x){q=!0,x=D,_=$;break}if(ee===_){q=!0,_=D,x=$;break}ee=ee.sibling}if(!q){for(ee=$.child;ee;){if(ee===x){q=!0,x=$,_=D;break}if(ee===_){q=!0,_=$,x=D;break}ee=ee.sibling}if(!q)throw Error(s(189))}}if(x.alternate!==_)throw Error(s(190))}if(x.tag!==3)throw Error(s(188));return x.stateNode.current===x?h:y}function d(h){var y=h.tag;if(y===5||y===26||y===27||y===6)return h;for(h=h.child;h!==null;){if(y=d(h),y!==null)return y;h=h.sibling}return null}var p=Object.assign,m=Symbol.for("react.element"),g=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),k=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),Q=Symbol.iterator;function U(h){return h===null||typeof h!="object"?null:(h=Q&&h[Q]||h["@@iterator"],typeof h=="function"?h:null)}var L=Symbol.for("react.client.reference");function V(h){if(h==null)return null;if(typeof h=="function")return h.$$typeof===L?null:h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case b:return"Fragment";case S:return"Profiler";case w:return"StrictMode";case T:return"Suspense";case P:return"SuspenseList";case M:return"Activity"}if(typeof h=="object")switch(h.$$typeof){case v:return"Portal";case k:return h.displayName||"Context";case O:return(h._context.displayName||"Context")+".Consumer";case C:var y=h.render;return h=h.displayName,h||(h=y.displayName||y.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case A:return y=h.displayName||null,y!==null?y:V(h.type)||"Memo";case R:y=h._payload,h=h._init;try{return V(h(y))}catch{}}return null}var j=Array.isArray,N=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H={pending:!1,data:null,method:null,action:null},B=[],J=-1;function Z(h){return{current:h}}function F(h){0>J||(h.current=B[J],B[J]=null,J--)}function W(h,y){J++,B[J]=h.current,h.current=y}var K=Z(null),se=Z(null),X=Z(null),te=Z(null);function de(h,y){switch(W(X,y),W(se,h),W(K,null),y.nodeType){case 9:case 11:h=(h=y.documentElement)&&(h=h.namespaceURI)?Wse(h):0;break;default:if(h=y.tagName,y=y.namespaceURI)y=Wse(y),h=Gse(y,h);else switch(h){case"svg":h=1;break;case"math":h=2;break;default:h=0}}F(K),W(K,h)}function ue(){F(K),F(se),F(X)}function Ae(h){h.memoizedState!==null&&W(te,h);var y=K.current,x=Gse(y,h.type);y!==x&&(W(se,h),W(K,x))}function _e(h){se.current===h&&(F(K),F(se)),te.current===h&&(F(te),_O._currentValue=H)}var De,Me;function We(h){if(De===void 0)try{throw Error()}catch(x){var y=x.stack.trim().match(/\n( *(at )?)/);De=y&&y[1]||"",Me=-1<x.stack.indexOf(`
|
|
3
3
|
at`)?" (<anonymous>)":-1<x.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
4
|
`+De+h+Me}var lt=!1;function Ke(h,y){if(!h||lt)return"";lt=!0;var x=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var _={DetermineComponentFrameRoot:function(){try{if(y){var Le=function(){throw Error()};if(Object.defineProperty(Le.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Le,[])}catch(Ce){var ke=Ce}Reflect.construct(h,[],Le)}else{try{Le.call()}catch(Ce){ke=Ce}h.call(Le.prototype)}}else{try{throw Error()}catch(Ce){ke=Ce}(Le=h())&&typeof Le.catch=="function"&&Le.catch(function(){})}}catch(Ce){if(Ce&&ke&&typeof Ce.stack=="string")return[Ce.stack,ke.stack]}return[null,null]}};_.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var D=Object.getOwnPropertyDescriptor(_.DetermineComponentFrameRoot,"name");D&&D.configurable&&Object.defineProperty(_.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var $=_.DetermineComponentFrameRoot(),q=$[0],ee=$[1];if(q&&ee){var ce=q.split(`
|
|
5
5
|
`),we=ee.split(`
|
|
@@ -110,7 +110,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
110
110
|
`))})}function Abt(e){var t=e.codeString,r=e.codeStyle,n=e.containerStyle,s=n===void 0?{float:"left",paddingRight:"10px"}:n,i=e.numberStyle,o=i===void 0?{}:i,a=e.startingLineNumber;return me.createElement("code",{style:Object.assign({},r,s)},Dbt({lines:t.replace(/\n$/,"").split(`
|
|
111
111
|
`),style:o,startingLineNumber:a}))}function Pbt(e){return"".concat(e.toString().length,".25em")}function BDe(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function VDe(e,t,r){var n={display:"inline-block",minWidth:Pbt(r),paddingRight:"1em",textAlign:"right",userSelect:"none"},s=typeof e=="function"?e(t):e,i=lg(lg({},n),s);return i}function _$(e){var t=e.children,r=e.lineNumber,n=e.lineNumberStyle,s=e.largestLineNumber,i=e.showInlineLineNumbers,o=e.lineProps,a=o===void 0?{}:o,l=e.className,c=l===void 0?[]:l,u=e.showLineNumbers,d=e.wrapLongLines,p=e.wrapLines,m=p===void 0?!1:p,g=m?lg({},typeof a=="function"?a(r):a):{};if(g.className=g.className?[].concat(iV(g.className.trim().split(/\s+/)),iV(c)):c,r&&i){var v=VDe(n,r,s);t.unshift(BDe(r,v))}return d&u&&(g.style=lg({display:"flex"},g.style)),{type:"element",tagName:"span",properties:g,children:t}}function UDe(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],n=0;n<e.length;n++){var s=e[n];if(s.type==="text")r.push(_$({children:[s],className:iV(new Set(t))}));else if(s.children){var i=t.concat(s.properties.className);UDe(s.children,i).forEach(function(o){return r.push(o)})}}return r}function $bt(e,t,r,n,s,i,o,a,l){var c,u=UDe(e.value),d=[],p=-1,m=0;function g(C,T){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return _$({children:C,lineNumber:T,lineNumberStyle:a,largestLineNumber:o,showInlineLineNumbers:s,lineProps:r,className:P,showLineNumbers:n,wrapLongLines:l,wrapLines:t})}function v(C,T){if(n&&T&&s){var P=VDe(a,T,o);C.unshift(BDe(T,P))}return C}function b(C,T){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return t||P.length>0?g(C,T,P):v(C,T)}for(var w=function(){var T=u[m],P=T.children[0].value,A=Tbt(P);if(A){var R=P.split(`
|
|
112
112
|
`);R.forEach(function(M,z){var Q=n&&d.length+i,U={type:"text",value:"".concat(M,`
|
|
113
|
-
`)};if(z===0){var L=u.slice(p+1,m).concat(_$({children:[U],className:T.properties.className})),V=b(L,Q);d.push(V)}else if(z===R.length-1){var j=u[m+1]&&u[m+1].children&&u[m+1].children[0],N={type:"text",value:"".concat(M)};if(j){var I=_$({children:[N],className:T.properties.className});u.splice(m+1,0,I)}else{var H=[N],B=b(H,Q,T.properties.className);d.push(B)}}else{var J=[U],Z=b(J,Q,T.properties.className);d.push(Z)}}),p=m}m++};m<u.length;)w();if(p!==u.length-1){var S=u.slice(p+1,u.length);if(S&&S.length){var O=n&&d.length+i,k=b(S,O);d.push(k)}}return t?d:(c=[]).concat.apply(c,d)}function Ibt(e){var t=e.rows,r=e.stylesheet,n=e.useInlineStyles;return t.map(function(s,i){return zDe({node:s,stylesheet:r,useInlineStyles:n,key:"code-segment-".concat(i)})})}function QDe(e){return e&&typeof e.highlightAuto<"u"}function Nbt(e){var t=e.astGenerator,r=e.language,n=e.code,s=e.defaultCodeValue;if(QDe(t)){var i=kbt(t,r);return r==="text"?{value:s,language:"text"}:i?t.highlight(r,n):t.highlightAuto(n)}try{return r&&r!=="text"?{value:t.highlight(n,r)}:{value:s}}catch{return{value:s}}}function Rbt(e,t){return function(n){var s,i,o=n.language,a=n.children,l=n.style,c=l===void 0?t:l,u=n.customStyle,d=u===void 0?{}:u,p=n.codeTagProps,m=p===void 0?{className:o?"language-".concat(o):void 0,style:lg(lg({},c['code[class*="language-"]']),c['code[class*="language-'.concat(o,'"]')])}:p,g=n.useInlineStyles,v=g===void 0?!0:g,b=n.showLineNumbers,w=b===void 0?!1:b,S=n.showInlineLineNumbers,O=S===void 0?!0:S,k=n.startingLineNumber,C=k===void 0?1:k,T=n.lineNumberContainerStyle,P=n.lineNumberStyle,A=P===void 0?{}:P,R=n.wrapLines,M=n.wrapLongLines,z=M===void 0?!1:M,Q=n.lineProps,U=Q===void 0?{}:Q,L=n.renderer,V=n.PreTag,j=V===void 0?"pre":V,N=n.CodeTag,I=N===void 0?"code":N,H=n.code,B=H===void 0?(Array.isArray(a)?a[0]:a)||"":H,J=n.astGenerator,Z=mbt(n,Ebt);J=J||e;var F=w?me.createElement(Abt,{containerStyle:T,codeStyle:m.style||{},numberStyle:A,startingLineNumber:C,codeString:B}):null,W=c.hljs||c['pre[class*="language-"]']||{backgroundColor:"#fff"},K=QDe(J)?"hljs":"prismjs",se=v?Object.assign({},Z,{style:Object.assign({},W,d)}):Object.assign({},Z,{className:Z.className?"".concat(K," ").concat(Z.className):K,style:Object.assign({},d)});if(z?m.style=lg({whiteSpace:"pre-wrap"},m.style):m.style=lg({whiteSpace:"pre"},m.style),!J)return me.createElement(j,se,F,me.createElement(I,m,B));(R===void 0&&L||z)&&(R=!0),L=L||Ibt;var X=[{type:"text",value:B}],te=Nbt({astGenerator:J,language:o,code:B,defaultCodeValue:X});te.language===null&&(te.value=X);var de=(s=(i=B.match(/\n/g))===null||i===void 0?void 0:i.length)!==null&&s!==void 0?s:0,ue=C+de,Ae=$bt(te,R,U,w,O,C,ue,A,z);return me.createElement(j,se,me.createElement(I,m,!O&&F,L({rows:Ae,stylesheet:c,useInlineStyles:v})))}}function Qle(e,t,r,n,s,i,o){try{var a=e[i](o),l=a.value}catch(c){return void r(c)}a.done?t(l):Promise.resolve(l).then(n,s)}function ZDe(e){return function(){var t=this,r=arguments;return new Promise(function(n,s){var i=e.apply(t,r);function o(l){Qle(i,n,s,o,a,"next",l)}function a(l){Qle(i,n,s,o,a,"throw",l)}o(void 0)})}}function Mbt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zle(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,LDe(n.key),n)}}function jbt(e,t,r){return t&&Zle(e.prototype,t),r&&Zle(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Fbt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lbt(e,t){if(t&&(Hf(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fbt(e)}function BI(e){return BI=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},BI(e)}function oV(e,t){return oV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},oV(e,t)}function zbt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oV(e,t)}function aV(){aV=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,s=Object.defineProperty||function(j,N,I){j[N]=I.value},i=typeof Symbol=="function"?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(j,N,I){return Object.defineProperty(j,N,{value:I,enumerable:!0,configurable:!0,writable:!0}),j[N]}try{c({},"")}catch{c=function(I,H,B){return I[H]=B}}function u(j,N,I,H){var B=N&&N.prototype instanceof w?N:w,J=Object.create(B.prototype),Z=new L(H||[]);return s(J,"_invoke",{value:M(j,I,Z)}),J}function d(j,N,I){try{return{type:"normal",arg:j.call(N,I)}}catch(H){return{type:"throw",arg:H}}}t.wrap=u;var p="suspendedStart",m="suspendedYield",g="executing",v="completed",b={};function w(){}function S(){}function O(){}var k={};c(k,o,function(){return this});var C=Object.getPrototypeOf,T=C&&C(C(V([])));T&&T!==r&&n.call(T,o)&&(k=T);var P=O.prototype=w.prototype=Object.create(k);function A(j){["next","throw","return"].forEach(function(N){c(j,N,function(I){return this._invoke(N,I)})})}function R(j,N){function I(B,J,Z,F){var W=d(j[B],j,J);if(W.type!=="throw"){var K=W.arg,se=K.value;return se&&Hf(se)=="object"&&n.call(se,"__await")?N.resolve(se.__await).then(function(X){I("next",X,Z,F)},function(X){I("throw",X,Z,F)}):N.resolve(se).then(function(X){K.value=X,Z(K)},function(X){return I("throw",X,Z,F)})}F(W.arg)}var H;s(this,"_invoke",{value:function(J,Z){function F(){return new N(function(W,K){I(J,Z,W,K)})}return H=H?H.then(F,F):F()}})}function M(j,N,I){var H=p;return function(B,J){if(H===g)throw Error("Generator is already running");if(H===v){if(B==="throw")throw J;return{value:e,done:!0}}for(I.method=B,I.arg=J;;){var Z=I.delegate;if(Z){var F=z(Z,I);if(F){if(F===b)continue;return F}}if(I.method==="next")I.sent=I._sent=I.arg;else if(I.method==="throw"){if(H===p)throw H=v,I.arg;I.dispatchException(I.arg)}else I.method==="return"&&I.abrupt("return",I.arg);H=g;var W=d(j,N,I);if(W.type==="normal"){if(H=I.done?v:m,W.arg===b)continue;return{value:W.arg,done:I.done}}W.type==="throw"&&(H=v,I.method="throw",I.arg=W.arg)}}}function z(j,N){var I=N.method,H=j.iterator[I];if(H===e)return N.delegate=null,I==="throw"&&j.iterator.return&&(N.method="return",N.arg=e,z(j,N),N.method==="throw")||I!=="return"&&(N.method="throw",N.arg=new TypeError("The iterator does not provide a '"+I+"' method")),b;var B=d(H,j.iterator,N.arg);if(B.type==="throw")return N.method="throw",N.arg=B.arg,N.delegate=null,b;var J=B.arg;return J?J.done?(N[j.resultName]=J.value,N.next=j.nextLoc,N.method!=="return"&&(N.method="next",N.arg=e),N.delegate=null,b):J:(N.method="throw",N.arg=new TypeError("iterator result is not an object"),N.delegate=null,b)}function Q(j){var N={tryLoc:j[0]};1 in j&&(N.catchLoc=j[1]),2 in j&&(N.finallyLoc=j[2],N.afterLoc=j[3]),this.tryEntries.push(N)}function U(j){var N=j.completion||{};N.type="normal",delete N.arg,j.completion=N}function L(j){this.tryEntries=[{tryLoc:"root"}],j.forEach(Q,this),this.reset(!0)}function V(j){if(j||j===""){var N=j[o];if(N)return N.call(j);if(typeof j.next=="function")return j;if(!isNaN(j.length)){var I=-1,H=function B(){for(;++I<j.length;)if(n.call(j,I))return B.value=j[I],B.done=!1,B;return B.value=e,B.done=!0,B};return H.next=H}}throw new TypeError(Hf(j)+" is not iterable")}return S.prototype=O,s(P,"constructor",{value:O,configurable:!0}),s(O,"constructor",{value:S,configurable:!0}),S.displayName=c(O,l,"GeneratorFunction"),t.isGeneratorFunction=function(j){var N=typeof j=="function"&&j.constructor;return!!N&&(N===S||(N.displayName||N.name)==="GeneratorFunction")},t.mark=function(j){return Object.setPrototypeOf?Object.setPrototypeOf(j,O):(j.__proto__=O,c(j,l,"GeneratorFunction")),j.prototype=Object.create(P),j},t.awrap=function(j){return{__await:j}},A(R.prototype),c(R.prototype,a,function(){return this}),t.AsyncIterator=R,t.async=function(j,N,I,H,B){B===void 0&&(B=Promise);var J=new R(u(j,N,I,H),B);return t.isGeneratorFunction(N)?J:J.next().then(function(Z){return Z.done?Z.value:J.next()})},A(P),c(P,l,"Generator"),c(P,o,function(){return this}),c(P,"toString",function(){return"[object Generator]"}),t.keys=function(j){var N=Object(j),I=[];for(var H in N)I.push(H);return I.reverse(),function B(){for(;I.length;){var J=I.pop();if(J in N)return B.value=J,B.done=!1,B}return B.done=!0,B}},t.values=V,L.prototype={constructor:L,reset:function(N){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(U),!N)for(var I in this)I.charAt(0)==="t"&&n.call(this,I)&&!isNaN(+I.slice(1))&&(this[I]=e)},stop:function(){this.done=!0;var N=this.tryEntries[0].completion;if(N.type==="throw")throw N.arg;return this.rval},dispatchException:function(N){if(this.done)throw N;var I=this;function H(K,se){return Z.type="throw",Z.arg=N,I.next=K,se&&(I.method="next",I.arg=e),!!se}for(var B=this.tryEntries.length-1;B>=0;--B){var J=this.tryEntries[B],Z=J.completion;if(J.tryLoc==="root")return H("end");if(J.tryLoc<=this.prev){var F=n.call(J,"catchLoc"),W=n.call(J,"finallyLoc");if(F&&W){if(this.prev<J.catchLoc)return H(J.catchLoc,!0);if(this.prev<J.finallyLoc)return H(J.finallyLoc)}else if(F){if(this.prev<J.catchLoc)return H(J.catchLoc,!0)}else{if(!W)throw Error("try statement without catch or finally");if(this.prev<J.finallyLoc)return H(J.finallyLoc)}}}},abrupt:function(N,I){for(var H=this.tryEntries.length-1;H>=0;--H){var B=this.tryEntries[H];if(B.tryLoc<=this.prev&&n.call(B,"finallyLoc")&&this.prev<B.finallyLoc){var J=B;break}}J&&(N==="break"||N==="continue")&&J.tryLoc<=I&&I<=J.finallyLoc&&(J=null);var Z=J?J.completion:{};return Z.type=N,Z.arg=I,J?(this.method="next",this.next=J.finallyLoc,b):this.complete(Z)},complete:function(N,I){if(N.type==="throw")throw N.arg;return N.type==="break"||N.type==="continue"?this.next=N.arg:N.type==="return"?(this.rval=this.arg=N.arg,this.method="return",this.next="end"):N.type==="normal"&&I&&(this.next=I),b},finish:function(N){for(var I=this.tryEntries.length-1;I>=0;--I){var H=this.tryEntries[I];if(H.finallyLoc===N)return this.complete(H.completion,H.afterLoc),U(H),b}},catch:function(N){for(var I=this.tryEntries.length-1;I>=0;--I){var H=this.tryEntries[I];if(H.tryLoc===N){var B=H.completion;if(B.type==="throw"){var J=B.arg;U(H)}return J}}throw Error("illegal catch attempt")},delegateYield:function(N,I,H){return this.delegate={iterator:V(N),resultName:I,nextLoc:H},this.method==="next"&&(this.arg=e),b}},t}function Bbt(e,t,r){return t=BI(t),Lbt(e,qDe()?Reflect.construct(t,r||[],BI(e).constructor):t.apply(e,r))}function qDe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qDe=function(){return!!e})()}const Vbt=(function(e){var t,r=e.loader,n=e.isLanguageRegistered,s=e.registerLanguage,i=e.languageLoaders,o=e.noAsyncLoadingLanguages,a=(function(l){function c(){return Mbt(this,c),Bbt(this,c,arguments)}return zbt(c,l),jbt(c,[{key:"componentDidUpdate",value:function(){!c.isRegistered(this.props.language)&&i&&this.loadLanguage()}},{key:"componentDidMount",value:function(){var d=this;c.astGeneratorPromise||c.loadAstGenerator(),c.astGenerator||c.astGeneratorPromise.then(function(){d.forceUpdate()}),!c.isRegistered(this.props.language)&&i&&this.loadLanguage()}},{key:"loadLanguage",value:function(){var d=this,p=this.props.language;p!=="text"&&c.loadLanguage(p).then(function(){return d.forceUpdate()}).catch(function(){})}},{key:"normalizeLanguage",value:function(d){return c.isSupportedLanguage(d)?d:"text"}},{key:"render",value:function(){return me.createElement(c.highlightInstance,Cd({},this.props,{language:this.normalizeLanguage(this.props.language),astGenerator:c.astGenerator}))}}],[{key:"preload",value:function(){return c.loadAstGenerator()}},{key:"loadLanguage",value:(function(){var u=ZDe(aV().mark(function p(m){var g;return aV().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(g=i[m],typeof g!="function"){b.next=5;break}return b.abrupt("return",g(c.registerLanguage));case 5:throw new Error("Language ".concat(m," not supported"));case 6:case"end":return b.stop()}},p)}));function d(p){return u.apply(this,arguments)}return d})()},{key:"isSupportedLanguage",value:function(d){return c.isRegistered(d)||typeof i[d]=="function"}},{key:"loadAstGenerator",value:function(){return c.astGeneratorPromise=r().then(function(d){c.astGenerator=d,s&&c.languages.forEach(function(p,m){return s(d,m,p)})}),c.astGeneratorPromise}}])})(me.PureComponent);return t=a,lh(a,"astGenerator",null),lh(a,"highlightInstance",Rbt(null,{})),lh(a,"astGeneratorPromise",null),lh(a,"languages",new Map),lh(a,"supportedLanguages",e.supportedLanguages||Object.keys(i||{})),lh(a,"isRegistered",function(l){if(o)return!0;if(!s)throw new Error("Current syntax highlighter doesn't support registration of languages");return t.astGenerator?n(t.astGenerator,l):t.languages.has(l)}),lh(a,"registerLanguage",function(l,c){if(!s)throw new Error("Current syntax highlighter doesn't support registration of languages");if(t.astGenerator)return s(t.astGenerator,l,c);t.languages.set(l,c)}),a});function lV(){lV=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,s=Object.defineProperty||function(j,N,I){j[N]=I.value},i=typeof Symbol=="function"?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(j,N,I){return Object.defineProperty(j,N,{value:I,enumerable:!0,configurable:!0,writable:!0}),j[N]}try{c({},"")}catch{c=function(I,H,B){return I[H]=B}}function u(j,N,I,H){var B=N&&N.prototype instanceof w?N:w,J=Object.create(B.prototype),Z=new L(H||[]);return s(J,"_invoke",{value:M(j,I,Z)}),J}function d(j,N,I){try{return{type:"normal",arg:j.call(N,I)}}catch(H){return{type:"throw",arg:H}}}t.wrap=u;var p="suspendedStart",m="suspendedYield",g="executing",v="completed",b={};function w(){}function S(){}function O(){}var k={};c(k,o,function(){return this});var C=Object.getPrototypeOf,T=C&&C(C(V([])));T&&T!==r&&n.call(T,o)&&(k=T);var P=O.prototype=w.prototype=Object.create(k);function A(j){["next","throw","return"].forEach(function(N){c(j,N,function(I){return this._invoke(N,I)})})}function R(j,N){function I(B,J,Z,F){var W=d(j[B],j,J);if(W.type!=="throw"){var K=W.arg,se=K.value;return se&&Hf(se)=="object"&&n.call(se,"__await")?N.resolve(se.__await).then(function(X){I("next",X,Z,F)},function(X){I("throw",X,Z,F)}):N.resolve(se).then(function(X){K.value=X,Z(K)},function(X){return I("throw",X,Z,F)})}F(W.arg)}var H;s(this,"_invoke",{value:function(J,Z){function F(){return new N(function(W,K){I(J,Z,W,K)})}return H=H?H.then(F,F):F()}})}function M(j,N,I){var H=p;return function(B,J){if(H===g)throw Error("Generator is already running");if(H===v){if(B==="throw")throw J;return{value:e,done:!0}}for(I.method=B,I.arg=J;;){var Z=I.delegate;if(Z){var F=z(Z,I);if(F){if(F===b)continue;return F}}if(I.method==="next")I.sent=I._sent=I.arg;else if(I.method==="throw"){if(H===p)throw H=v,I.arg;I.dispatchException(I.arg)}else I.method==="return"&&I.abrupt("return",I.arg);H=g;var W=d(j,N,I);if(W.type==="normal"){if(H=I.done?v:m,W.arg===b)continue;return{value:W.arg,done:I.done}}W.type==="throw"&&(H=v,I.method="throw",I.arg=W.arg)}}}function z(j,N){var I=N.method,H=j.iterator[I];if(H===e)return N.delegate=null,I==="throw"&&j.iterator.return&&(N.method="return",N.arg=e,z(j,N),N.method==="throw")||I!=="return"&&(N.method="throw",N.arg=new TypeError("The iterator does not provide a '"+I+"' method")),b;var B=d(H,j.iterator,N.arg);if(B.type==="throw")return N.method="throw",N.arg=B.arg,N.delegate=null,b;var J=B.arg;return J?J.done?(N[j.resultName]=J.value,N.next=j.nextLoc,N.method!=="return"&&(N.method="next",N.arg=e),N.delegate=null,b):J:(N.method="throw",N.arg=new TypeError("iterator result is not an object"),N.delegate=null,b)}function Q(j){var N={tryLoc:j[0]};1 in j&&(N.catchLoc=j[1]),2 in j&&(N.finallyLoc=j[2],N.afterLoc=j[3]),this.tryEntries.push(N)}function U(j){var N=j.completion||{};N.type="normal",delete N.arg,j.completion=N}function L(j){this.tryEntries=[{tryLoc:"root"}],j.forEach(Q,this),this.reset(!0)}function V(j){if(j||j===""){var N=j[o];if(N)return N.call(j);if(typeof j.next=="function")return j;if(!isNaN(j.length)){var I=-1,H=function B(){for(;++I<j.length;)if(n.call(j,I))return B.value=j[I],B.done=!1,B;return B.value=e,B.done=!0,B};return H.next=H}}throw new TypeError(Hf(j)+" is not iterable")}return S.prototype=O,s(P,"constructor",{value:O,configurable:!0}),s(O,"constructor",{value:S,configurable:!0}),S.displayName=c(O,l,"GeneratorFunction"),t.isGeneratorFunction=function(j){var N=typeof j=="function"&&j.constructor;return!!N&&(N===S||(N.displayName||N.name)==="GeneratorFunction")},t.mark=function(j){return Object.setPrototypeOf?Object.setPrototypeOf(j,O):(j.__proto__=O,c(j,l,"GeneratorFunction")),j.prototype=Object.create(P),j},t.awrap=function(j){return{__await:j}},A(R.prototype),c(R.prototype,a,function(){return this}),t.AsyncIterator=R,t.async=function(j,N,I,H,B){B===void 0&&(B=Promise);var J=new R(u(j,N,I,H),B);return t.isGeneratorFunction(N)?J:J.next().then(function(Z){return Z.done?Z.value:J.next()})},A(P),c(P,l,"Generator"),c(P,o,function(){return this}),c(P,"toString",function(){return"[object Generator]"}),t.keys=function(j){var N=Object(j),I=[];for(var H in N)I.push(H);return I.reverse(),function B(){for(;I.length;){var J=I.pop();if(J in N)return B.value=J,B.done=!1,B}return B.done=!0,B}},t.values=V,L.prototype={constructor:L,reset:function(N){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(U),!N)for(var I in this)I.charAt(0)==="t"&&n.call(this,I)&&!isNaN(+I.slice(1))&&(this[I]=e)},stop:function(){this.done=!0;var N=this.tryEntries[0].completion;if(N.type==="throw")throw N.arg;return this.rval},dispatchException:function(N){if(this.done)throw N;var I=this;function H(K,se){return Z.type="throw",Z.arg=N,I.next=K,se&&(I.method="next",I.arg=e),!!se}for(var B=this.tryEntries.length-1;B>=0;--B){var J=this.tryEntries[B],Z=J.completion;if(J.tryLoc==="root")return H("end");if(J.tryLoc<=this.prev){var F=n.call(J,"catchLoc"),W=n.call(J,"finallyLoc");if(F&&W){if(this.prev<J.catchLoc)return H(J.catchLoc,!0);if(this.prev<J.finallyLoc)return H(J.finallyLoc)}else if(F){if(this.prev<J.catchLoc)return H(J.catchLoc,!0)}else{if(!W)throw Error("try statement without catch or finally");if(this.prev<J.finallyLoc)return H(J.finallyLoc)}}}},abrupt:function(N,I){for(var H=this.tryEntries.length-1;H>=0;--H){var B=this.tryEntries[H];if(B.tryLoc<=this.prev&&n.call(B,"finallyLoc")&&this.prev<B.finallyLoc){var J=B;break}}J&&(N==="break"||N==="continue")&&J.tryLoc<=I&&I<=J.finallyLoc&&(J=null);var Z=J?J.completion:{};return Z.type=N,Z.arg=I,J?(this.method="next",this.next=J.finallyLoc,b):this.complete(Z)},complete:function(N,I){if(N.type==="throw")throw N.arg;return N.type==="break"||N.type==="continue"?this.next=N.arg:N.type==="return"?(this.rval=this.arg=N.arg,this.method="return",this.next="end"):N.type==="normal"&&I&&(this.next=I),b},finish:function(N){for(var I=this.tryEntries.length-1;I>=0;--I){var H=this.tryEntries[I];if(H.finallyLoc===N)return this.complete(H.completion,H.afterLoc),U(H),b}},catch:function(N){for(var I=this.tryEntries.length-1;I>=0;--I){var H=this.tryEntries[I];if(H.tryLoc===N){var B=H.completion;if(B.type==="throw"){var J=B.arg;U(H)}return J}}throw Error("illegal catch attempt")},delegateYield:function(N,I,H){return this.delegate={iterator:V(N),resultName:I,nextLoc:H},this.method==="next"&&(this.arg=e),b}},t}const ie=(function(e,t){return(function(){var r=ZDe(lV().mark(function n(s){var i;return lV().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,t();case 2:i=a.sent,s(e,i.default||i);case 4:case"end":return a.stop()}},n)}));return function(n){return r.apply(this,arguments)}})()}),Ubt={abap:ie("abap",function(){return G(()=>import("./abap-UAOxytaT.js").then(e=>e.a),[],import.meta.url)}),abnf:ie("abnf",function(){return G(()=>import("./abnf-f201O2TV.js").then(e=>e.a),[],import.meta.url)}),actionscript:ie("actionscript",function(){return G(()=>import("./actionscript-CFYQpjRA.js").then(e=>e.a),[],import.meta.url)}),ada:ie("ada",function(){return G(()=>import("./ada-PVk2oet6.js").then(e=>e.a),[],import.meta.url)}),agda:ie("agda",function(){return G(()=>import("./agda-CEA3_0wj.js").then(e=>e.a),[],import.meta.url)}),al:ie("al",function(){return G(()=>import("./al-CuhjmLCq.js").then(e=>e.a),[],import.meta.url)}),antlr4:ie("antlr4",function(){return G(()=>import("./antlr4-0HHc-YMK.js").then(e=>e.a),[],import.meta.url)}),apacheconf:ie("apacheconf",function(){return G(()=>import("./apacheconf-CLL6u7Xy.js").then(e=>e.a),[],import.meta.url)}),apex:ie("apex",function(){return G(()=>import("./apex-DVfDukn1.js").then(e=>e.a),__vite__mapDeps([0,1]),import.meta.url)}),apl:ie("apl",function(){return G(()=>import("./apl-BglDHwLd.js").then(e=>e.a),[],import.meta.url)}),applescript:ie("applescript",function(){return G(()=>import("./applescript-Brt-zOQF.js").then(e=>e.a),[],import.meta.url)}),aql:ie("aql",function(){return G(()=>import("./aql-CHMoIV4I.js").then(e=>e.a),[],import.meta.url)}),arduino:ie("arduino",function(){return G(()=>import("./arduino-YMaLOn1a.js").then(e=>e.a),__vite__mapDeps([2,3,4]),import.meta.url)}),arff:ie("arff",function(){return G(()=>import("./arff-BCAgcWnu.js").then(e=>e.a),[],import.meta.url)}),asciidoc:ie("asciidoc",function(){return G(()=>import("./asciidoc-BpvYl8Gn.js").then(e=>e.a),[],import.meta.url)}),asm6502:ie("asm6502",function(){return G(()=>import("./asm6502-D3xiUVOX.js").then(e=>e.a),[],import.meta.url)}),asmatmel:ie("asmatmel",function(){return G(()=>import("./asmatmel-Cy1yBA9v.js").then(e=>e.a),[],import.meta.url)}),aspnet:ie("aspnet",function(){return G(()=>import("./aspnet-DRtOmGIV.js").then(e=>e.a),__vite__mapDeps([5,6]),import.meta.url)}),autohotkey:ie("autohotkey",function(){return G(()=>import("./autohotkey-CIMXohBu.js").then(e=>e.a),[],import.meta.url)}),autoit:ie("autoit",function(){return G(()=>import("./autoit-CWIItf1g.js").then(e=>e.a),[],import.meta.url)}),avisynth:ie("avisynth",function(){return G(()=>import("./avisynth-CopMCzfB.js").then(e=>e.a),[],import.meta.url)}),avroIdl:ie("avroIdl",function(){return G(()=>import("./avro-idl-CPftrvCO.js").then(e=>e.a),[],import.meta.url)}),bash:ie("bash",function(){return G(()=>import("./bash-CjlgezRh.js").then(e=>e.b),__vite__mapDeps([7,8]),import.meta.url)}),basic:ie("basic",function(){return G(()=>import("./basic-Csn8Gpzx.js").then(e=>e.b),__vite__mapDeps([9,10]),import.meta.url)}),batch:ie("batch",function(){return G(()=>import("./batch-DlN-P5Fe.js").then(e=>e.b),[],import.meta.url)}),bbcode:ie("bbcode",function(){return G(()=>import("./bbcode-CEOl73Dm.js").then(e=>e.b),[],import.meta.url)}),bicep:ie("bicep",function(){return G(()=>import("./bicep-BQM5xXtt.js").then(e=>e.b),[],import.meta.url)}),birb:ie("birb",function(){return G(()=>import("./birb-36vvPNFq.js").then(e=>e.b),[],import.meta.url)}),bison:ie("bison",function(){return G(()=>import("./bison-DQ5FSPFj.js").then(e=>e.b),__vite__mapDeps([11,4]),import.meta.url)}),bnf:ie("bnf",function(){return G(()=>import("./bnf-BhJct9qg.js").then(e=>e.b),[],import.meta.url)}),brainfuck:ie("brainfuck",function(){return G(()=>import("./brainfuck-LYTNku7k.js").then(e=>e.b),[],import.meta.url)}),brightscript:ie("brightscript",function(){return G(()=>import("./brightscript-BLQ_tU8X.js").then(e=>e.b),[],import.meta.url)}),bro:ie("bro",function(){return G(()=>import("./bro-B_ZwnuE5.js").then(e=>e.b),[],import.meta.url)}),bsl:ie("bsl",function(){return G(()=>import("./bsl-C__FgbnV.js").then(e=>e.b),[],import.meta.url)}),c:ie("c",function(){return G(()=>import("./c-Da6oMqNs.js").then(e=>e.c),__vite__mapDeps([12,4]),import.meta.url)}),cfscript:ie("cfscript",function(){return G(()=>import("./cfscript-DxKw985L.js").then(e=>e.c),[],import.meta.url)}),chaiscript:ie("chaiscript",function(){return G(()=>import("./chaiscript-BMgZAaWb.js").then(e=>e.c),__vite__mapDeps([13,3,4]),import.meta.url)}),cil:ie("cil",function(){return G(()=>import("./cil-DYcj4sAX.js").then(e=>e.c),[],import.meta.url)}),clike:ie("clike",function(){return G(()=>import("./clike-3Gwnz1DR.js").then(e=>e.c),__vite__mapDeps([14,15]),import.meta.url)}),clojure:ie("clojure",function(){return G(()=>import("./clojure-BXQE2wLv.js").then(e=>e.c),[],import.meta.url)}),cmake:ie("cmake",function(){return G(()=>import("./cmake-DR9SJwZz.js").then(e=>e.c),[],import.meta.url)}),cobol:ie("cobol",function(){return G(()=>import("./cobol-8IjHMWy5.js").then(e=>e.c),[],import.meta.url)}),coffeescript:ie("coffeescript",function(){return G(()=>import("./coffeescript-CElPWilL.js").then(e=>e.c),[],import.meta.url)}),concurnas:ie("concurnas",function(){return G(()=>import("./concurnas-BYju_Nji.js").then(e=>e.c),[],import.meta.url)}),coq:ie("coq",function(){return G(()=>import("./coq-DoOsKl0P.js").then(e=>e.c),[],import.meta.url)}),cpp:ie("cpp",function(){return G(()=>import("./cpp-HxMR3o0K.js").then(e=>e.c),__vite__mapDeps([16,3,4]),import.meta.url)}),crystal:ie("crystal",function(){return G(()=>import("./crystal-hU8Yxent.js").then(e=>e.c),__vite__mapDeps([17,18]),import.meta.url)}),csharp:ie("csharp",function(){return G(()=>import("./csharp-N12vbSHZ.js").then(e=>e.c),__vite__mapDeps([19,6]),import.meta.url)}),cshtml:ie("cshtml",function(){return G(()=>import("./cshtml-BouH_m62.js").then(e=>e.c),__vite__mapDeps([20,6]),import.meta.url)}),csp:ie("csp",function(){return G(()=>import("./csp-EVWCLjcL.js").then(e=>e.c),[],import.meta.url)}),cssExtras:ie("cssExtras",function(){return G(()=>import("./css-extras-DmGsYn3r.js").then(e=>e.c),[],import.meta.url)}),css:ie("css",function(){return G(()=>import("./css-Dwc61us6.js").then(e=>e.c),__vite__mapDeps([21,22]),import.meta.url)}),csv:ie("csv",function(){return G(()=>import("./csv-CJ5Zahea.js").then(e=>e.c),[],import.meta.url)}),cypher:ie("cypher",function(){return G(()=>import("./cypher-BzLSBwKS.js").then(e=>e.c),[],import.meta.url)}),d:ie("d",function(){return G(()=>import("./d-DgPURJAS.js").then(e=>e.d),[],import.meta.url)}),dart:ie("dart",function(){return G(()=>import("./dart-dFMVczdC.js").then(e=>e.d),[],import.meta.url)}),dataweave:ie("dataweave",function(){return G(()=>import("./dataweave-BThU-h0a.js").then(e=>e.d),[],import.meta.url)}),dax:ie("dax",function(){return G(()=>import("./dax-CBPGTCoK.js").then(e=>e.d),[],import.meta.url)}),dhall:ie("dhall",function(){return G(()=>import("./dhall-BwBUQ1Ug.js").then(e=>e.d),[],import.meta.url)}),diff:ie("diff",function(){return G(()=>import("./diff-Bqt5S_kK.js").then(e=>e.d),[],import.meta.url)}),django:ie("django",function(){return G(()=>import("./django-BJUDEYJO.js").then(e=>e.d),__vite__mapDeps([23,24]),import.meta.url)}),dnsZoneFile:ie("dnsZoneFile",function(){return G(()=>import("./dns-zone-file-BrtfE1In.js").then(e=>e.d),[],import.meta.url)}),docker:ie("docker",function(){return G(()=>import("./docker-Ba38DY6O.js").then(e=>e.d),[],import.meta.url)}),dot:ie("dot",function(){return G(()=>import("./dot-MsGhs1Ya.js").then(e=>e.d),[],import.meta.url)}),ebnf:ie("ebnf",function(){return G(()=>import("./ebnf-Cqwn06tf.js").then(e=>e.e),[],import.meta.url)}),editorconfig:ie("editorconfig",function(){return G(()=>import("./editorconfig-CproTkGu.js").then(e=>e.e),[],import.meta.url)}),eiffel:ie("eiffel",function(){return G(()=>import("./eiffel-C4r-u-Fx.js").then(e=>e.e),[],import.meta.url)}),ejs:ie("ejs",function(){return G(()=>import("./ejs-B3iQkgGA.js").then(e=>e.e),__vite__mapDeps([25,24]),import.meta.url)}),elixir:ie("elixir",function(){return G(()=>import("./elixir-CaPEZFF9.js").then(e=>e.e),[],import.meta.url)}),elm:ie("elm",function(){return G(()=>import("./elm-C3rx8oF2.js").then(e=>e.e),[],import.meta.url)}),erb:ie("erb",function(){return G(()=>import("./erb-CuLBsQqp.js").then(e=>e.e),__vite__mapDeps([26,18,24]),import.meta.url)}),erlang:ie("erlang",function(){return G(()=>import("./erlang-So8aw46J.js").then(e=>e.e),[],import.meta.url)}),etlua:ie("etlua",function(){return G(()=>import("./etlua-DGdG9laD.js").then(e=>e.e),__vite__mapDeps([27,28,24]),import.meta.url)}),excelFormula:ie("excelFormula",function(){return G(()=>import("./excel-formula-AUFAEONv.js").then(e=>e.e),[],import.meta.url)}),factor:ie("factor",function(){return G(()=>import("./factor-DdlDrZE_.js").then(e=>e.f),[],import.meta.url)}),falselang:ie("falselang",function(){return G(()=>import("./false-DtblEWaC.js").then(e=>e._),[],import.meta.url)}),firestoreSecurityRules:ie("firestoreSecurityRules",function(){return G(()=>import("./firestore-security-rules-BbX9d522.js").then(e=>e.f),[],import.meta.url)}),flow:ie("flow",function(){return G(()=>import("./flow-B8s0l3oy.js").then(e=>e.f),[],import.meta.url)}),fortran:ie("fortran",function(){return G(()=>import("./fortran-BYl7Pf4z.js").then(e=>e.f),[],import.meta.url)}),fsharp:ie("fsharp",function(){return G(()=>import("./fsharp-CNXwc1wD.js").then(e=>e.f),[],import.meta.url)}),ftl:ie("ftl",function(){return G(()=>import("./ftl-DhY6cxmh.js").then(e=>e.f),__vite__mapDeps([29,24]),import.meta.url)}),gap:ie("gap",function(){return G(()=>import("./gap-DfBF1Xpf.js").then(e=>e.g),[],import.meta.url)}),gcode:ie("gcode",function(){return G(()=>import("./gcode-BYD243CF.js").then(e=>e.g),[],import.meta.url)}),gdscript:ie("gdscript",function(){return G(()=>import("./gdscript-BatYKQwu.js").then(e=>e.g),[],import.meta.url)}),gedcom:ie("gedcom",function(){return G(()=>import("./gedcom-C1S1YOp8.js").then(e=>e.g),[],import.meta.url)}),gherkin:ie("gherkin",function(){return G(()=>import("./gherkin-CggmAq_8.js").then(e=>e.g),[],import.meta.url)}),git:ie("git",function(){return G(()=>import("./git-RLK0j3fM.js").then(e=>e.g),[],import.meta.url)}),glsl:ie("glsl",function(){return G(()=>import("./glsl-B_NpiysH.js").then(e=>e.g),__vite__mapDeps([30,4]),import.meta.url)}),gml:ie("gml",function(){return G(()=>import("./gml-CfLWJ4mr.js").then(e=>e.g),[],import.meta.url)}),gn:ie("gn",function(){return G(()=>import("./gn-BL2jwMxv.js").then(e=>e.g),[],import.meta.url)}),goModule:ie("goModule",function(){return G(()=>import("./go-module-CfFxJhJ9.js").then(e=>e.g),[],import.meta.url)}),go:ie("go",function(){return G(()=>import("./go-DPHhTC7b.js").then(e=>e.g),[],import.meta.url)}),graphql:ie("graphql",function(){return G(()=>import("./graphql-AEIhHPxy.js").then(e=>e.g),[],import.meta.url)}),groovy:ie("groovy",function(){return G(()=>import("./groovy-DfNXG4BV.js").then(e=>e.g),[],import.meta.url)}),haml:ie("haml",function(){return G(()=>import("./haml-CXZSeYw-.js").then(e=>e.h),__vite__mapDeps([31,18]),import.meta.url)}),handlebars:ie("handlebars",function(){return G(()=>import("./handlebars-Yx3XW7j0.js").then(e=>e.h),__vite__mapDeps([32,24]),import.meta.url)}),haskell:ie("haskell",function(){return G(()=>import("./haskell-CQdMWXNQ.js").then(e=>e.h),__vite__mapDeps([33,34]),import.meta.url)}),haxe:ie("haxe",function(){return G(()=>import("./haxe-DCn-WCth.js").then(e=>e.h),[],import.meta.url)}),hcl:ie("hcl",function(){return G(()=>import("./hcl-BNJMZW2-.js").then(e=>e.h),[],import.meta.url)}),hlsl:ie("hlsl",function(){return G(()=>import("./hlsl-BBLGIO82.js").then(e=>e.h),__vite__mapDeps([35,4]),import.meta.url)}),hoon:ie("hoon",function(){return G(()=>import("./hoon-BDwAubZo.js").then(e=>e.h),[],import.meta.url)}),hpkp:ie("hpkp",function(){return G(()=>import("./hpkp-BovGDeby.js").then(e=>e.h),[],import.meta.url)}),hsts:ie("hsts",function(){return G(()=>import("./hsts-B4JaBFJQ.js").then(e=>e.h),[],import.meta.url)}),http:ie("http",function(){return G(()=>import("./http-CbyMf9D0.js").then(e=>e.h),[],import.meta.url)}),ichigojam:ie("ichigojam",function(){return G(()=>import("./ichigojam-B5MFMtDf.js").then(e=>e.i),[],import.meta.url)}),icon:ie("icon",function(){return G(()=>import("./icon-BjdQp-Pn.js").then(e=>e.i),[],import.meta.url)}),icuMessageFormat:ie("icuMessageFormat",function(){return G(()=>import("./icu-message-format-DWw_jfY-.js").then(e=>e.i),[],import.meta.url)}),idris:ie("idris",function(){return G(()=>import("./idris-CXbjL0QD.js").then(e=>e.i),__vite__mapDeps([36,34]),import.meta.url)}),iecst:ie("iecst",function(){return G(()=>import("./iecst-DxQV2xDC.js").then(e=>e.i),[],import.meta.url)}),ignore:ie("ignore",function(){return G(()=>import("./ignore-DFDicCus.js").then(e=>e.i),[],import.meta.url)}),inform7:ie("inform7",function(){return G(()=>import("./inform7-CXmpdphJ.js").then(e=>e.i),[],import.meta.url)}),ini:ie("ini",function(){return G(()=>import("./ini-BhJlnZOW.js").then(e=>e.i),[],import.meta.url)}),io:ie("io",function(){return G(()=>import("./io-CKpbVI5V.js").then(e=>e.i),[],import.meta.url)}),j:ie("j",function(){return G(()=>import("./j-DyjePjrg.js").then(e=>e.j),[],import.meta.url)}),java:ie("java",function(){return G(()=>import("./java-D078uuY8.js").then(e=>e.j),__vite__mapDeps([37,38]),import.meta.url)}),javadoc:ie("javadoc",function(){return G(()=>import("./javadoc-CZb86AgG.js").then(e=>e.j),__vite__mapDeps([39,38,40]),import.meta.url)}),javadoclike:ie("javadoclike",function(){return G(()=>import("./javadoclike-DoPOKYqD.js").then(e=>e.j),__vite__mapDeps([41,40]),import.meta.url)}),javascript:ie("javascript",function(){return G(()=>import("./javascript-GHnqrQfc.js").then(e=>e.j),__vite__mapDeps([42,43]),import.meta.url)}),javastacktrace:ie("javastacktrace",function(){return G(()=>import("./javastacktrace-BiDjdmj0.js").then(e=>e.j),[],import.meta.url)}),jexl:ie("jexl",function(){return G(()=>import("./jexl-CPj_eAp_.js").then(e=>e.j),[],import.meta.url)}),jolie:ie("jolie",function(){return G(()=>import("./jolie-CwT8JhJy.js").then(e=>e.j),[],import.meta.url)}),jq:ie("jq",function(){return G(()=>import("./jq-BG39Yd9C.js").then(e=>e.j),[],import.meta.url)}),jsExtras:ie("jsExtras",function(){return G(()=>import("./js-extras-BDkj_9Mv.js").then(e=>e.j),[],import.meta.url)}),jsTemplates:ie("jsTemplates",function(){return G(()=>import("./js-templates-C3KMxytZ.js").then(e=>e.j),[],import.meta.url)}),jsdoc:ie("jsdoc",function(){return G(()=>import("./jsdoc-bPhV31Pa.js").then(e=>e.j),__vite__mapDeps([44,40,45]),import.meta.url)}),json:ie("json",function(){return G(()=>import("./json-CKZnHAT9.js").then(e=>e.j),__vite__mapDeps([46,47]),import.meta.url)}),json5:ie("json5",function(){return G(()=>import("./json5-CMGpzdLJ.js").then(e=>e.j),__vite__mapDeps([48,47]),import.meta.url)}),jsonp:ie("jsonp",function(){return G(()=>import("./jsonp-4Nb9Metf.js").then(e=>e.j),__vite__mapDeps([49,47]),import.meta.url)}),jsstacktrace:ie("jsstacktrace",function(){return G(()=>import("./jsstacktrace-D_2bDALk.js").then(e=>e.j),[],import.meta.url)}),jsx:ie("jsx",function(){return G(()=>import("./jsx-CFQtO2WJ.js").then(e=>e.j),__vite__mapDeps([50,51]),import.meta.url)}),julia:ie("julia",function(){return G(()=>import("./julia-CVJcpt4K.js").then(e=>e.j),[],import.meta.url)}),keepalived:ie("keepalived",function(){return G(()=>import("./keepalived-bWj2Rg7F.js").then(e=>e.k),[],import.meta.url)}),keyman:ie("keyman",function(){return G(()=>import("./keyman-DuFkvC0r.js").then(e=>e.k),[],import.meta.url)}),kotlin:ie("kotlin",function(){return G(()=>import("./kotlin-BTzNdJe3.js").then(e=>e.k),[],import.meta.url)}),kumir:ie("kumir",function(){return G(()=>import("./kumir-7C_78aNf.js").then(e=>e.k),[],import.meta.url)}),kusto:ie("kusto",function(){return G(()=>import("./kusto-DZXm5Qio.js").then(e=>e.k),[],import.meta.url)}),latex:ie("latex",function(){return G(()=>import("./latex-DriY0SMX.js").then(e=>e.l),[],import.meta.url)}),latte:ie("latte",function(){return G(()=>import("./latte-BWBPzn4f.js").then(e=>e.l),__vite__mapDeps([52,24,53]),import.meta.url)}),less:ie("less",function(){return G(()=>import("./less-DN7qgunI.js").then(e=>e.l),[],import.meta.url)}),lilypond:ie("lilypond",function(){return G(()=>import("./lilypond-4YxFRcRw.js").then(e=>e.l),__vite__mapDeps([54,55]),import.meta.url)}),liquid:ie("liquid",function(){return G(()=>import("./liquid-Cd_uIucl.js").then(e=>e.l),__vite__mapDeps([56,24]),import.meta.url)}),lisp:ie("lisp",function(){return G(()=>import("./lisp-BP7jBTTA.js").then(e=>e.l),[],import.meta.url)}),livescript:ie("livescript",function(){return G(()=>import("./livescript-DJbIh_S5.js").then(e=>e.l),[],import.meta.url)}),llvm:ie("llvm",function(){return G(()=>import("./llvm-CBlfYoCs.js").then(e=>e.l),[],import.meta.url)}),log:ie("log",function(){return G(()=>import("./log-CSOFdK9w.js").then(e=>e.l),[],import.meta.url)}),lolcode:ie("lolcode",function(){return G(()=>import("./lolcode-n-3luXdm.js").then(e=>e.l),[],import.meta.url)}),lua:ie("lua",function(){return G(()=>import("./lua-wiUrGgC9.js").then(e=>e.l),__vite__mapDeps([57,28]),import.meta.url)}),magma:ie("magma",function(){return G(()=>import("./magma-CgD2fglf.js").then(e=>e.m),[],import.meta.url)}),makefile:ie("makefile",function(){return G(()=>import("./makefile-BQuhQXBU.js").then(e=>e.m),[],import.meta.url)}),markdown:ie("markdown",function(){return G(()=>import("./markdown-sY-jFJHf.js").then(e=>e.m),[],import.meta.url)}),markupTemplating:ie("markupTemplating",function(){return G(()=>import("./markup-templating-DABQEWXi.js").then(e=>e.m),__vite__mapDeps([58,24]),import.meta.url)}),markup:ie("markup",function(){return G(()=>import("./markup-jfJpUKiV.js").then(e=>e.m),__vite__mapDeps([59,60]),import.meta.url)}),matlab:ie("matlab",function(){return G(()=>import("./matlab-B_G6jTNW.js").then(e=>e.m),[],import.meta.url)}),maxscript:ie("maxscript",function(){return G(()=>import("./maxscript-CRcjupwZ.js").then(e=>e.m),[],import.meta.url)}),mel:ie("mel",function(){return G(()=>import("./mel-CyHAybsi.js").then(e=>e.m),[],import.meta.url)}),mermaid:ie("mermaid",function(){return G(()=>import("./mermaid-CCEf4T8b.js").then(e=>e.m),[],import.meta.url)}),mizar:ie("mizar",function(){return G(()=>import("./mizar-T2V4Ckms.js").then(e=>e.m),[],import.meta.url)}),mongodb:ie("mongodb",function(){return G(()=>import("./mongodb-DPNUWex7.js").then(e=>e.m),[],import.meta.url)}),monkey:ie("monkey",function(){return G(()=>import("./monkey-C4Z0BOAl.js").then(e=>e.m),[],import.meta.url)}),moonscript:ie("moonscript",function(){return G(()=>import("./moonscript-CELEbpU7.js").then(e=>e.m),[],import.meta.url)}),n1ql:ie("n1ql",function(){return G(()=>import("./n1ql-DnJCzhhr.js").then(e=>e.n),[],import.meta.url)}),n4js:ie("n4js",function(){return G(()=>import("./n4js-BSptiOL2.js").then(e=>e.n),[],import.meta.url)}),nand2tetrisHdl:ie("nand2tetrisHdl",function(){return G(()=>import("./nand2tetris-hdl-Cmovt5Z5.js").then(e=>e.n),[],import.meta.url)}),naniscript:ie("naniscript",function(){return G(()=>import("./naniscript-DRSA-W4A.js").then(e=>e.n),[],import.meta.url)}),nasm:ie("nasm",function(){return G(()=>import("./nasm-LeEJPYox.js").then(e=>e.n),[],import.meta.url)}),neon:ie("neon",function(){return G(()=>import("./neon-BTgE4VrP.js").then(e=>e.n),[],import.meta.url)}),nevod:ie("nevod",function(){return G(()=>import("./nevod-CyJ75ZZ5.js").then(e=>e.n),[],import.meta.url)}),nginx:ie("nginx",function(){return G(()=>import("./nginx-CMMQHhYQ.js").then(e=>e.n),[],import.meta.url)}),nim:ie("nim",function(){return G(()=>import("./nim-DRii4PU9.js").then(e=>e.n),[],import.meta.url)}),nix:ie("nix",function(){return G(()=>import("./nix-BV3FRdHT.js").then(e=>e.n),[],import.meta.url)}),nsis:ie("nsis",function(){return G(()=>import("./nsis-CG7pg5w1.js").then(e=>e.n),[],import.meta.url)}),objectivec:ie("objectivec",function(){return G(()=>import("./objectivec-D1qkHI61.js").then(e=>e.o),__vite__mapDeps([61,4]),import.meta.url)}),ocaml:ie("ocaml",function(){return G(()=>import("./ocaml-G5UXRffb.js").then(e=>e.o),[],import.meta.url)}),opencl:ie("opencl",function(){return G(()=>import("./opencl-DH9om3Nj.js").then(e=>e.o),__vite__mapDeps([62,4]),import.meta.url)}),openqasm:ie("openqasm",function(){return G(()=>import("./openqasm-DUINt85m.js").then(e=>e.o),[],import.meta.url)}),oz:ie("oz",function(){return G(()=>import("./oz-DunlG4Xc.js").then(e=>e.o),[],import.meta.url)}),parigp:ie("parigp",function(){return G(()=>import("./parigp-DVPv9_GX.js").then(e=>e.p),[],import.meta.url)}),parser:ie("parser",function(){return G(()=>import("./parser-DIKcLF4Z.js").then(e=>e.p),[],import.meta.url)}),pascal:ie("pascal",function(){return G(()=>import("./pascal-DbPFyIjb.js").then(e=>e.p),[],import.meta.url)}),pascaligo:ie("pascaligo",function(){return G(()=>import("./pascaligo-oEFelDrB.js").then(e=>e.p),[],import.meta.url)}),pcaxis:ie("pcaxis",function(){return G(()=>import("./pcaxis-DQdkdIra.js").then(e=>e.p),[],import.meta.url)}),peoplecode:ie("peoplecode",function(){return G(()=>import("./peoplecode-BF8i0aVJ.js").then(e=>e.p),[],import.meta.url)}),perl:ie("perl",function(){return G(()=>import("./perl-BPmDn3xJ.js").then(e=>e.p),[],import.meta.url)}),phpExtras:ie("phpExtras",function(){return G(()=>import("./php-extras-TAjpo9ic.js").then(e=>e.p),__vite__mapDeps([63,53,24]),import.meta.url)}),php:ie("php",function(){return G(()=>import("./php-DFx87xJ2.js").then(e=>e.p),__vite__mapDeps([64,53,24]),import.meta.url)}),phpdoc:ie("phpdoc",function(){return G(()=>import("./phpdoc-BBrzwTbq.js").then(e=>e.p),__vite__mapDeps([65,53,24,40]),import.meta.url)}),plsql:ie("plsql",function(){return G(()=>import("./plsql-DxkEtHA-.js").then(e=>e.p),__vite__mapDeps([66,1]),import.meta.url)}),powerquery:ie("powerquery",function(){return G(()=>import("./powerquery-EIiOTmVH.js").then(e=>e.p),[],import.meta.url)}),powershell:ie("powershell",function(){return G(()=>import("./powershell-1pCzWd7H.js").then(e=>e.p),[],import.meta.url)}),processing:ie("processing",function(){return G(()=>import("./processing-O3xM6oaT.js").then(e=>e.p),[],import.meta.url)}),prolog:ie("prolog",function(){return G(()=>import("./prolog-BBW1KKhd.js").then(e=>e.p),[],import.meta.url)}),promql:ie("promql",function(){return G(()=>import("./promql-BmAWnd7K.js").then(e=>e.p),[],import.meta.url)}),properties:ie("properties",function(){return G(()=>import("./properties-93zmgEVF.js").then(e=>e.p),[],import.meta.url)}),protobuf:ie("protobuf",function(){return G(()=>import("./protobuf-BpXa51SY.js").then(e=>e.p),[],import.meta.url)}),psl:ie("psl",function(){return G(()=>import("./psl-B8xEWuyj.js").then(e=>e.p),[],import.meta.url)}),pug:ie("pug",function(){return G(()=>import("./pug-DXABnYPh.js").then(e=>e.p),[],import.meta.url)}),puppet:ie("puppet",function(){return G(()=>import("./puppet-Bpo-cj4c.js").then(e=>e.p),[],import.meta.url)}),pure:ie("pure",function(){return G(()=>import("./pure-I_oldbAL.js").then(e=>e.p),[],import.meta.url)}),purebasic:ie("purebasic",function(){return G(()=>import("./purebasic-DKhyd2nf.js").then(e=>e.p),[],import.meta.url)}),purescript:ie("purescript",function(){return G(()=>import("./purescript-CaJ0yzj4.js").then(e=>e.p),__vite__mapDeps([67,34]),import.meta.url)}),python:ie("python",function(){return G(()=>import("./python-B_DfaSuB.js").then(e=>e.p),[],import.meta.url)}),q:ie("q",function(){return G(()=>import("./q-BmKhVqrW.js").then(e=>e.q),[],import.meta.url)}),qml:ie("qml",function(){return G(()=>import("./qml-CiaCtvhx.js").then(e=>e.q),[],import.meta.url)}),qore:ie("qore",function(){return G(()=>import("./qore-zqdgeLCw.js").then(e=>e.q),[],import.meta.url)}),qsharp:ie("qsharp",function(){return G(()=>import("./qsharp-Bfpk-Ju6.js").then(e=>e.q),[],import.meta.url)}),r:ie("r",function(){return G(()=>import("./r-ZAhBjghW.js").then(e=>e.r),[],import.meta.url)}),racket:ie("racket",function(){return G(()=>import("./racket-D2jHd5Y5.js").then(e=>e.r),__vite__mapDeps([68,55]),import.meta.url)}),reason:ie("reason",function(){return G(()=>import("./reason-DgfE5uJL.js").then(e=>e.r),[],import.meta.url)}),regex:ie("regex",function(){return G(()=>import("./regex-BfxeHUtm.js").then(e=>e.r),[],import.meta.url)}),rego:ie("rego",function(){return G(()=>import("./rego-Cv_EslLl.js").then(e=>e.r),[],import.meta.url)}),renpy:ie("renpy",function(){return G(()=>import("./renpy-D3wvGV7S.js").then(e=>e.r),[],import.meta.url)}),rest:ie("rest",function(){return G(()=>import("./rest-D8vtQK8P.js").then(e=>e.r),[],import.meta.url)}),rip:ie("rip",function(){return G(()=>import("./rip-DG6svBOt.js").then(e=>e.r),[],import.meta.url)}),roboconf:ie("roboconf",function(){return G(()=>import("./roboconf-UKYtERSh.js").then(e=>e.r),[],import.meta.url)}),robotframework:ie("robotframework",function(){return G(()=>import("./robotframework-CxmbkvPF.js").then(e=>e.r),[],import.meta.url)}),ruby:ie("ruby",function(){return G(()=>import("./ruby-BTDDgzKQ.js").then(e=>e.r),__vite__mapDeps([69,18]),import.meta.url)}),rust:ie("rust",function(){return G(()=>import("./rust-Dp_h83kI.js").then(e=>e.r),[],import.meta.url)}),sas:ie("sas",function(){return G(()=>import("./sas-obx5GLrt.js").then(e=>e.s),[],import.meta.url)}),sass:ie("sass",function(){return G(()=>import("./sass-B_0rm2vy.js").then(e=>e.s),[],import.meta.url)}),scala:ie("scala",function(){return G(()=>import("./scala-CP4ekM-D.js").then(e=>e.s),__vite__mapDeps([70,38]),import.meta.url)}),scheme:ie("scheme",function(){return G(()=>import("./scheme-DBjjeeFg.js").then(e=>e.s),__vite__mapDeps([71,55]),import.meta.url)}),scss:ie("scss",function(){return G(()=>import("./scss-Bwa0z1tj.js").then(e=>e.s),[],import.meta.url)}),shellSession:ie("shellSession",function(){return G(()=>import("./shell-session-DwtZ-Fh4.js").then(e=>e.s),__vite__mapDeps([72,8]),import.meta.url)}),smali:ie("smali",function(){return G(()=>import("./smali-CSJQP7J9.js").then(e=>e.s),[],import.meta.url)}),smalltalk:ie("smalltalk",function(){return G(()=>import("./smalltalk-C40XJmMG.js").then(e=>e.s),[],import.meta.url)}),smarty:ie("smarty",function(){return G(()=>import("./smarty-BUjSSkdu.js").then(e=>e.s),__vite__mapDeps([73,24]),import.meta.url)}),sml:ie("sml",function(){return G(()=>import("./sml-IKAOe6zG.js").then(e=>e.s),[],import.meta.url)}),solidity:ie("solidity",function(){return G(()=>import("./solidity-CCGf2MwZ.js").then(e=>e.s),[],import.meta.url)}),solutionFile:ie("solutionFile",function(){return G(()=>import("./solution-file-X7RSrghd.js").then(e=>e.s),[],import.meta.url)}),soy:ie("soy",function(){return G(()=>import("./soy-BqKQ5sQi.js").then(e=>e.s),__vite__mapDeps([74,24]),import.meta.url)}),sparql:ie("sparql",function(){return G(()=>import("./sparql-CIT1UlX4.js").then(e=>e.s),__vite__mapDeps([75,76]),import.meta.url)}),splunkSpl:ie("splunkSpl",function(){return G(()=>import("./splunk-spl-BpbkQdY_.js").then(e=>e.s),[],import.meta.url)}),sqf:ie("sqf",function(){return G(()=>import("./sqf-CC54F0Ux.js").then(e=>e.s),[],import.meta.url)}),sql:ie("sql",function(){return G(()=>import("./sql-BYiJj09k.js").then(e=>e.s),__vite__mapDeps([77,1]),import.meta.url)}),squirrel:ie("squirrel",function(){return G(()=>import("./squirrel-2GZtIBTP.js").then(e=>e.s),[],import.meta.url)}),stan:ie("stan",function(){return G(()=>import("./stan-DOiorWGs.js").then(e=>e.s),[],import.meta.url)}),stylus:ie("stylus",function(){return G(()=>import("./stylus-B5cwUYSp.js").then(e=>e.s),[],import.meta.url)}),swift:ie("swift",function(){return G(()=>import("./swift-ixw0N4HA.js").then(e=>e.s),[],import.meta.url)}),systemd:ie("systemd",function(){return G(()=>import("./systemd-DsZjZ8a0.js").then(e=>e.s),[],import.meta.url)}),t4Cs:ie("t4Cs",function(){return G(()=>import("./t4-cs-Cm1EfTPA.js").then(e=>e.t),__vite__mapDeps([78,79,6]),import.meta.url)}),t4Templating:ie("t4Templating",function(){return G(()=>import("./t4-templating-2YhQTmjq.js").then(e=>e.t),__vite__mapDeps([80,79]),import.meta.url)}),t4Vb:ie("t4Vb",function(){return G(()=>import("./t4-vb-8aHjRbIm.js").then(e=>e.t),__vite__mapDeps([81,79,82,10]),import.meta.url)}),tap:ie("tap",function(){return G(()=>import("./tap-CRHlY1Or.js").then(e=>e.t),__vite__mapDeps([83,84]),import.meta.url)}),tcl:ie("tcl",function(){return G(()=>import("./tcl-7npovFvo.js").then(e=>e.t),[],import.meta.url)}),textile:ie("textile",function(){return G(()=>import("./textile-BUlvhhf1.js").then(e=>e.t),[],import.meta.url)}),toml:ie("toml",function(){return G(()=>import("./toml-BNPtcwqv.js").then(e=>e.t),[],import.meta.url)}),tremor:ie("tremor",function(){return G(()=>import("./tremor-DLtZvonv.js").then(e=>e.t),[],import.meta.url)}),tsx:ie("tsx",function(){return G(()=>import("./tsx-DT09a_iL.js").then(e=>e.t),__vite__mapDeps([85,51,45]),import.meta.url)}),tt2:ie("tt2",function(){return G(()=>import("./tt2-x_j3kSs9.js").then(e=>e.t),__vite__mapDeps([86,24]),import.meta.url)}),turtle:ie("turtle",function(){return G(()=>import("./turtle-B8loHm6K.js").then(e=>e.t),__vite__mapDeps([87,76]),import.meta.url)}),twig:ie("twig",function(){return G(()=>import("./twig-D1zdFXdr.js").then(e=>e.t),__vite__mapDeps([88,24]),import.meta.url)}),typescript:ie("typescript",function(){return G(()=>import("./typescript-Bel8F5GH.js").then(e=>e.t),__vite__mapDeps([89,45]),import.meta.url)}),typoscript:ie("typoscript",function(){return G(()=>import("./typoscript-v72Q67tZ.js").then(e=>e.t),[],import.meta.url)}),unrealscript:ie("unrealscript",function(){return G(()=>import("./unrealscript-B2jMCb53.js").then(e=>e.u),[],import.meta.url)}),uorazor:ie("uorazor",function(){return G(()=>import("./uorazor-DohiT_We.js").then(e=>e.u),[],import.meta.url)}),uri:ie("uri",function(){return G(()=>import("./uri-DLgQjSQL.js").then(e=>e.u),[],import.meta.url)}),v:ie("v",function(){return G(()=>import("./v-MZEOrqGC.js").then(e=>e.v),[],import.meta.url)}),vala:ie("vala",function(){return G(()=>import("./vala-DwfqEZ42.js").then(e=>e.v),[],import.meta.url)}),vbnet:ie("vbnet",function(){return G(()=>import("./vbnet-Bfmp59ad.js").then(e=>e.v),__vite__mapDeps([90,82,10]),import.meta.url)}),velocity:ie("velocity",function(){return G(()=>import("./velocity-BW0rn6q8.js").then(e=>e.v),[],import.meta.url)}),verilog:ie("verilog",function(){return G(()=>import("./verilog-CciPbndg.js").then(e=>e.v),[],import.meta.url)}),vhdl:ie("vhdl",function(){return G(()=>import("./vhdl-CcsUo07t.js").then(e=>e.v),[],import.meta.url)}),vim:ie("vim",function(){return G(()=>import("./vim-BYrWQT4U.js").then(e=>e.v),[],import.meta.url)}),visualBasic:ie("visualBasic",function(){return G(()=>import("./visual-basic-DEkVTY1u.js").then(e=>e.v),[],import.meta.url)}),warpscript:ie("warpscript",function(){return G(()=>import("./warpscript-DrS6Lwf1.js").then(e=>e.w),[],import.meta.url)}),wasm:ie("wasm",function(){return G(()=>import("./wasm-SvSErsNr.js").then(e=>e.w),[],import.meta.url)}),webIdl:ie("webIdl",function(){return G(()=>import("./web-idl-L4D9BFZn.js").then(e=>e.w),[],import.meta.url)}),wiki:ie("wiki",function(){return G(()=>import("./wiki-1KcTXRBD.js").then(e=>e.w),[],import.meta.url)}),wolfram:ie("wolfram",function(){return G(()=>import("./wolfram-xAhrDLAD.js").then(e=>e.w),[],import.meta.url)}),wren:ie("wren",function(){return G(()=>import("./wren-DWt6yoPK.js").then(e=>e.w),[],import.meta.url)}),xeora:ie("xeora",function(){return G(()=>import("./xeora-D686sMu3.js").then(e=>e.x),[],import.meta.url)}),xmlDoc:ie("xmlDoc",function(){return G(()=>import("./xml-doc-Bquf1yJt.js").then(e=>e.x),[],import.meta.url)}),xojo:ie("xojo",function(){return G(()=>import("./xojo-DZfdDq2N.js").then(e=>e.x),[],import.meta.url)}),xquery:ie("xquery",function(){return G(()=>import("./xquery-DdtAZAmm.js").then(e=>e.x),[],import.meta.url)}),yaml:ie("yaml",function(){return G(()=>import("./yaml-D4fft3QZ.js").then(e=>e.y),__vite__mapDeps([91,84]),import.meta.url)}),yang:ie("yang",function(){return G(()=>import("./yang-L0gWA1f7.js").then(e=>e.y),[],import.meta.url)}),zig:ie("zig",function(){return G(()=>import("./zig-BhGfFrYV.js").then(e=>e.z),[],import.meta.url)})},Qbt=Vbt({loader:function(){return G(()=>import("./core-BWEeT8rO.js").then(t=>t.c),__vite__mapDeps([92,60,22,15,43]),import.meta.url).then(function(t){return t.default||t})},isLanguageRegistered:function(t,r){return t.registered(r)},languageLoaders:Ubt,registerLanguage:function(t,r,n){return t.register(n)}});var Zbt=e=>t=>{const r=({components:{Pre:n,Code:s},language:i,code:o})=>f.jsx(e,{PreTag:n,CodeTag:s,...t,language:i,children:o});return r.displayName="PrismSyntaxHighlighter",r},qbt=Zbt(Qbt);const HDe=1024;let Hbt=0,Gc=class{constructor(t,r){this.from=t,this.to=r}};class hr{constructor(t={}){this.id=Hbt++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=t.combine||null}add(t){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof t!="function"&&(t=Li.match(t)),r=>{let n=t(r);return n===void 0?null:[this,n]}}}hr.closedBy=new hr({deserialize:e=>e.split(" ")});hr.openedBy=new hr({deserialize:e=>e.split(" ")});hr.group=new hr({deserialize:e=>e.split(" ")});hr.isolate=new hr({deserialize:e=>{if(e&&e!="rtl"&&e!="ltr"&&e!="auto")throw new RangeError("Invalid value for isolate: "+e);return e||"auto"}});hr.contextHash=new hr({perNode:!0});hr.lookAhead=new hr({perNode:!0});hr.mounted=new hr({perNode:!0});class rE{constructor(t,r,n){this.tree=t,this.overlay=r,this.parser=n}static get(t){return t&&t.props&&t.props[hr.mounted.id]}}const Wbt=Object.create(null);class Li{constructor(t,r,n,s=0){this.name=t,this.props=r,this.id=n,this.flags=s}static define(t){let r=t.props&&t.props.length?Object.create(null):Wbt,n=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),s=new Li(t.name||"",r,t.id,n);if(t.props){for(let i of t.props)if(Array.isArray(i)||(i=i(s)),i){if(i[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");r[i[0].id]=i[1]}}return s}prop(t){return this.props[t.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(t){if(typeof t=="string"){if(this.name==t)return!0;let r=this.prop(hr.group);return r?r.indexOf(t)>-1:!1}return this.id==t}static match(t){let r=Object.create(null);for(let n in t)for(let s of n.split(" "))r[s]=t[n];return n=>{for(let s=n.prop(hr.group),i=-1;i<(s?s.length:0);i++){let o=r[i<0?n.name:s[i]];if(o)return o}}}}Li.none=new Li("",Object.create(null),0,8);class Xw{constructor(t){this.types=t;for(let r=0;r<t.length;r++)if(t[r].id!=r)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...t){let r=[];for(let n of this.types){let s=null;for(let i of t){let o=i(n);if(o){s||(s=Object.assign({},n.props));let a=o[1],l=o[0];l.combine&&l.id in s&&(a=l.combine(s[l.id],a)),s[l.id]=a}}r.push(s?new Li(n.name,s,n.id,n.flags):n)}return new Xw(r)}}const M2=new WeakMap,qle=new WeakMap;var vs;(function(e){e[e.ExcludeBuffers=1]="ExcludeBuffers",e[e.IncludeAnonymous=2]="IncludeAnonymous",e[e.IgnoreMounts=4]="IgnoreMounts",e[e.IgnoreOverlays=8]="IgnoreOverlays"})(vs||(vs={}));class Gr{constructor(t,r,n,s,i){if(this.type=t,this.children=r,this.positions=n,this.length=s,this.props=null,i&&i.length){this.props=Object.create(null);for(let[o,a]of i)this.props[typeof o=="number"?o:o.id]=a}}toString(){let t=rE.get(this);if(t&&!t.overlay)return t.tree.toString();let r="";for(let n of this.children){let s=n.toString();s&&(r&&(r+=","),r+=s)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(r.length?"("+r+")":""):r}cursor(t=0){return new VI(this.topNode,t)}cursorAt(t,r=0,n=0){let s=M2.get(this)||this.topNode,i=new VI(s);return i.moveTo(t,r),M2.set(this,i._tree),i}get topNode(){return new Jo(this,0,0,null)}resolve(t,r=0){let n=nE(M2.get(this)||this.topNode,t,r,!1);return M2.set(this,n),n}resolveInner(t,r=0){let n=nE(qle.get(this)||this.topNode,t,r,!0);return qle.set(this,n),n}resolveStack(t,r=0){return Ybt(this,t,r)}iterate(t){let{enter:r,leave:n,from:s=0,to:i=this.length}=t,o=t.mode||0,a=(o&vs.IncludeAnonymous)>0;for(let l=this.cursor(o|vs.IncludeAnonymous);;){let c=!1;if(l.from<=i&&l.to>=s&&(!a&&l.type.isAnonymous||r(l)!==!1)){if(l.firstChild())continue;c=!0}for(;c&&n&&(a||!l.type.isAnonymous)&&n(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let r in this.props)t.push([+r,this.props[r]]);return t}balance(t={}){return this.children.length<=8?this:IG(Li.none,this.children,this.positions,0,this.children.length,0,this.length,(r,n,s)=>new Gr(this.type,r,n,s,this.propValues),t.makeTree||((r,n,s)=>new Gr(Li.none,r,n,s)))}static build(t){return Jbt(t)}}Gr.empty=new Gr(Li.none,[],[],0);class PG{constructor(t,r){this.buffer=t,this.index=r}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 PG(this.buffer,this.index)}}class Mg{constructor(t,r,n){this.buffer=t,this.length=r,this.set=n}get type(){return Li.none}toString(){let t=[];for(let r=0;r<this.buffer.length;)t.push(this.childString(r)),r=this.buffer[r+3];return t.join(",")}childString(t){let r=this.buffer[t],n=this.buffer[t+3],s=this.set.types[r],i=s.name;if(/\W/.test(i)&&!s.isError&&(i=JSON.stringify(i)),t+=4,n==t)return i;let o=[];for(;t<n;)o.push(this.childString(t)),t=this.buffer[t+3];return i+"("+o.join(",")+")"}findChild(t,r,n,s,i){let{buffer:o}=this,a=-1;for(let l=t;l!=r&&!(WDe(i,s,o[l+1],o[l+2])&&(a=l,n>0));l=o[l+3]);return a}slice(t,r,n){let s=this.buffer,i=new Uint16Array(r-t),o=0;for(let a=t,l=0;a<r;){i[l++]=s[a++],i[l++]=s[a++]-n;let c=i[l++]=s[a++]-n;i[l++]=s[a++]-t,o=Math.max(o,c)}return new Mg(i,o,this.set)}}function WDe(e,t,r,n){switch(e){case-2:return r<t;case-1:return n>=t&&r<t;case 0:return r<t&&n>t;case 1:return r<=t&&n>t;case 2:return n>t;case 4:return!0}}function nE(e,t,r,n){for(var s;e.from==e.to||(r<1?e.from>=t:e.from>t)||(r>-1?e.to<=t:e.to<t);){let o=!n&&e instanceof Jo&&e.index<0?null:e.parent;if(!o)return e;e=o}let i=n?0:vs.IgnoreOverlays;if(n)for(let o=e,a=o.parent;a;o=a,a=o.parent)o instanceof Jo&&o.index<0&&((s=a.enter(t,r,i))===null||s===void 0?void 0:s.from)!=o.from&&(e=a);for(;;){let o=e.enter(t,r,i);if(!o)return e;e=o}}class GDe{cursor(t=0){return new VI(this,t)}getChild(t,r=null,n=null){let s=Hle(this,t,r,n);return s.length?s[0]:null}getChildren(t,r=null,n=null){return Hle(this,t,r,n)}resolve(t,r=0){return nE(this,t,r,!1)}resolveInner(t,r=0){return nE(this,t,r,!0)}matchContext(t){return cV(this.parent,t)}enterUnfinishedNodesBefore(t){let r=this.childBefore(t),n=this;for(;r;){let s=r.lastChild;if(!s||s.to!=r.to)break;s.type.isError&&s.from==s.to?(n=r,r=s.prevSibling):r=s}return n}get node(){return this}get next(){return this.parent}}class Jo extends GDe{constructor(t,r,n,s){super(),this._tree=t,this.from=r,this.index=n,this._parent=s}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,r,n,s,i=0){for(let o=this;;){for(let{children:a,positions:l}=o._tree,c=r>0?a.length:-1;t!=c;t+=r){let u=a[t],d=l[t]+o.from;if(WDe(s,n,d,d+u.length)){if(u instanceof Mg){if(i&vs.ExcludeBuffers)continue;let p=u.findChild(0,u.buffer.length,r,n-d,s);if(p>-1)return new Ef(new Gbt(o,u,t,d),null,p)}else if(i&vs.IncludeAnonymous||!u.type.isAnonymous||$G(u)){let p;if(!(i&vs.IgnoreMounts)&&(p=rE.get(u))&&!p.overlay)return new Jo(p.tree,d,t,o);let m=new Jo(u,d,t,o);return i&vs.IncludeAnonymous||!m.type.isAnonymous?m:m.nextChild(r<0?u.children.length-1:0,r,n,s)}}}if(i&vs.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?t=o.index+r:t=r<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(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}enter(t,r,n=0){let s;if(!(n&vs.IgnoreOverlays)&&(s=rE.get(this._tree))&&s.overlay){let i=t-this.from;for(let{from:o,to:a}of s.overlay)if((r>0?o<=i:o<i)&&(r<0?a>=i:a>i))return new Jo(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,r,n)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}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 Hle(e,t,r,n){let s=e.cursor(),i=[];if(!s.firstChild())return i;if(r!=null){for(let o=!1;!o;)if(o=s.type.is(r),!s.nextSibling())return i}for(;;){if(n!=null&&s.type.is(n))return i;if(s.type.is(t)&&i.push(s.node),!s.nextSibling())return n==null?i:[]}}function cV(e,t,r=t.length-1){for(let n=e;r>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(t[r]&&t[r]!=n.name)return!1;r--}}return!0}class Gbt{constructor(t,r,n,s){this.parent=t,this.buffer=r,this.index=n,this.start=s}}class Ef extends GDe{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(t,r,n){super(),this.context=t,this._parent=r,this.index=n,this.type=t.buffer.set.types[t.buffer.buffer[n]]}child(t,r,n){let{buffer:s}=this.context,i=s.findChild(this.index+4,s.buffer[this.index+3],t,r-this.context.start,n);return i<0?null:new Ef(this.context,this,i)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}enter(t,r,n=0){if(n&vs.ExcludeBuffers)return null;let{buffer:s}=this.context,i=s.findChild(this.index+4,s.buffer[this.index+3],r>0?1:-1,t-this.context.start,r);return i<0?null:new Ef(this.context,this,i)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,r=t.buffer[this.index+3];return r<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new Ef(this.context,this._parent,r):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,r=this._parent?this._parent.index+4:0;return this.index==r?this.externalSibling(-1):new Ef(this.context,this._parent,t.findChild(r,this.index,-1,0,4))}get tree(){return null}toTree(){let t=[],r=[],{buffer:n}=this.context,s=this.index+4,i=n.buffer[this.index+3];if(i>s){let o=n.buffer[this.index+1];t.push(n.slice(s,i,o)),r.push(0)}return new Gr(this.type,t,r,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function XDe(e){if(!e.length)return null;let t=0,r=e[0];for(let i=1;i<e.length;i++){let o=e[i];(o.from>r.from||o.to<r.to)&&(r=o,t=i)}let n=r instanceof Jo&&r.index<0?null:r.parent,s=e.slice();return n?s[t]=n:s.splice(t,1),new Xbt(s,r)}class Xbt{constructor(t,r){this.heads=t,this.node=r}get next(){return XDe(this.heads)}}function Ybt(e,t,r){let n=e.resolveInner(t,r),s=null;for(let i=n instanceof Jo?n:n.context.parent;i;i=i.parent)if(i.index<0){let o=i.parent;(s||(s=[n])).push(o.resolve(t,r)),i=o}else{let o=rE.get(i.tree);if(o&&o.overlay&&o.overlay[0].from<=t&&o.overlay[o.overlay.length-1].to>=t){let a=new Jo(o.tree,o.overlay[0].from+i.from,-1,i);(s||(s=[n])).push(nE(a,t,r,!1))}}return s?XDe(s):n}class VI{get name(){return this.type.name}constructor(t,r=0){if(this.mode=r,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof Jo)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(let n=t._parent;n;n=n._parent)this.stack.unshift(n.index);this.bufferNode=t,this.yieldBuf(t.index)}}yieldNode(t){return t?(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0):!1}yieldBuf(t,r){this.index=t;let{start:n,buffer:s}=this.buffer;return this.type=r||s.set.types[s.buffer[t]],this.from=n+s.buffer[t+1],this.to=n+s.buffer[t+2],!0}yield(t){return t?t instanceof Jo?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(t,r,n){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree._tree.children.length-1:0,t,r,n,this.mode));let{buffer:s}=this.buffer,i=s.findChild(this.index+4,s.buffer[this.index+3],t,r-this.buffer.start,n);return i<0?!1:(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(t){return this.enterChild(1,t,2)}childBefore(t){return this.enterChild(-1,t,-2)}enter(t,r,n=this.mode){return this.buffer?n&vs.ExcludeBuffers?!1:this.enterChild(1,t,r):this.yield(this._tree.enter(t,r,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&vs.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let t=this.mode&vs.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}sibling(t){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode)):!1;let{buffer:r}=this.buffer,n=this.stack.length-1;if(t<0){let s=n<0?0:this.stack[n]+4;if(this.index!=s)return this.yieldBuf(r.findChild(s,this.index,-1,0,4))}else{let s=r.buffer[this.index+3];if(s<(n<0?r.buffer.length:r.buffer[this.stack[n]+3]))return this.yieldBuf(s)}return n<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(t){let r,n,{buffer:s}=this;if(s){if(t>0){if(this.index<s.buffer.buffer.length)return!1}else for(let i=0;i<this.index;i++)if(s.buffer.buffer[i+3]<this.index)return!1;({index:r,parent:n}=s)}else({index:r,_parent:n}=this._tree);for(;n;{index:r,_parent:n}=n)if(r>-1)for(let i=r+t,o=t<0?-1:n._tree.children.length;i!=o;i+=t){let a=n._tree.children[i];if(this.mode&vs.IncludeAnonymous||a instanceof Mg||!a.type.isAnonymous||$G(a))return!1}return!0}move(t,r){if(r&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,r=0){for(;(this.from==this.to||(r<1?this.from>=t:this.from>t)||(r>-1?this.to<=t:this.to<t))&&this.parent(););for(;this.enterChild(1,t,r););return this}get node(){if(!this.buffer)return this._tree;let t=this.bufferNode,r=null,n=0;if(t&&t.context==this.buffer)e:for(let s=this.index,i=this.stack.length;i>=0;){for(let o=t;o;o=o._parent)if(o.index==s){if(s==this.index)return o;r=o,n=i+1;break e}s=this.stack[--i]}for(let s=n;s<this.stack.length;s++)r=new Ef(this.buffer,r,this.stack[s]);return this.bufferNode=new Ef(this.buffer,r,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(t,r){for(let n=0;;){let s=!1;if(this.type.isAnonymous||t(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(s=!0)}for(;;){if(s&&r&&r(this),s=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,s=!0}}}matchContext(t){if(!this.buffer)return cV(this.node.parent,t);let{buffer:r}=this.buffer,{types:n}=r.set;for(let s=t.length-1,i=this.stack.length-1;s>=0;i--){if(i<0)return cV(this._tree,t,s);let o=n[r.buffer[this.stack[i]]];if(!o.isAnonymous){if(t[s]&&t[s]!=o.name)return!1;s--}}return!0}}function $G(e){return e.children.some(t=>t instanceof Mg||!t.type.isAnonymous||$G(t))}function Jbt(e){var t;let{buffer:r,nodeSet:n,maxBufferLength:s=HDe,reused:i=[],minRepeatType:o=n.types.length}=e,a=Array.isArray(r)?new PG(r,r.length):r,l=n.types,c=0,u=0;function d(C,T,P,A,R,M){let{id:z,start:Q,end:U,size:L}=a,V=u,j=c;if(L<0)if(a.next(),L==-1){let J=i[z];P.push(J),A.push(Q-C);return}else if(L==-3){c=z;return}else if(L==-4){u=z;return}else throw new RangeError(`Unrecognized record size: ${L}`);let N=l[z],I,H,B=Q-C;if(U-Q<=s&&(H=b(a.pos-T,R))){let J=new Uint16Array(H.size-H.skip),Z=a.pos-H.size,F=J.length;for(;a.pos>Z;)F=w(H.start,J,F);I=new Mg(J,U-H.start,n),B=H.start-C}else{let J=a.pos-L;a.next();let Z=[],F=[],W=z>=o?z:-1,K=0,se=U;for(;a.pos>J;)W>=0&&a.id==W&&a.size>=0?(a.end<=se-s&&(g(Z,F,Q,K,a.end,se,W,V,j),K=Z.length,se=a.end),a.next()):M>2500?p(Q,J,Z,F):d(Q,J,Z,F,W,M+1);if(W>=0&&K>0&&K<Z.length&&g(Z,F,Q,K,Q,se,W,V,j),Z.reverse(),F.reverse(),W>-1&&K>0){let X=m(N,j);I=IG(N,Z,F,0,Z.length,0,U-Q,X,X)}else I=v(N,Z,F,U-Q,V-U,j)}P.push(I),A.push(B)}function p(C,T,P,A){let R=[],M=0,z=-1;for(;a.pos>T;){let{id:Q,start:U,end:L,size:V}=a;if(V>4)a.next();else{if(z>-1&&U<z)break;z<0&&(z=L-s),R.push(Q,U,L),M++,a.next()}}if(M){let Q=new Uint16Array(M*4),U=R[R.length-2];for(let L=R.length-3,V=0;L>=0;L-=3)Q[V++]=R[L],Q[V++]=R[L+1]-U,Q[V++]=R[L+2]-U,Q[V++]=V;P.push(new Mg(Q,R[2]-U,n)),A.push(U-C)}}function m(C,T){return(P,A,R)=>{let M=0,z=P.length-1,Q,U;if(z>=0&&(Q=P[z])instanceof Gr){if(!z&&Q.type==C&&Q.length==R)return Q;(U=Q.prop(hr.lookAhead))&&(M=A[z]+Q.length+U)}return v(C,P,A,R,M,T)}}function g(C,T,P,A,R,M,z,Q,U){let L=[],V=[];for(;C.length>A;)L.push(C.pop()),V.push(T.pop()+P-R);C.push(v(n.types[z],L,V,M-R,Q-M,U)),T.push(R-P)}function v(C,T,P,A,R,M,z){if(M){let Q=[hr.contextHash,M];z=z?[Q].concat(z):[Q]}if(R>25){let Q=[hr.lookAhead,R];z=z?[Q].concat(z):[Q]}return new Gr(C,T,P,A,z)}function b(C,T){let P=a.fork(),A=0,R=0,M=0,z=P.end-s,Q={size:0,start:0,skip:0};e:for(let U=P.pos-C;P.pos>U;){let L=P.size;if(P.id==T&&L>=0){Q.size=A,Q.start=R,Q.skip=M,M+=4,A+=4,P.next();continue}let V=P.pos-L;if(L<0||V<U||P.start<z)break;let j=P.id>=o?4:0,N=P.start;for(P.next();P.pos>V;){if(P.size<0)if(P.size==-3)j+=4;else break e;else P.id>=o&&(j+=4);P.next()}R=N,A+=L,M+=j}return(T<0||A==C)&&(Q.size=A,Q.start=R,Q.skip=M),Q.size>4?Q:void 0}function w(C,T,P){let{id:A,start:R,end:M,size:z}=a;if(a.next(),z>=0&&A<o){let Q=P;if(z>4){let U=a.pos-(z-4);for(;a.pos>U;)P=w(C,T,P)}T[--P]=Q,T[--P]=M-C,T[--P]=R-C,T[--P]=A}else z==-3?c=A:z==-4&&(u=A);return P}let S=[],O=[];for(;a.pos>0;)d(e.start||0,e.bufferStart||0,S,O,-1,0);let k=(t=e.length)!==null&&t!==void 0?t:S.length?O[0]+S[0].length:0;return new Gr(l[e.topID],S.reverse(),O.reverse(),k)}const Wle=new WeakMap;function k$(e,t){if(!e.isAnonymous||t instanceof Mg||t.type!=e)return 1;let r=Wle.get(t);if(r==null){r=1;for(let n of t.children){if(n.type!=e||!(n instanceof Gr)){r=1;break}r+=k$(e,n)}Wle.set(t,r)}return r}function IG(e,t,r,n,s,i,o,a,l){let c=0;for(let g=n;g<s;g++)c+=k$(e,t[g]);let u=Math.ceil(c*1.5/8),d=[],p=[];function m(g,v,b,w,S){for(let O=b;O<w;){let k=O,C=v[O],T=k$(e,g[O]);for(O++;O<w;O++){let P=k$(e,g[O]);if(T+P>=u)break;T+=P}if(O==k+1){if(T>u){let P=g[k];m(P.children,P.positions,0,P.children.length,v[k]+S);continue}d.push(g[k])}else{let P=v[O-1]+g[O-1].length-C;d.push(IG(e,g,v,k,O,C,P,null,l))}p.push(C+S-i)}}return m(t,r,n,s,0),(a||l)(d,p,o)}class YDe{constructor(){this.map=new WeakMap}setBuffer(t,r,n){let s=this.map.get(t);s||this.map.set(t,s=new Map),s.set(r,n)}getBuffer(t,r){let n=this.map.get(t);return n&&n.get(r)}set(t,r){t instanceof Ef?this.setBuffer(t.context.buffer,t.index,r):t instanceof Jo&&this.map.set(t.tree,r)}get(t){return t instanceof Ef?this.getBuffer(t.context.buffer,t.index):t instanceof Jo?this.map.get(t.tree):void 0}cursorSet(t,r){t.buffer?this.setBuffer(t.buffer.buffer,t.index,r):this.map.set(t.tree,r)}cursorGet(t){return t.buffer?this.getBuffer(t.buffer.buffer,t.index):this.map.get(t.tree)}}class Th{constructor(t,r,n,s,i=!1,o=!1){this.from=t,this.to=r,this.tree=n,this.offset=s,this.open=(i?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(t,r=[],n=!1){let s=[new Th(0,t.length,t,0,!1,n)];for(let i of r)i.to>t.length&&s.push(i);return s}static applyChanges(t,r,n=128){if(!r.length)return t;let s=[],i=1,o=t.length?t[0]:null;for(let a=0,l=0,c=0;;a++){let u=a<r.length?r[a]:null,d=u?u.fromA:1e9;if(d-l>=n)for(;o&&o.from<d;){let p=o;if(l>=p.from||d<=p.to||c){let m=Math.max(p.from,l)-c,g=Math.min(p.to,d)-c;p=m>=g?null:new Th(m,g,p.tree,p.offset+c,a>0,!!u)}if(p&&s.push(p),o.to>d)break;o=i<t.length?t[i++]:null}if(!u)break;l=u.toA,c=u.toA-u.toB}return s}}class s5{startParse(t,r,n){return typeof t=="string"&&(t=new Kbt(t)),n=n?n.length?n.map(s=>new Gc(s.from,s.to)):[new Gc(0,0)]:[new Gc(0,t.length)],this.createParse(t,r||[],n)}parse(t,r,n){let s=this.startParse(t,r,n);for(;;){let i=s.advance();if(i)return i}}}class Kbt{constructor(t){this.string=t}get length(){return this.string.length}chunk(t){return this.string.slice(t)}get lineChunks(){return!1}read(t,r){return this.string.slice(t,r)}}function JDe(e){return(t,r,n,s)=>new txt(t,e,r,n,s)}class Gle{constructor(t,r,n,s,i){this.parser=t,this.parse=r,this.overlay=n,this.target=s,this.from=i}}function Xle(e){if(!e.length||e.some(t=>t.from>=t.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(e))}class ext{constructor(t,r,n,s,i,o,a){this.parser=t,this.predicate=r,this.mounts=n,this.index=s,this.start=i,this.target=o,this.prev=a,this.depth=0,this.ranges=[]}}const uV=new hr({perNode:!0});class txt{constructor(t,r,n,s,i){this.nest=r,this.input=n,this.fragments=s,this.ranges=i,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=t}advance(){if(this.baseParse){let n=this.baseParse.advance();if(!n)return null;if(this.baseParse=null,this.baseTree=n,this.startInner(),this.stoppedAt!=null)for(let s of this.inner)s.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let n=this.baseTree;return this.stoppedAt!=null&&(n=new Gr(n.type,n.children,n.positions,n.length,n.propValues.concat([[uV,this.stoppedAt]]))),n}let t=this.inner[this.innerDone],r=t.parse.advance();if(r){this.innerDone++;let n=Object.assign(Object.create(null),t.target.props);n[hr.mounted.id]=new rE(r,t.overlay,t.parser),t.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let t=this.input.length;for(let r=this.innerDone;r<this.inner.length;r++)this.inner[r].from<t&&(t=Math.min(t,this.inner[r].parse.parsedPos));return t}stopAt(t){if(this.stoppedAt=t,this.baseParse)this.baseParse.stopAt(t);else for(let r=this.innerDone;r<this.inner.length;r++)this.inner[r].parse.stopAt(t)}startInner(){let t=new sxt(this.fragments),r=null,n=null,s=new VI(new Jo(this.baseTree,this.ranges[0].from,0,null),vs.IncludeAnonymous|vs.IgnoreMounts);e:for(let i,o;;){let a=!0,l;if(this.stoppedAt!=null&&s.from>=this.stoppedAt)a=!1;else if(t.hasNode(s)){if(r){let c=r.mounts.find(u=>u.frag.from<=s.from&&u.frag.to>=s.to&&u.mount.overlay);if(c)for(let u of c.mount.overlay){let d=u.from+c.pos,p=u.to+c.pos;d>=s.from&&p<=s.to&&!r.ranges.some(m=>m.from<p&&m.to>d)&&r.ranges.push({from:d,to:p})}}a=!1}else if(n&&(o=rxt(n.ranges,s.from,s.to)))a=o!=2;else if(!s.type.isAnonymous&&(i=this.nest(s,this.input))&&(s.from<s.to||!i.overlay)){s.tree||(nxt(s),r&&r.depth++,n&&n.depth++);let c=t.findMounts(s.from,i.parser);if(typeof i.overlay=="function")r=new ext(i.parser,i.overlay,c,this.inner.length,s.from,s.tree,r);else{let u=Kle(this.ranges,i.overlay||(s.from<s.to?[new Gc(s.from,s.to)]:[]));u.length&&Xle(u),(u.length||!i.overlay)&&this.inner.push(new Gle(i.parser,u.length?i.parser.startParse(this.input,ece(c,u),u):i.parser.startParse(""),i.overlay?i.overlay.map(d=>new Gc(d.from-s.from,d.to-s.from)):null,s.tree,u.length?u[0].from:s.from)),i.overlay?u.length&&(n={ranges:u,depth:0,prev:n}):a=!1}}else if(r&&(l=r.predicate(s))&&(l===!0&&(l=new Gc(s.from,s.to)),l.from<l.to)){let c=r.ranges.length-1;c>=0&&r.ranges[c].to==l.from?r.ranges[c]={from:r.ranges[c].from,to:l.to}:r.ranges.push(l)}if(a&&s.firstChild())r&&r.depth++,n&&n.depth++;else for(;!s.nextSibling();){if(!s.parent())break e;if(r&&!--r.depth){let c=Kle(this.ranges,r.ranges);c.length&&(Xle(c),this.inner.splice(r.index,0,new Gle(r.parser,r.parser.startParse(this.input,ece(r.mounts,c),c),r.ranges.map(u=>new Gc(u.from-r.start,u.to-r.start)),r.target,c[0].from))),r=r.prev}n&&!--n.depth&&(n=n.prev)}}}}function rxt(e,t,r){for(let n of e){if(n.from>=r)break;if(n.to>t)return n.from<=t&&n.to>=r?2:1}return 0}function Yle(e,t,r,n,s,i){if(t<r){let o=e.buffer[t+1];n.push(e.slice(t,r,o)),s.push(o-i)}}function nxt(e){let{node:t}=e,r=[],n=t.context.buffer;do r.push(e.index),e.parent();while(!e.tree);let s=e.tree,i=s.children.indexOf(n),o=s.children[i],a=o.buffer,l=[i];function c(u,d,p,m,g,v){let b=r[v],w=[],S=[];Yle(o,u,b,w,S,m);let O=a[b+1],k=a[b+2];l.push(w.length);let C=v?c(b+4,a[b+3],o.set.types[a[b]],O,k-O,v-1):t.toTree();return w.push(C),S.push(O-m),Yle(o,a[b+3],d,w,S,m),new Gr(p,w,S,g)}s.children[i]=c(0,a.length,Li.none,0,o.length,r.length-1);for(let u of l){let d=e.tree.children[u],p=e.tree.positions[u];e.yield(new Jo(d,p+e.from,u,e._tree))}}class Jle{constructor(t,r){this.offset=r,this.done=!1,this.cursor=t.cursor(vs.IncludeAnonymous|vs.IgnoreMounts)}moveTo(t){let{cursor:r}=this,n=t-this.offset;for(;!this.done&&r.from<n;)r.to>=t&&r.enter(n,1,vs.IgnoreOverlays|vs.ExcludeBuffers)||r.next(!1)||(this.done=!0)}hasNode(t){if(this.moveTo(t.from),!this.done&&this.cursor.from+this.offset==t.from&&this.cursor.tree)for(let r=this.cursor.tree;;){if(r==t.tree)return!0;if(r.children.length&&r.positions[0]==0&&r.children[0]instanceof Gr)r=r.children[0];else break}return!1}}let sxt=class{constructor(t){var r;if(this.fragments=t,this.curTo=0,this.fragI=0,t.length){let n=this.curFrag=t[0];this.curTo=(r=n.tree.prop(uV))!==null&&r!==void 0?r:n.to,this.inner=new Jle(n.tree,-n.offset)}else this.curFrag=this.inner=null}hasNode(t){for(;this.curFrag&&t.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=t.from&&this.curTo>=t.to&&this.inner.hasNode(t)}nextFrag(){var t;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let r=this.curFrag=this.fragments[this.fragI];this.curTo=(t=r.tree.prop(uV))!==null&&t!==void 0?t:r.to,this.inner=new Jle(r.tree,-r.offset)}}findMounts(t,r){var n;let s=[];if(this.inner){this.inner.cursor.moveTo(t,1);for(let i=this.inner.cursor.node;i;i=i.parent){let o=(n=i.tree)===null||n===void 0?void 0:n.prop(hr.mounted);if(o&&o.parser==r)for(let a=this.fragI;a<this.fragments.length;a++){let l=this.fragments[a];if(l.from>=i.to)break;l.tree==this.curFrag.tree&&s.push({frag:l,pos:i.from-l.offset,mount:o})}}}return s}};function Kle(e,t){let r=null,n=t;for(let s=1,i=0;s<e.length;s++){let o=e[s-1].to,a=e[s].from;for(;i<n.length;i++){let l=n[i];if(l.from>=a)break;l.to<=o||(r||(n=r=t.slice()),l.from<o?(r[i]=new Gc(l.from,o),l.to>a&&r.splice(i+1,0,new Gc(a,l.to))):l.to>a?r[i--]=new Gc(a,l.to):r.splice(i--,1))}}return n}function ixt(e,t,r,n){let s=0,i=0,o=!1,a=!1,l=-1e9,c=[];for(;;){let u=s==e.length?1e9:o?e[s].to:e[s].from,d=i==t.length?1e9:a?t[i].to:t[i].from;if(o!=a){let p=Math.max(l,r),m=Math.min(u,d,n);p<m&&c.push(new Gc(p,m))}if(l=Math.min(u,d),l==1e9)break;u==l&&(o?(o=!1,s++):o=!0),d==l&&(a?(a=!1,i++):a=!0)}return c}function ece(e,t){let r=[];for(let{pos:n,mount:s,frag:i}of e){let o=n+(s.overlay?s.overlay[0].from:0),a=o+s.tree.length,l=Math.max(i.from,o),c=Math.min(i.to,a);if(s.overlay){let u=s.overlay.map(p=>new Gc(p.from+n,p.to+n)),d=ixt(t,u,l,c);for(let p=0,m=l;;p++){let g=p==d.length,v=g?c:d[p].from;if(v>m&&r.push(new Th(m,v,s.tree,-o,i.from>=m||i.openStart,i.to<=v||i.openEnd)),g)break;m=d[p].to}}else r.push(new Th(l,c,s.tree,-o,i.from>=o||i.openStart,i.to<=a||i.openEnd))}return r}var oxt={},tce={};let axt=class dV{constructor(t,r,n,s,i,o,a,l,c,u=0,d){this.p=t,this.stack=r,this.state=n,this.reducePos=s,this.pos=i,this.score=o,this.buffer=a,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=d}toString(){return`[${this.stack.filter((t,r)=>r%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,r,n=0){let s=t.parser.context;return new dV(t,[],r,n,n,0,[],0,s?new rce(s,s.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,r){this.stack.push(this.state,r,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var r;let n=t>>19,s=t&65535,{parser:i}=this.p,o=this.reducePos<this.pos-25;o&&this.setLookAhead(this.pos);let a=i.dynamicPrecedence(s);if(a&&(this.score+=a),n==0){this.pushState(i.getGoto(this.state,s,!0),this.reducePos),s<i.minRepeatTerm&&this.storeNode(s,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(s,this.reducePos);return}let l=this.stack.length-(n-1)*3-(t&262144?6:0),c=l?this.stack[l-2]:this.p.ranges[0].from,u=this.reducePos-c;u>=2e3&&!(!((r=this.p.parser.nodeSet.types[s])===null||r===void 0)&&r.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 d=l?this.stack[l-1]:0,p=this.bufferBase+this.buffer.length-d;if(s<i.minRepeatTerm||t&131072){let m=i.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(s,c,m,p+4,!0)}if(t&262144)this.state=this.stack[l];else{let m=this.stack[l-3];this.state=i.getGoto(m,s,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(s,c)}storeNode(t,r,n,s=4,i=!1){if(t==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(r==n)return;if(o.buffer[a-2]>=r){o.buffer[a-2]=n;return}}}if(!i||this.pos==n)this.buffer.push(t,r,n,s);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0){let a=!1;for(let l=o;l>0&&this.buffer[l-2]>n;l-=4)if(this.buffer[l-1]>=0){a=!0;break}if(a)for(;o>0&&this.buffer[o-2]>n;)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,s>4&&(s-=4)}this.buffer[o]=t,this.buffer[o+1]=r,this.buffer[o+2]=n,this.buffer[o+3]=s}}shift(t,r,n,s){if(t&131072)this.pushState(t&65535,this.pos);else if((t&262144)==0){let i=t,{parser:o}=this.p;(s>this.pos||r<=o.maxNode)&&(this.pos=s,o.stateFlag(i,1)||(this.reducePos=s)),this.pushState(i,n),this.shiftContext(r,n),r<=o.maxNode&&this.buffer.push(r,n,s,4)}else this.pos=s,this.shiftContext(r,n),r<=this.p.parser.maxNode&&this.buffer.push(r,n,s,4)}apply(t,r,n,s){t&65536?this.reduce(t):this.shift(t,r,n,s)}useNode(t,r){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=t)&&(this.p.reused.push(t),n++);let s=this.pos;this.reducePos=this.pos=s+t.length,this.pushState(r,s),this.buffer.push(n,s,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,r=t.buffer.length;for(;r>0&&t.buffer[r-2]>t.reducePos;)r-=4;let n=t.buffer.slice(r),s=t.bufferBase+r;for(;t&&s==t.bufferBase;)t=t.parent;return new dV(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,s,this.curContext,this.lookAhead,t)}recoverByDelete(t,r){let n=t<=this.p.parser.maxNode;n&&this.storeNode(t,this.pos,r,4),this.storeNode(0,this.pos,r,n?8:4),this.pos=this.reducePos=r,this.score-=190}canShift(t){for(let r=new lxt(this);;){let n=this.p.parser.stateSlot(r.state,4)||this.p.parser.hasAction(r.state,t);if(n==0)return!1;if((n&65536)==0)return!0;r.reduce(n)}}recoverByInsert(t){if(this.stack.length>=300)return[];let r=this.p.parser.nextStates(this.state);if(r.length>8||this.stack.length>=120){let s=[];for(let i=0,o;i<r.length;i+=2)(o=r[i+1])!=this.state&&this.p.parser.hasAction(o,t)&&s.push(r[i],o);if(this.stack.length<120)for(let i=0;s.length<8&&i<r.length;i+=2){let o=r[i+1];s.some((a,l)=>l&1&&a==o)||s.push(r[i],o)}r=s}let n=[];for(let s=0;s<r.length&&n.length<4;s+=2){let i=r[s+1];if(i==this.state)continue;let o=this.split();o.pushState(i,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(r[s],this.pos),o.reducePos=this.pos,o.score-=200,n.push(o)}return n}forceReduce(){let{parser:t}=this.p,r=t.stateSlot(this.state,5);if((r&65536)==0)return!1;if(!t.validAction(this.state,r)){let n=r>>19,s=r&65535,i=this.stack.length-n*3;if(i<0||t.getGoto(this.stack[i],s,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;r=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(r),!0}findForcedReduction(){let{parser:t}=this.p,r=[],n=(s,i)=>{if(!r.includes(s))return r.push(s),t.allActions(s,o=>{if(!(o&393216))if(o&65536){let a=(o>>19)-i;if(a>1){let l=o&65535,c=this.stack.length-a*3;if(c>=0&&t.getGoto(this.stack[c],l,!1)>=0)return a<<19|65536|l}}else{let a=n(o,i+1);if(a!=null)return a}})};return n(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:t}=this.p;return t.data[t.stateSlot(this.state,1)]==65535&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let r=0;r<this.stack.length;r+=3)if(this.stack[r]!=t.stack[r])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,r){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(r)))}reduceContext(t,r){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(r)))}emitContext(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let r=new rce(this.curContext.tracker,t);r.hash!=this.curContext.hash&&this.emitContext(),this.curContext=r}}setLookAhead(t){t>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=t)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}};class rce{constructor(t,r){this.tracker=t,this.context=r,this.hash=t.strict?t.hash(r):0}}class lxt{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let r=t&65535,n=t>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let s=this.start.p.parser.getGoto(this.stack[this.base-3],r,!0);this.state=s}}class UI{constructor(t,r,n){this.stack=t,this.pos=r,this.index=n,this.buffer=t.buffer,this.index==0&&this.maybeNext()}static create(t,r=t.bufferBase+t.buffer.length){return new UI(t,r,r-t.bufferBase)}maybeNext(){let t=this.stack.parent;t!=null&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.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 UI(this.stack,this.pos,this.index)}}function A_(e,t=Uint16Array){if(typeof e!="string")return e;let r=null;for(let n=0,s=0;n<e.length;){let i=0;for(;;){let o=e.charCodeAt(n++),a=!1;if(o==126){i=65535;break}o>=92&&o--,o>=34&&o--;let l=o-32;if(l>=46&&(l-=46,a=!0),i+=l,a)break;i*=46}r?r[s++]=i:r=new t(i)}return r}class E${constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const nce=new E$;class cxt{constructor(t,r){this.input=t,this.ranges=r,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=nce,this.rangeIndex=0,this.pos=this.chunkPos=r[0].from,this.range=r[0],this.end=r[r.length-1].to,this.readNext()}resolveOffset(t,r){let n=this.range,s=this.rangeIndex,i=this.pos+t;for(;i<n.from;){if(!s)return null;let o=this.ranges[--s];i-=n.from-o.to,n=o}for(;r<0?i>n.to:i>=n.to;){if(s==this.ranges.length-1)return null;let o=this.ranges[++s];i+=o.from-n.to,n=o}return i}clipPos(t){if(t>=this.range.from&&t<this.range.to)return t;for(let r of this.ranges)if(r.to>t)return Math.max(t,r.from);return this.end}peek(t){let r=this.chunkOff+t,n,s;if(r>=0&&r<this.chunk.length)n=this.pos+t,s=this.chunk.charCodeAt(r);else{let i=this.resolveOffset(t,1);if(i==null)return-1;if(n=i,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)s=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let o=this.rangeIndex,a=this.range;for(;a.to<=n;)a=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-n)),s=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),s}acceptToken(t,r=0){let n=r?this.resolveOffset(r,-1):this.pos;if(n==null||n<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=n}acceptTokenTo(t,r){this.token.value=t,this.token.end=r}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:t,chunkPos:r}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=r,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let t=this.input.chunk(this.pos),r=this.pos+t.length;this.chunk=r>this.range.to?t.slice(0,this.range.to-this.pos):t,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(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,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(t,r){if(r?(this.token=r,r.start=t,r.lookAhead=t+1,r.value=r.extended=-1):this.token=nce,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(t,r){if(t>=this.chunkPos&&r<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,r-this.chunkPos);if(t>=this.chunk2Pos&&r<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,r-this.chunk2Pos);if(t>=this.range.from&&r<=this.range.to)return this.input.read(t,r);let n="";for(let s of this.ranges){if(s.from>=r)break;s.to>t&&(n+=this.input.read(Math.max(s.from,t),Math.min(s.to,r)))}return n}}class Yx{constructor(t,r){this.data=t,this.id=r}token(t,r){let{parser:n}=r.p;KDe(this.data,t,r,this.id,n.data,n.tokenPrecTable)}}Yx.prototype.contextual=Yx.prototype.fallback=Yx.prototype.extend=!1;class QI{constructor(t,r,n){this.precTable=r,this.elseToken=n,this.data=typeof t=="string"?A_(t):t}token(t,r){let n=t.pos,s=0;for(;;){let i=t.next<0,o=t.resolveOffset(1,1);if(KDe(this.data,t,r,0,this.data,this.precTable),t.token.value>-1)break;if(this.elseToken==null)return;if(i||s++,o==null)break;t.reset(o,t.token)}s&&(t.reset(n,t.token),t.acceptToken(this.elseToken,s))}}QI.prototype.contextual=Yx.prototype.fallback=Yx.prototype.extend=!1;class Cc{constructor(t,r={}){this.token=t,this.contextual=!!r.contextual,this.fallback=!!r.fallback,this.extend=!!r.extend}}function KDe(e,t,r,n,s,i){let o=0,a=1<<n,{dialect:l}=r.p.parser;e:for(;(a&e[o])!=0;){let c=e[o+1];for(let m=o+3;m<c;m+=2)if((e[m+1]&a)>0){let g=e[m];if(l.allows(g)&&(t.token.value==-1||t.token.value==g||uxt(g,t.token.value,s,i))){t.acceptToken(g);break}}let u=t.next,d=0,p=e[o+2];if(t.next<0&&p>d&&e[c+p*3-3]==65535){o=e[c+p*3-1];continue e}for(;d<p;){let m=d+p>>1,g=c+m+(m<<1),v=e[g],b=e[g+1]||65536;if(u<v)p=m;else if(u>=b)d=m+1;else{o=e[g+2],t.advance();continue e}}break}}function sce(e,t,r){for(let n=t,s;(s=e[n])!=65535;n++)if(s==r)return n-t;return-1}function uxt(e,t,r,n){let s=sce(r,n,t);return s<0||sce(r,n,e)<s}const jl=typeof oxt<"u"&&tce&&/\bparse\b/.test(tce.LOG);let X9=null;function ice(e,t,r){let n=e.cursor(vs.IncludeAnonymous);for(n.moveTo(t);;)if(!(r<0?n.childBefore(t):n.childAfter(t)))for(;;){if((r<0?n.to<t:n.from>t)&&!n.type.isError)return r<0?Math.max(0,Math.min(n.to-1,t-25)):Math.min(e.length,Math.max(n.from+1,t+25));if(r<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return r<0?0:e.length}}let dxt=class{constructor(t,r){this.fragments=t,this.nodeSet=r,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?ice(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?ice(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){let r=this.trees.length-1;if(r<0)return this.nextFragment(),null;let n=this.trees[r],s=this.index[r];if(s==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=n.children[s],o=this.start[r]+n.positions[s];if(o>t)return this.nextStart=o,null;if(i instanceof Gr){if(o==t){if(o<this.safeFrom)return null;let a=o+i.length;if(a<=this.safeTo){let l=i.prop(hr.lookAhead);if(!l||a+l<this.fragment.to)return i}}this.index[r]++,o+i.length>=Math.max(this.safeFrom,t)&&(this.trees.push(i),this.start.push(o),this.index.push(0))}else this.index[r]++,this.nextStart=o+i.length}}};class fxt{constructor(t,r){this.stream=r,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map(n=>new E$)}getActions(t){let r=0,n=null,{parser:s}=t.p,{tokenizers:i}=s,o=s.stateSlot(t.state,3),a=t.curContext?t.curContext.hash:0,l=0;for(let c=0;c<i.length;c++){if((1<<c&o)==0)continue;let u=i[c],d=this.tokens[c];if(!(n&&!u.fallback)&&((u.contextual||d.start!=t.pos||d.mask!=o||d.context!=a)&&(this.updateCachedToken(d,u,t),d.mask=o,d.context=a),d.lookAhead>d.end+25&&(l=Math.max(d.lookAhead,l)),d.value!=0)){let p=r;if(d.extended>-1&&(r=this.addActions(t,d.extended,d.end,r)),r=this.addActions(t,d.value,d.end,r),!u.extend&&(n=d,r>p))break}}for(;this.actions.length>r;)this.actions.pop();return l&&t.setLookAhead(l),!n&&t.pos==this.stream.end&&(n=new E$,n.value=t.p.parser.eofTerm,n.start=n.end=t.pos,r=this.addActions(t,n.value,n.end,r)),this.mainToken=n,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let r=new E$,{pos:n,p:s}=t;return r.start=n,r.end=Math.min(n+1,s.stream.end),r.value=n==s.stream.end?s.parser.eofTerm:0,r}updateCachedToken(t,r,n){let s=this.stream.clipPos(n.pos);if(r.token(this.stream.reset(s,t),n),t.value>-1){let{parser:i}=n.p;for(let o=0;o<i.specialized.length;o++)if(i.specialized[o]==t.value){let a=i.specializers[o](this.stream.read(t.start,t.end),n);if(a>=0&&n.p.parser.dialect.allows(a>>1)){(a&1)==0?t.value=a>>1:t.extended=a>>1;break}}}else t.value=0,t.end=this.stream.clipPos(s+1)}putAction(t,r,n,s){for(let i=0;i<s;i+=3)if(this.actions[i]==t)return s;return this.actions[s++]=t,this.actions[s++]=r,this.actions[s++]=n,s}addActions(t,r,n,s){let{state:i}=t,{parser:o}=t.p,{data:a}=o;for(let l=0;l<2;l++)for(let c=o.stateSlot(i,l?2:1);;c+=3){if(a[c]==65535)if(a[c+1]==1)c=mh(a,c+2);else{s==0&&a[c+1]==2&&(s=this.putAction(mh(a,c+2),r,n,s));break}a[c]==r&&(s=this.putAction(mh(a,c+1),r,n,s))}return s}}let pxt=class{constructor(t,r,n,s){this.parser=t,this.input=r,this.ranges=s,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 cxt(r,s),this.tokens=new fxt(t,this.stream),this.topTerm=t.top[1];let{from:i}=s[0];this.stacks=[axt.start(this,t.top[0],i)],this.fragments=n.length&&this.stream.end-i>t.bufferLength*4?new dxt(n,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t=this.stacks,r=this.minStackPos,n=this.stacks=[],s,i;if(this.bigReductionCount>300&&t.length==1){let[o]=t;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<t.length;o++){let a=t[o];for(;;){if(this.tokens.mainToken=null,a.pos>r)n.push(a);else{if(this.advanceStack(a,n,t))continue;{s||(s=[],i=[]),s.push(a);let l=this.tokens.getMainToken(a);i.push(l.value,l.end)}}break}}if(!n.length){let o=s&&mxt(s);if(o)return jl&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw jl&&s&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+r);this.recovering||(this.recovering=5)}if(this.recovering&&s){let o=this.stoppedAt!=null&&s[0].pos>this.stoppedAt?s[0]:this.runRecovery(s,i,n);if(o)return jl&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(n.length>o)for(n.sort((a,l)=>l.score-a.score);n.length>o;)n.pop();n.some(a=>a.reducePos>r)&&this.recovering--}else if(n.length>1){e:for(let o=0;o<n.length-1;o++){let a=n[o];for(let l=o+1;l<n.length;l++){let c=n[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)n.splice(l--,1);else{n.splice(o--,1);continue e}}}n.length>12&&n.splice(12,n.length-12)}this.minStackPos=n[0].pos;for(let o=1;o<n.length;o++)n[o].pos<this.minStackPos&&(this.minStackPos=n[o].pos);return null}stopAt(t){if(this.stoppedAt!=null&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}advanceStack(t,r,n){let s=t.pos,{parser:i}=this,o=jl?this.stackID(t)+" -> ":"";if(this.stoppedAt!=null&&s>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let c=t.curContext&&t.curContext.tracker.strict,u=c?t.curContext.hash:0;for(let d=this.fragments.nodeAt(s);d;){let p=this.parser.nodeSet.types[d.type.id]==d.type?i.getGoto(t.state,d.type.id):-1;if(p>-1&&d.length&&(!c||(d.prop(hr.contextHash)||0)==u))return t.useNode(d,p),jl&&console.log(o+this.stackID(t)+` (via reuse of ${i.getName(d.type.id)})`),!0;if(!(d instanceof Gr)||d.children.length==0||d.positions[0]>0)break;let m=d.children[0];if(m instanceof Gr&&d.positions[0]==0)d=m;else break}}let a=i.stateSlot(t.state,4);if(a>0)return t.reduce(a),jl&&console.log(o+this.stackID(t)+` (via always-reduce ${i.getName(a&65535)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let l=this.tokens.getActions(t);for(let c=0;c<l.length;){let u=l[c++],d=l[c++],p=l[c++],m=c==l.length||!n,g=m?t:t.split(),v=this.tokens.mainToken;if(g.apply(u,d,v?v.start:g.pos,p),jl&&console.log(o+this.stackID(g)+` (via ${(u&65536)==0?"shift":`reduce of ${i.getName(u&65535)}`} for ${i.getName(d)} @ ${s}${g==t?"":", split"})`),m)return!0;g.pos>s?r.push(g):n.push(g)}return!1}advanceFully(t,r){let n=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>n)return oce(t,r),!0}}runRecovery(t,r,n){let s=null,i=!1;for(let o=0;o<t.length;o++){let a=t[o],l=r[o<<1],c=r[(o<<1)+1],u=jl?this.stackID(a)+" -> ":"";if(a.deadEnd&&(i||(i=!0,a.restart(),jl&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,n))))continue;let d=a.split(),p=u;for(let m=0;d.forceReduce()&&m<10&&(jl&&console.log(p+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,n));m++)jl&&(p=this.stackID(d)+" -> ");for(let m of a.recoverByInsert(l))jl&&console.log(u+this.stackID(m)+" (via recover-insert)"),this.advanceFully(m,n);this.stream.end>a.pos?(c==a.pos&&(c++,l=0),a.recoverByDelete(l,c),jl&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),oce(a,n)):(!s||s.score<a.score)&&(s=a)}return s}stackToTree(t){return t.close(),Gr.build({buffer:UI.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(t){let r=(X9||(X9=new WeakMap)).get(t);return r||X9.set(t,r=String.fromCodePoint(this.nextStackID++)),r+t}};function oce(e,t){for(let r=0;r<t.length;r++){let n=t[r];if(n.pos==e.pos&&n.sameState(e)){t[r].score<e.score&&(t[r]=e);return}}t.push(e)}class hxt{constructor(t,r,n){this.source=t,this.flags=r,this.disabled=n}allows(t){return!this.disabled||this.disabled[t]==0}}const Y9=e=>e;class eAe{constructor(t){this.start=t.start,this.shift=t.shift||Y9,this.reduce=t.reduce||Y9,this.reuse=t.reuse||Y9,this.hash=t.hash||(()=>0),this.strict=t.strict!==!1}}class Wv extends s5{constructor(t){if(super(),this.wrappers=[],t.version!=14)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let r=t.nodeNames.split(" ");this.minRepeatTerm=r.length;for(let a=0;a<t.repeatNodeCount;a++)r.push("");let n=Object.keys(t.topRules).map(a=>t.topRules[a][1]),s=[];for(let a=0;a<r.length;a++)s.push([]);function i(a,l,c){s[a].push([l,l.deserialize(String(c))])}if(t.nodeProps)for(let a of t.nodeProps){let l=a[0];typeof l=="string"&&(l=hr[l]);for(let c=1;c<a.length;){let u=a[c++];if(u>=0)i(u,l,a[c++]);else{let d=a[c+-u];for(let p=-u;p>0;p--)i(a[c++],l,d);c++}}}this.nodeSet=new Xw(r.map((a,l)=>Li.define({name:l>=this.minRepeatTerm?void 0:a,id:l,props:s[l],top:n.indexOf(l)>-1,error:l==0,skipped:t.skippedNodes&&t.skippedNodes.indexOf(l)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=HDe;let o=A_(t.tokenData);this.context=t.context,this.specializerSpecs=t.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(ace),this.states=A_(t.states,Uint32Array),this.data=A_(t.stateData),this.goto=A_(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map(a=>typeof a=="number"?new Yx(o,a):a),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,r,n){let s=new pxt(this,t,r,n);for(let i of this.wrappers)s=i(s,t,r,n);return s}getGoto(t,r,n=!1){let s=this.goto;if(r>=s[0])return-1;for(let i=s[r+1];;){let o=s[i++],a=o&1,l=s[i++];if(a&&n)return l;for(let c=i+(o>>1);i<c;i++)if(s[i]==t)return l;if(a)return-1}}hasAction(t,r){let n=this.data;for(let s=0;s<2;s++)for(let i=this.stateSlot(t,s?2:1),o;;i+=3){if((o=n[i])==65535)if(n[i+1]==1)o=n[i=mh(n,i+2)];else{if(n[i+1]==2)return mh(n,i+2);break}if(o==r||o==0)return mh(n,i+1)}return 0}stateSlot(t,r){return this.states[t*6+r]}stateFlag(t,r){return(this.stateSlot(t,0)&r)>0}validAction(t,r){return!!this.allActions(t,n=>n==r?!0:null)}allActions(t,r){let n=this.stateSlot(t,4),s=n?r(n):void 0;for(let i=this.stateSlot(t,1);s==null;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=mh(this.data,i+2);else break;s=r(mh(this.data,i+1))}return s}nextStates(t){let r=[];for(let n=this.stateSlot(t,1);;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=mh(this.data,n+2);else break;if((this.data[n+2]&1)==0){let s=this.data[n+1];r.some((i,o)=>o&1&&i==s)||r.push(this.data[n],s)}}return r}configure(t){let r=Object.assign(Object.create(Wv.prototype),this);if(t.props&&(r.nodeSet=this.nodeSet.extend(...t.props)),t.top){let n=this.topRules[t.top];if(!n)throw new RangeError(`Invalid top rule name ${t.top}`);r.top=n}return t.tokenizers&&(r.tokenizers=this.tokenizers.map(n=>{let s=t.tokenizers.find(i=>i.from==n);return s?s.to:n})),t.specializers&&(r.specializers=this.specializers.slice(),r.specializerSpecs=this.specializerSpecs.map((n,s)=>{let i=t.specializers.find(a=>a.from==n.external);if(!i)return n;let o=Object.assign(Object.assign({},n),{external:i.to});return r.specializers[s]=ace(o),o})),t.contextTracker&&(r.context=t.contextTracker),t.dialect&&(r.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(r.strict=t.strict),t.wrap&&(r.wrappers=r.wrappers.concat(t.wrap)),t.bufferLength!=null&&(r.bufferLength=t.bufferLength),r}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let r=this.dynamicPrecedences;return r==null?0:r[t]||0}parseDialect(t){let r=Object.keys(this.dialects),n=r.map(()=>!1);if(t)for(let i of t.split(" ")){let o=r.indexOf(i);o>=0&&(n[o]=!0)}let s=null;for(let i=0;i<r.length;i++)if(!n[i])for(let o=this.dialects[r[i]],a;(a=this.data[o++])!=65535;)(s||(s=new Uint8Array(this.maxTerm+1)))[a]=1;return new hxt(t,n,s)}static deserialize(t){return new Wv(t)}}function mh(e,t){return e[t]|e[t+1]<<16}function mxt(e){let t=null;for(let r of e){let n=r.p.stoppedAt;(r.pos==r.p.stream.end||n!=null&&r.pos>n)&&r.p.parser.stateFlag(r.state,2)&&(!t||t.score<r.score)&&(t=r)}return t}function ace(e){if(e.external){let t=e.extend?1:0;return(r,n)=>e.external(r,n)<<1|t}return e.get}let gxt=0;class Xl{constructor(t,r,n,s){this.name=t,this.set=r,this.base=n,this.modified=s,this.id=gxt++}toString(){let{name:t}=this;for(let r of this.modified)r.name&&(t=`${r.name}(${t})`);return t}static define(t,r){let n=typeof t=="string"?t:"?";if(t instanceof Xl&&(r=t),r?.base)throw new Error("Can not derive from a modified tag");let s=new Xl(n,[],null,[]);if(s.set.push(s),r)for(let i of r.set)s.set.push(i);return s}static defineModifier(t){let r=new ZI(t);return n=>n.modified.indexOf(r)>-1?n:ZI.get(n.base||n,n.modified.concat(r).sort((s,i)=>s.id-i.id))}}let yxt=0;class ZI{constructor(t){this.name=t,this.instances=[],this.id=yxt++}static get(t,r){if(!r.length)return t;let n=r[0].instances.find(a=>a.base==t&&vxt(r,a.modified));if(n)return n;let s=[],i=new Xl(t.name,s,t,r);for(let a of r)a.instances.push(i);let o=bxt(r);for(let a of t.set)if(!a.modified.length)for(let l of o)s.push(ZI.get(a,l));return i}}function vxt(e,t){return e.length==t.length&&e.every((r,n)=>r==t[n])}function bxt(e){let t=[[]];for(let r=0;r<e.length;r++)for(let n=0,s=t.length;n<s;n++)t.push(t[n].concat(e[r]));return t.sort((r,n)=>n.length-r.length)}function R0(e){let t=Object.create(null);for(let r in e){let n=e[r];Array.isArray(n)||(n=[n]);for(let s of r.split(" "))if(s){let i=[],o=2,a=s;for(let d=0;;){if(a=="..."&&d>0&&d+3==s.length){o=1;break}let p=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!p)throw new RangeError("Invalid path: "+s);if(i.push(p[0]=="*"?"":p[0][0]=='"'?JSON.parse(p[0]):p[0]),d+=p[0].length,d==s.length)break;let m=s[d++];if(d==s.length&&m=="!"){o=0;break}if(m!="/")throw new RangeError("Invalid path: "+s);a=s.slice(d)}let l=i.length-1,c=i[l];if(!c)throw new RangeError("Invalid path: "+s);let u=new sE(n,o,l>0?i.slice(0,l):null);t[c]=u.sort(t[c])}}return tAe.add(t)}const tAe=new hr({combine(e,t){let r,n,s;for(;e||t;){if(!e||t&&e.depth>=t.depth?(s=t,t=t.next):(s=e,e=e.next),r&&r.mode==s.mode&&!s.context&&!r.context)continue;let i=new sE(s.tags,s.mode,s.context);r?r.next=i:n=i,r=i}return n}});class sE{constructor(t,r,n,s){this.tags=t,this.mode=r,this.context=n,this.next=s}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(t){return!t||t.depth<this.depth?(this.next=t,this):(t.next=this.sort(t.next),t)}get depth(){return this.context?this.context.length:0}}sE.empty=new sE([],2,null);function rAe(e,t){let r=Object.create(null);for(let i of e)if(!Array.isArray(i.tag))r[i.tag.id]=i.class;else for(let o of i.tag)r[o.id]=i.class;let{scope:n,all:s=null}=t||{};return{style:i=>{let o=s;for(let a of i)for(let l of a.set){let c=r[l.id];if(c){o=o?o+" "+c:c;break}}return o},scope:n}}function xxt(e,t){let r=null;for(let n of e){let s=n.style(t);s&&(r=r?r+" "+s:s)}return r}function wxt(e,t,r,n=0,s=e.length){let i=new Sxt(n,Array.isArray(t)?t:[t],r);i.highlightRange(e.cursor(),n,s,"",i.highlighters),i.flush(s)}class Sxt{constructor(t,r,n){this.at=t,this.highlighters=r,this.span=n,this.class=""}startSpan(t,r){r!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=r)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,r,n,s,i){let{type:o,from:a,to:l}=t;if(a>=n||l<=r)return;o.isTop&&(i=this.highlighters.filter(m=>!m.scope||m.scope(o)));let c=s,u=Oxt(t)||sE.empty,d=xxt(i,u.tags);if(d&&(c&&(c+=" "),c+=d,u.mode==1&&(s+=(s?" ":"")+d)),this.startSpan(Math.max(r,a),c),u.opaque)return;let p=t.tree&&t.tree.prop(hr.mounted);if(p&&p.overlay){let m=t.node.enter(p.overlay[0].from+a,1),g=this.highlighters.filter(b=>!b.scope||b.scope(p.tree.type)),v=t.firstChild();for(let b=0,w=a;;b++){let S=b<p.overlay.length?p.overlay[b]:null,O=S?S.from+a:l,k=Math.max(r,w),C=Math.min(n,O);if(k<C&&v)for(;t.from<C&&(this.highlightRange(t,k,C,s,i),this.startSpan(Math.min(C,t.to),c),!(t.to>=O||!t.nextSibling())););if(!S||O>n)break;w=S.to+a,w>r&&(this.highlightRange(m.cursor(),Math.max(r,S.from+a),Math.min(n,w),"",g),this.startSpan(Math.min(n,w),c))}v&&t.parent()}else if(t.firstChild()){p&&(s="");do if(!(t.to<=r)){if(t.from>=n)break;this.highlightRange(t,r,n,s,i),this.startSpan(Math.min(n,t.to),c)}while(t.nextSibling());t.parent()}}}function Oxt(e){let t=e.type.prop(tAe);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}const mt=Xl.define,j2=mt(),rg=mt(),lce=mt(rg),cce=mt(rg),ng=mt(),F2=mt(ng),J9=mt(ng),lf=mt(),Zy=mt(lf),tf=mt(),rf=mt(),fV=mt(),jO=mt(fV),L2=mt(),Y={comment:j2,lineComment:mt(j2),blockComment:mt(j2),docComment:mt(j2),name:rg,variableName:mt(rg),typeName:lce,tagName:mt(lce),propertyName:cce,attributeName:mt(cce),className:mt(rg),labelName:mt(rg),namespace:mt(rg),macroName:mt(rg),literal:ng,string:F2,docString:mt(F2),character:mt(F2),attributeValue:mt(F2),number:J9,integer:mt(J9),float:mt(J9),bool:mt(ng),regexp:mt(ng),escape:mt(ng),color:mt(ng),url:mt(ng),keyword:tf,self:mt(tf),null:mt(tf),atom:mt(tf),unit:mt(tf),modifier:mt(tf),operatorKeyword:mt(tf),controlKeyword:mt(tf),definitionKeyword:mt(tf),moduleKeyword:mt(tf),operator:rf,derefOperator:mt(rf),arithmeticOperator:mt(rf),logicOperator:mt(rf),bitwiseOperator:mt(rf),compareOperator:mt(rf),updateOperator:mt(rf),definitionOperator:mt(rf),typeOperator:mt(rf),controlOperator:mt(rf),punctuation:fV,separator:mt(fV),bracket:jO,angleBracket:mt(jO),squareBracket:mt(jO),paren:mt(jO),brace:mt(jO),content:lf,heading:Zy,heading1:mt(Zy),heading2:mt(Zy),heading3:mt(Zy),heading4:mt(Zy),heading5:mt(Zy),heading6:mt(Zy),contentSeparator:mt(lf),list:mt(lf),quote:mt(lf),emphasis:mt(lf),strong:mt(lf),link:mt(lf),monospace:mt(lf),strikethrough:mt(lf),inserted:mt(),deleted:mt(),changed:mt(),invalid:mt(),meta:L2,documentMeta:mt(L2),annotation:mt(L2),processingInstruction:mt(L2),definition:Xl.defineModifier("definition"),constant:Xl.defineModifier("constant"),function:Xl.defineModifier("function"),standard:Xl.defineModifier("standard"),local:Xl.defineModifier("local"),special:Xl.defineModifier("special")};for(let e in Y){let t=Y[e];t instanceof Xl&&(t.name=e)}rAe([{tag:Y.link,class:"tok-link"},{tag:Y.heading,class:"tok-heading"},{tag:Y.emphasis,class:"tok-emphasis"},{tag:Y.strong,class:"tok-strong"},{tag:Y.keyword,class:"tok-keyword"},{tag:Y.atom,class:"tok-atom"},{tag:Y.bool,class:"tok-bool"},{tag:Y.url,class:"tok-url"},{tag:Y.labelName,class:"tok-labelName"},{tag:Y.inserted,class:"tok-inserted"},{tag:Y.deleted,class:"tok-deleted"},{tag:Y.literal,class:"tok-literal"},{tag:Y.string,class:"tok-string"},{tag:Y.number,class:"tok-number"},{tag:[Y.regexp,Y.escape,Y.special(Y.string)],class:"tok-string2"},{tag:Y.variableName,class:"tok-variableName"},{tag:Y.local(Y.variableName),class:"tok-variableName tok-local"},{tag:Y.definition(Y.variableName),class:"tok-variableName tok-definition"},{tag:Y.special(Y.variableName),class:"tok-variableName2"},{tag:Y.definition(Y.propertyName),class:"tok-propertyName tok-definition"},{tag:Y.typeName,class:"tok-typeName"},{tag:Y.namespace,class:"tok-namespace"},{tag:Y.className,class:"tok-className"},{tag:Y.macroName,class:"tok-macroName"},{tag:Y.propertyName,class:"tok-propertyName"},{tag:Y.operator,class:"tok-operator"},{tag:Y.comment,class:"tok-comment"},{tag:Y.meta,class:"tok-meta"},{tag:Y.invalid,class:"tok-invalid"},{tag:Y.punctuation,class:"tok-punctuation"}]);const _xt=R0({String:Y.string,Number:Y.number,"True False":Y.bool,PropertyName:Y.propertyName,Null:Y.null,", :":Y.separator,"[ ]":Y.squareBracket,"{ }":Y.brace}),kxt=Wv.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[_xt],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0});let pV=[],nAe=[];(()=>{let e="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(t=>t?parseInt(t,36):1);for(let t=0,r=0;t<e.length;t++)(t%2?nAe:pV).push(r=r+e[t])})();function Ext(e){if(e<768)return!1;for(let t=0,r=pV.length;;){let n=t+r>>1;if(e<pV[n])r=n;else if(e>=nAe[n])t=n+1;else return!0;if(t==r)return!1}}function uce(e){return e>=127462&&e<=127487}const dce=8205;function Cxt(e,t,r=!0,n=!0){return(r?sAe:Txt)(e,t,n)}function sAe(e,t,r){if(t==e.length)return t;t&&iAe(e.charCodeAt(t))&&oAe(e.charCodeAt(t-1))&&t--;let n=K9(e,t);for(t+=fce(n);t<e.length;){let s=K9(e,t);if(n==dce||s==dce||r&&Ext(s))t+=fce(s),n=s;else if(uce(s)){let i=0,o=t-2;for(;o>=0&&uce(K9(e,o));)i++,o-=2;if(i%2==0)break;t+=2}else break}return t}function Txt(e,t,r){for(;t>0;){let n=sAe(e,t-2,r);if(n<t)return n;t--}return 0}function K9(e,t){let r=e.charCodeAt(t);if(!oAe(r)||t+1==e.length)return r;let n=e.charCodeAt(t+1);return iAe(n)?(r-55296<<10)+(n-56320)+65536:r}function iAe(e){return e>=56320&&e<57344}function oAe(e){return e>=55296&&e<56320}function fce(e){return e<65536?1:2}class ln{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,r,n){[t,r]=C1(this,t,r);let s=[];return this.decompose(0,t,s,2),n.length&&n.decompose(0,n.length,s,3),this.decompose(r,this.length,s,1),bf.from(s,this.length-(r-t)+n.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,r=this.length){[t,r]=C1(this,t,r);let n=[];return this.decompose(t,r,n,0),bf.from(n,r-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let r=this.scanIdentical(t,1),n=this.length-this.scanIdentical(t,-1),s=new ik(this),i=new ik(t);for(let o=r,a=r;;){if(s.next(o),i.next(o),o=0,s.lineBreak!=i.lineBreak||s.done!=i.done||s.value!=i.value)return!1;if(a+=s.value.length,s.done||a>=n)return!0}}iter(t=1){return new ik(this,t)}iterRange(t,r=this.length){return new aAe(this,t,r)}iterLines(t,r){let n;if(t==null)n=this.iter();else{r==null&&(r=this.lines+1);let s=this.line(t).from;n=this.iterRange(s,Math.max(s,r==this.lines+1?this.length:r<=1?0:this.line(r-1).to))}return new lAe(n)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(t.length==0)throw new RangeError("A document must have at least one line");return t.length==1&&!t[0]?ln.empty:t.length<=32?new bi(t):bf.from(bi.split(t,[]))}}class bi extends ln{constructor(t,r=Dxt(t)){super(),this.text=t,this.length=r}get lines(){return this.text.length}get children(){return null}lineInner(t,r,n,s){for(let i=0;;i++){let o=this.text[i],a=s+o.length;if((r?n:a)>=t)return new Axt(s,a,n,o);s=a+1,n++}}decompose(t,r,n,s){let i=t<=0&&r>=this.length?this:new bi(pce(this.text,t,r),Math.min(r,this.length)-Math.max(0,t));if(s&1){let o=n.pop(),a=C$(i.text,o.text.slice(),0,i.length);if(a.length<=32)n.push(new bi(a,o.length+i.length));else{let l=a.length>>1;n.push(new bi(a.slice(0,l)),new bi(a.slice(l)))}}else n.push(i)}replace(t,r,n){if(!(n instanceof bi))return super.replace(t,r,n);[t,r]=C1(this,t,r);let s=C$(this.text,C$(n.text,pce(this.text,0,t)),r),i=this.length+n.length-(r-t);return s.length<=32?new bi(s,i):bf.from(bi.split(s,[]),i)}sliceString(t,r=this.length,n=`
|
|
113
|
+
`)};if(z===0){var L=u.slice(p+1,m).concat(_$({children:[U],className:T.properties.className})),V=b(L,Q);d.push(V)}else if(z===R.length-1){var j=u[m+1]&&u[m+1].children&&u[m+1].children[0],N={type:"text",value:"".concat(M)};if(j){var I=_$({children:[N],className:T.properties.className});u.splice(m+1,0,I)}else{var H=[N],B=b(H,Q,T.properties.className);d.push(B)}}else{var J=[U],Z=b(J,Q,T.properties.className);d.push(Z)}}),p=m}m++};m<u.length;)w();if(p!==u.length-1){var S=u.slice(p+1,u.length);if(S&&S.length){var O=n&&d.length+i,k=b(S,O);d.push(k)}}return t?d:(c=[]).concat.apply(c,d)}function Ibt(e){var t=e.rows,r=e.stylesheet,n=e.useInlineStyles;return t.map(function(s,i){return zDe({node:s,stylesheet:r,useInlineStyles:n,key:"code-segment-".concat(i)})})}function QDe(e){return e&&typeof e.highlightAuto<"u"}function Nbt(e){var t=e.astGenerator,r=e.language,n=e.code,s=e.defaultCodeValue;if(QDe(t)){var i=kbt(t,r);return r==="text"?{value:s,language:"text"}:i?t.highlight(r,n):t.highlightAuto(n)}try{return r&&r!=="text"?{value:t.highlight(n,r)}:{value:s}}catch{return{value:s}}}function Rbt(e,t){return function(n){var s,i,o=n.language,a=n.children,l=n.style,c=l===void 0?t:l,u=n.customStyle,d=u===void 0?{}:u,p=n.codeTagProps,m=p===void 0?{className:o?"language-".concat(o):void 0,style:lg(lg({},c['code[class*="language-"]']),c['code[class*="language-'.concat(o,'"]')])}:p,g=n.useInlineStyles,v=g===void 0?!0:g,b=n.showLineNumbers,w=b===void 0?!1:b,S=n.showInlineLineNumbers,O=S===void 0?!0:S,k=n.startingLineNumber,C=k===void 0?1:k,T=n.lineNumberContainerStyle,P=n.lineNumberStyle,A=P===void 0?{}:P,R=n.wrapLines,M=n.wrapLongLines,z=M===void 0?!1:M,Q=n.lineProps,U=Q===void 0?{}:Q,L=n.renderer,V=n.PreTag,j=V===void 0?"pre":V,N=n.CodeTag,I=N===void 0?"code":N,H=n.code,B=H===void 0?(Array.isArray(a)?a[0]:a)||"":H,J=n.astGenerator,Z=mbt(n,Ebt);J=J||e;var F=w?me.createElement(Abt,{containerStyle:T,codeStyle:m.style||{},numberStyle:A,startingLineNumber:C,codeString:B}):null,W=c.hljs||c['pre[class*="language-"]']||{backgroundColor:"#fff"},K=QDe(J)?"hljs":"prismjs",se=v?Object.assign({},Z,{style:Object.assign({},W,d)}):Object.assign({},Z,{className:Z.className?"".concat(K," ").concat(Z.className):K,style:Object.assign({},d)});if(z?m.style=lg({whiteSpace:"pre-wrap"},m.style):m.style=lg({whiteSpace:"pre"},m.style),!J)return me.createElement(j,se,F,me.createElement(I,m,B));(R===void 0&&L||z)&&(R=!0),L=L||Ibt;var X=[{type:"text",value:B}],te=Nbt({astGenerator:J,language:o,code:B,defaultCodeValue:X});te.language===null&&(te.value=X);var de=(s=(i=B.match(/\n/g))===null||i===void 0?void 0:i.length)!==null&&s!==void 0?s:0,ue=C+de,Ae=$bt(te,R,U,w,O,C,ue,A,z);return me.createElement(j,se,me.createElement(I,m,!O&&F,L({rows:Ae,stylesheet:c,useInlineStyles:v})))}}function Qle(e,t,r,n,s,i,o){try{var a=e[i](o),l=a.value}catch(c){return void r(c)}a.done?t(l):Promise.resolve(l).then(n,s)}function ZDe(e){return function(){var t=this,r=arguments;return new Promise(function(n,s){var i=e.apply(t,r);function o(l){Qle(i,n,s,o,a,"next",l)}function a(l){Qle(i,n,s,o,a,"throw",l)}o(void 0)})}}function Mbt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zle(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,LDe(n.key),n)}}function jbt(e,t,r){return t&&Zle(e.prototype,t),r&&Zle(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Fbt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lbt(e,t){if(t&&(Hf(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fbt(e)}function BI(e){return BI=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},BI(e)}function oV(e,t){return oV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},oV(e,t)}function zbt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oV(e,t)}function aV(){aV=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,s=Object.defineProperty||function(j,N,I){j[N]=I.value},i=typeof Symbol=="function"?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(j,N,I){return Object.defineProperty(j,N,{value:I,enumerable:!0,configurable:!0,writable:!0}),j[N]}try{c({},"")}catch{c=function(I,H,B){return I[H]=B}}function u(j,N,I,H){var B=N&&N.prototype instanceof w?N:w,J=Object.create(B.prototype),Z=new L(H||[]);return s(J,"_invoke",{value:M(j,I,Z)}),J}function d(j,N,I){try{return{type:"normal",arg:j.call(N,I)}}catch(H){return{type:"throw",arg:H}}}t.wrap=u;var p="suspendedStart",m="suspendedYield",g="executing",v="completed",b={};function w(){}function S(){}function O(){}var k={};c(k,o,function(){return this});var C=Object.getPrototypeOf,T=C&&C(C(V([])));T&&T!==r&&n.call(T,o)&&(k=T);var P=O.prototype=w.prototype=Object.create(k);function A(j){["next","throw","return"].forEach(function(N){c(j,N,function(I){return this._invoke(N,I)})})}function R(j,N){function I(B,J,Z,F){var W=d(j[B],j,J);if(W.type!=="throw"){var K=W.arg,se=K.value;return se&&Hf(se)=="object"&&n.call(se,"__await")?N.resolve(se.__await).then(function(X){I("next",X,Z,F)},function(X){I("throw",X,Z,F)}):N.resolve(se).then(function(X){K.value=X,Z(K)},function(X){return I("throw",X,Z,F)})}F(W.arg)}var H;s(this,"_invoke",{value:function(J,Z){function F(){return new N(function(W,K){I(J,Z,W,K)})}return H=H?H.then(F,F):F()}})}function M(j,N,I){var H=p;return function(B,J){if(H===g)throw Error("Generator is already running");if(H===v){if(B==="throw")throw J;return{value:e,done:!0}}for(I.method=B,I.arg=J;;){var Z=I.delegate;if(Z){var F=z(Z,I);if(F){if(F===b)continue;return F}}if(I.method==="next")I.sent=I._sent=I.arg;else if(I.method==="throw"){if(H===p)throw H=v,I.arg;I.dispatchException(I.arg)}else I.method==="return"&&I.abrupt("return",I.arg);H=g;var W=d(j,N,I);if(W.type==="normal"){if(H=I.done?v:m,W.arg===b)continue;return{value:W.arg,done:I.done}}W.type==="throw"&&(H=v,I.method="throw",I.arg=W.arg)}}}function z(j,N){var I=N.method,H=j.iterator[I];if(H===e)return N.delegate=null,I==="throw"&&j.iterator.return&&(N.method="return",N.arg=e,z(j,N),N.method==="throw")||I!=="return"&&(N.method="throw",N.arg=new TypeError("The iterator does not provide a '"+I+"' method")),b;var B=d(H,j.iterator,N.arg);if(B.type==="throw")return N.method="throw",N.arg=B.arg,N.delegate=null,b;var J=B.arg;return J?J.done?(N[j.resultName]=J.value,N.next=j.nextLoc,N.method!=="return"&&(N.method="next",N.arg=e),N.delegate=null,b):J:(N.method="throw",N.arg=new TypeError("iterator result is not an object"),N.delegate=null,b)}function Q(j){var N={tryLoc:j[0]};1 in j&&(N.catchLoc=j[1]),2 in j&&(N.finallyLoc=j[2],N.afterLoc=j[3]),this.tryEntries.push(N)}function U(j){var N=j.completion||{};N.type="normal",delete N.arg,j.completion=N}function L(j){this.tryEntries=[{tryLoc:"root"}],j.forEach(Q,this),this.reset(!0)}function V(j){if(j||j===""){var N=j[o];if(N)return N.call(j);if(typeof j.next=="function")return j;if(!isNaN(j.length)){var I=-1,H=function B(){for(;++I<j.length;)if(n.call(j,I))return B.value=j[I],B.done=!1,B;return B.value=e,B.done=!0,B};return H.next=H}}throw new TypeError(Hf(j)+" is not iterable")}return S.prototype=O,s(P,"constructor",{value:O,configurable:!0}),s(O,"constructor",{value:S,configurable:!0}),S.displayName=c(O,l,"GeneratorFunction"),t.isGeneratorFunction=function(j){var N=typeof j=="function"&&j.constructor;return!!N&&(N===S||(N.displayName||N.name)==="GeneratorFunction")},t.mark=function(j){return Object.setPrototypeOf?Object.setPrototypeOf(j,O):(j.__proto__=O,c(j,l,"GeneratorFunction")),j.prototype=Object.create(P),j},t.awrap=function(j){return{__await:j}},A(R.prototype),c(R.prototype,a,function(){return this}),t.AsyncIterator=R,t.async=function(j,N,I,H,B){B===void 0&&(B=Promise);var J=new R(u(j,N,I,H),B);return t.isGeneratorFunction(N)?J:J.next().then(function(Z){return Z.done?Z.value:J.next()})},A(P),c(P,l,"Generator"),c(P,o,function(){return this}),c(P,"toString",function(){return"[object Generator]"}),t.keys=function(j){var N=Object(j),I=[];for(var H in N)I.push(H);return I.reverse(),function B(){for(;I.length;){var J=I.pop();if(J in N)return B.value=J,B.done=!1,B}return B.done=!0,B}},t.values=V,L.prototype={constructor:L,reset:function(N){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(U),!N)for(var I in this)I.charAt(0)==="t"&&n.call(this,I)&&!isNaN(+I.slice(1))&&(this[I]=e)},stop:function(){this.done=!0;var N=this.tryEntries[0].completion;if(N.type==="throw")throw N.arg;return this.rval},dispatchException:function(N){if(this.done)throw N;var I=this;function H(K,se){return Z.type="throw",Z.arg=N,I.next=K,se&&(I.method="next",I.arg=e),!!se}for(var B=this.tryEntries.length-1;B>=0;--B){var J=this.tryEntries[B],Z=J.completion;if(J.tryLoc==="root")return H("end");if(J.tryLoc<=this.prev){var F=n.call(J,"catchLoc"),W=n.call(J,"finallyLoc");if(F&&W){if(this.prev<J.catchLoc)return H(J.catchLoc,!0);if(this.prev<J.finallyLoc)return H(J.finallyLoc)}else if(F){if(this.prev<J.catchLoc)return H(J.catchLoc,!0)}else{if(!W)throw Error("try statement without catch or finally");if(this.prev<J.finallyLoc)return H(J.finallyLoc)}}}},abrupt:function(N,I){for(var H=this.tryEntries.length-1;H>=0;--H){var B=this.tryEntries[H];if(B.tryLoc<=this.prev&&n.call(B,"finallyLoc")&&this.prev<B.finallyLoc){var J=B;break}}J&&(N==="break"||N==="continue")&&J.tryLoc<=I&&I<=J.finallyLoc&&(J=null);var Z=J?J.completion:{};return Z.type=N,Z.arg=I,J?(this.method="next",this.next=J.finallyLoc,b):this.complete(Z)},complete:function(N,I){if(N.type==="throw")throw N.arg;return N.type==="break"||N.type==="continue"?this.next=N.arg:N.type==="return"?(this.rval=this.arg=N.arg,this.method="return",this.next="end"):N.type==="normal"&&I&&(this.next=I),b},finish:function(N){for(var I=this.tryEntries.length-1;I>=0;--I){var H=this.tryEntries[I];if(H.finallyLoc===N)return this.complete(H.completion,H.afterLoc),U(H),b}},catch:function(N){for(var I=this.tryEntries.length-1;I>=0;--I){var H=this.tryEntries[I];if(H.tryLoc===N){var B=H.completion;if(B.type==="throw"){var J=B.arg;U(H)}return J}}throw Error("illegal catch attempt")},delegateYield:function(N,I,H){return this.delegate={iterator:V(N),resultName:I,nextLoc:H},this.method==="next"&&(this.arg=e),b}},t}function Bbt(e,t,r){return t=BI(t),Lbt(e,qDe()?Reflect.construct(t,r||[],BI(e).constructor):t.apply(e,r))}function qDe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qDe=function(){return!!e})()}const Vbt=(function(e){var t,r=e.loader,n=e.isLanguageRegistered,s=e.registerLanguage,i=e.languageLoaders,o=e.noAsyncLoadingLanguages,a=(function(l){function c(){return Mbt(this,c),Bbt(this,c,arguments)}return zbt(c,l),jbt(c,[{key:"componentDidUpdate",value:function(){!c.isRegistered(this.props.language)&&i&&this.loadLanguage()}},{key:"componentDidMount",value:function(){var d=this;c.astGeneratorPromise||c.loadAstGenerator(),c.astGenerator||c.astGeneratorPromise.then(function(){d.forceUpdate()}),!c.isRegistered(this.props.language)&&i&&this.loadLanguage()}},{key:"loadLanguage",value:function(){var d=this,p=this.props.language;p!=="text"&&c.loadLanguage(p).then(function(){return d.forceUpdate()}).catch(function(){})}},{key:"normalizeLanguage",value:function(d){return c.isSupportedLanguage(d)?d:"text"}},{key:"render",value:function(){return me.createElement(c.highlightInstance,Cd({},this.props,{language:this.normalizeLanguage(this.props.language),astGenerator:c.astGenerator}))}}],[{key:"preload",value:function(){return c.loadAstGenerator()}},{key:"loadLanguage",value:(function(){var u=ZDe(aV().mark(function p(m){var g;return aV().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(g=i[m],typeof g!="function"){b.next=5;break}return b.abrupt("return",g(c.registerLanguage));case 5:throw new Error("Language ".concat(m," not supported"));case 6:case"end":return b.stop()}},p)}));function d(p){return u.apply(this,arguments)}return d})()},{key:"isSupportedLanguage",value:function(d){return c.isRegistered(d)||typeof i[d]=="function"}},{key:"loadAstGenerator",value:function(){return c.astGeneratorPromise=r().then(function(d){c.astGenerator=d,s&&c.languages.forEach(function(p,m){return s(d,m,p)})}),c.astGeneratorPromise}}])})(me.PureComponent);return t=a,lh(a,"astGenerator",null),lh(a,"highlightInstance",Rbt(null,{})),lh(a,"astGeneratorPromise",null),lh(a,"languages",new Map),lh(a,"supportedLanguages",e.supportedLanguages||Object.keys(i||{})),lh(a,"isRegistered",function(l){if(o)return!0;if(!s)throw new Error("Current syntax highlighter doesn't support registration of languages");return t.astGenerator?n(t.astGenerator,l):t.languages.has(l)}),lh(a,"registerLanguage",function(l,c){if(!s)throw new Error("Current syntax highlighter doesn't support registration of languages");if(t.astGenerator)return s(t.astGenerator,l,c);t.languages.set(l,c)}),a});function lV(){lV=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,s=Object.defineProperty||function(j,N,I){j[N]=I.value},i=typeof Symbol=="function"?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(j,N,I){return Object.defineProperty(j,N,{value:I,enumerable:!0,configurable:!0,writable:!0}),j[N]}try{c({},"")}catch{c=function(I,H,B){return I[H]=B}}function u(j,N,I,H){var B=N&&N.prototype instanceof w?N:w,J=Object.create(B.prototype),Z=new L(H||[]);return s(J,"_invoke",{value:M(j,I,Z)}),J}function d(j,N,I){try{return{type:"normal",arg:j.call(N,I)}}catch(H){return{type:"throw",arg:H}}}t.wrap=u;var p="suspendedStart",m="suspendedYield",g="executing",v="completed",b={};function w(){}function S(){}function O(){}var k={};c(k,o,function(){return this});var C=Object.getPrototypeOf,T=C&&C(C(V([])));T&&T!==r&&n.call(T,o)&&(k=T);var P=O.prototype=w.prototype=Object.create(k);function A(j){["next","throw","return"].forEach(function(N){c(j,N,function(I){return this._invoke(N,I)})})}function R(j,N){function I(B,J,Z,F){var W=d(j[B],j,J);if(W.type!=="throw"){var K=W.arg,se=K.value;return se&&Hf(se)=="object"&&n.call(se,"__await")?N.resolve(se.__await).then(function(X){I("next",X,Z,F)},function(X){I("throw",X,Z,F)}):N.resolve(se).then(function(X){K.value=X,Z(K)},function(X){return I("throw",X,Z,F)})}F(W.arg)}var H;s(this,"_invoke",{value:function(J,Z){function F(){return new N(function(W,K){I(J,Z,W,K)})}return H=H?H.then(F,F):F()}})}function M(j,N,I){var H=p;return function(B,J){if(H===g)throw Error("Generator is already running");if(H===v){if(B==="throw")throw J;return{value:e,done:!0}}for(I.method=B,I.arg=J;;){var Z=I.delegate;if(Z){var F=z(Z,I);if(F){if(F===b)continue;return F}}if(I.method==="next")I.sent=I._sent=I.arg;else if(I.method==="throw"){if(H===p)throw H=v,I.arg;I.dispatchException(I.arg)}else I.method==="return"&&I.abrupt("return",I.arg);H=g;var W=d(j,N,I);if(W.type==="normal"){if(H=I.done?v:m,W.arg===b)continue;return{value:W.arg,done:I.done}}W.type==="throw"&&(H=v,I.method="throw",I.arg=W.arg)}}}function z(j,N){var I=N.method,H=j.iterator[I];if(H===e)return N.delegate=null,I==="throw"&&j.iterator.return&&(N.method="return",N.arg=e,z(j,N),N.method==="throw")||I!=="return"&&(N.method="throw",N.arg=new TypeError("The iterator does not provide a '"+I+"' method")),b;var B=d(H,j.iterator,N.arg);if(B.type==="throw")return N.method="throw",N.arg=B.arg,N.delegate=null,b;var J=B.arg;return J?J.done?(N[j.resultName]=J.value,N.next=j.nextLoc,N.method!=="return"&&(N.method="next",N.arg=e),N.delegate=null,b):J:(N.method="throw",N.arg=new TypeError("iterator result is not an object"),N.delegate=null,b)}function Q(j){var N={tryLoc:j[0]};1 in j&&(N.catchLoc=j[1]),2 in j&&(N.finallyLoc=j[2],N.afterLoc=j[3]),this.tryEntries.push(N)}function U(j){var N=j.completion||{};N.type="normal",delete N.arg,j.completion=N}function L(j){this.tryEntries=[{tryLoc:"root"}],j.forEach(Q,this),this.reset(!0)}function V(j){if(j||j===""){var N=j[o];if(N)return N.call(j);if(typeof j.next=="function")return j;if(!isNaN(j.length)){var I=-1,H=function B(){for(;++I<j.length;)if(n.call(j,I))return B.value=j[I],B.done=!1,B;return B.value=e,B.done=!0,B};return H.next=H}}throw new TypeError(Hf(j)+" is not iterable")}return S.prototype=O,s(P,"constructor",{value:O,configurable:!0}),s(O,"constructor",{value:S,configurable:!0}),S.displayName=c(O,l,"GeneratorFunction"),t.isGeneratorFunction=function(j){var N=typeof j=="function"&&j.constructor;return!!N&&(N===S||(N.displayName||N.name)==="GeneratorFunction")},t.mark=function(j){return Object.setPrototypeOf?Object.setPrototypeOf(j,O):(j.__proto__=O,c(j,l,"GeneratorFunction")),j.prototype=Object.create(P),j},t.awrap=function(j){return{__await:j}},A(R.prototype),c(R.prototype,a,function(){return this}),t.AsyncIterator=R,t.async=function(j,N,I,H,B){B===void 0&&(B=Promise);var J=new R(u(j,N,I,H),B);return t.isGeneratorFunction(N)?J:J.next().then(function(Z){return Z.done?Z.value:J.next()})},A(P),c(P,l,"Generator"),c(P,o,function(){return this}),c(P,"toString",function(){return"[object Generator]"}),t.keys=function(j){var N=Object(j),I=[];for(var H in N)I.push(H);return I.reverse(),function B(){for(;I.length;){var J=I.pop();if(J in N)return B.value=J,B.done=!1,B}return B.done=!0,B}},t.values=V,L.prototype={constructor:L,reset:function(N){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(U),!N)for(var I in this)I.charAt(0)==="t"&&n.call(this,I)&&!isNaN(+I.slice(1))&&(this[I]=e)},stop:function(){this.done=!0;var N=this.tryEntries[0].completion;if(N.type==="throw")throw N.arg;return this.rval},dispatchException:function(N){if(this.done)throw N;var I=this;function H(K,se){return Z.type="throw",Z.arg=N,I.next=K,se&&(I.method="next",I.arg=e),!!se}for(var B=this.tryEntries.length-1;B>=0;--B){var J=this.tryEntries[B],Z=J.completion;if(J.tryLoc==="root")return H("end");if(J.tryLoc<=this.prev){var F=n.call(J,"catchLoc"),W=n.call(J,"finallyLoc");if(F&&W){if(this.prev<J.catchLoc)return H(J.catchLoc,!0);if(this.prev<J.finallyLoc)return H(J.finallyLoc)}else if(F){if(this.prev<J.catchLoc)return H(J.catchLoc,!0)}else{if(!W)throw Error("try statement without catch or finally");if(this.prev<J.finallyLoc)return H(J.finallyLoc)}}}},abrupt:function(N,I){for(var H=this.tryEntries.length-1;H>=0;--H){var B=this.tryEntries[H];if(B.tryLoc<=this.prev&&n.call(B,"finallyLoc")&&this.prev<B.finallyLoc){var J=B;break}}J&&(N==="break"||N==="continue")&&J.tryLoc<=I&&I<=J.finallyLoc&&(J=null);var Z=J?J.completion:{};return Z.type=N,Z.arg=I,J?(this.method="next",this.next=J.finallyLoc,b):this.complete(Z)},complete:function(N,I){if(N.type==="throw")throw N.arg;return N.type==="break"||N.type==="continue"?this.next=N.arg:N.type==="return"?(this.rval=this.arg=N.arg,this.method="return",this.next="end"):N.type==="normal"&&I&&(this.next=I),b},finish:function(N){for(var I=this.tryEntries.length-1;I>=0;--I){var H=this.tryEntries[I];if(H.finallyLoc===N)return this.complete(H.completion,H.afterLoc),U(H),b}},catch:function(N){for(var I=this.tryEntries.length-1;I>=0;--I){var H=this.tryEntries[I];if(H.tryLoc===N){var B=H.completion;if(B.type==="throw"){var J=B.arg;U(H)}return J}}throw Error("illegal catch attempt")},delegateYield:function(N,I,H){return this.delegate={iterator:V(N),resultName:I,nextLoc:H},this.method==="next"&&(this.arg=e),b}},t}const ie=(function(e,t){return(function(){var r=ZDe(lV().mark(function n(s){var i;return lV().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,t();case 2:i=a.sent,s(e,i.default||i);case 4:case"end":return a.stop()}},n)}));return function(n){return r.apply(this,arguments)}})()}),Ubt={abap:ie("abap",function(){return G(()=>import("./abap-DVU-ofbM.js").then(e=>e.a),[],import.meta.url)}),abnf:ie("abnf",function(){return G(()=>import("./abnf-Da_wzX5p.js").then(e=>e.a),[],import.meta.url)}),actionscript:ie("actionscript",function(){return G(()=>import("./actionscript--riGP-zJ.js").then(e=>e.a),[],import.meta.url)}),ada:ie("ada",function(){return G(()=>import("./ada-B9GTh25F.js").then(e=>e.a),[],import.meta.url)}),agda:ie("agda",function(){return G(()=>import("./agda-DKRYW57V.js").then(e=>e.a),[],import.meta.url)}),al:ie("al",function(){return G(()=>import("./al-DCJrjpkj.js").then(e=>e.a),[],import.meta.url)}),antlr4:ie("antlr4",function(){return G(()=>import("./antlr4-DRXg42oz.js").then(e=>e.a),[],import.meta.url)}),apacheconf:ie("apacheconf",function(){return G(()=>import("./apacheconf-DjmQa1Zk.js").then(e=>e.a),[],import.meta.url)}),apex:ie("apex",function(){return G(()=>import("./apex-Bf78Wtcr.js").then(e=>e.a),__vite__mapDeps([0,1]),import.meta.url)}),apl:ie("apl",function(){return G(()=>import("./apl-3p2LbP5y.js").then(e=>e.a),[],import.meta.url)}),applescript:ie("applescript",function(){return G(()=>import("./applescript-GS7YwJ8l.js").then(e=>e.a),[],import.meta.url)}),aql:ie("aql",function(){return G(()=>import("./aql-CsjwPKZq.js").then(e=>e.a),[],import.meta.url)}),arduino:ie("arduino",function(){return G(()=>import("./arduino-CRCMXEMi.js").then(e=>e.a),__vite__mapDeps([2,3,4]),import.meta.url)}),arff:ie("arff",function(){return G(()=>import("./arff-DWJwlhTd.js").then(e=>e.a),[],import.meta.url)}),asciidoc:ie("asciidoc",function(){return G(()=>import("./asciidoc-CDPcK3Wm.js").then(e=>e.a),[],import.meta.url)}),asm6502:ie("asm6502",function(){return G(()=>import("./asm6502-B9F-fxOb.js").then(e=>e.a),[],import.meta.url)}),asmatmel:ie("asmatmel",function(){return G(()=>import("./asmatmel-DWABos8u.js").then(e=>e.a),[],import.meta.url)}),aspnet:ie("aspnet",function(){return G(()=>import("./aspnet-D_QFSJhV.js").then(e=>e.a),__vite__mapDeps([5,6]),import.meta.url)}),autohotkey:ie("autohotkey",function(){return G(()=>import("./autohotkey-_yEqGigm.js").then(e=>e.a),[],import.meta.url)}),autoit:ie("autoit",function(){return G(()=>import("./autoit-RsXUmjUX.js").then(e=>e.a),[],import.meta.url)}),avisynth:ie("avisynth",function(){return G(()=>import("./avisynth-BFBG-FML.js").then(e=>e.a),[],import.meta.url)}),avroIdl:ie("avroIdl",function(){return G(()=>import("./avro-idl-BRv2_ktP.js").then(e=>e.a),[],import.meta.url)}),bash:ie("bash",function(){return G(()=>import("./bash-C_hNVE7G.js").then(e=>e.b),__vite__mapDeps([7,8]),import.meta.url)}),basic:ie("basic",function(){return G(()=>import("./basic-CRyKmNKD.js").then(e=>e.b),__vite__mapDeps([9,10]),import.meta.url)}),batch:ie("batch",function(){return G(()=>import("./batch-CkRKj7ZM.js").then(e=>e.b),[],import.meta.url)}),bbcode:ie("bbcode",function(){return G(()=>import("./bbcode-CV4D0YDt.js").then(e=>e.b),[],import.meta.url)}),bicep:ie("bicep",function(){return G(()=>import("./bicep-40DlwBUv.js").then(e=>e.b),[],import.meta.url)}),birb:ie("birb",function(){return G(()=>import("./birb-CpXJCW6U.js").then(e=>e.b),[],import.meta.url)}),bison:ie("bison",function(){return G(()=>import("./bison-CMDPnogF.js").then(e=>e.b),__vite__mapDeps([11,4]),import.meta.url)}),bnf:ie("bnf",function(){return G(()=>import("./bnf-Da_6ItkH.js").then(e=>e.b),[],import.meta.url)}),brainfuck:ie("brainfuck",function(){return G(()=>import("./brainfuck-T7HwKFjM.js").then(e=>e.b),[],import.meta.url)}),brightscript:ie("brightscript",function(){return G(()=>import("./brightscript-C7J4Nr9Q.js").then(e=>e.b),[],import.meta.url)}),bro:ie("bro",function(){return G(()=>import("./bro-D6vBXdtC.js").then(e=>e.b),[],import.meta.url)}),bsl:ie("bsl",function(){return G(()=>import("./bsl-k_gTB0Le.js").then(e=>e.b),[],import.meta.url)}),c:ie("c",function(){return G(()=>import("./c-DBQxp504.js").then(e=>e.c),__vite__mapDeps([12,4]),import.meta.url)}),cfscript:ie("cfscript",function(){return G(()=>import("./cfscript-rlyZf9pm.js").then(e=>e.c),[],import.meta.url)}),chaiscript:ie("chaiscript",function(){return G(()=>import("./chaiscript-BlW62OoP.js").then(e=>e.c),__vite__mapDeps([13,3,4]),import.meta.url)}),cil:ie("cil",function(){return G(()=>import("./cil-B5hufUJA.js").then(e=>e.c),[],import.meta.url)}),clike:ie("clike",function(){return G(()=>import("./clike-B5SB4vO2.js").then(e=>e.c),__vite__mapDeps([14,15]),import.meta.url)}),clojure:ie("clojure",function(){return G(()=>import("./clojure-DiO-udpv.js").then(e=>e.c),[],import.meta.url)}),cmake:ie("cmake",function(){return G(()=>import("./cmake-BvYjy735.js").then(e=>e.c),[],import.meta.url)}),cobol:ie("cobol",function(){return G(()=>import("./cobol-CINUQt_M.js").then(e=>e.c),[],import.meta.url)}),coffeescript:ie("coffeescript",function(){return G(()=>import("./coffeescript-BA5ml6_3.js").then(e=>e.c),[],import.meta.url)}),concurnas:ie("concurnas",function(){return G(()=>import("./concurnas-BPYO7IaU.js").then(e=>e.c),[],import.meta.url)}),coq:ie("coq",function(){return G(()=>import("./coq-DzH5AepQ.js").then(e=>e.c),[],import.meta.url)}),cpp:ie("cpp",function(){return G(()=>import("./cpp-D5uvEtNZ.js").then(e=>e.c),__vite__mapDeps([16,3,4]),import.meta.url)}),crystal:ie("crystal",function(){return G(()=>import("./crystal-C2RXXfYu.js").then(e=>e.c),__vite__mapDeps([17,18]),import.meta.url)}),csharp:ie("csharp",function(){return G(()=>import("./csharp-Cz6i68UO.js").then(e=>e.c),__vite__mapDeps([19,6]),import.meta.url)}),cshtml:ie("cshtml",function(){return G(()=>import("./cshtml-S_c0BAX_.js").then(e=>e.c),__vite__mapDeps([20,6]),import.meta.url)}),csp:ie("csp",function(){return G(()=>import("./csp-DUhugXqP.js").then(e=>e.c),[],import.meta.url)}),cssExtras:ie("cssExtras",function(){return G(()=>import("./css-extras-FkenCC1V.js").then(e=>e.c),[],import.meta.url)}),css:ie("css",function(){return G(()=>import("./css-BeiCa0aq.js").then(e=>e.c),__vite__mapDeps([21,22]),import.meta.url)}),csv:ie("csv",function(){return G(()=>import("./csv-B44Rcmvq.js").then(e=>e.c),[],import.meta.url)}),cypher:ie("cypher",function(){return G(()=>import("./cypher-BXkM4IT4.js").then(e=>e.c),[],import.meta.url)}),d:ie("d",function(){return G(()=>import("./d-BoFrnxdw.js").then(e=>e.d),[],import.meta.url)}),dart:ie("dart",function(){return G(()=>import("./dart-BT4h9m-a.js").then(e=>e.d),[],import.meta.url)}),dataweave:ie("dataweave",function(){return G(()=>import("./dataweave-DhPyKDVS.js").then(e=>e.d),[],import.meta.url)}),dax:ie("dax",function(){return G(()=>import("./dax-Bywh8rcF.js").then(e=>e.d),[],import.meta.url)}),dhall:ie("dhall",function(){return G(()=>import("./dhall-B0PbZHVJ.js").then(e=>e.d),[],import.meta.url)}),diff:ie("diff",function(){return G(()=>import("./diff-CzJZo9jr.js").then(e=>e.d),[],import.meta.url)}),django:ie("django",function(){return G(()=>import("./django-DC0hqXDy.js").then(e=>e.d),__vite__mapDeps([23,24]),import.meta.url)}),dnsZoneFile:ie("dnsZoneFile",function(){return G(()=>import("./dns-zone-file-BDko0hWU.js").then(e=>e.d),[],import.meta.url)}),docker:ie("docker",function(){return G(()=>import("./docker-BtL8_hUo.js").then(e=>e.d),[],import.meta.url)}),dot:ie("dot",function(){return G(()=>import("./dot-CiHoXELh.js").then(e=>e.d),[],import.meta.url)}),ebnf:ie("ebnf",function(){return G(()=>import("./ebnf-Bx_UFIWA.js").then(e=>e.e),[],import.meta.url)}),editorconfig:ie("editorconfig",function(){return G(()=>import("./editorconfig-BfRJwb48.js").then(e=>e.e),[],import.meta.url)}),eiffel:ie("eiffel",function(){return G(()=>import("./eiffel-DLByY_pS.js").then(e=>e.e),[],import.meta.url)}),ejs:ie("ejs",function(){return G(()=>import("./ejs-DIbOzUlF.js").then(e=>e.e),__vite__mapDeps([25,24]),import.meta.url)}),elixir:ie("elixir",function(){return G(()=>import("./elixir-Bi2R_h_x.js").then(e=>e.e),[],import.meta.url)}),elm:ie("elm",function(){return G(()=>import("./elm-D_VD4ZOp.js").then(e=>e.e),[],import.meta.url)}),erb:ie("erb",function(){return G(()=>import("./erb-D_EXn0DN.js").then(e=>e.e),__vite__mapDeps([26,18,24]),import.meta.url)}),erlang:ie("erlang",function(){return G(()=>import("./erlang-Bu77bU_K.js").then(e=>e.e),[],import.meta.url)}),etlua:ie("etlua",function(){return G(()=>import("./etlua-BFFGhY-Z.js").then(e=>e.e),__vite__mapDeps([27,28,24]),import.meta.url)}),excelFormula:ie("excelFormula",function(){return G(()=>import("./excel-formula-f4K7jnHq.js").then(e=>e.e),[],import.meta.url)}),factor:ie("factor",function(){return G(()=>import("./factor-B8vabn_x.js").then(e=>e.f),[],import.meta.url)}),falselang:ie("falselang",function(){return G(()=>import("./false-BdyrKSsM.js").then(e=>e._),[],import.meta.url)}),firestoreSecurityRules:ie("firestoreSecurityRules",function(){return G(()=>import("./firestore-security-rules-Ck8l8MrW.js").then(e=>e.f),[],import.meta.url)}),flow:ie("flow",function(){return G(()=>import("./flow-CVxRkGDU.js").then(e=>e.f),[],import.meta.url)}),fortran:ie("fortran",function(){return G(()=>import("./fortran-DHK41TlN.js").then(e=>e.f),[],import.meta.url)}),fsharp:ie("fsharp",function(){return G(()=>import("./fsharp-AP1QXbiZ.js").then(e=>e.f),[],import.meta.url)}),ftl:ie("ftl",function(){return G(()=>import("./ftl-DxopztnG.js").then(e=>e.f),__vite__mapDeps([29,24]),import.meta.url)}),gap:ie("gap",function(){return G(()=>import("./gap-DNAq7wcM.js").then(e=>e.g),[],import.meta.url)}),gcode:ie("gcode",function(){return G(()=>import("./gcode-BEkcwFqs.js").then(e=>e.g),[],import.meta.url)}),gdscript:ie("gdscript",function(){return G(()=>import("./gdscript-D3MrQB3A.js").then(e=>e.g),[],import.meta.url)}),gedcom:ie("gedcom",function(){return G(()=>import("./gedcom-D2xe_i6p.js").then(e=>e.g),[],import.meta.url)}),gherkin:ie("gherkin",function(){return G(()=>import("./gherkin-CfD7h3px.js").then(e=>e.g),[],import.meta.url)}),git:ie("git",function(){return G(()=>import("./git-Cwq_cahj.js").then(e=>e.g),[],import.meta.url)}),glsl:ie("glsl",function(){return G(()=>import("./glsl-D0CcO2Td.js").then(e=>e.g),__vite__mapDeps([30,4]),import.meta.url)}),gml:ie("gml",function(){return G(()=>import("./gml-D8d_W44x.js").then(e=>e.g),[],import.meta.url)}),gn:ie("gn",function(){return G(()=>import("./gn-CbO48UZX.js").then(e=>e.g),[],import.meta.url)}),goModule:ie("goModule",function(){return G(()=>import("./go-module-BPhqAln4.js").then(e=>e.g),[],import.meta.url)}),go:ie("go",function(){return G(()=>import("./go-wqlRrtGA.js").then(e=>e.g),[],import.meta.url)}),graphql:ie("graphql",function(){return G(()=>import("./graphql-DS8lBS8q.js").then(e=>e.g),[],import.meta.url)}),groovy:ie("groovy",function(){return G(()=>import("./groovy-yCLF92cg.js").then(e=>e.g),[],import.meta.url)}),haml:ie("haml",function(){return G(()=>import("./haml-C2D_wcSJ.js").then(e=>e.h),__vite__mapDeps([31,18]),import.meta.url)}),handlebars:ie("handlebars",function(){return G(()=>import("./handlebars-BJmaPf4W.js").then(e=>e.h),__vite__mapDeps([32,24]),import.meta.url)}),haskell:ie("haskell",function(){return G(()=>import("./haskell-Db91ltIz.js").then(e=>e.h),__vite__mapDeps([33,34]),import.meta.url)}),haxe:ie("haxe",function(){return G(()=>import("./haxe-DtQpabsz.js").then(e=>e.h),[],import.meta.url)}),hcl:ie("hcl",function(){return G(()=>import("./hcl-CbacBelw.js").then(e=>e.h),[],import.meta.url)}),hlsl:ie("hlsl",function(){return G(()=>import("./hlsl-e6zZVoMh.js").then(e=>e.h),__vite__mapDeps([35,4]),import.meta.url)}),hoon:ie("hoon",function(){return G(()=>import("./hoon-CAqp0j78.js").then(e=>e.h),[],import.meta.url)}),hpkp:ie("hpkp",function(){return G(()=>import("./hpkp-BOaZa6mB.js").then(e=>e.h),[],import.meta.url)}),hsts:ie("hsts",function(){return G(()=>import("./hsts-TD6vgckh.js").then(e=>e.h),[],import.meta.url)}),http:ie("http",function(){return G(()=>import("./http-BlYRAYrd.js").then(e=>e.h),[],import.meta.url)}),ichigojam:ie("ichigojam",function(){return G(()=>import("./ichigojam-DVXXE57k.js").then(e=>e.i),[],import.meta.url)}),icon:ie("icon",function(){return G(()=>import("./icon-CBwNKgiU.js").then(e=>e.i),[],import.meta.url)}),icuMessageFormat:ie("icuMessageFormat",function(){return G(()=>import("./icu-message-format-CTXlEXJ_.js").then(e=>e.i),[],import.meta.url)}),idris:ie("idris",function(){return G(()=>import("./idris-CKV_ZHev.js").then(e=>e.i),__vite__mapDeps([36,34]),import.meta.url)}),iecst:ie("iecst",function(){return G(()=>import("./iecst-CWKVHx8I.js").then(e=>e.i),[],import.meta.url)}),ignore:ie("ignore",function(){return G(()=>import("./ignore-BX-NgcSW.js").then(e=>e.i),[],import.meta.url)}),inform7:ie("inform7",function(){return G(()=>import("./inform7-BdOciMok.js").then(e=>e.i),[],import.meta.url)}),ini:ie("ini",function(){return G(()=>import("./ini-CeRgq-XD.js").then(e=>e.i),[],import.meta.url)}),io:ie("io",function(){return G(()=>import("./io-DzCODMZd.js").then(e=>e.i),[],import.meta.url)}),j:ie("j",function(){return G(()=>import("./j-DglnaoKA.js").then(e=>e.j),[],import.meta.url)}),java:ie("java",function(){return G(()=>import("./java-BXNdL3_O.js").then(e=>e.j),__vite__mapDeps([37,38]),import.meta.url)}),javadoc:ie("javadoc",function(){return G(()=>import("./javadoc-C2hj9616.js").then(e=>e.j),__vite__mapDeps([39,38,40]),import.meta.url)}),javadoclike:ie("javadoclike",function(){return G(()=>import("./javadoclike-CU_5SYEF.js").then(e=>e.j),__vite__mapDeps([41,40]),import.meta.url)}),javascript:ie("javascript",function(){return G(()=>import("./javascript-CFpiL51s.js").then(e=>e.j),__vite__mapDeps([42,43]),import.meta.url)}),javastacktrace:ie("javastacktrace",function(){return G(()=>import("./javastacktrace-1hzn-skp.js").then(e=>e.j),[],import.meta.url)}),jexl:ie("jexl",function(){return G(()=>import("./jexl-rksmWFIv.js").then(e=>e.j),[],import.meta.url)}),jolie:ie("jolie",function(){return G(()=>import("./jolie-BTgzxBGF.js").then(e=>e.j),[],import.meta.url)}),jq:ie("jq",function(){return G(()=>import("./jq-LwC475l-.js").then(e=>e.j),[],import.meta.url)}),jsExtras:ie("jsExtras",function(){return G(()=>import("./js-extras-Dq1IQqJz.js").then(e=>e.j),[],import.meta.url)}),jsTemplates:ie("jsTemplates",function(){return G(()=>import("./js-templates-CIizD0dy.js").then(e=>e.j),[],import.meta.url)}),jsdoc:ie("jsdoc",function(){return G(()=>import("./jsdoc-BvfZSEIj.js").then(e=>e.j),__vite__mapDeps([44,40,45]),import.meta.url)}),json:ie("json",function(){return G(()=>import("./json-CpoNWqhD.js").then(e=>e.j),__vite__mapDeps([46,47]),import.meta.url)}),json5:ie("json5",function(){return G(()=>import("./json5-4YDdKCjg.js").then(e=>e.j),__vite__mapDeps([48,47]),import.meta.url)}),jsonp:ie("jsonp",function(){return G(()=>import("./jsonp-B9RN6rNt.js").then(e=>e.j),__vite__mapDeps([49,47]),import.meta.url)}),jsstacktrace:ie("jsstacktrace",function(){return G(()=>import("./jsstacktrace-Bdkpzn9x.js").then(e=>e.j),[],import.meta.url)}),jsx:ie("jsx",function(){return G(()=>import("./jsx-Ce6r0QDB.js").then(e=>e.j),__vite__mapDeps([50,51]),import.meta.url)}),julia:ie("julia",function(){return G(()=>import("./julia-BthWUGeW.js").then(e=>e.j),[],import.meta.url)}),keepalived:ie("keepalived",function(){return G(()=>import("./keepalived-CVPMyTyQ.js").then(e=>e.k),[],import.meta.url)}),keyman:ie("keyman",function(){return G(()=>import("./keyman-DtsZcO8D.js").then(e=>e.k),[],import.meta.url)}),kotlin:ie("kotlin",function(){return G(()=>import("./kotlin-D3Y9uj4Z.js").then(e=>e.k),[],import.meta.url)}),kumir:ie("kumir",function(){return G(()=>import("./kumir-CPOJ0tSZ.js").then(e=>e.k),[],import.meta.url)}),kusto:ie("kusto",function(){return G(()=>import("./kusto-C1HNQLhw.js").then(e=>e.k),[],import.meta.url)}),latex:ie("latex",function(){return G(()=>import("./latex-CUckh63h.js").then(e=>e.l),[],import.meta.url)}),latte:ie("latte",function(){return G(()=>import("./latte-a2qg_yKy.js").then(e=>e.l),__vite__mapDeps([52,24,53]),import.meta.url)}),less:ie("less",function(){return G(()=>import("./less-Cd_iHyqE.js").then(e=>e.l),[],import.meta.url)}),lilypond:ie("lilypond",function(){return G(()=>import("./lilypond-B8hVJI5I.js").then(e=>e.l),__vite__mapDeps([54,55]),import.meta.url)}),liquid:ie("liquid",function(){return G(()=>import("./liquid-5G90bCFj.js").then(e=>e.l),__vite__mapDeps([56,24]),import.meta.url)}),lisp:ie("lisp",function(){return G(()=>import("./lisp-DSOgflCq.js").then(e=>e.l),[],import.meta.url)}),livescript:ie("livescript",function(){return G(()=>import("./livescript-DZJcluwV.js").then(e=>e.l),[],import.meta.url)}),llvm:ie("llvm",function(){return G(()=>import("./llvm-DojEBdwB.js").then(e=>e.l),[],import.meta.url)}),log:ie("log",function(){return G(()=>import("./log-Cd7KinAa.js").then(e=>e.l),[],import.meta.url)}),lolcode:ie("lolcode",function(){return G(()=>import("./lolcode-DX9zAWw1.js").then(e=>e.l),[],import.meta.url)}),lua:ie("lua",function(){return G(()=>import("./lua-C8cShngG.js").then(e=>e.l),__vite__mapDeps([57,28]),import.meta.url)}),magma:ie("magma",function(){return G(()=>import("./magma-COS_CW3Z.js").then(e=>e.m),[],import.meta.url)}),makefile:ie("makefile",function(){return G(()=>import("./makefile-ORwm4Dxo.js").then(e=>e.m),[],import.meta.url)}),markdown:ie("markdown",function(){return G(()=>import("./markdown-CxyFHfrN.js").then(e=>e.m),[],import.meta.url)}),markupTemplating:ie("markupTemplating",function(){return G(()=>import("./markup-templating-DIsW9U8u.js").then(e=>e.m),__vite__mapDeps([58,24]),import.meta.url)}),markup:ie("markup",function(){return G(()=>import("./markup-Bxhiqoiv.js").then(e=>e.m),__vite__mapDeps([59,60]),import.meta.url)}),matlab:ie("matlab",function(){return G(()=>import("./matlab-rRh44SMn.js").then(e=>e.m),[],import.meta.url)}),maxscript:ie("maxscript",function(){return G(()=>import("./maxscript-v-vMqCOK.js").then(e=>e.m),[],import.meta.url)}),mel:ie("mel",function(){return G(()=>import("./mel-DVtn-zLf.js").then(e=>e.m),[],import.meta.url)}),mermaid:ie("mermaid",function(){return G(()=>import("./mermaid-Ux-WLZnN.js").then(e=>e.m),[],import.meta.url)}),mizar:ie("mizar",function(){return G(()=>import("./mizar-dqohFMx8.js").then(e=>e.m),[],import.meta.url)}),mongodb:ie("mongodb",function(){return G(()=>import("./mongodb-fK_-f4CD.js").then(e=>e.m),[],import.meta.url)}),monkey:ie("monkey",function(){return G(()=>import("./monkey-DTNMXJ5-.js").then(e=>e.m),[],import.meta.url)}),moonscript:ie("moonscript",function(){return G(()=>import("./moonscript-DKopagrx.js").then(e=>e.m),[],import.meta.url)}),n1ql:ie("n1ql",function(){return G(()=>import("./n1ql-lpQ_cspy.js").then(e=>e.n),[],import.meta.url)}),n4js:ie("n4js",function(){return G(()=>import("./n4js-Bx5Z4KrV.js").then(e=>e.n),[],import.meta.url)}),nand2tetrisHdl:ie("nand2tetrisHdl",function(){return G(()=>import("./nand2tetris-hdl-BdTMRXcX.js").then(e=>e.n),[],import.meta.url)}),naniscript:ie("naniscript",function(){return G(()=>import("./naniscript-BclpQnt-.js").then(e=>e.n),[],import.meta.url)}),nasm:ie("nasm",function(){return G(()=>import("./nasm-C6cNE2oB.js").then(e=>e.n),[],import.meta.url)}),neon:ie("neon",function(){return G(()=>import("./neon-CXy4pjE-.js").then(e=>e.n),[],import.meta.url)}),nevod:ie("nevod",function(){return G(()=>import("./nevod-ChY3OBYE.js").then(e=>e.n),[],import.meta.url)}),nginx:ie("nginx",function(){return G(()=>import("./nginx-BDtTo2o_.js").then(e=>e.n),[],import.meta.url)}),nim:ie("nim",function(){return G(()=>import("./nim-SJx4qRTA.js").then(e=>e.n),[],import.meta.url)}),nix:ie("nix",function(){return G(()=>import("./nix-CXEVkUTZ.js").then(e=>e.n),[],import.meta.url)}),nsis:ie("nsis",function(){return G(()=>import("./nsis-ChqUTN3_.js").then(e=>e.n),[],import.meta.url)}),objectivec:ie("objectivec",function(){return G(()=>import("./objectivec-Bif_Vq9x.js").then(e=>e.o),__vite__mapDeps([61,4]),import.meta.url)}),ocaml:ie("ocaml",function(){return G(()=>import("./ocaml-BsfIKJGt.js").then(e=>e.o),[],import.meta.url)}),opencl:ie("opencl",function(){return G(()=>import("./opencl-DjXC2MGY.js").then(e=>e.o),__vite__mapDeps([62,4]),import.meta.url)}),openqasm:ie("openqasm",function(){return G(()=>import("./openqasm-7hKOwGQD.js").then(e=>e.o),[],import.meta.url)}),oz:ie("oz",function(){return G(()=>import("./oz-CTS5SQXW.js").then(e=>e.o),[],import.meta.url)}),parigp:ie("parigp",function(){return G(()=>import("./parigp-SK80Nczo.js").then(e=>e.p),[],import.meta.url)}),parser:ie("parser",function(){return G(()=>import("./parser-DxI4vRR1.js").then(e=>e.p),[],import.meta.url)}),pascal:ie("pascal",function(){return G(()=>import("./pascal-OnGuEytz.js").then(e=>e.p),[],import.meta.url)}),pascaligo:ie("pascaligo",function(){return G(()=>import("./pascaligo-B8M5TYvp.js").then(e=>e.p),[],import.meta.url)}),pcaxis:ie("pcaxis",function(){return G(()=>import("./pcaxis-BpNm2SVK.js").then(e=>e.p),[],import.meta.url)}),peoplecode:ie("peoplecode",function(){return G(()=>import("./peoplecode-DXY_RaD2.js").then(e=>e.p),[],import.meta.url)}),perl:ie("perl",function(){return G(()=>import("./perl-Dtuqn4Xp.js").then(e=>e.p),[],import.meta.url)}),phpExtras:ie("phpExtras",function(){return G(()=>import("./php-extras-0Nh2gQq-.js").then(e=>e.p),__vite__mapDeps([63,53,24]),import.meta.url)}),php:ie("php",function(){return G(()=>import("./php-CFo6_Ryj.js").then(e=>e.p),__vite__mapDeps([64,53,24]),import.meta.url)}),phpdoc:ie("phpdoc",function(){return G(()=>import("./phpdoc-CARYGbOK.js").then(e=>e.p),__vite__mapDeps([65,53,24,40]),import.meta.url)}),plsql:ie("plsql",function(){return G(()=>import("./plsql-CQbqaNGP.js").then(e=>e.p),__vite__mapDeps([66,1]),import.meta.url)}),powerquery:ie("powerquery",function(){return G(()=>import("./powerquery-Dx9Pb2Np.js").then(e=>e.p),[],import.meta.url)}),powershell:ie("powershell",function(){return G(()=>import("./powershell-Cx1zuFmv.js").then(e=>e.p),[],import.meta.url)}),processing:ie("processing",function(){return G(()=>import("./processing-Beh-k7Ml.js").then(e=>e.p),[],import.meta.url)}),prolog:ie("prolog",function(){return G(()=>import("./prolog-BI5KFAjm.js").then(e=>e.p),[],import.meta.url)}),promql:ie("promql",function(){return G(()=>import("./promql-dcfsqAsj.js").then(e=>e.p),[],import.meta.url)}),properties:ie("properties",function(){return G(()=>import("./properties-MtCfVUMd.js").then(e=>e.p),[],import.meta.url)}),protobuf:ie("protobuf",function(){return G(()=>import("./protobuf-BjdKLAKV.js").then(e=>e.p),[],import.meta.url)}),psl:ie("psl",function(){return G(()=>import("./psl-Cx9r6CNV.js").then(e=>e.p),[],import.meta.url)}),pug:ie("pug",function(){return G(()=>import("./pug-D8RUoMYP.js").then(e=>e.p),[],import.meta.url)}),puppet:ie("puppet",function(){return G(()=>import("./puppet-Dvn9LSEU.js").then(e=>e.p),[],import.meta.url)}),pure:ie("pure",function(){return G(()=>import("./pure-Dh0IChNO.js").then(e=>e.p),[],import.meta.url)}),purebasic:ie("purebasic",function(){return G(()=>import("./purebasic-CWrbMTTI.js").then(e=>e.p),[],import.meta.url)}),purescript:ie("purescript",function(){return G(()=>import("./purescript-BiNDKE2B.js").then(e=>e.p),__vite__mapDeps([67,34]),import.meta.url)}),python:ie("python",function(){return G(()=>import("./python-BVcF3XYn.js").then(e=>e.p),[],import.meta.url)}),q:ie("q",function(){return G(()=>import("./q-DURbmdfQ.js").then(e=>e.q),[],import.meta.url)}),qml:ie("qml",function(){return G(()=>import("./qml-Cy8hlIHY.js").then(e=>e.q),[],import.meta.url)}),qore:ie("qore",function(){return G(()=>import("./qore-CHMHlojV.js").then(e=>e.q),[],import.meta.url)}),qsharp:ie("qsharp",function(){return G(()=>import("./qsharp-GjRoYO-1.js").then(e=>e.q),[],import.meta.url)}),r:ie("r",function(){return G(()=>import("./r-EhOfI32_.js").then(e=>e.r),[],import.meta.url)}),racket:ie("racket",function(){return G(()=>import("./racket-CzMK9lE_.js").then(e=>e.r),__vite__mapDeps([68,55]),import.meta.url)}),reason:ie("reason",function(){return G(()=>import("./reason-BxZCBWhb.js").then(e=>e.r),[],import.meta.url)}),regex:ie("regex",function(){return G(()=>import("./regex-CwKKPxpn.js").then(e=>e.r),[],import.meta.url)}),rego:ie("rego",function(){return G(()=>import("./rego-BWYj8GyT.js").then(e=>e.r),[],import.meta.url)}),renpy:ie("renpy",function(){return G(()=>import("./renpy-CUMBlHSw.js").then(e=>e.r),[],import.meta.url)}),rest:ie("rest",function(){return G(()=>import("./rest-CoMyBcfK.js").then(e=>e.r),[],import.meta.url)}),rip:ie("rip",function(){return G(()=>import("./rip-BAZ3OuaT.js").then(e=>e.r),[],import.meta.url)}),roboconf:ie("roboconf",function(){return G(()=>import("./roboconf-Dw65xRZt.js").then(e=>e.r),[],import.meta.url)}),robotframework:ie("robotframework",function(){return G(()=>import("./robotframework-Cv6qjp7o.js").then(e=>e.r),[],import.meta.url)}),ruby:ie("ruby",function(){return G(()=>import("./ruby-NcOTuLXn.js").then(e=>e.r),__vite__mapDeps([69,18]),import.meta.url)}),rust:ie("rust",function(){return G(()=>import("./rust-C3HDlluF.js").then(e=>e.r),[],import.meta.url)}),sas:ie("sas",function(){return G(()=>import("./sas-D12iQUos.js").then(e=>e.s),[],import.meta.url)}),sass:ie("sass",function(){return G(()=>import("./sass-DCTMN0Y7.js").then(e=>e.s),[],import.meta.url)}),scala:ie("scala",function(){return G(()=>import("./scala-Wa0ZF1ri.js").then(e=>e.s),__vite__mapDeps([70,38]),import.meta.url)}),scheme:ie("scheme",function(){return G(()=>import("./scheme-9DdswwZg.js").then(e=>e.s),__vite__mapDeps([71,55]),import.meta.url)}),scss:ie("scss",function(){return G(()=>import("./scss-CQJKLxeQ.js").then(e=>e.s),[],import.meta.url)}),shellSession:ie("shellSession",function(){return G(()=>import("./shell-session-DxI_HxuI.js").then(e=>e.s),__vite__mapDeps([72,8]),import.meta.url)}),smali:ie("smali",function(){return G(()=>import("./smali-DVtPm_Sa.js").then(e=>e.s),[],import.meta.url)}),smalltalk:ie("smalltalk",function(){return G(()=>import("./smalltalk-BZevhEKI.js").then(e=>e.s),[],import.meta.url)}),smarty:ie("smarty",function(){return G(()=>import("./smarty-BpeAPf9k.js").then(e=>e.s),__vite__mapDeps([73,24]),import.meta.url)}),sml:ie("sml",function(){return G(()=>import("./sml-CmNxklqM.js").then(e=>e.s),[],import.meta.url)}),solidity:ie("solidity",function(){return G(()=>import("./solidity-DdvPhBnT.js").then(e=>e.s),[],import.meta.url)}),solutionFile:ie("solutionFile",function(){return G(()=>import("./solution-file-BnNvcZ_P.js").then(e=>e.s),[],import.meta.url)}),soy:ie("soy",function(){return G(()=>import("./soy-Bf9GqMGA.js").then(e=>e.s),__vite__mapDeps([74,24]),import.meta.url)}),sparql:ie("sparql",function(){return G(()=>import("./sparql-DliRUlpE.js").then(e=>e.s),__vite__mapDeps([75,76]),import.meta.url)}),splunkSpl:ie("splunkSpl",function(){return G(()=>import("./splunk-spl-BWusPVvn.js").then(e=>e.s),[],import.meta.url)}),sqf:ie("sqf",function(){return G(()=>import("./sqf-hF6h2sKG.js").then(e=>e.s),[],import.meta.url)}),sql:ie("sql",function(){return G(()=>import("./sql-B5yz3AH1.js").then(e=>e.s),__vite__mapDeps([77,1]),import.meta.url)}),squirrel:ie("squirrel",function(){return G(()=>import("./squirrel-C2gy7Nv9.js").then(e=>e.s),[],import.meta.url)}),stan:ie("stan",function(){return G(()=>import("./stan-Qm-xpAJa.js").then(e=>e.s),[],import.meta.url)}),stylus:ie("stylus",function(){return G(()=>import("./stylus-CM8v5z-b.js").then(e=>e.s),[],import.meta.url)}),swift:ie("swift",function(){return G(()=>import("./swift-Bi4v7ufT.js").then(e=>e.s),[],import.meta.url)}),systemd:ie("systemd",function(){return G(()=>import("./systemd-DQdULvua.js").then(e=>e.s),[],import.meta.url)}),t4Cs:ie("t4Cs",function(){return G(()=>import("./t4-cs-CzTp815y.js").then(e=>e.t),__vite__mapDeps([78,79,6]),import.meta.url)}),t4Templating:ie("t4Templating",function(){return G(()=>import("./t4-templating-D1ysDxO3.js").then(e=>e.t),__vite__mapDeps([80,79]),import.meta.url)}),t4Vb:ie("t4Vb",function(){return G(()=>import("./t4-vb--eQX5vRL.js").then(e=>e.t),__vite__mapDeps([81,79,82,10]),import.meta.url)}),tap:ie("tap",function(){return G(()=>import("./tap-BOPibrmg.js").then(e=>e.t),__vite__mapDeps([83,84]),import.meta.url)}),tcl:ie("tcl",function(){return G(()=>import("./tcl-B4PPgerr.js").then(e=>e.t),[],import.meta.url)}),textile:ie("textile",function(){return G(()=>import("./textile-gSC3r8Yp.js").then(e=>e.t),[],import.meta.url)}),toml:ie("toml",function(){return G(()=>import("./toml-BYnAhcZD.js").then(e=>e.t),[],import.meta.url)}),tremor:ie("tremor",function(){return G(()=>import("./tremor-Dd-aiIOm.js").then(e=>e.t),[],import.meta.url)}),tsx:ie("tsx",function(){return G(()=>import("./tsx-BOnlGcr5.js").then(e=>e.t),__vite__mapDeps([85,51,45]),import.meta.url)}),tt2:ie("tt2",function(){return G(()=>import("./tt2-EB8SrkH7.js").then(e=>e.t),__vite__mapDeps([86,24]),import.meta.url)}),turtle:ie("turtle",function(){return G(()=>import("./turtle-DzHqcrlc.js").then(e=>e.t),__vite__mapDeps([87,76]),import.meta.url)}),twig:ie("twig",function(){return G(()=>import("./twig-BK8xKWFN.js").then(e=>e.t),__vite__mapDeps([88,24]),import.meta.url)}),typescript:ie("typescript",function(){return G(()=>import("./typescript-BkAudIJR.js").then(e=>e.t),__vite__mapDeps([89,45]),import.meta.url)}),typoscript:ie("typoscript",function(){return G(()=>import("./typoscript-BnNQGdrR.js").then(e=>e.t),[],import.meta.url)}),unrealscript:ie("unrealscript",function(){return G(()=>import("./unrealscript-BwpVl9EE.js").then(e=>e.u),[],import.meta.url)}),uorazor:ie("uorazor",function(){return G(()=>import("./uorazor-Pq9IA5Ki.js").then(e=>e.u),[],import.meta.url)}),uri:ie("uri",function(){return G(()=>import("./uri-DYwX1YAI.js").then(e=>e.u),[],import.meta.url)}),v:ie("v",function(){return G(()=>import("./v-BsrzWyGG.js").then(e=>e.v),[],import.meta.url)}),vala:ie("vala",function(){return G(()=>import("./vala-BQXRv1lI.js").then(e=>e.v),[],import.meta.url)}),vbnet:ie("vbnet",function(){return G(()=>import("./vbnet-pcWsRFHp.js").then(e=>e.v),__vite__mapDeps([90,82,10]),import.meta.url)}),velocity:ie("velocity",function(){return G(()=>import("./velocity-DYQxzAUs.js").then(e=>e.v),[],import.meta.url)}),verilog:ie("verilog",function(){return G(()=>import("./verilog-D3sf-ez_.js").then(e=>e.v),[],import.meta.url)}),vhdl:ie("vhdl",function(){return G(()=>import("./vhdl-dLP7vBSQ.js").then(e=>e.v),[],import.meta.url)}),vim:ie("vim",function(){return G(()=>import("./vim-DjAIRcct.js").then(e=>e.v),[],import.meta.url)}),visualBasic:ie("visualBasic",function(){return G(()=>import("./visual-basic-Ac03-cCA.js").then(e=>e.v),[],import.meta.url)}),warpscript:ie("warpscript",function(){return G(()=>import("./warpscript-k0YStayz.js").then(e=>e.w),[],import.meta.url)}),wasm:ie("wasm",function(){return G(()=>import("./wasm-CnP0DGRU.js").then(e=>e.w),[],import.meta.url)}),webIdl:ie("webIdl",function(){return G(()=>import("./web-idl-BR71SOwz.js").then(e=>e.w),[],import.meta.url)}),wiki:ie("wiki",function(){return G(()=>import("./wiki-zBomQTkt.js").then(e=>e.w),[],import.meta.url)}),wolfram:ie("wolfram",function(){return G(()=>import("./wolfram-Db54pnru.js").then(e=>e.w),[],import.meta.url)}),wren:ie("wren",function(){return G(()=>import("./wren-Bn8TVzYG.js").then(e=>e.w),[],import.meta.url)}),xeora:ie("xeora",function(){return G(()=>import("./xeora-DEoFxQcY.js").then(e=>e.x),[],import.meta.url)}),xmlDoc:ie("xmlDoc",function(){return G(()=>import("./xml-doc-BKZOEifv.js").then(e=>e.x),[],import.meta.url)}),xojo:ie("xojo",function(){return G(()=>import("./xojo-C3-iy602.js").then(e=>e.x),[],import.meta.url)}),xquery:ie("xquery",function(){return G(()=>import("./xquery-Bt3VaJqs.js").then(e=>e.x),[],import.meta.url)}),yaml:ie("yaml",function(){return G(()=>import("./yaml-Btor8OBf.js").then(e=>e.y),__vite__mapDeps([91,84]),import.meta.url)}),yang:ie("yang",function(){return G(()=>import("./yang-ZhWc3hEx.js").then(e=>e.y),[],import.meta.url)}),zig:ie("zig",function(){return G(()=>import("./zig-_nTJz54-.js").then(e=>e.z),[],import.meta.url)})},Qbt=Vbt({loader:function(){return G(()=>import("./core-D14Evsir.js").then(t=>t.c),__vite__mapDeps([92,60,22,15,43]),import.meta.url).then(function(t){return t.default||t})},isLanguageRegistered:function(t,r){return t.registered(r)},languageLoaders:Ubt,registerLanguage:function(t,r,n){return t.register(n)}});var Zbt=e=>t=>{const r=({components:{Pre:n,Code:s},language:i,code:o})=>f.jsx(e,{PreTag:n,CodeTag:s,...t,language:i,children:o});return r.displayName="PrismSyntaxHighlighter",r},qbt=Zbt(Qbt);const HDe=1024;let Hbt=0,Gc=class{constructor(t,r){this.from=t,this.to=r}};class hr{constructor(t={}){this.id=Hbt++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=t.combine||null}add(t){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof t!="function"&&(t=Li.match(t)),r=>{let n=t(r);return n===void 0?null:[this,n]}}}hr.closedBy=new hr({deserialize:e=>e.split(" ")});hr.openedBy=new hr({deserialize:e=>e.split(" ")});hr.group=new hr({deserialize:e=>e.split(" ")});hr.isolate=new hr({deserialize:e=>{if(e&&e!="rtl"&&e!="ltr"&&e!="auto")throw new RangeError("Invalid value for isolate: "+e);return e||"auto"}});hr.contextHash=new hr({perNode:!0});hr.lookAhead=new hr({perNode:!0});hr.mounted=new hr({perNode:!0});class rE{constructor(t,r,n){this.tree=t,this.overlay=r,this.parser=n}static get(t){return t&&t.props&&t.props[hr.mounted.id]}}const Wbt=Object.create(null);class Li{constructor(t,r,n,s=0){this.name=t,this.props=r,this.id=n,this.flags=s}static define(t){let r=t.props&&t.props.length?Object.create(null):Wbt,n=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),s=new Li(t.name||"",r,t.id,n);if(t.props){for(let i of t.props)if(Array.isArray(i)||(i=i(s)),i){if(i[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");r[i[0].id]=i[1]}}return s}prop(t){return this.props[t.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(t){if(typeof t=="string"){if(this.name==t)return!0;let r=this.prop(hr.group);return r?r.indexOf(t)>-1:!1}return this.id==t}static match(t){let r=Object.create(null);for(let n in t)for(let s of n.split(" "))r[s]=t[n];return n=>{for(let s=n.prop(hr.group),i=-1;i<(s?s.length:0);i++){let o=r[i<0?n.name:s[i]];if(o)return o}}}}Li.none=new Li("",Object.create(null),0,8);class Xw{constructor(t){this.types=t;for(let r=0;r<t.length;r++)if(t[r].id!=r)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...t){let r=[];for(let n of this.types){let s=null;for(let i of t){let o=i(n);if(o){s||(s=Object.assign({},n.props));let a=o[1],l=o[0];l.combine&&l.id in s&&(a=l.combine(s[l.id],a)),s[l.id]=a}}r.push(s?new Li(n.name,s,n.id,n.flags):n)}return new Xw(r)}}const M2=new WeakMap,qle=new WeakMap;var vs;(function(e){e[e.ExcludeBuffers=1]="ExcludeBuffers",e[e.IncludeAnonymous=2]="IncludeAnonymous",e[e.IgnoreMounts=4]="IgnoreMounts",e[e.IgnoreOverlays=8]="IgnoreOverlays"})(vs||(vs={}));class Gr{constructor(t,r,n,s,i){if(this.type=t,this.children=r,this.positions=n,this.length=s,this.props=null,i&&i.length){this.props=Object.create(null);for(let[o,a]of i)this.props[typeof o=="number"?o:o.id]=a}}toString(){let t=rE.get(this);if(t&&!t.overlay)return t.tree.toString();let r="";for(let n of this.children){let s=n.toString();s&&(r&&(r+=","),r+=s)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(r.length?"("+r+")":""):r}cursor(t=0){return new VI(this.topNode,t)}cursorAt(t,r=0,n=0){let s=M2.get(this)||this.topNode,i=new VI(s);return i.moveTo(t,r),M2.set(this,i._tree),i}get topNode(){return new Jo(this,0,0,null)}resolve(t,r=0){let n=nE(M2.get(this)||this.topNode,t,r,!1);return M2.set(this,n),n}resolveInner(t,r=0){let n=nE(qle.get(this)||this.topNode,t,r,!0);return qle.set(this,n),n}resolveStack(t,r=0){return Ybt(this,t,r)}iterate(t){let{enter:r,leave:n,from:s=0,to:i=this.length}=t,o=t.mode||0,a=(o&vs.IncludeAnonymous)>0;for(let l=this.cursor(o|vs.IncludeAnonymous);;){let c=!1;if(l.from<=i&&l.to>=s&&(!a&&l.type.isAnonymous||r(l)!==!1)){if(l.firstChild())continue;c=!0}for(;c&&n&&(a||!l.type.isAnonymous)&&n(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let r in this.props)t.push([+r,this.props[r]]);return t}balance(t={}){return this.children.length<=8?this:IG(Li.none,this.children,this.positions,0,this.children.length,0,this.length,(r,n,s)=>new Gr(this.type,r,n,s,this.propValues),t.makeTree||((r,n,s)=>new Gr(Li.none,r,n,s)))}static build(t){return Jbt(t)}}Gr.empty=new Gr(Li.none,[],[],0);class PG{constructor(t,r){this.buffer=t,this.index=r}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 PG(this.buffer,this.index)}}class Mg{constructor(t,r,n){this.buffer=t,this.length=r,this.set=n}get type(){return Li.none}toString(){let t=[];for(let r=0;r<this.buffer.length;)t.push(this.childString(r)),r=this.buffer[r+3];return t.join(",")}childString(t){let r=this.buffer[t],n=this.buffer[t+3],s=this.set.types[r],i=s.name;if(/\W/.test(i)&&!s.isError&&(i=JSON.stringify(i)),t+=4,n==t)return i;let o=[];for(;t<n;)o.push(this.childString(t)),t=this.buffer[t+3];return i+"("+o.join(",")+")"}findChild(t,r,n,s,i){let{buffer:o}=this,a=-1;for(let l=t;l!=r&&!(WDe(i,s,o[l+1],o[l+2])&&(a=l,n>0));l=o[l+3]);return a}slice(t,r,n){let s=this.buffer,i=new Uint16Array(r-t),o=0;for(let a=t,l=0;a<r;){i[l++]=s[a++],i[l++]=s[a++]-n;let c=i[l++]=s[a++]-n;i[l++]=s[a++]-t,o=Math.max(o,c)}return new Mg(i,o,this.set)}}function WDe(e,t,r,n){switch(e){case-2:return r<t;case-1:return n>=t&&r<t;case 0:return r<t&&n>t;case 1:return r<=t&&n>t;case 2:return n>t;case 4:return!0}}function nE(e,t,r,n){for(var s;e.from==e.to||(r<1?e.from>=t:e.from>t)||(r>-1?e.to<=t:e.to<t);){let o=!n&&e instanceof Jo&&e.index<0?null:e.parent;if(!o)return e;e=o}let i=n?0:vs.IgnoreOverlays;if(n)for(let o=e,a=o.parent;a;o=a,a=o.parent)o instanceof Jo&&o.index<0&&((s=a.enter(t,r,i))===null||s===void 0?void 0:s.from)!=o.from&&(e=a);for(;;){let o=e.enter(t,r,i);if(!o)return e;e=o}}class GDe{cursor(t=0){return new VI(this,t)}getChild(t,r=null,n=null){let s=Hle(this,t,r,n);return s.length?s[0]:null}getChildren(t,r=null,n=null){return Hle(this,t,r,n)}resolve(t,r=0){return nE(this,t,r,!1)}resolveInner(t,r=0){return nE(this,t,r,!0)}matchContext(t){return cV(this.parent,t)}enterUnfinishedNodesBefore(t){let r=this.childBefore(t),n=this;for(;r;){let s=r.lastChild;if(!s||s.to!=r.to)break;s.type.isError&&s.from==s.to?(n=r,r=s.prevSibling):r=s}return n}get node(){return this}get next(){return this.parent}}class Jo extends GDe{constructor(t,r,n,s){super(),this._tree=t,this.from=r,this.index=n,this._parent=s}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,r,n,s,i=0){for(let o=this;;){for(let{children:a,positions:l}=o._tree,c=r>0?a.length:-1;t!=c;t+=r){let u=a[t],d=l[t]+o.from;if(WDe(s,n,d,d+u.length)){if(u instanceof Mg){if(i&vs.ExcludeBuffers)continue;let p=u.findChild(0,u.buffer.length,r,n-d,s);if(p>-1)return new Ef(new Gbt(o,u,t,d),null,p)}else if(i&vs.IncludeAnonymous||!u.type.isAnonymous||$G(u)){let p;if(!(i&vs.IgnoreMounts)&&(p=rE.get(u))&&!p.overlay)return new Jo(p.tree,d,t,o);let m=new Jo(u,d,t,o);return i&vs.IncludeAnonymous||!m.type.isAnonymous?m:m.nextChild(r<0?u.children.length-1:0,r,n,s)}}}if(i&vs.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?t=o.index+r:t=r<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(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}enter(t,r,n=0){let s;if(!(n&vs.IgnoreOverlays)&&(s=rE.get(this._tree))&&s.overlay){let i=t-this.from;for(let{from:o,to:a}of s.overlay)if((r>0?o<=i:o<i)&&(r<0?a>=i:a>i))return new Jo(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,r,n)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}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 Hle(e,t,r,n){let s=e.cursor(),i=[];if(!s.firstChild())return i;if(r!=null){for(let o=!1;!o;)if(o=s.type.is(r),!s.nextSibling())return i}for(;;){if(n!=null&&s.type.is(n))return i;if(s.type.is(t)&&i.push(s.node),!s.nextSibling())return n==null?i:[]}}function cV(e,t,r=t.length-1){for(let n=e;r>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(t[r]&&t[r]!=n.name)return!1;r--}}return!0}class Gbt{constructor(t,r,n,s){this.parent=t,this.buffer=r,this.index=n,this.start=s}}class Ef extends GDe{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(t,r,n){super(),this.context=t,this._parent=r,this.index=n,this.type=t.buffer.set.types[t.buffer.buffer[n]]}child(t,r,n){let{buffer:s}=this.context,i=s.findChild(this.index+4,s.buffer[this.index+3],t,r-this.context.start,n);return i<0?null:new Ef(this.context,this,i)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}enter(t,r,n=0){if(n&vs.ExcludeBuffers)return null;let{buffer:s}=this.context,i=s.findChild(this.index+4,s.buffer[this.index+3],r>0?1:-1,t-this.context.start,r);return i<0?null:new Ef(this.context,this,i)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,r=t.buffer[this.index+3];return r<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new Ef(this.context,this._parent,r):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,r=this._parent?this._parent.index+4:0;return this.index==r?this.externalSibling(-1):new Ef(this.context,this._parent,t.findChild(r,this.index,-1,0,4))}get tree(){return null}toTree(){let t=[],r=[],{buffer:n}=this.context,s=this.index+4,i=n.buffer[this.index+3];if(i>s){let o=n.buffer[this.index+1];t.push(n.slice(s,i,o)),r.push(0)}return new Gr(this.type,t,r,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function XDe(e){if(!e.length)return null;let t=0,r=e[0];for(let i=1;i<e.length;i++){let o=e[i];(o.from>r.from||o.to<r.to)&&(r=o,t=i)}let n=r instanceof Jo&&r.index<0?null:r.parent,s=e.slice();return n?s[t]=n:s.splice(t,1),new Xbt(s,r)}class Xbt{constructor(t,r){this.heads=t,this.node=r}get next(){return XDe(this.heads)}}function Ybt(e,t,r){let n=e.resolveInner(t,r),s=null;for(let i=n instanceof Jo?n:n.context.parent;i;i=i.parent)if(i.index<0){let o=i.parent;(s||(s=[n])).push(o.resolve(t,r)),i=o}else{let o=rE.get(i.tree);if(o&&o.overlay&&o.overlay[0].from<=t&&o.overlay[o.overlay.length-1].to>=t){let a=new Jo(o.tree,o.overlay[0].from+i.from,-1,i);(s||(s=[n])).push(nE(a,t,r,!1))}}return s?XDe(s):n}class VI{get name(){return this.type.name}constructor(t,r=0){if(this.mode=r,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof Jo)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(let n=t._parent;n;n=n._parent)this.stack.unshift(n.index);this.bufferNode=t,this.yieldBuf(t.index)}}yieldNode(t){return t?(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0):!1}yieldBuf(t,r){this.index=t;let{start:n,buffer:s}=this.buffer;return this.type=r||s.set.types[s.buffer[t]],this.from=n+s.buffer[t+1],this.to=n+s.buffer[t+2],!0}yield(t){return t?t instanceof Jo?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(t,r,n){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree._tree.children.length-1:0,t,r,n,this.mode));let{buffer:s}=this.buffer,i=s.findChild(this.index+4,s.buffer[this.index+3],t,r-this.buffer.start,n);return i<0?!1:(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(t){return this.enterChild(1,t,2)}childBefore(t){return this.enterChild(-1,t,-2)}enter(t,r,n=this.mode){return this.buffer?n&vs.ExcludeBuffers?!1:this.enterChild(1,t,r):this.yield(this._tree.enter(t,r,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&vs.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let t=this.mode&vs.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}sibling(t){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode)):!1;let{buffer:r}=this.buffer,n=this.stack.length-1;if(t<0){let s=n<0?0:this.stack[n]+4;if(this.index!=s)return this.yieldBuf(r.findChild(s,this.index,-1,0,4))}else{let s=r.buffer[this.index+3];if(s<(n<0?r.buffer.length:r.buffer[this.stack[n]+3]))return this.yieldBuf(s)}return n<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(t){let r,n,{buffer:s}=this;if(s){if(t>0){if(this.index<s.buffer.buffer.length)return!1}else for(let i=0;i<this.index;i++)if(s.buffer.buffer[i+3]<this.index)return!1;({index:r,parent:n}=s)}else({index:r,_parent:n}=this._tree);for(;n;{index:r,_parent:n}=n)if(r>-1)for(let i=r+t,o=t<0?-1:n._tree.children.length;i!=o;i+=t){let a=n._tree.children[i];if(this.mode&vs.IncludeAnonymous||a instanceof Mg||!a.type.isAnonymous||$G(a))return!1}return!0}move(t,r){if(r&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,r=0){for(;(this.from==this.to||(r<1?this.from>=t:this.from>t)||(r>-1?this.to<=t:this.to<t))&&this.parent(););for(;this.enterChild(1,t,r););return this}get node(){if(!this.buffer)return this._tree;let t=this.bufferNode,r=null,n=0;if(t&&t.context==this.buffer)e:for(let s=this.index,i=this.stack.length;i>=0;){for(let o=t;o;o=o._parent)if(o.index==s){if(s==this.index)return o;r=o,n=i+1;break e}s=this.stack[--i]}for(let s=n;s<this.stack.length;s++)r=new Ef(this.buffer,r,this.stack[s]);return this.bufferNode=new Ef(this.buffer,r,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(t,r){for(let n=0;;){let s=!1;if(this.type.isAnonymous||t(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(s=!0)}for(;;){if(s&&r&&r(this),s=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,s=!0}}}matchContext(t){if(!this.buffer)return cV(this.node.parent,t);let{buffer:r}=this.buffer,{types:n}=r.set;for(let s=t.length-1,i=this.stack.length-1;s>=0;i--){if(i<0)return cV(this._tree,t,s);let o=n[r.buffer[this.stack[i]]];if(!o.isAnonymous){if(t[s]&&t[s]!=o.name)return!1;s--}}return!0}}function $G(e){return e.children.some(t=>t instanceof Mg||!t.type.isAnonymous||$G(t))}function Jbt(e){var t;let{buffer:r,nodeSet:n,maxBufferLength:s=HDe,reused:i=[],minRepeatType:o=n.types.length}=e,a=Array.isArray(r)?new PG(r,r.length):r,l=n.types,c=0,u=0;function d(C,T,P,A,R,M){let{id:z,start:Q,end:U,size:L}=a,V=u,j=c;if(L<0)if(a.next(),L==-1){let J=i[z];P.push(J),A.push(Q-C);return}else if(L==-3){c=z;return}else if(L==-4){u=z;return}else throw new RangeError(`Unrecognized record size: ${L}`);let N=l[z],I,H,B=Q-C;if(U-Q<=s&&(H=b(a.pos-T,R))){let J=new Uint16Array(H.size-H.skip),Z=a.pos-H.size,F=J.length;for(;a.pos>Z;)F=w(H.start,J,F);I=new Mg(J,U-H.start,n),B=H.start-C}else{let J=a.pos-L;a.next();let Z=[],F=[],W=z>=o?z:-1,K=0,se=U;for(;a.pos>J;)W>=0&&a.id==W&&a.size>=0?(a.end<=se-s&&(g(Z,F,Q,K,a.end,se,W,V,j),K=Z.length,se=a.end),a.next()):M>2500?p(Q,J,Z,F):d(Q,J,Z,F,W,M+1);if(W>=0&&K>0&&K<Z.length&&g(Z,F,Q,K,Q,se,W,V,j),Z.reverse(),F.reverse(),W>-1&&K>0){let X=m(N,j);I=IG(N,Z,F,0,Z.length,0,U-Q,X,X)}else I=v(N,Z,F,U-Q,V-U,j)}P.push(I),A.push(B)}function p(C,T,P,A){let R=[],M=0,z=-1;for(;a.pos>T;){let{id:Q,start:U,end:L,size:V}=a;if(V>4)a.next();else{if(z>-1&&U<z)break;z<0&&(z=L-s),R.push(Q,U,L),M++,a.next()}}if(M){let Q=new Uint16Array(M*4),U=R[R.length-2];for(let L=R.length-3,V=0;L>=0;L-=3)Q[V++]=R[L],Q[V++]=R[L+1]-U,Q[V++]=R[L+2]-U,Q[V++]=V;P.push(new Mg(Q,R[2]-U,n)),A.push(U-C)}}function m(C,T){return(P,A,R)=>{let M=0,z=P.length-1,Q,U;if(z>=0&&(Q=P[z])instanceof Gr){if(!z&&Q.type==C&&Q.length==R)return Q;(U=Q.prop(hr.lookAhead))&&(M=A[z]+Q.length+U)}return v(C,P,A,R,M,T)}}function g(C,T,P,A,R,M,z,Q,U){let L=[],V=[];for(;C.length>A;)L.push(C.pop()),V.push(T.pop()+P-R);C.push(v(n.types[z],L,V,M-R,Q-M,U)),T.push(R-P)}function v(C,T,P,A,R,M,z){if(M){let Q=[hr.contextHash,M];z=z?[Q].concat(z):[Q]}if(R>25){let Q=[hr.lookAhead,R];z=z?[Q].concat(z):[Q]}return new Gr(C,T,P,A,z)}function b(C,T){let P=a.fork(),A=0,R=0,M=0,z=P.end-s,Q={size:0,start:0,skip:0};e:for(let U=P.pos-C;P.pos>U;){let L=P.size;if(P.id==T&&L>=0){Q.size=A,Q.start=R,Q.skip=M,M+=4,A+=4,P.next();continue}let V=P.pos-L;if(L<0||V<U||P.start<z)break;let j=P.id>=o?4:0,N=P.start;for(P.next();P.pos>V;){if(P.size<0)if(P.size==-3)j+=4;else break e;else P.id>=o&&(j+=4);P.next()}R=N,A+=L,M+=j}return(T<0||A==C)&&(Q.size=A,Q.start=R,Q.skip=M),Q.size>4?Q:void 0}function w(C,T,P){let{id:A,start:R,end:M,size:z}=a;if(a.next(),z>=0&&A<o){let Q=P;if(z>4){let U=a.pos-(z-4);for(;a.pos>U;)P=w(C,T,P)}T[--P]=Q,T[--P]=M-C,T[--P]=R-C,T[--P]=A}else z==-3?c=A:z==-4&&(u=A);return P}let S=[],O=[];for(;a.pos>0;)d(e.start||0,e.bufferStart||0,S,O,-1,0);let k=(t=e.length)!==null&&t!==void 0?t:S.length?O[0]+S[0].length:0;return new Gr(l[e.topID],S.reverse(),O.reverse(),k)}const Wle=new WeakMap;function k$(e,t){if(!e.isAnonymous||t instanceof Mg||t.type!=e)return 1;let r=Wle.get(t);if(r==null){r=1;for(let n of t.children){if(n.type!=e||!(n instanceof Gr)){r=1;break}r+=k$(e,n)}Wle.set(t,r)}return r}function IG(e,t,r,n,s,i,o,a,l){let c=0;for(let g=n;g<s;g++)c+=k$(e,t[g]);let u=Math.ceil(c*1.5/8),d=[],p=[];function m(g,v,b,w,S){for(let O=b;O<w;){let k=O,C=v[O],T=k$(e,g[O]);for(O++;O<w;O++){let P=k$(e,g[O]);if(T+P>=u)break;T+=P}if(O==k+1){if(T>u){let P=g[k];m(P.children,P.positions,0,P.children.length,v[k]+S);continue}d.push(g[k])}else{let P=v[O-1]+g[O-1].length-C;d.push(IG(e,g,v,k,O,C,P,null,l))}p.push(C+S-i)}}return m(t,r,n,s,0),(a||l)(d,p,o)}class YDe{constructor(){this.map=new WeakMap}setBuffer(t,r,n){let s=this.map.get(t);s||this.map.set(t,s=new Map),s.set(r,n)}getBuffer(t,r){let n=this.map.get(t);return n&&n.get(r)}set(t,r){t instanceof Ef?this.setBuffer(t.context.buffer,t.index,r):t instanceof Jo&&this.map.set(t.tree,r)}get(t){return t instanceof Ef?this.getBuffer(t.context.buffer,t.index):t instanceof Jo?this.map.get(t.tree):void 0}cursorSet(t,r){t.buffer?this.setBuffer(t.buffer.buffer,t.index,r):this.map.set(t.tree,r)}cursorGet(t){return t.buffer?this.getBuffer(t.buffer.buffer,t.index):this.map.get(t.tree)}}class Th{constructor(t,r,n,s,i=!1,o=!1){this.from=t,this.to=r,this.tree=n,this.offset=s,this.open=(i?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(t,r=[],n=!1){let s=[new Th(0,t.length,t,0,!1,n)];for(let i of r)i.to>t.length&&s.push(i);return s}static applyChanges(t,r,n=128){if(!r.length)return t;let s=[],i=1,o=t.length?t[0]:null;for(let a=0,l=0,c=0;;a++){let u=a<r.length?r[a]:null,d=u?u.fromA:1e9;if(d-l>=n)for(;o&&o.from<d;){let p=o;if(l>=p.from||d<=p.to||c){let m=Math.max(p.from,l)-c,g=Math.min(p.to,d)-c;p=m>=g?null:new Th(m,g,p.tree,p.offset+c,a>0,!!u)}if(p&&s.push(p),o.to>d)break;o=i<t.length?t[i++]:null}if(!u)break;l=u.toA,c=u.toA-u.toB}return s}}class s5{startParse(t,r,n){return typeof t=="string"&&(t=new Kbt(t)),n=n?n.length?n.map(s=>new Gc(s.from,s.to)):[new Gc(0,0)]:[new Gc(0,t.length)],this.createParse(t,r||[],n)}parse(t,r,n){let s=this.startParse(t,r,n);for(;;){let i=s.advance();if(i)return i}}}class Kbt{constructor(t){this.string=t}get length(){return this.string.length}chunk(t){return this.string.slice(t)}get lineChunks(){return!1}read(t,r){return this.string.slice(t,r)}}function JDe(e){return(t,r,n,s)=>new txt(t,e,r,n,s)}class Gle{constructor(t,r,n,s,i){this.parser=t,this.parse=r,this.overlay=n,this.target=s,this.from=i}}function Xle(e){if(!e.length||e.some(t=>t.from>=t.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(e))}class ext{constructor(t,r,n,s,i,o,a){this.parser=t,this.predicate=r,this.mounts=n,this.index=s,this.start=i,this.target=o,this.prev=a,this.depth=0,this.ranges=[]}}const uV=new hr({perNode:!0});class txt{constructor(t,r,n,s,i){this.nest=r,this.input=n,this.fragments=s,this.ranges=i,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=t}advance(){if(this.baseParse){let n=this.baseParse.advance();if(!n)return null;if(this.baseParse=null,this.baseTree=n,this.startInner(),this.stoppedAt!=null)for(let s of this.inner)s.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let n=this.baseTree;return this.stoppedAt!=null&&(n=new Gr(n.type,n.children,n.positions,n.length,n.propValues.concat([[uV,this.stoppedAt]]))),n}let t=this.inner[this.innerDone],r=t.parse.advance();if(r){this.innerDone++;let n=Object.assign(Object.create(null),t.target.props);n[hr.mounted.id]=new rE(r,t.overlay,t.parser),t.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let t=this.input.length;for(let r=this.innerDone;r<this.inner.length;r++)this.inner[r].from<t&&(t=Math.min(t,this.inner[r].parse.parsedPos));return t}stopAt(t){if(this.stoppedAt=t,this.baseParse)this.baseParse.stopAt(t);else for(let r=this.innerDone;r<this.inner.length;r++)this.inner[r].parse.stopAt(t)}startInner(){let t=new sxt(this.fragments),r=null,n=null,s=new VI(new Jo(this.baseTree,this.ranges[0].from,0,null),vs.IncludeAnonymous|vs.IgnoreMounts);e:for(let i,o;;){let a=!0,l;if(this.stoppedAt!=null&&s.from>=this.stoppedAt)a=!1;else if(t.hasNode(s)){if(r){let c=r.mounts.find(u=>u.frag.from<=s.from&&u.frag.to>=s.to&&u.mount.overlay);if(c)for(let u of c.mount.overlay){let d=u.from+c.pos,p=u.to+c.pos;d>=s.from&&p<=s.to&&!r.ranges.some(m=>m.from<p&&m.to>d)&&r.ranges.push({from:d,to:p})}}a=!1}else if(n&&(o=rxt(n.ranges,s.from,s.to)))a=o!=2;else if(!s.type.isAnonymous&&(i=this.nest(s,this.input))&&(s.from<s.to||!i.overlay)){s.tree||(nxt(s),r&&r.depth++,n&&n.depth++);let c=t.findMounts(s.from,i.parser);if(typeof i.overlay=="function")r=new ext(i.parser,i.overlay,c,this.inner.length,s.from,s.tree,r);else{let u=Kle(this.ranges,i.overlay||(s.from<s.to?[new Gc(s.from,s.to)]:[]));u.length&&Xle(u),(u.length||!i.overlay)&&this.inner.push(new Gle(i.parser,u.length?i.parser.startParse(this.input,ece(c,u),u):i.parser.startParse(""),i.overlay?i.overlay.map(d=>new Gc(d.from-s.from,d.to-s.from)):null,s.tree,u.length?u[0].from:s.from)),i.overlay?u.length&&(n={ranges:u,depth:0,prev:n}):a=!1}}else if(r&&(l=r.predicate(s))&&(l===!0&&(l=new Gc(s.from,s.to)),l.from<l.to)){let c=r.ranges.length-1;c>=0&&r.ranges[c].to==l.from?r.ranges[c]={from:r.ranges[c].from,to:l.to}:r.ranges.push(l)}if(a&&s.firstChild())r&&r.depth++,n&&n.depth++;else for(;!s.nextSibling();){if(!s.parent())break e;if(r&&!--r.depth){let c=Kle(this.ranges,r.ranges);c.length&&(Xle(c),this.inner.splice(r.index,0,new Gle(r.parser,r.parser.startParse(this.input,ece(r.mounts,c),c),r.ranges.map(u=>new Gc(u.from-r.start,u.to-r.start)),r.target,c[0].from))),r=r.prev}n&&!--n.depth&&(n=n.prev)}}}}function rxt(e,t,r){for(let n of e){if(n.from>=r)break;if(n.to>t)return n.from<=t&&n.to>=r?2:1}return 0}function Yle(e,t,r,n,s,i){if(t<r){let o=e.buffer[t+1];n.push(e.slice(t,r,o)),s.push(o-i)}}function nxt(e){let{node:t}=e,r=[],n=t.context.buffer;do r.push(e.index),e.parent();while(!e.tree);let s=e.tree,i=s.children.indexOf(n),o=s.children[i],a=o.buffer,l=[i];function c(u,d,p,m,g,v){let b=r[v],w=[],S=[];Yle(o,u,b,w,S,m);let O=a[b+1],k=a[b+2];l.push(w.length);let C=v?c(b+4,a[b+3],o.set.types[a[b]],O,k-O,v-1):t.toTree();return w.push(C),S.push(O-m),Yle(o,a[b+3],d,w,S,m),new Gr(p,w,S,g)}s.children[i]=c(0,a.length,Li.none,0,o.length,r.length-1);for(let u of l){let d=e.tree.children[u],p=e.tree.positions[u];e.yield(new Jo(d,p+e.from,u,e._tree))}}class Jle{constructor(t,r){this.offset=r,this.done=!1,this.cursor=t.cursor(vs.IncludeAnonymous|vs.IgnoreMounts)}moveTo(t){let{cursor:r}=this,n=t-this.offset;for(;!this.done&&r.from<n;)r.to>=t&&r.enter(n,1,vs.IgnoreOverlays|vs.ExcludeBuffers)||r.next(!1)||(this.done=!0)}hasNode(t){if(this.moveTo(t.from),!this.done&&this.cursor.from+this.offset==t.from&&this.cursor.tree)for(let r=this.cursor.tree;;){if(r==t.tree)return!0;if(r.children.length&&r.positions[0]==0&&r.children[0]instanceof Gr)r=r.children[0];else break}return!1}}let sxt=class{constructor(t){var r;if(this.fragments=t,this.curTo=0,this.fragI=0,t.length){let n=this.curFrag=t[0];this.curTo=(r=n.tree.prop(uV))!==null&&r!==void 0?r:n.to,this.inner=new Jle(n.tree,-n.offset)}else this.curFrag=this.inner=null}hasNode(t){for(;this.curFrag&&t.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=t.from&&this.curTo>=t.to&&this.inner.hasNode(t)}nextFrag(){var t;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let r=this.curFrag=this.fragments[this.fragI];this.curTo=(t=r.tree.prop(uV))!==null&&t!==void 0?t:r.to,this.inner=new Jle(r.tree,-r.offset)}}findMounts(t,r){var n;let s=[];if(this.inner){this.inner.cursor.moveTo(t,1);for(let i=this.inner.cursor.node;i;i=i.parent){let o=(n=i.tree)===null||n===void 0?void 0:n.prop(hr.mounted);if(o&&o.parser==r)for(let a=this.fragI;a<this.fragments.length;a++){let l=this.fragments[a];if(l.from>=i.to)break;l.tree==this.curFrag.tree&&s.push({frag:l,pos:i.from-l.offset,mount:o})}}}return s}};function Kle(e,t){let r=null,n=t;for(let s=1,i=0;s<e.length;s++){let o=e[s-1].to,a=e[s].from;for(;i<n.length;i++){let l=n[i];if(l.from>=a)break;l.to<=o||(r||(n=r=t.slice()),l.from<o?(r[i]=new Gc(l.from,o),l.to>a&&r.splice(i+1,0,new Gc(a,l.to))):l.to>a?r[i--]=new Gc(a,l.to):r.splice(i--,1))}}return n}function ixt(e,t,r,n){let s=0,i=0,o=!1,a=!1,l=-1e9,c=[];for(;;){let u=s==e.length?1e9:o?e[s].to:e[s].from,d=i==t.length?1e9:a?t[i].to:t[i].from;if(o!=a){let p=Math.max(l,r),m=Math.min(u,d,n);p<m&&c.push(new Gc(p,m))}if(l=Math.min(u,d),l==1e9)break;u==l&&(o?(o=!1,s++):o=!0),d==l&&(a?(a=!1,i++):a=!0)}return c}function ece(e,t){let r=[];for(let{pos:n,mount:s,frag:i}of e){let o=n+(s.overlay?s.overlay[0].from:0),a=o+s.tree.length,l=Math.max(i.from,o),c=Math.min(i.to,a);if(s.overlay){let u=s.overlay.map(p=>new Gc(p.from+n,p.to+n)),d=ixt(t,u,l,c);for(let p=0,m=l;;p++){let g=p==d.length,v=g?c:d[p].from;if(v>m&&r.push(new Th(m,v,s.tree,-o,i.from>=m||i.openStart,i.to<=v||i.openEnd)),g)break;m=d[p].to}}else r.push(new Th(l,c,s.tree,-o,i.from>=o||i.openStart,i.to<=a||i.openEnd))}return r}var oxt={},tce={};let axt=class dV{constructor(t,r,n,s,i,o,a,l,c,u=0,d){this.p=t,this.stack=r,this.state=n,this.reducePos=s,this.pos=i,this.score=o,this.buffer=a,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=d}toString(){return`[${this.stack.filter((t,r)=>r%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,r,n=0){let s=t.parser.context;return new dV(t,[],r,n,n,0,[],0,s?new rce(s,s.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,r){this.stack.push(this.state,r,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var r;let n=t>>19,s=t&65535,{parser:i}=this.p,o=this.reducePos<this.pos-25;o&&this.setLookAhead(this.pos);let a=i.dynamicPrecedence(s);if(a&&(this.score+=a),n==0){this.pushState(i.getGoto(this.state,s,!0),this.reducePos),s<i.minRepeatTerm&&this.storeNode(s,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(s,this.reducePos);return}let l=this.stack.length-(n-1)*3-(t&262144?6:0),c=l?this.stack[l-2]:this.p.ranges[0].from,u=this.reducePos-c;u>=2e3&&!(!((r=this.p.parser.nodeSet.types[s])===null||r===void 0)&&r.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 d=l?this.stack[l-1]:0,p=this.bufferBase+this.buffer.length-d;if(s<i.minRepeatTerm||t&131072){let m=i.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(s,c,m,p+4,!0)}if(t&262144)this.state=this.stack[l];else{let m=this.stack[l-3];this.state=i.getGoto(m,s,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(s,c)}storeNode(t,r,n,s=4,i=!1){if(t==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(r==n)return;if(o.buffer[a-2]>=r){o.buffer[a-2]=n;return}}}if(!i||this.pos==n)this.buffer.push(t,r,n,s);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0){let a=!1;for(let l=o;l>0&&this.buffer[l-2]>n;l-=4)if(this.buffer[l-1]>=0){a=!0;break}if(a)for(;o>0&&this.buffer[o-2]>n;)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,s>4&&(s-=4)}this.buffer[o]=t,this.buffer[o+1]=r,this.buffer[o+2]=n,this.buffer[o+3]=s}}shift(t,r,n,s){if(t&131072)this.pushState(t&65535,this.pos);else if((t&262144)==0){let i=t,{parser:o}=this.p;(s>this.pos||r<=o.maxNode)&&(this.pos=s,o.stateFlag(i,1)||(this.reducePos=s)),this.pushState(i,n),this.shiftContext(r,n),r<=o.maxNode&&this.buffer.push(r,n,s,4)}else this.pos=s,this.shiftContext(r,n),r<=this.p.parser.maxNode&&this.buffer.push(r,n,s,4)}apply(t,r,n,s){t&65536?this.reduce(t):this.shift(t,r,n,s)}useNode(t,r){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=t)&&(this.p.reused.push(t),n++);let s=this.pos;this.reducePos=this.pos=s+t.length,this.pushState(r,s),this.buffer.push(n,s,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,r=t.buffer.length;for(;r>0&&t.buffer[r-2]>t.reducePos;)r-=4;let n=t.buffer.slice(r),s=t.bufferBase+r;for(;t&&s==t.bufferBase;)t=t.parent;return new dV(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,s,this.curContext,this.lookAhead,t)}recoverByDelete(t,r){let n=t<=this.p.parser.maxNode;n&&this.storeNode(t,this.pos,r,4),this.storeNode(0,this.pos,r,n?8:4),this.pos=this.reducePos=r,this.score-=190}canShift(t){for(let r=new lxt(this);;){let n=this.p.parser.stateSlot(r.state,4)||this.p.parser.hasAction(r.state,t);if(n==0)return!1;if((n&65536)==0)return!0;r.reduce(n)}}recoverByInsert(t){if(this.stack.length>=300)return[];let r=this.p.parser.nextStates(this.state);if(r.length>8||this.stack.length>=120){let s=[];for(let i=0,o;i<r.length;i+=2)(o=r[i+1])!=this.state&&this.p.parser.hasAction(o,t)&&s.push(r[i],o);if(this.stack.length<120)for(let i=0;s.length<8&&i<r.length;i+=2){let o=r[i+1];s.some((a,l)=>l&1&&a==o)||s.push(r[i],o)}r=s}let n=[];for(let s=0;s<r.length&&n.length<4;s+=2){let i=r[s+1];if(i==this.state)continue;let o=this.split();o.pushState(i,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(r[s],this.pos),o.reducePos=this.pos,o.score-=200,n.push(o)}return n}forceReduce(){let{parser:t}=this.p,r=t.stateSlot(this.state,5);if((r&65536)==0)return!1;if(!t.validAction(this.state,r)){let n=r>>19,s=r&65535,i=this.stack.length-n*3;if(i<0||t.getGoto(this.stack[i],s,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;r=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(r),!0}findForcedReduction(){let{parser:t}=this.p,r=[],n=(s,i)=>{if(!r.includes(s))return r.push(s),t.allActions(s,o=>{if(!(o&393216))if(o&65536){let a=(o>>19)-i;if(a>1){let l=o&65535,c=this.stack.length-a*3;if(c>=0&&t.getGoto(this.stack[c],l,!1)>=0)return a<<19|65536|l}}else{let a=n(o,i+1);if(a!=null)return a}})};return n(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:t}=this.p;return t.data[t.stateSlot(this.state,1)]==65535&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let r=0;r<this.stack.length;r+=3)if(this.stack[r]!=t.stack[r])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,r){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(r)))}reduceContext(t,r){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(r)))}emitContext(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let r=new rce(this.curContext.tracker,t);r.hash!=this.curContext.hash&&this.emitContext(),this.curContext=r}}setLookAhead(t){t>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=t)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}};class rce{constructor(t,r){this.tracker=t,this.context=r,this.hash=t.strict?t.hash(r):0}}class lxt{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let r=t&65535,n=t>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let s=this.start.p.parser.getGoto(this.stack[this.base-3],r,!0);this.state=s}}class UI{constructor(t,r,n){this.stack=t,this.pos=r,this.index=n,this.buffer=t.buffer,this.index==0&&this.maybeNext()}static create(t,r=t.bufferBase+t.buffer.length){return new UI(t,r,r-t.bufferBase)}maybeNext(){let t=this.stack.parent;t!=null&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.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 UI(this.stack,this.pos,this.index)}}function A_(e,t=Uint16Array){if(typeof e!="string")return e;let r=null;for(let n=0,s=0;n<e.length;){let i=0;for(;;){let o=e.charCodeAt(n++),a=!1;if(o==126){i=65535;break}o>=92&&o--,o>=34&&o--;let l=o-32;if(l>=46&&(l-=46,a=!0),i+=l,a)break;i*=46}r?r[s++]=i:r=new t(i)}return r}class E${constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const nce=new E$;class cxt{constructor(t,r){this.input=t,this.ranges=r,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=nce,this.rangeIndex=0,this.pos=this.chunkPos=r[0].from,this.range=r[0],this.end=r[r.length-1].to,this.readNext()}resolveOffset(t,r){let n=this.range,s=this.rangeIndex,i=this.pos+t;for(;i<n.from;){if(!s)return null;let o=this.ranges[--s];i-=n.from-o.to,n=o}for(;r<0?i>n.to:i>=n.to;){if(s==this.ranges.length-1)return null;let o=this.ranges[++s];i+=o.from-n.to,n=o}return i}clipPos(t){if(t>=this.range.from&&t<this.range.to)return t;for(let r of this.ranges)if(r.to>t)return Math.max(t,r.from);return this.end}peek(t){let r=this.chunkOff+t,n,s;if(r>=0&&r<this.chunk.length)n=this.pos+t,s=this.chunk.charCodeAt(r);else{let i=this.resolveOffset(t,1);if(i==null)return-1;if(n=i,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)s=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let o=this.rangeIndex,a=this.range;for(;a.to<=n;)a=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-n)),s=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),s}acceptToken(t,r=0){let n=r?this.resolveOffset(r,-1):this.pos;if(n==null||n<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=n}acceptTokenTo(t,r){this.token.value=t,this.token.end=r}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:t,chunkPos:r}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=r,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let t=this.input.chunk(this.pos),r=this.pos+t.length;this.chunk=r>this.range.to?t.slice(0,this.range.to-this.pos):t,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(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,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(t,r){if(r?(this.token=r,r.start=t,r.lookAhead=t+1,r.value=r.extended=-1):this.token=nce,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(t,r){if(t>=this.chunkPos&&r<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,r-this.chunkPos);if(t>=this.chunk2Pos&&r<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,r-this.chunk2Pos);if(t>=this.range.from&&r<=this.range.to)return this.input.read(t,r);let n="";for(let s of this.ranges){if(s.from>=r)break;s.to>t&&(n+=this.input.read(Math.max(s.from,t),Math.min(s.to,r)))}return n}}class Yx{constructor(t,r){this.data=t,this.id=r}token(t,r){let{parser:n}=r.p;KDe(this.data,t,r,this.id,n.data,n.tokenPrecTable)}}Yx.prototype.contextual=Yx.prototype.fallback=Yx.prototype.extend=!1;class QI{constructor(t,r,n){this.precTable=r,this.elseToken=n,this.data=typeof t=="string"?A_(t):t}token(t,r){let n=t.pos,s=0;for(;;){let i=t.next<0,o=t.resolveOffset(1,1);if(KDe(this.data,t,r,0,this.data,this.precTable),t.token.value>-1)break;if(this.elseToken==null)return;if(i||s++,o==null)break;t.reset(o,t.token)}s&&(t.reset(n,t.token),t.acceptToken(this.elseToken,s))}}QI.prototype.contextual=Yx.prototype.fallback=Yx.prototype.extend=!1;class Cc{constructor(t,r={}){this.token=t,this.contextual=!!r.contextual,this.fallback=!!r.fallback,this.extend=!!r.extend}}function KDe(e,t,r,n,s,i){let o=0,a=1<<n,{dialect:l}=r.p.parser;e:for(;(a&e[o])!=0;){let c=e[o+1];for(let m=o+3;m<c;m+=2)if((e[m+1]&a)>0){let g=e[m];if(l.allows(g)&&(t.token.value==-1||t.token.value==g||uxt(g,t.token.value,s,i))){t.acceptToken(g);break}}let u=t.next,d=0,p=e[o+2];if(t.next<0&&p>d&&e[c+p*3-3]==65535){o=e[c+p*3-1];continue e}for(;d<p;){let m=d+p>>1,g=c+m+(m<<1),v=e[g],b=e[g+1]||65536;if(u<v)p=m;else if(u>=b)d=m+1;else{o=e[g+2],t.advance();continue e}}break}}function sce(e,t,r){for(let n=t,s;(s=e[n])!=65535;n++)if(s==r)return n-t;return-1}function uxt(e,t,r,n){let s=sce(r,n,t);return s<0||sce(r,n,e)<s}const jl=typeof oxt<"u"&&tce&&/\bparse\b/.test(tce.LOG);let X9=null;function ice(e,t,r){let n=e.cursor(vs.IncludeAnonymous);for(n.moveTo(t);;)if(!(r<0?n.childBefore(t):n.childAfter(t)))for(;;){if((r<0?n.to<t:n.from>t)&&!n.type.isError)return r<0?Math.max(0,Math.min(n.to-1,t-25)):Math.min(e.length,Math.max(n.from+1,t+25));if(r<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return r<0?0:e.length}}let dxt=class{constructor(t,r){this.fragments=t,this.nodeSet=r,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?ice(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?ice(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){let r=this.trees.length-1;if(r<0)return this.nextFragment(),null;let n=this.trees[r],s=this.index[r];if(s==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=n.children[s],o=this.start[r]+n.positions[s];if(o>t)return this.nextStart=o,null;if(i instanceof Gr){if(o==t){if(o<this.safeFrom)return null;let a=o+i.length;if(a<=this.safeTo){let l=i.prop(hr.lookAhead);if(!l||a+l<this.fragment.to)return i}}this.index[r]++,o+i.length>=Math.max(this.safeFrom,t)&&(this.trees.push(i),this.start.push(o),this.index.push(0))}else this.index[r]++,this.nextStart=o+i.length}}};class fxt{constructor(t,r){this.stream=r,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map(n=>new E$)}getActions(t){let r=0,n=null,{parser:s}=t.p,{tokenizers:i}=s,o=s.stateSlot(t.state,3),a=t.curContext?t.curContext.hash:0,l=0;for(let c=0;c<i.length;c++){if((1<<c&o)==0)continue;let u=i[c],d=this.tokens[c];if(!(n&&!u.fallback)&&((u.contextual||d.start!=t.pos||d.mask!=o||d.context!=a)&&(this.updateCachedToken(d,u,t),d.mask=o,d.context=a),d.lookAhead>d.end+25&&(l=Math.max(d.lookAhead,l)),d.value!=0)){let p=r;if(d.extended>-1&&(r=this.addActions(t,d.extended,d.end,r)),r=this.addActions(t,d.value,d.end,r),!u.extend&&(n=d,r>p))break}}for(;this.actions.length>r;)this.actions.pop();return l&&t.setLookAhead(l),!n&&t.pos==this.stream.end&&(n=new E$,n.value=t.p.parser.eofTerm,n.start=n.end=t.pos,r=this.addActions(t,n.value,n.end,r)),this.mainToken=n,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let r=new E$,{pos:n,p:s}=t;return r.start=n,r.end=Math.min(n+1,s.stream.end),r.value=n==s.stream.end?s.parser.eofTerm:0,r}updateCachedToken(t,r,n){let s=this.stream.clipPos(n.pos);if(r.token(this.stream.reset(s,t),n),t.value>-1){let{parser:i}=n.p;for(let o=0;o<i.specialized.length;o++)if(i.specialized[o]==t.value){let a=i.specializers[o](this.stream.read(t.start,t.end),n);if(a>=0&&n.p.parser.dialect.allows(a>>1)){(a&1)==0?t.value=a>>1:t.extended=a>>1;break}}}else t.value=0,t.end=this.stream.clipPos(s+1)}putAction(t,r,n,s){for(let i=0;i<s;i+=3)if(this.actions[i]==t)return s;return this.actions[s++]=t,this.actions[s++]=r,this.actions[s++]=n,s}addActions(t,r,n,s){let{state:i}=t,{parser:o}=t.p,{data:a}=o;for(let l=0;l<2;l++)for(let c=o.stateSlot(i,l?2:1);;c+=3){if(a[c]==65535)if(a[c+1]==1)c=mh(a,c+2);else{s==0&&a[c+1]==2&&(s=this.putAction(mh(a,c+2),r,n,s));break}a[c]==r&&(s=this.putAction(mh(a,c+1),r,n,s))}return s}}let pxt=class{constructor(t,r,n,s){this.parser=t,this.input=r,this.ranges=s,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 cxt(r,s),this.tokens=new fxt(t,this.stream),this.topTerm=t.top[1];let{from:i}=s[0];this.stacks=[axt.start(this,t.top[0],i)],this.fragments=n.length&&this.stream.end-i>t.bufferLength*4?new dxt(n,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t=this.stacks,r=this.minStackPos,n=this.stacks=[],s,i;if(this.bigReductionCount>300&&t.length==1){let[o]=t;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<t.length;o++){let a=t[o];for(;;){if(this.tokens.mainToken=null,a.pos>r)n.push(a);else{if(this.advanceStack(a,n,t))continue;{s||(s=[],i=[]),s.push(a);let l=this.tokens.getMainToken(a);i.push(l.value,l.end)}}break}}if(!n.length){let o=s&&mxt(s);if(o)return jl&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw jl&&s&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+r);this.recovering||(this.recovering=5)}if(this.recovering&&s){let o=this.stoppedAt!=null&&s[0].pos>this.stoppedAt?s[0]:this.runRecovery(s,i,n);if(o)return jl&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(n.length>o)for(n.sort((a,l)=>l.score-a.score);n.length>o;)n.pop();n.some(a=>a.reducePos>r)&&this.recovering--}else if(n.length>1){e:for(let o=0;o<n.length-1;o++){let a=n[o];for(let l=o+1;l<n.length;l++){let c=n[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)n.splice(l--,1);else{n.splice(o--,1);continue e}}}n.length>12&&n.splice(12,n.length-12)}this.minStackPos=n[0].pos;for(let o=1;o<n.length;o++)n[o].pos<this.minStackPos&&(this.minStackPos=n[o].pos);return null}stopAt(t){if(this.stoppedAt!=null&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}advanceStack(t,r,n){let s=t.pos,{parser:i}=this,o=jl?this.stackID(t)+" -> ":"";if(this.stoppedAt!=null&&s>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let c=t.curContext&&t.curContext.tracker.strict,u=c?t.curContext.hash:0;for(let d=this.fragments.nodeAt(s);d;){let p=this.parser.nodeSet.types[d.type.id]==d.type?i.getGoto(t.state,d.type.id):-1;if(p>-1&&d.length&&(!c||(d.prop(hr.contextHash)||0)==u))return t.useNode(d,p),jl&&console.log(o+this.stackID(t)+` (via reuse of ${i.getName(d.type.id)})`),!0;if(!(d instanceof Gr)||d.children.length==0||d.positions[0]>0)break;let m=d.children[0];if(m instanceof Gr&&d.positions[0]==0)d=m;else break}}let a=i.stateSlot(t.state,4);if(a>0)return t.reduce(a),jl&&console.log(o+this.stackID(t)+` (via always-reduce ${i.getName(a&65535)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let l=this.tokens.getActions(t);for(let c=0;c<l.length;){let u=l[c++],d=l[c++],p=l[c++],m=c==l.length||!n,g=m?t:t.split(),v=this.tokens.mainToken;if(g.apply(u,d,v?v.start:g.pos,p),jl&&console.log(o+this.stackID(g)+` (via ${(u&65536)==0?"shift":`reduce of ${i.getName(u&65535)}`} for ${i.getName(d)} @ ${s}${g==t?"":", split"})`),m)return!0;g.pos>s?r.push(g):n.push(g)}return!1}advanceFully(t,r){let n=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>n)return oce(t,r),!0}}runRecovery(t,r,n){let s=null,i=!1;for(let o=0;o<t.length;o++){let a=t[o],l=r[o<<1],c=r[(o<<1)+1],u=jl?this.stackID(a)+" -> ":"";if(a.deadEnd&&(i||(i=!0,a.restart(),jl&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,n))))continue;let d=a.split(),p=u;for(let m=0;d.forceReduce()&&m<10&&(jl&&console.log(p+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,n));m++)jl&&(p=this.stackID(d)+" -> ");for(let m of a.recoverByInsert(l))jl&&console.log(u+this.stackID(m)+" (via recover-insert)"),this.advanceFully(m,n);this.stream.end>a.pos?(c==a.pos&&(c++,l=0),a.recoverByDelete(l,c),jl&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),oce(a,n)):(!s||s.score<a.score)&&(s=a)}return s}stackToTree(t){return t.close(),Gr.build({buffer:UI.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(t){let r=(X9||(X9=new WeakMap)).get(t);return r||X9.set(t,r=String.fromCodePoint(this.nextStackID++)),r+t}};function oce(e,t){for(let r=0;r<t.length;r++){let n=t[r];if(n.pos==e.pos&&n.sameState(e)){t[r].score<e.score&&(t[r]=e);return}}t.push(e)}class hxt{constructor(t,r,n){this.source=t,this.flags=r,this.disabled=n}allows(t){return!this.disabled||this.disabled[t]==0}}const Y9=e=>e;class eAe{constructor(t){this.start=t.start,this.shift=t.shift||Y9,this.reduce=t.reduce||Y9,this.reuse=t.reuse||Y9,this.hash=t.hash||(()=>0),this.strict=t.strict!==!1}}class Wv extends s5{constructor(t){if(super(),this.wrappers=[],t.version!=14)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let r=t.nodeNames.split(" ");this.minRepeatTerm=r.length;for(let a=0;a<t.repeatNodeCount;a++)r.push("");let n=Object.keys(t.topRules).map(a=>t.topRules[a][1]),s=[];for(let a=0;a<r.length;a++)s.push([]);function i(a,l,c){s[a].push([l,l.deserialize(String(c))])}if(t.nodeProps)for(let a of t.nodeProps){let l=a[0];typeof l=="string"&&(l=hr[l]);for(let c=1;c<a.length;){let u=a[c++];if(u>=0)i(u,l,a[c++]);else{let d=a[c+-u];for(let p=-u;p>0;p--)i(a[c++],l,d);c++}}}this.nodeSet=new Xw(r.map((a,l)=>Li.define({name:l>=this.minRepeatTerm?void 0:a,id:l,props:s[l],top:n.indexOf(l)>-1,error:l==0,skipped:t.skippedNodes&&t.skippedNodes.indexOf(l)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=HDe;let o=A_(t.tokenData);this.context=t.context,this.specializerSpecs=t.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(ace),this.states=A_(t.states,Uint32Array),this.data=A_(t.stateData),this.goto=A_(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map(a=>typeof a=="number"?new Yx(o,a):a),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,r,n){let s=new pxt(this,t,r,n);for(let i of this.wrappers)s=i(s,t,r,n);return s}getGoto(t,r,n=!1){let s=this.goto;if(r>=s[0])return-1;for(let i=s[r+1];;){let o=s[i++],a=o&1,l=s[i++];if(a&&n)return l;for(let c=i+(o>>1);i<c;i++)if(s[i]==t)return l;if(a)return-1}}hasAction(t,r){let n=this.data;for(let s=0;s<2;s++)for(let i=this.stateSlot(t,s?2:1),o;;i+=3){if((o=n[i])==65535)if(n[i+1]==1)o=n[i=mh(n,i+2)];else{if(n[i+1]==2)return mh(n,i+2);break}if(o==r||o==0)return mh(n,i+1)}return 0}stateSlot(t,r){return this.states[t*6+r]}stateFlag(t,r){return(this.stateSlot(t,0)&r)>0}validAction(t,r){return!!this.allActions(t,n=>n==r?!0:null)}allActions(t,r){let n=this.stateSlot(t,4),s=n?r(n):void 0;for(let i=this.stateSlot(t,1);s==null;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=mh(this.data,i+2);else break;s=r(mh(this.data,i+1))}return s}nextStates(t){let r=[];for(let n=this.stateSlot(t,1);;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=mh(this.data,n+2);else break;if((this.data[n+2]&1)==0){let s=this.data[n+1];r.some((i,o)=>o&1&&i==s)||r.push(this.data[n],s)}}return r}configure(t){let r=Object.assign(Object.create(Wv.prototype),this);if(t.props&&(r.nodeSet=this.nodeSet.extend(...t.props)),t.top){let n=this.topRules[t.top];if(!n)throw new RangeError(`Invalid top rule name ${t.top}`);r.top=n}return t.tokenizers&&(r.tokenizers=this.tokenizers.map(n=>{let s=t.tokenizers.find(i=>i.from==n);return s?s.to:n})),t.specializers&&(r.specializers=this.specializers.slice(),r.specializerSpecs=this.specializerSpecs.map((n,s)=>{let i=t.specializers.find(a=>a.from==n.external);if(!i)return n;let o=Object.assign(Object.assign({},n),{external:i.to});return r.specializers[s]=ace(o),o})),t.contextTracker&&(r.context=t.contextTracker),t.dialect&&(r.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(r.strict=t.strict),t.wrap&&(r.wrappers=r.wrappers.concat(t.wrap)),t.bufferLength!=null&&(r.bufferLength=t.bufferLength),r}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let r=this.dynamicPrecedences;return r==null?0:r[t]||0}parseDialect(t){let r=Object.keys(this.dialects),n=r.map(()=>!1);if(t)for(let i of t.split(" ")){let o=r.indexOf(i);o>=0&&(n[o]=!0)}let s=null;for(let i=0;i<r.length;i++)if(!n[i])for(let o=this.dialects[r[i]],a;(a=this.data[o++])!=65535;)(s||(s=new Uint8Array(this.maxTerm+1)))[a]=1;return new hxt(t,n,s)}static deserialize(t){return new Wv(t)}}function mh(e,t){return e[t]|e[t+1]<<16}function mxt(e){let t=null;for(let r of e){let n=r.p.stoppedAt;(r.pos==r.p.stream.end||n!=null&&r.pos>n)&&r.p.parser.stateFlag(r.state,2)&&(!t||t.score<r.score)&&(t=r)}return t}function ace(e){if(e.external){let t=e.extend?1:0;return(r,n)=>e.external(r,n)<<1|t}return e.get}let gxt=0;class Xl{constructor(t,r,n,s){this.name=t,this.set=r,this.base=n,this.modified=s,this.id=gxt++}toString(){let{name:t}=this;for(let r of this.modified)r.name&&(t=`${r.name}(${t})`);return t}static define(t,r){let n=typeof t=="string"?t:"?";if(t instanceof Xl&&(r=t),r?.base)throw new Error("Can not derive from a modified tag");let s=new Xl(n,[],null,[]);if(s.set.push(s),r)for(let i of r.set)s.set.push(i);return s}static defineModifier(t){let r=new ZI(t);return n=>n.modified.indexOf(r)>-1?n:ZI.get(n.base||n,n.modified.concat(r).sort((s,i)=>s.id-i.id))}}let yxt=0;class ZI{constructor(t){this.name=t,this.instances=[],this.id=yxt++}static get(t,r){if(!r.length)return t;let n=r[0].instances.find(a=>a.base==t&&vxt(r,a.modified));if(n)return n;let s=[],i=new Xl(t.name,s,t,r);for(let a of r)a.instances.push(i);let o=bxt(r);for(let a of t.set)if(!a.modified.length)for(let l of o)s.push(ZI.get(a,l));return i}}function vxt(e,t){return e.length==t.length&&e.every((r,n)=>r==t[n])}function bxt(e){let t=[[]];for(let r=0;r<e.length;r++)for(let n=0,s=t.length;n<s;n++)t.push(t[n].concat(e[r]));return t.sort((r,n)=>n.length-r.length)}function R0(e){let t=Object.create(null);for(let r in e){let n=e[r];Array.isArray(n)||(n=[n]);for(let s of r.split(" "))if(s){let i=[],o=2,a=s;for(let d=0;;){if(a=="..."&&d>0&&d+3==s.length){o=1;break}let p=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!p)throw new RangeError("Invalid path: "+s);if(i.push(p[0]=="*"?"":p[0][0]=='"'?JSON.parse(p[0]):p[0]),d+=p[0].length,d==s.length)break;let m=s[d++];if(d==s.length&&m=="!"){o=0;break}if(m!="/")throw new RangeError("Invalid path: "+s);a=s.slice(d)}let l=i.length-1,c=i[l];if(!c)throw new RangeError("Invalid path: "+s);let u=new sE(n,o,l>0?i.slice(0,l):null);t[c]=u.sort(t[c])}}return tAe.add(t)}const tAe=new hr({combine(e,t){let r,n,s;for(;e||t;){if(!e||t&&e.depth>=t.depth?(s=t,t=t.next):(s=e,e=e.next),r&&r.mode==s.mode&&!s.context&&!r.context)continue;let i=new sE(s.tags,s.mode,s.context);r?r.next=i:n=i,r=i}return n}});class sE{constructor(t,r,n,s){this.tags=t,this.mode=r,this.context=n,this.next=s}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(t){return!t||t.depth<this.depth?(this.next=t,this):(t.next=this.sort(t.next),t)}get depth(){return this.context?this.context.length:0}}sE.empty=new sE([],2,null);function rAe(e,t){let r=Object.create(null);for(let i of e)if(!Array.isArray(i.tag))r[i.tag.id]=i.class;else for(let o of i.tag)r[o.id]=i.class;let{scope:n,all:s=null}=t||{};return{style:i=>{let o=s;for(let a of i)for(let l of a.set){let c=r[l.id];if(c){o=o?o+" "+c:c;break}}return o},scope:n}}function xxt(e,t){let r=null;for(let n of e){let s=n.style(t);s&&(r=r?r+" "+s:s)}return r}function wxt(e,t,r,n=0,s=e.length){let i=new Sxt(n,Array.isArray(t)?t:[t],r);i.highlightRange(e.cursor(),n,s,"",i.highlighters),i.flush(s)}class Sxt{constructor(t,r,n){this.at=t,this.highlighters=r,this.span=n,this.class=""}startSpan(t,r){r!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=r)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,r,n,s,i){let{type:o,from:a,to:l}=t;if(a>=n||l<=r)return;o.isTop&&(i=this.highlighters.filter(m=>!m.scope||m.scope(o)));let c=s,u=Oxt(t)||sE.empty,d=xxt(i,u.tags);if(d&&(c&&(c+=" "),c+=d,u.mode==1&&(s+=(s?" ":"")+d)),this.startSpan(Math.max(r,a),c),u.opaque)return;let p=t.tree&&t.tree.prop(hr.mounted);if(p&&p.overlay){let m=t.node.enter(p.overlay[0].from+a,1),g=this.highlighters.filter(b=>!b.scope||b.scope(p.tree.type)),v=t.firstChild();for(let b=0,w=a;;b++){let S=b<p.overlay.length?p.overlay[b]:null,O=S?S.from+a:l,k=Math.max(r,w),C=Math.min(n,O);if(k<C&&v)for(;t.from<C&&(this.highlightRange(t,k,C,s,i),this.startSpan(Math.min(C,t.to),c),!(t.to>=O||!t.nextSibling())););if(!S||O>n)break;w=S.to+a,w>r&&(this.highlightRange(m.cursor(),Math.max(r,S.from+a),Math.min(n,w),"",g),this.startSpan(Math.min(n,w),c))}v&&t.parent()}else if(t.firstChild()){p&&(s="");do if(!(t.to<=r)){if(t.from>=n)break;this.highlightRange(t,r,n,s,i),this.startSpan(Math.min(n,t.to),c)}while(t.nextSibling());t.parent()}}}function Oxt(e){let t=e.type.prop(tAe);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}const mt=Xl.define,j2=mt(),rg=mt(),lce=mt(rg),cce=mt(rg),ng=mt(),F2=mt(ng),J9=mt(ng),lf=mt(),Zy=mt(lf),tf=mt(),rf=mt(),fV=mt(),jO=mt(fV),L2=mt(),Y={comment:j2,lineComment:mt(j2),blockComment:mt(j2),docComment:mt(j2),name:rg,variableName:mt(rg),typeName:lce,tagName:mt(lce),propertyName:cce,attributeName:mt(cce),className:mt(rg),labelName:mt(rg),namespace:mt(rg),macroName:mt(rg),literal:ng,string:F2,docString:mt(F2),character:mt(F2),attributeValue:mt(F2),number:J9,integer:mt(J9),float:mt(J9),bool:mt(ng),regexp:mt(ng),escape:mt(ng),color:mt(ng),url:mt(ng),keyword:tf,self:mt(tf),null:mt(tf),atom:mt(tf),unit:mt(tf),modifier:mt(tf),operatorKeyword:mt(tf),controlKeyword:mt(tf),definitionKeyword:mt(tf),moduleKeyword:mt(tf),operator:rf,derefOperator:mt(rf),arithmeticOperator:mt(rf),logicOperator:mt(rf),bitwiseOperator:mt(rf),compareOperator:mt(rf),updateOperator:mt(rf),definitionOperator:mt(rf),typeOperator:mt(rf),controlOperator:mt(rf),punctuation:fV,separator:mt(fV),bracket:jO,angleBracket:mt(jO),squareBracket:mt(jO),paren:mt(jO),brace:mt(jO),content:lf,heading:Zy,heading1:mt(Zy),heading2:mt(Zy),heading3:mt(Zy),heading4:mt(Zy),heading5:mt(Zy),heading6:mt(Zy),contentSeparator:mt(lf),list:mt(lf),quote:mt(lf),emphasis:mt(lf),strong:mt(lf),link:mt(lf),monospace:mt(lf),strikethrough:mt(lf),inserted:mt(),deleted:mt(),changed:mt(),invalid:mt(),meta:L2,documentMeta:mt(L2),annotation:mt(L2),processingInstruction:mt(L2),definition:Xl.defineModifier("definition"),constant:Xl.defineModifier("constant"),function:Xl.defineModifier("function"),standard:Xl.defineModifier("standard"),local:Xl.defineModifier("local"),special:Xl.defineModifier("special")};for(let e in Y){let t=Y[e];t instanceof Xl&&(t.name=e)}rAe([{tag:Y.link,class:"tok-link"},{tag:Y.heading,class:"tok-heading"},{tag:Y.emphasis,class:"tok-emphasis"},{tag:Y.strong,class:"tok-strong"},{tag:Y.keyword,class:"tok-keyword"},{tag:Y.atom,class:"tok-atom"},{tag:Y.bool,class:"tok-bool"},{tag:Y.url,class:"tok-url"},{tag:Y.labelName,class:"tok-labelName"},{tag:Y.inserted,class:"tok-inserted"},{tag:Y.deleted,class:"tok-deleted"},{tag:Y.literal,class:"tok-literal"},{tag:Y.string,class:"tok-string"},{tag:Y.number,class:"tok-number"},{tag:[Y.regexp,Y.escape,Y.special(Y.string)],class:"tok-string2"},{tag:Y.variableName,class:"tok-variableName"},{tag:Y.local(Y.variableName),class:"tok-variableName tok-local"},{tag:Y.definition(Y.variableName),class:"tok-variableName tok-definition"},{tag:Y.special(Y.variableName),class:"tok-variableName2"},{tag:Y.definition(Y.propertyName),class:"tok-propertyName tok-definition"},{tag:Y.typeName,class:"tok-typeName"},{tag:Y.namespace,class:"tok-namespace"},{tag:Y.className,class:"tok-className"},{tag:Y.macroName,class:"tok-macroName"},{tag:Y.propertyName,class:"tok-propertyName"},{tag:Y.operator,class:"tok-operator"},{tag:Y.comment,class:"tok-comment"},{tag:Y.meta,class:"tok-meta"},{tag:Y.invalid,class:"tok-invalid"},{tag:Y.punctuation,class:"tok-punctuation"}]);const _xt=R0({String:Y.string,Number:Y.number,"True False":Y.bool,PropertyName:Y.propertyName,Null:Y.null,", :":Y.separator,"[ ]":Y.squareBracket,"{ }":Y.brace}),kxt=Wv.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[_xt],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0});let pV=[],nAe=[];(()=>{let e="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(t=>t?parseInt(t,36):1);for(let t=0,r=0;t<e.length;t++)(t%2?nAe:pV).push(r=r+e[t])})();function Ext(e){if(e<768)return!1;for(let t=0,r=pV.length;;){let n=t+r>>1;if(e<pV[n])r=n;else if(e>=nAe[n])t=n+1;else return!0;if(t==r)return!1}}function uce(e){return e>=127462&&e<=127487}const dce=8205;function Cxt(e,t,r=!0,n=!0){return(r?sAe:Txt)(e,t,n)}function sAe(e,t,r){if(t==e.length)return t;t&&iAe(e.charCodeAt(t))&&oAe(e.charCodeAt(t-1))&&t--;let n=K9(e,t);for(t+=fce(n);t<e.length;){let s=K9(e,t);if(n==dce||s==dce||r&&Ext(s))t+=fce(s),n=s;else if(uce(s)){let i=0,o=t-2;for(;o>=0&&uce(K9(e,o));)i++,o-=2;if(i%2==0)break;t+=2}else break}return t}function Txt(e,t,r){for(;t>0;){let n=sAe(e,t-2,r);if(n<t)return n;t--}return 0}function K9(e,t){let r=e.charCodeAt(t);if(!oAe(r)||t+1==e.length)return r;let n=e.charCodeAt(t+1);return iAe(n)?(r-55296<<10)+(n-56320)+65536:r}function iAe(e){return e>=56320&&e<57344}function oAe(e){return e>=55296&&e<56320}function fce(e){return e<65536?1:2}class ln{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,r,n){[t,r]=C1(this,t,r);let s=[];return this.decompose(0,t,s,2),n.length&&n.decompose(0,n.length,s,3),this.decompose(r,this.length,s,1),bf.from(s,this.length-(r-t)+n.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,r=this.length){[t,r]=C1(this,t,r);let n=[];return this.decompose(t,r,n,0),bf.from(n,r-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let r=this.scanIdentical(t,1),n=this.length-this.scanIdentical(t,-1),s=new ik(this),i=new ik(t);for(let o=r,a=r;;){if(s.next(o),i.next(o),o=0,s.lineBreak!=i.lineBreak||s.done!=i.done||s.value!=i.value)return!1;if(a+=s.value.length,s.done||a>=n)return!0}}iter(t=1){return new ik(this,t)}iterRange(t,r=this.length){return new aAe(this,t,r)}iterLines(t,r){let n;if(t==null)n=this.iter();else{r==null&&(r=this.lines+1);let s=this.line(t).from;n=this.iterRange(s,Math.max(s,r==this.lines+1?this.length:r<=1?0:this.line(r-1).to))}return new lAe(n)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(t.length==0)throw new RangeError("A document must have at least one line");return t.length==1&&!t[0]?ln.empty:t.length<=32?new bi(t):bf.from(bi.split(t,[]))}}class bi extends ln{constructor(t,r=Dxt(t)){super(),this.text=t,this.length=r}get lines(){return this.text.length}get children(){return null}lineInner(t,r,n,s){for(let i=0;;i++){let o=this.text[i],a=s+o.length;if((r?n:a)>=t)return new Axt(s,a,n,o);s=a+1,n++}}decompose(t,r,n,s){let i=t<=0&&r>=this.length?this:new bi(pce(this.text,t,r),Math.min(r,this.length)-Math.max(0,t));if(s&1){let o=n.pop(),a=C$(i.text,o.text.slice(),0,i.length);if(a.length<=32)n.push(new bi(a,o.length+i.length));else{let l=a.length>>1;n.push(new bi(a.slice(0,l)),new bi(a.slice(l)))}}else n.push(i)}replace(t,r,n){if(!(n instanceof bi))return super.replace(t,r,n);[t,r]=C1(this,t,r);let s=C$(this.text,C$(n.text,pce(this.text,0,t)),r),i=this.length+n.length-(r-t);return s.length<=32?new bi(s,i):bf.from(bi.split(s,[]),i)}sliceString(t,r=this.length,n=`
|
|
114
114
|
`){[t,r]=C1(this,t,r);let s="";for(let i=0,o=0;i<=r&&o<this.text.length;o++){let a=this.text[o],l=i+a.length;i>t&&o&&(s+=n),t<l&&r>i&&(s+=a.slice(Math.max(0,t-i),r-i)),i=l+1}return s}flatten(t){for(let r of this.text)t.push(r)}scanIdentical(){return 0}static split(t,r){let n=[],s=-1;for(let i of t)n.push(i),s+=i.length+1,n.length==32&&(r.push(new bi(n,s)),n=[],s=-1);return s>-1&&r.push(new bi(n,s)),r}}class bf extends ln{constructor(t,r){super(),this.children=t,this.length=r,this.lines=0;for(let n of t)this.lines+=n.lines}lineInner(t,r,n,s){for(let i=0;;i++){let o=this.children[i],a=s+o.length,l=n+o.lines-1;if((r?l:a)>=t)return o.lineInner(t,r,n,s);s=a+1,n=l+1}}decompose(t,r,n,s){for(let i=0,o=0;o<=r&&i<this.children.length;i++){let a=this.children[i],l=o+a.length;if(t<=l&&r>=o){let c=s&((o<=t?1:0)|(l>=r?2:0));o>=t&&l<=r&&!c?n.push(a):a.decompose(t-o,r-o,n,c)}o=l+1}}replace(t,r,n){if([t,r]=C1(this,t,r),n.lines<this.lines)for(let s=0,i=0;s<this.children.length;s++){let o=this.children[s],a=i+o.length;if(t>=i&&r<=a){let l=o.replace(t-i,r-i,n),c=this.lines-o.lines+l.lines;if(l.lines<c>>4&&l.lines>c>>6){let u=this.children.slice();return u[s]=l,new bf(u,this.length-(r-t)+n.length)}return super.replace(i,a,l)}i=a+1}return super.replace(t,r,n)}sliceString(t,r=this.length,n=`
|
|
115
115
|
`){[t,r]=C1(this,t,r);let s="";for(let i=0,o=0;i<this.children.length&&o<=r;i++){let a=this.children[i],l=o+a.length;o>t&&i&&(s+=n),t<l&&r>o&&(s+=a.sliceString(t-o,r-o,n)),o=l+1}return s}flatten(t){for(let r of this.children)r.flatten(t)}scanIdentical(t,r){if(!(t instanceof bf))return 0;let n=0,[s,i,o,a]=r>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;s+=r,i+=r){if(s==o||i==a)return n;let l=this.children[s],c=t.children[i];if(l!=c)return n+l.scanIdentical(c,r);n+=l.length+1}}static from(t,r=t.reduce((n,s)=>n+s.length+1,-1)){let n=0;for(let m of t)n+=m.lines;if(n<32){let m=[];for(let g of t)g.flatten(m);return new bi(m,r)}let s=Math.max(32,n>>5),i=s<<1,o=s>>1,a=[],l=0,c=-1,u=[];function d(m){let g;if(m.lines>i&&m instanceof bf)for(let v of m.children)d(v);else m.lines>o&&(l>o||!l)?(p(),a.push(m)):m instanceof bi&&l&&(g=u[u.length-1])instanceof bi&&m.lines+g.lines<=32?(l+=m.lines,c+=m.length+1,u[u.length-1]=new bi(g.text.concat(m.text),g.length+1+m.length)):(l+m.lines>s&&p(),l+=m.lines,c+=m.length+1,u.push(m))}function p(){l!=0&&(a.push(u.length==1?u[0]:bf.from(u,c)),c=-1,l=u.length=0)}for(let m of t)d(m);return p(),a.length==1?a[0]:new bf(a,r)}}ln.empty=new bi([""],0);function Dxt(e){let t=-1;for(let r of e)t+=r.length+1;return t}function C$(e,t,r=0,n=1e9){for(let s=0,i=0,o=!0;i<e.length&&s<=n;i++){let a=e[i],l=s+a.length;l>=r&&(l>n&&(a=a.slice(0,n-s)),s<r&&(a=a.slice(r-s)),o?(t[t.length-1]+=a,o=!1):t.push(a)),s=l+1}return t}function pce(e,t,r){return C$(e,[""],t,r)}class ik{constructor(t,r=1){this.dir=r,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[r>0?1:(t instanceof bi?t.text.length:t.children.length)<<1]}nextInner(t,r){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,s=this.nodes[n],i=this.offsets[n],o=i>>1,a=s instanceof bi?s.text.length:s.children.length;if(o==(r>0?a:0)){if(n==0)return this.done=!0,this.value="",this;r>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(r>0?0:1)){if(this.offsets[n]+=r,t==0)return this.lineBreak=!0,this.value=`
|
|
116
116
|
`,this;t--}else if(s instanceof bi){let l=s.text[o+(r<0?-1:0)];if(this.offsets[n]+=r,l.length>Math.max(0,t))return this.value=t==0?l:r>0?l.slice(t):l.slice(0,l.length-t),this;t-=l.length}else{let l=s.children[o+(r<0?-1:0)];t>l.length?(t-=l.length,this.offsets[n]+=r):(r<0&&this.offsets[n]--,this.nodes.push(l),this.offsets.push(r>0?1:(l instanceof bi?l.text.length:l.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class aAe{constructor(t,r,n){this.value="",this.done=!1,this.cursor=new ik(t,r>n?-1:1),this.pos=r>n?t.length:0,this.from=Math.min(r,n),this.to=Math.max(r,n)}nextInner(t,r){if(r<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,r<0?this.pos-this.to:this.from-this.pos);let n=r<0?this.pos-this.from:this.to-this.pos;t>n&&(t=n),n-=t;let{value:s}=this.cursor.next(t);return this.pos+=(s.length+t)*r,this.value=s.length<=n?s:r<0?s.slice(s.length-n):s.slice(0,n),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class lAe{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:r,lineBreak:n,value:s}=this.inner.next(t);return r&&this.afterBreak?(this.value="",this.afterBreak=!1):r?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(ln.prototype[Symbol.iterator]=function(){return this.iter()},ik.prototype[Symbol.iterator]=aAe.prototype[Symbol.iterator]=lAe.prototype[Symbol.iterator]=function(){return this});let Axt=class{constructor(t,r,n,s){this.from=t,this.to=r,this.number=n,this.text=s}get length(){return this.to-this.from}};function C1(e,t,r){return t=Math.max(0,Math.min(e.length,t)),[t,Math.max(t,Math.min(e.length,r))]}function Po(e,t,r=!0,n=!0){return Cxt(e,t,r,n)}function Pxt(e){return e>=56320&&e<57344}function $xt(e){return e>=55296&&e<56320}function el(e,t){let r=e.charCodeAt(t);if(!$xt(r)||t+1==e.length)return r;let n=e.charCodeAt(t+1);return Pxt(n)?(r-55296<<10)+(n-56320)+65536:r}function NG(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}function xf(e){return e<65536?1:2}const hV=/\r\n?|\n/;var Ao=(function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e})(Ao||(Ao={}));class jf{constructor(t){this.sections=t}get length(){let t=0;for(let r=0;r<this.sections.length;r+=2)t+=this.sections[r];return t}get newLength(){let t=0;for(let r=0;r<this.sections.length;r+=2){let n=this.sections[r+1];t+=n<0?this.sections[r]:n}return t}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(t){for(let r=0,n=0,s=0;r<this.sections.length;){let i=this.sections[r++],o=this.sections[r++];o<0?(t(n,s,i),s+=i):s+=o,n+=i}}iterChangedRanges(t,r=!1){mV(this,t,r)}get invertedDesc(){let t=[];for(let r=0;r<this.sections.length;){let n=this.sections[r++],s=this.sections[r++];s<0?t.push(n,s):t.push(s,n)}return new jf(t)}composeDesc(t){return this.empty?t:t.empty?this:cAe(this,t)}mapDesc(t,r=!1){return t.empty?this:gV(this,t,r)}mapPos(t,r=-1,n=Ao.Simple){let s=0,i=0;for(let o=0;o<this.sections.length;){let a=this.sections[o++],l=this.sections[o++],c=s+a;if(l<0){if(c>t)return i+(t-s);i+=a}else{if(n!=Ao.Simple&&c>=t&&(n==Ao.TrackDel&&s<t&&c>t||n==Ao.TrackBefore&&s<t||n==Ao.TrackAfter&&c>t))return null;if(c>t||c==t&&r<0&&!a)return t==s||r<0?i:i+l;i+=l}s=c}if(t>s)throw new RangeError(`Position ${t} is out of range for changeset of length ${s}`);return i}touchesRange(t,r=t){for(let n=0,s=0;n<this.sections.length&&s<=r;){let i=this.sections[n++],o=this.sections[n++],a=s+i;if(o>=0&&s<=r&&a>=t)return s<t&&a>r?"cover":!0;s=a}return!1}toString(){let t="";for(let r=0;r<this.sections.length;){let n=this.sections[r++],s=this.sections[r++];t+=(t?" ":"")+n+(s>=0?":"+s:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(r=>typeof r!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new jf(t)}static create(t){return new jf(t)}}class Yi extends jf{constructor(t,r){super(t),this.inserted=r}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return mV(this,(r,n,s,i,o)=>t=t.replace(s,s+(n-r),o),!1),t}mapDesc(t,r=!1){return gV(this,t,r,!0)}invert(t){let r=this.sections.slice(),n=[];for(let s=0,i=0;s<r.length;s+=2){let o=r[s],a=r[s+1];if(a>=0){r[s]=a,r[s+1]=o;let l=s>>1;for(;n.length<l;)n.push(ln.empty);n.push(o?t.slice(i,i+o):ln.empty)}i+=o}return new Yi(r,n)}compose(t){return this.empty?t:t.empty?this:cAe(this,t,!0)}map(t,r=!1){return t.empty?this:gV(this,t,r,!0)}iterChanges(t,r=!1){mV(this,t,r)}get desc(){return jf.create(this.sections)}filter(t){let r=[],n=[],s=[],i=new iE(this);e:for(let o=0,a=0;;){let l=o==t.length?1e9:t[o++];for(;a<l||a==l&&i.len==0;){if(i.done)break e;let u=Math.min(i.len,l-a);Ho(s,u,-1);let d=i.ins==-1?-1:i.off==0?i.ins:0;Ho(r,u,d),d>0&&cg(n,r,i.text),i.forward(u),a+=u}let c=t[o++];for(;a<c;){if(i.done)break e;let u=Math.min(i.len,c-a);Ho(r,u,-1),Ho(s,u,i.ins==-1?-1:i.off==0?i.ins:0),i.forward(u),a+=u}}return{changes:new Yi(r,n),filtered:jf.create(s)}}toJSON(){let t=[];for(let r=0;r<this.sections.length;r+=2){let n=this.sections[r],s=this.sections[r+1];s<0?t.push(n):s==0?t.push([n]):t.push([n].concat(this.inserted[r>>1].toJSON()))}return t}static of(t,r,n){let s=[],i=[],o=0,a=null;function l(u=!1){if(!u&&!s.length)return;o<r&&Ho(s,r-o,-1);let d=new Yi(s,i);a=a?a.compose(d.map(a)):d,s=[],i=[],o=0}function c(u){if(Array.isArray(u))for(let d of u)c(d);else if(u instanceof Yi){if(u.length!=r)throw new RangeError(`Mismatched change set length (got ${u.length}, expected ${r})`);l(),a=a?a.compose(u.map(a)):u}else{let{from:d,to:p=d,insert:m}=u;if(d>p||d<0||p>r)throw new RangeError(`Invalid change range ${d} to ${p} (in doc of length ${r})`);let g=m?typeof m=="string"?ln.of(m.split(n||hV)):m:ln.empty,v=g.length;if(d==p&&v==0)return;d<o&&l(),d>o&&Ho(s,d-o,-1),Ho(s,p-d,v),cg(i,s,g),o=p}}return c(t),l(!a),a}static empty(t){return new Yi(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let r=[],n=[];for(let s=0;s<t.length;s++){let i=t[s];if(typeof i=="number")r.push(i,-1);else{if(!Array.isArray(i)||typeof i[0]!="number"||i.some((o,a)=>a&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(i.length==1)r.push(i[0],0);else{for(;n.length<s;)n.push(ln.empty);n[s]=ln.of(i.slice(1)),r.push(i[0],n[s].length)}}}return new Yi(r,n)}static createSet(t,r){return new Yi(t,r)}}function Ho(e,t,r,n=!1){if(t==0&&r<=0)return;let s=e.length-2;s>=0&&r<=0&&r==e[s+1]?e[s]+=t:s>=0&&t==0&&e[s]==0?e[s+1]+=r:n?(e[s]+=t,e[s+1]+=r):e.push(t,r)}function cg(e,t,r){if(r.length==0)return;let n=t.length-2>>1;if(n<e.length)e[e.length-1]=e[e.length-1].append(r);else{for(;e.length<n;)e.push(ln.empty);e.push(r)}}function mV(e,t,r){let n=e.inserted;for(let s=0,i=0,o=0;o<e.sections.length;){let a=e.sections[o++],l=e.sections[o++];if(l<0)s+=a,i+=a;else{let c=s,u=i,d=ln.empty;for(;c+=a,u+=l,l&&n&&(d=d.append(n[o-2>>1])),!(r||o==e.sections.length||e.sections[o+1]<0);)a=e.sections[o++],l=e.sections[o++];t(s,c,i,u,d),s=c,i=u}}}function gV(e,t,r,n=!1){let s=[],i=n?[]:null,o=new iE(e),a=new iE(t);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);Ho(s,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&&!r))){let c=a.len;for(Ho(s,a.ins,-1);c;){let u=Math.min(o.len,c);o.ins>=0&&l<o.i&&o.len<=u&&(Ho(s,0,o.ins),i&&cg(i,s,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 d=Math.min(u,a.len);c+=d,u-=d,a.forward(d)}else if(a.ins==0&&a.len<u)u-=a.len,a.next();else break;Ho(s,c,l<o.i?o.ins:0),i&&l<o.i&&cg(i,s,o.text),l=o.i,o.forward(o.len-u)}else{if(o.done&&a.done)return i?Yi.createSet(s,i):jf.create(s);throw new Error("Mismatched change set lengths")}}}function cAe(e,t,r=!1){let n=[],s=r?[]:null,i=new iE(e),o=new iE(t);for(let a=!1;;){if(i.done&&o.done)return s?Yi.createSet(n,s):jf.create(n);if(i.ins==0)Ho(n,i.len,0,a),i.next();else if(o.len==0&&!o.done)Ho(n,0,o.ins,a),s&&cg(s,n,o.text),o.next();else{if(i.done||o.done)throw new Error("Mismatched change set lengths");{let l=Math.min(i.len2,o.len),c=n.length;if(i.ins==-1){let u=o.ins==-1?-1:o.off?0:o.ins;Ho(n,l,u,a),s&&u&&cg(s,n,o.text)}else o.ins==-1?(Ho(n,i.off?0:i.len,l,a),s&&cg(s,n,i.textBit(l))):(Ho(n,i.off?0:i.len,o.off?0:o.ins,a),s&&!o.off&&cg(s,n,o.text));a=(i.ins>l||o.ins>=0&&o.len>l)&&(a||n.length>c),i.forward2(l),o.forward(l)}}}}class iE{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i<t.length?(this.len=t[this.i++],this.ins=t[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:t}=this.set,r=this.i-2>>1;return r>=t.length?ln.empty:t[r]}textBit(t){let{inserted:r}=this.set,n=this.i-2>>1;return n>=r.length&&!t?ln.empty:r[n].slice(this.off,t==null?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){this.ins==-1?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class hv{constructor(t,r,n){this.from=t,this.to=r,this.flags=n}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 t=this.flags&7;return t==7?null:t}get goalColumn(){let t=this.flags>>6;return t==16777215?void 0:t}map(t,r=-1){let n,s;return this.empty?n=s=t.mapPos(this.from,r):(n=t.mapPos(this.from,1),s=t.mapPos(this.to,-1)),n==this.from&&s==this.to?this:new hv(n,s,this.flags)}extend(t,r=t){if(t<=this.anchor&&r>=this.anchor)return Ne.range(t,r);let n=Math.abs(t-this.anchor)>Math.abs(r-this.anchor)?t:r;return Ne.range(this.anchor,n)}eq(t,r=!1){return this.anchor==t.anchor&&this.head==t.head&&(!r||!this.empty||this.assoc==t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Ne.range(t.anchor,t.head)}static create(t,r,n){return new hv(t,r,n)}}class Ne{constructor(t,r){this.ranges=t,this.mainIndex=r}map(t,r=-1){return t.empty?this:Ne.create(this.ranges.map(n=>n.map(t,r)),this.mainIndex)}eq(t,r=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(t.ranges[n],r))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new Ne([this.main],0)}addRange(t,r=!0){return Ne.create([t].concat(this.ranges),r?0:this.mainIndex+1)}replaceRange(t,r=this.mainIndex){let n=this.ranges.slice();return n[r]=t,Ne.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(t=>t.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!="number"||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Ne(t.ranges.map(r=>hv.fromJSON(r)),t.main)}static single(t,r=t){return new Ne([Ne.range(t,r)],0)}static create(t,r=0){if(t.length==0)throw new RangeError("A selection needs at least one range");for(let n=0,s=0;s<t.length;s++){let i=t[s];if(i.empty?i.from<=n:i.from<n)return Ne.normalized(t.slice(),r);n=i.to}return new Ne(t,r)}static cursor(t,r=0,n,s){return hv.create(t,t,(r==0?0:r<0?8:16)|(n==null?7:Math.min(6,n))|(s??16777215)<<6)}static range(t,r,n,s){let i=(n??16777215)<<6|(s==null?7:Math.min(6,s));return r<t?hv.create(r,t,48|i):hv.create(t,r,(r>t?8:0)|i)}static normalized(t,r=0){let n=t[r];t.sort((s,i)=>s.from-i.from),r=t.indexOf(n);for(let s=1;s<t.length;s++){let i=t[s],o=t[s-1];if(i.empty?i.from<=o.to:i.from<o.to){let a=o.from,l=Math.max(i.to,o.to);s<=r&&r--,t.splice(--s,2,i.anchor>i.head?Ne.range(l,a):Ne.range(a,l))}}return new Ne(t,r)}}function uAe(e,t){for(let r of e.ranges)if(r.to>t)throw new RangeError("Selection points outside of document")}let RG=0;class kt{constructor(t,r,n,s,i){this.combine=t,this.compareInput=r,this.compare=n,this.isStatic=s,this.id=RG++,this.default=t([]),this.extensions=typeof i=="function"?i(this):i}get reader(){return this}static define(t={}){return new kt(t.combine||(r=>r),t.compareInput||((r,n)=>r===n),t.compare||(t.combine?(r,n)=>r===n:MG),!!t.static,t.enables)}of(t){return new T$([],this,0,t)}compute(t,r){if(this.isStatic)throw new Error("Can't compute a static facet");return new T$(t,this,1,r)}computeN(t,r){if(this.isStatic)throw new Error("Can't compute a static facet");return new T$(t,this,2,r)}from(t,r){return r||(r=n=>n),this.compute([t],n=>r(n.field(t)))}}function MG(e,t){return e==t||e.length==t.length&&e.every((r,n)=>r===t[n])}class T${constructor(t,r,n,s){this.dependencies=t,this.facet=r,this.type=n,this.value=s,this.id=RG++}dynamicSlot(t){var r;let n=this.value,s=this.facet.compareInput,i=this.id,o=t[i]>>1,a=this.type==2,l=!1,c=!1,u=[];for(let d of this.dependencies)d=="doc"?l=!0:d=="selection"?c=!0:(((r=t[d.id])!==null&&r!==void 0?r:1)&1)==0&&u.push(t[d.id]);return{create(d){return d.values[o]=n(d),1},update(d,p){if(l&&p.docChanged||c&&(p.docChanged||p.selection)||yV(d,u)){let m=n(d);if(a?!hce(m,d.values[o],s):!s(m,d.values[o]))return d.values[o]=m,1}return 0},reconfigure:(d,p)=>{let m,g=p.config.address[i];if(g!=null){let v=HI(p,g);if(this.dependencies.every(b=>b instanceof kt?p.facet(b)===d.facet(b):b instanceof ho?p.field(b,!1)==d.field(b,!1):!0)||(a?hce(m=n(d),v,s):s(m=n(d),v)))return d.values[o]=v,0}else m=n(d);return d.values[o]=m,1}}}}function hce(e,t,r){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1;return!0}function yV(e,t){let r=!1;for(let n of t)ok(e,n)&1&&(r=!0);return r}function Ixt(e,t,r){let n=r.map(l=>e[l.id]),s=r.map(l=>l.type),i=n.filter(l=>!(l&1)),o=e[t.id]>>1;function a(l){let c=[];for(let u=0;u<n.length;u++){let d=HI(l,n[u]);if(s[u]==2)for(let p of d)c.push(p);else c.push(d)}return t.combine(c)}return{create(l){for(let c of n)ok(l,c);return l.values[o]=a(l),1},update(l,c){if(!yV(l,i))return 0;let u=a(l);return t.compare(u,l.values[o])?0:(l.values[o]=u,1)},reconfigure(l,c){let u=yV(l,n),d=c.config.facets[t.id],p=c.facet(t);if(d&&!u&&MG(r,d))return l.values[o]=p,0;let m=a(l);return t.compare(m,p)?(l.values[o]=p,0):(l.values[o]=m,1)}}}const z2=kt.define({static:!0});class ho{constructor(t,r,n,s,i){this.id=t,this.createF=r,this.updateF=n,this.compareF=s,this.spec=i,this.provides=void 0}static define(t){let r=new ho(RG++,t.create,t.update,t.compare||((n,s)=>n===s),t);return t.provide&&(r.provides=t.provide(r)),r}create(t){let r=t.facet(z2).find(n=>n.field==this);return(r?.create||this.createF)(t)}slot(t){let r=t[this.id]>>1;return{create:n=>(n.values[r]=this.create(n),1),update:(n,s)=>{let i=n.values[r],o=this.updateF(i,s);return this.compareF(i,o)?0:(n.values[r]=o,1)},reconfigure:(n,s)=>{let i=n.facet(z2),o=s.facet(z2),a;return(a=i.find(l=>l.field==this))&&a!=o.find(l=>l.field==this)?(n.values[r]=a.create(n),1):s.config.address[this.id]!=null?(n.values[r]=s.field(this),0):(n.values[r]=this.create(n),1)}}}init(t){return[this,z2.of({field:this,create:t})]}get extension(){return this}}const lv={lowest:4,low:3,default:2,high:1,highest:0};function FO(e){return t=>new dAe(t,e)}const Yh={highest:FO(lv.highest),high:FO(lv.high),default:FO(lv.default),low:FO(lv.low),lowest:FO(lv.lowest)};class dAe{constructor(t,r){this.inner=t,this.prec=r}}class i5{of(t){return new vV(this,t)}reconfigure(t){return i5.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class vV{constructor(t,r){this.compartment=t,this.inner=r}}class qI{constructor(t,r,n,s,i,o){for(this.base=t,this.compartments=r,this.dynamicSlots=n,this.address=s,this.staticValues=i,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(t){let r=this.address[t.id];return r==null?t.default:this.staticValues[r>>1]}static resolve(t,r,n){let s=[],i=Object.create(null),o=new Map;for(let p of Nxt(t,r,o))p instanceof ho?s.push(p):(i[p.facet.id]||(i[p.facet.id]=[])).push(p);let a=Object.create(null),l=[],c=[];for(let p of s)a[p.id]=c.length<<1,c.push(m=>p.slot(m));let u=n?.config.facets;for(let p in i){let m=i[p],g=m[0].facet,v=u&&u[p]||[];if(m.every(b=>b.type==0))if(a[g.id]=l.length<<1|1,MG(v,m))l.push(n.facet(g));else{let b=g.combine(m.map(w=>w.value));l.push(n&&g.compare(b,n.facet(g))?n.facet(g):b)}else{for(let b of m)b.type==0?(a[b.id]=l.length<<1|1,l.push(b.value)):(a[b.id]=c.length<<1,c.push(w=>b.dynamicSlot(w)));a[g.id]=c.length<<1,c.push(b=>Ixt(b,g,m))}}let d=c.map(p=>p(a));return new qI(t,o,d,a,l,i)}}function Nxt(e,t,r){let n=[[],[],[],[],[]],s=new Map;function i(o,a){let l=s.get(o);if(l!=null){if(l<=a)return;let c=n[l].indexOf(o);c>-1&&n[l].splice(c,1),o instanceof vV&&r.delete(o.compartment)}if(s.set(o,a),Array.isArray(o))for(let c of o)i(c,a);else if(o instanceof vV){if(r.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=t.get(o.compartment)||o.inner;r.set(o.compartment,c),i(c,a)}else if(o instanceof dAe)i(o.inner,o.prec);else if(o instanceof ho)n[a].push(o),o.provides&&i(o.provides,a);else if(o instanceof T$)n[a].push(o),o.facet.extensions&&i(o.facet.extensions,lv.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.`);i(c,a)}}return i(e,lv.default),n.reduce((o,a)=>o.concat(a))}function ok(e,t){if(t&1)return 2;let r=t>>1,n=e.status[r];if(n==4)throw new Error("Cyclic dependency between fields and/or facets");if(n&2)return n;e.status[r]=4;let s=e.computeSlot(e,e.config.dynamicSlots[r]);return e.status[r]=2|s}function HI(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}const fAe=kt.define(),bV=kt.define({combine:e=>e.some(t=>t),static:!0}),pAe=kt.define({combine:e=>e.length?e[0]:void 0,static:!0}),hAe=kt.define(),mAe=kt.define(),gAe=kt.define(),yAe=kt.define({combine:e=>e.length?e[0]:!1});class dp{constructor(t,r){this.type=t,this.value=r}static define(){return new Rxt}}class Rxt{of(t){return new dp(this,t)}}class Mxt{constructor(t){this.map=t}of(t){return new yr(this,t)}}class yr{constructor(t,r){this.type=t,this.value=r}map(t){let r=this.type.map(this.value,t);return r===void 0?void 0:r==this.value?this:new yr(this.type,r)}is(t){return this.type==t}static define(t={}){return new Mxt(t.map||(r=>r))}static mapEffects(t,r){if(!t.length)return t;let n=[];for(let s of t){let i=s.map(r);i&&n.push(i)}return n}}yr.reconfigure=yr.define();yr.appendConfig=yr.define();class Ri{constructor(t,r,n,s,i,o){this.startState=t,this.changes=r,this.selection=n,this.effects=s,this.annotations=i,this.scrollIntoView=o,this._doc=null,this._state=null,n&&uAe(n,r.newLength),i.some(a=>a.type==Ri.time)||(this.annotations=i.concat(Ri.time.of(Date.now())))}static create(t,r,n,s,i,o){return new Ri(t,r,n,s,i,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(t){for(let r of this.annotations)if(r.type==t)return r.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let r=this.annotation(Ri.userEvent);return!!(r&&(r==t||r.length>t.length&&r.slice(0,t.length)==t&&r[t.length]=="."))}}Ri.time=dp.define();Ri.userEvent=dp.define();Ri.addToHistory=dp.define();Ri.remote=dp.define();function jxt(e,t){let r=[];for(let n=0,s=0;;){let i,o;if(n<e.length&&(s==t.length||t[s]>=e[n]))i=e[n++],o=e[n++];else if(s<t.length)i=t[s++],o=t[s++];else return r;!r.length||r[r.length-1]<i?r.push(i,o):r[r.length-1]<o&&(r[r.length-1]=o)}}function vAe(e,t,r){var n;let s,i,o;return r?(s=t.changes,i=Yi.empty(t.changes.length),o=e.changes.compose(t.changes)):(s=t.changes.map(e.changes),i=e.changes.mapDesc(t.changes,!0),o=e.changes.compose(s)),{changes:o,selection:t.selection?t.selection.map(i):(n=e.selection)===null||n===void 0?void 0:n.map(s),effects:yr.mapEffects(e.effects,s).concat(yr.mapEffects(t.effects,i)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function xV(e,t,r){let n=t.selection,s=Jx(t.annotations);return t.userEvent&&(s=s.concat(Ri.userEvent.of(t.userEvent))),{changes:t.changes instanceof Yi?t.changes:Yi.of(t.changes||[],r,e.facet(pAe)),selection:n&&(n instanceof Ne?n:Ne.single(n.anchor,n.head)),effects:Jx(t.effects),annotations:s,scrollIntoView:!!t.scrollIntoView}}function bAe(e,t,r){let n=xV(e,t.length?t[0]:{},e.doc.length);t.length&&t[0].filter===!1&&(r=!1);for(let i=1;i<t.length;i++){t[i].filter===!1&&(r=!1);let o=!!t[i].sequential;n=vAe(n,xV(e,t[i],o?n.changes.newLength:e.doc.length),o)}let s=Ri.create(e,n.changes,n.selection,n.effects,n.annotations,n.scrollIntoView);return Lxt(r?Fxt(s):s)}function Fxt(e){let t=e.startState,r=!0;for(let s of t.facet(hAe)){let i=s(e);if(i===!1){r=!1;break}Array.isArray(i)&&(r=r===!0?i:jxt(r,i))}if(r!==!0){let s,i;if(r===!1)i=e.changes.invertedDesc,s=Yi.empty(t.doc.length);else{let o=e.changes.filter(r);s=o.changes,i=o.filtered.mapDesc(o.changes).invertedDesc}e=Ri.create(t,s,e.selection&&e.selection.map(i),yr.mapEffects(e.effects,i),e.annotations,e.scrollIntoView)}let n=t.facet(mAe);for(let s=n.length-1;s>=0;s--){let i=n[s](e);i instanceof Ri?e=i:Array.isArray(i)&&i.length==1&&i[0]instanceof Ri?e=i[0]:e=bAe(t,Jx(i),!1)}return e}function Lxt(e){let t=e.startState,r=t.facet(gAe),n=e;for(let s=r.length-1;s>=0;s--){let i=r[s](e);i&&Object.keys(i).length&&(n=vAe(n,xV(t,i,e.changes.newLength),!0))}return n==e?e:Ri.create(t,e.changes,e.selection,n.effects,n.annotations,n.scrollIntoView)}const zxt=[];function Jx(e){return e==null?zxt:Array.isArray(e)?e:[e]}var Vs=(function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e})(Vs||(Vs={}));const Bxt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let wV;try{wV=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function Vxt(e){if(wV)return wV.test(e);for(let t=0;t<e.length;t++){let r=e[t];if(/\w/.test(r)||r>""&&(r.toUpperCase()!=r.toLowerCase()||Bxt.test(r)))return!0}return!1}function Uxt(e){return t=>{if(!/\S/.test(t))return Vs.Space;if(Vxt(t))return Vs.Word;for(let r=0;r<e.length;r++)if(t.indexOf(e[r])>-1)return Vs.Word;return Vs.Other}}class Jr{constructor(t,r,n,s,i,o){this.config=t,this.doc=r,this.selection=n,this.values=s,this.status=t.statusTemplate.slice(),this.computeSlot=i,o&&(o._state=this);for(let a=0;a<this.config.dynamicSlots.length;a++)ok(this,a<<1);this.computeSlot=null}field(t,r=!0){let n=this.config.address[t.id];if(n==null){if(r)throw new RangeError("Field is not present in this state");return}return ok(this,n),HI(this,n)}update(...t){return bAe(this,t,!0)}applyTransaction(t){let r=this.config,{base:n,compartments:s}=r;for(let a of t.effects)a.is(i5.reconfigure)?(r&&(s=new Map,r.compartments.forEach((l,c)=>s.set(c,l)),r=null),s.set(a.value.compartment,a.value.extension)):a.is(yr.reconfigure)?(r=null,n=a.value):a.is(yr.appendConfig)&&(r=null,n=Jx(n).concat(a.value));let i;r?i=t.startState.values.slice():(r=qI.resolve(n,s,this),i=new Jr(r,this.doc,this.selection,r.dynamicSlots.map(()=>null),(l,c)=>c.reconfigure(l,this),null).values);let o=t.startState.facet(bV)?t.newSelection:t.newSelection.asSingle();new Jr(r,t.newDoc,o,i,(a,l)=>l.update(a,t),t)}replaceSelection(t){return typeof t=="string"&&(t=this.toText(t)),this.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:t},range:Ne.cursor(r.from+t.length)}))}changeByRange(t){let r=this.selection,n=t(r.ranges[0]),s=this.changes(n.changes),i=[n.range],o=Jx(n.effects);for(let a=1;a<r.ranges.length;a++){let l=t(r.ranges[a]),c=this.changes(l.changes),u=c.map(s);for(let p=0;p<a;p++)i[p]=i[p].map(u);let d=s.mapDesc(c,!0);i.push(l.range.map(d)),s=s.compose(u),o=yr.mapEffects(o,u).concat(yr.mapEffects(Jx(l.effects),d))}return{changes:s,selection:Ne.create(i,r.mainIndex),effects:o}}changes(t=[]){return t instanceof Yi?t:Yi.of(t,this.doc.length,this.facet(Jr.lineSeparator))}toText(t){return ln.of(t.split(this.facet(Jr.lineSeparator)||hV))}sliceDoc(t=0,r=this.doc.length){return this.doc.sliceString(t,r,this.lineBreak)}facet(t){let r=this.config.address[t.id];return r==null?t.default:(ok(this,r),HI(this,r))}toJSON(t){let r={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(let n in t){let s=t[n];s instanceof ho&&this.config.address[s.id]!=null&&(r[n]=s.spec.toJSON(this.field(t[n]),this))}return r}static fromJSON(t,r={},n){if(!t||typeof t.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let s=[];if(n){for(let i in n)if(Object.prototype.hasOwnProperty.call(t,i)){let o=n[i],a=t[i];s.push(o.init(l=>o.spec.fromJSON(a,l)))}}return Jr.create({doc:t.doc,selection:Ne.fromJSON(t.selection),extensions:r.extensions?s.concat([r.extensions]):s})}static create(t={}){let r=qI.resolve(t.extensions||[],new Map),n=t.doc instanceof ln?t.doc:ln.of((t.doc||"").split(r.staticFacet(Jr.lineSeparator)||hV)),s=t.selection?t.selection instanceof Ne?t.selection:Ne.single(t.selection.anchor,t.selection.head):Ne.single(0);return uAe(s,n.length),r.staticFacet(bV)||(s=s.asSingle()),new Jr(r,n,s,r.dynamicSlots.map(()=>null),(i,o)=>o.create(i),null)}get tabSize(){return this.facet(Jr.tabSize)}get lineBreak(){return this.facet(Jr.lineSeparator)||`
|
|
@@ -190,7 +190,7 @@ Error message: ${UX(r)}`,cause:r}),this[B3e]=!0,this.value=t}static isInstance(t
|
|
|
190
190
|
]))`;continue}else if(s[c]==="$"){i+=`($|(?=[\r
|
|
191
191
|
]))`;continue}}if(n.s&&s[c]==="."){i+=a?`${s[c]}\r
|
|
192
192
|
`:`[${s[c]}\r
|
|
193
|
-
]`;continue}i+=s[c],s[c]==="\\"?o=!0:a&&s[c]==="]"?a=!1:!a&&s[c]==="["&&(a=!0)}return i}function G3e(e,t){var r,n,s,i,o,a;const l={type:"object",additionalProperties:(r=Bn(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]}))!=null?r:t.allowedAdditionalProperties};if(((n=e.keyType)==null?void 0:n._def.typeName)===ne.ZodString&&((s=e.keyType._def.checks)!=null&&s.length)){const{type:c,...u}=W3e(e.keyType._def,t);return{...l,propertyNames:u}}else{if(((i=e.keyType)==null?void 0:i._def.typeName)===ne.ZodEnum)return{...l,propertyNames:{enum:e.keyType._def.values}};if(((o=e.keyType)==null?void 0:o._def.typeName)===ne.ZodBranded&&e.keyType._def.type._def.typeName===ne.ZodString&&((a=e.keyType._def.type._def.checks)!=null&&a.length)){const{type:c,...u}=q3e(e.keyType._def,t);return{...l,propertyNames:u}}}return l}function L4t(e,t){if(t.mapStrategy==="record")return G3e(e,t);const r=Bn(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||pc(),n=Bn(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||pc();return{type:"array",maxItems:125,items:{type:"array",items:[r,n],minItems:2,maxItems:2}}}function z4t(e){const t=e.values,n=Object.keys(e.values).filter(i=>typeof t[t[i]]!="number").map(i=>t[i]),s=Array.from(new Set(n.map(i=>typeof i)));return{type:s.length===1?s[0]==="string"?"string":"number":["string","number"],enum:n}}function B4t(){return{not:pc()}}function V4t(){return{type:"null"}}var RU={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function U4t(e,t){const r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(n=>n._def.typeName in RU&&(!n._def.checks||!n._def.checks.length))){const n=r.reduce((s,i)=>{const o=RU[i._def.typeName];return o&&!s.includes(o)?[...s,o]:s},[]);return{type:n.length>1?n:n[0]}}else if(r.every(n=>n._def.typeName==="ZodLiteral"&&!n.description)){const n=r.reduce((s,i)=>{const o=typeof i._def.value;switch(o){case"string":case"number":case"boolean":return[...s,o];case"bigint":return[...s,"integer"];case"object":if(i._def.value===null)return[...s,"null"];default:return s}},[]);if(n.length===r.length){const s=n.filter((i,o,a)=>a.indexOf(i)===o);return{type:s.length>1?s:s[0],enum:r.reduce((i,o)=>i.includes(o._def.value)?i:[...i,o._def.value],[])}}}else if(r.every(n=>n._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((n,s)=>[...n,...s._def.values.filter(i=>!n.includes(i))],[])};return Q4t(e,t)}var Q4t=(e,t)=>{const r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((n,s)=>Bn(n._def,{...t,currentPath:[...t.currentPath,"anyOf",`${s}`]})).filter(n=>!!n&&(!t.strictUnions||typeof n=="object"&&Object.keys(n).length>0));return r.length?{anyOf:r}:void 0};function Z4t(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[RU[e.innerType._def.typeName],"null"]};const r=Bn(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function q4t(e){const t={type:"number"};if(!e.checks)return t;for(const r of e.checks)switch(r.kind){case"int":t.type="integer";break;case"min":r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value;break;case"max":r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value;break;case"multipleOf":t.multipleOf=r.value;break}return t}function H4t(e,t){const r={type:"object",properties:{}},n=[],s=e.shape();for(const o in s){let a=s[o];if(a===void 0||a._def===void 0)continue;const l=G4t(a),c=Bn(a._def,{...t,currentPath:[...t.currentPath,"properties",o],propertyPath:[...t.currentPath,"properties",o]});c!==void 0&&(r.properties[o]=c,l||n.push(o))}n.length&&(r.required=n);const i=W4t(e,t);return i!==void 0&&(r.additionalProperties=i),r}function W4t(e,t){if(e.catchall._def.typeName!=="ZodNever")return Bn(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function G4t(e){try{return e.isOptional()}catch{return!0}}var X4t=(e,t)=>{var r;if(t.currentPath.toString()===((r=t.propertyPath)==null?void 0:r.toString()))return Bn(e.innerType._def,t);const n=Bn(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return n?{anyOf:[{not:pc()},n]}:pc()},Y4t=(e,t)=>{if(t.pipeStrategy==="input")return Bn(e.in._def,t);if(t.pipeStrategy==="output")return Bn(e.out._def,t);const r=Bn(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),n=Bn(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,n].filter(s=>s!==void 0)}};function J4t(e,t){return Bn(e.type._def,t)}function K4t(e,t){const n={type:"array",uniqueItems:!0,items:Bn(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(n.minItems=e.minSize.value),e.maxSize&&(n.maxItems=e.maxSize.value),n}function eNt(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,n)=>Bn(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[]),additionalItems:Bn(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,n)=>Bn(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[])}}function tNt(){return{not:pc()}}function rNt(){return pc()}var nNt=(e,t)=>Bn(e.innerType._def,t),sNt=(e,t,r)=>{switch(t){case ne.ZodString:return W3e(e,r);case ne.ZodNumber:return q4t(e);case ne.ZodObject:return H4t(e,r);case ne.ZodBigInt:return C4t(e);case ne.ZodBoolean:return T4t();case ne.ZodDate:return H3e(e,r);case ne.ZodUndefined:return tNt();case ne.ZodNull:return V4t();case ne.ZodArray:return E4t(e,r);case ne.ZodUnion:case ne.ZodDiscriminatedUnion:return U4t(e,r);case ne.ZodIntersection:return R4t(e,r);case ne.ZodTuple:return eNt(e,r);case ne.ZodRecord:return G3e(e,r);case ne.ZodLiteral:return M4t(e);case ne.ZodEnum:return I4t(e);case ne.ZodNativeEnum:return z4t(e);case ne.ZodNullable:return Z4t(e,r);case ne.ZodOptional:return X4t(e,r);case ne.ZodMap:return L4t(e,r);case ne.ZodSet:return K4t(e,r);case ne.ZodLazy:return()=>e.getter()._def;case ne.ZodPromise:return J4t(e,r);case ne.ZodNaN:case ne.ZodNever:return B4t();case ne.ZodEffects:return $4t(e,r);case ne.ZodAny:return pc();case ne.ZodUnknown:return rNt();case ne.ZodDefault:return P4t(e,r);case ne.ZodBranded:return q3e(e,r);case ne.ZodReadonly:return nNt(e,r);case ne.ZodCatch:return D4t(e,r);case ne.ZodPipeline:return Y4t(e,r);case ne.ZodFunction:case ne.ZodVoid:case ne.ZodSymbol:return;default:return(n=>{})()}};function Bn(e,t,r=!1){var n;const s=t.seen.get(e);if(t.override){const l=(n=t.override)==null?void 0:n.call(t,e,t,s,r);if(l!==_4t)return l}if(s&&!r){const l=iNt(s,t);if(l!==void 0)return l}const i={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,i);const o=sNt(e,e.typeName,t),a=typeof o=="function"?Bn(o(),t):o;if(a&&oNt(e,t,a),t.postProcess){const l=t.postProcess(a,e,t);return i.jsonSchema=a,l}return i.jsonSchema=a,a}var iNt=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:O4t(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((r,n)=>t.currentPath[n]===r)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),pc()):t.$refStrategy==="seen"?pc():void 0}},oNt=(e,t,r)=>(e.description&&(r.description=e.description),r),aNt=e=>{const t=k4t(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([n,s])=>[s._def,{def:s._def,path:[...t.basePath,t.definitionPath,n],jsonSchema:void 0}]))}},lNt=(e,t)=>{var r;const n=aNt(t);let s=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[u,d])=>{var p;return{...c,[u]:(p=Bn(d._def,{...n,currentPath:[...n.basePath,n.definitionPath,u]},!0))!=null?p:pc()}},{}):void 0;const i=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,o=(r=Bn(e._def,i===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,i]},!1))!=null?r:pc(),a=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;a!==void 0&&(o.title=a);const l=i===void 0?s?{...o,[n.definitionPath]:s}:o:{$ref:[...n.$refStrategy==="relative"?[]:n.basePath,n.definitionPath,i].join("/"),[n.definitionPath]:{...s,[i]:o}};return l.$schema="http://json-schema.org/draft-07/schema#",l},cNt=lNt;function uNt(e,t){var r;const n=(r=void 0)!=null?r:!1;return ZX(()=>cNt(e,{$refStrategy:n?"root":"none"}),{validate:async s=>{const i=await e.safeParseAsync(s);return i.success?{success:!0,value:i.data}:{success:!1,error:i.error}}})}function dNt(e,t){var r;const n=(r=void 0)!=null?r:!1;return ZX(()=>XIe(e,{target:"draft-7",io:"output",reused:n?"ref":"inline"}),{validate:async s=>{const i=await LX(e,s);return i.success?{success:!0,value:i.data}:{success:!1,error:i.error}}})}function fNt(e){return"_zod"in e}function V0(e,t){return fNt(e)?dNt(e):uNt(e)}var MU=Symbol.for("vercel.ai.schema");function ZX(e,{validate:t}={}){return{[MU]:!0,_type:void 0,[C3]:!0,get jsonSchema(){return typeof e=="function"&&(e=e()),e},validate:t}}function pNt(e){return typeof e=="object"&&e!==null&&MU in e&&e[MU]===!0&&"jsonSchema"in e&&"validate"in e}function hNt(e){return e==null?ZX({properties:{},additionalProperties:!1}):pNt(e)?e:typeof e=="function"?e():V0(e)}function mNt(e){return e?.replace(/\/$/,"")}var X3e=P5({"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/get-context.js"(e,t){var r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,o=(p,m)=>{for(var g in m)r(p,g,{get:m[g],enumerable:!0})},a=(p,m,g,v)=>{if(m&&typeof m=="object"||typeof m=="function")for(let b of s(m))!i.call(p,b)&&b!==g&&r(p,b,{get:()=>m[b],enumerable:!(v=n(m,b))||v.enumerable});return p},l=p=>a(r({},"__esModule",{value:!0}),p),c={};o(c,{SYMBOL_FOR_REQ_CONTEXT:()=>u,getContext:()=>d}),t.exports=l(c);var u=Symbol.for("@vercel/request-context");function d(){return globalThis[u]?.get?.()??{}}}}),gNt=P5({"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/get-vercel-oidc-token.js"(e,t){var r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,o=(g,v)=>{for(var b in v)r(g,b,{get:v[b],enumerable:!0})},a=(g,v,b,w)=>{if(v&&typeof v=="object"||typeof v=="function")for(let S of s(v))!i.call(g,S)&&S!==b&&r(g,S,{get:()=>v[S],enumerable:!(w=n(v,S))||w.enumerable});return g},l=g=>a(r({},"__esModule",{value:!0}),g),c={};o(c,{getVercelOidcToken:()=>p,getVercelOidcTokenSync:()=>m}),t.exports=l(c);var u=X3e(),d=H3t();async function p(){let g="",v;try{g=m()}catch(b){v=b}try{const[{getTokenPayload:b,isExpired:w},{refreshToken:S}]=await Promise.all([await G(()=>import("./token-util-NEHG7TUY-JRJTGTAB-hEay2AHp-MVB0L1CT.js"),__vite__mapDeps([93,94,95]),import.meta.url),await G(()=>import("./token-6GSAFR2W-SPYPLMBM-ChURikIE-CNho2omN.js"),__vite__mapDeps([96,94,95]),import.meta.url)]);(!g||w(b(g)))&&(await S(),g=m())}catch(b){throw v?.message&&b instanceof Error&&(b.message=`${v.message}
|
|
193
|
+
]`;continue}i+=s[c],s[c]==="\\"?o=!0:a&&s[c]==="]"?a=!1:!a&&s[c]==="["&&(a=!0)}return i}function G3e(e,t){var r,n,s,i,o,a;const l={type:"object",additionalProperties:(r=Bn(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]}))!=null?r:t.allowedAdditionalProperties};if(((n=e.keyType)==null?void 0:n._def.typeName)===ne.ZodString&&((s=e.keyType._def.checks)!=null&&s.length)){const{type:c,...u}=W3e(e.keyType._def,t);return{...l,propertyNames:u}}else{if(((i=e.keyType)==null?void 0:i._def.typeName)===ne.ZodEnum)return{...l,propertyNames:{enum:e.keyType._def.values}};if(((o=e.keyType)==null?void 0:o._def.typeName)===ne.ZodBranded&&e.keyType._def.type._def.typeName===ne.ZodString&&((a=e.keyType._def.type._def.checks)!=null&&a.length)){const{type:c,...u}=q3e(e.keyType._def,t);return{...l,propertyNames:u}}}return l}function L4t(e,t){if(t.mapStrategy==="record")return G3e(e,t);const r=Bn(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||pc(),n=Bn(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||pc();return{type:"array",maxItems:125,items:{type:"array",items:[r,n],minItems:2,maxItems:2}}}function z4t(e){const t=e.values,n=Object.keys(e.values).filter(i=>typeof t[t[i]]!="number").map(i=>t[i]),s=Array.from(new Set(n.map(i=>typeof i)));return{type:s.length===1?s[0]==="string"?"string":"number":["string","number"],enum:n}}function B4t(){return{not:pc()}}function V4t(){return{type:"null"}}var RU={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function U4t(e,t){const r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(n=>n._def.typeName in RU&&(!n._def.checks||!n._def.checks.length))){const n=r.reduce((s,i)=>{const o=RU[i._def.typeName];return o&&!s.includes(o)?[...s,o]:s},[]);return{type:n.length>1?n:n[0]}}else if(r.every(n=>n._def.typeName==="ZodLiteral"&&!n.description)){const n=r.reduce((s,i)=>{const o=typeof i._def.value;switch(o){case"string":case"number":case"boolean":return[...s,o];case"bigint":return[...s,"integer"];case"object":if(i._def.value===null)return[...s,"null"];default:return s}},[]);if(n.length===r.length){const s=n.filter((i,o,a)=>a.indexOf(i)===o);return{type:s.length>1?s:s[0],enum:r.reduce((i,o)=>i.includes(o._def.value)?i:[...i,o._def.value],[])}}}else if(r.every(n=>n._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((n,s)=>[...n,...s._def.values.filter(i=>!n.includes(i))],[])};return Q4t(e,t)}var Q4t=(e,t)=>{const r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((n,s)=>Bn(n._def,{...t,currentPath:[...t.currentPath,"anyOf",`${s}`]})).filter(n=>!!n&&(!t.strictUnions||typeof n=="object"&&Object.keys(n).length>0));return r.length?{anyOf:r}:void 0};function Z4t(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[RU[e.innerType._def.typeName],"null"]};const r=Bn(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function q4t(e){const t={type:"number"};if(!e.checks)return t;for(const r of e.checks)switch(r.kind){case"int":t.type="integer";break;case"min":r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value;break;case"max":r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value;break;case"multipleOf":t.multipleOf=r.value;break}return t}function H4t(e,t){const r={type:"object",properties:{}},n=[],s=e.shape();for(const o in s){let a=s[o];if(a===void 0||a._def===void 0)continue;const l=G4t(a),c=Bn(a._def,{...t,currentPath:[...t.currentPath,"properties",o],propertyPath:[...t.currentPath,"properties",o]});c!==void 0&&(r.properties[o]=c,l||n.push(o))}n.length&&(r.required=n);const i=W4t(e,t);return i!==void 0&&(r.additionalProperties=i),r}function W4t(e,t){if(e.catchall._def.typeName!=="ZodNever")return Bn(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function G4t(e){try{return e.isOptional()}catch{return!0}}var X4t=(e,t)=>{var r;if(t.currentPath.toString()===((r=t.propertyPath)==null?void 0:r.toString()))return Bn(e.innerType._def,t);const n=Bn(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return n?{anyOf:[{not:pc()},n]}:pc()},Y4t=(e,t)=>{if(t.pipeStrategy==="input")return Bn(e.in._def,t);if(t.pipeStrategy==="output")return Bn(e.out._def,t);const r=Bn(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),n=Bn(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,n].filter(s=>s!==void 0)}};function J4t(e,t){return Bn(e.type._def,t)}function K4t(e,t){const n={type:"array",uniqueItems:!0,items:Bn(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(n.minItems=e.minSize.value),e.maxSize&&(n.maxItems=e.maxSize.value),n}function eNt(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,n)=>Bn(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[]),additionalItems:Bn(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,n)=>Bn(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[])}}function tNt(){return{not:pc()}}function rNt(){return pc()}var nNt=(e,t)=>Bn(e.innerType._def,t),sNt=(e,t,r)=>{switch(t){case ne.ZodString:return W3e(e,r);case ne.ZodNumber:return q4t(e);case ne.ZodObject:return H4t(e,r);case ne.ZodBigInt:return C4t(e);case ne.ZodBoolean:return T4t();case ne.ZodDate:return H3e(e,r);case ne.ZodUndefined:return tNt();case ne.ZodNull:return V4t();case ne.ZodArray:return E4t(e,r);case ne.ZodUnion:case ne.ZodDiscriminatedUnion:return U4t(e,r);case ne.ZodIntersection:return R4t(e,r);case ne.ZodTuple:return eNt(e,r);case ne.ZodRecord:return G3e(e,r);case ne.ZodLiteral:return M4t(e);case ne.ZodEnum:return I4t(e);case ne.ZodNativeEnum:return z4t(e);case ne.ZodNullable:return Z4t(e,r);case ne.ZodOptional:return X4t(e,r);case ne.ZodMap:return L4t(e,r);case ne.ZodSet:return K4t(e,r);case ne.ZodLazy:return()=>e.getter()._def;case ne.ZodPromise:return J4t(e,r);case ne.ZodNaN:case ne.ZodNever:return B4t();case ne.ZodEffects:return $4t(e,r);case ne.ZodAny:return pc();case ne.ZodUnknown:return rNt();case ne.ZodDefault:return P4t(e,r);case ne.ZodBranded:return q3e(e,r);case ne.ZodReadonly:return nNt(e,r);case ne.ZodCatch:return D4t(e,r);case ne.ZodPipeline:return Y4t(e,r);case ne.ZodFunction:case ne.ZodVoid:case ne.ZodSymbol:return;default:return(n=>{})()}};function Bn(e,t,r=!1){var n;const s=t.seen.get(e);if(t.override){const l=(n=t.override)==null?void 0:n.call(t,e,t,s,r);if(l!==_4t)return l}if(s&&!r){const l=iNt(s,t);if(l!==void 0)return l}const i={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,i);const o=sNt(e,e.typeName,t),a=typeof o=="function"?Bn(o(),t):o;if(a&&oNt(e,t,a),t.postProcess){const l=t.postProcess(a,e,t);return i.jsonSchema=a,l}return i.jsonSchema=a,a}var iNt=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:O4t(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((r,n)=>t.currentPath[n]===r)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),pc()):t.$refStrategy==="seen"?pc():void 0}},oNt=(e,t,r)=>(e.description&&(r.description=e.description),r),aNt=e=>{const t=k4t(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([n,s])=>[s._def,{def:s._def,path:[...t.basePath,t.definitionPath,n],jsonSchema:void 0}]))}},lNt=(e,t)=>{var r;const n=aNt(t);let s=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[u,d])=>{var p;return{...c,[u]:(p=Bn(d._def,{...n,currentPath:[...n.basePath,n.definitionPath,u]},!0))!=null?p:pc()}},{}):void 0;const i=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,o=(r=Bn(e._def,i===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,i]},!1))!=null?r:pc(),a=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;a!==void 0&&(o.title=a);const l=i===void 0?s?{...o,[n.definitionPath]:s}:o:{$ref:[...n.$refStrategy==="relative"?[]:n.basePath,n.definitionPath,i].join("/"),[n.definitionPath]:{...s,[i]:o}};return l.$schema="http://json-schema.org/draft-07/schema#",l},cNt=lNt;function uNt(e,t){var r;const n=(r=void 0)!=null?r:!1;return ZX(()=>cNt(e,{$refStrategy:n?"root":"none"}),{validate:async s=>{const i=await e.safeParseAsync(s);return i.success?{success:!0,value:i.data}:{success:!1,error:i.error}}})}function dNt(e,t){var r;const n=(r=void 0)!=null?r:!1;return ZX(()=>XIe(e,{target:"draft-7",io:"output",reused:n?"ref":"inline"}),{validate:async s=>{const i=await LX(e,s);return i.success?{success:!0,value:i.data}:{success:!1,error:i.error}}})}function fNt(e){return"_zod"in e}function V0(e,t){return fNt(e)?dNt(e):uNt(e)}var MU=Symbol.for("vercel.ai.schema");function ZX(e,{validate:t}={}){return{[MU]:!0,_type:void 0,[C3]:!0,get jsonSchema(){return typeof e=="function"&&(e=e()),e},validate:t}}function pNt(e){return typeof e=="object"&&e!==null&&MU in e&&e[MU]===!0&&"jsonSchema"in e&&"validate"in e}function hNt(e){return e==null?ZX({properties:{},additionalProperties:!1}):pNt(e)?e:typeof e=="function"?e():V0(e)}function mNt(e){return e?.replace(/\/$/,"")}var X3e=P5({"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/get-context.js"(e,t){var r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,o=(p,m)=>{for(var g in m)r(p,g,{get:m[g],enumerable:!0})},a=(p,m,g,v)=>{if(m&&typeof m=="object"||typeof m=="function")for(let b of s(m))!i.call(p,b)&&b!==g&&r(p,b,{get:()=>m[b],enumerable:!(v=n(m,b))||v.enumerable});return p},l=p=>a(r({},"__esModule",{value:!0}),p),c={};o(c,{SYMBOL_FOR_REQ_CONTEXT:()=>u,getContext:()=>d}),t.exports=l(c);var u=Symbol.for("@vercel/request-context");function d(){return globalThis[u]?.get?.()??{}}}}),gNt=P5({"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/get-vercel-oidc-token.js"(e,t){var r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,o=(g,v)=>{for(var b in v)r(g,b,{get:v[b],enumerable:!0})},a=(g,v,b,w)=>{if(v&&typeof v=="object"||typeof v=="function")for(let S of s(v))!i.call(g,S)&&S!==b&&r(g,S,{get:()=>v[S],enumerable:!(w=n(v,S))||w.enumerable});return g},l=g=>a(r({},"__esModule",{value:!0}),g),c={};o(c,{getVercelOidcToken:()=>p,getVercelOidcTokenSync:()=>m}),t.exports=l(c);var u=X3e(),d=H3t();async function p(){let g="",v;try{g=m()}catch(b){v=b}try{const[{getTokenPayload:b,isExpired:w},{refreshToken:S}]=await Promise.all([await G(()=>import("./token-util-NEHG7TUY-JRJTGTAB-hEay2AHp-AlRwFCRt.js"),__vite__mapDeps([93,94,95]),import.meta.url),await G(()=>import("./token-6GSAFR2W-SPYPLMBM-ChURikIE-BlqIoOXF.js"),__vite__mapDeps([96,94,95]),import.meta.url)]);(!g||w(b(g)))&&(await S(),g=m())}catch(b){throw v?.message&&b instanceof Error&&(b.message=`${v.message}
|
|
194
194
|
${b.message}`),new d.VercelOidcTokenError("Failed to refresh OIDC token",b)}return g}function m(){const g=(0,u.getContext)().headers?.["x-vercel-oidc-token"]??g3e.VERCEL_OIDC_TOKEN;if(!g)throw new Error("The 'x-vercel-oidc-token' header is missing from the request. Do you have the OIDC option enabled in the Vercel project settings?");return g}}}),Y3e=P5({"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/index.js"(e,t){var r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,o=(p,m)=>{for(var g in m)r(p,g,{get:m[g],enumerable:!0})},a=(p,m,g,v)=>{if(m&&typeof m=="object"||typeof m=="function")for(let b of s(m))!i.call(p,b)&&b!==g&&r(p,b,{get:()=>m[b],enumerable:!(v=n(m,b))||v.enumerable});return p},l=p=>a(r({},"__esModule",{value:!0}),p),c={};o(c,{getContext:()=>d.getContext,getVercelOidcToken:()=>u.getVercelOidcToken,getVercelOidcTokenSync:()=>u.getVercelOidcTokenSync}),t.exports=l(c);var u=gNt(),d=X3e()}}),yNt=O3e(Y3e()),vNt=O3e(Y3e()),bNt="vercel.ai.gateway.error",j8=Symbol.for(bNt),efe,tfe,hc=class J3e extends(tfe=Error,efe=j8,tfe){constructor({message:t,statusCode:r=500,cause:n}){super(t),this[efe]=!0,this.statusCode=r,this.cause=n}static isInstance(t){return J3e.hasMarker(t)}static hasMarker(t){return typeof t=="object"&&t!==null&&j8 in t&&t[j8]===!0}},K3e="GatewayAuthenticationError",xNt=`vercel.ai.gateway.error.${K3e}`,rfe=Symbol.for(xNt),nfe,sfe,e4e=class t4e extends(sfe=hc,nfe=rfe,sfe){constructor({message:t="Authentication failed",statusCode:r=401,cause:n}={}){super({message:t,statusCode:r,cause:n}),this[nfe]=!0,this.name=K3e,this.type="authentication_error"}static isInstance(t){return hc.hasMarker(t)&&rfe in t}static createContextualError({apiKeyProvided:t,oidcTokenProvided:r,message:n="Authentication failed",statusCode:s=401,cause:i}){let o;return t?o=`AI Gateway authentication failed: Invalid API key.
|
|
195
195
|
|
|
196
196
|
Create a new API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys
|
|
@@ -456,7 +456,7 @@ Error message: ${ree(r)}`,cause:r}),this[hze]=!0,this.value=t}static isInstance(
|
|
|
456
456
|
]))`;continue}else if(s[c]==="$"){i+=`($|(?=[\r
|
|
457
457
|
]))`;continue}}if(n.s&&s[c]==="."){i+=a?`${s[c]}\r
|
|
458
458
|
`:`[${s[c]}\r
|
|
459
|
-
]`;continue}i+=s[c],s[c]==="\\"?o=!0:a&&s[c]==="]"?a=!1:!a&&s[c]==="["&&(a=!0)}return i}function Sze(e,t){var r,n,s,i,o,a;const l={type:"object",additionalProperties:(r=Vn(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]}))!=null?r:t.allowedAdditionalProperties};if(((n=e.keyType)==null?void 0:n._def.typeName)===ne.ZodString&&((s=e.keyType._def.checks)!=null&&s.length)){const{type:c,...u}=wze(e.keyType._def,t);return{...l,propertyNames:u}}else{if(((i=e.keyType)==null?void 0:i._def.typeName)===ne.ZodEnum)return{...l,propertyNames:{enum:e.keyType._def.values}};if(((o=e.keyType)==null?void 0:o._def.typeName)===ne.ZodBranded&&e.keyType._def.type._def.typeName===ne.ZodString&&((a=e.keyType._def.type._def.checks)!=null&&a.length)){const{type:c,...u}=bze(e.keyType._def,t);return{...l,propertyNames:u}}}return l}function Uyr(e,t){if(t.mapStrategy==="record")return Sze(e,t);const r=Vn(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||wc(),n=Vn(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||wc();return{type:"array",maxItems:125,items:{type:"array",items:[r,n],minItems:2,maxItems:2}}}function Qyr(e){const t=e.values,n=Object.keys(e.values).filter(i=>typeof t[t[i]]!="number").map(i=>t[i]),s=Array.from(new Set(n.map(i=>typeof i)));return{type:s.length===1?s[0]==="string"?"string":"number":["string","number"],enum:n}}function Zyr(){return{not:wc()}}function qyr(){return{type:"null"}}var OZ={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function Hyr(e,t){const r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(n=>n._def.typeName in OZ&&(!n._def.checks||!n._def.checks.length))){const n=r.reduce((s,i)=>{const o=OZ[i._def.typeName];return o&&!s.includes(o)?[...s,o]:s},[]);return{type:n.length>1?n:n[0]}}else if(r.every(n=>n._def.typeName==="ZodLiteral"&&!n.description)){const n=r.reduce((s,i)=>{const o=typeof i._def.value;switch(o){case"string":case"number":case"boolean":return[...s,o];case"bigint":return[...s,"integer"];case"object":if(i._def.value===null)return[...s,"null"];default:return s}},[]);if(n.length===r.length){const s=n.filter((i,o,a)=>a.indexOf(i)===o);return{type:s.length>1?s:s[0],enum:r.reduce((i,o)=>i.includes(o._def.value)?i:[...i,o._def.value],[])}}}else if(r.every(n=>n._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((n,s)=>[...n,...s._def.values.filter(i=>!n.includes(i))],[])};return Wyr(e,t)}var Wyr=(e,t)=>{const r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((n,s)=>Vn(n._def,{...t,currentPath:[...t.currentPath,"anyOf",`${s}`]})).filter(n=>!!n&&(!t.strictUnions||typeof n=="object"&&Object.keys(n).length>0));return r.length?{anyOf:r}:void 0};function Gyr(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[OZ[e.innerType._def.typeName],"null"]};const r=Vn(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function Xyr(e){const t={type:"number"};if(!e.checks)return t;for(const r of e.checks)switch(r.kind){case"int":t.type="integer";break;case"min":r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value;break;case"max":r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value;break;case"multipleOf":t.multipleOf=r.value;break}return t}function Yyr(e,t){const r={type:"object",properties:{}},n=[],s=e.shape();for(const o in s){let a=s[o];if(a===void 0||a._def===void 0)continue;const l=Kyr(a),c=Vn(a._def,{...t,currentPath:[...t.currentPath,"properties",o],propertyPath:[...t.currentPath,"properties",o]});c!==void 0&&(r.properties[o]=c,l||n.push(o))}n.length&&(r.required=n);const i=Jyr(e,t);return i!==void 0&&(r.additionalProperties=i),r}function Jyr(e,t){if(e.catchall._def.typeName!=="ZodNever")return Vn(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function Kyr(e){try{return e.isOptional()}catch{return!0}}var evr=(e,t)=>{var r;if(t.currentPath.toString()===((r=t.propertyPath)==null?void 0:r.toString()))return Vn(e.innerType._def,t);const n=Vn(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return n?{anyOf:[{not:wc()},n]}:wc()},tvr=(e,t)=>{if(t.pipeStrategy==="input")return Vn(e.in._def,t);if(t.pipeStrategy==="output")return Vn(e.out._def,t);const r=Vn(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),n=Vn(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,n].filter(s=>s!==void 0)}};function rvr(e,t){return Vn(e.type._def,t)}function nvr(e,t){const n={type:"array",uniqueItems:!0,items:Vn(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(n.minItems=e.minSize.value),e.maxSize&&(n.maxItems=e.maxSize.value),n}function svr(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,n)=>Vn(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[]),additionalItems:Vn(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,n)=>Vn(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[])}}function ivr(){return{not:wc()}}function ovr(){return wc()}var avr=(e,t)=>Vn(e.innerType._def,t),lvr=(e,t,r)=>{switch(t){case ne.ZodString:return wze(e,r);case ne.ZodNumber:return Xyr(e);case ne.ZodObject:return Yyr(e,r);case ne.ZodBigInt:return Pyr(e);case ne.ZodBoolean:return $yr();case ne.ZodDate:return xze(e,r);case ne.ZodUndefined:return ivr();case ne.ZodNull:return qyr();case ne.ZodArray:return Ayr(e,r);case ne.ZodUnion:case ne.ZodDiscriminatedUnion:return Hyr(e,r);case ne.ZodIntersection:return Lyr(e,r);case ne.ZodTuple:return svr(e,r);case ne.ZodRecord:return Sze(e,r);case ne.ZodLiteral:return zyr(e);case ne.ZodEnum:return jyr(e);case ne.ZodNativeEnum:return Qyr(e);case ne.ZodNullable:return Gyr(e,r);case ne.ZodOptional:return evr(e,r);case ne.ZodMap:return Uyr(e,r);case ne.ZodSet:return nvr(e,r);case ne.ZodLazy:return()=>e.getter()._def;case ne.ZodPromise:return rvr(e,r);case ne.ZodNaN:case ne.ZodNever:return Zyr();case ne.ZodEffects:return Myr(e,r);case ne.ZodAny:return wc();case ne.ZodUnknown:return ovr();case ne.ZodDefault:return Ryr(e,r);case ne.ZodBranded:return bze(e,r);case ne.ZodReadonly:return avr(e,r);case ne.ZodCatch:return Iyr(e,r);case ne.ZodPipeline:return tvr(e,r);case ne.ZodFunction:case ne.ZodVoid:case ne.ZodSymbol:return;default:return(n=>{})()}};function Vn(e,t,r=!1){var n;const s=t.seen.get(e);if(t.override){const l=(n=t.override)==null?void 0:n.call(t,e,t,s,r);if(l!==Tyr)return l}if(s&&!r){const l=cvr(s,t);if(l!==void 0)return l}const i={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,i);const o=lvr(e,e.typeName,t),a=typeof o=="function"?Vn(o(),t):o;if(a&&uvr(e,t,a),t.postProcess){const l=t.postProcess(a,e,t);return i.jsonSchema=a,l}return i.jsonSchema=a,a}var cvr=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:Cyr(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((r,n)=>t.currentPath[n]===r)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),wc()):t.$refStrategy==="seen"?wc():void 0}},uvr=(e,t,r)=>(e.description&&(r.description=e.description),r),dvr=e=>{const t=Dyr(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([n,s])=>[s._def,{def:s._def,path:[...t.basePath,t.definitionPath,n],jsonSchema:void 0}]))}},fvr=(e,t)=>{var r;const n=dvr(t);let s=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[u,d])=>{var p;return{...c,[u]:(p=Vn(d._def,{...n,currentPath:[...n.basePath,n.definitionPath,u]},!0))!=null?p:wc()}},{}):void 0;const i=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,o=(r=Vn(e._def,i===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,i]},!1))!=null?r:wc(),a=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;a!==void 0&&(o.title=a);const l=i===void 0?s?{...o,[n.definitionPath]:s}:o:{$ref:[...n.$refStrategy==="relative"?[]:n.basePath,n.definitionPath,i].join("/"),[n.definitionPath]:{...s,[i]:o}};return l.$schema="http://json-schema.org/draft-07/schema#",l},pvr=fvr;function hvr(e,t){var r;const n=(r=void 0)!=null?r:!1;return see(()=>pvr(e,{$refStrategy:n?"root":"none"}),{validate:async s=>{const i=await e.safeParseAsync(s);return i.success?{success:!0,value:i.data}:{success:!1,error:i.error}}})}function mvr(e,t){var r;const n=(r=void 0)!=null?r:!1;return see(()=>XIe(e,{target:"draft-7",io:"output",reused:n?"ref":"inline"}),{validate:async s=>{const i=await LX(e,s);return i.success?{success:!0,value:i.data}:{success:!1,error:i.error}}})}function gvr(e){return"_zod"in e}function rb(e,t){return gvr(e)?mvr(e):hvr(e)}var _Z=Symbol.for("vercel.ai.schema");function see(e,{validate:t}={}){return{[_Z]:!0,_type:void 0,[v4]:!0,get jsonSchema(){return typeof e=="function"&&(e=e()),e},validate:t}}function yvr(e){return typeof e=="object"&&e!==null&&_Z in e&&e[_Z]===!0&&"jsonSchema"in e&&"validate"in e}function vvr(e){return e==null?see({properties:{},additionalProperties:!1}):yvr(e)?e:typeof e=="function"?e():rb(e)}function bvr(e){return e?.replace(/\/$/,"")}var xvr={},Oze=A6({"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/get-context.js"(e,t){var r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,o=(p,m)=>{for(var g in m)r(p,g,{get:m[g],enumerable:!0})},a=(p,m,g,v)=>{if(m&&typeof m=="object"||typeof m=="function")for(let b of s(m))!i.call(p,b)&&b!==g&&r(p,b,{get:()=>m[b],enumerable:!(v=n(m,b))||v.enumerable});return p},l=p=>a(r({},"__esModule",{value:!0}),p),c={};o(c,{SYMBOL_FOR_REQ_CONTEXT:()=>u,getContext:()=>d}),t.exports=l(c);var u=Symbol.for("@vercel/request-context");function d(){return globalThis[u]?.get?.()??{}}}}),wvr=A6({"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/get-vercel-oidc-token.js"(e,t){var r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,o=(g,v)=>{for(var b in v)r(g,b,{get:v[b],enumerable:!0})},a=(g,v,b,w)=>{if(v&&typeof v=="object"||typeof v=="function")for(let S of s(v))!i.call(g,S)&&S!==b&&r(g,S,{get:()=>v[S],enumerable:!(w=n(v,S))||w.enumerable});return g},l=g=>a(r({},"__esModule",{value:!0}),g),c={};o(c,{getVercelOidcToken:()=>p,getVercelOidcTokenSync:()=>m}),t.exports=l(c);var u=Oze(),d=Ggr();async function p(){let g="",v;try{g=m()}catch(b){v=b}try{const[{getTokenPayload:b,isExpired:w},{refreshToken:S}]=await Promise.all([await G(()=>import("./token-util-NEHG7TUY-JRJTGTAB-CC_oJ7-c.js"),__vite__mapDeps([97,98,95]),import.meta.url),await G(()=>import("./token-6GSAFR2W-SPYPLMBM-Bf7GlBcT.js"),__vite__mapDeps([99,98,95]),import.meta.url)]);(!g||w(b(g)))&&(await S(),g=m())}catch(b){throw v?.message&&b instanceof Error&&(b.message=`${v.message}
|
|
459
|
+
]`;continue}i+=s[c],s[c]==="\\"?o=!0:a&&s[c]==="]"?a=!1:!a&&s[c]==="["&&(a=!0)}return i}function Sze(e,t){var r,n,s,i,o,a;const l={type:"object",additionalProperties:(r=Vn(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]}))!=null?r:t.allowedAdditionalProperties};if(((n=e.keyType)==null?void 0:n._def.typeName)===ne.ZodString&&((s=e.keyType._def.checks)!=null&&s.length)){const{type:c,...u}=wze(e.keyType._def,t);return{...l,propertyNames:u}}else{if(((i=e.keyType)==null?void 0:i._def.typeName)===ne.ZodEnum)return{...l,propertyNames:{enum:e.keyType._def.values}};if(((o=e.keyType)==null?void 0:o._def.typeName)===ne.ZodBranded&&e.keyType._def.type._def.typeName===ne.ZodString&&((a=e.keyType._def.type._def.checks)!=null&&a.length)){const{type:c,...u}=bze(e.keyType._def,t);return{...l,propertyNames:u}}}return l}function Uyr(e,t){if(t.mapStrategy==="record")return Sze(e,t);const r=Vn(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||wc(),n=Vn(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||wc();return{type:"array",maxItems:125,items:{type:"array",items:[r,n],minItems:2,maxItems:2}}}function Qyr(e){const t=e.values,n=Object.keys(e.values).filter(i=>typeof t[t[i]]!="number").map(i=>t[i]),s=Array.from(new Set(n.map(i=>typeof i)));return{type:s.length===1?s[0]==="string"?"string":"number":["string","number"],enum:n}}function Zyr(){return{not:wc()}}function qyr(){return{type:"null"}}var OZ={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function Hyr(e,t){const r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(n=>n._def.typeName in OZ&&(!n._def.checks||!n._def.checks.length))){const n=r.reduce((s,i)=>{const o=OZ[i._def.typeName];return o&&!s.includes(o)?[...s,o]:s},[]);return{type:n.length>1?n:n[0]}}else if(r.every(n=>n._def.typeName==="ZodLiteral"&&!n.description)){const n=r.reduce((s,i)=>{const o=typeof i._def.value;switch(o){case"string":case"number":case"boolean":return[...s,o];case"bigint":return[...s,"integer"];case"object":if(i._def.value===null)return[...s,"null"];default:return s}},[]);if(n.length===r.length){const s=n.filter((i,o,a)=>a.indexOf(i)===o);return{type:s.length>1?s:s[0],enum:r.reduce((i,o)=>i.includes(o._def.value)?i:[...i,o._def.value],[])}}}else if(r.every(n=>n._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((n,s)=>[...n,...s._def.values.filter(i=>!n.includes(i))],[])};return Wyr(e,t)}var Wyr=(e,t)=>{const r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((n,s)=>Vn(n._def,{...t,currentPath:[...t.currentPath,"anyOf",`${s}`]})).filter(n=>!!n&&(!t.strictUnions||typeof n=="object"&&Object.keys(n).length>0));return r.length?{anyOf:r}:void 0};function Gyr(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[OZ[e.innerType._def.typeName],"null"]};const r=Vn(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function Xyr(e){const t={type:"number"};if(!e.checks)return t;for(const r of e.checks)switch(r.kind){case"int":t.type="integer";break;case"min":r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value;break;case"max":r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value;break;case"multipleOf":t.multipleOf=r.value;break}return t}function Yyr(e,t){const r={type:"object",properties:{}},n=[],s=e.shape();for(const o in s){let a=s[o];if(a===void 0||a._def===void 0)continue;const l=Kyr(a),c=Vn(a._def,{...t,currentPath:[...t.currentPath,"properties",o],propertyPath:[...t.currentPath,"properties",o]});c!==void 0&&(r.properties[o]=c,l||n.push(o))}n.length&&(r.required=n);const i=Jyr(e,t);return i!==void 0&&(r.additionalProperties=i),r}function Jyr(e,t){if(e.catchall._def.typeName!=="ZodNever")return Vn(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function Kyr(e){try{return e.isOptional()}catch{return!0}}var evr=(e,t)=>{var r;if(t.currentPath.toString()===((r=t.propertyPath)==null?void 0:r.toString()))return Vn(e.innerType._def,t);const n=Vn(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return n?{anyOf:[{not:wc()},n]}:wc()},tvr=(e,t)=>{if(t.pipeStrategy==="input")return Vn(e.in._def,t);if(t.pipeStrategy==="output")return Vn(e.out._def,t);const r=Vn(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),n=Vn(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,n].filter(s=>s!==void 0)}};function rvr(e,t){return Vn(e.type._def,t)}function nvr(e,t){const n={type:"array",uniqueItems:!0,items:Vn(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(n.minItems=e.minSize.value),e.maxSize&&(n.maxItems=e.maxSize.value),n}function svr(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,n)=>Vn(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[]),additionalItems:Vn(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,n)=>Vn(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[])}}function ivr(){return{not:wc()}}function ovr(){return wc()}var avr=(e,t)=>Vn(e.innerType._def,t),lvr=(e,t,r)=>{switch(t){case ne.ZodString:return wze(e,r);case ne.ZodNumber:return Xyr(e);case ne.ZodObject:return Yyr(e,r);case ne.ZodBigInt:return Pyr(e);case ne.ZodBoolean:return $yr();case ne.ZodDate:return xze(e,r);case ne.ZodUndefined:return ivr();case ne.ZodNull:return qyr();case ne.ZodArray:return Ayr(e,r);case ne.ZodUnion:case ne.ZodDiscriminatedUnion:return Hyr(e,r);case ne.ZodIntersection:return Lyr(e,r);case ne.ZodTuple:return svr(e,r);case ne.ZodRecord:return Sze(e,r);case ne.ZodLiteral:return zyr(e);case ne.ZodEnum:return jyr(e);case ne.ZodNativeEnum:return Qyr(e);case ne.ZodNullable:return Gyr(e,r);case ne.ZodOptional:return evr(e,r);case ne.ZodMap:return Uyr(e,r);case ne.ZodSet:return nvr(e,r);case ne.ZodLazy:return()=>e.getter()._def;case ne.ZodPromise:return rvr(e,r);case ne.ZodNaN:case ne.ZodNever:return Zyr();case ne.ZodEffects:return Myr(e,r);case ne.ZodAny:return wc();case ne.ZodUnknown:return ovr();case ne.ZodDefault:return Ryr(e,r);case ne.ZodBranded:return bze(e,r);case ne.ZodReadonly:return avr(e,r);case ne.ZodCatch:return Iyr(e,r);case ne.ZodPipeline:return tvr(e,r);case ne.ZodFunction:case ne.ZodVoid:case ne.ZodSymbol:return;default:return(n=>{})()}};function Vn(e,t,r=!1){var n;const s=t.seen.get(e);if(t.override){const l=(n=t.override)==null?void 0:n.call(t,e,t,s,r);if(l!==Tyr)return l}if(s&&!r){const l=cvr(s,t);if(l!==void 0)return l}const i={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,i);const o=lvr(e,e.typeName,t),a=typeof o=="function"?Vn(o(),t):o;if(a&&uvr(e,t,a),t.postProcess){const l=t.postProcess(a,e,t);return i.jsonSchema=a,l}return i.jsonSchema=a,a}var cvr=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:Cyr(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((r,n)=>t.currentPath[n]===r)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),wc()):t.$refStrategy==="seen"?wc():void 0}},uvr=(e,t,r)=>(e.description&&(r.description=e.description),r),dvr=e=>{const t=Dyr(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([n,s])=>[s._def,{def:s._def,path:[...t.basePath,t.definitionPath,n],jsonSchema:void 0}]))}},fvr=(e,t)=>{var r;const n=dvr(t);let s=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[u,d])=>{var p;return{...c,[u]:(p=Vn(d._def,{...n,currentPath:[...n.basePath,n.definitionPath,u]},!0))!=null?p:wc()}},{}):void 0;const i=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,o=(r=Vn(e._def,i===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,i]},!1))!=null?r:wc(),a=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;a!==void 0&&(o.title=a);const l=i===void 0?s?{...o,[n.definitionPath]:s}:o:{$ref:[...n.$refStrategy==="relative"?[]:n.basePath,n.definitionPath,i].join("/"),[n.definitionPath]:{...s,[i]:o}};return l.$schema="http://json-schema.org/draft-07/schema#",l},pvr=fvr;function hvr(e,t){var r;const n=(r=void 0)!=null?r:!1;return see(()=>pvr(e,{$refStrategy:n?"root":"none"}),{validate:async s=>{const i=await e.safeParseAsync(s);return i.success?{success:!0,value:i.data}:{success:!1,error:i.error}}})}function mvr(e,t){var r;const n=(r=void 0)!=null?r:!1;return see(()=>XIe(e,{target:"draft-7",io:"output",reused:n?"ref":"inline"}),{validate:async s=>{const i=await LX(e,s);return i.success?{success:!0,value:i.data}:{success:!1,error:i.error}}})}function gvr(e){return"_zod"in e}function rb(e,t){return gvr(e)?mvr(e):hvr(e)}var _Z=Symbol.for("vercel.ai.schema");function see(e,{validate:t}={}){return{[_Z]:!0,_type:void 0,[v4]:!0,get jsonSchema(){return typeof e=="function"&&(e=e()),e},validate:t}}function yvr(e){return typeof e=="object"&&e!==null&&_Z in e&&e[_Z]===!0&&"jsonSchema"in e&&"validate"in e}function vvr(e){return e==null?see({properties:{},additionalProperties:!1}):yvr(e)?e:typeof e=="function"?e():rb(e)}function bvr(e){return e?.replace(/\/$/,"")}var xvr={},Oze=A6({"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/get-context.js"(e,t){var r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,o=(p,m)=>{for(var g in m)r(p,g,{get:m[g],enumerable:!0})},a=(p,m,g,v)=>{if(m&&typeof m=="object"||typeof m=="function")for(let b of s(m))!i.call(p,b)&&b!==g&&r(p,b,{get:()=>m[b],enumerable:!(v=n(m,b))||v.enumerable});return p},l=p=>a(r({},"__esModule",{value:!0}),p),c={};o(c,{SYMBOL_FOR_REQ_CONTEXT:()=>u,getContext:()=>d}),t.exports=l(c);var u=Symbol.for("@vercel/request-context");function d(){return globalThis[u]?.get?.()??{}}}}),wvr=A6({"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/get-vercel-oidc-token.js"(e,t){var r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,o=(g,v)=>{for(var b in v)r(g,b,{get:v[b],enumerable:!0})},a=(g,v,b,w)=>{if(v&&typeof v=="object"||typeof v=="function")for(let S of s(v))!i.call(g,S)&&S!==b&&r(g,S,{get:()=>v[S],enumerable:!(w=n(v,S))||w.enumerable});return g},l=g=>a(r({},"__esModule",{value:!0}),g),c={};o(c,{getVercelOidcToken:()=>p,getVercelOidcTokenSync:()=>m}),t.exports=l(c);var u=Oze(),d=Ggr();async function p(){let g="",v;try{g=m()}catch(b){v=b}try{const[{getTokenPayload:b,isExpired:w},{refreshToken:S}]=await Promise.all([await G(()=>import("./token-util-NEHG7TUY-JRJTGTAB-CVJARfpb.js"),__vite__mapDeps([97,98,95]),import.meta.url),await G(()=>import("./token-6GSAFR2W-SPYPLMBM-C784OxO0.js"),__vite__mapDeps([99,98,95]),import.meta.url)]);(!g||w(b(g)))&&(await S(),g=m())}catch(b){throw v?.message&&b instanceof Error&&(b.message=`${v.message}
|
|
460
460
|
${b.message}`),new d.VercelOidcTokenError("Failed to refresh OIDC token",b)}return g}function m(){const g=(0,u.getContext)().headers?.["x-vercel-oidc-token"]??xvr.VERCEL_OIDC_TOKEN;if(!g)throw new Error("The 'x-vercel-oidc-token' header is missing from the request. Do you have the OIDC option enabled in the Vercel project settings?");return g}}}),_ze=A6({"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/index.js"(e,t){var r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,o=(p,m)=>{for(var g in m)r(p,g,{get:m[g],enumerable:!0})},a=(p,m,g,v)=>{if(m&&typeof m=="object"||typeof m=="function")for(let b of s(m))!i.call(p,b)&&b!==g&&r(p,b,{get:()=>m[b],enumerable:!(v=n(m,b))||v.enumerable});return p},l=p=>a(r({},"__esModule",{value:!0}),p),c={};o(c,{getContext:()=>d.getContext,getVercelOidcToken:()=>u.getVercelOidcToken,getVercelOidcTokenSync:()=>u.getVercelOidcTokenSync}),t.exports=l(c);var u=wvr(),d=Oze()}}),Svr=XLe(_ze()),Ovr=XLe(_ze()),_vr="vercel.ai.gateway.error",hL=Symbol.for(_vr),ave,lve,Sc=class kze extends(lve=Error,ave=hL,lve){constructor({message:t,statusCode:r=500,cause:n}){super(t),this[ave]=!0,this.statusCode=r,this.cause=n}static isInstance(t){return kze.hasMarker(t)}static hasMarker(t){return typeof t=="object"&&t!==null&&hL in t&&t[hL]===!0}},Eze="GatewayAuthenticationError",kvr=`vercel.ai.gateway.error.${Eze}`,cve=Symbol.for(kvr),uve,dve,Cze=class Tze extends(dve=Sc,uve=cve,dve){constructor({message:t="Authentication failed",statusCode:r=401,cause:n}={}){super({message:t,statusCode:r,cause:n}),this[uve]=!0,this.name=Eze,this.type="authentication_error"}static isInstance(t){return Sc.hasMarker(t)&&cve in t}static createContextualError({apiKeyProvided:t,oidcTokenProvided:r,message:n="Authentication failed",statusCode:s=401,cause:i}){let o;return t?o=`AI Gateway authentication failed: Invalid API key.
|
|
461
461
|
|
|
462
462
|
Create a new API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys
|
|
@@ -545,13 +545,13 @@ ${se.current.stack}
|
|
|
545
545
|
`+t.scrub();for(let n of t.markers)r.marks.push(n)}return this.finishLeaf(r),null}stopAt(t){if(this.stoppedAt!=null&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}reuseFragment(t){if(!this.fragments.moveTo(this.absoluteLineStart+t,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let r=this.fragments.takeNodes(this);return r?(this.absoluteLineStart+=r,this.lineStart=WUe(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(t=this.depth-1){return this.parser.nodeSet.types[this.stack[t].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(t){let r=ACr;if(r.end=t,t>=this.to)r.text="";else if(r.text=this.lineChunkAt(t),r.end+=r.text.length,this.ranges.length>1){let n=this.absoluteLineStart,s=this.rangeI;for(;this.ranges[s].to<r.end;){s++;let i=this.ranges[s].from,o=this.lineChunkAt(i);r.end=i+o.length,r.text=r.text.slice(0,this.ranges[s-1].to-n)+o,n=r.end-r.text.length}}return r}readLine(){let{line:t}=this,{text:r,end:n}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=n,t.reset(r);t.depth<this.stack.length;t.depth++){let s=this.stack[t.depth],i=this.parser.skipContextMarkup[s.type];if(!i)throw new Error("Unhandled block context "+ot[s.type]);if(!i(s,this,t))break;t.forward()}}lineChunkAt(t){let r=this.input.chunk(t),n;if(this.input.lineChunks)n=r==`
|
|
546
546
|
`?"":r;else{let s=r.indexOf(`
|
|
547
547
|
`);n=s<0?r:r.slice(0,s)}return t+n.length>this.to?n.slice(0,this.to-t):n}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(t,r,n=0){this.block=R4.create(t,n,this.lineStart+r,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(t,r,n=0){this.startContext(this.parser.getNodeType(t),r,n)}addNode(t,r,n){typeof t=="number"&&(t=new Gr(this.parser.nodeSet.types[t],ww,ww,(n??this.prevLineEnd())-r)),this.block.addChild(t,r-this.block.from)}addElement(t){this.block.addChild(t.toTree(this.parser.nodeSet),t.from-this.block.from)}addLeafElement(t,r){this.addNode(this.buffer.writeElements(ZZ(r.children,t.marks),-r.from).finish(r.type,r.to-r.from),r.from)}finishContext(){let t=this.stack.pop(),r=this.stack[this.stack.length-1];r.addChild(t.toTree(this.parser.nodeSet),t.from-r.from),this.block=r}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(t){return this.ranges.length>1?LUe(this.ranges,0,t.topNode,this.ranges[0].from,this.reusePlaceholders):t}finishLeaf(t){for(let n of t.parsers)if(n.finish(this,t))return;let r=ZZ(this.parser.parseInline(t.content,t.start),t.marks);this.addNode(this.buffer.writeElements(r,-t.start).finish(ot.Paragraph,t.content.length),t.start)}elt(t,r,n,s){return typeof t=="string"?on(this.parser.getNodeType(t),r,n,s):new VUe(t,r)}get buffer(){return new BUe(this.parser.nodeSet)}}function LUe(e,t,r,n,s){let i=e[t].to,o=[],a=[],l=r.from+n;function c(u,d){for(;d?u>=i:u>i;){let p=e[t+1].from-i;n+=p,u+=p,t++,i=e[t].to}}for(let u=r.firstChild;u;u=u.nextSibling){c(u.from+n,!0);let d=u.from+n,p,m=s.get(u.tree);m?p=m:u.to+n>i?(p=LUe(e,t,u,n,s),c(u.to+n,!1)):p=u.toTree(),o.push(p),a.push(d-l)}return c(r.to+n,!1),new Gr(r.type,o,a,r.to+n-l,r.tree?r.tree.propValues:void 0)}class Q6 extends s5{constructor(t,r,n,s,i,o,a,l,c){super(),this.nodeSet=t,this.blockParsers=r,this.leafBlockParsers=n,this.blockNames=s,this.endLeafBlock=i,this.skipContextMarkup=o,this.inlineParsers=a,this.inlineNames=l,this.wrappers=c,this.nodeTypes=Object.create(null);for(let u of t.types)this.nodeTypes[u.name]=u.id}createParse(t,r,n){let s=new PCr(this,t,r,n);for(let i of this.wrappers)s=i(s,t,r,n);return s}configure(t){let r=UZ(t);if(!r)return this;let{nodeSet:n,skipContextMarkup:s}=this,i=this.blockParsers.slice(),o=this.leafBlockParsers.slice(),a=this.blockNames.slice(),l=this.inlineParsers.slice(),c=this.inlineNames.slice(),u=this.endLeafBlock.slice(),d=this.wrappers;if(p_(r.defineNodes)){s=Object.assign({},s);let p=n.types.slice(),m;for(let g of r.defineNodes){let{name:v,block:b,composite:w,style:S}=typeof g=="string"?{name:g}:g;if(p.some(C=>C.name==v))continue;w&&(s[p.length]=(C,T,P)=>w(T,P,C.value));let O=p.length,k=w?["Block","BlockContext"]:b?O>=ot.ATXHeading1&&O<=ot.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;p.push(Li.define({id:O,name:v,props:k&&[[hr.group,k]]})),S&&(m||(m={}),Array.isArray(S)||S instanceof Xl?m[v]=S:Object.assign(m,S))}n=new Xw(p),m&&(n=n.extend(R0(m)))}if(p_(r.props)&&(n=n.extend(...r.props)),p_(r.remove))for(let p of r.remove){let m=this.blockNames.indexOf(p),g=this.inlineNames.indexOf(p);m>-1&&(i[m]=o[m]=void 0),g>-1&&(l[g]=void 0)}if(p_(r.parseBlock))for(let p of r.parseBlock){let m=a.indexOf(p.name);if(m>-1)i[m]=p.parse,o[m]=p.leaf;else{let g=p.before?HP(a,p.before):p.after?HP(a,p.after)+1:a.length-1;i.splice(g,0,p.parse),o.splice(g,0,p.leaf),a.splice(g,0,p.name)}p.endLeaf&&u.push(p.endLeaf)}if(p_(r.parseInline))for(let p of r.parseInline){let m=c.indexOf(p.name);if(m>-1)l[m]=p.parse;else{let g=p.before?HP(c,p.before):p.after?HP(c,p.after)+1:c.length-1;l.splice(g,0,p.parse),c.splice(g,0,p.name)}}return r.wrap&&(d=d.concat(r.wrap)),new Q6(n,i,o,a,u,s,l,c,d)}getNodeType(t){let r=this.nodeTypes[t];if(r==null)throw new RangeError(`Unknown node type '${t}'`);return r}parseInline(t,r){let n=new ICr(this,t,r);e:for(let s=r;s<n.end;){let i=n.char(s);for(let o of this.inlineParsers)if(o){let a=o(n,i,s);if(a>=0){s=a;continue e}}s++}return n.resolveMarkers(0)}}function p_(e){return e!=null&&e.length>0}function UZ(e){if(!Array.isArray(e))return e;if(e.length==0)return null;let t=UZ(e[0]);if(e.length==1)return t;let r=UZ(e.slice(1));if(!r||!t)return t||r;let n=(o,a)=>(o||ww).concat(a||ww),s=t.wrap,i=r.wrap;return{props:n(t.props,r.props),defineNodes:n(t.defineNodes,r.defineNodes),parseBlock:n(t.parseBlock,r.parseBlock),parseInline:n(t.parseInline,r.parseInline),remove:n(t.remove,r.remove),wrap:s?i?(o,a,l,c)=>s(i(o,a,l,c),a,l,c):s:i}}function HP(e,t){let r=e.indexOf(t);if(r<0)throw new RangeError(`Position specified relative to unknown parser ${t}`);return r}let zUe=[Li.none];for(let e=1,t;t=ot[e];e++)zUe[e]=Li.define({id:e,name:t,props:e>=ot.Escape?[]:[[hr.group,e in DUe?["Block","BlockContext"]:["Block","LeafBlock"]]],top:t=="Document"});const ww=[];let BUe=class{constructor(t){this.nodeSet=t,this.content=[],this.nodes=[]}write(t,r,n,s=0){return this.content.push(t,r,n,4+s*4),this}writeElements(t,r=0){for(let n of t)n.writeTo(this,r);return this}finish(t,r){return Gr.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:t,length:r})}},KC=class{constructor(t,r,n,s=ww){this.type=t,this.from=r,this.to=n,this.children=s}writeTo(t,r){let n=t.content.length;t.writeElements(this.children,r),t.content.push(this.type,this.from+r,this.to+r,t.content.length+4-n)}toTree(t){return new BUe(t).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}};class VUe{constructor(t,r){this.tree=t,this.from=r}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return ww}writeTo(t,r){t.nodes.push(this.tree),t.content.push(t.nodes.length-1,this.from+r,this.to+r,-1)}toTree(){return this.tree}}function on(e,t,r,n){return new KC(e,t,r,n)}const UUe={resolve:"Emphasis",mark:"EmphasisMark"},QUe={resolve:"Emphasis",mark:"EmphasisMark"},Sx={},QZ={};class Wl{constructor(t,r,n,s){this.type=t,this.from=r,this.to=n,this.side=s}}const G0e="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let eT=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{eT=new RegExp("[\\p{S}|\\p{P}]","u")}catch{}const BL={Escape(e,t,r){if(t!=92||r==e.end-1)return-1;let n=e.char(r+1);for(let s=0;s<G0e.length;s++)if(G0e.charCodeAt(s)==n)return e.append(on(ot.Escape,r,r+2));return-1},Entity(e,t,r){if(t!=38)return-1;let n=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(e.slice(r+1,r+31));return n?e.append(on(ot.Entity,r,r+1+n[0].length)):-1},InlineCode(e,t,r){if(t!=96||r&&e.char(r-1)==96)return-1;let n=r+1;for(;n<e.end&&e.char(n)==96;)n++;let s=n-r,i=0;for(;n<e.end;n++)if(e.char(n)==96){if(i++,i==s&&e.char(n+1)!=96)return e.append(on(ot.InlineCode,r,n+1,[on(ot.CodeMark,r,r+s),on(ot.CodeMark,n+1-s,n+1)]))}else i=0;return-1},HTMLTag(e,t,r){if(t!=60||r==e.end-1)return-1;let n=e.slice(r+1,e.end),s=/^(?:[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(n);if(s)return e.append(on(ot.Autolink,r,r+1+s[0].length,[on(ot.LinkMark,r,r+1),on(ot.URL,r+1,r+s[0].length),on(ot.LinkMark,r+s[0].length,r+1+s[0].length)]));let i=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(n);if(i)return e.append(on(ot.Comment,r,r+1+i[0].length));let o=/^\?[^]*?\?>/.exec(n);if(o)return e.append(on(ot.ProcessingInstruction,r,r+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(n);return a?e.append(on(ot.HTMLTag,r,r+1+a[0].length)):-1},Emphasis(e,t,r){if(t!=95&&t!=42)return-1;let n=r+1;for(;e.char(n)==t;)n++;let s=e.slice(r-1,r),i=e.slice(n,n+1),o=eT.test(s),a=eT.test(i),l=/\s|^$/.test(s),c=/\s|^$/.test(i),u=!c&&(!a||l||o),d=!l&&(!o||c||a),p=u&&(t==42||!d||o),m=d&&(t==42||!u||a);return e.append(new Wl(t==95?UUe:QUe,r,n,(p?1:0)|(m?2:0)))},HardBreak(e,t,r){if(t==92&&e.char(r+1)==10)return e.append(on(ot.HardBreak,r,r+2));if(t==32){let n=r+1;for(;e.char(n)==32;)n++;if(e.char(n)==10&&n>=r+2)return e.append(on(ot.HardBreak,r,n+1))}return-1},Link(e,t,r){return t==91?e.append(new Wl(Sx,r,r+1,1)):-1},Image(e,t,r){return t==33&&e.char(r+1)==91?e.append(new Wl(QZ,r,r+2,1)):-1},LinkEnd(e,t,r){if(t!=93)return-1;for(let n=e.parts.length-1;n>=0;n--){let s=e.parts[n];if(s instanceof Wl&&(s.type==Sx||s.type==QZ)){if(!s.side||e.skipSpace(s.to)==r&&!/[(\[]/.test(e.slice(r+1,r+2)))return e.parts[n]=null,-1;let i=e.takeContent(n),o=e.parts[n]=$Cr(e,i,s.type==Sx?ot.Link:ot.Image,s.from,r+1);if(s.type==Sx)for(let a=0;a<n;a++){let l=e.parts[a];l instanceof Wl&&l.type==Sx&&(l.side=0)}return o.to}}return-1}};function $Cr(e,t,r,n,s){let{text:i}=e,o=e.char(s),a=s;if(t.unshift(on(ot.LinkMark,n,n+(r==ot.Image?2:1))),t.push(on(ot.LinkMark,s-1,s)),o==40){let l=e.skipSpace(s+1),c=ZUe(i,l-e.offset,e.offset),u;c&&(l=e.skipSpace(c.to),l!=c.to&&(u=qUe(i,l-e.offset,e.offset),u&&(l=e.skipSpace(u.to)))),e.char(l)==41&&(t.push(on(ot.LinkMark,s,s+1)),a=l+1,c&&t.push(c),u&&t.push(u),t.push(on(ot.LinkMark,l,a)))}else if(o==91){let l=HUe(i,s-e.offset,e.offset,!1);l&&(t.push(l),a=l.to)}return on(r,n,a,t)}function ZUe(e,t,r){if(e.charCodeAt(t)==60){for(let s=t+1;s<e.length;s++){let i=e.charCodeAt(s);if(i==62)return on(ot.URL,t+r,s+1+r);if(i==60||i==10)return!1}return null}else{let s=0,i=t;for(let o=!1;i<e.length;i++){let a=e.charCodeAt(i);if(Eu(a))break;if(o)o=!1;else if(a==40)s++;else if(a==41){if(!s)break;s--}else a==92&&(o=!0)}return i>t?on(ot.URL,t+r,i+r):i==e.length?null:!1}}function qUe(e,t,r){let n=e.charCodeAt(t);if(n!=39&&n!=34&&n!=40)return!1;let s=n==40?41:n;for(let i=t+1,o=!1;i<e.length;i++){let a=e.charCodeAt(i);if(o)o=!1;else{if(a==s)return on(ot.LinkTitle,t+r,i+1+r);a==92&&(o=!0)}}return null}function HUe(e,t,r,n){for(let s=!1,i=t+1,o=Math.min(e.length,i+999);i<o;i++){let a=e.charCodeAt(i);if(s)s=!1;else{if(a==93)return n?!1:on(ot.LinkLabel,t+r,i+1+r);if(n&&!Eu(a)&&(n=!1),a==91)return!1;a==92&&(s=!0)}}return null}class ICr{constructor(t,r,n){this.parser=t,this.text=r,this.offset=n,this.parts=[]}char(t){return t>=this.end?-1:this.text.charCodeAt(t-this.offset)}get end(){return this.offset+this.text.length}slice(t,r){return this.text.slice(t-this.offset,r-this.offset)}append(t){return this.parts.push(t),t.to}addDelimiter(t,r,n,s,i){return this.append(new Wl(t,r,n,(s?1:0)|(i?2:0)))}get hasOpenLink(){for(let t=this.parts.length-1;t>=0;t--){let r=this.parts[t];if(r instanceof Wl&&(r.type==Sx||r.type==QZ))return!0}return!1}addElement(t){return this.append(t)}resolveMarkers(t){for(let n=t;n<this.parts.length;n++){let s=this.parts[n];if(!(s instanceof Wl&&s.type.resolve&&s.side&2))continue;let i=s.type==UUe||s.type==QUe,o=s.to-s.from,a,l=n-1;for(;l>=t;l--){let v=this.parts[l];if(v instanceof Wl&&v.side&1&&v.type==s.type&&!(i&&(s.side&1||v.side&2)&&(v.to-v.from+o)%3==0&&((v.to-v.from)%3||o%3))){a=v;break}}if(!a)continue;let c=s.type.resolve,u=[],d=a.from,p=s.to;if(i){let v=Math.min(2,a.to-a.from,o);d=a.to-v,p=s.from+v,c=v==1?"Emphasis":"StrongEmphasis"}a.type.mark&&u.push(this.elt(a.type.mark,d,a.to));for(let v=l+1;v<n;v++)this.parts[v]instanceof KC&&u.push(this.parts[v]),this.parts[v]=null;s.type.mark&&u.push(this.elt(s.type.mark,s.from,p));let m=this.elt(c,d,p,u);this.parts[l]=i&&a.from!=d?new Wl(a.type,a.from,d,a.side):null,(this.parts[n]=i&&s.to!=p?new Wl(s.type,p,s.to,s.side):null)?this.parts.splice(n,0,m):this.parts[n]=m}let r=[];for(let n=t;n<this.parts.length;n++){let s=this.parts[n];s instanceof KC&&r.push(s)}return r}findOpeningDelimiter(t){for(let r=this.parts.length-1;r>=0;r--){let n=this.parts[r];if(n instanceof Wl&&n.type==t&&n.side&1)return r}return null}takeContent(t){let r=this.resolveMarkers(t);return this.parts.length=t,r}getDelimiterAt(t){let r=this.parts[t];return r instanceof Wl?r:null}skipSpace(t){return Nk(this.text,t-this.offset)+this.offset}elt(t,r,n,s){return typeof t=="string"?on(this.parser.getNodeType(t),r,n,s):new VUe(t,r)}}function ZZ(e,t){if(!t.length)return e;if(!e.length)return t;let r=e.slice(),n=0;for(let s of t){for(;n<r.length&&r[n].to<s.to;)n++;if(n<r.length&&r[n].from<s.from){let i=r[n];i instanceof KC&&(r[n]=new KC(i.type,i.from,i.to,ZZ(i.children,[s])))}else r.splice(n++,0,s)}return r}const NCr=[ot.CodeBlock,ot.ListItem,ot.OrderedList,ot.BulletList];class RCr{constructor(t,r){this.fragments=t,this.input=r,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,t.length&&(this.fragment=t[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(t,r){for(;this.fragment&&this.fragment.to<=t;)this.nextFragment();if(!this.fragment||this.fragment.from>(t?t-1:0))return!1;if(this.fragmentEnd<0){let i=this.fragment.to;for(;i>0&&this.input.read(i-1,i)!=`
|
|
548
|
-
`;)i--;this.fragmentEnd=i?i-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(),n.firstChild());let s=t+this.fragment.offset;for(;n.to<=s;)if(!n.parent())return!1;for(;;){if(n.from>=s)return this.fragment.from<=r;if(!n.childAfter(s))return!1}}matches(t){let r=this.cursor.tree;return r&&r.prop(hr.contextHash)==t}takeNodes(t){let r=this.cursor,n=this.fragment.offset,s=this.fragmentEnd-(this.fragment.openEnd?1:0),i=t.absoluteLineStart,o=i,a=t.block.children.length,l=o,c=a;for(;;){if(r.to-n>s){if(r.type.isAnonymous&&r.firstChild())continue;break}let u=WUe(r.from-n,t.ranges);if(r.to-n<=t.ranges[t.rangeI].to)t.addNode(r.tree,u);else{let d=new Gr(t.parser.nodeSet.types[ot.Paragraph],[],[],0,t.block.hashProp);t.reusePlaceholders.set(d,r.tree),t.addNode(d,u)}if(r.type.is("Block")&&(NCr.indexOf(r.type.id)<0?(o=r.to-n,a=t.block.children.length):(o=l,a=c,l=r.to-n,c=t.block.children.length)),!r.nextSibling())break}for(;t.block.children.length>a;)t.block.children.pop(),t.block.positions.pop();return o-i}}function WUe(e,t){let r=e;for(let n=1;n<t.length;n++){let s=t[n-1].to,i=t[n].from;s<e&&(r-=i-s)}return r}const MCr=R0({"Blockquote/...":Y.quote,HorizontalRule:Y.contentSeparator,"ATXHeading1/... SetextHeading1/...":Y.heading1,"ATXHeading2/... SetextHeading2/...":Y.heading2,"ATXHeading3/...":Y.heading3,"ATXHeading4/...":Y.heading4,"ATXHeading5/...":Y.heading5,"ATXHeading6/...":Y.heading6,"Comment CommentBlock":Y.comment,Escape:Y.escape,Entity:Y.character,"Emphasis/...":Y.emphasis,"StrongEmphasis/...":Y.strong,"Link/... Image/...":Y.link,"OrderedList/... BulletList/...":Y.list,"BlockQuote/...":Y.quote,"InlineCode CodeText":Y.monospace,"URL Autolink":Y.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":Y.processingInstruction,"CodeInfo LinkLabel":Y.labelName,LinkTitle:Y.string,Paragraph:Y.content}),jCr=new Q6(new Xw(zUe).extend(MCr),Object.keys(qP).map(e=>qP[e]),Object.keys(qP).map(e=>FUe[e]),Object.keys(qP),DCr,DUe,Object.keys(BL).map(e=>BL[e]),Object.keys(BL),[]);function FCr(e,t,r){let n=[];for(let s=e.firstChild,i=t;;s=s.nextSibling){let o=s?s.from:r;if(o>i&&n.push({from:i,to:o}),!s)break;i=s.to}return n}function LCr(e){let{codeParser:t,htmlParser:r}=e;return{wrap:JDe((s,i)=>{let o=s.type.id;if(t&&(o==ot.CodeBlock||o==ot.FencedCode)){let a="";if(o==ot.FencedCode){let c=s.node.getChild(ot.CodeInfo);c&&(a=i.read(c.from,c.to))}let l=t(a);if(l)return{parser:l,overlay:c=>c.type.id==ot.CodeText}}else if(r&&(o==ot.HTMLBlock||o==ot.HTMLTag||o==ot.CommentBlock))return{parser:r,overlay:FCr(s.node,s.from,s.to)};return null})}}const zCr={resolve:"Strikethrough",mark:"StrikethroughMark"},BCr={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":Y.strikethrough}},{name:"StrikethroughMark",style:Y.processingInstruction}],parseInline:[{name:"Strikethrough",parse(e,t,r){if(t!=126||e.char(r+1)!=126||e.char(r+2)==126)return-1;let n=e.slice(r-1,r),s=e.slice(r+2,r+3),i=/\s|^$/.test(n),o=/\s|^$/.test(s),a=eT.test(n),l=eT.test(s);return e.addDelimiter(zCr,r,r+2,!o&&(!l||i||a),!i&&(!a||o||l))},after:"Emphasis"}]};function Rk(e,t,r=0,n,s=0){let i=0,o=!0,a=-1,l=-1,c=!1,u=()=>{n.push(e.elt("TableCell",s+a,s+l,e.parser.parseInline(t.slice(a,l),s+a)))};for(let d=r;d<t.length;d++){let p=t.charCodeAt(d);p==124&&!c?((!o||a>-1)&&i++,o=!1,n&&(a>-1&&u(),n.push(e.elt("TableDelimiter",d+s,d+s+1))),a=l=-1):(c||p!=32&&p!=9)&&(a<0&&(a=d),l=d+1),c=!c&&p==92}return a>-1&&(i++,n&&u()),i}function X0e(e,t){for(let r=t;r<e.length;r++){let n=e.charCodeAt(r);if(n==124)return!0;n==92&&r++}return!1}const GUe=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class Y0e{constructor(){this.rows=null}nextLine(t,r,n){if(this.rows==null){this.rows=!1;let s;if((r.next==45||r.next==58||r.next==124)&&GUe.test(s=r.text.slice(r.pos))){let i=[];Rk(t,n.content,0,i,n.start)==Rk(t,s,r.pos)&&(this.rows=[t.elt("TableHeader",n.start,n.start+n.content.length,i),t.elt("TableDelimiter",t.lineStart+r.pos,t.lineStart+r.text.length)])}}else if(this.rows){let s=[];Rk(t,r.text,r.pos,s,t.lineStart),this.rows.push(t.elt("TableRow",t.lineStart+r.pos,t.lineStart+r.text.length,s))}return!1}finish(t,r){return this.rows?(t.addLeafElement(r,t.elt("Table",r.start,r.start+r.content.length,this.rows)),!0):!1}}const VCr={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":Y.heading}},"TableRow",{name:"TableCell",style:Y.content},{name:"TableDelimiter",style:Y.processingInstruction}],parseBlock:[{name:"Table",leaf(e,t){return X0e(t.content,0)?new Y0e:null},endLeaf(e,t,r){if(r.parsers.some(s=>s instanceof Y0e)||!X0e(t.text,t.basePos))return!1;let n=e.peekLine();return GUe.test(n)&&Rk(e,t.text,t.basePos)==Rk(e,n,t.basePos)},before:"SetextHeading"}]};class UCr{nextLine(){return!1}finish(t,r){return t.addLeafElement(r,t.elt("Task",r.start,r.start+r.content.length,[t.elt("TaskMarker",r.start,r.start+3),...t.parser.parseInline(r.content.slice(3),r.start+3)])),!0}}const QCr={defineNodes:[{name:"Task",block:!0,style:Y.list},{name:"TaskMarker",style:Y.atom}],parseBlock:[{name:"TaskList",leaf(e,t){return/^\[[ xX]\][ \t]/.test(t.content)&&e.parentType().name=="ListItem"?new UCr:null},after:"SetextHeading"}]},J0e=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,K0e=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,ZCr=/[\w-]+\.[\w-]+($|\/)/,ebe=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,tbe=/\/[a-zA-Z\d@.]+/gy;function rbe(e,t,r,n){let s=0;for(let i=t;i<r;i++)e[i]==n&&s++;return s}function qCr(e,t){K0e.lastIndex=t;let r=K0e.exec(e);if(!r||ZCr.exec(r[0])[0].indexOf("_")>-1)return-1;let n=t+r[0].length;for(;;){let s=e[n-1],i;if(/[?!.,:*_~]/.test(s)||s==")"&&rbe(e,t,n,")")>rbe(e,t,n,"("))n--;else if(s==";"&&(i=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,n))))n=t+i.index;else break}return n}function nbe(e,t){ebe.lastIndex=t;let r=ebe.exec(e);if(!r)return-1;let n=r[0][r[0].length-1];return n=="_"||n=="-"?-1:t+r[0].length-(n=="."?1:0)}const HCr={parseInline:[{name:"Autolink",parse(e,t,r){let n=r-e.offset;if(n&&/\w/.test(e.text[n-1]))return-1;J0e.lastIndex=n;let s=J0e.exec(e.text),i=-1;if(!s)return-1;if(s[1]||s[2]){if(i=qCr(e.text,n+s[0].length),i>-1&&e.hasOpenLink){let o=/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(n,i));i=n+o[0].length}}else s[3]?i=nbe(e.text,n):(i=nbe(e.text,n+s[0].length),i>-1&&s[0]=="xmpp:"&&(tbe.lastIndex=i,s=tbe.exec(e.text),s&&(i=s.index+s[0].length)));return i<0?-1:(e.addElement(e.elt("URL",r,i+e.offset)),i+e.offset)}}]},WCr=[VCr,QCr,BCr,HCr];function XUe(e,t,r){return(n,s,i)=>{if(s!=e||n.char(i+1)==e)return-1;let o=[n.elt(r,i,i+1)];for(let a=i+1;a<n.end;a++){let l=n.char(a);if(l==e)return n.addElement(n.elt(t,i,a+1,o.concat(n.elt(r,a,a+1))));if(l==92&&o.push(n.elt("Escape",a,a+++2)),Eu(l))break}return-1}}const GCr={defineNodes:[{name:"Superscript",style:Y.special(Y.content)},{name:"SuperscriptMark",style:Y.processingInstruction}],parseInline:[{name:"Superscript",parse:XUe(94,"Superscript","SuperscriptMark")}]},XCr={defineNodes:[{name:"Subscript",style:Y.special(Y.content)},{name:"SubscriptMark",style:Y.processingInstruction}],parseInline:[{name:"Subscript",parse:XUe(126,"Subscript","SubscriptMark")}]},YCr={defineNodes:[{name:"Emoji",style:Y.character}],parseInline:[{name:"Emoji",parse(e,t,r){let n;return t!=58||!(n=/^[a-zA-Z_0-9]+:/.exec(e.slice(r+1,e.end)))?-1:e.addElement(e.elt("Emoji",r,r+1+n[0].length))}}]},JCr=55,KCr=1,eTr=56,tTr=2,rTr=57,nTr=3,sbe=4,sTr=5,Wee=6,YUe=7,JUe=8,KUe=9,eQe=10,iTr=11,oTr=12,aTr=13,VL=58,lTr=14,cTr=15,ibe=59,tQe=21,uTr=23,rQe=24,dTr=25,qZ=27,nQe=28,fTr=29,pTr=32,hTr=35,mTr=37,gTr=38,yTr=0,vTr=1,bTr={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},xTr={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},obe={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 wTr(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}let abe=null,lbe=null,cbe=0;function HZ(e,t){let r=e.pos+t;if(cbe==r&&lbe==e)return abe;let n=e.peek(t),s="";for(;wTr(n);)s+=String.fromCharCode(n),n=e.peek(++t);return lbe=e,cbe=r,abe=s?s.toLowerCase():n==STr||n==OTr?void 0:null}const sQe=60,M4=62,Gee=47,STr=63,OTr=33,_Tr=45;function ube(e,t){this.name=e,this.parent=t}const kTr=[Wee,eQe,YUe,JUe,KUe],ETr=new eAe({start:null,shift(e,t,r,n){return kTr.indexOf(t)>-1?new ube(HZ(n,1)||"",e):e},reduce(e,t){return t==tQe&&e?e.parent:e},reuse(e,t,r,n){let s=t.type.id;return s==Wee||s==mTr?new ube(HZ(n,1)||"",e):e},strict:!1}),CTr=new Cc((e,t)=>{if(e.next!=sQe){e.next<0&&t.context&&e.acceptToken(VL);return}e.advance();let r=e.next==Gee;r&&e.advance();let n=HZ(e,0);if(n===void 0)return;if(!n)return e.acceptToken(r?cTr:lTr);let s=t.context?t.context.name:null;if(r){if(n==s)return e.acceptToken(iTr);if(s&&xTr[s])return e.acceptToken(VL,-2);if(t.dialectEnabled(yTr))return e.acceptToken(oTr);for(let i=t.context;i;i=i.parent)if(i.name==n)return;e.acceptToken(aTr)}else{if(n=="script")return e.acceptToken(YUe);if(n=="style")return e.acceptToken(JUe);if(n=="textarea")return e.acceptToken(KUe);if(bTr.hasOwnProperty(n))return e.acceptToken(eQe);s&&obe[s]&&obe[s][n]?e.acceptToken(VL,-1):e.acceptToken(Wee)}},{contextual:!0}),TTr=new Cc(e=>{for(let t=0,r=0;;r++){if(e.next<0){r&&e.acceptToken(ibe);break}if(e.next==_Tr)t++;else if(e.next==M4&&t>=2){r>=3&&e.acceptToken(ibe,-2);break}else t=0;e.advance()}});function DTr(e){for(;e;e=e.parent)if(e.name=="svg"||e.name=="math")return!0;return!1}const ATr=new Cc((e,t)=>{if(e.next==Gee&&e.peek(1)==M4){let r=t.dialectEnabled(vTr)||DTr(t.context);e.acceptToken(r?sTr:sbe,2)}else e.next==M4&&e.acceptToken(sbe,1)});function Xee(e,t,r){let n=2+e.length;return new Cc(s=>{for(let i=0,o=0,a=0;;a++){if(s.next<0){a&&s.acceptToken(t);break}if(i==0&&s.next==sQe||i==1&&s.next==Gee||i>=2&&i<n&&s.next==e.charCodeAt(i-2))i++,o++;else if(i==n&&s.next==M4){a>o?s.acceptToken(t,-o):s.acceptToken(r,-(o-2));break}else if((s.next==10||s.next==13)&&a){s.acceptToken(t,1);break}else i=o=0;s.advance()}})}const PTr=Xee("script",JCr,KCr),$Tr=Xee("style",eTr,tTr),ITr=Xee("textarea",rTr,nTr),NTr=R0({"Text RawText IncompleteTag IncompleteCloseTag":Y.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":Y.angleBracket,TagName:Y.tagName,"MismatchedCloseTag/TagName":[Y.tagName,Y.invalid],AttributeName:Y.attributeName,"AttributeValue UnquotedAttributeValue":Y.attributeValue,Is:Y.definitionOperator,"EntityReference CharacterReference":Y.character,Comment:Y.blockComment,ProcessingInst:Y.processingInstruction,DoctypeDecl:Y.documentMeta}),RTr=Wv.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:ETr,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:[NTr],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:[PTr,$Tr,ITr,ATr,CTr,TTr,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function iQe(e,t){let r=Object.create(null);for(let n of e.getChildren(rQe)){let s=n.getChild(dTr),i=n.getChild(qZ)||n.getChild(nQe);s&&(r[t.read(s.from,s.to)]=i?i.type.id==qZ?t.read(i.from+1,i.to-1):t.read(i.from,i.to):"")}return r}function dbe(e,t){let r=e.getChild(uTr);return r?t.read(r.from,r.to):" "}function UL(e,t,r){let n;for(let s of r)if(!s.attrs||s.attrs(n||(n=iQe(e.node.parent.firstChild,t))))return{parser:s.parser};return null}function oQe(e=[],t=[]){let r=[],n=[],s=[],i=[];for(let a of e)(a.tag=="script"?r:a.tag=="style"?n:a.tag=="textarea"?s:i).push(a);let o=t.length?Object.create(null):null;for(let a of t)(o[a.name]||(o[a.name]=[])).push(a);return JDe((a,l)=>{let c=a.type.id;if(c==fTr)return UL(a,l,r);if(c==pTr)return UL(a,l,n);if(c==hTr)return UL(a,l,s);if(c==tQe&&i.length){let u=a.node,d=u.firstChild,p=d&&dbe(d,l),m;if(p){for(let g of i)if(g.tag==p&&(!g.attrs||g.attrs(m||(m=iQe(d,l))))){let v=u.lastChild,b=v.type.id==gTr?v.from:u.to;if(b>d.to)return{parser:g.parser,overlay:[{from:d.to,to:b}]}}}}if(o&&c==rQe){let u=a.node,d;if(d=u.firstChild){let p=o[l.read(d.from,d.to)];if(p)for(let m of p){if(m.tagName&&m.tagName!=dbe(u.parent,l))continue;let g=u.lastChild;if(g.type.id==qZ){let v=g.from+1,b=g.lastChild,w=g.to-(b&&b.isError?0:1);if(w>v)return{parser:m.parser,overlay:[{from:v,to:w}]}}else if(g.type.id==nQe)return{parser:m.parser,overlay:[{from:g.from,to:g.to}]}}}}return null})}const MTr=122,fbe=1,jTr=123,FTr=124,aQe=2,LTr=125,zTr=3,BTr=4,lQe=[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],VTr=58,UTr=40,cQe=95,QTr=91,lI=45,ZTr=46,qTr=35,HTr=37,WTr=38,GTr=92,XTr=10,YTr=42;function tT(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function Yee(e){return e>=48&&e<=57}function pbe(e){return Yee(e)||e>=97&&e<=102||e>=65&&e<=70}const uQe=(e,t,r)=>(n,s)=>{for(let i=!1,o=0,a=0;;a++){let{next:l}=n;if(tT(l)||l==lI||l==cQe||i&&Yee(l))!i&&(l!=lI||a>0)&&(i=!0),o===a&&l==lI&&o++,n.advance();else if(l==GTr&&n.peek(1)!=XTr){if(n.advance(),pbe(n.next)){do n.advance();while(pbe(n.next));n.next==32&&n.advance()}else n.next>-1&&n.advance();i=!0}else{i&&n.acceptToken(o==2&&s.canShift(aQe)?t:l==UTr?r:e);break}}},JTr=new Cc(uQe(jTr,aQe,FTr)),KTr=new Cc(uQe(LTr,zTr,BTr)),eDr=new Cc(e=>{if(lQe.includes(e.peek(-1))){let{next:t}=e;(tT(t)||t==cQe||t==qTr||t==ZTr||t==YTr||t==QTr||t==VTr&&tT(e.peek(1))||t==lI||t==WTr)&&e.acceptToken(MTr)}}),tDr=new Cc(e=>{if(!lQe.includes(e.peek(-1))){let{next:t}=e;if(t==HTr&&(e.advance(),e.acceptToken(fbe)),tT(t)){do e.advance();while(tT(e.next)||Yee(e.next));e.acceptToken(fbe)}}}),rDr=R0({"AtKeyword import charset namespace keyframes media supports":Y.definitionKeyword,"from to selector":Y.keyword,NamespaceName:Y.namespace,KeyframeName:Y.labelName,KeyframeRangeName:Y.operatorKeyword,TagName:Y.tagName,ClassName:Y.className,PseudoClassName:Y.constant(Y.className),IdName:Y.labelName,"FeatureName PropertyName":Y.propertyName,AttributeName:Y.attributeName,NumberLiteral:Y.number,KeywordQuery:Y.keyword,UnaryQueryOp:Y.operatorKeyword,"CallTag ValueName":Y.atom,VariableName:Y.variableName,Callee:Y.operatorKeyword,Unit:Y.unit,"UniversalSelector NestingSelector":Y.definitionOperator,"MatchOp CompareOp":Y.compareOperator,"ChildOp SiblingOp, LogicOp":Y.logicOperator,BinOp:Y.arithmeticOperator,Important:Y.modifier,Comment:Y.blockComment,ColorLiteral:Y.color,"ParenthesizedContent StringLiteral":Y.string,":":Y.punctuation,"PseudoOp #":Y.derefOperator,"; ,":Y.separator,"( )":Y.paren,"[ ]":Y.squareBracket,"{ }":Y.brace}),nDr={__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},sDr={__proto__:null,or:98,and:98,not:106,only:106,layer:170},iDr={__proto__:null,selector:112,layer:166},oDr={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},aDr={__proto__:null,to:207},lDr=Wv.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:[rDr],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:[eDr,tDr,JTr,KTr,1,2,3,4,new QI("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:e=>nDr[e]||-1},{term:125,get:e=>sDr[e]||-1},{term:4,get:e=>iDr[e]||-1},{term:25,get:e=>oDr[e]||-1},{term:123,get:e=>aDr[e]||-1}],tokenPrec:1963});let QL=null;function ZL(){if(!QL&&typeof document=="object"&&document.body){let{style:e}=document.body,t=[],r=new Set;for(let n in e)n!="cssText"&&n!="cssFloat"&&typeof e[n]=="string"&&(/[A-Z]/.test(n)&&(n=n.replace(/[A-Z]/g,s=>"-"+s.toLowerCase())),r.has(n)||(t.push(n),r.add(n)));QL=t.sort().map(n=>({type:"property",label:n,apply:n+": "}))}return QL||[]}const hbe=["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(e=>({type:"class",label:e})),mbe=["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(e=>({type:"keyword",label:e})).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(e=>({type:"constant",label:e}))),cDr=["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(e=>({type:"type",label:e})),uDr=["@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(e=>({type:"keyword",label:e})),th=/^(\w[\w-]*|-\w[\w-]*|)$/,dDr=/^-(-[\w-]*)?$/;function fDr(e,t){var r;if((e.name=="("||e.type.isError)&&(e=e.parent||e),e.name!="ArgList")return!1;let n=(r=e.parent)===null||r===void 0?void 0:r.firstChild;return n?.name!="Callee"?!1:t.sliceString(n.from,n.to)=="var"}const gbe=new YDe,pDr=["Declaration"];function hDr(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function dQe(e,t,r){if(t.to-t.from>4096){let n=gbe.get(t);if(n)return n;let s=[],i=new Set,o=t.cursor(vs.IncludeAnonymous);if(o.firstChild())do for(let a of dQe(e,o.node,r))i.has(a.label)||(i.add(a.label),s.push(a));while(o.nextSibling());return gbe.set(t,s),s}else{let n=[],s=new Set;return t.cursor().iterate(i=>{var o;if(r(i)&&i.matchContext(pDr)&&((o=i.node.nextSibling)===null||o===void 0?void 0:o.name)==":"){let a=e.sliceString(i.from,i.to);s.has(a)||(s.add(a),n.push({label:a,type:"variable"}))}}),n}}const fQe=e=>t=>{let{state:r,pos:n}=t,s=Kn(r).resolveInner(n,-1),i=s.type.isError&&s.from==s.to-1&&r.doc.sliceString(s.from,s.to)=="-";if(s.name=="PropertyName"||(i||s.name=="TagName")&&/^(Block|Styles)$/.test(s.resolve(s.to).name))return{from:s.from,options:ZL(),validFor:th};if(s.name=="ValueName")return{from:s.from,options:mbe,validFor:th};if(s.name=="PseudoClassName")return{from:s.from,options:hbe,validFor:th};if(e(s)||(t.explicit||i)&&fDr(s,r.doc))return{from:e(s)||i?s.from:n,options:dQe(r.doc,hDr(s),e),validFor:dDr};if(s.name=="TagName"){for(let{parent:l}=s;l;l=l.parent)if(l.name=="Block")return{from:s.from,options:ZL(),validFor:th};return{from:s.from,options:cDr,validFor:th}}if(s.name=="AtKeyword")return{from:s.from,options:uDr,validFor:th};if(!t.explicit)return null;let o=s.resolve(n),a=o.childBefore(n);return a&&a.name==":"&&o.name=="PseudoClassSelector"?{from:n,options:hbe,validFor:th}:a&&a.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:n,options:mbe,validFor:th}:o.name=="Block"||o.name=="Styles"?{from:n,options:ZL(),validFor:th}:null},pQe=fQe(e=>e.name=="VariableName"),rT=Kv.define({name:"css",parser:lDr.configure({props:[M0.add({Declaration:t1()}),j0.add({"Block KeyframeList":JG})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function hQe(){return new t0(rT,rT.data.of({autocomplete:pQe}))}const mDr=Object.freeze(Object.defineProperty({__proto__:null,css:hQe,cssCompletionSource:pQe,cssLanguage:rT,defineCSSCompletionSource:fQe},Symbol.toStringTag,{value:"Module"})),h_=["_blank","_self","_top","_parent"],qL=["ascii","utf-8","utf-16","latin1","latin1"],HL=["get","post","put","delete"],WL=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],zl=["true","false"],Ut={},gDr={a:{attrs:{href:null,ping:null,type:null,media:null,target:h_,hreflang:null}},abbr:Ut,address:Ut,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Ut,aside:Ut,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Ut,base:{attrs:{href:null,target:h_}},bdi:Ut,bdo:Ut,blockquote:{attrs:{cite:null}},body:Ut,br:Ut,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:WL,formmethod:HL,formnovalidate:["novalidate"],formtarget:h_,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Ut,center:Ut,cite:Ut,code:Ut,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:Ut,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Ut,div:Ut,dl:Ut,dt:Ut,em:Ut,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Ut,figure:Ut,footer:Ut,form:{attrs:{action:null,name:null,"accept-charset":qL,autocomplete:["on","off"],enctype:WL,method:HL,novalidate:["novalidate"],target:h_}},h1:Ut,h2:Ut,h3:Ut,h4:Ut,h5:Ut,h6:Ut,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Ut,hgroup:Ut,hr:Ut,html:{attrs:{manifest:null}},i:Ut,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:WL,formmethod:HL,formnovalidate:["novalidate"],formtarget:h_,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:Ut,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Ut,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:Ut,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:qL,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:Ut,noscript:Ut,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:Ut,param:{attrs:{name:null,value:null}},pre:Ut,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Ut,rt:Ut,ruby:Ut,samp:Ut,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:qL}},section:Ut,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Ut,source:{attrs:{src:null,type:null,media:null}},span:Ut,strong:Ut,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Ut,summary:Ut,sup:Ut,table:Ut,tbody:Ut,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Ut,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:Ut,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Ut,time:{attrs:{datetime:null}},title:Ut,tr:Ut,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Ut,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:Ut},mQe={accesskey:null,class:null,contenteditable:zl,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:zl,autocorrect:zl,autocapitalize:zl,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":zl,"aria-autocomplete":["inline","list","both","none"],"aria-busy":zl,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":zl,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":zl,"aria-hidden":zl,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":zl,"aria-multiselectable":zl,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":zl,"aria-relevant":null,"aria-required":zl,"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},gQe="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(e=>"on"+e);for(let e of gQe)mQe[e]=null;class nT{constructor(t,r){this.tags={...gDr,...t},this.globalAttrs={...mQe,...r},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}nT.default=new nT;function Sw(e,t,r=e.length){if(!t)return"";let n=t.firstChild,s=n&&n.getChild("TagName");return s?e.sliceString(s.from,Math.min(s.to,r)):""}function Ow(e,t=!1){for(;e;e=e.parent)if(e.name=="Element")if(t)t=!1;else return e;return null}function yQe(e,t,r){let n=r.tags[Sw(e,Ow(t))];return n?.children||r.allTags}function Jee(e,t){let r=[];for(let n=Ow(t);n&&!n.type.isTop;n=Ow(n.parent)){let s=Sw(e,n);if(s&&n.lastChild.name=="CloseTag")break;s&&r.indexOf(s)<0&&(t.name=="EndTag"||t.from>=n.firstChild.to)&&r.push(s)}return r}const vQe=/^[:\-\.\w\u00b7-\uffff]*$/;function ybe(e,t,r,n,s){let i=/\s*>/.test(e.sliceDoc(s,s+5))?"":">",o=Ow(r,r.name=="StartTag"||r.name=="TagName");return{from:n,to:s,options:yQe(e.doc,o,t).map(a=>({label:a,type:"type"})).concat(Jee(e.doc,r).map((a,l)=>({label:"/"+a,apply:"/"+a+i,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function vbe(e,t,r,n){let s=/\s*>/.test(e.sliceDoc(n,n+5))?"":">";return{from:r,to:n,options:Jee(e.doc,t).map((i,o)=>({label:i,apply:i+s,type:"type",boost:99-o})),validFor:vQe}}function yDr(e,t,r,n){let s=[],i=0;for(let o of yQe(e.doc,r,t))s.push({label:"<"+o,type:"type"});for(let o of Jee(e.doc,r))s.push({label:"</"+o+">",type:"type",boost:99-i++});return{from:n,to:n,options:s,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function vDr(e,t,r,n,s){let i=Ow(r),o=i?t.tags[Sw(e.doc,i)]:null,a=o&&o.attrs?Object.keys(o.attrs):[],l=o&&o.globalAttrs===!1?a:a.length?a.concat(t.globalAttrNames):t.globalAttrNames;return{from:n,to:s,options:l.map(c=>({label:c,type:"property"})),validFor:vQe}}function bDr(e,t,r,n,s){var i;let o=(i=r.parent)===null||i===void 0?void 0:i.getChild("AttributeName"),a=[],l;if(o){let c=e.sliceDoc(o.from,o.to),u=t.globalAttrs[c];if(!u){let d=Ow(r),p=d?t.tags[Sw(e.doc,d)]:null;u=p?.attrs&&p.attrs[c]}if(u){let d=e.sliceDoc(n,s).toLowerCase(),p='"',m='"';/^['"]/.test(d)?(l=d[0]=='"'?/^[^"]*$/:/^[^']*$/,p="",m=e.sliceDoc(s,s+1)==d[0]?"":d[0],d=d.slice(1),n++):l=/^[^\s<>='"]*$/;for(let g of u)a.push({label:g,apply:p+g+m,type:"constant"})}}return{from:n,to:s,options:a,validFor:l}}function bQe(e,t){let{state:r,pos:n}=t,s=Kn(r).resolveInner(n,-1),i=s.resolve(n);for(let o=n,a;i==s&&(a=s.childBefore(o));){let l=a.lastChild;if(!l||!l.type.isError||l.from<l.to)break;i=s=a,o=l.from}return s.name=="TagName"?s.parent&&/CloseTag$/.test(s.parent.name)?vbe(r,s,s.from,n):ybe(r,e,s,s.from,n):s.name=="StartTag"||s.name=="IncompleteTag"?ybe(r,e,s,n,n):s.name=="StartCloseTag"||s.name=="IncompleteCloseTag"?vbe(r,s,n,n):s.name=="OpenTag"||s.name=="SelfClosingTag"||s.name=="AttributeName"?vDr(r,e,s,s.name=="AttributeName"?s.from:n,n):s.name=="Is"||s.name=="AttributeValue"||s.name=="UnquotedAttributeValue"?bDr(r,e,s,s.name=="Is"?n:s.from,n):t.explicit&&(i.name=="Element"||i.name=="Text"||i.name=="Document")?yDr(r,e,s,n):null}function xQe(e){return bQe(nT.default,e)}function wQe(e){let{extraTags:t,extraGlobalAttributes:r}=e,n=r||t?new nT(t,r):nT.default;return s=>bQe(n,s)}const xDr=tu.parser.configure({top:"SingleExpression"}),SQe=[{tag:"script",attrs:e=>e.type=="text/typescript"||e.lang=="ts",parser:XY.parser},{tag:"script",attrs:e=>e.type=="text/babel"||e.type=="text/jsx",parser:YY.parser},{tag:"script",attrs:e=>e.type=="text/typescript-jsx",parser:JY.parser},{tag:"script",attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:xDr},{tag:"script",attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:tu.parser},{tag:"style",attrs(e){return(!e.lang||e.lang=="css")&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:rT.parser}],OQe=[{name:"style",parser:rT.parser.configure({top:"Styles"})}].concat(gQe.map(e=>({name:e,parser:tu.parser}))),_Qe=Kv.define({name:"html",parser:RTr.configure({props:[M0.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t=null,r;for(let n=e.node;;){let s=n.lastChild;if(!s||s.name!="Element"||s.to!=n.to)break;t=n=s}return t&&!((r=t.lastChild)&&(r.name=="CloseTag"||r.name=="SelfClosingTag"))?e.lineIndent(t.from)+e.unit:null}}),j0.add({Element(e){let t=e.firstChild,r=e.lastChild;return!t||t.name!="OpenTag"?null:{from:t.to,to:r.name=="CloseTag"?r.from:e.to}}}),q2e.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),Mk=_Qe.configure({wrap:oQe(SQe,OQe)});function kQe(e={}){let t="",r;e.matchClosingTags===!1&&(t="noMatch"),e.selfClosingTags===!0&&(t=(t?t+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(r=oQe((e.nestedLanguages||[]).concat(SQe),(e.nestedAttributes||[]).concat(OQe)));let n=r?_Qe.configure({wrap:r,dialect:t}):t?Mk.configure({dialect:t}):Mk;return new t0(n,[Mk.data.of({autocomplete:wQe(e)}),e.autoCloseTags!==!1?EQe:[],K3().support,hQe().support])}const bbe=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),EQe=rt.inputHandler.of((e,t,r,n,s)=>{if(e.composing||e.state.readOnly||t!=r||n!=">"&&n!="/"||!Mk.isActiveAt(e.state,t,-1))return!1;let i=s(),{state:o}=i,a=o.changeByRange(l=>{var c,u,d;let p=o.doc.sliceString(l.from-1,l.to)==n,{head:m}=l,g=Kn(o).resolveInner(m,-1),v;if(p&&n==">"&&g.name=="EndTag"){let b=g.parent;if(((u=(c=b.parent)===null||c===void 0?void 0:c.lastChild)===null||u===void 0?void 0:u.name)!="CloseTag"&&(v=Sw(o.doc,b.parent,m))&&!bbe.has(v)){let w=m+(o.doc.sliceString(m,m+1)===">"?1:0),S=`</${v}>`;return{range:l,changes:{from:m,to:w,insert:S}}}}else if(p&&n=="/"&&g.name=="IncompleteCloseTag"){let b=g.parent;if(g.from==m-2&&((d=b.lastChild)===null||d===void 0?void 0:d.name)!="CloseTag"&&(v=Sw(o.doc,b,m))&&!bbe.has(v)){let w=m+(o.doc.sliceString(m,m+1)===">"?1:0),S=`${v}>`;return{range:Ne.cursor(m+S.length,-1),changes:{from:m,to:w,insert:S}}}}return{range:l}});return a.changes.empty?!1:(e.dispatch([i,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),wDr=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:EQe,html:kQe,htmlCompletionSource:xQe,htmlCompletionSourceWith:wQe,htmlLanguage:Mk},Symbol.toStringTag,{value:"Module"})),CQe=c5({commentTokens:{block:{open:"<!--",close:"-->"}}}),TQe=new hr,DQe=jCr.configure({props:[j0.add(e=>!e.is("Block")||e.is("Document")||WZ(e)!=null||SDr(e)?void 0:(t,r)=>({from:r.doc.lineAt(t.from).to,to:t.to})),TQe.add(WZ),M0.add({Document:()=>null}),fg.add({Document:CQe})]});function WZ(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function SDr(e){return e.name=="OrderedList"||e.name=="BulletList"}function ODr(e,t){let r=e;for(;;){let n=r.nextSibling,s;if(!n||(s=WZ(n.type))!=null&&s<=t)break;r=n}return r.to}const _Dr=N2e.of((e,t,r)=>{for(let n=Kn(e).resolveInner(r,-1);n&&!(n.from<t);n=n.parent){let s=n.type.prop(TQe);if(s==null)continue;let i=ODr(n,s);if(i>r)return{from:r,to:i}}return null});function Kee(e){return new ec(CQe,e,[],"markdown")}const AQe=Kee(DQe),kDr=DQe.configure([WCr,XCr,GCr,YCr,{props:[j0.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]),_w=Kee(kDr);function EDr(e,t){return r=>{if(r&&e){let n=null;if(r=/\S*/.exec(r)[0],typeof e=="function"?n=e(r):n=Ee.matchLanguageName(e,r,!0),n instanceof Ee)return n.support?n.support.language.parser:e0.getSkippingParser(n.load());if(n)return n.parser}return t?t.parser:null}}class GL{constructor(t,r,n,s,i,o,a){this.node=t,this.from=r,this.to=n,this.spaceBefore=s,this.spaceAfter=i,this.type=o,this.item=a}blank(t,r=!0){let n=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(t!=null){for(;n.length<t;)n+=" ";return n}else{for(let s=this.to-this.from-n.length-this.spaceAfter.length;s>0;s--)n+=" ";return n+(r?this.spaceAfter:"")}}marker(t,r){let n=this.node.name=="OrderedList"?String(+$Qe(this.item,t)[2]+r):"";return this.spaceBefore+n+this.type+this.spaceAfter}}function PQe(e,t){let r=[],n=[];for(let s=e;s;s=s.parent){if(s.name=="FencedCode")return n;(s.name=="ListItem"||s.name=="Blockquote")&&r.push(s)}for(let s=r.length-1;s>=0;s--){let i=r[s],o,a=t.lineAt(i.from),l=i.from-a.from;if(i.name=="Blockquote"&&(o=/^ *>( ?)/.exec(a.text.slice(l))))n.push(new GL(i,l,l+o[0].length,"",o[1],">",null));else if(i.name=="ListItem"&&i.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),n.push(new GL(i.parent,l,l+u,o[1],c,o[2],i))}else if(i.name=="ListItem"&&i.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 d=o[2];o[3]&&(d+=o[3].replace(/[xX]/," ")),n.push(new GL(i.parent,l,l+u,o[1],c,d,i))}}return n}function $Qe(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function XL(e,t,r,n=0){for(let s=-1,i=e;;){if(i.name=="ListItem"){let a=$Qe(i,t),l=+a[2];if(s>=0){if(l!=s+1)return;r.push({from:i.from+a[1].length,to:i.from+a[0].length,insert:String(s+2+n)})}s=l}let o=i.nextSibling;if(!o)break;i=o}}function ete(e,t){let r=/^[ \t]*/.exec(e)[0].length;if(!r||t.facet(Jw)!=" ")return e;let n=Dd(e,4,r),s="";for(let i=n;i>0;)i>=4?(s+=" ",i-=4):(s+=" ",i--);return s+e.slice(r)}const IQe=(e={})=>({state:t,dispatch:r})=>{let n=Kn(t),{doc:s}=t,i=null,o=t.changeByRange(a=>{if(!a.empty||!_w.isActiveAt(t,a.from,-1)&&!_w.isActiveAt(t,a.from,1))return i={range:a};let l=a.from,c=s.lineAt(l),u=PQe(n.resolveInner(l,-1),s);for(;u.length&&u[u.length-1].from>l-c.from;)u.pop();if(!u.length)return i={range:a};let d=u[u.length-1];if(d.to-d.spaceAfter.length>l-c.from)return i={range:a};let p=l>=d.to-d.spaceAfter.length&&!/\S/.test(c.text.slice(d.to));if(d.item&&p){let w=d.node.firstChild,S=d.node.getChild("ListItem","ListItem");if(w.to>=l||S&&S.to<l||c.from>0&&!/[^\s>]/.test(s.lineAt(c.from-1).text)||e.nonTightLists===!1){let O=u.length>1?u[u.length-2]:null,k,C="";O&&O.item?(k=c.from+O.from,C=O.marker(s,1)):k=c.from+(O?O.to:0);let T=[{from:k,to:l,insert:C}];return d.node.name=="OrderedList"&&XL(d.item,s,T,-2),O&&O.node.name=="OrderedList"&&XL(O.item,s,T),{range:Ne.cursor(k+C.length),changes:T}}else{let O=wbe(u,t,c);return{range:Ne.cursor(l+O.length+1),changes:{from:c.from,insert:O+t.lineBreak}}}}if(d.node.name=="Blockquote"&&p&&c.from){let w=s.lineAt(c.from-1),S=/>\s*$/.exec(w.text);if(S&&S.index==d.from){let O=t.changes([{from:w.from+S.index,to:w.to},{from:c.from+d.from,to:c.to}]);return{range:a.map(O),changes:O}}}let m=[];d.node.name=="OrderedList"&&XL(d.item,s,m);let g=d.item&&d.item.from<c.from,v="";if(!g||/^[\s\d.)\-+*>]*/.exec(c.text)[0].length>=d.to)for(let w=0,S=u.length-1;w<=S;w++)v+=w==S&&!g?u[w].marker(s,1):u[w].blank(w<S?Dd(c.text,4,u[w+1].from)-v.length:null);let b=l;for(;b>c.from&&/\s/.test(c.text.charAt(b-c.from-1));)b--;return v=ete(v,t),CDr(d.node,t.doc)&&(v=wbe(u,t,c)+t.lineBreak+v),m.push({from:b,to:l,insert:t.lineBreak+v}),{range:Ne.cursor(b+v.length+1),changes:m}});return i?!1:(r(t.update(o,{scrollIntoView:!0,userEvent:"input"})),!0)},NQe=IQe();function xbe(e){return e.name=="QuoteMark"||e.name=="ListMark"}function CDr(e,t){if(e.name!="OrderedList"&&e.name!="BulletList")return!1;let r=e.firstChild,n=e.getChild("ListItem","ListItem");if(!n)return!1;let s=t.lineAt(r.to),i=t.lineAt(n.from),o=/^[\s>]*$/.test(s.text);return s.number+(o?0:1)<i.number}function wbe(e,t,r){let n="";for(let s=0,i=e.length-2;s<=i;s++)n+=e[s].blank(s<i?Dd(r.text,4,e[s+1].from)-n.length:null,s<i);return ete(n,t)}function TDr(e,t){let r=e.resolveInner(t,-1),n=t;xbe(r)&&(n=r.from,r=r.parent);for(let s;s=r.childBefore(n);)if(xbe(s))n=s.from;else if(s.name=="OrderedList"||s.name=="BulletList")r=s.lastChild,n=r.to;else break;return r}const RQe=({state:e,dispatch:t})=>{let r=Kn(e),n=null,s=e.changeByRange(i=>{let o=i.from,{doc:a}=e;if(i.empty&&_w.isActiveAt(e,i.from)){let l=a.lineAt(o),c=PQe(TDr(r,o),a);if(c.length){let u=c[c.length-1],d=u.to-u.spaceAfter.length+(u.spaceAfter?1:0);if(o-l.from>d&&!/\S/.test(l.text.slice(d,o-l.from)))return{range:Ne.cursor(l.from+d),changes:{from:l.from+d,to:o}};if(o-l.from==d&&(!u.item||l.from<=u.item.from||!/\S/.test(l.text.slice(0,u.to)))){let p=l.from+u.from;if(u.item&&u.node.from<u.item.from&&/\S/.test(l.text.slice(u.from,u.to))){let m=u.blank(Dd(l.text,4,u.to)-Dd(l.text,4,u.from));return p==l.from&&(m=ete(m,e)),{range:Ne.cursor(p+m.length),changes:{from:p,to:l.from+u.to,insert:m}}}if(p<o)return{range:Ne.cursor(p),changes:{from:p,to:o}}}}}return n={range:i}});return n?!1:(t(e.update(s,{scrollIntoView:!0,userEvent:"delete"})),!0)},MQe=[{key:"Enter",run:NQe},{key:"Backspace",run:RQe}],jQe=kQe({matchClosingTags:!1});function FQe(e={}){let{codeLanguages:t,defaultCodeLanguage:r,addKeymap:n=!0,base:{parser:s}=AQe,completeHTMLTags:i=!0,pasteURLAsLink:o=!0,htmlTagLanguage:a=jQe}=e;if(!(s instanceof Q6))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let l=e.extensions?[e.extensions]:[],c=[a.support,_Dr],u;o&&c.push(LQe),r instanceof t0?(c.push(r.support),u=r.language):r&&(u=r);let d=t||u?EDr(t,u):void 0;l.push(LCr({codeParser:d,htmlParser:a.language.parser})),n&&c.push(Yh.high(Yw.of(MQe)));let p=Kee(s.configure(l));return i&&c.push(p.data.of({autocomplete:DDr})),new t0(p,c)}function DDr(e){let{state:t,pos:r}=e,n=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(r-25,r));if(!n)return null;let s=Kn(t).resolveInner(r,-1);for(;s&&!s.type.isTop;){if(s.name=="CodeBlock"||s.name=="FencedCode"||s.name=="ProcessingInstructionBlock"||s.name=="CommentBlock"||s.name=="Link"||s.name=="Image")return null;s=s.parent}return{from:r-n[0].length,to:r,options:ADr(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let YL=null;function ADr(){if(YL)return YL;let e=xQe(new uX(Jr.create({extensions:jQe}),0,!0));return YL=e?e.options:[]}const PDr=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,LQe=rt.domEventHandlers({paste:(e,t)=>{var r;let{main:n}=t.state.selection;if(n.empty)return!1;let s=(r=e.clipboardData)===null||r===void 0?void 0:r.getData("text/plain");if(!s||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(s)||(/^www\./.test(s)&&(s="https://"+s),!_w.isActiveAt(t.state,n.from,1)))return!1;let i=Kn(t.state),o=!1;return i.iterate({from:n.from,to:n.to,enter:a=>{(a.from>n.from||PDr.test(a.name))&&(o=!0)},leave:a=>{a.to<n.to&&(o=!0)}}),o?!1:(t.dispatch({changes:[{from:n.from,insert:"["},{from:n.to,insert:`](${s})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}}),$Dr=Object.freeze(Object.defineProperty({__proto__:null,commonmarkLanguage:AQe,deleteMarkupBackward:RQe,insertNewlineContinueMarkup:NQe,insertNewlineContinueMarkupCommand:IQe,markdown:FQe,markdownKeymap:MQe,markdownLanguage:_w,pasteURLAsLink:LQe},Symbol.toStringTag,{value:"Module"}));function Ue(e){return new t0(KG.define(e))}function Hm(e){return G(()=>import("./index-SRXj7vHt.js"),__vite__mapDeps([100,95]),import.meta.url).then(t=>t.sql({dialect:t[e]}))}const IDr=[Ee.of({name:"C",extensions:["c","h","ino"],load(){return G(()=>import("./index-BU9NMmGV.js"),__vite__mapDeps([101,95]),import.meta.url).then(e=>e.cpp())}}),Ee.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load(){return G(()=>import("./index-BU9NMmGV.js"),__vite__mapDeps([101,95]),import.meta.url).then(e=>e.cpp())}}),Ee.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load(){return Hm("Cassandra")}}),Ee.of({name:"CSS",extensions:["css"],load(){return G(()=>Promise.resolve().then(()=>mDr),void 0,import.meta.url).then(e=>e.css())}}),Ee.of({name:"Go",extensions:["go"],load(){return G(()=>import("./index-PMVd-qOe.js"),__vite__mapDeps([102,95]),import.meta.url).then(e=>e.go())}}),Ee.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load(){return G(()=>Promise.resolve().then(()=>wDr),void 0,import.meta.url).then(e=>e.html())}}),Ee.of({name:"Java",extensions:["java"],load(){return G(()=>import("./index-CHp0WaEJ.js"),__vite__mapDeps([103,95]),import.meta.url).then(e=>e.java())}}),Ee.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load(){return G(()=>Promise.resolve().then(()=>kP),void 0,import.meta.url).then(e=>e.javascript())}}),Ee.of({name:"Jinja",extensions:["j2","jinja","jinja2"],load(){return G(()=>import("./index-DrVeTSUu.js"),__vite__mapDeps([104,95]),import.meta.url).then(e=>e.jinja())}}),Ee.of({name:"JSON",alias:["json5"],extensions:["json","map"],load(){return G(()=>Promise.resolve().then(()=>xOt),void 0,import.meta.url).then(e=>e.json())}}),Ee.of({name:"JSX",extensions:["jsx"],load(){return G(()=>Promise.resolve().then(()=>kP),void 0,import.meta.url).then(e=>e.javascript({jsx:!0}))}}),Ee.of({name:"LESS",extensions:["less"],load(){return G(()=>import("./index-DObhJRgr.js"),__vite__mapDeps([105,95]),import.meta.url).then(e=>e.less())}}),Ee.of({name:"Liquid",extensions:["liquid"],load(){return G(()=>import("./index-D4B5WqKQ.js"),__vite__mapDeps([106,95]),import.meta.url).then(e=>e.liquid())}}),Ee.of({name:"MariaDB SQL",load(){return Hm("MariaSQL")}}),Ee.of({name:"Markdown",extensions:["md","markdown","mkd"],load(){return G(()=>Promise.resolve().then(()=>$Dr),void 0,import.meta.url).then(e=>e.markdown())}}),Ee.of({name:"MS SQL",load(){return Hm("MSSQL")}}),Ee.of({name:"MySQL",load(){return Hm("MySQL")}}),Ee.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load(){return G(()=>import("./index-BmFV2eHo.js"),__vite__mapDeps([107,95]),import.meta.url).then(e=>e.php())}}),Ee.of({name:"PLSQL",extensions:["pls"],load(){return Hm("PLSQL")}}),Ee.of({name:"PostgreSQL",load(){return Hm("PostgreSQL")}}),Ee.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load(){return G(()=>import("./index-DO46LT0S.js"),__vite__mapDeps([108,95]),import.meta.url).then(e=>e.python())}}),Ee.of({name:"Rust",extensions:["rs"],load(){return G(()=>import("./index-CghV83pI.js"),__vite__mapDeps([109,95]),import.meta.url).then(e=>e.rust())}}),Ee.of({name:"Sass",extensions:["sass"],load(){return G(()=>import("./index-VLo9WrPH.js"),__vite__mapDeps([110,95]),import.meta.url).then(e=>e.sass({indented:!0}))}}),Ee.of({name:"SCSS",extensions:["scss"],load(){return G(()=>import("./index-VLo9WrPH.js"),__vite__mapDeps([110,95]),import.meta.url).then(e=>e.sass())}}),Ee.of({name:"SQL",extensions:["sql"],load(){return Hm("StandardSQL")}}),Ee.of({name:"SQLite",load(){return Hm("SQLite")}}),Ee.of({name:"TSX",extensions:["tsx"],load(){return G(()=>Promise.resolve().then(()=>kP),void 0,import.meta.url).then(e=>e.javascript({jsx:!0,typescript:!0}))}}),Ee.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load(){return G(()=>Promise.resolve().then(()=>kP),void 0,import.meta.url).then(e=>e.javascript({typescript:!0}))}}),Ee.of({name:"WebAssembly",extensions:["wat","wast"],load(){return G(()=>import("./index-B1egYoJi.js"),__vite__mapDeps([111,95]),import.meta.url).then(e=>e.wast())}}),Ee.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load(){return G(()=>import("./index-DJCrcU8M.js"),__vite__mapDeps([112,95]),import.meta.url).then(e=>e.xml())}}),Ee.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load(){return G(()=>import("./index-TIlNv6VR.js"),__vite__mapDeps([113,95]),import.meta.url).then(e=>e.yaml())}}),Ee.of({name:"APL",extensions:["dyalog","apl"],load(){return G(()=>import("./apl-B4CMkyY2.js"),[],import.meta.url).then(e=>Ue(e.apl))}}),Ee.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load(){return G(()=>import("./asciiarmor-Df11BRmG.js"),[],import.meta.url).then(e=>Ue(e.asciiArmor))}}),Ee.of({name:"ASN.1",extensions:["asn","asn1"],load(){return G(()=>import("./asn1-EdZsLKOL.js"),[],import.meta.url).then(e=>Ue(e.asn1({})))}}),Ee.of({name:"Asterisk",filename:/^extensions\.conf$/i,load(){return G(()=>import("./asterisk-B-8jnY81.js"),[],import.meta.url).then(e=>Ue(e.asterisk))}}),Ee.of({name:"Brainfuck",extensions:["b","bf"],load(){return G(()=>import("./brainfuck-C4LP7Hcl.js"),[],import.meta.url).then(e=>Ue(e.brainfuck))}}),Ee.of({name:"Cobol",extensions:["cob","cpy"],load(){return G(()=>import("./cobol-CWcv1MsR.js"),[],import.meta.url).then(e=>Ue(e.cobol))}}),Ee.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load(){return G(()=>import("./clike-B9uivgTg.js"),[],import.meta.url).then(e=>Ue(e.csharp))}}),Ee.of({name:"Clojure",extensions:["clj","cljc","cljx"],load(){return G(()=>import("./clojure-BMjYHr_A.js"),[],import.meta.url).then(e=>Ue(e.clojure))}}),Ee.of({name:"ClojureScript",extensions:["cljs"],load(){return G(()=>import("./clojure-BMjYHr_A.js"),[],import.meta.url).then(e=>Ue(e.clojure))}}),Ee.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load(){return G(()=>import("./css-BnMrqG3P.js"),[],import.meta.url).then(e=>Ue(e.gss))}}),Ee.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load(){return G(()=>import("./cmake-BQqOBYOt.js"),[],import.meta.url).then(e=>Ue(e.cmake))}}),Ee.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load(){return G(()=>import("./coffeescript-S37ZYGWr.js"),[],import.meta.url).then(e=>Ue(e.coffeeScript))}}),Ee.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load(){return G(()=>import("./commonlisp-DBKNyK5s.js"),[],import.meta.url).then(e=>Ue(e.commonLisp))}}),Ee.of({name:"Cypher",extensions:["cyp","cypher"],load(){return G(()=>import("./cypher-C_CwsFkJ.js"),[],import.meta.url).then(e=>Ue(e.cypher))}}),Ee.of({name:"Cython",extensions:["pyx","pxd","pxi"],load(){return G(()=>import("./python-BuPzkPfP.js"),[],import.meta.url).then(e=>Ue(e.cython))}}),Ee.of({name:"Crystal",extensions:["cr"],load(){return G(()=>import("./crystal-SjHAIU92.js"),[],import.meta.url).then(e=>Ue(e.crystal))}}),Ee.of({name:"D",extensions:["d"],load(){return G(()=>import("./d-pRatUO7H.js"),[],import.meta.url).then(e=>Ue(e.d))}}),Ee.of({name:"Dart",extensions:["dart"],load(){return G(()=>import("./clike-B9uivgTg.js"),[],import.meta.url).then(e=>Ue(e.dart))}}),Ee.of({name:"diff",extensions:["diff","patch"],load(){return G(()=>import("./diff-DbItnlRl.js"),[],import.meta.url).then(e=>Ue(e.diff))}}),Ee.of({name:"Dockerfile",filename:/^Dockerfile$/,load(){return G(()=>import("./dockerfile-BKs6k2Af.js"),__vite__mapDeps([114,115]),import.meta.url).then(e=>Ue(e.dockerFile))}}),Ee.of({name:"DTD",extensions:["dtd"],load(){return G(()=>import("./dtd-DF_7sFjM.js"),[],import.meta.url).then(e=>Ue(e.dtd))}}),Ee.of({name:"Dylan",extensions:["dylan","dyl","intr"],load(){return G(()=>import("./dylan-DwRh75JA.js"),[],import.meta.url).then(e=>Ue(e.dylan))}}),Ee.of({name:"EBNF",load(){return G(()=>import("./ebnf-CDyGwa7X.js"),[],import.meta.url).then(e=>Ue(e.ebnf))}}),Ee.of({name:"ECL",extensions:["ecl"],load(){return G(()=>import("./ecl-Cabwm37j.js"),[],import.meta.url).then(e=>Ue(e.ecl))}}),Ee.of({name:"edn",extensions:["edn"],load(){return G(()=>import("./clojure-BMjYHr_A.js"),[],import.meta.url).then(e=>Ue(e.clojure))}}),Ee.of({name:"Eiffel",extensions:["e"],load(){return G(()=>import("./eiffel-CnydiIhH.js"),[],import.meta.url).then(e=>Ue(e.eiffel))}}),Ee.of({name:"Elm",extensions:["elm"],load(){return G(()=>import("./elm-vLlmbW-K.js"),[],import.meta.url).then(e=>Ue(e.elm))}}),Ee.of({name:"Erlang",extensions:["erl"],load(){return G(()=>import("./erlang-BNw1qcRV.js"),[],import.meta.url).then(e=>Ue(e.erlang))}}),Ee.of({name:"Esper",load(){return G(()=>import("./sql-D0XecflT.js"),[],import.meta.url).then(e=>Ue(e.esper))}}),Ee.of({name:"Factor",extensions:["factor"],load(){return G(()=>import("./factor-kuTfRLto.js"),__vite__mapDeps([116,115]),import.meta.url).then(e=>Ue(e.factor))}}),Ee.of({name:"FCL",load(){return G(()=>import("./fcl-Kvtd6kyn.js"),[],import.meta.url).then(e=>Ue(e.fcl))}}),Ee.of({name:"Forth",extensions:["forth","fth","4th"],load(){return G(()=>import("./forth-Ffai-XNe.js"),[],import.meta.url).then(e=>Ue(e.forth))}}),Ee.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load(){return G(()=>import("./fortran-DYz_wnZ1.js"),[],import.meta.url).then(e=>Ue(e.fortran))}}),Ee.of({name:"F#",alias:["fsharp"],extensions:["fs"],load(){return G(()=>import("./mllike-BO34x3tv.js"),[],import.meta.url).then(e=>Ue(e.fSharp))}}),Ee.of({name:"Gas",extensions:["s"],load(){return G(()=>import("./gas-Bneqetm1.js"),[],import.meta.url).then(e=>Ue(e.gas))}}),Ee.of({name:"Gherkin",extensions:["feature"],load(){return G(()=>import("./gherkin-heZmZLOM.js"),[],import.meta.url).then(e=>Ue(e.gherkin))}}),Ee.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load(){return G(()=>import("./groovy-D9Dt4D0W.js"),[],import.meta.url).then(e=>Ue(e.groovy))}}),Ee.of({name:"Haskell",extensions:["hs"],load(){return G(()=>import("./haskell-Cw1EW3IL.js"),[],import.meta.url).then(e=>Ue(e.haskell))}}),Ee.of({name:"Haxe",extensions:["hx"],load(){return G(()=>import("./haxe-H-WmDvRZ.js"),[],import.meta.url).then(e=>Ue(e.haxe))}}),Ee.of({name:"HXML",extensions:["hxml"],load(){return G(()=>import("./haxe-H-WmDvRZ.js"),[],import.meta.url).then(e=>Ue(e.hxml))}}),Ee.of({name:"HTTP",load(){return G(()=>import("./http-DBlCnlav.js"),[],import.meta.url).then(e=>Ue(e.http))}}),Ee.of({name:"IDL",extensions:["pro"],load(){return G(()=>import("./idl-BEugSyMb.js"),[],import.meta.url).then(e=>Ue(e.idl))}}),Ee.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load(){return G(()=>import("./javascript-iXu5QeM3.js"),[],import.meta.url).then(e=>Ue(e.jsonld))}}),Ee.of({name:"Julia",extensions:["jl"],load(){return G(()=>import("./julia-DuME0IfC.js"),[],import.meta.url).then(e=>Ue(e.julia))}}),Ee.of({name:"Kotlin",extensions:["kt","kts"],load(){return G(()=>import("./clike-B9uivgTg.js"),[],import.meta.url).then(e=>Ue(e.kotlin))}}),Ee.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load(){return G(()=>import("./livescript-BwQOo05w.js"),[],import.meta.url).then(e=>Ue(e.liveScript))}}),Ee.of({name:"Lua",extensions:["lua"],load(){return G(()=>import("./lua-BgMRiT3U.js"),[],import.meta.url).then(e=>Ue(e.lua))}}),Ee.of({name:"mIRC",extensions:["mrc"],load(){return G(()=>import("./mirc-CjQqDB4T.js"),[],import.meta.url).then(e=>Ue(e.mirc))}}),Ee.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load(){return G(()=>import("./mathematica-DTrFuWx2.js"),[],import.meta.url).then(e=>Ue(e.mathematica))}}),Ee.of({name:"Modelica",extensions:["mo"],load(){return G(()=>import("./modelica-Dc1JOy9r.js"),[],import.meta.url).then(e=>Ue(e.modelica))}}),Ee.of({name:"MUMPS",extensions:["mps"],load(){return G(()=>import("./mumps-BT43cFF4.js"),[],import.meta.url).then(e=>Ue(e.mumps))}}),Ee.of({name:"Mbox",extensions:["mbox"],load(){return G(()=>import("./mbox-CNhZ1qSd.js"),[],import.meta.url).then(e=>Ue(e.mbox))}}),Ee.of({name:"Nginx",filename:/nginx.*\.conf$/i,load(){return G(()=>import("./nginx-DdIZxoE0.js"),[],import.meta.url).then(e=>Ue(e.nginx))}}),Ee.of({name:"NSIS",extensions:["nsh","nsi"],load(){return G(()=>import("./nsis-LdVXkNf5.js"),__vite__mapDeps([117,115]),import.meta.url).then(e=>Ue(e.nsis))}}),Ee.of({name:"NTriples",extensions:["nt","nq"],load(){return G(()=>import("./ntriples-BfvgReVJ.js"),[],import.meta.url).then(e=>Ue(e.ntriples))}}),Ee.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load(){return G(()=>import("./clike-B9uivgTg.js"),[],import.meta.url).then(e=>Ue(e.objectiveC))}}),Ee.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load(){return G(()=>import("./clike-B9uivgTg.js"),[],import.meta.url).then(e=>Ue(e.objectiveCpp))}}),Ee.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load(){return G(()=>import("./mllike-BO34x3tv.js"),[],import.meta.url).then(e=>Ue(e.oCaml))}}),Ee.of({name:"Octave",extensions:["m"],load(){return G(()=>import("./octave-Ck1zUtKM.js"),[],import.meta.url).then(e=>Ue(e.octave))}}),Ee.of({name:"Oz",extensions:["oz"],load(){return G(()=>import("./oz-BzwKVEFT.js"),[],import.meta.url).then(e=>Ue(e.oz))}}),Ee.of({name:"Pascal",extensions:["p","pas"],load(){return G(()=>import("./pascal--L3eBynH.js"),[],import.meta.url).then(e=>Ue(e.pascal))}}),Ee.of({name:"Perl",extensions:["pl","pm"],load(){return G(()=>import("./perl-CdXCOZ3F.js"),[],import.meta.url).then(e=>Ue(e.perl))}}),Ee.of({name:"Pig",extensions:["pig"],load(){return G(()=>import("./pig-CevX1Tat.js"),[],import.meta.url).then(e=>Ue(e.pig))}}),Ee.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load(){return G(()=>import("./powershell-CaxLzxiJ.js"),[],import.meta.url).then(e=>Ue(e.powerShell))}}),Ee.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load(){return G(()=>import("./properties-C78fOPTZ.js"),[],import.meta.url).then(e=>Ue(e.properties))}}),Ee.of({name:"ProtoBuf",extensions:["proto"],load(){return G(()=>import("./protobuf-ChK-085T.js"),[],import.meta.url).then(e=>Ue(e.protobuf))}}),Ee.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load(){return G(()=>import("./pug-DeIclll2.js"),__vite__mapDeps([118,119]),import.meta.url).then(e=>Ue(e.pug))}}),Ee.of({name:"Puppet",extensions:["pp"],load(){return G(()=>import("./puppet-DMA9R1ak.js"),[],import.meta.url).then(e=>Ue(e.puppet))}}),Ee.of({name:"Q",extensions:["q"],load(){return G(()=>import("./q-pXgVlZs6.js"),[],import.meta.url).then(e=>Ue(e.q))}}),Ee.of({name:"R",alias:["rscript"],extensions:["r","R"],load(){return G(()=>import("./r-B6wPVr8A.js"),[],import.meta.url).then(e=>Ue(e.r))}}),Ee.of({name:"RPM Changes",load(){return G(()=>import("./rpm-CTu-6PCP.js"),[],import.meta.url).then(e=>Ue(e.rpmChanges))}}),Ee.of({name:"RPM Spec",extensions:["spec"],load(){return G(()=>import("./rpm-CTu-6PCP.js"),[],import.meta.url).then(e=>Ue(e.rpmSpec))}}),Ee.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load(){return G(()=>import("./ruby-B2Rjki9n.js"),[],import.meta.url).then(e=>Ue(e.ruby))}}),Ee.of({name:"SAS",extensions:["sas"],load(){return G(()=>import("./sas-B4kiWyti.js"),[],import.meta.url).then(e=>Ue(e.sas))}}),Ee.of({name:"Scala",extensions:["scala"],load(){return G(()=>import("./clike-B9uivgTg.js"),[],import.meta.url).then(e=>Ue(e.scala))}}),Ee.of({name:"Scheme",extensions:["scm","ss"],load(){return G(()=>import("./scheme-C41bIUwD.js"),[],import.meta.url).then(e=>Ue(e.scheme))}}),Ee.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load(){return G(()=>import("./shell-CjFT_Tl9.js"),[],import.meta.url).then(e=>Ue(e.shell))}}),Ee.of({name:"Sieve",extensions:["siv","sieve"],load(){return G(()=>import("./sieve-C3Gn_uJK.js"),[],import.meta.url).then(e=>Ue(e.sieve))}}),Ee.of({name:"Smalltalk",extensions:["st"],load(){return G(()=>import("./smalltalk-CnHTOXQT.js"),[],import.meta.url).then(e=>Ue(e.smalltalk))}}),Ee.of({name:"Solr",load(){return G(()=>import("./solr-DehyRSwq.js"),[],import.meta.url).then(e=>Ue(e.solr))}}),Ee.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load(){return G(()=>import("./mllike-BO34x3tv.js"),[],import.meta.url).then(e=>Ue(e.sml))}}),Ee.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load(){return G(()=>import("./sparql-DkYu6x3z.js"),[],import.meta.url).then(e=>Ue(e.sparql))}}),Ee.of({name:"Spreadsheet",alias:["excel","formula"],load(){return G(()=>import("./spreadsheet-BCZA_wO0.js"),[],import.meta.url).then(e=>Ue(e.spreadsheet))}}),Ee.of({name:"Squirrel",extensions:["nut"],load(){return G(()=>import("./clike-B9uivgTg.js"),[],import.meta.url).then(e=>Ue(e.squirrel))}}),Ee.of({name:"Stylus",extensions:["styl"],load(){return G(()=>import("./stylus-B533Al4x.js"),[],import.meta.url).then(e=>Ue(e.stylus))}}),Ee.of({name:"Swift",extensions:["swift"],load(){return G(()=>import("./swift-BzpIVaGY.js"),[],import.meta.url).then(e=>Ue(e.swift))}}),Ee.of({name:"sTeX",load(){return G(()=>import("./stex-C3f8Ysf7.js"),[],import.meta.url).then(e=>Ue(e.stex))}}),Ee.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load(){return G(()=>import("./stex-C3f8Ysf7.js"),[],import.meta.url).then(e=>Ue(e.stex))}}),Ee.of({name:"SystemVerilog",extensions:["v","sv","svh"],load(){return G(()=>import("./verilog-C6RDOZhf.js"),[],import.meta.url).then(e=>Ue(e.verilog))}}),Ee.of({name:"Tcl",extensions:["tcl"],load(){return G(()=>import("./tcl-DVfN8rqt.js"),[],import.meta.url).then(e=>Ue(e.tcl))}}),Ee.of({name:"Textile",extensions:["textile"],load(){return G(()=>import("./textile-CnDTJFAw.js"),[],import.meta.url).then(e=>Ue(e.textile))}}),Ee.of({name:"TiddlyWiki",load(){return G(()=>import("./tiddlywiki-DO-Gjzrf.js"),[],import.meta.url).then(e=>Ue(e.tiddlyWiki))}}),Ee.of({name:"Tiki wiki",load(){return G(()=>import("./tiki-DGYXhP31.js"),[],import.meta.url).then(e=>Ue(e.tiki))}}),Ee.of({name:"TOML",extensions:["toml"],load(){return G(()=>import("./toml-Bm5Em-hy.js"),[],import.meta.url).then(e=>Ue(e.toml))}}),Ee.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load(){return G(()=>import("./troff-wAsdV37c.js"),[],import.meta.url).then(e=>Ue(e.troff))}}),Ee.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load(){return G(()=>import("./ttcn-CfJYG6tj.js"),[],import.meta.url).then(e=>Ue(e.ttcn))}}),Ee.of({name:"TTCN_CFG",extensions:["cfg"],load(){return G(()=>import("./ttcn-cfg-B9xdYoR4.js"),[],import.meta.url).then(e=>Ue(e.ttcnCfg))}}),Ee.of({name:"Turtle",extensions:["ttl"],load(){return G(()=>import("./turtle-B1tBg_DP.js"),[],import.meta.url).then(e=>Ue(e.turtle))}}),Ee.of({name:"Web IDL",extensions:["webidl"],load(){return G(()=>import("./webidl-ZXfAyPTL.js"),[],import.meta.url).then(e=>Ue(e.webIDL))}}),Ee.of({name:"VB.NET",extensions:["vb"],load(){return G(()=>import("./vb-CmGdzxic.js"),[],import.meta.url).then(e=>Ue(e.vb))}}),Ee.of({name:"VBScript",extensions:["vbs"],load(){return G(()=>import("./vbscript-BuJXcnF6.js"),[],import.meta.url).then(e=>Ue(e.vbScript))}}),Ee.of({name:"Velocity",extensions:["vtl"],load(){return G(()=>import("./velocity-D8B20fx6.js"),[],import.meta.url).then(e=>Ue(e.velocity))}}),Ee.of({name:"Verilog",extensions:["v"],load(){return G(()=>import("./verilog-C6RDOZhf.js"),[],import.meta.url).then(e=>Ue(e.verilog))}}),Ee.of({name:"VHDL",extensions:["vhd","vhdl"],load(){return G(()=>import("./vhdl-lSbBsy5d.js"),[],import.meta.url).then(e=>Ue(e.vhdl))}}),Ee.of({name:"XQuery",extensions:["xy","xquery","xq","xqm","xqy"],load(){return G(()=>import("./xquery-DzFWVndE.js"),[],import.meta.url).then(e=>Ue(e.xQuery))}}),Ee.of({name:"Yacas",extensions:["ys"],load(){return G(()=>import("./yacas-BJ4BC0dw.js"),[],import.meta.url).then(e=>Ue(e.yacas))}}),Ee.of({name:"Z80",extensions:["z80"],load(){return G(()=>import("./z80-Hz9HOZM7.js"),[],import.meta.url).then(e=>Ue(e.z80))}}),Ee.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load(){return G(()=>import("./mscgen-BA5vi2Kp.js"),[],import.meta.url).then(e=>Ue(e.mscgen))}}),Ee.of({name:"Xù",extensions:["xu"],load(){return G(()=>import("./mscgen-BA5vi2Kp.js"),[],import.meta.url).then(e=>Ue(e.xu))}}),Ee.of({name:"MsGenny",extensions:["msgenny"],load(){return G(()=>import("./mscgen-BA5vi2Kp.js"),[],import.meta.url).then(e=>Ue(e.msgenny))}}),Ee.of({name:"Vue",extensions:["vue"],load(){return G(()=>import("./index-BBTTW9jF.js"),__vite__mapDeps([120,95]),import.meta.url).then(e=>e.vue())}}),Ee.of({name:"Angular Template",load(){return G(()=>import("./index-DOh_HhC0.js"),__vite__mapDeps([121,95]),import.meta.url).then(e=>e.angular())}})];var zQe=e=>{var{theme:t,settings:r={},styles:n=[]}=e,s={".cm-gutters":{}},i={};r.background&&(i.backgroundColor=r.background),r.backgroundImage&&(i.backgroundImage=r.backgroundImage),r.foreground&&(i.color=r.foreground),r.fontSize&&(i.fontSize=r.fontSize),(r.background||r.foreground)&&(s["&"]=i),r.fontFamily&&(s["&.cm-editor .cm-scroller"]={fontFamily:r.fontFamily}),r.gutterBackground&&(s[".cm-gutters"].backgroundColor=r.gutterBackground),r.gutterForeground&&(s[".cm-gutters"].color=r.gutterForeground),r.gutterBorder&&(s[".cm-gutters"].borderRightColor=r.gutterBorder),r.caret&&(s[".cm-content"]={caretColor:r.caret},s[".cm-cursor, .cm-dropCursor"]={borderLeftColor:r.caret});var o={};r.gutterActiveForeground&&(o.color=r.gutterActiveForeground),r.lineHighlight&&(s[".cm-activeLine"]={backgroundColor:r.lineHighlight},o.backgroundColor=r.lineHighlight),s[".cm-activeLineGutter"]=o,r.selection&&(s["&.cm-focused .cm-selectionBackground, & .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={background:r.selection+" !important"}),r.selectionMatch&&(s["& .cm-selectionMatch"]={backgroundColor:r.selectionMatch});var a=rt.theme(s,{dark:t==="dark"}),l=F0.define(n),c=[a,f5(l)];return c},NDr={background:"#fff",foreground:"#24292e",selection:"#BBDFFF",selectionMatch:"#BBDFFF",gutterBackground:"#fff",gutterForeground:"#6e7781"},RDr=[{tag:[Y.standard(Y.tagName),Y.tagName],color:"#116329"},{tag:[Y.comment,Y.bracket],color:"#6a737d"},{tag:[Y.className,Y.propertyName],color:"#6f42c1"},{tag:[Y.variableName,Y.attributeName,Y.number,Y.operator],color:"#005cc5"},{tag:[Y.keyword,Y.typeName,Y.typeOperator,Y.typeName],color:"#d73a49"},{tag:[Y.string,Y.meta,Y.regexp],color:"#032f62"},{tag:[Y.name,Y.quote],color:"#22863a"},{tag:[Y.heading,Y.strong],color:"#24292e",fontWeight:"bold"},{tag:[Y.emphasis],color:"#24292e",fontStyle:"italic"},{tag:[Y.deleted],color:"#b31d28",backgroundColor:"ffeef0"},{tag:[Y.atom,Y.bool,Y.special(Y.variableName)],color:"#e36209"},{tag:[Y.url,Y.escape,Y.regexp,Y.link],color:"#032f62"},{tag:Y.link,textDecoration:"underline"},{tag:Y.strikethrough,textDecoration:"line-through"},{tag:Y.invalid,color:"#cb2431"}],MDr=e=>{var{theme:t="light",settings:r={},styles:n=[]}={};return zQe({theme:t,settings:Cd({},NDr,r),styles:[...RDr,...n]})};MDr();var jDr={background:"#0d1117",foreground:"#c9d1d9",caret:"#c9d1d9",selection:"#003d73",selectionMatch:"#003d73",lineHighlight:"#36334280"},FDr=[{tag:[Y.standard(Y.tagName),Y.tagName],color:"#7ee787"},{tag:[Y.comment,Y.bracket],color:"#8b949e"},{tag:[Y.className,Y.propertyName],color:"#d2a8ff"},{tag:[Y.variableName,Y.attributeName,Y.number,Y.operator],color:"#79c0ff"},{tag:[Y.keyword,Y.typeName,Y.typeOperator,Y.typeName],color:"#ff7b72"},{tag:[Y.string,Y.meta,Y.regexp],color:"#a5d6ff"},{tag:[Y.name,Y.quote],color:"#7ee787"},{tag:[Y.heading,Y.strong],color:"#d2a8ff",fontWeight:"bold"},{tag:[Y.emphasis],color:"#d2a8ff",fontStyle:"italic"},{tag:[Y.deleted],color:"#ffdcd7",backgroundColor:"ffeef0"},{tag:[Y.atom,Y.bool,Y.special(Y.variableName)],color:"#ffab70"},{tag:Y.link,textDecoration:"underline"},{tag:Y.strikethrough,textDecoration:"line-through"},{tag:Y.invalid,color:"#f97583"}],BQe=e=>{var{theme:t="dark",settings:r={},styles:n=[]}=e||{};return zQe({theme:t,settings:Cd({},jDr,r),styles:[...FDr,...n]})};BQe();var VQe="AlertDialog",[LDr]=jo(VQe,[s$e]),am=s$e(),UQe=e=>{const{__scopeAlertDialog:t,...r}=e,n=am(t);return f.jsx(SX,{...n,...r,modal:!0})};UQe.displayName=VQe;var zDr="AlertDialogTrigger",QQe=E.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=am(r);return f.jsx(x$e,{...s,...n,ref:t})});QQe.displayName=zDr;var BDr="AlertDialogPortal",ZQe=e=>{const{__scopeAlertDialog:t,...r}=e,n=am(t);return f.jsx(OX,{...n,...r})};ZQe.displayName=BDr;var VDr="AlertDialogOverlay",qQe=E.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=am(r);return f.jsx(b5,{...s,...n,ref:t})});qQe.displayName=VDr;var u1="AlertDialogContent",[UDr,QDr]=LDr(u1),ZDr=FEe("AlertDialogContent"),HQe=E.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...s}=e,i=am(r),o=E.useRef(null),a=tr(t,o),l=E.useRef(null);return f.jsx(xCt,{contentName:u1,titleName:WQe,docsSlug:"alert-dialog",children:f.jsx(UDr,{scope:r,cancelRef:l,children:f.jsxs(x5,{role:"alertdialog",...i,...s,ref:a,onOpenAutoFocus:dt(s.onOpenAutoFocus,c=>{c.preventDefault(),l.current?.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[f.jsx(ZDr,{children:n}),f.jsx(HDr,{contentRef:o})]})})})});HQe.displayName=u1;var WQe="AlertDialogTitle",GQe=E.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=am(r);return f.jsx(w5,{...s,...n,ref:t})});GQe.displayName=WQe;var XQe="AlertDialogDescription",YQe=E.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=am(r);return f.jsx(S5,{...s,...n,ref:t})});YQe.displayName=XQe;var qDr="AlertDialogAction",JQe=E.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=am(r);return f.jsx(O5,{...s,...n,ref:t})});JQe.displayName=qDr;var KQe="AlertDialogCancel",eZe=E.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:s}=QDr(KQe,r),i=am(r),o=tr(t,s);return f.jsx(O5,{...i,...n,ref:o})});eZe.displayName=KQe;var HDr=({contentRef:e})=>{const t=`\`${u1}\` requires a description for the component to be accessible for screen reader users.
|
|
548
|
+
`;)i--;this.fragmentEnd=i?i-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(),n.firstChild());let s=t+this.fragment.offset;for(;n.to<=s;)if(!n.parent())return!1;for(;;){if(n.from>=s)return this.fragment.from<=r;if(!n.childAfter(s))return!1}}matches(t){let r=this.cursor.tree;return r&&r.prop(hr.contextHash)==t}takeNodes(t){let r=this.cursor,n=this.fragment.offset,s=this.fragmentEnd-(this.fragment.openEnd?1:0),i=t.absoluteLineStart,o=i,a=t.block.children.length,l=o,c=a;for(;;){if(r.to-n>s){if(r.type.isAnonymous&&r.firstChild())continue;break}let u=WUe(r.from-n,t.ranges);if(r.to-n<=t.ranges[t.rangeI].to)t.addNode(r.tree,u);else{let d=new Gr(t.parser.nodeSet.types[ot.Paragraph],[],[],0,t.block.hashProp);t.reusePlaceholders.set(d,r.tree),t.addNode(d,u)}if(r.type.is("Block")&&(NCr.indexOf(r.type.id)<0?(o=r.to-n,a=t.block.children.length):(o=l,a=c,l=r.to-n,c=t.block.children.length)),!r.nextSibling())break}for(;t.block.children.length>a;)t.block.children.pop(),t.block.positions.pop();return o-i}}function WUe(e,t){let r=e;for(let n=1;n<t.length;n++){let s=t[n-1].to,i=t[n].from;s<e&&(r-=i-s)}return r}const MCr=R0({"Blockquote/...":Y.quote,HorizontalRule:Y.contentSeparator,"ATXHeading1/... SetextHeading1/...":Y.heading1,"ATXHeading2/... SetextHeading2/...":Y.heading2,"ATXHeading3/...":Y.heading3,"ATXHeading4/...":Y.heading4,"ATXHeading5/...":Y.heading5,"ATXHeading6/...":Y.heading6,"Comment CommentBlock":Y.comment,Escape:Y.escape,Entity:Y.character,"Emphasis/...":Y.emphasis,"StrongEmphasis/...":Y.strong,"Link/... Image/...":Y.link,"OrderedList/... BulletList/...":Y.list,"BlockQuote/...":Y.quote,"InlineCode CodeText":Y.monospace,"URL Autolink":Y.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":Y.processingInstruction,"CodeInfo LinkLabel":Y.labelName,LinkTitle:Y.string,Paragraph:Y.content}),jCr=new Q6(new Xw(zUe).extend(MCr),Object.keys(qP).map(e=>qP[e]),Object.keys(qP).map(e=>FUe[e]),Object.keys(qP),DCr,DUe,Object.keys(BL).map(e=>BL[e]),Object.keys(BL),[]);function FCr(e,t,r){let n=[];for(let s=e.firstChild,i=t;;s=s.nextSibling){let o=s?s.from:r;if(o>i&&n.push({from:i,to:o}),!s)break;i=s.to}return n}function LCr(e){let{codeParser:t,htmlParser:r}=e;return{wrap:JDe((s,i)=>{let o=s.type.id;if(t&&(o==ot.CodeBlock||o==ot.FencedCode)){let a="";if(o==ot.FencedCode){let c=s.node.getChild(ot.CodeInfo);c&&(a=i.read(c.from,c.to))}let l=t(a);if(l)return{parser:l,overlay:c=>c.type.id==ot.CodeText}}else if(r&&(o==ot.HTMLBlock||o==ot.HTMLTag||o==ot.CommentBlock))return{parser:r,overlay:FCr(s.node,s.from,s.to)};return null})}}const zCr={resolve:"Strikethrough",mark:"StrikethroughMark"},BCr={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":Y.strikethrough}},{name:"StrikethroughMark",style:Y.processingInstruction}],parseInline:[{name:"Strikethrough",parse(e,t,r){if(t!=126||e.char(r+1)!=126||e.char(r+2)==126)return-1;let n=e.slice(r-1,r),s=e.slice(r+2,r+3),i=/\s|^$/.test(n),o=/\s|^$/.test(s),a=eT.test(n),l=eT.test(s);return e.addDelimiter(zCr,r,r+2,!o&&(!l||i||a),!i&&(!a||o||l))},after:"Emphasis"}]};function Rk(e,t,r=0,n,s=0){let i=0,o=!0,a=-1,l=-1,c=!1,u=()=>{n.push(e.elt("TableCell",s+a,s+l,e.parser.parseInline(t.slice(a,l),s+a)))};for(let d=r;d<t.length;d++){let p=t.charCodeAt(d);p==124&&!c?((!o||a>-1)&&i++,o=!1,n&&(a>-1&&u(),n.push(e.elt("TableDelimiter",d+s,d+s+1))),a=l=-1):(c||p!=32&&p!=9)&&(a<0&&(a=d),l=d+1),c=!c&&p==92}return a>-1&&(i++,n&&u()),i}function X0e(e,t){for(let r=t;r<e.length;r++){let n=e.charCodeAt(r);if(n==124)return!0;n==92&&r++}return!1}const GUe=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class Y0e{constructor(){this.rows=null}nextLine(t,r,n){if(this.rows==null){this.rows=!1;let s;if((r.next==45||r.next==58||r.next==124)&&GUe.test(s=r.text.slice(r.pos))){let i=[];Rk(t,n.content,0,i,n.start)==Rk(t,s,r.pos)&&(this.rows=[t.elt("TableHeader",n.start,n.start+n.content.length,i),t.elt("TableDelimiter",t.lineStart+r.pos,t.lineStart+r.text.length)])}}else if(this.rows){let s=[];Rk(t,r.text,r.pos,s,t.lineStart),this.rows.push(t.elt("TableRow",t.lineStart+r.pos,t.lineStart+r.text.length,s))}return!1}finish(t,r){return this.rows?(t.addLeafElement(r,t.elt("Table",r.start,r.start+r.content.length,this.rows)),!0):!1}}const VCr={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":Y.heading}},"TableRow",{name:"TableCell",style:Y.content},{name:"TableDelimiter",style:Y.processingInstruction}],parseBlock:[{name:"Table",leaf(e,t){return X0e(t.content,0)?new Y0e:null},endLeaf(e,t,r){if(r.parsers.some(s=>s instanceof Y0e)||!X0e(t.text,t.basePos))return!1;let n=e.peekLine();return GUe.test(n)&&Rk(e,t.text,t.basePos)==Rk(e,n,t.basePos)},before:"SetextHeading"}]};class UCr{nextLine(){return!1}finish(t,r){return t.addLeafElement(r,t.elt("Task",r.start,r.start+r.content.length,[t.elt("TaskMarker",r.start,r.start+3),...t.parser.parseInline(r.content.slice(3),r.start+3)])),!0}}const QCr={defineNodes:[{name:"Task",block:!0,style:Y.list},{name:"TaskMarker",style:Y.atom}],parseBlock:[{name:"TaskList",leaf(e,t){return/^\[[ xX]\][ \t]/.test(t.content)&&e.parentType().name=="ListItem"?new UCr:null},after:"SetextHeading"}]},J0e=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,K0e=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,ZCr=/[\w-]+\.[\w-]+($|\/)/,ebe=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,tbe=/\/[a-zA-Z\d@.]+/gy;function rbe(e,t,r,n){let s=0;for(let i=t;i<r;i++)e[i]==n&&s++;return s}function qCr(e,t){K0e.lastIndex=t;let r=K0e.exec(e);if(!r||ZCr.exec(r[0])[0].indexOf("_")>-1)return-1;let n=t+r[0].length;for(;;){let s=e[n-1],i;if(/[?!.,:*_~]/.test(s)||s==")"&&rbe(e,t,n,")")>rbe(e,t,n,"("))n--;else if(s==";"&&(i=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,n))))n=t+i.index;else break}return n}function nbe(e,t){ebe.lastIndex=t;let r=ebe.exec(e);if(!r)return-1;let n=r[0][r[0].length-1];return n=="_"||n=="-"?-1:t+r[0].length-(n=="."?1:0)}const HCr={parseInline:[{name:"Autolink",parse(e,t,r){let n=r-e.offset;if(n&&/\w/.test(e.text[n-1]))return-1;J0e.lastIndex=n;let s=J0e.exec(e.text),i=-1;if(!s)return-1;if(s[1]||s[2]){if(i=qCr(e.text,n+s[0].length),i>-1&&e.hasOpenLink){let o=/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(n,i));i=n+o[0].length}}else s[3]?i=nbe(e.text,n):(i=nbe(e.text,n+s[0].length),i>-1&&s[0]=="xmpp:"&&(tbe.lastIndex=i,s=tbe.exec(e.text),s&&(i=s.index+s[0].length)));return i<0?-1:(e.addElement(e.elt("URL",r,i+e.offset)),i+e.offset)}}]},WCr=[VCr,QCr,BCr,HCr];function XUe(e,t,r){return(n,s,i)=>{if(s!=e||n.char(i+1)==e)return-1;let o=[n.elt(r,i,i+1)];for(let a=i+1;a<n.end;a++){let l=n.char(a);if(l==e)return n.addElement(n.elt(t,i,a+1,o.concat(n.elt(r,a,a+1))));if(l==92&&o.push(n.elt("Escape",a,a+++2)),Eu(l))break}return-1}}const GCr={defineNodes:[{name:"Superscript",style:Y.special(Y.content)},{name:"SuperscriptMark",style:Y.processingInstruction}],parseInline:[{name:"Superscript",parse:XUe(94,"Superscript","SuperscriptMark")}]},XCr={defineNodes:[{name:"Subscript",style:Y.special(Y.content)},{name:"SubscriptMark",style:Y.processingInstruction}],parseInline:[{name:"Subscript",parse:XUe(126,"Subscript","SubscriptMark")}]},YCr={defineNodes:[{name:"Emoji",style:Y.character}],parseInline:[{name:"Emoji",parse(e,t,r){let n;return t!=58||!(n=/^[a-zA-Z_0-9]+:/.exec(e.slice(r+1,e.end)))?-1:e.addElement(e.elt("Emoji",r,r+1+n[0].length))}}]},JCr=55,KCr=1,eTr=56,tTr=2,rTr=57,nTr=3,sbe=4,sTr=5,Wee=6,YUe=7,JUe=8,KUe=9,eQe=10,iTr=11,oTr=12,aTr=13,VL=58,lTr=14,cTr=15,ibe=59,tQe=21,uTr=23,rQe=24,dTr=25,qZ=27,nQe=28,fTr=29,pTr=32,hTr=35,mTr=37,gTr=38,yTr=0,vTr=1,bTr={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},xTr={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},obe={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 wTr(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}let abe=null,lbe=null,cbe=0;function HZ(e,t){let r=e.pos+t;if(cbe==r&&lbe==e)return abe;let n=e.peek(t),s="";for(;wTr(n);)s+=String.fromCharCode(n),n=e.peek(++t);return lbe=e,cbe=r,abe=s?s.toLowerCase():n==STr||n==OTr?void 0:null}const sQe=60,M4=62,Gee=47,STr=63,OTr=33,_Tr=45;function ube(e,t){this.name=e,this.parent=t}const kTr=[Wee,eQe,YUe,JUe,KUe],ETr=new eAe({start:null,shift(e,t,r,n){return kTr.indexOf(t)>-1?new ube(HZ(n,1)||"",e):e},reduce(e,t){return t==tQe&&e?e.parent:e},reuse(e,t,r,n){let s=t.type.id;return s==Wee||s==mTr?new ube(HZ(n,1)||"",e):e},strict:!1}),CTr=new Cc((e,t)=>{if(e.next!=sQe){e.next<0&&t.context&&e.acceptToken(VL);return}e.advance();let r=e.next==Gee;r&&e.advance();let n=HZ(e,0);if(n===void 0)return;if(!n)return e.acceptToken(r?cTr:lTr);let s=t.context?t.context.name:null;if(r){if(n==s)return e.acceptToken(iTr);if(s&&xTr[s])return e.acceptToken(VL,-2);if(t.dialectEnabled(yTr))return e.acceptToken(oTr);for(let i=t.context;i;i=i.parent)if(i.name==n)return;e.acceptToken(aTr)}else{if(n=="script")return e.acceptToken(YUe);if(n=="style")return e.acceptToken(JUe);if(n=="textarea")return e.acceptToken(KUe);if(bTr.hasOwnProperty(n))return e.acceptToken(eQe);s&&obe[s]&&obe[s][n]?e.acceptToken(VL,-1):e.acceptToken(Wee)}},{contextual:!0}),TTr=new Cc(e=>{for(let t=0,r=0;;r++){if(e.next<0){r&&e.acceptToken(ibe);break}if(e.next==_Tr)t++;else if(e.next==M4&&t>=2){r>=3&&e.acceptToken(ibe,-2);break}else t=0;e.advance()}});function DTr(e){for(;e;e=e.parent)if(e.name=="svg"||e.name=="math")return!0;return!1}const ATr=new Cc((e,t)=>{if(e.next==Gee&&e.peek(1)==M4){let r=t.dialectEnabled(vTr)||DTr(t.context);e.acceptToken(r?sTr:sbe,2)}else e.next==M4&&e.acceptToken(sbe,1)});function Xee(e,t,r){let n=2+e.length;return new Cc(s=>{for(let i=0,o=0,a=0;;a++){if(s.next<0){a&&s.acceptToken(t);break}if(i==0&&s.next==sQe||i==1&&s.next==Gee||i>=2&&i<n&&s.next==e.charCodeAt(i-2))i++,o++;else if(i==n&&s.next==M4){a>o?s.acceptToken(t,-o):s.acceptToken(r,-(o-2));break}else if((s.next==10||s.next==13)&&a){s.acceptToken(t,1);break}else i=o=0;s.advance()}})}const PTr=Xee("script",JCr,KCr),$Tr=Xee("style",eTr,tTr),ITr=Xee("textarea",rTr,nTr),NTr=R0({"Text RawText IncompleteTag IncompleteCloseTag":Y.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":Y.angleBracket,TagName:Y.tagName,"MismatchedCloseTag/TagName":[Y.tagName,Y.invalid],AttributeName:Y.attributeName,"AttributeValue UnquotedAttributeValue":Y.attributeValue,Is:Y.definitionOperator,"EntityReference CharacterReference":Y.character,Comment:Y.blockComment,ProcessingInst:Y.processingInstruction,DoctypeDecl:Y.documentMeta}),RTr=Wv.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:ETr,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:[NTr],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:[PTr,$Tr,ITr,ATr,CTr,TTr,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function iQe(e,t){let r=Object.create(null);for(let n of e.getChildren(rQe)){let s=n.getChild(dTr),i=n.getChild(qZ)||n.getChild(nQe);s&&(r[t.read(s.from,s.to)]=i?i.type.id==qZ?t.read(i.from+1,i.to-1):t.read(i.from,i.to):"")}return r}function dbe(e,t){let r=e.getChild(uTr);return r?t.read(r.from,r.to):" "}function UL(e,t,r){let n;for(let s of r)if(!s.attrs||s.attrs(n||(n=iQe(e.node.parent.firstChild,t))))return{parser:s.parser};return null}function oQe(e=[],t=[]){let r=[],n=[],s=[],i=[];for(let a of e)(a.tag=="script"?r:a.tag=="style"?n:a.tag=="textarea"?s:i).push(a);let o=t.length?Object.create(null):null;for(let a of t)(o[a.name]||(o[a.name]=[])).push(a);return JDe((a,l)=>{let c=a.type.id;if(c==fTr)return UL(a,l,r);if(c==pTr)return UL(a,l,n);if(c==hTr)return UL(a,l,s);if(c==tQe&&i.length){let u=a.node,d=u.firstChild,p=d&&dbe(d,l),m;if(p){for(let g of i)if(g.tag==p&&(!g.attrs||g.attrs(m||(m=iQe(d,l))))){let v=u.lastChild,b=v.type.id==gTr?v.from:u.to;if(b>d.to)return{parser:g.parser,overlay:[{from:d.to,to:b}]}}}}if(o&&c==rQe){let u=a.node,d;if(d=u.firstChild){let p=o[l.read(d.from,d.to)];if(p)for(let m of p){if(m.tagName&&m.tagName!=dbe(u.parent,l))continue;let g=u.lastChild;if(g.type.id==qZ){let v=g.from+1,b=g.lastChild,w=g.to-(b&&b.isError?0:1);if(w>v)return{parser:m.parser,overlay:[{from:v,to:w}]}}else if(g.type.id==nQe)return{parser:m.parser,overlay:[{from:g.from,to:g.to}]}}}}return null})}const MTr=122,fbe=1,jTr=123,FTr=124,aQe=2,LTr=125,zTr=3,BTr=4,lQe=[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],VTr=58,UTr=40,cQe=95,QTr=91,lI=45,ZTr=46,qTr=35,HTr=37,WTr=38,GTr=92,XTr=10,YTr=42;function tT(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function Yee(e){return e>=48&&e<=57}function pbe(e){return Yee(e)||e>=97&&e<=102||e>=65&&e<=70}const uQe=(e,t,r)=>(n,s)=>{for(let i=!1,o=0,a=0;;a++){let{next:l}=n;if(tT(l)||l==lI||l==cQe||i&&Yee(l))!i&&(l!=lI||a>0)&&(i=!0),o===a&&l==lI&&o++,n.advance();else if(l==GTr&&n.peek(1)!=XTr){if(n.advance(),pbe(n.next)){do n.advance();while(pbe(n.next));n.next==32&&n.advance()}else n.next>-1&&n.advance();i=!0}else{i&&n.acceptToken(o==2&&s.canShift(aQe)?t:l==UTr?r:e);break}}},JTr=new Cc(uQe(jTr,aQe,FTr)),KTr=new Cc(uQe(LTr,zTr,BTr)),eDr=new Cc(e=>{if(lQe.includes(e.peek(-1))){let{next:t}=e;(tT(t)||t==cQe||t==qTr||t==ZTr||t==YTr||t==QTr||t==VTr&&tT(e.peek(1))||t==lI||t==WTr)&&e.acceptToken(MTr)}}),tDr=new Cc(e=>{if(!lQe.includes(e.peek(-1))){let{next:t}=e;if(t==HTr&&(e.advance(),e.acceptToken(fbe)),tT(t)){do e.advance();while(tT(e.next)||Yee(e.next));e.acceptToken(fbe)}}}),rDr=R0({"AtKeyword import charset namespace keyframes media supports":Y.definitionKeyword,"from to selector":Y.keyword,NamespaceName:Y.namespace,KeyframeName:Y.labelName,KeyframeRangeName:Y.operatorKeyword,TagName:Y.tagName,ClassName:Y.className,PseudoClassName:Y.constant(Y.className),IdName:Y.labelName,"FeatureName PropertyName":Y.propertyName,AttributeName:Y.attributeName,NumberLiteral:Y.number,KeywordQuery:Y.keyword,UnaryQueryOp:Y.operatorKeyword,"CallTag ValueName":Y.atom,VariableName:Y.variableName,Callee:Y.operatorKeyword,Unit:Y.unit,"UniversalSelector NestingSelector":Y.definitionOperator,"MatchOp CompareOp":Y.compareOperator,"ChildOp SiblingOp, LogicOp":Y.logicOperator,BinOp:Y.arithmeticOperator,Important:Y.modifier,Comment:Y.blockComment,ColorLiteral:Y.color,"ParenthesizedContent StringLiteral":Y.string,":":Y.punctuation,"PseudoOp #":Y.derefOperator,"; ,":Y.separator,"( )":Y.paren,"[ ]":Y.squareBracket,"{ }":Y.brace}),nDr={__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},sDr={__proto__:null,or:98,and:98,not:106,only:106,layer:170},iDr={__proto__:null,selector:112,layer:166},oDr={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},aDr={__proto__:null,to:207},lDr=Wv.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:[rDr],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:[eDr,tDr,JTr,KTr,1,2,3,4,new QI("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:e=>nDr[e]||-1},{term:125,get:e=>sDr[e]||-1},{term:4,get:e=>iDr[e]||-1},{term:25,get:e=>oDr[e]||-1},{term:123,get:e=>aDr[e]||-1}],tokenPrec:1963});let QL=null;function ZL(){if(!QL&&typeof document=="object"&&document.body){let{style:e}=document.body,t=[],r=new Set;for(let n in e)n!="cssText"&&n!="cssFloat"&&typeof e[n]=="string"&&(/[A-Z]/.test(n)&&(n=n.replace(/[A-Z]/g,s=>"-"+s.toLowerCase())),r.has(n)||(t.push(n),r.add(n)));QL=t.sort().map(n=>({type:"property",label:n,apply:n+": "}))}return QL||[]}const hbe=["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(e=>({type:"class",label:e})),mbe=["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(e=>({type:"keyword",label:e})).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(e=>({type:"constant",label:e}))),cDr=["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(e=>({type:"type",label:e})),uDr=["@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(e=>({type:"keyword",label:e})),th=/^(\w[\w-]*|-\w[\w-]*|)$/,dDr=/^-(-[\w-]*)?$/;function fDr(e,t){var r;if((e.name=="("||e.type.isError)&&(e=e.parent||e),e.name!="ArgList")return!1;let n=(r=e.parent)===null||r===void 0?void 0:r.firstChild;return n?.name!="Callee"?!1:t.sliceString(n.from,n.to)=="var"}const gbe=new YDe,pDr=["Declaration"];function hDr(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function dQe(e,t,r){if(t.to-t.from>4096){let n=gbe.get(t);if(n)return n;let s=[],i=new Set,o=t.cursor(vs.IncludeAnonymous);if(o.firstChild())do for(let a of dQe(e,o.node,r))i.has(a.label)||(i.add(a.label),s.push(a));while(o.nextSibling());return gbe.set(t,s),s}else{let n=[],s=new Set;return t.cursor().iterate(i=>{var o;if(r(i)&&i.matchContext(pDr)&&((o=i.node.nextSibling)===null||o===void 0?void 0:o.name)==":"){let a=e.sliceString(i.from,i.to);s.has(a)||(s.add(a),n.push({label:a,type:"variable"}))}}),n}}const fQe=e=>t=>{let{state:r,pos:n}=t,s=Kn(r).resolveInner(n,-1),i=s.type.isError&&s.from==s.to-1&&r.doc.sliceString(s.from,s.to)=="-";if(s.name=="PropertyName"||(i||s.name=="TagName")&&/^(Block|Styles)$/.test(s.resolve(s.to).name))return{from:s.from,options:ZL(),validFor:th};if(s.name=="ValueName")return{from:s.from,options:mbe,validFor:th};if(s.name=="PseudoClassName")return{from:s.from,options:hbe,validFor:th};if(e(s)||(t.explicit||i)&&fDr(s,r.doc))return{from:e(s)||i?s.from:n,options:dQe(r.doc,hDr(s),e),validFor:dDr};if(s.name=="TagName"){for(let{parent:l}=s;l;l=l.parent)if(l.name=="Block")return{from:s.from,options:ZL(),validFor:th};return{from:s.from,options:cDr,validFor:th}}if(s.name=="AtKeyword")return{from:s.from,options:uDr,validFor:th};if(!t.explicit)return null;let o=s.resolve(n),a=o.childBefore(n);return a&&a.name==":"&&o.name=="PseudoClassSelector"?{from:n,options:hbe,validFor:th}:a&&a.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:n,options:mbe,validFor:th}:o.name=="Block"||o.name=="Styles"?{from:n,options:ZL(),validFor:th}:null},pQe=fQe(e=>e.name=="VariableName"),rT=Kv.define({name:"css",parser:lDr.configure({props:[M0.add({Declaration:t1()}),j0.add({"Block KeyframeList":JG})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function hQe(){return new t0(rT,rT.data.of({autocomplete:pQe}))}const mDr=Object.freeze(Object.defineProperty({__proto__:null,css:hQe,cssCompletionSource:pQe,cssLanguage:rT,defineCSSCompletionSource:fQe},Symbol.toStringTag,{value:"Module"})),h_=["_blank","_self","_top","_parent"],qL=["ascii","utf-8","utf-16","latin1","latin1"],HL=["get","post","put","delete"],WL=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],zl=["true","false"],Ut={},gDr={a:{attrs:{href:null,ping:null,type:null,media:null,target:h_,hreflang:null}},abbr:Ut,address:Ut,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Ut,aside:Ut,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Ut,base:{attrs:{href:null,target:h_}},bdi:Ut,bdo:Ut,blockquote:{attrs:{cite:null}},body:Ut,br:Ut,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:WL,formmethod:HL,formnovalidate:["novalidate"],formtarget:h_,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Ut,center:Ut,cite:Ut,code:Ut,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:Ut,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Ut,div:Ut,dl:Ut,dt:Ut,em:Ut,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Ut,figure:Ut,footer:Ut,form:{attrs:{action:null,name:null,"accept-charset":qL,autocomplete:["on","off"],enctype:WL,method:HL,novalidate:["novalidate"],target:h_}},h1:Ut,h2:Ut,h3:Ut,h4:Ut,h5:Ut,h6:Ut,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Ut,hgroup:Ut,hr:Ut,html:{attrs:{manifest:null}},i:Ut,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:WL,formmethod:HL,formnovalidate:["novalidate"],formtarget:h_,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:Ut,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Ut,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:Ut,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:qL,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:Ut,noscript:Ut,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:Ut,param:{attrs:{name:null,value:null}},pre:Ut,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Ut,rt:Ut,ruby:Ut,samp:Ut,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:qL}},section:Ut,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Ut,source:{attrs:{src:null,type:null,media:null}},span:Ut,strong:Ut,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Ut,summary:Ut,sup:Ut,table:Ut,tbody:Ut,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Ut,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:Ut,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Ut,time:{attrs:{datetime:null}},title:Ut,tr:Ut,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Ut,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:Ut},mQe={accesskey:null,class:null,contenteditable:zl,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:zl,autocorrect:zl,autocapitalize:zl,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":zl,"aria-autocomplete":["inline","list","both","none"],"aria-busy":zl,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":zl,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":zl,"aria-hidden":zl,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":zl,"aria-multiselectable":zl,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":zl,"aria-relevant":null,"aria-required":zl,"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},gQe="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(e=>"on"+e);for(let e of gQe)mQe[e]=null;class nT{constructor(t,r){this.tags={...gDr,...t},this.globalAttrs={...mQe,...r},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}nT.default=new nT;function Sw(e,t,r=e.length){if(!t)return"";let n=t.firstChild,s=n&&n.getChild("TagName");return s?e.sliceString(s.from,Math.min(s.to,r)):""}function Ow(e,t=!1){for(;e;e=e.parent)if(e.name=="Element")if(t)t=!1;else return e;return null}function yQe(e,t,r){let n=r.tags[Sw(e,Ow(t))];return n?.children||r.allTags}function Jee(e,t){let r=[];for(let n=Ow(t);n&&!n.type.isTop;n=Ow(n.parent)){let s=Sw(e,n);if(s&&n.lastChild.name=="CloseTag")break;s&&r.indexOf(s)<0&&(t.name=="EndTag"||t.from>=n.firstChild.to)&&r.push(s)}return r}const vQe=/^[:\-\.\w\u00b7-\uffff]*$/;function ybe(e,t,r,n,s){let i=/\s*>/.test(e.sliceDoc(s,s+5))?"":">",o=Ow(r,r.name=="StartTag"||r.name=="TagName");return{from:n,to:s,options:yQe(e.doc,o,t).map(a=>({label:a,type:"type"})).concat(Jee(e.doc,r).map((a,l)=>({label:"/"+a,apply:"/"+a+i,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function vbe(e,t,r,n){let s=/\s*>/.test(e.sliceDoc(n,n+5))?"":">";return{from:r,to:n,options:Jee(e.doc,t).map((i,o)=>({label:i,apply:i+s,type:"type",boost:99-o})),validFor:vQe}}function yDr(e,t,r,n){let s=[],i=0;for(let o of yQe(e.doc,r,t))s.push({label:"<"+o,type:"type"});for(let o of Jee(e.doc,r))s.push({label:"</"+o+">",type:"type",boost:99-i++});return{from:n,to:n,options:s,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function vDr(e,t,r,n,s){let i=Ow(r),o=i?t.tags[Sw(e.doc,i)]:null,a=o&&o.attrs?Object.keys(o.attrs):[],l=o&&o.globalAttrs===!1?a:a.length?a.concat(t.globalAttrNames):t.globalAttrNames;return{from:n,to:s,options:l.map(c=>({label:c,type:"property"})),validFor:vQe}}function bDr(e,t,r,n,s){var i;let o=(i=r.parent)===null||i===void 0?void 0:i.getChild("AttributeName"),a=[],l;if(o){let c=e.sliceDoc(o.from,o.to),u=t.globalAttrs[c];if(!u){let d=Ow(r),p=d?t.tags[Sw(e.doc,d)]:null;u=p?.attrs&&p.attrs[c]}if(u){let d=e.sliceDoc(n,s).toLowerCase(),p='"',m='"';/^['"]/.test(d)?(l=d[0]=='"'?/^[^"]*$/:/^[^']*$/,p="",m=e.sliceDoc(s,s+1)==d[0]?"":d[0],d=d.slice(1),n++):l=/^[^\s<>='"]*$/;for(let g of u)a.push({label:g,apply:p+g+m,type:"constant"})}}return{from:n,to:s,options:a,validFor:l}}function bQe(e,t){let{state:r,pos:n}=t,s=Kn(r).resolveInner(n,-1),i=s.resolve(n);for(let o=n,a;i==s&&(a=s.childBefore(o));){let l=a.lastChild;if(!l||!l.type.isError||l.from<l.to)break;i=s=a,o=l.from}return s.name=="TagName"?s.parent&&/CloseTag$/.test(s.parent.name)?vbe(r,s,s.from,n):ybe(r,e,s,s.from,n):s.name=="StartTag"||s.name=="IncompleteTag"?ybe(r,e,s,n,n):s.name=="StartCloseTag"||s.name=="IncompleteCloseTag"?vbe(r,s,n,n):s.name=="OpenTag"||s.name=="SelfClosingTag"||s.name=="AttributeName"?vDr(r,e,s,s.name=="AttributeName"?s.from:n,n):s.name=="Is"||s.name=="AttributeValue"||s.name=="UnquotedAttributeValue"?bDr(r,e,s,s.name=="Is"?n:s.from,n):t.explicit&&(i.name=="Element"||i.name=="Text"||i.name=="Document")?yDr(r,e,s,n):null}function xQe(e){return bQe(nT.default,e)}function wQe(e){let{extraTags:t,extraGlobalAttributes:r}=e,n=r||t?new nT(t,r):nT.default;return s=>bQe(n,s)}const xDr=tu.parser.configure({top:"SingleExpression"}),SQe=[{tag:"script",attrs:e=>e.type=="text/typescript"||e.lang=="ts",parser:XY.parser},{tag:"script",attrs:e=>e.type=="text/babel"||e.type=="text/jsx",parser:YY.parser},{tag:"script",attrs:e=>e.type=="text/typescript-jsx",parser:JY.parser},{tag:"script",attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:xDr},{tag:"script",attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:tu.parser},{tag:"style",attrs(e){return(!e.lang||e.lang=="css")&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:rT.parser}],OQe=[{name:"style",parser:rT.parser.configure({top:"Styles"})}].concat(gQe.map(e=>({name:e,parser:tu.parser}))),_Qe=Kv.define({name:"html",parser:RTr.configure({props:[M0.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t=null,r;for(let n=e.node;;){let s=n.lastChild;if(!s||s.name!="Element"||s.to!=n.to)break;t=n=s}return t&&!((r=t.lastChild)&&(r.name=="CloseTag"||r.name=="SelfClosingTag"))?e.lineIndent(t.from)+e.unit:null}}),j0.add({Element(e){let t=e.firstChild,r=e.lastChild;return!t||t.name!="OpenTag"?null:{from:t.to,to:r.name=="CloseTag"?r.from:e.to}}}),q2e.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),Mk=_Qe.configure({wrap:oQe(SQe,OQe)});function kQe(e={}){let t="",r;e.matchClosingTags===!1&&(t="noMatch"),e.selfClosingTags===!0&&(t=(t?t+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(r=oQe((e.nestedLanguages||[]).concat(SQe),(e.nestedAttributes||[]).concat(OQe)));let n=r?_Qe.configure({wrap:r,dialect:t}):t?Mk.configure({dialect:t}):Mk;return new t0(n,[Mk.data.of({autocomplete:wQe(e)}),e.autoCloseTags!==!1?EQe:[],K3().support,hQe().support])}const bbe=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),EQe=rt.inputHandler.of((e,t,r,n,s)=>{if(e.composing||e.state.readOnly||t!=r||n!=">"&&n!="/"||!Mk.isActiveAt(e.state,t,-1))return!1;let i=s(),{state:o}=i,a=o.changeByRange(l=>{var c,u,d;let p=o.doc.sliceString(l.from-1,l.to)==n,{head:m}=l,g=Kn(o).resolveInner(m,-1),v;if(p&&n==">"&&g.name=="EndTag"){let b=g.parent;if(((u=(c=b.parent)===null||c===void 0?void 0:c.lastChild)===null||u===void 0?void 0:u.name)!="CloseTag"&&(v=Sw(o.doc,b.parent,m))&&!bbe.has(v)){let w=m+(o.doc.sliceString(m,m+1)===">"?1:0),S=`</${v}>`;return{range:l,changes:{from:m,to:w,insert:S}}}}else if(p&&n=="/"&&g.name=="IncompleteCloseTag"){let b=g.parent;if(g.from==m-2&&((d=b.lastChild)===null||d===void 0?void 0:d.name)!="CloseTag"&&(v=Sw(o.doc,b,m))&&!bbe.has(v)){let w=m+(o.doc.sliceString(m,m+1)===">"?1:0),S=`${v}>`;return{range:Ne.cursor(m+S.length,-1),changes:{from:m,to:w,insert:S}}}}return{range:l}});return a.changes.empty?!1:(e.dispatch([i,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),wDr=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:EQe,html:kQe,htmlCompletionSource:xQe,htmlCompletionSourceWith:wQe,htmlLanguage:Mk},Symbol.toStringTag,{value:"Module"})),CQe=c5({commentTokens:{block:{open:"<!--",close:"-->"}}}),TQe=new hr,DQe=jCr.configure({props:[j0.add(e=>!e.is("Block")||e.is("Document")||WZ(e)!=null||SDr(e)?void 0:(t,r)=>({from:r.doc.lineAt(t.from).to,to:t.to})),TQe.add(WZ),M0.add({Document:()=>null}),fg.add({Document:CQe})]});function WZ(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function SDr(e){return e.name=="OrderedList"||e.name=="BulletList"}function ODr(e,t){let r=e;for(;;){let n=r.nextSibling,s;if(!n||(s=WZ(n.type))!=null&&s<=t)break;r=n}return r.to}const _Dr=N2e.of((e,t,r)=>{for(let n=Kn(e).resolveInner(r,-1);n&&!(n.from<t);n=n.parent){let s=n.type.prop(TQe);if(s==null)continue;let i=ODr(n,s);if(i>r)return{from:r,to:i}}return null});function Kee(e){return new ec(CQe,e,[],"markdown")}const AQe=Kee(DQe),kDr=DQe.configure([WCr,XCr,GCr,YCr,{props:[j0.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]),_w=Kee(kDr);function EDr(e,t){return r=>{if(r&&e){let n=null;if(r=/\S*/.exec(r)[0],typeof e=="function"?n=e(r):n=Ee.matchLanguageName(e,r,!0),n instanceof Ee)return n.support?n.support.language.parser:e0.getSkippingParser(n.load());if(n)return n.parser}return t?t.parser:null}}class GL{constructor(t,r,n,s,i,o,a){this.node=t,this.from=r,this.to=n,this.spaceBefore=s,this.spaceAfter=i,this.type=o,this.item=a}blank(t,r=!0){let n=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(t!=null){for(;n.length<t;)n+=" ";return n}else{for(let s=this.to-this.from-n.length-this.spaceAfter.length;s>0;s--)n+=" ";return n+(r?this.spaceAfter:"")}}marker(t,r){let n=this.node.name=="OrderedList"?String(+$Qe(this.item,t)[2]+r):"";return this.spaceBefore+n+this.type+this.spaceAfter}}function PQe(e,t){let r=[],n=[];for(let s=e;s;s=s.parent){if(s.name=="FencedCode")return n;(s.name=="ListItem"||s.name=="Blockquote")&&r.push(s)}for(let s=r.length-1;s>=0;s--){let i=r[s],o,a=t.lineAt(i.from),l=i.from-a.from;if(i.name=="Blockquote"&&(o=/^ *>( ?)/.exec(a.text.slice(l))))n.push(new GL(i,l,l+o[0].length,"",o[1],">",null));else if(i.name=="ListItem"&&i.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),n.push(new GL(i.parent,l,l+u,o[1],c,o[2],i))}else if(i.name=="ListItem"&&i.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 d=o[2];o[3]&&(d+=o[3].replace(/[xX]/," ")),n.push(new GL(i.parent,l,l+u,o[1],c,d,i))}}return n}function $Qe(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function XL(e,t,r,n=0){for(let s=-1,i=e;;){if(i.name=="ListItem"){let a=$Qe(i,t),l=+a[2];if(s>=0){if(l!=s+1)return;r.push({from:i.from+a[1].length,to:i.from+a[0].length,insert:String(s+2+n)})}s=l}let o=i.nextSibling;if(!o)break;i=o}}function ete(e,t){let r=/^[ \t]*/.exec(e)[0].length;if(!r||t.facet(Jw)!=" ")return e;let n=Dd(e,4,r),s="";for(let i=n;i>0;)i>=4?(s+=" ",i-=4):(s+=" ",i--);return s+e.slice(r)}const IQe=(e={})=>({state:t,dispatch:r})=>{let n=Kn(t),{doc:s}=t,i=null,o=t.changeByRange(a=>{if(!a.empty||!_w.isActiveAt(t,a.from,-1)&&!_w.isActiveAt(t,a.from,1))return i={range:a};let l=a.from,c=s.lineAt(l),u=PQe(n.resolveInner(l,-1),s);for(;u.length&&u[u.length-1].from>l-c.from;)u.pop();if(!u.length)return i={range:a};let d=u[u.length-1];if(d.to-d.spaceAfter.length>l-c.from)return i={range:a};let p=l>=d.to-d.spaceAfter.length&&!/\S/.test(c.text.slice(d.to));if(d.item&&p){let w=d.node.firstChild,S=d.node.getChild("ListItem","ListItem");if(w.to>=l||S&&S.to<l||c.from>0&&!/[^\s>]/.test(s.lineAt(c.from-1).text)||e.nonTightLists===!1){let O=u.length>1?u[u.length-2]:null,k,C="";O&&O.item?(k=c.from+O.from,C=O.marker(s,1)):k=c.from+(O?O.to:0);let T=[{from:k,to:l,insert:C}];return d.node.name=="OrderedList"&&XL(d.item,s,T,-2),O&&O.node.name=="OrderedList"&&XL(O.item,s,T),{range:Ne.cursor(k+C.length),changes:T}}else{let O=wbe(u,t,c);return{range:Ne.cursor(l+O.length+1),changes:{from:c.from,insert:O+t.lineBreak}}}}if(d.node.name=="Blockquote"&&p&&c.from){let w=s.lineAt(c.from-1),S=/>\s*$/.exec(w.text);if(S&&S.index==d.from){let O=t.changes([{from:w.from+S.index,to:w.to},{from:c.from+d.from,to:c.to}]);return{range:a.map(O),changes:O}}}let m=[];d.node.name=="OrderedList"&&XL(d.item,s,m);let g=d.item&&d.item.from<c.from,v="";if(!g||/^[\s\d.)\-+*>]*/.exec(c.text)[0].length>=d.to)for(let w=0,S=u.length-1;w<=S;w++)v+=w==S&&!g?u[w].marker(s,1):u[w].blank(w<S?Dd(c.text,4,u[w+1].from)-v.length:null);let b=l;for(;b>c.from&&/\s/.test(c.text.charAt(b-c.from-1));)b--;return v=ete(v,t),CDr(d.node,t.doc)&&(v=wbe(u,t,c)+t.lineBreak+v),m.push({from:b,to:l,insert:t.lineBreak+v}),{range:Ne.cursor(b+v.length+1),changes:m}});return i?!1:(r(t.update(o,{scrollIntoView:!0,userEvent:"input"})),!0)},NQe=IQe();function xbe(e){return e.name=="QuoteMark"||e.name=="ListMark"}function CDr(e,t){if(e.name!="OrderedList"&&e.name!="BulletList")return!1;let r=e.firstChild,n=e.getChild("ListItem","ListItem");if(!n)return!1;let s=t.lineAt(r.to),i=t.lineAt(n.from),o=/^[\s>]*$/.test(s.text);return s.number+(o?0:1)<i.number}function wbe(e,t,r){let n="";for(let s=0,i=e.length-2;s<=i;s++)n+=e[s].blank(s<i?Dd(r.text,4,e[s+1].from)-n.length:null,s<i);return ete(n,t)}function TDr(e,t){let r=e.resolveInner(t,-1),n=t;xbe(r)&&(n=r.from,r=r.parent);for(let s;s=r.childBefore(n);)if(xbe(s))n=s.from;else if(s.name=="OrderedList"||s.name=="BulletList")r=s.lastChild,n=r.to;else break;return r}const RQe=({state:e,dispatch:t})=>{let r=Kn(e),n=null,s=e.changeByRange(i=>{let o=i.from,{doc:a}=e;if(i.empty&&_w.isActiveAt(e,i.from)){let l=a.lineAt(o),c=PQe(TDr(r,o),a);if(c.length){let u=c[c.length-1],d=u.to-u.spaceAfter.length+(u.spaceAfter?1:0);if(o-l.from>d&&!/\S/.test(l.text.slice(d,o-l.from)))return{range:Ne.cursor(l.from+d),changes:{from:l.from+d,to:o}};if(o-l.from==d&&(!u.item||l.from<=u.item.from||!/\S/.test(l.text.slice(0,u.to)))){let p=l.from+u.from;if(u.item&&u.node.from<u.item.from&&/\S/.test(l.text.slice(u.from,u.to))){let m=u.blank(Dd(l.text,4,u.to)-Dd(l.text,4,u.from));return p==l.from&&(m=ete(m,e)),{range:Ne.cursor(p+m.length),changes:{from:p,to:l.from+u.to,insert:m}}}if(p<o)return{range:Ne.cursor(p),changes:{from:p,to:o}}}}}return n={range:i}});return n?!1:(t(e.update(s,{scrollIntoView:!0,userEvent:"delete"})),!0)},MQe=[{key:"Enter",run:NQe},{key:"Backspace",run:RQe}],jQe=kQe({matchClosingTags:!1});function FQe(e={}){let{codeLanguages:t,defaultCodeLanguage:r,addKeymap:n=!0,base:{parser:s}=AQe,completeHTMLTags:i=!0,pasteURLAsLink:o=!0,htmlTagLanguage:a=jQe}=e;if(!(s instanceof Q6))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let l=e.extensions?[e.extensions]:[],c=[a.support,_Dr],u;o&&c.push(LQe),r instanceof t0?(c.push(r.support),u=r.language):r&&(u=r);let d=t||u?EDr(t,u):void 0;l.push(LCr({codeParser:d,htmlParser:a.language.parser})),n&&c.push(Yh.high(Yw.of(MQe)));let p=Kee(s.configure(l));return i&&c.push(p.data.of({autocomplete:DDr})),new t0(p,c)}function DDr(e){let{state:t,pos:r}=e,n=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(r-25,r));if(!n)return null;let s=Kn(t).resolveInner(r,-1);for(;s&&!s.type.isTop;){if(s.name=="CodeBlock"||s.name=="FencedCode"||s.name=="ProcessingInstructionBlock"||s.name=="CommentBlock"||s.name=="Link"||s.name=="Image")return null;s=s.parent}return{from:r-n[0].length,to:r,options:ADr(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let YL=null;function ADr(){if(YL)return YL;let e=xQe(new uX(Jr.create({extensions:jQe}),0,!0));return YL=e?e.options:[]}const PDr=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,LQe=rt.domEventHandlers({paste:(e,t)=>{var r;let{main:n}=t.state.selection;if(n.empty)return!1;let s=(r=e.clipboardData)===null||r===void 0?void 0:r.getData("text/plain");if(!s||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(s)||(/^www\./.test(s)&&(s="https://"+s),!_w.isActiveAt(t.state,n.from,1)))return!1;let i=Kn(t.state),o=!1;return i.iterate({from:n.from,to:n.to,enter:a=>{(a.from>n.from||PDr.test(a.name))&&(o=!0)},leave:a=>{a.to<n.to&&(o=!0)}}),o?!1:(t.dispatch({changes:[{from:n.from,insert:"["},{from:n.to,insert:`](${s})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}}),$Dr=Object.freeze(Object.defineProperty({__proto__:null,commonmarkLanguage:AQe,deleteMarkupBackward:RQe,insertNewlineContinueMarkup:NQe,insertNewlineContinueMarkupCommand:IQe,markdown:FQe,markdownKeymap:MQe,markdownLanguage:_w,pasteURLAsLink:LQe},Symbol.toStringTag,{value:"Module"}));function Ue(e){return new t0(KG.define(e))}function Hm(e){return G(()=>import("./index-Dg7Uh3mq.js"),__vite__mapDeps([100,95]),import.meta.url).then(t=>t.sql({dialect:t[e]}))}const IDr=[Ee.of({name:"C",extensions:["c","h","ino"],load(){return G(()=>import("./index-BMyOXiDz.js"),__vite__mapDeps([101,95]),import.meta.url).then(e=>e.cpp())}}),Ee.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load(){return G(()=>import("./index-BMyOXiDz.js"),__vite__mapDeps([101,95]),import.meta.url).then(e=>e.cpp())}}),Ee.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load(){return Hm("Cassandra")}}),Ee.of({name:"CSS",extensions:["css"],load(){return G(()=>Promise.resolve().then(()=>mDr),void 0,import.meta.url).then(e=>e.css())}}),Ee.of({name:"Go",extensions:["go"],load(){return G(()=>import("./index-D6oDWlFG.js"),__vite__mapDeps([102,95]),import.meta.url).then(e=>e.go())}}),Ee.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load(){return G(()=>Promise.resolve().then(()=>wDr),void 0,import.meta.url).then(e=>e.html())}}),Ee.of({name:"Java",extensions:["java"],load(){return G(()=>import("./index-DeIo3CRw.js"),__vite__mapDeps([103,95]),import.meta.url).then(e=>e.java())}}),Ee.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load(){return G(()=>Promise.resolve().then(()=>kP),void 0,import.meta.url).then(e=>e.javascript())}}),Ee.of({name:"Jinja",extensions:["j2","jinja","jinja2"],load(){return G(()=>import("./index-B0aY8xCv.js"),__vite__mapDeps([104,95]),import.meta.url).then(e=>e.jinja())}}),Ee.of({name:"JSON",alias:["json5"],extensions:["json","map"],load(){return G(()=>Promise.resolve().then(()=>xOt),void 0,import.meta.url).then(e=>e.json())}}),Ee.of({name:"JSX",extensions:["jsx"],load(){return G(()=>Promise.resolve().then(()=>kP),void 0,import.meta.url).then(e=>e.javascript({jsx:!0}))}}),Ee.of({name:"LESS",extensions:["less"],load(){return G(()=>import("./index-bcR-2sVb.js"),__vite__mapDeps([105,95]),import.meta.url).then(e=>e.less())}}),Ee.of({name:"Liquid",extensions:["liquid"],load(){return G(()=>import("./index-kn0O4fHS.js"),__vite__mapDeps([106,95]),import.meta.url).then(e=>e.liquid())}}),Ee.of({name:"MariaDB SQL",load(){return Hm("MariaSQL")}}),Ee.of({name:"Markdown",extensions:["md","markdown","mkd"],load(){return G(()=>Promise.resolve().then(()=>$Dr),void 0,import.meta.url).then(e=>e.markdown())}}),Ee.of({name:"MS SQL",load(){return Hm("MSSQL")}}),Ee.of({name:"MySQL",load(){return Hm("MySQL")}}),Ee.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load(){return G(()=>import("./index-CLF5MOZc.js"),__vite__mapDeps([107,95]),import.meta.url).then(e=>e.php())}}),Ee.of({name:"PLSQL",extensions:["pls"],load(){return Hm("PLSQL")}}),Ee.of({name:"PostgreSQL",load(){return Hm("PostgreSQL")}}),Ee.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load(){return G(()=>import("./index-B0tcDSiK.js"),__vite__mapDeps([108,95]),import.meta.url).then(e=>e.python())}}),Ee.of({name:"Rust",extensions:["rs"],load(){return G(()=>import("./index-Dhd4AX7M.js"),__vite__mapDeps([109,95]),import.meta.url).then(e=>e.rust())}}),Ee.of({name:"Sass",extensions:["sass"],load(){return G(()=>import("./index-C4BgqleR.js"),__vite__mapDeps([110,95]),import.meta.url).then(e=>e.sass({indented:!0}))}}),Ee.of({name:"SCSS",extensions:["scss"],load(){return G(()=>import("./index-C4BgqleR.js"),__vite__mapDeps([110,95]),import.meta.url).then(e=>e.sass())}}),Ee.of({name:"SQL",extensions:["sql"],load(){return Hm("StandardSQL")}}),Ee.of({name:"SQLite",load(){return Hm("SQLite")}}),Ee.of({name:"TSX",extensions:["tsx"],load(){return G(()=>Promise.resolve().then(()=>kP),void 0,import.meta.url).then(e=>e.javascript({jsx:!0,typescript:!0}))}}),Ee.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load(){return G(()=>Promise.resolve().then(()=>kP),void 0,import.meta.url).then(e=>e.javascript({typescript:!0}))}}),Ee.of({name:"WebAssembly",extensions:["wat","wast"],load(){return G(()=>import("./index-D_hlidfO.js"),__vite__mapDeps([111,95]),import.meta.url).then(e=>e.wast())}}),Ee.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load(){return G(()=>import("./index-DEkLVfwM.js"),__vite__mapDeps([112,95]),import.meta.url).then(e=>e.xml())}}),Ee.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load(){return G(()=>import("./index-0x85l-03.js"),__vite__mapDeps([113,95]),import.meta.url).then(e=>e.yaml())}}),Ee.of({name:"APL",extensions:["dyalog","apl"],load(){return G(()=>import("./apl-B4CMkyY2.js"),[],import.meta.url).then(e=>Ue(e.apl))}}),Ee.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load(){return G(()=>import("./asciiarmor-Df11BRmG.js"),[],import.meta.url).then(e=>Ue(e.asciiArmor))}}),Ee.of({name:"ASN.1",extensions:["asn","asn1"],load(){return G(()=>import("./asn1-EdZsLKOL.js"),[],import.meta.url).then(e=>Ue(e.asn1({})))}}),Ee.of({name:"Asterisk",filename:/^extensions\.conf$/i,load(){return G(()=>import("./asterisk-B-8jnY81.js"),[],import.meta.url).then(e=>Ue(e.asterisk))}}),Ee.of({name:"Brainfuck",extensions:["b","bf"],load(){return G(()=>import("./brainfuck-C4LP7Hcl.js"),[],import.meta.url).then(e=>Ue(e.brainfuck))}}),Ee.of({name:"Cobol",extensions:["cob","cpy"],load(){return G(()=>import("./cobol-CWcv1MsR.js"),[],import.meta.url).then(e=>Ue(e.cobol))}}),Ee.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load(){return G(()=>import("./clike-B9uivgTg.js"),[],import.meta.url).then(e=>Ue(e.csharp))}}),Ee.of({name:"Clojure",extensions:["clj","cljc","cljx"],load(){return G(()=>import("./clojure-BMjYHr_A.js"),[],import.meta.url).then(e=>Ue(e.clojure))}}),Ee.of({name:"ClojureScript",extensions:["cljs"],load(){return G(()=>import("./clojure-BMjYHr_A.js"),[],import.meta.url).then(e=>Ue(e.clojure))}}),Ee.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load(){return G(()=>import("./css-BnMrqG3P.js"),[],import.meta.url).then(e=>Ue(e.gss))}}),Ee.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load(){return G(()=>import("./cmake-BQqOBYOt.js"),[],import.meta.url).then(e=>Ue(e.cmake))}}),Ee.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load(){return G(()=>import("./coffeescript-S37ZYGWr.js"),[],import.meta.url).then(e=>Ue(e.coffeeScript))}}),Ee.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load(){return G(()=>import("./commonlisp-DBKNyK5s.js"),[],import.meta.url).then(e=>Ue(e.commonLisp))}}),Ee.of({name:"Cypher",extensions:["cyp","cypher"],load(){return G(()=>import("./cypher-C_CwsFkJ.js"),[],import.meta.url).then(e=>Ue(e.cypher))}}),Ee.of({name:"Cython",extensions:["pyx","pxd","pxi"],load(){return G(()=>import("./python-BuPzkPfP.js"),[],import.meta.url).then(e=>Ue(e.cython))}}),Ee.of({name:"Crystal",extensions:["cr"],load(){return G(()=>import("./crystal-SjHAIU92.js"),[],import.meta.url).then(e=>Ue(e.crystal))}}),Ee.of({name:"D",extensions:["d"],load(){return G(()=>import("./d-pRatUO7H.js"),[],import.meta.url).then(e=>Ue(e.d))}}),Ee.of({name:"Dart",extensions:["dart"],load(){return G(()=>import("./clike-B9uivgTg.js"),[],import.meta.url).then(e=>Ue(e.dart))}}),Ee.of({name:"diff",extensions:["diff","patch"],load(){return G(()=>import("./diff-DbItnlRl.js"),[],import.meta.url).then(e=>Ue(e.diff))}}),Ee.of({name:"Dockerfile",filename:/^Dockerfile$/,load(){return G(()=>import("./dockerfile-BKs6k2Af.js"),__vite__mapDeps([114,115]),import.meta.url).then(e=>Ue(e.dockerFile))}}),Ee.of({name:"DTD",extensions:["dtd"],load(){return G(()=>import("./dtd-DF_7sFjM.js"),[],import.meta.url).then(e=>Ue(e.dtd))}}),Ee.of({name:"Dylan",extensions:["dylan","dyl","intr"],load(){return G(()=>import("./dylan-DwRh75JA.js"),[],import.meta.url).then(e=>Ue(e.dylan))}}),Ee.of({name:"EBNF",load(){return G(()=>import("./ebnf-CDyGwa7X.js"),[],import.meta.url).then(e=>Ue(e.ebnf))}}),Ee.of({name:"ECL",extensions:["ecl"],load(){return G(()=>import("./ecl-Cabwm37j.js"),[],import.meta.url).then(e=>Ue(e.ecl))}}),Ee.of({name:"edn",extensions:["edn"],load(){return G(()=>import("./clojure-BMjYHr_A.js"),[],import.meta.url).then(e=>Ue(e.clojure))}}),Ee.of({name:"Eiffel",extensions:["e"],load(){return G(()=>import("./eiffel-CnydiIhH.js"),[],import.meta.url).then(e=>Ue(e.eiffel))}}),Ee.of({name:"Elm",extensions:["elm"],load(){return G(()=>import("./elm-vLlmbW-K.js"),[],import.meta.url).then(e=>Ue(e.elm))}}),Ee.of({name:"Erlang",extensions:["erl"],load(){return G(()=>import("./erlang-BNw1qcRV.js"),[],import.meta.url).then(e=>Ue(e.erlang))}}),Ee.of({name:"Esper",load(){return G(()=>import("./sql-D0XecflT.js"),[],import.meta.url).then(e=>Ue(e.esper))}}),Ee.of({name:"Factor",extensions:["factor"],load(){return G(()=>import("./factor-kuTfRLto.js"),__vite__mapDeps([116,115]),import.meta.url).then(e=>Ue(e.factor))}}),Ee.of({name:"FCL",load(){return G(()=>import("./fcl-Kvtd6kyn.js"),[],import.meta.url).then(e=>Ue(e.fcl))}}),Ee.of({name:"Forth",extensions:["forth","fth","4th"],load(){return G(()=>import("./forth-Ffai-XNe.js"),[],import.meta.url).then(e=>Ue(e.forth))}}),Ee.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load(){return G(()=>import("./fortran-DYz_wnZ1.js"),[],import.meta.url).then(e=>Ue(e.fortran))}}),Ee.of({name:"F#",alias:["fsharp"],extensions:["fs"],load(){return G(()=>import("./mllike-BO34x3tv.js"),[],import.meta.url).then(e=>Ue(e.fSharp))}}),Ee.of({name:"Gas",extensions:["s"],load(){return G(()=>import("./gas-Bneqetm1.js"),[],import.meta.url).then(e=>Ue(e.gas))}}),Ee.of({name:"Gherkin",extensions:["feature"],load(){return G(()=>import("./gherkin-heZmZLOM.js"),[],import.meta.url).then(e=>Ue(e.gherkin))}}),Ee.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load(){return G(()=>import("./groovy-D9Dt4D0W.js"),[],import.meta.url).then(e=>Ue(e.groovy))}}),Ee.of({name:"Haskell",extensions:["hs"],load(){return G(()=>import("./haskell-Cw1EW3IL.js"),[],import.meta.url).then(e=>Ue(e.haskell))}}),Ee.of({name:"Haxe",extensions:["hx"],load(){return G(()=>import("./haxe-H-WmDvRZ.js"),[],import.meta.url).then(e=>Ue(e.haxe))}}),Ee.of({name:"HXML",extensions:["hxml"],load(){return G(()=>import("./haxe-H-WmDvRZ.js"),[],import.meta.url).then(e=>Ue(e.hxml))}}),Ee.of({name:"HTTP",load(){return G(()=>import("./http-DBlCnlav.js"),[],import.meta.url).then(e=>Ue(e.http))}}),Ee.of({name:"IDL",extensions:["pro"],load(){return G(()=>import("./idl-BEugSyMb.js"),[],import.meta.url).then(e=>Ue(e.idl))}}),Ee.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load(){return G(()=>import("./javascript-iXu5QeM3.js"),[],import.meta.url).then(e=>Ue(e.jsonld))}}),Ee.of({name:"Julia",extensions:["jl"],load(){return G(()=>import("./julia-DuME0IfC.js"),[],import.meta.url).then(e=>Ue(e.julia))}}),Ee.of({name:"Kotlin",extensions:["kt","kts"],load(){return G(()=>import("./clike-B9uivgTg.js"),[],import.meta.url).then(e=>Ue(e.kotlin))}}),Ee.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load(){return G(()=>import("./livescript-BwQOo05w.js"),[],import.meta.url).then(e=>Ue(e.liveScript))}}),Ee.of({name:"Lua",extensions:["lua"],load(){return G(()=>import("./lua-BgMRiT3U.js"),[],import.meta.url).then(e=>Ue(e.lua))}}),Ee.of({name:"mIRC",extensions:["mrc"],load(){return G(()=>import("./mirc-CjQqDB4T.js"),[],import.meta.url).then(e=>Ue(e.mirc))}}),Ee.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load(){return G(()=>import("./mathematica-DTrFuWx2.js"),[],import.meta.url).then(e=>Ue(e.mathematica))}}),Ee.of({name:"Modelica",extensions:["mo"],load(){return G(()=>import("./modelica-Dc1JOy9r.js"),[],import.meta.url).then(e=>Ue(e.modelica))}}),Ee.of({name:"MUMPS",extensions:["mps"],load(){return G(()=>import("./mumps-BT43cFF4.js"),[],import.meta.url).then(e=>Ue(e.mumps))}}),Ee.of({name:"Mbox",extensions:["mbox"],load(){return G(()=>import("./mbox-CNhZ1qSd.js"),[],import.meta.url).then(e=>Ue(e.mbox))}}),Ee.of({name:"Nginx",filename:/nginx.*\.conf$/i,load(){return G(()=>import("./nginx-DdIZxoE0.js"),[],import.meta.url).then(e=>Ue(e.nginx))}}),Ee.of({name:"NSIS",extensions:["nsh","nsi"],load(){return G(()=>import("./nsis-LdVXkNf5.js"),__vite__mapDeps([117,115]),import.meta.url).then(e=>Ue(e.nsis))}}),Ee.of({name:"NTriples",extensions:["nt","nq"],load(){return G(()=>import("./ntriples-BfvgReVJ.js"),[],import.meta.url).then(e=>Ue(e.ntriples))}}),Ee.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load(){return G(()=>import("./clike-B9uivgTg.js"),[],import.meta.url).then(e=>Ue(e.objectiveC))}}),Ee.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load(){return G(()=>import("./clike-B9uivgTg.js"),[],import.meta.url).then(e=>Ue(e.objectiveCpp))}}),Ee.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load(){return G(()=>import("./mllike-BO34x3tv.js"),[],import.meta.url).then(e=>Ue(e.oCaml))}}),Ee.of({name:"Octave",extensions:["m"],load(){return G(()=>import("./octave-Ck1zUtKM.js"),[],import.meta.url).then(e=>Ue(e.octave))}}),Ee.of({name:"Oz",extensions:["oz"],load(){return G(()=>import("./oz-BzwKVEFT.js"),[],import.meta.url).then(e=>Ue(e.oz))}}),Ee.of({name:"Pascal",extensions:["p","pas"],load(){return G(()=>import("./pascal--L3eBynH.js"),[],import.meta.url).then(e=>Ue(e.pascal))}}),Ee.of({name:"Perl",extensions:["pl","pm"],load(){return G(()=>import("./perl-CdXCOZ3F.js"),[],import.meta.url).then(e=>Ue(e.perl))}}),Ee.of({name:"Pig",extensions:["pig"],load(){return G(()=>import("./pig-CevX1Tat.js"),[],import.meta.url).then(e=>Ue(e.pig))}}),Ee.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load(){return G(()=>import("./powershell-CaxLzxiJ.js"),[],import.meta.url).then(e=>Ue(e.powerShell))}}),Ee.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load(){return G(()=>import("./properties-C78fOPTZ.js"),[],import.meta.url).then(e=>Ue(e.properties))}}),Ee.of({name:"ProtoBuf",extensions:["proto"],load(){return G(()=>import("./protobuf-ChK-085T.js"),[],import.meta.url).then(e=>Ue(e.protobuf))}}),Ee.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load(){return G(()=>import("./pug-DeIclll2.js"),__vite__mapDeps([118,119]),import.meta.url).then(e=>Ue(e.pug))}}),Ee.of({name:"Puppet",extensions:["pp"],load(){return G(()=>import("./puppet-DMA9R1ak.js"),[],import.meta.url).then(e=>Ue(e.puppet))}}),Ee.of({name:"Q",extensions:["q"],load(){return G(()=>import("./q-pXgVlZs6.js"),[],import.meta.url).then(e=>Ue(e.q))}}),Ee.of({name:"R",alias:["rscript"],extensions:["r","R"],load(){return G(()=>import("./r-B6wPVr8A.js"),[],import.meta.url).then(e=>Ue(e.r))}}),Ee.of({name:"RPM Changes",load(){return G(()=>import("./rpm-CTu-6PCP.js"),[],import.meta.url).then(e=>Ue(e.rpmChanges))}}),Ee.of({name:"RPM Spec",extensions:["spec"],load(){return G(()=>import("./rpm-CTu-6PCP.js"),[],import.meta.url).then(e=>Ue(e.rpmSpec))}}),Ee.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load(){return G(()=>import("./ruby-B2Rjki9n.js"),[],import.meta.url).then(e=>Ue(e.ruby))}}),Ee.of({name:"SAS",extensions:["sas"],load(){return G(()=>import("./sas-B4kiWyti.js"),[],import.meta.url).then(e=>Ue(e.sas))}}),Ee.of({name:"Scala",extensions:["scala"],load(){return G(()=>import("./clike-B9uivgTg.js"),[],import.meta.url).then(e=>Ue(e.scala))}}),Ee.of({name:"Scheme",extensions:["scm","ss"],load(){return G(()=>import("./scheme-C41bIUwD.js"),[],import.meta.url).then(e=>Ue(e.scheme))}}),Ee.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load(){return G(()=>import("./shell-CjFT_Tl9.js"),[],import.meta.url).then(e=>Ue(e.shell))}}),Ee.of({name:"Sieve",extensions:["siv","sieve"],load(){return G(()=>import("./sieve-C3Gn_uJK.js"),[],import.meta.url).then(e=>Ue(e.sieve))}}),Ee.of({name:"Smalltalk",extensions:["st"],load(){return G(()=>import("./smalltalk-CnHTOXQT.js"),[],import.meta.url).then(e=>Ue(e.smalltalk))}}),Ee.of({name:"Solr",load(){return G(()=>import("./solr-DehyRSwq.js"),[],import.meta.url).then(e=>Ue(e.solr))}}),Ee.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load(){return G(()=>import("./mllike-BO34x3tv.js"),[],import.meta.url).then(e=>Ue(e.sml))}}),Ee.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load(){return G(()=>import("./sparql-DkYu6x3z.js"),[],import.meta.url).then(e=>Ue(e.sparql))}}),Ee.of({name:"Spreadsheet",alias:["excel","formula"],load(){return G(()=>import("./spreadsheet-BCZA_wO0.js"),[],import.meta.url).then(e=>Ue(e.spreadsheet))}}),Ee.of({name:"Squirrel",extensions:["nut"],load(){return G(()=>import("./clike-B9uivgTg.js"),[],import.meta.url).then(e=>Ue(e.squirrel))}}),Ee.of({name:"Stylus",extensions:["styl"],load(){return G(()=>import("./stylus-B533Al4x.js"),[],import.meta.url).then(e=>Ue(e.stylus))}}),Ee.of({name:"Swift",extensions:["swift"],load(){return G(()=>import("./swift-BzpIVaGY.js"),[],import.meta.url).then(e=>Ue(e.swift))}}),Ee.of({name:"sTeX",load(){return G(()=>import("./stex-C3f8Ysf7.js"),[],import.meta.url).then(e=>Ue(e.stex))}}),Ee.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load(){return G(()=>import("./stex-C3f8Ysf7.js"),[],import.meta.url).then(e=>Ue(e.stex))}}),Ee.of({name:"SystemVerilog",extensions:["v","sv","svh"],load(){return G(()=>import("./verilog-C6RDOZhf.js"),[],import.meta.url).then(e=>Ue(e.verilog))}}),Ee.of({name:"Tcl",extensions:["tcl"],load(){return G(()=>import("./tcl-DVfN8rqt.js"),[],import.meta.url).then(e=>Ue(e.tcl))}}),Ee.of({name:"Textile",extensions:["textile"],load(){return G(()=>import("./textile-CnDTJFAw.js"),[],import.meta.url).then(e=>Ue(e.textile))}}),Ee.of({name:"TiddlyWiki",load(){return G(()=>import("./tiddlywiki-DO-Gjzrf.js"),[],import.meta.url).then(e=>Ue(e.tiddlyWiki))}}),Ee.of({name:"Tiki wiki",load(){return G(()=>import("./tiki-DGYXhP31.js"),[],import.meta.url).then(e=>Ue(e.tiki))}}),Ee.of({name:"TOML",extensions:["toml"],load(){return G(()=>import("./toml-Bm5Em-hy.js"),[],import.meta.url).then(e=>Ue(e.toml))}}),Ee.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load(){return G(()=>import("./troff-wAsdV37c.js"),[],import.meta.url).then(e=>Ue(e.troff))}}),Ee.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load(){return G(()=>import("./ttcn-CfJYG6tj.js"),[],import.meta.url).then(e=>Ue(e.ttcn))}}),Ee.of({name:"TTCN_CFG",extensions:["cfg"],load(){return G(()=>import("./ttcn-cfg-B9xdYoR4.js"),[],import.meta.url).then(e=>Ue(e.ttcnCfg))}}),Ee.of({name:"Turtle",extensions:["ttl"],load(){return G(()=>import("./turtle-B1tBg_DP.js"),[],import.meta.url).then(e=>Ue(e.turtle))}}),Ee.of({name:"Web IDL",extensions:["webidl"],load(){return G(()=>import("./webidl-ZXfAyPTL.js"),[],import.meta.url).then(e=>Ue(e.webIDL))}}),Ee.of({name:"VB.NET",extensions:["vb"],load(){return G(()=>import("./vb-CmGdzxic.js"),[],import.meta.url).then(e=>Ue(e.vb))}}),Ee.of({name:"VBScript",extensions:["vbs"],load(){return G(()=>import("./vbscript-BuJXcnF6.js"),[],import.meta.url).then(e=>Ue(e.vbScript))}}),Ee.of({name:"Velocity",extensions:["vtl"],load(){return G(()=>import("./velocity-D8B20fx6.js"),[],import.meta.url).then(e=>Ue(e.velocity))}}),Ee.of({name:"Verilog",extensions:["v"],load(){return G(()=>import("./verilog-C6RDOZhf.js"),[],import.meta.url).then(e=>Ue(e.verilog))}}),Ee.of({name:"VHDL",extensions:["vhd","vhdl"],load(){return G(()=>import("./vhdl-lSbBsy5d.js"),[],import.meta.url).then(e=>Ue(e.vhdl))}}),Ee.of({name:"XQuery",extensions:["xy","xquery","xq","xqm","xqy"],load(){return G(()=>import("./xquery-DzFWVndE.js"),[],import.meta.url).then(e=>Ue(e.xQuery))}}),Ee.of({name:"Yacas",extensions:["ys"],load(){return G(()=>import("./yacas-BJ4BC0dw.js"),[],import.meta.url).then(e=>Ue(e.yacas))}}),Ee.of({name:"Z80",extensions:["z80"],load(){return G(()=>import("./z80-Hz9HOZM7.js"),[],import.meta.url).then(e=>Ue(e.z80))}}),Ee.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load(){return G(()=>import("./mscgen-BA5vi2Kp.js"),[],import.meta.url).then(e=>Ue(e.mscgen))}}),Ee.of({name:"Xù",extensions:["xu"],load(){return G(()=>import("./mscgen-BA5vi2Kp.js"),[],import.meta.url).then(e=>Ue(e.xu))}}),Ee.of({name:"MsGenny",extensions:["msgenny"],load(){return G(()=>import("./mscgen-BA5vi2Kp.js"),[],import.meta.url).then(e=>Ue(e.msgenny))}}),Ee.of({name:"Vue",extensions:["vue"],load(){return G(()=>import("./index-CWJKgNzp.js"),__vite__mapDeps([120,95]),import.meta.url).then(e=>e.vue())}}),Ee.of({name:"Angular Template",load(){return G(()=>import("./index-Y-u089Pk.js"),__vite__mapDeps([121,95]),import.meta.url).then(e=>e.angular())}})];var zQe=e=>{var{theme:t,settings:r={},styles:n=[]}=e,s={".cm-gutters":{}},i={};r.background&&(i.backgroundColor=r.background),r.backgroundImage&&(i.backgroundImage=r.backgroundImage),r.foreground&&(i.color=r.foreground),r.fontSize&&(i.fontSize=r.fontSize),(r.background||r.foreground)&&(s["&"]=i),r.fontFamily&&(s["&.cm-editor .cm-scroller"]={fontFamily:r.fontFamily}),r.gutterBackground&&(s[".cm-gutters"].backgroundColor=r.gutterBackground),r.gutterForeground&&(s[".cm-gutters"].color=r.gutterForeground),r.gutterBorder&&(s[".cm-gutters"].borderRightColor=r.gutterBorder),r.caret&&(s[".cm-content"]={caretColor:r.caret},s[".cm-cursor, .cm-dropCursor"]={borderLeftColor:r.caret});var o={};r.gutterActiveForeground&&(o.color=r.gutterActiveForeground),r.lineHighlight&&(s[".cm-activeLine"]={backgroundColor:r.lineHighlight},o.backgroundColor=r.lineHighlight),s[".cm-activeLineGutter"]=o,r.selection&&(s["&.cm-focused .cm-selectionBackground, & .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={background:r.selection+" !important"}),r.selectionMatch&&(s["& .cm-selectionMatch"]={backgroundColor:r.selectionMatch});var a=rt.theme(s,{dark:t==="dark"}),l=F0.define(n),c=[a,f5(l)];return c},NDr={background:"#fff",foreground:"#24292e",selection:"#BBDFFF",selectionMatch:"#BBDFFF",gutterBackground:"#fff",gutterForeground:"#6e7781"},RDr=[{tag:[Y.standard(Y.tagName),Y.tagName],color:"#116329"},{tag:[Y.comment,Y.bracket],color:"#6a737d"},{tag:[Y.className,Y.propertyName],color:"#6f42c1"},{tag:[Y.variableName,Y.attributeName,Y.number,Y.operator],color:"#005cc5"},{tag:[Y.keyword,Y.typeName,Y.typeOperator,Y.typeName],color:"#d73a49"},{tag:[Y.string,Y.meta,Y.regexp],color:"#032f62"},{tag:[Y.name,Y.quote],color:"#22863a"},{tag:[Y.heading,Y.strong],color:"#24292e",fontWeight:"bold"},{tag:[Y.emphasis],color:"#24292e",fontStyle:"italic"},{tag:[Y.deleted],color:"#b31d28",backgroundColor:"ffeef0"},{tag:[Y.atom,Y.bool,Y.special(Y.variableName)],color:"#e36209"},{tag:[Y.url,Y.escape,Y.regexp,Y.link],color:"#032f62"},{tag:Y.link,textDecoration:"underline"},{tag:Y.strikethrough,textDecoration:"line-through"},{tag:Y.invalid,color:"#cb2431"}],MDr=e=>{var{theme:t="light",settings:r={},styles:n=[]}={};return zQe({theme:t,settings:Cd({},NDr,r),styles:[...RDr,...n]})};MDr();var jDr={background:"#0d1117",foreground:"#c9d1d9",caret:"#c9d1d9",selection:"#003d73",selectionMatch:"#003d73",lineHighlight:"#36334280"},FDr=[{tag:[Y.standard(Y.tagName),Y.tagName],color:"#7ee787"},{tag:[Y.comment,Y.bracket],color:"#8b949e"},{tag:[Y.className,Y.propertyName],color:"#d2a8ff"},{tag:[Y.variableName,Y.attributeName,Y.number,Y.operator],color:"#79c0ff"},{tag:[Y.keyword,Y.typeName,Y.typeOperator,Y.typeName],color:"#ff7b72"},{tag:[Y.string,Y.meta,Y.regexp],color:"#a5d6ff"},{tag:[Y.name,Y.quote],color:"#7ee787"},{tag:[Y.heading,Y.strong],color:"#d2a8ff",fontWeight:"bold"},{tag:[Y.emphasis],color:"#d2a8ff",fontStyle:"italic"},{tag:[Y.deleted],color:"#ffdcd7",backgroundColor:"ffeef0"},{tag:[Y.atom,Y.bool,Y.special(Y.variableName)],color:"#ffab70"},{tag:Y.link,textDecoration:"underline"},{tag:Y.strikethrough,textDecoration:"line-through"},{tag:Y.invalid,color:"#f97583"}],BQe=e=>{var{theme:t="dark",settings:r={},styles:n=[]}=e||{};return zQe({theme:t,settings:Cd({},jDr,r),styles:[...FDr,...n]})};BQe();var VQe="AlertDialog",[LDr]=jo(VQe,[s$e]),am=s$e(),UQe=e=>{const{__scopeAlertDialog:t,...r}=e,n=am(t);return f.jsx(SX,{...n,...r,modal:!0})};UQe.displayName=VQe;var zDr="AlertDialogTrigger",QQe=E.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=am(r);return f.jsx(x$e,{...s,...n,ref:t})});QQe.displayName=zDr;var BDr="AlertDialogPortal",ZQe=e=>{const{__scopeAlertDialog:t,...r}=e,n=am(t);return f.jsx(OX,{...n,...r})};ZQe.displayName=BDr;var VDr="AlertDialogOverlay",qQe=E.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=am(r);return f.jsx(b5,{...s,...n,ref:t})});qQe.displayName=VDr;var u1="AlertDialogContent",[UDr,QDr]=LDr(u1),ZDr=FEe("AlertDialogContent"),HQe=E.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...s}=e,i=am(r),o=E.useRef(null),a=tr(t,o),l=E.useRef(null);return f.jsx(xCt,{contentName:u1,titleName:WQe,docsSlug:"alert-dialog",children:f.jsx(UDr,{scope:r,cancelRef:l,children:f.jsxs(x5,{role:"alertdialog",...i,...s,ref:a,onOpenAutoFocus:dt(s.onOpenAutoFocus,c=>{c.preventDefault(),l.current?.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[f.jsx(ZDr,{children:n}),f.jsx(HDr,{contentRef:o})]})})})});HQe.displayName=u1;var WQe="AlertDialogTitle",GQe=E.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=am(r);return f.jsx(w5,{...s,...n,ref:t})});GQe.displayName=WQe;var XQe="AlertDialogDescription",YQe=E.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=am(r);return f.jsx(S5,{...s,...n,ref:t})});YQe.displayName=XQe;var qDr="AlertDialogAction",JQe=E.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=am(r);return f.jsx(O5,{...s,...n,ref:t})});JQe.displayName=qDr;var KQe="AlertDialogCancel",eZe=E.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:s}=QDr(KQe,r),i=am(r),o=tr(t,s);return f.jsx(O5,{...i,...n,ref:o})});eZe.displayName=KQe;var HDr=({contentRef:e})=>{const t=`\`${u1}\` requires a description for the component to be accessible for screen reader users.
|
|
549
549
|
|
|
550
550
|
You can add a description to the \`${u1}\` by passing a \`${XQe}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
551
551
|
|
|
552
552
|
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${u1}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
553
553
|
|
|
554
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return E.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},WDr=UQe,GDr=QQe,XDr=ZQe,tZe=qQe,rZe=HQe,nZe=JQe,sZe=eZe,iZe=GQe,oZe=YQe,sT=(e=>(e.AGENT="agent",e.EVAL="eval",e.INPUT_PROCESSOR="input_processor",e.INPUT_STEP_PROCESSOR="input_step_processor",e.OUTPUT_PROCESSOR="output_processor",e.OUTPUT_STEP_PROCESSOR="output_step_processor",e.WORKFLOW_STEP="workflow_step",e.TOOL="tool",e.WORKFLOW_RUN="workflow_run",e))(sT||{}),WP={exports:{}},JL,Sbe;function Z6(){if(Sbe)return JL;Sbe=1;const e="2.0.0",t=256,r=Number.MAX_SAFE_INTEGER||9007199254740991,n=16,s=t-6;return JL={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:s,MAX_SAFE_INTEGER:r,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},JL}var KL,Obe;function q6(){if(Obe)return KL;Obe=1;var e={},t={};return KL=typeof e=="object"&&t&&t.NODE_DEBUG&&/\bsemver\b/i.test(t.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{},KL}var _be;function RD(){return _be||(_be=1,(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:s}=Z6(),i=q6();t=e.exports={};const o=t.re=[],a=t.safeRe=[],l=t.src=[],c=t.safeSrc=[],u=t.t={};let d=0;const p="[a-zA-Z0-9-]",m=[["\\s",1],["\\d",s],[p,n]],g=b=>{for(const[w,S]of m)b=b.split(`${w}*`).join(`${w}{0,${S}}`).split(`${w}+`).join(`${w}{1,${S}}`);return b},v=(b,w,S)=>{const O=g(w),k=d++;i(b,k,w),u[b]=k,l[k]=w,c[k]=O,o[k]=new RegExp(w,S?"g":void 0),a[k]=new RegExp(O,S?"g":void 0)};v("NUMERICIDENTIFIER","0|[1-9]\\d*"),v("NUMERICIDENTIFIERLOOSE","\\d+"),v("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),v("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),v("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),v("PRERELEASEIDENTIFIER",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIER]})`),v("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIERLOOSE]})`),v("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),v("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),v("BUILDIDENTIFIER",`${p}+`),v("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),v("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),v("FULL",`^${l[u.FULLPLAIN]}$`),v("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),v("LOOSE",`^${l[u.LOOSEPLAIN]}$`),v("GTLT","((?:<|>)?=?)"),v("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),v("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),v("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),v("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),v("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),v("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),v("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),v("COERCE",`${l[u.COERCEPLAIN]}(?:$|[^\\d])`),v("COERCEFULL",l[u.COERCEPLAIN]+`(?:${l[u.PRERELEASE]})?(?:${l[u.BUILD]})?(?:$|[^\\d])`),v("COERCERTL",l[u.COERCE],!0),v("COERCERTLFULL",l[u.COERCEFULL],!0),v("LONETILDE","(?:~>?)"),v("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",v("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),v("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),v("LONECARET","(?:\\^)"),v("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",v("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),v("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),v("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),v("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),v("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",v("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),v("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),v("STAR","(<|>)?=?\\s*\\*"),v("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),v("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(WP,WP.exports)),WP.exports}var ez,kbe;function tte(){if(kbe)return ez;kbe=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return ez=n=>n?typeof n!="object"?e:n:t,ez}var tz,Ebe;function aZe(){if(Ebe)return tz;Ebe=1;const e=/^[0-9]+$/,t=(n,s)=>{if(typeof n=="number"&&typeof s=="number")return n===s?0:n<s?-1:1;const i=e.test(n),o=e.test(s);return i&&o&&(n=+n,s=+s),n===s?0:i&&!o?-1:o&&!i?1:n<s?-1:1};return tz={compareIdentifiers:t,rcompareIdentifiers:(n,s)=>t(s,n)},tz}var rz,Cbe;function Na(){if(Cbe)return rz;Cbe=1;const e=q6(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:r}=Z6(),{safeRe:n,t:s}=RD(),i=tte(),{compareIdentifiers:o}=aZe();class a{constructor(c,u){if(u=i(u),c instanceof a){if(c.loose===!!u.loose&&c.includePrerelease===!!u.includePrerelease)return c;c=c.version}else if(typeof c!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof c}".`);if(c.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",c,u),this.options=u,this.loose=!!u.loose,this.includePrerelease=!!u.includePrerelease;const d=c.trim().match(u.loose?n[s.LOOSE]:n[s.FULL]);if(!d)throw new TypeError(`Invalid Version: ${c}`);if(this.raw=c,this.major=+d[1],this.minor=+d[2],this.patch=+d[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");d[4]?this.prerelease=d[4].split(".").map(p=>{if(/^[0-9]+$/.test(p)){const m=+p;if(m>=0&&m<r)return m}return p}):this.prerelease=[],this.build=d[5]?d[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(c){if(e("SemVer.compare",this.version,this.options,c),!(c instanceof a)){if(typeof c=="string"&&c===this.version)return 0;c=new a(c,this.options)}return c.version===this.version?0:this.compareMain(c)||this.comparePre(c)}compareMain(c){return c instanceof a||(c=new a(c,this.options)),this.major<c.major?-1:this.major>c.major?1:this.minor<c.minor?-1:this.minor>c.minor?1:this.patch<c.patch?-1:this.patch>c.patch?1:0}comparePre(c){if(c instanceof a||(c=new a(c,this.options)),this.prerelease.length&&!c.prerelease.length)return-1;if(!this.prerelease.length&&c.prerelease.length)return 1;if(!this.prerelease.length&&!c.prerelease.length)return 0;let u=0;do{const d=this.prerelease[u],p=c.prerelease[u];if(e("prerelease compare",u,d,p),d===void 0&&p===void 0)return 0;if(p===void 0)return 1;if(d===void 0)return-1;if(d===p)continue;return o(d,p)}while(++u)}compareBuild(c){c instanceof a||(c=new a(c,this.options));let u=0;do{const d=this.build[u],p=c.build[u];if(e("build compare",u,d,p),d===void 0&&p===void 0)return 0;if(p===void 0)return 1;if(d===void 0)return-1;if(d===p)continue;return o(d,p)}while(++u)}inc(c,u,d){if(c.startsWith("pre")){if(!u&&d===!1)throw new Error("invalid increment argument: identifier is empty");if(u){const p=`-${u}`.match(this.options.loose?n[s.PRERELEASELOOSE]:n[s.PRERELEASE]);if(!p||p[1]!==u)throw new Error(`invalid identifier: ${u}`)}}switch(c){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",u,d);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",u,d);break;case"prepatch":this.prerelease.length=0,this.inc("patch",u,d),this.inc("pre",u,d);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",u,d),this.inc("pre",u,d);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const p=Number(d)?1:0;if(this.prerelease.length===0)this.prerelease=[p];else{let m=this.prerelease.length;for(;--m>=0;)typeof this.prerelease[m]=="number"&&(this.prerelease[m]++,m=-2);if(m===-1){if(u===this.prerelease.join(".")&&d===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(p)}}if(u){let m=[u,p];d===!1&&(m=[u]),o(this.prerelease[0],u)===0?isNaN(this.prerelease[1])&&(this.prerelease=m):this.prerelease=m}break}default:throw new Error(`invalid increment argument: ${c}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return rz=a,rz}var nz,Tbe;function kS(){if(Tbe)return nz;Tbe=1;const e=Na();return nz=(r,n,s=!1)=>{if(r instanceof e)return r;try{return new e(r,n)}catch(i){if(!s)return null;throw i}},nz}var sz,Dbe;function YDr(){if(Dbe)return sz;Dbe=1;const e=kS();return sz=(r,n)=>{const s=e(r,n);return s?s.version:null},sz}var iz,Abe;function JDr(){if(Abe)return iz;Abe=1;const e=kS();return iz=(r,n)=>{const s=e(r.trim().replace(/^[=v]+/,""),n);return s?s.version:null},iz}var oz,Pbe;function KDr(){if(Pbe)return oz;Pbe=1;const e=Na();return oz=(r,n,s,i,o)=>{typeof s=="string"&&(o=i,i=s,s=void 0);try{return new e(r instanceof e?r.version:r,s).inc(n,i,o).version}catch{return null}},oz}var az,$be;function eAr(){if($be)return az;$be=1;const e=kS();return az=(r,n)=>{const s=e(r,null,!0),i=e(n,null,!0),o=s.compare(i);if(o===0)return null;const a=o>0,l=a?s:i,c=a?i:s,u=!!l.prerelease.length;if(!!c.prerelease.length&&!u){if(!c.patch&&!c.minor)return"major";if(c.compareMain(l)===0)return c.minor&&!c.patch?"minor":"patch"}const p=u?"pre":"";return s.major!==i.major?p+"major":s.minor!==i.minor?p+"minor":s.patch!==i.patch?p+"patch":"prerelease"},az}var lz,Ibe;function tAr(){if(Ibe)return lz;Ibe=1;const e=Na();return lz=(r,n)=>new e(r,n).major,lz}var cz,Nbe;function rAr(){if(Nbe)return cz;Nbe=1;const e=Na();return cz=(r,n)=>new e(r,n).minor,cz}var uz,Rbe;function nAr(){if(Rbe)return uz;Rbe=1;const e=Na();return uz=(r,n)=>new e(r,n).patch,uz}var dz,Mbe;function sAr(){if(Mbe)return dz;Mbe=1;const e=kS();return dz=(r,n)=>{const s=e(r,n);return s&&s.prerelease.length?s.prerelease:null},dz}var fz,jbe;function Wd(){if(jbe)return fz;jbe=1;const e=Na();return fz=(r,n,s)=>new e(r,s).compare(new e(n,s)),fz}var pz,Fbe;function iAr(){if(Fbe)return pz;Fbe=1;const e=Wd();return pz=(r,n,s)=>e(n,r,s),pz}var hz,Lbe;function oAr(){if(Lbe)return hz;Lbe=1;const e=Wd();return hz=(r,n)=>e(r,n,!0),hz}var mz,zbe;function rte(){if(zbe)return mz;zbe=1;const e=Na();return mz=(r,n,s)=>{const i=new e(r,s),o=new e(n,s);return i.compare(o)||i.compareBuild(o)},mz}var gz,Bbe;function aAr(){if(Bbe)return gz;Bbe=1;const e=rte();return gz=(r,n)=>r.sort((s,i)=>e(s,i,n)),gz}var yz,Vbe;function lAr(){if(Vbe)return yz;Vbe=1;const e=rte();return yz=(r,n)=>r.sort((s,i)=>e(i,s,n)),yz}var vz,Ube;function H6(){if(Ube)return vz;Ube=1;const e=Wd();return vz=(r,n,s)=>e(r,n,s)>0,vz}var bz,Qbe;function nte(){if(Qbe)return bz;Qbe=1;const e=Wd();return bz=(r,n,s)=>e(r,n,s)<0,bz}var xz,Zbe;function lZe(){if(Zbe)return xz;Zbe=1;const e=Wd();return xz=(r,n,s)=>e(r,n,s)===0,xz}var wz,qbe;function cZe(){if(qbe)return wz;qbe=1;const e=Wd();return wz=(r,n,s)=>e(r,n,s)!==0,wz}var Sz,Hbe;function ste(){if(Hbe)return Sz;Hbe=1;const e=Wd();return Sz=(r,n,s)=>e(r,n,s)>=0,Sz}var Oz,Wbe;function ite(){if(Wbe)return Oz;Wbe=1;const e=Wd();return Oz=(r,n,s)=>e(r,n,s)<=0,Oz}var _z,Gbe;function uZe(){if(Gbe)return _z;Gbe=1;const e=lZe(),t=cZe(),r=H6(),n=ste(),s=nte(),i=ite();return _z=(a,l,c,u)=>{switch(l){case"===":return typeof a=="object"&&(a=a.version),typeof c=="object"&&(c=c.version),a===c;case"!==":return typeof a=="object"&&(a=a.version),typeof c=="object"&&(c=c.version),a!==c;case"":case"=":case"==":return e(a,c,u);case"!=":return t(a,c,u);case">":return r(a,c,u);case">=":return n(a,c,u);case"<":return s(a,c,u);case"<=":return i(a,c,u);default:throw new TypeError(`Invalid operator: ${l}`)}},_z}var kz,Xbe;function cAr(){if(Xbe)return kz;Xbe=1;const e=Na(),t=kS(),{safeRe:r,t:n}=RD();return kz=(i,o)=>{if(i instanceof e)return i;if(typeof i=="number"&&(i=String(i)),typeof i!="string")return null;o=o||{};let a=null;if(!o.rtl)a=i.match(o.includePrerelease?r[n.COERCEFULL]:r[n.COERCE]);else{const m=o.includePrerelease?r[n.COERCERTLFULL]:r[n.COERCERTL];let g;for(;(g=m.exec(i))&&(!a||a.index+a[0].length!==i.length);)(!a||g.index+g[0].length!==a.index+a[0].length)&&(a=g),m.lastIndex=g.index+g[1].length+g[2].length;m.lastIndex=-1}if(a===null)return null;const l=a[2],c=a[3]||"0",u=a[4]||"0",d=o.includePrerelease&&a[5]?`-${a[5]}`:"",p=o.includePrerelease&&a[6]?`+${a[6]}`:"";return t(`${l}.${c}.${u}${d}${p}`,o)},kz}var Ez,Ybe;function uAr(){if(Ybe)return Ez;Ybe=1;class e{constructor(){this.max=1e3,this.map=new Map}get(r){const n=this.map.get(r);if(n!==void 0)return this.map.delete(r),this.map.set(r,n),n}delete(r){return this.map.delete(r)}set(r,n){if(!this.delete(r)&&n!==void 0){if(this.map.size>=this.max){const i=this.map.keys().next().value;this.delete(i)}this.map.set(r,n)}return this}}return Ez=e,Ez}var Cz,Jbe;function Gd(){if(Jbe)return Cz;Jbe=1;const e=/\s+/g;class t{constructor(V,j){if(j=s(j),V instanceof t)return V.loose===!!j.loose&&V.includePrerelease===!!j.includePrerelease?V:new t(V.raw,j);if(V instanceof i)return this.raw=V.value,this.set=[[V]],this.formatted=void 0,this;if(this.options=j,this.loose=!!j.loose,this.includePrerelease=!!j.includePrerelease,this.raw=V.trim().replace(e," "),this.set=this.raw.split("||").map(N=>this.parseRange(N.trim())).filter(N=>N.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const N=this.set[0];if(this.set=this.set.filter(I=>!v(I[0])),this.set.length===0)this.set=[N];else if(this.set.length>1){for(const I of this.set)if(I.length===1&&b(I[0])){this.set=[I];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let V=0;V<this.set.length;V++){V>0&&(this.formatted+="||");const j=this.set[V];for(let N=0;N<j.length;N++)N>0&&(this.formatted+=" "),this.formatted+=j[N].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(V){const N=((this.options.includePrerelease&&m)|(this.options.loose&&g))+":"+V,I=n.get(N);if(I)return I;const H=this.options.loose,B=H?l[c.HYPHENRANGELOOSE]:l[c.HYPHENRANGE];V=V.replace(B,Q(this.options.includePrerelease)),o("hyphen replace",V),V=V.replace(l[c.COMPARATORTRIM],u),o("comparator trim",V),V=V.replace(l[c.TILDETRIM],d),o("tilde trim",V),V=V.replace(l[c.CARETTRIM],p),o("caret trim",V);let J=V.split(" ").map(K=>S(K,this.options)).join(" ").split(/\s+/).map(K=>z(K,this.options));H&&(J=J.filter(K=>(o("loose invalid filter",K,this.options),!!K.match(l[c.COMPARATORLOOSE])))),o("range list",J);const Z=new Map,F=J.map(K=>new i(K,this.options));for(const K of F){if(v(K))return[K];Z.set(K.value,K)}Z.size>1&&Z.has("")&&Z.delete("");const W=[...Z.values()];return n.set(N,W),W}intersects(V,j){if(!(V instanceof t))throw new TypeError("a Range is required");return this.set.some(N=>w(N,j)&&V.set.some(I=>w(I,j)&&N.every(H=>I.every(B=>H.intersects(B,j)))))}test(V){if(!V)return!1;if(typeof V=="string")try{V=new a(V,this.options)}catch{return!1}for(let j=0;j<this.set.length;j++)if(U(this.set[j],V,this.options))return!0;return!1}}Cz=t;const r=uAr(),n=new r,s=tte(),i=W6(),o=q6(),a=Na(),{safeRe:l,t:c,comparatorTrimReplace:u,tildeTrimReplace:d,caretTrimReplace:p}=RD(),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:g}=Z6(),v=L=>L.value==="<0.0.0-0",b=L=>L.value==="",w=(L,V)=>{let j=!0;const N=L.slice();let I=N.pop();for(;j&&N.length;)j=N.every(H=>I.intersects(H,V)),I=N.pop();return j},S=(L,V)=>(L=L.replace(l[c.BUILD],""),o("comp",L,V),L=T(L,V),o("caret",L),L=k(L,V),o("tildes",L),L=A(L,V),o("xrange",L),L=M(L,V),o("stars",L),L),O=L=>!L||L.toLowerCase()==="x"||L==="*",k=(L,V)=>L.trim().split(/\s+/).map(j=>C(j,V)).join(" "),C=(L,V)=>{const j=V.loose?l[c.TILDELOOSE]:l[c.TILDE];return L.replace(j,(N,I,H,B,J)=>{o("tilde",L,N,I,H,B,J);let Z;return O(I)?Z="":O(H)?Z=`>=${I}.0.0 <${+I+1}.0.0-0`:O(B)?Z=`>=${I}.${H}.0 <${I}.${+H+1}.0-0`:J?(o("replaceTilde pr",J),Z=`>=${I}.${H}.${B}-${J} <${I}.${+H+1}.0-0`):Z=`>=${I}.${H}.${B} <${I}.${+H+1}.0-0`,o("tilde return",Z),Z})},T=(L,V)=>L.trim().split(/\s+/).map(j=>P(j,V)).join(" "),P=(L,V)=>{o("caret",L,V);const j=V.loose?l[c.CARETLOOSE]:l[c.CARET],N=V.includePrerelease?"-0":"";return L.replace(j,(I,H,B,J,Z)=>{o("caret",L,I,H,B,J,Z);let F;return O(H)?F="":O(B)?F=`>=${H}.0.0${N} <${+H+1}.0.0-0`:O(J)?H==="0"?F=`>=${H}.${B}.0${N} <${H}.${+B+1}.0-0`:F=`>=${H}.${B}.0${N} <${+H+1}.0.0-0`:Z?(o("replaceCaret pr",Z),H==="0"?B==="0"?F=`>=${H}.${B}.${J}-${Z} <${H}.${B}.${+J+1}-0`:F=`>=${H}.${B}.${J}-${Z} <${H}.${+B+1}.0-0`:F=`>=${H}.${B}.${J}-${Z} <${+H+1}.0.0-0`):(o("no pr"),H==="0"?B==="0"?F=`>=${H}.${B}.${J}${N} <${H}.${B}.${+J+1}-0`:F=`>=${H}.${B}.${J}${N} <${H}.${+B+1}.0-0`:F=`>=${H}.${B}.${J} <${+H+1}.0.0-0`),o("caret return",F),F})},A=(L,V)=>(o("replaceXRanges",L,V),L.split(/\s+/).map(j=>R(j,V)).join(" ")),R=(L,V)=>{L=L.trim();const j=V.loose?l[c.XRANGELOOSE]:l[c.XRANGE];return L.replace(j,(N,I,H,B,J,Z)=>{o("xRange",L,N,I,H,B,J,Z);const F=O(H),W=F||O(B),K=W||O(J),se=K;return I==="="&&se&&(I=""),Z=V.includePrerelease?"-0":"",F?I===">"||I==="<"?N="<0.0.0-0":N="*":I&&se?(W&&(B=0),J=0,I===">"?(I=">=",W?(H=+H+1,B=0,J=0):(B=+B+1,J=0)):I==="<="&&(I="<",W?H=+H+1:B=+B+1),I==="<"&&(Z="-0"),N=`${I+H}.${B}.${J}${Z}`):W?N=`>=${H}.0.0${Z} <${+H+1}.0.0-0`:K&&(N=`>=${H}.${B}.0${Z} <${H}.${+B+1}.0-0`),o("xRange return",N),N})},M=(L,V)=>(o("replaceStars",L,V),L.trim().replace(l[c.STAR],"")),z=(L,V)=>(o("replaceGTE0",L,V),L.trim().replace(l[V.includePrerelease?c.GTE0PRE:c.GTE0],"")),Q=L=>(V,j,N,I,H,B,J,Z,F,W,K,se)=>(O(N)?j="":O(I)?j=`>=${N}.0.0${L?"-0":""}`:O(H)?j=`>=${N}.${I}.0${L?"-0":""}`:B?j=`>=${j}`:j=`>=${j}${L?"-0":""}`,O(F)?Z="":O(W)?Z=`<${+F+1}.0.0-0`:O(K)?Z=`<${F}.${+W+1}.0-0`:se?Z=`<=${F}.${W}.${K}-${se}`:L?Z=`<${F}.${W}.${+K+1}-0`:Z=`<=${Z}`,`${j} ${Z}`.trim()),U=(L,V,j)=>{for(let N=0;N<L.length;N++)if(!L[N].test(V))return!1;if(V.prerelease.length&&!j.includePrerelease){for(let N=0;N<L.length;N++)if(o(L[N].semver),L[N].semver!==i.ANY&&L[N].semver.prerelease.length>0){const I=L[N].semver;if(I.major===V.major&&I.minor===V.minor&&I.patch===V.patch)return!0}return!1}return!0};return Cz}var Tz,Kbe;function W6(){if(Kbe)return Tz;Kbe=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(u,d){if(d=r(d),u instanceof t){if(u.loose===!!d.loose)return u;u=u.value}u=u.trim().split(/\s+/).join(" "),o("comparator",u,d),this.options=d,this.loose=!!d.loose,this.parse(u),this.semver===e?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(u){const d=this.options.loose?n[s.COMPARATORLOOSE]:n[s.COMPARATOR],p=u.match(d);if(!p)throw new TypeError(`Invalid comparator: ${u}`);this.operator=p[1]!==void 0?p[1]:"",this.operator==="="&&(this.operator=""),p[2]?this.semver=new a(p[2],this.options.loose):this.semver=e}toString(){return this.value}test(u){if(o("Comparator.test",u,this.options.loose),this.semver===e||u===e)return!0;if(typeof u=="string")try{u=new a(u,this.options)}catch{return!1}return i(u,this.operator,this.semver,this.options)}intersects(u,d){if(!(u instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(u.value,d).test(this.value):u.operator===""?u.value===""?!0:new l(this.value,d).test(u.semver):(d=r(d),d.includePrerelease&&(this.value==="<0.0.0-0"||u.value==="<0.0.0-0")||!d.includePrerelease&&(this.value.startsWith("<0.0.0")||u.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&u.operator.startsWith(">")||this.operator.startsWith("<")&&u.operator.startsWith("<")||this.semver.version===u.semver.version&&this.operator.includes("=")&&u.operator.includes("=")||i(this.semver,"<",u.semver,d)&&this.operator.startsWith(">")&&u.operator.startsWith("<")||i(this.semver,">",u.semver,d)&&this.operator.startsWith("<")&&u.operator.startsWith(">")))}}Tz=t;const r=tte(),{safeRe:n,t:s}=RD(),i=uZe(),o=q6(),a=Na(),l=Gd();return Tz}var Dz,exe;function G6(){if(exe)return Dz;exe=1;const e=Gd();return Dz=(r,n,s)=>{try{n=new e(n,s)}catch{return!1}return n.test(r)},Dz}var Az,txe;function dAr(){if(txe)return Az;txe=1;const e=Gd();return Az=(r,n)=>new e(r,n).set.map(s=>s.map(i=>i.value).join(" ").trim().split(" ")),Az}var Pz,rxe;function fAr(){if(rxe)return Pz;rxe=1;const e=Na(),t=Gd();return Pz=(n,s,i)=>{let o=null,a=null,l=null;try{l=new t(s,i)}catch{return null}return n.forEach(c=>{l.test(c)&&(!o||a.compare(c)===-1)&&(o=c,a=new e(o,i))}),o},Pz}var $z,nxe;function pAr(){if(nxe)return $z;nxe=1;const e=Na(),t=Gd();return $z=(n,s,i)=>{let o=null,a=null,l=null;try{l=new t(s,i)}catch{return null}return n.forEach(c=>{l.test(c)&&(!o||a.compare(c)===1)&&(o=c,a=new e(o,i))}),o},$z}var Iz,sxe;function hAr(){if(sxe)return Iz;sxe=1;const e=Na(),t=Gd(),r=H6();return Iz=(s,i)=>{s=new t(s,i);let o=new e("0.0.0");if(s.test(o)||(o=new e("0.0.0-0"),s.test(o)))return o;o=null;for(let a=0;a<s.set.length;++a){const l=s.set[a];let c=null;l.forEach(u=>{const d=new e(u.semver.version);switch(u.operator){case">":d.prerelease.length===0?d.patch++:d.prerelease.push(0),d.raw=d.format();case"":case">=":(!c||r(d,c))&&(c=d);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${u.operator}`)}}),c&&(!o||r(o,c))&&(o=c)}return o&&s.test(o)?o:null},Iz}var Nz,ixe;function mAr(){if(ixe)return Nz;ixe=1;const e=Gd();return Nz=(r,n)=>{try{return new e(r,n).range||"*"}catch{return null}},Nz}var Rz,oxe;function ote(){if(oxe)return Rz;oxe=1;const e=Na(),t=W6(),{ANY:r}=t,n=Gd(),s=G6(),i=H6(),o=nte(),a=ite(),l=ste();return Rz=(u,d,p,m)=>{u=new e(u,m),d=new n(d,m);let g,v,b,w,S;switch(p){case">":g=i,v=a,b=o,w=">",S=">=";break;case"<":g=o,v=l,b=i,w="<",S="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(u,d,m))return!1;for(let O=0;O<d.set.length;++O){const k=d.set[O];let C=null,T=null;if(k.forEach(P=>{P.semver===r&&(P=new t(">=0.0.0")),C=C||P,T=T||P,g(P.semver,C.semver,m)?C=P:b(P.semver,T.semver,m)&&(T=P)}),C.operator===w||C.operator===S||(!T.operator||T.operator===w)&&v(u,T.semver))return!1;if(T.operator===S&&b(u,T.semver))return!1}return!0},Rz}var Mz,axe;function gAr(){if(axe)return Mz;axe=1;const e=ote();return Mz=(r,n,s)=>e(r,n,">",s),Mz}var jz,lxe;function yAr(){if(lxe)return jz;lxe=1;const e=ote();return jz=(r,n,s)=>e(r,n,"<",s),jz}var Fz,cxe;function vAr(){if(cxe)return Fz;cxe=1;const e=Gd();return Fz=(r,n,s)=>(r=new e(r,s),n=new e(n,s),r.intersects(n,s)),Fz}var Lz,uxe;function bAr(){if(uxe)return Lz;uxe=1;const e=G6(),t=Wd();return Lz=(r,n,s)=>{const i=[];let o=null,a=null;const l=r.sort((p,m)=>t(p,m,s));for(const p of l)e(p,n,s)?(a=p,o||(o=p)):(a&&i.push([o,a]),a=null,o=null);o&&i.push([o,null]);const c=[];for(const[p,m]of i)p===m?c.push(p):!m&&p===l[0]?c.push("*"):m?p===l[0]?c.push(`<=${m}`):c.push(`${p} - ${m}`):c.push(`>=${p}`);const u=c.join(" || "),d=typeof n.raw=="string"?n.raw:String(n);return u.length<d.length?u:n},Lz}var zz,dxe;function xAr(){if(dxe)return zz;dxe=1;const e=Gd(),t=W6(),{ANY:r}=t,n=G6(),s=Wd(),i=(d,p,m={})=>{if(d===p)return!0;d=new e(d,m),p=new e(p,m);let g=!1;e:for(const v of d.set){for(const b of p.set){const w=l(v,b,m);if(g=g||w!==null,w)continue e}if(g)return!1}return!0},o=[new t(">=0.0.0-0")],a=[new t(">=0.0.0")],l=(d,p,m)=>{if(d===p)return!0;if(d.length===1&&d[0].semver===r){if(p.length===1&&p[0].semver===r)return!0;m.includePrerelease?d=o:d=a}if(p.length===1&&p[0].semver===r){if(m.includePrerelease)return!0;p=a}const g=new Set;let v,b;for(const A of d)A.operator===">"||A.operator===">="?v=c(v,A,m):A.operator==="<"||A.operator==="<="?b=u(b,A,m):g.add(A.semver);if(g.size>1)return null;let w;if(v&&b){if(w=s(v.semver,b.semver,m),w>0)return null;if(w===0&&(v.operator!==">="||b.operator!=="<="))return null}for(const A of g){if(v&&!n(A,String(v),m)||b&&!n(A,String(b),m))return null;for(const R of p)if(!n(A,String(R),m))return!1;return!0}let S,O,k,C,T=b&&!m.includePrerelease&&b.semver.prerelease.length?b.semver:!1,P=v&&!m.includePrerelease&&v.semver.prerelease.length?v.semver:!1;T&&T.prerelease.length===1&&b.operator==="<"&&T.prerelease[0]===0&&(T=!1);for(const A of p){if(C=C||A.operator===">"||A.operator===">=",k=k||A.operator==="<"||A.operator==="<=",v){if(P&&A.semver.prerelease&&A.semver.prerelease.length&&A.semver.major===P.major&&A.semver.minor===P.minor&&A.semver.patch===P.patch&&(P=!1),A.operator===">"||A.operator===">="){if(S=c(v,A,m),S===A&&S!==v)return!1}else if(v.operator===">="&&!n(v.semver,String(A),m))return!1}if(b){if(T&&A.semver.prerelease&&A.semver.prerelease.length&&A.semver.major===T.major&&A.semver.minor===T.minor&&A.semver.patch===T.patch&&(T=!1),A.operator==="<"||A.operator==="<="){if(O=u(b,A,m),O===A&&O!==b)return!1}else if(b.operator==="<="&&!n(b.semver,String(A),m))return!1}if(!A.operator&&(b||v)&&w!==0)return!1}return!(v&&k&&!b&&w!==0||b&&C&&!v&&w!==0||P||T)},c=(d,p,m)=>{if(!d)return p;const g=s(d.semver,p.semver,m);return g>0?d:g<0||p.operator===">"&&d.operator===">="?p:d},u=(d,p,m)=>{if(!d)return p;const g=s(d.semver,p.semver,m);return g<0?d:g>0||p.operator==="<"&&d.operator==="<="?p:d};return zz=i,zz}var Bz,fxe;function wAr(){if(fxe)return Bz;fxe=1;const e=RD(),t=Z6(),r=Na(),n=aZe(),s=kS(),i=YDr(),o=JDr(),a=KDr(),l=eAr(),c=tAr(),u=rAr(),d=nAr(),p=sAr(),m=Wd(),g=iAr(),v=oAr(),b=rte(),w=aAr(),S=lAr(),O=H6(),k=nte(),C=lZe(),T=cZe(),P=ste(),A=ite(),R=uZe(),M=cAr(),z=W6(),Q=Gd(),U=G6(),L=dAr(),V=fAr(),j=pAr(),N=hAr(),I=mAr(),H=ote(),B=gAr(),J=yAr(),Z=vAr(),F=bAr(),W=xAr();return Bz={parse:s,valid:i,clean:o,inc:a,diff:l,major:c,minor:u,patch:d,prerelease:p,compare:m,rcompare:g,compareLoose:v,compareBuild:b,sort:w,rsort:S,gt:O,lt:k,eq:C,neq:T,gte:P,lte:A,cmp:R,coerce:M,Comparator:z,Range:Q,satisfies:U,toComparators:L,maxSatisfying:V,minSatisfying:j,minVersion:N,validRange:I,outside:H,gtr:B,ltr:J,intersects:Z,simplifyRange:F,subset:W,SemVer:r,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:n.compareIdentifiers,rcompareIdentifiers:n.rcompareIdentifiers},Bz}var SAr=wAr();const m_=Wh(SAr);function dZe(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=dZe(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function fZe(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=dZe(e))&&(n&&(n+=" "),n+=t);return n}const ate="-",OAr=e=>{const t=kAr(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const a=o.split(ate);return a[0]===""&&a.length!==1&&a.shift(),pZe(a,t)||_Ar(o)},getConflictingClassGroupIds:(o,a)=>{const l=r[o]||[];return a&&n[o]?[...l,...n[o]]:l}}},pZe=(e,t)=>{if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?pZe(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(ate);return t.validators.find(({validator:o})=>o(i))?.classGroupId},pxe=/^\[(.+)\]$/,_Ar=e=>{if(pxe.test(e)){const t=pxe.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},kAr=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const s in r)GZ(r[s],n,s,t);return n},GZ=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:hxe(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(EAr(s)){GZ(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,o])=>{GZ(o,hxe(t,i),r,n)})})},hxe=(e,t)=>{let r=e;return t.split(ate).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},EAr=e=>e.isThemeGetter,CAr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(i,o)=>{r.set(i,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return s(i,o),o},set(i,o){r.has(i)?r.set(i,o):s(i,o)}}},XZ="!",YZ=":",TAr=YZ.length,DAr=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=s=>{const i=[];let o=0,a=0,l=0,c;for(let g=0;g<s.length;g++){let v=s[g];if(o===0&&a===0){if(v===YZ){i.push(s.slice(l,g)),l=g+TAr;continue}if(v==="/"){c=g;continue}}v==="["?o++:v==="]"?o--:v==="("?a++:v===")"&&a--}const u=i.length===0?s:s.substring(l),d=AAr(u),p=d!==u,m=c&&c>l?c-l:void 0;return{modifiers:i,hasImportantModifier:p,baseClassName:d,maybePostfixModifierPosition:m}};if(t){const s=t+YZ,i=n;n=o=>o.startsWith(s)?i(o.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(r){const s=n;n=i=>r({className:i,parseClassName:s})}return n},AAr=e=>e.endsWith(XZ)?e.substring(0,e.length-1):e.startsWith(XZ)?e.substring(1):e,PAr=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const s=[];let i=[];return n.forEach(o=>{o[0]==="["||t[o]?(s.push(...i.sort(),o),i=[]):i.push(o)}),s.push(...i.sort()),s}},$Ar=e=>({cache:CAr(e.cacheSize),parseClassName:DAr(e),sortModifiers:PAr(e),...OAr(e)}),IAr=/\s+/,NAr=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:i}=t,o=[],a=e.trim().split(IAr);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:d,modifiers:p,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:v}=r(u);if(d){l=u+(l.length>0?" "+l:l);continue}let b=!!v,w=n(b?g.substring(0,v):g);if(!w){if(!b){l=u+(l.length>0?" "+l:l);continue}if(w=n(g),!w){l=u+(l.length>0?" "+l:l);continue}b=!1}const S=i(p).join(":"),O=m?S+XZ:S,k=O+w;if(o.includes(k))continue;o.push(k);const C=s(w,b);for(let T=0;T<C.length;++T){const P=C[T];o.push(O+P)}l=u+(l.length>0?" "+l:l)}return l};function RAr(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=hZe(t))&&(n&&(n+=" "),n+=r);return n}const hZe=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=hZe(e[n]))&&(r&&(r+=" "),r+=t);return r};function mxe(e,...t){let r,n,s,i=o;function o(l){const c=t.reduce((u,d)=>d(u),e());return r=$Ar(c),n=r.cache.get,s=r.cache.set,i=a,a(l)}function a(l){const c=n(l);if(c)return c;const u=NAr(l,r);return s(l,u),u}return function(){return i(RAr.apply(null,arguments))}}const Zi=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},mZe=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,gZe=/^\((?:(\w[\w-]*):)?(.+)\)$/i,MAr=/^\d+\/\d+$/,jAr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,FAr=/\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$/,LAr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,zAr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,BAr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ux=e=>MAr.test(e),Fr=e=>!!e&&!Number.isNaN(Number(e)),Wm=e=>!!e&&Number.isInteger(Number(e)),Vz=e=>e.endsWith("%")&&Fr(e.slice(0,-1)),rh=e=>jAr.test(e),VAr=()=>!0,UAr=e=>FAr.test(e)&&!LAr.test(e),yZe=()=>!1,QAr=e=>zAr.test(e),ZAr=e=>BAr.test(e),qAr=e=>!Nt(e)&&!Rt(e),HAr=e=>ES(e,xZe,yZe),Nt=e=>mZe.test(e),Yy=e=>ES(e,wZe,UAr),Uz=e=>ES(e,JAr,Fr),gxe=e=>ES(e,vZe,yZe),WAr=e=>ES(e,bZe,ZAr),GP=e=>ES(e,SZe,QAr),Rt=e=>gZe.test(e),g_=e=>CS(e,wZe),GAr=e=>CS(e,KAr),yxe=e=>CS(e,vZe),XAr=e=>CS(e,xZe),YAr=e=>CS(e,bZe),XP=e=>CS(e,SZe,!0),ES=(e,t,r)=>{const n=mZe.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},CS=(e,t,r=!1)=>{const n=gZe.exec(e);return n?n[1]?t(n[1]):r:!1},vZe=e=>e==="position"||e==="percentage",bZe=e=>e==="image"||e==="url",xZe=e=>e==="length"||e==="size"||e==="bg-size",wZe=e=>e==="length",JAr=e=>e==="number",KAr=e=>e==="family-name",SZe=e=>e==="shadow",vxe=()=>{const e=Zi("color"),t=Zi("font"),r=Zi("text"),n=Zi("font-weight"),s=Zi("tracking"),i=Zi("leading"),o=Zi("breakpoint"),a=Zi("container"),l=Zi("spacing"),c=Zi("radius"),u=Zi("shadow"),d=Zi("inset-shadow"),p=Zi("text-shadow"),m=Zi("drop-shadow"),g=Zi("blur"),v=Zi("perspective"),b=Zi("aspect"),w=Zi("ease"),S=Zi("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...k(),Rt,Nt],T=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],A=()=>[Rt,Nt,l],R=()=>[ux,"full","auto",...A()],M=()=>[Wm,"none","subgrid",Rt,Nt],z=()=>["auto",{span:["full",Wm,Rt,Nt]},Wm,Rt,Nt],Q=()=>[Wm,"auto",Rt,Nt],U=()=>["auto","min","max","fr",Rt,Nt],L=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],j=()=>["auto",...A()],N=()=>[ux,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...A()],I=()=>[e,Rt,Nt],H=()=>[...k(),yxe,gxe,{position:[Rt,Nt]}],B=()=>["no-repeat",{repeat:["","x","y","space","round"]}],J=()=>["auto","cover","contain",XAr,HAr,{size:[Rt,Nt]}],Z=()=>[Vz,g_,Yy],F=()=>["","none","full",c,Rt,Nt],W=()=>["",Fr,g_,Yy],K=()=>["solid","dashed","dotted","double"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>[Fr,Vz,yxe,gxe],te=()=>["","none",g,Rt,Nt],de=()=>["none",Fr,Rt,Nt],ue=()=>["none",Fr,Rt,Nt],Ae=()=>[Fr,Rt,Nt],_e=()=>[ux,"full",...A()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[rh],breakpoint:[rh],color:[VAr],container:[rh],"drop-shadow":[rh],ease:["in","out","in-out"],font:[qAr],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[rh],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[rh],shadow:[rh],spacing:["px",Fr],text:[rh],"text-shadow":[rh],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ux,Nt,Rt,b]}],container:["container"],columns:[{columns:[Fr,Nt,Rt,a]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:R()}],"inset-x":[{"inset-x":R()}],"inset-y":[{"inset-y":R()}],start:[{start:R()}],end:[{end:R()}],top:[{top:R()}],right:[{right:R()}],bottom:[{bottom:R()}],left:[{left:R()}],visibility:["visible","invisible","collapse"],z:[{z:[Wm,"auto",Rt,Nt]}],basis:[{basis:[ux,"full","auto",a,...A()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Fr,ux,"auto","initial","none",Nt]}],grow:[{grow:["",Fr,Rt,Nt]}],shrink:[{shrink:["",Fr,Rt,Nt]}],order:[{order:[Wm,"first","last","none",Rt,Nt]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:z()}],"col-start":[{"col-start":Q()}],"col-end":[{"col-end":Q()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:z()}],"row-start":[{"row-start":Q()}],"row-end":[{"row-end":Q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:A()}],"gap-x":[{"gap-x":A()}],"gap-y":[{"gap-y":A()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:A()}],px:[{px:A()}],py:[{py:A()}],ps:[{ps:A()}],pe:[{pe:A()}],pt:[{pt:A()}],pr:[{pr:A()}],pb:[{pb:A()}],pl:[{pl:A()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":A()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":A()}],"space-y-reverse":["space-y-reverse"],size:[{size:N()}],w:[{w:[a,"screen",...N()]}],"min-w":[{"min-w":[a,"screen","none",...N()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...N()]}],h:[{h:["screen","lh",...N()]}],"min-h":[{"min-h":["screen","lh","none",...N()]}],"max-h":[{"max-h":["screen","lh",...N()]}],"font-size":[{text:["base",r,g_,Yy]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Rt,Uz]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Vz,Nt]}],"font-family":[{font:[GAr,Nt,t]}],"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:[s,Rt,Nt]}],"line-clamp":[{"line-clamp":[Fr,"none",Rt,Uz]}],leading:[{leading:[i,...A()]}],"list-image":[{"list-image":["none",Rt,Nt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Rt,Nt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:[Fr,"from-font","auto",Rt,Yy]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[Fr,"auto",Rt,Nt]}],"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",Rt,Nt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Rt,Nt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:H()}],"bg-repeat":[{bg:B()}],"bg-size":[{bg:J()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Wm,Rt,Nt],radial:["",Rt,Nt],conic:[Wm,Rt,Nt]},YAr,WAr]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:Z()}],"gradient-via-pos":[{via:Z()}],"gradient-to-pos":[{to:Z()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...K(),"hidden","none"]}],"divide-style":[{divide:[...K(),"hidden","none"]}],"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:[...K(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Fr,Rt,Nt]}],"outline-w":[{outline:["",Fr,g_,Yy]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",u,XP,GP]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",d,XP,GP]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[Fr,Yy]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",p,XP,GP]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[Fr,Rt,Nt]}],"mix-blend":[{"mix-blend":[...se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Fr]}],"mask-image-linear-from-pos":[{"mask-linear-from":X()}],"mask-image-linear-to-pos":[{"mask-linear-to":X()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":X()}],"mask-image-t-to-pos":[{"mask-t-to":X()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":X()}],"mask-image-r-to-pos":[{"mask-r-to":X()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":X()}],"mask-image-b-to-pos":[{"mask-b-to":X()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":X()}],"mask-image-l-to-pos":[{"mask-l-to":X()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":X()}],"mask-image-x-to-pos":[{"mask-x-to":X()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":X()}],"mask-image-y-to-pos":[{"mask-y-to":X()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[Rt,Nt]}],"mask-image-radial-from-pos":[{"mask-radial-from":X()}],"mask-image-radial-to-pos":[{"mask-radial-to":X()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[Fr]}],"mask-image-conic-from-pos":[{"mask-conic-from":X()}],"mask-image-conic-to-pos":[{"mask-conic-to":X()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:H()}],"mask-repeat":[{mask:B()}],"mask-size":[{mask:J()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Rt,Nt]}],filter:[{filter:["","none",Rt,Nt]}],blur:[{blur:te()}],brightness:[{brightness:[Fr,Rt,Nt]}],contrast:[{contrast:[Fr,Rt,Nt]}],"drop-shadow":[{"drop-shadow":["","none",m,XP,GP]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",Fr,Rt,Nt]}],"hue-rotate":[{"hue-rotate":[Fr,Rt,Nt]}],invert:[{invert:["",Fr,Rt,Nt]}],saturate:[{saturate:[Fr,Rt,Nt]}],sepia:[{sepia:["",Fr,Rt,Nt]}],"backdrop-filter":[{"backdrop-filter":["","none",Rt,Nt]}],"backdrop-blur":[{"backdrop-blur":te()}],"backdrop-brightness":[{"backdrop-brightness":[Fr,Rt,Nt]}],"backdrop-contrast":[{"backdrop-contrast":[Fr,Rt,Nt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Fr,Rt,Nt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Fr,Rt,Nt]}],"backdrop-invert":[{"backdrop-invert":["",Fr,Rt,Nt]}],"backdrop-opacity":[{"backdrop-opacity":[Fr,Rt,Nt]}],"backdrop-saturate":[{"backdrop-saturate":[Fr,Rt,Nt]}],"backdrop-sepia":[{"backdrop-sepia":["",Fr,Rt,Nt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":A()}],"border-spacing-x":[{"border-spacing-x":A()}],"border-spacing-y":[{"border-spacing-y":A()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Rt,Nt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Fr,"initial",Rt,Nt]}],ease:[{ease:["linear","initial",w,Rt,Nt]}],delay:[{delay:[Fr,Rt,Nt]}],animate:[{animate:["none",S,Rt,Nt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,Rt,Nt]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":["scale-3d"],skew:[{skew:Ae()}],"skew-x":[{"skew-x":Ae()}],"skew-y":[{"skew-y":Ae()}],transform:[{transform:[Rt,Nt,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:_e()}],"translate-x":[{"translate-x":_e()}],"translate-y":[{"translate-y":_e()}],"translate-z":[{"translate-z":_e()}],"translate-none":["translate-none"],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Rt,Nt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":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",Rt,Nt]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[Fr,g_,Yy,Uz]}],stroke:[{stroke:["none",...I()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},e2r=(e,{cacheSize:t,prefix:r,experimentalParseClassName:n,extend:s={},override:i={}})=>(Z_(e,"cacheSize",t),Z_(e,"prefix",r),Z_(e,"experimentalParseClassName",n),YP(e.theme,i.theme),YP(e.classGroups,i.classGroups),YP(e.conflictingClassGroups,i.conflictingClassGroups),YP(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Z_(e,"orderSensitiveModifiers",i.orderSensitiveModifiers),JP(e.theme,s.theme),JP(e.classGroups,s.classGroups),JP(e.conflictingClassGroups,s.conflictingClassGroups),JP(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),OZe(e,s,"orderSensitiveModifiers"),e),Z_=(e,t,r)=>{r!==void 0&&(e[t]=r)},YP=(e,t)=>{if(t)for(const r in t)Z_(e,r,t[r])},JP=(e,t)=>{if(t)for(const r in t)OZe(e,t,r)},OZe=(e,t,r)=>{const n=t[r];n!==void 0&&(e[r]=e[r]?e[r].concat(n):n)},t2r=(e,...t)=>typeof e=="function"?mxe(vxe,e,...t):mxe(()=>e2r(vxe(),e),...t),r2r=Object.keys({...gTe,...cft}),n2r=Object.keys(mft),s2r=Object.keys(uft),i2r=Object.keys(dft),o2r=Object.keys(lft),Jy=Object.keys(hft),a2r=Object.keys(fft).concat(Object.keys(pft)),l2r=t2r({extend:{theme:{color:r2r,spacing:n2r,radius:o2r,leading:i2r,shadow:a2r},classGroups:{"font-size":[{text:s2r}],h:[{h:Jy}],w:[{w:Jy}],size:[{size:Jy}],"min-h":[{"min-h":Jy}],"min-w":[{"min-w":Jy}],"max-h":[{"max-h":Jy}],"max-w":[{"max-w":Jy}]}}});function re(...e){return l2r(fZe(e))}const Ta={sm:"h-form-sm",md:"h-form-md",lg:"h-form-lg"},_p="focus:outline-none focus:ring-1 focus:ring-accent1 focus:shadow-focus-ring transition-shadow duration-normal",c2r="focus-within:outline-none focus-within:ring-1 focus-within:ring-accent1 focus-within:shadow-focus-ring transition-shadow duration-normal",MD="rounded-md",_Ze={sm:`${Ta.sm} gap-0.5`,md:`${Ta.md} gap-1`,lg:`${Ta.lg} gap-2`},kZe={default:"bg-surface2 hover:bg-surface4 text-neutral3 hover:text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",light:"bg-surface3 hover:bg-surface5 text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",outline:"bg-transparent hover:bg-surface2 text-neutral3 hover:text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",ghost:"bg-transparent border-transparent hover:bg-surface2 text-neutral3 hover:text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",primary:"bg-accent1 hover:bg-accent1/90 text-surface1 font-medium hover:shadow-glow-accent1 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:shadow-none"},EZe="border border-border1 px-2 text-ui-md inline-flex items-center justify-center rounded-md transition-all duration-normal ease-out-custom active:scale-[0.98]";function CZe(e){const t=e?.variant||"default",r=e?.size||"md";return re(EZe,_p,kZe[t],_Ze[r])}const Je=me.forwardRef(({className:e,as:t,size:r="md",variant:n="default",disabled:s,...i},o)=>{const a=t||"button";return f.jsx(a,{ref:o,disabled:s,className:re(EZe,_p,kZe[n],_Ze[r],s&&"active:scale-100",e),...i})});Je.displayName="Button";const Dc=Ift,Ss=Nft,Os=Rft,is=E.forwardRef(({className:e,sideOffset:t=4,...r},n)=>f.jsx(Mft,{children:f.jsx(ETe,{ref:n,sideOffset:t,className:re("z-50 overflow-hidden rounded-md bg-neutral6 px-3 py-1.5 text-xs text-surface2 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));is.displayName=ETe.displayName;const Sd=E.forwardRef(({children:e,tooltip:t,side:r="bottom",className:n,...s},i)=>f.jsx(Dc,{children:f.jsxs(Ss,{children:[f.jsx(Os,{asChild:!0,children:f.jsx(Je,{...s,className:re("size-6 p-1",n),ref:i,"aria-label":t,children:e})}),f.jsx(is,{side:r,children:t})]})}));Sd.displayName="TooltipIconButton";const u2r={"ui-xs":"text-ui-xs leading-ui-xs","ui-sm":"text-ui-sm leading-ui-sm","ui-md":"text-ui-md leading-ui-md","ui-lg":"text-ui-lg leading-ui-lg","header-sm":"text-header-sm leading-header-sm","header-md":"text-header-md leading-header-md","header-lg":"text-header-lg leading-header-lg","header-xl":"text-header-xl leading-header-xl"},d2r={mono:"font-mono"},Ze=({as:e="p",className:t,variant:r="ui-md",font:n,...s})=>f.jsx(e,{className:re(u2r[r],n&&d2r[n],t),...s}),kr={colors:"transition-colors duration-normal ease-out-custom",all:"transition-all duration-normal ease-out-custom",opacity:"transition-opacity duration-normal ease-out-custom"},jD={visible:"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent1 focus-visible:shadow-focus-ring"},f2r={sm:"h-avatar-sm w-avatar-sm",md:"h-avatar-md w-avatar-md",lg:"h-avatar-lg w-avatar-lg"},p2r=({src:e,name:t,size:r="sm",interactive:n=!1})=>f.jsx("div",{className:re(f2r[r],"border border-border1 bg-surface3 shrink-0 overflow-hidden rounded-full flex items-center justify-center",kr.all,n&&"cursor-pointer hover:scale-105 hover:border-neutral2 hover:shadow-sm"),children:e?f.jsx("img",{src:e,alt:t,className:"h-full w-full object-cover"}):f.jsx(Ze,{variant:"ui-md",className:"text-center text-neutral4",children:t[0].toUpperCase()})}),h2r=qbt({style:hbt.coldarkDark,customStyle:{margin:0,backgroundColor:"black"}}),m2r=()=>f.jsx(pyt,{remarkPlugins:[FDe],className:"aui-md",components:b2r}),bxe=E.memo(m2r),g2r=({language:e,code:t})=>{const{isCopied:r,copyToClipboard:n}=y2r(),s=()=>{!t||r||n(t)};return f.jsxs("div",{style:{background:"hsl(0 0% 100% / 0.06)",borderTopRightRadius:"0.5rem",borderTopLeftRadius:"0.5rem",marginTop:"0.5rem",border:"1px solid hsl(0 0% 20.4%)",borderBottom:"none"},className:"flex items-center justify-between gap-4 px-4 py-2 text-sm font-semibold text-white",children:[f.jsx("span",{className:"lowercase [&>span]:text-xs",children:e}),f.jsx(Sd,{tooltip:"Copy",onClick:s,children:f.jsxs("span",{className:"grid",children:[f.jsx("span",{style:{gridArea:"1/1"},className:re("transition-transform",r?"scale-100":"scale-0"),children:f.jsx(lu,{size:14})},"checkmark"),f.jsx("span",{style:{gridArea:"1/1"},className:re("transition-transform",r?"scale-0":"scale-100"),children:f.jsx(cu,{size:14})},"copy")]})})]})},y2r=({copiedDuration:e=1500}={})=>{const[t,r]=E.useState(!1);return{isCopied:t,copyToClipboard:s=>{s&&navigator.clipboard.writeText(s).then(()=>{r(!0),setTimeout(()=>r(!1),e)})}}},v2r=({alt:e,src:t,...r})=>{const[n,s]=E.useState(!1);return E.useEffect(()=>{s(!1)},[t]),n||!t?f.jsxs("div",{children:[f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",width:"150",height:"150",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"})}),f.jsx("p",{className:"text-xs italic text-neutral3 -mt-2.5 mb-2.5",children:"Image link is broken"})]}):f.jsx("img",{src:t,alt:e,...r,onError:()=>{s(!0)}})},b2r=Ygt({h1:({className:e,...t})=>f.jsx("h1",{className:re("mb-8 scroll-m-20 text-4xl font-extrabold tracking-tight last:mb-0",e),...t,style:{marginBottom:"2rem"}}),h2:({className:e,...t})=>f.jsx("h2",{className:re("mb-4 mt-8 scroll-m-20 text-3xl font-semibold tracking-tight first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"2rem"}}),h3:({className:e,...t})=>f.jsx("h3",{className:re("scroll-m-20 text-2xl font-semibold tracking-tight first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"1.5rem"}}),h4:({className:e,...t})=>f.jsx("h4",{className:re("scroll-m-20 text-xl font-semibold tracking-tight first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"1.5rem"}}),h5:({className:e,...t})=>f.jsx("h5",{className:re("font-semibold first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"1rem"}}),h6:({className:e,...t})=>f.jsx("h6",{className:re("font-semibold first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"1rem"}}),p:({className:e,...t})=>f.jsx("p",{className:re("leading-7 first:mt-0 last:mb-0",e),...t}),a:({className:e,...t})=>f.jsx("a",{className:re("text-neutral6 font-medium underline underline-offset-4",e),...t}),blockquote:({className:e,...t})=>f.jsx("blockquote",{className:re("border-l-2 pl-6 italic",e),...t}),ul:({className:e,...t})=>f.jsx("ul",{className:re("my-5 ml-6 list-disc [&>li]:mt-2",e),...t}),ol:({className:e,...t})=>f.jsx("ol",{className:re("my-5 ml-6 list-decimal [&>li]:mt-2",e),...t}),hr:({className:e,...t})=>f.jsx("hr",{className:re("my-5 border-b",e),...t}),table:({className:e,...t})=>f.jsx("table",{className:re("my-5 w-full border-separate border-spacing-0 overflow-y-auto",e),...t}),th:({className:e,...t})=>f.jsx("th",{className:re("bg-surface4 px-4 py-2 text-left font-bold first:rounded-tl-lg last:rounded-tr-lg [&[align=center]]:text-center [&[align=right]]:text-right",e),...t}),td:({className:e,...t})=>f.jsx("td",{className:re("border-b border-l px-4 py-2 text-left last:border-r [&[align=center]]:text-center [&[align=right]]:text-right",e),...t}),tr:({className:e,...t})=>f.jsx("tr",{className:re("m-0 border-b p-0 first:border-t [&:last-child>td:first-child]:rounded-bl-lg [&:last-child>td:last-child]:rounded-br-lg",e),...t}),sup:({className:e,...t})=>f.jsx("sup",{className:re("[&>a]:text-xs [&>a]:no-underline",e),...t}),pre:({className:e,...t})=>f.jsx("pre",{...t,style:{borderBottomRightRadius:"0.5rem",borderBottomLeftRadius:"0.5rem",background:"transparent",fontSize:"0.875rem",marginBottom:"0.5rem",border:"1px solid hsl(0 0% 20.4%)"},className:re("overflow-x-auto p-4 text-white",e)}),code:function({className:t,...r}){const n=fDe();return f.jsxs("pre",{style:{fontSize:"0.875rem",display:"inline"},children:[f.jsx("code",{className:re(!n&&"bg-surface4 rounded border font-semibold",t),...r,style:{fontWeight:"400",paddingBlock:n?0:"0.1em",paddingInline:n?0:"0.3em"}})," "]})},CodeHeader:g2r,SyntaxHighlighter:h2r,img:v2r}),x2r=({reason:e,tripwire:t})=>{const[r,n]=E.useState(!1),s=t&&(t.retry!==void 0||t.tripwirePayload||t.processorId);return f.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-950/20 overflow-hidden",children:[f.jsxs("div",{className:"flex items-start gap-3 p-4",children:[f.jsx(LT,{className:"w-5 h-5 text-amber-400 mt-0.5 flex-shrink-0"}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsx("p",{className:"text-sm font-medium text-amber-200 mb-1",children:"Content Blocked"}),f.jsx("p",{className:"text-sm text-amber-300/90",children:e})]})]}),s&&f.jsxs(f.Fragment,{children:[f.jsxs("button",{onClick:()=>n(!r),className:"w-full flex items-center gap-2 px-4 py-2 text-xs text-amber-400/70 hover:text-amber-400 hover:bg-amber-900/20 transition-colors border-t border-amber-500/20",children:[r?f.jsx(Vd,{className:"w-3.5 h-3.5"}):f.jsx(qN,{className:"w-3.5 h-3.5"}),f.jsx("span",{children:"Details"})]}),r&&f.jsxs("div",{className:"px-4 pb-4 space-y-3 border-t border-amber-500/20 bg-amber-950/10",children:[t.retry!==void 0&&f.jsxs("div",{className:"flex items-center gap-2 pt-3",children:[f.jsx(WN,{className:"w-3.5 h-3.5 text-amber-400/60"}),f.jsxs("span",{className:"text-xs text-amber-300/70",children:["Retry:"," ",t.retry?f.jsx("span",{className:"text-green-400",children:"Allowed"}):f.jsx("span",{className:"text-red-400",children:"Not allowed"})]})]}),t.processorId&&f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(hTe,{className:"w-3.5 h-3.5 text-amber-400/60"}),f.jsxs("span",{className:"text-xs text-amber-300/70",children:["Processor:"," ",f.jsx("code",{className:"px-1.5 py-0.5 rounded bg-amber-900/30 text-amber-200 font-mono",children:t.processorId})]})]}),t.tripwirePayload!==void 0&&t.tripwirePayload!==null&&f.jsxs("div",{className:"pt-1",children:[f.jsx("p",{className:"text-xs text-amber-400/60 mb-1.5",children:"Metadata:"}),f.jsx("pre",{className:"text-xs text-amber-200/80 bg-amber-900/30 rounded p-2 overflow-x-auto font-mono",children:String(JSON.stringify(t.tripwirePayload,null,2))})]})]})]})]})},Fo=e=>f.jsxs("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.5 15C10.3565 15 12.137 14.2625 13.4497 12.9497C14.7625 11.637 15.5 9.85652 15.5 8C15.5 6.14348 14.7625 4.36301 13.4497 3.05025C12.137 1.7375 10.3565 1 8.5 1C6.64348 1 4.86301 1.7375 3.55025 3.05025C2.2375 4.36301 1.5 6.14348 1.5 8C1.5 9.85652 2.2375 11.637 3.55025 12.9497C4.86301 14.2625 6.64348 15 8.5 15ZM5.621 10.879L4.611 11.889C3.84179 11.1198 3.31794 10.1398 3.1057 9.07291C2.89346 8.00601 3.00236 6.90013 3.41864 5.89512C3.83491 4.89012 4.53986 4.03112 5.44434 3.42676C6.34881 2.8224 7.41219 2.49983 8.5 2.49983C9.58781 2.49983 10.6512 2.8224 11.5557 3.42676C12.4601 4.03112 13.1651 4.89012 13.5814 5.89512C13.9976 6.90013 14.1065 8.00601 13.8943 9.07291C13.6821 10.1398 13.1582 11.1198 12.389 11.889L11.379 10.879C11.1004 10.6003 10.7696 10.3792 10.4055 10.2284C10.0414 10.0776 9.6511 9.99995 9.257 10H7.743C7.3489 9.99995 6.95865 10.0776 6.59455 10.2284C6.23045 10.3792 5.89963 10.6003 5.621 10.879Z",fill:"currentColor"}),f.jsx("path",{d:"M8.5 4C7.96957 4 7.46086 4.21071 7.08579 4.58579C6.71071 4.96086 6.5 5.46957 6.5 6V6.5C6.5 7.03043 6.71071 7.53914 7.08579 7.91421C7.46086 8.28929 7.96957 8.5 8.5 8.5C9.03043 8.5 9.53914 8.28929 9.91421 7.91421C10.2893 7.53914 10.5 7.03043 10.5 6.5V6C10.5 5.46957 10.2893 4.96086 9.91421 4.58579C9.53914 4.21071 9.03043 4 8.5 4Z",fill:"currentColor"})]}),TZe=e=>f.jsxs("svg",{width:"126",height:"85",viewBox:"0 0 126 85",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[f.jsx("path",{d:"M63.0002 0.968262C28.5152 0.968262 0.55957 15.6484 0.55957 33.7573V51.2428C0.55957 69.3517 28.5152 84.0319 63.0002 84.0319C97.4853 84.0319 125.441 69.3517 125.441 51.2428V33.7573C125.441 15.6484 97.4853 0.968262 63.0002 0.968262Z",stroke:"#707070"}),f.jsx("path",{d:"M119.322 35.1636C119.322 50.3595 94.1055 62.6782 62.9998 62.6782C31.894 62.6782 6.67773 50.3595 6.67773 35.1636V49.8363C6.67773 65.0322 31.894 77.351 62.9998 77.351C94.1055 77.351 119.322 65.0322 119.322 49.8363V35.1636Z",fill:"#2E2E2E",fillOpacity:"0.9"}),f.jsx("path",{d:"M119.322 35.1636C119.322 50.3595 94.1055 62.6782 62.9998 62.6782C31.894 62.6782 6.67773 50.3595 6.67773 35.1636M119.322 35.1636C119.322 19.9677 94.1055 7.64893 62.9998 7.64893C31.894 7.64893 6.67773 19.9677 6.67773 35.1636M119.322 35.1636V49.8363C119.322 65.0322 94.1055 77.351 62.9998 77.351C31.894 77.351 6.67773 65.0322 6.67773 49.8363V35.1636",stroke:"#424242"}),f.jsxs("g",{clipPath:"url(#clip0_21421_19519)",children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.5383 47.0955C45.0714 50.3122 53.9322 52.1193 63.1714 52.1193C72.4106 52.1193 81.2714 50.3122 87.8045 47.0955C94.3376 43.8787 98.0078 39.5159 98.0078 34.9668C98.0078 30.4177 94.3376 26.0549 87.8045 22.8381C81.2714 19.6214 72.4106 17.8143 63.1714 17.8143C53.9322 17.8143 45.0714 19.6214 38.5383 22.8381C32.0052 26.0549 28.3349 30.4177 28.3349 34.9668C28.3349 39.5159 32.0052 43.8787 38.5383 47.0955ZM42.9089 34.9668L35.8005 34.9668C35.8004 32.3013 37.4056 29.6956 40.4132 27.4793C43.4207 25.263 47.6956 23.5355 52.6971 22.5154C57.6986 21.4954 63.2022 21.2285 68.5118 21.7485C73.8214 22.2685 78.6986 23.552 82.5266 25.4368C86.3546 27.3216 88.9615 29.723 90.0176 32.3373C91.0737 34.9517 90.5316 37.6614 88.4599 40.1241C86.3881 42.5867 82.8797 44.6915 78.3784 46.1723C73.8771 47.6532 68.585 48.4435 63.1714 48.4435V44.9435C63.1717 43.9778 62.7855 43.0215 62.035 42.1293C61.2845 41.2372 60.1843 40.4265 58.7973 39.7438L53.4695 37.1205C52.0828 36.4376 50.4364 35.8959 48.6244 35.5263C46.8124 35.1568 44.8702 34.9667 42.9089 34.9668Z",fill:"#A9A9A9"}),f.jsx("path",{d:"M77.2474 28.0361C75.3808 27.1171 72.8492 26.6007 70.2094 26.6007C67.5696 26.6007 65.038 27.1171 63.1714 28.0361L61.4119 28.9025C59.5453 29.8215 58.4966 31.068 58.4966 32.3678C58.4966 33.6676 59.5453 34.9141 61.4119 35.8331C63.2785 36.7522 65.8101 37.2685 68.4499 37.2685C71.0897 37.2685 73.6213 36.7522 75.4879 35.8331L77.2474 34.9668C79.114 34.0477 80.1627 32.8012 80.1627 31.5015C80.1627 30.2017 79.114 28.9552 77.2474 28.0361Z",fill:"#A9A9A9"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_21421_19519",children:f.jsx("rect",{width:"62.7591",height:"62.7591",fill:"white",transform:"matrix(0.897148 0.441731 -0.897148 0.441731 63.1714 7.24365)"})})})]}),w2r=e=>f.jsxs("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[f.jsx("path",{d:"M11.0313 7.97578C11.0313 9.34436 9.92183 10.4538 8.55324 10.4538C7.18466 10.4538 6.0752 9.34436 6.0752 7.97578C6.0752 6.60719 7.18466 5.49773 8.55324 5.49773C9.92183 5.49773 11.0313 6.60719 11.0313 7.97578ZM11.0313 7.97578H14.573",stroke:"currentColor",strokeWidth:"1.33333",strokeLinecap:"round"}),f.jsx("path",{d:"M12.967 4.46154C11.9273 3.14431 10.3165 2.29883 8.50814 2.29883C5.37277 2.29883 2.83105 4.84055 2.83105 7.97591C2.83105 11.1113 5.37277 13.653 8.50814 13.653C10.3165 13.653 11.9273 12.8075 12.967 11.4903",stroke:"currentColor",strokeWidth:"1.33333",strokeLinecap:"round"})]}),lte=e=>f.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.99982 2.0625C3.8252 2.0625 2.06232 3.82538 2.06232 6C2.06232 8.17462 3.8252 9.9375 5.99982 9.9375C8.17444 9.9375 9.93732 8.17462 9.93732 6C9.93732 3.82538 8.17444 2.0625 5.99982 2.0625ZM0.937317 6C0.937317 3.20406 3.20388 0.9375 5.99982 0.9375C8.79576 0.9375 11.0623 3.20406 11.0623 6C11.0623 8.79594 8.79576 11.0625 5.99982 11.0625C3.20388 11.0625 0.937317 8.79594 0.937317 6Z",fill:"currentColor"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.97865 4.57004C8.22604 4.75795 8.27426 5.11082 8.08635 5.35821L6.05486 8.03279C5.94873 8.17251 5.78348 8.25471 5.60803 8.25505C5.43257 8.2554 5.267 8.17385 5.16032 8.03454L3.80937 6.27034C3.6205 6.02369 3.66733 5.67063 3.91398 5.48176C4.16063 5.29288 4.51369 5.33972 4.70257 5.58637L5.6051 6.76498L7.19048 4.67774C7.37839 4.43036 7.73126 4.38213 7.97865 4.57004Z",fill:"currentColor"})]}),cte=e=>f.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.99982 2.0625C3.8252 2.0625 2.06232 3.82538 2.06232 6C2.06232 8.17462 3.8252 9.9375 5.99982 9.9375C8.17444 9.9375 9.93732 8.17462 9.93732 6C9.93732 3.82538 8.17444 2.0625 5.99982 2.0625ZM0.937317 6C0.937317 3.20406 3.20388 0.9375 5.99982 0.9375C8.79576 0.9375 11.0623 3.20406 11.0623 6C11.0623 8.79594 8.79576 11.0625 5.99982 11.0625C3.20388 11.0625 0.937317 8.79594 0.937317 6Z",fill:"currentColor"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.89741 4.10293C8.11707 4.32261 8.11706 4.67877 7.89738 4.89843L6.79517 6.00058L7.8962 7.10155C8.11588 7.32122 8.11589 7.67737 7.89623 7.89705C7.67656 8.11673 7.32041 8.11674 7.10073 7.89707L5.99965 6.79605L4.89856 7.89707C4.67889 8.11673 4.32273 8.11672 4.10307 7.89704C3.88341 7.67737 3.88342 7.32121 4.10309 7.10155L5.20413 6.00058L4.10191 4.89843C3.88224 4.67877 3.88223 4.32262 4.10189 4.10294C4.32155 3.88326 4.67771 3.88325 4.89738 4.10292L5.99965 5.20511L7.10191 4.10291C7.32159 3.88325 7.67774 3.88326 7.89741 4.10293Z",fill:"currentColor"})]}),j4=e=>f.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:f.jsx("path",{d:"M8.5 3V13",stroke:"currentColor",strokeWidth:"0.5"})}),Ra=e=>f.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.1747 3.18598L7.02554 1.95209C7.11557 1.89207 7.31087 1.87106 7.41016 1.90924L12.4139 3.83377C12.4683 3.85467 12.546 3.96798 12.546 4.03118V13.0167C12.546 13.265 12.7473 13.4663 12.9956 13.4663C13.2439 13.4663 13.4452 13.265 13.4452 13.0167V4.03118C13.4452 3.59605 13.1384 3.14906 12.7367 2.99456L7.73293 1.07004C7.36225 0.927472 6.86056 0.981451 6.52679 1.20396L4.20445 2.75219L3.90419 2.95236L3.90647 2.95824C3.69329 3.05449 3.55469 3.27599 3.55469 3.57581V11.7119C3.55469 12.2084 3.93067 12.7499 4.39251 12.9206L9.89804 14.955C10.3608 15.126 10.7359 14.8596 10.7359 14.3659V5.83295C10.7359 5.33662 10.3498 4.81289 9.88389 4.66643L5.1747 3.18598Z",fill:"currentColor"})}),ute=e=>f.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[f.jsx("g",{clipPath:"url(#clip0_21999_22095)",children:f.jsx("path",{d:"M7.5 0.75C3.6325 0.75 0.5 3.8825 0.5 7.75C0.5 10.8475 2.50375 13.4637 5.28625 14.3912C5.63625 14.4525 5.7675 14.2425 5.7675 14.0587C5.7675 13.8925 5.75875 13.3412 5.75875 12.755C4 13.0787 3.545 12.3262 3.405 11.9325C3.32625 11.7312 2.985 11.11 2.6875 10.9437C2.4425 10.8125 2.0925 10.4887 2.67875 10.48C3.23 10.4712 3.62375 10.9875 3.755 11.1975C4.385 12.2562 5.39125 11.9587 5.79375 11.775C5.855 11.32 6.03875 11.0137 6.24 10.8387C4.6825 10.6637 3.055 10.06 3.055 7.3825C3.055 6.62125 3.32625 5.99125 3.7725 5.50125C3.7025 5.32625 3.4575 4.60875 3.8425 3.64625C3.8425 3.64625 4.42875 3.4625 5.7675 4.36375C6.3275 4.20625 6.9225 4.1275 7.5175 4.1275C8.1125 4.1275 8.7075 4.20625 9.2675 4.36375C10.6062 3.45375 11.1925 3.64625 11.1925 3.64625C11.5775 4.60875 11.3325 5.32625 11.2625 5.50125C11.7087 5.99125 11.98 6.6125 11.98 7.3825C11.98 10.0687 10.3438 10.6637 8.78625 10.8387C9.04 11.0575 9.25875 11.4775 9.25875 12.1337C9.25875 13.07 9.25 13.8225 9.25 14.0587C9.25 14.2425 9.38125 14.4612 9.73125 14.3912C11.1209 13.9221 12.3284 13.029 13.1839 11.8377C14.0393 10.6463 14.4996 9.21668 14.5 7.75C14.5 3.8825 11.3675 0.75 7.5 0.75Z",fill:"currentColor"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_21999_22095",children:f.jsx("rect",{width:"14",height:"14",fill:"currentColor",transform:"translate(0.5 0.75)"})})})]}),S2r=e=>f.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[f.jsxs("g",{clipPath:"url(#clip0_21999_20513)",children:[f.jsx("path",{d:"M13.5037 7.54867C13.5037 7.1144 13.4648 6.69683 13.3924 6.29596H7.62436V8.66776H10.9204C10.7756 9.43052 10.3413 10.0764 9.68994 10.5106V12.0529H11.6776C12.8356 10.9839 13.5037 9.41382 13.5037 7.54867Z",fill:"white"}),f.jsx("path",{d:"M7.62415 13.5339C9.27773 13.5339 10.6643 12.9882 11.6776 12.0529L9.68994 10.5106C9.14431 10.8781 8.44816 11.1009 7.62415 11.1009C6.03182 11.1009 4.67889 10.0263 4.19451 8.57877H2.15677V10.16C3.1645 12.1587 5.23008 13.5339 7.62415 13.5339Z",fill:"white"}),f.jsx("path",{d:"M4.19472 8.57315C4.07223 8.20569 3.99985 7.81595 3.99985 7.40952C3.99985 7.00308 4.07223 6.61335 4.19472 6.24589V4.66469H2.15698C1.73941 5.4887 1.5 6.41849 1.5 7.40952C1.5 8.40055 1.73941 9.33034 2.15698 10.1543L3.74374 8.91834L4.19472 8.57315Z",fill:"white"}),f.jsx("path",{d:"M7.62415 3.72376C8.5261 3.72376 9.32783 4.03555 9.96811 4.63685L11.7219 2.88306C10.6585 1.89202 9.27773 1.28516 7.62415 1.28516C5.23008 1.28516 3.16471 2.66036 2.15698 4.66469L4.19472 6.24589C4.6791 4.79832 6.03182 3.72376 7.62415 3.72376Z",fill:"white"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_21999_20513",children:f.jsx("rect",{width:"12.2487",height:"12.2487",fill:"white",transform:"translate(1.375 1.28516)"})})})]}),O2r={sm:"[&>svg]:h-icon-sm [&>svg]:w-icon-sm",default:"[&>svg]:h-icon-default [&>svg]:w-icon-default",lg:"[&>svg]:h-icon-lg [&>svg]:w-icon-lg"},qe=({children:e,className:t,size:r="default",...n})=>f.jsx("span",{className:re("block",O2r[r],t),...n,children:e}),_2r=e=>f.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:f.jsx("path",{d:"M3.8674 9.19968L4.14554 10.8649C4.23965 11.4283 4.75254 11.8237 5.32137 11.7713L5.58252 11.7472C6.56555 11.6567 7.43309 12.3868 7.51181 13.3708L7.59308 14.3867C7.60422 14.5259 7.71868 14.6342 7.85825 14.6376L9.91053 14.6876C10.1066 14.6924 10.2434 14.4948 10.17 14.3129L8.90452 11.1782C8.80956 10.9429 8.65085 10.7389 8.44626 10.5889L7.90134 10.1895C7.70604 10.0464 7.55223 9.85411 7.45759 9.63124C7.15011 8.90712 6.6579 7.71234 6.37054 6.88944C6.19204 6.3783 5.79931 6.29158 5.45492 6.21553C4.98179 6.11106 4.5999 6.02673 4.99001 4.88985C5.66408 2.92541 8.06015 2.07904 10.6601 3.33088C12.6488 4.2884 13.1187 6.35416 13.0328 7.58237C13.0297 7.62768 13.0214 7.67186 13.0094 7.71566C12.8829 8.17534 12.368 8.40491 11.9415 8.19169L10.3022 7.37201C10.2069 7.32439 10.0927 7.33657 10.0096 7.40322L8.64809 8.49559C8.55405 8.57104 8.52072 8.69931 8.56615 8.811L10.8995 14.5478C10.9404 14.6483 11.0369 14.715 11.1454 14.7177L12.0572 14.7399C12.2581 14.7448 12.3951 14.5382 12.3124 14.3551L11.8681 13.3706C11.4211 12.3803 11.6047 11.2192 12.3354 10.4151L13.4616 9.17575C13.7473 8.86125 13.9224 8.46187 13.9599 8.03858L13.9763 7.85359C14.2866 4.35298 11.377 1.41272 7.87336 1.68639C6.03919 1.82965 4.45399 3.02228 3.80807 4.74492L3.70275 5.02579C3.5828 5.34571 3.62741 5.70411 3.82213 5.98485L3.88946 6.08192C4.12183 6.41695 4.0958 6.86726 3.82637 7.17328L3.06705 8.03572C2.96261 8.15435 2.98058 8.33664 3.10617 8.43259L3.66059 8.85617C3.77064 8.94026 3.84458 9.06307 3.8674 9.19968Z",fill:"currentColor"})}),k2r=e=>f.jsx("svg",{width:"12",height:"13",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:f.jsx("path",{d:"M10.1266 5.67745C10.3409 5.0225 10.2695 4.2961 9.92413 3.70069C9.40017 2.78376 8.34034 2.31934 7.30433 2.53369C6.85182 2.02164 6.18496 1.73584 5.49428 1.73584C4.43445 1.73584 3.50561 2.41461 3.17218 3.4149C2.49342 3.55779 1.90992 3.97458 1.56458 4.5819C1.04062 5.49883 1.1597 6.64202 1.86228 7.42796C1.64793 8.09482 1.73129 8.80931 2.07663 9.40472C2.60059 10.3217 3.66042 10.798 4.69643 10.5717C5.16085 11.0838 5.8158 11.3815 6.50648 11.3815C7.56631 11.3815 8.49515 10.7027 8.82858 9.70243C9.50735 9.55953 10.0908 9.14274 10.4362 8.53542C10.9601 7.61849 10.8411 6.46339 10.1266 5.67745ZM6.50648 10.7503C6.07778 10.7503 5.67291 10.6074 5.35138 10.3336C5.36329 10.3217 5.39902 10.3097 5.41093 10.2978L7.32815 9.19037C7.42341 9.13083 7.48295 9.03557 7.48295 8.91648V6.21332L8.29271 6.67774C8.30462 6.67774 8.30462 6.68965 8.30462 6.70156V8.9403C8.31653 9.94059 7.50677 10.7503 6.50648 10.7503ZM2.62441 9.09511C2.41006 8.72595 2.33861 8.29726 2.41006 7.88047C2.42197 7.89238 2.44578 7.90429 2.4696 7.91619L4.38682 9.02366C4.48209 9.0832 4.60117 9.0832 4.69643 9.02366L7.04235 7.66612V8.60687C7.04235 8.61878 7.04235 8.63069 7.03044 8.63069L5.0894 9.75006C4.23201 10.2502 3.12455 9.9525 2.62441 9.09511ZM2.12426 4.90342C2.33861 4.53427 2.67204 4.26038 3.06501 4.10557V6.39195C3.06501 6.49912 3.12455 6.60629 3.21982 6.66583L5.56573 8.02337L4.75597 8.48779C4.74407 8.48779 4.73216 8.4997 4.73216 8.48779L2.79112 7.36842C1.90992 6.86827 1.62412 5.76081 2.12426 4.90342ZM8.79285 6.45149L6.44694 5.09395L7.2567 4.62953C7.2686 4.62953 7.28051 4.61762 7.28051 4.62953L9.22155 5.7489C10.0908 6.24905 10.3766 7.35651 9.8765 8.2139C9.66215 8.58305 9.32872 8.85694 8.93575 8.99984V6.72538C8.94766 6.6182 8.88812 6.51103 8.79285 6.45149ZM9.5907 5.23685C9.5788 5.22494 9.55498 5.21303 9.53116 5.20113L7.61394 4.09366C7.51868 4.03412 7.39959 4.03412 7.30433 4.09366L4.95841 5.4512V4.51045C4.95841 4.49854 4.95841 4.48663 4.97032 4.48663L6.91136 3.36726C7.78066 2.86712 8.87621 3.16482 9.37636 4.03412C9.5907 4.39137 9.66215 4.82006 9.5907 5.23685ZM4.51781 6.904L3.70805 6.43958C3.69615 6.43958 3.69615 6.42767 3.69615 6.41576V4.17702C3.69615 3.17673 4.5059 2.36697 5.50619 2.36697C5.93489 2.36697 6.33977 2.50987 6.66129 2.78376C6.64938 2.79567 6.62556 2.80758 6.60175 2.81949L4.68453 3.92695C4.58926 3.98649 4.52972 4.08176 4.52972 4.20084V6.904H4.51781ZM4.95841 5.95134L6.00634 5.34402L7.05426 5.95134V7.15407L6.00634 7.76139L4.95841 7.15407V5.95134Z",fill:"currentColor"})}),DZe=e=>f.jsx("svg",{width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.40864 11.9983C7.58064 11.9733 6.84164 11.6153 6.31564 11.0563C6.31464 11.0563 6.31464 11.0553 6.31464 11.0553C5.78864 10.4963 5.47564 9.73633 5.50064 8.90833C5.52564 8.08033 5.88464 7.34133 6.44364 6.81533C7.00264 6.28833 7.76264 5.97633 8.59064 6.00133C9.41864 6.02633 10.1576 6.38433 10.6836 6.94333H10.6846C11.2106 7.50333 11.5236 8.26233 11.4986 9.09033C11.4726 9.91833 11.1146 10.6583 10.5556 11.1843C9.99664 11.7103 9.23664 12.0233 8.40864 11.9983ZM16.1266 8.15033L14.3606 7.74033C14.2316 7.14133 14.0146 6.57633 13.7216 6.05733L14.7726 4.57933C14.9116 4.38533 14.8926 4.12033 14.7296 3.94633L13.9206 3.08733C13.7576 2.91333 13.4946 2.87933 13.2916 3.00533L11.7526 3.96533C11.2526 3.64133 10.7016 3.39033 10.1116 3.22633L9.80964 1.43833C9.76964 1.20333 9.56964 1.02833 9.33164 1.02133L8.15264 0.985326C7.91364 0.978326 7.70364 1.14033 7.64964 1.37233L7.24064 3.13933C6.64164 3.26733 6.07664 3.48433 5.55664 3.77733L4.07864 2.72633C3.88464 2.58833 3.61964 2.60633 3.44664 2.76933L2.58664 3.57833C2.41364 3.74133 2.37964 4.00533 2.50564 4.20733L3.46564 5.74633C3.14164 6.24633 2.89064 6.79833 2.72564 7.38833L0.937635 7.68933C0.702635 7.72933 0.528635 7.92933 0.520635 8.16733L0.485635 9.34733C0.477635 9.58533 0.639635 9.79533 0.872635 9.84933L2.63864 10.2583C2.76764 10.8573 2.98464 11.4233 3.27764 11.9423L2.22564 13.4203C2.08764 13.6143 2.10564 13.8793 2.26964 14.0523L3.07864 14.9123C3.24164 15.0853 3.50464 15.1203 3.70664 14.9933L5.24564 14.0333C5.74663 14.3583 6.29764 14.6093 6.88764 14.7733L7.18964 16.5613C7.22864 16.7963 7.42864 16.9713 7.66764 16.9783L8.84663 17.0143C9.08564 17.0213 9.29564 16.8593 9.34964 16.6273L9.75864 14.8603C10.3576 14.7323 10.9226 14.5153 11.4416 14.2213L12.9206 15.2733C13.1146 15.4113 13.3786 15.3933 13.5526 15.2293L14.4116 14.4213C14.5856 14.2573 14.6196 13.9943 14.4936 13.7923L13.5336 12.2533C13.8576 11.7523 14.1086 11.2013 14.2726 10.6113L16.0616 10.3103C16.2966 10.2703 16.4706 10.0703 16.4776 9.83233L16.5136 8.65233C16.5206 8.41433 16.3586 8.20433 16.1266 8.15033Z",fill:"currentColor"})}),E2r=e=>f.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:f.jsx("path",{d:"M5.25684 12.6387L10.4003 3.36133H11.7432L6.5997 12.6387H5.25684Z",fill:"currentColor"})}),Cu=e=>f.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.5605 1.42351C8.0791 0.904904 8.92215 0.906157 9.4395 1.42351L10.6922 2.67617C11.2108 3.19477 11.2095 4.03782 10.6922 4.55517L9.4395 5.80783C8.9209 6.32643 8.07785 6.32518 7.5605 5.80783L6.30784 4.55517C5.78923 4.03656 5.79049 3.19352 6.30784 2.67617L7.5605 1.42351ZM3.17618 5.80783C3.69478 5.28923 4.53782 5.29048 5.05517 5.80783L6.30784 7.0605C6.82644 7.5791 6.82519 8.42214 6.30784 8.93949L5.05517 10.1922C4.53657 10.7108 3.69353 10.7095 3.17618 10.1922L1.92351 8.93949C1.40491 8.42089 1.40616 7.57785 1.92351 7.0605L3.17618 5.80783ZM11.9448 5.80783C12.4634 5.28923 13.3065 5.29048 13.8238 5.80783L15.0765 7.0605C15.5951 7.5791 15.5938 8.42214 15.0765 8.93949L13.8238 10.1922C13.3052 10.7108 12.4622 10.7095 11.9448 10.1922L10.6922 8.93949C10.1736 8.42089 10.1748 7.57785 10.6922 7.0605L11.9448 5.80783ZM7.5605 10.1922C8.0791 9.67355 8.92215 9.67481 9.4395 10.1922L10.6922 11.4448C11.2108 11.9634 11.2095 12.8065 10.6922 13.3238L9.4395 14.5765C8.9209 15.0951 8.07785 15.0938 7.5605 14.5765L6.30784 13.3238C5.78923 12.8052 5.79049 11.9622 6.30784 11.4448L7.5605 10.1922Z",fill:"currentColor"})}),Tu=e=>f.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.24388 2.4018C6.24388 2.0394 6.53767 1.74561 6.90008 1.74561H10.0991C10.4614 1.74561 10.7553 2.0394 10.7553 2.4018V4.57546C10.7553 4.93787 10.4614 5.23166 10.0991 5.23166H9.31982V7.35469L10.0033 9.22664C9.90442 9.20146 9.80035 9.1761 9.6915 9.14986L9.62652 9.13422C9.30473 9.05687 8.92256 8.96501 8.61993 8.84491C8.5819 8.82981 8.54147 8.81292 8.49957 8.79391C8.45767 8.81292 8.41724 8.82981 8.3792 8.84491C8.07657 8.96501 7.6944 9.05687 7.37261 9.13422L7.30763 9.14986C7.19879 9.1761 7.09471 9.20146 6.99577 9.22664L7.67932 7.35469V5.23166H6.90008C6.53767 5.23166 6.24388 4.93787 6.24388 4.57546V2.4018ZM6.99577 9.22664C6.99577 9.22664 6.99578 9.22664 6.99577 9.22664L6.43283 10.7683H6.81806C7.18047 10.7683 7.47426 11.0622 7.47426 11.4245V13.5982C7.47426 13.9606 7.18047 14.2544 6.81806 14.2544H3.61909C3.25668 14.2544 2.96289 13.9606 2.96289 13.5982V11.4245C2.96289 11.0622 3.25668 10.7683 3.61909 10.7683H4.26617C4.2921 10.4663 4.32783 10.1494 4.37744 9.85171C4.43762 9.49063 4.52982 9.08135 4.68998 8.76102C4.93975 8.2615 5.44743 8.01751 5.7771 7.88788C6.14684 7.74249 6.57537 7.63889 6.92317 7.55505C7.24707 7.47696 7.49576 7.41679 7.67932 7.35469L6.99577 9.22664ZM6.43283 10.7683L6.99577 9.22664C6.75846 9.28705 6.55067 9.34646 6.37745 9.41458C6.22784 9.47341 6.1623 9.51712 6.14023 9.53254C6.09752 9.63631 6.04409 9.83055 5.99562 10.1214C5.96201 10.3231 5.93498 10.5439 5.91341 10.7683H6.43283ZM10.0033 9.22664L9.31982 7.35469C9.50338 7.41679 9.75206 7.47696 10.076 7.55505C10.4238 7.63889 10.8523 7.74249 11.2221 7.88788C11.5517 8.01751 12.0594 8.2615 12.3091 8.76102C12.4693 9.08135 12.5615 9.49063 12.6217 9.85171C12.6713 10.1494 12.707 10.4663 12.733 10.7683H13.38C13.7424 10.7683 14.0362 11.0622 14.0362 11.4245V13.5982C14.0362 13.9606 13.7424 14.2544 13.38 14.2544H10.1811C9.81867 14.2544 9.52488 13.9606 9.52488 13.5982V11.4245C9.52488 11.0622 9.81867 10.7683 10.1811 10.7683H10.5663L10.0033 9.22664ZM10.0033 9.22664L10.5663 10.7683H11.0857C11.0642 10.5439 11.0372 10.3231 11.0035 10.1214C10.9551 9.83055 10.9016 9.63631 10.8589 9.53254C10.8369 9.51712 10.7713 9.47341 10.6217 9.41458C10.4485 9.34646 10.2407 9.28705 10.0033 9.22664Z",fill:"currentColor"})}),C2r=e=>f.jsxs("svg",{width:"126",height:"85",viewBox:"0 0 126 85",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[f.jsx("path",{d:"M119.322 35.1636C119.322 50.3595 94.1055 62.6782 62.9998 62.6782C31.894 62.6782 6.67773 50.3595 6.67773 35.1636V49.8363C6.67773 65.0322 31.894 77.351 62.9998 77.351C94.1055 77.351 119.322 65.0322 119.322 49.8363V35.1636Z",fill:"#2E2E2E",fillOpacity:"0.9"}),f.jsx("path",{d:"M119.322 35.1636C119.322 50.3595 94.1055 62.6782 62.9998 62.6782C31.894 62.6782 6.67773 50.3595 6.67773 35.1636M119.322 35.1636C119.322 19.9677 94.1055 7.64893 62.9998 7.64893C31.894 7.64893 6.67773 19.9677 6.67773 35.1636M119.322 35.1636V49.8363C119.322 65.0322 94.1055 77.351 62.9998 77.351C31.894 77.351 6.67773 65.0322 6.67773 49.8363V35.1636",stroke:"#424242"}),f.jsx("path",{d:"M63.0002 0.968262C28.5152 0.968262 0.55957 15.6484 0.55957 33.7573V51.2428C0.55957 69.3517 28.5152 84.0319 63.0002 84.0319C97.4853 84.0319 125.441 69.3517 125.441 51.2428V33.7573C125.441 15.6484 97.4853 0.968262 63.0002 0.968262Z",stroke:"#707070"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M74.9374 21.357C76.2127 20.7291 78.2804 20.7291 79.5557 21.357L90.8129 26.8997C92.0882 27.5276 92.0882 28.5458 90.8129 29.1737L83.1638 32.9399C81.8885 33.5678 79.8207 33.5678 78.5454 32.9399L75.8033 31.5898L68.3324 35.2682L64.1502 39.696C63.8908 39.481 63.6138 39.2568 63.3231 39.0227L63.1495 38.883C62.2893 38.1914 61.2677 37.3701 60.6254 36.6376C60.5446 36.5456 60.4618 36.4463 60.3812 36.3407C60.1669 36.3011 59.9652 36.2603 59.7782 36.2205C58.2906 35.9043 56.6225 35.4013 55.2179 34.9777L54.9342 34.8922C54.4589 34.7491 54.0034 34.6127 53.5666 34.4849L62.5594 32.4258L70.0304 28.7473L67.2882 27.3972C66.0129 26.7692 66.0129 25.7512 67.2882 25.1232L74.9374 21.357ZM53.5666 34.4849C53.5666 34.4849 53.5666 34.4849 53.5666 34.4849L46.1603 36.1808L47.516 36.8483C48.7913 37.4762 48.7912 38.4943 47.516 39.1222L39.8668 42.8884C38.5916 43.5163 36.5238 43.5164 35.2485 42.8884L23.9913 37.3457C22.7159 36.7177 22.716 35.6996 23.9913 35.0717L31.6404 31.3055C32.9156 30.6776 34.9834 30.6776 36.2587 31.3055L38.5358 32.4267C39.6899 31.9483 40.9309 31.4611 42.153 31.0313C43.6354 30.5099 45.4001 29.9605 47.091 29.683C49.7278 29.2502 52.3729 29.7072 53.9892 30.0537C55.8019 30.4425 57.6745 31.0055 59.1934 31.4628C60.6081 31.8887 61.6949 32.2154 62.5594 32.4258L53.5666 34.4849ZM46.1603 36.1808L53.5666 34.4849C52.5189 34.1784 51.5786 33.9213 50.7293 33.7392C49.9958 33.5819 49.6114 33.5441 49.4794 33.5326C48.964 33.6384 48.0924 33.8823 46.8983 34.3023C46.0703 34.5936 45.1981 34.9293 44.3325 35.2808L46.1603 36.1808ZM64.1502 39.696L68.3324 35.2682C68.7598 35.6939 69.4232 36.229 70.2883 36.9256C71.2171 37.6735 72.3605 38.5954 73.15 39.488C73.8539 40.2838 74.7818 41.5862 73.9029 42.8844C73.3394 43.717 72.2235 44.5859 71.1648 45.3159C70.2916 45.9175 69.3021 46.5286 68.3305 47.0968L70.6077 48.218C71.8829 48.8459 71.8829 49.864 70.6077 50.4919L62.9585 54.2582C61.6833 54.8861 59.6154 54.8861 58.3402 54.2582L47.083 48.7154C45.8077 48.0875 45.8077 47.0694 47.083 46.4415L54.7321 42.6752C56.0074 42.0474 58.0751 42.0473 59.3505 42.6752L60.7062 43.3428L64.1502 39.696ZM64.1502 39.696L60.7062 43.3428L62.5339 44.2427C63.2478 43.8165 63.9298 43.3871 64.5213 42.9794C65.3742 42.3914 65.8695 41.9622 66.0846 41.7085C66.0613 41.6436 65.9844 41.4543 65.6649 41.0931C65.295 40.6749 64.773 40.212 64.1502 39.696Z",fill:"#A9A9A9"})]}),sb=e=>f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[f.jsx("path",{d:"M6.53918 9.32122C6.34324 9.51508 6.02724 9.51338 5.83338 9.31744C5.63952 9.1215 5.6412 8.80551 5.83713 8.61164L10.1958 4.29931C10.7996 3.70186 10.8017 2.72852 10.2041 2.12839L10.1899 2.11428C9.58767 1.52481 8.62251 1.53208 8.0292 2.13052L2.29396 7.91536C2.0999 8.1111 1.78388 8.11246 1.58813 7.9184C1.39239 7.72433 1.39103 7.40831 1.58509 7.21257L7.32036 1.42774C8.30005 0.439581 9.89369 0.427613 10.8881 1.40094L10.9116 1.42425C11.4942 2.00929 11.7316 2.80913 11.6232 3.56922C12.389 3.44866 13.1999 3.67918 13.7961 4.26273C14.804 5.24929 14.8147 6.86824 13.82 7.86808L8.5531 13.1619C8.50045 13.2148 8.50024 13.3002 8.55263 13.3534L9.65448 14.4717C9.84794 14.668 9.8456 14.984 9.64925 15.1775C9.45291 15.3709 9.13691 15.3686 8.94345 15.1723L7.84163 14.054C7.40505 13.6109 7.40677 12.8988 7.8455 12.4579L13.1124 7.16405C13.7161 6.55727 13.7095 5.57478 13.0979 4.97606C12.4925 4.38347 11.4942 4.40725 10.8978 5.00886L6.53918 9.32122Z",fill:"currentColor"}),f.jsx("path",{d:"M8.84622 2.75411C9.04697 2.56188 9.36555 2.56381 9.56395 2.76076C9.76234 2.95771 9.76658 3.27625 9.57582 3.4784L9.56661 3.48794L5.25912 7.82701C4.67023 8.42022 4.672 9.37798 5.26305 9.96904C5.85624 10.5622 6.81818 10.5615 7.41052 9.9675L11.6299 5.73599L11.6395 5.72671C11.8406 5.53493 12.1592 5.53756 12.3572 5.73496C12.5583 5.93548 12.5587 6.26104 12.3582 6.46214L8.13877 10.6937C7.14498 11.6903 5.53105 11.6915 4.53584 10.6963C3.5442 9.70461 3.54127 8.09774 4.52928 7.10248L8.83677 2.76342L8.84622 2.75411Z",fill:"currentColor"})]}),T2r=e=>f.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:f.jsx("path",{d:"M1.5 8.5V8C1.5 7.60218 1.65804 7.22064 1.93934 6.93934C2.22064 6.65804 2.60218 6.5 3 6.5H13C13.3978 6.5 13.7794 6.65804 14.0607 6.93934C14.342 7.22064 14.5 7.60218 14.5 8V8.5M8.70667 4.20667L7.29333 2.79333C7.20048 2.70037 7.09022 2.62661 6.96886 2.57628C6.84749 2.52595 6.71739 2.50003 6.586 2.5H3C2.60218 2.5 2.22064 2.65804 1.93934 2.93934C1.65804 3.22064 1.5 3.60218 1.5 4V12C1.5 12.3978 1.65804 12.7794 1.93934 13.0607C2.22064 13.342 2.60218 13.5 3 13.5H13C13.3978 13.5 13.7794 13.342 14.0607 13.0607C14.342 12.7794 14.5 12.3978 14.5 12V6C14.5 5.60218 14.342 5.22064 14.0607 4.93934C13.7794 4.65804 13.3978 4.5 13 4.5H9.414C9.14887 4.49977 8.89402 4.39426 8.70667 4.20667Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})}),D2r=e=>f.jsxs("svg",{width:"126",height:"85",viewBox:"0 0 126 85",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[f.jsx("path",{d:"M119.322 35.1641C119.322 50.36 94.1055 62.6787 62.9998 62.6787C31.894 62.6787 6.67773 50.36 6.67773 35.1641V49.8368C6.67773 65.0327 31.894 77.3514 62.9998 77.3514C94.1055 77.3514 119.322 65.0327 119.322 49.8368V35.1641Z",fill:"#2E2E2E",fillOpacity:"0.9"}),f.jsx("path",{d:"M119.322 35.1641C119.322 50.36 94.1055 62.6787 62.9998 62.6787C31.894 62.6787 6.67773 50.36 6.67773 35.1641M119.322 35.1641C119.322 19.9681 94.1055 7.64941 62.9998 7.64941C31.894 7.64941 6.67773 19.9681 6.67773 35.1641M119.322 35.1641V49.8368C119.322 65.0327 94.1055 77.3514 62.9998 77.3514C31.894 77.3514 6.67773 65.0327 6.67773 49.8368V35.1641",stroke:"#424242"}),f.jsx("path",{d:"M63.0002 0.96875C28.5152 0.96875 0.55957 15.6489 0.55957 33.7578V51.2433C0.55957 69.3522 28.5152 84.0323 63.0002 84.0323C97.4853 84.0323 125.441 69.3522 125.441 51.2433V33.7578C125.441 15.6489 97.4853 0.96875 63.0002 0.96875Z",stroke:"#707070"}),f.jsx("path",{d:"M51.5215 39.9726C50.5464 40.4477 48.9738 40.4435 48.009 39.9634C47.0442 39.4833 47.0526 38.709 48.0277 38.2339L69.7191 27.6672C72.7243 26.2032 72.7347 23.8181 69.7605 22.3476L69.6898 22.313C66.6927 20.8686 61.8895 20.8864 58.9368 22.3528L30.3946 36.5278C29.4288 37.0074 27.8561 37.0107 26.882 36.5352C25.9078 36.0597 25.901 35.2853 26.8668 34.8057L55.4092 20.6308C60.2847 18.2094 68.2157 18.1801 73.1645 20.5651L73.2814 20.6222C76.1808 22.0558 77.3624 24.0157 76.8227 25.8782C80.6339 25.5828 84.6694 26.1476 87.6364 27.5775C92.6525 29.9949 92.7059 33.962 87.7554 36.4119L61.5441 49.3836C61.282 49.5133 61.281 49.7227 61.5417 49.853L67.0252 52.5932C67.988 53.0743 67.9763 53.8486 66.9992 54.3226C66.0221 54.7966 64.4495 54.7909 63.4867 54.3098L58.0033 51.5695C55.8306 50.4838 55.8392 48.7391 58.0226 47.6585L84.2339 34.6868C87.2382 33.2 87.2058 30.7925 84.1617 29.3254C81.1488 27.8734 76.1811 27.9317 73.2127 29.4058L51.5215 39.9726Z",fill:"#A9A9A9"}),f.jsx("path",{d:"M63.0028 23.8809C64.0019 23.4098 65.5873 23.4146 66.5747 23.8972C67.562 24.3798 67.5831 25.1603 66.6338 25.6556L66.5879 25.679L45.1511 36.3113C42.2204 37.7649 42.2292 40.1117 45.1707 41.56C48.1228 43.0135 52.91 43.0118 55.8578 41.5563L76.8564 31.1875L76.9037 31.1648C77.9049 30.6949 79.4903 30.7013 80.4755 31.185C81.4763 31.6764 81.4785 32.4741 80.4806 32.9669L59.4821 43.3356C54.5363 45.7777 46.5044 45.7806 41.5516 43.342C36.6166 40.9121 36.602 36.9747 41.519 34.5359L62.9558 23.9037L63.0028 23.8809Z",fill:"#A9A9A9"})]}),A2r=e=>f.jsxs("svg",{width:"126",height:"85",viewBox:"0 0 126 85",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[f.jsx("path",{d:"M119.322 35.1641C119.322 50.36 94.1055 62.6787 62.9998 62.6787C31.894 62.6787 6.67773 50.36 6.67773 35.1641V49.8368C6.67773 65.0327 31.894 77.3514 62.9998 77.3514C94.1055 77.3514 119.322 65.0327 119.322 49.8368V35.1641Z",fill:"#2E2E2E",fillOpacity:"0.9"}),f.jsx("path",{d:"M119.322 35.1641C119.322 50.36 94.1055 62.6787 62.9998 62.6787C31.894 62.6787 6.67773 50.36 6.67773 35.1641M119.322 35.1641C119.322 19.9681 94.1055 7.64941 62.9998 7.64941C31.894 7.64941 6.67773 19.9681 6.67773 35.1641M119.322 35.1641V49.8368C119.322 65.0327 94.1055 77.3514 62.9998 77.3514C31.894 77.3514 6.67773 65.0327 6.67773 49.8368V35.1641",stroke:"#424242"}),f.jsx("path",{d:"M63.0002 0.96875C28.5152 0.96875 0.55957 15.6489 0.55957 33.7578V51.2433C0.55957 69.3522 28.5152 84.0323 63.0002 84.0323C97.4853 84.0323 125.441 69.3522 125.441 51.2433V33.7578C125.441 15.6489 97.4853 0.96875 63.0002 0.96875Z",stroke:"#707070"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M95.8997 32.6647C98.4806 33.9355 98.4744 36.0012 95.8997 37.2689L89.6657 40.3384C87.0848 41.6091 82.8892 41.6061 80.3146 40.3384L74.0805 37.2689C71.4996 35.9981 71.5059 33.9324 74.0805 32.6647L80.3146 29.5952C82.8955 28.3244 87.091 28.3275 89.6657 29.5952L95.8997 32.6647ZM74.0805 21.9215C76.6614 23.1923 76.6552 25.258 74.0805 26.5257L67.8465 29.5952C65.2656 30.866 61.0701 30.8629 58.4954 29.5952L52.2613 26.5257C49.6804 25.255 49.6867 23.1892 52.2613 21.9215L58.4954 18.852C61.0763 17.5813 65.2718 17.5843 67.8465 18.852L74.0805 21.9215ZM74.0805 43.4079C76.6614 44.6786 76.6552 46.7444 74.0805 48.0121L67.8465 51.0816C65.2656 52.3523 61.0701 52.3493 58.4954 51.0816L52.2613 48.0121C49.6804 46.7413 49.6867 44.6756 52.2613 43.4079L58.4954 40.3384C61.0763 39.0676 65.2718 39.0707 67.8465 40.3384L74.0805 43.4079ZM52.2613 32.6647C54.8422 33.9355 54.836 36.0012 52.2613 37.2689L46.0273 40.3384C43.4464 41.6091 39.2509 41.6061 36.6762 40.3384L30.4422 37.2689C27.8613 35.9981 27.8675 33.9324 30.4422 32.6647L36.6762 29.5952C39.2571 28.3244 43.4526 28.3275 46.0273 29.5952L52.2613 32.6647Z",fill:"#A9A9A9"})]});function F4(e){return f.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",xmlns:"http://www.w3.org/2000/svg",...e,children:[f.jsx("rect",{width:"16",height:"16",x:"4",y:"4",rx:"2"}),f.jsx("rect",{width:"6",height:"6",x:"9",y:"9",rx:"1"}),f.jsx("path",{d:"M15 2v2"}),f.jsx("path",{d:"M15 20v2"}),f.jsx("path",{d:"M2 15h2"}),f.jsx("path",{d:"M2 9h2"}),f.jsx("path",{d:"M20 15h2"}),f.jsx("path",{d:"M20 9h2"}),f.jsx("path",{d:"M9 2v2"}),f.jsx("path",{d:"M9 20v2"})]})}const P2r={warning:"bg-accent6Darker border-accent6/30 text-accent6",destructive:"bg-accent2Darker border-accent2/30 text-accent2",info:"bg-accent5Darker border-accent5/30 text-accent5"},$2r={warning:I0,destructive:Hx,info:sl},Fv=({children:e,variant:t="destructive",className:r})=>{const n=$2r[t];return f.jsx("div",{className:re(P2r[t],"p-3 rounded-md border shadow-sm",kr.all,"animate-in fade-in-0 slide-in-from-top-2 duration-200",r),children:f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx(qe,{className:"mt-0.5 flex-shrink-0",children:f.jsx(n,{})}),f.jsx("div",{className:"text-neutral4",children:e})]})})},Lv=({children:e,as:t="h5"})=>f.jsx(Ze,{as:t,variant:"ui-md",className:"font-semibold",children:e}),iT=({children:e,as:t="p"})=>f.jsx(Ze,{as:t,variant:"ui-sm",children:e}),I2r={default:"text-neutral3 bg-surface4",success:"text-accent1 bg-accent1Dark",error:"text-accent2 bg-accent2Dark",info:"text-accent5 bg-accent5Dark",warning:"text-accent6 bg-accent6Dark"},N2r={default:"text-neutral3",success:"text-accent1",error:"text-accent2",info:"text-accent5",warning:"text-accent6"},Xt=({icon:e,variant:t="default",className:r,children:n,...s})=>f.jsxs("div",{className:re("font-mono text-ui-sm gap-1 h-badge-default inline-flex items-center rounded-md shrink-0",kr.colors,e?"pl-1 pr-1.5":"px-1.5",t==="default"&&e?"bg-surface4 text-neutral5":I2r[t],r),...s,children:[e&&f.jsx("span",{className:N2r[t],children:f.jsx(qe,{children:e})}),n]}),R2r=()=>{const e=Kr(({part:i})=>i),[t,r]=E.useState(!1),n=e.text||"",s=e.metadata||{};if(s?.status==="tripwire")return f.jsx(x2r,{reason:n,tripwire:s.tripwire});if(s?.status==="warning")return f.jsxs(Fv,{variant:"warning",children:[f.jsx(Lv,{as:"h5",children:"Warning"}),f.jsx(iT,{as:"p",children:n})]});if(s?.status==="error")return f.jsxs(Fv,{variant:"destructive",children:[f.jsx(Lv,{as:"h5",children:"Error"}),f.jsx(iT,{as:"p",children:n})]});if(s?.mode==="network"&&s?.completionResult)return f.jsxs("div",{className:"mb-2 space-y-2",children:[f.jsxs("button",{onClick:()=>r(i=>!i),className:"flex items-center gap-2",children:[f.jsx(qe,{children:f.jsx(HN,{className:re("transition-all",t?"rotate-90":"rotate-180")})}),f.jsxs(Xt,{variant:"info",icon:f.jsx(gut,{}),children:[t?"Show":"Hide"," completion check"]})]}),!t&&f.jsxs(Fv,{variant:"info",children:[f.jsx(Lv,{as:"h5",children:s.completionResult?.passed?"Complete":"Not Complete"}),f.jsx(bxe,{})]})]});try{const i=n.trim();if(i.startsWith("__ERROR__:")){const o=i.substring(10);return f.jsxs("div",{className:"flex items-start gap-3 p-4 rounded-lg bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-900/50",children:[f.jsx(Hx,{className:"w-5 h-5 text-red-500 dark:text-red-400 mt-0.5 flex-shrink-0"}),f.jsxs("div",{className:"flex-1",children:[f.jsx("p",{className:"text-sm font-medium text-red-800 dark:text-red-200 mb-1",children:"Error"}),f.jsx("p",{className:"text-sm text-red-700 dark:text-red-300",children:o})]})]})}else if(i.startsWith("Error:")){const o=i.substring(6).trim();return f.jsxs("div",{className:"flex items-start gap-3 p-4 rounded-lg bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-900/50",children:[f.jsx(Hx,{className:"w-5 h-5 text-red-500 dark:text-red-400 mt-0.5 flex-shrink-0"}),f.jsxs("div",{className:"flex-1",children:[f.jsx("p",{className:"text-sm font-medium text-red-800 dark:text-red-200 mb-1",children:"Error"}),f.jsx("p",{className:"text-sm text-red-700 dark:text-red-300",children:o})]})]})}return f.jsx(bxe,{})}catch{return f.jsxs("div",{className:"flex items-start gap-3 p-4 rounded-lg bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-900/50",children:[f.jsx(Hx,{className:"w-5 h-5 text-red-500 dark:text-red-400 mt-0.5 flex-shrink-0"}),f.jsxs("div",{className:"flex-1",children:[f.jsx("p",{className:"text-sm font-medium text-red-800 dark:text-red-200 mb-1",children:"Error"}),f.jsx("p",{className:"text-sm text-red-700 dark:text-red-300",children:String(n)})]})]})}};function np({text:e,copyMessage:t="Copied to clipboard!"}){const[r,n]=E.useState(!1),s=E.useRef(null),i=E.useCallback(()=>{navigator.clipboard.writeText(e).then(()=>{mn.success(t),n(!0),s.current&&(clearTimeout(s.current),s.current=null),s.current=setTimeout(()=>{n(!1)},2e3)}).catch(()=>{mn.error("Failed to copy to clipboard.")})},[e,t]);return{isCopied:r,handleCopy:i}}function Uf({content:e,copyMessage:t,tooltip:r="Copy to clipboard",iconSize:n="default",className:s}){const[i,o]=E.useState(!1),{handleCopy:a}=np({text:e,copyMessage:t}),l=()=>{a(),o(!0),setTimeout(()=>o(!1),2e3)};return f.jsxs(Ss,{children:[f.jsx(Os,{asChild:!0,children:f.jsx("button",{onClick:l,type:"button",className:re("rounded-lg p-1",kr.all,jD.visible,"hover:bg-surface4",s),children:f.jsx(qe,{className:re("text-neutral3",kr.all,"hover:text-neutral6",i&&"text-accent1"),size:n,children:i?f.jsx(lu,{}):f.jsx(cu,{})})})}),f.jsx(is,{children:i?"Copied!":r})]})}const wy=()=>E.useMemo(()=>{const e=rX({settings:{fontFamily:"var(--geist-mono)",fontSize:"0.8rem",lineHighlight:"transparent",gutterBackground:"transparent",gutterForeground:"#939393",background:"transparent"},styles:[{tag:[Y.className,Y.propertyName]}]}),t=rt.theme({".cm-editor":{colorScheme:"dark",backgroundColor:"transparent"},".cm-lineNumbers .cm-gutterElement":{color:"#939393"}});return[e,t]},[]),Kc=({data:e,value:t,onChange:r,showCopyButton:n=!0,className:s,...i})=>{const o=wy(),a=e?JSON.stringify(e,null,2):t??"";return f.jsxs("div",{className:re("rounded-md bg-surface4 p-1 font-mono relative",s),...i,children:[n&&f.jsx(Uf,{content:a,className:"absolute top-2 right-2 z-20"}),f.jsx(fc,{value:a,theme:o,extensions:[oc],onChange:r,"aria-label":"Code editor"})]})};async function M2r(e,t){const{codeToTokens:r,bundledLanguages:n}=await G(async()=>{const{codeToTokens:i,bundledLanguages:o}=await import("./index-DHf5pZzx.js");return{codeToTokens:i,bundledLanguages:o}},__vite__mapDeps([122,95]),import.meta.url);if(!(t in n))return null;const{tokens:s}=await r(e,{lang:t,defaultColor:!1,themes:{light:"github-light",dark:"github-dark"}});return s}const X6=({children:e,initialCollapsed:t=!0,icon:r,title:n,collapsible:s=!0,extraInfo:i,"data-testid":o})=>{const[a,l]=E.useState(t);return E.useEffect(()=>{l(t)},[t]),f.jsxs("div",{className:"mb-4","data-testid":o,children:[f.jsxs("div",{className:"flex flex-row gap-2 items-center justify-between",children:[f.jsxs("button",{onClick:s?()=>l(c=>!c):void 0,className:"flex items-center gap-2 disabled:cursor-not-allowed",disabled:!s,type:"button",children:[f.jsx(qe,{children:f.jsx(HN,{className:re("transition-all",a?"rotate-90":"rotate-180")})}),f.jsx(Xt,{icon:r,children:n})]}),i]}),!a&&f.jsx("div",{className:"pt-2",children:f.jsx("div",{className:"p-4 rounded-lg bg-surface2 flex flex-col gap-4",children:e})})]})},qo=SX,j2r=x$e,F2r=OX,AZe=E.forwardRef(({className:e,...t},r)=>f.jsx(b5,{ref:r,className:re("fixed inset-0 z-50 bg-overlay backdrop-blur-sm","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));AZe.displayName=b5.displayName;const So=E.forwardRef(({className:e,children:t,...r},n)=>f.jsxs(F2r,{children:[f.jsx(AZe,{}),f.jsxs(x5,{ref:n,className:re("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%]","gap-4 border border-border1 bg-surface3 py-6 shadow-dialog rounded-lg","duration-slow","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%]",e),...r,children:[t,f.jsxs(O5,{className:re("absolute right-4 top-4 rounded-md p-1","text-neutral3 hover:text-neutral6 hover:bg-surface4","transition-all duration-normal ease-out-custom","focus:outline-none focus:ring-1 focus:ring-accent1 focus:shadow-focus-ring","disabled:pointer-events-none"),children:[f.jsx(Ia,{className:"h-4 w-4"}),f.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));So.displayName=x5.displayName;const Oo=({className:e,...t})=>f.jsx("div",{className:re("flex flex-col space-y-1.5 text-center sm:text-left border-b border-border1 pb-4 px-6",e),...t});Oo.displayName="DialogHeader";const _o=({className:e,...t})=>f.jsx("div",{className:re("overflow-y-auto px-6 max-h-[50vh]",e),...t});_o.displayName="DialogBody";const ko=E.forwardRef(({className:e,...t},r)=>f.jsx(w5,{ref:r,className:re("text-lg font-semibold leading-none tracking-tight",e),...t}));ko.displayName=w5.displayName;const Eo=E.forwardRef(({className:e,...t},r)=>f.jsx(S5,{ref:r,className:re("sr-only",e),...t}));Eo.displayName=S5.displayName;const L2r=({selectionReason:e,open:t,onOpenChange:r,input:n})=>{let s=null;if(n)try{s=typeof n=="object"?f.jsx(Kc,{data:n}):f.jsx(Kc,{data:JSON.parse(n)})}catch{s=f.jsx("pre",{className:"whitespace-pre-wrap",children:n})}return f.jsx(qo,{open:t,onOpenChange:r,children:f.jsxs(So,{children:[f.jsxs(Oo,{children:[f.jsx(ko,{children:"Agent Network Metadata"}),f.jsx(Eo,{children:"View the metadata of the agent's network choice."})]}),f.jsxs(_o,{className:"space-y-4",children:[f.jsxs("div",{className:"space-y-2",children:[f.jsx(Ze,{className:"text-neutral3",children:"Selection Reason"}),f.jsx("div",{className:"text-neutral6 text-ui-md",children:e})]}),s&&f.jsxs("div",{className:"space-y-2",children:[f.jsx(Ze,{className:"text-neutral3",children:"Input"}),f.jsx("div",{className:"text-neutral6 text-ui-md",children:s})]})]})]})})},dte=({selectionReason:e,input:t})=>{const[r,n]=E.useState(!1);return f.jsxs(f.Fragment,{children:[f.jsx(Sd,{tooltip:"Show selection reason",side:"top",onClick:()=>n(s=>!s),children:f.jsx(eft,{className:"text-neutral3 size-5"})}),f.jsx(L2r,{selectionReason:e||"",open:r,onOpenChange:n,input:t})]})},PZe=E.createContext(void 0);function z2r({children:e,approveToolcall:t,declineToolcall:r,approveToolcallGenerate:n,declineToolcallGenerate:s,approveNetworkToolcall:i,declineNetworkToolcall:o,isRunning:a,toolCallApprovals:l,networkToolCallApprovals:c}){return f.jsx(PZe.Provider,{value:{approveToolcall:t,declineToolcall:r,approveToolcallGenerate:n,declineToolcallGenerate:s,approveNetworkToolcall:i,declineNetworkToolcall:o,isRunning:a,toolCallApprovals:l,networkToolCallApprovals:c},children:e})}function B2r(){const e=E.useContext(PZe);if(!e)throw new Error("useToolCall must be used within a ToolCallProvider");return e}const fte=({toolCalled:e,toolCallId:t,toolApprovalMetadata:r,toolName:n,isNetwork:s,isGenerateMode:i})=>{const{approveToolcall:o,declineToolcall:a,approveToolcallGenerate:l,declineToolcallGenerate:c,isRunning:u,toolCallApprovals:d,approveNetworkToolcall:p,declineNetworkToolcall:m,networkToolCallApprovals:g}=B2r(),v=()=>{s?p(n,r?.runId):i?l(t):o(t)},b=()=>{s?m(n,r?.runId):i?c(t):a(t)},w=s?g?.[r?.runId?`${r.runId}-${n}`:n]?.status:d?.[t]?.status;return r&&!e?f.jsxs("div",{children:[f.jsx("p",{className:"font-medium pb-2",children:"Approval required"}),f.jsxs("div",{className:"flex gap-2 items-center",children:[f.jsxs(Je,{onClick:v,disabled:u||!!w,className:w==="approved"?"!text-accent1":"",children:[f.jsx(qe,{children:f.jsx(lu,{})}),"Approve"]}),f.jsxs(Je,{onClick:b,disabled:u||!!w,className:w==="declined"?"!text-accent2":"",children:[f.jsx(qe,{children:f.jsx(Ia,{})}),"Decline"]})]})]}):null},V2r=({toolName:e,args:t,result:r,metadata:n,toolOutput:s,toolCallId:i,toolApprovalMetadata:o,suspendPayload:a,isNetwork:l,toolCalled:c})=>{let u=null;try{const{__mastraMetadata:b,...w}=typeof t=="object"?t:JSON.parse(t);u=f.jsx(Kc,{data:w,"data-testid":"tool-args"})}catch{u=f.jsx("pre",{className:"whitespace-pre bg-surface4 p-4 rounded-md overflow-x-auto",children:t})}let d=typeof r=="string"?f.jsx("pre",{className:"whitespace-pre bg-surface4 p-4 rounded-md overflow-x-auto",children:r}):f.jsx(Kc,{data:r,"data-testid":"tool-result"}),p=typeof a=="string"?f.jsx("pre",{className:"whitespace-pre bg-surface4 p-4 rounded-md overflow-x-auto",children:a}):f.jsx(Kc,{data:a,"data-testid":"tool-suspend-payload"});const m=n?.mode==="network"?n.selectionReason:void 0,g=n?.mode==="network"?n.agentInput:void 0,v=c??(r||s.length>0);return f.jsx(X6,{"data-testid":"tool-badge",icon:f.jsx(Cu,{className:"text-accent6"}),title:e,extraInfo:n?.mode==="network"&&f.jsx(dte,{selectionReason:m||"",input:g}),initialCollapsed:!(o??a),children:f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("p",{className:"font-medium pb-2",children:"Tool arguments"}),u]}),p!==void 0&&a&&f.jsxs("div",{children:[f.jsx("p",{className:"font-medium pb-2",children:"Tool suspend payload"}),p]}),d!==void 0&&r&&f.jsxs("div",{children:[f.jsx("p",{className:"font-medium pb-2",children:"Tool result"}),d]}),s.length>0&&f.jsxs("div",{children:[f.jsx("p",{className:"font-medium pb-2",children:"Tool output"}),f.jsx("div",{className:"h-40 overflow-y-auto",children:f.jsx(Kc,{data:s,"data-testid":"tool-output"})})]}),f.jsx(fte,{toolCalled:v,toolCallId:i,toolApprovalMetadata:o,toolName:e,isNetwork:l,isGenerateMode:n?.mode==="generate"})]})})};function JZ(e){const t={},r=e.context||{};Object.entries(r).forEach(([o,a])=>{if(o!=="input"&&"status"in a){const l=a,c=l.status==="failed"&&l.tripwire!==void 0;t[o]={status:l.status,output:"output"in l?l.output:void 0,payload:"payload"in l?l.payload:void 0,suspendPayload:"suspendPayload"in l?l.suspendPayload:void 0,suspendOutput:"suspendOutput"in l?l.suspendOutput:void 0,resumePayload:"resumePayload"in l?l.resumePayload:void 0,error:c?void 0:"error"in l?l.error:void 0,tripwire:c?l.tripwire:void 0,startedAt:"startedAt"in l?l.startedAt:Date.now(),endedAt:"endedAt"in l?l.endedAt:void 0,suspendedAt:"suspendedAt"in l?l.suspendedAt:void 0,resumedAt:"resumedAt"in l?l.resumedAt:void 0}}});const n=Object.entries(t).flatMap(([o,a])=>{if(a?.status==="suspended"){const l=a?.suspendPayload?.__workflow_meta?.path;return l?[[o,...l]]:[[o]]}return[]}),s=n?.[0]?.[0],i=s?t[s]?.suspendPayload:void 0;return{input:r.input,steps:t,status:e.status,...e.status==="success"?{result:e.result}:{},...e.status==="failed"?{error:e.error}:{},...e.status==="suspended"?{suspended:n,suspendPayload:i}:{},...e.status==="tripwire"&&e.tripwire?{tripwire:{reason:e.tripwire.reason,retry:e.tripwire.retry,metadata:e.tripwire.metadata,processorId:e.tripwire.processorId}}:{}}}const Qn=NW()(E7t(e=>({requestContext:{},setRequestContext:t=>e({requestContext:t})}),{name:"mastra-playground-store"})),Y6=()=>{const e=rr(),{requestContext:t}=Qn();return ds({queryKey:["workflows",t],queryFn:async()=>{const r=await e.listWorkflows(t);return Object.fromEntries(Object.entries(r).filter(([n,s])=>!s.isProcessorWorkflow))}})},U2r={duration:5e3,cancel:{label:f.jsx(Ia,{size:"14"}),onClick:()=>{}},unstyled:!0,classNames:{toast:"bg-surface2 w-full backdrop-accent h-auto rounded-lg gap-2 border border p-4 flex items-start justify-between rounded-lg pointer-events-auto",title:"text-white font-semibold text-xs mb-1 -mt-1",description:"!text-text text-sm !font-light",cancelButton:"!bg-transparent !p-0 flex items-center justify-center !text-text opacity-50 hover:opacity-100 ml-4 shrink-0",actionButton:"!bg-white flex items-center justify-center font-medium !text-black order-last hover:opacity-80"}};function uc(e){const{classNames:t,...r}=U2r,{classNames:n,...s}=e||{};return{...r,classNames:{...t,title:re(t?.title,n?.title),toast:re(t?.toast,n?.toast),cancelButton:re(t?.cancelButton,n?.cancelButton),actionButton:re(t?.actionButton,n?.actionButton),description:re(t?.description,n?.description)},...s}}const Js=(e,t={})=>{if(Array.isArray(e))return e.forEach(r=>mn(r,uc(t)));if(me.isValidElement(e))return mn(e,uc(t));if(typeof e=="string")return mn(e,uc(t));throw new Error("Invalid message type")};Js.success=(e,t={})=>{const r={...t,classNames:{...t.classNames,toast:re("bg-green-950/20 border-green-900/50 dark:bg-green-950/20 dark:border-green-900/50",t.classNames?.toast),title:re("text-green-200 dark:text-green-200",t.classNames?.title),description:re("text-green-300 dark:text-green-300",t.classNames?.description)}};switch(typeof e){case"string":return mn.success(e,uc(r));case"object":return e.forEach(n=>mn.success(n,uc(r)))}};Js.error=(e,t={})=>{const r={...t,classNames:{...t.classNames,toast:re("bg-red-950/20 border-red-900/50 dark:bg-red-950/20 dark:border-red-900/50",t.classNames?.toast),title:re("text-red-200 dark:text-red-200",t.classNames?.title),description:re("text-red-300 dark:text-red-300",t.classNames?.description)}};switch(typeof e){case"string":return mn.error(e,uc(r));case"object":return e.forEach(n=>mn.error(n,uc(r)))}};Js.warning=(e,t={})=>{const r={...t,classNames:{...t.classNames,toast:re("bg-yellow-950/20 border-yellow-900/50 dark:bg-yellow-950/20 dark:border-yellow-900/50",t.classNames?.toast),title:re("text-yellow-200 dark:text-yellow-200",t.classNames?.title),description:re("text-yellow-300 dark:text-yellow-300",t.classNames?.description)}};switch(typeof e){case"string":return mn.warning(e,uc(r));case"object":return e.forEach(n=>mn.warning(n,uc(r)))}};Js.info=(e,t={})=>{const r={...t,classNames:{...t.classNames,toast:re("bg-blue-950/20 border-blue-900/50 dark:bg-blue-950/20 dark:border-blue-900/50",t.classNames?.toast),title:re("text-blue-200 dark:text-blue-200",t.classNames?.title),description:re("text-blue-300 dark:text-blue-300",t.classNames?.description)}};switch(typeof e){case"string":return mn.info(e,uc(r));case"object":return e.forEach(n=>mn.info(n,uc(r)))}};Js.custom=(e,t={})=>mn(e,uc(t));Js.dismiss=e=>{e&&mn.dismiss(e)};Js.promise=({myPromise:e,loadingMessage:t,successMessage:r,errorMessage:n,onSuccess:s,onError:i,options:o={}})=>mn.promise(e,{loading:t??"Loading...",success:a=>(s?.(a),r),error:a=>(i?.(a),n||a?.message||"Error..."),...uc(o)});function Q2r({entityId:e,entityType:t}){const[r,n]=E.useState(void 0),s=`tracing-options-${t}:${e}`;return E.useEffect(()=>{try{const a=localStorage.getItem(s);if(a){const l=JSON.parse(a);n(l||void 0)}}catch(a){console.error(a)}},[s]),{settings:r,setSettings:a=>{n(l=>({...l,...a})),localStorage.setItem(s,JSON.stringify({...a,entityId:e,entityType:t}))},resetAll:()=>{n(void 0),localStorage.removeItem(s)},entityType:t}}const $Ze=E.createContext({setSettings:()=>{},resetAll:()=>{},settings:void 0,entityType:void 0}),IZe=({children:e,entityId:t,entityType:r})=>{const n=Q2r({entityId:t,entityType:r});return f.jsx($Ze.Provider,{value:n,children:e})},pte=()=>E.useContext($Ze),Z2r=()=>{const e=rr(),t=bs({mutationFn:async({workflowId:s,prevRunId:i})=>{try{const o=e.getWorkflow(s),{runId:a}=await o.createRun({runId:i});return{runId:a}}catch(o){throw console.error("Error creating workflow run:",o),o}}}),r=bs({mutationFn:async({workflowId:s,runId:i,input:o,requestContext:a})=>{try{const l=new al;Object.entries(a).forEach(([d,p])=>{l.set(d,p)}),await(await e.getWorkflow(s).createRun({runId:i})).start({inputData:o||{},requestContext:l})}catch(l){throw console.error("Error starting workflow run:",l),l}}}),n=bs({mutationFn:async({workflowId:s,runId:i,input:o,requestContext:a})=>{try{const l=new al;return Object.entries(a).forEach(([p,m])=>{l.set(p,m)}),await(await e.getWorkflow(s).createRun({runId:i})).startAsync({inputData:o||{},requestContext:l})}catch(l){throw console.error("Error starting workflow run:",l),l}}});return{startWorkflowRun:r,createWorkflowRun:t,startAsyncWorkflowRun:n}},q2r=({debugMode:e})=>{const t=rr(),{settings:r}=pte(),[n,s]=E.useState({}),[i,o]=E.useState(!1),a=E.useRef(null),l=E.useRef(null),c=E.useRef(null),u=E.useRef(null),d=E.useRef(!0);E.useEffect(()=>(d.current=!0,()=>{if(d.current=!1,a.current){try{a.current.releaseLock()}catch{}a.current=null}if(l.current){try{l.current.releaseLock()}catch{}l.current=null}if(c.current){try{c.current.releaseLock()}catch{}c.current=null}if(u.current){try{u.current.releaseLock()}catch{}u.current=null}}),[]);const p=(O,k,C)=>{if(O instanceof TypeError)return;const T=O instanceof Error?O.message:k;Js.error(T),C?.(!1)},m=O=>{if(O.type==="workflow-finish"){const k=O.payload?.workflowStatus,C=O.payload?.metadata;if(s(T=>({...T,status:k})),k==="failed")throw new Error(C?.errorMessage||"Workflow execution failed")}},g=bs({mutationFn:async({workflowId:O,runId:k,inputData:C,initialState:T,requestContext:P,perStep:A})=>{if(a.current&&a.current.releaseLock(),!d.current)return;o(!0),s({input:C});const R=new al;Object.entries(P).forEach(([L,V])=>{R.set(L,V)});const Q=await(await t.getWorkflow(O).createRun({runId:k})).stream({inputData:C,initialState:T,requestContext:R,closeOnSuspend:!0,tracingOptions:r?.tracingOptions,perStep:A??e});if(!Q)return p(new Error("No stream returned"),"No stream returned",o);const U=Q.getReader();a.current=U;try{for(;d.current;){const{done:L,value:V}=await U.read();if(L)break;d.current&&(s(j=>pg(j,V)),V.type==="workflow-step-start"&&o(!0),V.type==="workflow-step-suspended"&&o(!1),V.type==="workflow-finish"&&m(V))}}catch(L){p(L,"Error streaming workflow")}finally{d.current&&o(!1),a.current&&(a.current.releaseLock(),a.current=null)}}}),v=bs({mutationFn:async({workflowId:O,runId:k,storeRunResult:C})=>{if(l.current&&l.current.releaseLock(),!d.current)return;if(o(!0),s(C||{}),C?.status==="suspended"){o(!1);return}const A=await(await t.getWorkflow(O).createRun({runId:k})).observeStream();if(!A)return p(new Error("No stream returned"),"No stream returned",o);const R=A.getReader();l.current=R;try{for(;d.current;){const{done:M,value:z}=await R.read();if(M)break;d.current&&(s(Q=>pg(Q,z)),z.type==="workflow-step-start"&&o(!0),z.type==="workflow-step-suspended"&&o(!1),z.type==="workflow-finish"&&m(z))}}catch(M){p(M,"Error observing workflow")}finally{d.current&&o(!1),l.current&&(l.current.releaseLock(),l.current=null)}}}),b=bs({mutationFn:async({workflowId:O,runId:k,step:C,resumeData:T,requestContext:P,perStep:A})=>{if(c.current&&c.current.releaseLock(),!d.current)return;o(!0);const R=t.getWorkflow(O),M=new al;Object.entries(P).forEach(([L,V])=>{M.set(L,V)});const Q=await(await R.createRun({runId:k})).resumeStream({step:C,resumeData:T,requestContext:M,tracingOptions:r?.tracingOptions,perStep:A??e});if(!Q)return p(new Error("No stream returned"),"No stream returned",o);const U=Q.getReader();c.current=U;try{for(;d.current;){const{done:L,value:V}=await U.read();if(L)break;d.current&&(s(j=>pg(j,V)),V.type==="workflow-step-start"&&o(!0),V.type==="workflow-step-suspended"&&o(!1),V.type==="workflow-finish"&&m(V))}}catch(L){p(L,"Error resuming workflow stream")}finally{d.current&&o(!1),c.current&&(c.current.releaseLock(),c.current=null)}}}),w=bs({mutationFn:async({workflowId:O,requestContext:k,runId:C,perStep:T,...P})=>{if(u.current&&u.current.releaseLock(),!d.current)return;o(!0);const A=t.getWorkflow(O),R=new al;Object.entries(k).forEach(([U,L])=>{R.set(U,L)});const z=await(await A.createRun({runId:C})).timeTravelStream({...P,perStep:T??e,requestContext:R,tracingOptions:r?.tracingOptions});if(!z)return p(new Error("No stream returned"),"No stream returned",o);const Q=z.getReader();u.current=Q;try{for(;d.current;){const{done:U,value:L}=await Q.read();if(U)break;d.current&&(s(V=>pg(V,L)),L.type==="workflow-step-start"&&o(!0),L.type==="workflow-step-suspended"&&o(!1),L.type==="workflow-finish"&&m(L))}}catch(U){p(U,"Error time traveling workflow stream")}finally{d.current&&o(!1),u.current&&(u.current.releaseLock(),u.current=null)}}});return{streamWorkflow:g,streamResult:n,isStreaming:i,observeWorkflowStream:v,closeStreamsAndReset:()=>{if(o(!1),s({}),a.current){try{a.current.releaseLock()}catch{}a.current=null}if(l.current){try{l.current.releaseLock()}catch{}l.current=null}if(c.current){try{c.current.releaseLock()}catch{}c.current=null}if(u.current){try{u.current.releaseLock()}catch{}u.current=null}},resumeWorkflowStream:b,timeTravelWorkflowStream:w}},H2r=()=>{const e=rr();return bs({mutationFn:async({workflowId:r,runId:n})=>{try{return await(await e.getWorkflow(r).createRun({runId:n})).cancelRun()}catch(s){throw console.error("Error canceling workflow run:",s),s}}})},NZe=()=>{const[e,t]=E.useState(!1),r=E.useCallback(n=>{if(n){const s=new IntersectionObserver(([i])=>{t(i.isIntersecting)});return s.observe(n),()=>s.disconnect()}},[]);return{inView:e,setRef:r}},FD=e=>{const t=rr(),{requestContext:r}=Qn();return ds({queryKey:["workflow",e],queryFn:()=>e?t.getWorkflow(e).details(r):null,enabled:!!e,retry:!1,refetchOnWindowFocus:!1,throwOnError:!1})},Qz=20,RZe=(e,{enabled:t=!0}={})=>{const r=rr(),{inView:n,setRef:s}=NZe(),i=z$e({queryKey:["workflow-runs",e],queryFn:({pageParam:o})=>r.getWorkflow(e).runs({limit:Qz,offset:o*Qz}),initialPageParam:0,getNextPageParam:(o,a,l)=>{if(!(o.runs.length<Qz))return l+1},select:o=>o.pages.flatMap(a=>a.runs),retry:!1,enabled:t,refetchInterval:5e3,gcTime:0,staleTime:0});return E.useEffect(()=>{n&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[n,i.hasNextPage,i.isFetchingNextPage]),{...i,setEndOfListElement:s}},MZe=(e,t,r)=>{const n=rr();return ds({queryKey:["workflow-run",e,t],queryFn:()=>n.getWorkflow(e).runById(t),enabled:!!(e&&t),gcTime:0,staleTime:0,refetchInterval:r})},W2r=e=>{const t=rr(),r=hp();return bs({mutationFn:({runId:n})=>t.getWorkflow(e).deleteRunById(n),onSuccess:()=>{r.invalidateQueries({queryKey:["workflow-runs",e]}),mn.success("Workflow run deleted successfully")},onError:()=>{mn.error("Failed to delete workflow run")}})},jZe=E.createContext(null);function J6(){const e=E.useContext(jZe);if(!e)throw new Error("useWorkflowStepDetail must be used within WorkflowStepDetailProvider");return e}function G2r({children:e}){const[t,r]=E.useState(null),n=E.useCallback(({stepName:o,stepId:a,mapConfig:l})=>{r({type:"map-config",stepName:o,stepId:a,mapConfig:l})},[]),s=E.useCallback(({label:o,stepGraph:a,fullStep:l})=>{r({type:"nested-graph",stepName:o,nestedGraph:{label:o,stepGraph:a,fullStep:l}})},[]),i=E.useCallback(()=>{r(null)},[]);return f.jsx(jZe.Provider,{value:{stepDetail:t,showMapConfig:n,showNestedGraph:s,closeStepDetail:i},children:e})}const kp=E.createContext({});function hte({children:e,snapshot:t,workflowId:r,initialRunId:n,withoutTimeTravel:s=!1}){const[i,o]=E.useState(()=>t?JZ(t):null),[a,l]=E.useState(()=>t?.context?.input??null),[c,u]=E.useState(()=>n??""),[d,p]=E.useState(!1),[m,g]=E.useState(!1),v=d||["success","failed","canceled","bailed"].includes(i?.status??"")?void 0:5e3,{isLoading:b,data:w}=MZe(r,n??"",v),S=E.useMemo(()=>w&&n?{context:{input:w?.payload,...w?.steps},status:w?.status,result:w?.result,error:w?.error,runId:n,serializedStepGraph:w?.serializedStepGraph,value:w?.initialState}:void 0,[w,n]),{data:O,isLoading:k,error:C}=FD(r),{createWorkflowRun:T}=Z2r(),{streamWorkflow:P,streamResult:A,isStreaming:R,observeWorkflowStream:M,closeStreamsAndReset:z,resumeWorkflowStream:Q,timeTravelWorkflowStream:U}=q2r({debugMode:m}),{mutateAsync:L,isPending:V}=H2r(),j=()=>{o(null),l(null)};return E.useEffect(()=>{p(!1)},[n]),E.useEffect(()=>{S?.runId&&(o(JZ(S)),S.value&&Object.keys(S.value).length>0?l({initialState:S.value,inputData:S.context?.input}):l(S.context?.input),u(S.runId))},[S]),f.jsx(kp.Provider,{value:{workflowId:r,result:i,setResult:o,payload:a,setPayload:l,clearData:j,snapshot:t,runId:c,setRunId:u,workflowError:C??null,workflow:O??void 0,isLoading:k,createWorkflowRun:T.mutateAsync,streamWorkflow:N=>(p(!0),P.mutateAsync(N)),resumeWorkflow:N=>(p(!0),Q.mutateAsync(N)),streamResult:A,isStreamingWorkflow:R,isCancellingWorkflowRun:V,cancelWorkflowRun:L,observeWorkflowStream:N=>(p(!0),M.mutate(N)),closeStreamsAndReset:z,timeTravelWorkflowStream:N=>(p(!0),U.mutateAsync(N)),runSnapshot:S,isLoadingRunExecutionResult:b,withoutTimeTravel:s,debugMode:m,setDebugMode:g},children:f.jsx(G2r,{children:e})})}function fr({className:e,...t}){return f.jsx("div",{className:re("rounded-md bg-surface4 relative overflow-hidden","before:absolute before:inset-0","before:translate-x-[-100%]","before:animate-[shimmer_2s_infinite]","before:bg-gradient-to-r before:from-transparent before:via-surface5/20 before:to-transparent",e),...t})}const X2r=e=>e.replace(/[-_\s]+(.)?/g,(r,n)=>n?n.toUpperCase():"").replace(/^(.)/,r=>r.toLowerCase()).replace(/([A-Z])/g," $1").replace(/^./,r=>r.toUpperCase()).trim(),Y2r=(e,t,r)=>{if(!e.startsWith("mapping_"))return e;const n=l=>l.split(" ").map(c=>c.charAt(0).toUpperCase()+c.slice(1)).join(" "),s=l=>{const c=l.replace(/Step$/,"").replace(/[-_]/g," ").trim();return n(c)},i=(l,c)=>l.length===0?c?"End":"Start":l.length===1?s(l[0]):`${l.length} Steps`,o=i(t,!1),a=i(r,!0);return`${o} → ${a} Map`},J2r=(e,t)=>{const r=new cme.graphlib.Graph().setDefaultEdgeLabel(()=>({}));r.setGraph({rankdir:"TB"}),t.forEach(i=>r.setEdge(i.source,i.target)),e.forEach(i=>r.setNode(i.id,{...i,width:i.measured?.width??274,height:i.measured?.height??(i?.data?.isLarge?260:100)})),cme.layout(r);const n=r.graph()?.width?r.graph().width/2:0,s=r.graph()?.height?r.graph().height/2:0;return{nodes:e.map(i=>{const o=r.node(i.id),a=o.x-(i.measured?.width??274)/2,l=o.y-(i.measured?.height??(i?.data?.isLarge?260:100))/2;return{...i,position:{x:a,y:l}}}),edges:t,fullWidth:n,fullHeight:s}},Gu={animated:!0,markerEnd:{type:cC.ArrowClosed,width:20,height:20,color:"#8e8e8e"}},KZ=({stepFlow:e,xIndex:t,yIndex:r,prevNodeIds:n,prevStepIds:s,nextStepFlow:i,condition:o,allPrevNodeIds:a})=>{let l=[],c=[];if((i?.type==="step"||i?.type==="foreach"||i?.type==="loop")&&(l=[a?.includes(i.step.id)?`${i.step.id}-${r+1}`:i.step.id],c=[i.step.id]),(i?.type==="sleep"||i?.type==="sleepUntil")&&(l=[a?.includes(i.id)?`${i.id}-${r+1}`:i.id],c=[i.id]),i?.type==="parallel"&&(l=i?.steps.map(u=>{const d=u.step.id;return a?.includes(d)?`${d}-${r+1}`:d})||[],c=i?.steps.map(u=>u.step.id)||[]),i?.type==="conditional"&&(l=i?.serializedConditions.map(u=>u.id)||[],c=i?.steps?.map(u=>u.step.id)||[]),e.type==="step"||e.type==="foreach"){const u=e.step.component==="WORKFLOW",d=a?.includes(e.step.id)?`${e.step.id}-${r}`:e.step.id,p=[...o?[{id:o.id,position:{x:t*300,y:r*100},type:"condition-node",data:{label:o.id,previousStepId:s[s.length-1],nextStepId:e.step.id,withoutTopHandle:!n.length,withoutBottomHandle:!l.length,isLarge:!0,conditions:[{type:"when",fnString:o.fn}]}}]:[],{id:d,position:{x:t*300,y:(r+(o?1:0))*100},type:u?"nested-node":"default-node",data:{label:Y2r(e.step.id,s,c),stepId:e.step.id,description:e.step.description,withoutTopHandle:o?!1:!n.length,withoutBottomHandle:!l.length,stepGraph:u?e.step.serializedStepFlow:void 0,mapConfig:e.step.mapConfig,canSuspend:e.step.canSuspend,isForEach:e.type==="foreach"}}],m=[...o?[...(n||[]).map((g,v)=>({id:`e${g}-${o.id}`,source:g,data:{previousStepId:s[v],nextStepId:e.step.id},target:o.id,...Gu})),{id:`e${o.id}-${d}`,source:o.id,data:{previousStepId:s[s.length-1],nextStepId:e.step.id,conditionNode:!0},target:d,...Gu}]:(n||[]).map((g,v)=>({id:`e${g}-${d}`,source:g,data:{previousStepId:s[v],nextStepId:e.step.id},target:d,...Gu})),...(l||[]).map((g,v)=>({id:`e${d}-${g}`,source:d,data:{previousStepId:e.step.id,nextStepId:c[v]},target:g,...Gu}))];return{nodes:p,edges:m,nextPrevNodeIds:[d],nextPrevStepIds:[e.step.id]}}if(e.type==="sleep"||e.type==="sleepUntil"){const u=a?.includes(e.id)?`${e.id}-${r}`:e.id,d=[...o?[{id:o.id,position:{x:t*300,y:r*100},type:"condition-node",data:{label:o.id,previousStepId:s[s.length-1],nextStepId:e.id,withoutTopHandle:!1,withoutBottomHandle:!l.length,isLarge:!0,conditions:[{type:"when",fnString:o.fn}]}}]:[],{id:u,position:{x:t*300,y:(r+(o?1:0))*100},type:"default-node",data:{label:e.id,withoutTopHandle:o?!1:!n.length,withoutBottomHandle:!l.length,...e.type==="sleepUntil"?{date:e.date}:{duration:e.duration}}}],p=[...n.length?o?[...n.map((m,g)=>({id:`e${m}-${o.id}`,source:m,data:{previousStepId:s[g],nextStepId:e.id},target:o.id,...Gu})),{id:`e${o.id}-${u}`,source:o.id,data:{previousStepId:s[s.length-1],nextStepId:e.id},target:u,...Gu}]:n.map((m,g)=>({id:`e${m}-${u}`,source:m,data:{previousStepId:s[g],nextStepId:e.id},target:u,...Gu})):[],...l.length?l.map((m,g)=>({id:`e${u}-${m}`,source:u,data:{previousStepId:e.id,nextStepId:c[g]},target:m,...Gu})):[]];return{nodes:d,edges:p,nextPrevNodeIds:[u],nextPrevStepIds:[e.id]}}if(e.type==="loop"){const{step:u,serializedCondition:d,loopType:p}=e,m=u.component==="WORKFLOW",g=[{id:u.id,position:{x:t*300,y:r*100},type:m?"nested-node":"default-node",data:{label:u.id,description:u.description,withoutTopHandle:!n.length,withoutBottomHandle:!1,stepGraph:m?u.serializedStepFlow:void 0,canSuspend:u.canSuspend}},{id:d.id,position:{x:t*300,y:(r+1)*100},type:"condition-node",data:{label:d.id,previousStepId:u.id,nextStepId:c[0],withoutTopHandle:!1,withoutBottomHandle:!l.length,isLarge:!0,conditions:[{type:p,fnString:d.fn}]}}],v=[...n.length?n.map((b,w)=>({id:`e${b}-${u.id}`,source:b,data:{previousStepId:s[w],nextStepId:u.id},target:u.id,...Gu})):[],{id:`e${u.id}-${d.id}`,source:u.id,data:{previousStepId:u.id,nextStepId:c[0]},target:d.id,...Gu},...l.length?l.map((b,w)=>({id:`e${d.id}-${b}`,source:d.id,data:{previousStepId:u.id,nextStepId:c[w]},target:b,...Gu})):[]];return{nodes:g,edges:v,nextPrevNodeIds:[d.id],nextPrevStepIds:[u.id]}}if(e.type==="parallel"){let u=[],d=[],p=[];return e.steps.forEach((m,g)=>{const{nodes:v,edges:b,nextPrevStepIds:w}=KZ({stepFlow:m,xIndex:g,yIndex:r,prevNodeIds:n,prevStepIds:s,nextStepFlow:i,allPrevNodeIds:a}),S=v.map(O=>({...O,data:{...O.data,isParallel:!0}}));u.push(...S),d.push(...b),p.push(...w)}),{nodes:u,edges:d,nextPrevNodeIds:u.map(m=>m.id),nextPrevStepIds:p}}if(e.type==="conditional"){let u=[],d=[],p=[];return e.steps.forEach((m,g)=>{const{nodes:v,edges:b,nextPrevStepIds:w}=KZ({stepFlow:m,xIndex:g,yIndex:r,prevNodeIds:n,prevStepIds:s,nextStepFlow:i,condition:e.serializedConditions[g],allPrevNodeIds:a});u.push(...v),d.push(...b),p.push(...w)}),{nodes:u,edges:d,nextPrevNodeIds:u.filter(({type:m})=>m!=="condition-node").map(m=>m.id),nextPrevStepIds:p}}return{nodes:[],edges:[],nextPrevNodeIds:[],nextPrevStepIds:[]}},FZe=({stepGraph:e})=>{if(!e)return{nodes:[],edges:[]};if(e.length===0)return{nodes:[],edges:[]};let t=[],r=[],n=[],s=[],i=[];for(let l=0;l<e.length;l++){const{nodes:c,edges:u,nextPrevNodeIds:d,nextPrevStepIds:p}=KZ({stepFlow:e[l],xIndex:l,yIndex:l,prevNodeIds:n,prevStepIds:s,nextStepFlow:l===e.length-1?void 0:e[l+1],allPrevNodeIds:i});t.push(...c),r.push(...u),n=d,s=p,i.push(...n)}const{nodes:o,edges:a}=J2r(t,r);return{nodes:o,edges:a}},K6=bHt,LD=me.forwardRef(({className:e,children:t,...r},n)=>f.jsx(zY,{ref:n,className:re("-outline-offset-2",kr.colors,jD.visible,"hover:text-neutral5","[&>svg]:transition-transform [&>svg]:duration-normal [&>svg]:ease-out-custom","[&[data-state=open]>svg]:rotate-90",e),...r,children:t}));LD.displayName=zY.displayName;const zD=me.forwardRef(({className:e,children:t,...r},n)=>f.jsx(VY,{ref:n,className:re("overflow-hidden","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:slide-in-from-top-1","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-1","duration-normal ease-out-custom",e),...r,children:t}));zD.displayName=VY.displayName;const xi={sleep:"#A855F7",forEach:"#F97316",map:"#F97316",parallel:"#3B82F6",suspend:"#EC4899",after:"#14B8A6",workflow:"#8B5CF6",when:"#ECB047",dountil:"#8B5CF6",dowhile:"#06B6D4",until:"#F59E0B",while:"#10B981",if:"#3B82F6",else:"#6B7280"},Ji={sleep:QB,sleepUntil:Wct,forEach:UB,map:UB,parallel:mTe,suspend:Cut,after:iTe,workflow:ddt,when:dTe,dountil:Zdt,dowhile:Hdt,until:QB,while:WN,if:cTe,else:But},xxe=e=>{switch(e){case"when":return{icon:Ji.when,color:xi.when};case"dountil":return{icon:Ji.dountil,color:xi.dountil};case"dowhile":return{icon:Ji.dowhile,color:xi.dowhile};case"until":return{icon:Ji.until,color:xi.until};case"while":return{icon:Ji.while,color:xi.while};case"if":return{icon:Ji.if,color:xi.if};case"else":return{icon:Ji.else,color:xi.else};default:return{icon:void 0,color:void 0}}},LZe=e=>{const t=!!(e.duration||e.date),r=!!e.isForEach,n=!!(e.mapConfig&&!e.isForEach),s=!!e.stepGraph,i=t||e.canSuspend||e.isParallel||r||n||s;return{isSleepNode:t,isForEachNode:r,isMapNode:n,isNestedWorkflow:s,hasSpecialBadge:i}},zZe=(e,{enabled:t=!0})=>{const r=E.useRef(t);me.useEffect(()=>{if(!t||!e?.current)return;const n=e.current,s=new MutationObserver(()=>{r.current&&n.scrollTo({top:n.scrollHeight,behavior:"smooth"})});s.observe(n,{childList:!0,subtree:!0,characterData:!0});const i=o=>{const a=o.target,l=a.scrollTop+a.clientHeight,c=a.scrollHeight;l>=c-1?r.current=!0:r.current=!1};return n.addEventListener("scroll",i),()=>{n.removeEventListener("scroll",i),s.disconnect()}},[t,e])},BD=E.forwardRef(({className:e,children:t,viewPortClassName:r,maxHeight:n,autoScroll:s=!1,...i},o)=>{const a=E.useRef(null);return zZe(a,{enabled:s}),f.jsxs(NRe,{ref:o,className:re("relative overflow-hidden",e),...i,children:[f.jsx($Ht,{ref:a,className:re("h-full w-full rounded-[inherit] [&>div]:!block",r),style:n?{maxHeight:n}:void 0,children:t}),f.jsx(BZe,{}),f.jsx(IHt,{})]})});BD.displayName=NRe.displayName;const BZe=E.forwardRef(({className:e,orientation:t="vertical",...r},n)=>f.jsx(ZY,{ref:n,orientation:t,className:re("flex touch-none select-none transition-all duration-normal ease-out-custom","opacity-0 hover:opacity-100 data-[state=visible]:opacity-100",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-px",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-px",e),...r,children:f.jsx(DRe,{className:"relative flex-1 rounded-full bg-neutral2 hover:bg-neutral3 transition-colors duration-normal"})}));BZe.displayName=ZY.displayName;const VD=()=>{const e=E.useContext(kp),t=e.result?.steps??{};return{steps:Object.entries(t).reduce((n,[s,i])=>{const o="tripwire"in i&&i.tripwire;return{...n,[s]:{error:o?void 0:"error"in i?i.error:void 0,tripwire:o?i.tripwire:void 0,startedAt:i.startedAt,endedAt:"endedAt"in i?i.endedAt:void 0,status:i.status,output:"output"in i?i.output:void 0,input:i.payload,resumeData:"resumePayload"in i?i.resumePayload:void 0,suspendOutput:"suspendOutput"in i?i.suspendOutput:void 0,suspendPayload:"suspendPayload"in i?i.suspendPayload:void 0}}},{}),runId:e.runId}},Ox=({data:e,language:t="auto"})=>{const r=wy(),n=o=>{if(t==="javascript")return[K3(),rt.lineWrapping];if(t==="json")return[oc,rt.lineWrapping];try{return JSON.parse(o),[oc,rt.lineWrapping]}catch{return o.includes("=>")||o.includes("function")||o.includes("const ")||o.includes("return ")?[K3(),rt.lineWrapping]:[rt.lineWrapping]}};if(typeof e!="string"){const o=JSON.stringify(e,null,2);return f.jsxs("div",{className:"max-h-[500px] overflow-auto relative",children:[f.jsx("div",{className:"absolute right-2 top-2 bg-surface4 rounded-full z-10",children:f.jsx(Uf,{content:o})}),f.jsx("div",{className:"bg-surface4 rounded-lg p-4",children:f.jsx(fc,{value:o,theme:r,extensions:[oc,rt.lineWrapping]})})]})}const s=n(e);let i=e;try{const o=JSON.parse(e);i=JSON.stringify(o,null,2)}catch{}return f.jsxs("div",{className:"max-h-[500px] overflow-auto relative",children:[f.jsx("div",{className:"absolute right-2 top-2 bg-surface4 rounded-full z-10",children:f.jsx(Uf,{content:e})}),f.jsx("div",{className:"bg-surface4 rounded-lg p-4",children:f.jsx(fc,{value:i,theme:r,extensions:s})})]})},K2r=me.forwardRef(({children:e,...t},r)=>f.jsx("form",{ref:r,className:"space-y-4",...t,children:e})),ePr=["boolean","object","array"],tPr=({label:e,children:t,id:r,field:n,error:s})=>{const i=ePr.includes(n.type);return f.jsxs("div",{className:"pb-4 last:pb-0",children:[!i&&f.jsxs(Ze,{as:"label",variant:"ui-sm",className:"text-neutral3 pb-1 block",htmlFor:r,children:[e,n.required&&f.jsx("span",{className:"text-accent2",children:" *"})]}),t,n.fieldConfig?.description&&f.jsx(Ze,{as:"p",variant:"ui-sm",className:"text-neutral6",children:n.fieldConfig.description}),s&&f.jsx(Ze,{as:"p",variant:"ui-sm",className:"text-accent2",children:s})]})},rPr=({error:e})=>f.jsx(Fv,{variant:"destructive",children:f.jsx(Lv,{children:e})}),nPr=({children:e})=>f.jsx(Je,{type:"submit",children:e}),wxe=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Sxe=fZe,VZe=(e,t)=>r=>{var n;if(t?.variants==null)return Sxe(e,r?.class,r?.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(c=>{const u=r?.[c],d=i?.[c];if(u===null)return null;const p=wxe(u)||wxe(d);return s[c][p]}),a=r&&Object.entries(r).reduce((c,u)=>{let[d,p]=u;return p===void 0||(c[d]=p),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:d,className:p,...m}=u;return Object.entries(m).every(g=>{let[v,b]=g;return Array.isArray(b)?b.includes({...i,...a}[v]):{...i,...a}[v]===b})?[...c,d,p]:c},[]);return Sxe(e,o,l,r?.class,r?.className)},sPr=VZe(re("flex w-full text-neutral6 border bg-transparent","transition-all duration-normal ease-out-custom","disabled:cursor-not-allowed disabled:opacity-50","placeholder:text-neutral2 placeholder:transition-opacity placeholder:duration-normal","focus:placeholder:opacity-70",MD,_p),{variants:{variant:{default:"border border-border1 hover:border-border2",filled:"border bg-surface2 border-border1 hover:border-border2",unstyled:"border-0 bg-transparent shadow-none focus:shadow-none focus:ring-0"},size:{sm:`${Ta.sm} px-2 text-ui-sm`,md:`${Ta.md} px-3 text-ui-sm`,lg:`${Ta.lg} px-4 text-ui-sm`}},defaultVariants:{variant:"default",size:"md"}}),To=E.forwardRef(({className:e,size:t,testId:r,variant:n,type:s,error:i,...o},a)=>f.jsx("input",{type:s,className:re(sPr({variant:n,size:t}),i&&"border-error focus:ring-error focus:shadow-glow-accent2",e),"data-testid":r,ref:a,"aria-invalid":i,...o}));To.displayName="Input";const iPr=({inputProps:e,error:t,field:r,id:n})=>{const{key:s,...i}=e;return f.jsx(To,{id:n,className:t?"border-accent2":"",...i,defaultValue:r.default})},oPr=({inputProps:e,error:t,field:r,id:n})=>{const{key:s,...i}=e;return f.jsx(To,{id:n,type:"number",className:t?"border-accent2":"",...i,defaultValue:r.default!==void 0?Number(r.default):void 0,onChange:o=>{const a=o.target.value;a!==""&&!isNaN(Number(a))&&i.onChange({target:{value:a,name:e.name}})},onBlur:o=>{const a=o.target.value;a!==""&&!isNaN(Number(a))&&i.onChange({target:{value:Number(a),name:e.name}})}})},eR=E.forwardRef(({className:e,...t},r)=>f.jsx(eJ,{ref:r,className:re("peer h-4 w-4 shrink-0 rounded-sm border border-neutral3","shadow-sm",kr.all,"hover:border-neutral5 hover:shadow-md",_p,"disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:border-neutral3 disabled:hover:shadow-sm","data-[state=checked]:bg-accent1 data-[state=checked]:border-accent1 data-[state=checked]:text-surface1","data-[state=checked]:shadow-glow-accent1",e),...t,children:f.jsx(WRe,{className:re("flex items-center justify-center text-current","data-[state=checked]:animate-in data-[state=checked]:zoom-in-50 data-[state=checked]:duration-150"),children:f.jsx(lu,{className:"h-3.5 w-3.5 stroke-[3]"})})}));eR.displayName=eJ.displayName;const aPr=({field:e,label:t,id:r,inputProps:n,value:s})=>f.jsxs("div",{className:"flex items-center space-x-2",children:[f.jsx(eR,{id:r,onCheckedChange:i=>{const o={target:{name:n.name,value:i}};n.onChange(o)},defaultChecked:e.default,disabled:n.disabled||n.readOnly}),f.jsxs(Ze,{as:"label",variant:"ui-sm",className:"text-neutral3",htmlFor:r,children:[t,e.required&&f.jsx("span",{className:"text-accent2",children:" *"})]})]});function UZe({className:e,classNames:t,showOutsideDays:r=!0,...n}){return f.jsx(uYt,{showOutsideDays:r,className:re("p-3",e),classNames:{months:"flex flex-col space-y-4 sm:space-y-0 ",month:"space-y-4 text-ui-sm ",caption:"flex justify-between pt-1 items-center pl-2",caption_label:"text-text font-medium ",nav:"flex items-center",nav_button_previous:re("flex justify-center items-center h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_next:re("flex justify-center items-center h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),dropdown_month:"w-full border-collapse space-y-1",weeknumber:"flex",day:re("relative p-0 text-center focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-surface5 [&:has([aria-selected].day-outside)]:bg-surface5/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",n.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md","h-8 w-8 p-0 hover:bg-lightGray-7/50 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"!bg-neutral6/50 !text-surface2 hover:bg-neutral6 rounded-md hover:text-surface2 focus:bg-neutral6 focus:text-surface2",day_today:"bg-neutral6/10 text-neutral5",day_outside:"day-outside text-neutral3 opacity-50 aria-selected:bg-surface5/50 aria-selected:text-neutral3 aria-selected:opacity-30",day_disabled:"text-neutral3 opacity-50",day_range_middle:"aria-selected:bg-surface5 aria-selected:text-neutral5",day_hidden:"invisible",head_cell:"text-ui-xs text-neutral3",...t},...n})}const oT=Rlt,aT=Mlt,kw=E.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},s)=>f.jsx(jlt,{children:f.jsx(CCe,{ref:s,align:t,sideOffset:r,className:re("z-50 w-72 rounded-md border border-border1 bg-surface3 text-neutral5 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",e&&/\bp-\S+/.test(e)?!1:"p-4",e),...n})}));kw.displayName=CCe.displayName;const Ew=MYt,Cw=jYt,lPr={sm:`${Ta.sm} px-2 text-ui-sm`,md:`${Ta.md} px-3 text-ui-sm`,lg:`${Ta.lg} px-3 text-ui-sm`},w0=E.forwardRef(({className:e,children:t,size:r="md",...n},s)=>f.jsxs(BMe,{ref:s,className:re("flex w-full items-center justify-between border border-border1 bg-transparent py-2 shadow-sm placeholder:text-neutral3 disabled:cursor-not-allowed disabled:opacity-50",MD,_p,kr.all,"hover:border-neutral2",lPr[r],e),...n,children:[t,f.jsx(FYt,{asChild:!0,children:f.jsx(Vd,{className:re("h-4 w-4 text-neutral3",kr.colors)})})]}));w0.displayName=BMe.displayName;const S0=E.forwardRef(({className:e,children:t,position:r="popper",...n},s)=>f.jsx(LYt,{children:f.jsx(VMe,{ref:s,className:re("relative z-50 min-w-[8rem] max-h-dropdown-max-height overflow-y-auto overflow-x-hidden rounded-md border border-border1 bg-surface3 text-neutral5 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:f.jsx(zYt,{className:re("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));S0.displayName=VMe.displayName;const O0=E.forwardRef(({className:e,children:t,...r},n)=>f.jsxs(UMe,{ref:n,className:re("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-neutral5 text-sm",kr.colors,"hover:bg-surface5 hover:text-neutral5","focus:bg-surface5 focus:text-neutral5","data-[state=checked]:bg-accent1Dark data-[state=checked]:text-accent1","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[f.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:f.jsx(VYt,{children:f.jsx(lu,{className:"h-4 w-4 text-accent1"})})}),f.jsx(BYt,{children:t})]}));O0.displayName=UMe.displayName;function Zz({name:e,onChange:t,value:r,options:n,placeholder:s}){return f.jsxs(Ew,{name:e,onValueChange:t,value:r,children:[f.jsx(w0,{children:f.jsx(Cw,{placeholder:s||"Select..."})}),f.jsx(S0,{children:(n||[]).map((i,o)=>f.jsx(O0,{value:`${o}`,children:f.jsx("div",{className:"flex items-center gap-2 [&>svg]:w-[1.2em] [&>svg]:h-[1.2em] [&>svg]:text-neutral3",children:i})},i))})]})}const qz=["12","1","2","3","4","5","6","7","8","9","10","11"],KP=["00","15","30","45","59"],e$=["AM","PM"];function cPr({defaultValue:e,onValueChange:t,className:r}){const[n,s]=E.useState("12"),[i,o]=E.useState("00"),[a,l]=E.useState("AM");E.useEffect(()=>{if(e){const p=/^(\d{1,2}):(\d{2})(?::\d{2})?\s*(AM|PM|am|pm)?$/,m=e.match(p);if(m){let g=parseInt(m[1],10);const v=parseInt(m[2],10),b=m[3]?.toUpperCase();g>=1&&g<=12&&v>=0&&v<=59&&(s(g.toString()),o(v===0?"00":v.toString()),l(b||"AM"))}}},[e]);const c=p=>{s(p),t(`${qz[+p]}:${i} ${a}`.trim())},u=p=>{o(KP[+p]),t(`${n}:${KP[+p]} ${a}`.trim())},d=p=>{l(e$[+p]),t(`${n}:${i} ${e$[+p]}`.trim())};return f.jsxs("div",{className:re("flex gap-2 items-center",r),children:[f.jsx(Zz,{name:"hour",value:qz.indexOf(n).toString(),onChange:c,options:qz}),":",f.jsx(Zz,{name:"minute",value:KP.indexOf(i).toString(),onChange:u,options:KP}),f.jsx(Zz,{name:"period",value:e$.indexOf(a).toString(),onChange:d,options:e$})]})}const uPr={sm:`${Ta.sm} px-2`,md:`${Ta.md} px-3`,lg:`${Ta.lg} px-3 py-2`};function _0({name:e,value:t,label:r,labelIsHidden:n=!1,className:s,testId:i,required:o,disabled:a,helpMsg:l,error:c,errorMsg:u,size:d="lg",...p}){const m=({children:g})=>n?f.jsx(Td,{children:g}):g;return f.jsxs("div",{className:re("grid gap-2",{"grid-rows-[auto_1fr]":!n&&!l,"grid-rows-[auto_1fr_auto]":!n&&l},s),children:[f.jsx(m,{children:f.jsxs("label",{htmlFor:`input-${e}`,className:re("text-ui-sm text-neutral3 flex justify-between items-center"),children:[r,o&&f.jsx("i",{className:"text-neutral2 text-xs",children:"(required)"})]})}),f.jsx("input",{id:`input-${e}`,name:e,value:t,className:re("flex grow items-center cursor-pointer text-ui-md text-neutral5 border border-border1 leading-none bg-transparent w-full",MD,_p,uPr[d],"placeholder:text-neutral3 placeholder:text-ui-sm",{"cursor-not-allowed opacity-50":a,"border-red-800 focus:border-border1":c||u}),"data-testid":i,...p}),l&&f.jsx("p",{className:"text-neutral3 text-ui-sm",children:l}),u&&f.jsxs("p",{className:re("text-ui-sm text-neutral4 flex items-center gap-2","[&>svg]:w-[1.2em] [&>svg]:h-[1.2em] [&>svg]:opacity-70 [&>svg]:text-red-400"),children:[f.jsx(I0,{})," ",u]})]})}function QZe({onReset:e,...t}){return f.jsxs("div",{className:"relative",children:[f.jsx(_0,{labelIsHidden:!0,...t,className:"[&>input]:pl-10",style:{background:`url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='gray' viewBox='0 0 24 24'><path d='M21 20l-5.6-5.6a7 7 0 1 0-1.4 1.4L20 21zM4 10a6 6 0 1 1 12 0 6 6 0 0 1-12 0z'/></svg>") no-repeat 8px center`,backgroundSize:"1.5rem 1.5rem",paddingRight:e?"3rem":void 0}}),e&&t.value&&f.jsx("button",{type:"button",onClick:e,className:re("absolute top-1/2 right-2 -translate-y-1/2 p-1 rounded",kr.all,"hover:bg-surface4","[&>svg]:transition-colors [&>svg]:duration-normal","[&:hover>svg]:text-neutral5"),children:f.jsx(Ia,{className:"text-neutral3 w-[1rem] h-[1rem]"})})]})}function k0({name:e,value:t,label:r,className:n,required:s,disabled:i,helpMsg:o,options:a,onValueChange:l,placeholder:c="Select an option",size:u="lg"}){return f.jsxs("div",{className:re("flex gap-2 items-center",{"grid-rows-[auto_1fr]":r,"grid-rows-[auto_1fr_auto]":o},n),children:[r&&f.jsxs("label",{className:re("text-ui-sm text-neutral3 flex justify-between items-center shrink-0"),children:[r,s&&f.jsx("i",{className:"text-neutral2",children:"(required)"})]}),f.jsxs(Ew,{name:e,value:t,onValueChange:l,disabled:i,children:[f.jsx(w0,{id:"select-dataset",size:u,className:re("w-full border border-border1 min-w-20 gap-2",MD,_p),children:f.jsx(Cw,{placeholder:c})}),f.jsx(S0,{children:a.map(d=>f.jsx(O0,{value:d.value,children:f.jsx("span",{className:"whitespace-nowrap truncate block",children:d.label})},d.label))})]}),o&&f.jsx("p",{className:"text-neutral3 text-ui-sm",children:o})]})}const Oxe=({value:e,minValue:t,maxValue:r,defaultTimeStrValue:n,onValueChange:s,children:i,className:o,placeholder:a,...l})=>{const[c,u]=E.useState(!1);return f.jsxs(oT,{open:c,onOpenChange:u,children:[f.jsx(aT,{asChild:!0,children:i||f.jsx(fPr,{value:e,placeholder:a,className:o,"data-testid":"datepicker-button"})}),f.jsx(kw,{className:"backdrop-blur-4xl w-auto !p-0 bg-surface4 max-w-[16.5rem]",align:"start","data-testid":"datepicker-calendar",children:f.jsx(dPr,{value:e,minValue:t,maxValue:r,onValueChange:s,setOpenPopover:u,defaultTimeStrValue:n,...l})})]})};function t$({date:e,timeStr:t=""}){if(!hg(e))return null;if(t){const r=zn(e,"yyyy-MM-dd"),n=new Date(`${r} ${t}`);if(hg(n))return n}return e}const dPr=({value:e,minValue:t,maxValue:r,onValueChange:n,setOpenPopover:s,placeholder:i,className:o,defaultTimeStrValue:a,...l})=>{const[c,u]=E.useState(null),[d,p]=E.useState(e?zn(t$({date:e,timeStr:a})||"","PP p"):""),[m,g]=E.useState(a||""),[v,b]=E.useState(e?new Date(e):void 0),w=aJ(U=>{hg(U)&&(b(U),n?.(U),s?.(!1))},500),S=U=>{p(U.currentTarget.value);const L=new Date(U.currentTarget.value);w(L)},O=U=>{hg(U)?r&&U>r?(u(`The selected date should be before ${zn(r,"PP p")}`),p("")):t&&U<t?(u(`The selected date should be after ${zn(t,"PP p")}`),p("")):(p(zn(U,"PP p")),u("")):(p(""),u(""))},k=new Date(d),C=hg(k),T=C&&k.getTime()!==e?.getTime(),P=U=>{if(b(U),U){const L=t$({date:U,timeStr:m});O(L||"")}else O("")},A=U=>{if(b(U),U){const L=t$({date:U,timeStr:m});O(L||"")}else O("")},R=U=>{if(g(U),C){const L=t$({date:k,timeStr:U});O(L||"")}},M=()=>{s?.(!1)},z=()=>{hg(k)&&n(k),s?.(!1)},Q=()=>{n(void 0),b(void 0),p(""),g(""),s?.(!1)};return f.jsxs("div",{"aria-label":"Choose date",className:re("relative flex flex-col",o),onKeyDown:U=>{U.stopPropagation(),U.key==="Escape"&&s?.(!1)},children:[f.jsx(_0,{type:"text",value:d,onChange:S,placeholder:i,className:"m-4 mb-0 !w-auto"}),c&&f.jsxs("div",{className:re("text-ui-md m-4 mb-0 text-neutral3","[&>svg]:w-[1.1em] [&>svg]:h-[1.1em] [&>svg]:mt-0.5 [&>svg]:text-red-500 [&>svg]:float-left [&>svg]:mr-2"),children:[f.jsx(Hx,{})," ",c]}),f.jsx(UZe,{mode:"single",month:v,selected:v,onMonthChange:A,onSelect:P,...l}),f.jsx(cPr,{onValueChange:R,className:"m-4 mt-0 w-auto",defaultValue:e?zn(new Date(e),"hh:mm a"):a}),f.jsxs("div",{className:"grid grid-cols-[1fr_auto] gap-2 m-4 mt-0",children:[f.jsx(Je,{variant:"light",size:"lg",tabIndex:0,onClick:()=>{C?z():M()},children:T?"Apply":"Cancel"}),T&&f.jsx(Je,{tabIndex:0,onClick:Q,children:"Clear"})]})]})},fPr=E.forwardRef(({value:e,placeholder:t,className:r,...n},s)=>f.jsxs(Je,{ref:s,className:re("justify-start",r),variant:"light",size:"lg",...n,children:[f.jsx(eTe,{className:"h-4 w-4"}),e?f.jsx("span",{className:"text-white",children:zn(e,"PP p")}):f.jsx("span",{className:"text-gray",children:t??"Pick a date"})]})),pPr=({inputProps:e,field:t,error:r,id:n})=>{const{key:s,...i}=e,[o,a]=E.useState(void 0),[l,c]=E.useState(!1);E.useEffect(()=>{if(t.default){const p=new Date(t.default);hg(p)&&a(p)}},[t]);const u=p=>{a(p),p&&i.onChange({target:{value:p.toISOString(),name:e.name}}),c(!1)},d=()=>{a(void 0),i.onChange({target:{value:"",name:e.name}}),c(!1)};return f.jsxs(oT,{open:l,onOpenChange:c,children:[f.jsx(aT,{asChild:!0,children:f.jsxs(Je,{id:n,variant:"light",size:"lg",className:re("w-full",r?"border-accent2":""),children:[f.jsx(eTe,{className:"h-4 w-4"}),o?f.jsx("span",{className:"text-white",children:zn(o,"PPP")}):f.jsx("span",{className:"text-gray",children:"Pick a date"})]})}),f.jsxs(kw,{className:"w-auto p-0 bg-surface4",align:"start",children:[f.jsx(UZe,{mode:"single",selected:o,onSelect:u,month:o,onMonthChange:a}),o&&f.jsx("div",{className:"p-3 pt-0",children:f.jsx(Je,{variant:"light",size:"lg",className:"w-full",onClick:d,children:"Clear"})})]})]})},hPr=({field:e,inputProps:t,error:r,id:n,value:s})=>{const{key:i,...o}=t;return f.jsxs(Ew,{...o,value:s,onValueChange:a=>{const l={target:{value:a,name:t.name}};o.onChange(l)},children:[f.jsx(w0,{id:n,className:r?"border-accent2":"",children:f.jsx(Cw,{placeholder:"Select an option"})}),f.jsx(S0,{children:(e.options||[]).map(([a,l])=>f.jsx(O0,{value:a,children:l},a))})]})},mPr=({label:e,children:t})=>{const r=e!==""&&e!=="",[n,s]=E.useState(!1);return f.jsxs("div",{className:"",children:[f.jsxs("div",{className:"flex items-center",children:[r&&f.jsxs(Ze,{as:"h3",variant:"ui-sm",className:"text-neutral3 flex items-center gap-1 pb-2",children:[f.jsx(qe,{size:"sm",children:f.jsx(qv,{})}),e]}),f.jsx(Je,{onClick:()=>s(!n),type:"button",className:"ml-auto",children:f.jsx(qe,{size:"sm",children:f.jsx(Vd,{className:re("transition-all",n?"rotate-180":"rotate-0")})})})]}),n&&f.jsx("div",{className:r?"flex flex-col gap-1 [&>*]:border-dashed [&>*]:border-l [&>*]:border-l-border1 [&>*]:pl-4":"",children:t})]})},gPr=({label:e,children:t,onAddItem:r})=>f.jsxs("div",{children:[f.jsxs("div",{className:"flex gap-2 justify-between",children:[f.jsxs(Ze,{as:"h3",variant:"ui-sm",className:"text-neutral3 pb-2 flex items-center gap-1",children:[f.jsx(qe,{size:"sm",children:f.jsx(Qct,{})}),e]}),f.jsx(Dc,{children:f.jsxs(Ss,{delayDuration:0,children:[f.jsx(Os,{asChild:!0,children:f.jsx("button",{onClick:r,type:"button",className:"text-neutral3 bg-surface3 rounded-md p-1 hover:bg-surface4 hover:text-neutral6 h-icon-sm w-icon-sm",children:f.jsx(qe,{size:"sm",children:f.jsx($0,{})})})}),f.jsx(is,{children:"Add item"})]})})]}),f.jsx("div",{className:"flex flex-col gap-1",children:t})]}),yPr=({children:e,onRemove:t})=>f.jsxs("div",{className:"pl-4 border-l border-border1",children:[e,f.jsxs(Je,{onClick:t,type:"button",children:[f.jsx(qe,{size:"sm",children:f.jsx(lG,{})}),"Delete"]})]}),vPr=({inputProps:e,field:t,error:r,id:n})=>{const{key:s,onChange:i,...o}=e,[a,l]=E.useState(()=>Object.entries(t.default||{}).map(([g,v])=>({id:g||Go(),key:g,value:v})));E.useEffect(()=>{a.length===0&&l([{id:Go(),key:"",value:""}])},[a]);const c=E.useCallback(g=>{const v=g.reduce((b,w)=>(w.key&&(b[w.key]=w.value),b),{});i?.({target:{value:v,name:e.name}})},[i,e.name]),u=(g,v,b)=>{l(w=>w.map(S=>S.id===g?{...S,[v]:b}:S))},d=()=>{c(a)},p=()=>{const g=[...a,{id:Go(),key:"",value:""}];l(g),c(g)},m=g=>{const v=a.filter(b=>b.id!==g);v.length===0&&v.push({id:Go(),key:"",value:""}),l(v),c(v)};return f.jsxs("div",{className:"space-y-3",children:[a.map(g=>f.jsxs("div",{className:"relative space-y-2 rounded-lg border p-4",children:[f.jsx(Je,{type:"button",className:"absolute right-2 top-2",onClick:()=>m(g.id),children:f.jsx(lG,{className:"h-4 w-4"})}),f.jsxs("div",{className:"space-y-2 pt-6",children:[f.jsx(To,{placeholder:"Key",value:g.key,onChange:v=>u(g.id,"key",v.target.value),onBlur:d}),f.jsx(To,{placeholder:"Value",value:g.value,onChange:v=>u(g.id,"value",v.target.value),onBlur:d})]})]},g.id)),f.jsxs(Je,{type:"button",className:"w-full",onClick:p,children:[f.jsx($0,{className:"mr-2 h-4 w-4"}),"Add Key-Value Pair"]})]})},bPr=({field:e,path:t})=>{const{uiComponents:r}=_J();return f.jsx(r.ObjectWrapper,{label:i4(e),field:e,children:Object.entries(e.schema).map(([n,s])=>f.jsx(zv,{field:s,path:[...t,s.key]},`${t.join(".")}.${s.key}`))})},xPr=({field:e,path:t})=>{const{uiComponents:r}=_J(),{control:n}=o6(),{fields:s,append:i,remove:o}=dJt({control:n,name:t.join(".")}),a=e.schema?.[0]?.type;let l;return a==="object"?l={}:a==="array"?l=[]:l=null,f.jsx(r.ArrayWrapper,{label:i4(e),field:e,onAddItem:()=>i(l),children:s.map((c,u)=>f.jsx(r.ArrayElementWrapper,{onRemove:()=>o(u),index:u,children:f.jsx(zv,{field:e.schema[0],path:[...t,u.toString()]})},c.id))})},zv=({field:e,path:t})=>{const{formComponents:r,uiComponents:n}=_J(),{register:s,formState:{errors:i},getValues:o}=o6(),a=t.join("."),l=ZJt(i,t)?.message,c=o(a),u=e.fieldConfig?.fieldWrapper||n.FieldWrapper;let d=()=>f.jsx(n.ErrorMessage,{error:`[AutoForm Configuration Error] No component found for type "${e.type}" nor a fallback`});return e.type==="array"?d=xPr:e.type==="object"?d=bPr:e.type in r?d=r[e.type]:"fallback"in r&&(d=r.fallback),f.jsx(u,{label:i4(e),error:l,id:a,field:e,children:f.jsx(d,{label:i4(e),field:e,value:c,error:l,id:a,path:t,inputProps:{required:e.required,error:l,key:`${a}-input`,...e.fieldConfig?.inputProps,...s(a)}},a)})},wPr=({field:e,inputProps:t})=>{const r=t.name?.split(".")??[];return e.schema?.map((n,s)=>f.jsxs("div",{children:[f.jsx(zv,{field:n,path:r},r.join(".")),s<(e.schema?.length??0)-1&&f.jsx(Ze,{variant:"ui-xs",className:"text-center",children:"OR"})]},n.key))},SPr=({field:e,path:t})=>{const{watch:r}=o6(),n=t.join("."),s=r(n),o=(e.schema?.flatMap(p=>p.schema||[])||[])?.filter(p=>p.fieldConfig?.customData?.isLiteral)||[],a=o[0],l=o?.reduce((p,m)=>{const g=(m.fieldConfig?.customData?.literalValues??[]).map(v=>[v,v]);return p.options?.push(...g),p},{key:a.key,required:a.required,type:"select",default:a.default,description:a.description,options:[],fieldConfig:a.fieldConfig}),c=e.schema?.reduce((p,m)=>{const g=m.schema?.find(w=>w.fieldConfig?.customData?.isLiteral),v=g?.fieldConfig?.customData?.literalValues?.[0],b=m.schema?.filter(w=>w.key!==g?.key)??[];return v&&(p[v]=b),p},{}),u=e.schema?.filter(p=>!p.schema?.find(g=>g.fieldConfig?.customData?.isLiteral)),d=s?.[l.key];return f.jsxs("div",{children:[f.jsx(zv,{field:l,path:[...t,l.key]},`${n}.${l.key}`),d&&c?.[d]&&c[d].map(p=>f.jsx(zv,{field:p,path:[...t,p.key]},`${n}.${p.key}`)),u&&u.map(p=>f.jsx(zv,{field:p,path:[...t,p.key]},`${n}.${p.key}`))]},e.key)};function L4(e){const t={};for(const r in e){const n=e[r];if(![null,void 0,"",[],{}].includes(n))if(Array.isArray(n)){const i=n.map(o=>{if(typeof o=="object"){const a=L4(o);return Object.keys(a).length>0?a:null}return o}).filter(o=>o!==null);i.length>0&&(t[r]=i)}else if(typeof n=="object"){const s=L4(n);Object.keys(s).length>0&&(t[r]=s)}else t[r]=n}return t}function Tg(e){return Function("z",`"use strict";return (${e});`)(qk)}function OPr({schema:e,onSubmit:t=()=>{},defaultValues:r,values:n,children:s,uiComponents:i,formComponents:o,withSubmit:a=!1,onFormInit:l=()=>{},formProps:c={}}){const u=hJt(e),d=fJt({defaultValues:{...mJt(e),...r},values:n});E.useEffect(()=>{l&&l(d)},[l,d]);const p=async m=>{const g=L4(m),v=e.validateSchema(g);if(v.success)await t(v.data,d);else{d.clearErrors();let b=!1;v.errors?.forEach(w=>{const S=w.path.join(".");d.setError(S,{type:"custom",message:w.message},{shouldFocus:!b}),b=!0;const O=w.path?.slice?.(0,-1);O?.length>0&&d.setError(O.join("."),{type:"custom",message:w.message})})}};return f.jsx(HYt,{...d,children:f.jsx(_Jt,{value:{schema:u,uiComponents:i,formComponents:o},children:f.jsxs(i.Form,{onSubmit:d.handleSubmit(p),...c,children:[u.fields.map(m=>f.jsx(zv,{field:m,path:[m.key]},m.key)),s,a&&f.jsx(i.SubmitButton,{children:"Submit"})]})})})}const _Pr={Form:K2r,FieldWrapper:tPr,ErrorMessage:rPr,SubmitButton:nPr,ObjectWrapper:mPr,ArrayWrapper:gPr,ArrayElementWrapper:yPr};function kPr({uiComponents:e,formComponents:t,readOnly:r,...n}){return f.jsx(OPr,{...n,uiComponents:{..._Pr,...e},formComponents:{string:s=>f.jsx(iPr,{...s,inputProps:{...s.inputProps,readOnly:r}}),number:s=>f.jsx(oPr,{...s,inputProps:{...s.inputProps,readOnly:r}}),boolean:s=>f.jsx(aPr,{...s,inputProps:{...s.inputProps,readOnly:r}}),date:s=>f.jsx(pPr,{...s,inputProps:{...s.inputProps,readOnly:r}}),select:s=>f.jsx(hPr,{...s,inputProps:{...s.inputProps,readOnly:r}}),record:s=>f.jsx(vPr,{...s,inputProps:{...s.inputProps,readOnly:r}}),union:s=>f.jsx(wPr,{...s,inputProps:{...s.inputProps,readOnly:r}}),"discriminated-union":s=>f.jsx(SPr,{...s,inputProps:{...s.inputProps,readOnly:r}}),...t}})}const EPr=VZe("text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),hd=E.forwardRef(({className:e,...t},r)=>f.jsx(gje,{ref:r,className:re(EPr(),e),...t}));hd.displayName=gje.displayName;function CPr(e,t){if(t?.fieldType)return t.fieldType;if(e instanceof ap||e instanceof AT)return"object";if(e instanceof Lw)return"number";if(e instanceof Bw)return"boolean";if(e instanceof Fw)return(e._zod.def.checks||[]).some(s=>s._zod.def.check==="string_format"&&s._zod.def.format==="datetime")?"date":"string";if(e instanceof Qv||e instanceof $Q)return"select";if(e instanceof Vw)return"array";if(e instanceof DN)return"record";if(e instanceof DT)return e._zod.def.options.every(s=>"shape"in s._zod.def?Object.values(s._zod.def.shape).some(i=>i instanceof Zk):!1)?"discriminated-union":"union";if(e instanceof _W)return"discriminated-union";if(e instanceof Zk){const r=e._zod?.def?.values,n=e._def?.value,s=r!==void 0?Array.isArray(r)?r[0]:r:n;return typeof s=="number"?"number":typeof s=="boolean"?"boolean":"string"}return"string"}function jk(e){if(e instanceof qk.core.$ZodDefault)return e._zod.def.defaultValue;if(e instanceof qk.core.$ZodLiteral){const t=e._zod.def.values;return Array.isArray(t)?t[0]:t}else{if("innerType"in e._zod.def)return jk(e._zod.def.innerType);if("shape"in e._zod.def)return cI(e);if("left"in e._zod.def&&"right"in e._zod.def){const t=e._zod.def.left,r=e._zod.def.right,n="shape"in t?cI(t):jk(t),s="shape"in r?cI(r):jk(r);return{...n,...s}}}}function cI(e){const t=e._zod.def.shape,r={};for(const[n,s]of Object.entries(t)){const i=jk(s);i!==void 0&&(r[n]=i)}return r}function eg(e,t){const r=eq(t),n=vje(t);let s=CPr(r,n);const i=jk(t),o=r._zod.def?.entries;let a=[];o&&(Array.isArray(o)?a=o.map(d=>[d,d]):a=Object.entries(o));let l=[];if((r instanceof Ii||r instanceof ap)&&(l=Object.entries(r.shape).map(([d,p])=>eg(d,p))),(r instanceof bC||r instanceof DT)&&(l=Object.entries(r.def.options).map(([d,p])=>eg(d,p))),r instanceof xC||r instanceof AT){const d="left"in r.def?r.def.left:null,p="right"in r.def?r.def.right:null;let m=[],g=[];if(d)if("shape"in d&&d.shape)g=Object.entries(d.shape).map(([v,b])=>eg(v,b));else{const v=eg(e,d);g=v.schema??[v],s=v.type}if(p)if("shape"in p&&p.shape)m=Object.entries(p.shape).map(([v,b])=>eg(v,b));else{const v=eg(e,p);m=v.schema??[v],s=v.type}l=[...g,...m]}(r instanceof bd||r instanceof Vw)&&(l=[eg("0",r._zod.def.element)]);const c=r instanceof Zk,u=c?r._zod.def.values:void 0;return{key:e,type:s,required:!t.optional(),default:i,description:r.description,fieldConfig:c||Object.keys(n??{})?.length>0?{...n,customData:{...n?.customData??{},...c?{isLiteral:c,literalValues:u}:{}}}:void 0,options:a,schema:l}}function eq(e){return"innerType"in e._zod.def?eq(e._zod.def.innerType):"schema"in e._zod.def?eq(e._zod.def.schema):e}function TPr(e){const t=e.shape;return{fields:Object.entries(t).map(([n,s])=>eg(n,s))}}class DPr extends YJt{_schema;constructor(t){super(t),this._schema=t}getDefaultValues(){return cI(this._schema)}validateSchema(t){const r=L4(t);try{const n=this._schema.safeParse(r);return n.success?{success:!0,data:n.data}:{success:!1,errors:n.error.issues.map(s=>({path:s.path,message:s.message}))}}catch(n){throw n}}parseSchema(){return TPr(this._schema)}}function tq(e){return e instanceof ap?Object.keys(e.shape).length===0:e instanceof AT?tq(e._def.left)||tq(e._def.right):!1}function ZZe({schema:e,onSubmit:t,defaultValues:r,isSubmitLoading:n,submitButtonLabel:s,className:i,readOnly:o,children:a}){const l=!(e instanceof ap);if(!e)return console.error("no form schema found"),null;const c=p=>tq(p)?qk.object({}):l?qk.object({"":p}):p,d={schema:new DPr(c(e)),onSubmit:async p=>{await t?.(l?p[""]||{}:p)},defaultValues:l?r?{"":r}:void 0:r,formProps:{className:i,noValidate:!0},uiComponents:{SubmitButton:({children:p})=>t?f.jsx(Je,{variant:"light",className:"w-full",size:"md",disabled:n,children:n?f.jsx(qe,{children:f.jsx(Mf,{className:"animate-spin"})}):s||p}):null},formComponents:{Label:({value:p})=>f.jsx(hd,{className:"text-sm font-normal",children:p})},withSubmit:!0,children:a};return f.jsx(kPr,{...d,readOnly:o})}const mte=E.forwardRef(({className:e,...t},r)=>f.jsx(Vje,{className:re("grid gap-2",e),...t,ref:r}));mte.displayName=Vje.displayName;const _h=E.forwardRef(({className:e,...t},r)=>f.jsx(Uje,{ref:r,className:re("aspect-square h-4 w-4 rounded-full border border-neutral3 text-neutral6","shadow-sm",kr.all,"hover:border-neutral5 hover:shadow-md",_p,"disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:border-neutral3 disabled:hover:shadow-sm","data-[state=checked]:border-accent1 data-[state=checked]:shadow-glow-accent1",e),...t,children:f.jsx(UKt,{className:re("flex items-center justify-center","data-[state=checked]:animate-in data-[state=checked]:zoom-in-50 data-[state=checked]:duration-150"),children:f.jsx(Iut,{className:"h-2 w-2 fill-accent1 text-accent1"})})}));_h.displayName=Uje.displayName;const rq=({schema:e,defaultValues:t,withoutSubmit:r,isSubmitLoading:n,submitButtonLabel:s,onSubmit:i,children:o,isProcessorWorkflow:a})=>{const[l,c]=E.useState(a?"simple":"form");return f.jsxs("div",{children:[f.jsx(mte,{disabled:n,value:l,onValueChange:u=>c(u),className:"pb-4",children:f.jsxs("div",{className:"flex flex-row gap-4",children:[a&&f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(_h,{value:"simple",id:"simple"}),f.jsx(hd,{htmlFor:"simple",className:"!text-neutral3 text-ui-sm",children:"Simple"})]}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(_h,{value:"form",id:"form"}),f.jsx(hd,{htmlFor:"form",className:"!text-neutral3 text-ui-sm",children:"Form"})]}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(_h,{value:"json",id:"json"}),f.jsx(hd,{htmlFor:"json",className:"!text-neutral3 text-ui-sm",children:"JSON"})]})]})}),f.jsx("div",{className:re({"opacity-50 pointer-events-none":n}),children:l==="simple"&&a?f.jsx(PPr,{schema:e,defaultValues:t,isSubmitLoading:n,submitButtonLabel:s,onSubmit:i,withoutSubmit:r,children:o}):l==="form"?f.jsx(ZZe,{schema:e,defaultValues:t,isSubmitLoading:n,submitButtonLabel:s,onSubmit:r?void 0:i,children:o}):f.jsx(APr,{schema:e,defaultValues:t,isSubmitLoading:n,submitButtonLabel:s,onSubmit:i,withoutSubmit:r,children:o})})]})},APr=({schema:e,defaultValues:t,isSubmitLoading:r,submitButtonLabel:n,onSubmit:s,withoutSubmit:i,children:o})=>{const[a,l]=E.useState([]),[c,u]=E.useState(()=>JSON.stringify(t??{},null,2)),d=()=>{l([]);try{const m=e.safeParse(JSON.parse(c));m.success?s(m.data):l(m.error.issues.map(g=>`[${g.path.join(".")}] ${g.message}`))}catch{l(["Invalid JSON provided"])}};let p={};try{p=JSON.parse(c)}catch{p={}}return f.jsxs("div",{className:"flex flex-col gap-4",children:[a.length>0&&f.jsxs("div",{className:"border border-accent2 rounded-lg p-2",children:[f.jsxs(Ze,{as:"p",variant:"ui-md",className:"text-accent2 font-semibold",children:[a.length," errors found"]}),f.jsx("ul",{className:"list-disc list-inside",children:a.map((m,g)=>f.jsx("li",{className:"text-ui-sm text-accent2",children:m},g))})]}),f.jsx(Kc,{data:p,onChange:u}),o,i?null:f.jsx(Je,{variant:"light",onClick:d,className:"w-full",size:"lg",children:r?f.jsx(Mf,{className:"animate-spin"}):n})]})},_xe=[{value:"input",label:"Input - Process input messages before LLM"},{value:"inputStep",label:"Input Step - Process at each agentic loop step"},{value:"outputStream",label:"Output Stream - Process streaming chunks"},{value:"outputResult",label:"Output Result - Process complete output"},{value:"outputStep",label:"Output Step - Process after each LLM response"}],PPr=({schema:e,defaultValues:t,isSubmitLoading:r,submitButtonLabel:n,onSubmit:s,withoutSubmit:i,children:o})=>{const[a,l]=E.useState("Hello, this is a test message."),[c,u]=E.useState("input"),[d,p]=E.useState([]),m=()=>{p([]);const v=c==="outputStep"||c==="outputResult"?"assistant":"user",b={messages:[{id:crypto.randomUUID(),role:v,createdAt:new Date().toISOString(),content:{format:2,parts:[{type:"text",text:a}]}}],phase:c};try{const w=e.safeParse(b);w.success?s(w.data):p(w.error.issues.map(S=>`[${S.path.join(".")}] ${S.message}`))}catch{p(["Error processing input"])}};return f.jsxs("div",{className:"flex flex-col gap-4",children:[d.length>0&&f.jsxs("div",{className:"border border-accent2 rounded-lg p-2",children:[f.jsxs(Ze,{as:"p",variant:"ui-md",className:"text-accent2 font-semibold",children:[d.length," errors found"]}),f.jsx("ul",{className:"list-disc list-inside",children:d.map((g,v)=>f.jsx("li",{className:"text-ui-sm text-accent2",children:g},v))})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx(Ze,{as:"label",variant:"ui-sm",className:"text-neutral3",children:"Phase"}),f.jsxs(Ew,{value:c,onValueChange:u,children:[f.jsx(w0,{className:"w-full",children:f.jsx(Cw,{placeholder:"Select phase"})}),f.jsx(S0,{children:_xe.map(g=>f.jsx(O0,{value:g.value,children:g.value},g.value))})]}),f.jsx(Ze,{variant:"ui-xs",className:"text-icon4",children:_xe.find(g=>g.value===c)?.label})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx(Ze,{as:"label",variant:"ui-sm",className:"text-neutral3",children:"Test Message"}),f.jsx("textarea",{value:a,onChange:g=>l(g.target.value),placeholder:"Enter a test message...",rows:4,className:"w-full bg-transparent border border-border1 rounded-md p-3 text-ui-sm text-neutral6 placeholder:text-neutral3 focus:outline-none focus:ring-2 focus:ring-accent1"})]}),o,i?null:f.jsx(Je,{variant:"light",onClick:m,className:"w-full",size:"lg",children:r?f.jsx(Mf,{className:"animate-spin"}):n})]})},lT=async e=>await Qje.format(e,{semi:!1,parser:"json",printWidth:80,tabWidth:2,plugins:[Z9e,C8e]}),cT=e=>{try{const t=JSON.parse(e);return!!t&&typeof t=="object"}catch{return!1}},y_="text-neutral3 hover:text-neutral6",kxe=e=>{try{return e==null?"{}":JSON.stringify(e,null,2)}catch{return"{}"}},Hz=({label:e,value:t,onChange:r,helperText:n,exampleCode:s})=>{const i=wy(),{handleCopy:o}=np({text:t}),{handleCopy:a}=np({text:s??"{}"}),[l,c]=E.useState(null),[u,d]=E.useState(!1),[p,m]=E.useState(!1),g=async()=>{if(c(null),!t.trim()){r("{}");return}if(!cT(t)){c("Invalid JSON");return}try{const v=await lT(t);r(v)}catch{c("Unable to format JSON")}};return f.jsxs(f.Fragment,{children:[p&&f.jsxs("div",{className:"border border-border1 rounded-lg bg-surface3 p-3 space-y-2",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsxs(Ze,{as:"p",variant:"ui-sm",className:"text-neutral3",children:["Example ",e]}),f.jsxs(Ss,{children:[f.jsx(Os,{asChild:!0,children:f.jsx("button",{type:"button",onClick:a,className:y_,"aria-label":"Copy example JSON",children:f.jsx(qe,{children:f.jsx(cu,{})})})}),f.jsx(is,{children:"Copy example JSON"})]})]}),f.jsx(fc,{value:s,theme:i,extensions:[oc],className:"h-[150px] w-full overflow-y-scroll bg-surface3 rounded-lg overflow-scroll p-3"})]}),f.jsxs(K6,{className:"border border-border1 rounded-lg bg-surface3",open:u,onOpenChange:d,children:[f.jsxs("div",{className:"flex items-center justify-between w-full px-3",children:[f.jsxs("div",{children:[f.jsx(Ze,{as:"label",variant:"ui-md",className:"text-neutral3",children:e}),n&&f.jsx(Ze,{variant:"ui-xs",className:"text-neutral3",children:n})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsxs(Ss,{children:[f.jsx(Os,{asChild:!0,children:f.jsx("button",{type:"button",onClick:g,className:y_,"aria-label":"Format JSON",children:f.jsx(qe,{children:f.jsx(qv,{})})})}),f.jsx(is,{children:"Format JSON"})]}),f.jsxs(Ss,{children:[f.jsx(Os,{asChild:!0,children:f.jsx("button",{type:"button",onClick:o,className:y_,"aria-label":"Copy JSON",children:f.jsx(qe,{children:f.jsx(cu,{})})})}),f.jsx(is,{children:"Copy JSON"})]}),s&&f.jsxs(Ss,{children:[f.jsx(Os,{asChild:!0,children:f.jsx("button",{type:"button",onClick:()=>m(!p),className:y_,"aria-label":p?"Hide example JSON":"View example JSON",children:f.jsx(qe,{children:p?f.jsx(Zut,{}):f.jsx(Wx,{})})})}),f.jsx(is,{children:"View example JSON"})]}),f.jsx(LD,{asChild:!0,children:f.jsx("button",{type:"button",className:y_,"aria-label":u?`Collapse ${e}`:`Expand ${e}`,children:f.jsx(qe,{className:re("transition-transform",u?"rotate-0":"-rotate-90"),children:f.jsx(Vd,{})})})})]})]}),f.jsxs(zD,{className:"space-y-2",children:[f.jsx(fc,{value:t,onChange:r,theme:i,extensions:[oc],className:"h-[260px] overflow-y-scroll bg-surface3 rounded-lg overflow-hidden p-3"}),l&&f.jsx(Ze,{variant:"ui-sm",className:"text-accent2",children:l})]})]})]})},Wz=({stepKey:e,closeModal:t,isPerStepRun:r,isContinueRun:n,buttonText:s="Start time travel",inputData:i})=>{const{result:o,workflow:a,timeTravelWorkflowStream:l,runId:c,workflowId:u,setDebugMode:d}=E.useContext(kp),{requestContext:p}=Qn(),m=i?{payload:i}:o?.steps?.[e],[g,v]=E.useState(()=>"{}"),[b,w]=E.useState(()=>"{}"),[S,O]=E.useState(()=>"{}"),[k,C]=E.useState(null),[T,P]=E.useState(!1),A=a?.allSteps?.[e],{schema:R}=E.useMemo(()=>{if(!A?.inputSchema)return{schema:Qk(b1(),OI())};try{const z=Mv(A.inputSchema),Q=a?.stateSchema?Tg(kg(Mv(a.stateSchema))):null,U=Tg(kg(z));return{schema:Q?Uw({inputData:U,initialState:Q.optional()}):U,schemaError:null}}catch(z){return console.error("Failed to parse step schema",z),{schema:Qk(b1(),OI())}}},[A?.inputSchema,a?.stateSchema]),M=async z=>{C(null),P(!0);try{const Q=g.trim()?JSON.parse(g):{},U=b.trim()?JSON.parse(b):{},L=S.trim()?JSON.parse(S):{},{initialState:V,inputData:j}=z??{},N=a?.stateSchema?j:z,I={runId:c,workflowId:u,step:e,inputData:N,initialState:V,resumeData:Object.keys(Q)?.length>0?Q:void 0,context:Object.keys(U)?.length>0?U:void 0,nestedStepsContext:Object.keys(L)?.length>0?L:void 0,requestContext:p,...n?{perStep:!1}:{}};n&&d(!1),l(I),t()}catch(Q){console.error("Invalid JSON provided",Q),C(Q instanceof Error?Q.message:"Error time traveling workflow")}finally{P(!1)}};return f.jsx(Dc,{children:f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx(Ze,{as:"p",variant:"ui-lg",className:"text-neutral3",children:"Input data"}),f.jsxs(Ze,{variant:"ui-xs",className:"text-neutral3",children:["Step: ",e]})]}),f.jsx(rq,{schema:R,defaultValues:m?.payload,isSubmitLoading:T,submitButtonLabel:s,onSubmit:M,children:f.jsxs("div",{className:"space-y-4 pb-4",children:[r||n?null:f.jsxs(f.Fragment,{children:[f.jsx(Hz,{label:"Resume Data (JSON)",value:g,onChange:v,helperText:"Provide any resume payloads that should be passed to the step."}),f.jsx(Hz,{label:"Context (JSON)",value:b,onChange:w,helperText:"Only include top level steps (no nested workflow steps) that are required in the time travel execution.",exampleCode:kxe({stepId:{status:"success",payload:{value:"test value"},output:{value:"test output"}}})}),f.jsx(Hz,{label:"Nested Step Context (JSON)",value:S,onChange:O,helperText:"Includes nested workflow steps that are required in the time travel execution.",exampleCode:kxe({nestedWorkflowId:{stepId:{status:"success",payload:{value:"test value"},output:{value:"test output"}}}})})]}),k&&f.jsx(Ze,{variant:"ui-sm",className:"text-accent2",children:k})]})})]})})},gte=({input:e,output:t,resumeData:r,suspendOutput:n,error:s,tripwire:i,mapConfig:o,stepName:a,stepId:l,onShowNestedGraph:c,status:u,stepKey:d,stepsFlow:p})=>{const[m,g]=E.useState(!1),[v,b]=E.useState(!1),[w,S]=E.useState(!1),[O,k]=E.useState(!1),[C,T]=E.useState(!1),[P,A]=E.useState(!1),[R,M]=E.useState(!1),[z,Q]=E.useState(!1),{withoutTimeTravel:U,debugMode:L,result:V,runSnapshot:j,timeTravelWorkflowStream:N,runId:I,workflowId:H,setDebugMode:B}=E.useContext(kp),{showMapConfig:J,stepDetail:Z,closeStepDetail:F}=J6(),{requestContext:W}=Qn(),K=V?.status??j?.status,se="max-w-4xl w-full",X=!U&&d&&!o&&K!=="running"&&K!=="paused",te=d&&L&&K==="paused",de=E.useMemo(()=>{if(!d||!te)return;const Ke=p?.[d]??[];if(Ke.length===0)return;if(Ke.length>1)return{hasMultiSteps:!0,input:Ke.reduce((Or,le)=>(V?.steps?.[le]?.status==="success"&&(Or[le]=V?.steps?.[le].output),Or),{})};const zr=Ke[0];if(V?.steps?.[zr]?.status==="success")return{hasMultiSteps:!1,input:V?.steps?.[zr].output}},[d,p,te,V]),ue=te&&de&&!V?.steps[d],Ae=Z?.type==="map-config"&&Z?.stepName===a,_e=Z?.type==="nested-graph"&&Z?.stepName===a,De="ring-2 ring-accent1 ring-offset-1 ring-offset-transparent",Me=()=>{Ae?F():J({stepName:a,stepId:l,mapConfig:o})},We=()=>{_e?F():c?.()},lt=Ke=>{const zr={runId:I,workflowId:H,step:d,inputData:de?.hasMultiSteps?void 0:de?.input,requestContext:W,...Ke?{perStep:!1}:{},...de?.hasMultiSteps?{context:Object.keys(de.input)?.reduce((Or,le)=>(Or[le]={output:de.input[le]},Or),{})}:{}};Ke&&B(!1),N(zr)};return f.jsx(f.Fragment,{children:(e||t||s||i||o||r||c||X||ue)&&f.jsxs("div",{className:re("flex flex-wrap items-center bg-surface4 border-t border-border1 px-2 py-1 gap-2 rounded-b-lg",u==="success"&&"bg-accent1Dark",u==="failed"&&"bg-accent2Dark",u==="tripwire"&&"bg-amber-900/40 border-amber-500/20",u==="suspended"&&"bg-accent3Dark",u==="waiting"&&"bg-accent5Dark",u==="running"&&"bg-accent6Dark"),children:[c&&f.jsx(Je,{onClick:We,className:re(_e&&De),size:"sm",children:"View nested graph"}),X&&f.jsxs(f.Fragment,{children:[f.jsx(Je,{onClick:()=>A(!0),size:"sm",children:"Time travel"}),f.jsx(qo,{open:P,onOpenChange:A,children:f.jsxs(So,{className:se,children:[f.jsxs(Oo,{children:[f.jsxs(ko,{children:["Time travel to ",d]}),f.jsx(Eo,{children:"Time travel to a specific workflow step"})]}),f.jsx(_o,{className:"max-h-[600px]",children:f.jsx(Wz,{stepKey:d,closeModal:()=>A(!1)})})]})})]}),ue&&f.jsxs(f.Fragment,{children:[f.jsx(Je,{onClick:()=>{o?lt():Q(!0)},size:"sm",children:"Run step"}),f.jsx(qo,{open:z,onOpenChange:Q,children:f.jsxs(So,{className:se,children:[f.jsxs(Oo,{children:[f.jsxs(ko,{children:["Run step ",d]}),f.jsx(Eo,{children:"Run a specific workflow step"})]}),f.jsx(_o,{className:"max-h-[600px]",children:f.jsx(Wz,{stepKey:d,closeModal:()=>Q(!1),isPerStepRun:!0,buttonText:"Run step",inputData:de?.input})})]})}),f.jsx(Je,{onClick:()=>{o?lt(!0):M(!0)},size:"sm",children:"Continue run"}),f.jsx(qo,{open:R,onOpenChange:M,children:f.jsxs(So,{className:se,children:[f.jsxs(Oo,{children:[f.jsxs(ko,{children:["Continue run ",d]}),f.jsx(Eo,{children:"Continue the workflow run from this step"})]}),f.jsx(_o,{className:"max-h-[600px]",children:f.jsx(Wz,{stepKey:d,closeModal:()=>M(!1),isContinueRun:!0,buttonText:"Continue run",inputData:de?.input})})]})})]}),o&&f.jsx(Je,{onClick:Me,className:re(Ae&&De),size:"sm",children:"Map config"}),e&&f.jsxs(f.Fragment,{children:[f.jsx(Je,{onClick:()=>g(!0),size:"sm",children:"Input"}),f.jsx(qo,{open:m,onOpenChange:g,children:f.jsxs(So,{className:se,children:[f.jsxs(Oo,{children:[f.jsxs(ko,{children:[a," input"]}),f.jsx(Eo,{children:"View the input data for this step"})]}),f.jsx(_o,{children:f.jsx(Ox,{data:e})})]})})]}),r&&f.jsxs(f.Fragment,{children:[f.jsx(Je,{onClick:()=>S(!0),size:"sm",children:"Resume data"}),f.jsx(qo,{open:w,onOpenChange:S,children:f.jsxs(So,{className:se,children:[f.jsxs(Oo,{children:[f.jsxs(ko,{children:[a," resume data"]}),f.jsx(Eo,{children:"View the resume data for this step"})]}),f.jsx(_o,{children:f.jsx(Ox,{data:r})})]})})]}),(t??n)&&f.jsxs(f.Fragment,{children:[f.jsx(Je,{onClick:()=>b(!0),size:"sm",children:"Output"}),f.jsx(qo,{open:v,onOpenChange:b,children:f.jsxs(So,{className:se,children:[f.jsxs(Oo,{children:[f.jsxs(ko,{children:[a," output"]}),f.jsx(Eo,{children:"View the output data for this step"})]}),f.jsx(_o,{children:f.jsx(Ox,{data:t??n})})]})})]}),s&&f.jsxs(f.Fragment,{children:[f.jsx(Je,{onClick:()=>k(!0),size:"sm",children:"Error"}),f.jsx(qo,{open:O,onOpenChange:k,children:f.jsxs(So,{className:se,children:[f.jsxs(Oo,{children:[f.jsxs(ko,{children:[a," error"]}),f.jsx(Eo,{children:"View the error details for this step"})]}),f.jsx(_o,{children:f.jsx(Ox,{data:s})})]})})]}),i&&f.jsxs(f.Fragment,{children:[f.jsx(Je,{onClick:()=>T(!0),className:"text-amber-400 hover:text-amber-300",size:"sm",children:"Tripwire"}),f.jsx(qo,{open:C,onOpenChange:T,children:f.jsxs(So,{className:se,children:[f.jsxs(Oo,{children:[f.jsxs(ko,{children:[a," tripwire"]}),f.jsx(Eo,{children:"View the tripwire details for this step"})]}),f.jsx(_o,{children:f.jsx(Ox,{data:{reason:i.reason,retry:i.retry,metadata:i.metadata,processorId:i.processorId}})})]})})]})]})})};function qZe({data:e}){const{conditions:t,previousStepId:r,nextStepId:n,withoutTopHandle:s}=e,[i,o]=E.useState(!0),[a,l]=E.useState(!1),c=t[0]?.type,u=(t.some(S=>S.fnString)||t?.length>1)&&c!=="else",{steps:d}=VD(),p=d[r],m=d[n],g=p?.status==="failed"&&p?.tripwire!==void 0,v=g?"tripwire":p?.status,{icon:b,color:w}=xxe(c);return f.jsxs(f.Fragment,{children:[!s&&f.jsx(wl,{type:"target",position:jt.Top,style:{visibility:"hidden"}}),f.jsxs("div",{"data-workflow-node":!0,"data-workflow-step-status":v,"data-testid":"workflow-condition-node",className:re("bg-surface3 rounded-lg w-[300px] border border-border1",v==="success"&&m&&"bg-accent1Darker",v==="failed"&&m&&"bg-accent2Darker",v==="tripwire"&&m&&"bg-amber-950/40 border-amber-500/30",!p&&!!m?.status&&"bg-accent1Darker"),children:[f.jsxs(K6,{open:u?i:!0,onOpenChange:S=>{u&&o(S)},children:[f.jsxs(LD,{className:"flex items-center justify-between w-full px-3 py-2",children:[f.jsx(Xt,{icon:b?f.jsx(b,{className:"text-current",...w?{style:{color:w}}:{}}):null,children:c?.toUpperCase()}),u&&f.jsx(qe,{children:f.jsx(Vd,{className:re("transition-transform text-neutral3",{"transform rotate-180":i})})})]}),c==="else"?null:f.jsx(zD,{className:"flex flex-col gap-2 pb-2",children:t.map((S,O)=>{const k=S.conj||c,{icon:C,color:T}=xxe(k),P=O===0?null:f.jsx(Xt,{icon:C?f.jsx(C,{className:"text-current",...T?{style:{color:T}}:{}}):null,children:S.conj?.toLocaleUpperCase()||"WHEN"});return S.fnString?f.jsxs("div",{className:"px-3",children:[f.jsx(hme,{theme:hQ.oneDark,code:String(S.fnString).trim(),language:"javascript",children:({className:A,style:R,tokens:M,getLineProps:z,getTokenProps:Q})=>f.jsx("pre",{className:re("relative font-mono p-3 w-full cursor-pointer rounded-lg text-xs !bg-surface4 whitespace-pre-wrap break-words",A,v==="success"&&m&&"!bg-accent1Dark",v==="failed"&&m&&"!bg-accent2Dark",v==="tripwire"&&m&&"!bg-amber-900/40"),onClick:()=>l(!0),style:R,children:M.map((U,L)=>f.jsxs("div",{...z({line:U}),children:[f.jsx("span",{className:"inline-block mr-2 text-neutral3",children:L+1}),U.map((V,j)=>f.jsx("span",{...Q({token:V})},j))]},L))})}),f.jsx(qo,{open:a,onOpenChange:l,children:f.jsxs(So,{className:"max-w-[30rem]",children:[f.jsxs(Oo,{children:[f.jsx(ko,{className:"sr-only",children:"Condition Function"}),f.jsx(Eo,{children:"View the condition function code"})]}),f.jsx(_o,{children:f.jsx(BD,{className:"w-full",maxHeight:"400px",children:f.jsx(hme,{theme:hQ.oneDark,code:String(S.fnString).trim(),language:"javascript",children:({className:A,style:R,tokens:M,getLineProps:z,getTokenProps:Q})=>f.jsx("pre",{className:`${A} relative font-mono text-sm overflow-x-auto p-3 w-full rounded-lg mt-2 dark:bg-zinc-800`,style:{...R,backgroundColor:"#121212",padding:"0 0.75rem 0 0"},children:M.map((U,L)=>f.jsxs("div",{...z({line:U}),children:[f.jsx("span",{className:"inline-block mr-2 text-neutral3",children:L+1}),U.map((V,j)=>f.jsx("span",{...Q({token:V})},j))]},L))})})})})]})})]},`${S.fnString}-${O}`):f.jsx(E.Fragment,{children:S.ref?.step?f.jsxs("div",{className:"flex items-center gap-1",children:[P,f.jsxs(Ze,{variant:"ui-xs",className:" text-neutral3 flex-1",children:[S.ref.step.id||S.ref.step,"'s ",S.ref.path," ",Object.entries(S.query).map(([A,R])=>`${A} ${String(R)}`)]})]}):null},`${S.ref?.path}-${O}`)})})]}),f.jsx(gte,{stepName:n,input:p?.output,mapConfig:e.mapConfig,tripwire:g?p?.tripwire:void 0,status:m?v:void 0})]}),f.jsx(wl,{type:"source",position:jt.Bottom,style:{visibility:"hidden"}})]})}const $Pr=(e,t)=>Number(e.toPrecision(t)),HZe=({startedAt:e,endedAt:t})=>{const[r,n]=E.useState(e);E.useEffect(()=>{const i=setInterval(()=>{n(Date.now())},100);return()=>clearInterval(i)},[e]);const s=t?t-e:r-e;return f.jsxs("span",{className:"text-xs text-neutral3",children:[$Pr(s,3),"ms"]})};function WZe({data:e,parentWorkflowName:t,stepsFlow:r}){const{steps:n}=VD(),{label:s,stepId:i,description:o,withoutTopHandle:a,withoutBottomHandle:l,mapConfig:c,duration:u,date:d,isParallel:p,canSuspend:m,isForEach:g}=e,v=t?`${t}.${i||s}`:i||s,b=n[v],w=b?.status==="failed"&&b?.tripwire!==void 0,S=w?"tripwire":b?.status,{isSleepNode:O,isForEachNode:k,isMapNode:C,hasSpecialBadge:T}=LZe({duration:u,date:d,isForEach:g,mapConfig:c,canSuspend:m,isParallel:p});return f.jsxs(f.Fragment,{children:[!a&&f.jsx(wl,{type:"target",position:jt.Top,style:{visibility:"hidden"}}),f.jsxs("div",{"data-workflow-node":!0,"data-workflow-step-status":S??"idle","data-testid":"workflow-default-node",className:re("bg-surface3 rounded-lg w-[274px] border border-border1",T?"pt-0":"pt-2",S==="success"&&"bg-accent1Darker",S==="failed"&&"bg-accent2Darker",S==="tripwire"&&"bg-amber-950/40 border-amber-500/30",S==="suspended"&&"bg-accent3Darker",S==="waiting"&&"bg-accent5Darker",S==="running"&&"bg-accent6Darker"),children:[T&&f.jsxs("div",{className:"px-3 pt-2 pb-1 flex gap-1.5 flex-wrap",children:[O&&f.jsx(Xt,{icon:d?f.jsx(Ji.sleepUntil,{className:"text-current",style:{color:xi.sleep}}):f.jsx(Ji.sleep,{className:"text-current",style:{color:xi.sleep}}),children:d?"SLEEP UNTIL":"SLEEP"}),m&&f.jsx(Xt,{icon:f.jsx(Ji.suspend,{className:"text-current",style:{color:xi.suspend}}),children:"SUSPEND/RESUME"}),p&&f.jsx(Xt,{icon:f.jsx(Ji.parallel,{className:"text-current",style:{color:xi.parallel}}),children:"PARALLEL"}),k&&f.jsx(Xt,{icon:f.jsx(Ji.forEach,{className:"text-current",style:{color:xi.forEach}}),children:"FOREACH"}),C&&f.jsx(Xt,{icon:f.jsx(Ji.map,{className:"text-current",style:{color:xi.map}}),children:"MAP"})]}),f.jsxs("div",{className:re("flex items-center gap-2 px-3",!o&&"pb-2"),children:[f.jsxs(qe,{children:[S==="tripwire"&&f.jsx(LT,{className:"text-amber-400"}),S==="failed"&&f.jsx(cte,{className:"text-accent2"}),S==="success"&&f.jsx(lte,{className:"text-accent1"}),S==="suspended"&&f.jsx(pTe,{className:"text-accent3"}),S==="waiting"&&f.jsx(iG,{className:"text-accent5"}),S==="running"&&f.jsx(Mf,{className:"text-accent6 animate-spin"}),!b&&f.jsx(sG,{className:"text-neutral2"})]}),f.jsxs(Ze,{variant:"ui-lg",className:"text-neutral6 font-medium inline-flex items-center gap-1 justify-between w-full",children:[s," ",b?.startedAt&&f.jsx(HZe,{startedAt:b.startedAt,endedAt:b.endedAt})]})]}),o&&f.jsx(Ze,{variant:"ui-sm",className:"text-neutral3 px-3 pb-2",children:o}),u&&f.jsxs(Ze,{variant:"ui-sm",className:"text-neutral3 px-3 pb-2",children:["sleeps for ",f.jsxs("strong",{children:[u,"ms"]})]}),d&&f.jsxs(Ze,{variant:"ui-sm",className:"text-neutral3 px-3 pb-2",children:["sleeps until ",f.jsx("strong",{children:new Date(d).toLocaleString()})]}),f.jsx(gte,{stepName:s,stepId:i,input:b?.input,resumeData:b?.resumeData,output:b?.output,suspendOutput:b?.suspendOutput,error:w?void 0:b?.error,tripwire:w?b?.tripwire:void 0,mapConfig:c,status:S,stepKey:v,stepsFlow:r})]}),!l&&f.jsx(wl,{type:"source",position:jt.Bottom,style:{visibility:"hidden",color:"red"}})]})}function GZe({data:e}){const{steps:t}=e,[r,n]=E.useState(!0);return f.jsxs(K6,{open:r,onOpenChange:n,className:re("bg-surface4 rounded-md w-[274px] flex flex-col p-2 gap-2"),children:[f.jsx(wl,{type:"target",position:jt.Top,style:{visibility:"hidden"}}),f.jsxs(LD,{className:"flex items-center justify-between w-full",children:[f.jsx(Xt,{icon:f.jsx(Ji.after,{className:"text-current",style:{color:xi.after}}),children:"AFTER"}),f.jsx(qe,{children:f.jsx(Vd,{className:re("transition-transform text-neutral3",{"transform rotate-180":r})})})]}),f.jsx(zD,{className:"flex flex-col gap-2",children:t.map(s=>f.jsxs("div",{className:"text-sm bg-surface5 flex items-center gap-1.5 rounded-sm p-2",children:[f.jsx(lTe,{className:"text-current w-4 h-4"}),f.jsx(Ze,{variant:"ui-xs",className:"text-neutral6 capitalize",children:s})]},s))}),f.jsx(wl,{type:"source",position:jt.Bottom,style:{visibility:"hidden"}})]})}function XZe({data:e}){const{result:t}=e;return f.jsxs("div",{"data-testid":"workflow-loop-result-node","data-workflow-step-status":t?"success":"failed",className:re("bg-surface4 rounded-md w-[274px]"),"data-workflow-node":!0,children:[f.jsx(wl,{type:"target",position:jt.Top,style:{visibility:"hidden"}}),f.jsx("div",{className:"p-2",children:f.jsxs("div",{className:"text-sm bg-surface5 flex items-center gap-1.5 rounded-sm p-2",children:[t?f.jsx(vut,{className:"text-current w-4 h-4"}):f.jsx(sTe,{className:"text-current w-4 h-4"}),f.jsx(Ze,{variant:"ui-xs",className:"text-neutral6 capitalize",children:String(t)})]})}),f.jsx(wl,{type:"source",position:jt.Bottom,style:{visibility:"hidden"}})]})}function YZe({data:e,parentWorkflowName:t,stepsFlow:r}){const{steps:n}=VD(),{showNestedGraph:s}=J6(),{label:i,stepId:o,description:a,withoutTopHandle:l,withoutBottomHandle:c,stepGraph:u,mapConfig:d,isParallel:p,canSuspend:m,isForEach:g}=e,v=t?`${t}.${i}`:i,b=t?`${t}.${o||i}`:o||i,w=n[b],S=w?.status==="failed"&&w?.tripwire!==void 0,O=S?"tripwire":w?.status,{isForEachNode:k,isMapNode:C,isNestedWorkflow:T,hasSpecialBadge:P}=LZe({isForEach:g,mapConfig:d,canSuspend:m,isParallel:p,stepGraph:u});return f.jsxs(f.Fragment,{children:[!l&&f.jsx(wl,{type:"target",position:jt.Top,style:{visibility:"hidden"}}),f.jsxs("div",{"data-testid":"workflow-nested-node","data-workflow-node":!0,"data-workflow-step-status":O,className:re("bg-surface3 rounded-lg w-[274px] border border-border1",P?"pt-0":"pt-2",O==="success"&&"bg-accent1Darker",O==="failed"&&"bg-accent2Darker",O==="tripwire"&&"bg-amber-950/40 border-amber-500/30",O==="suspended"&&"bg-accent3Darker",O==="waiting"&&"bg-accent5Darker",O==="running"&&"bg-accent6Darker"),children:[P&&f.jsxs("div",{className:"px-3 pt-2 pb-1 flex gap-1.5 flex-wrap",children:[m&&f.jsx(Xt,{icon:f.jsx(Ji.suspend,{className:"text-current",style:{color:xi.suspend}}),children:"SUSPEND/RESUME"}),p&&f.jsx(Xt,{icon:f.jsx(Ji.parallel,{className:"text-current",style:{color:xi.parallel}}),children:"PARALLEL"}),T&&f.jsx(Xt,{icon:f.jsx(Ji.workflow,{className:"text-current",style:{color:xi.workflow}}),children:"WORKFLOW"}),k&&f.jsx(Xt,{icon:f.jsx(Ji.forEach,{className:"text-current",style:{color:xi.forEach}}),children:"FOREACH"}),C&&f.jsx(Xt,{icon:f.jsx(Ji.map,{className:"text-current",style:{color:xi.map}}),children:"MAP"})]}),f.jsxs("div",{className:re("flex items-center gap-2 px-3",!a&&"pb-2"),children:[f.jsxs(qe,{children:[O==="failed"&&f.jsx(cte,{className:"text-accent2"}),O==="success"&&f.jsx(lte,{className:"text-accent1"}),O==="tripwire"&&f.jsx(LT,{className:"text-amber-400"}),O==="suspended"&&f.jsx(pTe,{className:"text-accent3"}),O==="waiting"&&f.jsx(iG,{className:"text-accent5"}),O==="running"&&f.jsx(Mf,{className:"text-accent6 animate-spin"}),!w&&f.jsx(sG,{className:"text-neutral2"})]}),f.jsxs(Ze,{variant:"ui-lg",className:"text-neutral6 font-medium inline-flex items-center gap-1 justify-between w-full",children:[i," ",w?.startedAt&&f.jsx(HZe,{startedAt:w.startedAt,endedAt:w.endedAt})]})]}),a&&f.jsx(Ze,{variant:"ui-sm",className:"text-neutral3 px-3 pb-2",children:a}),f.jsx(gte,{stepName:i,stepId:o,input:w?.input,resumeData:w?.resumeData,output:w?.output,suspendOutput:w?.suspendOutput,error:w?.error,tripwire:S?w?.tripwire:void 0,mapConfig:d,onShowNestedGraph:()=>s({label:i,fullStep:v,stepGraph:u}),status:O,stepKey:b,stepsFlow:r})]}),!c&&f.jsx(wl,{type:"source",position:jt.Bottom,style:{visibility:"hidden"}})]})}const z4=E.forwardRef(({className:e,...t},r)=>f.jsxs(dLe,{ref:r,className:re("relative flex w-full touch-none select-none items-center group",e),...t,children:[f.jsx(umr,{className:re("relative h-1.5 w-full grow overflow-hidden rounded-full bg-neutral2",kr.colors),children:f.jsx(dmr,{className:re("absolute h-full bg-accent1",kr.all)})}),f.jsx(fmr,{className:re("block h-4 w-4 rounded-full border-2 border-accent1 bg-white shadow-md","transition-all duration-normal ease-out-custom",_p,"hover:scale-110 hover:shadow-lg","active:scale-95","disabled:pointer-events-none disabled:opacity-50")})]}));z4.displayName=dLe.displayName;const yte=E.forwardRef(({className:e,...t})=>{const{zoom:r}=nZt(),{zoomTo:n,zoomIn:s,zoomOut:i,fitView:o}=Z5();return f.jsxs(fD,{className:re("flex gap-1 rounded-md bg-surface2 p-1 text-neutral6",e),...t,children:[f.jsx(Je,{onClick:()=>i({duration:300}),children:f.jsx(_dt,{className:"h-4 w-4"})}),f.jsx(z4,{className:"w-[140px]",value:[r],min:.01,max:1,step:.01,onValueChange:a=>{n(a[0])}}),f.jsx(Je,{onClick:()=>s({duration:300}),children:f.jsx($0,{className:"h-4 w-4"})}),f.jsxs(Je,{className:"min-w-20 tabular-nums",onClick:()=>n(1,{duration:300}),children:[(100*r).toFixed(0),"%"]}),f.jsx(Je,{onClick:()=>o({duration:300,maxZoom:1}),children:f.jsx(xdt,{className:"h-4 w-4"})})]})});yte.displayName="ZoomSlider";function IPr({workflow:e}){const{nodes:t,edges:r}=FZe(e),[n,s,i]=rRe(t),[o]=nRe(r),{steps:a}=VD(),l=E.useMemo(()=>r.reduce((u,d)=>{if(d.data){const p=d.data.nextStepId,m=d.data.previousStepId;return{...u,[p]:[...new Set([...u[p]||[],m])]}}return u},{}),[r]),c={"default-node":u=>f.jsx(WZe,{...u,stepsFlow:l}),"condition-node":qZe,"after-node":GZe,"loop-result-node":XZe,"nested-node":u=>f.jsx(YZe,{...u,stepsFlow:l})};return f.jsx("div",{className:"w-full h-full bg-surface1",children:f.jsxs(tRe,{nodes:n,edges:o.map(u=>({...u,style:{...u.style,stroke:a[u.data?.previousStepId]?.status==="success"&&a[u.data?.nextStepId]||u.data?.conditionNode&&!a[u.data?.previousStepId]&&a[u.data?.nextStepId]?.status?"#22c55e":void 0}})),nodeTypes:c,onNodesChange:i,fitView:!0,fitViewOptions:{maxZoom:1},minZoom:.01,maxZoom:1,children:[f.jsx(yte,{position:"bottom-left"}),f.jsx(iRe,{variant:zf.Dots,gap:12,size:.5})]})})}function JZe({workflowId:e,workflow:t,isLoading:r}){const{snapshot:n}=E.useContext(kp);return r?f.jsx("div",{className:"p-4",children:f.jsx(fr,{className:"h-full"})}):t?f.jsx(MY,{children:f.jsx(IPr,{workflow:n?.serializedStepGraph?{stepGraph:n?.serializedStepGraph}:t})}):f.jsx("div",{className:"grid h-full place-items-center",children:f.jsxs("div",{className:"flex flex-col items-center gap-2",children:[f.jsx(Hx,{}),f.jsxs("div",{children:["We couldn't find ",X2r(e)," workflow."]})]})})}const NPr=({header:e,children:t,footer:r})=>{const[n,s]=E.useState(!1);return f.jsxs("div",{className:"rounded-lg border border-border1 bg-surface4",children:[f.jsxs("button",{className:"py-1 px-2 flex items-center gap-3 justify-between w-full",onClick:()=>s(i=>!i),children:[f.jsx("div",{className:"w-full",children:e}),f.jsx(qe,{children:f.jsx(Vd,{className:re("text-neutral3 transition-transform -rotate-90",n&&"rotate-0")})})]}),t&&n&&f.jsx("div",{className:"border-t border-border1 max-h-[400px] overflow-y-auto",children:t}),r&&f.jsx("div",{className:"py-1 px-2 border-t border-border1",children:r})]})},RPr=({stepId:e,status:t,result:r,tripwire:n})=>{const[s,i]=E.useState(!1),o=t==="tripwire",a=!!(n&&(n.retry!==void 0||n.metadata!==void 0||n.processorId!==void 0));return f.jsx(NPr,{header:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsxs(qe,{children:[t==="success"&&f.jsx(lte,{className:"text-accent1"}),t==="failed"&&f.jsx(cte,{className:"text-accent2"}),t==="tripwire"&&f.jsx(LT,{className:"text-amber-400"}),t==="suspended"&&f.jsx(rTe,{className:"text-accent3"}),t==="waiting"&&f.jsx(iG,{className:"text-accent5"}),t==="running"&&f.jsx(Mf,{className:"text-accent6 animate-spin"})]}),f.jsx(Ze,{as:"span",variant:"ui-lg",className:"text-neutral6 font-medium",children:e.charAt(0).toUpperCase()+e.slice(1)})]}),children:o&&n?f.jsx(MPr,{tripwire:n,isExpanded:s,onToggleExpand:()=>i(!s),hasMetadata:a}):f.jsx(Kc,{data:r})})},MPr=({tripwire:e,isExpanded:t,onToggleExpand:r,hasMetadata:n})=>f.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-950/20 overflow-hidden",children:[f.jsxs("div",{className:"flex items-start gap-3 p-4",children:[f.jsx(LT,{className:"w-5 h-5 text-amber-400 mt-0.5 flex-shrink-0"}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsx("p",{className:"text-sm font-medium text-amber-200 mb-1",children:"Content Blocked"}),f.jsx("p",{className:"text-sm text-amber-300/90",children:e.reason||"Tripwire triggered"})]})]}),n&&f.jsxs(f.Fragment,{children:[f.jsxs("button",{onClick:r,className:"w-full flex items-center gap-2 px-4 py-2 text-xs text-amber-400/70 hover:text-amber-400 hover:bg-amber-900/20 transition-colors border-t border-amber-500/20",children:[t?f.jsx(Vd,{className:"w-3.5 h-3.5"}):f.jsx(qN,{className:"w-3.5 h-3.5"}),f.jsx("span",{children:"Details"})]}),t&&f.jsxs("div",{className:"px-4 pb-4 space-y-3 border-t border-amber-500/20 bg-amber-950/10",children:[e.retry!==void 0&&f.jsxs("div",{className:"flex items-center gap-2 pt-3",children:[f.jsx(WN,{className:"w-3.5 h-3.5 text-amber-400/60"}),f.jsxs("span",{className:"text-xs text-amber-300/70",children:["Retry:"," ",e.retry?f.jsx("span",{className:"text-green-400",children:"Allowed"}):f.jsx("span",{className:"text-red-400",children:"Not allowed"})]})]}),e.processorId&&f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(hTe,{className:"w-3.5 h-3.5 text-amber-400/60"}),f.jsxs("span",{className:"text-xs text-amber-300/70",children:["Processor:"," ",f.jsx("code",{className:"px-1.5 py-0.5 rounded bg-amber-900/30 text-amber-200 font-mono",children:e.processorId})]})]}),e.metadata!==void 0&&e.metadata!==null&&f.jsxs("div",{className:"pt-1",children:[f.jsx("p",{className:"text-xs text-amber-400/60 mb-1.5",children:"Metadata:"}),f.jsx("pre",{className:"text-xs text-amber-200/80 bg-amber-900/30 rounded p-2 overflow-x-auto font-mono",children:String(JSON.stringify(e.metadata,null,2))})]})]})]})]}),jPr=e=>e&&Object.keys(e).length===0&&e.constructor===Object;function KZe({workflowId:e,paramsRunId:t,setRunId:r,workflow:n,isLoading:s,createWorkflowRun:i,resumeWorkflow:o,streamWorkflow:a,observeWorkflowStream:l,isStreamingWorkflow:c,streamResult:u,isCancellingWorkflowRun:d,cancelWorkflowRun:p}){const{requestContext:m}=Qn(),{result:g,setResult:v,payload:b,setPayload:w,setRunId:S}=E.useContext(kp),[O,k]=E.useState(!1),[C,T]=E.useState(""),[P,A]=E.useState(null),R=n?.inputSchema,M=n?.stateSchema,z=async F=>{try{if(!n)return;k(!0),A(null),v(null);const W=await i({workflowId:e});r?.(W.runId),T(W.runId),S(W.runId);const{initialState:K,inputData:se}=F??{},X=M?se:F;a({workflowId:e,runId:W.runId,inputData:X,initialState:K,requestContext:m})}catch{k(!1),mn.error("Error executing workflow")}},Q=async F=>{if(!n)return;A(null);const{stepId:W,runId:K,resumeData:se}=F,X=await i({workflowId:e,prevRunId:K});await o({step:W,runId:X.runId,resumeData:se,workflowId:e,requestContext:m})},U=async()=>{const F=await p({workflowId:e,runId:C});A(F)},L=g??u,V=Object.entries(L?.steps||{}).filter(([F,{status:W}])=>W==="suspended").map(([F,{suspendPayload:W}])=>({stepId:F,runId:C,suspendPayload:W,isLoading:!1}));if(E.useEffect(()=>{t&&l&&(l({workflowId:e,runId:t}),T(t),S(t))},[t]),E.useEffect(()=>{k(c)},[c]),E.useEffect(()=>{u&&v(u)},[u]),s)return f.jsx(BD,{className:"h-[calc(100vh-126px)] pt-2 px-4 pb-4 text-xs",children:f.jsxs("div",{className:"space-y-4",children:[f.jsx(fr,{className:"h-10"}),f.jsx(fr,{className:"h-10"})]})});if(!n)return null;const j=V.length>0,N=R?Tg(kg(Mv(R))):null,I=M?Tg(kg(Mv(M))):null,H=I?Uw({inputData:N,initialState:I.optional()}):N,B=L?.steps??{},J=Object.values(B).length>0,Z=["success","failed","canceled","tripwire"];return f.jsxs("div",{className:"h-full pt-3 overflow-y-auto",children:[f.jsxs("div",{className:"space-y-4 px-5 pb-5 border-b border-border1",children:[j&&c&&f.jsxs("div",{className:"py-2 px-5 flex items-center gap-2 bg-surface5 -mx-5 -mt-5 border-b border-border1",children:[f.jsx(qe,{children:f.jsx(Mf,{className:"animate-spin text-neutral6"})}),f.jsx(Ze,{children:"Resuming workflow"})]}),!j&&f.jsx(f.Fragment,{children:H?f.jsx(rq,{schema:H,defaultValues:b,isSubmitLoading:c,submitButtonLabel:"Run",onSubmit:F=>{w(F),z(F)},withoutSubmit:!!t,isProcessorWorkflow:n?.isProcessorWorkflow}):t?null:f.jsx(Je,{className:"w-full",variant:"light",disabled:O,onClick:()=>z(null),children:O?f.jsx(qe,{children:f.jsx(Mf,{className:"animate-spin"})}):"Trigger"})}),!c&&j&&V?.map(F=>{const W=n.allSteps[F.stepId];if(!W||W.isWorkflow)return null;const K=W?.resumeSchema?Tg(kg(Mv(W.resumeSchema))):Qk(b1(),OI());return f.jsxs("div",{className:"flex flex-col px-4",children:[f.jsx(Ze,{variant:"ui-xs",className:"text-neutral3",children:F.stepId}),F.suspendPayload&&f.jsx("div",{"data-testid":"suspended-payload",children:f.jsx(Kc,{data:F.suspendPayload,className:"w-full overflow-x-auto p-2",showCopyButton:!1})}),f.jsx(rq,{schema:K,isSubmitLoading:c,submitButtonLabel:"Resume workflow",onSubmit:se=>{const X=F.stepId?.split(".");Q({stepId:X,runId:F.runId,suspendPayload:F.suspendPayload,resumeData:se})}})]},F.stepId)}),g?.status==="running"&&f.jsxs(Je,{variant:"light",className:"w-full",onClick:U,disabled:!!P?.message||d||g?.status&&Z.includes(g?.status),children:[d?f.jsx(qe,{children:f.jsx(Mf,{className:"animate-spin"})}):f.jsx(qe,{children:f.jsx(nTe,{})}),P?.message||"Cancel Workflow Run"]}),J&&f.jsx(f.Fragment,{children:f.jsxs("div",{className:"flex flex-col gap-2 pt-5 border-t border-border1",children:[f.jsx(Ze,{variant:"ui-xs",className:"text-neutral3",children:"Status"}),f.jsx("div",{className:"flex flex-col gap-4",children:Object.entries(B).filter(([F,W])=>F!=="input"&&!F.endsWith(".input")).map(([F,W])=>{const{status:K}=W;let se,X,te;W.status==="suspended"&&(X=W.suspendOutput),W.status==="success"&&(se=W.output),W.status==="failed"&&(te=W.error);const de=W.status==="failed"&&W.tripwire?W.tripwire:L?.status==="tripwire"?{reason:L?.tripwire?.reason,retry:L?.tripwire?.retry,metadata:L?.tripwire?.metadata,processorId:L?.tripwire?.processorId}:void 0,ue=W.status==="failed"&&W.tripwire?"tripwire":K;return f.jsx(RPr,{stepId:F,status:ue,result:se??X??te??{},tripwire:de},F)})})]})})]}),g&&!jPr(g)&&f.jsx("div",{className:"p-5 border-b border-border1",children:f.jsx(FPr,{result:g})})]})}const FPr=({result:e})=>{const[t,r]=E.useState(!1);return f.jsxs(f.Fragment,{children:[f.jsxs(Je,{variant:"light",onClick:()=>r(!0),className:"w-full",children:[f.jsx(qe,{children:f.jsx(qv,{className:"text-neutral3"})}),"Open Workflow Execution (JSON)"]}),f.jsx(qo,{open:t,onOpenChange:r,children:f.jsxs(So,{className:"max-w-6xl",children:[f.jsxs(Oo,{children:[f.jsx(ko,{children:"Workflow Execution (JSON)"}),f.jsx(Eo,{children:"JSON view of the workflow execution result"})]}),f.jsx(_o,{className:"max-h-[90vh]",children:f.jsx(Kc,{data:e,className:"p-4"})})]})})]})},LPr=({workflowId:e,runId:t,observeWorkflowStream:r,...n})=>{const{runSnapshot:s,isLoadingRunExecutionResult:i}=E.useContext(kp);if(i)return f.jsx("div",{className:"p-4",children:f.jsx(fr,{className:"h-[600px]"})});if(!s||!t)return f.jsx("div",{className:"p-4",children:f.jsx(Ze,{variant:"ui-md",className:"text-neutral6 text-center",children:"No previous run"})});const o=JZ(s),a=o?.status;if(t)return f.jsx("div",{className:"h-full grid grid-rows-[1fr_auto]",children:f.jsx(KZe,{...n,paramsRunId:t,workflowId:e,observeWorkflowStream:()=>{a!=="success"&&a!=="failed"&&a!=="canceled"&&r?.({workflowId:e,runId:t,storeRunResult:o})}})})};function TS({iconSlot:e,titleSlot:t,descriptionSlot:r,actionSlot:n,className:s,as:i="h3"}){return f.jsxs("div",{className:re("flex flex-col items-center justify-center text-center py-10 px-6","transition-opacity duration-normal ease-out-custom",s),children:[e&&f.jsx("div",{className:"mb-4",children:e}),f.jsx(i,{className:"font-medium text-neutral5 text-ui-md",children:t}),r&&f.jsx("p",{className:"mt-1.5 text-neutral3 text-ui-sm max-w-md",children:r}),n&&f.jsx("div",{className:"mt-5",children:n})]})}const zPr={default:"[&>tbody>tr]:h-table-row",small:"[&>tbody>tr]:h-table-row-small"},Du=({className:e,children:t,size:r="default",style:n})=>f.jsx("table",{className:re("w-full",zPr[r],e),style:n,children:t}),Au=({className:e,children:t})=>f.jsx("thead",{children:f.jsx("tr",{className:re("h-table-header border-b border-border1 bg-surface2/80",e),children:t})}),Fi=({className:e,children:t,...r})=>f.jsx("th",{className:re("text-neutral2 text-ui-xs h-full whitespace-nowrap text-left font-medium uppercase tracking-wide first:pl-3 last:pr-3",e),...r,children:t}),Pu=({className:e,children:t})=>f.jsx("tbody",{className:re("",e),children:t}),$u=E.forwardRef(({className:e,children:t,selected:r=!1,style:n,onClick:s,...i},o)=>{const a=l=>{l.key==="Enter"&&s&&s()};return f.jsx("tr",{className:re("border-b border-border1","transition-colors duration-normal ease-out-custom","hover:bg-surface3","focus:bg-surface3 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-accent1/50",r&&"bg-surface4",s&&"cursor-pointer",e),style:n,onClick:s,ref:o,tabIndex:s?0:void 0,onKeyDown:a,...i,children:t})}),Ks=({className:e,children:t,...r})=>f.jsx("td",{className:re("text-neutral5 first:pl-3 last:pr-3",e),...r,children:f.jsx("div",{className:re("flex h-full w-full shrink-0 items-center"),children:t})}),DS=({name:e,description:t,icon:r,meta:n,...s})=>f.jsx(Ks,{...s,children:f.jsxs("div",{className:"flex items-center gap-3.5",children:[r&&f.jsx(qe,{size:"lg",className:"text-neutral5",children:r}),f.jsxs("div",{className:"flex flex-col gap-0",children:[f.jsx(Ze,{as:"span",variant:"ui-md",className:"text-neutral6 !leading-tight",children:e}),t&&f.jsx(Ze,{as:"span",variant:"ui-xs",className:"text-neutral3 w-full max-w-[300px] truncate !leading-tight pt-1",children:t})]}),n]})}),Exe=40,r$=150,Cxe=10,AS=({className:e,children:t,scrollSpeed:r=100,scrollIntervalTime:n=20})=>{const s=E.useRef(null),i=E.useRef(null),[o,a]=E.useState(0),[l,c]=E.useState(0),[u,d]=E.useState(0),[p,m]=E.useState(0),[g,v]=E.useState(!1),[b,w]=E.useState(!1);E.useEffect(()=>{const C=()=>{if(!s.current)return;const R=s.current.scrollLeft<s.current.scrollWidth-s.current.clientWidth;v(R),a(s.current.clientHeight);const M=s.current.getBoundingClientRect();c(M.right),m(M.left),d(M.top)};C();const T=new ResizeObserver(C);s.current&&T.observe(s.current);const P=()=>{if(!s.current)return;const R=s.current.scrollLeft>0,M=s.current.scrollLeft<s.current.scrollWidth-s.current.clientWidth;w(R),v(M),C()};s?.current?.addEventListener("scroll",P);const A=s.current;return()=>{A&&(T.unobserve(A),A.removeEventListener("scroll",P))}},[]);const S=({isVisible:C,position:T,containerHeight:P,containerTop:A,containerRight:R,onStartScrolling:M,onStopScrolling:z})=>{if(!C)return null;const Q={top:P<r$?A:A+(P-r$)/2,width:Exe,height:P<r$?`${P}px`:`${r$}px`};return f.jsxs("button",{onMouseDown:M,onTouchStart:M,onMouseUp:z,onTouchEnd:z,onTouchCancel:z,className:"bg-surface4 text-neutral3 border-surface5 hover:border-neutral3 fixed z-10 flex items-center justify-center rounded-lg border text-2xl hover:text-white",style:{...Q,left:T==="left"?p+Cxe:R-Exe-Cxe},children:[" ",T==="left"?"«":"»"]})},O=E.useCallback((C,T)=>{T?.preventDefault(),T?.stopPropagation(),i.current&&(clearInterval(i.current),i.current=null),s.current&&s.current.scrollBy({left:C==="right"?r*2:-r*2,behavior:"smooth"}),i.current=setInterval(()=>{s.current&&s.current.scrollBy({left:C==="right"?r:-r,behavior:"smooth"})},n)},[r,n]),k=E.useCallback(()=>{i.current&&(clearInterval(i.current),i.current=null)},[]);return f.jsxs("div",{ref:s,className:re("relative max-h-full overflow-auto",e),children:[t,f.jsx(S,{isVisible:b,position:"left",containerHeight:o,containerTop:u,containerRight:l,onStartScrolling:C=>O("left",C),onStopScrolling:k}),f.jsx(S,{isVisible:g,position:"right",containerHeight:o,containerTop:u,containerRight:l,onStartScrolling:C=>O("right",C),onStopScrolling:k})]})},eqe=E.createContext({Link:E.forwardRef(()=>null),navigate:()=>{},paths:{agentLink:()=>"",agentsLink:()=>"",agentToolLink:()=>"",agentThreadLink:()=>"",agentNewThreadLink:()=>"",workflowsLink:()=>"",workflowLink:()=>"",networkLink:()=>"",networkNewThreadLink:()=>"",networkThreadLink:()=>"",scorerLink:()=>"",toolLink:()=>"",processorsLink:()=>"",processorLink:()=>"",mcpServerLink:()=>"",mcpServerToolLink:()=>"",workflowRunLink:()=>""}}),BPr=({children:e,Link:t,navigate:r,paths:n})=>f.jsx(eqe.Provider,{value:{Link:t,navigate:r,paths:n},children:e}),Lr=()=>{const e=E.useContext(eqe);if(!e)throw new Error("useLinkComponent must be used within a LinkComponentProvider");return e},VPr=[{id:"name",header:"Name",cell:({row:e})=>{const{Link:t,paths:r}=Lr(),n=e.original;return f.jsx(DS,{name:f.jsx(t,{href:r.workflowLink(e.original.id),children:e.original.name}),description:n.description,meta:void 0})},meta:{width:"auto"}},{id:"stepsCount",header:"Steps",size:300,cell:({row:e})=>{const t=e.original,r=Object.keys(t.steps??{}).length;return f.jsx(Ks,{children:f.jsx("div",{className:"flex justify-end items-center gap-2",children:f.jsxs(Xt,{icon:f.jsx(lTe,{}),className:"!h-form-sm",children:[r," step",r>1?"s":""]})})})}}],Txe={sm:Ta.sm,md:Ta.md,lg:Ta.lg},PS=({onSearch:e,label:t,placeholder:r,debounceMs:n=300,size:s="md"})=>{const i=E.useId(),o=E.useRef(null),a=aJ(c=>{e(c)},n);E.useEffect(()=>()=>{a.cancel()},[a]),E.useEffect(()=>{const c=o.current;if(!c)return;const u=d=>{d.key.toLowerCase()==="f"&&d.shiftKey&&(d.ctrlKey||d.metaKey)&&(d.preventDefault(),c.focus())};return window.addEventListener("keydown",u),()=>{window.removeEventListener("keydown",u)}},[]);const l=c=>{a(c.target.value)};return f.jsxs("div",{className:re("border border-border1 flex w-full items-center gap-2 overflow-hidden pl-2 pr-1",MD,c2r,kr.all,"hover:border-neutral2",Txe[s]),children:[f.jsx(aG,{className:re("text-neutral3 h-4 w-4",kr.colors)}),f.jsxs("div",{className:"flex-1",children:[f.jsx("label",{htmlFor:i,className:"sr-only",children:t}),f.jsx("input",{id:i,type:"text",placeholder:r,className:re("bg-transparent text-ui-md placeholder:text-neutral3 block w-full px-2 outline-none",Txe[s]),name:i,ref:o,onChange:l})]})]})},$S=({children:e})=>f.jsx("div",{className:"px-3 py-2.5 border-b border-border1",children:e});function UPr({workflows:e,isLoading:t}){const[r,n]=E.useState(""),{navigate:s,paths:i}=Lr(),o=E.useMemo(()=>Object.keys(e??{}).map(p=>{const m=e[p];return{id:p,...m}}),[e]),a=bS({data:o,columns:VPr,getCoreRowModel:vS()}),l=a.getHeaderGroups()[0],c=a.getRowModel().rows.concat();if(c.length===0&&!t)return f.jsx(ZPr,{});const u=c.filter(d=>d.original.name.toLowerCase().includes(r.toLowerCase()));return f.jsxs("div",{children:[f.jsx($S,{children:f.jsx(PS,{onSearch:n,label:"Search workflows",placeholder:"Search workflows"})}),t?f.jsx(QPr,{}):f.jsx(AS,{children:f.jsxs(Du,{children:[f.jsx(Au,{className:"sticky top-0",children:l.headers.map(d=>f.jsx(Fi,{style:{width:d.index===0?"auto":d.column.getSize()},children:yu(d.column.columnDef.header,d.getContext())},d.id))}),f.jsx(Pu,{children:u.map(d=>f.jsx($u,{onClick:()=>s(i.workflowLink(d.original.id)),children:d.getVisibleCells().map(p=>f.jsx(me.Fragment,{children:yu(p.column.columnDef.cell,p.getContext())},p.id))},d.id))})]})})]})}const QPr=()=>f.jsxs(Du,{children:[f.jsxs(Au,{children:[f.jsx(Fi,{children:"Name"}),f.jsx(Fi,{width:300,children:"Steps"})]}),f.jsx(Pu,{children:Array.from({length:3}).map((e,t)=>f.jsxs($u,{children:[f.jsx(Ks,{children:f.jsx(fr,{className:"h-4 w-1/2"})}),f.jsx(Ks,{width:300,children:f.jsx(fr,{className:"h-4 w-1/2"})})]},t))})]}),ZPr=()=>f.jsx("div",{className:"flex h-full items-center justify-center",children:f.jsx(TS,{iconSlot:f.jsx(C2r,{}),titleSlot:"Configure Workflows",descriptionSlot:"Mastra workflows are not configured yet. You can find more information in the documentation.",actionSlot:f.jsxs(Je,{size:"lg",className:"w-full",variant:"light",as:"a",href:"https://mastra.ai/en/docs/workflows/overview",target:"_blank",children:[f.jsx(qe,{children:f.jsx(Tu,{})}),"Docs"]})})}),tqe=({icon:e,title:t,isLoading:r,children:n})=>f.jsxs("div",{className:"p-5 w-full overflow-x-hidden",children:[f.jsxs("div",{className:"text-neutral6 flex items-center gap-2",children:[f.jsx(qe,{size:"lg",className:"bg-surface4 rounded-md p-1",children:e}),r?f.jsx(fr,{className:"h-3 w-1/3"}):f.jsx("div",{className:"flex min-w-0 items-center gap-4",children:f.jsx(Ze,{variant:"header-md",as:"h2",className:"truncate font-medium",children:t})})]}),n&&f.jsx("div",{className:"pt-2",children:n})]}),vte=({children:e,defaultTab:t,value:r,onValueChange:n,className:s})=>{const[i,o]=E.useState(t),a=r!==void 0&&n!==void 0,l=a?r:i,c=u=>{const d=u;a?n(d):o(d)};return f.jsx(sgr,{value:l,onValueChange:c,className:re("overflow-y-auto",s),children:e})},bte=({children:e,variant:t="default",className:r})=>f.jsx("div",{className:re("w-full overflow-x-auto",r),children:f.jsx(igr,{className:re("flex items-center relative",{"text-ui-lg":t==="default","[&>button]:py-2 [&>button]:px-6 [&>button]:font-normal [&>button]:text-neutral3 [&>button]:flex-1 [&>button]:border-b [&>button]:border-border1":t==="default",[`[&>button]:${kr.colors} [&>button]:hover:text-neutral4`]:t==="default","[&>button[data-state=active]]:text-neutral5 [&>button[data-state=active]]:border-accent1":t==="default","border border-border1 flex justify-stretch rounded-md overflow-hidden text-ui-md min-h-[2.5rem]":t==="buttons",[`[&>button]:flex-1 [&>button]:py-2 [&>button]:px-4 [&>button]:text-neutral3 [&>button]:${kr.all}`]:t==="buttons","[&>button]:hover:text-neutral4 [&>button]:hover:bg-surface3":t==="buttons","[&>button[data-state=active]]:text-neutral5 [&>button[data-state=active]]:bg-surface4 [&>button[data-state=active]]:shadow-inner":t==="buttons"},r),children:e})}),kh=({children:e,value:t,onClick:r,onClose:n,className:s})=>f.jsxs(ogr,{value:t,className:re("text-xs p-3 text-neutral3 whitespace-nowrap flex-shrink-0 flex items-center justify-center gap-1.5",kr.all,jD.visible,"hover:text-neutral4","data-[state=active]:text-neutral5 data-[state=active]:border-b-2 data-[state=active]:border-accent1",s),onClick:r,children:[e,n&&f.jsx("button",{onClick:i=>{i.stopPropagation(),n()},className:re("p-0.5 hover:bg-surface4 rounded",kr.colors,"hover:text-neutral5"),"aria-label":"Close tab",children:f.jsx(Ia,{className:"w-3 h-3"})})]}),Eh=({children:e,value:t,className:r})=>f.jsx(agr,{value:t,className:re("grid py-3 overflow-y-auto ring-offset-background",jD.visible,"data-[state=active]:animate-in data-[state=active]:fade-in-0 data-[state=active]:duration-200","data-[state=inactive]:animate-out data-[state=inactive]:fade-out-0 data-[state=inactive]:duration-150",r),children:e}),qPr=()=>{const{debugMode:e,setDebugMode:t}=E.useContext(kp);return f.jsxs(f.Fragment,{children:[f.jsx(Ze,{as:"h3",variant:"ui-md",className:"text-neutral3",children:"Debug Mode"}),f.jsx(eR,{checked:e,onCheckedChange:r=>t(r)})]})},rqe=()=>{const e=wy(),{settings:t,setSettings:r,entityType:n}=pte(),s=o=>{if(!o)return r({...t,tracingOptions:void 0});try{const a=JSON.parse(o);typeof a=="object"&&a!==null&&r({...t,tracingOptions:a})}catch{}};let i="{}";try{i=JSON.stringify(t?.tracingOptions,null,2)}catch{}return f.jsxs("div",{className:"space-y-2 px-5 py-2",children:[f.jsx(Ze,{as:"h3",variant:"ui-md",className:"text-neutral3",children:"Tracing Options"}),f.jsx(fc,{value:i,onChange:s,theme:e,extensions:[oc],className:"h-[400px] overflow-y-scroll bg-surface3 rounded-lg overflow-hidden p-3"}),n==="workflow"&&f.jsx(qPr,{})]})},HPr={sm:"w-4 h-4",md:"w-6 h-6",lg:"w-8 h-8"};function ea({color:e,className:t,size:r="md"}){return f.jsx("svg",{className:re("animate-spin",HPr[r],t),style:{animationDuration:"800ms",animationTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)"},xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:f.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56",stroke:e||"currentColor",className:"text-accent1"})})}function WPr({stepGraph:e,open:t,workflowName:r}){const{nodes:n,edges:s}=FZe({stepGraph:e}),[i,o]=E.useState(!1),[a,l,c]=rRe(n),[u]=nRe(s),{steps:d}=VD(),p=E.useMemo(()=>s.reduce((g,v)=>{if(v.data){const b=v.data.nextStepId,w=v.data.previousStepId;return{...g,[b]:[...new Set([...g[b]||[],w])]}}return g},{}),[s]),m={"default-node":g=>f.jsx(WZe,{parentWorkflowName:r,...g,stepsFlow:p}),"condition-node":qZe,"after-node":GZe,"loop-result-node":XZe,"nested-node":g=>f.jsx(YZe,{parentWorkflowName:r,...g,stepsFlow:p})};return E.useEffect(()=>{t&&setTimeout(()=>{o(!0)},500)},[t]),f.jsx("div",{className:"w-full h-full relative bg-surface1",children:i?f.jsxs(tRe,{nodes:a,edges:u.map(g=>({...g,style:{...g.style,stroke:d[`${r}.${g.data?.previousStepId}`]?.status==="success"&&d[`${r}.${g.data?.nextStepId}`]||g.data?.conditionNode&&!d[`${r}.${g.data?.previousStepId}`]&&d[`${r}.${g.data?.nextStepId}`]?.status?"#22c55e":void 0}})),fitView:!0,fitViewOptions:{maxZoom:1},minZoom:.01,maxZoom:1,nodeTypes:m,onNodesChange:c,children:[f.jsx(yte,{position:"bottom-left"}),f.jsx(iRe,{variant:zf.Lines,gap:12,size:.5})]}):f.jsx("div",{className:"w-full h-full flex items-center justify-center",children:f.jsx(ea,{})})})}function GPr(){const{stepDetail:e,closeStepDetail:t}=J6();return e?f.jsxs("div",{className:"flex flex-col h-full",children:[f.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border1 bg-surface1",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[e.type==="map-config"&&f.jsx(UB,{className:"w-4 h-4",style:{color:xi.map}}),e.type==="nested-graph"&&f.jsx(Tu,{className:"w-4 h-4",style:{color:xi.workflow}}),f.jsxs("div",{className:"flex flex-col",children:[f.jsx(Ze,{variant:"ui-md",className:"text-neutral6 font-medium",children:e.type==="map-config"?`${e.stepName} Config`:`${e.stepName} Workflow`}),e.type==="map-config"&&e.stepId&&e.stepId!==e.stepName&&f.jsx(Ze,{variant:"ui-xs",className:"text-neutral3",children:e.stepId})]})]}),f.jsx("button",{onClick:t,className:"p-1 hover:bg-surface3 rounded transition-colors","aria-label":"Close",children:f.jsx(Ia,{className:"w-4 h-4 text-neutral3"})})]}),f.jsxs("div",{className:"flex-1 overflow-auto",children:[e.type==="map-config"&&e.mapConfig&&f.jsx(Ox,{data:e.mapConfig}),e.type==="nested-graph"&&e.nestedGraph&&f.jsx("div",{className:"h-full min-h-[400px]",children:f.jsx(MY,{children:f.jsx(WPr,{stepGraph:e.nestedGraph.stepGraph,open:!0,workflowName:e.nestedGraph.fullStep})},e.nestedGraph.fullStep)})]})]}):null}function XPr({workflowId:e,initialRunId:t}){const{data:r,isLoading:n,error:s}=FD(e),{createWorkflowRun:i,streamWorkflow:o,streamResult:a,isStreamingWorkflow:l,observeWorkflowStream:c,closeStreamsAndReset:u,resumeWorkflow:d,cancelWorkflowRun:p,isCancellingWorkflowRun:m}=E.useContext(kp),{stepDetail:g,closeStepDetail:v}=J6(),[b,w]=E.useState("current-run"),[S,O]=E.useState(""),{handleCopy:k}=np({text:e}),C=Object.keys(r?.steps??{}).length,T=E.useMemo(()=>g?g.type==="map-config"?"Map Config":g.type==="nested-graph"?"Nested Workflow":"Node":null,[g]);E.useEffect(()=>{!S&&!t&&u()},[S,t]),E.useEffect(()=>{if(s){const A=s instanceof Error?s.message:"Failed to load workflow";Js.error(`Error loading workflow: ${A}`)}},[s]),E.useEffect(()=>{g?w("node-details"):b==="node-details"&&w("current-run")},[g]);const P=A=>{b==="node-details"&&A!=="node-details"&&v(),w(A)};return s?null:f.jsxs("div",{className:"grid grid-rows-[auto_1fr] h-full overflow-y-auto",children:[f.jsx(tqe,{icon:f.jsx(Tu,{}),title:r?.name||"",isLoading:n,children:f.jsxs("div",{className:"flex items-center gap-2 pt-2",children:[f.jsxs(Ss,{children:[f.jsx(Os,{asChild:!0,children:f.jsx("button",{onClick:k,className:"h-badge-default",children:f.jsx(Xt,{icon:f.jsx(cu,{}),variant:"default",children:e})})}),f.jsx(is,{children:"Copy Workflow ID for use in code"})]}),f.jsxs(Xt,{children:[C," step",C>1?"s":""]}),r?.isProcessorWorkflow&&f.jsx(Xt,{icon:f.jsx(BB,{className:"h-3 w-3"}),className:"bg-violet-500/20 text-violet-400",children:"Processor"})]})}),f.jsx("div",{className:"flex-1 overflow-auto border-t border-border1 flex flex-col",children:f.jsxs(vte,{defaultTab:"current-run",value:b,onValueChange:P,className:"h-full",children:[f.jsxs(bte,{children:[f.jsx(kh,{value:"current-run",children:"Current Run"}),f.jsx(kh,{value:"run-options",children:"Run Options"}),g&&T&&f.jsxs(kh,{value:"node-details",onClose:()=>{v(),w("current-run")},children:[T," Details"]})]}),f.jsx(Eh,{value:"current-run",children:e?t?f.jsx(LPr,{workflowId:e,runId:t,setRunId:O,workflow:r??void 0,isLoading:n,createWorkflowRun:i,streamWorkflow:o,resumeWorkflow:d,streamResult:a,isStreamingWorkflow:l,isCancellingWorkflowRun:m,cancelWorkflowRun:p,observeWorkflowStream:c}):f.jsx(KZe,{workflowId:e,setRunId:O,workflow:r??void 0,isLoading:n,createWorkflowRun:i,streamWorkflow:o,resumeWorkflow:d,streamResult:a,isStreamingWorkflow:l,isCancellingWorkflowRun:m,cancelWorkflowRun:p}):null}),f.jsx(Eh,{value:"run-options",children:f.jsx(rqe,{})}),g&&f.jsx(Eh,{value:"node-details",children:f.jsx(GPr,{})})]})})]})}function UD({options:e,value:t,onValueChange:r,placeholder:n="Select option...",searchPlaceholder:s="Search...",emptyText:i="No option found.",className:o,disabled:a=!1,variant:l="default",size:c="md"}){const[u,d]=E.useState(!1),[p,m]=E.useState(""),[g,v]=E.useState(0),b=E.useRef(null),[w,S]=E.useState(void 0),O=E.useRef(null),k=E.useRef(null),C=e.find(R=>R.value===t),T=R=>{r?.(R),d(!1),m(""),v(0)};E.useEffect(()=>{b.current&&S(b.current.offsetWidth)},[u]),E.useEffect(()=>{u&&O.current&&O.current.focus()},[u]);const P=E.useMemo(()=>p?e.filter(R=>R.label.toLowerCase().includes(p.toLowerCase())):e,[e,p]);E.useEffect(()=>{v(0)},[P]);const A=R=>{if(u)switch(R.key){case"ArrowDown":R.preventDefault(),v(M=>M<P.length-1?M+1:M);break;case"ArrowUp":R.preventDefault(),v(M=>M>0?M-1:M);break;case"Enter":R.preventDefault(),P[g]&&T(P[g].value);break;case"Escape":R.preventDefault(),d(!1),m("");break;case"Home":R.preventDefault(),v(0);break;case"End":R.preventDefault(),v(P.length-1);break}};return E.useEffect(()=>{if(k.current&&g>=0){const R=k.current.children[g];R&&R.scrollIntoView({block:"nearest"})}},[g]),f.jsxs(oT,{open:u,onOpenChange:d,children:[f.jsx(aT,{asChild:!0,children:f.jsxs(Je,{ref:b,role:"combobox","aria-expanded":u,variant:l,size:c,className:re("w-full justify-between",o),disabled:a,children:[f.jsx("span",{className:"truncate",children:C?C.label:n}),f.jsx(dut,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),f.jsx(kw,{className:"p-0 w-fit",align:"start",children:f.jsxs("div",{className:re("flex h-full w-full flex-col overflow-hidden rounded-md bg-surface3 text-neutral5","shadow-elevated","animate-in fade-in-0 zoom-in-95 duration-150"),children:[f.jsxs("div",{className:re("flex items-center border-b border-border1 px-3 py-2",kr.colors),children:[f.jsx(aG,{className:re("mr-2 h-4 w-4 shrink-0 text-neutral3",kr.colors)}),f.jsx("input",{ref:O,className:re("flex h-8 w-full rounded-md bg-transparent py-1 text-sm","placeholder:text-neutral3 disabled:cursor-not-allowed disabled:opacity-50","outline-none",kr.colors),placeholder:s,value:p,onChange:R=>m(R.target.value),onKeyDown:A,role:"combobox","aria-autocomplete":"list","aria-controls":"combobox-options","aria-expanded":u})]}),f.jsx("div",{ref:k,id:"combobox-options",role:"listbox",className:"max-h-dropdown-max-height overflow-y-auto overflow-x-hidden p-1",children:P.length===0?f.jsx("div",{className:"py-6 text-center text-sm text-neutral3",children:i}):P.map((R,M)=>{const z=t===R.value,Q=M===g;return f.jsxs("div",{role:"option","aria-selected":z,className:re("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm",kr.colors,"hover:bg-surface5 hover:text-neutral5",Q&&"bg-surface5 text-neutral5",z&&!Q&&"bg-accent1Dark text-accent1"),onClick:()=>T(R.value),onMouseEnter:()=>v(M),children:[f.jsx(lu,{className:re("mr-2 h-4 w-4",kr.opacity,z?"opacity-100 text-accent1":"opacity-0")}),R.label]},R.value)})})]})})]})}function YPr({value:e,onValueChange:t,placeholder:r="Select a workflow...",searchPlaceholder:n="Search workflows...",emptyText:s="No workflows found.",className:i,disabled:o=!1}){const{data:a={},isLoading:l,isError:c,error:u}=Y6(),{navigate:d,paths:p}=Lr();E.useEffect(()=>{if(c){const v=u instanceof Error?u.message:"Failed to load workflows";Js.error(`Error loading workflows: ${v}`)}},[c,u]);const m=Object.keys(a).map(v=>({label:a[v]?.name||v,value:v})),g=v=>{t?t(v):v&&v!==e&&d(p.workflowLink(v))};return f.jsx(UD,{options:m,value:e,onValueChange:g,placeholder:l?"Loading workflows...":r,searchPlaceholder:n,emptyText:s,className:i,disabled:o||l||c})}function lo({children:e,className:t,style:r}){const n=nqe("MainContentLayout");return f.jsx("main",{className:re("grid grid-rows-[auto_1fr] h-full items-start content-start",t),style:{...r,...n?{border:"3px dotted red"}:{}},children:e})}function Oc({children:e,className:t,isCentered:r=!1,isDivided:n=!1,hasLeftServiceColumn:s=!1,style:i}){const o=nqe("MainContentContent"),a=xte({isCentered:r,isDivided:n,hasLeftServiceColumn:s,className:t});return f.jsx("div",{className:a,style:{...i,...o?{border:"3px dotted orange"}:{}},children:e})}const xte=({isCentered:e,isDivided:t,hasLeftServiceColumn:r,className:n})=>re("grid overflow-y-auto h-full ","overflow-x-auto min-w-[min-content]",{"items-start content-start":!e&&!t&&!r,"grid place-items-center":e,"grid-cols-[1fr_1fr]":t&&!r,"grid-cols-[12rem_1fr_1fr]":t&&r,"grid-cols-[auto_1fr]":!t&&r},n);function nqe(e){try{const t=localStorage.getItem("add-dev-style-to-components");return t?t.split(",").map(n=>n.trim()).filter(Boolean).includes(e):!1}catch(t){return console.error("Error reading or parsing localStorage:",t),!1}}const B4=()=>f.jsx(Ugr,{className:re("w-1.5 bg-surface3","[&[data-separator='hover']]:!bg-surface4","[&[data-separator='active']]:!bg-surface5","focus:outline-none")}),V4=({collapsedSize:e,children:t,direction:r,...n})=>{const[s,i]=E.useState(!1),o=Bgr(),a=()=>{o.current&&o.current.expand()};return f.jsx(tee,{panelRef:o,collapsedSize:e,...n,onResize:l=>{e&&typeof e=="number"&&(l.inPixels<=e?i(!0):s&&i(!1))},children:s?f.jsxs(Ss,{children:[f.jsx("div",{className:"flex items-center justify-center h-full",children:f.jsx(Os,{asChild:!0,children:f.jsx(Je,{onClick:a,className:"!h-48 border-none",children:f.jsx(qe,{children:r==="left"?f.jsx(qx,{}):f.jsx(YCe,{})})})})}),f.jsx(is,{children:"Expand"})]}):t})},JPr=({workflowId:e,children:t,leftSlot:r,rightSlot:n})=>{const{defaultLayout:s,onLayoutChange:i}=HLe({id:`workflow-layout-${e}`,storage:localStorage}),o=xte({isCentered:!1,isDivided:!0,hasLeftServiceColumn:!!r});return f.jsxs(qLe,{className:o,defaultLayout:s,onLayoutChange:i,children:[r&&f.jsxs(f.Fragment,{children:[f.jsx(V4,{direction:"left",id:"left-slot",minSize:200,maxSize:"30%",defaultSize:200,collapsedSize:60,collapsible:!0,children:r}),f.jsx(B4,{})]}),f.jsx(tee,{id:"main-slot",children:t}),n&&f.jsxs(f.Fragment,{children:[f.jsx(B4,{}),f.jsx(V4,{direction:"right",id:"right-slot",minSize:300,maxSize:"50%",defaultSize:300,collapsedSize:60,collapsible:!0,children:n})]})]})},wte=()=>f.jsx(X6,{icon:f.jsx(ea,{color:gTe.neutral3}),title:f.jsx(fr,{className:"ml-2 w-12 h-2"}),collapsible:!1}),KPr=({result:e,workflowId:t,isStreaming:r,metadata:n,toolCallId:s,toolApprovalMetadata:i,suspendPayload:o,toolName:a,isNetwork:l,toolCalled:c})=>{const{runId:u,status:d}=e||{},{data:p,isLoading:m}=FD(t),{data:g,isLoading:v}=RZe(t,{enabled:!!u&&!r}),b=g?.find(T=>T.runId===u),w=v||!b,S=typeof b?.snapshot=="object"?b?.snapshot:void 0,O=n?.mode==="network"?n.selectionReason:void 0,k=n?.mode==="network"?n.agentInput:void 0;let C=typeof o=="string"?f.jsx("pre",{className:"whitespace-pre bg-surface4 p-4 rounded-md overflow-x-auto",children:o}):f.jsx(Kc,{data:o,"data-testid":"tool-suspend-payload"});return m||!p?f.jsx(wte,{}):f.jsxs(X6,{"data-testid":"workflow-badge",icon:f.jsx(Tu,{className:"text-accent3"}),title:p.name,initialCollapsed:!1,extraInfo:n?.mode==="network"&&f.jsx(dte,{selectionReason:O??"",input:k}),children:[!r&&!w&&f.jsx(hte,{snapshot:S,workflowId:t,initialRunId:u,withoutTimeTravel:!0,children:f.jsx(Dxe,{workflowId:t,workflow:p,runId:u})}),r&&f.jsx(Dxe,{workflowId:t,workflow:p,runId:u}),C!==void 0&&o&&f.jsxs("div",{children:[f.jsx("p",{className:"font-medium pb-2",children:"Workflow suspend payload"}),C]}),f.jsx(fte,{toolCalled:c??!!d,toolCallId:s,toolApprovalMetadata:i,toolName:a,isNetwork:l,isGenerateMode:n?.mode==="generate"})]})},Dxe=({workflowId:e,workflow:t,runId:r})=>{const{Link:n}=Lr();return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex items-center gap-2 pb-2",children:[f.jsx(Je,{as:n,href:`/workflows/${e}/graph`,children:"Go to workflow"}),r&&f.jsx(Je,{as:n,href:`/workflows/${e}/graph/${r}`,children:"See run"})]}),f.jsx("div",{className:"rounded-md overflow-hidden h-[60vh] w-full",children:f.jsx(JZe,{workflowId:e,workflow:t})})]})},e$r=e=>{const{setResult:t}=E.useContext(kp);E.useEffect(()=>{e&&t(e)},[e])},t$r=({agentId:e,messages:t=[],metadata:r,toolCallId:n,toolApprovalMetadata:s,toolName:i,isNetwork:o,suspendPayload:a,toolCalled:l})=>{const c=r?.mode==="network"?r.selectionReason:void 0,u=r?.mode==="network"?r.agentInput:void 0;let d=t.length>0;o&&(d=l??t.every(m=>m.type==="text"?!0:!!m.toolOutput));let p=typeof a=="string"?f.jsx("pre",{className:"whitespace-pre bg-surface4 p-4 rounded-md overflow-x-auto",children:a}):f.jsx(Kc,{data:a,"data-testid":"tool-suspend-payload"});return f.jsxs(X6,{"data-testid":"agent-badge",icon:f.jsx(Fo,{className:"text-accent1"}),title:e,initialCollapsed:!1,extraInfo:r?.mode==="network"&&f.jsx(dte,{selectionReason:c??"",input:u}),children:[t.map((m,g)=>{if(m.type==="text")return f.jsx(eVe,{children:m.content},g);let v;try{v=typeof m.toolOutput=="string"?JSON.parse(m.toolOutput):m.toolOutput}catch{v=m.toolOutput}return f.jsx(me.Fragment,{children:f.jsx(iqe,{toolName:m.toolName,argsText:typeof m.args=="string"?m.args:JSON.stringify(m.args),result:v,args:m.args,status:{type:"complete"},type:"tool-call",toolCallId:m.toolCallId,addResult:()=>{},resume:()=>{},metadata:{mode:"stream"}})},g)}),p!==void 0&&a&&f.jsxs("div",{children:[f.jsx("p",{className:"font-medium pb-2",children:"Agent suspend payload"}),p]}),f.jsx(fte,{toolCalled:d,toolCallId:n,toolApprovalMetadata:s,toolName:i,isNetwork:o,isGenerateMode:r?.mode==="generate"})]})},sqe=({threadId:e,agentId:t,memory:r})=>{const n=rr(),{requestContext:s}=Qn();return ds({queryKey:["memory","messages",e,t,"requestContext"],queryFn:()=>e?n.listThreadMessages(e,{agentId:t,requestContext:s}):null,enabled:r&&!!e,staleTime:0,gcTime:0,retry:!1,refetchOnWindowFocus:!1})},r$r=({agentId:e,result:t,metadata:r,toolCallId:n,toolApprovalMetadata:s,toolName:i,isNetwork:o,suspendPayload:a,toolCalled:l})=>{const{data:c,isLoading:u}=sqe({threadId:t?.subAgentThreadId,agentId:e,memory:!0});if(u)return f.jsx(wte,{});const d=c?.messages?KBe(c.messages):[],p=t?.childMessages??R3t(d);return f.jsx(t$r,{agentId:e,messages:p,metadata:r,toolCallId:n,toolApprovalMetadata:s,toolName:i,isNetwork:o,suspendPayload:a,toolCalled:l})},iqe=({toolName:e,result:t,args:r,...n})=>f.jsx(hte,{workflowId:"",withoutTimeTravel:!0,children:f.jsx(n$r,{toolName:e,result:t,args:r,...n})}),n$r=({toolName:e,result:t,args:r,metadata:n,toolCallId:s,...i})=>{const o=n?.mode==="network"&&n.from==="AGENT"||e.startsWith("agent-"),a=n?.mode==="network"&&n.from==="WORKFLOW"||e.startsWith("workflow-"),l=n?.mode==="network",c=e.startsWith("agent-")?e.substring(6):e,u=e.startsWith("workflow-")?e.substring(9):e,d=(n?.mode==="stream"||n?.mode==="network"||n?.mode==="generate")&&n?.requireApprovalMetadata,p=(n?.mode==="stream"||n?.mode==="network"||n?.mode==="generate")&&n?.suspendedTools,m=d?d?.[e]??d?.[s]:void 0,g=p?p?.[e]:void 0,v=n?.mode==="network"&&n?.hasMoreMessages?!0:void 0;if(e$r(t),o)return f.jsx(r$r,{agentId:c,result:t,metadata:n,toolCallId:s,toolApprovalMetadata:m,toolName:e,isNetwork:l,suspendPayload:g?.suspendPayload,toolCalled:v});if(a){const b=n?.mode==="stream"||n?.mode==="network";return f.jsx(KPr,{workflowId:u,isStreaming:b,result:t,metadata:n,toolCallId:s,toolApprovalMetadata:m,suspendPayload:g?.suspendPayload,toolName:e,isNetwork:l,toolCalled:v})}return f.jsx(V2r,{toolName:e,args:r,result:t,toolOutput:t?.toolOutput||[],metadata:n,toolCallId:s,toolApprovalMetadata:m,suspendPayload:g?.suspendPayload,isNetwork:l,toolCalled:v})},s$r=({text:e})=>{const[t,r]=E.useState(!1);return f.jsxs("div",{className:"mb-2 space-y-2",children:[f.jsxs("button",{onClick:()=>r(n=>!n),className:"flex items-center gap-2",children:[f.jsx(qe,{children:f.jsx(HN,{className:re("transition-all",t?"rotate-90":"rotate-180")})}),f.jsxs(Xt,{icon:f.jsx(KCe,{}),children:[t?"Show":"Hide"," reasoning"]})]}),t?null:f.jsx("div",{className:"rounded-lg bg-surface4 p-2 border border-border-1",children:f.jsx("pre",{className:"whitespace-pre-wrap text-ui-sm leading-ui-sm text-neutral6",children:e})})]})},Axe=e=>f.jsx("svg",{className:"h-3 w-3",viewBox:"0 0 320 320",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",...e,children:f.jsx("path",{d:"m297.06 130.97c7.26-21.79 4.76-45.66-6.85-65.48-17.46-30.4-52.56-46.04-86.84-38.68-15.25-17.18-37.16-26.95-60.13-26.81-35.04-.08-66.13 22.48-76.91 55.82-22.51 4.61-41.94 18.7-53.31 38.67-17.59 30.32-13.58 68.54 9.92 94.54-7.26 21.79-4.76 45.66 6.85 65.48 17.46 30.4 52.56 46.04 86.84 38.68 15.24 17.18 37.16 26.95 60.13 26.8 35.06.09 66.16-22.49 76.94-55.86 22.51-4.61 41.94-18.7 53.31-38.67 17.57-30.32 13.55-68.51-9.94-94.51zm-120.28 168.11c-14.03.02-27.62-4.89-38.39-13.88.49-.26 1.34-.73 1.89-1.07l63.72-36.8c3.26-1.85 5.26-5.32 5.24-9.07v-89.83l26.93 15.55c.29.14.48.42.52.74v74.39c-.04 33.08-26.83 59.9-59.91 59.97zm-128.84-55.03c-7.03-12.14-9.56-26.37-7.15-40.18.47.28 1.3.79 1.89 1.13l63.72 36.8c3.23 1.89 7.23 1.89 10.47 0l77.79-44.92v31.1c.02.32-.13.63-.38.83l-64.41 37.19c-28.69 16.52-65.33 6.7-81.92-21.95zm-16.77-139.09c7-12.16 18.05-21.46 31.21-26.29 0 .55-.03 1.52-.03 2.2v73.61c-.02 3.74 1.98 7.21 5.23 9.06l77.79 44.91-26.93 15.55c-.27.18-.61.21-.91.08l-64.42-37.22c-28.63-16.58-38.45-53.21-21.95-81.89zm221.26 51.49-77.79-44.92 26.93-15.54c.27-.18.61-.21.91-.08l64.42 37.19c28.68 16.57 38.51 53.26 21.94 81.94-7.01 12.14-18.05 21.44-31.2 26.28v-75.81c.03-3.74-1.96-7.2-5.2-9.06zm26.8-40.34c-.47-.29-1.3-.79-1.89-1.13l-63.72-36.8c-3.23-1.89-7.23-1.89-10.47 0l-77.79 44.92v-31.1c-.02-.32.13-.63.38-.83l64.41-37.16c28.69-16.55 65.37-6.7 81.91 22 6.99 12.12 9.52 26.31 7.15 40.1zm-168.51 55.43-26.94-15.55c-.29-.14-.48-.42-.52-.74v-74.39c.02-33.12 26.89-59.96 60.01-59.94 14.01 0 27.57 4.92 38.34 13.88-.49.26-1.33.73-1.89 1.07l-63.72 36.8c-3.26 1.85-5.26 5.31-5.24 9.06l-.04 89.79zm14.63-31.54 34.65-20.01 34.65 20v40.01l-34.65 20-34.65-20z"})}),i$r=e=>f.jsx("svg",{className:"h-3 w-3",viewBox:"0 0 320 320",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",...e,children:f.jsx("path",{d:"m297.06 130.97c7.26-21.79 4.76-45.66-6.85-65.48-17.46-30.4-52.56-46.04-86.84-38.68-15.25-17.18-37.16-26.95-60.13-26.81-35.04-.08-66.13 22.48-76.91 55.82-22.51 4.61-41.94 18.7-53.31 38.67-17.59 30.32-13.58 68.54 9.92 94.54-7.26 21.79-4.76 45.66 6.85 65.48 17.46 30.4 52.56 46.04 86.84 38.68 15.24 17.18 37.16 26.95 60.13 26.8 35.06.09 66.16-22.49 76.94-55.86 22.51-4.61 41.94-18.7 53.31-38.67 17.57-30.32 13.55-68.51-9.94-94.51zm-120.28 168.11c-14.03.02-27.62-4.89-38.39-13.88.49-.26 1.34-.73 1.89-1.07l63.72-36.8c3.26-1.85 5.26-5.32 5.24-9.07v-89.83l26.93 15.55c.29.14.48.42.52.74v74.39c-.04 33.08-26.83 59.9-59.91 59.97zm-128.84-55.03c-7.03-12.14-9.56-26.37-7.15-40.18.47.28 1.3.79 1.89 1.13l63.72 36.8c3.23 1.89 7.23 1.89 10.47 0l77.79-44.92v31.1c.02.32-.13.63-.38.83l-64.41 37.19c-28.69 16.52-65.33 6.7-81.92-21.95zm-16.77-139.09c7-12.16 18.05-21.46 31.21-26.29 0 .55-.03 1.52-.03 2.2v73.61c-.02 3.74 1.98 7.21 5.23 9.06l77.79 44.91-26.93 15.55c-.27.18-.61.21-.91.08l-64.42-37.22c-28.63-16.58-38.45-53.21-21.95-81.89zm221.26 51.49-77.79-44.92 26.93-15.54c.27-.18.61-.21.91-.08l64.42 37.19c28.68 16.57 38.51 53.26 21.94 81.94-7.01 12.14-18.05 21.44-31.2 26.28v-75.81c.03-3.74-1.96-7.2-5.2-9.06zm26.8-40.34c-.47-.29-1.3-.79-1.89-1.13l-63.72-36.8c-3.23-1.89-7.23-1.89-10.47 0l-77.79 44.92v-31.1c-.02-.32.13-.63.38-.83l64.41-37.16c28.69-16.55 65.37-6.7 81.91 22 6.99 12.12 9.52 26.31 7.15 40.1zm-168.51 55.43-26.94-15.55c-.29-.14-.48-.42-.52-.74v-74.39c.02-33.12 26.89-59.96 60.01-59.94 14.01 0 27.57 4.92 38.34 13.88-.49.26-1.33.73-1.89 1.07l-63.72 36.8c-3.26 1.85-5.26 5.31-5.24 9.06l-.04 89.79zm14.63-31.54 34.65-20.01 34.65 20v40.01l-34.65 20-34.65-20z"})}),o$r=e=>f.jsx("svg",{className:"h-3 w-3",fill:"white",height:"78",strokeLinejoin:"round",viewBox:"0 0 16 16",width:"78",style:{color:"currentcolor"},...e,children:f.jsx("g",{transform:"translate(0,2)",children:f.jsx("path",{d:"M11.375 0h-2.411L13.352 11.13h2.411L11.375 0ZM4.4 0 0 11.13h2.46l0.9-2.336h4.604l0.9 2.336h2.46L6.924 0H4.4Zm-0.244 6.723 1.506-3.909 1.506 3.909H4.156Z",fill:"currentColor"})})}),a$r=e=>f.jsx("svg",{className:"h-3 w-3",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",...e,children:f.jsx("path",{d:"M7.402 13.8777C9.45763 13.4674 11.1555 13.128 11.175 13.1233L11.2104 13.1148L9.2697 10.507C8.2023 9.07276 7.32898 7.8937 7.32898 7.88691C7.32898 7.87404 9.33293 1.63997 9.3442 1.61779C9.34797 1.61037 10.7117 4.27017 12.65 8.06532C14.4647 11.6184 15.9608 14.5479 15.9747 14.5754L16 14.6253L9.83224 14.6244L3.66449 14.6235L7.402 13.8777ZM0 13.0824C0 13.0787 0.914457 11.2855 2.03212 9.09735L4.06425 5.11896L6.43245 2.87384C7.73497 1.63902 8.80417 0.627201 8.80845 0.625356C8.81274 0.623511 8.79561 0.672228 8.77038 0.733617C8.74515 0.795006 7.58796 3.59893 6.19884 6.96455L3.67317 13.0839L1.83659 13.0865C0.826464 13.0879 0 13.0861 0 13.0824Z",fill:"#0089D6",style:{fill:"#0089D6",fillOpacity:1}})}),l$r=e=>f.jsxs("svg",{className:"h-3 w-3",width:"16",height:"16",viewBox:"0 0 181 108",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[f.jsxs("g",{clipPath:"url(#clip0_1480_1723)",children:[f.jsx("path",{d:"M51.2203 39.3158C51.2203 41.5066 51.4572 43.2829 51.8717 44.5856C52.3453 45.8882 52.9374 47.3093 53.7664 48.8487C54.0624 49.3224 54.1809 49.7961 54.1809 50.2106C54.1809 50.8027 53.8256 51.3948 53.0559 51.9869L49.3256 54.4737C48.7927 54.829 48.2598 55.0066 47.7861 55.0066C47.194 55.0066 46.6019 54.7106 46.0098 54.1777C45.1809 53.2895 44.4703 52.3422 43.8782 51.3948C43.2861 50.3882 42.694 49.2632 42.0427 47.9014C37.4243 53.3487 31.6217 56.0724 24.6348 56.0724C19.6611 56.0724 15.694 54.6514 12.7927 51.8093C9.8914 48.9672 8.41113 45.1777 8.41113 40.4408C8.41113 35.4079 10.1874 31.3224 13.7993 28.2435C17.4111 25.1645 22.2072 23.6251 28.3059 23.6251C30.319 23.6251 32.3914 23.8027 34.5822 24.0987C36.773 24.3948 39.023 24.8685 41.3914 25.4014V21.079C41.3914 16.579 40.444 13.4408 38.6085 11.6053C36.7138 9.76979 33.5164 8.88163 28.9572 8.88163C26.8848 8.88163 24.7532 9.11847 22.5624 9.65137C20.3717 10.1843 18.2401 10.8356 16.1677 11.6645C15.2203 12.079 14.5098 12.3158 14.0953 12.4343C13.6809 12.5527 13.3848 12.6119 13.148 12.6119C12.319 12.6119 11.9046 12.0198 11.9046 10.7764V7.87505C11.9046 6.92768 12.023 6.21716 12.319 5.80268C12.6151 5.38821 13.148 4.97374 13.9769 4.55926C16.0493 3.49347 18.5361 2.60531 21.4374 1.89479C24.3388 1.12505 27.4177 0.769788 30.6743 0.769788C37.7203 0.769788 42.8717 2.36847 46.1875 5.56584C49.444 8.76321 51.1019 13.6185 51.1019 20.1316V39.3158H51.2203ZM27.1809 48.3158C29.1348 48.3158 31.148 47.9606 33.2796 47.2501C35.4111 46.5395 37.3059 45.2369 38.9046 43.4606C39.8519 42.3356 40.5625 41.0922 40.9177 39.6711C41.273 38.2501 41.5098 36.5329 41.5098 34.5198V32.0329C39.7927 31.6185 37.9572 31.2632 36.0624 31.0264C34.1677 30.7895 32.3322 30.6711 30.4967 30.6711C26.5296 30.6711 23.6282 31.4408 21.6743 33.0395C19.7203 34.6382 18.773 36.8882 18.773 39.8487C18.773 42.6316 19.4835 44.704 20.9638 46.1251C22.3848 47.6053 24.4572 48.3158 27.1809 48.3158ZM74.7269 54.7106C73.6611 54.7106 72.9506 54.5329 72.4769 54.1185C72.0032 53.7632 71.5888 52.9343 71.2335 51.8093L57.319 6.03953C56.9638 4.85531 56.7861 4.08558 56.7861 3.6711C56.7861 2.72374 57.2598 2.19084 58.2072 2.19084H64.0098C65.1348 2.19084 65.9046 2.36847 66.319 2.78295C66.7927 3.13821 67.148 3.96716 67.5032 5.09216L77.4506 44.2895L86.6874 5.09216C86.9835 3.90795 87.3388 3.13821 87.8124 2.78295C88.2861 2.42768 89.1151 2.19084 90.1809 2.19084H94.9177C96.0427 2.19084 96.8124 2.36847 97.2861 2.78295C97.7598 3.13821 98.1743 3.96716 98.4111 5.09216L107.766 44.7632L118.01 5.09216C118.365 3.90795 118.78 3.13821 119.194 2.78295C119.668 2.42768 120.437 2.19084 121.503 2.19084H127.01C127.957 2.19084 128.49 2.66453 128.49 3.6711C128.49 3.96716 128.431 4.26321 128.372 4.61847C128.312 4.97374 128.194 5.44742 127.957 6.09874L113.687 51.8685C113.332 53.0527 112.918 53.8224 112.444 54.1777C111.97 54.5329 111.201 54.7698 110.194 54.7698H105.102C103.977 54.7698 103.207 54.5922 102.733 54.1777C102.26 53.7632 101.845 52.9935 101.608 51.8093L92.4309 13.6185L83.3125 51.7501C83.0164 52.9343 82.6611 53.704 82.1874 54.1185C81.7138 54.5329 80.8848 54.7106 79.819 54.7106H74.7269ZM150.812 56.3093C147.734 56.3093 144.655 55.954 141.694 55.2435C138.733 54.5329 136.424 53.7632 134.885 52.8751C133.937 52.3422 133.286 51.7501 133.049 51.2172C132.812 50.6843 132.694 50.0922 132.694 49.5593V46.5395C132.694 45.2961 133.168 44.704 134.056 44.704C134.411 44.704 134.766 44.7632 135.122 44.8816C135.477 45.0001 136.01 45.2369 136.602 45.4737C138.615 46.3619 140.806 47.0724 143.115 47.5461C145.484 48.0198 147.793 48.2566 150.161 48.2566C153.891 48.2566 156.793 47.6053 158.806 46.3027C160.819 45 161.885 43.1053 161.885 40.6777C161.885 39.0198 161.352 37.6579 160.286 36.5329C159.22 35.4079 157.207 34.4014 154.306 33.454L145.72 30.7895C141.398 29.4277 138.201 27.4145 136.247 24.7501C134.293 22.1448 133.286 19.2435 133.286 16.1645C133.286 13.6777 133.819 11.4869 134.885 9.59216C135.951 7.69742 137.372 6.03953 139.148 4.73689C140.924 3.37505 142.937 2.36847 145.306 1.65795C147.674 0.94742 150.161 0.651367 152.766 0.651367C154.069 0.651367 155.431 0.710578 156.734 0.888209C158.095 1.06584 159.339 1.30268 160.582 1.53953C161.766 1.83558 162.891 2.13163 163.957 2.48689C165.023 2.84216 165.852 3.19742 166.444 3.55268C167.273 4.02637 167.865 4.50005 168.22 5.03295C168.576 5.50663 168.753 6.15795 168.753 6.98689V9.76979C168.753 11.0132 168.28 11.6645 167.391 11.6645C166.918 11.6645 166.148 11.4277 165.141 10.954C161.766 9.41453 157.977 8.64479 153.773 8.64479C150.398 8.64479 147.734 9.17768 145.898 10.3027C144.062 11.4277 143.115 13.1448 143.115 15.5724C143.115 17.2303 143.707 18.6514 144.891 19.7764C146.076 20.9014 148.266 22.0264 151.405 23.0329L159.812 25.6974C164.076 27.0593 167.155 28.954 168.99 31.3816C170.826 33.8093 171.714 36.5922 171.714 39.6711C171.714 42.2172 171.181 44.5264 170.174 46.5395C169.108 48.5527 167.687 50.329 165.852 51.7501C164.016 53.2303 161.826 54.2961 159.28 55.0658C156.615 55.8948 153.832 56.3093 150.812 56.3093Z",fill:"currentColor"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M162.004 85.0856C142.524 99.4738 114.221 107.112 89.8855 107.112C55.7803 107.112 25.05 94.5001 1.83948 73.5396C0.00394917 71.8817 1.66184 69.6317 3.85263 70.9343C28.9579 85.5001 59.925 94.3225 91.9579 94.3225C113.57 94.3225 137.313 89.8225 159.162 80.5856C162.418 79.1054 165.201 82.7172 162.004 85.0856Z",fill:"#FF9900"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M170.115 75.8487C167.628 72.6513 153.654 74.3092 147.319 75.079C145.424 75.3158 145.128 73.6579 146.845 72.4145C157.976 64.5987 176.272 66.8487 178.404 69.454C180.536 72.1184 177.812 90.4145 167.391 99.1776C165.792 100.539 164.253 99.8289 164.963 98.0526C167.332 92.1908 172.601 78.9868 170.115 75.8487Z",fill:"#FF9900"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_1480_1723",children:f.jsx("rect",{width:"180",height:"107.763",fill:"white",transform:"translate(0.0625)"})})})]}),c$r=e=>f.jsxs("svg",{className:"h-3 w-3",xmlns:"http://www.w3.org/2000/svg",width:"17",height:"18",fill:"none",...e,children:[f.jsx("mask",{id:"mask0_174_2406",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"17",height:"18",children:f.jsx("path",{d:"M17 0.5H0V17.5H17V0.5Z",fill:"white"})}),f.jsxs("g",{mask:"url(#mask0_174_2406)",children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.50773 10.6219C5.9653 10.6219 6.8755 10.5968 8.13362 10.0788C9.59973 9.47518 12.5166 8.37942 14.6208 7.2539C16.0924 6.46668 16.7375 5.42553 16.7375 4.02344C16.7375 2.07751 15.16 0.5 13.2141 0.5H5.06095C2.26586 0.5 0 2.76586 0 5.56095C0 8.35604 2.12151 10.6219 5.50773 10.6219Z",fill:"#39594D"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.88672 14.107C6.88672 12.7369 7.71155 11.5016 8.97699 10.9764L11.5446 9.9108C14.1417 8.83294 17.0003 10.7415 17.0003 13.5535C17.0003 15.732 15.2339 17.4979 13.0553 17.4973L10.2754 17.4966C8.40372 17.4961 6.88672 15.9787 6.88672 14.107Z",fill:"#D18EE2"}),f.jsx("path",{d:"M2.91749 11.2891C1.30623 11.2891 0 12.5952 0 14.2065V14.5844C0 16.1956 1.30618 17.5018 2.91744 17.5018C4.5287 17.5018 5.83493 16.1956 5.83493 14.5844V14.2065C5.83493 12.5952 4.52875 11.2891 2.91749 11.2891Z",fill:"#FF7759"})]})]}),u$r=e=>f.jsxs("svg",{className:"h-3 w-3","data-testid":"geist-icon",height:"78",strokeLinejoin:"round",viewBox:"0 0 160 59",width:"104",style:{color:"currentcolor"},...e,children:[f.jsx("mask",{id:"mask0_4345_1846",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"160",height:"59",style:{maskType:"luminance"},children:f.jsx("path",{d:"M0.273438 0.219727H159.216V58.1817H0.273438V0.219727Z",fill:"white"})}),f.jsx("g",{mask:"url(#mask0_4345_1846)",children:f.jsx("path",{d:"M95.4635 0.314595C84.4822 0.314595 75.5599 9.19525 75.5599 20.1677C75.5599 31.1402 84.4632 40.0208 95.4635 40.0208C106.464 40.0208 115.367 31.1402 115.367 20.1677C115.348 9.21427 106.445 0.333611 95.4635 0.314595ZM95.4635 32.5664C88.6002 32.5664 83.0333 27.0136 83.0333 20.1677C83.0333 13.3218 88.6002 7.76902 95.4635 7.76902C102.327 7.76902 107.894 13.3218 107.894 20.1677C107.894 27.0136 102.327 32.5664 95.4635 32.5664ZM67.9912 0.39066C67.3049 0.314595 66.6376 0.276562 65.9513 0.276562C65.6081 0.276562 65.284 0.276562 64.9599 0.295578C64.6358 0.314595 64.2926 0.333611 63.9685 0.352628C62.634 0.44771 61.2995 0.675906 60.0031 1.03722C57.3531 1.74082 54.8556 2.99591 52.7013 4.68836C50.4898 6.43787 48.7358 8.68181 47.5347 11.23C46.9437 12.5041 46.5052 13.8543 46.2193 15.2234C46.0858 15.908 45.9905 16.5926 45.9142 17.2772C45.8952 17.6195 45.857 17.9618 45.857 18.3041L45.838 18.8175V19.293L45.8761 32.5854L45.9142 39.2221H53.3685L53.4067 32.5854L53.4448 19.293V18.5893C53.4448 18.3802 53.4829 18.171 53.4829 17.9618C53.5211 17.5434 53.5973 17.1441 53.6736 16.7257C53.8452 15.9271 54.093 15.1474 54.4362 14.4057C55.1225 12.9225 56.152 11.6293 57.4293 10.6025C58.7639 9.53755 60.3081 8.75787 61.9477 8.3205C62.7865 8.0923 63.6635 7.94017 64.5405 7.8641C64.7693 7.84509 64.979 7.82607 65.2078 7.82607C65.4365 7.82607 65.6653 7.80705 65.875 7.80705C66.2944 7.80705 66.7329 7.82607 67.1524 7.8641C68.8491 8.03525 70.4887 8.54869 71.9948 9.38541L75.7124 2.93886C73.3484 1.56968 70.7175 0.694923 67.9912 0.39066ZM20.3484 0.219513C9.36711 0.124431 0.36855 8.92902 0.273226 19.8825C0.177902 30.8359 9.00488 39.8116 19.9862 39.9067H26.8876V32.4713H20.3484C13.4851 32.5474 7.84193 27.0707 7.76567 20.2057C7.68941 13.3408 13.1801 7.73099 20.0624 7.65492H20.3484C27.2117 7.65492 32.7786 13.2077 32.8167 20.0536V38.3284C32.8167 45.1172 27.2689 50.651 20.4819 50.7271C17.2218 50.708 14.1142 49.3959 11.8265 47.0949L6.54553 52.3625C10.206 56.0326 15.1628 58.1244 20.3484 58.1625H20.6153C31.4632 58.0103 40.1757 49.2248 40.2329 38.4044V19.5592C39.966 8.81492 31.1391 0.238529 20.3484 0.219513ZM139.389 0.314595C128.407 0.314595 119.485 9.19525 119.504 20.1677C119.504 31.1212 128.407 40.0018 139.389 40.0018H146.195V32.5664H139.389C132.525 32.5664 126.958 27.0136 126.958 20.1677C126.958 13.3218 132.525 7.76902 139.389 7.76902C145.833 7.76902 151.209 12.6943 151.781 19.1028H151.762V57.2116H159.216V20.1677C159.216 9.21427 150.351 0.314595 139.389 0.314595Z",fill:"currentColor"})})]}),d$r=e=>f.jsx("svg",{className:"h-3 w-3",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1000 1000",width:"78",height:"78",style:{color:"currentcolor"},...e,children:f.jsxs("g",{children:[f.jsx("polygon",{fill:"currentColor",points:"226.83 411.15 501.31 803.15 623.31 803.15 348.82 411.15 226.83 411.15"}),f.jsx("polygon",{fill:"currentColor",points:"348.72 628.87 226.69 803.15 348.77 803.15 409.76 716.05 348.72 628.87"}),f.jsx("polygon",{fill:"currentColor",points:"651.23 196.85 440.28 498.12 501.32 585.29 773.31 196.85 651.23 196.85"}),f.jsx("polygon",{fill:"currentColor",points:"673.31 383.25 673.31 803.15 773.31 803.15 773.31 240.44 673.31 383.25"})]})}),f$r=e=>f.jsxs("svg",{className:"h-3 w-3",xmlns:"http://www.w3.org/2000/svg",width:"176",height:"162",viewBox:"0 0 176 162",fill:"none",...e,children:[f.jsx("rect",{x:"15",y:"1",width:"32",height:"32",fill:"#FFCD00",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"143",y:"1",width:"32",height:"32",fill:"#FFCD00",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"15",y:"33",width:"32",height:"32",fill:"#FFA400",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"47",y:"33",width:"32",height:"32",fill:"#FFA400",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"111",y:"33",width:"32",height:"32",fill:"#FFA400",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"143",y:"33",width:"32",height:"32",fill:"#FFA400",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"15",y:"65",width:"32",height:"32",fill:"#FF7100",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"47",y:"65",width:"32",height:"32",fill:"#FF7100",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"79",y:"65",width:"32",height:"32",fill:"#FF7100",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"111",y:"65",width:"32",height:"32",fill:"#FF7100",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"143",y:"65",width:"32",height:"32",fill:"#FF7100",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"15",y:"97",width:"32",height:"32",fill:"#FF4902",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"79",y:"97",width:"32",height:"32",fill:"#FF4902",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"143",y:"97",width:"32",height:"32",fill:"#FF4902",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"15",y:"129",width:"32",height:"32",fill:"#FF0006",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"143",y:"129",width:"32",height:"32",fill:"#FF0006",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{y:"1",width:"16",height:"160",fill:"black"}),f.jsx("rect",{x:"63",y:"97",width:"16",height:"32",fill:"black"}),f.jsx("rect",{x:"95",y:"33",width:"16",height:"32",fill:"black"}),f.jsx("rect",{x:"127",y:"1",width:"16",height:"32",fill:"black"}),f.jsx("rect",{x:"127",y:"97",width:"16",height:"64",fill:"black"})]}),p$r=e=>f.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"128",height:"113",viewBox:"0 0 128 113",children:[f.jsxs("g",{clipPath:"url(#clip0_236_138)",...e,children:[f.jsx("path",{d:"M34.593 94.0509H33.3844L27.3514 88.0179V86.8094L36.5743 77.5866H42.9639L43.8158 78.4385V84.8281L34.593 94.0509Z",fill:e.fill||"#05BDBA"}),f.jsx("path",{d:"M27.3514 25.816V24.6074L33.3844 18.5744H34.593L43.8158 27.7972V34.1868L42.9639 35.0388H36.5743L27.3514 25.816Z",fill:e.fill||"#05BDBA"}),f.jsx("path",{d:"M80.4594 74.6047H71.6824L70.9493 73.8717V53.3259C70.9493 49.6705 69.5129 46.8372 65.1046 46.7382C62.836 46.6787 60.2405 46.7382 57.4668 46.8471L57.0507 47.2731V73.8618L56.3176 74.5948H47.5406L46.8075 73.8618V38.7636L47.5406 38.0305H67.2939C74.9713 38.0305 81.1925 44.2517 81.1925 51.9291V73.8717L80.4594 74.6047Z",fill:e.fill||"#014847"}),f.jsx("path",{d:"M35.8412 61.4491H0.73307L0 60.716V51.9192L0.73307 51.1861H35.8412L36.5743 51.9192V60.716L35.8412 61.4491Z",fill:e.fill||"#05BDBA"}),f.jsx("path",{d:"M127.277 61.4491H92.1687L91.4356 60.716V51.9192L92.1687 51.1861H127.277L128.01 51.9192V60.716L127.277 61.4491Z",fill:e.fill||"#05BDBA"}),f.jsx("path",{d:"M58.9428 27.0642V0.73307L59.6759 0H68.4727L69.2058 0.73307V27.0642L68.4727 27.7972H59.6759L58.9428 27.0642Z",fill:e.fill||"#05BDBA"}),f.jsx("path",{d:"M58.9428 111.902V85.5711L59.6759 84.838H68.4727L69.2058 85.5711V111.902L68.4727 112.635H59.6759L58.9428 111.902Z",fill:e.fill||"#05BDBA"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_236_138",children:f.jsx("rect",{width:"128",height:"112.635",fill:"white"})})})]}),U4={"openai.chat":f.jsx(Axe,{}),"openai.responses":f.jsx(Axe,{}),"anthropic.chat":f.jsx(i$r,{}),"anthropic.messages":f.jsx(o$r,{}),AZURE:f.jsx(a$r,{}),AMAZON:f.jsx(l$r,{}),GOOGLE:f.jsx(S2r,{}),COHERE:f.jsx(c$r,{}),GROQ:f.jsx(u$r,{}),X_GROK:f.jsx(d$r,{}),MISTRAL:f.jsx(f$r,{}),netlify:f.jsx(p$r,{fill:"white"})},yf=e=>e.includes(".")?e.split(".")[0]:e,nq=({providerId:e,className:t="",size:r=20})=>{const[n,s]=E.useState(!1),i=yf(e),o=i.replace(/\//g,"-").toLowerCase(),l=(u=>({openai:"openai.chat",anthropic:"anthropic.messages",google:"GOOGLE",xai:"X_GROK",groq:"GROQ",deepseek:"deepseek",together:"together",mistral:"mistral",perplexity:"perplexity",fireworks_ai:"fireworks",openrouter:"openrouter",netlify:"netlify"})[u]||"DEFAULT")(i);return["netlify"].includes(o)||n||!e?U4[l]?f.jsx(qe,{children:U4[l]}):f.jsx("div",{className:`w-[${r}px] h-[${r}px] bg-gray-200 rounded ${t}`}):f.jsx("img",{src:`https://models.dev/logos/${o}.svg`,alt:`${e} logo`,width:r,height:r,className:t,onError:()=>s(!0),loading:"lazy",style:{width:`${r}px`,height:`${r}px`,objectFit:"contain",filter:"brightness(0) invert(1)",opacity:.9}})},h$r=({hasModelList:e})=>{const t=OEe(),r=t.id,n=t.content.every(({type:o,metadata:a})=>o==="tool-call"||o==="reasoning"||o==="text"&&a?.mode==="network"&&a?.completionResult),s=t.metadata?.custom?.modelMetadata,i=e&&s;return f.jsxs(JW,{className:"max-w-full","data-message-id":r,children:[f.jsx("div",{className:"text-neutral6 text-ui-lg leading-ui-lg",children:f.jsx(KW,{components:{Text:R2r,tools:{Fallback:iqe},Reasoning:s$r}})}),!n&&f.jsxs("div",{className:re("h-6 pt-4 flex gap-2 items-center",{"pb-1":i}),children:[i&&f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx(nq,{providerId:s.modelProvider,size:14}),f.jsxs("span",{className:"text-ui-xs leading-ui-xs",children:[s.modelProvider,"/",s.modelId]})]}),f.jsx(m$r,{})]})]})},m$r=()=>f.jsxs(NEe,{hideWhenRunning:!0,autohide:"always",autohideFloat:"single-branch",className:"flex gap-1 items-center transition-all relative",children:[f.jsx(D_,{speaking:!1,children:f.jsx(Uit,{asChild:!0,children:f.jsx(Sd,{tooltip:"Read aloud",children:f.jsx(Bct,{})})})}),f.jsx(D_,{speaking:!0,children:f.jsx(MEe,{asChild:!0,children:f.jsx(Sd,{tooltip:"Stop",children:f.jsx(nTe,{})})})}),f.jsx(REe,{asChild:!0,children:f.jsxs(Sd,{tooltip:"Copy",className:"bg-transparent text-neutral3 hover:text-neutral6",children:[f.jsx(D_,{copied:!0,children:f.jsx(lu,{})}),f.jsx(D_,{copied:!1,children:f.jsx(cu,{})})]})})]}),Q4="h-full w-full flex items-center justify-center",oqe=({data:e,url:t})=>{const[r,n]=E.useState(!1);return t?f.jsx("a",{href:t,className:Q4,target:"_blank",rel:"noreferrer noopener",children:f.jsx(VB,{className:"text-accent2","aria-label":"View PDF"})}):f.jsxs(f.Fragment,{children:[f.jsx("button",{onClick:()=>n(!0),className:Q4,type:"button",children:f.jsx(VB,{className:"text-accent2","aria-label":"View PDF"})}),f.jsx(g$r,{data:e,open:r,onOpenChange:n})]})},g$r=({data:e,open:t,onOpenChange:r})=>f.jsx(qo,{open:t,onOpenChange:r,children:f.jsxs(So,{className:"max-w-4xl",children:[f.jsxs(Oo,{children:[f.jsx(ko,{children:"PDF preview"}),f.jsx(Eo,{children:"Preview of the PDF document"})]}),f.jsx(_o,{children:t&&f.jsx("iframe",{src:e,width:"100%",height:"600px"})})]})}),aqe=({src:e})=>{const[t,r]=E.useState(!1);return f.jsxs(f.Fragment,{children:[f.jsx("button",{onClick:()=>r(!0),type:"button",className:Q4,children:f.jsx("img",{src:e,className:"object-cover aspect-ratio max-h-[140px] max-w-[320px]",alt:"Preview"})}),f.jsx(y$r,{src:e,open:t,onOpenChange:r})]})},y$r=({src:e,open:t,onOpenChange:r})=>f.jsx(qo,{open:t,onOpenChange:r,children:f.jsxs(So,{className:"max-w-4xl",children:[f.jsxs(Oo,{children:[f.jsx(ko,{children:"Image preview"}),f.jsx(Eo,{children:"Preview of the image"})]}),f.jsx(_o,{children:t&&f.jsx("img",{src:e,alt:"Image"})})]})}),lqe=({data:e})=>{const[t,r]=E.useState(!1),n=e.replace(/<attachment[^>]*>/,"").replace(/<\/attachment>/g,"");return f.jsxs(f.Fragment,{children:[f.jsx("button",{onClick:()=>r(!0),className:Q4,type:"button",children:f.jsx(VB,{className:"text-neutral3"})}),f.jsx(v$r,{data:n,open:t,onOpenChange:r})]})},v$r=({data:e,open:t,onOpenChange:r})=>f.jsx(qo,{open:t,onOpenChange:r,children:f.jsxs(So,{className:"max-w-4xl h-[80vh]",children:[f.jsxs(Oo,{children:[f.jsx(ko,{children:"Text preview"}),f.jsx(Eo,{children:"Preview of the text file"})]}),f.jsx(_o,{children:t&&f.jsx("div",{className:"whitespace-pre-wrap",children:e})})]})}),Gz=({type:e,contentType:t,nameSlot:r,src:n,data:s})=>f.jsx(YN,{children:f.jsxs(Ss,{children:[f.jsx(Os,{asChild:!0,children:f.jsx("div",{className:"h-full w-full overflow-hidden rounded-lg",children:e==="image"?f.jsx(aqe,{src:n??""}):e==="document"&&t==="application/pdf"?f.jsx(oqe,{data:s??"",url:n}):f.jsx(lqe,{data:s??""})})}),f.jsx(is,{side:"top",children:r})]})}),b$r=()=>{const t=OEe()?.id;return f.jsx(JW,{className:"w-full flex items-end pb-4 flex-col","data-message-id":t,children:f.jsx("div",{className:"max-w-[366px] px-5 py-3 text-neutral6 text-ui-lg leading-ui-lg rounded-lg bg-surface3",children:f.jsx(KW,{components:{File:r=>{const n=r.data,s=n?.startsWith("https://");return f.jsx(Gz,{type:"document",contentType:r.mimeType,nameSlot:"Unknown filename",src:s?n:void 0,data:r.data})},Image:r=>f.jsx(Gz,{type:"image",nameSlot:"Unknown filename",src:r.image}),Text:r=>r.text.includes("<attachment name=")?f.jsx(Gz,{type:"document",contentType:"text/plain",nameSlot:"Unknown filename",src:void 0,data:r.text}):r.text}})})})};async function x$r(e){const t=await navigator.mediaDevices.getUserMedia({audio:!0}),r=new MediaRecorder(t);let n=[];return r.ondataavailable=s=>{n.push(s.data)},r.onstop=()=>{const s=new Blob(n,{type:"audio/webm"}),i=new File([s],`recording-${Date.now()}.webm`,{type:"audio/webm",lastModified:Date.now()});t.getTracks().forEach(o=>o.stop()),e(i)},r}const w$r=({language:e="en-US",agentId:t})=>{const r=rr(),[n,s]=E.useState(null),{requestContext:i}=Qn();E.useEffect(()=>{if(!t)return;const g=r.getAgent(t);(async()=>{try{(await g.voice.getSpeakers(i)).length>0?s(g):s(null)}catch{s(null)}})()},[t]);const{start:o,stop:a,isListening:l,transcript:c}=S$r({language:e}),{start:u,stop:d,isListening:p,transcript:m}=O$r({agent:n});return n?{start:u,stop:d,isListening:p,transcript:m}:{start:o,stop:a,isListening:l,transcript:c}},S$r=({language:e="en-US"})=>{const t=E.useRef(null),[r,n]=E.useState({isListening:!1,transcript:"",error:null}),s=()=>{t.current&&t.current.start()},i=()=>{t.current&&t.current.stop()};return E.useEffect(()=>{if(!("webkitSpeechRecognition"in window)&&!("SpeechRecognition"in window)){n(l=>({...l,error:"Speech Recognition not supported in this browser"}));return}const o=window.SpeechRecognition||window.webkitSpeechRecognition,a=new o;t.current=a,a.continuous=!0,a.lang=e,a.onstart=()=>{n(l=>({...l,isListening:!0}))},a.onresult=l=>{let c="";for(let u=l.resultIndex;u<l.results.length;u++){const d=l.results[u][0].transcript;l.results[u].isFinal&&(c+=d+" ")}n(u=>({...u,transcript:c}))},a.onerror=l=>{n(c=>({...c,error:`Error: ${l.error}`}))},a.onend=()=>n(l=>({...l,isListening:!1}))},[e]),{...r,start:s,stop:i}},O$r=({agent:e})=>{const[t,r]=E.useState(""),[n,s]=E.useState(null);if(!e)return{start:()=>{},stop:()=>{},isListening:!1,transcript:""};const i=l=>{e.voice.listen(l).then(c=>{r(c.text)})};return{start:()=>{x$r(i).then(l=>{s(l),l.start()})},stop:()=>{n?.stop(),s(null)},isListening:!!n,transcript:t}},_$r=()=>{const e=$T(),[t,r]=E.useState(!1);return E.useEffect(()=>{e.subscribe(()=>{const n=e.getState().attachments;r(n.length>0)})},[e]),t},k$r=e=>{const[t,r]=E.useState(void 0);return E.useEffect(()=>{if(!e){r(void 0);return}const n=URL.createObjectURL(e);return r(n),()=>{URL.revokeObjectURL(n)}},[e]),t},E$r=()=>{const{file:e,src:t}=v$(MCe(r=>{if(r.file)return r.file.name.startsWith("https://")?{src:r.file.name}:{file:r.file};const n=r.content?.filter(s=>s.type==="image")[0]?.image;return n?{src:n}:{}}));return k$r(e)??t},C$r=e=>{const[t,r]=E.useState({isLoading:!1,text:""});return E.useEffect(()=>{if(!e)return;(async()=>{r(i=>({...i,isLoading:!0}));const s=await e.text();r(i=>({...i,isLoading:!1,text:s}))})()},[e]),t},cqe=async e=>new Promise((t,r)=>{const n=new FileReader;n.onload=()=>{const s=n.result;typeof s=="string"?t(s):r(new Error("Failed to convert file to base64."))},n.onerror=s=>{r(s)},n.readAsDataURL(e)}),T$r=({document:e})=>{const{isLoading:t,text:r}=C$r(e.file);return f.jsx("div",{className:"flex items-center justify-center h-full w-full",children:t?f.jsx(ea,{className:"animate-spin"}):f.jsx(lqe,{data:r})})},D$r=({document:e})=>{const[t,r]=E.useState({isLoading:!1,text:""});E.useEffect(()=>{let s=!1;return(async()=>{if(!e.file)return;r(a=>({...a,isLoading:!0}));const o=await cqe(e.file);s||r(a=>({...a,isLoading:!1,text:o}))})(),()=>{s=!0}},[e]);const n=e.file?.name.startsWith("https://");return f.jsx("div",{className:"flex items-center justify-center h-full w-full",children:t.isLoading?f.jsx(ea,{className:"animate-spin"}):f.jsx(oqe,{data:t.text,url:n?e.file?.name:void 0})})},A$r=()=>{const e=v$(o=>o.type==="image"),t=v$(o=>o.type==="document"?o:void 0),r=E$r(),n=v$(o=>o.source!=="message"),i=t?.file?.name.startsWith("https://")?t?.file?.name:r;return f.jsx(f.Fragment,{children:f.jsxs("div",{className:"relative",children:[f.jsx(YN,{children:f.jsxs(Ss,{children:[f.jsx(TCe,{children:f.jsx(Os,{asChild:!0,children:f.jsx("div",{className:"overflow-hidden size-16 rounded-lg bg-surface3 border border-border1 ",children:e?f.jsx(aqe,{src:i??""}):t?.contentType==="application/pdf"?f.jsx(D$r,{document:t}):t?f.jsx(T$r,{document:t}):null})})}),f.jsx(is,{side:"top",children:f.jsx(DCe,{})})]})}),n&&f.jsx(P$r,{})]})})},P$r=()=>f.jsx(Llt,{asChild:!0,children:f.jsx(Sd,{tooltip:"Remove file",className:"absolute -right-3 -top-3 text-neutral3 hover:text-neutral6 rounded-full bg-surface1 hover:bg-surface2 rounded-full p-1",side:"top",children:f.jsx(qe,{children:f.jsx(sTe,{})})})}),$$r=()=>_$r()?f.jsx("div",{className:"flex w-full flex-row items-center gap-4 pb-2",children:f.jsx(VCe,{components:{Attachment:A$r}})}):null,I$r=({multiple:e=!0,onChange:t}={})=>{const r=tit(i=>!i.isEditing),n=$T(),s=E.useCallback(()=>{const i=document.createElement("input");i.type="file",i.multiple=e,i.hidden=!0;const o=n.getState().attachmentAccept;o&&o!=="*"&&(i.accept=o),document.body.appendChild(i),i.onchange=a=>{const l=a.target.files;if(l){for(const c of l)n.addAttachment(c),t?.(Array.from(l));document.body.removeChild(i)}},i.oncancel=()=>{(!i.files||i.files.length===0)&&document.body.removeChild(i)},i.click()},[n,e]);if(!r)return s},N$r={jpg:"image/jpg",jpeg:"image/jpeg",png:"image/png",gif:"image/gif",webp:"image/webp",svg:"image/svg+xml",bmp:"image/bmp",ico:"image/x-icon",pdf:"application/pdf"},R$r=async e=>{try{const t=await fetch(e,{method:"HEAD"});if(!t.ok)throw new Error("Failed to get file content type");const r=t.headers.get("content-type");if(!r)throw new Error("Failed to get file content type");return r}catch{const n=new URL(e).pathname.split(".").pop();if(!n)return;const s=n.toLowerCase();return N$r[s]}},M$r=({onOpenChange:e,open:t})=>{const r=$T(),n=I$r({onChange:()=>e(!1)}),s=async i=>{i.preventDefault();const a=new FormData(i.target).get("url-attachment")?.toString();if(a){const l=new File([],a,{type:await R$r(a)});r.addAttachment(l),e(!1)}};return f.jsx(qo,{onOpenChange:e,open:t,children:f.jsxs(So,{children:[f.jsxs(Oo,{children:[f.jsx(ko,{children:"Add attachment"}),f.jsx(Eo,{children:"Add a file attachment via URL or from your computer"})]}),f.jsxs(_o,{children:[f.jsxs("form",{onSubmit:s,className:"flex flex-row items-end gap-4",children:[f.jsxs("div",{className:"w-full space-y-1",children:[f.jsx(hd,{htmlFor:"url-attachment",className:"text-neutral3 text-ui-md",children:"Public URL"}),f.jsx(To,{type:"text",name:"url-attachment",id:"url-attachment",className:"w-full",placeholder:"https://placehold.co/600x400/png"})]}),f.jsxs(Je,{type:"submit",className:"!h-8",variant:"light",children:[f.jsx(qe,{children:f.jsx(uTe,{})}),"Add"]})]}),f.jsx("hr",{className:"my-2 border border-border1"}),f.jsxs("div",{className:"space-y-2",children:[f.jsx(Ze,{variant:"ui-md",className:"text-neutral3",children:"Or from your computer"}),f.jsxs("button",{onClick:n,className:"w-full h-40 border border-border1 rounded-lg text-neutral3 border-dashed flex flex-col items-center justify-center gap-2 hover:bg-surface2 active:bg-surface3",children:[f.jsx(Mut,{className:"size-12"}),f.jsx(Ze,{variant:"header-md",children:"Add a local file"})]})]})]})]})})},uqe=E.createContext({threadInput:"",setThreadInput:()=>{}}),j$r=({children:e})=>{const[t,r]=E.useState("");return f.jsx(uqe.Provider,{value:{threadInput:t,setThreadInput:r},children:e})},dqe=()=>E.useContext(uqe),F$r=({agentName:e,agentId:t,hasMemory:r,hasModelList:n})=>{const s=E.useRef(null);zZe(s,{enabled:!0});const i=o=>f.jsx(h$r,{...o,hasModelList:n});return f.jsxs(L$r,{children:[f.jsxs(qCe,{ref:s,autoScroll:!1,className:"overflow-y-scroll scroll-smooth h-full",children:[f.jsx(z$r,{agentName:e}),f.jsx("div",{className:"max-w-3xl w-full mx-auto px-4 pb-7",children:f.jsx(Ect,{components:{UserMessage:b$r,EditComposer:Q$r,AssistantMessage:i}})}),f.jsx(II,{empty:!1,children:f.jsx("div",{})})]}),f.jsx(B$r,{hasMemory:r,agentId:t})]})},L$r=({children:e})=>f.jsx(UCe,{className:"grid grid-rows-[1fr_auto] h-full overflow-y-auto","data-testid":"thread-wrapper",children:e}),z$r=({agentName:e})=>f.jsx(QCe,{children:f.jsxs("div",{className:"flex w-full flex-grow flex-col items-center justify-center",children:[f.jsx(p2r,{name:e||"Agent",size:"lg"}),f.jsx("p",{className:"mt-4 font-medium",children:"How can I help you today?"})]})}),B$r=({hasMemory:e,agentId:t})=>{const{setThreadInput:r}=dqe(),n=E.useRef(null);return f.jsx("div",{className:"mx-4",children:f.jsxs(eG,{children:[f.jsx("div",{className:"max-w-3xl w-full mx-auto pb-2",children:f.jsx($$r,{})}),f.jsxs("div",{className:"bg-surface3 rounded-lg border border-border1 py-4 mt-auto max-w-3xl w-full mx-auto px-4 focus-within:outline focus-within:outline-accent1 -outline-offset-2",onClick:()=>{n.current?.focus()},children:[f.jsx(nG,{asChild:!0,className:"w-full",children:f.jsx("textarea",{ref:n,className:"text-ui-lg leading-ui-lg placeholder:text-neutral3 text-neutral6 bg-transparent focus:outline-none resize-none outline-none",autoFocus:document.activeElement===document.body,placeholder:"Enter your message...",name:"",id:"",onChange:s=>r?.(s.target.value)})}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsx(V$r,{agentId:t}),f.jsx(U$r,{})]})]})]})})},V$r=({agentId:e})=>{const t=$T(),{start:r,stop:n,isListening:s,transcript:i}=w$r({agentId:e});return E.useEffect(()=>{i&&t.setText(i)},[t,i]),f.jsx(Sd,{type:"button",tooltip:s?"Stop dictation":"Start dictation",className:"rounded-full",onClick:()=>s?n():r(),children:s?f.jsx(fqe,{}):f.jsx(Sdt,{className:"h-6 w-6 text-neutral3 hover:text-neutral6"})})},U$r=()=>{const[e,t]=E.useState(!1);return f.jsxs(f.Fragment,{children:[f.jsx(Sd,{type:"button",tooltip:"Add attachment",className:"rounded-full",onClick:()=>t(!0),children:f.jsx($0,{className:"h-6 w-6 text-neutral3 hover:text-neutral6"})}),f.jsx(M$r,{open:e,onOpenChange:t}),f.jsx(II,{running:!1,children:f.jsx(FCe,{asChild:!0,children:f.jsx(Sd,{tooltip:"Send",variant:"default",className:"rounded-full border border-border1 bg-surface5",children:f.jsx(JCe,{className:"h-6 w-6 text-neutral3 hover:text-neutral6"})})})}),f.jsx(II,{running:!0,children:f.jsx(zCe,{asChild:!0,children:f.jsx(Sd,{tooltip:"Cancel",variant:"default",children:f.jsx(fqe,{})})})})]})},Q$r=()=>f.jsxs(eG,{children:[f.jsx(nG,{}),f.jsxs("div",{children:[f.jsx(zCe,{asChild:!0,children:f.jsx("button",{className:"bg-surface2 border border-border1 px-2 text-ui-md inline-flex items-center justify-center rounded-md border h-form-sm gap-1 hover:bg-surface4 text-neutral3 hover:text-neutral6",children:"Cancel"})}),f.jsx(FCe,{asChild:!0,children:f.jsx("button",{className:"bg-surface2 border border-border1 px-2 text-ui-md inline-flex items-center justify-center rounded-md border h-form-sm gap-1 hover:bg-surface4 text-neutral3 hover:text-neutral6",children:"Send"})})]})]}),fqe=()=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:f.jsx("rect",{width:"10",height:"10",x:"3",y:"3",rx:"2"})});function Pxe(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function Z$r(e,t,r){const n=rr(),[s,i]=E.useState(!1),[o,a]=E.useState(null),[l,c]=E.useState("thread"),[u,d]=E.useState("markdown"),[p,m]=E.useState(!0),[g,v]=E.useState(!1),{requestContext:b}=Qn(),w=E.useCallback(async()=>{m(!0);try{if(!e||!t){a(null),m(!1);return}const O=await n.getWorkingMemory({agentId:e,threadId:t,resourceId:r,requestContext:b}),{workingMemory:k,source:C,workingMemoryTemplate:T,threadExists:P}=O;if(i(P),a(k),c(C),d(T?.format||"markdown"),T?.format==="json"){let A="";k?A=Pxe(k):T?.content?A=Pxe(T.content):A="",a(A)}else a(k||T?.content||"")}catch(O){a(null),console.error("Error fetching working memory",O)}finally{m(!1)}},[e,t,r]);return E.useEffect(()=>{w()},[w]),{threadExists:s,workingMemoryData:o,workingMemorySource:l,workingMemoryFormat:u,isLoading:p,isUpdating:g,refetch:w,updateWorkingMemory:async O=>{v(!0);try{if(u==="json")try{JSON.parse(O)}catch{throw new Error("Invalid JSON working memory")}await n.updateWorkingMemory({agentId:e,threadId:t,workingMemory:O,resourceId:r,requestContext:b}),w()}catch(k){throw console.error("Error updating working memory",k),k}finally{v(!1)}}}}const pqe=E.createContext({threadExists:!1,workingMemoryData:null,workingMemorySource:"thread",isLoading:!1,isUpdating:!1,updateWorkingMemory:()=>Promise.resolve(),refetch:()=>Promise.resolve()});function q$r({agentId:e,threadId:t,resourceId:r,children:n}){const s=Z$r(e,t,r);return f.jsx(pqe.Provider,{value:s,children:n})}function hqe(){const e=E.useContext(pqe);if(!e)throw new Error("useWorkingMemory must be used within a WorkingMemoryProvider");return e}class H$r{constructor(t){this.agent=t}speak(t){let r=()=>{};const n=(i,o)=>{s.status.type!=="ended"&&(s.status={type:"ended",reason:i,error:o},r())},s={status:{type:"running"},cancel:()=>{n("cancelled")},subscribe:i=>(this.agent.voice.speak(t).then(o=>{if(o)return o.body}).then(o=>{if(o)return W$r(o)}).then(o=>{o&&(r=o),i()}).catch(o=>{n("error",o)}),()=>{})};return s}}async function W$r(e){const t=new window.AudioContext,r=e.getReader(),n=[];for(;;){const{done:c,value:u}=await r.read();if(c)break;n.push(u)}const s=n.reduce((c,u)=>c+u.length,0),i=new Uint8Array(s);let o=0;for(const c of n)i.set(c,o),o+=c.length;const a=await t.decodeAudioData(i.buffer),l=t.createBufferSource();return l.buffer=a,l.connect(t.destination),l.start(),()=>{l.stop(),t.close()}}class G$r{accept="application/pdf";async add({file:t}){if(t.size>20971520)throw new Error("PDF size exceeds 20MB limit");return{id:crypto.randomUUID(),type:"document",name:t.name,file:t,status:{type:"running",reason:"uploading",progress:0},contentType:"application/pdf"}}async send(t){const r=await this.fileToBase64(t.file);return{id:t.id,type:"document",name:t.name,content:[{type:"text",text:r}],status:{type:"complete"},contentType:"application/pdf"}}async remove(t){}async fileToBase64(t){const r=await t.arrayBuffer(),n=new Uint8Array(r);let s="";return n.forEach(i=>{s+=String.fromCharCode(i)}),btoa(s)}async extractTextFromPDF(t){return"Extracted PDF text content"}}const X$r=e=>{const[t,r]=E.useState(!1),[n,s]=E.useState(void 0),i=rr(),{requestContext:o}=Qn();return E.useEffect(()=>{(async()=>{const l=i.getAgent(e);try{(await l.voice.getSpeakers(o)).length>0?s(new H$r(l)):s(new Yie),r(!0)}catch{s(new Yie),r(!0)}})()},[e]),{isReady:t,adapters:{attachments:new EKe([new SKe,new _Ke,new G$r]),speech:n}}},$xe={modelSettings:{maxRetries:2,maxSteps:5,temperature:.5,topP:1,chatWithGenerateLegacy:!1,chatWithGenerate:!1}};function Y$r({agentId:e,defaultSettings:t}){const[r,n]=E.useState(t),s=`mastra-agent-store-${e}`;return E.useEffect(()=>{try{const a=localStorage.getItem(s),l=a?JSON.parse(a):{},c={...l,modelSettings:{...$xe.modelSettings,...l?.modelSettings??{},...t?.modelSettings??{}}};n(c)}catch{}},[s,t]),{settings:r,setSettings:a=>{n(l=>({...l,...a})),localStorage.setItem(s,JSON.stringify({...a,agentId:e}))},resetAll:()=>{const a={modelSettings:{...$xe.modelSettings,...t?.modelSettings??{}}};n(a),localStorage.removeItem(s)}}}const mqe=E.createContext({});function J$r({children:e,agentId:t,defaultSettings:r}){const{settings:n,setSettings:s,resetAll:i}=Y$r({agentId:t,defaultSettings:r});return f.jsx(mqe.Provider,{value:{settings:n,setSettings:s,resetAll:i},children:e})}const tR=()=>E.useContext(mqe),K$r=e=>typeof e=="string"?e.trim():e.text?.trim()||"",Ste=e=>typeof e=="string"?e.trim():typeof e=="object"&&"content"in e?Array.isArray(e.content)?e.content.map(K$r).join(`
|
|
554
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return E.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},WDr=UQe,GDr=QQe,XDr=ZQe,tZe=qQe,rZe=HQe,nZe=JQe,sZe=eZe,iZe=GQe,oZe=YQe,sT=(e=>(e.AGENT="agent",e.EVAL="eval",e.INPUT_PROCESSOR="input_processor",e.INPUT_STEP_PROCESSOR="input_step_processor",e.OUTPUT_PROCESSOR="output_processor",e.OUTPUT_STEP_PROCESSOR="output_step_processor",e.WORKFLOW_STEP="workflow_step",e.TOOL="tool",e.WORKFLOW_RUN="workflow_run",e))(sT||{}),WP={exports:{}},JL,Sbe;function Z6(){if(Sbe)return JL;Sbe=1;const e="2.0.0",t=256,r=Number.MAX_SAFE_INTEGER||9007199254740991,n=16,s=t-6;return JL={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:s,MAX_SAFE_INTEGER:r,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},JL}var KL,Obe;function q6(){if(Obe)return KL;Obe=1;var e={},t={};return KL=typeof e=="object"&&t&&t.NODE_DEBUG&&/\bsemver\b/i.test(t.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{},KL}var _be;function RD(){return _be||(_be=1,(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:s}=Z6(),i=q6();t=e.exports={};const o=t.re=[],a=t.safeRe=[],l=t.src=[],c=t.safeSrc=[],u=t.t={};let d=0;const p="[a-zA-Z0-9-]",m=[["\\s",1],["\\d",s],[p,n]],g=b=>{for(const[w,S]of m)b=b.split(`${w}*`).join(`${w}{0,${S}}`).split(`${w}+`).join(`${w}{1,${S}}`);return b},v=(b,w,S)=>{const O=g(w),k=d++;i(b,k,w),u[b]=k,l[k]=w,c[k]=O,o[k]=new RegExp(w,S?"g":void 0),a[k]=new RegExp(O,S?"g":void 0)};v("NUMERICIDENTIFIER","0|[1-9]\\d*"),v("NUMERICIDENTIFIERLOOSE","\\d+"),v("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),v("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),v("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),v("PRERELEASEIDENTIFIER",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIER]})`),v("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIERLOOSE]})`),v("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),v("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),v("BUILDIDENTIFIER",`${p}+`),v("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),v("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),v("FULL",`^${l[u.FULLPLAIN]}$`),v("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),v("LOOSE",`^${l[u.LOOSEPLAIN]}$`),v("GTLT","((?:<|>)?=?)"),v("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),v("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),v("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),v("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),v("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),v("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),v("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),v("COERCE",`${l[u.COERCEPLAIN]}(?:$|[^\\d])`),v("COERCEFULL",l[u.COERCEPLAIN]+`(?:${l[u.PRERELEASE]})?(?:${l[u.BUILD]})?(?:$|[^\\d])`),v("COERCERTL",l[u.COERCE],!0),v("COERCERTLFULL",l[u.COERCEFULL],!0),v("LONETILDE","(?:~>?)"),v("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",v("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),v("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),v("LONECARET","(?:\\^)"),v("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",v("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),v("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),v("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),v("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),v("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",v("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),v("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),v("STAR","(<|>)?=?\\s*\\*"),v("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),v("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(WP,WP.exports)),WP.exports}var ez,kbe;function tte(){if(kbe)return ez;kbe=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return ez=n=>n?typeof n!="object"?e:n:t,ez}var tz,Ebe;function aZe(){if(Ebe)return tz;Ebe=1;const e=/^[0-9]+$/,t=(n,s)=>{if(typeof n=="number"&&typeof s=="number")return n===s?0:n<s?-1:1;const i=e.test(n),o=e.test(s);return i&&o&&(n=+n,s=+s),n===s?0:i&&!o?-1:o&&!i?1:n<s?-1:1};return tz={compareIdentifiers:t,rcompareIdentifiers:(n,s)=>t(s,n)},tz}var rz,Cbe;function Na(){if(Cbe)return rz;Cbe=1;const e=q6(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:r}=Z6(),{safeRe:n,t:s}=RD(),i=tte(),{compareIdentifiers:o}=aZe();class a{constructor(c,u){if(u=i(u),c instanceof a){if(c.loose===!!u.loose&&c.includePrerelease===!!u.includePrerelease)return c;c=c.version}else if(typeof c!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof c}".`);if(c.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",c,u),this.options=u,this.loose=!!u.loose,this.includePrerelease=!!u.includePrerelease;const d=c.trim().match(u.loose?n[s.LOOSE]:n[s.FULL]);if(!d)throw new TypeError(`Invalid Version: ${c}`);if(this.raw=c,this.major=+d[1],this.minor=+d[2],this.patch=+d[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");d[4]?this.prerelease=d[4].split(".").map(p=>{if(/^[0-9]+$/.test(p)){const m=+p;if(m>=0&&m<r)return m}return p}):this.prerelease=[],this.build=d[5]?d[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(c){if(e("SemVer.compare",this.version,this.options,c),!(c instanceof a)){if(typeof c=="string"&&c===this.version)return 0;c=new a(c,this.options)}return c.version===this.version?0:this.compareMain(c)||this.comparePre(c)}compareMain(c){return c instanceof a||(c=new a(c,this.options)),this.major<c.major?-1:this.major>c.major?1:this.minor<c.minor?-1:this.minor>c.minor?1:this.patch<c.patch?-1:this.patch>c.patch?1:0}comparePre(c){if(c instanceof a||(c=new a(c,this.options)),this.prerelease.length&&!c.prerelease.length)return-1;if(!this.prerelease.length&&c.prerelease.length)return 1;if(!this.prerelease.length&&!c.prerelease.length)return 0;let u=0;do{const d=this.prerelease[u],p=c.prerelease[u];if(e("prerelease compare",u,d,p),d===void 0&&p===void 0)return 0;if(p===void 0)return 1;if(d===void 0)return-1;if(d===p)continue;return o(d,p)}while(++u)}compareBuild(c){c instanceof a||(c=new a(c,this.options));let u=0;do{const d=this.build[u],p=c.build[u];if(e("build compare",u,d,p),d===void 0&&p===void 0)return 0;if(p===void 0)return 1;if(d===void 0)return-1;if(d===p)continue;return o(d,p)}while(++u)}inc(c,u,d){if(c.startsWith("pre")){if(!u&&d===!1)throw new Error("invalid increment argument: identifier is empty");if(u){const p=`-${u}`.match(this.options.loose?n[s.PRERELEASELOOSE]:n[s.PRERELEASE]);if(!p||p[1]!==u)throw new Error(`invalid identifier: ${u}`)}}switch(c){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",u,d);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",u,d);break;case"prepatch":this.prerelease.length=0,this.inc("patch",u,d),this.inc("pre",u,d);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",u,d),this.inc("pre",u,d);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const p=Number(d)?1:0;if(this.prerelease.length===0)this.prerelease=[p];else{let m=this.prerelease.length;for(;--m>=0;)typeof this.prerelease[m]=="number"&&(this.prerelease[m]++,m=-2);if(m===-1){if(u===this.prerelease.join(".")&&d===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(p)}}if(u){let m=[u,p];d===!1&&(m=[u]),o(this.prerelease[0],u)===0?isNaN(this.prerelease[1])&&(this.prerelease=m):this.prerelease=m}break}default:throw new Error(`invalid increment argument: ${c}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return rz=a,rz}var nz,Tbe;function kS(){if(Tbe)return nz;Tbe=1;const e=Na();return nz=(r,n,s=!1)=>{if(r instanceof e)return r;try{return new e(r,n)}catch(i){if(!s)return null;throw i}},nz}var sz,Dbe;function YDr(){if(Dbe)return sz;Dbe=1;const e=kS();return sz=(r,n)=>{const s=e(r,n);return s?s.version:null},sz}var iz,Abe;function JDr(){if(Abe)return iz;Abe=1;const e=kS();return iz=(r,n)=>{const s=e(r.trim().replace(/^[=v]+/,""),n);return s?s.version:null},iz}var oz,Pbe;function KDr(){if(Pbe)return oz;Pbe=1;const e=Na();return oz=(r,n,s,i,o)=>{typeof s=="string"&&(o=i,i=s,s=void 0);try{return new e(r instanceof e?r.version:r,s).inc(n,i,o).version}catch{return null}},oz}var az,$be;function eAr(){if($be)return az;$be=1;const e=kS();return az=(r,n)=>{const s=e(r,null,!0),i=e(n,null,!0),o=s.compare(i);if(o===0)return null;const a=o>0,l=a?s:i,c=a?i:s,u=!!l.prerelease.length;if(!!c.prerelease.length&&!u){if(!c.patch&&!c.minor)return"major";if(c.compareMain(l)===0)return c.minor&&!c.patch?"minor":"patch"}const p=u?"pre":"";return s.major!==i.major?p+"major":s.minor!==i.minor?p+"minor":s.patch!==i.patch?p+"patch":"prerelease"},az}var lz,Ibe;function tAr(){if(Ibe)return lz;Ibe=1;const e=Na();return lz=(r,n)=>new e(r,n).major,lz}var cz,Nbe;function rAr(){if(Nbe)return cz;Nbe=1;const e=Na();return cz=(r,n)=>new e(r,n).minor,cz}var uz,Rbe;function nAr(){if(Rbe)return uz;Rbe=1;const e=Na();return uz=(r,n)=>new e(r,n).patch,uz}var dz,Mbe;function sAr(){if(Mbe)return dz;Mbe=1;const e=kS();return dz=(r,n)=>{const s=e(r,n);return s&&s.prerelease.length?s.prerelease:null},dz}var fz,jbe;function Wd(){if(jbe)return fz;jbe=1;const e=Na();return fz=(r,n,s)=>new e(r,s).compare(new e(n,s)),fz}var pz,Fbe;function iAr(){if(Fbe)return pz;Fbe=1;const e=Wd();return pz=(r,n,s)=>e(n,r,s),pz}var hz,Lbe;function oAr(){if(Lbe)return hz;Lbe=1;const e=Wd();return hz=(r,n)=>e(r,n,!0),hz}var mz,zbe;function rte(){if(zbe)return mz;zbe=1;const e=Na();return mz=(r,n,s)=>{const i=new e(r,s),o=new e(n,s);return i.compare(o)||i.compareBuild(o)},mz}var gz,Bbe;function aAr(){if(Bbe)return gz;Bbe=1;const e=rte();return gz=(r,n)=>r.sort((s,i)=>e(s,i,n)),gz}var yz,Vbe;function lAr(){if(Vbe)return yz;Vbe=1;const e=rte();return yz=(r,n)=>r.sort((s,i)=>e(i,s,n)),yz}var vz,Ube;function H6(){if(Ube)return vz;Ube=1;const e=Wd();return vz=(r,n,s)=>e(r,n,s)>0,vz}var bz,Qbe;function nte(){if(Qbe)return bz;Qbe=1;const e=Wd();return bz=(r,n,s)=>e(r,n,s)<0,bz}var xz,Zbe;function lZe(){if(Zbe)return xz;Zbe=1;const e=Wd();return xz=(r,n,s)=>e(r,n,s)===0,xz}var wz,qbe;function cZe(){if(qbe)return wz;qbe=1;const e=Wd();return wz=(r,n,s)=>e(r,n,s)!==0,wz}var Sz,Hbe;function ste(){if(Hbe)return Sz;Hbe=1;const e=Wd();return Sz=(r,n,s)=>e(r,n,s)>=0,Sz}var Oz,Wbe;function ite(){if(Wbe)return Oz;Wbe=1;const e=Wd();return Oz=(r,n,s)=>e(r,n,s)<=0,Oz}var _z,Gbe;function uZe(){if(Gbe)return _z;Gbe=1;const e=lZe(),t=cZe(),r=H6(),n=ste(),s=nte(),i=ite();return _z=(a,l,c,u)=>{switch(l){case"===":return typeof a=="object"&&(a=a.version),typeof c=="object"&&(c=c.version),a===c;case"!==":return typeof a=="object"&&(a=a.version),typeof c=="object"&&(c=c.version),a!==c;case"":case"=":case"==":return e(a,c,u);case"!=":return t(a,c,u);case">":return r(a,c,u);case">=":return n(a,c,u);case"<":return s(a,c,u);case"<=":return i(a,c,u);default:throw new TypeError(`Invalid operator: ${l}`)}},_z}var kz,Xbe;function cAr(){if(Xbe)return kz;Xbe=1;const e=Na(),t=kS(),{safeRe:r,t:n}=RD();return kz=(i,o)=>{if(i instanceof e)return i;if(typeof i=="number"&&(i=String(i)),typeof i!="string")return null;o=o||{};let a=null;if(!o.rtl)a=i.match(o.includePrerelease?r[n.COERCEFULL]:r[n.COERCE]);else{const m=o.includePrerelease?r[n.COERCERTLFULL]:r[n.COERCERTL];let g;for(;(g=m.exec(i))&&(!a||a.index+a[0].length!==i.length);)(!a||g.index+g[0].length!==a.index+a[0].length)&&(a=g),m.lastIndex=g.index+g[1].length+g[2].length;m.lastIndex=-1}if(a===null)return null;const l=a[2],c=a[3]||"0",u=a[4]||"0",d=o.includePrerelease&&a[5]?`-${a[5]}`:"",p=o.includePrerelease&&a[6]?`+${a[6]}`:"";return t(`${l}.${c}.${u}${d}${p}`,o)},kz}var Ez,Ybe;function uAr(){if(Ybe)return Ez;Ybe=1;class e{constructor(){this.max=1e3,this.map=new Map}get(r){const n=this.map.get(r);if(n!==void 0)return this.map.delete(r),this.map.set(r,n),n}delete(r){return this.map.delete(r)}set(r,n){if(!this.delete(r)&&n!==void 0){if(this.map.size>=this.max){const i=this.map.keys().next().value;this.delete(i)}this.map.set(r,n)}return this}}return Ez=e,Ez}var Cz,Jbe;function Gd(){if(Jbe)return Cz;Jbe=1;const e=/\s+/g;class t{constructor(V,j){if(j=s(j),V instanceof t)return V.loose===!!j.loose&&V.includePrerelease===!!j.includePrerelease?V:new t(V.raw,j);if(V instanceof i)return this.raw=V.value,this.set=[[V]],this.formatted=void 0,this;if(this.options=j,this.loose=!!j.loose,this.includePrerelease=!!j.includePrerelease,this.raw=V.trim().replace(e," "),this.set=this.raw.split("||").map(N=>this.parseRange(N.trim())).filter(N=>N.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const N=this.set[0];if(this.set=this.set.filter(I=>!v(I[0])),this.set.length===0)this.set=[N];else if(this.set.length>1){for(const I of this.set)if(I.length===1&&b(I[0])){this.set=[I];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let V=0;V<this.set.length;V++){V>0&&(this.formatted+="||");const j=this.set[V];for(let N=0;N<j.length;N++)N>0&&(this.formatted+=" "),this.formatted+=j[N].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(V){const N=((this.options.includePrerelease&&m)|(this.options.loose&&g))+":"+V,I=n.get(N);if(I)return I;const H=this.options.loose,B=H?l[c.HYPHENRANGELOOSE]:l[c.HYPHENRANGE];V=V.replace(B,Q(this.options.includePrerelease)),o("hyphen replace",V),V=V.replace(l[c.COMPARATORTRIM],u),o("comparator trim",V),V=V.replace(l[c.TILDETRIM],d),o("tilde trim",V),V=V.replace(l[c.CARETTRIM],p),o("caret trim",V);let J=V.split(" ").map(K=>S(K,this.options)).join(" ").split(/\s+/).map(K=>z(K,this.options));H&&(J=J.filter(K=>(o("loose invalid filter",K,this.options),!!K.match(l[c.COMPARATORLOOSE])))),o("range list",J);const Z=new Map,F=J.map(K=>new i(K,this.options));for(const K of F){if(v(K))return[K];Z.set(K.value,K)}Z.size>1&&Z.has("")&&Z.delete("");const W=[...Z.values()];return n.set(N,W),W}intersects(V,j){if(!(V instanceof t))throw new TypeError("a Range is required");return this.set.some(N=>w(N,j)&&V.set.some(I=>w(I,j)&&N.every(H=>I.every(B=>H.intersects(B,j)))))}test(V){if(!V)return!1;if(typeof V=="string")try{V=new a(V,this.options)}catch{return!1}for(let j=0;j<this.set.length;j++)if(U(this.set[j],V,this.options))return!0;return!1}}Cz=t;const r=uAr(),n=new r,s=tte(),i=W6(),o=q6(),a=Na(),{safeRe:l,t:c,comparatorTrimReplace:u,tildeTrimReplace:d,caretTrimReplace:p}=RD(),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:g}=Z6(),v=L=>L.value==="<0.0.0-0",b=L=>L.value==="",w=(L,V)=>{let j=!0;const N=L.slice();let I=N.pop();for(;j&&N.length;)j=N.every(H=>I.intersects(H,V)),I=N.pop();return j},S=(L,V)=>(L=L.replace(l[c.BUILD],""),o("comp",L,V),L=T(L,V),o("caret",L),L=k(L,V),o("tildes",L),L=A(L,V),o("xrange",L),L=M(L,V),o("stars",L),L),O=L=>!L||L.toLowerCase()==="x"||L==="*",k=(L,V)=>L.trim().split(/\s+/).map(j=>C(j,V)).join(" "),C=(L,V)=>{const j=V.loose?l[c.TILDELOOSE]:l[c.TILDE];return L.replace(j,(N,I,H,B,J)=>{o("tilde",L,N,I,H,B,J);let Z;return O(I)?Z="":O(H)?Z=`>=${I}.0.0 <${+I+1}.0.0-0`:O(B)?Z=`>=${I}.${H}.0 <${I}.${+H+1}.0-0`:J?(o("replaceTilde pr",J),Z=`>=${I}.${H}.${B}-${J} <${I}.${+H+1}.0-0`):Z=`>=${I}.${H}.${B} <${I}.${+H+1}.0-0`,o("tilde return",Z),Z})},T=(L,V)=>L.trim().split(/\s+/).map(j=>P(j,V)).join(" "),P=(L,V)=>{o("caret",L,V);const j=V.loose?l[c.CARETLOOSE]:l[c.CARET],N=V.includePrerelease?"-0":"";return L.replace(j,(I,H,B,J,Z)=>{o("caret",L,I,H,B,J,Z);let F;return O(H)?F="":O(B)?F=`>=${H}.0.0${N} <${+H+1}.0.0-0`:O(J)?H==="0"?F=`>=${H}.${B}.0${N} <${H}.${+B+1}.0-0`:F=`>=${H}.${B}.0${N} <${+H+1}.0.0-0`:Z?(o("replaceCaret pr",Z),H==="0"?B==="0"?F=`>=${H}.${B}.${J}-${Z} <${H}.${B}.${+J+1}-0`:F=`>=${H}.${B}.${J}-${Z} <${H}.${+B+1}.0-0`:F=`>=${H}.${B}.${J}-${Z} <${+H+1}.0.0-0`):(o("no pr"),H==="0"?B==="0"?F=`>=${H}.${B}.${J}${N} <${H}.${B}.${+J+1}-0`:F=`>=${H}.${B}.${J}${N} <${H}.${+B+1}.0-0`:F=`>=${H}.${B}.${J} <${+H+1}.0.0-0`),o("caret return",F),F})},A=(L,V)=>(o("replaceXRanges",L,V),L.split(/\s+/).map(j=>R(j,V)).join(" ")),R=(L,V)=>{L=L.trim();const j=V.loose?l[c.XRANGELOOSE]:l[c.XRANGE];return L.replace(j,(N,I,H,B,J,Z)=>{o("xRange",L,N,I,H,B,J,Z);const F=O(H),W=F||O(B),K=W||O(J),se=K;return I==="="&&se&&(I=""),Z=V.includePrerelease?"-0":"",F?I===">"||I==="<"?N="<0.0.0-0":N="*":I&&se?(W&&(B=0),J=0,I===">"?(I=">=",W?(H=+H+1,B=0,J=0):(B=+B+1,J=0)):I==="<="&&(I="<",W?H=+H+1:B=+B+1),I==="<"&&(Z="-0"),N=`${I+H}.${B}.${J}${Z}`):W?N=`>=${H}.0.0${Z} <${+H+1}.0.0-0`:K&&(N=`>=${H}.${B}.0${Z} <${H}.${+B+1}.0-0`),o("xRange return",N),N})},M=(L,V)=>(o("replaceStars",L,V),L.trim().replace(l[c.STAR],"")),z=(L,V)=>(o("replaceGTE0",L,V),L.trim().replace(l[V.includePrerelease?c.GTE0PRE:c.GTE0],"")),Q=L=>(V,j,N,I,H,B,J,Z,F,W,K,se)=>(O(N)?j="":O(I)?j=`>=${N}.0.0${L?"-0":""}`:O(H)?j=`>=${N}.${I}.0${L?"-0":""}`:B?j=`>=${j}`:j=`>=${j}${L?"-0":""}`,O(F)?Z="":O(W)?Z=`<${+F+1}.0.0-0`:O(K)?Z=`<${F}.${+W+1}.0-0`:se?Z=`<=${F}.${W}.${K}-${se}`:L?Z=`<${F}.${W}.${+K+1}-0`:Z=`<=${Z}`,`${j} ${Z}`.trim()),U=(L,V,j)=>{for(let N=0;N<L.length;N++)if(!L[N].test(V))return!1;if(V.prerelease.length&&!j.includePrerelease){for(let N=0;N<L.length;N++)if(o(L[N].semver),L[N].semver!==i.ANY&&L[N].semver.prerelease.length>0){const I=L[N].semver;if(I.major===V.major&&I.minor===V.minor&&I.patch===V.patch)return!0}return!1}return!0};return Cz}var Tz,Kbe;function W6(){if(Kbe)return Tz;Kbe=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(u,d){if(d=r(d),u instanceof t){if(u.loose===!!d.loose)return u;u=u.value}u=u.trim().split(/\s+/).join(" "),o("comparator",u,d),this.options=d,this.loose=!!d.loose,this.parse(u),this.semver===e?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(u){const d=this.options.loose?n[s.COMPARATORLOOSE]:n[s.COMPARATOR],p=u.match(d);if(!p)throw new TypeError(`Invalid comparator: ${u}`);this.operator=p[1]!==void 0?p[1]:"",this.operator==="="&&(this.operator=""),p[2]?this.semver=new a(p[2],this.options.loose):this.semver=e}toString(){return this.value}test(u){if(o("Comparator.test",u,this.options.loose),this.semver===e||u===e)return!0;if(typeof u=="string")try{u=new a(u,this.options)}catch{return!1}return i(u,this.operator,this.semver,this.options)}intersects(u,d){if(!(u instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(u.value,d).test(this.value):u.operator===""?u.value===""?!0:new l(this.value,d).test(u.semver):(d=r(d),d.includePrerelease&&(this.value==="<0.0.0-0"||u.value==="<0.0.0-0")||!d.includePrerelease&&(this.value.startsWith("<0.0.0")||u.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&u.operator.startsWith(">")||this.operator.startsWith("<")&&u.operator.startsWith("<")||this.semver.version===u.semver.version&&this.operator.includes("=")&&u.operator.includes("=")||i(this.semver,"<",u.semver,d)&&this.operator.startsWith(">")&&u.operator.startsWith("<")||i(this.semver,">",u.semver,d)&&this.operator.startsWith("<")&&u.operator.startsWith(">")))}}Tz=t;const r=tte(),{safeRe:n,t:s}=RD(),i=uZe(),o=q6(),a=Na(),l=Gd();return Tz}var Dz,exe;function G6(){if(exe)return Dz;exe=1;const e=Gd();return Dz=(r,n,s)=>{try{n=new e(n,s)}catch{return!1}return n.test(r)},Dz}var Az,txe;function dAr(){if(txe)return Az;txe=1;const e=Gd();return Az=(r,n)=>new e(r,n).set.map(s=>s.map(i=>i.value).join(" ").trim().split(" ")),Az}var Pz,rxe;function fAr(){if(rxe)return Pz;rxe=1;const e=Na(),t=Gd();return Pz=(n,s,i)=>{let o=null,a=null,l=null;try{l=new t(s,i)}catch{return null}return n.forEach(c=>{l.test(c)&&(!o||a.compare(c)===-1)&&(o=c,a=new e(o,i))}),o},Pz}var $z,nxe;function pAr(){if(nxe)return $z;nxe=1;const e=Na(),t=Gd();return $z=(n,s,i)=>{let o=null,a=null,l=null;try{l=new t(s,i)}catch{return null}return n.forEach(c=>{l.test(c)&&(!o||a.compare(c)===1)&&(o=c,a=new e(o,i))}),o},$z}var Iz,sxe;function hAr(){if(sxe)return Iz;sxe=1;const e=Na(),t=Gd(),r=H6();return Iz=(s,i)=>{s=new t(s,i);let o=new e("0.0.0");if(s.test(o)||(o=new e("0.0.0-0"),s.test(o)))return o;o=null;for(let a=0;a<s.set.length;++a){const l=s.set[a];let c=null;l.forEach(u=>{const d=new e(u.semver.version);switch(u.operator){case">":d.prerelease.length===0?d.patch++:d.prerelease.push(0),d.raw=d.format();case"":case">=":(!c||r(d,c))&&(c=d);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${u.operator}`)}}),c&&(!o||r(o,c))&&(o=c)}return o&&s.test(o)?o:null},Iz}var Nz,ixe;function mAr(){if(ixe)return Nz;ixe=1;const e=Gd();return Nz=(r,n)=>{try{return new e(r,n).range||"*"}catch{return null}},Nz}var Rz,oxe;function ote(){if(oxe)return Rz;oxe=1;const e=Na(),t=W6(),{ANY:r}=t,n=Gd(),s=G6(),i=H6(),o=nte(),a=ite(),l=ste();return Rz=(u,d,p,m)=>{u=new e(u,m),d=new n(d,m);let g,v,b,w,S;switch(p){case">":g=i,v=a,b=o,w=">",S=">=";break;case"<":g=o,v=l,b=i,w="<",S="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(u,d,m))return!1;for(let O=0;O<d.set.length;++O){const k=d.set[O];let C=null,T=null;if(k.forEach(P=>{P.semver===r&&(P=new t(">=0.0.0")),C=C||P,T=T||P,g(P.semver,C.semver,m)?C=P:b(P.semver,T.semver,m)&&(T=P)}),C.operator===w||C.operator===S||(!T.operator||T.operator===w)&&v(u,T.semver))return!1;if(T.operator===S&&b(u,T.semver))return!1}return!0},Rz}var Mz,axe;function gAr(){if(axe)return Mz;axe=1;const e=ote();return Mz=(r,n,s)=>e(r,n,">",s),Mz}var jz,lxe;function yAr(){if(lxe)return jz;lxe=1;const e=ote();return jz=(r,n,s)=>e(r,n,"<",s),jz}var Fz,cxe;function vAr(){if(cxe)return Fz;cxe=1;const e=Gd();return Fz=(r,n,s)=>(r=new e(r,s),n=new e(n,s),r.intersects(n,s)),Fz}var Lz,uxe;function bAr(){if(uxe)return Lz;uxe=1;const e=G6(),t=Wd();return Lz=(r,n,s)=>{const i=[];let o=null,a=null;const l=r.sort((p,m)=>t(p,m,s));for(const p of l)e(p,n,s)?(a=p,o||(o=p)):(a&&i.push([o,a]),a=null,o=null);o&&i.push([o,null]);const c=[];for(const[p,m]of i)p===m?c.push(p):!m&&p===l[0]?c.push("*"):m?p===l[0]?c.push(`<=${m}`):c.push(`${p} - ${m}`):c.push(`>=${p}`);const u=c.join(" || "),d=typeof n.raw=="string"?n.raw:String(n);return u.length<d.length?u:n},Lz}var zz,dxe;function xAr(){if(dxe)return zz;dxe=1;const e=Gd(),t=W6(),{ANY:r}=t,n=G6(),s=Wd(),i=(d,p,m={})=>{if(d===p)return!0;d=new e(d,m),p=new e(p,m);let g=!1;e:for(const v of d.set){for(const b of p.set){const w=l(v,b,m);if(g=g||w!==null,w)continue e}if(g)return!1}return!0},o=[new t(">=0.0.0-0")],a=[new t(">=0.0.0")],l=(d,p,m)=>{if(d===p)return!0;if(d.length===1&&d[0].semver===r){if(p.length===1&&p[0].semver===r)return!0;m.includePrerelease?d=o:d=a}if(p.length===1&&p[0].semver===r){if(m.includePrerelease)return!0;p=a}const g=new Set;let v,b;for(const A of d)A.operator===">"||A.operator===">="?v=c(v,A,m):A.operator==="<"||A.operator==="<="?b=u(b,A,m):g.add(A.semver);if(g.size>1)return null;let w;if(v&&b){if(w=s(v.semver,b.semver,m),w>0)return null;if(w===0&&(v.operator!==">="||b.operator!=="<="))return null}for(const A of g){if(v&&!n(A,String(v),m)||b&&!n(A,String(b),m))return null;for(const R of p)if(!n(A,String(R),m))return!1;return!0}let S,O,k,C,T=b&&!m.includePrerelease&&b.semver.prerelease.length?b.semver:!1,P=v&&!m.includePrerelease&&v.semver.prerelease.length?v.semver:!1;T&&T.prerelease.length===1&&b.operator==="<"&&T.prerelease[0]===0&&(T=!1);for(const A of p){if(C=C||A.operator===">"||A.operator===">=",k=k||A.operator==="<"||A.operator==="<=",v){if(P&&A.semver.prerelease&&A.semver.prerelease.length&&A.semver.major===P.major&&A.semver.minor===P.minor&&A.semver.patch===P.patch&&(P=!1),A.operator===">"||A.operator===">="){if(S=c(v,A,m),S===A&&S!==v)return!1}else if(v.operator===">="&&!n(v.semver,String(A),m))return!1}if(b){if(T&&A.semver.prerelease&&A.semver.prerelease.length&&A.semver.major===T.major&&A.semver.minor===T.minor&&A.semver.patch===T.patch&&(T=!1),A.operator==="<"||A.operator==="<="){if(O=u(b,A,m),O===A&&O!==b)return!1}else if(b.operator==="<="&&!n(b.semver,String(A),m))return!1}if(!A.operator&&(b||v)&&w!==0)return!1}return!(v&&k&&!b&&w!==0||b&&C&&!v&&w!==0||P||T)},c=(d,p,m)=>{if(!d)return p;const g=s(d.semver,p.semver,m);return g>0?d:g<0||p.operator===">"&&d.operator===">="?p:d},u=(d,p,m)=>{if(!d)return p;const g=s(d.semver,p.semver,m);return g<0?d:g>0||p.operator==="<"&&d.operator==="<="?p:d};return zz=i,zz}var Bz,fxe;function wAr(){if(fxe)return Bz;fxe=1;const e=RD(),t=Z6(),r=Na(),n=aZe(),s=kS(),i=YDr(),o=JDr(),a=KDr(),l=eAr(),c=tAr(),u=rAr(),d=nAr(),p=sAr(),m=Wd(),g=iAr(),v=oAr(),b=rte(),w=aAr(),S=lAr(),O=H6(),k=nte(),C=lZe(),T=cZe(),P=ste(),A=ite(),R=uZe(),M=cAr(),z=W6(),Q=Gd(),U=G6(),L=dAr(),V=fAr(),j=pAr(),N=hAr(),I=mAr(),H=ote(),B=gAr(),J=yAr(),Z=vAr(),F=bAr(),W=xAr();return Bz={parse:s,valid:i,clean:o,inc:a,diff:l,major:c,minor:u,patch:d,prerelease:p,compare:m,rcompare:g,compareLoose:v,compareBuild:b,sort:w,rsort:S,gt:O,lt:k,eq:C,neq:T,gte:P,lte:A,cmp:R,coerce:M,Comparator:z,Range:Q,satisfies:U,toComparators:L,maxSatisfying:V,minSatisfying:j,minVersion:N,validRange:I,outside:H,gtr:B,ltr:J,intersects:Z,simplifyRange:F,subset:W,SemVer:r,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:n.compareIdentifiers,rcompareIdentifiers:n.rcompareIdentifiers},Bz}var SAr=wAr();const m_=Wh(SAr);function dZe(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=dZe(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function fZe(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=dZe(e))&&(n&&(n+=" "),n+=t);return n}const ate="-",OAr=e=>{const t=kAr(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const a=o.split(ate);return a[0]===""&&a.length!==1&&a.shift(),pZe(a,t)||_Ar(o)},getConflictingClassGroupIds:(o,a)=>{const l=r[o]||[];return a&&n[o]?[...l,...n[o]]:l}}},pZe=(e,t)=>{if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?pZe(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(ate);return t.validators.find(({validator:o})=>o(i))?.classGroupId},pxe=/^\[(.+)\]$/,_Ar=e=>{if(pxe.test(e)){const t=pxe.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},kAr=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const s in r)GZ(r[s],n,s,t);return n},GZ=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:hxe(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(EAr(s)){GZ(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,o])=>{GZ(o,hxe(t,i),r,n)})})},hxe=(e,t)=>{let r=e;return t.split(ate).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},EAr=e=>e.isThemeGetter,CAr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(i,o)=>{r.set(i,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return s(i,o),o},set(i,o){r.has(i)?r.set(i,o):s(i,o)}}},XZ="!",YZ=":",TAr=YZ.length,DAr=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=s=>{const i=[];let o=0,a=0,l=0,c;for(let g=0;g<s.length;g++){let v=s[g];if(o===0&&a===0){if(v===YZ){i.push(s.slice(l,g)),l=g+TAr;continue}if(v==="/"){c=g;continue}}v==="["?o++:v==="]"?o--:v==="("?a++:v===")"&&a--}const u=i.length===0?s:s.substring(l),d=AAr(u),p=d!==u,m=c&&c>l?c-l:void 0;return{modifiers:i,hasImportantModifier:p,baseClassName:d,maybePostfixModifierPosition:m}};if(t){const s=t+YZ,i=n;n=o=>o.startsWith(s)?i(o.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(r){const s=n;n=i=>r({className:i,parseClassName:s})}return n},AAr=e=>e.endsWith(XZ)?e.substring(0,e.length-1):e.startsWith(XZ)?e.substring(1):e,PAr=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const s=[];let i=[];return n.forEach(o=>{o[0]==="["||t[o]?(s.push(...i.sort(),o),i=[]):i.push(o)}),s.push(...i.sort()),s}},$Ar=e=>({cache:CAr(e.cacheSize),parseClassName:DAr(e),sortModifiers:PAr(e),...OAr(e)}),IAr=/\s+/,NAr=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:i}=t,o=[],a=e.trim().split(IAr);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:d,modifiers:p,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:v}=r(u);if(d){l=u+(l.length>0?" "+l:l);continue}let b=!!v,w=n(b?g.substring(0,v):g);if(!w){if(!b){l=u+(l.length>0?" "+l:l);continue}if(w=n(g),!w){l=u+(l.length>0?" "+l:l);continue}b=!1}const S=i(p).join(":"),O=m?S+XZ:S,k=O+w;if(o.includes(k))continue;o.push(k);const C=s(w,b);for(let T=0;T<C.length;++T){const P=C[T];o.push(O+P)}l=u+(l.length>0?" "+l:l)}return l};function RAr(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=hZe(t))&&(n&&(n+=" "),n+=r);return n}const hZe=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=hZe(e[n]))&&(r&&(r+=" "),r+=t);return r};function mxe(e,...t){let r,n,s,i=o;function o(l){const c=t.reduce((u,d)=>d(u),e());return r=$Ar(c),n=r.cache.get,s=r.cache.set,i=a,a(l)}function a(l){const c=n(l);if(c)return c;const u=NAr(l,r);return s(l,u),u}return function(){return i(RAr.apply(null,arguments))}}const Zi=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},mZe=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,gZe=/^\((?:(\w[\w-]*):)?(.+)\)$/i,MAr=/^\d+\/\d+$/,jAr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,FAr=/\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$/,LAr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,zAr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,BAr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ux=e=>MAr.test(e),Fr=e=>!!e&&!Number.isNaN(Number(e)),Wm=e=>!!e&&Number.isInteger(Number(e)),Vz=e=>e.endsWith("%")&&Fr(e.slice(0,-1)),rh=e=>jAr.test(e),VAr=()=>!0,UAr=e=>FAr.test(e)&&!LAr.test(e),yZe=()=>!1,QAr=e=>zAr.test(e),ZAr=e=>BAr.test(e),qAr=e=>!Nt(e)&&!Rt(e),HAr=e=>ES(e,xZe,yZe),Nt=e=>mZe.test(e),Yy=e=>ES(e,wZe,UAr),Uz=e=>ES(e,JAr,Fr),gxe=e=>ES(e,vZe,yZe),WAr=e=>ES(e,bZe,ZAr),GP=e=>ES(e,SZe,QAr),Rt=e=>gZe.test(e),g_=e=>CS(e,wZe),GAr=e=>CS(e,KAr),yxe=e=>CS(e,vZe),XAr=e=>CS(e,xZe),YAr=e=>CS(e,bZe),XP=e=>CS(e,SZe,!0),ES=(e,t,r)=>{const n=mZe.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},CS=(e,t,r=!1)=>{const n=gZe.exec(e);return n?n[1]?t(n[1]):r:!1},vZe=e=>e==="position"||e==="percentage",bZe=e=>e==="image"||e==="url",xZe=e=>e==="length"||e==="size"||e==="bg-size",wZe=e=>e==="length",JAr=e=>e==="number",KAr=e=>e==="family-name",SZe=e=>e==="shadow",vxe=()=>{const e=Zi("color"),t=Zi("font"),r=Zi("text"),n=Zi("font-weight"),s=Zi("tracking"),i=Zi("leading"),o=Zi("breakpoint"),a=Zi("container"),l=Zi("spacing"),c=Zi("radius"),u=Zi("shadow"),d=Zi("inset-shadow"),p=Zi("text-shadow"),m=Zi("drop-shadow"),g=Zi("blur"),v=Zi("perspective"),b=Zi("aspect"),w=Zi("ease"),S=Zi("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...k(),Rt,Nt],T=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],A=()=>[Rt,Nt,l],R=()=>[ux,"full","auto",...A()],M=()=>[Wm,"none","subgrid",Rt,Nt],z=()=>["auto",{span:["full",Wm,Rt,Nt]},Wm,Rt,Nt],Q=()=>[Wm,"auto",Rt,Nt],U=()=>["auto","min","max","fr",Rt,Nt],L=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],j=()=>["auto",...A()],N=()=>[ux,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...A()],I=()=>[e,Rt,Nt],H=()=>[...k(),yxe,gxe,{position:[Rt,Nt]}],B=()=>["no-repeat",{repeat:["","x","y","space","round"]}],J=()=>["auto","cover","contain",XAr,HAr,{size:[Rt,Nt]}],Z=()=>[Vz,g_,Yy],F=()=>["","none","full",c,Rt,Nt],W=()=>["",Fr,g_,Yy],K=()=>["solid","dashed","dotted","double"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>[Fr,Vz,yxe,gxe],te=()=>["","none",g,Rt,Nt],de=()=>["none",Fr,Rt,Nt],ue=()=>["none",Fr,Rt,Nt],Ae=()=>[Fr,Rt,Nt],_e=()=>[ux,"full",...A()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[rh],breakpoint:[rh],color:[VAr],container:[rh],"drop-shadow":[rh],ease:["in","out","in-out"],font:[qAr],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[rh],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[rh],shadow:[rh],spacing:["px",Fr],text:[rh],"text-shadow":[rh],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ux,Nt,Rt,b]}],container:["container"],columns:[{columns:[Fr,Nt,Rt,a]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:R()}],"inset-x":[{"inset-x":R()}],"inset-y":[{"inset-y":R()}],start:[{start:R()}],end:[{end:R()}],top:[{top:R()}],right:[{right:R()}],bottom:[{bottom:R()}],left:[{left:R()}],visibility:["visible","invisible","collapse"],z:[{z:[Wm,"auto",Rt,Nt]}],basis:[{basis:[ux,"full","auto",a,...A()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Fr,ux,"auto","initial","none",Nt]}],grow:[{grow:["",Fr,Rt,Nt]}],shrink:[{shrink:["",Fr,Rt,Nt]}],order:[{order:[Wm,"first","last","none",Rt,Nt]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:z()}],"col-start":[{"col-start":Q()}],"col-end":[{"col-end":Q()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:z()}],"row-start":[{"row-start":Q()}],"row-end":[{"row-end":Q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:A()}],"gap-x":[{"gap-x":A()}],"gap-y":[{"gap-y":A()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:A()}],px:[{px:A()}],py:[{py:A()}],ps:[{ps:A()}],pe:[{pe:A()}],pt:[{pt:A()}],pr:[{pr:A()}],pb:[{pb:A()}],pl:[{pl:A()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":A()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":A()}],"space-y-reverse":["space-y-reverse"],size:[{size:N()}],w:[{w:[a,"screen",...N()]}],"min-w":[{"min-w":[a,"screen","none",...N()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...N()]}],h:[{h:["screen","lh",...N()]}],"min-h":[{"min-h":["screen","lh","none",...N()]}],"max-h":[{"max-h":["screen","lh",...N()]}],"font-size":[{text:["base",r,g_,Yy]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Rt,Uz]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Vz,Nt]}],"font-family":[{font:[GAr,Nt,t]}],"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:[s,Rt,Nt]}],"line-clamp":[{"line-clamp":[Fr,"none",Rt,Uz]}],leading:[{leading:[i,...A()]}],"list-image":[{"list-image":["none",Rt,Nt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Rt,Nt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:[Fr,"from-font","auto",Rt,Yy]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[Fr,"auto",Rt,Nt]}],"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",Rt,Nt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Rt,Nt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:H()}],"bg-repeat":[{bg:B()}],"bg-size":[{bg:J()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Wm,Rt,Nt],radial:["",Rt,Nt],conic:[Wm,Rt,Nt]},YAr,WAr]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:Z()}],"gradient-via-pos":[{via:Z()}],"gradient-to-pos":[{to:Z()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...K(),"hidden","none"]}],"divide-style":[{divide:[...K(),"hidden","none"]}],"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:[...K(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Fr,Rt,Nt]}],"outline-w":[{outline:["",Fr,g_,Yy]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",u,XP,GP]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",d,XP,GP]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[Fr,Yy]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",p,XP,GP]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[Fr,Rt,Nt]}],"mix-blend":[{"mix-blend":[...se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Fr]}],"mask-image-linear-from-pos":[{"mask-linear-from":X()}],"mask-image-linear-to-pos":[{"mask-linear-to":X()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":X()}],"mask-image-t-to-pos":[{"mask-t-to":X()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":X()}],"mask-image-r-to-pos":[{"mask-r-to":X()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":X()}],"mask-image-b-to-pos":[{"mask-b-to":X()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":X()}],"mask-image-l-to-pos":[{"mask-l-to":X()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":X()}],"mask-image-x-to-pos":[{"mask-x-to":X()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":X()}],"mask-image-y-to-pos":[{"mask-y-to":X()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[Rt,Nt]}],"mask-image-radial-from-pos":[{"mask-radial-from":X()}],"mask-image-radial-to-pos":[{"mask-radial-to":X()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[Fr]}],"mask-image-conic-from-pos":[{"mask-conic-from":X()}],"mask-image-conic-to-pos":[{"mask-conic-to":X()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:H()}],"mask-repeat":[{mask:B()}],"mask-size":[{mask:J()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Rt,Nt]}],filter:[{filter:["","none",Rt,Nt]}],blur:[{blur:te()}],brightness:[{brightness:[Fr,Rt,Nt]}],contrast:[{contrast:[Fr,Rt,Nt]}],"drop-shadow":[{"drop-shadow":["","none",m,XP,GP]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",Fr,Rt,Nt]}],"hue-rotate":[{"hue-rotate":[Fr,Rt,Nt]}],invert:[{invert:["",Fr,Rt,Nt]}],saturate:[{saturate:[Fr,Rt,Nt]}],sepia:[{sepia:["",Fr,Rt,Nt]}],"backdrop-filter":[{"backdrop-filter":["","none",Rt,Nt]}],"backdrop-blur":[{"backdrop-blur":te()}],"backdrop-brightness":[{"backdrop-brightness":[Fr,Rt,Nt]}],"backdrop-contrast":[{"backdrop-contrast":[Fr,Rt,Nt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Fr,Rt,Nt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Fr,Rt,Nt]}],"backdrop-invert":[{"backdrop-invert":["",Fr,Rt,Nt]}],"backdrop-opacity":[{"backdrop-opacity":[Fr,Rt,Nt]}],"backdrop-saturate":[{"backdrop-saturate":[Fr,Rt,Nt]}],"backdrop-sepia":[{"backdrop-sepia":["",Fr,Rt,Nt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":A()}],"border-spacing-x":[{"border-spacing-x":A()}],"border-spacing-y":[{"border-spacing-y":A()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Rt,Nt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Fr,"initial",Rt,Nt]}],ease:[{ease:["linear","initial",w,Rt,Nt]}],delay:[{delay:[Fr,Rt,Nt]}],animate:[{animate:["none",S,Rt,Nt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,Rt,Nt]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":["scale-3d"],skew:[{skew:Ae()}],"skew-x":[{"skew-x":Ae()}],"skew-y":[{"skew-y":Ae()}],transform:[{transform:[Rt,Nt,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:_e()}],"translate-x":[{"translate-x":_e()}],"translate-y":[{"translate-y":_e()}],"translate-z":[{"translate-z":_e()}],"translate-none":["translate-none"],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Rt,Nt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":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",Rt,Nt]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[Fr,g_,Yy,Uz]}],stroke:[{stroke:["none",...I()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},e2r=(e,{cacheSize:t,prefix:r,experimentalParseClassName:n,extend:s={},override:i={}})=>(Z_(e,"cacheSize",t),Z_(e,"prefix",r),Z_(e,"experimentalParseClassName",n),YP(e.theme,i.theme),YP(e.classGroups,i.classGroups),YP(e.conflictingClassGroups,i.conflictingClassGroups),YP(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Z_(e,"orderSensitiveModifiers",i.orderSensitiveModifiers),JP(e.theme,s.theme),JP(e.classGroups,s.classGroups),JP(e.conflictingClassGroups,s.conflictingClassGroups),JP(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),OZe(e,s,"orderSensitiveModifiers"),e),Z_=(e,t,r)=>{r!==void 0&&(e[t]=r)},YP=(e,t)=>{if(t)for(const r in t)Z_(e,r,t[r])},JP=(e,t)=>{if(t)for(const r in t)OZe(e,t,r)},OZe=(e,t,r)=>{const n=t[r];n!==void 0&&(e[r]=e[r]?e[r].concat(n):n)},t2r=(e,...t)=>typeof e=="function"?mxe(vxe,e,...t):mxe(()=>e2r(vxe(),e),...t),r2r=Object.keys({...gTe,...cft}),n2r=Object.keys(mft),s2r=Object.keys(uft),i2r=Object.keys(dft),o2r=Object.keys(lft),Jy=Object.keys(hft),a2r=Object.keys(fft).concat(Object.keys(pft)),l2r=t2r({extend:{theme:{color:r2r,spacing:n2r,radius:o2r,leading:i2r,shadow:a2r},classGroups:{"font-size":[{text:s2r}],h:[{h:Jy}],w:[{w:Jy}],size:[{size:Jy}],"min-h":[{"min-h":Jy}],"min-w":[{"min-w":Jy}],"max-h":[{"max-h":Jy}],"max-w":[{"max-w":Jy}]}}});function re(...e){return l2r(fZe(e))}const Ta={sm:"h-form-sm",md:"h-form-md",lg:"h-form-lg"},_p="focus:outline-none focus:ring-1 focus:ring-accent1 focus:shadow-focus-ring transition-shadow duration-normal",c2r="focus-within:outline-none focus-within:ring-1 focus-within:ring-accent1 focus-within:shadow-focus-ring transition-shadow duration-normal",MD="rounded-md",_Ze={sm:`${Ta.sm} gap-0.5`,md:`${Ta.md} gap-1`,lg:`${Ta.lg} gap-2`},kZe={default:"bg-surface2 hover:bg-surface4 text-neutral3 hover:text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",light:"bg-surface3 hover:bg-surface5 text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",outline:"bg-transparent hover:bg-surface2 text-neutral3 hover:text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",ghost:"bg-transparent border-transparent hover:bg-surface2 text-neutral3 hover:text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",primary:"bg-accent1 hover:bg-accent1/90 text-surface1 font-medium hover:shadow-glow-accent1 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:shadow-none"},EZe="border border-border1 px-2 text-ui-md inline-flex items-center justify-center rounded-md transition-all duration-normal ease-out-custom active:scale-[0.98]";function CZe(e){const t=e?.variant||"default",r=e?.size||"md";return re(EZe,_p,kZe[t],_Ze[r])}const Je=me.forwardRef(({className:e,as:t,size:r="md",variant:n="default",disabled:s,...i},o)=>{const a=t||"button";return f.jsx(a,{ref:o,disabled:s,className:re(EZe,_p,kZe[n],_Ze[r],s&&"active:scale-100",e),...i})});Je.displayName="Button";const Dc=Ift,Ss=Nft,Os=Rft,is=E.forwardRef(({className:e,sideOffset:t=4,...r},n)=>f.jsx(Mft,{children:f.jsx(ETe,{ref:n,sideOffset:t,className:re("z-50 overflow-hidden rounded-md bg-neutral6 px-3 py-1.5 text-xs text-surface2 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));is.displayName=ETe.displayName;const Sd=E.forwardRef(({children:e,tooltip:t,side:r="bottom",className:n,...s},i)=>f.jsx(Dc,{children:f.jsxs(Ss,{children:[f.jsx(Os,{asChild:!0,children:f.jsx(Je,{...s,className:re("size-6 p-1",n),ref:i,"aria-label":t,children:e})}),f.jsx(is,{side:r,children:t})]})}));Sd.displayName="TooltipIconButton";const u2r={"ui-xs":"text-ui-xs leading-ui-xs","ui-sm":"text-ui-sm leading-ui-sm","ui-md":"text-ui-md leading-ui-md","ui-lg":"text-ui-lg leading-ui-lg","header-sm":"text-header-sm leading-header-sm","header-md":"text-header-md leading-header-md","header-lg":"text-header-lg leading-header-lg","header-xl":"text-header-xl leading-header-xl"},d2r={mono:"font-mono"},Ze=({as:e="p",className:t,variant:r="ui-md",font:n,...s})=>f.jsx(e,{className:re(u2r[r],n&&d2r[n],t),...s}),kr={colors:"transition-colors duration-normal ease-out-custom",all:"transition-all duration-normal ease-out-custom",opacity:"transition-opacity duration-normal ease-out-custom"},jD={visible:"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent1 focus-visible:shadow-focus-ring"},f2r={sm:"h-avatar-sm w-avatar-sm",md:"h-avatar-md w-avatar-md",lg:"h-avatar-lg w-avatar-lg"},p2r=({src:e,name:t,size:r="sm",interactive:n=!1})=>f.jsx("div",{className:re(f2r[r],"border border-border1 bg-surface3 shrink-0 overflow-hidden rounded-full flex items-center justify-center",kr.all,n&&"cursor-pointer hover:scale-105 hover:border-neutral2 hover:shadow-sm"),children:e?f.jsx("img",{src:e,alt:t,className:"h-full w-full object-cover"}):f.jsx(Ze,{variant:"ui-md",className:"text-center text-neutral4",children:t[0].toUpperCase()})}),h2r=qbt({style:hbt.coldarkDark,customStyle:{margin:0,backgroundColor:"black"}}),m2r=()=>f.jsx(pyt,{remarkPlugins:[FDe],className:"aui-md",components:b2r}),bxe=E.memo(m2r),g2r=({language:e,code:t})=>{const{isCopied:r,copyToClipboard:n}=y2r(),s=()=>{!t||r||n(t)};return f.jsxs("div",{style:{background:"hsl(0 0% 100% / 0.06)",borderTopRightRadius:"0.5rem",borderTopLeftRadius:"0.5rem",marginTop:"0.5rem",border:"1px solid hsl(0 0% 20.4%)",borderBottom:"none"},className:"flex items-center justify-between gap-4 px-4 py-2 text-sm font-semibold text-white",children:[f.jsx("span",{className:"lowercase [&>span]:text-xs",children:e}),f.jsx(Sd,{tooltip:"Copy",onClick:s,children:f.jsxs("span",{className:"grid",children:[f.jsx("span",{style:{gridArea:"1/1"},className:re("transition-transform",r?"scale-100":"scale-0"),children:f.jsx(lu,{size:14})},"checkmark"),f.jsx("span",{style:{gridArea:"1/1"},className:re("transition-transform",r?"scale-0":"scale-100"),children:f.jsx(cu,{size:14})},"copy")]})})]})},y2r=({copiedDuration:e=1500}={})=>{const[t,r]=E.useState(!1);return{isCopied:t,copyToClipboard:s=>{s&&navigator.clipboard.writeText(s).then(()=>{r(!0),setTimeout(()=>r(!1),e)})}}},v2r=({alt:e,src:t,...r})=>{const[n,s]=E.useState(!1);return E.useEffect(()=>{s(!1)},[t]),n||!t?f.jsxs("div",{children:[f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",width:"150",height:"150",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"})}),f.jsx("p",{className:"text-xs italic text-neutral3 -mt-2.5 mb-2.5",children:"Image link is broken"})]}):f.jsx("img",{src:t,alt:e,...r,onError:()=>{s(!0)}})},b2r=Ygt({h1:({className:e,...t})=>f.jsx("h1",{className:re("mb-8 scroll-m-20 text-4xl font-extrabold tracking-tight last:mb-0",e),...t,style:{marginBottom:"2rem"}}),h2:({className:e,...t})=>f.jsx("h2",{className:re("mb-4 mt-8 scroll-m-20 text-3xl font-semibold tracking-tight first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"2rem"}}),h3:({className:e,...t})=>f.jsx("h3",{className:re("scroll-m-20 text-2xl font-semibold tracking-tight first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"1.5rem"}}),h4:({className:e,...t})=>f.jsx("h4",{className:re("scroll-m-20 text-xl font-semibold tracking-tight first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"1.5rem"}}),h5:({className:e,...t})=>f.jsx("h5",{className:re("font-semibold first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"1rem"}}),h6:({className:e,...t})=>f.jsx("h6",{className:re("font-semibold first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"1rem"}}),p:({className:e,...t})=>f.jsx("p",{className:re("leading-7 first:mt-0 last:mb-0",e),...t}),a:({className:e,...t})=>f.jsx("a",{className:re("text-neutral6 font-medium underline underline-offset-4",e),...t}),blockquote:({className:e,...t})=>f.jsx("blockquote",{className:re("border-l-2 pl-6 italic",e),...t}),ul:({className:e,...t})=>f.jsx("ul",{className:re("my-5 ml-6 list-disc [&>li]:mt-2",e),...t}),ol:({className:e,...t})=>f.jsx("ol",{className:re("my-5 ml-6 list-decimal [&>li]:mt-2",e),...t}),hr:({className:e,...t})=>f.jsx("hr",{className:re("my-5 border-b",e),...t}),table:({className:e,...t})=>f.jsx("table",{className:re("my-5 w-full border-separate border-spacing-0 overflow-y-auto",e),...t}),th:({className:e,...t})=>f.jsx("th",{className:re("bg-surface4 px-4 py-2 text-left font-bold first:rounded-tl-lg last:rounded-tr-lg [&[align=center]]:text-center [&[align=right]]:text-right",e),...t}),td:({className:e,...t})=>f.jsx("td",{className:re("border-b border-l px-4 py-2 text-left last:border-r [&[align=center]]:text-center [&[align=right]]:text-right",e),...t}),tr:({className:e,...t})=>f.jsx("tr",{className:re("m-0 border-b p-0 first:border-t [&:last-child>td:first-child]:rounded-bl-lg [&:last-child>td:last-child]:rounded-br-lg",e),...t}),sup:({className:e,...t})=>f.jsx("sup",{className:re("[&>a]:text-xs [&>a]:no-underline",e),...t}),pre:({className:e,...t})=>f.jsx("pre",{...t,style:{borderBottomRightRadius:"0.5rem",borderBottomLeftRadius:"0.5rem",background:"transparent",fontSize:"0.875rem",marginBottom:"0.5rem",border:"1px solid hsl(0 0% 20.4%)"},className:re("overflow-x-auto p-4 text-white",e)}),code:function({className:t,...r}){const n=fDe();return f.jsxs("pre",{style:{fontSize:"0.875rem",display:"inline"},children:[f.jsx("code",{className:re(!n&&"bg-surface4 rounded border font-semibold",t),...r,style:{fontWeight:"400",paddingBlock:n?0:"0.1em",paddingInline:n?0:"0.3em"}})," "]})},CodeHeader:g2r,SyntaxHighlighter:h2r,img:v2r}),x2r=({reason:e,tripwire:t})=>{const[r,n]=E.useState(!1),s=t&&(t.retry!==void 0||t.tripwirePayload||t.processorId);return f.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-950/20 overflow-hidden",children:[f.jsxs("div",{className:"flex items-start gap-3 p-4",children:[f.jsx(LT,{className:"w-5 h-5 text-amber-400 mt-0.5 flex-shrink-0"}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsx("p",{className:"text-sm font-medium text-amber-200 mb-1",children:"Content Blocked"}),f.jsx("p",{className:"text-sm text-amber-300/90",children:e})]})]}),s&&f.jsxs(f.Fragment,{children:[f.jsxs("button",{onClick:()=>n(!r),className:"w-full flex items-center gap-2 px-4 py-2 text-xs text-amber-400/70 hover:text-amber-400 hover:bg-amber-900/20 transition-colors border-t border-amber-500/20",children:[r?f.jsx(Vd,{className:"w-3.5 h-3.5"}):f.jsx(qN,{className:"w-3.5 h-3.5"}),f.jsx("span",{children:"Details"})]}),r&&f.jsxs("div",{className:"px-4 pb-4 space-y-3 border-t border-amber-500/20 bg-amber-950/10",children:[t.retry!==void 0&&f.jsxs("div",{className:"flex items-center gap-2 pt-3",children:[f.jsx(WN,{className:"w-3.5 h-3.5 text-amber-400/60"}),f.jsxs("span",{className:"text-xs text-amber-300/70",children:["Retry:"," ",t.retry?f.jsx("span",{className:"text-green-400",children:"Allowed"}):f.jsx("span",{className:"text-red-400",children:"Not allowed"})]})]}),t.processorId&&f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(hTe,{className:"w-3.5 h-3.5 text-amber-400/60"}),f.jsxs("span",{className:"text-xs text-amber-300/70",children:["Processor:"," ",f.jsx("code",{className:"px-1.5 py-0.5 rounded bg-amber-900/30 text-amber-200 font-mono",children:t.processorId})]})]}),t.tripwirePayload!==void 0&&t.tripwirePayload!==null&&f.jsxs("div",{className:"pt-1",children:[f.jsx("p",{className:"text-xs text-amber-400/60 mb-1.5",children:"Metadata:"}),f.jsx("pre",{className:"text-xs text-amber-200/80 bg-amber-900/30 rounded p-2 overflow-x-auto font-mono",children:String(JSON.stringify(t.tripwirePayload,null,2))})]})]})]})]})},Fo=e=>f.jsxs("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.5 15C10.3565 15 12.137 14.2625 13.4497 12.9497C14.7625 11.637 15.5 9.85652 15.5 8C15.5 6.14348 14.7625 4.36301 13.4497 3.05025C12.137 1.7375 10.3565 1 8.5 1C6.64348 1 4.86301 1.7375 3.55025 3.05025C2.2375 4.36301 1.5 6.14348 1.5 8C1.5 9.85652 2.2375 11.637 3.55025 12.9497C4.86301 14.2625 6.64348 15 8.5 15ZM5.621 10.879L4.611 11.889C3.84179 11.1198 3.31794 10.1398 3.1057 9.07291C2.89346 8.00601 3.00236 6.90013 3.41864 5.89512C3.83491 4.89012 4.53986 4.03112 5.44434 3.42676C6.34881 2.8224 7.41219 2.49983 8.5 2.49983C9.58781 2.49983 10.6512 2.8224 11.5557 3.42676C12.4601 4.03112 13.1651 4.89012 13.5814 5.89512C13.9976 6.90013 14.1065 8.00601 13.8943 9.07291C13.6821 10.1398 13.1582 11.1198 12.389 11.889L11.379 10.879C11.1004 10.6003 10.7696 10.3792 10.4055 10.2284C10.0414 10.0776 9.6511 9.99995 9.257 10H7.743C7.3489 9.99995 6.95865 10.0776 6.59455 10.2284C6.23045 10.3792 5.89963 10.6003 5.621 10.879Z",fill:"currentColor"}),f.jsx("path",{d:"M8.5 4C7.96957 4 7.46086 4.21071 7.08579 4.58579C6.71071 4.96086 6.5 5.46957 6.5 6V6.5C6.5 7.03043 6.71071 7.53914 7.08579 7.91421C7.46086 8.28929 7.96957 8.5 8.5 8.5C9.03043 8.5 9.53914 8.28929 9.91421 7.91421C10.2893 7.53914 10.5 7.03043 10.5 6.5V6C10.5 5.46957 10.2893 4.96086 9.91421 4.58579C9.53914 4.21071 9.03043 4 8.5 4Z",fill:"currentColor"})]}),TZe=e=>f.jsxs("svg",{width:"126",height:"85",viewBox:"0 0 126 85",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[f.jsx("path",{d:"M63.0002 0.968262C28.5152 0.968262 0.55957 15.6484 0.55957 33.7573V51.2428C0.55957 69.3517 28.5152 84.0319 63.0002 84.0319C97.4853 84.0319 125.441 69.3517 125.441 51.2428V33.7573C125.441 15.6484 97.4853 0.968262 63.0002 0.968262Z",stroke:"#707070"}),f.jsx("path",{d:"M119.322 35.1636C119.322 50.3595 94.1055 62.6782 62.9998 62.6782C31.894 62.6782 6.67773 50.3595 6.67773 35.1636V49.8363C6.67773 65.0322 31.894 77.351 62.9998 77.351C94.1055 77.351 119.322 65.0322 119.322 49.8363V35.1636Z",fill:"#2E2E2E",fillOpacity:"0.9"}),f.jsx("path",{d:"M119.322 35.1636C119.322 50.3595 94.1055 62.6782 62.9998 62.6782C31.894 62.6782 6.67773 50.3595 6.67773 35.1636M119.322 35.1636C119.322 19.9677 94.1055 7.64893 62.9998 7.64893C31.894 7.64893 6.67773 19.9677 6.67773 35.1636M119.322 35.1636V49.8363C119.322 65.0322 94.1055 77.351 62.9998 77.351C31.894 77.351 6.67773 65.0322 6.67773 49.8363V35.1636",stroke:"#424242"}),f.jsxs("g",{clipPath:"url(#clip0_21421_19519)",children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.5383 47.0955C45.0714 50.3122 53.9322 52.1193 63.1714 52.1193C72.4106 52.1193 81.2714 50.3122 87.8045 47.0955C94.3376 43.8787 98.0078 39.5159 98.0078 34.9668C98.0078 30.4177 94.3376 26.0549 87.8045 22.8381C81.2714 19.6214 72.4106 17.8143 63.1714 17.8143C53.9322 17.8143 45.0714 19.6214 38.5383 22.8381C32.0052 26.0549 28.3349 30.4177 28.3349 34.9668C28.3349 39.5159 32.0052 43.8787 38.5383 47.0955ZM42.9089 34.9668L35.8005 34.9668C35.8004 32.3013 37.4056 29.6956 40.4132 27.4793C43.4207 25.263 47.6956 23.5355 52.6971 22.5154C57.6986 21.4954 63.2022 21.2285 68.5118 21.7485C73.8214 22.2685 78.6986 23.552 82.5266 25.4368C86.3546 27.3216 88.9615 29.723 90.0176 32.3373C91.0737 34.9517 90.5316 37.6614 88.4599 40.1241C86.3881 42.5867 82.8797 44.6915 78.3784 46.1723C73.8771 47.6532 68.585 48.4435 63.1714 48.4435V44.9435C63.1717 43.9778 62.7855 43.0215 62.035 42.1293C61.2845 41.2372 60.1843 40.4265 58.7973 39.7438L53.4695 37.1205C52.0828 36.4376 50.4364 35.8959 48.6244 35.5263C46.8124 35.1568 44.8702 34.9667 42.9089 34.9668Z",fill:"#A9A9A9"}),f.jsx("path",{d:"M77.2474 28.0361C75.3808 27.1171 72.8492 26.6007 70.2094 26.6007C67.5696 26.6007 65.038 27.1171 63.1714 28.0361L61.4119 28.9025C59.5453 29.8215 58.4966 31.068 58.4966 32.3678C58.4966 33.6676 59.5453 34.9141 61.4119 35.8331C63.2785 36.7522 65.8101 37.2685 68.4499 37.2685C71.0897 37.2685 73.6213 36.7522 75.4879 35.8331L77.2474 34.9668C79.114 34.0477 80.1627 32.8012 80.1627 31.5015C80.1627 30.2017 79.114 28.9552 77.2474 28.0361Z",fill:"#A9A9A9"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_21421_19519",children:f.jsx("rect",{width:"62.7591",height:"62.7591",fill:"white",transform:"matrix(0.897148 0.441731 -0.897148 0.441731 63.1714 7.24365)"})})})]}),w2r=e=>f.jsxs("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[f.jsx("path",{d:"M11.0313 7.97578C11.0313 9.34436 9.92183 10.4538 8.55324 10.4538C7.18466 10.4538 6.0752 9.34436 6.0752 7.97578C6.0752 6.60719 7.18466 5.49773 8.55324 5.49773C9.92183 5.49773 11.0313 6.60719 11.0313 7.97578ZM11.0313 7.97578H14.573",stroke:"currentColor",strokeWidth:"1.33333",strokeLinecap:"round"}),f.jsx("path",{d:"M12.967 4.46154C11.9273 3.14431 10.3165 2.29883 8.50814 2.29883C5.37277 2.29883 2.83105 4.84055 2.83105 7.97591C2.83105 11.1113 5.37277 13.653 8.50814 13.653C10.3165 13.653 11.9273 12.8075 12.967 11.4903",stroke:"currentColor",strokeWidth:"1.33333",strokeLinecap:"round"})]}),lte=e=>f.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.99982 2.0625C3.8252 2.0625 2.06232 3.82538 2.06232 6C2.06232 8.17462 3.8252 9.9375 5.99982 9.9375C8.17444 9.9375 9.93732 8.17462 9.93732 6C9.93732 3.82538 8.17444 2.0625 5.99982 2.0625ZM0.937317 6C0.937317 3.20406 3.20388 0.9375 5.99982 0.9375C8.79576 0.9375 11.0623 3.20406 11.0623 6C11.0623 8.79594 8.79576 11.0625 5.99982 11.0625C3.20388 11.0625 0.937317 8.79594 0.937317 6Z",fill:"currentColor"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.97865 4.57004C8.22604 4.75795 8.27426 5.11082 8.08635 5.35821L6.05486 8.03279C5.94873 8.17251 5.78348 8.25471 5.60803 8.25505C5.43257 8.2554 5.267 8.17385 5.16032 8.03454L3.80937 6.27034C3.6205 6.02369 3.66733 5.67063 3.91398 5.48176C4.16063 5.29288 4.51369 5.33972 4.70257 5.58637L5.6051 6.76498L7.19048 4.67774C7.37839 4.43036 7.73126 4.38213 7.97865 4.57004Z",fill:"currentColor"})]}),cte=e=>f.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.99982 2.0625C3.8252 2.0625 2.06232 3.82538 2.06232 6C2.06232 8.17462 3.8252 9.9375 5.99982 9.9375C8.17444 9.9375 9.93732 8.17462 9.93732 6C9.93732 3.82538 8.17444 2.0625 5.99982 2.0625ZM0.937317 6C0.937317 3.20406 3.20388 0.9375 5.99982 0.9375C8.79576 0.9375 11.0623 3.20406 11.0623 6C11.0623 8.79594 8.79576 11.0625 5.99982 11.0625C3.20388 11.0625 0.937317 8.79594 0.937317 6Z",fill:"currentColor"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.89741 4.10293C8.11707 4.32261 8.11706 4.67877 7.89738 4.89843L6.79517 6.00058L7.8962 7.10155C8.11588 7.32122 8.11589 7.67737 7.89623 7.89705C7.67656 8.11673 7.32041 8.11674 7.10073 7.89707L5.99965 6.79605L4.89856 7.89707C4.67889 8.11673 4.32273 8.11672 4.10307 7.89704C3.88341 7.67737 3.88342 7.32121 4.10309 7.10155L5.20413 6.00058L4.10191 4.89843C3.88224 4.67877 3.88223 4.32262 4.10189 4.10294C4.32155 3.88326 4.67771 3.88325 4.89738 4.10292L5.99965 5.20511L7.10191 4.10291C7.32159 3.88325 7.67774 3.88326 7.89741 4.10293Z",fill:"currentColor"})]}),j4=e=>f.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:f.jsx("path",{d:"M8.5 3V13",stroke:"currentColor",strokeWidth:"0.5"})}),Ra=e=>f.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.1747 3.18598L7.02554 1.95209C7.11557 1.89207 7.31087 1.87106 7.41016 1.90924L12.4139 3.83377C12.4683 3.85467 12.546 3.96798 12.546 4.03118V13.0167C12.546 13.265 12.7473 13.4663 12.9956 13.4663C13.2439 13.4663 13.4452 13.265 13.4452 13.0167V4.03118C13.4452 3.59605 13.1384 3.14906 12.7367 2.99456L7.73293 1.07004C7.36225 0.927472 6.86056 0.981451 6.52679 1.20396L4.20445 2.75219L3.90419 2.95236L3.90647 2.95824C3.69329 3.05449 3.55469 3.27599 3.55469 3.57581V11.7119C3.55469 12.2084 3.93067 12.7499 4.39251 12.9206L9.89804 14.955C10.3608 15.126 10.7359 14.8596 10.7359 14.3659V5.83295C10.7359 5.33662 10.3498 4.81289 9.88389 4.66643L5.1747 3.18598Z",fill:"currentColor"})}),ute=e=>f.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[f.jsx("g",{clipPath:"url(#clip0_21999_22095)",children:f.jsx("path",{d:"M7.5 0.75C3.6325 0.75 0.5 3.8825 0.5 7.75C0.5 10.8475 2.50375 13.4637 5.28625 14.3912C5.63625 14.4525 5.7675 14.2425 5.7675 14.0587C5.7675 13.8925 5.75875 13.3412 5.75875 12.755C4 13.0787 3.545 12.3262 3.405 11.9325C3.32625 11.7312 2.985 11.11 2.6875 10.9437C2.4425 10.8125 2.0925 10.4887 2.67875 10.48C3.23 10.4712 3.62375 10.9875 3.755 11.1975C4.385 12.2562 5.39125 11.9587 5.79375 11.775C5.855 11.32 6.03875 11.0137 6.24 10.8387C4.6825 10.6637 3.055 10.06 3.055 7.3825C3.055 6.62125 3.32625 5.99125 3.7725 5.50125C3.7025 5.32625 3.4575 4.60875 3.8425 3.64625C3.8425 3.64625 4.42875 3.4625 5.7675 4.36375C6.3275 4.20625 6.9225 4.1275 7.5175 4.1275C8.1125 4.1275 8.7075 4.20625 9.2675 4.36375C10.6062 3.45375 11.1925 3.64625 11.1925 3.64625C11.5775 4.60875 11.3325 5.32625 11.2625 5.50125C11.7087 5.99125 11.98 6.6125 11.98 7.3825C11.98 10.0687 10.3438 10.6637 8.78625 10.8387C9.04 11.0575 9.25875 11.4775 9.25875 12.1337C9.25875 13.07 9.25 13.8225 9.25 14.0587C9.25 14.2425 9.38125 14.4612 9.73125 14.3912C11.1209 13.9221 12.3284 13.029 13.1839 11.8377C14.0393 10.6463 14.4996 9.21668 14.5 7.75C14.5 3.8825 11.3675 0.75 7.5 0.75Z",fill:"currentColor"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_21999_22095",children:f.jsx("rect",{width:"14",height:"14",fill:"currentColor",transform:"translate(0.5 0.75)"})})})]}),S2r=e=>f.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[f.jsxs("g",{clipPath:"url(#clip0_21999_20513)",children:[f.jsx("path",{d:"M13.5037 7.54867C13.5037 7.1144 13.4648 6.69683 13.3924 6.29596H7.62436V8.66776H10.9204C10.7756 9.43052 10.3413 10.0764 9.68994 10.5106V12.0529H11.6776C12.8356 10.9839 13.5037 9.41382 13.5037 7.54867Z",fill:"white"}),f.jsx("path",{d:"M7.62415 13.5339C9.27773 13.5339 10.6643 12.9882 11.6776 12.0529L9.68994 10.5106C9.14431 10.8781 8.44816 11.1009 7.62415 11.1009C6.03182 11.1009 4.67889 10.0263 4.19451 8.57877H2.15677V10.16C3.1645 12.1587 5.23008 13.5339 7.62415 13.5339Z",fill:"white"}),f.jsx("path",{d:"M4.19472 8.57315C4.07223 8.20569 3.99985 7.81595 3.99985 7.40952C3.99985 7.00308 4.07223 6.61335 4.19472 6.24589V4.66469H2.15698C1.73941 5.4887 1.5 6.41849 1.5 7.40952C1.5 8.40055 1.73941 9.33034 2.15698 10.1543L3.74374 8.91834L4.19472 8.57315Z",fill:"white"}),f.jsx("path",{d:"M7.62415 3.72376C8.5261 3.72376 9.32783 4.03555 9.96811 4.63685L11.7219 2.88306C10.6585 1.89202 9.27773 1.28516 7.62415 1.28516C5.23008 1.28516 3.16471 2.66036 2.15698 4.66469L4.19472 6.24589C4.6791 4.79832 6.03182 3.72376 7.62415 3.72376Z",fill:"white"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_21999_20513",children:f.jsx("rect",{width:"12.2487",height:"12.2487",fill:"white",transform:"translate(1.375 1.28516)"})})})]}),O2r={sm:"[&>svg]:h-icon-sm [&>svg]:w-icon-sm",default:"[&>svg]:h-icon-default [&>svg]:w-icon-default",lg:"[&>svg]:h-icon-lg [&>svg]:w-icon-lg"},qe=({children:e,className:t,size:r="default",...n})=>f.jsx("span",{className:re("block",O2r[r],t),...n,children:e}),_2r=e=>f.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:f.jsx("path",{d:"M3.8674 9.19968L4.14554 10.8649C4.23965 11.4283 4.75254 11.8237 5.32137 11.7713L5.58252 11.7472C6.56555 11.6567 7.43309 12.3868 7.51181 13.3708L7.59308 14.3867C7.60422 14.5259 7.71868 14.6342 7.85825 14.6376L9.91053 14.6876C10.1066 14.6924 10.2434 14.4948 10.17 14.3129L8.90452 11.1782C8.80956 10.9429 8.65085 10.7389 8.44626 10.5889L7.90134 10.1895C7.70604 10.0464 7.55223 9.85411 7.45759 9.63124C7.15011 8.90712 6.6579 7.71234 6.37054 6.88944C6.19204 6.3783 5.79931 6.29158 5.45492 6.21553C4.98179 6.11106 4.5999 6.02673 4.99001 4.88985C5.66408 2.92541 8.06015 2.07904 10.6601 3.33088C12.6488 4.2884 13.1187 6.35416 13.0328 7.58237C13.0297 7.62768 13.0214 7.67186 13.0094 7.71566C12.8829 8.17534 12.368 8.40491 11.9415 8.19169L10.3022 7.37201C10.2069 7.32439 10.0927 7.33657 10.0096 7.40322L8.64809 8.49559C8.55405 8.57104 8.52072 8.69931 8.56615 8.811L10.8995 14.5478C10.9404 14.6483 11.0369 14.715 11.1454 14.7177L12.0572 14.7399C12.2581 14.7448 12.3951 14.5382 12.3124 14.3551L11.8681 13.3706C11.4211 12.3803 11.6047 11.2192 12.3354 10.4151L13.4616 9.17575C13.7473 8.86125 13.9224 8.46187 13.9599 8.03858L13.9763 7.85359C14.2866 4.35298 11.377 1.41272 7.87336 1.68639C6.03919 1.82965 4.45399 3.02228 3.80807 4.74492L3.70275 5.02579C3.5828 5.34571 3.62741 5.70411 3.82213 5.98485L3.88946 6.08192C4.12183 6.41695 4.0958 6.86726 3.82637 7.17328L3.06705 8.03572C2.96261 8.15435 2.98058 8.33664 3.10617 8.43259L3.66059 8.85617C3.77064 8.94026 3.84458 9.06307 3.8674 9.19968Z",fill:"currentColor"})}),k2r=e=>f.jsx("svg",{width:"12",height:"13",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:f.jsx("path",{d:"M10.1266 5.67745C10.3409 5.0225 10.2695 4.2961 9.92413 3.70069C9.40017 2.78376 8.34034 2.31934 7.30433 2.53369C6.85182 2.02164 6.18496 1.73584 5.49428 1.73584C4.43445 1.73584 3.50561 2.41461 3.17218 3.4149C2.49342 3.55779 1.90992 3.97458 1.56458 4.5819C1.04062 5.49883 1.1597 6.64202 1.86228 7.42796C1.64793 8.09482 1.73129 8.80931 2.07663 9.40472C2.60059 10.3217 3.66042 10.798 4.69643 10.5717C5.16085 11.0838 5.8158 11.3815 6.50648 11.3815C7.56631 11.3815 8.49515 10.7027 8.82858 9.70243C9.50735 9.55953 10.0908 9.14274 10.4362 8.53542C10.9601 7.61849 10.8411 6.46339 10.1266 5.67745ZM6.50648 10.7503C6.07778 10.7503 5.67291 10.6074 5.35138 10.3336C5.36329 10.3217 5.39902 10.3097 5.41093 10.2978L7.32815 9.19037C7.42341 9.13083 7.48295 9.03557 7.48295 8.91648V6.21332L8.29271 6.67774C8.30462 6.67774 8.30462 6.68965 8.30462 6.70156V8.9403C8.31653 9.94059 7.50677 10.7503 6.50648 10.7503ZM2.62441 9.09511C2.41006 8.72595 2.33861 8.29726 2.41006 7.88047C2.42197 7.89238 2.44578 7.90429 2.4696 7.91619L4.38682 9.02366C4.48209 9.0832 4.60117 9.0832 4.69643 9.02366L7.04235 7.66612V8.60687C7.04235 8.61878 7.04235 8.63069 7.03044 8.63069L5.0894 9.75006C4.23201 10.2502 3.12455 9.9525 2.62441 9.09511ZM2.12426 4.90342C2.33861 4.53427 2.67204 4.26038 3.06501 4.10557V6.39195C3.06501 6.49912 3.12455 6.60629 3.21982 6.66583L5.56573 8.02337L4.75597 8.48779C4.74407 8.48779 4.73216 8.4997 4.73216 8.48779L2.79112 7.36842C1.90992 6.86827 1.62412 5.76081 2.12426 4.90342ZM8.79285 6.45149L6.44694 5.09395L7.2567 4.62953C7.2686 4.62953 7.28051 4.61762 7.28051 4.62953L9.22155 5.7489C10.0908 6.24905 10.3766 7.35651 9.8765 8.2139C9.66215 8.58305 9.32872 8.85694 8.93575 8.99984V6.72538C8.94766 6.6182 8.88812 6.51103 8.79285 6.45149ZM9.5907 5.23685C9.5788 5.22494 9.55498 5.21303 9.53116 5.20113L7.61394 4.09366C7.51868 4.03412 7.39959 4.03412 7.30433 4.09366L4.95841 5.4512V4.51045C4.95841 4.49854 4.95841 4.48663 4.97032 4.48663L6.91136 3.36726C7.78066 2.86712 8.87621 3.16482 9.37636 4.03412C9.5907 4.39137 9.66215 4.82006 9.5907 5.23685ZM4.51781 6.904L3.70805 6.43958C3.69615 6.43958 3.69615 6.42767 3.69615 6.41576V4.17702C3.69615 3.17673 4.5059 2.36697 5.50619 2.36697C5.93489 2.36697 6.33977 2.50987 6.66129 2.78376C6.64938 2.79567 6.62556 2.80758 6.60175 2.81949L4.68453 3.92695C4.58926 3.98649 4.52972 4.08176 4.52972 4.20084V6.904H4.51781ZM4.95841 5.95134L6.00634 5.34402L7.05426 5.95134V7.15407L6.00634 7.76139L4.95841 7.15407V5.95134Z",fill:"currentColor"})}),DZe=e=>f.jsx("svg",{width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.40864 11.9983C7.58064 11.9733 6.84164 11.6153 6.31564 11.0563C6.31464 11.0563 6.31464 11.0553 6.31464 11.0553C5.78864 10.4963 5.47564 9.73633 5.50064 8.90833C5.52564 8.08033 5.88464 7.34133 6.44364 6.81533C7.00264 6.28833 7.76264 5.97633 8.59064 6.00133C9.41864 6.02633 10.1576 6.38433 10.6836 6.94333H10.6846C11.2106 7.50333 11.5236 8.26233 11.4986 9.09033C11.4726 9.91833 11.1146 10.6583 10.5556 11.1843C9.99664 11.7103 9.23664 12.0233 8.40864 11.9983ZM16.1266 8.15033L14.3606 7.74033C14.2316 7.14133 14.0146 6.57633 13.7216 6.05733L14.7726 4.57933C14.9116 4.38533 14.8926 4.12033 14.7296 3.94633L13.9206 3.08733C13.7576 2.91333 13.4946 2.87933 13.2916 3.00533L11.7526 3.96533C11.2526 3.64133 10.7016 3.39033 10.1116 3.22633L9.80964 1.43833C9.76964 1.20333 9.56964 1.02833 9.33164 1.02133L8.15264 0.985326C7.91364 0.978326 7.70364 1.14033 7.64964 1.37233L7.24064 3.13933C6.64164 3.26733 6.07664 3.48433 5.55664 3.77733L4.07864 2.72633C3.88464 2.58833 3.61964 2.60633 3.44664 2.76933L2.58664 3.57833C2.41364 3.74133 2.37964 4.00533 2.50564 4.20733L3.46564 5.74633C3.14164 6.24633 2.89064 6.79833 2.72564 7.38833L0.937635 7.68933C0.702635 7.72933 0.528635 7.92933 0.520635 8.16733L0.485635 9.34733C0.477635 9.58533 0.639635 9.79533 0.872635 9.84933L2.63864 10.2583C2.76764 10.8573 2.98464 11.4233 3.27764 11.9423L2.22564 13.4203C2.08764 13.6143 2.10564 13.8793 2.26964 14.0523L3.07864 14.9123C3.24164 15.0853 3.50464 15.1203 3.70664 14.9933L5.24564 14.0333C5.74663 14.3583 6.29764 14.6093 6.88764 14.7733L7.18964 16.5613C7.22864 16.7963 7.42864 16.9713 7.66764 16.9783L8.84663 17.0143C9.08564 17.0213 9.29564 16.8593 9.34964 16.6273L9.75864 14.8603C10.3576 14.7323 10.9226 14.5153 11.4416 14.2213L12.9206 15.2733C13.1146 15.4113 13.3786 15.3933 13.5526 15.2293L14.4116 14.4213C14.5856 14.2573 14.6196 13.9943 14.4936 13.7923L13.5336 12.2533C13.8576 11.7523 14.1086 11.2013 14.2726 10.6113L16.0616 10.3103C16.2966 10.2703 16.4706 10.0703 16.4776 9.83233L16.5136 8.65233C16.5206 8.41433 16.3586 8.20433 16.1266 8.15033Z",fill:"currentColor"})}),E2r=e=>f.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:f.jsx("path",{d:"M5.25684 12.6387L10.4003 3.36133H11.7432L6.5997 12.6387H5.25684Z",fill:"currentColor"})}),Cu=e=>f.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.5605 1.42351C8.0791 0.904904 8.92215 0.906157 9.4395 1.42351L10.6922 2.67617C11.2108 3.19477 11.2095 4.03782 10.6922 4.55517L9.4395 5.80783C8.9209 6.32643 8.07785 6.32518 7.5605 5.80783L6.30784 4.55517C5.78923 4.03656 5.79049 3.19352 6.30784 2.67617L7.5605 1.42351ZM3.17618 5.80783C3.69478 5.28923 4.53782 5.29048 5.05517 5.80783L6.30784 7.0605C6.82644 7.5791 6.82519 8.42214 6.30784 8.93949L5.05517 10.1922C4.53657 10.7108 3.69353 10.7095 3.17618 10.1922L1.92351 8.93949C1.40491 8.42089 1.40616 7.57785 1.92351 7.0605L3.17618 5.80783ZM11.9448 5.80783C12.4634 5.28923 13.3065 5.29048 13.8238 5.80783L15.0765 7.0605C15.5951 7.5791 15.5938 8.42214 15.0765 8.93949L13.8238 10.1922C13.3052 10.7108 12.4622 10.7095 11.9448 10.1922L10.6922 8.93949C10.1736 8.42089 10.1748 7.57785 10.6922 7.0605L11.9448 5.80783ZM7.5605 10.1922C8.0791 9.67355 8.92215 9.67481 9.4395 10.1922L10.6922 11.4448C11.2108 11.9634 11.2095 12.8065 10.6922 13.3238L9.4395 14.5765C8.9209 15.0951 8.07785 15.0938 7.5605 14.5765L6.30784 13.3238C5.78923 12.8052 5.79049 11.9622 6.30784 11.4448L7.5605 10.1922Z",fill:"currentColor"})}),Tu=e=>f.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.24388 2.4018C6.24388 2.0394 6.53767 1.74561 6.90008 1.74561H10.0991C10.4614 1.74561 10.7553 2.0394 10.7553 2.4018V4.57546C10.7553 4.93787 10.4614 5.23166 10.0991 5.23166H9.31982V7.35469L10.0033 9.22664C9.90442 9.20146 9.80035 9.1761 9.6915 9.14986L9.62652 9.13422C9.30473 9.05687 8.92256 8.96501 8.61993 8.84491C8.5819 8.82981 8.54147 8.81292 8.49957 8.79391C8.45767 8.81292 8.41724 8.82981 8.3792 8.84491C8.07657 8.96501 7.6944 9.05687 7.37261 9.13422L7.30763 9.14986C7.19879 9.1761 7.09471 9.20146 6.99577 9.22664L7.67932 7.35469V5.23166H6.90008C6.53767 5.23166 6.24388 4.93787 6.24388 4.57546V2.4018ZM6.99577 9.22664C6.99577 9.22664 6.99578 9.22664 6.99577 9.22664L6.43283 10.7683H6.81806C7.18047 10.7683 7.47426 11.0622 7.47426 11.4245V13.5982C7.47426 13.9606 7.18047 14.2544 6.81806 14.2544H3.61909C3.25668 14.2544 2.96289 13.9606 2.96289 13.5982V11.4245C2.96289 11.0622 3.25668 10.7683 3.61909 10.7683H4.26617C4.2921 10.4663 4.32783 10.1494 4.37744 9.85171C4.43762 9.49063 4.52982 9.08135 4.68998 8.76102C4.93975 8.2615 5.44743 8.01751 5.7771 7.88788C6.14684 7.74249 6.57537 7.63889 6.92317 7.55505C7.24707 7.47696 7.49576 7.41679 7.67932 7.35469L6.99577 9.22664ZM6.43283 10.7683L6.99577 9.22664C6.75846 9.28705 6.55067 9.34646 6.37745 9.41458C6.22784 9.47341 6.1623 9.51712 6.14023 9.53254C6.09752 9.63631 6.04409 9.83055 5.99562 10.1214C5.96201 10.3231 5.93498 10.5439 5.91341 10.7683H6.43283ZM10.0033 9.22664L9.31982 7.35469C9.50338 7.41679 9.75206 7.47696 10.076 7.55505C10.4238 7.63889 10.8523 7.74249 11.2221 7.88788C11.5517 8.01751 12.0594 8.2615 12.3091 8.76102C12.4693 9.08135 12.5615 9.49063 12.6217 9.85171C12.6713 10.1494 12.707 10.4663 12.733 10.7683H13.38C13.7424 10.7683 14.0362 11.0622 14.0362 11.4245V13.5982C14.0362 13.9606 13.7424 14.2544 13.38 14.2544H10.1811C9.81867 14.2544 9.52488 13.9606 9.52488 13.5982V11.4245C9.52488 11.0622 9.81867 10.7683 10.1811 10.7683H10.5663L10.0033 9.22664ZM10.0033 9.22664L10.5663 10.7683H11.0857C11.0642 10.5439 11.0372 10.3231 11.0035 10.1214C10.9551 9.83055 10.9016 9.63631 10.8589 9.53254C10.8369 9.51712 10.7713 9.47341 10.6217 9.41458C10.4485 9.34646 10.2407 9.28705 10.0033 9.22664Z",fill:"currentColor"})}),C2r=e=>f.jsxs("svg",{width:"126",height:"85",viewBox:"0 0 126 85",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[f.jsx("path",{d:"M119.322 35.1636C119.322 50.3595 94.1055 62.6782 62.9998 62.6782C31.894 62.6782 6.67773 50.3595 6.67773 35.1636V49.8363C6.67773 65.0322 31.894 77.351 62.9998 77.351C94.1055 77.351 119.322 65.0322 119.322 49.8363V35.1636Z",fill:"#2E2E2E",fillOpacity:"0.9"}),f.jsx("path",{d:"M119.322 35.1636C119.322 50.3595 94.1055 62.6782 62.9998 62.6782C31.894 62.6782 6.67773 50.3595 6.67773 35.1636M119.322 35.1636C119.322 19.9677 94.1055 7.64893 62.9998 7.64893C31.894 7.64893 6.67773 19.9677 6.67773 35.1636M119.322 35.1636V49.8363C119.322 65.0322 94.1055 77.351 62.9998 77.351C31.894 77.351 6.67773 65.0322 6.67773 49.8363V35.1636",stroke:"#424242"}),f.jsx("path",{d:"M63.0002 0.968262C28.5152 0.968262 0.55957 15.6484 0.55957 33.7573V51.2428C0.55957 69.3517 28.5152 84.0319 63.0002 84.0319C97.4853 84.0319 125.441 69.3517 125.441 51.2428V33.7573C125.441 15.6484 97.4853 0.968262 63.0002 0.968262Z",stroke:"#707070"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M74.9374 21.357C76.2127 20.7291 78.2804 20.7291 79.5557 21.357L90.8129 26.8997C92.0882 27.5276 92.0882 28.5458 90.8129 29.1737L83.1638 32.9399C81.8885 33.5678 79.8207 33.5678 78.5454 32.9399L75.8033 31.5898L68.3324 35.2682L64.1502 39.696C63.8908 39.481 63.6138 39.2568 63.3231 39.0227L63.1495 38.883C62.2893 38.1914 61.2677 37.3701 60.6254 36.6376C60.5446 36.5456 60.4618 36.4463 60.3812 36.3407C60.1669 36.3011 59.9652 36.2603 59.7782 36.2205C58.2906 35.9043 56.6225 35.4013 55.2179 34.9777L54.9342 34.8922C54.4589 34.7491 54.0034 34.6127 53.5666 34.4849L62.5594 32.4258L70.0304 28.7473L67.2882 27.3972C66.0129 26.7692 66.0129 25.7512 67.2882 25.1232L74.9374 21.357ZM53.5666 34.4849C53.5666 34.4849 53.5666 34.4849 53.5666 34.4849L46.1603 36.1808L47.516 36.8483C48.7913 37.4762 48.7912 38.4943 47.516 39.1222L39.8668 42.8884C38.5916 43.5163 36.5238 43.5164 35.2485 42.8884L23.9913 37.3457C22.7159 36.7177 22.716 35.6996 23.9913 35.0717L31.6404 31.3055C32.9156 30.6776 34.9834 30.6776 36.2587 31.3055L38.5358 32.4267C39.6899 31.9483 40.9309 31.4611 42.153 31.0313C43.6354 30.5099 45.4001 29.9605 47.091 29.683C49.7278 29.2502 52.3729 29.7072 53.9892 30.0537C55.8019 30.4425 57.6745 31.0055 59.1934 31.4628C60.6081 31.8887 61.6949 32.2154 62.5594 32.4258L53.5666 34.4849ZM46.1603 36.1808L53.5666 34.4849C52.5189 34.1784 51.5786 33.9213 50.7293 33.7392C49.9958 33.5819 49.6114 33.5441 49.4794 33.5326C48.964 33.6384 48.0924 33.8823 46.8983 34.3023C46.0703 34.5936 45.1981 34.9293 44.3325 35.2808L46.1603 36.1808ZM64.1502 39.696L68.3324 35.2682C68.7598 35.6939 69.4232 36.229 70.2883 36.9256C71.2171 37.6735 72.3605 38.5954 73.15 39.488C73.8539 40.2838 74.7818 41.5862 73.9029 42.8844C73.3394 43.717 72.2235 44.5859 71.1648 45.3159C70.2916 45.9175 69.3021 46.5286 68.3305 47.0968L70.6077 48.218C71.8829 48.8459 71.8829 49.864 70.6077 50.4919L62.9585 54.2582C61.6833 54.8861 59.6154 54.8861 58.3402 54.2582L47.083 48.7154C45.8077 48.0875 45.8077 47.0694 47.083 46.4415L54.7321 42.6752C56.0074 42.0474 58.0751 42.0473 59.3505 42.6752L60.7062 43.3428L64.1502 39.696ZM64.1502 39.696L60.7062 43.3428L62.5339 44.2427C63.2478 43.8165 63.9298 43.3871 64.5213 42.9794C65.3742 42.3914 65.8695 41.9622 66.0846 41.7085C66.0613 41.6436 65.9844 41.4543 65.6649 41.0931C65.295 40.6749 64.773 40.212 64.1502 39.696Z",fill:"#A9A9A9"})]}),sb=e=>f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[f.jsx("path",{d:"M6.53918 9.32122C6.34324 9.51508 6.02724 9.51338 5.83338 9.31744C5.63952 9.1215 5.6412 8.80551 5.83713 8.61164L10.1958 4.29931C10.7996 3.70186 10.8017 2.72852 10.2041 2.12839L10.1899 2.11428C9.58767 1.52481 8.62251 1.53208 8.0292 2.13052L2.29396 7.91536C2.0999 8.1111 1.78388 8.11246 1.58813 7.9184C1.39239 7.72433 1.39103 7.40831 1.58509 7.21257L7.32036 1.42774C8.30005 0.439581 9.89369 0.427613 10.8881 1.40094L10.9116 1.42425C11.4942 2.00929 11.7316 2.80913 11.6232 3.56922C12.389 3.44866 13.1999 3.67918 13.7961 4.26273C14.804 5.24929 14.8147 6.86824 13.82 7.86808L8.5531 13.1619C8.50045 13.2148 8.50024 13.3002 8.55263 13.3534L9.65448 14.4717C9.84794 14.668 9.8456 14.984 9.64925 15.1775C9.45291 15.3709 9.13691 15.3686 8.94345 15.1723L7.84163 14.054C7.40505 13.6109 7.40677 12.8988 7.8455 12.4579L13.1124 7.16405C13.7161 6.55727 13.7095 5.57478 13.0979 4.97606C12.4925 4.38347 11.4942 4.40725 10.8978 5.00886L6.53918 9.32122Z",fill:"currentColor"}),f.jsx("path",{d:"M8.84622 2.75411C9.04697 2.56188 9.36555 2.56381 9.56395 2.76076C9.76234 2.95771 9.76658 3.27625 9.57582 3.4784L9.56661 3.48794L5.25912 7.82701C4.67023 8.42022 4.672 9.37798 5.26305 9.96904C5.85624 10.5622 6.81818 10.5615 7.41052 9.9675L11.6299 5.73599L11.6395 5.72671C11.8406 5.53493 12.1592 5.53756 12.3572 5.73496C12.5583 5.93548 12.5587 6.26104 12.3582 6.46214L8.13877 10.6937C7.14498 11.6903 5.53105 11.6915 4.53584 10.6963C3.5442 9.70461 3.54127 8.09774 4.52928 7.10248L8.83677 2.76342L8.84622 2.75411Z",fill:"currentColor"})]}),T2r=e=>f.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:f.jsx("path",{d:"M1.5 8.5V8C1.5 7.60218 1.65804 7.22064 1.93934 6.93934C2.22064 6.65804 2.60218 6.5 3 6.5H13C13.3978 6.5 13.7794 6.65804 14.0607 6.93934C14.342 7.22064 14.5 7.60218 14.5 8V8.5M8.70667 4.20667L7.29333 2.79333C7.20048 2.70037 7.09022 2.62661 6.96886 2.57628C6.84749 2.52595 6.71739 2.50003 6.586 2.5H3C2.60218 2.5 2.22064 2.65804 1.93934 2.93934C1.65804 3.22064 1.5 3.60218 1.5 4V12C1.5 12.3978 1.65804 12.7794 1.93934 13.0607C2.22064 13.342 2.60218 13.5 3 13.5H13C13.3978 13.5 13.7794 13.342 14.0607 13.0607C14.342 12.7794 14.5 12.3978 14.5 12V6C14.5 5.60218 14.342 5.22064 14.0607 4.93934C13.7794 4.65804 13.3978 4.5 13 4.5H9.414C9.14887 4.49977 8.89402 4.39426 8.70667 4.20667Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})}),D2r=e=>f.jsxs("svg",{width:"126",height:"85",viewBox:"0 0 126 85",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[f.jsx("path",{d:"M119.322 35.1641C119.322 50.36 94.1055 62.6787 62.9998 62.6787C31.894 62.6787 6.67773 50.36 6.67773 35.1641V49.8368C6.67773 65.0327 31.894 77.3514 62.9998 77.3514C94.1055 77.3514 119.322 65.0327 119.322 49.8368V35.1641Z",fill:"#2E2E2E",fillOpacity:"0.9"}),f.jsx("path",{d:"M119.322 35.1641C119.322 50.36 94.1055 62.6787 62.9998 62.6787C31.894 62.6787 6.67773 50.36 6.67773 35.1641M119.322 35.1641C119.322 19.9681 94.1055 7.64941 62.9998 7.64941C31.894 7.64941 6.67773 19.9681 6.67773 35.1641M119.322 35.1641V49.8368C119.322 65.0327 94.1055 77.3514 62.9998 77.3514C31.894 77.3514 6.67773 65.0327 6.67773 49.8368V35.1641",stroke:"#424242"}),f.jsx("path",{d:"M63.0002 0.96875C28.5152 0.96875 0.55957 15.6489 0.55957 33.7578V51.2433C0.55957 69.3522 28.5152 84.0323 63.0002 84.0323C97.4853 84.0323 125.441 69.3522 125.441 51.2433V33.7578C125.441 15.6489 97.4853 0.96875 63.0002 0.96875Z",stroke:"#707070"}),f.jsx("path",{d:"M51.5215 39.9726C50.5464 40.4477 48.9738 40.4435 48.009 39.9634C47.0442 39.4833 47.0526 38.709 48.0277 38.2339L69.7191 27.6672C72.7243 26.2032 72.7347 23.8181 69.7605 22.3476L69.6898 22.313C66.6927 20.8686 61.8895 20.8864 58.9368 22.3528L30.3946 36.5278C29.4288 37.0074 27.8561 37.0107 26.882 36.5352C25.9078 36.0597 25.901 35.2853 26.8668 34.8057L55.4092 20.6308C60.2847 18.2094 68.2157 18.1801 73.1645 20.5651L73.2814 20.6222C76.1808 22.0558 77.3624 24.0157 76.8227 25.8782C80.6339 25.5828 84.6694 26.1476 87.6364 27.5775C92.6525 29.9949 92.7059 33.962 87.7554 36.4119L61.5441 49.3836C61.282 49.5133 61.281 49.7227 61.5417 49.853L67.0252 52.5932C67.988 53.0743 67.9763 53.8486 66.9992 54.3226C66.0221 54.7966 64.4495 54.7909 63.4867 54.3098L58.0033 51.5695C55.8306 50.4838 55.8392 48.7391 58.0226 47.6585L84.2339 34.6868C87.2382 33.2 87.2058 30.7925 84.1617 29.3254C81.1488 27.8734 76.1811 27.9317 73.2127 29.4058L51.5215 39.9726Z",fill:"#A9A9A9"}),f.jsx("path",{d:"M63.0028 23.8809C64.0019 23.4098 65.5873 23.4146 66.5747 23.8972C67.562 24.3798 67.5831 25.1603 66.6338 25.6556L66.5879 25.679L45.1511 36.3113C42.2204 37.7649 42.2292 40.1117 45.1707 41.56C48.1228 43.0135 52.91 43.0118 55.8578 41.5563L76.8564 31.1875L76.9037 31.1648C77.9049 30.6949 79.4903 30.7013 80.4755 31.185C81.4763 31.6764 81.4785 32.4741 80.4806 32.9669L59.4821 43.3356C54.5363 45.7777 46.5044 45.7806 41.5516 43.342C36.6166 40.9121 36.602 36.9747 41.519 34.5359L62.9558 23.9037L63.0028 23.8809Z",fill:"#A9A9A9"})]}),A2r=e=>f.jsxs("svg",{width:"126",height:"85",viewBox:"0 0 126 85",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[f.jsx("path",{d:"M119.322 35.1641C119.322 50.36 94.1055 62.6787 62.9998 62.6787C31.894 62.6787 6.67773 50.36 6.67773 35.1641V49.8368C6.67773 65.0327 31.894 77.3514 62.9998 77.3514C94.1055 77.3514 119.322 65.0327 119.322 49.8368V35.1641Z",fill:"#2E2E2E",fillOpacity:"0.9"}),f.jsx("path",{d:"M119.322 35.1641C119.322 50.36 94.1055 62.6787 62.9998 62.6787C31.894 62.6787 6.67773 50.36 6.67773 35.1641M119.322 35.1641C119.322 19.9681 94.1055 7.64941 62.9998 7.64941C31.894 7.64941 6.67773 19.9681 6.67773 35.1641M119.322 35.1641V49.8368C119.322 65.0327 94.1055 77.3514 62.9998 77.3514C31.894 77.3514 6.67773 65.0327 6.67773 49.8368V35.1641",stroke:"#424242"}),f.jsx("path",{d:"M63.0002 0.96875C28.5152 0.96875 0.55957 15.6489 0.55957 33.7578V51.2433C0.55957 69.3522 28.5152 84.0323 63.0002 84.0323C97.4853 84.0323 125.441 69.3522 125.441 51.2433V33.7578C125.441 15.6489 97.4853 0.96875 63.0002 0.96875Z",stroke:"#707070"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M95.8997 32.6647C98.4806 33.9355 98.4744 36.0012 95.8997 37.2689L89.6657 40.3384C87.0848 41.6091 82.8892 41.6061 80.3146 40.3384L74.0805 37.2689C71.4996 35.9981 71.5059 33.9324 74.0805 32.6647L80.3146 29.5952C82.8955 28.3244 87.091 28.3275 89.6657 29.5952L95.8997 32.6647ZM74.0805 21.9215C76.6614 23.1923 76.6552 25.258 74.0805 26.5257L67.8465 29.5952C65.2656 30.866 61.0701 30.8629 58.4954 29.5952L52.2613 26.5257C49.6804 25.255 49.6867 23.1892 52.2613 21.9215L58.4954 18.852C61.0763 17.5813 65.2718 17.5843 67.8465 18.852L74.0805 21.9215ZM74.0805 43.4079C76.6614 44.6786 76.6552 46.7444 74.0805 48.0121L67.8465 51.0816C65.2656 52.3523 61.0701 52.3493 58.4954 51.0816L52.2613 48.0121C49.6804 46.7413 49.6867 44.6756 52.2613 43.4079L58.4954 40.3384C61.0763 39.0676 65.2718 39.0707 67.8465 40.3384L74.0805 43.4079ZM52.2613 32.6647C54.8422 33.9355 54.836 36.0012 52.2613 37.2689L46.0273 40.3384C43.4464 41.6091 39.2509 41.6061 36.6762 40.3384L30.4422 37.2689C27.8613 35.9981 27.8675 33.9324 30.4422 32.6647L36.6762 29.5952C39.2571 28.3244 43.4526 28.3275 46.0273 29.5952L52.2613 32.6647Z",fill:"#A9A9A9"})]});function F4(e){return f.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",xmlns:"http://www.w3.org/2000/svg",...e,children:[f.jsx("rect",{width:"16",height:"16",x:"4",y:"4",rx:"2"}),f.jsx("rect",{width:"6",height:"6",x:"9",y:"9",rx:"1"}),f.jsx("path",{d:"M15 2v2"}),f.jsx("path",{d:"M15 20v2"}),f.jsx("path",{d:"M2 15h2"}),f.jsx("path",{d:"M2 9h2"}),f.jsx("path",{d:"M20 15h2"}),f.jsx("path",{d:"M20 9h2"}),f.jsx("path",{d:"M9 2v2"}),f.jsx("path",{d:"M9 20v2"})]})}const P2r={warning:"bg-accent6Darker border-accent6/30 text-accent6",destructive:"bg-accent2Darker border-accent2/30 text-accent2",info:"bg-accent5Darker border-accent5/30 text-accent5"},$2r={warning:I0,destructive:Hx,info:sl},Fv=({children:e,variant:t="destructive",className:r})=>{const n=$2r[t];return f.jsx("div",{className:re(P2r[t],"p-3 rounded-md border shadow-sm",kr.all,"animate-in fade-in-0 slide-in-from-top-2 duration-200",r),children:f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx(qe,{className:"mt-0.5 flex-shrink-0",children:f.jsx(n,{})}),f.jsx("div",{className:"text-neutral4",children:e})]})})},Lv=({children:e,as:t="h5"})=>f.jsx(Ze,{as:t,variant:"ui-md",className:"font-semibold",children:e}),iT=({children:e,as:t="p"})=>f.jsx(Ze,{as:t,variant:"ui-sm",children:e}),I2r={default:"text-neutral3 bg-surface4",success:"text-accent1 bg-accent1Dark",error:"text-accent2 bg-accent2Dark",info:"text-accent5 bg-accent5Dark",warning:"text-accent6 bg-accent6Dark"},N2r={default:"text-neutral3",success:"text-accent1",error:"text-accent2",info:"text-accent5",warning:"text-accent6"},Xt=({icon:e,variant:t="default",className:r,children:n,...s})=>f.jsxs("div",{className:re("font-mono text-ui-sm gap-1 h-badge-default inline-flex items-center rounded-md shrink-0",kr.colors,e?"pl-1 pr-1.5":"px-1.5",t==="default"&&e?"bg-surface4 text-neutral5":I2r[t],r),...s,children:[e&&f.jsx("span",{className:N2r[t],children:f.jsx(qe,{children:e})}),n]}),R2r=()=>{const e=Kr(({part:i})=>i),[t,r]=E.useState(!1),n=e.text||"",s=e.metadata||{};if(s?.status==="tripwire")return f.jsx(x2r,{reason:n,tripwire:s.tripwire});if(s?.status==="warning")return f.jsxs(Fv,{variant:"warning",children:[f.jsx(Lv,{as:"h5",children:"Warning"}),f.jsx(iT,{as:"p",children:n})]});if(s?.status==="error")return f.jsxs(Fv,{variant:"destructive",children:[f.jsx(Lv,{as:"h5",children:"Error"}),f.jsx(iT,{as:"p",children:n})]});if(s?.mode==="network"&&s?.completionResult)return f.jsxs("div",{className:"mb-2 space-y-2",children:[f.jsxs("button",{onClick:()=>r(i=>!i),className:"flex items-center gap-2",children:[f.jsx(qe,{children:f.jsx(HN,{className:re("transition-all",t?"rotate-90":"rotate-180")})}),f.jsxs(Xt,{variant:"info",icon:f.jsx(gut,{}),children:[t?"Show":"Hide"," completion check"]})]}),!t&&f.jsxs(Fv,{variant:"info",children:[f.jsx(Lv,{as:"h5",children:s.completionResult?.passed?"Complete":"Not Complete"}),f.jsx(bxe,{})]})]});try{const i=n.trim();if(i.startsWith("__ERROR__:")){const o=i.substring(10);return f.jsxs("div",{className:"flex items-start gap-3 p-4 rounded-lg bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-900/50",children:[f.jsx(Hx,{className:"w-5 h-5 text-red-500 dark:text-red-400 mt-0.5 flex-shrink-0"}),f.jsxs("div",{className:"flex-1",children:[f.jsx("p",{className:"text-sm font-medium text-red-800 dark:text-red-200 mb-1",children:"Error"}),f.jsx("p",{className:"text-sm text-red-700 dark:text-red-300",children:o})]})]})}else if(i.startsWith("Error:")){const o=i.substring(6).trim();return f.jsxs("div",{className:"flex items-start gap-3 p-4 rounded-lg bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-900/50",children:[f.jsx(Hx,{className:"w-5 h-5 text-red-500 dark:text-red-400 mt-0.5 flex-shrink-0"}),f.jsxs("div",{className:"flex-1",children:[f.jsx("p",{className:"text-sm font-medium text-red-800 dark:text-red-200 mb-1",children:"Error"}),f.jsx("p",{className:"text-sm text-red-700 dark:text-red-300",children:o})]})]})}return f.jsx(bxe,{})}catch{return f.jsxs("div",{className:"flex items-start gap-3 p-4 rounded-lg bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-900/50",children:[f.jsx(Hx,{className:"w-5 h-5 text-red-500 dark:text-red-400 mt-0.5 flex-shrink-0"}),f.jsxs("div",{className:"flex-1",children:[f.jsx("p",{className:"text-sm font-medium text-red-800 dark:text-red-200 mb-1",children:"Error"}),f.jsx("p",{className:"text-sm text-red-700 dark:text-red-300",children:String(n)})]})]})}};function np({text:e,copyMessage:t="Copied to clipboard!"}){const[r,n]=E.useState(!1),s=E.useRef(null),i=E.useCallback(()=>{navigator.clipboard.writeText(e).then(()=>{mn.success(t),n(!0),s.current&&(clearTimeout(s.current),s.current=null),s.current=setTimeout(()=>{n(!1)},2e3)}).catch(()=>{mn.error("Failed to copy to clipboard.")})},[e,t]);return{isCopied:r,handleCopy:i}}function Uf({content:e,copyMessage:t,tooltip:r="Copy to clipboard",iconSize:n="default",className:s}){const[i,o]=E.useState(!1),{handleCopy:a}=np({text:e,copyMessage:t}),l=()=>{a(),o(!0),setTimeout(()=>o(!1),2e3)};return f.jsxs(Ss,{children:[f.jsx(Os,{asChild:!0,children:f.jsx("button",{onClick:l,type:"button",className:re("rounded-lg p-1",kr.all,jD.visible,"hover:bg-surface4",s),children:f.jsx(qe,{className:re("text-neutral3",kr.all,"hover:text-neutral6",i&&"text-accent1"),size:n,children:i?f.jsx(lu,{}):f.jsx(cu,{})})})}),f.jsx(is,{children:i?"Copied!":r})]})}const wy=()=>E.useMemo(()=>{const e=rX({settings:{fontFamily:"var(--geist-mono)",fontSize:"0.8rem",lineHighlight:"transparent",gutterBackground:"transparent",gutterForeground:"#939393",background:"transparent"},styles:[{tag:[Y.className,Y.propertyName]}]}),t=rt.theme({".cm-editor":{colorScheme:"dark",backgroundColor:"transparent"},".cm-lineNumbers .cm-gutterElement":{color:"#939393"}});return[e,t]},[]),Kc=({data:e,value:t,onChange:r,showCopyButton:n=!0,className:s,...i})=>{const o=wy(),a=e?JSON.stringify(e,null,2):t??"";return f.jsxs("div",{className:re("rounded-md bg-surface4 p-1 font-mono relative",s),...i,children:[n&&f.jsx(Uf,{content:a,className:"absolute top-2 right-2 z-20"}),f.jsx(fc,{value:a,theme:o,extensions:[oc],onChange:r,"aria-label":"Code editor"})]})};async function M2r(e,t){const{codeToTokens:r,bundledLanguages:n}=await G(async()=>{const{codeToTokens:i,bundledLanguages:o}=await import("./index-D3hLiQ9M.js");return{codeToTokens:i,bundledLanguages:o}},__vite__mapDeps([122,95]),import.meta.url);if(!(t in n))return null;const{tokens:s}=await r(e,{lang:t,defaultColor:!1,themes:{light:"github-light",dark:"github-dark"}});return s}const X6=({children:e,initialCollapsed:t=!0,icon:r,title:n,collapsible:s=!0,extraInfo:i,"data-testid":o})=>{const[a,l]=E.useState(t);return E.useEffect(()=>{l(t)},[t]),f.jsxs("div",{className:"mb-4","data-testid":o,children:[f.jsxs("div",{className:"flex flex-row gap-2 items-center justify-between",children:[f.jsxs("button",{onClick:s?()=>l(c=>!c):void 0,className:"flex items-center gap-2 disabled:cursor-not-allowed",disabled:!s,type:"button",children:[f.jsx(qe,{children:f.jsx(HN,{className:re("transition-all",a?"rotate-90":"rotate-180")})}),f.jsx(Xt,{icon:r,children:n})]}),i]}),!a&&f.jsx("div",{className:"pt-2",children:f.jsx("div",{className:"p-4 rounded-lg bg-surface2 flex flex-col gap-4",children:e})})]})},qo=SX,j2r=x$e,F2r=OX,AZe=E.forwardRef(({className:e,...t},r)=>f.jsx(b5,{ref:r,className:re("fixed inset-0 z-50 bg-overlay backdrop-blur-sm","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));AZe.displayName=b5.displayName;const So=E.forwardRef(({className:e,children:t,...r},n)=>f.jsxs(F2r,{children:[f.jsx(AZe,{}),f.jsxs(x5,{ref:n,className:re("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%]","gap-4 border border-border1 bg-surface3 py-6 shadow-dialog rounded-lg","duration-slow","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%]",e),...r,children:[t,f.jsxs(O5,{className:re("absolute right-4 top-4 rounded-md p-1","text-neutral3 hover:text-neutral6 hover:bg-surface4","transition-all duration-normal ease-out-custom","focus:outline-none focus:ring-1 focus:ring-accent1 focus:shadow-focus-ring","disabled:pointer-events-none"),children:[f.jsx(Ia,{className:"h-4 w-4"}),f.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));So.displayName=x5.displayName;const Oo=({className:e,...t})=>f.jsx("div",{className:re("flex flex-col space-y-1.5 text-center sm:text-left border-b border-border1 pb-4 px-6",e),...t});Oo.displayName="DialogHeader";const _o=({className:e,...t})=>f.jsx("div",{className:re("overflow-y-auto px-6 max-h-[50vh]",e),...t});_o.displayName="DialogBody";const ko=E.forwardRef(({className:e,...t},r)=>f.jsx(w5,{ref:r,className:re("text-lg font-semibold leading-none tracking-tight",e),...t}));ko.displayName=w5.displayName;const Eo=E.forwardRef(({className:e,...t},r)=>f.jsx(S5,{ref:r,className:re("sr-only",e),...t}));Eo.displayName=S5.displayName;const L2r=({selectionReason:e,open:t,onOpenChange:r,input:n})=>{let s=null;if(n)try{s=typeof n=="object"?f.jsx(Kc,{data:n}):f.jsx(Kc,{data:JSON.parse(n)})}catch{s=f.jsx("pre",{className:"whitespace-pre-wrap",children:n})}return f.jsx(qo,{open:t,onOpenChange:r,children:f.jsxs(So,{children:[f.jsxs(Oo,{children:[f.jsx(ko,{children:"Agent Network Metadata"}),f.jsx(Eo,{children:"View the metadata of the agent's network choice."})]}),f.jsxs(_o,{className:"space-y-4",children:[f.jsxs("div",{className:"space-y-2",children:[f.jsx(Ze,{className:"text-neutral3",children:"Selection Reason"}),f.jsx("div",{className:"text-neutral6 text-ui-md",children:e})]}),s&&f.jsxs("div",{className:"space-y-2",children:[f.jsx(Ze,{className:"text-neutral3",children:"Input"}),f.jsx("div",{className:"text-neutral6 text-ui-md",children:s})]})]})]})})},dte=({selectionReason:e,input:t})=>{const[r,n]=E.useState(!1);return f.jsxs(f.Fragment,{children:[f.jsx(Sd,{tooltip:"Show selection reason",side:"top",onClick:()=>n(s=>!s),children:f.jsx(eft,{className:"text-neutral3 size-5"})}),f.jsx(L2r,{selectionReason:e||"",open:r,onOpenChange:n,input:t})]})},PZe=E.createContext(void 0);function z2r({children:e,approveToolcall:t,declineToolcall:r,approveToolcallGenerate:n,declineToolcallGenerate:s,approveNetworkToolcall:i,declineNetworkToolcall:o,isRunning:a,toolCallApprovals:l,networkToolCallApprovals:c}){return f.jsx(PZe.Provider,{value:{approveToolcall:t,declineToolcall:r,approveToolcallGenerate:n,declineToolcallGenerate:s,approveNetworkToolcall:i,declineNetworkToolcall:o,isRunning:a,toolCallApprovals:l,networkToolCallApprovals:c},children:e})}function B2r(){const e=E.useContext(PZe);if(!e)throw new Error("useToolCall must be used within a ToolCallProvider");return e}const fte=({toolCalled:e,toolCallId:t,toolApprovalMetadata:r,toolName:n,isNetwork:s,isGenerateMode:i})=>{const{approveToolcall:o,declineToolcall:a,approveToolcallGenerate:l,declineToolcallGenerate:c,isRunning:u,toolCallApprovals:d,approveNetworkToolcall:p,declineNetworkToolcall:m,networkToolCallApprovals:g}=B2r(),v=()=>{s?p(n,r?.runId):i?l(t):o(t)},b=()=>{s?m(n,r?.runId):i?c(t):a(t)},w=s?g?.[r?.runId?`${r.runId}-${n}`:n]?.status:d?.[t]?.status;return r&&!e?f.jsxs("div",{children:[f.jsx("p",{className:"font-medium pb-2",children:"Approval required"}),f.jsxs("div",{className:"flex gap-2 items-center",children:[f.jsxs(Je,{onClick:v,disabled:u||!!w,className:w==="approved"?"!text-accent1":"",children:[f.jsx(qe,{children:f.jsx(lu,{})}),"Approve"]}),f.jsxs(Je,{onClick:b,disabled:u||!!w,className:w==="declined"?"!text-accent2":"",children:[f.jsx(qe,{children:f.jsx(Ia,{})}),"Decline"]})]})]}):null},V2r=({toolName:e,args:t,result:r,metadata:n,toolOutput:s,toolCallId:i,toolApprovalMetadata:o,suspendPayload:a,isNetwork:l,toolCalled:c})=>{let u=null;try{const{__mastraMetadata:b,...w}=typeof t=="object"?t:JSON.parse(t);u=f.jsx(Kc,{data:w,"data-testid":"tool-args"})}catch{u=f.jsx("pre",{className:"whitespace-pre bg-surface4 p-4 rounded-md overflow-x-auto",children:t})}let d=typeof r=="string"?f.jsx("pre",{className:"whitespace-pre bg-surface4 p-4 rounded-md overflow-x-auto",children:r}):f.jsx(Kc,{data:r,"data-testid":"tool-result"}),p=typeof a=="string"?f.jsx("pre",{className:"whitespace-pre bg-surface4 p-4 rounded-md overflow-x-auto",children:a}):f.jsx(Kc,{data:a,"data-testid":"tool-suspend-payload"});const m=n?.mode==="network"?n.selectionReason:void 0,g=n?.mode==="network"?n.agentInput:void 0,v=c??(r||s.length>0);return f.jsx(X6,{"data-testid":"tool-badge",icon:f.jsx(Cu,{className:"text-accent6"}),title:e,extraInfo:n?.mode==="network"&&f.jsx(dte,{selectionReason:m||"",input:g}),initialCollapsed:!(o??a),children:f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("p",{className:"font-medium pb-2",children:"Tool arguments"}),u]}),p!==void 0&&a&&f.jsxs("div",{children:[f.jsx("p",{className:"font-medium pb-2",children:"Tool suspend payload"}),p]}),d!==void 0&&r&&f.jsxs("div",{children:[f.jsx("p",{className:"font-medium pb-2",children:"Tool result"}),d]}),s.length>0&&f.jsxs("div",{children:[f.jsx("p",{className:"font-medium pb-2",children:"Tool output"}),f.jsx("div",{className:"h-40 overflow-y-auto",children:f.jsx(Kc,{data:s,"data-testid":"tool-output"})})]}),f.jsx(fte,{toolCalled:v,toolCallId:i,toolApprovalMetadata:o,toolName:e,isNetwork:l,isGenerateMode:n?.mode==="generate"})]})})};function JZ(e){const t={},r=e.context||{};Object.entries(r).forEach(([o,a])=>{if(o!=="input"&&"status"in a){const l=a,c=l.status==="failed"&&l.tripwire!==void 0;t[o]={status:l.status,output:"output"in l?l.output:void 0,payload:"payload"in l?l.payload:void 0,suspendPayload:"suspendPayload"in l?l.suspendPayload:void 0,suspendOutput:"suspendOutput"in l?l.suspendOutput:void 0,resumePayload:"resumePayload"in l?l.resumePayload:void 0,error:c?void 0:"error"in l?l.error:void 0,tripwire:c?l.tripwire:void 0,startedAt:"startedAt"in l?l.startedAt:Date.now(),endedAt:"endedAt"in l?l.endedAt:void 0,suspendedAt:"suspendedAt"in l?l.suspendedAt:void 0,resumedAt:"resumedAt"in l?l.resumedAt:void 0}}});const n=Object.entries(t).flatMap(([o,a])=>{if(a?.status==="suspended"){const l=a?.suspendPayload?.__workflow_meta?.path;return l?[[o,...l]]:[[o]]}return[]}),s=n?.[0]?.[0],i=s?t[s]?.suspendPayload:void 0;return{input:r.input,steps:t,status:e.status,...e.status==="success"?{result:e.result}:{},...e.status==="failed"?{error:e.error}:{},...e.status==="suspended"?{suspended:n,suspendPayload:i}:{},...e.status==="tripwire"&&e.tripwire?{tripwire:{reason:e.tripwire.reason,retry:e.tripwire.retry,metadata:e.tripwire.metadata,processorId:e.tripwire.processorId}}:{}}}const Qn=NW()(E7t(e=>({requestContext:{},setRequestContext:t=>e({requestContext:t})}),{name:"mastra-playground-store"})),Y6=()=>{const e=rr(),{requestContext:t}=Qn();return ds({queryKey:["workflows",t],queryFn:async()=>{const r=await e.listWorkflows(t);return Object.fromEntries(Object.entries(r).filter(([n,s])=>!s.isProcessorWorkflow))}})},U2r={duration:5e3,cancel:{label:f.jsx(Ia,{size:"14"}),onClick:()=>{}},unstyled:!0,classNames:{toast:"bg-surface2 w-full backdrop-accent h-auto rounded-lg gap-2 border border p-4 flex items-start justify-between rounded-lg pointer-events-auto",title:"text-white font-semibold text-xs mb-1 -mt-1",description:"!text-text text-sm !font-light",cancelButton:"!bg-transparent !p-0 flex items-center justify-center !text-text opacity-50 hover:opacity-100 ml-4 shrink-0",actionButton:"!bg-white flex items-center justify-center font-medium !text-black order-last hover:opacity-80"}};function uc(e){const{classNames:t,...r}=U2r,{classNames:n,...s}=e||{};return{...r,classNames:{...t,title:re(t?.title,n?.title),toast:re(t?.toast,n?.toast),cancelButton:re(t?.cancelButton,n?.cancelButton),actionButton:re(t?.actionButton,n?.actionButton),description:re(t?.description,n?.description)},...s}}const Js=(e,t={})=>{if(Array.isArray(e))return e.forEach(r=>mn(r,uc(t)));if(me.isValidElement(e))return mn(e,uc(t));if(typeof e=="string")return mn(e,uc(t));throw new Error("Invalid message type")};Js.success=(e,t={})=>{const r={...t,classNames:{...t.classNames,toast:re("bg-green-950/20 border-green-900/50 dark:bg-green-950/20 dark:border-green-900/50",t.classNames?.toast),title:re("text-green-200 dark:text-green-200",t.classNames?.title),description:re("text-green-300 dark:text-green-300",t.classNames?.description)}};switch(typeof e){case"string":return mn.success(e,uc(r));case"object":return e.forEach(n=>mn.success(n,uc(r)))}};Js.error=(e,t={})=>{const r={...t,classNames:{...t.classNames,toast:re("bg-red-950/20 border-red-900/50 dark:bg-red-950/20 dark:border-red-900/50",t.classNames?.toast),title:re("text-red-200 dark:text-red-200",t.classNames?.title),description:re("text-red-300 dark:text-red-300",t.classNames?.description)}};switch(typeof e){case"string":return mn.error(e,uc(r));case"object":return e.forEach(n=>mn.error(n,uc(r)))}};Js.warning=(e,t={})=>{const r={...t,classNames:{...t.classNames,toast:re("bg-yellow-950/20 border-yellow-900/50 dark:bg-yellow-950/20 dark:border-yellow-900/50",t.classNames?.toast),title:re("text-yellow-200 dark:text-yellow-200",t.classNames?.title),description:re("text-yellow-300 dark:text-yellow-300",t.classNames?.description)}};switch(typeof e){case"string":return mn.warning(e,uc(r));case"object":return e.forEach(n=>mn.warning(n,uc(r)))}};Js.info=(e,t={})=>{const r={...t,classNames:{...t.classNames,toast:re("bg-blue-950/20 border-blue-900/50 dark:bg-blue-950/20 dark:border-blue-900/50",t.classNames?.toast),title:re("text-blue-200 dark:text-blue-200",t.classNames?.title),description:re("text-blue-300 dark:text-blue-300",t.classNames?.description)}};switch(typeof e){case"string":return mn.info(e,uc(r));case"object":return e.forEach(n=>mn.info(n,uc(r)))}};Js.custom=(e,t={})=>mn(e,uc(t));Js.dismiss=e=>{e&&mn.dismiss(e)};Js.promise=({myPromise:e,loadingMessage:t,successMessage:r,errorMessage:n,onSuccess:s,onError:i,options:o={}})=>mn.promise(e,{loading:t??"Loading...",success:a=>(s?.(a),r),error:a=>(i?.(a),n||a?.message||"Error..."),...uc(o)});function Q2r({entityId:e,entityType:t}){const[r,n]=E.useState(void 0),s=`tracing-options-${t}:${e}`;return E.useEffect(()=>{try{const a=localStorage.getItem(s);if(a){const l=JSON.parse(a);n(l||void 0)}}catch(a){console.error(a)}},[s]),{settings:r,setSettings:a=>{n(l=>({...l,...a})),localStorage.setItem(s,JSON.stringify({...a,entityId:e,entityType:t}))},resetAll:()=>{n(void 0),localStorage.removeItem(s)},entityType:t}}const $Ze=E.createContext({setSettings:()=>{},resetAll:()=>{},settings:void 0,entityType:void 0}),IZe=({children:e,entityId:t,entityType:r})=>{const n=Q2r({entityId:t,entityType:r});return f.jsx($Ze.Provider,{value:n,children:e})},pte=()=>E.useContext($Ze),Z2r=()=>{const e=rr(),t=bs({mutationFn:async({workflowId:s,prevRunId:i})=>{try{const o=e.getWorkflow(s),{runId:a}=await o.createRun({runId:i});return{runId:a}}catch(o){throw console.error("Error creating workflow run:",o),o}}}),r=bs({mutationFn:async({workflowId:s,runId:i,input:o,requestContext:a})=>{try{const l=new al;Object.entries(a).forEach(([d,p])=>{l.set(d,p)}),await(await e.getWorkflow(s).createRun({runId:i})).start({inputData:o||{},requestContext:l})}catch(l){throw console.error("Error starting workflow run:",l),l}}}),n=bs({mutationFn:async({workflowId:s,runId:i,input:o,requestContext:a})=>{try{const l=new al;return Object.entries(a).forEach(([p,m])=>{l.set(p,m)}),await(await e.getWorkflow(s).createRun({runId:i})).startAsync({inputData:o||{},requestContext:l})}catch(l){throw console.error("Error starting workflow run:",l),l}}});return{startWorkflowRun:r,createWorkflowRun:t,startAsyncWorkflowRun:n}},q2r=({debugMode:e})=>{const t=rr(),{settings:r}=pte(),[n,s]=E.useState({}),[i,o]=E.useState(!1),a=E.useRef(null),l=E.useRef(null),c=E.useRef(null),u=E.useRef(null),d=E.useRef(!0);E.useEffect(()=>(d.current=!0,()=>{if(d.current=!1,a.current){try{a.current.releaseLock()}catch{}a.current=null}if(l.current){try{l.current.releaseLock()}catch{}l.current=null}if(c.current){try{c.current.releaseLock()}catch{}c.current=null}if(u.current){try{u.current.releaseLock()}catch{}u.current=null}}),[]);const p=(O,k,C)=>{if(O instanceof TypeError)return;const T=O instanceof Error?O.message:k;Js.error(T),C?.(!1)},m=O=>{if(O.type==="workflow-finish"){const k=O.payload?.workflowStatus,C=O.payload?.metadata;if(s(T=>({...T,status:k})),k==="failed")throw new Error(C?.errorMessage||"Workflow execution failed")}},g=bs({mutationFn:async({workflowId:O,runId:k,inputData:C,initialState:T,requestContext:P,perStep:A})=>{if(a.current&&a.current.releaseLock(),!d.current)return;o(!0),s({input:C});const R=new al;Object.entries(P).forEach(([L,V])=>{R.set(L,V)});const Q=await(await t.getWorkflow(O).createRun({runId:k})).stream({inputData:C,initialState:T,requestContext:R,closeOnSuspend:!0,tracingOptions:r?.tracingOptions,perStep:A??e});if(!Q)return p(new Error("No stream returned"),"No stream returned",o);const U=Q.getReader();a.current=U;try{for(;d.current;){const{done:L,value:V}=await U.read();if(L)break;d.current&&(s(j=>pg(j,V)),V.type==="workflow-step-start"&&o(!0),V.type==="workflow-step-suspended"&&o(!1),V.type==="workflow-finish"&&m(V))}}catch(L){p(L,"Error streaming workflow")}finally{d.current&&o(!1),a.current&&(a.current.releaseLock(),a.current=null)}}}),v=bs({mutationFn:async({workflowId:O,runId:k,storeRunResult:C})=>{if(l.current&&l.current.releaseLock(),!d.current)return;if(o(!0),s(C||{}),C?.status==="suspended"){o(!1);return}const A=await(await t.getWorkflow(O).createRun({runId:k})).observeStream();if(!A)return p(new Error("No stream returned"),"No stream returned",o);const R=A.getReader();l.current=R;try{for(;d.current;){const{done:M,value:z}=await R.read();if(M)break;d.current&&(s(Q=>pg(Q,z)),z.type==="workflow-step-start"&&o(!0),z.type==="workflow-step-suspended"&&o(!1),z.type==="workflow-finish"&&m(z))}}catch(M){p(M,"Error observing workflow")}finally{d.current&&o(!1),l.current&&(l.current.releaseLock(),l.current=null)}}}),b=bs({mutationFn:async({workflowId:O,runId:k,step:C,resumeData:T,requestContext:P,perStep:A})=>{if(c.current&&c.current.releaseLock(),!d.current)return;o(!0);const R=t.getWorkflow(O),M=new al;Object.entries(P).forEach(([L,V])=>{M.set(L,V)});const Q=await(await R.createRun({runId:k})).resumeStream({step:C,resumeData:T,requestContext:M,tracingOptions:r?.tracingOptions,perStep:A??e});if(!Q)return p(new Error("No stream returned"),"No stream returned",o);const U=Q.getReader();c.current=U;try{for(;d.current;){const{done:L,value:V}=await U.read();if(L)break;d.current&&(s(j=>pg(j,V)),V.type==="workflow-step-start"&&o(!0),V.type==="workflow-step-suspended"&&o(!1),V.type==="workflow-finish"&&m(V))}}catch(L){p(L,"Error resuming workflow stream")}finally{d.current&&o(!1),c.current&&(c.current.releaseLock(),c.current=null)}}}),w=bs({mutationFn:async({workflowId:O,requestContext:k,runId:C,perStep:T,...P})=>{if(u.current&&u.current.releaseLock(),!d.current)return;o(!0);const A=t.getWorkflow(O),R=new al;Object.entries(k).forEach(([U,L])=>{R.set(U,L)});const z=await(await A.createRun({runId:C})).timeTravelStream({...P,perStep:T??e,requestContext:R,tracingOptions:r?.tracingOptions});if(!z)return p(new Error("No stream returned"),"No stream returned",o);const Q=z.getReader();u.current=Q;try{for(;d.current;){const{done:U,value:L}=await Q.read();if(U)break;d.current&&(s(V=>pg(V,L)),L.type==="workflow-step-start"&&o(!0),L.type==="workflow-step-suspended"&&o(!1),L.type==="workflow-finish"&&m(L))}}catch(U){p(U,"Error time traveling workflow stream")}finally{d.current&&o(!1),u.current&&(u.current.releaseLock(),u.current=null)}}});return{streamWorkflow:g,streamResult:n,isStreaming:i,observeWorkflowStream:v,closeStreamsAndReset:()=>{if(o(!1),s({}),a.current){try{a.current.releaseLock()}catch{}a.current=null}if(l.current){try{l.current.releaseLock()}catch{}l.current=null}if(c.current){try{c.current.releaseLock()}catch{}c.current=null}if(u.current){try{u.current.releaseLock()}catch{}u.current=null}},resumeWorkflowStream:b,timeTravelWorkflowStream:w}},H2r=()=>{const e=rr();return bs({mutationFn:async({workflowId:r,runId:n})=>{try{return await(await e.getWorkflow(r).createRun({runId:n})).cancelRun()}catch(s){throw console.error("Error canceling workflow run:",s),s}}})},NZe=()=>{const[e,t]=E.useState(!1),r=E.useCallback(n=>{if(n){const s=new IntersectionObserver(([i])=>{t(i.isIntersecting)});return s.observe(n),()=>s.disconnect()}},[]);return{inView:e,setRef:r}},FD=e=>{const t=rr(),{requestContext:r}=Qn();return ds({queryKey:["workflow",e],queryFn:()=>e?t.getWorkflow(e).details(r):null,enabled:!!e,retry:!1,refetchOnWindowFocus:!1,throwOnError:!1})},Qz=20,RZe=(e,{enabled:t=!0}={})=>{const r=rr(),{inView:n,setRef:s}=NZe(),i=z$e({queryKey:["workflow-runs",e],queryFn:({pageParam:o})=>r.getWorkflow(e).runs({limit:Qz,offset:o*Qz}),initialPageParam:0,getNextPageParam:(o,a,l)=>{if(!(o.runs.length<Qz))return l+1},select:o=>o.pages.flatMap(a=>a.runs),retry:!1,enabled:t,refetchInterval:5e3,gcTime:0,staleTime:0});return E.useEffect(()=>{n&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[n,i.hasNextPage,i.isFetchingNextPage]),{...i,setEndOfListElement:s}},MZe=(e,t,r)=>{const n=rr();return ds({queryKey:["workflow-run",e,t],queryFn:()=>n.getWorkflow(e).runById(t),enabled:!!(e&&t),gcTime:0,staleTime:0,refetchInterval:r})},W2r=e=>{const t=rr(),r=hp();return bs({mutationFn:({runId:n})=>t.getWorkflow(e).deleteRunById(n),onSuccess:()=>{r.invalidateQueries({queryKey:["workflow-runs",e]}),mn.success("Workflow run deleted successfully")},onError:()=>{mn.error("Failed to delete workflow run")}})},jZe=E.createContext(null);function J6(){const e=E.useContext(jZe);if(!e)throw new Error("useWorkflowStepDetail must be used within WorkflowStepDetailProvider");return e}function G2r({children:e}){const[t,r]=E.useState(null),n=E.useCallback(({stepName:o,stepId:a,mapConfig:l})=>{r({type:"map-config",stepName:o,stepId:a,mapConfig:l})},[]),s=E.useCallback(({label:o,stepGraph:a,fullStep:l})=>{r({type:"nested-graph",stepName:o,nestedGraph:{label:o,stepGraph:a,fullStep:l}})},[]),i=E.useCallback(()=>{r(null)},[]);return f.jsx(jZe.Provider,{value:{stepDetail:t,showMapConfig:n,showNestedGraph:s,closeStepDetail:i},children:e})}const kp=E.createContext({});function hte({children:e,snapshot:t,workflowId:r,initialRunId:n,withoutTimeTravel:s=!1}){const[i,o]=E.useState(()=>t?JZ(t):null),[a,l]=E.useState(()=>t?.context?.input??null),[c,u]=E.useState(()=>n??""),[d,p]=E.useState(!1),[m,g]=E.useState(!1),v=d||["success","failed","canceled","bailed"].includes(i?.status??"")?void 0:5e3,{isLoading:b,data:w}=MZe(r,n??"",v),S=E.useMemo(()=>w&&n?{context:{input:w?.payload,...w?.steps},status:w?.status,result:w?.result,error:w?.error,runId:n,serializedStepGraph:w?.serializedStepGraph,value:w?.initialState}:void 0,[w,n]),{data:O,isLoading:k,error:C}=FD(r),{createWorkflowRun:T}=Z2r(),{streamWorkflow:P,streamResult:A,isStreaming:R,observeWorkflowStream:M,closeStreamsAndReset:z,resumeWorkflowStream:Q,timeTravelWorkflowStream:U}=q2r({debugMode:m}),{mutateAsync:L,isPending:V}=H2r(),j=()=>{o(null),l(null)};return E.useEffect(()=>{p(!1)},[n]),E.useEffect(()=>{S?.runId&&(o(JZ(S)),S.value&&Object.keys(S.value).length>0?l({initialState:S.value,inputData:S.context?.input}):l(S.context?.input),u(S.runId))},[S]),f.jsx(kp.Provider,{value:{workflowId:r,result:i,setResult:o,payload:a,setPayload:l,clearData:j,snapshot:t,runId:c,setRunId:u,workflowError:C??null,workflow:O??void 0,isLoading:k,createWorkflowRun:T.mutateAsync,streamWorkflow:N=>(p(!0),P.mutateAsync(N)),resumeWorkflow:N=>(p(!0),Q.mutateAsync(N)),streamResult:A,isStreamingWorkflow:R,isCancellingWorkflowRun:V,cancelWorkflowRun:L,observeWorkflowStream:N=>(p(!0),M.mutate(N)),closeStreamsAndReset:z,timeTravelWorkflowStream:N=>(p(!0),U.mutateAsync(N)),runSnapshot:S,isLoadingRunExecutionResult:b,withoutTimeTravel:s,debugMode:m,setDebugMode:g},children:f.jsx(G2r,{children:e})})}function fr({className:e,...t}){return f.jsx("div",{className:re("rounded-md bg-surface4 relative overflow-hidden","before:absolute before:inset-0","before:translate-x-[-100%]","before:animate-[shimmer_2s_infinite]","before:bg-gradient-to-r before:from-transparent before:via-surface5/20 before:to-transparent",e),...t})}const X2r=e=>e.replace(/[-_\s]+(.)?/g,(r,n)=>n?n.toUpperCase():"").replace(/^(.)/,r=>r.toLowerCase()).replace(/([A-Z])/g," $1").replace(/^./,r=>r.toUpperCase()).trim(),Y2r=(e,t,r)=>{if(!e.startsWith("mapping_"))return e;const n=l=>l.split(" ").map(c=>c.charAt(0).toUpperCase()+c.slice(1)).join(" "),s=l=>{const c=l.replace(/Step$/,"").replace(/[-_]/g," ").trim();return n(c)},i=(l,c)=>l.length===0?c?"End":"Start":l.length===1?s(l[0]):`${l.length} Steps`,o=i(t,!1),a=i(r,!0);return`${o} → ${a} Map`},J2r=(e,t)=>{const r=new cme.graphlib.Graph().setDefaultEdgeLabel(()=>({}));r.setGraph({rankdir:"TB"}),t.forEach(i=>r.setEdge(i.source,i.target)),e.forEach(i=>r.setNode(i.id,{...i,width:i.measured?.width??274,height:i.measured?.height??(i?.data?.isLarge?260:100)})),cme.layout(r);const n=r.graph()?.width?r.graph().width/2:0,s=r.graph()?.height?r.graph().height/2:0;return{nodes:e.map(i=>{const o=r.node(i.id),a=o.x-(i.measured?.width??274)/2,l=o.y-(i.measured?.height??(i?.data?.isLarge?260:100))/2;return{...i,position:{x:a,y:l}}}),edges:t,fullWidth:n,fullHeight:s}},Gu={animated:!0,markerEnd:{type:cC.ArrowClosed,width:20,height:20,color:"#8e8e8e"}},KZ=({stepFlow:e,xIndex:t,yIndex:r,prevNodeIds:n,prevStepIds:s,nextStepFlow:i,condition:o,allPrevNodeIds:a})=>{let l=[],c=[];if((i?.type==="step"||i?.type==="foreach"||i?.type==="loop")&&(l=[a?.includes(i.step.id)?`${i.step.id}-${r+1}`:i.step.id],c=[i.step.id]),(i?.type==="sleep"||i?.type==="sleepUntil")&&(l=[a?.includes(i.id)?`${i.id}-${r+1}`:i.id],c=[i.id]),i?.type==="parallel"&&(l=i?.steps.map(u=>{const d=u.step.id;return a?.includes(d)?`${d}-${r+1}`:d})||[],c=i?.steps.map(u=>u.step.id)||[]),i?.type==="conditional"&&(l=i?.serializedConditions.map(u=>u.id)||[],c=i?.steps?.map(u=>u.step.id)||[]),e.type==="step"||e.type==="foreach"){const u=e.step.component==="WORKFLOW",d=a?.includes(e.step.id)?`${e.step.id}-${r}`:e.step.id,p=[...o?[{id:o.id,position:{x:t*300,y:r*100},type:"condition-node",data:{label:o.id,previousStepId:s[s.length-1],nextStepId:e.step.id,withoutTopHandle:!n.length,withoutBottomHandle:!l.length,isLarge:!0,conditions:[{type:"when",fnString:o.fn}]}}]:[],{id:d,position:{x:t*300,y:(r+(o?1:0))*100},type:u?"nested-node":"default-node",data:{label:Y2r(e.step.id,s,c),stepId:e.step.id,description:e.step.description,withoutTopHandle:o?!1:!n.length,withoutBottomHandle:!l.length,stepGraph:u?e.step.serializedStepFlow:void 0,mapConfig:e.step.mapConfig,canSuspend:e.step.canSuspend,isForEach:e.type==="foreach"}}],m=[...o?[...(n||[]).map((g,v)=>({id:`e${g}-${o.id}`,source:g,data:{previousStepId:s[v],nextStepId:e.step.id},target:o.id,...Gu})),{id:`e${o.id}-${d}`,source:o.id,data:{previousStepId:s[s.length-1],nextStepId:e.step.id,conditionNode:!0},target:d,...Gu}]:(n||[]).map((g,v)=>({id:`e${g}-${d}`,source:g,data:{previousStepId:s[v],nextStepId:e.step.id},target:d,...Gu})),...(l||[]).map((g,v)=>({id:`e${d}-${g}`,source:d,data:{previousStepId:e.step.id,nextStepId:c[v]},target:g,...Gu}))];return{nodes:p,edges:m,nextPrevNodeIds:[d],nextPrevStepIds:[e.step.id]}}if(e.type==="sleep"||e.type==="sleepUntil"){const u=a?.includes(e.id)?`${e.id}-${r}`:e.id,d=[...o?[{id:o.id,position:{x:t*300,y:r*100},type:"condition-node",data:{label:o.id,previousStepId:s[s.length-1],nextStepId:e.id,withoutTopHandle:!1,withoutBottomHandle:!l.length,isLarge:!0,conditions:[{type:"when",fnString:o.fn}]}}]:[],{id:u,position:{x:t*300,y:(r+(o?1:0))*100},type:"default-node",data:{label:e.id,withoutTopHandle:o?!1:!n.length,withoutBottomHandle:!l.length,...e.type==="sleepUntil"?{date:e.date}:{duration:e.duration}}}],p=[...n.length?o?[...n.map((m,g)=>({id:`e${m}-${o.id}`,source:m,data:{previousStepId:s[g],nextStepId:e.id},target:o.id,...Gu})),{id:`e${o.id}-${u}`,source:o.id,data:{previousStepId:s[s.length-1],nextStepId:e.id},target:u,...Gu}]:n.map((m,g)=>({id:`e${m}-${u}`,source:m,data:{previousStepId:s[g],nextStepId:e.id},target:u,...Gu})):[],...l.length?l.map((m,g)=>({id:`e${u}-${m}`,source:u,data:{previousStepId:e.id,nextStepId:c[g]},target:m,...Gu})):[]];return{nodes:d,edges:p,nextPrevNodeIds:[u],nextPrevStepIds:[e.id]}}if(e.type==="loop"){const{step:u,serializedCondition:d,loopType:p}=e,m=u.component==="WORKFLOW",g=[{id:u.id,position:{x:t*300,y:r*100},type:m?"nested-node":"default-node",data:{label:u.id,description:u.description,withoutTopHandle:!n.length,withoutBottomHandle:!1,stepGraph:m?u.serializedStepFlow:void 0,canSuspend:u.canSuspend}},{id:d.id,position:{x:t*300,y:(r+1)*100},type:"condition-node",data:{label:d.id,previousStepId:u.id,nextStepId:c[0],withoutTopHandle:!1,withoutBottomHandle:!l.length,isLarge:!0,conditions:[{type:p,fnString:d.fn}]}}],v=[...n.length?n.map((b,w)=>({id:`e${b}-${u.id}`,source:b,data:{previousStepId:s[w],nextStepId:u.id},target:u.id,...Gu})):[],{id:`e${u.id}-${d.id}`,source:u.id,data:{previousStepId:u.id,nextStepId:c[0]},target:d.id,...Gu},...l.length?l.map((b,w)=>({id:`e${d.id}-${b}`,source:d.id,data:{previousStepId:u.id,nextStepId:c[w]},target:b,...Gu})):[]];return{nodes:g,edges:v,nextPrevNodeIds:[d.id],nextPrevStepIds:[u.id]}}if(e.type==="parallel"){let u=[],d=[],p=[];return e.steps.forEach((m,g)=>{const{nodes:v,edges:b,nextPrevStepIds:w}=KZ({stepFlow:m,xIndex:g,yIndex:r,prevNodeIds:n,prevStepIds:s,nextStepFlow:i,allPrevNodeIds:a}),S=v.map(O=>({...O,data:{...O.data,isParallel:!0}}));u.push(...S),d.push(...b),p.push(...w)}),{nodes:u,edges:d,nextPrevNodeIds:u.map(m=>m.id),nextPrevStepIds:p}}if(e.type==="conditional"){let u=[],d=[],p=[];return e.steps.forEach((m,g)=>{const{nodes:v,edges:b,nextPrevStepIds:w}=KZ({stepFlow:m,xIndex:g,yIndex:r,prevNodeIds:n,prevStepIds:s,nextStepFlow:i,condition:e.serializedConditions[g],allPrevNodeIds:a});u.push(...v),d.push(...b),p.push(...w)}),{nodes:u,edges:d,nextPrevNodeIds:u.filter(({type:m})=>m!=="condition-node").map(m=>m.id),nextPrevStepIds:p}}return{nodes:[],edges:[],nextPrevNodeIds:[],nextPrevStepIds:[]}},FZe=({stepGraph:e})=>{if(!e)return{nodes:[],edges:[]};if(e.length===0)return{nodes:[],edges:[]};let t=[],r=[],n=[],s=[],i=[];for(let l=0;l<e.length;l++){const{nodes:c,edges:u,nextPrevNodeIds:d,nextPrevStepIds:p}=KZ({stepFlow:e[l],xIndex:l,yIndex:l,prevNodeIds:n,prevStepIds:s,nextStepFlow:l===e.length-1?void 0:e[l+1],allPrevNodeIds:i});t.push(...c),r.push(...u),n=d,s=p,i.push(...n)}const{nodes:o,edges:a}=J2r(t,r);return{nodes:o,edges:a}},K6=bHt,LD=me.forwardRef(({className:e,children:t,...r},n)=>f.jsx(zY,{ref:n,className:re("-outline-offset-2",kr.colors,jD.visible,"hover:text-neutral5","[&>svg]:transition-transform [&>svg]:duration-normal [&>svg]:ease-out-custom","[&[data-state=open]>svg]:rotate-90",e),...r,children:t}));LD.displayName=zY.displayName;const zD=me.forwardRef(({className:e,children:t,...r},n)=>f.jsx(VY,{ref:n,className:re("overflow-hidden","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:slide-in-from-top-1","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-1","duration-normal ease-out-custom",e),...r,children:t}));zD.displayName=VY.displayName;const xi={sleep:"#A855F7",forEach:"#F97316",map:"#F97316",parallel:"#3B82F6",suspend:"#EC4899",after:"#14B8A6",workflow:"#8B5CF6",when:"#ECB047",dountil:"#8B5CF6",dowhile:"#06B6D4",until:"#F59E0B",while:"#10B981",if:"#3B82F6",else:"#6B7280"},Ji={sleep:QB,sleepUntil:Wct,forEach:UB,map:UB,parallel:mTe,suspend:Cut,after:iTe,workflow:ddt,when:dTe,dountil:Zdt,dowhile:Hdt,until:QB,while:WN,if:cTe,else:But},xxe=e=>{switch(e){case"when":return{icon:Ji.when,color:xi.when};case"dountil":return{icon:Ji.dountil,color:xi.dountil};case"dowhile":return{icon:Ji.dowhile,color:xi.dowhile};case"until":return{icon:Ji.until,color:xi.until};case"while":return{icon:Ji.while,color:xi.while};case"if":return{icon:Ji.if,color:xi.if};case"else":return{icon:Ji.else,color:xi.else};default:return{icon:void 0,color:void 0}}},LZe=e=>{const t=!!(e.duration||e.date),r=!!e.isForEach,n=!!(e.mapConfig&&!e.isForEach),s=!!e.stepGraph,i=t||e.canSuspend||e.isParallel||r||n||s;return{isSleepNode:t,isForEachNode:r,isMapNode:n,isNestedWorkflow:s,hasSpecialBadge:i}},zZe=(e,{enabled:t=!0})=>{const r=E.useRef(t);me.useEffect(()=>{if(!t||!e?.current)return;const n=e.current,s=new MutationObserver(()=>{r.current&&n.scrollTo({top:n.scrollHeight,behavior:"smooth"})});s.observe(n,{childList:!0,subtree:!0,characterData:!0});const i=o=>{const a=o.target,l=a.scrollTop+a.clientHeight,c=a.scrollHeight;l>=c-1?r.current=!0:r.current=!1};return n.addEventListener("scroll",i),()=>{n.removeEventListener("scroll",i),s.disconnect()}},[t,e])},BD=E.forwardRef(({className:e,children:t,viewPortClassName:r,maxHeight:n,autoScroll:s=!1,...i},o)=>{const a=E.useRef(null);return zZe(a,{enabled:s}),f.jsxs(NRe,{ref:o,className:re("relative overflow-hidden",e),...i,children:[f.jsx($Ht,{ref:a,className:re("h-full w-full rounded-[inherit] [&>div]:!block",r),style:n?{maxHeight:n}:void 0,children:t}),f.jsx(BZe,{}),f.jsx(IHt,{})]})});BD.displayName=NRe.displayName;const BZe=E.forwardRef(({className:e,orientation:t="vertical",...r},n)=>f.jsx(ZY,{ref:n,orientation:t,className:re("flex touch-none select-none transition-all duration-normal ease-out-custom","opacity-0 hover:opacity-100 data-[state=visible]:opacity-100",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-px",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-px",e),...r,children:f.jsx(DRe,{className:"relative flex-1 rounded-full bg-neutral2 hover:bg-neutral3 transition-colors duration-normal"})}));BZe.displayName=ZY.displayName;const VD=()=>{const e=E.useContext(kp),t=e.result?.steps??{};return{steps:Object.entries(t).reduce((n,[s,i])=>{const o="tripwire"in i&&i.tripwire;return{...n,[s]:{error:o?void 0:"error"in i?i.error:void 0,tripwire:o?i.tripwire:void 0,startedAt:i.startedAt,endedAt:"endedAt"in i?i.endedAt:void 0,status:i.status,output:"output"in i?i.output:void 0,input:i.payload,resumeData:"resumePayload"in i?i.resumePayload:void 0,suspendOutput:"suspendOutput"in i?i.suspendOutput:void 0,suspendPayload:"suspendPayload"in i?i.suspendPayload:void 0}}},{}),runId:e.runId}},Ox=({data:e,language:t="auto"})=>{const r=wy(),n=o=>{if(t==="javascript")return[K3(),rt.lineWrapping];if(t==="json")return[oc,rt.lineWrapping];try{return JSON.parse(o),[oc,rt.lineWrapping]}catch{return o.includes("=>")||o.includes("function")||o.includes("const ")||o.includes("return ")?[K3(),rt.lineWrapping]:[rt.lineWrapping]}};if(typeof e!="string"){const o=JSON.stringify(e,null,2);return f.jsxs("div",{className:"max-h-[500px] overflow-auto relative",children:[f.jsx("div",{className:"absolute right-2 top-2 bg-surface4 rounded-full z-10",children:f.jsx(Uf,{content:o})}),f.jsx("div",{className:"bg-surface4 rounded-lg p-4",children:f.jsx(fc,{value:o,theme:r,extensions:[oc,rt.lineWrapping]})})]})}const s=n(e);let i=e;try{const o=JSON.parse(e);i=JSON.stringify(o,null,2)}catch{}return f.jsxs("div",{className:"max-h-[500px] overflow-auto relative",children:[f.jsx("div",{className:"absolute right-2 top-2 bg-surface4 rounded-full z-10",children:f.jsx(Uf,{content:e})}),f.jsx("div",{className:"bg-surface4 rounded-lg p-4",children:f.jsx(fc,{value:i,theme:r,extensions:s})})]})},K2r=me.forwardRef(({children:e,...t},r)=>f.jsx("form",{ref:r,className:"space-y-4",...t,children:e})),ePr=["boolean","object","array"],tPr=({label:e,children:t,id:r,field:n,error:s})=>{const i=ePr.includes(n.type);return f.jsxs("div",{className:"pb-4 last:pb-0",children:[!i&&f.jsxs(Ze,{as:"label",variant:"ui-sm",className:"text-neutral3 pb-1 block",htmlFor:r,children:[e,n.required&&f.jsx("span",{className:"text-accent2",children:" *"})]}),t,n.fieldConfig?.description&&f.jsx(Ze,{as:"p",variant:"ui-sm",className:"text-neutral6",children:n.fieldConfig.description}),s&&f.jsx(Ze,{as:"p",variant:"ui-sm",className:"text-accent2",children:s})]})},rPr=({error:e})=>f.jsx(Fv,{variant:"destructive",children:f.jsx(Lv,{children:e})}),nPr=({children:e})=>f.jsx(Je,{type:"submit",children:e}),wxe=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Sxe=fZe,VZe=(e,t)=>r=>{var n;if(t?.variants==null)return Sxe(e,r?.class,r?.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(c=>{const u=r?.[c],d=i?.[c];if(u===null)return null;const p=wxe(u)||wxe(d);return s[c][p]}),a=r&&Object.entries(r).reduce((c,u)=>{let[d,p]=u;return p===void 0||(c[d]=p),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:d,className:p,...m}=u;return Object.entries(m).every(g=>{let[v,b]=g;return Array.isArray(b)?b.includes({...i,...a}[v]):{...i,...a}[v]===b})?[...c,d,p]:c},[]);return Sxe(e,o,l,r?.class,r?.className)},sPr=VZe(re("flex w-full text-neutral6 border bg-transparent","transition-all duration-normal ease-out-custom","disabled:cursor-not-allowed disabled:opacity-50","placeholder:text-neutral2 placeholder:transition-opacity placeholder:duration-normal","focus:placeholder:opacity-70",MD,_p),{variants:{variant:{default:"border border-border1 hover:border-border2",filled:"border bg-surface2 border-border1 hover:border-border2",unstyled:"border-0 bg-transparent shadow-none focus:shadow-none focus:ring-0"},size:{sm:`${Ta.sm} px-2 text-ui-sm`,md:`${Ta.md} px-3 text-ui-sm`,lg:`${Ta.lg} px-4 text-ui-sm`}},defaultVariants:{variant:"default",size:"md"}}),To=E.forwardRef(({className:e,size:t,testId:r,variant:n,type:s,error:i,...o},a)=>f.jsx("input",{type:s,className:re(sPr({variant:n,size:t}),i&&"border-error focus:ring-error focus:shadow-glow-accent2",e),"data-testid":r,ref:a,"aria-invalid":i,...o}));To.displayName="Input";const iPr=({inputProps:e,error:t,field:r,id:n})=>{const{key:s,...i}=e;return f.jsx(To,{id:n,className:t?"border-accent2":"",...i,defaultValue:r.default})},oPr=({inputProps:e,error:t,field:r,id:n})=>{const{key:s,...i}=e;return f.jsx(To,{id:n,type:"number",className:t?"border-accent2":"",...i,defaultValue:r.default!==void 0?Number(r.default):void 0,onChange:o=>{const a=o.target.value;a!==""&&!isNaN(Number(a))&&i.onChange({target:{value:a,name:e.name}})},onBlur:o=>{const a=o.target.value;a!==""&&!isNaN(Number(a))&&i.onChange({target:{value:Number(a),name:e.name}})}})},eR=E.forwardRef(({className:e,...t},r)=>f.jsx(eJ,{ref:r,className:re("peer h-4 w-4 shrink-0 rounded-sm border border-neutral3","shadow-sm",kr.all,"hover:border-neutral5 hover:shadow-md",_p,"disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:border-neutral3 disabled:hover:shadow-sm","data-[state=checked]:bg-accent1 data-[state=checked]:border-accent1 data-[state=checked]:text-surface1","data-[state=checked]:shadow-glow-accent1",e),...t,children:f.jsx(WRe,{className:re("flex items-center justify-center text-current","data-[state=checked]:animate-in data-[state=checked]:zoom-in-50 data-[state=checked]:duration-150"),children:f.jsx(lu,{className:"h-3.5 w-3.5 stroke-[3]"})})}));eR.displayName=eJ.displayName;const aPr=({field:e,label:t,id:r,inputProps:n,value:s})=>f.jsxs("div",{className:"flex items-center space-x-2",children:[f.jsx(eR,{id:r,onCheckedChange:i=>{const o={target:{name:n.name,value:i}};n.onChange(o)},defaultChecked:e.default,disabled:n.disabled||n.readOnly}),f.jsxs(Ze,{as:"label",variant:"ui-sm",className:"text-neutral3",htmlFor:r,children:[t,e.required&&f.jsx("span",{className:"text-accent2",children:" *"})]})]});function UZe({className:e,classNames:t,showOutsideDays:r=!0,...n}){return f.jsx(uYt,{showOutsideDays:r,className:re("p-3",e),classNames:{months:"flex flex-col space-y-4 sm:space-y-0 ",month:"space-y-4 text-ui-sm ",caption:"flex justify-between pt-1 items-center pl-2",caption_label:"text-text font-medium ",nav:"flex items-center",nav_button_previous:re("flex justify-center items-center h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_next:re("flex justify-center items-center h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),dropdown_month:"w-full border-collapse space-y-1",weeknumber:"flex",day:re("relative p-0 text-center focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-surface5 [&:has([aria-selected].day-outside)]:bg-surface5/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",n.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md","h-8 w-8 p-0 hover:bg-lightGray-7/50 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"!bg-neutral6/50 !text-surface2 hover:bg-neutral6 rounded-md hover:text-surface2 focus:bg-neutral6 focus:text-surface2",day_today:"bg-neutral6/10 text-neutral5",day_outside:"day-outside text-neutral3 opacity-50 aria-selected:bg-surface5/50 aria-selected:text-neutral3 aria-selected:opacity-30",day_disabled:"text-neutral3 opacity-50",day_range_middle:"aria-selected:bg-surface5 aria-selected:text-neutral5",day_hidden:"invisible",head_cell:"text-ui-xs text-neutral3",...t},...n})}const oT=Rlt,aT=Mlt,kw=E.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},s)=>f.jsx(jlt,{children:f.jsx(CCe,{ref:s,align:t,sideOffset:r,className:re("z-50 w-72 rounded-md border border-border1 bg-surface3 text-neutral5 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",e&&/\bp-\S+/.test(e)?!1:"p-4",e),...n})}));kw.displayName=CCe.displayName;const Ew=MYt,Cw=jYt,lPr={sm:`${Ta.sm} px-2 text-ui-sm`,md:`${Ta.md} px-3 text-ui-sm`,lg:`${Ta.lg} px-3 text-ui-sm`},w0=E.forwardRef(({className:e,children:t,size:r="md",...n},s)=>f.jsxs(BMe,{ref:s,className:re("flex w-full items-center justify-between border border-border1 bg-transparent py-2 shadow-sm placeholder:text-neutral3 disabled:cursor-not-allowed disabled:opacity-50",MD,_p,kr.all,"hover:border-neutral2",lPr[r],e),...n,children:[t,f.jsx(FYt,{asChild:!0,children:f.jsx(Vd,{className:re("h-4 w-4 text-neutral3",kr.colors)})})]}));w0.displayName=BMe.displayName;const S0=E.forwardRef(({className:e,children:t,position:r="popper",...n},s)=>f.jsx(LYt,{children:f.jsx(VMe,{ref:s,className:re("relative z-50 min-w-[8rem] max-h-dropdown-max-height overflow-y-auto overflow-x-hidden rounded-md border border-border1 bg-surface3 text-neutral5 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:f.jsx(zYt,{className:re("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));S0.displayName=VMe.displayName;const O0=E.forwardRef(({className:e,children:t,...r},n)=>f.jsxs(UMe,{ref:n,className:re("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-neutral5 text-sm",kr.colors,"hover:bg-surface5 hover:text-neutral5","focus:bg-surface5 focus:text-neutral5","data-[state=checked]:bg-accent1Dark data-[state=checked]:text-accent1","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[f.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:f.jsx(VYt,{children:f.jsx(lu,{className:"h-4 w-4 text-accent1"})})}),f.jsx(BYt,{children:t})]}));O0.displayName=UMe.displayName;function Zz({name:e,onChange:t,value:r,options:n,placeholder:s}){return f.jsxs(Ew,{name:e,onValueChange:t,value:r,children:[f.jsx(w0,{children:f.jsx(Cw,{placeholder:s||"Select..."})}),f.jsx(S0,{children:(n||[]).map((i,o)=>f.jsx(O0,{value:`${o}`,children:f.jsx("div",{className:"flex items-center gap-2 [&>svg]:w-[1.2em] [&>svg]:h-[1.2em] [&>svg]:text-neutral3",children:i})},i))})]})}const qz=["12","1","2","3","4","5","6","7","8","9","10","11"],KP=["00","15","30","45","59"],e$=["AM","PM"];function cPr({defaultValue:e,onValueChange:t,className:r}){const[n,s]=E.useState("12"),[i,o]=E.useState("00"),[a,l]=E.useState("AM");E.useEffect(()=>{if(e){const p=/^(\d{1,2}):(\d{2})(?::\d{2})?\s*(AM|PM|am|pm)?$/,m=e.match(p);if(m){let g=parseInt(m[1],10);const v=parseInt(m[2],10),b=m[3]?.toUpperCase();g>=1&&g<=12&&v>=0&&v<=59&&(s(g.toString()),o(v===0?"00":v.toString()),l(b||"AM"))}}},[e]);const c=p=>{s(p),t(`${qz[+p]}:${i} ${a}`.trim())},u=p=>{o(KP[+p]),t(`${n}:${KP[+p]} ${a}`.trim())},d=p=>{l(e$[+p]),t(`${n}:${i} ${e$[+p]}`.trim())};return f.jsxs("div",{className:re("flex gap-2 items-center",r),children:[f.jsx(Zz,{name:"hour",value:qz.indexOf(n).toString(),onChange:c,options:qz}),":",f.jsx(Zz,{name:"minute",value:KP.indexOf(i).toString(),onChange:u,options:KP}),f.jsx(Zz,{name:"period",value:e$.indexOf(a).toString(),onChange:d,options:e$})]})}const uPr={sm:`${Ta.sm} px-2`,md:`${Ta.md} px-3`,lg:`${Ta.lg} px-3 py-2`};function _0({name:e,value:t,label:r,labelIsHidden:n=!1,className:s,testId:i,required:o,disabled:a,helpMsg:l,error:c,errorMsg:u,size:d="lg",...p}){const m=({children:g})=>n?f.jsx(Td,{children:g}):g;return f.jsxs("div",{className:re("grid gap-2",{"grid-rows-[auto_1fr]":!n&&!l,"grid-rows-[auto_1fr_auto]":!n&&l},s),children:[f.jsx(m,{children:f.jsxs("label",{htmlFor:`input-${e}`,className:re("text-ui-sm text-neutral3 flex justify-between items-center"),children:[r,o&&f.jsx("i",{className:"text-neutral2 text-xs",children:"(required)"})]})}),f.jsx("input",{id:`input-${e}`,name:e,value:t,className:re("flex grow items-center cursor-pointer text-ui-md text-neutral5 border border-border1 leading-none bg-transparent w-full",MD,_p,uPr[d],"placeholder:text-neutral3 placeholder:text-ui-sm",{"cursor-not-allowed opacity-50":a,"border-red-800 focus:border-border1":c||u}),"data-testid":i,...p}),l&&f.jsx("p",{className:"text-neutral3 text-ui-sm",children:l}),u&&f.jsxs("p",{className:re("text-ui-sm text-neutral4 flex items-center gap-2","[&>svg]:w-[1.2em] [&>svg]:h-[1.2em] [&>svg]:opacity-70 [&>svg]:text-red-400"),children:[f.jsx(I0,{})," ",u]})]})}function QZe({onReset:e,...t}){return f.jsxs("div",{className:"relative",children:[f.jsx(_0,{labelIsHidden:!0,...t,className:"[&>input]:pl-10",style:{background:`url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='gray' viewBox='0 0 24 24'><path d='M21 20l-5.6-5.6a7 7 0 1 0-1.4 1.4L20 21zM4 10a6 6 0 1 1 12 0 6 6 0 0 1-12 0z'/></svg>") no-repeat 8px center`,backgroundSize:"1.5rem 1.5rem",paddingRight:e?"3rem":void 0}}),e&&t.value&&f.jsx("button",{type:"button",onClick:e,className:re("absolute top-1/2 right-2 -translate-y-1/2 p-1 rounded",kr.all,"hover:bg-surface4","[&>svg]:transition-colors [&>svg]:duration-normal","[&:hover>svg]:text-neutral5"),children:f.jsx(Ia,{className:"text-neutral3 w-[1rem] h-[1rem]"})})]})}function k0({name:e,value:t,label:r,className:n,required:s,disabled:i,helpMsg:o,options:a,onValueChange:l,placeholder:c="Select an option",size:u="lg"}){return f.jsxs("div",{className:re("flex gap-2 items-center",{"grid-rows-[auto_1fr]":r,"grid-rows-[auto_1fr_auto]":o},n),children:[r&&f.jsxs("label",{className:re("text-ui-sm text-neutral3 flex justify-between items-center shrink-0"),children:[r,s&&f.jsx("i",{className:"text-neutral2",children:"(required)"})]}),f.jsxs(Ew,{name:e,value:t,onValueChange:l,disabled:i,children:[f.jsx(w0,{id:"select-dataset",size:u,className:re("w-full border border-border1 min-w-20 gap-2",MD,_p),children:f.jsx(Cw,{placeholder:c})}),f.jsx(S0,{children:a.map(d=>f.jsx(O0,{value:d.value,children:f.jsx("span",{className:"whitespace-nowrap truncate block",children:d.label})},d.label))})]}),o&&f.jsx("p",{className:"text-neutral3 text-ui-sm",children:o})]})}const Oxe=({value:e,minValue:t,maxValue:r,defaultTimeStrValue:n,onValueChange:s,children:i,className:o,placeholder:a,...l})=>{const[c,u]=E.useState(!1);return f.jsxs(oT,{open:c,onOpenChange:u,children:[f.jsx(aT,{asChild:!0,children:i||f.jsx(fPr,{value:e,placeholder:a,className:o,"data-testid":"datepicker-button"})}),f.jsx(kw,{className:"backdrop-blur-4xl w-auto !p-0 bg-surface4 max-w-[16.5rem]",align:"start","data-testid":"datepicker-calendar",children:f.jsx(dPr,{value:e,minValue:t,maxValue:r,onValueChange:s,setOpenPopover:u,defaultTimeStrValue:n,...l})})]})};function t$({date:e,timeStr:t=""}){if(!hg(e))return null;if(t){const r=zn(e,"yyyy-MM-dd"),n=new Date(`${r} ${t}`);if(hg(n))return n}return e}const dPr=({value:e,minValue:t,maxValue:r,onValueChange:n,setOpenPopover:s,placeholder:i,className:o,defaultTimeStrValue:a,...l})=>{const[c,u]=E.useState(null),[d,p]=E.useState(e?zn(t$({date:e,timeStr:a})||"","PP p"):""),[m,g]=E.useState(a||""),[v,b]=E.useState(e?new Date(e):void 0),w=aJ(U=>{hg(U)&&(b(U),n?.(U),s?.(!1))},500),S=U=>{p(U.currentTarget.value);const L=new Date(U.currentTarget.value);w(L)},O=U=>{hg(U)?r&&U>r?(u(`The selected date should be before ${zn(r,"PP p")}`),p("")):t&&U<t?(u(`The selected date should be after ${zn(t,"PP p")}`),p("")):(p(zn(U,"PP p")),u("")):(p(""),u(""))},k=new Date(d),C=hg(k),T=C&&k.getTime()!==e?.getTime(),P=U=>{if(b(U),U){const L=t$({date:U,timeStr:m});O(L||"")}else O("")},A=U=>{if(b(U),U){const L=t$({date:U,timeStr:m});O(L||"")}else O("")},R=U=>{if(g(U),C){const L=t$({date:k,timeStr:U});O(L||"")}},M=()=>{s?.(!1)},z=()=>{hg(k)&&n(k),s?.(!1)},Q=()=>{n(void 0),b(void 0),p(""),g(""),s?.(!1)};return f.jsxs("div",{"aria-label":"Choose date",className:re("relative flex flex-col",o),onKeyDown:U=>{U.stopPropagation(),U.key==="Escape"&&s?.(!1)},children:[f.jsx(_0,{type:"text",value:d,onChange:S,placeholder:i,className:"m-4 mb-0 !w-auto"}),c&&f.jsxs("div",{className:re("text-ui-md m-4 mb-0 text-neutral3","[&>svg]:w-[1.1em] [&>svg]:h-[1.1em] [&>svg]:mt-0.5 [&>svg]:text-red-500 [&>svg]:float-left [&>svg]:mr-2"),children:[f.jsx(Hx,{})," ",c]}),f.jsx(UZe,{mode:"single",month:v,selected:v,onMonthChange:A,onSelect:P,...l}),f.jsx(cPr,{onValueChange:R,className:"m-4 mt-0 w-auto",defaultValue:e?zn(new Date(e),"hh:mm a"):a}),f.jsxs("div",{className:"grid grid-cols-[1fr_auto] gap-2 m-4 mt-0",children:[f.jsx(Je,{variant:"light",size:"lg",tabIndex:0,onClick:()=>{C?z():M()},children:T?"Apply":"Cancel"}),T&&f.jsx(Je,{tabIndex:0,onClick:Q,children:"Clear"})]})]})},fPr=E.forwardRef(({value:e,placeholder:t,className:r,...n},s)=>f.jsxs(Je,{ref:s,className:re("justify-start",r),variant:"light",size:"lg",...n,children:[f.jsx(eTe,{className:"h-4 w-4"}),e?f.jsx("span",{className:"text-white",children:zn(e,"PP p")}):f.jsx("span",{className:"text-gray",children:t??"Pick a date"})]})),pPr=({inputProps:e,field:t,error:r,id:n})=>{const{key:s,...i}=e,[o,a]=E.useState(void 0),[l,c]=E.useState(!1);E.useEffect(()=>{if(t.default){const p=new Date(t.default);hg(p)&&a(p)}},[t]);const u=p=>{a(p),p&&i.onChange({target:{value:p.toISOString(),name:e.name}}),c(!1)},d=()=>{a(void 0),i.onChange({target:{value:"",name:e.name}}),c(!1)};return f.jsxs(oT,{open:l,onOpenChange:c,children:[f.jsx(aT,{asChild:!0,children:f.jsxs(Je,{id:n,variant:"light",size:"lg",className:re("w-full",r?"border-accent2":""),children:[f.jsx(eTe,{className:"h-4 w-4"}),o?f.jsx("span",{className:"text-white",children:zn(o,"PPP")}):f.jsx("span",{className:"text-gray",children:"Pick a date"})]})}),f.jsxs(kw,{className:"w-auto p-0 bg-surface4",align:"start",children:[f.jsx(UZe,{mode:"single",selected:o,onSelect:u,month:o,onMonthChange:a}),o&&f.jsx("div",{className:"p-3 pt-0",children:f.jsx(Je,{variant:"light",size:"lg",className:"w-full",onClick:d,children:"Clear"})})]})]})},hPr=({field:e,inputProps:t,error:r,id:n,value:s})=>{const{key:i,...o}=t;return f.jsxs(Ew,{...o,value:s,onValueChange:a=>{const l={target:{value:a,name:t.name}};o.onChange(l)},children:[f.jsx(w0,{id:n,className:r?"border-accent2":"",children:f.jsx(Cw,{placeholder:"Select an option"})}),f.jsx(S0,{children:(e.options||[]).map(([a,l])=>f.jsx(O0,{value:a,children:l},a))})]})},mPr=({label:e,children:t})=>{const r=e!==""&&e!=="",[n,s]=E.useState(!1);return f.jsxs("div",{className:"",children:[f.jsxs("div",{className:"flex items-center",children:[r&&f.jsxs(Ze,{as:"h3",variant:"ui-sm",className:"text-neutral3 flex items-center gap-1 pb-2",children:[f.jsx(qe,{size:"sm",children:f.jsx(qv,{})}),e]}),f.jsx(Je,{onClick:()=>s(!n),type:"button",className:"ml-auto",children:f.jsx(qe,{size:"sm",children:f.jsx(Vd,{className:re("transition-all",n?"rotate-180":"rotate-0")})})})]}),n&&f.jsx("div",{className:r?"flex flex-col gap-1 [&>*]:border-dashed [&>*]:border-l [&>*]:border-l-border1 [&>*]:pl-4":"",children:t})]})},gPr=({label:e,children:t,onAddItem:r})=>f.jsxs("div",{children:[f.jsxs("div",{className:"flex gap-2 justify-between",children:[f.jsxs(Ze,{as:"h3",variant:"ui-sm",className:"text-neutral3 pb-2 flex items-center gap-1",children:[f.jsx(qe,{size:"sm",children:f.jsx(Qct,{})}),e]}),f.jsx(Dc,{children:f.jsxs(Ss,{delayDuration:0,children:[f.jsx(Os,{asChild:!0,children:f.jsx("button",{onClick:r,type:"button",className:"text-neutral3 bg-surface3 rounded-md p-1 hover:bg-surface4 hover:text-neutral6 h-icon-sm w-icon-sm",children:f.jsx(qe,{size:"sm",children:f.jsx($0,{})})})}),f.jsx(is,{children:"Add item"})]})})]}),f.jsx("div",{className:"flex flex-col gap-1",children:t})]}),yPr=({children:e,onRemove:t})=>f.jsxs("div",{className:"pl-4 border-l border-border1",children:[e,f.jsxs(Je,{onClick:t,type:"button",children:[f.jsx(qe,{size:"sm",children:f.jsx(lG,{})}),"Delete"]})]}),vPr=({inputProps:e,field:t,error:r,id:n})=>{const{key:s,onChange:i,...o}=e,[a,l]=E.useState(()=>Object.entries(t.default||{}).map(([g,v])=>({id:g||Go(),key:g,value:v})));E.useEffect(()=>{a.length===0&&l([{id:Go(),key:"",value:""}])},[a]);const c=E.useCallback(g=>{const v=g.reduce((b,w)=>(w.key&&(b[w.key]=w.value),b),{});i?.({target:{value:v,name:e.name}})},[i,e.name]),u=(g,v,b)=>{l(w=>w.map(S=>S.id===g?{...S,[v]:b}:S))},d=()=>{c(a)},p=()=>{const g=[...a,{id:Go(),key:"",value:""}];l(g),c(g)},m=g=>{const v=a.filter(b=>b.id!==g);v.length===0&&v.push({id:Go(),key:"",value:""}),l(v),c(v)};return f.jsxs("div",{className:"space-y-3",children:[a.map(g=>f.jsxs("div",{className:"relative space-y-2 rounded-lg border p-4",children:[f.jsx(Je,{type:"button",className:"absolute right-2 top-2",onClick:()=>m(g.id),children:f.jsx(lG,{className:"h-4 w-4"})}),f.jsxs("div",{className:"space-y-2 pt-6",children:[f.jsx(To,{placeholder:"Key",value:g.key,onChange:v=>u(g.id,"key",v.target.value),onBlur:d}),f.jsx(To,{placeholder:"Value",value:g.value,onChange:v=>u(g.id,"value",v.target.value),onBlur:d})]})]},g.id)),f.jsxs(Je,{type:"button",className:"w-full",onClick:p,children:[f.jsx($0,{className:"mr-2 h-4 w-4"}),"Add Key-Value Pair"]})]})},bPr=({field:e,path:t})=>{const{uiComponents:r}=_J();return f.jsx(r.ObjectWrapper,{label:i4(e),field:e,children:Object.entries(e.schema).map(([n,s])=>f.jsx(zv,{field:s,path:[...t,s.key]},`${t.join(".")}.${s.key}`))})},xPr=({field:e,path:t})=>{const{uiComponents:r}=_J(),{control:n}=o6(),{fields:s,append:i,remove:o}=dJt({control:n,name:t.join(".")}),a=e.schema?.[0]?.type;let l;return a==="object"?l={}:a==="array"?l=[]:l=null,f.jsx(r.ArrayWrapper,{label:i4(e),field:e,onAddItem:()=>i(l),children:s.map((c,u)=>f.jsx(r.ArrayElementWrapper,{onRemove:()=>o(u),index:u,children:f.jsx(zv,{field:e.schema[0],path:[...t,u.toString()]})},c.id))})},zv=({field:e,path:t})=>{const{formComponents:r,uiComponents:n}=_J(),{register:s,formState:{errors:i},getValues:o}=o6(),a=t.join("."),l=ZJt(i,t)?.message,c=o(a),u=e.fieldConfig?.fieldWrapper||n.FieldWrapper;let d=()=>f.jsx(n.ErrorMessage,{error:`[AutoForm Configuration Error] No component found for type "${e.type}" nor a fallback`});return e.type==="array"?d=xPr:e.type==="object"?d=bPr:e.type in r?d=r[e.type]:"fallback"in r&&(d=r.fallback),f.jsx(u,{label:i4(e),error:l,id:a,field:e,children:f.jsx(d,{label:i4(e),field:e,value:c,error:l,id:a,path:t,inputProps:{required:e.required,error:l,key:`${a}-input`,...e.fieldConfig?.inputProps,...s(a)}},a)})},wPr=({field:e,inputProps:t})=>{const r=t.name?.split(".")??[];return e.schema?.map((n,s)=>f.jsxs("div",{children:[f.jsx(zv,{field:n,path:r},r.join(".")),s<(e.schema?.length??0)-1&&f.jsx(Ze,{variant:"ui-xs",className:"text-center",children:"OR"})]},n.key))},SPr=({field:e,path:t})=>{const{watch:r}=o6(),n=t.join("."),s=r(n),o=(e.schema?.flatMap(p=>p.schema||[])||[])?.filter(p=>p.fieldConfig?.customData?.isLiteral)||[],a=o[0],l=o?.reduce((p,m)=>{const g=(m.fieldConfig?.customData?.literalValues??[]).map(v=>[v,v]);return p.options?.push(...g),p},{key:a.key,required:a.required,type:"select",default:a.default,description:a.description,options:[],fieldConfig:a.fieldConfig}),c=e.schema?.reduce((p,m)=>{const g=m.schema?.find(w=>w.fieldConfig?.customData?.isLiteral),v=g?.fieldConfig?.customData?.literalValues?.[0],b=m.schema?.filter(w=>w.key!==g?.key)??[];return v&&(p[v]=b),p},{}),u=e.schema?.filter(p=>!p.schema?.find(g=>g.fieldConfig?.customData?.isLiteral)),d=s?.[l.key];return f.jsxs("div",{children:[f.jsx(zv,{field:l,path:[...t,l.key]},`${n}.${l.key}`),d&&c?.[d]&&c[d].map(p=>f.jsx(zv,{field:p,path:[...t,p.key]},`${n}.${p.key}`)),u&&u.map(p=>f.jsx(zv,{field:p,path:[...t,p.key]},`${n}.${p.key}`))]},e.key)};function L4(e){const t={};for(const r in e){const n=e[r];if(![null,void 0,"",[],{}].includes(n))if(Array.isArray(n)){const i=n.map(o=>{if(typeof o=="object"){const a=L4(o);return Object.keys(a).length>0?a:null}return o}).filter(o=>o!==null);i.length>0&&(t[r]=i)}else if(typeof n=="object"){const s=L4(n);Object.keys(s).length>0&&(t[r]=s)}else t[r]=n}return t}function Tg(e){return Function("z",`"use strict";return (${e});`)(qk)}function OPr({schema:e,onSubmit:t=()=>{},defaultValues:r,values:n,children:s,uiComponents:i,formComponents:o,withSubmit:a=!1,onFormInit:l=()=>{},formProps:c={}}){const u=hJt(e),d=fJt({defaultValues:{...mJt(e),...r},values:n});E.useEffect(()=>{l&&l(d)},[l,d]);const p=async m=>{const g=L4(m),v=e.validateSchema(g);if(v.success)await t(v.data,d);else{d.clearErrors();let b=!1;v.errors?.forEach(w=>{const S=w.path.join(".");d.setError(S,{type:"custom",message:w.message},{shouldFocus:!b}),b=!0;const O=w.path?.slice?.(0,-1);O?.length>0&&d.setError(O.join("."),{type:"custom",message:w.message})})}};return f.jsx(HYt,{...d,children:f.jsx(_Jt,{value:{schema:u,uiComponents:i,formComponents:o},children:f.jsxs(i.Form,{onSubmit:d.handleSubmit(p),...c,children:[u.fields.map(m=>f.jsx(zv,{field:m,path:[m.key]},m.key)),s,a&&f.jsx(i.SubmitButton,{children:"Submit"})]})})})}const _Pr={Form:K2r,FieldWrapper:tPr,ErrorMessage:rPr,SubmitButton:nPr,ObjectWrapper:mPr,ArrayWrapper:gPr,ArrayElementWrapper:yPr};function kPr({uiComponents:e,formComponents:t,readOnly:r,...n}){return f.jsx(OPr,{...n,uiComponents:{..._Pr,...e},formComponents:{string:s=>f.jsx(iPr,{...s,inputProps:{...s.inputProps,readOnly:r}}),number:s=>f.jsx(oPr,{...s,inputProps:{...s.inputProps,readOnly:r}}),boolean:s=>f.jsx(aPr,{...s,inputProps:{...s.inputProps,readOnly:r}}),date:s=>f.jsx(pPr,{...s,inputProps:{...s.inputProps,readOnly:r}}),select:s=>f.jsx(hPr,{...s,inputProps:{...s.inputProps,readOnly:r}}),record:s=>f.jsx(vPr,{...s,inputProps:{...s.inputProps,readOnly:r}}),union:s=>f.jsx(wPr,{...s,inputProps:{...s.inputProps,readOnly:r}}),"discriminated-union":s=>f.jsx(SPr,{...s,inputProps:{...s.inputProps,readOnly:r}}),...t}})}const EPr=VZe("text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),hd=E.forwardRef(({className:e,...t},r)=>f.jsx(gje,{ref:r,className:re(EPr(),e),...t}));hd.displayName=gje.displayName;function CPr(e,t){if(t?.fieldType)return t.fieldType;if(e instanceof ap||e instanceof AT)return"object";if(e instanceof Lw)return"number";if(e instanceof Bw)return"boolean";if(e instanceof Fw)return(e._zod.def.checks||[]).some(s=>s._zod.def.check==="string_format"&&s._zod.def.format==="datetime")?"date":"string";if(e instanceof Qv||e instanceof $Q)return"select";if(e instanceof Vw)return"array";if(e instanceof DN)return"record";if(e instanceof DT)return e._zod.def.options.every(s=>"shape"in s._zod.def?Object.values(s._zod.def.shape).some(i=>i instanceof Zk):!1)?"discriminated-union":"union";if(e instanceof _W)return"discriminated-union";if(e instanceof Zk){const r=e._zod?.def?.values,n=e._def?.value,s=r!==void 0?Array.isArray(r)?r[0]:r:n;return typeof s=="number"?"number":typeof s=="boolean"?"boolean":"string"}return"string"}function jk(e){if(e instanceof qk.core.$ZodDefault)return e._zod.def.defaultValue;if(e instanceof qk.core.$ZodLiteral){const t=e._zod.def.values;return Array.isArray(t)?t[0]:t}else{if("innerType"in e._zod.def)return jk(e._zod.def.innerType);if("shape"in e._zod.def)return cI(e);if("left"in e._zod.def&&"right"in e._zod.def){const t=e._zod.def.left,r=e._zod.def.right,n="shape"in t?cI(t):jk(t),s="shape"in r?cI(r):jk(r);return{...n,...s}}}}function cI(e){const t=e._zod.def.shape,r={};for(const[n,s]of Object.entries(t)){const i=jk(s);i!==void 0&&(r[n]=i)}return r}function eg(e,t){const r=eq(t),n=vje(t);let s=CPr(r,n);const i=jk(t),o=r._zod.def?.entries;let a=[];o&&(Array.isArray(o)?a=o.map(d=>[d,d]):a=Object.entries(o));let l=[];if((r instanceof Ii||r instanceof ap)&&(l=Object.entries(r.shape).map(([d,p])=>eg(d,p))),(r instanceof bC||r instanceof DT)&&(l=Object.entries(r.def.options).map(([d,p])=>eg(d,p))),r instanceof xC||r instanceof AT){const d="left"in r.def?r.def.left:null,p="right"in r.def?r.def.right:null;let m=[],g=[];if(d)if("shape"in d&&d.shape)g=Object.entries(d.shape).map(([v,b])=>eg(v,b));else{const v=eg(e,d);g=v.schema??[v],s=v.type}if(p)if("shape"in p&&p.shape)m=Object.entries(p.shape).map(([v,b])=>eg(v,b));else{const v=eg(e,p);m=v.schema??[v],s=v.type}l=[...g,...m]}(r instanceof bd||r instanceof Vw)&&(l=[eg("0",r._zod.def.element)]);const c=r instanceof Zk,u=c?r._zod.def.values:void 0;return{key:e,type:s,required:!t.optional(),default:i,description:r.description,fieldConfig:c||Object.keys(n??{})?.length>0?{...n,customData:{...n?.customData??{},...c?{isLiteral:c,literalValues:u}:{}}}:void 0,options:a,schema:l}}function eq(e){return"innerType"in e._zod.def?eq(e._zod.def.innerType):"schema"in e._zod.def?eq(e._zod.def.schema):e}function TPr(e){const t=e.shape;return{fields:Object.entries(t).map(([n,s])=>eg(n,s))}}class DPr extends YJt{_schema;constructor(t){super(t),this._schema=t}getDefaultValues(){return cI(this._schema)}validateSchema(t){const r=L4(t);try{const n=this._schema.safeParse(r);return n.success?{success:!0,data:n.data}:{success:!1,errors:n.error.issues.map(s=>({path:s.path,message:s.message}))}}catch(n){throw n}}parseSchema(){return TPr(this._schema)}}function tq(e){return e instanceof ap?Object.keys(e.shape).length===0:e instanceof AT?tq(e._def.left)||tq(e._def.right):!1}function ZZe({schema:e,onSubmit:t,defaultValues:r,isSubmitLoading:n,submitButtonLabel:s,className:i,readOnly:o,children:a}){const l=!(e instanceof ap);if(!e)return console.error("no form schema found"),null;const c=p=>tq(p)?qk.object({}):l?qk.object({"":p}):p,d={schema:new DPr(c(e)),onSubmit:async p=>{await t?.(l?p[""]||{}:p)},defaultValues:l?r?{"":r}:void 0:r,formProps:{className:i,noValidate:!0},uiComponents:{SubmitButton:({children:p})=>t?f.jsx(Je,{variant:"light",className:"w-full",size:"md",disabled:n,children:n?f.jsx(qe,{children:f.jsx(Mf,{className:"animate-spin"})}):s||p}):null},formComponents:{Label:({value:p})=>f.jsx(hd,{className:"text-sm font-normal",children:p})},withSubmit:!0,children:a};return f.jsx(kPr,{...d,readOnly:o})}const mte=E.forwardRef(({className:e,...t},r)=>f.jsx(Vje,{className:re("grid gap-2",e),...t,ref:r}));mte.displayName=Vje.displayName;const _h=E.forwardRef(({className:e,...t},r)=>f.jsx(Uje,{ref:r,className:re("aspect-square h-4 w-4 rounded-full border border-neutral3 text-neutral6","shadow-sm",kr.all,"hover:border-neutral5 hover:shadow-md",_p,"disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:border-neutral3 disabled:hover:shadow-sm","data-[state=checked]:border-accent1 data-[state=checked]:shadow-glow-accent1",e),...t,children:f.jsx(UKt,{className:re("flex items-center justify-center","data-[state=checked]:animate-in data-[state=checked]:zoom-in-50 data-[state=checked]:duration-150"),children:f.jsx(Iut,{className:"h-2 w-2 fill-accent1 text-accent1"})})}));_h.displayName=Uje.displayName;const rq=({schema:e,defaultValues:t,withoutSubmit:r,isSubmitLoading:n,submitButtonLabel:s,onSubmit:i,children:o,isProcessorWorkflow:a})=>{const[l,c]=E.useState(a?"simple":"form");return f.jsxs("div",{children:[f.jsx(mte,{disabled:n,value:l,onValueChange:u=>c(u),className:"pb-4",children:f.jsxs("div",{className:"flex flex-row gap-4",children:[a&&f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(_h,{value:"simple",id:"simple"}),f.jsx(hd,{htmlFor:"simple",className:"!text-neutral3 text-ui-sm",children:"Simple"})]}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(_h,{value:"form",id:"form"}),f.jsx(hd,{htmlFor:"form",className:"!text-neutral3 text-ui-sm",children:"Form"})]}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(_h,{value:"json",id:"json"}),f.jsx(hd,{htmlFor:"json",className:"!text-neutral3 text-ui-sm",children:"JSON"})]})]})}),f.jsx("div",{className:re({"opacity-50 pointer-events-none":n}),children:l==="simple"&&a?f.jsx(PPr,{schema:e,defaultValues:t,isSubmitLoading:n,submitButtonLabel:s,onSubmit:i,withoutSubmit:r,children:o}):l==="form"?f.jsx(ZZe,{schema:e,defaultValues:t,isSubmitLoading:n,submitButtonLabel:s,onSubmit:r?void 0:i,children:o}):f.jsx(APr,{schema:e,defaultValues:t,isSubmitLoading:n,submitButtonLabel:s,onSubmit:i,withoutSubmit:r,children:o})})]})},APr=({schema:e,defaultValues:t,isSubmitLoading:r,submitButtonLabel:n,onSubmit:s,withoutSubmit:i,children:o})=>{const[a,l]=E.useState([]),[c,u]=E.useState(()=>JSON.stringify(t??{},null,2)),d=()=>{l([]);try{const m=e.safeParse(JSON.parse(c));m.success?s(m.data):l(m.error.issues.map(g=>`[${g.path.join(".")}] ${g.message}`))}catch{l(["Invalid JSON provided"])}};let p={};try{p=JSON.parse(c)}catch{p={}}return f.jsxs("div",{className:"flex flex-col gap-4",children:[a.length>0&&f.jsxs("div",{className:"border border-accent2 rounded-lg p-2",children:[f.jsxs(Ze,{as:"p",variant:"ui-md",className:"text-accent2 font-semibold",children:[a.length," errors found"]}),f.jsx("ul",{className:"list-disc list-inside",children:a.map((m,g)=>f.jsx("li",{className:"text-ui-sm text-accent2",children:m},g))})]}),f.jsx(Kc,{data:p,onChange:u}),o,i?null:f.jsx(Je,{variant:"light",onClick:d,className:"w-full",size:"lg",children:r?f.jsx(Mf,{className:"animate-spin"}):n})]})},_xe=[{value:"input",label:"Input - Process input messages before LLM"},{value:"inputStep",label:"Input Step - Process at each agentic loop step"},{value:"outputStream",label:"Output Stream - Process streaming chunks"},{value:"outputResult",label:"Output Result - Process complete output"},{value:"outputStep",label:"Output Step - Process after each LLM response"}],PPr=({schema:e,defaultValues:t,isSubmitLoading:r,submitButtonLabel:n,onSubmit:s,withoutSubmit:i,children:o})=>{const[a,l]=E.useState("Hello, this is a test message."),[c,u]=E.useState("input"),[d,p]=E.useState([]),m=()=>{p([]);const v=c==="outputStep"||c==="outputResult"?"assistant":"user",b={messages:[{id:crypto.randomUUID(),role:v,createdAt:new Date().toISOString(),content:{format:2,parts:[{type:"text",text:a}]}}],phase:c};try{const w=e.safeParse(b);w.success?s(w.data):p(w.error.issues.map(S=>`[${S.path.join(".")}] ${S.message}`))}catch{p(["Error processing input"])}};return f.jsxs("div",{className:"flex flex-col gap-4",children:[d.length>0&&f.jsxs("div",{className:"border border-accent2 rounded-lg p-2",children:[f.jsxs(Ze,{as:"p",variant:"ui-md",className:"text-accent2 font-semibold",children:[d.length," errors found"]}),f.jsx("ul",{className:"list-disc list-inside",children:d.map((g,v)=>f.jsx("li",{className:"text-ui-sm text-accent2",children:g},v))})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx(Ze,{as:"label",variant:"ui-sm",className:"text-neutral3",children:"Phase"}),f.jsxs(Ew,{value:c,onValueChange:u,children:[f.jsx(w0,{className:"w-full",children:f.jsx(Cw,{placeholder:"Select phase"})}),f.jsx(S0,{children:_xe.map(g=>f.jsx(O0,{value:g.value,children:g.value},g.value))})]}),f.jsx(Ze,{variant:"ui-xs",className:"text-icon4",children:_xe.find(g=>g.value===c)?.label})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx(Ze,{as:"label",variant:"ui-sm",className:"text-neutral3",children:"Test Message"}),f.jsx("textarea",{value:a,onChange:g=>l(g.target.value),placeholder:"Enter a test message...",rows:4,className:"w-full bg-transparent border border-border1 rounded-md p-3 text-ui-sm text-neutral6 placeholder:text-neutral3 focus:outline-none focus:ring-2 focus:ring-accent1"})]}),o,i?null:f.jsx(Je,{variant:"light",onClick:m,className:"w-full",size:"lg",children:r?f.jsx(Mf,{className:"animate-spin"}):n})]})},lT=async e=>await Qje.format(e,{semi:!1,parser:"json",printWidth:80,tabWidth:2,plugins:[Z9e,C8e]}),cT=e=>{try{const t=JSON.parse(e);return!!t&&typeof t=="object"}catch{return!1}},y_="text-neutral3 hover:text-neutral6",kxe=e=>{try{return e==null?"{}":JSON.stringify(e,null,2)}catch{return"{}"}},Hz=({label:e,value:t,onChange:r,helperText:n,exampleCode:s})=>{const i=wy(),{handleCopy:o}=np({text:t}),{handleCopy:a}=np({text:s??"{}"}),[l,c]=E.useState(null),[u,d]=E.useState(!1),[p,m]=E.useState(!1),g=async()=>{if(c(null),!t.trim()){r("{}");return}if(!cT(t)){c("Invalid JSON");return}try{const v=await lT(t);r(v)}catch{c("Unable to format JSON")}};return f.jsxs(f.Fragment,{children:[p&&f.jsxs("div",{className:"border border-border1 rounded-lg bg-surface3 p-3 space-y-2",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsxs(Ze,{as:"p",variant:"ui-sm",className:"text-neutral3",children:["Example ",e]}),f.jsxs(Ss,{children:[f.jsx(Os,{asChild:!0,children:f.jsx("button",{type:"button",onClick:a,className:y_,"aria-label":"Copy example JSON",children:f.jsx(qe,{children:f.jsx(cu,{})})})}),f.jsx(is,{children:"Copy example JSON"})]})]}),f.jsx(fc,{value:s,theme:i,extensions:[oc],className:"h-[150px] w-full overflow-y-scroll bg-surface3 rounded-lg overflow-scroll p-3"})]}),f.jsxs(K6,{className:"border border-border1 rounded-lg bg-surface3",open:u,onOpenChange:d,children:[f.jsxs("div",{className:"flex items-center justify-between w-full px-3",children:[f.jsxs("div",{children:[f.jsx(Ze,{as:"label",variant:"ui-md",className:"text-neutral3",children:e}),n&&f.jsx(Ze,{variant:"ui-xs",className:"text-neutral3",children:n})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsxs(Ss,{children:[f.jsx(Os,{asChild:!0,children:f.jsx("button",{type:"button",onClick:g,className:y_,"aria-label":"Format JSON",children:f.jsx(qe,{children:f.jsx(qv,{})})})}),f.jsx(is,{children:"Format JSON"})]}),f.jsxs(Ss,{children:[f.jsx(Os,{asChild:!0,children:f.jsx("button",{type:"button",onClick:o,className:y_,"aria-label":"Copy JSON",children:f.jsx(qe,{children:f.jsx(cu,{})})})}),f.jsx(is,{children:"Copy JSON"})]}),s&&f.jsxs(Ss,{children:[f.jsx(Os,{asChild:!0,children:f.jsx("button",{type:"button",onClick:()=>m(!p),className:y_,"aria-label":p?"Hide example JSON":"View example JSON",children:f.jsx(qe,{children:p?f.jsx(Zut,{}):f.jsx(Wx,{})})})}),f.jsx(is,{children:"View example JSON"})]}),f.jsx(LD,{asChild:!0,children:f.jsx("button",{type:"button",className:y_,"aria-label":u?`Collapse ${e}`:`Expand ${e}`,children:f.jsx(qe,{className:re("transition-transform",u?"rotate-0":"-rotate-90"),children:f.jsx(Vd,{})})})})]})]}),f.jsxs(zD,{className:"space-y-2",children:[f.jsx(fc,{value:t,onChange:r,theme:i,extensions:[oc],className:"h-[260px] overflow-y-scroll bg-surface3 rounded-lg overflow-hidden p-3"}),l&&f.jsx(Ze,{variant:"ui-sm",className:"text-accent2",children:l})]})]})]})},Wz=({stepKey:e,closeModal:t,isPerStepRun:r,isContinueRun:n,buttonText:s="Start time travel",inputData:i})=>{const{result:o,workflow:a,timeTravelWorkflowStream:l,runId:c,workflowId:u,setDebugMode:d}=E.useContext(kp),{requestContext:p}=Qn(),m=i?{payload:i}:o?.steps?.[e],[g,v]=E.useState(()=>"{}"),[b,w]=E.useState(()=>"{}"),[S,O]=E.useState(()=>"{}"),[k,C]=E.useState(null),[T,P]=E.useState(!1),A=a?.allSteps?.[e],{schema:R}=E.useMemo(()=>{if(!A?.inputSchema)return{schema:Qk(b1(),OI())};try{const z=Mv(A.inputSchema),Q=a?.stateSchema?Tg(kg(Mv(a.stateSchema))):null,U=Tg(kg(z));return{schema:Q?Uw({inputData:U,initialState:Q.optional()}):U,schemaError:null}}catch(z){return console.error("Failed to parse step schema",z),{schema:Qk(b1(),OI())}}},[A?.inputSchema,a?.stateSchema]),M=async z=>{C(null),P(!0);try{const Q=g.trim()?JSON.parse(g):{},U=b.trim()?JSON.parse(b):{},L=S.trim()?JSON.parse(S):{},{initialState:V,inputData:j}=z??{},N=a?.stateSchema?j:z,I={runId:c,workflowId:u,step:e,inputData:N,initialState:V,resumeData:Object.keys(Q)?.length>0?Q:void 0,context:Object.keys(U)?.length>0?U:void 0,nestedStepsContext:Object.keys(L)?.length>0?L:void 0,requestContext:p,...n?{perStep:!1}:{}};n&&d(!1),l(I),t()}catch(Q){console.error("Invalid JSON provided",Q),C(Q instanceof Error?Q.message:"Error time traveling workflow")}finally{P(!1)}};return f.jsx(Dc,{children:f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx(Ze,{as:"p",variant:"ui-lg",className:"text-neutral3",children:"Input data"}),f.jsxs(Ze,{variant:"ui-xs",className:"text-neutral3",children:["Step: ",e]})]}),f.jsx(rq,{schema:R,defaultValues:m?.payload,isSubmitLoading:T,submitButtonLabel:s,onSubmit:M,children:f.jsxs("div",{className:"space-y-4 pb-4",children:[r||n?null:f.jsxs(f.Fragment,{children:[f.jsx(Hz,{label:"Resume Data (JSON)",value:g,onChange:v,helperText:"Provide any resume payloads that should be passed to the step."}),f.jsx(Hz,{label:"Context (JSON)",value:b,onChange:w,helperText:"Only include top level steps (no nested workflow steps) that are required in the time travel execution.",exampleCode:kxe({stepId:{status:"success",payload:{value:"test value"},output:{value:"test output"}}})}),f.jsx(Hz,{label:"Nested Step Context (JSON)",value:S,onChange:O,helperText:"Includes nested workflow steps that are required in the time travel execution.",exampleCode:kxe({nestedWorkflowId:{stepId:{status:"success",payload:{value:"test value"},output:{value:"test output"}}}})})]}),k&&f.jsx(Ze,{variant:"ui-sm",className:"text-accent2",children:k})]})})]})})},gte=({input:e,output:t,resumeData:r,suspendOutput:n,error:s,tripwire:i,mapConfig:o,stepName:a,stepId:l,onShowNestedGraph:c,status:u,stepKey:d,stepsFlow:p})=>{const[m,g]=E.useState(!1),[v,b]=E.useState(!1),[w,S]=E.useState(!1),[O,k]=E.useState(!1),[C,T]=E.useState(!1),[P,A]=E.useState(!1),[R,M]=E.useState(!1),[z,Q]=E.useState(!1),{withoutTimeTravel:U,debugMode:L,result:V,runSnapshot:j,timeTravelWorkflowStream:N,runId:I,workflowId:H,setDebugMode:B}=E.useContext(kp),{showMapConfig:J,stepDetail:Z,closeStepDetail:F}=J6(),{requestContext:W}=Qn(),K=V?.status??j?.status,se="max-w-4xl w-full",X=!U&&d&&!o&&K!=="running"&&K!=="paused",te=d&&L&&K==="paused",de=E.useMemo(()=>{if(!d||!te)return;const Ke=p?.[d]??[];if(Ke.length===0)return;if(Ke.length>1)return{hasMultiSteps:!0,input:Ke.reduce((Or,le)=>(V?.steps?.[le]?.status==="success"&&(Or[le]=V?.steps?.[le].output),Or),{})};const zr=Ke[0];if(V?.steps?.[zr]?.status==="success")return{hasMultiSteps:!1,input:V?.steps?.[zr].output}},[d,p,te,V]),ue=te&&de&&!V?.steps[d],Ae=Z?.type==="map-config"&&Z?.stepName===a,_e=Z?.type==="nested-graph"&&Z?.stepName===a,De="ring-2 ring-accent1 ring-offset-1 ring-offset-transparent",Me=()=>{Ae?F():J({stepName:a,stepId:l,mapConfig:o})},We=()=>{_e?F():c?.()},lt=Ke=>{const zr={runId:I,workflowId:H,step:d,inputData:de?.hasMultiSteps?void 0:de?.input,requestContext:W,...Ke?{perStep:!1}:{},...de?.hasMultiSteps?{context:Object.keys(de.input)?.reduce((Or,le)=>(Or[le]={output:de.input[le]},Or),{})}:{}};Ke&&B(!1),N(zr)};return f.jsx(f.Fragment,{children:(e||t||s||i||o||r||c||X||ue)&&f.jsxs("div",{className:re("flex flex-wrap items-center bg-surface4 border-t border-border1 px-2 py-1 gap-2 rounded-b-lg",u==="success"&&"bg-accent1Dark",u==="failed"&&"bg-accent2Dark",u==="tripwire"&&"bg-amber-900/40 border-amber-500/20",u==="suspended"&&"bg-accent3Dark",u==="waiting"&&"bg-accent5Dark",u==="running"&&"bg-accent6Dark"),children:[c&&f.jsx(Je,{onClick:We,className:re(_e&&De),size:"sm",children:"View nested graph"}),X&&f.jsxs(f.Fragment,{children:[f.jsx(Je,{onClick:()=>A(!0),size:"sm",children:"Time travel"}),f.jsx(qo,{open:P,onOpenChange:A,children:f.jsxs(So,{className:se,children:[f.jsxs(Oo,{children:[f.jsxs(ko,{children:["Time travel to ",d]}),f.jsx(Eo,{children:"Time travel to a specific workflow step"})]}),f.jsx(_o,{className:"max-h-[600px]",children:f.jsx(Wz,{stepKey:d,closeModal:()=>A(!1)})})]})})]}),ue&&f.jsxs(f.Fragment,{children:[f.jsx(Je,{onClick:()=>{o?lt():Q(!0)},size:"sm",children:"Run step"}),f.jsx(qo,{open:z,onOpenChange:Q,children:f.jsxs(So,{className:se,children:[f.jsxs(Oo,{children:[f.jsxs(ko,{children:["Run step ",d]}),f.jsx(Eo,{children:"Run a specific workflow step"})]}),f.jsx(_o,{className:"max-h-[600px]",children:f.jsx(Wz,{stepKey:d,closeModal:()=>Q(!1),isPerStepRun:!0,buttonText:"Run step",inputData:de?.input})})]})}),f.jsx(Je,{onClick:()=>{o?lt(!0):M(!0)},size:"sm",children:"Continue run"}),f.jsx(qo,{open:R,onOpenChange:M,children:f.jsxs(So,{className:se,children:[f.jsxs(Oo,{children:[f.jsxs(ko,{children:["Continue run ",d]}),f.jsx(Eo,{children:"Continue the workflow run from this step"})]}),f.jsx(_o,{className:"max-h-[600px]",children:f.jsx(Wz,{stepKey:d,closeModal:()=>M(!1),isContinueRun:!0,buttonText:"Continue run",inputData:de?.input})})]})})]}),o&&f.jsx(Je,{onClick:Me,className:re(Ae&&De),size:"sm",children:"Map config"}),e&&f.jsxs(f.Fragment,{children:[f.jsx(Je,{onClick:()=>g(!0),size:"sm",children:"Input"}),f.jsx(qo,{open:m,onOpenChange:g,children:f.jsxs(So,{className:se,children:[f.jsxs(Oo,{children:[f.jsxs(ko,{children:[a," input"]}),f.jsx(Eo,{children:"View the input data for this step"})]}),f.jsx(_o,{children:f.jsx(Ox,{data:e})})]})})]}),r&&f.jsxs(f.Fragment,{children:[f.jsx(Je,{onClick:()=>S(!0),size:"sm",children:"Resume data"}),f.jsx(qo,{open:w,onOpenChange:S,children:f.jsxs(So,{className:se,children:[f.jsxs(Oo,{children:[f.jsxs(ko,{children:[a," resume data"]}),f.jsx(Eo,{children:"View the resume data for this step"})]}),f.jsx(_o,{children:f.jsx(Ox,{data:r})})]})})]}),(t??n)&&f.jsxs(f.Fragment,{children:[f.jsx(Je,{onClick:()=>b(!0),size:"sm",children:"Output"}),f.jsx(qo,{open:v,onOpenChange:b,children:f.jsxs(So,{className:se,children:[f.jsxs(Oo,{children:[f.jsxs(ko,{children:[a," output"]}),f.jsx(Eo,{children:"View the output data for this step"})]}),f.jsx(_o,{children:f.jsx(Ox,{data:t??n})})]})})]}),s&&f.jsxs(f.Fragment,{children:[f.jsx(Je,{onClick:()=>k(!0),size:"sm",children:"Error"}),f.jsx(qo,{open:O,onOpenChange:k,children:f.jsxs(So,{className:se,children:[f.jsxs(Oo,{children:[f.jsxs(ko,{children:[a," error"]}),f.jsx(Eo,{children:"View the error details for this step"})]}),f.jsx(_o,{children:f.jsx(Ox,{data:s})})]})})]}),i&&f.jsxs(f.Fragment,{children:[f.jsx(Je,{onClick:()=>T(!0),className:"text-amber-400 hover:text-amber-300",size:"sm",children:"Tripwire"}),f.jsx(qo,{open:C,onOpenChange:T,children:f.jsxs(So,{className:se,children:[f.jsxs(Oo,{children:[f.jsxs(ko,{children:[a," tripwire"]}),f.jsx(Eo,{children:"View the tripwire details for this step"})]}),f.jsx(_o,{children:f.jsx(Ox,{data:{reason:i.reason,retry:i.retry,metadata:i.metadata,processorId:i.processorId}})})]})})]})]})})};function qZe({data:e}){const{conditions:t,previousStepId:r,nextStepId:n,withoutTopHandle:s}=e,[i,o]=E.useState(!0),[a,l]=E.useState(!1),c=t[0]?.type,u=(t.some(S=>S.fnString)||t?.length>1)&&c!=="else",{steps:d}=VD(),p=d[r],m=d[n],g=p?.status==="failed"&&p?.tripwire!==void 0,v=g?"tripwire":p?.status,{icon:b,color:w}=xxe(c);return f.jsxs(f.Fragment,{children:[!s&&f.jsx(wl,{type:"target",position:jt.Top,style:{visibility:"hidden"}}),f.jsxs("div",{"data-workflow-node":!0,"data-workflow-step-status":v,"data-testid":"workflow-condition-node",className:re("bg-surface3 rounded-lg w-[300px] border border-border1",v==="success"&&m&&"bg-accent1Darker",v==="failed"&&m&&"bg-accent2Darker",v==="tripwire"&&m&&"bg-amber-950/40 border-amber-500/30",!p&&!!m?.status&&"bg-accent1Darker"),children:[f.jsxs(K6,{open:u?i:!0,onOpenChange:S=>{u&&o(S)},children:[f.jsxs(LD,{className:"flex items-center justify-between w-full px-3 py-2",children:[f.jsx(Xt,{icon:b?f.jsx(b,{className:"text-current",...w?{style:{color:w}}:{}}):null,children:c?.toUpperCase()}),u&&f.jsx(qe,{children:f.jsx(Vd,{className:re("transition-transform text-neutral3",{"transform rotate-180":i})})})]}),c==="else"?null:f.jsx(zD,{className:"flex flex-col gap-2 pb-2",children:t.map((S,O)=>{const k=S.conj||c,{icon:C,color:T}=xxe(k),P=O===0?null:f.jsx(Xt,{icon:C?f.jsx(C,{className:"text-current",...T?{style:{color:T}}:{}}):null,children:S.conj?.toLocaleUpperCase()||"WHEN"});return S.fnString?f.jsxs("div",{className:"px-3",children:[f.jsx(hme,{theme:hQ.oneDark,code:String(S.fnString).trim(),language:"javascript",children:({className:A,style:R,tokens:M,getLineProps:z,getTokenProps:Q})=>f.jsx("pre",{className:re("relative font-mono p-3 w-full cursor-pointer rounded-lg text-xs !bg-surface4 whitespace-pre-wrap break-words",A,v==="success"&&m&&"!bg-accent1Dark",v==="failed"&&m&&"!bg-accent2Dark",v==="tripwire"&&m&&"!bg-amber-900/40"),onClick:()=>l(!0),style:R,children:M.map((U,L)=>f.jsxs("div",{...z({line:U}),children:[f.jsx("span",{className:"inline-block mr-2 text-neutral3",children:L+1}),U.map((V,j)=>f.jsx("span",{...Q({token:V})},j))]},L))})}),f.jsx(qo,{open:a,onOpenChange:l,children:f.jsxs(So,{className:"max-w-[30rem]",children:[f.jsxs(Oo,{children:[f.jsx(ko,{className:"sr-only",children:"Condition Function"}),f.jsx(Eo,{children:"View the condition function code"})]}),f.jsx(_o,{children:f.jsx(BD,{className:"w-full",maxHeight:"400px",children:f.jsx(hme,{theme:hQ.oneDark,code:String(S.fnString).trim(),language:"javascript",children:({className:A,style:R,tokens:M,getLineProps:z,getTokenProps:Q})=>f.jsx("pre",{className:`${A} relative font-mono text-sm overflow-x-auto p-3 w-full rounded-lg mt-2 dark:bg-zinc-800`,style:{...R,backgroundColor:"#121212",padding:"0 0.75rem 0 0"},children:M.map((U,L)=>f.jsxs("div",{...z({line:U}),children:[f.jsx("span",{className:"inline-block mr-2 text-neutral3",children:L+1}),U.map((V,j)=>f.jsx("span",{...Q({token:V})},j))]},L))})})})})]})})]},`${S.fnString}-${O}`):f.jsx(E.Fragment,{children:S.ref?.step?f.jsxs("div",{className:"flex items-center gap-1",children:[P,f.jsxs(Ze,{variant:"ui-xs",className:" text-neutral3 flex-1",children:[S.ref.step.id||S.ref.step,"'s ",S.ref.path," ",Object.entries(S.query).map(([A,R])=>`${A} ${String(R)}`)]})]}):null},`${S.ref?.path}-${O}`)})})]}),f.jsx(gte,{stepName:n,input:p?.output,mapConfig:e.mapConfig,tripwire:g?p?.tripwire:void 0,status:m?v:void 0})]}),f.jsx(wl,{type:"source",position:jt.Bottom,style:{visibility:"hidden"}})]})}const $Pr=(e,t)=>Number(e.toPrecision(t)),HZe=({startedAt:e,endedAt:t})=>{const[r,n]=E.useState(e);E.useEffect(()=>{const i=setInterval(()=>{n(Date.now())},100);return()=>clearInterval(i)},[e]);const s=t?t-e:r-e;return f.jsxs("span",{className:"text-xs text-neutral3",children:[$Pr(s,3),"ms"]})};function WZe({data:e,parentWorkflowName:t,stepsFlow:r}){const{steps:n}=VD(),{label:s,stepId:i,description:o,withoutTopHandle:a,withoutBottomHandle:l,mapConfig:c,duration:u,date:d,isParallel:p,canSuspend:m,isForEach:g}=e,v=t?`${t}.${i||s}`:i||s,b=n[v],w=b?.status==="failed"&&b?.tripwire!==void 0,S=w?"tripwire":b?.status,{isSleepNode:O,isForEachNode:k,isMapNode:C,hasSpecialBadge:T}=LZe({duration:u,date:d,isForEach:g,mapConfig:c,canSuspend:m,isParallel:p});return f.jsxs(f.Fragment,{children:[!a&&f.jsx(wl,{type:"target",position:jt.Top,style:{visibility:"hidden"}}),f.jsxs("div",{"data-workflow-node":!0,"data-workflow-step-status":S??"idle","data-testid":"workflow-default-node",className:re("bg-surface3 rounded-lg w-[274px] border border-border1",T?"pt-0":"pt-2",S==="success"&&"bg-accent1Darker",S==="failed"&&"bg-accent2Darker",S==="tripwire"&&"bg-amber-950/40 border-amber-500/30",S==="suspended"&&"bg-accent3Darker",S==="waiting"&&"bg-accent5Darker",S==="running"&&"bg-accent6Darker"),children:[T&&f.jsxs("div",{className:"px-3 pt-2 pb-1 flex gap-1.5 flex-wrap",children:[O&&f.jsx(Xt,{icon:d?f.jsx(Ji.sleepUntil,{className:"text-current",style:{color:xi.sleep}}):f.jsx(Ji.sleep,{className:"text-current",style:{color:xi.sleep}}),children:d?"SLEEP UNTIL":"SLEEP"}),m&&f.jsx(Xt,{icon:f.jsx(Ji.suspend,{className:"text-current",style:{color:xi.suspend}}),children:"SUSPEND/RESUME"}),p&&f.jsx(Xt,{icon:f.jsx(Ji.parallel,{className:"text-current",style:{color:xi.parallel}}),children:"PARALLEL"}),k&&f.jsx(Xt,{icon:f.jsx(Ji.forEach,{className:"text-current",style:{color:xi.forEach}}),children:"FOREACH"}),C&&f.jsx(Xt,{icon:f.jsx(Ji.map,{className:"text-current",style:{color:xi.map}}),children:"MAP"})]}),f.jsxs("div",{className:re("flex items-center gap-2 px-3",!o&&"pb-2"),children:[f.jsxs(qe,{children:[S==="tripwire"&&f.jsx(LT,{className:"text-amber-400"}),S==="failed"&&f.jsx(cte,{className:"text-accent2"}),S==="success"&&f.jsx(lte,{className:"text-accent1"}),S==="suspended"&&f.jsx(pTe,{className:"text-accent3"}),S==="waiting"&&f.jsx(iG,{className:"text-accent5"}),S==="running"&&f.jsx(Mf,{className:"text-accent6 animate-spin"}),!b&&f.jsx(sG,{className:"text-neutral2"})]}),f.jsxs(Ze,{variant:"ui-lg",className:"text-neutral6 font-medium inline-flex items-center gap-1 justify-between w-full",children:[s," ",b?.startedAt&&f.jsx(HZe,{startedAt:b.startedAt,endedAt:b.endedAt})]})]}),o&&f.jsx(Ze,{variant:"ui-sm",className:"text-neutral3 px-3 pb-2",children:o}),u&&f.jsxs(Ze,{variant:"ui-sm",className:"text-neutral3 px-3 pb-2",children:["sleeps for ",f.jsxs("strong",{children:[u,"ms"]})]}),d&&f.jsxs(Ze,{variant:"ui-sm",className:"text-neutral3 px-3 pb-2",children:["sleeps until ",f.jsx("strong",{children:new Date(d).toLocaleString()})]}),f.jsx(gte,{stepName:s,stepId:i,input:b?.input,resumeData:b?.resumeData,output:b?.output,suspendOutput:b?.suspendOutput,error:w?void 0:b?.error,tripwire:w?b?.tripwire:void 0,mapConfig:c,status:S,stepKey:v,stepsFlow:r})]}),!l&&f.jsx(wl,{type:"source",position:jt.Bottom,style:{visibility:"hidden",color:"red"}})]})}function GZe({data:e}){const{steps:t}=e,[r,n]=E.useState(!0);return f.jsxs(K6,{open:r,onOpenChange:n,className:re("bg-surface4 rounded-md w-[274px] flex flex-col p-2 gap-2"),children:[f.jsx(wl,{type:"target",position:jt.Top,style:{visibility:"hidden"}}),f.jsxs(LD,{className:"flex items-center justify-between w-full",children:[f.jsx(Xt,{icon:f.jsx(Ji.after,{className:"text-current",style:{color:xi.after}}),children:"AFTER"}),f.jsx(qe,{children:f.jsx(Vd,{className:re("transition-transform text-neutral3",{"transform rotate-180":r})})})]}),f.jsx(zD,{className:"flex flex-col gap-2",children:t.map(s=>f.jsxs("div",{className:"text-sm bg-surface5 flex items-center gap-1.5 rounded-sm p-2",children:[f.jsx(lTe,{className:"text-current w-4 h-4"}),f.jsx(Ze,{variant:"ui-xs",className:"text-neutral6 capitalize",children:s})]},s))}),f.jsx(wl,{type:"source",position:jt.Bottom,style:{visibility:"hidden"}})]})}function XZe({data:e}){const{result:t}=e;return f.jsxs("div",{"data-testid":"workflow-loop-result-node","data-workflow-step-status":t?"success":"failed",className:re("bg-surface4 rounded-md w-[274px]"),"data-workflow-node":!0,children:[f.jsx(wl,{type:"target",position:jt.Top,style:{visibility:"hidden"}}),f.jsx("div",{className:"p-2",children:f.jsxs("div",{className:"text-sm bg-surface5 flex items-center gap-1.5 rounded-sm p-2",children:[t?f.jsx(vut,{className:"text-current w-4 h-4"}):f.jsx(sTe,{className:"text-current w-4 h-4"}),f.jsx(Ze,{variant:"ui-xs",className:"text-neutral6 capitalize",children:String(t)})]})}),f.jsx(wl,{type:"source",position:jt.Bottom,style:{visibility:"hidden"}})]})}function YZe({data:e,parentWorkflowName:t,stepsFlow:r}){const{steps:n}=VD(),{showNestedGraph:s}=J6(),{label:i,stepId:o,description:a,withoutTopHandle:l,withoutBottomHandle:c,stepGraph:u,mapConfig:d,isParallel:p,canSuspend:m,isForEach:g}=e,v=t?`${t}.${i}`:i,b=t?`${t}.${o||i}`:o||i,w=n[b],S=w?.status==="failed"&&w?.tripwire!==void 0,O=S?"tripwire":w?.status,{isForEachNode:k,isMapNode:C,isNestedWorkflow:T,hasSpecialBadge:P}=LZe({isForEach:g,mapConfig:d,canSuspend:m,isParallel:p,stepGraph:u});return f.jsxs(f.Fragment,{children:[!l&&f.jsx(wl,{type:"target",position:jt.Top,style:{visibility:"hidden"}}),f.jsxs("div",{"data-testid":"workflow-nested-node","data-workflow-node":!0,"data-workflow-step-status":O,className:re("bg-surface3 rounded-lg w-[274px] border border-border1",P?"pt-0":"pt-2",O==="success"&&"bg-accent1Darker",O==="failed"&&"bg-accent2Darker",O==="tripwire"&&"bg-amber-950/40 border-amber-500/30",O==="suspended"&&"bg-accent3Darker",O==="waiting"&&"bg-accent5Darker",O==="running"&&"bg-accent6Darker"),children:[P&&f.jsxs("div",{className:"px-3 pt-2 pb-1 flex gap-1.5 flex-wrap",children:[m&&f.jsx(Xt,{icon:f.jsx(Ji.suspend,{className:"text-current",style:{color:xi.suspend}}),children:"SUSPEND/RESUME"}),p&&f.jsx(Xt,{icon:f.jsx(Ji.parallel,{className:"text-current",style:{color:xi.parallel}}),children:"PARALLEL"}),T&&f.jsx(Xt,{icon:f.jsx(Ji.workflow,{className:"text-current",style:{color:xi.workflow}}),children:"WORKFLOW"}),k&&f.jsx(Xt,{icon:f.jsx(Ji.forEach,{className:"text-current",style:{color:xi.forEach}}),children:"FOREACH"}),C&&f.jsx(Xt,{icon:f.jsx(Ji.map,{className:"text-current",style:{color:xi.map}}),children:"MAP"})]}),f.jsxs("div",{className:re("flex items-center gap-2 px-3",!a&&"pb-2"),children:[f.jsxs(qe,{children:[O==="failed"&&f.jsx(cte,{className:"text-accent2"}),O==="success"&&f.jsx(lte,{className:"text-accent1"}),O==="tripwire"&&f.jsx(LT,{className:"text-amber-400"}),O==="suspended"&&f.jsx(pTe,{className:"text-accent3"}),O==="waiting"&&f.jsx(iG,{className:"text-accent5"}),O==="running"&&f.jsx(Mf,{className:"text-accent6 animate-spin"}),!w&&f.jsx(sG,{className:"text-neutral2"})]}),f.jsxs(Ze,{variant:"ui-lg",className:"text-neutral6 font-medium inline-flex items-center gap-1 justify-between w-full",children:[i," ",w?.startedAt&&f.jsx(HZe,{startedAt:w.startedAt,endedAt:w.endedAt})]})]}),a&&f.jsx(Ze,{variant:"ui-sm",className:"text-neutral3 px-3 pb-2",children:a}),f.jsx(gte,{stepName:i,stepId:o,input:w?.input,resumeData:w?.resumeData,output:w?.output,suspendOutput:w?.suspendOutput,error:w?.error,tripwire:S?w?.tripwire:void 0,mapConfig:d,onShowNestedGraph:()=>s({label:i,fullStep:v,stepGraph:u}),status:O,stepKey:b,stepsFlow:r})]}),!c&&f.jsx(wl,{type:"source",position:jt.Bottom,style:{visibility:"hidden"}})]})}const z4=E.forwardRef(({className:e,...t},r)=>f.jsxs(dLe,{ref:r,className:re("relative flex w-full touch-none select-none items-center group",e),...t,children:[f.jsx(umr,{className:re("relative h-1.5 w-full grow overflow-hidden rounded-full bg-neutral2",kr.colors),children:f.jsx(dmr,{className:re("absolute h-full bg-accent1",kr.all)})}),f.jsx(fmr,{className:re("block h-4 w-4 rounded-full border-2 border-accent1 bg-white shadow-md","transition-all duration-normal ease-out-custom",_p,"hover:scale-110 hover:shadow-lg","active:scale-95","disabled:pointer-events-none disabled:opacity-50")})]}));z4.displayName=dLe.displayName;const yte=E.forwardRef(({className:e,...t})=>{const{zoom:r}=nZt(),{zoomTo:n,zoomIn:s,zoomOut:i,fitView:o}=Z5();return f.jsxs(fD,{className:re("flex gap-1 rounded-md bg-surface2 p-1 text-neutral6",e),...t,children:[f.jsx(Je,{onClick:()=>i({duration:300}),children:f.jsx(_dt,{className:"h-4 w-4"})}),f.jsx(z4,{className:"w-[140px]",value:[r],min:.01,max:1,step:.01,onValueChange:a=>{n(a[0])}}),f.jsx(Je,{onClick:()=>s({duration:300}),children:f.jsx($0,{className:"h-4 w-4"})}),f.jsxs(Je,{className:"min-w-20 tabular-nums",onClick:()=>n(1,{duration:300}),children:[(100*r).toFixed(0),"%"]}),f.jsx(Je,{onClick:()=>o({duration:300,maxZoom:1}),children:f.jsx(xdt,{className:"h-4 w-4"})})]})});yte.displayName="ZoomSlider";function IPr({workflow:e}){const{nodes:t,edges:r}=FZe(e),[n,s,i]=rRe(t),[o]=nRe(r),{steps:a}=VD(),l=E.useMemo(()=>r.reduce((u,d)=>{if(d.data){const p=d.data.nextStepId,m=d.data.previousStepId;return{...u,[p]:[...new Set([...u[p]||[],m])]}}return u},{}),[r]),c={"default-node":u=>f.jsx(WZe,{...u,stepsFlow:l}),"condition-node":qZe,"after-node":GZe,"loop-result-node":XZe,"nested-node":u=>f.jsx(YZe,{...u,stepsFlow:l})};return f.jsx("div",{className:"w-full h-full bg-surface1",children:f.jsxs(tRe,{nodes:n,edges:o.map(u=>({...u,style:{...u.style,stroke:a[u.data?.previousStepId]?.status==="success"&&a[u.data?.nextStepId]||u.data?.conditionNode&&!a[u.data?.previousStepId]&&a[u.data?.nextStepId]?.status?"#22c55e":void 0}})),nodeTypes:c,onNodesChange:i,fitView:!0,fitViewOptions:{maxZoom:1},minZoom:.01,maxZoom:1,children:[f.jsx(yte,{position:"bottom-left"}),f.jsx(iRe,{variant:zf.Dots,gap:12,size:.5})]})})}function JZe({workflowId:e,workflow:t,isLoading:r}){const{snapshot:n}=E.useContext(kp);return r?f.jsx("div",{className:"p-4",children:f.jsx(fr,{className:"h-full"})}):t?f.jsx(MY,{children:f.jsx(IPr,{workflow:n?.serializedStepGraph?{stepGraph:n?.serializedStepGraph}:t})}):f.jsx("div",{className:"grid h-full place-items-center",children:f.jsxs("div",{className:"flex flex-col items-center gap-2",children:[f.jsx(Hx,{}),f.jsxs("div",{children:["We couldn't find ",X2r(e)," workflow."]})]})})}const NPr=({header:e,children:t,footer:r})=>{const[n,s]=E.useState(!1);return f.jsxs("div",{className:"rounded-lg border border-border1 bg-surface4",children:[f.jsxs("button",{className:"py-1 px-2 flex items-center gap-3 justify-between w-full",onClick:()=>s(i=>!i),children:[f.jsx("div",{className:"w-full",children:e}),f.jsx(qe,{children:f.jsx(Vd,{className:re("text-neutral3 transition-transform -rotate-90",n&&"rotate-0")})})]}),t&&n&&f.jsx("div",{className:"border-t border-border1 max-h-[400px] overflow-y-auto",children:t}),r&&f.jsx("div",{className:"py-1 px-2 border-t border-border1",children:r})]})},RPr=({stepId:e,status:t,result:r,tripwire:n})=>{const[s,i]=E.useState(!1),o=t==="tripwire",a=!!(n&&(n.retry!==void 0||n.metadata!==void 0||n.processorId!==void 0));return f.jsx(NPr,{header:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsxs(qe,{children:[t==="success"&&f.jsx(lte,{className:"text-accent1"}),t==="failed"&&f.jsx(cte,{className:"text-accent2"}),t==="tripwire"&&f.jsx(LT,{className:"text-amber-400"}),t==="suspended"&&f.jsx(rTe,{className:"text-accent3"}),t==="waiting"&&f.jsx(iG,{className:"text-accent5"}),t==="running"&&f.jsx(Mf,{className:"text-accent6 animate-spin"})]}),f.jsx(Ze,{as:"span",variant:"ui-lg",className:"text-neutral6 font-medium",children:e.charAt(0).toUpperCase()+e.slice(1)})]}),children:o&&n?f.jsx(MPr,{tripwire:n,isExpanded:s,onToggleExpand:()=>i(!s),hasMetadata:a}):f.jsx(Kc,{data:r})})},MPr=({tripwire:e,isExpanded:t,onToggleExpand:r,hasMetadata:n})=>f.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-950/20 overflow-hidden",children:[f.jsxs("div",{className:"flex items-start gap-3 p-4",children:[f.jsx(LT,{className:"w-5 h-5 text-amber-400 mt-0.5 flex-shrink-0"}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsx("p",{className:"text-sm font-medium text-amber-200 mb-1",children:"Content Blocked"}),f.jsx("p",{className:"text-sm text-amber-300/90",children:e.reason||"Tripwire triggered"})]})]}),n&&f.jsxs(f.Fragment,{children:[f.jsxs("button",{onClick:r,className:"w-full flex items-center gap-2 px-4 py-2 text-xs text-amber-400/70 hover:text-amber-400 hover:bg-amber-900/20 transition-colors border-t border-amber-500/20",children:[t?f.jsx(Vd,{className:"w-3.5 h-3.5"}):f.jsx(qN,{className:"w-3.5 h-3.5"}),f.jsx("span",{children:"Details"})]}),t&&f.jsxs("div",{className:"px-4 pb-4 space-y-3 border-t border-amber-500/20 bg-amber-950/10",children:[e.retry!==void 0&&f.jsxs("div",{className:"flex items-center gap-2 pt-3",children:[f.jsx(WN,{className:"w-3.5 h-3.5 text-amber-400/60"}),f.jsxs("span",{className:"text-xs text-amber-300/70",children:["Retry:"," ",e.retry?f.jsx("span",{className:"text-green-400",children:"Allowed"}):f.jsx("span",{className:"text-red-400",children:"Not allowed"})]})]}),e.processorId&&f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(hTe,{className:"w-3.5 h-3.5 text-amber-400/60"}),f.jsxs("span",{className:"text-xs text-amber-300/70",children:["Processor:"," ",f.jsx("code",{className:"px-1.5 py-0.5 rounded bg-amber-900/30 text-amber-200 font-mono",children:e.processorId})]})]}),e.metadata!==void 0&&e.metadata!==null&&f.jsxs("div",{className:"pt-1",children:[f.jsx("p",{className:"text-xs text-amber-400/60 mb-1.5",children:"Metadata:"}),f.jsx("pre",{className:"text-xs text-amber-200/80 bg-amber-900/30 rounded p-2 overflow-x-auto font-mono",children:String(JSON.stringify(e.metadata,null,2))})]})]})]})]}),jPr=e=>e&&Object.keys(e).length===0&&e.constructor===Object;function KZe({workflowId:e,paramsRunId:t,setRunId:r,workflow:n,isLoading:s,createWorkflowRun:i,resumeWorkflow:o,streamWorkflow:a,observeWorkflowStream:l,isStreamingWorkflow:c,streamResult:u,isCancellingWorkflowRun:d,cancelWorkflowRun:p}){const{requestContext:m}=Qn(),{result:g,setResult:v,payload:b,setPayload:w,setRunId:S}=E.useContext(kp),[O,k]=E.useState(!1),[C,T]=E.useState(""),[P,A]=E.useState(null),R=n?.inputSchema,M=n?.stateSchema,z=async F=>{try{if(!n)return;k(!0),A(null),v(null);const W=await i({workflowId:e});r?.(W.runId),T(W.runId),S(W.runId);const{initialState:K,inputData:se}=F??{},X=M?se:F;a({workflowId:e,runId:W.runId,inputData:X,initialState:K,requestContext:m})}catch{k(!1),mn.error("Error executing workflow")}},Q=async F=>{if(!n)return;A(null);const{stepId:W,runId:K,resumeData:se}=F,X=await i({workflowId:e,prevRunId:K});await o({step:W,runId:X.runId,resumeData:se,workflowId:e,requestContext:m})},U=async()=>{const F=await p({workflowId:e,runId:C});A(F)},L=g??u,V=Object.entries(L?.steps||{}).filter(([F,{status:W}])=>W==="suspended").map(([F,{suspendPayload:W}])=>({stepId:F,runId:C,suspendPayload:W,isLoading:!1}));if(E.useEffect(()=>{t&&l&&(l({workflowId:e,runId:t}),T(t),S(t))},[t]),E.useEffect(()=>{k(c)},[c]),E.useEffect(()=>{u&&v(u)},[u]),s)return f.jsx(BD,{className:"h-[calc(100vh-126px)] pt-2 px-4 pb-4 text-xs",children:f.jsxs("div",{className:"space-y-4",children:[f.jsx(fr,{className:"h-10"}),f.jsx(fr,{className:"h-10"})]})});if(!n)return null;const j=V.length>0,N=R?Tg(kg(Mv(R))):null,I=M?Tg(kg(Mv(M))):null,H=I?Uw({inputData:N,initialState:I.optional()}):N,B=L?.steps??{},J=Object.values(B).length>0,Z=["success","failed","canceled","tripwire"];return f.jsxs("div",{className:"h-full pt-3 overflow-y-auto",children:[f.jsxs("div",{className:"space-y-4 px-5 pb-5 border-b border-border1",children:[j&&c&&f.jsxs("div",{className:"py-2 px-5 flex items-center gap-2 bg-surface5 -mx-5 -mt-5 border-b border-border1",children:[f.jsx(qe,{children:f.jsx(Mf,{className:"animate-spin text-neutral6"})}),f.jsx(Ze,{children:"Resuming workflow"})]}),!j&&f.jsx(f.Fragment,{children:H?f.jsx(rq,{schema:H,defaultValues:b,isSubmitLoading:c,submitButtonLabel:"Run",onSubmit:F=>{w(F),z(F)},withoutSubmit:!!t,isProcessorWorkflow:n?.isProcessorWorkflow}):t?null:f.jsx(Je,{className:"w-full",variant:"light",disabled:O,onClick:()=>z(null),children:O?f.jsx(qe,{children:f.jsx(Mf,{className:"animate-spin"})}):"Trigger"})}),!c&&j&&V?.map(F=>{const W=n.allSteps[F.stepId];if(!W||W.isWorkflow)return null;const K=W?.resumeSchema?Tg(kg(Mv(W.resumeSchema))):Qk(b1(),OI());return f.jsxs("div",{className:"flex flex-col px-4",children:[f.jsx(Ze,{variant:"ui-xs",className:"text-neutral3",children:F.stepId}),F.suspendPayload&&f.jsx("div",{"data-testid":"suspended-payload",children:f.jsx(Kc,{data:F.suspendPayload,className:"w-full overflow-x-auto p-2",showCopyButton:!1})}),f.jsx(rq,{schema:K,isSubmitLoading:c,submitButtonLabel:"Resume workflow",onSubmit:se=>{const X=F.stepId?.split(".");Q({stepId:X,runId:F.runId,suspendPayload:F.suspendPayload,resumeData:se})}})]},F.stepId)}),g?.status==="running"&&f.jsxs(Je,{variant:"light",className:"w-full",onClick:U,disabled:!!P?.message||d||g?.status&&Z.includes(g?.status),children:[d?f.jsx(qe,{children:f.jsx(Mf,{className:"animate-spin"})}):f.jsx(qe,{children:f.jsx(nTe,{})}),P?.message||"Cancel Workflow Run"]}),J&&f.jsx(f.Fragment,{children:f.jsxs("div",{className:"flex flex-col gap-2 pt-5 border-t border-border1",children:[f.jsx(Ze,{variant:"ui-xs",className:"text-neutral3",children:"Status"}),f.jsx("div",{className:"flex flex-col gap-4",children:Object.entries(B).filter(([F,W])=>F!=="input"&&!F.endsWith(".input")).map(([F,W])=>{const{status:K}=W;let se,X,te;W.status==="suspended"&&(X=W.suspendOutput),W.status==="success"&&(se=W.output),W.status==="failed"&&(te=W.error);const de=W.status==="failed"&&W.tripwire?W.tripwire:L?.status==="tripwire"?{reason:L?.tripwire?.reason,retry:L?.tripwire?.retry,metadata:L?.tripwire?.metadata,processorId:L?.tripwire?.processorId}:void 0,ue=W.status==="failed"&&W.tripwire?"tripwire":K;return f.jsx(RPr,{stepId:F,status:ue,result:se??X??te??{},tripwire:de},F)})})]})})]}),g&&!jPr(g)&&f.jsx("div",{className:"p-5 border-b border-border1",children:f.jsx(FPr,{result:g})})]})}const FPr=({result:e})=>{const[t,r]=E.useState(!1);return f.jsxs(f.Fragment,{children:[f.jsxs(Je,{variant:"light",onClick:()=>r(!0),className:"w-full",children:[f.jsx(qe,{children:f.jsx(qv,{className:"text-neutral3"})}),"Open Workflow Execution (JSON)"]}),f.jsx(qo,{open:t,onOpenChange:r,children:f.jsxs(So,{className:"max-w-6xl",children:[f.jsxs(Oo,{children:[f.jsx(ko,{children:"Workflow Execution (JSON)"}),f.jsx(Eo,{children:"JSON view of the workflow execution result"})]}),f.jsx(_o,{className:"max-h-[90vh]",children:f.jsx(Kc,{data:e,className:"p-4"})})]})})]})},LPr=({workflowId:e,runId:t,observeWorkflowStream:r,...n})=>{const{runSnapshot:s,isLoadingRunExecutionResult:i}=E.useContext(kp);if(i)return f.jsx("div",{className:"p-4",children:f.jsx(fr,{className:"h-[600px]"})});if(!s||!t)return f.jsx("div",{className:"p-4",children:f.jsx(Ze,{variant:"ui-md",className:"text-neutral6 text-center",children:"No previous run"})});const o=JZ(s),a=o?.status;if(t)return f.jsx("div",{className:"h-full grid grid-rows-[1fr_auto]",children:f.jsx(KZe,{...n,paramsRunId:t,workflowId:e,observeWorkflowStream:()=>{a!=="success"&&a!=="failed"&&a!=="canceled"&&r?.({workflowId:e,runId:t,storeRunResult:o})}})})};function TS({iconSlot:e,titleSlot:t,descriptionSlot:r,actionSlot:n,className:s,as:i="h3"}){return f.jsxs("div",{className:re("flex flex-col items-center justify-center text-center py-10 px-6","transition-opacity duration-normal ease-out-custom",s),children:[e&&f.jsx("div",{className:"mb-4",children:e}),f.jsx(i,{className:"font-medium text-neutral5 text-ui-md",children:t}),r&&f.jsx("p",{className:"mt-1.5 text-neutral3 text-ui-sm max-w-md",children:r}),n&&f.jsx("div",{className:"mt-5",children:n})]})}const zPr={default:"[&>tbody>tr]:h-table-row",small:"[&>tbody>tr]:h-table-row-small"},Du=({className:e,children:t,size:r="default",style:n})=>f.jsx("table",{className:re("w-full",zPr[r],e),style:n,children:t}),Au=({className:e,children:t})=>f.jsx("thead",{children:f.jsx("tr",{className:re("h-table-header border-b border-border1 bg-surface2/80",e),children:t})}),Fi=({className:e,children:t,...r})=>f.jsx("th",{className:re("text-neutral2 text-ui-xs h-full whitespace-nowrap text-left font-medium uppercase tracking-wide first:pl-3 last:pr-3",e),...r,children:t}),Pu=({className:e,children:t})=>f.jsx("tbody",{className:re("",e),children:t}),$u=E.forwardRef(({className:e,children:t,selected:r=!1,style:n,onClick:s,...i},o)=>{const a=l=>{l.key==="Enter"&&s&&s()};return f.jsx("tr",{className:re("border-b border-border1","transition-colors duration-normal ease-out-custom","hover:bg-surface3","focus:bg-surface3 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-accent1/50",r&&"bg-surface4",s&&"cursor-pointer",e),style:n,onClick:s,ref:o,tabIndex:s?0:void 0,onKeyDown:a,...i,children:t})}),Ks=({className:e,children:t,...r})=>f.jsx("td",{className:re("text-neutral5 first:pl-3 last:pr-3",e),...r,children:f.jsx("div",{className:re("flex h-full w-full shrink-0 items-center"),children:t})}),DS=({name:e,description:t,icon:r,meta:n,...s})=>f.jsx(Ks,{...s,children:f.jsxs("div",{className:"flex items-center gap-3.5",children:[r&&f.jsx(qe,{size:"lg",className:"text-neutral5",children:r}),f.jsxs("div",{className:"flex flex-col gap-0",children:[f.jsx(Ze,{as:"span",variant:"ui-md",className:"text-neutral6 !leading-tight",children:e}),t&&f.jsx(Ze,{as:"span",variant:"ui-xs",className:"text-neutral3 w-full max-w-[300px] truncate !leading-tight pt-1",children:t})]}),n]})}),Exe=40,r$=150,Cxe=10,AS=({className:e,children:t,scrollSpeed:r=100,scrollIntervalTime:n=20})=>{const s=E.useRef(null),i=E.useRef(null),[o,a]=E.useState(0),[l,c]=E.useState(0),[u,d]=E.useState(0),[p,m]=E.useState(0),[g,v]=E.useState(!1),[b,w]=E.useState(!1);E.useEffect(()=>{const C=()=>{if(!s.current)return;const R=s.current.scrollLeft<s.current.scrollWidth-s.current.clientWidth;v(R),a(s.current.clientHeight);const M=s.current.getBoundingClientRect();c(M.right),m(M.left),d(M.top)};C();const T=new ResizeObserver(C);s.current&&T.observe(s.current);const P=()=>{if(!s.current)return;const R=s.current.scrollLeft>0,M=s.current.scrollLeft<s.current.scrollWidth-s.current.clientWidth;w(R),v(M),C()};s?.current?.addEventListener("scroll",P);const A=s.current;return()=>{A&&(T.unobserve(A),A.removeEventListener("scroll",P))}},[]);const S=({isVisible:C,position:T,containerHeight:P,containerTop:A,containerRight:R,onStartScrolling:M,onStopScrolling:z})=>{if(!C)return null;const Q={top:P<r$?A:A+(P-r$)/2,width:Exe,height:P<r$?`${P}px`:`${r$}px`};return f.jsxs("button",{onMouseDown:M,onTouchStart:M,onMouseUp:z,onTouchEnd:z,onTouchCancel:z,className:"bg-surface4 text-neutral3 border-surface5 hover:border-neutral3 fixed z-10 flex items-center justify-center rounded-lg border text-2xl hover:text-white",style:{...Q,left:T==="left"?p+Cxe:R-Exe-Cxe},children:[" ",T==="left"?"«":"»"]})},O=E.useCallback((C,T)=>{T?.preventDefault(),T?.stopPropagation(),i.current&&(clearInterval(i.current),i.current=null),s.current&&s.current.scrollBy({left:C==="right"?r*2:-r*2,behavior:"smooth"}),i.current=setInterval(()=>{s.current&&s.current.scrollBy({left:C==="right"?r:-r,behavior:"smooth"})},n)},[r,n]),k=E.useCallback(()=>{i.current&&(clearInterval(i.current),i.current=null)},[]);return f.jsxs("div",{ref:s,className:re("relative max-h-full overflow-auto",e),children:[t,f.jsx(S,{isVisible:b,position:"left",containerHeight:o,containerTop:u,containerRight:l,onStartScrolling:C=>O("left",C),onStopScrolling:k}),f.jsx(S,{isVisible:g,position:"right",containerHeight:o,containerTop:u,containerRight:l,onStartScrolling:C=>O("right",C),onStopScrolling:k})]})},eqe=E.createContext({Link:E.forwardRef(()=>null),navigate:()=>{},paths:{agentLink:()=>"",agentsLink:()=>"",agentToolLink:()=>"",agentThreadLink:()=>"",agentNewThreadLink:()=>"",workflowsLink:()=>"",workflowLink:()=>"",networkLink:()=>"",networkNewThreadLink:()=>"",networkThreadLink:()=>"",scorerLink:()=>"",toolLink:()=>"",processorsLink:()=>"",processorLink:()=>"",mcpServerLink:()=>"",mcpServerToolLink:()=>"",workflowRunLink:()=>""}}),BPr=({children:e,Link:t,navigate:r,paths:n})=>f.jsx(eqe.Provider,{value:{Link:t,navigate:r,paths:n},children:e}),Lr=()=>{const e=E.useContext(eqe);if(!e)throw new Error("useLinkComponent must be used within a LinkComponentProvider");return e},VPr=[{id:"name",header:"Name",cell:({row:e})=>{const{Link:t,paths:r}=Lr(),n=e.original;return f.jsx(DS,{name:f.jsx(t,{href:r.workflowLink(e.original.id),children:e.original.name}),description:n.description,meta:void 0})},meta:{width:"auto"}},{id:"stepsCount",header:"Steps",size:300,cell:({row:e})=>{const t=e.original,r=Object.keys(t.steps??{}).length;return f.jsx(Ks,{children:f.jsx("div",{className:"flex justify-end items-center gap-2",children:f.jsxs(Xt,{icon:f.jsx(lTe,{}),className:"!h-form-sm",children:[r," step",r>1?"s":""]})})})}}],Txe={sm:Ta.sm,md:Ta.md,lg:Ta.lg},PS=({onSearch:e,label:t,placeholder:r,debounceMs:n=300,size:s="md"})=>{const i=E.useId(),o=E.useRef(null),a=aJ(c=>{e(c)},n);E.useEffect(()=>()=>{a.cancel()},[a]),E.useEffect(()=>{const c=o.current;if(!c)return;const u=d=>{d.key.toLowerCase()==="f"&&d.shiftKey&&(d.ctrlKey||d.metaKey)&&(d.preventDefault(),c.focus())};return window.addEventListener("keydown",u),()=>{window.removeEventListener("keydown",u)}},[]);const l=c=>{a(c.target.value)};return f.jsxs("div",{className:re("border border-border1 flex w-full items-center gap-2 overflow-hidden pl-2 pr-1",MD,c2r,kr.all,"hover:border-neutral2",Txe[s]),children:[f.jsx(aG,{className:re("text-neutral3 h-4 w-4",kr.colors)}),f.jsxs("div",{className:"flex-1",children:[f.jsx("label",{htmlFor:i,className:"sr-only",children:t}),f.jsx("input",{id:i,type:"text",placeholder:r,className:re("bg-transparent text-ui-md placeholder:text-neutral3 block w-full px-2 outline-none",Txe[s]),name:i,ref:o,onChange:l})]})]})},$S=({children:e})=>f.jsx("div",{className:"px-3 py-2.5 border-b border-border1",children:e});function UPr({workflows:e,isLoading:t}){const[r,n]=E.useState(""),{navigate:s,paths:i}=Lr(),o=E.useMemo(()=>Object.keys(e??{}).map(p=>{const m=e[p];return{id:p,...m}}),[e]),a=bS({data:o,columns:VPr,getCoreRowModel:vS()}),l=a.getHeaderGroups()[0],c=a.getRowModel().rows.concat();if(c.length===0&&!t)return f.jsx(ZPr,{});const u=c.filter(d=>d.original.name.toLowerCase().includes(r.toLowerCase()));return f.jsxs("div",{children:[f.jsx($S,{children:f.jsx(PS,{onSearch:n,label:"Search workflows",placeholder:"Search workflows"})}),t?f.jsx(QPr,{}):f.jsx(AS,{children:f.jsxs(Du,{children:[f.jsx(Au,{className:"sticky top-0",children:l.headers.map(d=>f.jsx(Fi,{style:{width:d.index===0?"auto":d.column.getSize()},children:yu(d.column.columnDef.header,d.getContext())},d.id))}),f.jsx(Pu,{children:u.map(d=>f.jsx($u,{onClick:()=>s(i.workflowLink(d.original.id)),children:d.getVisibleCells().map(p=>f.jsx(me.Fragment,{children:yu(p.column.columnDef.cell,p.getContext())},p.id))},d.id))})]})})]})}const QPr=()=>f.jsxs(Du,{children:[f.jsxs(Au,{children:[f.jsx(Fi,{children:"Name"}),f.jsx(Fi,{width:300,children:"Steps"})]}),f.jsx(Pu,{children:Array.from({length:3}).map((e,t)=>f.jsxs($u,{children:[f.jsx(Ks,{children:f.jsx(fr,{className:"h-4 w-1/2"})}),f.jsx(Ks,{width:300,children:f.jsx(fr,{className:"h-4 w-1/2"})})]},t))})]}),ZPr=()=>f.jsx("div",{className:"flex h-full items-center justify-center",children:f.jsx(TS,{iconSlot:f.jsx(C2r,{}),titleSlot:"Configure Workflows",descriptionSlot:"Mastra workflows are not configured yet. You can find more information in the documentation.",actionSlot:f.jsxs(Je,{size:"lg",className:"w-full",variant:"light",as:"a",href:"https://mastra.ai/en/docs/workflows/overview",target:"_blank",children:[f.jsx(qe,{children:f.jsx(Tu,{})}),"Docs"]})})}),tqe=({icon:e,title:t,isLoading:r,children:n})=>f.jsxs("div",{className:"p-5 w-full overflow-x-hidden",children:[f.jsxs("div",{className:"text-neutral6 flex items-center gap-2",children:[f.jsx(qe,{size:"lg",className:"bg-surface4 rounded-md p-1",children:e}),r?f.jsx(fr,{className:"h-3 w-1/3"}):f.jsx("div",{className:"flex min-w-0 items-center gap-4",children:f.jsx(Ze,{variant:"header-md",as:"h2",className:"truncate font-medium",children:t})})]}),n&&f.jsx("div",{className:"pt-2",children:n})]}),vte=({children:e,defaultTab:t,value:r,onValueChange:n,className:s})=>{const[i,o]=E.useState(t),a=r!==void 0&&n!==void 0,l=a?r:i,c=u=>{const d=u;a?n(d):o(d)};return f.jsx(sgr,{value:l,onValueChange:c,className:re("overflow-y-auto",s),children:e})},bte=({children:e,variant:t="default",className:r})=>f.jsx("div",{className:re("w-full overflow-x-auto",r),children:f.jsx(igr,{className:re("flex items-center relative",{"text-ui-lg":t==="default","[&>button]:py-2 [&>button]:px-6 [&>button]:font-normal [&>button]:text-neutral3 [&>button]:flex-1 [&>button]:border-b [&>button]:border-border1":t==="default",[`[&>button]:${kr.colors} [&>button]:hover:text-neutral4`]:t==="default","[&>button[data-state=active]]:text-neutral5 [&>button[data-state=active]]:border-accent1":t==="default","border border-border1 flex justify-stretch rounded-md overflow-hidden text-ui-md min-h-[2.5rem]":t==="buttons",[`[&>button]:flex-1 [&>button]:py-2 [&>button]:px-4 [&>button]:text-neutral3 [&>button]:${kr.all}`]:t==="buttons","[&>button]:hover:text-neutral4 [&>button]:hover:bg-surface3":t==="buttons","[&>button[data-state=active]]:text-neutral5 [&>button[data-state=active]]:bg-surface4 [&>button[data-state=active]]:shadow-inner":t==="buttons"},r),children:e})}),kh=({children:e,value:t,onClick:r,onClose:n,className:s})=>f.jsxs(ogr,{value:t,className:re("text-xs p-3 text-neutral3 whitespace-nowrap flex-shrink-0 flex items-center justify-center gap-1.5",kr.all,jD.visible,"hover:text-neutral4","data-[state=active]:text-neutral5 data-[state=active]:border-b-2 data-[state=active]:border-accent1",s),onClick:r,children:[e,n&&f.jsx("button",{onClick:i=>{i.stopPropagation(),n()},className:re("p-0.5 hover:bg-surface4 rounded",kr.colors,"hover:text-neutral5"),"aria-label":"Close tab",children:f.jsx(Ia,{className:"w-3 h-3"})})]}),Eh=({children:e,value:t,className:r})=>f.jsx(agr,{value:t,className:re("grid py-3 overflow-y-auto ring-offset-background",jD.visible,"data-[state=active]:animate-in data-[state=active]:fade-in-0 data-[state=active]:duration-200","data-[state=inactive]:animate-out data-[state=inactive]:fade-out-0 data-[state=inactive]:duration-150",r),children:e}),qPr=()=>{const{debugMode:e,setDebugMode:t}=E.useContext(kp);return f.jsxs(f.Fragment,{children:[f.jsx(Ze,{as:"h3",variant:"ui-md",className:"text-neutral3",children:"Debug Mode"}),f.jsx(eR,{checked:e,onCheckedChange:r=>t(r)})]})},rqe=()=>{const e=wy(),{settings:t,setSettings:r,entityType:n}=pte(),s=o=>{if(!o)return r({...t,tracingOptions:void 0});try{const a=JSON.parse(o);typeof a=="object"&&a!==null&&r({...t,tracingOptions:a})}catch{}};let i="{}";try{i=JSON.stringify(t?.tracingOptions,null,2)}catch{}return f.jsxs("div",{className:"space-y-2 px-5 py-2",children:[f.jsx(Ze,{as:"h3",variant:"ui-md",className:"text-neutral3",children:"Tracing Options"}),f.jsx(fc,{value:i,onChange:s,theme:e,extensions:[oc],className:"h-[400px] overflow-y-scroll bg-surface3 rounded-lg overflow-hidden p-3"}),n==="workflow"&&f.jsx(qPr,{})]})},HPr={sm:"w-4 h-4",md:"w-6 h-6",lg:"w-8 h-8"};function ea({color:e,className:t,size:r="md"}){return f.jsx("svg",{className:re("animate-spin",HPr[r],t),style:{animationDuration:"800ms",animationTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)"},xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:f.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56",stroke:e||"currentColor",className:"text-accent1"})})}function WPr({stepGraph:e,open:t,workflowName:r}){const{nodes:n,edges:s}=FZe({stepGraph:e}),[i,o]=E.useState(!1),[a,l,c]=rRe(n),[u]=nRe(s),{steps:d}=VD(),p=E.useMemo(()=>s.reduce((g,v)=>{if(v.data){const b=v.data.nextStepId,w=v.data.previousStepId;return{...g,[b]:[...new Set([...g[b]||[],w])]}}return g},{}),[s]),m={"default-node":g=>f.jsx(WZe,{parentWorkflowName:r,...g,stepsFlow:p}),"condition-node":qZe,"after-node":GZe,"loop-result-node":XZe,"nested-node":g=>f.jsx(YZe,{parentWorkflowName:r,...g,stepsFlow:p})};return E.useEffect(()=>{t&&setTimeout(()=>{o(!0)},500)},[t]),f.jsx("div",{className:"w-full h-full relative bg-surface1",children:i?f.jsxs(tRe,{nodes:a,edges:u.map(g=>({...g,style:{...g.style,stroke:d[`${r}.${g.data?.previousStepId}`]?.status==="success"&&d[`${r}.${g.data?.nextStepId}`]||g.data?.conditionNode&&!d[`${r}.${g.data?.previousStepId}`]&&d[`${r}.${g.data?.nextStepId}`]?.status?"#22c55e":void 0}})),fitView:!0,fitViewOptions:{maxZoom:1},minZoom:.01,maxZoom:1,nodeTypes:m,onNodesChange:c,children:[f.jsx(yte,{position:"bottom-left"}),f.jsx(iRe,{variant:zf.Lines,gap:12,size:.5})]}):f.jsx("div",{className:"w-full h-full flex items-center justify-center",children:f.jsx(ea,{})})})}function GPr(){const{stepDetail:e,closeStepDetail:t}=J6();return e?f.jsxs("div",{className:"flex flex-col h-full",children:[f.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border1 bg-surface1",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[e.type==="map-config"&&f.jsx(UB,{className:"w-4 h-4",style:{color:xi.map}}),e.type==="nested-graph"&&f.jsx(Tu,{className:"w-4 h-4",style:{color:xi.workflow}}),f.jsxs("div",{className:"flex flex-col",children:[f.jsx(Ze,{variant:"ui-md",className:"text-neutral6 font-medium",children:e.type==="map-config"?`${e.stepName} Config`:`${e.stepName} Workflow`}),e.type==="map-config"&&e.stepId&&e.stepId!==e.stepName&&f.jsx(Ze,{variant:"ui-xs",className:"text-neutral3",children:e.stepId})]})]}),f.jsx("button",{onClick:t,className:"p-1 hover:bg-surface3 rounded transition-colors","aria-label":"Close",children:f.jsx(Ia,{className:"w-4 h-4 text-neutral3"})})]}),f.jsxs("div",{className:"flex-1 overflow-auto",children:[e.type==="map-config"&&e.mapConfig&&f.jsx(Ox,{data:e.mapConfig}),e.type==="nested-graph"&&e.nestedGraph&&f.jsx("div",{className:"h-full min-h-[400px]",children:f.jsx(MY,{children:f.jsx(WPr,{stepGraph:e.nestedGraph.stepGraph,open:!0,workflowName:e.nestedGraph.fullStep})},e.nestedGraph.fullStep)})]})]}):null}function XPr({workflowId:e,initialRunId:t}){const{data:r,isLoading:n,error:s}=FD(e),{createWorkflowRun:i,streamWorkflow:o,streamResult:a,isStreamingWorkflow:l,observeWorkflowStream:c,closeStreamsAndReset:u,resumeWorkflow:d,cancelWorkflowRun:p,isCancellingWorkflowRun:m}=E.useContext(kp),{stepDetail:g,closeStepDetail:v}=J6(),[b,w]=E.useState("current-run"),[S,O]=E.useState(""),{handleCopy:k}=np({text:e}),C=Object.keys(r?.steps??{}).length,T=E.useMemo(()=>g?g.type==="map-config"?"Map Config":g.type==="nested-graph"?"Nested Workflow":"Node":null,[g]);E.useEffect(()=>{!S&&!t&&u()},[S,t]),E.useEffect(()=>{if(s){const A=s instanceof Error?s.message:"Failed to load workflow";Js.error(`Error loading workflow: ${A}`)}},[s]),E.useEffect(()=>{g?w("node-details"):b==="node-details"&&w("current-run")},[g]);const P=A=>{b==="node-details"&&A!=="node-details"&&v(),w(A)};return s?null:f.jsxs("div",{className:"grid grid-rows-[auto_1fr] h-full overflow-y-auto",children:[f.jsx(tqe,{icon:f.jsx(Tu,{}),title:r?.name||"",isLoading:n,children:f.jsxs("div",{className:"flex items-center gap-2 pt-2",children:[f.jsxs(Ss,{children:[f.jsx(Os,{asChild:!0,children:f.jsx("button",{onClick:k,className:"h-badge-default",children:f.jsx(Xt,{icon:f.jsx(cu,{}),variant:"default",children:e})})}),f.jsx(is,{children:"Copy Workflow ID for use in code"})]}),f.jsxs(Xt,{children:[C," step",C>1?"s":""]}),r?.isProcessorWorkflow&&f.jsx(Xt,{icon:f.jsx(BB,{className:"h-3 w-3"}),className:"bg-violet-500/20 text-violet-400",children:"Processor"})]})}),f.jsx("div",{className:"flex-1 overflow-auto border-t border-border1 flex flex-col",children:f.jsxs(vte,{defaultTab:"current-run",value:b,onValueChange:P,className:"h-full",children:[f.jsxs(bte,{children:[f.jsx(kh,{value:"current-run",children:"Current Run"}),f.jsx(kh,{value:"run-options",children:"Run Options"}),g&&T&&f.jsxs(kh,{value:"node-details",onClose:()=>{v(),w("current-run")},children:[T," Details"]})]}),f.jsx(Eh,{value:"current-run",children:e?t?f.jsx(LPr,{workflowId:e,runId:t,setRunId:O,workflow:r??void 0,isLoading:n,createWorkflowRun:i,streamWorkflow:o,resumeWorkflow:d,streamResult:a,isStreamingWorkflow:l,isCancellingWorkflowRun:m,cancelWorkflowRun:p,observeWorkflowStream:c}):f.jsx(KZe,{workflowId:e,setRunId:O,workflow:r??void 0,isLoading:n,createWorkflowRun:i,streamWorkflow:o,resumeWorkflow:d,streamResult:a,isStreamingWorkflow:l,isCancellingWorkflowRun:m,cancelWorkflowRun:p}):null}),f.jsx(Eh,{value:"run-options",children:f.jsx(rqe,{})}),g&&f.jsx(Eh,{value:"node-details",children:f.jsx(GPr,{})})]})})]})}function UD({options:e,value:t,onValueChange:r,placeholder:n="Select option...",searchPlaceholder:s="Search...",emptyText:i="No option found.",className:o,disabled:a=!1,variant:l="default",size:c="md"}){const[u,d]=E.useState(!1),[p,m]=E.useState(""),[g,v]=E.useState(0),b=E.useRef(null),[w,S]=E.useState(void 0),O=E.useRef(null),k=E.useRef(null),C=e.find(R=>R.value===t),T=R=>{r?.(R),d(!1),m(""),v(0)};E.useEffect(()=>{b.current&&S(b.current.offsetWidth)},[u]),E.useEffect(()=>{u&&O.current&&O.current.focus()},[u]);const P=E.useMemo(()=>p?e.filter(R=>R.label.toLowerCase().includes(p.toLowerCase())):e,[e,p]);E.useEffect(()=>{v(0)},[P]);const A=R=>{if(u)switch(R.key){case"ArrowDown":R.preventDefault(),v(M=>M<P.length-1?M+1:M);break;case"ArrowUp":R.preventDefault(),v(M=>M>0?M-1:M);break;case"Enter":R.preventDefault(),P[g]&&T(P[g].value);break;case"Escape":R.preventDefault(),d(!1),m("");break;case"Home":R.preventDefault(),v(0);break;case"End":R.preventDefault(),v(P.length-1);break}};return E.useEffect(()=>{if(k.current&&g>=0){const R=k.current.children[g];R&&R.scrollIntoView({block:"nearest"})}},[g]),f.jsxs(oT,{open:u,onOpenChange:d,children:[f.jsx(aT,{asChild:!0,children:f.jsxs(Je,{ref:b,role:"combobox","aria-expanded":u,variant:l,size:c,className:re("w-full justify-between",o),disabled:a,children:[f.jsx("span",{className:"truncate",children:C?C.label:n}),f.jsx(dut,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),f.jsx(kw,{className:"p-0 w-fit",align:"start",children:f.jsxs("div",{className:re("flex h-full w-full flex-col overflow-hidden rounded-md bg-surface3 text-neutral5","shadow-elevated","animate-in fade-in-0 zoom-in-95 duration-150"),children:[f.jsxs("div",{className:re("flex items-center border-b border-border1 px-3 py-2",kr.colors),children:[f.jsx(aG,{className:re("mr-2 h-4 w-4 shrink-0 text-neutral3",kr.colors)}),f.jsx("input",{ref:O,className:re("flex h-8 w-full rounded-md bg-transparent py-1 text-sm","placeholder:text-neutral3 disabled:cursor-not-allowed disabled:opacity-50","outline-none",kr.colors),placeholder:s,value:p,onChange:R=>m(R.target.value),onKeyDown:A,role:"combobox","aria-autocomplete":"list","aria-controls":"combobox-options","aria-expanded":u})]}),f.jsx("div",{ref:k,id:"combobox-options",role:"listbox",className:"max-h-dropdown-max-height overflow-y-auto overflow-x-hidden p-1",children:P.length===0?f.jsx("div",{className:"py-6 text-center text-sm text-neutral3",children:i}):P.map((R,M)=>{const z=t===R.value,Q=M===g;return f.jsxs("div",{role:"option","aria-selected":z,className:re("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm",kr.colors,"hover:bg-surface5 hover:text-neutral5",Q&&"bg-surface5 text-neutral5",z&&!Q&&"bg-accent1Dark text-accent1"),onClick:()=>T(R.value),onMouseEnter:()=>v(M),children:[f.jsx(lu,{className:re("mr-2 h-4 w-4",kr.opacity,z?"opacity-100 text-accent1":"opacity-0")}),R.label]},R.value)})})]})})]})}function YPr({value:e,onValueChange:t,placeholder:r="Select a workflow...",searchPlaceholder:n="Search workflows...",emptyText:s="No workflows found.",className:i,disabled:o=!1}){const{data:a={},isLoading:l,isError:c,error:u}=Y6(),{navigate:d,paths:p}=Lr();E.useEffect(()=>{if(c){const v=u instanceof Error?u.message:"Failed to load workflows";Js.error(`Error loading workflows: ${v}`)}},[c,u]);const m=Object.keys(a).map(v=>({label:a[v]?.name||v,value:v})),g=v=>{t?t(v):v&&v!==e&&d(p.workflowLink(v))};return f.jsx(UD,{options:m,value:e,onValueChange:g,placeholder:l?"Loading workflows...":r,searchPlaceholder:n,emptyText:s,className:i,disabled:o||l||c})}function lo({children:e,className:t,style:r}){const n=nqe("MainContentLayout");return f.jsx("main",{className:re("grid grid-rows-[auto_1fr] h-full items-start content-start",t),style:{...r,...n?{border:"3px dotted red"}:{}},children:e})}function Oc({children:e,className:t,isCentered:r=!1,isDivided:n=!1,hasLeftServiceColumn:s=!1,style:i}){const o=nqe("MainContentContent"),a=xte({isCentered:r,isDivided:n,hasLeftServiceColumn:s,className:t});return f.jsx("div",{className:a,style:{...i,...o?{border:"3px dotted orange"}:{}},children:e})}const xte=({isCentered:e,isDivided:t,hasLeftServiceColumn:r,className:n})=>re("grid overflow-y-auto h-full ","overflow-x-auto min-w-[min-content]",{"items-start content-start":!e&&!t&&!r,"grid place-items-center":e,"grid-cols-[1fr_1fr]":t&&!r,"grid-cols-[12rem_1fr_1fr]":t&&r,"grid-cols-[auto_1fr]":!t&&r},n);function nqe(e){try{const t=localStorage.getItem("add-dev-style-to-components");return t?t.split(",").map(n=>n.trim()).filter(Boolean).includes(e):!1}catch(t){return console.error("Error reading or parsing localStorage:",t),!1}}const B4=()=>f.jsx(Ugr,{className:re("w-1.5 bg-surface3","[&[data-separator='hover']]:!bg-surface4","[&[data-separator='active']]:!bg-surface5","focus:outline-none")}),V4=({collapsedSize:e,children:t,direction:r,...n})=>{const[s,i]=E.useState(!1),o=Bgr(),a=()=>{o.current&&o.current.expand()};return f.jsx(tee,{panelRef:o,collapsedSize:e,...n,onResize:l=>{e&&typeof e=="number"&&(l.inPixels<=e?i(!0):s&&i(!1))},children:s?f.jsxs(Ss,{children:[f.jsx("div",{className:"flex items-center justify-center h-full",children:f.jsx(Os,{asChild:!0,children:f.jsx(Je,{onClick:a,className:"!h-48 border-none",children:f.jsx(qe,{children:r==="left"?f.jsx(qx,{}):f.jsx(YCe,{})})})})}),f.jsx(is,{children:"Expand"})]}):t})},JPr=({workflowId:e,children:t,leftSlot:r,rightSlot:n})=>{const{defaultLayout:s,onLayoutChange:i}=HLe({id:`workflow-layout-${e}`,storage:localStorage}),o=xte({isCentered:!1,isDivided:!0,hasLeftServiceColumn:!!r});return f.jsxs(qLe,{className:o,defaultLayout:s,onLayoutChange:i,children:[r&&f.jsxs(f.Fragment,{children:[f.jsx(V4,{direction:"left",id:"left-slot",minSize:200,maxSize:"30%",defaultSize:200,collapsedSize:60,collapsible:!0,children:r}),f.jsx(B4,{})]}),f.jsx(tee,{id:"main-slot",children:t}),n&&f.jsxs(f.Fragment,{children:[f.jsx(B4,{}),f.jsx(V4,{direction:"right",id:"right-slot",minSize:300,maxSize:"50%",defaultSize:300,collapsedSize:60,collapsible:!0,children:n})]})]})},wte=()=>f.jsx(X6,{icon:f.jsx(ea,{color:gTe.neutral3}),title:f.jsx(fr,{className:"ml-2 w-12 h-2"}),collapsible:!1}),KPr=({result:e,workflowId:t,isStreaming:r,metadata:n,toolCallId:s,toolApprovalMetadata:i,suspendPayload:o,toolName:a,isNetwork:l,toolCalled:c})=>{const{runId:u,status:d}=e||{},{data:p,isLoading:m}=FD(t),{data:g,isLoading:v}=RZe(t,{enabled:!!u&&!r}),b=g?.find(T=>T.runId===u),w=v||!b,S=typeof b?.snapshot=="object"?b?.snapshot:void 0,O=n?.mode==="network"?n.selectionReason:void 0,k=n?.mode==="network"?n.agentInput:void 0;let C=typeof o=="string"?f.jsx("pre",{className:"whitespace-pre bg-surface4 p-4 rounded-md overflow-x-auto",children:o}):f.jsx(Kc,{data:o,"data-testid":"tool-suspend-payload"});return m||!p?f.jsx(wte,{}):f.jsxs(X6,{"data-testid":"workflow-badge",icon:f.jsx(Tu,{className:"text-accent3"}),title:p.name,initialCollapsed:!1,extraInfo:n?.mode==="network"&&f.jsx(dte,{selectionReason:O??"",input:k}),children:[!r&&!w&&f.jsx(hte,{snapshot:S,workflowId:t,initialRunId:u,withoutTimeTravel:!0,children:f.jsx(Dxe,{workflowId:t,workflow:p,runId:u})}),r&&f.jsx(Dxe,{workflowId:t,workflow:p,runId:u}),C!==void 0&&o&&f.jsxs("div",{children:[f.jsx("p",{className:"font-medium pb-2",children:"Workflow suspend payload"}),C]}),f.jsx(fte,{toolCalled:c??!!d,toolCallId:s,toolApprovalMetadata:i,toolName:a,isNetwork:l,isGenerateMode:n?.mode==="generate"})]})},Dxe=({workflowId:e,workflow:t,runId:r})=>{const{Link:n}=Lr();return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex items-center gap-2 pb-2",children:[f.jsx(Je,{as:n,href:`/workflows/${e}/graph`,children:"Go to workflow"}),r&&f.jsx(Je,{as:n,href:`/workflows/${e}/graph/${r}`,children:"See run"})]}),f.jsx("div",{className:"rounded-md overflow-hidden h-[60vh] w-full",children:f.jsx(JZe,{workflowId:e,workflow:t})})]})},e$r=e=>{const{setResult:t}=E.useContext(kp);E.useEffect(()=>{e&&t(e)},[e])},t$r=({agentId:e,messages:t=[],metadata:r,toolCallId:n,toolApprovalMetadata:s,toolName:i,isNetwork:o,suspendPayload:a,toolCalled:l})=>{const c=r?.mode==="network"?r.selectionReason:void 0,u=r?.mode==="network"?r.agentInput:void 0;let d=t.length>0;o&&(d=l??t.every(m=>m.type==="text"?!0:!!m.toolOutput));let p=typeof a=="string"?f.jsx("pre",{className:"whitespace-pre bg-surface4 p-4 rounded-md overflow-x-auto",children:a}):f.jsx(Kc,{data:a,"data-testid":"tool-suspend-payload"});return f.jsxs(X6,{"data-testid":"agent-badge",icon:f.jsx(Fo,{className:"text-accent1"}),title:e,initialCollapsed:!1,extraInfo:r?.mode==="network"&&f.jsx(dte,{selectionReason:c??"",input:u}),children:[t.map((m,g)=>{if(m.type==="text")return f.jsx(eVe,{children:m.content},g);let v;try{v=typeof m.toolOutput=="string"?JSON.parse(m.toolOutput):m.toolOutput}catch{v=m.toolOutput}return f.jsx(me.Fragment,{children:f.jsx(iqe,{toolName:m.toolName,argsText:typeof m.args=="string"?m.args:JSON.stringify(m.args),result:v,args:m.args,status:{type:"complete"},type:"tool-call",toolCallId:m.toolCallId,addResult:()=>{},resume:()=>{},metadata:{mode:"stream"}})},g)}),p!==void 0&&a&&f.jsxs("div",{children:[f.jsx("p",{className:"font-medium pb-2",children:"Agent suspend payload"}),p]}),f.jsx(fte,{toolCalled:d,toolCallId:n,toolApprovalMetadata:s,toolName:i,isNetwork:o,isGenerateMode:r?.mode==="generate"})]})},sqe=({threadId:e,agentId:t,memory:r})=>{const n=rr(),{requestContext:s}=Qn();return ds({queryKey:["memory","messages",e,t,"requestContext"],queryFn:()=>e?n.listThreadMessages(e,{agentId:t,requestContext:s}):null,enabled:r&&!!e,staleTime:0,gcTime:0,retry:!1,refetchOnWindowFocus:!1})},r$r=({agentId:e,result:t,metadata:r,toolCallId:n,toolApprovalMetadata:s,toolName:i,isNetwork:o,suspendPayload:a,toolCalled:l})=>{const{data:c,isLoading:u}=sqe({threadId:t?.subAgentThreadId,agentId:e,memory:!0});if(u)return f.jsx(wte,{});const d=c?.messages?KBe(c.messages):[],p=t?.childMessages??R3t(d);return f.jsx(t$r,{agentId:e,messages:p,metadata:r,toolCallId:n,toolApprovalMetadata:s,toolName:i,isNetwork:o,suspendPayload:a,toolCalled:l})},iqe=({toolName:e,result:t,args:r,...n})=>f.jsx(hte,{workflowId:"",withoutTimeTravel:!0,children:f.jsx(n$r,{toolName:e,result:t,args:r,...n})}),n$r=({toolName:e,result:t,args:r,metadata:n,toolCallId:s,...i})=>{const o=n?.mode==="network"&&n.from==="AGENT"||e.startsWith("agent-"),a=n?.mode==="network"&&n.from==="WORKFLOW"||e.startsWith("workflow-"),l=n?.mode==="network",c=e.startsWith("agent-")?e.substring(6):e,u=e.startsWith("workflow-")?e.substring(9):e,d=(n?.mode==="stream"||n?.mode==="network"||n?.mode==="generate")&&n?.requireApprovalMetadata,p=(n?.mode==="stream"||n?.mode==="network"||n?.mode==="generate")&&n?.suspendedTools,m=d?d?.[e]??d?.[s]:void 0,g=p?p?.[e]:void 0,v=n?.mode==="network"&&n?.hasMoreMessages?!0:void 0;if(e$r(t),o)return f.jsx(r$r,{agentId:c,result:t,metadata:n,toolCallId:s,toolApprovalMetadata:m,toolName:e,isNetwork:l,suspendPayload:g?.suspendPayload,toolCalled:v});if(a){const b=n?.mode==="stream"||n?.mode==="network";return f.jsx(KPr,{workflowId:u,isStreaming:b,result:t,metadata:n,toolCallId:s,toolApprovalMetadata:m,suspendPayload:g?.suspendPayload,toolName:e,isNetwork:l,toolCalled:v})}return f.jsx(V2r,{toolName:e,args:r,result:t,toolOutput:t?.toolOutput||[],metadata:n,toolCallId:s,toolApprovalMetadata:m,suspendPayload:g?.suspendPayload,isNetwork:l,toolCalled:v})},s$r=({text:e})=>{const[t,r]=E.useState(!1);return f.jsxs("div",{className:"mb-2 space-y-2",children:[f.jsxs("button",{onClick:()=>r(n=>!n),className:"flex items-center gap-2",children:[f.jsx(qe,{children:f.jsx(HN,{className:re("transition-all",t?"rotate-90":"rotate-180")})}),f.jsxs(Xt,{icon:f.jsx(KCe,{}),children:[t?"Show":"Hide"," reasoning"]})]}),t?null:f.jsx("div",{className:"rounded-lg bg-surface4 p-2 border border-border-1",children:f.jsx("pre",{className:"whitespace-pre-wrap text-ui-sm leading-ui-sm text-neutral6",children:e})})]})},Axe=e=>f.jsx("svg",{className:"h-3 w-3",viewBox:"0 0 320 320",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",...e,children:f.jsx("path",{d:"m297.06 130.97c7.26-21.79 4.76-45.66-6.85-65.48-17.46-30.4-52.56-46.04-86.84-38.68-15.25-17.18-37.16-26.95-60.13-26.81-35.04-.08-66.13 22.48-76.91 55.82-22.51 4.61-41.94 18.7-53.31 38.67-17.59 30.32-13.58 68.54 9.92 94.54-7.26 21.79-4.76 45.66 6.85 65.48 17.46 30.4 52.56 46.04 86.84 38.68 15.24 17.18 37.16 26.95 60.13 26.8 35.06.09 66.16-22.49 76.94-55.86 22.51-4.61 41.94-18.7 53.31-38.67 17.57-30.32 13.55-68.51-9.94-94.51zm-120.28 168.11c-14.03.02-27.62-4.89-38.39-13.88.49-.26 1.34-.73 1.89-1.07l63.72-36.8c3.26-1.85 5.26-5.32 5.24-9.07v-89.83l26.93 15.55c.29.14.48.42.52.74v74.39c-.04 33.08-26.83 59.9-59.91 59.97zm-128.84-55.03c-7.03-12.14-9.56-26.37-7.15-40.18.47.28 1.3.79 1.89 1.13l63.72 36.8c3.23 1.89 7.23 1.89 10.47 0l77.79-44.92v31.1c.02.32-.13.63-.38.83l-64.41 37.19c-28.69 16.52-65.33 6.7-81.92-21.95zm-16.77-139.09c7-12.16 18.05-21.46 31.21-26.29 0 .55-.03 1.52-.03 2.2v73.61c-.02 3.74 1.98 7.21 5.23 9.06l77.79 44.91-26.93 15.55c-.27.18-.61.21-.91.08l-64.42-37.22c-28.63-16.58-38.45-53.21-21.95-81.89zm221.26 51.49-77.79-44.92 26.93-15.54c.27-.18.61-.21.91-.08l64.42 37.19c28.68 16.57 38.51 53.26 21.94 81.94-7.01 12.14-18.05 21.44-31.2 26.28v-75.81c.03-3.74-1.96-7.2-5.2-9.06zm26.8-40.34c-.47-.29-1.3-.79-1.89-1.13l-63.72-36.8c-3.23-1.89-7.23-1.89-10.47 0l-77.79 44.92v-31.1c-.02-.32.13-.63.38-.83l64.41-37.16c28.69-16.55 65.37-6.7 81.91 22 6.99 12.12 9.52 26.31 7.15 40.1zm-168.51 55.43-26.94-15.55c-.29-.14-.48-.42-.52-.74v-74.39c.02-33.12 26.89-59.96 60.01-59.94 14.01 0 27.57 4.92 38.34 13.88-.49.26-1.33.73-1.89 1.07l-63.72 36.8c-3.26 1.85-5.26 5.31-5.24 9.06l-.04 89.79zm14.63-31.54 34.65-20.01 34.65 20v40.01l-34.65 20-34.65-20z"})}),i$r=e=>f.jsx("svg",{className:"h-3 w-3",viewBox:"0 0 320 320",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",...e,children:f.jsx("path",{d:"m297.06 130.97c7.26-21.79 4.76-45.66-6.85-65.48-17.46-30.4-52.56-46.04-86.84-38.68-15.25-17.18-37.16-26.95-60.13-26.81-35.04-.08-66.13 22.48-76.91 55.82-22.51 4.61-41.94 18.7-53.31 38.67-17.59 30.32-13.58 68.54 9.92 94.54-7.26 21.79-4.76 45.66 6.85 65.48 17.46 30.4 52.56 46.04 86.84 38.68 15.24 17.18 37.16 26.95 60.13 26.8 35.06.09 66.16-22.49 76.94-55.86 22.51-4.61 41.94-18.7 53.31-38.67 17.57-30.32 13.55-68.51-9.94-94.51zm-120.28 168.11c-14.03.02-27.62-4.89-38.39-13.88.49-.26 1.34-.73 1.89-1.07l63.72-36.8c3.26-1.85 5.26-5.32 5.24-9.07v-89.83l26.93 15.55c.29.14.48.42.52.74v74.39c-.04 33.08-26.83 59.9-59.91 59.97zm-128.84-55.03c-7.03-12.14-9.56-26.37-7.15-40.18.47.28 1.3.79 1.89 1.13l63.72 36.8c3.23 1.89 7.23 1.89 10.47 0l77.79-44.92v31.1c.02.32-.13.63-.38.83l-64.41 37.19c-28.69 16.52-65.33 6.7-81.92-21.95zm-16.77-139.09c7-12.16 18.05-21.46 31.21-26.29 0 .55-.03 1.52-.03 2.2v73.61c-.02 3.74 1.98 7.21 5.23 9.06l77.79 44.91-26.93 15.55c-.27.18-.61.21-.91.08l-64.42-37.22c-28.63-16.58-38.45-53.21-21.95-81.89zm221.26 51.49-77.79-44.92 26.93-15.54c.27-.18.61-.21.91-.08l64.42 37.19c28.68 16.57 38.51 53.26 21.94 81.94-7.01 12.14-18.05 21.44-31.2 26.28v-75.81c.03-3.74-1.96-7.2-5.2-9.06zm26.8-40.34c-.47-.29-1.3-.79-1.89-1.13l-63.72-36.8c-3.23-1.89-7.23-1.89-10.47 0l-77.79 44.92v-31.1c-.02-.32.13-.63.38-.83l64.41-37.16c28.69-16.55 65.37-6.7 81.91 22 6.99 12.12 9.52 26.31 7.15 40.1zm-168.51 55.43-26.94-15.55c-.29-.14-.48-.42-.52-.74v-74.39c.02-33.12 26.89-59.96 60.01-59.94 14.01 0 27.57 4.92 38.34 13.88-.49.26-1.33.73-1.89 1.07l-63.72 36.8c-3.26 1.85-5.26 5.31-5.24 9.06l-.04 89.79zm14.63-31.54 34.65-20.01 34.65 20v40.01l-34.65 20-34.65-20z"})}),o$r=e=>f.jsx("svg",{className:"h-3 w-3",fill:"white",height:"78",strokeLinejoin:"round",viewBox:"0 0 16 16",width:"78",style:{color:"currentcolor"},...e,children:f.jsx("g",{transform:"translate(0,2)",children:f.jsx("path",{d:"M11.375 0h-2.411L13.352 11.13h2.411L11.375 0ZM4.4 0 0 11.13h2.46l0.9-2.336h4.604l0.9 2.336h2.46L6.924 0H4.4Zm-0.244 6.723 1.506-3.909 1.506 3.909H4.156Z",fill:"currentColor"})})}),a$r=e=>f.jsx("svg",{className:"h-3 w-3",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",...e,children:f.jsx("path",{d:"M7.402 13.8777C9.45763 13.4674 11.1555 13.128 11.175 13.1233L11.2104 13.1148L9.2697 10.507C8.2023 9.07276 7.32898 7.8937 7.32898 7.88691C7.32898 7.87404 9.33293 1.63997 9.3442 1.61779C9.34797 1.61037 10.7117 4.27017 12.65 8.06532C14.4647 11.6184 15.9608 14.5479 15.9747 14.5754L16 14.6253L9.83224 14.6244L3.66449 14.6235L7.402 13.8777ZM0 13.0824C0 13.0787 0.914457 11.2855 2.03212 9.09735L4.06425 5.11896L6.43245 2.87384C7.73497 1.63902 8.80417 0.627201 8.80845 0.625356C8.81274 0.623511 8.79561 0.672228 8.77038 0.733617C8.74515 0.795006 7.58796 3.59893 6.19884 6.96455L3.67317 13.0839L1.83659 13.0865C0.826464 13.0879 0 13.0861 0 13.0824Z",fill:"#0089D6",style:{fill:"#0089D6",fillOpacity:1}})}),l$r=e=>f.jsxs("svg",{className:"h-3 w-3",width:"16",height:"16",viewBox:"0 0 181 108",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[f.jsxs("g",{clipPath:"url(#clip0_1480_1723)",children:[f.jsx("path",{d:"M51.2203 39.3158C51.2203 41.5066 51.4572 43.2829 51.8717 44.5856C52.3453 45.8882 52.9374 47.3093 53.7664 48.8487C54.0624 49.3224 54.1809 49.7961 54.1809 50.2106C54.1809 50.8027 53.8256 51.3948 53.0559 51.9869L49.3256 54.4737C48.7927 54.829 48.2598 55.0066 47.7861 55.0066C47.194 55.0066 46.6019 54.7106 46.0098 54.1777C45.1809 53.2895 44.4703 52.3422 43.8782 51.3948C43.2861 50.3882 42.694 49.2632 42.0427 47.9014C37.4243 53.3487 31.6217 56.0724 24.6348 56.0724C19.6611 56.0724 15.694 54.6514 12.7927 51.8093C9.8914 48.9672 8.41113 45.1777 8.41113 40.4408C8.41113 35.4079 10.1874 31.3224 13.7993 28.2435C17.4111 25.1645 22.2072 23.6251 28.3059 23.6251C30.319 23.6251 32.3914 23.8027 34.5822 24.0987C36.773 24.3948 39.023 24.8685 41.3914 25.4014V21.079C41.3914 16.579 40.444 13.4408 38.6085 11.6053C36.7138 9.76979 33.5164 8.88163 28.9572 8.88163C26.8848 8.88163 24.7532 9.11847 22.5624 9.65137C20.3717 10.1843 18.2401 10.8356 16.1677 11.6645C15.2203 12.079 14.5098 12.3158 14.0953 12.4343C13.6809 12.5527 13.3848 12.6119 13.148 12.6119C12.319 12.6119 11.9046 12.0198 11.9046 10.7764V7.87505C11.9046 6.92768 12.023 6.21716 12.319 5.80268C12.6151 5.38821 13.148 4.97374 13.9769 4.55926C16.0493 3.49347 18.5361 2.60531 21.4374 1.89479C24.3388 1.12505 27.4177 0.769788 30.6743 0.769788C37.7203 0.769788 42.8717 2.36847 46.1875 5.56584C49.444 8.76321 51.1019 13.6185 51.1019 20.1316V39.3158H51.2203ZM27.1809 48.3158C29.1348 48.3158 31.148 47.9606 33.2796 47.2501C35.4111 46.5395 37.3059 45.2369 38.9046 43.4606C39.8519 42.3356 40.5625 41.0922 40.9177 39.6711C41.273 38.2501 41.5098 36.5329 41.5098 34.5198V32.0329C39.7927 31.6185 37.9572 31.2632 36.0624 31.0264C34.1677 30.7895 32.3322 30.6711 30.4967 30.6711C26.5296 30.6711 23.6282 31.4408 21.6743 33.0395C19.7203 34.6382 18.773 36.8882 18.773 39.8487C18.773 42.6316 19.4835 44.704 20.9638 46.1251C22.3848 47.6053 24.4572 48.3158 27.1809 48.3158ZM74.7269 54.7106C73.6611 54.7106 72.9506 54.5329 72.4769 54.1185C72.0032 53.7632 71.5888 52.9343 71.2335 51.8093L57.319 6.03953C56.9638 4.85531 56.7861 4.08558 56.7861 3.6711C56.7861 2.72374 57.2598 2.19084 58.2072 2.19084H64.0098C65.1348 2.19084 65.9046 2.36847 66.319 2.78295C66.7927 3.13821 67.148 3.96716 67.5032 5.09216L77.4506 44.2895L86.6874 5.09216C86.9835 3.90795 87.3388 3.13821 87.8124 2.78295C88.2861 2.42768 89.1151 2.19084 90.1809 2.19084H94.9177C96.0427 2.19084 96.8124 2.36847 97.2861 2.78295C97.7598 3.13821 98.1743 3.96716 98.4111 5.09216L107.766 44.7632L118.01 5.09216C118.365 3.90795 118.78 3.13821 119.194 2.78295C119.668 2.42768 120.437 2.19084 121.503 2.19084H127.01C127.957 2.19084 128.49 2.66453 128.49 3.6711C128.49 3.96716 128.431 4.26321 128.372 4.61847C128.312 4.97374 128.194 5.44742 127.957 6.09874L113.687 51.8685C113.332 53.0527 112.918 53.8224 112.444 54.1777C111.97 54.5329 111.201 54.7698 110.194 54.7698H105.102C103.977 54.7698 103.207 54.5922 102.733 54.1777C102.26 53.7632 101.845 52.9935 101.608 51.8093L92.4309 13.6185L83.3125 51.7501C83.0164 52.9343 82.6611 53.704 82.1874 54.1185C81.7138 54.5329 80.8848 54.7106 79.819 54.7106H74.7269ZM150.812 56.3093C147.734 56.3093 144.655 55.954 141.694 55.2435C138.733 54.5329 136.424 53.7632 134.885 52.8751C133.937 52.3422 133.286 51.7501 133.049 51.2172C132.812 50.6843 132.694 50.0922 132.694 49.5593V46.5395C132.694 45.2961 133.168 44.704 134.056 44.704C134.411 44.704 134.766 44.7632 135.122 44.8816C135.477 45.0001 136.01 45.2369 136.602 45.4737C138.615 46.3619 140.806 47.0724 143.115 47.5461C145.484 48.0198 147.793 48.2566 150.161 48.2566C153.891 48.2566 156.793 47.6053 158.806 46.3027C160.819 45 161.885 43.1053 161.885 40.6777C161.885 39.0198 161.352 37.6579 160.286 36.5329C159.22 35.4079 157.207 34.4014 154.306 33.454L145.72 30.7895C141.398 29.4277 138.201 27.4145 136.247 24.7501C134.293 22.1448 133.286 19.2435 133.286 16.1645C133.286 13.6777 133.819 11.4869 134.885 9.59216C135.951 7.69742 137.372 6.03953 139.148 4.73689C140.924 3.37505 142.937 2.36847 145.306 1.65795C147.674 0.94742 150.161 0.651367 152.766 0.651367C154.069 0.651367 155.431 0.710578 156.734 0.888209C158.095 1.06584 159.339 1.30268 160.582 1.53953C161.766 1.83558 162.891 2.13163 163.957 2.48689C165.023 2.84216 165.852 3.19742 166.444 3.55268C167.273 4.02637 167.865 4.50005 168.22 5.03295C168.576 5.50663 168.753 6.15795 168.753 6.98689V9.76979C168.753 11.0132 168.28 11.6645 167.391 11.6645C166.918 11.6645 166.148 11.4277 165.141 10.954C161.766 9.41453 157.977 8.64479 153.773 8.64479C150.398 8.64479 147.734 9.17768 145.898 10.3027C144.062 11.4277 143.115 13.1448 143.115 15.5724C143.115 17.2303 143.707 18.6514 144.891 19.7764C146.076 20.9014 148.266 22.0264 151.405 23.0329L159.812 25.6974C164.076 27.0593 167.155 28.954 168.99 31.3816C170.826 33.8093 171.714 36.5922 171.714 39.6711C171.714 42.2172 171.181 44.5264 170.174 46.5395C169.108 48.5527 167.687 50.329 165.852 51.7501C164.016 53.2303 161.826 54.2961 159.28 55.0658C156.615 55.8948 153.832 56.3093 150.812 56.3093Z",fill:"currentColor"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M162.004 85.0856C142.524 99.4738 114.221 107.112 89.8855 107.112C55.7803 107.112 25.05 94.5001 1.83948 73.5396C0.00394917 71.8817 1.66184 69.6317 3.85263 70.9343C28.9579 85.5001 59.925 94.3225 91.9579 94.3225C113.57 94.3225 137.313 89.8225 159.162 80.5856C162.418 79.1054 165.201 82.7172 162.004 85.0856Z",fill:"#FF9900"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M170.115 75.8487C167.628 72.6513 153.654 74.3092 147.319 75.079C145.424 75.3158 145.128 73.6579 146.845 72.4145C157.976 64.5987 176.272 66.8487 178.404 69.454C180.536 72.1184 177.812 90.4145 167.391 99.1776C165.792 100.539 164.253 99.8289 164.963 98.0526C167.332 92.1908 172.601 78.9868 170.115 75.8487Z",fill:"#FF9900"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_1480_1723",children:f.jsx("rect",{width:"180",height:"107.763",fill:"white",transform:"translate(0.0625)"})})})]}),c$r=e=>f.jsxs("svg",{className:"h-3 w-3",xmlns:"http://www.w3.org/2000/svg",width:"17",height:"18",fill:"none",...e,children:[f.jsx("mask",{id:"mask0_174_2406",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"17",height:"18",children:f.jsx("path",{d:"M17 0.5H0V17.5H17V0.5Z",fill:"white"})}),f.jsxs("g",{mask:"url(#mask0_174_2406)",children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.50773 10.6219C5.9653 10.6219 6.8755 10.5968 8.13362 10.0788C9.59973 9.47518 12.5166 8.37942 14.6208 7.2539C16.0924 6.46668 16.7375 5.42553 16.7375 4.02344C16.7375 2.07751 15.16 0.5 13.2141 0.5H5.06095C2.26586 0.5 0 2.76586 0 5.56095C0 8.35604 2.12151 10.6219 5.50773 10.6219Z",fill:"#39594D"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.88672 14.107C6.88672 12.7369 7.71155 11.5016 8.97699 10.9764L11.5446 9.9108C14.1417 8.83294 17.0003 10.7415 17.0003 13.5535C17.0003 15.732 15.2339 17.4979 13.0553 17.4973L10.2754 17.4966C8.40372 17.4961 6.88672 15.9787 6.88672 14.107Z",fill:"#D18EE2"}),f.jsx("path",{d:"M2.91749 11.2891C1.30623 11.2891 0 12.5952 0 14.2065V14.5844C0 16.1956 1.30618 17.5018 2.91744 17.5018C4.5287 17.5018 5.83493 16.1956 5.83493 14.5844V14.2065C5.83493 12.5952 4.52875 11.2891 2.91749 11.2891Z",fill:"#FF7759"})]})]}),u$r=e=>f.jsxs("svg",{className:"h-3 w-3","data-testid":"geist-icon",height:"78",strokeLinejoin:"round",viewBox:"0 0 160 59",width:"104",style:{color:"currentcolor"},...e,children:[f.jsx("mask",{id:"mask0_4345_1846",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"160",height:"59",style:{maskType:"luminance"},children:f.jsx("path",{d:"M0.273438 0.219727H159.216V58.1817H0.273438V0.219727Z",fill:"white"})}),f.jsx("g",{mask:"url(#mask0_4345_1846)",children:f.jsx("path",{d:"M95.4635 0.314595C84.4822 0.314595 75.5599 9.19525 75.5599 20.1677C75.5599 31.1402 84.4632 40.0208 95.4635 40.0208C106.464 40.0208 115.367 31.1402 115.367 20.1677C115.348 9.21427 106.445 0.333611 95.4635 0.314595ZM95.4635 32.5664C88.6002 32.5664 83.0333 27.0136 83.0333 20.1677C83.0333 13.3218 88.6002 7.76902 95.4635 7.76902C102.327 7.76902 107.894 13.3218 107.894 20.1677C107.894 27.0136 102.327 32.5664 95.4635 32.5664ZM67.9912 0.39066C67.3049 0.314595 66.6376 0.276562 65.9513 0.276562C65.6081 0.276562 65.284 0.276562 64.9599 0.295578C64.6358 0.314595 64.2926 0.333611 63.9685 0.352628C62.634 0.44771 61.2995 0.675906 60.0031 1.03722C57.3531 1.74082 54.8556 2.99591 52.7013 4.68836C50.4898 6.43787 48.7358 8.68181 47.5347 11.23C46.9437 12.5041 46.5052 13.8543 46.2193 15.2234C46.0858 15.908 45.9905 16.5926 45.9142 17.2772C45.8952 17.6195 45.857 17.9618 45.857 18.3041L45.838 18.8175V19.293L45.8761 32.5854L45.9142 39.2221H53.3685L53.4067 32.5854L53.4448 19.293V18.5893C53.4448 18.3802 53.4829 18.171 53.4829 17.9618C53.5211 17.5434 53.5973 17.1441 53.6736 16.7257C53.8452 15.9271 54.093 15.1474 54.4362 14.4057C55.1225 12.9225 56.152 11.6293 57.4293 10.6025C58.7639 9.53755 60.3081 8.75787 61.9477 8.3205C62.7865 8.0923 63.6635 7.94017 64.5405 7.8641C64.7693 7.84509 64.979 7.82607 65.2078 7.82607C65.4365 7.82607 65.6653 7.80705 65.875 7.80705C66.2944 7.80705 66.7329 7.82607 67.1524 7.8641C68.8491 8.03525 70.4887 8.54869 71.9948 9.38541L75.7124 2.93886C73.3484 1.56968 70.7175 0.694923 67.9912 0.39066ZM20.3484 0.219513C9.36711 0.124431 0.36855 8.92902 0.273226 19.8825C0.177902 30.8359 9.00488 39.8116 19.9862 39.9067H26.8876V32.4713H20.3484C13.4851 32.5474 7.84193 27.0707 7.76567 20.2057C7.68941 13.3408 13.1801 7.73099 20.0624 7.65492H20.3484C27.2117 7.65492 32.7786 13.2077 32.8167 20.0536V38.3284C32.8167 45.1172 27.2689 50.651 20.4819 50.7271C17.2218 50.708 14.1142 49.3959 11.8265 47.0949L6.54553 52.3625C10.206 56.0326 15.1628 58.1244 20.3484 58.1625H20.6153C31.4632 58.0103 40.1757 49.2248 40.2329 38.4044V19.5592C39.966 8.81492 31.1391 0.238529 20.3484 0.219513ZM139.389 0.314595C128.407 0.314595 119.485 9.19525 119.504 20.1677C119.504 31.1212 128.407 40.0018 139.389 40.0018H146.195V32.5664H139.389C132.525 32.5664 126.958 27.0136 126.958 20.1677C126.958 13.3218 132.525 7.76902 139.389 7.76902C145.833 7.76902 151.209 12.6943 151.781 19.1028H151.762V57.2116H159.216V20.1677C159.216 9.21427 150.351 0.314595 139.389 0.314595Z",fill:"currentColor"})})]}),d$r=e=>f.jsx("svg",{className:"h-3 w-3",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1000 1000",width:"78",height:"78",style:{color:"currentcolor"},...e,children:f.jsxs("g",{children:[f.jsx("polygon",{fill:"currentColor",points:"226.83 411.15 501.31 803.15 623.31 803.15 348.82 411.15 226.83 411.15"}),f.jsx("polygon",{fill:"currentColor",points:"348.72 628.87 226.69 803.15 348.77 803.15 409.76 716.05 348.72 628.87"}),f.jsx("polygon",{fill:"currentColor",points:"651.23 196.85 440.28 498.12 501.32 585.29 773.31 196.85 651.23 196.85"}),f.jsx("polygon",{fill:"currentColor",points:"673.31 383.25 673.31 803.15 773.31 803.15 773.31 240.44 673.31 383.25"})]})}),f$r=e=>f.jsxs("svg",{className:"h-3 w-3",xmlns:"http://www.w3.org/2000/svg",width:"176",height:"162",viewBox:"0 0 176 162",fill:"none",...e,children:[f.jsx("rect",{x:"15",y:"1",width:"32",height:"32",fill:"#FFCD00",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"143",y:"1",width:"32",height:"32",fill:"#FFCD00",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"15",y:"33",width:"32",height:"32",fill:"#FFA400",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"47",y:"33",width:"32",height:"32",fill:"#FFA400",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"111",y:"33",width:"32",height:"32",fill:"#FFA400",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"143",y:"33",width:"32",height:"32",fill:"#FFA400",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"15",y:"65",width:"32",height:"32",fill:"#FF7100",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"47",y:"65",width:"32",height:"32",fill:"#FF7100",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"79",y:"65",width:"32",height:"32",fill:"#FF7100",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"111",y:"65",width:"32",height:"32",fill:"#FF7100",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"143",y:"65",width:"32",height:"32",fill:"#FF7100",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"15",y:"97",width:"32",height:"32",fill:"#FF4902",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"79",y:"97",width:"32",height:"32",fill:"#FF4902",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"143",y:"97",width:"32",height:"32",fill:"#FF4902",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"15",y:"129",width:"32",height:"32",fill:"#FF0006",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{x:"143",y:"129",width:"32",height:"32",fill:"#FF0006",stroke:"#636363","stroke-opacity":"0.2",strokeWidth:"0.5"}),f.jsx("rect",{y:"1",width:"16",height:"160",fill:"black"}),f.jsx("rect",{x:"63",y:"97",width:"16",height:"32",fill:"black"}),f.jsx("rect",{x:"95",y:"33",width:"16",height:"32",fill:"black"}),f.jsx("rect",{x:"127",y:"1",width:"16",height:"32",fill:"black"}),f.jsx("rect",{x:"127",y:"97",width:"16",height:"64",fill:"black"})]}),p$r=e=>f.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"128",height:"113",viewBox:"0 0 128 113",children:[f.jsxs("g",{clipPath:"url(#clip0_236_138)",...e,children:[f.jsx("path",{d:"M34.593 94.0509H33.3844L27.3514 88.0179V86.8094L36.5743 77.5866H42.9639L43.8158 78.4385V84.8281L34.593 94.0509Z",fill:e.fill||"#05BDBA"}),f.jsx("path",{d:"M27.3514 25.816V24.6074L33.3844 18.5744H34.593L43.8158 27.7972V34.1868L42.9639 35.0388H36.5743L27.3514 25.816Z",fill:e.fill||"#05BDBA"}),f.jsx("path",{d:"M80.4594 74.6047H71.6824L70.9493 73.8717V53.3259C70.9493 49.6705 69.5129 46.8372 65.1046 46.7382C62.836 46.6787 60.2405 46.7382 57.4668 46.8471L57.0507 47.2731V73.8618L56.3176 74.5948H47.5406L46.8075 73.8618V38.7636L47.5406 38.0305H67.2939C74.9713 38.0305 81.1925 44.2517 81.1925 51.9291V73.8717L80.4594 74.6047Z",fill:e.fill||"#014847"}),f.jsx("path",{d:"M35.8412 61.4491H0.73307L0 60.716V51.9192L0.73307 51.1861H35.8412L36.5743 51.9192V60.716L35.8412 61.4491Z",fill:e.fill||"#05BDBA"}),f.jsx("path",{d:"M127.277 61.4491H92.1687L91.4356 60.716V51.9192L92.1687 51.1861H127.277L128.01 51.9192V60.716L127.277 61.4491Z",fill:e.fill||"#05BDBA"}),f.jsx("path",{d:"M58.9428 27.0642V0.73307L59.6759 0H68.4727L69.2058 0.73307V27.0642L68.4727 27.7972H59.6759L58.9428 27.0642Z",fill:e.fill||"#05BDBA"}),f.jsx("path",{d:"M58.9428 111.902V85.5711L59.6759 84.838H68.4727L69.2058 85.5711V111.902L68.4727 112.635H59.6759L58.9428 111.902Z",fill:e.fill||"#05BDBA"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_236_138",children:f.jsx("rect",{width:"128",height:"112.635",fill:"white"})})})]}),U4={"openai.chat":f.jsx(Axe,{}),"openai.responses":f.jsx(Axe,{}),"anthropic.chat":f.jsx(i$r,{}),"anthropic.messages":f.jsx(o$r,{}),AZURE:f.jsx(a$r,{}),AMAZON:f.jsx(l$r,{}),GOOGLE:f.jsx(S2r,{}),COHERE:f.jsx(c$r,{}),GROQ:f.jsx(u$r,{}),X_GROK:f.jsx(d$r,{}),MISTRAL:f.jsx(f$r,{}),netlify:f.jsx(p$r,{fill:"white"})},yf=e=>e.includes(".")?e.split(".")[0]:e,nq=({providerId:e,className:t="",size:r=20})=>{const[n,s]=E.useState(!1),i=yf(e),o=i.replace(/\//g,"-").toLowerCase(),l=(u=>({openai:"openai.chat",anthropic:"anthropic.messages",google:"GOOGLE",xai:"X_GROK",groq:"GROQ",deepseek:"deepseek",together:"together",mistral:"mistral",perplexity:"perplexity",fireworks_ai:"fireworks",openrouter:"openrouter",netlify:"netlify"})[u]||"DEFAULT")(i);return["netlify"].includes(o)||n||!e?U4[l]?f.jsx(qe,{children:U4[l]}):f.jsx("div",{className:`w-[${r}px] h-[${r}px] bg-gray-200 rounded ${t}`}):f.jsx("img",{src:`https://models.dev/logos/${o}.svg`,alt:`${e} logo`,width:r,height:r,className:t,onError:()=>s(!0),loading:"lazy",style:{width:`${r}px`,height:`${r}px`,objectFit:"contain",filter:"brightness(0) invert(1)",opacity:.9}})},h$r=({hasModelList:e})=>{const t=OEe(),r=t.id,n=t.content.every(({type:o,metadata:a})=>o==="tool-call"||o==="reasoning"||o==="text"&&a?.mode==="network"&&a?.completionResult),s=t.metadata?.custom?.modelMetadata,i=e&&s;return f.jsxs(JW,{className:"max-w-full","data-message-id":r,children:[f.jsx("div",{className:"text-neutral6 text-ui-lg leading-ui-lg",children:f.jsx(KW,{components:{Text:R2r,tools:{Fallback:iqe},Reasoning:s$r}})}),!n&&f.jsxs("div",{className:re("h-6 pt-4 flex gap-2 items-center",{"pb-1":i}),children:[i&&f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx(nq,{providerId:s.modelProvider,size:14}),f.jsxs("span",{className:"text-ui-xs leading-ui-xs",children:[s.modelProvider,"/",s.modelId]})]}),f.jsx(m$r,{})]})]})},m$r=()=>f.jsxs(NEe,{hideWhenRunning:!0,autohide:"always",autohideFloat:"single-branch",className:"flex gap-1 items-center transition-all relative",children:[f.jsx(D_,{speaking:!1,children:f.jsx(Uit,{asChild:!0,children:f.jsx(Sd,{tooltip:"Read aloud",children:f.jsx(Bct,{})})})}),f.jsx(D_,{speaking:!0,children:f.jsx(MEe,{asChild:!0,children:f.jsx(Sd,{tooltip:"Stop",children:f.jsx(nTe,{})})})}),f.jsx(REe,{asChild:!0,children:f.jsxs(Sd,{tooltip:"Copy",className:"bg-transparent text-neutral3 hover:text-neutral6",children:[f.jsx(D_,{copied:!0,children:f.jsx(lu,{})}),f.jsx(D_,{copied:!1,children:f.jsx(cu,{})})]})})]}),Q4="h-full w-full flex items-center justify-center",oqe=({data:e,url:t})=>{const[r,n]=E.useState(!1);return t?f.jsx("a",{href:t,className:Q4,target:"_blank",rel:"noreferrer noopener",children:f.jsx(VB,{className:"text-accent2","aria-label":"View PDF"})}):f.jsxs(f.Fragment,{children:[f.jsx("button",{onClick:()=>n(!0),className:Q4,type:"button",children:f.jsx(VB,{className:"text-accent2","aria-label":"View PDF"})}),f.jsx(g$r,{data:e,open:r,onOpenChange:n})]})},g$r=({data:e,open:t,onOpenChange:r})=>f.jsx(qo,{open:t,onOpenChange:r,children:f.jsxs(So,{className:"max-w-4xl",children:[f.jsxs(Oo,{children:[f.jsx(ko,{children:"PDF preview"}),f.jsx(Eo,{children:"Preview of the PDF document"})]}),f.jsx(_o,{children:t&&f.jsx("iframe",{src:e,width:"100%",height:"600px"})})]})}),aqe=({src:e})=>{const[t,r]=E.useState(!1);return f.jsxs(f.Fragment,{children:[f.jsx("button",{onClick:()=>r(!0),type:"button",className:Q4,children:f.jsx("img",{src:e,className:"object-cover aspect-ratio max-h-[140px] max-w-[320px]",alt:"Preview"})}),f.jsx(y$r,{src:e,open:t,onOpenChange:r})]})},y$r=({src:e,open:t,onOpenChange:r})=>f.jsx(qo,{open:t,onOpenChange:r,children:f.jsxs(So,{className:"max-w-4xl",children:[f.jsxs(Oo,{children:[f.jsx(ko,{children:"Image preview"}),f.jsx(Eo,{children:"Preview of the image"})]}),f.jsx(_o,{children:t&&f.jsx("img",{src:e,alt:"Image"})})]})}),lqe=({data:e})=>{const[t,r]=E.useState(!1),n=e.replace(/<attachment[^>]*>/,"").replace(/<\/attachment>/g,"");return f.jsxs(f.Fragment,{children:[f.jsx("button",{onClick:()=>r(!0),className:Q4,type:"button",children:f.jsx(VB,{className:"text-neutral3"})}),f.jsx(v$r,{data:n,open:t,onOpenChange:r})]})},v$r=({data:e,open:t,onOpenChange:r})=>f.jsx(qo,{open:t,onOpenChange:r,children:f.jsxs(So,{className:"max-w-4xl h-[80vh]",children:[f.jsxs(Oo,{children:[f.jsx(ko,{children:"Text preview"}),f.jsx(Eo,{children:"Preview of the text file"})]}),f.jsx(_o,{children:t&&f.jsx("div",{className:"whitespace-pre-wrap",children:e})})]})}),Gz=({type:e,contentType:t,nameSlot:r,src:n,data:s})=>f.jsx(YN,{children:f.jsxs(Ss,{children:[f.jsx(Os,{asChild:!0,children:f.jsx("div",{className:"h-full w-full overflow-hidden rounded-lg",children:e==="image"?f.jsx(aqe,{src:n??""}):e==="document"&&t==="application/pdf"?f.jsx(oqe,{data:s??"",url:n}):f.jsx(lqe,{data:s??""})})}),f.jsx(is,{side:"top",children:r})]})}),b$r=()=>{const t=OEe()?.id;return f.jsx(JW,{className:"w-full flex items-end pb-4 flex-col","data-message-id":t,children:f.jsx("div",{className:"max-w-[366px] px-5 py-3 text-neutral6 text-ui-lg leading-ui-lg rounded-lg bg-surface3",children:f.jsx(KW,{components:{File:r=>{const n=r.data,s=n?.startsWith("https://");return f.jsx(Gz,{type:"document",contentType:r.mimeType,nameSlot:"Unknown filename",src:s?n:void 0,data:r.data})},Image:r=>f.jsx(Gz,{type:"image",nameSlot:"Unknown filename",src:r.image}),Text:r=>r.text.includes("<attachment name=")?f.jsx(Gz,{type:"document",contentType:"text/plain",nameSlot:"Unknown filename",src:void 0,data:r.text}):r.text}})})})};async function x$r(e){const t=await navigator.mediaDevices.getUserMedia({audio:!0}),r=new MediaRecorder(t);let n=[];return r.ondataavailable=s=>{n.push(s.data)},r.onstop=()=>{const s=new Blob(n,{type:"audio/webm"}),i=new File([s],`recording-${Date.now()}.webm`,{type:"audio/webm",lastModified:Date.now()});t.getTracks().forEach(o=>o.stop()),e(i)},r}const w$r=({language:e="en-US",agentId:t})=>{const r=rr(),[n,s]=E.useState(null),{requestContext:i}=Qn();E.useEffect(()=>{if(!t)return;const g=r.getAgent(t);(async()=>{try{(await g.voice.getSpeakers(i)).length>0?s(g):s(null)}catch{s(null)}})()},[t]);const{start:o,stop:a,isListening:l,transcript:c}=S$r({language:e}),{start:u,stop:d,isListening:p,transcript:m}=O$r({agent:n});return n?{start:u,stop:d,isListening:p,transcript:m}:{start:o,stop:a,isListening:l,transcript:c}},S$r=({language:e="en-US"})=>{const t=E.useRef(null),[r,n]=E.useState({isListening:!1,transcript:"",error:null}),s=()=>{t.current&&t.current.start()},i=()=>{t.current&&t.current.stop()};return E.useEffect(()=>{if(!("webkitSpeechRecognition"in window)&&!("SpeechRecognition"in window)){n(l=>({...l,error:"Speech Recognition not supported in this browser"}));return}const o=window.SpeechRecognition||window.webkitSpeechRecognition,a=new o;t.current=a,a.continuous=!0,a.lang=e,a.onstart=()=>{n(l=>({...l,isListening:!0}))},a.onresult=l=>{let c="";for(let u=l.resultIndex;u<l.results.length;u++){const d=l.results[u][0].transcript;l.results[u].isFinal&&(c+=d+" ")}n(u=>({...u,transcript:c}))},a.onerror=l=>{n(c=>({...c,error:`Error: ${l.error}`}))},a.onend=()=>n(l=>({...l,isListening:!1}))},[e]),{...r,start:s,stop:i}},O$r=({agent:e})=>{const[t,r]=E.useState(""),[n,s]=E.useState(null);if(!e)return{start:()=>{},stop:()=>{},isListening:!1,transcript:""};const i=l=>{e.voice.listen(l).then(c=>{r(c.text)})};return{start:()=>{x$r(i).then(l=>{s(l),l.start()})},stop:()=>{n?.stop(),s(null)},isListening:!!n,transcript:t}},_$r=()=>{const e=$T(),[t,r]=E.useState(!1);return E.useEffect(()=>{e.subscribe(()=>{const n=e.getState().attachments;r(n.length>0)})},[e]),t},k$r=e=>{const[t,r]=E.useState(void 0);return E.useEffect(()=>{if(!e){r(void 0);return}const n=URL.createObjectURL(e);return r(n),()=>{URL.revokeObjectURL(n)}},[e]),t},E$r=()=>{const{file:e,src:t}=v$(MCe(r=>{if(r.file)return r.file.name.startsWith("https://")?{src:r.file.name}:{file:r.file};const n=r.content?.filter(s=>s.type==="image")[0]?.image;return n?{src:n}:{}}));return k$r(e)??t},C$r=e=>{const[t,r]=E.useState({isLoading:!1,text:""});return E.useEffect(()=>{if(!e)return;(async()=>{r(i=>({...i,isLoading:!0}));const s=await e.text();r(i=>({...i,isLoading:!1,text:s}))})()},[e]),t},cqe=async e=>new Promise((t,r)=>{const n=new FileReader;n.onload=()=>{const s=n.result;typeof s=="string"?t(s):r(new Error("Failed to convert file to base64."))},n.onerror=s=>{r(s)},n.readAsDataURL(e)}),T$r=({document:e})=>{const{isLoading:t,text:r}=C$r(e.file);return f.jsx("div",{className:"flex items-center justify-center h-full w-full",children:t?f.jsx(ea,{className:"animate-spin"}):f.jsx(lqe,{data:r})})},D$r=({document:e})=>{const[t,r]=E.useState({isLoading:!1,text:""});E.useEffect(()=>{let s=!1;return(async()=>{if(!e.file)return;r(a=>({...a,isLoading:!0}));const o=await cqe(e.file);s||r(a=>({...a,isLoading:!1,text:o}))})(),()=>{s=!0}},[e]);const n=e.file?.name.startsWith("https://");return f.jsx("div",{className:"flex items-center justify-center h-full w-full",children:t.isLoading?f.jsx(ea,{className:"animate-spin"}):f.jsx(oqe,{data:t.text,url:n?e.file?.name:void 0})})},A$r=()=>{const e=v$(o=>o.type==="image"),t=v$(o=>o.type==="document"?o:void 0),r=E$r(),n=v$(o=>o.source!=="message"),i=t?.file?.name.startsWith("https://")?t?.file?.name:r;return f.jsx(f.Fragment,{children:f.jsxs("div",{className:"relative",children:[f.jsx(YN,{children:f.jsxs(Ss,{children:[f.jsx(TCe,{children:f.jsx(Os,{asChild:!0,children:f.jsx("div",{className:"overflow-hidden size-16 rounded-lg bg-surface3 border border-border1 ",children:e?f.jsx(aqe,{src:i??""}):t?.contentType==="application/pdf"?f.jsx(D$r,{document:t}):t?f.jsx(T$r,{document:t}):null})})}),f.jsx(is,{side:"top",children:f.jsx(DCe,{})})]})}),n&&f.jsx(P$r,{})]})})},P$r=()=>f.jsx(Llt,{asChild:!0,children:f.jsx(Sd,{tooltip:"Remove file",className:"absolute -right-3 -top-3 text-neutral3 hover:text-neutral6 rounded-full bg-surface1 hover:bg-surface2 rounded-full p-1",side:"top",children:f.jsx(qe,{children:f.jsx(sTe,{})})})}),$$r=()=>_$r()?f.jsx("div",{className:"flex w-full flex-row items-center gap-4 pb-2",children:f.jsx(VCe,{components:{Attachment:A$r}})}):null,I$r=({multiple:e=!0,onChange:t}={})=>{const r=tit(i=>!i.isEditing),n=$T(),s=E.useCallback(()=>{const i=document.createElement("input");i.type="file",i.multiple=e,i.hidden=!0;const o=n.getState().attachmentAccept;o&&o!=="*"&&(i.accept=o),document.body.appendChild(i),i.onchange=a=>{const l=a.target.files;if(l){for(const c of l)n.addAttachment(c),t?.(Array.from(l));document.body.removeChild(i)}},i.oncancel=()=>{(!i.files||i.files.length===0)&&document.body.removeChild(i)},i.click()},[n,e]);if(!r)return s},N$r={jpg:"image/jpg",jpeg:"image/jpeg",png:"image/png",gif:"image/gif",webp:"image/webp",svg:"image/svg+xml",bmp:"image/bmp",ico:"image/x-icon",pdf:"application/pdf"},R$r=async e=>{try{const t=await fetch(e,{method:"HEAD"});if(!t.ok)throw new Error("Failed to get file content type");const r=t.headers.get("content-type");if(!r)throw new Error("Failed to get file content type");return r}catch{const n=new URL(e).pathname.split(".").pop();if(!n)return;const s=n.toLowerCase();return N$r[s]}},M$r=({onOpenChange:e,open:t})=>{const r=$T(),n=I$r({onChange:()=>e(!1)}),s=async i=>{i.preventDefault();const a=new FormData(i.target).get("url-attachment")?.toString();if(a){const l=new File([],a,{type:await R$r(a)});r.addAttachment(l),e(!1)}};return f.jsx(qo,{onOpenChange:e,open:t,children:f.jsxs(So,{children:[f.jsxs(Oo,{children:[f.jsx(ko,{children:"Add attachment"}),f.jsx(Eo,{children:"Add a file attachment via URL or from your computer"})]}),f.jsxs(_o,{children:[f.jsxs("form",{onSubmit:s,className:"flex flex-row items-end gap-4",children:[f.jsxs("div",{className:"w-full space-y-1",children:[f.jsx(hd,{htmlFor:"url-attachment",className:"text-neutral3 text-ui-md",children:"Public URL"}),f.jsx(To,{type:"text",name:"url-attachment",id:"url-attachment",className:"w-full",placeholder:"https://placehold.co/600x400/png"})]}),f.jsxs(Je,{type:"submit",className:"!h-8",variant:"light",children:[f.jsx(qe,{children:f.jsx(uTe,{})}),"Add"]})]}),f.jsx("hr",{className:"my-2 border border-border1"}),f.jsxs("div",{className:"space-y-2",children:[f.jsx(Ze,{variant:"ui-md",className:"text-neutral3",children:"Or from your computer"}),f.jsxs("button",{onClick:n,className:"w-full h-40 border border-border1 rounded-lg text-neutral3 border-dashed flex flex-col items-center justify-center gap-2 hover:bg-surface2 active:bg-surface3",children:[f.jsx(Mut,{className:"size-12"}),f.jsx(Ze,{variant:"header-md",children:"Add a local file"})]})]})]})]})})},uqe=E.createContext({threadInput:"",setThreadInput:()=>{}}),j$r=({children:e})=>{const[t,r]=E.useState("");return f.jsx(uqe.Provider,{value:{threadInput:t,setThreadInput:r},children:e})},dqe=()=>E.useContext(uqe),F$r=({agentName:e,agentId:t,hasMemory:r,hasModelList:n})=>{const s=E.useRef(null);zZe(s,{enabled:!0});const i=o=>f.jsx(h$r,{...o,hasModelList:n});return f.jsxs(L$r,{children:[f.jsxs(qCe,{ref:s,autoScroll:!1,className:"overflow-y-scroll scroll-smooth h-full",children:[f.jsx(z$r,{agentName:e}),f.jsx("div",{className:"max-w-3xl w-full mx-auto px-4 pb-7",children:f.jsx(Ect,{components:{UserMessage:b$r,EditComposer:Q$r,AssistantMessage:i}})}),f.jsx(II,{empty:!1,children:f.jsx("div",{})})]}),f.jsx(B$r,{hasMemory:r,agentId:t})]})},L$r=({children:e})=>f.jsx(UCe,{className:"grid grid-rows-[1fr_auto] h-full overflow-y-auto","data-testid":"thread-wrapper",children:e}),z$r=({agentName:e})=>f.jsx(QCe,{children:f.jsxs("div",{className:"flex w-full flex-grow flex-col items-center justify-center",children:[f.jsx(p2r,{name:e||"Agent",size:"lg"}),f.jsx("p",{className:"mt-4 font-medium",children:"How can I help you today?"})]})}),B$r=({hasMemory:e,agentId:t})=>{const{setThreadInput:r}=dqe(),n=E.useRef(null);return f.jsx("div",{className:"mx-4",children:f.jsxs(eG,{children:[f.jsx("div",{className:"max-w-3xl w-full mx-auto pb-2",children:f.jsx($$r,{})}),f.jsxs("div",{className:"bg-surface3 rounded-lg border border-border1 py-4 mt-auto max-w-3xl w-full mx-auto px-4 focus-within:outline focus-within:outline-accent1 -outline-offset-2",onClick:()=>{n.current?.focus()},children:[f.jsx(nG,{asChild:!0,className:"w-full",children:f.jsx("textarea",{ref:n,className:"text-ui-lg leading-ui-lg placeholder:text-neutral3 text-neutral6 bg-transparent focus:outline-none resize-none outline-none",autoFocus:document.activeElement===document.body,placeholder:"Enter your message...",name:"",id:"",onChange:s=>r?.(s.target.value)})}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsx(V$r,{agentId:t}),f.jsx(U$r,{})]})]})]})})},V$r=({agentId:e})=>{const t=$T(),{start:r,stop:n,isListening:s,transcript:i}=w$r({agentId:e});return E.useEffect(()=>{i&&t.setText(i)},[t,i]),f.jsx(Sd,{type:"button",tooltip:s?"Stop dictation":"Start dictation",className:"rounded-full",onClick:()=>s?n():r(),children:s?f.jsx(fqe,{}):f.jsx(Sdt,{className:"h-6 w-6 text-neutral3 hover:text-neutral6"})})},U$r=()=>{const[e,t]=E.useState(!1);return f.jsxs(f.Fragment,{children:[f.jsx(Sd,{type:"button",tooltip:"Add attachment",className:"rounded-full",onClick:()=>t(!0),children:f.jsx($0,{className:"h-6 w-6 text-neutral3 hover:text-neutral6"})}),f.jsx(M$r,{open:e,onOpenChange:t}),f.jsx(II,{running:!1,children:f.jsx(FCe,{asChild:!0,children:f.jsx(Sd,{tooltip:"Send",variant:"default",className:"rounded-full border border-border1 bg-surface5",children:f.jsx(JCe,{className:"h-6 w-6 text-neutral3 hover:text-neutral6"})})})}),f.jsx(II,{running:!0,children:f.jsx(zCe,{asChild:!0,children:f.jsx(Sd,{tooltip:"Cancel",variant:"default",children:f.jsx(fqe,{})})})})]})},Q$r=()=>f.jsxs(eG,{children:[f.jsx(nG,{}),f.jsxs("div",{children:[f.jsx(zCe,{asChild:!0,children:f.jsx("button",{className:"bg-surface2 border border-border1 px-2 text-ui-md inline-flex items-center justify-center rounded-md border h-form-sm gap-1 hover:bg-surface4 text-neutral3 hover:text-neutral6",children:"Cancel"})}),f.jsx(FCe,{asChild:!0,children:f.jsx("button",{className:"bg-surface2 border border-border1 px-2 text-ui-md inline-flex items-center justify-center rounded-md border h-form-sm gap-1 hover:bg-surface4 text-neutral3 hover:text-neutral6",children:"Send"})})]})]}),fqe=()=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:f.jsx("rect",{width:"10",height:"10",x:"3",y:"3",rx:"2"})});function Pxe(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function Z$r(e,t,r){const n=rr(),[s,i]=E.useState(!1),[o,a]=E.useState(null),[l,c]=E.useState("thread"),[u,d]=E.useState("markdown"),[p,m]=E.useState(!0),[g,v]=E.useState(!1),{requestContext:b}=Qn(),w=E.useCallback(async()=>{m(!0);try{if(!e||!t){a(null),m(!1);return}const O=await n.getWorkingMemory({agentId:e,threadId:t,resourceId:r,requestContext:b}),{workingMemory:k,source:C,workingMemoryTemplate:T,threadExists:P}=O;if(i(P),a(k),c(C),d(T?.format||"markdown"),T?.format==="json"){let A="";k?A=Pxe(k):T?.content?A=Pxe(T.content):A="",a(A)}else a(k||T?.content||"")}catch(O){a(null),console.error("Error fetching working memory",O)}finally{m(!1)}},[e,t,r]);return E.useEffect(()=>{w()},[w]),{threadExists:s,workingMemoryData:o,workingMemorySource:l,workingMemoryFormat:u,isLoading:p,isUpdating:g,refetch:w,updateWorkingMemory:async O=>{v(!0);try{if(u==="json")try{JSON.parse(O)}catch{throw new Error("Invalid JSON working memory")}await n.updateWorkingMemory({agentId:e,threadId:t,workingMemory:O,resourceId:r,requestContext:b}),w()}catch(k){throw console.error("Error updating working memory",k),k}finally{v(!1)}}}}const pqe=E.createContext({threadExists:!1,workingMemoryData:null,workingMemorySource:"thread",isLoading:!1,isUpdating:!1,updateWorkingMemory:()=>Promise.resolve(),refetch:()=>Promise.resolve()});function q$r({agentId:e,threadId:t,resourceId:r,children:n}){const s=Z$r(e,t,r);return f.jsx(pqe.Provider,{value:s,children:n})}function hqe(){const e=E.useContext(pqe);if(!e)throw new Error("useWorkingMemory must be used within a WorkingMemoryProvider");return e}class H$r{constructor(t){this.agent=t}speak(t){let r=()=>{};const n=(i,o)=>{s.status.type!=="ended"&&(s.status={type:"ended",reason:i,error:o},r())},s={status:{type:"running"},cancel:()=>{n("cancelled")},subscribe:i=>(this.agent.voice.speak(t).then(o=>{if(o)return o.body}).then(o=>{if(o)return W$r(o)}).then(o=>{o&&(r=o),i()}).catch(o=>{n("error",o)}),()=>{})};return s}}async function W$r(e){const t=new window.AudioContext,r=e.getReader(),n=[];for(;;){const{done:c,value:u}=await r.read();if(c)break;n.push(u)}const s=n.reduce((c,u)=>c+u.length,0),i=new Uint8Array(s);let o=0;for(const c of n)i.set(c,o),o+=c.length;const a=await t.decodeAudioData(i.buffer),l=t.createBufferSource();return l.buffer=a,l.connect(t.destination),l.start(),()=>{l.stop(),t.close()}}class G$r{accept="application/pdf";async add({file:t}){if(t.size>20971520)throw new Error("PDF size exceeds 20MB limit");return{id:crypto.randomUUID(),type:"document",name:t.name,file:t,status:{type:"running",reason:"uploading",progress:0},contentType:"application/pdf"}}async send(t){const r=await this.fileToBase64(t.file);return{id:t.id,type:"document",name:t.name,content:[{type:"text",text:r}],status:{type:"complete"},contentType:"application/pdf"}}async remove(t){}async fileToBase64(t){const r=await t.arrayBuffer(),n=new Uint8Array(r);let s="";return n.forEach(i=>{s+=String.fromCharCode(i)}),btoa(s)}async extractTextFromPDF(t){return"Extracted PDF text content"}}const X$r=e=>{const[t,r]=E.useState(!1),[n,s]=E.useState(void 0),i=rr(),{requestContext:o}=Qn();return E.useEffect(()=>{(async()=>{const l=i.getAgent(e);try{(await l.voice.getSpeakers(o)).length>0?s(new H$r(l)):s(new Yie),r(!0)}catch{s(new Yie),r(!0)}})()},[e]),{isReady:t,adapters:{attachments:new EKe([new SKe,new _Ke,new G$r]),speech:n}}},$xe={modelSettings:{maxRetries:2,maxSteps:5,temperature:.5,topP:1,chatWithGenerateLegacy:!1,chatWithGenerate:!1}};function Y$r({agentId:e,defaultSettings:t}){const[r,n]=E.useState(t),s=`mastra-agent-store-${e}`;return E.useEffect(()=>{try{const a=localStorage.getItem(s),l=a?JSON.parse(a):{},c={...l,modelSettings:{...$xe.modelSettings,...l?.modelSettings??{},...t?.modelSettings??{}}};n(c)}catch{}},[s,t]),{settings:r,setSettings:a=>{n(l=>({...l,...a})),localStorage.setItem(s,JSON.stringify({...a,agentId:e}))},resetAll:()=>{const a={modelSettings:{...$xe.modelSettings,...t?.modelSettings??{}}};n(a),localStorage.removeItem(s)}}}const mqe=E.createContext({});function J$r({children:e,agentId:t,defaultSettings:r}){const{settings:n,setSettings:s,resetAll:i}=Y$r({agentId:t,defaultSettings:r});return f.jsx(mqe.Provider,{value:{settings:n,setSettings:s,resetAll:i},children:e})}const tR=()=>E.useContext(mqe),K$r=e=>typeof e=="string"?e.trim():e.text?.trim()||"",Ste=e=>typeof e=="string"?e.trim():typeof e=="object"&&"content"in e?Array.isArray(e.content)?e.content.map(K$r).join(`
|
|
555
555
|
|
|
556
556
|
`).trim():e.content.trim():Array.isArray(e)?e.map(Ste).join(`
|
|
557
557
|
|
|
@@ -561,11 +561,11 @@ For more information, see https://radix-ui.com/primitives/docs/components/alert-
|
|
|
561
561
|
`):e;return f.jsxs(qc,{children:[f.jsxs(qc.Header,{children:[f.jsxs(qc.Heading,{children:[r,t]}),f.jsxs(Oqe,{children:[f.jsx(Uf,{content:e||"No content"}),a&&f.jsx(Je,{onClick:()=>o(!i),children:i?f.jsx(Ict,{}):f.jsx(Pct,{})})]})]}),e&&f.jsx("div",{className:"bg-black/20 p-4 overflow-hidden rounded-xl border border-white/10 text-neutral4 text-ui-md break-all",children:n?f.jsx("div",{className:"text-neutral4 font-mono break-all px-2",children:f.jsx("pre",{className:"text-wrap",children:e})}):f.jsx(fc,{extensions:[K2e(),rt.lineWrapping],theme:s,value:l})})]})}function sq(e){if(typeof e=="string"){const t=e.indexOf(`
|
|
562
562
|
`);return t!==-1&&t!==e.length-1}else{if(Array.isArray(e))return e.some(t=>sq(t));if(e&&typeof e=="object")return Object.values(e).some(t=>sq(t))}return!1}function jIr({children:e,className:t,as:r="h1"}){const n=r;return f.jsx(n,{className:re("flex items-start text-neutral4 text-header-sm font-semibold gap-2","[&>svg]:w-[1.25em] [&>svg]:h-[1.25em] [&>svg]:shrink-0 [&>svg]:mt-0.5 [&>svg]:opacity-70",{"text-header-sm":r==="h1","text-ui-lg":r==="h2"},t),children:e})}function FIr({children:e,className:t}){return f.jsx("div",{className:re("p-6 pl-9 overflow-y-scroll grid gap-6 content-start",t),children:f.jsx("div",{className:re("grid gap-6 mb-8"),children:e})})}function LIr({children:e,className:t}){return f.jsx("div",{className:re("flex justify-between items-center pb-4",t),children:e})}function zIr({children:e,className:t}){return f.jsx("div",{className:re("flex h-14 items-center text-neutral5 text-ui-md pl-6 relative gap-4",'[&:after]:content-[""] [&:after]:absolute [&:after]:left-6 [&:after]:right-6 [&:after]:bottom-0 [&:after]:border-b [&:after]:border-border1',t),children:e})}function BIr({onNext:e,onPrevious:t,className:r}){const n=()=>{e?.()},s=()=>{t?.()};return f.jsx("div",{className:re("flex items-center gap-4","[&_svg]:w-[1.1em] [&_svg]:h-[1.1em] [&_svg]:text-neutral3",r),children:(e||t)&&f.jsxs("div",{className:re("flex gap-4 items-baseline"),children:[f.jsxs(Je,{onClick:s,disabled:!t,children:["Previous",f.jsx(JCe,{})]}),f.jsxs(Je,{onClick:n,disabled:!e,children:["Next",f.jsx(Rct,{})]})]})})}const pn=Object.assign(PIr,{Top:zIr,Header:LIr,Heading:jIr,Content:FIr,CodeSection:MIr,Nav:BIr});function nl({children:e,className:t}){return f.jsx("span",{className:re("flex items-center gap-2 text-neutral4 text-ui-md","[&>svg]:w-[1.1em] [&>svg]:h-[1.1em] [&>svg]:opacity-50 [&_svg]:flex-shrink-0",t),children:e})}function $h(e){if(e)return e.slice(0,8)}function ib({data:e,LinkComponent:t,className:r,labelsAreHidden:n,isLoading:s}){const{Link:i}=Lr(),o=({children:a})=>n?f.jsx(Td,{children:a}):a;return!e||e.length===0?null:f.jsx("dl",{className:re("grid grid-cols-[auto_1fr] gap-x-4 items-start content-start",r),children:e.map(({label:a,value:l,icon:c,separator:u},d)=>{const p=Array.isArray(l);return f.jsxs(me.Fragment,{children:[f.jsxs("dt",{className:re("text-neutral3 text-ui-md flex items-center gap-8 justify-between min-h-9"),children:[f.jsxs("span",{className:re("flex items-center gap-2","[&>svg]:w-[1.4em] [&>svg]:h-[1.4em] [&>svg]:text-neutral3 [&>svg]:opacity-50",{"[&>svg]:opacity-20":s}),children:[c," ",f.jsx(o,{children:a})]}),!n&&f.jsx("span",{className:re("text-neutral3","[&>svg]:w-[1em] [&>svg]:h-[1em] [&>svg]:text-neutral3"),children:u})]}),f.jsx("dd",{className:re("flex flex-wrap gap-2 py-1 min-h-9 text-ui-md items-center text-neutral5 text-wrap","[&>a]:text-neutral5 [&>a]:max-w-full [&>a]:w-auto truncate [&>a]:bg-surface4 [&>a]:transition-colors [&>a]:flex [&>a]:items-center [&>a]:gap-2 [&>a]:pt-0.5 [&>a]:pb-0.5 [&>a]:px-2 [&>a]:rounded-md [&>a]:text-ui-md [&>a]:min-h-7 [&>a]:leading-none","[&>a:hover]:text-neutral6 [&>a:hover]:bg-surface6","[&>a>svg]:w-[1em] [&>a>svg]:h-[1em] [&>a>svg]:text-neutral3 [&>a>svg]:ml-[-0.5em]"),children:s?f.jsx("span",{className:re("bg-surface4 rounded-e-lg w-full"),style:{width:`${Math.floor(Math.random()*61)+50}%`},children:" "}):p?l?.map(m=>m.path?f.jsx(VIr,{description:m.description,children:f.jsxs(i,{href:m.path,children:[m?.name," ",f.jsx(qN,{})]})},m.id):f.jsx("span",{children:m?.name},m.id)):f.jsx(f.Fragment,{children:l||f.jsx("span",{className:"text-neutral3 text-ui-sm",children:"n/a"})})})]},a+d)})})}function VIr({description:e,children:t}){return e?f.jsxs(lVe,{openDelay:250,children:[f.jsx(cVe,{asChild:!0,children:t}),f.jsx(uVe,{children:f.jsxs(dVe,{className:"z-50 w-auto max-w-60 rounded-md bg-surface5 p-2 px-4 text-ui-sm text-neutral5 text-center",sideOffset:5,side:"top",children:[e,f.jsx(fVe,{className:"fill-surface5"})]})})]}):t}function _qe({score:e,scorerName:t,isOpen:r,onClose:n,onNext:s,onPrevious:i,computeTraceLink:o,dialogLevel:a=1,usageContext:l="scorerPage"}){const{Link:c}=Lr();return f.jsxs(pn,{dialogTitle:"Scorer Score",dialogDescription:"View and analyze score details",isOpen:r,onClose:n,level:a,children:[f.jsxs(pn.Top,{children:[l==="scorerPage"&&f.jsxs(nl,{children:[f.jsx(RI,{})," ",t]}),l==="SpanDialog"&&f.jsxs(f.Fragment,{children:[f.jsxs(nl,{children:[f.jsx(Wx,{})," ",$h(e?.traceId)]}),e?.spanId&&f.jsxs(f.Fragment,{children:["›",f.jsxs(nl,{children:[f.jsx(NI,{}),$h(e?.spanId)]})]})]}),"›",f.jsxs(nl,{children:[f.jsx(nae,{}),$h(e?.id)]}),"|",f.jsx(pn.Nav,{onNext:s,onPrevious:i})]}),f.jsxs(pn.Content,{children:[f.jsxs(pn.Header,{children:[f.jsxs(pn.Heading,{children:[f.jsx(nae,{})," Score"]}),f.jsxs(nl,{children:[f.jsx(MI,{})," ",e?.id]})]}),f.jsxs(H4,{children:[f.jsx(ib,{data:[...l==="SpanDialog"?[{label:"Scorer",value:e?.scorer?.name||"-",key:"scorer-name"}]:[],{label:"Created at",value:e?.createdAt?zn(new Date(e?.createdAt),"MMM d, h:mm:ss aaa"):"n/a",key:"date"},...l!=="SpanDialog"?[{label:"Trace ID",value:e?.traceId?f.jsx(c,{href:o(e?.traceId),children:e?.traceId}):"n/a",key:"traceId"},{label:"Span ID",value:e?.traceId&&e?.spanId?f.jsx(c,{href:o(e?.traceId,e?.spanId),children:e?.spanId}):"n/a",key:"spanId"}]:[]],LinkComponent:c}),f.jsx(pn.CodeSection,{title:`Score: ${Number.isNaN(e?.score)?"n/a":e?.score}`,icon:f.jsx(RI,{}),codeStr:e?.reason||"null",simplified:!0}),f.jsx(pn.CodeSection,{title:"Input",icon:f.jsx(oTe,{}),codeStr:JSON.stringify(e?.input||null,null,2)}),f.jsx(pn.CodeSection,{title:"Output",icon:f.jsx(aTe,{}),codeStr:JSON.stringify(e?.output||null,null,2)}),f.jsx(pn.CodeSection,{title:"Preprocess Prompt",icon:f.jsx(P2,{}),codeStr:e?.preprocessPrompt||"null",simplified:!0}),f.jsx(pn.CodeSection,{title:"Analyze Prompt",icon:f.jsx(P2,{}),codeStr:e?.analyzePrompt||"null",simplified:!0}),f.jsx(pn.CodeSection,{title:"Generate Score Prompt",icon:f.jsx(P2,{}),codeStr:e?.generateScorePrompt||"null",simplified:!0}),f.jsx(pn.CodeSection,{title:"Generate Reason Prompt",icon:f.jsx(P2,{}),codeStr:e?.generateReasonPrompt||"null",simplified:!0})]})]})]})}function UIr({onEntityChange:e,onReset:t,selectedEntity:r,entityOptions:n,isLoading:s}){return f.jsxs("div",{className:re("flex flex-wrap gap-x-8 gap-y-4"),children:[f.jsx(k0,{label:"Filter by Entity",name:"select-entity",placeholder:"Select...",options:n||[],onValueChange:i=>{const o=n?.find(a=>a.value===i);o&&e(o)},value:r?.value||"",className:"min-w-[20rem]",disabled:s}),f.jsxs(Je,{variant:"light",size:"lg",className:"min-w-32",onClick:t,disabled:s,children:["Reset",f.jsx(qe,{children:f.jsx(Ia,{})})]})]})}const QIr=({scorerId:e,page:t=0,entityId:r,entityType:n})=>{const s=rr();return ds({queryKey:["scores",e,t,r,n],queryFn:()=>s.listScoresByScorerId({scorerId:e,page:t,entityId:r,entityType:n,perPage:10}),refetchInterval:5e3})},ZIr=e=>{const t=rr(),[r,n]=E.useState(null),[s,i]=E.useState(!0),[o,a]=E.useState(null);return E.useEffect(()=>{(async()=>{i(!0),a(null);try{const c=await t.getScorer(e);n(c)}catch(c){n(null);const u=c instanceof Error?c:new Error("Error fetching scorer");a(u),console.error("Error fetching scorer",c),mn.error("Error fetching scorer")}finally{i(!1)}})()},[e]),{scorer:r,isLoading:s,error:o}},rR=()=>{const e=rr();return ds({queryKey:["scorers"],queryFn:()=>e.listScorers(),staleTime:0,gcTime:0})};function qIr({value:e,onValueChange:t,placeholder:r="Select a scorer...",searchPlaceholder:n="Search scorers...",emptyText:s="No scorers found.",className:i,disabled:o=!1}){const{data:a={},isLoading:l,isError:c,error:u}=rR(),{navigate:d,paths:p}=Lr();E.useEffect(()=>{if(c){const v=u instanceof Error?u.message:"Failed to load scorers";Js.error(`Error loading scorers: ${v}`)}},[c,u]);const m=Object.keys(a).map(v=>({label:a[v]?.scorer.config.name||v,value:v})),g=v=>{t?t(v):v&&v!==e&&d(p.scorerLink(v))};return f.jsx(UD,{options:m,value:e,onValueChange:g,placeholder:l?"Loading scorers...":r,searchPlaceholder:n,emptyText:s,className:i,disabled:o||l||c})}const HIr=({row:e})=>{const{Link:t,paths:r}=Lr(),n=e.original;return f.jsx(DS,{name:f.jsx(t,{className:"w-full space-y-0",href:r.scorerLink(n.id),children:n.scorer.config.name}),description:n.scorer.config.description})},WIr=[{header:"Name",accessorKey:"name",cell:HIr}];function GIr({scorers:e,isLoading:t}){const{navigate:r,paths:n}=Lr(),[s,i]=E.useState(""),o=E.useMemo(()=>Object.keys(e).map(d=>({...e[d],id:d})),[e]),a=bS({data:o,columns:WIr,getCoreRowModel:vS()}),l=a.getHeaderGroups()[0],c=a.getRowModel().rows.concat();if(c.length===0&&!t)return f.jsx(YIr,{});const u=c.filter(d=>d.original.scorer.config?.id?.toLowerCase().includes(s.toLowerCase())||d.original.scorer.config?.name?.toLowerCase().includes(s.toLowerCase()));return f.jsxs("div",{children:[f.jsx($S,{children:f.jsx(PS,{onSearch:i,label:"Search scorers",placeholder:"Search scorers"})}),t?f.jsx(XIr,{}):f.jsx(AS,{children:f.jsxs(Du,{children:[f.jsx(Au,{className:"sticky top-0",children:l.headers.map(d=>f.jsx(Fi,{style:{width:d.index===0?"auto":d.column.getSize()},children:yu(d.column.columnDef.header,d.getContext())},d.id))}),f.jsx(Pu,{children:u.map(d=>f.jsx($u,{onClick:()=>r(n.scorerLink(d.original.id)),children:d.getVisibleCells().map(p=>f.jsx(me.Fragment,{children:yu(p.column.columnDef.cell,p.getContext())},p.id))},d.id))})]})})]})}const XIr=()=>f.jsxs(Du,{children:[f.jsx(Au,{children:f.jsx(Fi,{children:"Name"})}),f.jsx(Pu,{children:Array.from({length:3}).map((e,t)=>f.jsx($u,{children:f.jsx(Ks,{children:f.jsx(fr,{className:"h-4 w-1/2"})})},t))})]}),YIr=()=>f.jsx("div",{className:"flex h-full items-center justify-center",children:f.jsx(TS,{iconSlot:f.jsx(TZe,{}),titleSlot:"Configure Scorers",descriptionSlot:"Mastra scorers are not configured yet. You can find more information in the documentation.",actionSlot:f.jsxs(Je,{size:"lg",className:"w-full",variant:"light",as:"a",href:"https://mastra.ai/en/docs/scorers/overview",target:"_blank",children:[f.jsx(qe,{children:f.jsx(Fo,{})}),"Docs"]})})}),JIr=({traceId:e="",spanId:t="",page:r})=>{const n=rr();return ds({queryKey:["trace-span-scores",e,t,r],queryFn:()=>n.listScoresBySpan({traceId:e,spanId:t,page:r||0,perPage:10}),enabled:!!e&&!!t,refetchInterval:3e3,gcTime:0,staleTime:0})},KIr=E.createContext(null);function e3r(){const e=E.useContext(KIr);return e||{registerResetFn:()=>{},triggerReset:()=>{}}}const kqe=()=>{const e=rr();return ds({queryKey:["agents-model-providers"],queryFn:()=>e.listAgentsModelProviders(),retry:!1})},Cte=({defaultProvider:e,defaultModel:t,updateModel:r,resetModel:n})=>{const[s]=E.useState(e),[i]=E.useState(t),[o,a]=E.useState(t),[l,c]=E.useState(!1),[u,d]=E.useState(e||""),[p,m]=E.useState(""),[g,v]=E.useState(""),[b,w]=E.useState(!1),[S,O]=E.useState(!1),[k,C]=E.useState(!1),[T,P]=E.useState(!1),{data:A,isLoading:R}=kqe(),[M,z]=E.useState(-1),[Q,U]=E.useState(-1);E.useEffect(()=>{a(t),d(e||"")},[t,e]);const L=E.useRef(null),V=E.useRef(null),j=A?.providers||[],N=yf(u),I=E.useMemo(()=>j.flatMap(X=>X.models.map(te=>({provider:X.id,providerName:X.name,model:te}))),[j]),H=E.useMemo(()=>{const X=b?p:"";let te=j;X&&(te=j.filter(Ae=>Ae.id.toLowerCase().includes(X.toLowerCase())||Ae.name.toLowerCase().includes(X.toLowerCase())));const de=["openai","anthropic","google","openrouter","netlify"],ue=Ae=>{const _e=Ae.toLowerCase().split(".")[0],De=de.indexOf(_e);return De===-1?de.length:De};return te.sort((Ae,_e)=>{if(Ae.connected&&!_e.connected)return-1;if(!Ae.connected&&_e.connected)return 1;const De=ue(Ae.id),Me=ue(_e.id);return De!==Me?De-Me:Ae.name.localeCompare(_e.name)})},[j,p,b]),B=E.useMemo(()=>{let X=I;return N&&(X=X.filter(te=>te.provider===N)),S&&g&&(X=X.filter(te=>te.model.toLowerCase().includes(g.toLowerCase()))),X.sort((te,de)=>te.model.localeCompare(de.model)),X},[I,g,N,S]),[J,Z]=E.useState(""),F=async X=>{a(X),c(!1);const te=I.find(ue=>ue.model===X&&ue.provider===N),de=N||u;if(console.log("DEBUG: handleModelSelect called with:",{modelId:X,providerToUse:de,modelInfo:te,currentModelProvider:N}),X&&de){P(!0);try{const ue=await r({provider:de,modelId:X});console.log("Model updated:",ue)}catch(ue){console.error("Failed to update model:",ue)}finally{P(!1)}}},W=async X=>{d(yf(X.id)),m(""),w(!1),C(!1),z(-1),X.id!==N&&(a(""),U(0)),X.connected&&setTimeout(()=>{L.current?.focus(),L.current?.click()},100)},{registerResetFn:K}=e3r();if(E.useEffect(()=>(K(()=>{if(L.current===document.activeElement||V.current===document.activeElement||k||l)return;N&&N!==s&&(!o||o==="")&&(d(yf(s)),a(i),s&&i&&r({provider:s,modelId:i}).catch(ue=>{console.error("Failed to reset model:",ue)}))}),()=>{K(null)}),[K,N,o,s,i,r,k,l]),R)return f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(ea,{}),f.jsx("span",{className:"text-sm text-gray-500",children:"Loading providers..."})]});const se=async()=>{if(!n){console.warn("Reset model function not provided");return}m(""),v(""),w(!1),O(!1),C(!1),c(!1);try{P(!0),await n()}catch(X){console.error("Failed to reset model:",X)}finally{P(!1)}};return f.jsxs("div",{className:"@container",children:[f.jsxs("div",{className:"flex flex-col @xs:flex-row items-stretch @xs:items-center gap-2 w-full",children:[f.jsxs(oT,{open:k,onOpenChange:X=>{C(X),X||(m(""),w(!1))},children:[f.jsx(aT,{asChild:!0,children:f.jsxs("div",{className:"relative w-full @xs:w-2/5",children:[!b&&N&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none z-10",children:f.jsxs("div",{className:"relative",children:[f.jsx(nq,{providerId:N,size:16}),(()=>{const X=j.find(te=>te.id===yf(N));return X?f.jsx("div",{className:`absolute -top-0.5 -right-0.5 w-1.5 h-1.5 rounded-full ${X.connected?"bg-green-500":"bg-red-500"}`,title:X.connected?"Connected":"Not connected"}):null})()]})}),(()=>{const X=j.find(te=>te.id===yf(N));return X?.docUrl?f.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 z-10",children:f.jsx(sl,{className:"w-3.5 h-3.5 text-gray-500 hover:text-gray-700 cursor-pointer",onClick:te=>{te.stopPropagation(),window.open(X.docUrl,"_blank")}})}):null})()]}),f.jsx(To,{"aria-label":"Search providers",spellCheck:"false",ref:V,className:`w-full ${!b&&N?"pl-8 pr-8":""}`,type:"text",value:b?p:j.find(X=>X.id===yf(N))?.name||N||"",onKeyDown:X=>{const te=j.filter(de=>de.name.toLowerCase().includes(p.toLowerCase())||de.id.toLowerCase().includes(p.toLowerCase()));if(!b&&X.key.length===1&&!X.ctrlKey&&!X.metaKey&&!X.shiftKey)w(!0),m(""),z(0);else if(k)switch(X.key){case"ArrowDown":X.preventDefault(),z(de=>de<te.length-1?de+1:0),setTimeout(()=>{document.querySelector('[data-provider-highlighted="true"]')?.scrollIntoView({block:"nearest"})},0);break;case"ArrowUp":X.preventDefault(),z(de=>de>0?de-1:te.length-1),setTimeout(()=>{document.querySelector('[data-provider-highlighted="true"]')?.scrollIntoView({block:"nearest"})},0);break;case"Enter":if(X.preventDefault(),M>=0&&M<te.length){const de=te[M];W(de)}break;case"Escape":X.preventDefault(),w(!1),m(""),z(-1),C(!1);break}},onFocus:()=>{if(!k){C(!0);const X=H.findIndex(te=>te.id===N);z(X>=0?X:0),setTimeout(()=>{document.querySelector('[data-provider-highlighted="true"]')?.scrollIntoView({block:"nearest"})},50)}},onChange:X=>{w(!0),m(X.target.value),z(0)},onClick:X=>{if(X.preventDefault(),!k){C(!0);const te=H.findIndex(de=>de.id===N);z(te>=0?te:0)}},placeholder:"Search providers..."})]})}),f.jsx(kw,{onOpenAutoFocus:X=>X.preventDefault(),className:"flex flex-col gap-0.5 w-[var(--radix-popover-trigger-width)] max-h-[300px] overflow-y-auto p-2",children:H.length===0?f.jsx("div",{className:"text-sm text-gray-500 p-2",children:"No providers found"}):H.map((X,te)=>{const de=X.id===N,ue=te===M;return f.jsxs("div",{"data-provider-highlighted":ue,className:`flex items-center gap-2 cursor-pointer hover:bg-surface5 px-3 py-2 rounded-md ${ue?"outline outline-2 outline-blue-500":""} ${de?"bg-surface5":""}`,onClick:()=>W(X),children:[f.jsxs("div",{className:"relative",children:[f.jsx(nq,{providerId:X.id,size:20}),f.jsx("div",{className:`absolute -top-1 -right-1 w-2 h-2 rounded-full ${X.connected?"bg-green-500":"bg-red-500"}`,title:X.connected?"Connected":"Not connected"})]}),f.jsx("div",{className:"flex-1",children:f.jsx("div",{className:"text-sm font-medium",children:X.name})}),f.jsx(sl,{className:"w-4 h-4 text-gray-500 hover:text-gray-700 cursor-pointer",onClick:Ae=>{Ae.stopPropagation(),window.open(X.docUrl||"#","_blank")}})]},X.id)})})]}),f.jsxs(oT,{open:l,onOpenChange:X=>{c(X),X||(v(""),O(!1))},children:[f.jsx(aT,{asChild:!0,children:f.jsx(To,{"aria-label":"Search models",spellCheck:"false",ref:L,className:"w-full @xs:w-3/5",type:"text",value:g||o,onChange:X=>{a(X.target.value),v(X.target.value),O(!0),U(0)},onClick:X=>{X.preventDefault(),l||c(!0)},onFocus:()=>{l||c(!0);const X=B.findIndex(te=>te.model===o);U(X>=0?X:0),setTimeout(()=>{document.querySelector('[data-model-highlighted="true"]')?.scrollIntoView({block:"nearest"})},50)},onKeyDown:X=>{if(X.key==="Tab"&&X.shiftKey){X.preventDefault(),V.current?.focus();return}switch(X.key){case"ArrowDown":X.preventDefault(),U(te=>te<B.length-1?te+1:te),setTimeout(()=>{document.querySelector('[data-model-highlighted="true"]')?.scrollIntoView({block:"nearest"})},0);break;case"ArrowUp":X.preventDefault(),U(te=>te>0?te-1:B.length-1),setTimeout(()=>{document.querySelector('[data-model-highlighted="true"]')?.scrollIntoView({block:"nearest"})},0);break;case"Enter":if(X.preventDefault(),Q>=0&&Q<B.length){const te=B[Q];v(""),O(!1),c(!1),F(te.model),setTimeout(()=>{const de=document.querySelector("textarea[data-chat-input]");de?de?.focus():document.querySelector("textarea")?.focus()},100)}else o&&o.trim()?(v(""),O(!1),c(!1),F(o.trim()),setTimeout(()=>{const te=document.querySelector("textarea[data-chat-input]");te?te?.focus():document.querySelector("textarea")?.focus()},100)):c(!1);break;case"Escape":X.preventDefault(),c(!1),U(-1);break}},placeholder:"Enter model name or select from suggestions..."})}),I.length>0&&f.jsx(kw,{className:"flex flex-col gap-0 w-[var(--radix-popover-trigger-width)] max-h-[calc(var(--radix-popover-content-available-height)-50px)] overflow-y-auto p-2",onOpenAutoFocus:X=>X.preventDefault(),children:T?f.jsx("div",{className:"p-4 text-center",children:f.jsx(Mf,{className:"h-4 w-4 animate-spin mx-auto"})}):B.length===0?f.jsx("div",{className:"p-4 text-center text-sm text-neutral3",children:"No models found"}):B.map((X,te)=>{const de=te===Q,ue=X.model===o;return f.jsx("div",{"data-model-highlighted":de,className:`flex items-center gap-2 px-3 py-2 cursor-pointer rounded-md hover:bg-surface5 ${de?"outline outline-2 outline-blue-500":""} ${ue?"bg-surface5":""}`,onMouseDown:Ae=>{Ae.preventDefault(),v(""),O(!1),F(X.model),L.current?.blur(),setTimeout(()=>{const _e=document.querySelector("textarea[data-chat-input]");if(_e)_e.focus();else{const De=document.querySelector("textarea");De&&De.focus()}},0)},children:X.model},`${X.provider}-${X.model}`)})})]}),f.jsx(Je,{variant:"light",size:"md",onClick:se,disabled:T,className:"flex items-center gap-1.5 text-xs whitespace-nowrap !border-0",title:"Reset to original model",children:f.jsx(Gdt,{className:"w-3.5 h-3.5"})})]}),(()=>{const X=j.find(te=>te.id===N);return X&&!X.connected?f.jsx("div",{className:"pt-2 p-2",children:f.jsxs(Fv,{variant:"warning",children:[f.jsx(Lv,{as:"h5",children:"Provider not connected"}),f.jsxs(iT,{as:"p",children:["Set the"," ",f.jsx("code",{className:"px-1 py-0.5 bg-yellow-100 dark:bg-yellow-900/50 rounded",children:Array.isArray(X.envVar)?X.envVar.join(", "):X.envVar})," ","environment"," ",Array.isArray(X.envVar)&&X.envVar.length>1?"variables":"variable"," ","to use this provider."]})]})}):null})(),J&&f.jsxs("div",{className:re("text-ui-sm text-neutral3 flex gap-2 mt-2 ml-2","[&>svg]:w-[1.1em] [&>svg]:h-[1.1em] [&>svg]:opacity-7 [&>svg]:flex-shrink-0 [&>svg]:mt-0.5"),children:[f.jsx(sl,{})," ",J]})]})},iq=E.forwardRef(({className:e,...t},r)=>f.jsx(TUe,{className:re("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent",kr.all,_p,"hover:brightness-110","disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:brightness-100","data-[state=checked]:bg-accent1 data-[state=checked]:shadow-glow-accent1","data-[state=unchecked]:bg-neutral2",e),...t,ref:r,children:f.jsx(_Cr,{className:re("pointer-events-none block h-4 w-4 rounded-full bg-white shadow-md","transition-all duration-normal ease-out-custom","data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0","data-[state=checked]:shadow-lg")})}));iq.displayName=TUe.displayName;const t3r=({modelList:e,updateModelInModelList:t,reorderModelList:r})=>{const[n,s]=E.useState(()=>e),i=n.length>1,o=n.filter(c=>c.enabled!==!1).length,a=c=>{if(!c.destination)return;const u=Array.from(n),[d]=u.splice(c.source.index,1);u.splice(c.destination.index,0,d),s(u),r({reorderedModelIds:u.map(p=>p.id)})},l=c=>(s(u=>u.map(d=>d.id===c.modelConfigId?{...d,enabled:c.enabled??d.enabled,maxRetries:c.maxRetries??d.maxRetries,model:{modelId:c.model?.modelId??d.model.modelId,provider:c.model?.provider??d.model.provider,modelVersion:d.model.modelVersion}}:d)),t(c));return f.jsx(IEr,{onDragEnd:a,children:f.jsx(bCr,{droppableId:"model-list",children:c=>f.jsxs("div",{...c.droppableProps,ref:c.innerRef,className:"flex flex-col gap-2",children:[n.map((u,d)=>f.jsx(JEr,{draggableId:u.id,index:d,children:p=>f.jsx("div",{ref:p.innerRef,...p.draggableProps,style:p.draggableProps.style,children:f.jsx(r3r,{modelConfig:u,updateModelInModelList:l,showDragHandle:i,dragHandleProps:p.dragHandleProps,isLastEnabled:u.enabled!==!1&&o===1})})},u.id)),c.placeholder]})})})},r3r=({modelConfig:e,updateModelInModelList:t,showDragHandle:r,dragHandleProps:n,isLastEnabled:s})=>{const[i,o]=E.useState(()=>e.enabled);return f.jsx("div",{className:"rounded-lg bg-surface1 hover:bg-surface4/50 transition-colors",children:f.jsxs("div",{className:"flex items-center gap-2 p-2",children:[r&&f.jsx("div",{...n,className:"text-neutral3 cursor-grab active:cursor-grabbing flex-shrink-0",children:f.jsx(qe,{children:f.jsx(sdt,{})})}),f.jsx("div",{className:"flex-1 min-w-0",children:f.jsx(Cte,{defaultProvider:e.model.provider,defaultModel:e.model.modelId,updateModel:a=>t({modelConfigId:e.id,model:a}),autoSave:!0})}),s?f.jsx(Dc,{children:f.jsxs(Ss,{children:[f.jsx(Os,{asChild:!0,children:f.jsx("span",{className:"flex-shrink-0",children:f.jsx(iq,{checked:i,disabled:!0,className:"pointer-events-none"})})}),f.jsx(is,{children:f.jsx("p",{children:"At least one model must be enabled"})})]})}):f.jsx(iq,{checked:i,onCheckedChange:a=>{o(a),t({modelConfigId:e.id,enabled:a})},className:"flex-shrink-0"})]})})};function n3r({agentId:e}){const t=rr();return bs({mutationFn:async({instructions:r,userComment:n})=>{try{return await t.getAgent(e).enhanceInstructions(r,n)}catch(s){const i=s instanceof Error?s.message:"Error enhancing prompt";throw Js.error(i),console.error("Error enhancing prompt:",s),s}}})}const s3r=({agentId:e})=>{const{isDirty:t,prompt:r,setPrompt:n,resetPrompt:s}=Ote();return f.jsxs("div",{className:"space-y-4",children:[t&&f.jsxs(Fv,{variant:"info",children:[f.jsx(Lv,{as:"h5",children:"Experiment mode"}),f.jsx(iT,{as:"p",children:"You're editing this agent's instructions. Changes are saved locally in your browser but won't update the agent's code."}),f.jsxs(Je,{variant:"light",onClick:s,children:[f.jsx(qe,{children:f.jsx(oG,{})}),"Reset"]})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx("div",{className:"rounded-md bg-surface4 p-1 font-mono",children:f.jsx(fc,{value:r,editable:!0,extensions:[FQe({base:_w,codeLanguages:IDr}),rt.lineWrapping],onChange:n,theme:BQe({settings:{caret:"#c6c6c6",fontFamily:"monospace",background:"transparent",gutterBackground:"transparent",gutterForeground:"#939393",gutterBorder:"none"}})})}),f.jsx(i3r,{agentId:e})]})]})},i3r=({agentId:e})=>{const{prompt:t,setPrompt:r}=Ote(),{mutateAsync:n,isPending:s}=n3r({agentId:e}),{data:i,isLoading:o,isError:a}=Sy(e),{data:l,isLoading:c}=kqe(),u=l?.providers||[],d=S=>{const O=yf(S);return u.find(C=>yf(C.id)===O)?.connected===!0},p=()=>i?.modelList&&i.modelList.length>0?i.modelList.some(S=>S.enabled!==!1&&d(S.model.provider)):i?.provider?d(i.provider):!1,m=o||c,g=!m&&!a&&p(),v=async S=>{S.preventDefault();const O=S.target,C=new FormData(O).get("userComment");try{const T=await n({instructions:t,userComment:C});O.reset(),r(T.new_prompt)}catch{}},b=s||!g,w=!m&&!g;return f.jsxs("form",{onSubmit:v,className:"space-y-2",children:[f.jsx(To,{name:"userComment",placeholder:"Enter your comment here...",className:"resize-none",disabled:b}),f.jsxs("div",{className:"flex justify-end items-center gap-2",children:[w&&f.jsx("span",{className:"text-xs text-yellow-200",children:"No model with a configured API key found."}),f.jsxs(Je,{variant:"light",type:"submit",disabled:b,children:[f.jsx(qe,{children:s?f.jsx(ea,{}):f.jsx(oG,{})}),"Enhance prompt"]})]})]})},ob=()=>{const e=rr(),{requestContext:t}=Qn();return ds({queryKey:["agents",t],queryFn:()=>e.listAgents(t)})},o3r=e=>{const t=rr(),r=hp();return bs({mutationFn:async n=>t.getAgent(e).updateModel(n),onSuccess:()=>{r.invalidateQueries({queryKey:["agent",e]})},onError:n=>{console.error("Error updating model",n)}})},a3r=e=>{const t=rr(),r=hp();return bs({mutationFn:async n=>t.getAgent(e).reorderModelList(n),onSuccess:()=>{r.invalidateQueries({queryKey:["agent",e]})},onError:n=>{console.error("Error reordering model list",n)}})},l3r=e=>{const t=rr(),r=hp();return bs({mutationFn:async n=>t.getAgent(e).updateModelInModelList(n),onSuccess:()=>{r.invalidateQueries({queryKey:["agent",e]})},onError:n=>{console.error("Error updating model in model list",n)}})},c3r=e=>{const t=rr(),r=hp();return bs({mutationFn:async()=>t.getAgent(e).resetModel(),onSuccess:()=>{r.invalidateQueries({queryKey:["agent",e]})},onError:n=>{console.error("Error resetting model",n)}})},u3r=({agents:e})=>{const{Link:t,paths:r}=Lr();return e.length===0?f.jsx(qD,{children:"No agents"}):f.jsx(ZD,{children:e.map(n=>f.jsx(Tw,{children:f.jsx(t,{href:r.agentLink(n.id),"data-testid":"agent-badge",children:f.jsx(Xt,{variant:"success",icon:f.jsx(Fo,{}),children:n.name})})},n.id))})},d3r=({agentId:e})=>{const{data:t,isLoading:r}=Sy(e),{data:n,isLoading:s}=QD(e),{mutate:i}=a3r(e),{mutateAsync:o}=c3r(e),{mutateAsync:a}=l3r(e),{mutateAsync:l}=o3r(e),c=!!n?.result;if(r||s)return f.jsx(fr,{className:"h-full"});if(!t)return f.jsx("div",{children:"Agent not found"});const u=t.agents??{},d=Object.keys(u).map(S=>({...u[S],id:S})),p=t.tools??{},m=Object.keys(p).map(S=>p[S]),g=t.workflows??{},v=Object.keys(g).map(S=>({id:S,...g[S]})),b=t.inputProcessors??[],w=t.outputProcessors??[];return f.jsxs(SIr,{children:[t?.description&&f.jsx(af,{title:"Description",children:f.jsx("p",{className:"text-sm text-neutral6",children:t.description})}),t.modelList?f.jsx(af,{title:"Models",children:f.jsx(t3r,{modelList:t.modelList,updateModelInModelList:a,reorderModelList:i})}):f.jsx(af,{title:"Model",hint:t.modelVersion==="v2"||t.modelVersion==="v3"?void 0:{link:"https://mastra.ai/guides/migrations/vnext-to-standard-apis",title:"You are using a legacy v1 model",icon:f.jsx(I0,{fontSize:14,className:"mb-0.5"})},children:f.jsx(Cte,{defaultProvider:t.provider,defaultModel:t.modelId,updateModel:l,resetModel:o})}),f.jsx(af,{title:"Memory",hint:{link:"https://mastra.ai/en/docs/agents/agent-memory",title:"Agent Memory documentation"},children:c?f.jsxs(Xt,{icon:f.jsx(_2r,{}),variant:"success",className:"font-medium",children:[f.jsx("span",{className:"sr-only",children:"Memory is enabled"}),f.jsx("span",{"aria-hidden":"true",children:"On"})]}):f.jsxs(Fv,{variant:"warning",children:[f.jsx(Lv,{as:"h5",children:"Memory not enabled"}),f.jsxs(iT,{as:"p",children:["Thread messages will not be stored. To activate memory, see the"," ",f.jsx("a",{href:"https://mastra.ai/en/docs/agents/agent-memory",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"documentation"}),"."]})]})}),d.length>0&&f.jsx(af,{title:"Agents",hint:{link:"https://mastra.ai/en/docs/agents/overview",title:"Agents documentation"},children:f.jsx(u3r,{agents:d})}),f.jsx(af,{title:"Tools",hint:{link:"https://mastra.ai/en/docs/agents/using-tools-and-mcp",title:"Using Tools and MCP documentation"},children:f.jsx(f3r,{tools:m,agentId:e})}),f.jsx(af,{title:"Workflows",hint:{link:"https://mastra.ai/en/docs/workflows/overview",title:"Workflows documentation"},children:f.jsx(p3r,{workflows:v})}),(b.length>0||w.length>0)&&f.jsx(af,{title:"Processors",hint:{link:"https://mastra.ai/docs/agents/processors",title:"Processors documentation"},children:f.jsx(m3r,{inputProcessors:b,outputProcessors:w})}),f.jsx(af,{title:"Scorers",children:f.jsx(h3r,{entityId:t.name,entityType:"AGENT"})}),f.jsx(af,{title:"System Prompt",children:f.jsx(s3r,{agentId:e})})]})},f3r=({tools:e,agentId:t})=>{const{Link:r,paths:n}=Lr();return e.length===0?f.jsx(qD,{children:"No tools"}):f.jsx(ZD,{children:e.map(s=>f.jsx(Tw,{children:f.jsx(r,{href:n.agentToolLink(t,s.id),"data-testid":"tool-badge",children:f.jsx(Xt,{icon:f.jsx(Cu,{className:"text-accent6"}),children:s.id})})},s.id))})},p3r=({workflows:e})=>{const{Link:t,paths:r}=Lr();return e.length===0?f.jsx(qD,{children:"No workflows"}):f.jsx(ZD,{children:e.map(n=>f.jsx(Tw,{children:f.jsx(t,{href:r.workflowLink(n.id),"data-testid":"workflow-badge",children:f.jsx(Xt,{icon:f.jsx(Tu,{className:"text-accent3"}),children:n.name})})},n.id))})},h3r=({entityId:e,entityType:t})=>{const{Link:r,paths:n}=Lr(),{data:s={},isLoading:i}=rR(),o=Object.keys(s).filter(a=>{const l=s[a];return t==="AGENT"?l.agentNames?.includes?.(e):l.workflowIds.includes(e)}).map(a=>({...s[a],id:a}));return i?f.jsx(wte,{}):o.length===0?f.jsx(qD,{children:"No Scorers"}):f.jsx(ZD,{children:o.map(a=>f.jsx(Tw,{children:f.jsx(r,{href:n.scorerLink(a.id),"data-testid":"scorer-badge",children:f.jsx(Xt,{icon:f.jsx(RI,{className:"text-neutral3"}),children:a.scorer.config.name})})},a.id))})},m3r=({inputProcessors:e,outputProcessors:t})=>{const{Link:r,paths:n}=Lr();if(e.length===0&&t.length===0)return f.jsx(qD,{children:"No processors"});const s=e[0]?.id,i=t[0]?.id;return f.jsxs(ZD,{children:[e.length>0&&s&&f.jsx(Tw,{children:f.jsx(r,{href:`${n.workflowLink(s)}/graph`,"data-testid":"processor-badge",children:f.jsx(Xt,{icon:f.jsx(F4,{className:"text-accent4"}),children:"input"})})}),t.length>0&&i&&f.jsx(Tw,{children:f.jsx(r,{href:`${n.workflowLink(i)}/graph`,"data-testid":"processor-badge",children:f.jsx(Xt,{icon:f.jsx(F4,{className:"text-accent5"}),children:"output"})})})]})},g3r=({agentId:e})=>{const{data:t,isLoading:r}=Sy(e),{handleCopy:n}=np({text:e}),s=t?.name||"";return f.jsx(Dc,{children:f.jsx(tqe,{icon:f.jsx(Fo,{}),title:s,isLoading:r,children:f.jsxs(Ss,{children:[f.jsx(Os,{asChild:!0,children:f.jsx("button",{onClick:n,className:"h-badge-default shrink-0",children:f.jsx(Xt,{icon:f.jsx(cu,{}),variant:"default",children:e})})}),f.jsx(is,{children:"Copy Agent ID for use in code"})]})})})},Eqe=({children:e})=>f.jsx("nav",{className:"bg-surface2 min-h-full overflow-hidden",children:e}),Z4=({children:e,as:t="a",href:r,className:n,prefetch:s,to:i})=>f.jsx(t,{href:r,prefetch:s,to:i,className:re("text-ui-sm flex h-full w-full flex-col justify-center font-medium cursor-pointer",kr.colors,n),children:e}),Cqe=({children:e})=>f.jsx("ol",{"data-testid":"thread-list",children:e}),q4=({children:e,isActive:t,className:r})=>f.jsx("li",{className:re("border-b border-border1 group flex h-[54px] items-center justify-between gap-2 px-3 py-2",kr.colors,"hover:bg-surface3",t&&"bg-accent1Dark",r),children:e}),Tqe=({onClick:e})=>f.jsx(Je,{variant:"ghost",className:re("shrink-0 opacity-0",kr.all,"group-focus-within:opacity-100 group-hover:opacity-100","hover:bg-surface4 hover:text-accent2"),onClick:e,children:f.jsx(qe,{children:f.jsx(Ia,{"aria-label":"delete thread",className:"text-neutral3 hover:text-accent2 transition-colors"})})}),y3r=WDr,v3r=GDr,Dqe=XDr;function gs({open:e,onOpenChange:t,children:r}){return f.jsx(y3r,{open:e,onOpenChange:t,children:r})}const Tte=E.forwardRef(({className:e,...t},r)=>f.jsx(tZe,{className:re("fixed inset-0 z-50 bg-overlay backdrop-blur-sm","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:duration-200","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:duration-150",e),...t,ref:r}));Tte.displayName=tZe.displayName;const Aqe=E.forwardRef(({className:e,...t},r)=>f.jsxs(Dqe,{children:[f.jsx(Tte,{}),f.jsx(rZe,{ref:r,className:re("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border1 bg-surface3 p-6 shadow-dialog rounded-md","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] data-[state=open]:duration-200","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=closed]:duration-150",e),...t})]}));Aqe.displayName=rZe.displayName;const Pqe=({className:e,...t})=>f.jsx("div",{className:re("flex flex-col space-y-2 text-center sm:text-left",e),...t});Pqe.displayName="AlertDialogHeader";const $qe=({className:e,...t})=>f.jsx("div",{className:re("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});$qe.displayName="AlertDialogFooter";const Iqe=E.forwardRef(({className:e,...t},r)=>f.jsx(iZe,{ref:r,className:re("text-lg font-semibold",e),...t}));Iqe.displayName=iZe.displayName;const Nqe=E.forwardRef(({className:e,...t},r)=>f.jsx(oZe,{ref:r,className:re("text-sm text-neutral3",e),...t}));Nqe.displayName=oZe.displayName;const Rqe=E.forwardRef(({className:e,...t},r)=>f.jsx(nZe,{ref:r,className:re(CZe(),e),...t}));Rqe.displayName=nZe.displayName;const Mqe=E.forwardRef(({className:e,...t},r)=>f.jsx(sZe,{ref:r,className:re(CZe({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Mqe.displayName=sZe.displayName;gs.Trigger=v3r;gs.Portal=Dqe;gs.Overlay=Tte;gs.Content=Aqe;gs.Header=Pqe;gs.Footer=$qe;gs.Title=Iqe;gs.Description=Nqe;gs.Action=Rqe;gs.Cancel=Mqe;const b3r=({threads:e,isLoading:t,threadId:r,onDelete:n,resourceId:s,resourceType:i})=>{const{Link:o,paths:a}=Lr(),[l,c]=E.useState(null);if(t)return f.jsx(w3r,{});const u=i==="agent"?a.agentNewThreadLink(s):a.networkNewThreadLink(s);return f.jsxs("div",{className:"overflow-y-auto h-full w-full",children:[f.jsx(Eqe,{children:f.jsxs(Cqe,{children:[f.jsx(q4,{children:f.jsx(Z4,{as:o,to:u,children:f.jsxs("span",{className:"text-accent1 flex items-center gap-4",children:[f.jsx(qe,{className:"bg-surface4 rounded-lg",size:"lg",children:f.jsx($0,{})}),"New Chat"]})})}),e.length===0&&f.jsx(Ze,{as:"p",variant:"ui-sm",className:"text-neutral3 py-3 px-5",children:"Your conversations will appear here once you start chatting!"}),e.map(d=>{const p=d.id===r,m=i==="agent"?a.agentThreadLink(s,d.id):a.networkThreadLink(s,d.id);return f.jsxs(q4,{isActive:p,children:[f.jsxs(Z4,{as:o,to:m,children:[f.jsx(O3r,{title:d.title,id:d.id}),f.jsx("span",{children:_3r(d.createdAt)})]}),f.jsx(Tqe,{onClick:()=>c(d.id)})]},d.id)})]})}),f.jsx(x3r,{open:!!l,onOpenChange:()=>c(null),onDelete:()=>{l&&n(l)}})]})},x3r=({open:e,onOpenChange:t,onDelete:r})=>f.jsx(gs,{open:e,onOpenChange:t,children:f.jsxs(gs.Content,{children:[f.jsxs(gs.Header,{children:[f.jsx(gs.Title,{children:"Are you absolutely sure?"}),f.jsx(gs.Description,{children:"This action cannot be undone. This will permanently delete your chat and remove it from our servers."})]}),f.jsxs(gs.Footer,{children:[f.jsx(gs.Cancel,{children:"Cancel"}),f.jsx(gs.Action,{onClick:r,children:"Continue"})]})]})}),w3r=()=>f.jsxs("div",{className:"p-4 w-full h-full space-y-2",children:[f.jsx("div",{className:"flex justify-end",children:f.jsx(fr,{className:"h-9 w-9"})}),f.jsx(fr,{className:"h-4"}),f.jsx(fr,{className:"h-4"}),f.jsx(fr,{className:"h-4"}),f.jsx(fr,{className:"h-4"}),f.jsx(fr,{className:"h-4"})]});function S3r(e){return/^New Thread \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/.test(e)}function O3r({title:e,id:t}){return e?S3r(e)?f.jsxs("span",{className:"text-neutral3",children:["Thread ",t?t.substring(t.length-5):null]}):f.jsx("span",{className:"truncate max-w-[14rem] text-neutral3",children:e}):null}const _3r=e=>{const t={month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0};return new Date(e).toLocaleString("en-us",t).replace(","," at")};function k3r({value:e,onValueChange:t,placeholder:r="Select an agent...",searchPlaceholder:n="Search agents...",emptyText:s="No agents found.",className:i,disabled:o=!1}){const{data:a={},isLoading:l,isError:c,error:u}=ob(),{navigate:d,paths:p}=Lr();E.useEffect(()=>{if(c){const v=u instanceof Error?u.message:"Failed to load agents";Js.error(`Error loading agents: ${v}`)}},[c,u]);const m=Object.keys(a).map(v=>({label:a[v]?.name||v,value:v})),g=v=>{t?t(v):v&&v!==e&&d(p.agentLink(v))};return f.jsx(UD,{options:m,value:e,onValueChange:g,placeholder:l?"Loading agents...":r,searchPlaceholder:n,emptyText:s,className:i,disabled:o||l||c})}const E3r=()=>{const e=rr();return bs({mutationFn:async({agentId:t,toolId:r,input:n,playgroundRequestContext:s})=>{const i=new al;Object.entries(s??{}).forEach(([o,a])=>{i.set(o,a)});try{return await e.getAgent(t).executeTool(r,{data:n,requestContext:i})}catch(o){throw mn.error("Error executing agent tool"),console.error("Error executing tool:",o),o}}})},jqe={agent:Fo,workflow:Tu,tool:Cu},C3r=({toolDescription:e,toolId:t,toolType:r})=>{const n=jqe[r||"tool"];return f.jsx("div",{className:"p-5 border-b border-border1",children:f.jsxs("div",{className:"text-neutral6 flex gap-2",children:[f.jsx("div",{children:f.jsx(qe,{size:"lg",className:"bg-surface4 rounded-md p-1",children:f.jsx(n,{})})}),f.jsx("div",{className:"flex gap-4 justify-between w-full min-w-0",children:f.jsxs("div",{children:[f.jsx(Ze,{variant:"header-md",as:"h2",className:"font-medium truncate",children:t}),f.jsx(Ze,{variant:"ui-sm",className:"text-neutral3",children:e})]})})]})})},Dte=({isExecutingTool:e,zodInputSchema:t,handleExecuteTool:r,executionResult:n,errorString:s,toolDescription:i,toolId:o,toolType:a})=>{const l=wy(),c=JSON.stringify(n??{},null,2);return f.jsxs(Oc,{hasLeftServiceColumn:!0,className:"relative",children:[f.jsxs("div",{className:"bg-surface2 border-r border-border1 w-[20rem]",children:[f.jsx(C3r,{toolDescription:i,toolId:o,toolType:a}),f.jsx("div",{className:"p-5 overflow-y-auto",children:f.jsx(ZZe,{isSubmitLoading:e,schema:t,onSubmit:u=>{r(u)},className:"h-auto pb-7"})})]}),f.jsx("div",{className:"absolute top-4 right-4 z-10",children:f.jsx(Uf,{content:c,tooltip:"Copy JSON result to clipboard"})}),f.jsx("div",{className:"p-5 h-full relative overflow-x-auto overflow-y-auto",children:f.jsx(fc,{value:s||c,editable:!0,theme:l,extensions:[oc]})})]})},T3r=({toolId:e,agentId:t})=>{const{data:r,isLoading:n,error:s}=Sy(t),i=Object.values(r?.tools??{}).find(p=>p.id===e),{mutateAsync:o,isPending:a,data:l}=E3r(),{requestContext:c}=Qn();E.useEffect(()=>{if(s){const p=s instanceof Error?s.message:"Failed to load agent";Js.error(`Error loading agent: ${p}`)}},[s]);const u=async p=>{i&&await o({agentId:t,toolId:i.id,input:p,playgroundRequestContext:c})},d=i?.inputSchema?Tg(kg(Mv(i?.inputSchema))):Uw({});return n||s?null:i?f.jsx(Dte,{executionResult:l,isExecutingTool:a,zodInputSchema:d,handleExecuteTool:u,toolDescription:i.description,toolId:i.id}):f.jsx("div",{className:"py-12 text-center px-6",children:f.jsx(Ze,{variant:"header-md",className:"text-neutral3",children:"Tool not found"})})};function D3r({children:e}){const t=e.replace(/\\n/g,`
|
|
563
563
|
`);return f.jsx(eVe,{remarkPlugins:[FDe],components:P3r,className:"space-y-3",children:t})}const Fqe=me.memo(({children:e,language:t,...r})=>{const[n,s]=E.useState([]);return E.useEffect(()=>{M2r(e,t).then(i=>{i&&s(i)})},[e,t]),n.length?f.jsx("pre",{...r,children:f.jsx("code",{children:n.map((i,o)=>f.jsxs(f.Fragment,{children:[f.jsx("span",{children:i.map((a,l)=>{const c=typeof a.htmlStyle=="string"?void 0:a.htmlStyle;return f.jsx("span",{className:"text-shiki-light bg-shiki-light-bg dark:text-shiki-dark dark:bg-shiki-dark-bg",style:c,children:a.content},l)})},o),o!==n.length-1&&`
|
|
564
|
-
`]}))})}):f.jsx("pre",{...r,children:e})});Fqe.displayName="HighlightedCode";const A3r=({children:e,className:t,language:r,...n})=>{const s=typeof e=="string"?e:oq(e),i=re("overflow-x-scroll rounded-md border bg-surface1/50 p-4 font-mono text-sm [scrollbar-width:none]",t);return f.jsxs("div",{className:"group/code relative mb-4",children:[f.jsx(E.Suspense,{fallback:f.jsx("pre",{className:i,...n,children:e}),children:f.jsx(Fqe,{language:r,className:i,children:s})}),f.jsx("div",{className:"invisible absolute right-2 top-2 flex space-x-1 rounded-lg p-1 opacity-0 transition-all duration-200 group-hover/code:visible group-hover/code:opacity-100",children:f.jsx(Uf,{content:s,copyMessage:"Copied code to clipboard"})})]})};function oq(e){if(typeof e=="string")return e;if(e?.props?.children){let t=e.props.children;return Array.isArray(t)?t.map(r=>oq(r)).join(""):oq(t)}return""}const P3r={h1:({children:e,...t})=>f.jsx("h1",{className:"text-2xl font-semibold",...t,children:e}),h2:({children:e,...t})=>f.jsx("h2",{className:"font-semibold text-xl",...t,children:e}),h3:({children:e,...t})=>f.jsx("h3",{className:"font-semibold text-lg",...t,children:e}),h4:({children:e,...t})=>f.jsx("h4",{className:"font-semibold text-base",...t,children:e}),h5:({children:e,...t})=>f.jsx("h5",{className:"font-medium",...t,children:e}),strong:({children:e,...t})=>f.jsx("strong",{className:"font-semibold",...t,children:e}),a:({children:e,...t})=>f.jsx("a",{className:"underline underline-offset-2",...t,children:e}),blockquote:({children:e,...t})=>f.jsx("blockquote",{className:"border-l-2 border-neutral6 pl-4",...t,children:e}),code:({children:e,className:t,...r})=>{const n=/language-(\w+)/.exec(t||"");return n?f.jsx(A3r,{className:t,language:n[1],...r,children:e}):f.jsx("code",{className:re("font-mono [:not(pre)>&]:rounded-md [:not(pre)>&]:bg-surface1/50 [:not(pre)>&]:px-1 [:not(pre)>&]:py-0.5"),...r,children:e})},pre:({children:e})=>e,ol:({children:e,...t})=>f.jsx("ol",{className:"list-decimal space-y-2 pl-6",...t,children:e}),ul:({children:e,...t})=>f.jsx("ul",{className:"list-disc space-y-2 pl-6",...t,children:e}),li:({children:e,...t})=>f.jsx("li",{className:"my-1.5",...t,children:e}),table:({children:e,...t})=>f.jsx("table",{className:"w-full border-collapse overflow-y-auto rounded-md border border-neutral6/20",...t,children:e}),th:({children:e,...t})=>f.jsx("th",{className:"border border-neutral6/20 px-4 py-2 text-left font-bold [&[align=center]]:text-center [&[align=right]]:text-right",...t,children:e}),td:({children:e,...t})=>f.jsx("td",{className:"border border-neutral6/20 px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right",...t,children:e}),tr:({children:e,...t})=>f.jsx("tr",{className:"m-0 border-t p-0 even:bg-surface4",...t,children:e}),p:({children:e,...t})=>f.jsx("p",{className:"whitespace-pre-wrap leading-relaxed",...t,children:e}),hr:({...e})=>f.jsx("hr",{className:"border-neutral6/20",...e})};function $3r({content:e,height:t="150px",isCopied:r=!1,isDraft:n=!1,onCopy:s,className:i=""}){return f.jsx("div",{className:`rounded-md border ${i}`,style:{height:t},children:f.jsx(BD,{className:"h-full",children:f.jsxs("div",{className:"p-2 cursor-pointer hover:bg-surface4/50 transition-colors group relative",onClick:s,children:[f.jsx("pre",{className:"text-ui-xs whitespace-pre-wrap font-mono",children:e}),n&&f.jsx("div",{className:"mt-1.5",children:f.jsx("span",{className:"text-ui-xs px-1.5 py-0.5 rounded-full bg-yellow-500/20 text-yellow-500",children:"Draft - Save changes to apply"})}),r&&f.jsx("span",{className:"absolute top-2 right-2 text-ui-xs px-1.5 py-0.5 rounded-full bg-green-500/20 text-green-500",children:"Copied!"}),s&&f.jsx("span",{className:"absolute top-2 right-2 text-ui-xs px-1.5 py-0.5 rounded-full bg-surface4 text-neutral4 opacity-0 group-hover:opacity-100 transition-opacity",children:"Click to copy"})]})})})}const I3r=({agentId:e})=>{const{threadExists:t,workingMemoryData:r,workingMemorySource:n,isLoading:s,isUpdating:i,updateWorkingMemory:o}=hqe(),{data:a,isLoading:l}=_te(e),u=!!a?.config?.workingMemory?.enabled;if(s||l)return f.jsx(fr,{className:"h-32 w-full"});const{isCopied:d,handleCopy:p}=np({text:r??"",copyMessage:"Working memory copied!"}),[m,g]=E.useState(r??""),[v,b]=E.useState(!1);return me.useEffect(()=>{g(r??"")},[r]),f.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[f.jsx("h3",{className:"text-sm font-medium text-neutral5",children:"Working Memory"}),u&&n&&f.jsx("span",{className:re("text-xs font-medium px-2 py-0.5 rounded",n==="resource"?"bg-purple-500/20 text-purple-400":"bg-blue-500/20 text-blue-400"),title:n==="resource"?"Shared across all threads for this agent":"Specific to this conversation thread",children:n})]}),u&&!t&&f.jsx("p",{className:"text-xs text-neutral3",children:"Send a message to the agent to enable working memory."})]}),u?f.jsxs(f.Fragment,{children:[v?f.jsx("textarea",{className:"w-full min-h-[150px] p-3 border border-border1 rounded-lg bg-surface3 font-mono text-sm text-neutral5 resize-none",value:m,onChange:w=>g(w.target.value),disabled:i,placeholder:"Enter working memory content..."}):f.jsx(f.Fragment,{children:r?f.jsx(f.Fragment,{children:r.trim().startsWith("{")?f.jsx($3r,{content:r||"",isCopied:d,onCopy:p,className:"bg-surface3 text-sm font-mono min-h-[150px] border border-border1 rounded-lg"}):f.jsx(f.Fragment,{children:f.jsx("div",{className:"bg-surface3 border border-border1 rounded-lg",style:{height:"300px"},children:f.jsx(BD,{className:"h-full",children:f.jsxs("div",{className:"p-3 cursor-pointer hover:bg-surface4/20 transition-colors relative group text-ui-xs",onClick:p,children:[f.jsx(D3r,{children:r}),d&&f.jsx("span",{className:"absolute top-2 right-2 text-ui-xs px-1.5 py-0.5 rounded-full bg-green-500/20 text-green-500",children:"Copied!"}),f.jsx("span",{className:"absolute top-2 right-2 text-ui-xs px-1.5 py-0.5 rounded-full bg-surface3 text-neutral4 opacity-0 group-hover:opacity-100 transition-opacity",children:"Click to copy"})]})})})})}):f.jsx("div",{className:"text-sm text-neutral3 font-mono",children:'No working memory content yet. Click "Edit Working Memory" to add content.'})}),f.jsx("div",{className:"flex gap-2",children:v?f.jsxs(f.Fragment,{children:[f.jsx(Je,{onClick:async()=>{try{await o(m),b(!1)}catch(w){console.error("Failed to update working memory:",w),mn.error("Failed to update working memory")}},disabled:i,className:"text-xs",children:i?f.jsx(oG,{className:"w-3 h-3 animate-spin"}):"Save Changes"}),f.jsx(Je,{onClick:()=>{g(r??""),b(!1)},disabled:i,className:"text-xs",children:"Cancel"})]}):f.jsx(f.Fragment,{children:t?f.jsx(Je,{onClick:()=>b(!0),disabled:i,className:"text-xs",children:"Edit Working Memory"}):f.jsxs(Ss,{children:[f.jsx(Os,{asChild:!0,children:f.jsx("span",{tabIndex:0,children:f.jsx(Je,{disabled:!0,className:"text-xs pointer-events-none",children:"Edit Working Memory"})})}),f.jsx(is,{children:f.jsx("p",{children:"Working memory will be available after the agent calls updateWorkingMemory"})})]})})})]}):f.jsxs("div",{className:"bg-surface3 border border-border1 rounded-lg p-4",children:[f.jsx("p",{className:"text-sm text-neutral3 mb-3",children:"Working memory is not enabled for this agent. Enable it to maintain context across conversations."}),f.jsxs("a",{href:"https://mastra.ai/en/docs/memory/working-memory",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-sm text-blue-400 hover:text-blue-300 transition-colors",children:["Learn about working memory",f.jsx(FT,{className:"w-3 h-3"})]})]})]})},N3r=({agentId:e})=>{const{data:t,isLoading:r}=_te(e),[n,s]=E.useState(new Set(["General","Semantic Recall"])),i=t?.config,o=E.useMemo(()=>{if(!i)return[];const c=!!i,u=[{title:"General",items:[{label:"Memory Enabled",value:c,badge:c?"success":void 0},{label:"Last Messages",value:i.lastMessages||0},{label:"Auto-generate Titles",value:!!i.generateTitle,badge:i.generateTitle?"info":void 0}]}];if(i.semanticRecall){const d=!!i.semanticRecall,p=typeof i.semanticRecall=="object"?i.semanticRecall:{};u.push({title:"Semantic Recall",items:[{label:"Enabled",value:d,badge:d?"success":void 0},...d?[{label:"Scope",value:p.scope||"resource"},{label:"Top K Results",value:p.topK||4},{label:"Message Range",value:typeof p.messageRange=="object"?`${p.messageRange.before||1} before, ${p.messageRange.after||1} after`:p.messageRange!==void 0?`${p.messageRange} before, ${p.messageRange} after`:"1 before, 1 after"}]:[]]})}return u},[i]),a=c=>{const u=new Set(n);u.has(c)?u.delete(c):u.add(c),s(u)},l=(c,u)=>{if(typeof c=="boolean")return f.jsx("span",{className:re("text-xs font-medium px-2 py-0.5 rounded",c?u==="info"?"bg-blue-500/20 text-blue-400":"bg-green-500/20 text-green-400":"bg-red-500/20 text-red-400"),children:c?"Yes":"No"});if(u){const d={success:"bg-green-500/20 text-green-400",info:"bg-blue-500/20 text-blue-400",warning:"bg-yellow-500/20 text-yellow-400"};return f.jsx("span",{className:re("text-xs font-medium px-2 py-0.5 rounded",d[u]),children:c})}return f.jsx("span",{className:"text-xs text-neutral3",children:c})};return r?f.jsx("div",{className:"p-4",children:f.jsx(fr,{className:"h-32 w-full"})}):!i||o.length===0?f.jsxs("div",{className:"p-4",children:[f.jsx("h3",{className:"text-sm font-medium text-neutral5 mb-3",children:"Memory Configuration"}),f.jsx("p",{className:"text-xs text-neutral3",children:"No memory configuration available"})]}):f.jsxs("div",{className:"p-4",children:[f.jsx("h3",{className:"text-sm font-medium text-neutral5 mb-3",children:"Memory Configuration"}),f.jsx("div",{className:"space-y-2",children:o.map(c=>f.jsxs("div",{className:"border border-border1 rounded-lg bg-surface3",children:[f.jsxs("button",{onClick:()=>a(c.title),className:"w-full px-3 py-2 flex items-center justify-between hover:bg-surface4 transition-colors rounded-t-lg",children:[f.jsx("span",{className:"text-xs font-medium text-neutral5",children:c.title}),n.has(c.title)?f.jsx(Vd,{className:"w-3 h-3 text-neutral3"}):f.jsx(qN,{className:"w-3 h-3 text-neutral3"})]}),n.has(c.title)&&f.jsx("div",{className:"px-3 pb-2 space-y-1",children:c.items.map(u=>f.jsxs("div",{className:"flex items-center justify-between py-1",children:[f.jsx("span",{className:"text-xs text-neutral3",children:u.label}),l(u.value??"",u.badge)]},`${c.title}-${u.label}`))})]},c.title))})]})},R3r=e=>{const r=Math.floor((new Date().getTime()-e.getTime())/1e3);return r<60?"just now":r<3600?`${Math.floor(r/60)}m ago`:r<86400?`${Math.floor(r/3600)}h ago`:r<604800?`${Math.floor(r/86400)}d ago`:e.toLocaleDateString()},M3r=({searchMemory:e,onResultClick:t,className:r,currentThreadId:n,chatInputValue:s})=>{const[i,o]=E.useState(""),[a,l]=E.useState([]),[c,u]=E.useState(!1),[d,p]=E.useState(!1),[m,g]=E.useState(null),v=E.useRef(void 0),b=E.useRef(null),w=E.useRef(n),S=E.useRef(0),O=E.useRef(null),k=E.useCallback(async M=>{if(!M.trim()){g(null);return}u(!0),g(null);try{const z=await e(M);l(z.results),p(Q=>Q||z.results.length>0)}catch(z){g("Failed to search memory"),console.error("Memory search error:",z)}finally{u(!1)}},[e]),C=E.useCallback(M=>{const z=M.target.value;if(o(z),v.current&&clearTimeout(v.current),z.trim()){const Q=Date.now(),U=Q-S.current;if(U>=500)u(!0),k(z),S.current=Q;else{u(!0),O.current=z;const L=500-U;v.current=setTimeout(()=>{O.current&&(k(O.current),S.current=Date.now(),O.current=null)},L)}}else l([]),p(!1),u(!1),O.current=null},[k]),T=E.useCallback(M=>{M.key==="Enter"&&(M.preventDefault(),v.current&&clearTimeout(v.current),k(i))},[i,k]);E.useEffect(()=>()=>{v.current&&clearTimeout(v.current)},[]),E.useEffect(()=>{const M=z=>{b.current&&!b.current.contains(z.target)&&p(!1)};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[]),E.useEffect(()=>{w.current!==n&&i.trim()&&k(i),w.current=n},[n,i,k]),E.useEffect(()=>{if(s!==void 0&&s!==i)if(o(s),v.current&&clearTimeout(v.current),s.trim()){const M=Date.now(),z=M-S.current;if(z>=500)u(!0),k(s),S.current=M;else{u(!0),O.current=s;const Q=500-z;v.current=setTimeout(()=>{O.current&&(k(O.current),S.current=Date.now(),O.current=null)},Q)}}else l([]),p(!1),u(!1),O.current=null;return()=>{v.current&&clearTimeout(v.current)}},[s]);const P=(M,z)=>{t?.(M,z)},A=()=>{o(""),l([]),p(!1),g(null),v.current&&clearTimeout(v.current)},R=(M,z=100)=>M.length<=z?M:M.substring(0,z)+"...";return f.jsxs("div",{className:re("flex flex-col h-full",r),ref:b,children:[f.jsxs("div",{className:"relative shrink-0",children:[f.jsx(aG,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-neutral3"}),f.jsx(To,{type:"text",value:i,onChange:C,onKeyDown:T,placeholder:"Search memory...",className:"pl-10 pr-10 bg-surface3 border-border1"}),i&&f.jsx(Je,{onClick:A,className:"absolute right-1 top-1/2 transform -translate-y-1/2 h-6 w-6 p-0",children:f.jsx(Ia,{className:"h-4 w-4"})})]}),(d||i&&(c||a.length===0))&&f.jsx("div",{className:"mt-2 flex-1 bg-surface3 border border-border1 rounded-lg shadow-lg overflow-y-auto",children:m?f.jsx("div",{className:"p-4 text-center",children:f.jsx(Ze,{variant:"ui-sm",className:"text-red-500",children:m})}):c&&a.length===0?f.jsx("div",{className:"p-4 text-center",children:f.jsx(Ze,{variant:"ui-sm",className:"text-neutral3",children:"Searching..."})}):a.length===0?f.jsx("div",{className:"p-4 text-center",children:f.jsxs(Ze,{variant:"ui-sm",className:"text-neutral3",children:['No results found for "',i,'"']})}):f.jsx("div",{className:"py-2",children:a.map(M=>f.jsx("button",{onClick:()=>P(M.id,M.threadId),className:re("w-full px-4 py-3 hover:bg-surface4 transition-colors duration-150 text-left border-b border-border1 last:border-b-0",M.threadId!==n&&"border-l-2 border-l-blue-400"),children:f.jsxs("div",{className:"flex flex-col gap-2",children:[M.context?.before&&M.context.before.length>0&&f.jsx("div",{className:"opacity-50 text-xs space-y-1",children:M.context.before.map((z,Q)=>f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsxs("span",{className:"font-medium",children:[z.role,":"]}),f.jsx("span",{className:"text-neutral3",children:R(z.content,50)})]},Q))}),f.jsx("div",{className:"flex items-start justify-between gap-2",children:f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[f.jsx("span",{className:re("text-xs font-medium px-2 py-0.5 rounded",M.role==="user"?"bg-blue-500/20 text-blue-400":"bg-green-500/20 text-green-400"),children:M.role}),f.jsx(Ze,{variant:"ui-xs",className:"text-neutral3",children:R3r(new Date(M.createdAt))}),M.threadTitle&&f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsxs(Ze,{variant:"ui-xs",className:re("truncate max-w-[150px]",M.threadId!==n?"text-blue-400 font-medium":"text-neutral3"),title:M.threadTitle,children:["• ",M.threadTitle]}),M.threadId!==n&&f.jsx(FT,{className:"w-3 h-3 text-blue-400"})]})]}),f.jsx(Ze,{variant:"ui-sm",className:"text-neutral5 break-words",children:R(M.content)})]})}),M.context?.after&&M.context.after.length>0&&f.jsx("div",{className:"opacity-50 text-xs space-y-1",children:M.context.after.map((z,Q)=>f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsxs("span",{className:"font-medium",children:[z.role,":"]}),f.jsx("span",{className:"text-neutral3",children:R(z.content,50)})]},Q))})]})},M.id))})})]})};function j3r({agentId:e,threadId:t}){const{threadInput:r}=dqe(),{paths:n,navigate:s}=Lr(),{data:i,isLoading:o}=_te(e),l=!!i?.config?.semanticRecall,{mutateAsync:c,data:u}=cIr({agentId:e||"",resourceId:e||"",threadId:t}),{mutateAsync:d,isPending:p}=uIr(),m=E.useCallback(async()=>{if(!t||!e)return;const b=await d({threadId:t,agentId:e});b?.thread?.id&&s(n.agentThreadLink(e,b.thread.id))},[t,e,d,s,n]),g=E.useCallback((b,w)=>{if(w&&w!==t)s(n.agentThreadLink(e,w,b));else{const S=document.querySelector(`[data-message-id="${b}"]`);S&&(S.scrollIntoView({behavior:"smooth",block:"center"}),S.classList.add("bg-surface4"),setTimeout(()=>{S.classList.remove("bg-surface4")},2e3))}},[e,t,s]),v=u?.searchScope;return o?f.jsxs("div",{className:"flex flex-col h-full p-4 gap-4",children:[f.jsx(fr,{className:"h-12 w-full"}),f.jsx(fr,{className:"h-32 w-full"}),f.jsx(fr,{className:"h-48 w-full"})]}):f.jsxs("div",{className:"flex flex-col h-full",children:[t&&f.jsx("div",{className:"p-4 border-b border-border1",children:f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("h3",{className:"text-sm font-medium text-neutral5",children:"Clone Thread"}),f.jsx("p",{className:"text-xs text-neutral3 mt-1",children:"Create a copy of this conversation"})]}),f.jsxs(Je,{onClick:m,disabled:p,children:[f.jsx(cu,{className:"w-4 h-4 mr-2"}),p?"Cloning...":"Clone"]})]})}),f.jsxs("div",{className:"p-4 border-b border-border1",children:[f.jsx("div",{className:"mb-2",children:f.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[f.jsx("h3",{className:"text-sm font-medium text-neutral5",children:"Semantic Recall"}),u?.searchScope&&f.jsx("span",{className:re("text-xs font-medium px-2 py-0.5 rounded",v==="resource"?"bg-purple-500/20 text-purple-400":"bg-blue-500/20 text-blue-400"),title:v==="resource"?"Searching across all threads":"Searching within current thread only",children:v})]})}),l?f.jsx(M3r,{searchMemory:b=>c({searchQuery:b,memoryConfig:{lastMessages:0}}),onResultClick:g,currentThreadId:t,className:"w-full",chatInputValue:r}):f.jsxs("div",{className:"bg-surface3 border border-border1 rounded-lg p-4",children:[f.jsx("p",{className:"text-sm text-neutral3 mb-3",children:"Semantic recall is not enabled for this agent. Enable it to search through conversation history."}),f.jsxs("a",{href:"https://mastra.ai/en/docs/memory/semantic-recall",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-sm text-blue-400 hover:text-blue-300 transition-colors",children:["Learn about semantic recall",f.jsx(FT,{className:"w-3 h-3"})]})]})]}),f.jsxs("div",{className:"flex-1 overflow-y-auto",children:[f.jsx(I3r,{agentId:e}),f.jsx("div",{className:"border-t border-border1",children:f.jsx(N3r,{agentId:e})})]})]})}function F3r({agentId:e,threadId:t}){const{data:r,isLoading:n}=QD(e),s=!n&&!!r?.result;return f.jsxs(B3r,{agentId:e,children:[f.jsx(g3r,{agentId:e}),f.jsxs(V3r,{agentId:e,children:[f.jsxs(bte,{children:[f.jsx(kh,{value:"overview",children:"Overview"}),f.jsx(kh,{value:"model-settings",children:"Model Settings"}),s&&f.jsx(kh,{value:"memory",children:"Memory"}),f.jsx(kh,{value:"tracing-options",children:"Tracing Options"})]}),f.jsx(Eh,{value:"overview",children:f.jsx(d3r,{agentId:e})}),f.jsx(Eh,{value:"model-settings",children:f.jsx(hIr,{agentId:e})}),s&&f.jsx(Eh,{value:"memory",children:f.jsx(j3r,{agentId:e,threadId:t})}),f.jsx(Eh,{value:"tracing-options",children:f.jsx(rqe,{})})]})]})}const Yz="agent-info-selected-tab",L3r=({isMemoryLoading:e,hasMemory:t})=>{const[r,n]=E.useState(()=>sessionStorage.getItem(Yz)||"overview"),s=i=>{n(i),sessionStorage.setItem(Yz,i)};return E.useEffect(()=>{!e&&!t&&r==="memory"&&(n("overview"),sessionStorage.setItem(Yz,"overview"))},[e,t,r]),{selectedTab:r,handleTabChange:s}},z3r=({modelId:e})=>{const{settings:t,setSettings:r}=tR();return E.useEffect(()=>{e?.includes("gpt-5")&&r({...t||{},modelSettings:{...t?.modelSettings||{},temperature:1}})},[e]),{settings:t,setSettings:r}},B3r=({children:e,agentId:t})=>{const{data:r}=Sy(t);return z3r({modelId:r?.modelId||""}),f.jsx("div",{className:"grid grid-rows-[auto_1fr] h-full items-start overflow-y-auto",children:e})},V3r=({children:e,agentId:t})=>{const{data:r,isLoading:n}=QD(t),s=!!r?.result,{selectedTab:i,handleTabChange:o}=L3r({isMemoryLoading:n,hasMemory:s});return f.jsx("div",{className:"flex-1 overflow-hidden border-t border-border1 flex flex-col",children:f.jsx(vte,{defaultTab:"overview",value:i,onValueChange:o,children:e})})},U3r=({agentId:e,children:t,leftSlot:r,rightSlot:n})=>{const{defaultLayout:s,onLayoutChange:i}=HLe({id:`agent-layout-${e}`,storage:localStorage}),o=xte({isCentered:!1,isDivided:!0,hasLeftServiceColumn:!!r});return f.jsxs(qLe,{className:o,defaultLayout:s,onLayoutChange:i,children:[r&&f.jsxs(f.Fragment,{children:[f.jsx(V4,{direction:"left",id:"left-slot",minSize:200,maxSize:"30%",defaultSize:200,collapsedSize:60,collapsible:!0,children:r}),f.jsx(B4,{})]}),f.jsx(tee,{id:"main-slot",className:"grid overflow-y-auto relative bg-surface1 py-4",children:t}),n&&f.jsxs(f.Fragment,{children:[f.jsx(B4,{}),f.jsx(V4,{direction:"right",id:"right-slot",minSize:300,maxSize:"50%",defaultSize:"30%",collapsedSize:60,collapsible:!0,children:n})]})]})},Q3r=({row:e})=>{const{Link:t,paths:r}=Lr(),n=e.original;return f.jsx(DS,{name:f.jsx(t,{className:"w-full space-y-0",href:r.processorLink(n.id),children:n.name||n.id}),description:n.description})},Z3r=({row:e})=>{const r=e.original.phases||[],n={input:"Input",inputStep:"Input Step",outputStream:"Output Stream",outputResult:"Output Result",outputStep:"Output Step"};return f.jsx(Ks,{children:f.jsx("div",{className:"flex flex-wrap gap-1",children:r.map(s=>f.jsx(Xt,{variant:"default",children:n[s]||s},s))})})},q3r=({row:e})=>{const r=e.original.agentIds?.length||0;return f.jsx(Ks,{children:f.jsxs(Xt,{variant:"default",icon:f.jsx(Fo,{className:"text-accent1"}),children:[r," agent",r!==1?"s":""]})})},H3r=[{header:"Name",accessorKey:"name",cell:Q3r},{header:"Phases",accessorKey:"phases",cell:Z3r},{header:"Used by",accessorKey:"agentIds",cell:q3r}];function W3r({processors:e,isLoading:t}){const[r,n]=E.useState(""),{navigate:s,paths:i}=Lr(),o=E.useMemo(()=>Object.values(e??{}).filter(d=>d.phases&&d.phases.length>0),[e]),a=bS({data:o,columns:H3r,getCoreRowModel:vS()}),l=a.getHeaderGroups()[0],c=a.getRowModel().rows.concat();if(c.length===0&&!t)return f.jsx(X3r,{});const u=c.filter(d=>{const p=d.original.id.toLowerCase(),m=(d.original.name||"").toLowerCase(),g=r.toLowerCase();return p.includes(g)||m.includes(g)});return f.jsxs("div",{children:[f.jsx($S,{children:f.jsx(PS,{onSearch:n,label:"Search processors",placeholder:"Search processors"})}),t?f.jsx(G3r,{}):f.jsx(AS,{children:f.jsx(Dc,{children:f.jsxs(Du,{children:[f.jsx(Au,{className:"sticky top-0",children:l.headers.map(d=>f.jsx(Fi,{style:{width:d.column.getSize()??"auto"},children:yu(d.column.columnDef.header,d.getContext())},d.id))}),f.jsx(Pu,{children:u.map(d=>f.jsx($u,{onClick:()=>{d.original.isWorkflow?s(i.workflowLink(d.original.id)+"/graph"):s(i.processorLink(d.original.id))},children:d.getVisibleCells().map(p=>f.jsx(me.Fragment,{children:yu(p.column.columnDef.cell,p.getContext())},p.id))},d.id))})]})})})]})}const G3r=()=>f.jsxs(Du,{children:[f.jsxs(Au,{children:[f.jsx(Fi,{children:"Name"}),f.jsx(Fi,{children:"Phases"}),f.jsx(Fi,{children:"Used by"})]}),f.jsx(Pu,{children:Array.from({length:3}).map((e,t)=>f.jsxs($u,{children:[f.jsx(Ks,{children:f.jsx(fr,{className:"h-4 w-1/2"})}),f.jsx(Ks,{children:f.jsx(fr,{className:"h-4 w-1/2"})}),f.jsx(Ks,{children:f.jsx(fr,{className:"h-4 w-1/2"})})]},t))})]}),X3r=()=>f.jsx("div",{className:"flex h-full items-center justify-center",children:f.jsx(TS,{iconSlot:f.jsx(BB,{}),titleSlot:"Configure Processors",descriptionSlot:"No processors are configured yet. Add input or output processors to your agents to transform messages.",actionSlot:f.jsxs(Je,{size:"lg",className:"w-full",variant:"light",as:"a",href:"https://mastra.ai/en/docs/processors",target:"_blank",children:[f.jsx(qe,{children:f.jsx(BB,{})}),"Docs"]})})}),Y3r=()=>{const{requestContext:e}=Qn(),t=rr();return ds({queryKey:["processors"],queryFn:()=>t.listProcessors(e)})},Lqe=(e,t)=>{const r=rr(),{requestContext:n}=Qn();return ds({queryKey:["processor",e],queryFn:()=>r.getProcessor(e).details(n),enabled:!!e})},J3r=()=>{const e=rr(),{requestContext:t}=Qn();return bs({mutationFn:async({processorId:r,phase:n,messages:s,agentId:i})=>e.getProcessor(r).execute({phase:n,messages:s,agentId:i,requestContext:t})})},K3r={input:"Input - Process input messages before LLM (once at start)",inputStep:"Input Step - Process at each agentic loop step",outputStream:"Output Stream - Process streaming chunks",outputResult:"Output Result - Process complete output after streaming",outputStep:"Output Step - Process after each LLM response (before tools)"};function e4r({processorId:e}){const{data:t,isLoading:r,error:n}=Lqe(e);return E.useEffect(()=>{if(n){const s=n instanceof Error?n.message:"Failed to load processor";Js.error(`Error loading processor: ${s}`)}},[n]),r?f.jsxs("div",{className:"p-6",children:[f.jsx(fr,{className:"h-8 w-48 mb-4"}),f.jsx(fr,{className:"h-32 w-full"})]}):n?null:t?f.jsx(t4r,{processor:t}):f.jsx("div",{className:"py-12 text-center px-6",children:f.jsx(Ze,{variant:"header-md",className:"text-neutral3",children:"Processor not found"})})}function t4r({processor:e}){const t=wy(),r=E.useId(),[n,s]=E.useState(e.phases[0]||"input"),[i,o]=E.useState(e.configurations[0]?.agentId||""),[a,l]=E.useState("Hello, this is a test message."),[c,u]=E.useState(null),[d,p]=E.useState(),m=J3r(),g=async()=>{p(void 0),u(null);const w=n==="outputStep"||n==="outputResult"?"assistant":"user",S=[{id:crypto.randomUUID(),role:w,createdAt:new Date,content:{format:2,parts:[{type:"text",text:a}]}}];try{const O=await m.mutateAsync({processorId:e.id,phase:n,messages:S,agentId:i||void 0});u(O),!O.success&&O.error&&p(O.error)}catch(O){p(O.message||"An error occurred")}},v=c?JSON.stringify(c,null,2):"{}";return f.jsxs(Oc,{hasLeftServiceColumn:!0,className:"relative",children:[f.jsxs("div",{className:"bg-surface2 border-r border-border1 w-[22rem] overflow-y-auto",children:[f.jsx(r4r,{processor:e}),f.jsxs("div",{className:"p-5 space-y-5",children:[f.jsxs("div",{className:"space-y-2",children:[f.jsx(Ze,{as:"label",variant:"ui-sm",className:"text-icon3",children:"Phase"}),f.jsxs(Ew,{value:n,onValueChange:b=>s(b),children:[f.jsx(w0,{className:"w-full",children:f.jsx(Cw,{placeholder:"Select phase"})}),f.jsx(S0,{children:e.phases.map(b=>f.jsx(O0,{value:b,children:b},b))})]}),f.jsx(Ze,{variant:"ui-xs",className:"text-icon4",children:K3r[n]})]}),e.configurations.length>1&&f.jsxs("div",{className:"space-y-2",children:[f.jsx(Ze,{as:"label",variant:"ui-sm",className:"text-icon3",children:"Agent Configuration"}),f.jsxs(Ew,{value:i,onValueChange:o,children:[f.jsx(w0,{className:"w-full",children:f.jsx(Cw,{placeholder:"Select agent"})}),f.jsx(S0,{children:e.configurations.map(b=>f.jsxs(O0,{value:b.agentId,children:[b.agentName," (",b.type,")"]},b.agentId))})]})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx(Ze,{as:"label",htmlFor:r,variant:"ui-sm",className:"text-icon3",children:"Test Message"}),f.jsx("textarea",{id:r,value:a,onChange:b=>l(b.target.value),placeholder:"Enter a test message...",rows:4,className:"w-full bg-transparent border border-border1 rounded-md p-3 text-ui-sm text-neutral6 placeholder:text-neutral3 focus:outline-none focus:ring-2 focus:ring-accent1"})]}),f.jsx(Je,{onClick:g,disabled:m.isPending||n==="outputStream",className:"w-full",children:m.isPending?"Running...":"Run Processor"}),n==="outputStream"&&f.jsx(Ze,{variant:"ui-xs",className:"text-accent6",children:"Output Stream phase cannot be executed directly. Use streaming instead."}),c&&f.jsxs("div",{className:"space-y-2 pt-4 border-t border-border1",children:[f.jsx(Ze,{variant:"ui-sm",className:"text-icon3",children:"Status"}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(Xt,{variant:c.success?"success":"error",children:c.success?"Success":"Failed"}),c.tripwire?.triggered&&f.jsx(Xt,{variant:"info",children:"Tripwire Triggered"})]}),c.tripwire?.triggered&&c.tripwire.reason&&f.jsxs("div",{className:"mt-2 p-3 bg-accent6Dark rounded-md border border-accent6/20",children:[f.jsx(Ze,{variant:"ui-sm",className:"text-accent6 font-medium",children:"Tripwire Reason"}),f.jsx(Ze,{variant:"ui-sm",className:"text-icon3 mt-1",children:c.tripwire.reason})]})]})]})]}),f.jsx("div",{className:"absolute top-4 right-4 z-10",children:f.jsx(Uf,{content:v,tooltip:"Copy JSON result to clipboard"})}),f.jsx("div",{className:"p-5 h-full relative overflow-x-auto overflow-y-auto",children:f.jsx(fc,{value:d||v,editable:!0,theme:t,extensions:[oc]})})]})}function r4r({processor:e}){return f.jsxs("div",{className:"px-5 pt-5 pb-4 border-b border-border1",children:[f.jsx(Ze,{variant:"header-md",className:"text-icon1 mb-2",children:e.name||e.id}),e.name&&e.name!==e.id&&f.jsx(Ze,{variant:"ui-sm",className:"text-icon4 mb-3",children:e.id}),f.jsx("div",{className:"flex flex-wrap gap-1 mt-3",children:e.phases.map(t=>f.jsx(Xt,{variant:"default",children:t},t))}),f.jsx("div",{className:"mt-3",children:f.jsxs(Ze,{variant:"ui-xs",className:"text-icon4",children:["Attached to ",e.configurations.length," agent",e.configurations.length!==1?"s":""]})})]})}const n4r=({row:e})=>{const{Link:t,paths:r}=Lr(),n=e.original;return f.jsx(DS,{name:f.jsx(t,{className:"w-full space-y-0",href:r.toolLink(n.id),children:n.id}),description:n.description})},s4r=[{header:"Name",accessorKey:"name",cell:n4r},{header:"Attached entities",accessorKey:"attachedEntities",cell:({row:e})=>{const r=e.original.agents.length;return f.jsx(Ks,{children:f.jsxs(Xt,{variant:"default",icon:f.jsx(Fo,{className:"text-accent1"}),children:[r," agent",r>1?"s":""]})})}}],i4r=(e,t)=>{const r=new Map,n=Object.keys(t);for(const s of n){const i=t[s],o=i.tools,a=Object.keys(o);for(const l of a){const c=o[l];r.has(c.id)||r.set(c.id,{...c,agents:[]}),r.get(c.id).agents.push({...i,id:s})}}for(const[s,i]of Object.entries(e))r.has(i.id)||r.set(i.id,{...i,agents:[]});return Array.from(r.values())};function o4r({tools:e,agents:t,isLoading:r}){const[n,s]=E.useState(""),{navigate:i,paths:o}=Lr(),a=E.useMemo(()=>i4r(e,t),[e,t]),l=bS({data:a,columns:s4r,getCoreRowModel:vS()}),c=l.getHeaderGroups()[0],u=l.getRowModel().rows.concat();if(u.length===0&&!r)return f.jsx(l4r,{});const d=u.filter(p=>p.original.id.toLowerCase().includes(n.toLowerCase()));return f.jsxs("div",{children:[f.jsx($S,{children:f.jsx(PS,{onSearch:s,label:"Search tools",placeholder:"Search tools"})}),r?f.jsx(a4r,{}):f.jsx(AS,{children:f.jsx(Dc,{children:f.jsxs(Du,{children:[f.jsx(Au,{className:"sticky top-0",children:c.headers.map(p=>f.jsx(Fi,{style:{width:p.column.getSize()??"auto"},children:yu(p.column.columnDef.header,p.getContext())},p.id))}),f.jsx(Pu,{children:d.map(p=>f.jsx($u,{onClick:()=>{i(o.toolLink(p.original.id))},children:p.getVisibleCells().map(m=>f.jsx(me.Fragment,{children:yu(m.column.columnDef.cell,m.getContext())},m.id))},p.id))})]})})})]})}const a4r=()=>f.jsxs(Du,{children:[f.jsxs(Au,{children:[f.jsx(Fi,{children:"Name"}),f.jsx(Fi,{children:"Used by"})]}),f.jsx(Pu,{children:Array.from({length:3}).map((e,t)=>f.jsxs($u,{children:[f.jsx(Ks,{children:f.jsx(fr,{className:"h-4 w-1/2"})}),f.jsx(Ks,{children:f.jsx(fr,{className:"h-4 w-1/2"})})]},t))})]}),l4r=()=>f.jsx("div",{className:"flex h-full items-center justify-center",children:f.jsx(TS,{iconSlot:f.jsx(A2r,{}),titleSlot:"Configure Tools",descriptionSlot:"Mastra tools are not configured yet. You can find more information in the documentation.",actionSlot:f.jsxs(Je,{size:"lg",className:"w-full",variant:"light",as:"a",href:"https://mastra.ai/en/docs/agents/using-tools-and-mcp",target:"_blank",children:[f.jsx(qe,{children:f.jsx(Cu,{})}),"Docs"]})})}),c4r=()=>{const e=rr();return bs({mutationFn:async({toolId:t,input:r,requestContext:n})=>{const s=new al;Object.entries(n??{}).forEach(([i,o])=>{s.set(i,o)});try{return await e.getTool(t).execute({data:r,requestContext:s})}catch(i){throw mn.error("Error executing dev tool"),console.error("Error executing dev tool:",i),i}}})},zqe=()=>{const{requestContext:e}=Qn(),t=rr();return ds({queryKey:["tools"],queryFn:()=>t.listTools(e)})},u4r=(e,t)=>{const r=rr(),{requestContext:n}=Qn();return ds({queryKey:["tool",e],queryFn:()=>r.getTool(e).details(n),enabled:t?.enabled!==!1})},d4r=({toolId:e})=>{const{data:t={}}=ob(),r=E.useMemo(()=>{for(const m of Object.values(t))if(m.tools){const g=Object.values(m.tools).find(v=>v.id===e);if(g)return g}return null},[t,e]),{data:n,isLoading:s,error:i}=u4r(e,{enabled:!r}),o=r||n,{mutateAsync:a,isPending:l,data:c}=c4r(),{requestContext:u}=Qn();E.useEffect(()=>{if(i){const m=i instanceof Error?i.message:"Failed to load tool";Js.error(`Error loading tool: ${m}`)}},[i]);const d=async m=>{if(o)return a({toolId:o.id,input:m,requestContext:u})},p=o?.inputSchema?Tg(kg(Mv(o?.inputSchema))):Uw({});return s?f.jsxs("div",{className:"p-6",children:[f.jsx(fr,{className:"h-8 w-48 mb-4"}),f.jsx(fr,{className:"h-32 w-full"})]}):i?null:o?f.jsx(Dte,{executionResult:c,isExecutingTool:l,zodInputSchema:p,handleExecuteTool:d,toolDescription:o.description,toolId:o.id}):f.jsx("div",{className:"py-12 text-center px-6",children:f.jsx(Ze,{variant:"header-md",className:"text-neutral3",children:"Tool not found"})})};function f4r({value:e,onValueChange:t,placeholder:r="Select a tool...",searchPlaceholder:n="Search tools...",emptyText:s="No tools found.",className:i,disabled:o=!1}){const{data:a={},isLoading:l,isError:c,error:u}=zqe(),{data:d={},isLoading:p,isError:m,error:g}=ob(),{navigate:v,paths:b}=Lr();E.useEffect(()=>{if(c){const k=u instanceof Error?u.message:"Failed to load tools";Js.error(`Error loading tools: ${k}`)}},[c,u]),E.useEffect(()=>{if(m){const k=g instanceof Error?g.message:"Failed to load agents";Js.error(`Error loading agents: ${k}`)}},[m,g]);const w=new Map;Object.values(d).forEach(k=>{k.tools&&Object.values(k.tools).forEach(C=>{w.has(C.id)||w.set(C.id,C)})}),Object.values(a).forEach(k=>{w.has(k.id)||w.set(k.id,k)});const S=Array.from(w.values()).map(k=>({label:k.id,value:k.id})),O=k=>{t?t(k):k&&k!==e&&v(b.toolLink(k))};return f.jsx(UD,{options:S,value:e,onValueChange:O,placeholder:l||p?"Loading tools...":r,searchPlaceholder:n,emptyText:s,className:i,disabled:o||l||p||c||m})}function p4r({tagOptions:e,selectedTag:t,providerOptions:r,selectedProvider:n,onTagChange:s,onProviderChange:i,searchTerm:o,onSearchChange:a,onReset:l,className:c,isLoading:u}){return u?f.jsxs("div",{className:re("h-[6.5rem] flex items-center gap-8","[&>div]:bg-surface3 [&>div]:w-48 [&>div]:h-8 [&>div]:animate-pulse",c),children:[f.jsx("div",{})," ",f.jsx("div",{})," ",f.jsx("div",{})]}):f.jsxs("div",{className:re("flex flex-wrap mx-auto sticky top-0 gap-8 bg-surface2 py-8",c),children:[f.jsx(QZe,{label:"Search templates",value:o,onChange:d=>a?.(d.target.value),placeholder:"Search Template"}),f.jsx(k0,{label:"Filter by tag",value:t,onValueChange:s,options:e}),f.jsx(k0,{label:"Filter by provider",value:n,onValueChange:i,options:r}),l&&f.jsxs(Je,{onClick:l,children:["Reset ",f.jsx(Ia,{})]})]})}function h4r(e){return e.replace(/\/$/,"").split("/").pop()}function nR({children:e,className:t}){return f.jsx("div",{className:re("border border-border1 rounded-lg mt-12 py-8 lg:min-h-[25rem] transition-height px-4 lg:px-12",t),children:e})}function m4r({templates:e,linkComponent:t,className:r,isLoading:n}){const s=t||"a";return n?f.jsx("div",{className:re("grid gap-y-4",r),children:Array.from({length:5}).map((i,o)=>f.jsx("div",{className:"h-16 bg-surface3 animate-pulse rounded-lg"},o))}):f.jsx("div",{className:re("grid gap-y-4",r),children:e.map(i=>{const o=i?.agents||i?.tools||i?.networks||i?.workflows||i?.mcp;return f.jsxs("article",{className:re("border border-border1 rounded-lg overflow-hidden w-full grid grid-cols-[1fr_auto] bg-surface3 transition-colors hover:bg-surface4"),children:[f.jsxs(s,{to:`/templates/${i.slug}`,className:re("grid [&:hover_p]:text-neutral5",{"grid-cols-[8rem_1fr] lg:grid-cols-[12rem_1fr]":i.imageURL}),children:[i.imageURL&&f.jsx("div",{className:re("overflow-hidden"),children:f.jsx("div",{className:"w-full h-full bg-cover thumb transition-scale duration-150",style:{backgroundImage:`url(${i.imageURL})`}})}),f.jsxs("div",{className:re("grid py-3 px-6 w-full gap-0.5","[&_svg]:w-[1em] [&_svg]:h-[1em] [&_svg]:text-neutral3"),children:[f.jsx("h2",{className:"text-ui-lg text-neutral5",children:i.title}),f.jsx("p",{className:"text-ui-md text-neutral4 transition-colors duration-500",children:i.description}),f.jsxs("div",{className:"hidden 2xl:flex text-neutral3 text-ui-md flex-wrap items-center gap-4 mt-3",children:[o&&f.jsxs("ul",{className:re("flex gap-4 text-ui-md text-neutral3 m-0 p-0 list-none","[&>li]:flex [&>li]:items-center [&>li]:gap-0.5 text-neutral4"),children:[i?.agents&&i.agents.length>0&&f.jsxs("li",{children:[f.jsx(Fo,{})," ",i.agents.length]}),i?.tools&&i.tools.length>0&&f.jsxs("li",{children:[f.jsx(Cu,{})," ",i.tools.length]}),i?.networks&&i.networks.length>0&&f.jsxs("li",{children:[f.jsx(dTe,{})," ",i.networks.length]}),i?.workflows&&i.workflows.length>0&&f.jsxs("li",{children:[f.jsx(mTe,{})," ",i.workflows.length]}),i?.mcp&&i.mcp.length>0&&f.jsxs("li",{children:[f.jsx(sb,{})," ",i.mcp.length]})]}),o&&i.supportedProviders&&f.jsx("small",{children:"|"}),f.jsx("div",{className:"flex items-center text-neutral3 gap-4",children:i.supportedProviders.map(a=>f.jsx("span",{className:"",children:a},a))})]})]})]}),f.jsx("a",{href:i.githubUrl,className:re("group items-center gap-2 text-ui-md ml-auto pr-4 hidden","lg:flex"),target:"_blank",rel:"noopener noreferrer",children:f.jsxs("span",{className:"flex items-center gap-2 px-2 py-1 rounded bg-surface1 group-hover:bg-surface2 text-neutral3 transition-colors group-hover:text-neutral5",children:[f.jsx(ute,{})," ",h4r(i.githubUrl)]})})]},i.slug)})})}function g4r({title:e,description:t,imageURL:r,githubUrl:n,isLoading:s,infoData:i,templateSlug:o}){const a=o?`feat/install-template-${o}`:"feat/install-template-[slug]";return f.jsxs(f.Fragment,{children:[f.jsx("div",{className:re("grid mt-8 items-center"),children:f.jsxs("div",{className:re("text-header-lg flex items-center gap-3","[&>svg]:w-[1.2em] [&>svg]:h-[1.2em] [&>svg]:opacity-50",{"[&>svg]:opacity-20":s}),children:[f.jsx($dt,{}),f.jsx("h2",{className:re({"bg-surface4 flex rounded-lg min-w-[50%]":s}),children:s?f.jsx(f.Fragment,{children:" "}):e})]})}),f.jsxs("div",{className:"grid lg:grid-cols-[1fr_1fr] gap-x-24",children:[f.jsxs("div",{className:"grid",children:[f.jsx("p",{className:re("mb-4 text-ui-md text-neutral4 mt-2 leading-7",{"bg-surface4 rounded-lg ":s}),children:s?f.jsx(f.Fragment,{children:" "}):t}),!s&&o&&f.jsxs("div",{className:re("bg-surface2 border border-surface4 rounded-lg p-4 mb-4","flex items-start gap-3"),children:[f.jsx("div",{className:"flex-shrink-0 mt-0.5",children:f.jsx(sl,{className:"w-[1.1em] h-[1.1em] text-blue-500"})}),f.jsxs("div",{className:"flex-1 space-y-2",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(cTe,{className:"w-[1em] h-[1em] text-neutral4"}),f.jsx("span",{className:"text-ui-md font-medium text-neutral5",children:"A new Git branch will be created"})]}),f.jsxs("div",{className:"text-ui-sm text-neutral4 space-y-1",children:[f.jsxs("div",{children:[f.jsx("span",{className:"font-medium",children:"Branch name:"})," ",f.jsx("code",{className:"bg-surface3 px-1.5 py-0.5 rounded text-ui-sm font-mono",children:a})]}),f.jsx("div",{children:"This ensures safe installation with easy rollback if needed. Your main branch remains unchanged."})]})]})]}),n&&f.jsxs("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 mt-auto text-neutral3 text-ui-md hover:text-neutral5",children:[f.jsx(ute,{}),n?.split("/")?.pop()]})]}),i&&f.jsx(ib,{data:i,LinkComponent:uTe,labelsAreHidden:!0,isLoading:s})]})]})}function y4r({providerOptions:e,selectedProvider:t,onProviderChange:r,variables:n,errors:s,handleInstallTemplate:i,handleVariableChange:o,isLoadingEnvVars:a,isInstalling:l,defaultModelProvider:c,defaultModelId:u,onModelUpdate:d}){return f.jsx(nR,{children:f.jsxs("div",{className:"max-w-[40rem] my-4 p-4 lg:p-8 mx-auto gap-8 grid",children:[f.jsxs("h2",{className:re("text-neutral4 text-header-sm font-semibold flex items-center gap-2","[&>svg]:w-[1.2em] [&_svg]:h-[1.2em] [&_svg]:opacity-70"),children:["Install Template ",f.jsx(fTe,{})]}),f.jsx(k0,{options:e,label:"Template AI Model Provider",onValueChange:r,value:t,placeholder:"Select"}),t&&Object.entries(n||{}).length>0&&f.jsxs(f.Fragment,{children:[f.jsx("h3",{className:"text-neutral3 text-ui-md",children:"Set required Environmental Variables"}),f.jsx("div",{className:"grid grid-cols-[1fr_1fr] gap-4 items-start",children:a?f.jsxs("div",{className:re("flex items-center justify-center col-span-2 text-neutral3 text-ui-sm gap-4","[&_svg]:opacity-50 [&_svg]:w-[1.1em] [&_svg]:h-[1.1em]","animate-in fade-in duration-300"),children:[f.jsx(ea,{})," Loading variables..."]}):Object.entries(n).map(([p,m])=>f.jsxs(E.Fragment,{children:[f.jsx(_0,{name:`env-${p}`,labelIsHidden:!0,label:"Key",value:p,disabled:!0,className:"w-full"}),f.jsx(_0,{name:p,labelIsHidden:!0,label:"Value",value:m,onChange:o,errorMsg:s.includes(p)?"Value is required.":"",autoComplete:"off",className:"w-full"})]},p))}),f.jsxs("div",{className:"border-t border-border1 pt-12 mt-3.5 relative",children:[f.jsx("div",{className:"absolute w-8 h-8 rounded-full bg-surface2 top-0 left-1/2 -translate-x-1/2 -translate-y-4 text-ui-sm text-neutral3 flex items-center justify-center",children:"And"}),f.jsx("h3",{className:"text-neutral4 text-ui-lg",children:"Set AI Model for Template Installation"}),f.jsx("p",{className:"text-neutral3 text-ui-md mt-2 mb-8",children:"This model will be used by the workflow to process and install the template"}),f.jsx(Cte,{defaultProvider:c||"",defaultModel:u||"",updateModel:d||(()=>Promise.resolve({message:"Updated"})),closeEditor:()=>{},autoSave:!0,selectProviderPlaceholder:"Provider"})]})]}),t&&!a&&f.jsx(Je,{className:re("flex items-center gap-2 mt-4 justify-center text-ui-md w-full bg-surface5 min-h-10 rounded-lg text-neutral5 hover:bg-surface6 transition-colors","[&>svg]:w-[1.1em] [&_svg]:h-[1.1em] [&_svg]:text-neutral5"),onClick:i,disabled:!t||!c||!u||s.length>0||l,children:l?f.jsxs(f.Fragment,{children:[f.jsx(ea,{className:"w-4 h-4"})," Installing..."]}):f.jsxs(f.Fragment,{children:["Install ",f.jsx(qx,{})]})})]})})}function v4r(e){switch(e){case"running":return f.jsx(ea,{});case"success":return f.jsx(lu,{});case"failed":return f.jsx(Ia,{});default:return null}}function b4r({stepId:e,step:t,isActive:r,position:n}){const s=i=>i.charAt(0).toUpperCase()+i.slice(1).replace(/-/g," ");return f.jsxs("div",{className:re("grid gap-6 grid-cols-[1fr_auto] py-3 px-4 rounded-lg",kr.all,{"border border-dashed border-neutral2 bg-surface3":r}),children:[f.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-2",children:[f.jsxs("span",{className:re("text-ui-md min-w-6 flex justify-end",kr.colors,{"text-neutral5":r||t.status==="success","text-neutral3":!r&&t.status!=="success"}),children:[n,"."]}),f.jsxs("div",{children:[f.jsx("h4",{className:re("text-ui-md",kr.colors,{"text-neutral5":r||t.status==="success","text-neutral3":!r&&t.status!=="success"}),children:s(e)}),t.description&&f.jsx("p",{className:"text-ui-md text-neutral2 -mt-0.5",children:t.description})]})]}),f.jsx("div",{className:re("w-[1.75rem] h-[1.75rem] rounded-full flex items-center justify-center self-center",kr.all,{"border border-neutral2 border-dashed":t.status==="pending","[&>svg]:text-white [&>svg]:w-[1rem] [&>svg]:h-[1rem]":t.status!=="running","w-[1.75rem] h-[1.75rem]":t.status==="running","bg-accent1Dark shadow-glow-accent1":t.status==="success","bg-accent2Dark shadow-glow-accent2":t.status==="failed","scale-110":t.status==="success"||t.status==="failed"}),children:v4r(t.status)})]})}function x4r({currentStep:e,steps:t=[],className:r}){return f.jsx("div",{className:re(r),children:t.map((n,s)=>f.jsx(b4r,{stepId:n.id,step:n,isActive:e?.id===n.id,position:s+1},n.id))})}function w4r({steps:e}){const t=e.length,r=e.filter(n=>n.status==="success").length;return f.jsxs("div",{className:"flex justify-center flex-col gap-4 content-center w-full",children:[f.jsx("div",{className:"grid grid-cols-[0_repeat(9,1fr)] w-full",children:e.map((n,s)=>f.jsx("div",{className:re("flex justify-end items-center relative h-[2rem]",kr.colors,{"bg-accent1Dark":n.status==="success"&&e?.[s-1]?.status==="success"}),children:f.jsx("div",{className:re("w-[2rem] h-[2rem] rounded-full flex items-center justify-center self-center absolute right-0 translate-x-[50%] bg-surface3 z-10 text-neutral3 font-bold text-ui-sm",kr.all,{"border border-neutral2 border-dashed":n.status==="pending","[&>svg]:text-surface1 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]":n.status!=="running","bg-accent1Dark text-white shadow-glow-accent1 scale-110":n.status==="success","bg-accent2Dark text-white shadow-glow-accent2 scale-110":n.status==="failed"}),children:n.status==="running"?f.jsx(ea,{}):s+1})},n.id))}),f.jsxs("div",{className:re("text-xs text-neutral3 text-center",kr.colors),children:[r," of ",t," steps completed"]})]})}function S4r({name:e,streamResult:t,runId:r,workflowInfo:n}){const s=t?.phase||"initializing",i=t?.payload?.workflowState,o=t?.payload?.currentStep,a=t?.error,l=i?.steps||{},c=Object.keys(l).length>0,u=v=>v==="input"||v.endsWith(".input")||v.startsWith("Mapping_")&&/[0-9a-f]{8}/.test(v)||/[0-9a-f]{8,}/.test(v)?!1:n?.allSteps?v in n.allSteps:!0,d=Object.entries(l).filter(([v,b])=>u(v)),p=d.length,m=()=>{switch(s){case"initializing":return"Preparing template installation...";case"processing":return`Installing ${e} template`;case"completed":return"Template installation completed!";case"error":return"Template installation failed";default:return"Installing template..."}},g=d.map(([v,b])=>({id:v,status:b?.status,description:b?.description,title:v.charAt(0).toUpperCase()+v.slice(1).replace(/-/g," "),isActive:o?.id===v}));return f.jsxs(nR,{className:"space-y-6 text-neutral3 mb-8 content-center",children:[f.jsxs("div",{className:"text-center",children:[f.jsx("h3",{className:"text-lg font-semibold text-neutral5",children:m()}),t?.runId&&f.jsxs("div",{className:"mt-2 text-ui-sm text-neutral3",children:["Run ID: ",t.runId]})]}),c&&p>0&&!["error"].includes(s)&&f.jsx("div",{className:"max-w-[30rem] w-full mx-auto px-6",children:f.jsx(w4r,{steps:g})}),a&&s==="error"&&f.jsxs("div",{className:re("rounded-lg text-neutral5 p-6 flex items-center gap-3 text-ui-md bg-red-500/10","[&>svg]:w-6 [&>svg]:h-6 [&>svg]:opacity-70 [&>svg]:text-red-500"),children:[f.jsx(Ddt,{}),a||"Something went wrong"]}),c&&f.jsx(x4r,{steps:g,currentStep:o,className:"pb-4"}),!c&&s==="initializing"&&f.jsxs("div",{className:"text-center text-sm text-neutral3 grid gap-4 justify-items-center",children:[f.jsx(ea,{}),f.jsx("p",{children:"This may take some time..."})]})]})}function O4r({name:e,installedEntities:t,linkComponent:r}){const n=r||"a";return f.jsxs(nR,{className:re("grid items-center justify-items-center gap-4 content-center","[&>svg]:w-8 [&>svg]:h-8"),children:[f.jsx(fTe,{}),f.jsx("h2",{className:"text-header-md",children:"Done!"}),f.jsxs("p",{className:"text-ui-md text-center text-neutral3 ",children:["The ",f.jsx("b",{className:"text-neutral4",children:e})," template has been successfully installed.",t&&t.length>0&&f.jsxs(f.Fragment,{children:[f.jsx("br",{})," Installed entities are listed below."]})]}),t&&t.length>0&&f.jsx(ib,{data:t,LinkComponent:n})]})}function _4r({errorMsg:e,validationErrors:t}){const r=e?.includes("Invalid schema for function"),n=e?.includes("validation issue")||t&&t.length>0,s=()=>n?"Template installation completed but some validation issues remain. The template may still be functional, but you should review and fix these issues.":r?"There was an issue with the AI model configuration. This may be related to the selected model or AI SDK version compatibility.":"An unexpected error occurred during template installation.",i=()=>n?{icon:f.jsx(I0,{className:"text-yellow-500"}),title:"Template Installed with Warnings"}:{icon:f.jsx(edt,{}),title:"Template Installation Failed"},{icon:o,title:a}=i();return f.jsxs(nR,{className:"space-y-4 text-neutral3 mb-8 content-center",children:[f.jsxs("div",{className:re("grid items-center justify-items-center gap-4 content-center","[&>svg]:w-8 [&>svg]:h-8"),children:[o,f.jsxs("div",{className:"text-center space-y-2",children:[f.jsx("p",{className:"text-ui-md font-medium text-neutral5",children:a}),f.jsx("p",{className:"text-ui-md text-neutral3",children:s()})]})]}),t&&t.length>0&&f.jsxs("details",{className:"text-xs",children:[f.jsxs("summary",{className:"cursor-pointer text-neutral3 hover:text-neutral4 select-none text-center",children:["Show Validation Issues (",t.length,")"]}),f.jsx("div",{className:"mt-4 p-3 bg-gray-100 dark:bg-gray-800 rounded text-xs overflow-auto max-h-60 text-left space-y-2",children:t.map((l,c)=>f.jsxs("div",{className:"border-l-2 border-red-400 pl-2",children:[f.jsx("div",{className:"font-medium text-red-600 dark:text-red-400",children:l.type==="typescript"?"🔴 TypeScript Error":"⚠️ Lint Error"}),f.jsx("div",{className:"text-xs font-mono text-gray-700 dark:text-gray-300 mt-1 whitespace-pre-wrap break-words",children:l.message})]},c))})]}),e&&!n&&f.jsxs("details",{className:"text-xs",children:[f.jsx("summary",{className:"cursor-pointer text-neutral3 hover:text-neutral4 select-none text-center",children:"Show Details"}),f.jsx("div",{className:"mt-4 p-3 bg-gray-100 dark:bg-gray-800 rounded text-xs font-mono overflow-auto max-h-60 text-left",children:f.jsx("div",{className:"whitespace-pre-wrap break-words",children:e})})]})]})}const k4r=e=>{if(!e||e.length===0)return[];const t=e.reduce((a,l)=>{const c=l?.endedAt?new Date(l.endedAt):void 0;return c&&(!a||c>a)?c:a},null),r=new Map,n=[];e.forEach(a=>{const l=new Date(a.startedAt),c=a.endedAt?new Date(a.endedAt):void 0,u={id:a.spanId,name:a.name,type:a.spanType,latency:c?c.getTime()-l.getTime():0,startTime:l.toISOString(),endTime:c?c.toISOString():void 0,spans:[],parentSpanId:a.parentSpanId};r.set(a.spanId,u)}),e.forEach(a=>{const l=r.get(a.spanId);if(a?.parentSpanId==null){if(t&&l.endTime&&t>new Date(l.endTime)){l.endTime=t.toISOString();const c=new Date(t).getTime(),u=new Date(l.startTime).getTime();l.latency=c-u}n.push(l)}else{const c=r.get(a.parentSpanId);c?c.spans.push(l):n.push(l)}});const s=a=>a.sort((l,c)=>new Date(l.startTime).getTime()-new Date(c.startTime).getTime()),i=s(n),o=a=>{a.forEach(l=>{l.spans&&l.spans.length>0&&(l.spans=s(l.spans),o(l.spans))})};return o(i),i},Rxe=["agent","workflow","model","tool","other"];function Bqe(e){const t=e?.toLowerCase().split("_")[0],r={agent:{icon:f.jsx(Fo,{}),color:"oklch(0.75 0.15 250)",label:"Agent",bgColor:"bg-oklch(0.75 0.15 250 / 0.1)",typePrefix:"agent"},workflow:{icon:f.jsx(Tu,{}),color:"oklch(0.75 0.15 200)",label:"Workflow",bgColor:"bg-oklch(0.75 0.15 200 / 0.1)",typePrefix:"workflow"},model:{icon:f.jsx(KCe,{}),color:"oklch(0.75 0.15 320)",label:"Model",bgColor:"bg-oklch(0.75 0.15 320 / 0.1)",typePrefix:"model"},tool:{icon:f.jsx(Cu,{}),color:"oklch(0.75 0.15 100)",label:"Tool",bgColor:"bg-oklch(0.75 0.15 100 / 0.1)",typePrefix:"tool"}};return t in r?r[t]:{typePrefix:"other"}}function Vqe(e){if(!e.spans||e.spans.length===0)return[];const t=[];return e.spans.forEach(r=>{t.push(r.id),t.push(...Vqe(r))}),t}function E4r({isLastChild:e,hasChildren:t=!1,expanded:r=!1}){return f.jsx("div",{className:re("w-[3rem] h-[2.8rem] relative opacity-100",'after:content-[""] after:absolute after:left-[-1px] after:top-0 after:bottom-0 after:w-[0px] after:border-l-[1px] after:border-neutral3 after:border-dashed ','before:content-[""] before:absolute before:left-0 before:top-[50%] before:w-full before:h-[0px] before:border-b-[1px] before:border-neutral3 before:border-dashed',"[&_svg]:transition-all","[&:hover_svg]:text-yellow-500 [&:hover_svg]:scale-[1.3] [&:hover_svg]:opacity-100",{"after:bottom-[50%]":e}),children:t&&f.jsx("span",{className:re("flex absolute left-[50%] top-[50%] translate-y-[-50%] translate-x-[-50%] items-center justify-center bg-surface2 p-[0.25rem]","[&>svg]:shrink-0 [&>svg]:opacity-60 [&>svg]:w-[0.8rem] [&>svg]:h-[0.8rem]"),children:r?f.jsx(Sut,{}):f.jsx(xut,{})})})}function C4r({icon:e,color:t}){return f.jsx("span",{className:re("flex w-[1.1rem] h-[1.1rem] shrink-0 rounded-md items-center justify-center","[&>svg]:w-[.9rem] [&>svg]:h-[.9rem] [&>svg]:text-surface2"),style:{backgroundColor:t},children:e})}function T4r({span:e,spanUI:t,isFaded:r,depth:n=0,onSpanClick:s,selectedSpanId:i,isLastChild:o,hasChildren:a,isRootSpan:l,isExpanded:c,toggleChildren:u}){return f.jsxs("div",{"aria-label":`View details for span ${e.name}`,className:re("rounded-md transition-colors flex opacity-80 min-h-12 items-center rounded-l-lg","mt-4 xl:mt-0",{"opacity-30 [&:hover]:opacity-60":r,"bg-surface4":i===e.id}),style:{paddingLeft:`${n*1.5}rem`},children:[!l&&f.jsx("button",{onClick:()=>u?.(),disabled:!a,className:re({"cursor-default":!a,"cursor-pointer":a}),children:f.jsx(E4r,{isLastChild:o,hasChildren:!!a,expanded:c})}),f.jsxs("button",{onClick:()=>s?.(e.id),className:re("text-ui-md flex items-center text-left break-all gap-2 text-white w-full rounded-lg h-full px-3 py-2 transition-colors","[&>svg]:transition-all [&>svg]:shrink-0 [&>svg]:opacity-0 [&>svg]:w-[1em] [&>svg]:h-[1em] [&>svg]:ml-auto","hover:bg-surface4 [&:hover>svg]:opacity-60"),children:[t?.icon&&f.jsx(C4r,{icon:t.icon,color:t.color?t.color:void 0}),f.jsx("span",{className:re("p-0 px-1 rounded-md"),children:e.name}),f.jsx(Yut,{})]})]})}function D4r({isSelected:e,isFaded:t,isExpanded:r,toggleChildren:n,expandAllDescendants:s,totalDescendants:i=0,allDescendantsExpanded:o,numOfChildren:a}){return f.jsx("div",{className:re("flex items-center justify-end h-full px-3",{"opacity-30 [&:hover]:opacity-60":t,"bg-surface4":e}),children:a&&a>0?f.jsxs("div",{className:"flex gap-1",children:[f.jsxs(Mxe,{onClick:()=>n?.(),children:[o?i:a," ",r?o?f.jsx(put,{}):f.jsx(HN,{}):f.jsx(Vd,{})]}),i>a&&!o&&f.jsxs(Mxe,{onClick:()=>s?.(),children:[i," ",f.jsx(iut,{})]})]}):null})}function Mxe({onClick:e,children:t,className:r}){return f.jsx("button",{onClick:e,className:re("h-full",r),children:f.jsx("div",{className:re("flex items-center gap-[0.1rem] text-ui-sm text-neutral5 border border-border1 pl-2 pr-1 rounded-lg transition-all","hover:text-yellow-500","[&>svg]:shrink-0 [&>svg]:opacity-80 [&>svg]:w-[1rem] [&>svg]:h-[1rem] [&>svg]:transition-all"),children:t})})}function A4r({span:e,selectedSpanId:t,isFaded:r,overallLatency:n,overallStartTime:s,color:i}){const{Link:o}=Lr(),a=n?Math.ceil(e.latency/n*100):0,l=s?new Date(s):null,c=e.startTime?new Date(e.startTime):null,u=c&&l?c.getTime()-l.getTime():0,d=n&&Math.floor(u/n*100);return f.jsxs(lVe,{openDelay:250,children:[f.jsxs(cVe,{className:re("h-12 p-2 grid grid-cols-[1fr_auto] gap-4 items-center cursor-help pr-3 rounded-r-lg col-span-2 xl:col-span-1","[&:hover>div]:bg-surface5",{"opacity-30 [&:hover]:opacity-60":r,"bg-surface4":t===e.id}),children:[f.jsx("div",{className:re("w-full p-2.5 rounded-lg bg-surface4 transition-colors duration-1000"),children:f.jsx("div",{className:"relative w-full h-1.5 rounded-sm",children:f.jsx("div",{className:re("bg-neutral1 absolute rounded-sm h-1.5 top-0"),style:{width:a?`${a}%`:"2px",left:`${d||0}%`,backgroundColor:i}})})}),f.jsxs("div",{className:re("flex justify-end text-neutral3 text-ui-sm"),children:[(e.latency/1e3).toFixed(3)," s"]})]}),f.jsx(uVe,{children:f.jsxs(dVe,{className:"z-50 w-auto max-w-[25rem] rounded-md bg-surface4 p-2 px-4 pr-6 text-ui-sm text-neutral5 text-center border border-border1",sideOffset:5,side:"top",children:[f.jsxs("div",{className:re("text-ui-md flex items-center gap-2 mb-4","[&>svg]:w-[1.25em] [&>svg]:h-[1.25em] [&>svg]:shrink-0 [&>svg]:opacity-50"),children:[f.jsx(QB,{})," Span Timing"]}),f.jsx(ib,{className:" [&>dd]:text-ui-md [&>dt]:text-ui-md [&>dt]:min-h-0 [&>dd]:min-h-0",data:[{key:"Latency",label:"Latency",value:`${e.latency} ms`,icon:f.jsx(lut,{})},{key:"startTime",label:"Started at",value:e.startTime?zn(new Date(e.startTime),"hh:mm:ss:SSS a"):"-",icon:f.jsx(Kct,{})},{key:"endTime",label:"Ended at",value:e.endTime?zn(new Date(e.endTime),"hh:mm:ss:SSS a"):"-",icon:f.jsx(tut,{})},{key:"startShift",label:"Start Shift",value:`${u}ms`,icon:f.jsx(tTe,{})}],LinkComponent:o}),f.jsx(fVe,{className:"fill-surface5"})]})})]})}function Uqe({span:e,depth:t=0,onSpanClick:r,selectedSpanId:n,isLastChild:s,overallLatency:i,overallStartTime:o,overallEndTime:a,fadedTypes:l,searchPhrase:c,featuredSpanIds:u,expandedSpanIds:d,setExpandedSpanIds:p}){const m=e.spans&&e.spans.length>0,g=e.spans?e.spans.length:0,v=Vqe(e),b=v.length,w=t===0,S=Bqe(e?.type),O=d?d.includes(e.id):!1,k=u&&u.length>0?!u.includes(e.id):!1,T=(l&&l.length>0?l.includes(S?.typePrefix||""):!1)||k;E.useEffect(()=>{w&&p?.([e.id])},[w,e.id,p]),E.useEffect(()=>{if(!u||!e.spans||e.spans.length===0)return;const M=e.spans.some(z=>u.includes(z.id));!O&&M&&P()},[u,e.spans,e.id,O,p,d]);const P=()=>{if(!(!p||!d))if(O){const M=[e.id,...v];p(d.filter(z=>!M.includes(z)))}else p([...d,e.id])},A=()=>{!p||!d||p([...d,e.id,...v])},R=v.every(M=>d?.includes(M));return f.jsxs(f.Fragment,{children:[f.jsx(T4r,{span:e,spanUI:S,isFaded:T,depth:t,onSpanClick:r,selectedSpanId:n,isLastChild:s,hasChildren:m,isRootSpan:w,isExpanded:O,toggleChildren:P}),f.jsx(D4r,{isSelected:n===e.id,isFaded:T,isExpanded:O,toggleChildren:P,expandAllDescendants:A,expandedSpanIds:d,totalDescendants:b,allDescendantsExpanded:R,numOfChildren:g}),f.jsx(A4r,{span:e,selectedSpanId:n,isFaded:T,overallLatency:i,overallStartTime:o,overallEndTime:a,color:S?.color}),m&&O&&e.spans?.map((M,z,Q)=>{const U=z===Q.length-1;return f.jsx(Uqe,{span:M,depth:t+1,onSpanClick:r,selectedSpanId:n,isLastChild:U,overallLatency:i,overallStartTime:o,fadedTypes:l,searchPhrase:c,expandedSpanIds:d,setExpandedSpanIds:p,featuredSpanIds:u},M.id)})]})}function P4r({hierarchicalSpans:e=[],onSpanClick:t,selectedSpanId:r,isLoading:n,fadedTypes:s,expandedSpanIds:i,setExpandedSpanIds:o,featuredSpanIds:a}){const l=e?.[0]?.latency||0,c=e?.[0]?.startTime||"",u=e?.[0]?.endTime||"";return f.jsx(f.Fragment,{children:n?f.jsxs("div",{className:re("flex items-center text-ui-md gap-4 bg-surface3/50 rounded-md p-6 justify-center text-neutral3","[&_svg]:w-[1.25em] [&_svg]:h-[1.25em] [&_svg]:opacity-50"),children:[f.jsx(ea,{})," Loading Trace Timeline ..."]}):f.jsx("div",{className:re("grid items-start content-start gap-y-0.5 overflow-hidden grid-cols-[1fr_auto] xl:py-4",{"xl:grid-cols-[1fr_auto_auto]":!u,"xl:grid-cols-[2fr_auto_1fr]":u}),children:e?.map(d=>f.jsx(Uqe,{span:d,onSpanClick:t,selectedSpanId:r,overallLatency:l,overallStartTime:c,overallEndTime:u,fadedTypes:s,featuredSpanIds:a,expandedSpanIds:i,setExpandedSpanIds:o},d.id))})})}const $4r=({className:e,children:t})=>f.jsx("div",{className:re("flex items-center text-ui-sm border border-border1 rounded-lg overflow-hidden","[&>button]:border-0 [&>button:not(:first-child)]:border-l [&>button:not(:first-child)]:border-border1","[&>button]:rounded-none [&>button:first-child]:rounded-l-lg [&>button:last-child]:rounded-r-lg",e),children:t});function I4r({spans:e=[],fadedTypes:t,onLegendClick:r,onLegendReset:n,onSearchPhraseChange:s,traceId:i}){const[o,a]=E.useState("");E.useEffect(()=>{a("")},[i]);const l=Rxe.filter(p=>e.some(m=>m?.spanType?.startsWith(p)))||[],c=e.some(p=>!Rxe.some(g=>p?.spanType?.startsWith(g))),u=p=>{r?.(p)};E.useEffect(()=>{d(o)},[o,s]);const d=$Gt(p=>{s?.(p)},1e3);return f.jsxs("div",{className:"flex gap-3 items-center justify-between",children:[f.jsx("div",{className:"flex",children:f.jsx(QZe,{value:o,onChange:p=>{a(p.target.value)},label:"Find span by name",placeholder:"Look for span name",onReset:()=>a("")})}),f.jsxs($4r,{children:[l.map((p,m)=>{const g=Bqe(p),v=t?.includes(p);return f.jsx(E.Fragment,{children:f.jsxs(Je,{onClick:()=>u(p),className:v?"opacity-40":"",style:{color:v?void 0:g?.color,backgroundColor:g?.bgColor},children:[g?.icon&&f.jsx(qe,{children:g.icon}),g?.label]})},p)}),c&&f.jsxs(Je,{onClick:()=>u("other"),className:t?.includes("other")?"opacity-40":"",style:{color:(t?.includes("other"),void 0),backgroundColor:void 0},children:[f.jsx(qe,{children:f.jsx(sG,{})}),"Other"]}),f.jsx(Je,{onClick:n,disabled:t?.length===0,children:f.jsx(qe,{children:f.jsx(Ia,{})})})]})]})}function H4({children:e,className:t}){return f.jsx("div",{className:re("grid gap-12",t),children:e})}function N4r(e){const{paths:t}=Lr();if(!e)return[];const r=t.agentsLink(),n=t.workflowsLink(),s=e.entityId,i=e.entityType,o=e.entityName,a=i==="agent",l=i==="workflow_run",c=a&&s?t.agentLink(s):l&&s?t.workflowLink(s):void 0;return[{key:"entityId",label:"Entity Id",value:[{id:s??"unknown",name:o||s||"-",path:c}]},{key:"entityType",label:"Entity Type",value:[{id:i??"unknown",name:i??"-",path:a?r:l?n:void 0}]},{key:"status",label:"Status",value:e?.attributes?.status||"-"},{key:"startedAt",label:"Started at",value:e?.startedAt?zn(new Date(e?.startedAt),"MMM dd, h:mm:ss.SSS aaa"):"-"},{key:"endedAt",label:"Ended at",value:e?.endedAt?zn(new Date(e?.endedAt),"MMM dd, h:mm:ss.SSS aaa"):"-"}]}function R4r({span:e}){if(!e)return[];const t=[{key:"spanType",label:"Span Type",value:e?.spanType},{key:"startedAt",label:"Started At",value:e?.startedAt?zn(new Date(e.startedAt),"MMM dd, h:mm:ss.SSS aaa"):"-"},{key:"endedAt",label:"Ended At",value:e?.endedAt?zn(new Date(e.endedAt),"MMM dd, h:mm:ss.SSS aaa"):"-"}],r=e?.attributes?.finishReason;return r&&t.push({key:"finishReason",label:"Finish Reason",value:r}),t}function jxe(e){return typeof e=="object"&&e!==null}const M4r={text:"Text",cacheRead:"Cache Read",cacheWrite:"Cache Write",audio:"Audio",image:"Image",reasoning:"Reasoning"};function j4r({traceUsage:e,traceSpans:t=[],spanUsage:r,className:n}){if(!e&&!r)return console.warn("No usage data available"),null;if(e&&r)return console.warn("Only one of traceUsage or spanUsage should be provided"),null;const s=t.filter(v=>v.spanType==="model_generation"),i=s.some(v=>{const b=v.attributes?.usage;return b&&"inputTokens"in b}),o=s.reduce((v,b)=>{const w=b.attributes?.usage||{},S=b?.attributes?.model||"",O=b?.attributes?.provider||"",k=`${O}${O&&S?" / ":""}${S}`;if(v?.[k]||(i?v[k]={inputTokens:0,outputTokens:0,totalTokens:0,reasoningTokens:0,cachedInputTokens:0}:v[k]={promptTokens:0,completionTokens:0,totalTokens:0}),"inputTokens"in v[k]&&i){const C=w.inputTokens??0,T=w.outputTokens??0,P=w.reasoningTokens??0,A=w.cachedInputTokens??0,R=v[k];R.inputTokens+=C,R.outputTokens+=T,R.reasoningTokens=(R.reasoningTokens??0)+P,R.cachedInputTokens=(R.cachedInputTokens??0)+A,R.totalTokens+=w.totalTokens||C+T}else if("promptTokens"in v[k]&&!i){const C=w.promptTokens??0,T=w.completionTokens??0,P=v[k];P.promptTokens+=C,P.completionTokens+=T,P.totalTokens+=w.totalTokens||C+T}return v},{}),a=Object.keys(o).reduce((v,b)=>{const w=o[b];if(i){const S=w,O=v;O.inputTokens=(O.inputTokens||0)+S.inputTokens,O.outputTokens=(O.outputTokens||0)+S.outputTokens,O.reasoningTokens=(O.reasoningTokens||0)+(S?.reasoningTokens??0),O.cachedInputTokens=(O.cachedInputTokens||0)+(S?.cachedInputTokens??0),O.totalTokens=(O.totalTokens||0)+S.totalTokens}else{const S=w,O=v;O.promptTokens=(O.promptTokens||0)+S.promptTokens,O.completionTokens=(O.completionTokens||0)+S.completionTokens,O.totalTokens=(O.totalTokens||0)+S.totalTokens}return v},i?{inputTokens:0,outputTokens:0,totalTokens:0,reasoningTokens:0,cachedInputTokens:0}:{promptTokens:0,completionTokens:0,totalTokens:0}),l=JSON.stringify(e)===JSON.stringify(a),c={promptTokens:{label:"Prompt Tokens",icon:f.jsx(qx,{})},completionTokens:{label:"Completion Tokens",icon:f.jsx($O,{})}},u={inputTokens:{label:"Input Tokens",icon:f.jsx(qx,{})},outputTokens:{label:"Output Tokens",icon:f.jsx($O,{})},reasoningTokens:{label:"Reasoning Tokens",icon:f.jsx($O,{})},cachedInputTokens:{label:"Cached Input Tokens",icon:f.jsx($O,{})},inputDetails:{label:"Input Details",icon:f.jsx(qx,{})},outputDetails:{label:"Output Details",icon:f.jsx($O,{})}};let p={...{totalTokens:{label:"Total LLM Tokens",icon:f.jsx(Fut,{})}},...u,...c},m=[];i?m=["totalTokens","inputTokens","outputTokens","reasoningTokens","cachedInputTokens","inputDetails","outputDetails"]:m=["totalTokens","promptTokens","completionTokens"];const g=Object.entries(e||r||{}).filter(v=>{const b=v[1];return typeof b=="number"||jxe(b)}).map(([v,b])=>({key:v,value:b})).sort((v,b)=>m.indexOf(v.key)-m.indexOf(b.key));return f.jsx("div",{className:re("flex gap-6 flex-wrap",n),children:g.map(({key:v,value:b})=>{const w=jxe(b);return f.jsxs("div",{className:re("bg-white/5 p-3 px-4 rounded-lg text-ui-md flex-grow",{"min-h-[5.5rem]":e}),children:[f.jsxs("div",{className:re("grid grid-cols-[1.5rem_1fr_auto] gap-2 items-center","[&>svg]:w-[1.5em] [&>svg]:h-[1.5em] [&>svg]:opacity-70"),children:[p?.[v]?.icon,f.jsx("span",{className:"text-ui-md",children:p?.[v]?.label}),!w&&f.jsx("b",{className:"text-ui-lg",children:b})]}),w&&f.jsx("div",{className:"text-ui-md mt-2 pl-8",children:Object.entries(b).map(([S,O])=>typeof O!="number"?null:f.jsxs("dl",{className:"grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 justify-between text-neutral3",children:[f.jsx("dt",{children:M4r[S]||S}),f.jsx("dd",{children:O})]},S))}),!w&&l&&f.jsx("div",{className:"text-ui-md mt-2 pl-8",children:Object.entries(o).map(([S,O])=>{const k=O?.[v];return typeof k!="number"?null:f.jsxs("dl",{className:"grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 justify-between text-neutral3",children:[f.jsx("dt",{children:S}),f.jsx("dd",{children:k})]},S)})})]},v)})})}function F4r(e){return e?.attributes?.finishReason==="length"}function L4r(e){const t=e?.attributes?.usage;if(!t)return"The model stopped generating because it reached the maximum token limit. The response was truncated and may be incomplete.";const r=t.inputTokens??0,n=t.outputTokens??0,s=t.totalTokens??r+n;return r>0||n>0?`The model stopped generating because it reached the maximum token limit. The response was truncated and may be incomplete.
|
|
564
|
+
`]}))})}):f.jsx("pre",{...r,children:e})});Fqe.displayName="HighlightedCode";const A3r=({children:e,className:t,language:r,...n})=>{const s=typeof e=="string"?e:oq(e),i=re("overflow-x-scroll rounded-md border bg-surface1/50 p-4 font-mono text-sm [scrollbar-width:none]",t);return f.jsxs("div",{className:"group/code relative mb-4",children:[f.jsx(E.Suspense,{fallback:f.jsx("pre",{className:i,...n,children:e}),children:f.jsx(Fqe,{language:r,className:i,children:s})}),f.jsx("div",{className:"invisible absolute right-2 top-2 flex space-x-1 rounded-lg p-1 opacity-0 transition-all duration-200 group-hover/code:visible group-hover/code:opacity-100",children:f.jsx(Uf,{content:s,copyMessage:"Copied code to clipboard"})})]})};function oq(e){if(typeof e=="string")return e;if(e?.props?.children){let t=e.props.children;return Array.isArray(t)?t.map(r=>oq(r)).join(""):oq(t)}return""}const P3r={h1:({children:e,...t})=>f.jsx("h1",{className:"text-2xl font-semibold",...t,children:e}),h2:({children:e,...t})=>f.jsx("h2",{className:"font-semibold text-xl",...t,children:e}),h3:({children:e,...t})=>f.jsx("h3",{className:"font-semibold text-lg",...t,children:e}),h4:({children:e,...t})=>f.jsx("h4",{className:"font-semibold text-base",...t,children:e}),h5:({children:e,...t})=>f.jsx("h5",{className:"font-medium",...t,children:e}),strong:({children:e,...t})=>f.jsx("strong",{className:"font-semibold",...t,children:e}),a:({children:e,...t})=>f.jsx("a",{className:"underline underline-offset-2",...t,children:e}),blockquote:({children:e,...t})=>f.jsx("blockquote",{className:"border-l-2 border-neutral6 pl-4",...t,children:e}),code:({children:e,className:t,...r})=>{const n=/language-(\w+)/.exec(t||"");return n?f.jsx(A3r,{className:t,language:n[1],...r,children:e}):f.jsx("code",{className:re("font-mono [:not(pre)>&]:rounded-md [:not(pre)>&]:bg-surface1/50 [:not(pre)>&]:px-1 [:not(pre)>&]:py-0.5"),...r,children:e})},pre:({children:e})=>e,ol:({children:e,...t})=>f.jsx("ol",{className:"list-decimal space-y-2 pl-6",...t,children:e}),ul:({children:e,...t})=>f.jsx("ul",{className:"list-disc space-y-2 pl-6",...t,children:e}),li:({children:e,...t})=>f.jsx("li",{className:"my-1.5",...t,children:e}),table:({children:e,...t})=>f.jsx("table",{className:"w-full border-collapse overflow-y-auto rounded-md border border-neutral6/20",...t,children:e}),th:({children:e,...t})=>f.jsx("th",{className:"border border-neutral6/20 px-4 py-2 text-left font-bold [&[align=center]]:text-center [&[align=right]]:text-right",...t,children:e}),td:({children:e,...t})=>f.jsx("td",{className:"border border-neutral6/20 px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right",...t,children:e}),tr:({children:e,...t})=>f.jsx("tr",{className:"m-0 border-t p-0 even:bg-surface4",...t,children:e}),p:({children:e,...t})=>f.jsx("p",{className:"whitespace-pre-wrap leading-relaxed",...t,children:e}),hr:({...e})=>f.jsx("hr",{className:"border-neutral6/20",...e})};function $3r({content:e,height:t="150px",isCopied:r=!1,isDraft:n=!1,onCopy:s,className:i=""}){return f.jsx("div",{className:`rounded-md border ${i}`,style:{height:t},children:f.jsx(BD,{className:"h-full",children:f.jsxs("div",{className:"p-2 cursor-pointer hover:bg-surface4/50 transition-colors group relative",onClick:s,children:[f.jsx("pre",{className:"text-ui-xs whitespace-pre-wrap font-mono",children:e}),n&&f.jsx("div",{className:"mt-1.5",children:f.jsx("span",{className:"text-ui-xs px-1.5 py-0.5 rounded-full bg-yellow-500/20 text-yellow-500",children:"Draft - Save changes to apply"})}),r&&f.jsx("span",{className:"absolute top-2 right-2 text-ui-xs px-1.5 py-0.5 rounded-full bg-green-500/20 text-green-500",children:"Copied!"}),s&&f.jsx("span",{className:"absolute top-2 right-2 text-ui-xs px-1.5 py-0.5 rounded-full bg-surface4 text-neutral4 opacity-0 group-hover:opacity-100 transition-opacity",children:"Click to copy"})]})})})}const I3r=({agentId:e})=>{const{threadExists:t,workingMemoryData:r,workingMemorySource:n,isLoading:s,isUpdating:i,updateWorkingMemory:o}=hqe(),{data:a,isLoading:l}=_te(e),u=!!a?.config?.workingMemory?.enabled;if(s||l)return f.jsx(fr,{className:"h-32 w-full"});const{isCopied:d,handleCopy:p}=np({text:r??"",copyMessage:"Working memory copied!"}),[m,g]=E.useState(r??""),[v,b]=E.useState(!1);return me.useEffect(()=>{g(r??"")},[r]),f.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[f.jsx("h3",{className:"text-sm font-medium text-neutral5",children:"Working Memory"}),u&&n&&f.jsx("span",{className:re("text-xs font-medium px-2 py-0.5 rounded",n==="resource"?"bg-purple-500/20 text-purple-400":"bg-blue-500/20 text-blue-400"),title:n==="resource"?"Shared across all threads for this agent":"Specific to this conversation thread",children:n})]}),u&&!t&&f.jsx("p",{className:"text-xs text-neutral3",children:"Send a message to the agent to enable working memory."})]}),u?f.jsxs(f.Fragment,{children:[v?f.jsx("textarea",{className:"w-full min-h-[150px] p-3 border border-border1 rounded-lg bg-surface3 font-mono text-sm text-neutral5 resize-none",value:m,onChange:w=>g(w.target.value),disabled:i,placeholder:"Enter working memory content..."}):f.jsx(f.Fragment,{children:r?f.jsx(f.Fragment,{children:r.trim().startsWith("{")?f.jsx($3r,{content:r||"",isCopied:d,onCopy:p,className:"bg-surface3 text-sm font-mono min-h-[150px] border border-border1 rounded-lg"}):f.jsx(f.Fragment,{children:f.jsx("div",{className:"bg-surface3 border border-border1 rounded-lg",style:{height:"300px"},children:f.jsx(BD,{className:"h-full",children:f.jsxs("div",{className:"p-3 cursor-pointer hover:bg-surface4/20 transition-colors relative group text-ui-xs",onClick:p,children:[f.jsx(D3r,{children:r}),d&&f.jsx("span",{className:"absolute top-2 right-2 text-ui-xs px-1.5 py-0.5 rounded-full bg-green-500/20 text-green-500",children:"Copied!"}),f.jsx("span",{className:"absolute top-2 right-2 text-ui-xs px-1.5 py-0.5 rounded-full bg-surface3 text-neutral4 opacity-0 group-hover:opacity-100 transition-opacity",children:"Click to copy"})]})})})})}):f.jsx("div",{className:"text-sm text-neutral3 font-mono",children:'No working memory content yet. Click "Edit Working Memory" to add content.'})}),f.jsx("div",{className:"flex gap-2",children:v?f.jsxs(f.Fragment,{children:[f.jsx(Je,{onClick:async()=>{try{await o(m),b(!1)}catch(w){console.error("Failed to update working memory:",w),mn.error("Failed to update working memory")}},disabled:i,className:"text-xs",children:i?f.jsx(oG,{className:"w-3 h-3 animate-spin"}):"Save Changes"}),f.jsx(Je,{onClick:()=>{g(r??""),b(!1)},disabled:i,className:"text-xs",children:"Cancel"})]}):f.jsx(f.Fragment,{children:t?f.jsx(Je,{onClick:()=>b(!0),disabled:i,className:"text-xs",children:"Edit Working Memory"}):f.jsxs(Ss,{children:[f.jsx(Os,{asChild:!0,children:f.jsx("span",{tabIndex:0,children:f.jsx(Je,{disabled:!0,className:"text-xs pointer-events-none",children:"Edit Working Memory"})})}),f.jsx(is,{children:f.jsx("p",{children:"Working memory will be available after the agent calls updateWorkingMemory"})})]})})})]}):f.jsxs("div",{className:"bg-surface3 border border-border1 rounded-lg p-4",children:[f.jsx("p",{className:"text-sm text-neutral3 mb-3",children:"Working memory is not enabled for this agent. Enable it to maintain context across conversations."}),f.jsxs("a",{href:"https://mastra.ai/en/docs/memory/working-memory",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-sm text-blue-400 hover:text-blue-300 transition-colors",children:["Learn about working memory",f.jsx(FT,{className:"w-3 h-3"})]})]})]})},N3r=({agentId:e})=>{const{data:t,isLoading:r}=_te(e),[n,s]=E.useState(new Set(["General","Semantic Recall"])),i=t?.config,o=E.useMemo(()=>{if(!i)return[];const c=!!i,u=[{title:"General",items:[{label:"Memory Enabled",value:c,badge:c?"success":void 0},{label:"Last Messages",value:i.lastMessages||0},{label:"Auto-generate Titles",value:!!i.generateTitle,badge:i.generateTitle?"info":void 0}]}];if(i.semanticRecall){const d=!!i.semanticRecall,p=typeof i.semanticRecall=="object"?i.semanticRecall:{};u.push({title:"Semantic Recall",items:[{label:"Enabled",value:d,badge:d?"success":void 0},...d?[{label:"Scope",value:p.scope||"resource"},{label:"Top K Results",value:p.topK||4},{label:"Message Range",value:typeof p.messageRange=="object"?`${p.messageRange.before||1} before, ${p.messageRange.after||1} after`:p.messageRange!==void 0?`${p.messageRange} before, ${p.messageRange} after`:"1 before, 1 after"}]:[]]})}return u},[i]),a=c=>{const u=new Set(n);u.has(c)?u.delete(c):u.add(c),s(u)},l=(c,u)=>{if(typeof c=="boolean")return f.jsx("span",{className:re("text-xs font-medium px-2 py-0.5 rounded",c?u==="info"?"bg-blue-500/20 text-blue-400":"bg-green-500/20 text-green-400":"bg-red-500/20 text-red-400"),children:c?"Yes":"No"});if(u){const d={success:"bg-green-500/20 text-green-400",info:"bg-blue-500/20 text-blue-400",warning:"bg-yellow-500/20 text-yellow-400"};return f.jsx("span",{className:re("text-xs font-medium px-2 py-0.5 rounded",d[u]),children:c})}return f.jsx("span",{className:"text-xs text-neutral3",children:c})};return r?f.jsx("div",{className:"p-4",children:f.jsx(fr,{className:"h-32 w-full"})}):!i||o.length===0?f.jsxs("div",{className:"p-4",children:[f.jsx("h3",{className:"text-sm font-medium text-neutral5 mb-3",children:"Memory Configuration"}),f.jsx("p",{className:"text-xs text-neutral3",children:"No memory configuration available"})]}):f.jsxs("div",{className:"p-4",children:[f.jsx("h3",{className:"text-sm font-medium text-neutral5 mb-3",children:"Memory Configuration"}),f.jsx("div",{className:"space-y-2",children:o.map(c=>f.jsxs("div",{className:"border border-border1 rounded-lg bg-surface3",children:[f.jsxs("button",{onClick:()=>a(c.title),className:"w-full px-3 py-2 flex items-center justify-between hover:bg-surface4 transition-colors rounded-t-lg",children:[f.jsx("span",{className:"text-xs font-medium text-neutral5",children:c.title}),n.has(c.title)?f.jsx(Vd,{className:"w-3 h-3 text-neutral3"}):f.jsx(qN,{className:"w-3 h-3 text-neutral3"})]}),n.has(c.title)&&f.jsx("div",{className:"px-3 pb-2 space-y-1",children:c.items.map(u=>f.jsxs("div",{className:"flex items-center justify-between py-1",children:[f.jsx("span",{className:"text-xs text-neutral3",children:u.label}),l(u.value??"",u.badge)]},`${c.title}-${u.label}`))})]},c.title))})]})},R3r=e=>{const r=Math.floor((new Date().getTime()-e.getTime())/1e3);return r<60?"just now":r<3600?`${Math.floor(r/60)}m ago`:r<86400?`${Math.floor(r/3600)}h ago`:r<604800?`${Math.floor(r/86400)}d ago`:e.toLocaleDateString()},M3r=({searchMemory:e,onResultClick:t,className:r,currentThreadId:n,chatInputValue:s})=>{const[i,o]=E.useState(""),[a,l]=E.useState([]),[c,u]=E.useState(!1),[d,p]=E.useState(!1),[m,g]=E.useState(null),v=E.useRef(void 0),b=E.useRef(null),w=E.useRef(n),S=E.useRef(0),O=E.useRef(null),k=E.useCallback(async M=>{if(!M.trim()){g(null);return}u(!0),g(null);try{const z=await e(M);l(z.results),p(Q=>Q||z.results.length>0)}catch(z){g("Failed to search memory"),console.error("Memory search error:",z)}finally{u(!1)}},[e]),C=E.useCallback(M=>{const z=M.target.value;if(o(z),v.current&&clearTimeout(v.current),z.trim()){const Q=Date.now(),U=Q-S.current;if(U>=500)u(!0),k(z),S.current=Q;else{u(!0),O.current=z;const L=500-U;v.current=setTimeout(()=>{O.current&&(k(O.current),S.current=Date.now(),O.current=null)},L)}}else l([]),p(!1),u(!1),O.current=null},[k]),T=E.useCallback(M=>{M.key==="Enter"&&(M.preventDefault(),v.current&&clearTimeout(v.current),k(i))},[i,k]);E.useEffect(()=>()=>{v.current&&clearTimeout(v.current)},[]),E.useEffect(()=>{const M=z=>{b.current&&!b.current.contains(z.target)&&p(!1)};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[]),E.useEffect(()=>{w.current!==n&&i.trim()&&k(i),w.current=n},[n,i,k]),E.useEffect(()=>{if(s!==void 0&&s!==i)if(o(s),v.current&&clearTimeout(v.current),s.trim()){const M=Date.now(),z=M-S.current;if(z>=500)u(!0),k(s),S.current=M;else{u(!0),O.current=s;const Q=500-z;v.current=setTimeout(()=>{O.current&&(k(O.current),S.current=Date.now(),O.current=null)},Q)}}else l([]),p(!1),u(!1),O.current=null;return()=>{v.current&&clearTimeout(v.current)}},[s]);const P=(M,z)=>{t?.(M,z)},A=()=>{o(""),l([]),p(!1),g(null),v.current&&clearTimeout(v.current)},R=(M,z=100)=>M.length<=z?M:M.substring(0,z)+"...";return f.jsxs("div",{className:re("flex flex-col h-full",r),ref:b,children:[f.jsxs("div",{className:"relative shrink-0",children:[f.jsx(aG,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-neutral3"}),f.jsx(To,{type:"text",value:i,onChange:C,onKeyDown:T,placeholder:"Search memory...",className:"pl-10 pr-10 bg-surface3 border-border1"}),i&&f.jsx(Je,{onClick:A,className:"absolute right-1 top-1/2 transform -translate-y-1/2 h-6 w-6 p-0",children:f.jsx(Ia,{className:"h-4 w-4"})})]}),(d||i&&(c||a.length===0))&&f.jsx("div",{className:"mt-2 flex-1 bg-surface3 border border-border1 rounded-lg shadow-lg overflow-y-auto",children:m?f.jsx("div",{className:"p-4 text-center",children:f.jsx(Ze,{variant:"ui-sm",className:"text-red-500",children:m})}):c&&a.length===0?f.jsx("div",{className:"p-4 text-center",children:f.jsx(Ze,{variant:"ui-sm",className:"text-neutral3",children:"Searching..."})}):a.length===0?f.jsx("div",{className:"p-4 text-center",children:f.jsxs(Ze,{variant:"ui-sm",className:"text-neutral3",children:['No results found for "',i,'"']})}):f.jsx("div",{className:"py-2",children:a.map(M=>f.jsx("button",{onClick:()=>P(M.id,M.threadId),className:re("w-full px-4 py-3 hover:bg-surface4 transition-colors duration-150 text-left border-b border-border1 last:border-b-0",M.threadId!==n&&"border-l-2 border-l-blue-400"),children:f.jsxs("div",{className:"flex flex-col gap-2",children:[M.context?.before&&M.context.before.length>0&&f.jsx("div",{className:"opacity-50 text-xs space-y-1",children:M.context.before.map((z,Q)=>f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsxs("span",{className:"font-medium",children:[z.role,":"]}),f.jsx("span",{className:"text-neutral3",children:R(z.content,50)})]},Q))}),f.jsx("div",{className:"flex items-start justify-between gap-2",children:f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[f.jsx("span",{className:re("text-xs font-medium px-2 py-0.5 rounded",M.role==="user"?"bg-blue-500/20 text-blue-400":"bg-green-500/20 text-green-400"),children:M.role}),f.jsx(Ze,{variant:"ui-xs",className:"text-neutral3",children:R3r(new Date(M.createdAt))}),M.threadTitle&&f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsxs(Ze,{variant:"ui-xs",className:re("truncate max-w-[150px]",M.threadId!==n?"text-blue-400 font-medium":"text-neutral3"),title:M.threadTitle,children:["• ",M.threadTitle]}),M.threadId!==n&&f.jsx(FT,{className:"w-3 h-3 text-blue-400"})]})]}),f.jsx(Ze,{variant:"ui-sm",className:"text-neutral5 break-words",children:R(M.content)})]})}),M.context?.after&&M.context.after.length>0&&f.jsx("div",{className:"opacity-50 text-xs space-y-1",children:M.context.after.map((z,Q)=>f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsxs("span",{className:"font-medium",children:[z.role,":"]}),f.jsx("span",{className:"text-neutral3",children:R(z.content,50)})]},Q))})]})},M.id))})})]})};function j3r({agentId:e,threadId:t}){const{threadInput:r}=dqe(),{paths:n,navigate:s}=Lr(),{data:i,isLoading:o}=_te(e),l=!!i?.config?.semanticRecall,{mutateAsync:c,data:u}=cIr({agentId:e||"",resourceId:e||"",threadId:t}),{mutateAsync:d,isPending:p}=uIr(),m=E.useCallback(async()=>{if(!t||!e)return;const b=await d({threadId:t,agentId:e});b?.thread?.id&&s(n.agentThreadLink(e,b.thread.id))},[t,e,d,s,n]),g=E.useCallback((b,w)=>{if(w&&w!==t)s(n.agentThreadLink(e,w,b));else{const S=document.querySelector(`[data-message-id="${b}"]`);S&&(S.scrollIntoView({behavior:"smooth",block:"center"}),S.classList.add("bg-surface4"),setTimeout(()=>{S.classList.remove("bg-surface4")},2e3))}},[e,t,s]),v=u?.searchScope;return o?f.jsxs("div",{className:"flex flex-col h-full p-4 gap-4",children:[f.jsx(fr,{className:"h-12 w-full"}),f.jsx(fr,{className:"h-32 w-full"}),f.jsx(fr,{className:"h-48 w-full"})]}):f.jsxs("div",{className:"flex flex-col h-full",children:[t&&f.jsx("div",{className:"p-4 border-b border-border1",children:f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("h3",{className:"text-sm font-medium text-neutral5",children:"Clone Thread"}),f.jsx("p",{className:"text-xs text-neutral3 mt-1",children:"Create a copy of this conversation"})]}),f.jsxs(Je,{onClick:m,disabled:p,children:[f.jsx(cu,{className:"w-4 h-4 mr-2"}),p?"Cloning...":"Clone"]})]})}),f.jsxs("div",{className:"p-4 border-b border-border1",children:[f.jsx("div",{className:"mb-2",children:f.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[f.jsx("h3",{className:"text-sm font-medium text-neutral5",children:"Semantic Recall"}),u?.searchScope&&f.jsx("span",{className:re("text-xs font-medium px-2 py-0.5 rounded",v==="resource"?"bg-purple-500/20 text-purple-400":"bg-blue-500/20 text-blue-400"),title:v==="resource"?"Searching across all threads":"Searching within current thread only",children:v})]})}),l?f.jsx(M3r,{searchMemory:b=>c({searchQuery:b,memoryConfig:{lastMessages:0}}),onResultClick:g,currentThreadId:t,className:"w-full",chatInputValue:r}):f.jsxs("div",{className:"bg-surface3 border border-border1 rounded-lg p-4",children:[f.jsx("p",{className:"text-sm text-neutral3 mb-3",children:"Semantic recall is not enabled for this agent. Enable it to search through conversation history."}),f.jsxs("a",{href:"https://mastra.ai/en/docs/memory/semantic-recall",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-sm text-blue-400 hover:text-blue-300 transition-colors",children:["Learn about semantic recall",f.jsx(FT,{className:"w-3 h-3"})]})]})]}),f.jsxs("div",{className:"flex-1 overflow-y-auto",children:[f.jsx(I3r,{agentId:e}),f.jsx("div",{className:"border-t border-border1",children:f.jsx(N3r,{agentId:e})})]})]})}function F3r({agentId:e,threadId:t}){const{data:r,isLoading:n}=QD(e),s=!n&&!!r?.result;return f.jsxs(B3r,{agentId:e,children:[f.jsx(g3r,{agentId:e}),f.jsxs(V3r,{agentId:e,children:[f.jsxs(bte,{children:[f.jsx(kh,{value:"overview",children:"Overview"}),f.jsx(kh,{value:"model-settings",children:"Model Settings"}),s&&f.jsx(kh,{value:"memory",children:"Memory"}),f.jsx(kh,{value:"tracing-options",children:"Tracing Options"})]}),f.jsx(Eh,{value:"overview",children:f.jsx(d3r,{agentId:e})}),f.jsx(Eh,{value:"model-settings",children:f.jsx(hIr,{agentId:e})}),s&&f.jsx(Eh,{value:"memory",children:f.jsx(j3r,{agentId:e,threadId:t})}),f.jsx(Eh,{value:"tracing-options",children:f.jsx(rqe,{})})]})]})}const Yz="agent-info-selected-tab",L3r=({isMemoryLoading:e,hasMemory:t})=>{const[r,n]=E.useState(()=>sessionStorage.getItem(Yz)||"overview"),s=i=>{n(i),sessionStorage.setItem(Yz,i)};return E.useEffect(()=>{!e&&!t&&r==="memory"&&(n("overview"),sessionStorage.setItem(Yz,"overview"))},[e,t,r]),{selectedTab:r,handleTabChange:s}},z3r=({modelId:e})=>{const{settings:t,setSettings:r}=tR();return E.useEffect(()=>{e?.includes("gpt-5")&&r({...t||{},modelSettings:{...t?.modelSettings||{},temperature:1}})},[e]),{settings:t,setSettings:r}},B3r=({children:e,agentId:t})=>{const{data:r}=Sy(t);return z3r({modelId:r?.modelId||""}),f.jsx("div",{className:"grid grid-rows-[auto_1fr] h-full items-start overflow-y-auto",children:e})},V3r=({children:e,agentId:t})=>{const{data:r,isLoading:n}=QD(t),s=!!r?.result,{selectedTab:i,handleTabChange:o}=L3r({isMemoryLoading:n,hasMemory:s});return f.jsx("div",{className:"flex-1 overflow-hidden border-t border-border1 flex flex-col",children:f.jsx(vte,{defaultTab:"overview",value:i,onValueChange:o,children:e})})},U3r=({agentId:e,children:t,leftSlot:r,rightSlot:n})=>{const{defaultLayout:s,onLayoutChange:i}=HLe({id:`agent-layout-${e}`,storage:localStorage}),o=xte({isCentered:!1,isDivided:!0,hasLeftServiceColumn:!!r});return f.jsxs(qLe,{className:o,defaultLayout:s,onLayoutChange:i,children:[r&&f.jsxs(f.Fragment,{children:[f.jsx(V4,{direction:"left",id:"left-slot",minSize:200,maxSize:"30%",defaultSize:200,collapsedSize:60,collapsible:!0,children:r}),f.jsx(B4,{})]}),f.jsx(tee,{id:"main-slot",className:"grid overflow-y-auto relative bg-surface1 py-4",children:t}),n&&f.jsxs(f.Fragment,{children:[f.jsx(B4,{}),f.jsx(V4,{direction:"right",id:"right-slot",minSize:300,maxSize:"50%",defaultSize:"30%",collapsedSize:60,collapsible:!0,children:n})]})]})},Q3r=({row:e})=>{const{Link:t,paths:r}=Lr(),n=e.original;return f.jsx(DS,{name:f.jsx(t,{className:"w-full space-y-0",href:r.processorLink(n.id),children:n.name||n.id}),description:n.description})},Z3r=({row:e})=>{const r=e.original.phases||[],n={input:"Input",inputStep:"Input Step",outputStream:"Output Stream",outputResult:"Output Result",outputStep:"Output Step"};return f.jsx(Ks,{children:f.jsx("div",{className:"flex flex-wrap gap-1",children:r.map(s=>f.jsx(Xt,{variant:"default",children:n[s]||s},s))})})},q3r=({row:e})=>{const r=e.original.agentIds?.length||0;return f.jsx(Ks,{children:f.jsxs(Xt,{variant:"default",icon:f.jsx(Fo,{className:"text-accent1"}),children:[r," agent",r!==1?"s":""]})})},H3r=[{header:"Name",accessorKey:"name",cell:Q3r},{header:"Phases",accessorKey:"phases",cell:Z3r},{header:"Used by",accessorKey:"agentIds",cell:q3r}];function W3r({processors:e,isLoading:t}){const[r,n]=E.useState(""),{navigate:s,paths:i}=Lr(),o=E.useMemo(()=>Object.values(e??{}).filter(d=>d.phases&&d.phases.length>0),[e]),a=bS({data:o,columns:H3r,getCoreRowModel:vS()}),l=a.getHeaderGroups()[0],c=a.getRowModel().rows.concat();if(c.length===0&&!t)return f.jsx(X3r,{});const u=c.filter(d=>{const p=d.original.id.toLowerCase(),m=(d.original.name||"").toLowerCase(),g=r.toLowerCase();return p.includes(g)||m.includes(g)});return f.jsxs("div",{children:[f.jsx($S,{children:f.jsx(PS,{onSearch:n,label:"Search processors",placeholder:"Search processors"})}),t?f.jsx(G3r,{}):f.jsx(AS,{children:f.jsx(Dc,{children:f.jsxs(Du,{children:[f.jsx(Au,{className:"sticky top-0",children:l.headers.map(d=>f.jsx(Fi,{style:{width:d.column.getSize()??"auto"},children:yu(d.column.columnDef.header,d.getContext())},d.id))}),f.jsx(Pu,{children:u.map(d=>f.jsx($u,{onClick:()=>{d.original.isWorkflow?s(i.workflowLink(d.original.id)+"/graph"):s(i.processorLink(d.original.id))},children:d.getVisibleCells().map(p=>f.jsx(me.Fragment,{children:yu(p.column.columnDef.cell,p.getContext())},p.id))},d.id))})]})})})]})}const G3r=()=>f.jsxs(Du,{children:[f.jsxs(Au,{children:[f.jsx(Fi,{children:"Name"}),f.jsx(Fi,{children:"Phases"}),f.jsx(Fi,{children:"Used by"})]}),f.jsx(Pu,{children:Array.from({length:3}).map((e,t)=>f.jsxs($u,{children:[f.jsx(Ks,{children:f.jsx(fr,{className:"h-4 w-1/2"})}),f.jsx(Ks,{children:f.jsx(fr,{className:"h-4 w-1/2"})}),f.jsx(Ks,{children:f.jsx(fr,{className:"h-4 w-1/2"})})]},t))})]}),X3r=()=>f.jsx("div",{className:"flex h-full items-center justify-center",children:f.jsx(TS,{iconSlot:f.jsx(BB,{}),titleSlot:"Configure Processors",descriptionSlot:"No processors are configured yet. Add input or output processors to your agents to transform messages.",actionSlot:f.jsxs(Je,{size:"lg",className:"w-full",variant:"light",as:"a",href:"https://mastra.ai/docs/agents/processors",target:"_blank",children:[f.jsx(qe,{children:f.jsx(BB,{})}),"Docs"]})})}),Y3r=()=>{const{requestContext:e}=Qn(),t=rr();return ds({queryKey:["processors"],queryFn:()=>t.listProcessors(e)})},Lqe=(e,t)=>{const r=rr(),{requestContext:n}=Qn();return ds({queryKey:["processor",e],queryFn:()=>r.getProcessor(e).details(n),enabled:!!e})},J3r=()=>{const e=rr(),{requestContext:t}=Qn();return bs({mutationFn:async({processorId:r,phase:n,messages:s,agentId:i})=>e.getProcessor(r).execute({phase:n,messages:s,agentId:i,requestContext:t})})},K3r={input:"Input - Process input messages before LLM (once at start)",inputStep:"Input Step - Process at each agentic loop step",outputStream:"Output Stream - Process streaming chunks",outputResult:"Output Result - Process complete output after streaming",outputStep:"Output Step - Process after each LLM response (before tools)"};function e4r({processorId:e}){const{data:t,isLoading:r,error:n}=Lqe(e);return E.useEffect(()=>{if(n){const s=n instanceof Error?n.message:"Failed to load processor";Js.error(`Error loading processor: ${s}`)}},[n]),r?f.jsxs("div",{className:"p-6",children:[f.jsx(fr,{className:"h-8 w-48 mb-4"}),f.jsx(fr,{className:"h-32 w-full"})]}):n?null:t?f.jsx(t4r,{processor:t}):f.jsx("div",{className:"py-12 text-center px-6",children:f.jsx(Ze,{variant:"header-md",className:"text-neutral3",children:"Processor not found"})})}function t4r({processor:e}){const t=wy(),r=E.useId(),[n,s]=E.useState(e.phases[0]||"input"),[i,o]=E.useState(e.configurations[0]?.agentId||""),[a,l]=E.useState("Hello, this is a test message."),[c,u]=E.useState(null),[d,p]=E.useState(),m=J3r(),g=async()=>{p(void 0),u(null);const w=n==="outputStep"||n==="outputResult"?"assistant":"user",S=[{id:crypto.randomUUID(),role:w,createdAt:new Date,content:{format:2,parts:[{type:"text",text:a}]}}];try{const O=await m.mutateAsync({processorId:e.id,phase:n,messages:S,agentId:i||void 0});u(O),!O.success&&O.error&&p(O.error)}catch(O){p(O.message||"An error occurred")}},v=c?JSON.stringify(c,null,2):"{}";return f.jsxs(Oc,{hasLeftServiceColumn:!0,className:"relative",children:[f.jsxs("div",{className:"bg-surface2 border-r border-border1 w-[22rem] overflow-y-auto",children:[f.jsx(r4r,{processor:e}),f.jsxs("div",{className:"p-5 space-y-5",children:[f.jsxs("div",{className:"space-y-2",children:[f.jsx(Ze,{as:"label",variant:"ui-sm",className:"text-icon3",children:"Phase"}),f.jsxs(Ew,{value:n,onValueChange:b=>s(b),children:[f.jsx(w0,{className:"w-full",children:f.jsx(Cw,{placeholder:"Select phase"})}),f.jsx(S0,{children:e.phases.map(b=>f.jsx(O0,{value:b,children:b},b))})]}),f.jsx(Ze,{variant:"ui-xs",className:"text-icon4",children:K3r[n]})]}),e.configurations.length>1&&f.jsxs("div",{className:"space-y-2",children:[f.jsx(Ze,{as:"label",variant:"ui-sm",className:"text-icon3",children:"Agent Configuration"}),f.jsxs(Ew,{value:i,onValueChange:o,children:[f.jsx(w0,{className:"w-full",children:f.jsx(Cw,{placeholder:"Select agent"})}),f.jsx(S0,{children:e.configurations.map(b=>f.jsxs(O0,{value:b.agentId,children:[b.agentName," (",b.type,")"]},b.agentId))})]})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx(Ze,{as:"label",htmlFor:r,variant:"ui-sm",className:"text-icon3",children:"Test Message"}),f.jsx("textarea",{id:r,value:a,onChange:b=>l(b.target.value),placeholder:"Enter a test message...",rows:4,className:"w-full bg-transparent border border-border1 rounded-md p-3 text-ui-sm text-neutral6 placeholder:text-neutral3 focus:outline-none focus:ring-2 focus:ring-accent1"})]}),f.jsx(Je,{onClick:g,disabled:m.isPending||n==="outputStream",className:"w-full",children:m.isPending?"Running...":"Run Processor"}),n==="outputStream"&&f.jsx(Ze,{variant:"ui-xs",className:"text-accent6",children:"Output Stream phase cannot be executed directly. Use streaming instead."}),c&&f.jsxs("div",{className:"space-y-2 pt-4 border-t border-border1",children:[f.jsx(Ze,{variant:"ui-sm",className:"text-icon3",children:"Status"}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(Xt,{variant:c.success?"success":"error",children:c.success?"Success":"Failed"}),c.tripwire?.triggered&&f.jsx(Xt,{variant:"info",children:"Tripwire Triggered"})]}),c.tripwire?.triggered&&c.tripwire.reason&&f.jsxs("div",{className:"mt-2 p-3 bg-accent6Dark rounded-md border border-accent6/20",children:[f.jsx(Ze,{variant:"ui-sm",className:"text-accent6 font-medium",children:"Tripwire Reason"}),f.jsx(Ze,{variant:"ui-sm",className:"text-icon3 mt-1",children:c.tripwire.reason})]})]})]})]}),f.jsx("div",{className:"absolute top-4 right-4 z-10",children:f.jsx(Uf,{content:v,tooltip:"Copy JSON result to clipboard"})}),f.jsx("div",{className:"p-5 h-full relative overflow-x-auto overflow-y-auto",children:f.jsx(fc,{value:d||v,editable:!0,theme:t,extensions:[oc]})})]})}function r4r({processor:e}){return f.jsxs("div",{className:"px-5 pt-5 pb-4 border-b border-border1",children:[f.jsx(Ze,{variant:"header-md",className:"text-icon1 mb-2",children:e.name||e.id}),e.name&&e.name!==e.id&&f.jsx(Ze,{variant:"ui-sm",className:"text-icon4 mb-3",children:e.id}),f.jsx("div",{className:"flex flex-wrap gap-1 mt-3",children:e.phases.map(t=>f.jsx(Xt,{variant:"default",children:t},t))}),f.jsx("div",{className:"mt-3",children:f.jsxs(Ze,{variant:"ui-xs",className:"text-icon4",children:["Attached to ",e.configurations.length," agent",e.configurations.length!==1?"s":""]})})]})}const n4r=({row:e})=>{const{Link:t,paths:r}=Lr(),n=e.original;return f.jsx(DS,{name:f.jsx(t,{className:"w-full space-y-0",href:r.toolLink(n.id),children:n.id}),description:n.description})},s4r=[{header:"Name",accessorKey:"name",cell:n4r},{header:"Attached entities",accessorKey:"attachedEntities",cell:({row:e})=>{const r=e.original.agents.length;return f.jsx(Ks,{children:f.jsxs(Xt,{variant:"default",icon:f.jsx(Fo,{className:"text-accent1"}),children:[r," agent",r>1?"s":""]})})}}],i4r=(e,t)=>{const r=new Map,n=Object.keys(t);for(const s of n){const i=t[s],o=i.tools,a=Object.keys(o);for(const l of a){const c=o[l];r.has(c.id)||r.set(c.id,{...c,agents:[]}),r.get(c.id).agents.push({...i,id:s})}}for(const[s,i]of Object.entries(e))r.has(i.id)||r.set(i.id,{...i,agents:[]});return Array.from(r.values())};function o4r({tools:e,agents:t,isLoading:r}){const[n,s]=E.useState(""),{navigate:i,paths:o}=Lr(),a=E.useMemo(()=>i4r(e,t),[e,t]),l=bS({data:a,columns:s4r,getCoreRowModel:vS()}),c=l.getHeaderGroups()[0],u=l.getRowModel().rows.concat();if(u.length===0&&!r)return f.jsx(l4r,{});const d=u.filter(p=>p.original.id.toLowerCase().includes(n.toLowerCase()));return f.jsxs("div",{children:[f.jsx($S,{children:f.jsx(PS,{onSearch:s,label:"Search tools",placeholder:"Search tools"})}),r?f.jsx(a4r,{}):f.jsx(AS,{children:f.jsx(Dc,{children:f.jsxs(Du,{children:[f.jsx(Au,{className:"sticky top-0",children:c.headers.map(p=>f.jsx(Fi,{style:{width:p.column.getSize()??"auto"},children:yu(p.column.columnDef.header,p.getContext())},p.id))}),f.jsx(Pu,{children:d.map(p=>f.jsx($u,{onClick:()=>{i(o.toolLink(p.original.id))},children:p.getVisibleCells().map(m=>f.jsx(me.Fragment,{children:yu(m.column.columnDef.cell,m.getContext())},m.id))},p.id))})]})})})]})}const a4r=()=>f.jsxs(Du,{children:[f.jsxs(Au,{children:[f.jsx(Fi,{children:"Name"}),f.jsx(Fi,{children:"Used by"})]}),f.jsx(Pu,{children:Array.from({length:3}).map((e,t)=>f.jsxs($u,{children:[f.jsx(Ks,{children:f.jsx(fr,{className:"h-4 w-1/2"})}),f.jsx(Ks,{children:f.jsx(fr,{className:"h-4 w-1/2"})})]},t))})]}),l4r=()=>f.jsx("div",{className:"flex h-full items-center justify-center",children:f.jsx(TS,{iconSlot:f.jsx(A2r,{}),titleSlot:"Configure Tools",descriptionSlot:"Mastra tools are not configured yet. You can find more information in the documentation.",actionSlot:f.jsxs(Je,{size:"lg",className:"w-full",variant:"light",as:"a",href:"https://mastra.ai/en/docs/agents/using-tools-and-mcp",target:"_blank",children:[f.jsx(qe,{children:f.jsx(Cu,{})}),"Docs"]})})}),c4r=()=>{const e=rr();return bs({mutationFn:async({toolId:t,input:r,requestContext:n})=>{const s=new al;Object.entries(n??{}).forEach(([i,o])=>{s.set(i,o)});try{return await e.getTool(t).execute({data:r,requestContext:s})}catch(i){throw mn.error("Error executing dev tool"),console.error("Error executing dev tool:",i),i}}})},zqe=()=>{const{requestContext:e}=Qn(),t=rr();return ds({queryKey:["tools"],queryFn:()=>t.listTools(e)})},u4r=(e,t)=>{const r=rr(),{requestContext:n}=Qn();return ds({queryKey:["tool",e],queryFn:()=>r.getTool(e).details(n),enabled:t?.enabled!==!1})},d4r=({toolId:e})=>{const{data:t={}}=ob(),r=E.useMemo(()=>{for(const m of Object.values(t))if(m.tools){const g=Object.values(m.tools).find(v=>v.id===e);if(g)return g}return null},[t,e]),{data:n,isLoading:s,error:i}=u4r(e,{enabled:!r}),o=r||n,{mutateAsync:a,isPending:l,data:c}=c4r(),{requestContext:u}=Qn();E.useEffect(()=>{if(i){const m=i instanceof Error?i.message:"Failed to load tool";Js.error(`Error loading tool: ${m}`)}},[i]);const d=async m=>{if(o)return a({toolId:o.id,input:m,requestContext:u})},p=o?.inputSchema?Tg(kg(Mv(o?.inputSchema))):Uw({});return s?f.jsxs("div",{className:"p-6",children:[f.jsx(fr,{className:"h-8 w-48 mb-4"}),f.jsx(fr,{className:"h-32 w-full"})]}):i?null:o?f.jsx(Dte,{executionResult:c,isExecutingTool:l,zodInputSchema:p,handleExecuteTool:d,toolDescription:o.description,toolId:o.id}):f.jsx("div",{className:"py-12 text-center px-6",children:f.jsx(Ze,{variant:"header-md",className:"text-neutral3",children:"Tool not found"})})};function f4r({value:e,onValueChange:t,placeholder:r="Select a tool...",searchPlaceholder:n="Search tools...",emptyText:s="No tools found.",className:i,disabled:o=!1}){const{data:a={},isLoading:l,isError:c,error:u}=zqe(),{data:d={},isLoading:p,isError:m,error:g}=ob(),{navigate:v,paths:b}=Lr();E.useEffect(()=>{if(c){const k=u instanceof Error?u.message:"Failed to load tools";Js.error(`Error loading tools: ${k}`)}},[c,u]),E.useEffect(()=>{if(m){const k=g instanceof Error?g.message:"Failed to load agents";Js.error(`Error loading agents: ${k}`)}},[m,g]);const w=new Map;Object.values(d).forEach(k=>{k.tools&&Object.values(k.tools).forEach(C=>{w.has(C.id)||w.set(C.id,C)})}),Object.values(a).forEach(k=>{w.has(k.id)||w.set(k.id,k)});const S=Array.from(w.values()).map(k=>({label:k.id,value:k.id})),O=k=>{t?t(k):k&&k!==e&&v(b.toolLink(k))};return f.jsx(UD,{options:S,value:e,onValueChange:O,placeholder:l||p?"Loading tools...":r,searchPlaceholder:n,emptyText:s,className:i,disabled:o||l||p||c||m})}function p4r({tagOptions:e,selectedTag:t,providerOptions:r,selectedProvider:n,onTagChange:s,onProviderChange:i,searchTerm:o,onSearchChange:a,onReset:l,className:c,isLoading:u}){return u?f.jsxs("div",{className:re("h-[6.5rem] flex items-center gap-8","[&>div]:bg-surface3 [&>div]:w-48 [&>div]:h-8 [&>div]:animate-pulse",c),children:[f.jsx("div",{})," ",f.jsx("div",{})," ",f.jsx("div",{})]}):f.jsxs("div",{className:re("flex flex-wrap mx-auto sticky top-0 gap-8 bg-surface2 py-8",c),children:[f.jsx(QZe,{label:"Search templates",value:o,onChange:d=>a?.(d.target.value),placeholder:"Search Template"}),f.jsx(k0,{label:"Filter by tag",value:t,onValueChange:s,options:e}),f.jsx(k0,{label:"Filter by provider",value:n,onValueChange:i,options:r}),l&&f.jsxs(Je,{onClick:l,children:["Reset ",f.jsx(Ia,{})]})]})}function h4r(e){return e.replace(/\/$/,"").split("/").pop()}function nR({children:e,className:t}){return f.jsx("div",{className:re("border border-border1 rounded-lg mt-12 py-8 lg:min-h-[25rem] transition-height px-4 lg:px-12",t),children:e})}function m4r({templates:e,linkComponent:t,className:r,isLoading:n}){const s=t||"a";return n?f.jsx("div",{className:re("grid gap-y-4",r),children:Array.from({length:5}).map((i,o)=>f.jsx("div",{className:"h-16 bg-surface3 animate-pulse rounded-lg"},o))}):f.jsx("div",{className:re("grid gap-y-4",r),children:e.map(i=>{const o=i?.agents||i?.tools||i?.networks||i?.workflows||i?.mcp;return f.jsxs("article",{className:re("border border-border1 rounded-lg overflow-hidden w-full grid grid-cols-[1fr_auto] bg-surface3 transition-colors hover:bg-surface4"),children:[f.jsxs(s,{to:`/templates/${i.slug}`,className:re("grid [&:hover_p]:text-neutral5",{"grid-cols-[8rem_1fr] lg:grid-cols-[12rem_1fr]":i.imageURL}),children:[i.imageURL&&f.jsx("div",{className:re("overflow-hidden"),children:f.jsx("div",{className:"w-full h-full bg-cover thumb transition-scale duration-150",style:{backgroundImage:`url(${i.imageURL})`}})}),f.jsxs("div",{className:re("grid py-3 px-6 w-full gap-0.5","[&_svg]:w-[1em] [&_svg]:h-[1em] [&_svg]:text-neutral3"),children:[f.jsx("h2",{className:"text-ui-lg text-neutral5",children:i.title}),f.jsx("p",{className:"text-ui-md text-neutral4 transition-colors duration-500",children:i.description}),f.jsxs("div",{className:"hidden 2xl:flex text-neutral3 text-ui-md flex-wrap items-center gap-4 mt-3",children:[o&&f.jsxs("ul",{className:re("flex gap-4 text-ui-md text-neutral3 m-0 p-0 list-none","[&>li]:flex [&>li]:items-center [&>li]:gap-0.5 text-neutral4"),children:[i?.agents&&i.agents.length>0&&f.jsxs("li",{children:[f.jsx(Fo,{})," ",i.agents.length]}),i?.tools&&i.tools.length>0&&f.jsxs("li",{children:[f.jsx(Cu,{})," ",i.tools.length]}),i?.networks&&i.networks.length>0&&f.jsxs("li",{children:[f.jsx(dTe,{})," ",i.networks.length]}),i?.workflows&&i.workflows.length>0&&f.jsxs("li",{children:[f.jsx(mTe,{})," ",i.workflows.length]}),i?.mcp&&i.mcp.length>0&&f.jsxs("li",{children:[f.jsx(sb,{})," ",i.mcp.length]})]}),o&&i.supportedProviders&&f.jsx("small",{children:"|"}),f.jsx("div",{className:"flex items-center text-neutral3 gap-4",children:i.supportedProviders.map(a=>f.jsx("span",{className:"",children:a},a))})]})]})]}),f.jsx("a",{href:i.githubUrl,className:re("group items-center gap-2 text-ui-md ml-auto pr-4 hidden","lg:flex"),target:"_blank",rel:"noopener noreferrer",children:f.jsxs("span",{className:"flex items-center gap-2 px-2 py-1 rounded bg-surface1 group-hover:bg-surface2 text-neutral3 transition-colors group-hover:text-neutral5",children:[f.jsx(ute,{})," ",h4r(i.githubUrl)]})})]},i.slug)})})}function g4r({title:e,description:t,imageURL:r,githubUrl:n,isLoading:s,infoData:i,templateSlug:o}){const a=o?`feat/install-template-${o}`:"feat/install-template-[slug]";return f.jsxs(f.Fragment,{children:[f.jsx("div",{className:re("grid mt-8 items-center"),children:f.jsxs("div",{className:re("text-header-lg flex items-center gap-3","[&>svg]:w-[1.2em] [&>svg]:h-[1.2em] [&>svg]:opacity-50",{"[&>svg]:opacity-20":s}),children:[f.jsx($dt,{}),f.jsx("h2",{className:re({"bg-surface4 flex rounded-lg min-w-[50%]":s}),children:s?f.jsx(f.Fragment,{children:" "}):e})]})}),f.jsxs("div",{className:"grid lg:grid-cols-[1fr_1fr] gap-x-24",children:[f.jsxs("div",{className:"grid",children:[f.jsx("p",{className:re("mb-4 text-ui-md text-neutral4 mt-2 leading-7",{"bg-surface4 rounded-lg ":s}),children:s?f.jsx(f.Fragment,{children:" "}):t}),!s&&o&&f.jsxs("div",{className:re("bg-surface2 border border-surface4 rounded-lg p-4 mb-4","flex items-start gap-3"),children:[f.jsx("div",{className:"flex-shrink-0 mt-0.5",children:f.jsx(sl,{className:"w-[1.1em] h-[1.1em] text-blue-500"})}),f.jsxs("div",{className:"flex-1 space-y-2",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(cTe,{className:"w-[1em] h-[1em] text-neutral4"}),f.jsx("span",{className:"text-ui-md font-medium text-neutral5",children:"A new Git branch will be created"})]}),f.jsxs("div",{className:"text-ui-sm text-neutral4 space-y-1",children:[f.jsxs("div",{children:[f.jsx("span",{className:"font-medium",children:"Branch name:"})," ",f.jsx("code",{className:"bg-surface3 px-1.5 py-0.5 rounded text-ui-sm font-mono",children:a})]}),f.jsx("div",{children:"This ensures safe installation with easy rollback if needed. Your main branch remains unchanged."})]})]})]}),n&&f.jsxs("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 mt-auto text-neutral3 text-ui-md hover:text-neutral5",children:[f.jsx(ute,{}),n?.split("/")?.pop()]})]}),i&&f.jsx(ib,{data:i,LinkComponent:uTe,labelsAreHidden:!0,isLoading:s})]})]})}function y4r({providerOptions:e,selectedProvider:t,onProviderChange:r,variables:n,errors:s,handleInstallTemplate:i,handleVariableChange:o,isLoadingEnvVars:a,isInstalling:l,defaultModelProvider:c,defaultModelId:u,onModelUpdate:d}){return f.jsx(nR,{children:f.jsxs("div",{className:"max-w-[40rem] my-4 p-4 lg:p-8 mx-auto gap-8 grid",children:[f.jsxs("h2",{className:re("text-neutral4 text-header-sm font-semibold flex items-center gap-2","[&>svg]:w-[1.2em] [&_svg]:h-[1.2em] [&_svg]:opacity-70"),children:["Install Template ",f.jsx(fTe,{})]}),f.jsx(k0,{options:e,label:"Template AI Model Provider",onValueChange:r,value:t,placeholder:"Select"}),t&&Object.entries(n||{}).length>0&&f.jsxs(f.Fragment,{children:[f.jsx("h3",{className:"text-neutral3 text-ui-md",children:"Set required Environmental Variables"}),f.jsx("div",{className:"grid grid-cols-[1fr_1fr] gap-4 items-start",children:a?f.jsxs("div",{className:re("flex items-center justify-center col-span-2 text-neutral3 text-ui-sm gap-4","[&_svg]:opacity-50 [&_svg]:w-[1.1em] [&_svg]:h-[1.1em]","animate-in fade-in duration-300"),children:[f.jsx(ea,{})," Loading variables..."]}):Object.entries(n).map(([p,m])=>f.jsxs(E.Fragment,{children:[f.jsx(_0,{name:`env-${p}`,labelIsHidden:!0,label:"Key",value:p,disabled:!0,className:"w-full"}),f.jsx(_0,{name:p,labelIsHidden:!0,label:"Value",value:m,onChange:o,errorMsg:s.includes(p)?"Value is required.":"",autoComplete:"off",className:"w-full"})]},p))}),f.jsxs("div",{className:"border-t border-border1 pt-12 mt-3.5 relative",children:[f.jsx("div",{className:"absolute w-8 h-8 rounded-full bg-surface2 top-0 left-1/2 -translate-x-1/2 -translate-y-4 text-ui-sm text-neutral3 flex items-center justify-center",children:"And"}),f.jsx("h3",{className:"text-neutral4 text-ui-lg",children:"Set AI Model for Template Installation"}),f.jsx("p",{className:"text-neutral3 text-ui-md mt-2 mb-8",children:"This model will be used by the workflow to process and install the template"}),f.jsx(Cte,{defaultProvider:c||"",defaultModel:u||"",updateModel:d||(()=>Promise.resolve({message:"Updated"})),closeEditor:()=>{},autoSave:!0,selectProviderPlaceholder:"Provider"})]})]}),t&&!a&&f.jsx(Je,{className:re("flex items-center gap-2 mt-4 justify-center text-ui-md w-full bg-surface5 min-h-10 rounded-lg text-neutral5 hover:bg-surface6 transition-colors","[&>svg]:w-[1.1em] [&_svg]:h-[1.1em] [&_svg]:text-neutral5"),onClick:i,disabled:!t||!c||!u||s.length>0||l,children:l?f.jsxs(f.Fragment,{children:[f.jsx(ea,{className:"w-4 h-4"})," Installing..."]}):f.jsxs(f.Fragment,{children:["Install ",f.jsx(qx,{})]})})]})})}function v4r(e){switch(e){case"running":return f.jsx(ea,{});case"success":return f.jsx(lu,{});case"failed":return f.jsx(Ia,{});default:return null}}function b4r({stepId:e,step:t,isActive:r,position:n}){const s=i=>i.charAt(0).toUpperCase()+i.slice(1).replace(/-/g," ");return f.jsxs("div",{className:re("grid gap-6 grid-cols-[1fr_auto] py-3 px-4 rounded-lg",kr.all,{"border border-dashed border-neutral2 bg-surface3":r}),children:[f.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-2",children:[f.jsxs("span",{className:re("text-ui-md min-w-6 flex justify-end",kr.colors,{"text-neutral5":r||t.status==="success","text-neutral3":!r&&t.status!=="success"}),children:[n,"."]}),f.jsxs("div",{children:[f.jsx("h4",{className:re("text-ui-md",kr.colors,{"text-neutral5":r||t.status==="success","text-neutral3":!r&&t.status!=="success"}),children:s(e)}),t.description&&f.jsx("p",{className:"text-ui-md text-neutral2 -mt-0.5",children:t.description})]})]}),f.jsx("div",{className:re("w-[1.75rem] h-[1.75rem] rounded-full flex items-center justify-center self-center",kr.all,{"border border-neutral2 border-dashed":t.status==="pending","[&>svg]:text-white [&>svg]:w-[1rem] [&>svg]:h-[1rem]":t.status!=="running","w-[1.75rem] h-[1.75rem]":t.status==="running","bg-accent1Dark shadow-glow-accent1":t.status==="success","bg-accent2Dark shadow-glow-accent2":t.status==="failed","scale-110":t.status==="success"||t.status==="failed"}),children:v4r(t.status)})]})}function x4r({currentStep:e,steps:t=[],className:r}){return f.jsx("div",{className:re(r),children:t.map((n,s)=>f.jsx(b4r,{stepId:n.id,step:n,isActive:e?.id===n.id,position:s+1},n.id))})}function w4r({steps:e}){const t=e.length,r=e.filter(n=>n.status==="success").length;return f.jsxs("div",{className:"flex justify-center flex-col gap-4 content-center w-full",children:[f.jsx("div",{className:"grid grid-cols-[0_repeat(9,1fr)] w-full",children:e.map((n,s)=>f.jsx("div",{className:re("flex justify-end items-center relative h-[2rem]",kr.colors,{"bg-accent1Dark":n.status==="success"&&e?.[s-1]?.status==="success"}),children:f.jsx("div",{className:re("w-[2rem] h-[2rem] rounded-full flex items-center justify-center self-center absolute right-0 translate-x-[50%] bg-surface3 z-10 text-neutral3 font-bold text-ui-sm",kr.all,{"border border-neutral2 border-dashed":n.status==="pending","[&>svg]:text-surface1 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]":n.status!=="running","bg-accent1Dark text-white shadow-glow-accent1 scale-110":n.status==="success","bg-accent2Dark text-white shadow-glow-accent2 scale-110":n.status==="failed"}),children:n.status==="running"?f.jsx(ea,{}):s+1})},n.id))}),f.jsxs("div",{className:re("text-xs text-neutral3 text-center",kr.colors),children:[r," of ",t," steps completed"]})]})}function S4r({name:e,streamResult:t,runId:r,workflowInfo:n}){const s=t?.phase||"initializing",i=t?.payload?.workflowState,o=t?.payload?.currentStep,a=t?.error,l=i?.steps||{},c=Object.keys(l).length>0,u=v=>v==="input"||v.endsWith(".input")||v.startsWith("Mapping_")&&/[0-9a-f]{8}/.test(v)||/[0-9a-f]{8,}/.test(v)?!1:n?.allSteps?v in n.allSteps:!0,d=Object.entries(l).filter(([v,b])=>u(v)),p=d.length,m=()=>{switch(s){case"initializing":return"Preparing template installation...";case"processing":return`Installing ${e} template`;case"completed":return"Template installation completed!";case"error":return"Template installation failed";default:return"Installing template..."}},g=d.map(([v,b])=>({id:v,status:b?.status,description:b?.description,title:v.charAt(0).toUpperCase()+v.slice(1).replace(/-/g," "),isActive:o?.id===v}));return f.jsxs(nR,{className:"space-y-6 text-neutral3 mb-8 content-center",children:[f.jsxs("div",{className:"text-center",children:[f.jsx("h3",{className:"text-lg font-semibold text-neutral5",children:m()}),t?.runId&&f.jsxs("div",{className:"mt-2 text-ui-sm text-neutral3",children:["Run ID: ",t.runId]})]}),c&&p>0&&!["error"].includes(s)&&f.jsx("div",{className:"max-w-[30rem] w-full mx-auto px-6",children:f.jsx(w4r,{steps:g})}),a&&s==="error"&&f.jsxs("div",{className:re("rounded-lg text-neutral5 p-6 flex items-center gap-3 text-ui-md bg-red-500/10","[&>svg]:w-6 [&>svg]:h-6 [&>svg]:opacity-70 [&>svg]:text-red-500"),children:[f.jsx(Ddt,{}),a||"Something went wrong"]}),c&&f.jsx(x4r,{steps:g,currentStep:o,className:"pb-4"}),!c&&s==="initializing"&&f.jsxs("div",{className:"text-center text-sm text-neutral3 grid gap-4 justify-items-center",children:[f.jsx(ea,{}),f.jsx("p",{children:"This may take some time..."})]})]})}function O4r({name:e,installedEntities:t,linkComponent:r}){const n=r||"a";return f.jsxs(nR,{className:re("grid items-center justify-items-center gap-4 content-center","[&>svg]:w-8 [&>svg]:h-8"),children:[f.jsx(fTe,{}),f.jsx("h2",{className:"text-header-md",children:"Done!"}),f.jsxs("p",{className:"text-ui-md text-center text-neutral3 ",children:["The ",f.jsx("b",{className:"text-neutral4",children:e})," template has been successfully installed.",t&&t.length>0&&f.jsxs(f.Fragment,{children:[f.jsx("br",{})," Installed entities are listed below."]})]}),t&&t.length>0&&f.jsx(ib,{data:t,LinkComponent:n})]})}function _4r({errorMsg:e,validationErrors:t}){const r=e?.includes("Invalid schema for function"),n=e?.includes("validation issue")||t&&t.length>0,s=()=>n?"Template installation completed but some validation issues remain. The template may still be functional, but you should review and fix these issues.":r?"There was an issue with the AI model configuration. This may be related to the selected model or AI SDK version compatibility.":"An unexpected error occurred during template installation.",i=()=>n?{icon:f.jsx(I0,{className:"text-yellow-500"}),title:"Template Installed with Warnings"}:{icon:f.jsx(edt,{}),title:"Template Installation Failed"},{icon:o,title:a}=i();return f.jsxs(nR,{className:"space-y-4 text-neutral3 mb-8 content-center",children:[f.jsxs("div",{className:re("grid items-center justify-items-center gap-4 content-center","[&>svg]:w-8 [&>svg]:h-8"),children:[o,f.jsxs("div",{className:"text-center space-y-2",children:[f.jsx("p",{className:"text-ui-md font-medium text-neutral5",children:a}),f.jsx("p",{className:"text-ui-md text-neutral3",children:s()})]})]}),t&&t.length>0&&f.jsxs("details",{className:"text-xs",children:[f.jsxs("summary",{className:"cursor-pointer text-neutral3 hover:text-neutral4 select-none text-center",children:["Show Validation Issues (",t.length,")"]}),f.jsx("div",{className:"mt-4 p-3 bg-gray-100 dark:bg-gray-800 rounded text-xs overflow-auto max-h-60 text-left space-y-2",children:t.map((l,c)=>f.jsxs("div",{className:"border-l-2 border-red-400 pl-2",children:[f.jsx("div",{className:"font-medium text-red-600 dark:text-red-400",children:l.type==="typescript"?"🔴 TypeScript Error":"⚠️ Lint Error"}),f.jsx("div",{className:"text-xs font-mono text-gray-700 dark:text-gray-300 mt-1 whitespace-pre-wrap break-words",children:l.message})]},c))})]}),e&&!n&&f.jsxs("details",{className:"text-xs",children:[f.jsx("summary",{className:"cursor-pointer text-neutral3 hover:text-neutral4 select-none text-center",children:"Show Details"}),f.jsx("div",{className:"mt-4 p-3 bg-gray-100 dark:bg-gray-800 rounded text-xs font-mono overflow-auto max-h-60 text-left",children:f.jsx("div",{className:"whitespace-pre-wrap break-words",children:e})})]})]})}const k4r=e=>{if(!e||e.length===0)return[];const t=e.reduce((a,l)=>{const c=l?.endedAt?new Date(l.endedAt):void 0;return c&&(!a||c>a)?c:a},null),r=new Map,n=[];e.forEach(a=>{const l=new Date(a.startedAt),c=a.endedAt?new Date(a.endedAt):void 0,u={id:a.spanId,name:a.name,type:a.spanType,latency:c?c.getTime()-l.getTime():0,startTime:l.toISOString(),endTime:c?c.toISOString():void 0,spans:[],parentSpanId:a.parentSpanId};r.set(a.spanId,u)}),e.forEach(a=>{const l=r.get(a.spanId);if(a?.parentSpanId==null){if(t&&l.endTime&&t>new Date(l.endTime)){l.endTime=t.toISOString();const c=new Date(t).getTime(),u=new Date(l.startTime).getTime();l.latency=c-u}n.push(l)}else{const c=r.get(a.parentSpanId);c?c.spans.push(l):n.push(l)}});const s=a=>a.sort((l,c)=>new Date(l.startTime).getTime()-new Date(c.startTime).getTime()),i=s(n),o=a=>{a.forEach(l=>{l.spans&&l.spans.length>0&&(l.spans=s(l.spans),o(l.spans))})};return o(i),i},Rxe=["agent","workflow","model","tool","other"];function Bqe(e){const t=e?.toLowerCase().split("_")[0],r={agent:{icon:f.jsx(Fo,{}),color:"oklch(0.75 0.15 250)",label:"Agent",bgColor:"bg-oklch(0.75 0.15 250 / 0.1)",typePrefix:"agent"},workflow:{icon:f.jsx(Tu,{}),color:"oklch(0.75 0.15 200)",label:"Workflow",bgColor:"bg-oklch(0.75 0.15 200 / 0.1)",typePrefix:"workflow"},model:{icon:f.jsx(KCe,{}),color:"oklch(0.75 0.15 320)",label:"Model",bgColor:"bg-oklch(0.75 0.15 320 / 0.1)",typePrefix:"model"},tool:{icon:f.jsx(Cu,{}),color:"oklch(0.75 0.15 100)",label:"Tool",bgColor:"bg-oklch(0.75 0.15 100 / 0.1)",typePrefix:"tool"}};return t in r?r[t]:{typePrefix:"other"}}function Vqe(e){if(!e.spans||e.spans.length===0)return[];const t=[];return e.spans.forEach(r=>{t.push(r.id),t.push(...Vqe(r))}),t}function E4r({isLastChild:e,hasChildren:t=!1,expanded:r=!1}){return f.jsx("div",{className:re("w-[3rem] h-[2.8rem] relative opacity-100",'after:content-[""] after:absolute after:left-[-1px] after:top-0 after:bottom-0 after:w-[0px] after:border-l-[1px] after:border-neutral3 after:border-dashed ','before:content-[""] before:absolute before:left-0 before:top-[50%] before:w-full before:h-[0px] before:border-b-[1px] before:border-neutral3 before:border-dashed',"[&_svg]:transition-all","[&:hover_svg]:text-yellow-500 [&:hover_svg]:scale-[1.3] [&:hover_svg]:opacity-100",{"after:bottom-[50%]":e}),children:t&&f.jsx("span",{className:re("flex absolute left-[50%] top-[50%] translate-y-[-50%] translate-x-[-50%] items-center justify-center bg-surface2 p-[0.25rem]","[&>svg]:shrink-0 [&>svg]:opacity-60 [&>svg]:w-[0.8rem] [&>svg]:h-[0.8rem]"),children:r?f.jsx(Sut,{}):f.jsx(xut,{})})})}function C4r({icon:e,color:t}){return f.jsx("span",{className:re("flex w-[1.1rem] h-[1.1rem] shrink-0 rounded-md items-center justify-center","[&>svg]:w-[.9rem] [&>svg]:h-[.9rem] [&>svg]:text-surface2"),style:{backgroundColor:t},children:e})}function T4r({span:e,spanUI:t,isFaded:r,depth:n=0,onSpanClick:s,selectedSpanId:i,isLastChild:o,hasChildren:a,isRootSpan:l,isExpanded:c,toggleChildren:u}){return f.jsxs("div",{"aria-label":`View details for span ${e.name}`,className:re("rounded-md transition-colors flex opacity-80 min-h-12 items-center rounded-l-lg","mt-4 xl:mt-0",{"opacity-30 [&:hover]:opacity-60":r,"bg-surface4":i===e.id}),style:{paddingLeft:`${n*1.5}rem`},children:[!l&&f.jsx("button",{onClick:()=>u?.(),disabled:!a,className:re({"cursor-default":!a,"cursor-pointer":a}),children:f.jsx(E4r,{isLastChild:o,hasChildren:!!a,expanded:c})}),f.jsxs("button",{onClick:()=>s?.(e.id),className:re("text-ui-md flex items-center text-left break-all gap-2 text-white w-full rounded-lg h-full px-3 py-2 transition-colors","[&>svg]:transition-all [&>svg]:shrink-0 [&>svg]:opacity-0 [&>svg]:w-[1em] [&>svg]:h-[1em] [&>svg]:ml-auto","hover:bg-surface4 [&:hover>svg]:opacity-60"),children:[t?.icon&&f.jsx(C4r,{icon:t.icon,color:t.color?t.color:void 0}),f.jsx("span",{className:re("p-0 px-1 rounded-md"),children:e.name}),f.jsx(Yut,{})]})]})}function D4r({isSelected:e,isFaded:t,isExpanded:r,toggleChildren:n,expandAllDescendants:s,totalDescendants:i=0,allDescendantsExpanded:o,numOfChildren:a}){return f.jsx("div",{className:re("flex items-center justify-end h-full px-3",{"opacity-30 [&:hover]:opacity-60":t,"bg-surface4":e}),children:a&&a>0?f.jsxs("div",{className:"flex gap-1",children:[f.jsxs(Mxe,{onClick:()=>n?.(),children:[o?i:a," ",r?o?f.jsx(put,{}):f.jsx(HN,{}):f.jsx(Vd,{})]}),i>a&&!o&&f.jsxs(Mxe,{onClick:()=>s?.(),children:[i," ",f.jsx(iut,{})]})]}):null})}function Mxe({onClick:e,children:t,className:r}){return f.jsx("button",{onClick:e,className:re("h-full",r),children:f.jsx("div",{className:re("flex items-center gap-[0.1rem] text-ui-sm text-neutral5 border border-border1 pl-2 pr-1 rounded-lg transition-all","hover:text-yellow-500","[&>svg]:shrink-0 [&>svg]:opacity-80 [&>svg]:w-[1rem] [&>svg]:h-[1rem] [&>svg]:transition-all"),children:t})})}function A4r({span:e,selectedSpanId:t,isFaded:r,overallLatency:n,overallStartTime:s,color:i}){const{Link:o}=Lr(),a=n?Math.ceil(e.latency/n*100):0,l=s?new Date(s):null,c=e.startTime?new Date(e.startTime):null,u=c&&l?c.getTime()-l.getTime():0,d=n&&Math.floor(u/n*100);return f.jsxs(lVe,{openDelay:250,children:[f.jsxs(cVe,{className:re("h-12 p-2 grid grid-cols-[1fr_auto] gap-4 items-center cursor-help pr-3 rounded-r-lg col-span-2 xl:col-span-1","[&:hover>div]:bg-surface5",{"opacity-30 [&:hover]:opacity-60":r,"bg-surface4":t===e.id}),children:[f.jsx("div",{className:re("w-full p-2.5 rounded-lg bg-surface4 transition-colors duration-1000"),children:f.jsx("div",{className:"relative w-full h-1.5 rounded-sm",children:f.jsx("div",{className:re("bg-neutral1 absolute rounded-sm h-1.5 top-0"),style:{width:a?`${a}%`:"2px",left:`${d||0}%`,backgroundColor:i}})})}),f.jsxs("div",{className:re("flex justify-end text-neutral3 text-ui-sm"),children:[(e.latency/1e3).toFixed(3)," s"]})]}),f.jsx(uVe,{children:f.jsxs(dVe,{className:"z-50 w-auto max-w-[25rem] rounded-md bg-surface4 p-2 px-4 pr-6 text-ui-sm text-neutral5 text-center border border-border1",sideOffset:5,side:"top",children:[f.jsxs("div",{className:re("text-ui-md flex items-center gap-2 mb-4","[&>svg]:w-[1.25em] [&>svg]:h-[1.25em] [&>svg]:shrink-0 [&>svg]:opacity-50"),children:[f.jsx(QB,{})," Span Timing"]}),f.jsx(ib,{className:" [&>dd]:text-ui-md [&>dt]:text-ui-md [&>dt]:min-h-0 [&>dd]:min-h-0",data:[{key:"Latency",label:"Latency",value:`${e.latency} ms`,icon:f.jsx(lut,{})},{key:"startTime",label:"Started at",value:e.startTime?zn(new Date(e.startTime),"hh:mm:ss:SSS a"):"-",icon:f.jsx(Kct,{})},{key:"endTime",label:"Ended at",value:e.endTime?zn(new Date(e.endTime),"hh:mm:ss:SSS a"):"-",icon:f.jsx(tut,{})},{key:"startShift",label:"Start Shift",value:`${u}ms`,icon:f.jsx(tTe,{})}],LinkComponent:o}),f.jsx(fVe,{className:"fill-surface5"})]})})]})}function Uqe({span:e,depth:t=0,onSpanClick:r,selectedSpanId:n,isLastChild:s,overallLatency:i,overallStartTime:o,overallEndTime:a,fadedTypes:l,searchPhrase:c,featuredSpanIds:u,expandedSpanIds:d,setExpandedSpanIds:p}){const m=e.spans&&e.spans.length>0,g=e.spans?e.spans.length:0,v=Vqe(e),b=v.length,w=t===0,S=Bqe(e?.type),O=d?d.includes(e.id):!1,k=u&&u.length>0?!u.includes(e.id):!1,T=(l&&l.length>0?l.includes(S?.typePrefix||""):!1)||k;E.useEffect(()=>{w&&p?.([e.id])},[w,e.id,p]),E.useEffect(()=>{if(!u||!e.spans||e.spans.length===0)return;const M=e.spans.some(z=>u.includes(z.id));!O&&M&&P()},[u,e.spans,e.id,O,p,d]);const P=()=>{if(!(!p||!d))if(O){const M=[e.id,...v];p(d.filter(z=>!M.includes(z)))}else p([...d,e.id])},A=()=>{!p||!d||p([...d,e.id,...v])},R=v.every(M=>d?.includes(M));return f.jsxs(f.Fragment,{children:[f.jsx(T4r,{span:e,spanUI:S,isFaded:T,depth:t,onSpanClick:r,selectedSpanId:n,isLastChild:s,hasChildren:m,isRootSpan:w,isExpanded:O,toggleChildren:P}),f.jsx(D4r,{isSelected:n===e.id,isFaded:T,isExpanded:O,toggleChildren:P,expandAllDescendants:A,expandedSpanIds:d,totalDescendants:b,allDescendantsExpanded:R,numOfChildren:g}),f.jsx(A4r,{span:e,selectedSpanId:n,isFaded:T,overallLatency:i,overallStartTime:o,overallEndTime:a,color:S?.color}),m&&O&&e.spans?.map((M,z,Q)=>{const U=z===Q.length-1;return f.jsx(Uqe,{span:M,depth:t+1,onSpanClick:r,selectedSpanId:n,isLastChild:U,overallLatency:i,overallStartTime:o,fadedTypes:l,searchPhrase:c,expandedSpanIds:d,setExpandedSpanIds:p,featuredSpanIds:u},M.id)})]})}function P4r({hierarchicalSpans:e=[],onSpanClick:t,selectedSpanId:r,isLoading:n,fadedTypes:s,expandedSpanIds:i,setExpandedSpanIds:o,featuredSpanIds:a}){const l=e?.[0]?.latency||0,c=e?.[0]?.startTime||"",u=e?.[0]?.endTime||"";return f.jsx(f.Fragment,{children:n?f.jsxs("div",{className:re("flex items-center text-ui-md gap-4 bg-surface3/50 rounded-md p-6 justify-center text-neutral3","[&_svg]:w-[1.25em] [&_svg]:h-[1.25em] [&_svg]:opacity-50"),children:[f.jsx(ea,{})," Loading Trace Timeline ..."]}):f.jsx("div",{className:re("grid items-start content-start gap-y-0.5 overflow-hidden grid-cols-[1fr_auto] xl:py-4",{"xl:grid-cols-[1fr_auto_auto]":!u,"xl:grid-cols-[2fr_auto_1fr]":u}),children:e?.map(d=>f.jsx(Uqe,{span:d,onSpanClick:t,selectedSpanId:r,overallLatency:l,overallStartTime:c,overallEndTime:u,fadedTypes:s,featuredSpanIds:a,expandedSpanIds:i,setExpandedSpanIds:o},d.id))})})}const $4r=({className:e,children:t})=>f.jsx("div",{className:re("flex items-center text-ui-sm border border-border1 rounded-lg overflow-hidden","[&>button]:border-0 [&>button:not(:first-child)]:border-l [&>button:not(:first-child)]:border-border1","[&>button]:rounded-none [&>button:first-child]:rounded-l-lg [&>button:last-child]:rounded-r-lg",e),children:t});function I4r({spans:e=[],fadedTypes:t,onLegendClick:r,onLegendReset:n,onSearchPhraseChange:s,traceId:i}){const[o,a]=E.useState("");E.useEffect(()=>{a("")},[i]);const l=Rxe.filter(p=>e.some(m=>m?.spanType?.startsWith(p)))||[],c=e.some(p=>!Rxe.some(g=>p?.spanType?.startsWith(g))),u=p=>{r?.(p)};E.useEffect(()=>{d(o)},[o,s]);const d=$Gt(p=>{s?.(p)},1e3);return f.jsxs("div",{className:"flex gap-3 items-center justify-between",children:[f.jsx("div",{className:"flex",children:f.jsx(QZe,{value:o,onChange:p=>{a(p.target.value)},label:"Find span by name",placeholder:"Look for span name",onReset:()=>a("")})}),f.jsxs($4r,{children:[l.map((p,m)=>{const g=Bqe(p),v=t?.includes(p);return f.jsx(E.Fragment,{children:f.jsxs(Je,{onClick:()=>u(p),className:v?"opacity-40":"",style:{color:v?void 0:g?.color,backgroundColor:g?.bgColor},children:[g?.icon&&f.jsx(qe,{children:g.icon}),g?.label]})},p)}),c&&f.jsxs(Je,{onClick:()=>u("other"),className:t?.includes("other")?"opacity-40":"",style:{color:(t?.includes("other"),void 0),backgroundColor:void 0},children:[f.jsx(qe,{children:f.jsx(sG,{})}),"Other"]}),f.jsx(Je,{onClick:n,disabled:t?.length===0,children:f.jsx(qe,{children:f.jsx(Ia,{})})})]})]})}function H4({children:e,className:t}){return f.jsx("div",{className:re("grid gap-12",t),children:e})}function N4r(e){const{paths:t}=Lr();if(!e)return[];const r=t.agentsLink(),n=t.workflowsLink(),s=e.entityId,i=e.entityType,o=e.entityName,a=i==="agent",l=i==="workflow_run",c=a&&s?t.agentLink(s):l&&s?t.workflowLink(s):void 0;return[{key:"entityId",label:"Entity Id",value:[{id:s??"unknown",name:o||s||"-",path:c}]},{key:"entityType",label:"Entity Type",value:[{id:i??"unknown",name:i??"-",path:a?r:l?n:void 0}]},{key:"status",label:"Status",value:e?.attributes?.status||"-"},{key:"startedAt",label:"Started at",value:e?.startedAt?zn(new Date(e?.startedAt),"MMM dd, h:mm:ss.SSS aaa"):"-"},{key:"endedAt",label:"Ended at",value:e?.endedAt?zn(new Date(e?.endedAt),"MMM dd, h:mm:ss.SSS aaa"):"-"}]}function R4r({span:e}){if(!e)return[];const t=[{key:"spanType",label:"Span Type",value:e?.spanType},{key:"startedAt",label:"Started At",value:e?.startedAt?zn(new Date(e.startedAt),"MMM dd, h:mm:ss.SSS aaa"):"-"},{key:"endedAt",label:"Ended At",value:e?.endedAt?zn(new Date(e.endedAt),"MMM dd, h:mm:ss.SSS aaa"):"-"}],r=e?.attributes?.finishReason;return r&&t.push({key:"finishReason",label:"Finish Reason",value:r}),t}function jxe(e){return typeof e=="object"&&e!==null}const M4r={text:"Text",cacheRead:"Cache Read",cacheWrite:"Cache Write",audio:"Audio",image:"Image",reasoning:"Reasoning"};function j4r({traceUsage:e,traceSpans:t=[],spanUsage:r,className:n}){if(!e&&!r)return console.warn("No usage data available"),null;if(e&&r)return console.warn("Only one of traceUsage or spanUsage should be provided"),null;const s=t.filter(v=>v.spanType==="model_generation"),i=s.some(v=>{const b=v.attributes?.usage;return b&&"inputTokens"in b}),o=s.reduce((v,b)=>{const w=b.attributes?.usage||{},S=b?.attributes?.model||"",O=b?.attributes?.provider||"",k=`${O}${O&&S?" / ":""}${S}`;if(v?.[k]||(i?v[k]={inputTokens:0,outputTokens:0,totalTokens:0,reasoningTokens:0,cachedInputTokens:0}:v[k]={promptTokens:0,completionTokens:0,totalTokens:0}),"inputTokens"in v[k]&&i){const C=w.inputTokens??0,T=w.outputTokens??0,P=w.reasoningTokens??0,A=w.cachedInputTokens??0,R=v[k];R.inputTokens+=C,R.outputTokens+=T,R.reasoningTokens=(R.reasoningTokens??0)+P,R.cachedInputTokens=(R.cachedInputTokens??0)+A,R.totalTokens+=w.totalTokens||C+T}else if("promptTokens"in v[k]&&!i){const C=w.promptTokens??0,T=w.completionTokens??0,P=v[k];P.promptTokens+=C,P.completionTokens+=T,P.totalTokens+=w.totalTokens||C+T}return v},{}),a=Object.keys(o).reduce((v,b)=>{const w=o[b];if(i){const S=w,O=v;O.inputTokens=(O.inputTokens||0)+S.inputTokens,O.outputTokens=(O.outputTokens||0)+S.outputTokens,O.reasoningTokens=(O.reasoningTokens||0)+(S?.reasoningTokens??0),O.cachedInputTokens=(O.cachedInputTokens||0)+(S?.cachedInputTokens??0),O.totalTokens=(O.totalTokens||0)+S.totalTokens}else{const S=w,O=v;O.promptTokens=(O.promptTokens||0)+S.promptTokens,O.completionTokens=(O.completionTokens||0)+S.completionTokens,O.totalTokens=(O.totalTokens||0)+S.totalTokens}return v},i?{inputTokens:0,outputTokens:0,totalTokens:0,reasoningTokens:0,cachedInputTokens:0}:{promptTokens:0,completionTokens:0,totalTokens:0}),l=JSON.stringify(e)===JSON.stringify(a),c={promptTokens:{label:"Prompt Tokens",icon:f.jsx(qx,{})},completionTokens:{label:"Completion Tokens",icon:f.jsx($O,{})}},u={inputTokens:{label:"Input Tokens",icon:f.jsx(qx,{})},outputTokens:{label:"Output Tokens",icon:f.jsx($O,{})},reasoningTokens:{label:"Reasoning Tokens",icon:f.jsx($O,{})},cachedInputTokens:{label:"Cached Input Tokens",icon:f.jsx($O,{})},inputDetails:{label:"Input Details",icon:f.jsx(qx,{})},outputDetails:{label:"Output Details",icon:f.jsx($O,{})}};let p={...{totalTokens:{label:"Total LLM Tokens",icon:f.jsx(Fut,{})}},...u,...c},m=[];i?m=["totalTokens","inputTokens","outputTokens","reasoningTokens","cachedInputTokens","inputDetails","outputDetails"]:m=["totalTokens","promptTokens","completionTokens"];const g=Object.entries(e||r||{}).filter(v=>{const b=v[1];return typeof b=="number"||jxe(b)}).map(([v,b])=>({key:v,value:b})).sort((v,b)=>m.indexOf(v.key)-m.indexOf(b.key));return f.jsx("div",{className:re("flex gap-6 flex-wrap",n),children:g.map(({key:v,value:b})=>{const w=jxe(b);return f.jsxs("div",{className:re("bg-white/5 p-3 px-4 rounded-lg text-ui-md flex-grow",{"min-h-[5.5rem]":e}),children:[f.jsxs("div",{className:re("grid grid-cols-[1.5rem_1fr_auto] gap-2 items-center","[&>svg]:w-[1.5em] [&>svg]:h-[1.5em] [&>svg]:opacity-70"),children:[p?.[v]?.icon,f.jsx("span",{className:"text-ui-md",children:p?.[v]?.label}),!w&&f.jsx("b",{className:"text-ui-lg",children:b})]}),w&&f.jsx("div",{className:"text-ui-md mt-2 pl-8",children:Object.entries(b).map(([S,O])=>typeof O!="number"?null:f.jsxs("dl",{className:"grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 justify-between text-neutral3",children:[f.jsx("dt",{children:M4r[S]||S}),f.jsx("dd",{children:O})]},S))}),!w&&l&&f.jsx("div",{className:"text-ui-md mt-2 pl-8",children:Object.entries(o).map(([S,O])=>{const k=O?.[v];return typeof k!="number"?null:f.jsxs("dl",{className:"grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 justify-between text-neutral3",children:[f.jsx("dt",{children:S}),f.jsx("dd",{children:k})]},S)})})]},v)})})}function F4r(e){return e?.attributes?.finishReason==="length"}function L4r(e){const t=e?.attributes?.usage;if(!t)return"The model stopped generating because it reached the maximum token limit. The response was truncated and may be incomplete.";const r=t.inputTokens??0,n=t.outputTokens??0,s=t.totalTokens??r+n;return r>0||n>0?`The model stopped generating because it reached the maximum token limit. The response was truncated and may be incomplete.
|
|
565
565
|
|
|
566
566
|
Token usage: ${r} input + ${n} output = ${s} total`:`The model stopped generating because it reached the maximum token limit (${s} tokens). The response was truncated and may be incomplete.`}function z4r({span:e}){if(!e)return null;const t=F4r(e);return f.jsxs(f.Fragment,{children:[t&&f.jsx("div",{className:"bg-yellow-900/20 border border-yellow-200 rounded-md p-2 mb-4",children:f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx(I0,{className:"text-yellow-200 mt-0.5 flex-shrink-0",size:20}),f.jsxs("div",{className:"flex-1",children:[f.jsx("h4",{className:"font-semibold text-yellow-200 mb-1 text-sm",children:"Token Limit Exceeded"}),f.jsx("p",{className:"text-sm text-neutral3 whitespace-pre-line",children:L4r(e)})]})]})}),f.jsx(pn.CodeSection,{title:"Input",icon:f.jsx(oTe,{}),codeStr:JSON.stringify(e.input||null,null,2)}),f.jsx(pn.CodeSection,{title:"Output",icon:f.jsx(aTe,{}),codeStr:JSON.stringify(e.output||null,null,2)}),f.jsx(pn.CodeSection,{title:"Metadata",icon:f.jsx(qv,{}),codeStr:JSON.stringify(e.metadata||null,null,2)}),f.jsx(pn.CodeSection,{title:"Attributes",icon:f.jsx(qv,{}),codeStr:JSON.stringify(e.attributes||null,null,2)})]})}function Qqe({trace:e,span:t,spanScoresData:r,onSpanScoresPageChange:n,isLoadingSpanScoresData:s,spanInfo:i=[],defaultActiveTab:o="details",initialScoreId:a,computeTraceLink:l,scorers:c,isLoadingScorers:u}){const{Link:d}=Lr();let p;return t?.attributes?.agentId||t?.entityType===sT.AGENT?p="Agent":(t?.attributes?.workflowId||t?.entityType===sT.WORKFLOW_RUN)&&(p="Workflow"),f.jsxs(vte,{defaultTab:o,children:[f.jsxs(bte,{children:[f.jsx(kh,{value:"details",children:"Details"}),f.jsxs(kh,{value:"scores",children:["Scoring ",r?.pagination&&`(${r.pagination.total||0})`]})]}),f.jsx(Eh,{value:"details",children:f.jsxs(H4,{children:[t?.attributes?.usage?f.jsx(j4r,{spanUsage:t.attributes.usage}):null,f.jsx(ib,{data:i,LinkComponent:d}),f.jsx(z4r,{span:t})]})}),f.jsx(Eh,{value:"scores",children:f.jsxs(H4,{children:[f.jsxs(qc,{children:[f.jsx(qc.Header,{children:f.jsxs(qc.Heading,{children:[f.jsx(zB,{})," Scoring"]})}),f.jsx(H4r,{traceId:e?.traceId,isTopLevelSpan:!t?.parentSpanId,spanId:t?.spanId,entityType:p,scorers:c,isLoadingScorers:u})]}),f.jsxs(qc,{children:[f.jsx(qc.Header,{children:f.jsxs(qc.Heading,{children:[f.jsx(zB,{})," Scores"]})}),f.jsx(Z4r,{scoresData:r,onPageChange:n,isLoadingScoresData:s,initialScoreId:a,traceId:e?.traceId,spanId:t?.spanId,computeTraceLink:l})]})]})})]})}function B4r({trace:e,span:t,spanScoresData:r,onSpanScoresPageChange:n,isLoadingSpanScoresData:s,isOpen:i,onClose:o,onNext:a,onPrevious:l,onViewToggle:c,spanInfo:u=[],defaultActiveTab:d="details",initialScoreId:p,computeTraceLink:m,scorers:g,isLoadingScorers:v}){return f.jsxs(pn,{dialogTitle:"Observability Span",dialogDescription:"View and analyze span details",isOpen:i,onClose:o,level:2,children:[f.jsxs(pn.Top,{children:[f.jsxs(nl,{children:[f.jsx(Wx,{})," ",$h(t?.traceId)]}),"›",f.jsxs(nl,{children:[f.jsx(NI,{}),$h(t?.spanId)]}),"|",f.jsx(pn.Nav,{onNext:a,onPrevious:l}),f.jsxs("button",{className:"ml-auto mr-8",onClick:c,children:[f.jsx(Fdt,{}),f.jsx(Td,{children:"Switch to dialog view"})]})]}),f.jsxs(pn.Content,{children:[f.jsxs(pn.Header,{children:[f.jsxs(pn.Heading,{children:[f.jsx(NI,{})," ",t?.name]}),f.jsxs(nl,{children:[f.jsx(MI,{})," ",t?.spanId]})]}),f.jsx(Qqe,{trace:e,span:t,spanScoresData:r,onSpanScoresPageChange:n,isLoadingSpanScoresData:s,spanInfo:u,defaultActiveTab:d,initialScoreId:p,computeTraceLink:m,scorers:g,isLoadingScorers:v})]})]})}function V4r({traceId:e,traceSpans:t=[],traceDetails:r,isOpen:n,onClose:s,onNext:i,onPrevious:o,isLoadingSpans:a,computeTraceLink:l,initialSpanId:c,initialSpanTab:u,initialScoreId:d,scorers:p,isLoadingScorers:m}){const{Link:g,navigate:v}=Lr(),[b,w]=E.useState(!!c),[S,O]=E.useState(c),[k,C]=E.useState(!1),[T,P]=E.useState(u||"details"),A=t.find(De=>De.spanId===S),R=N4r(r),[M,z]=E.useState(0),[Q,U]=E.useState(""),[L,V]=E.useState([]),[j,N]=E.useState([]),[I,H]=E.useState([]);E.useEffect(()=>{if(Q.trim()===""){N([]);return}const De=Q.toLowerCase(),Me=t.filter(We=>We.name.toLowerCase().includes(De)).map(We=>We.spanId);N(Me)},[Q]),E.useEffect(()=>{c&&(O(c),w(!0))},[c]),E.useEffect(()=>{M>0&&z(0)},[S]);const B=E.useMemo(()=>k4r(t),[t]),J=E.useMemo(()=>(Me=>{const We=[],lt=Ke=>{We.push(Ke),Ke.spans&&Ke.spans.length>0&&Ke.spans.forEach(lt)};return Me.forEach(lt),We})(B),[B]),{data:Z,isLoading:F}=JIr({traceId:e,spanId:S||J?.[0]?.id,page:M}),W=De=>{S===De?O(void 0):(O(De),P("details"),w(!0))},K=()=>{O(B[0]?.id),P("scores"),e&&v(`${l(e,B?.[0]?.id)}&tab=scores`)},se=()=>{O(B[0]?.id),P("scores"),e&&v(`${l(e,B?.[0]?.id)}&tab=scores&scoreId=${Z?.scores?.[0]?.id}`)},X=De=>{V(Me=>Me.includes(De)?Me.filter(We=>We!==De):[...Me,De])},te=()=>{V([])},de=R4r({span:A}),ue=()=>{const De=[],Me=(We,lt)=>{We.forEach(Ke=>{(!lt||lt===null||I.includes(lt))&&(De.push(Ke),I.includes(Ke.id)&&Ke.spans&&Me(Ke.spans,Ke.id))})};return Me(B),De},Ae=()=>{if(!S)return;const De=ue(),Me=De.findIndex(We=>We.id===S);if(Me>=0&&Me<De.length-1)return()=>O(De[Me+1].id)},_e=()=>{if(!S)return;const De=ue(),Me=De.findIndex(We=>We.id===S);if(Me>0)return()=>O(De[Me-1].id)};return f.jsxs(f.Fragment,{children:[f.jsxs(pn,{dialogTitle:"Observability Trace",dialogDescription:"View and analyze trace details",isOpen:n,onClose:s,level:1,children:[f.jsxs(pn.Top,{children:[f.jsxs(nl,{children:[f.jsx(Wx,{})," ",$h(e)]}),"|",f.jsx(pn.Nav,{onNext:i,onPrevious:o})]}),f.jsxs("div",{className:re("overflow-y-auto",{"grid grid-rows-[2fr_3fr]":!!(A&&k)}),children:[f.jsxs(pn.Content,{children:[f.jsxs(pn.Header,{children:[f.jsxs(pn.Heading,{children:[f.jsx(Wx,{})," ",r?.name]}),f.jsxs(nl,{children:[f.jsx(MI,{})," ",e]})]}),r&&f.jsxs(H4,{children:[f.jsxs("div",{className:"grid xl:grid-cols-[3fr_2fr] gap-4 items-start",children:[f.jsx(ib,{data:R,LinkComponent:g}),f.jsxs("div",{className:"bg-surface3 p-6 rounded-lg grid gap-4",children:[f.jsx("h4",{className:"text-ui-lg",children:f.jsxs(nl,{children:[f.jsx(RI,{})," Evaluate trace"]})}),f.jsxs(Oqe,{className:"w-full",children:[f.jsxs(Je,{onClick:K,children:[f.jsx(qe,{children:f.jsx(zB,{})}),"Scoring"]}),Z?.scores?.[0]&&f.jsxs(Je,{onClick:se,children:["Last score: ",f.jsx("b",{children:Z?.scores?.[0]?.score})]})]})]})]}),f.jsxs(qc,{children:[f.jsx(qc.Header,{children:f.jsxs(qc.Heading,{children:[f.jsx(gdt,{})," Timeline"]})}),f.jsx(I4r,{spans:t,fadedTypes:L,onLegendClick:X,onLegendReset:te,searchPhrase:Q,onSearchPhraseChange:U,traceId:e}),f.jsx(P4r,{hierarchicalSpans:B,onSpanClick:W,selectedSpanId:S,isLoading:a,fadedTypes:L,expandedSpanIds:I,setExpandedSpanIds:H,featuredSpanIds:j})]})]})]}),A&&k&&f.jsxs("div",{className:"grid grid-rows-[auto_1fr] relative overflow-y-auto rounded-xl mx-8 mb-8 bg-surface4",children:[f.jsxs(pn.Top,{children:[f.jsxs(nl,{children:[f.jsx(NI,{})," ",$h(S)]}),"|",f.jsx(pn.Nav,{onNext:Ae(),onPrevious:_e()}),f.jsxs("button",{className:"ml-auto mr-8",onClick:()=>C(!1),children:[f.jsx(Ndt,{})," ",f.jsx(Td,{children:"Switch to dialog view"})]})]}),f.jsx("div",{className:re("h-full overflow-y-auto pb-8 pl-8"),children:f.jsxs("div",{className:"overflow-y-auto pr-8 pt-8 h-full",children:[f.jsxs(pn.Header,{children:[f.jsxs(pn.Heading,{children:[f.jsx(Wx,{}),A?.name]}),f.jsxs(nl,{children:[f.jsx(MI,{})," ",S]})]}),f.jsx(Qqe,{trace:r,span:A,spanScoresData:Z,onSpanScoresPageChange:z,isLoadingSpanScoresData:F,spanInfo:de,defaultActiveTab:T,initialScoreId:d,computeTraceLink:l})]})})]})]})]}),r&&f.jsx(B4r,{trace:r,span:A,spanScoresData:Z,onSpanScoresPageChange:z,isLoadingSpanScoresData:F,isOpen:!!(b&&S&&!k),onClose:()=>{v(l(e||"")),w(!1)},onNext:Ae(),onPrevious:_e(),onViewToggle:()=>C(!k),spanInfo:de,defaultActiveTab:T,initialScoreId:d,computeTraceLink:l,scorers:p,isLoadingScorers:m})]})}function U4r({onEntityChange:e,onReset:t,selectedEntity:r,entityOptions:n,onDateChange:s,selectedDateFrom:i,selectedDateTo:o,isLoading:a}){return f.jsxs("div",{className:re("flex flex-wrap gap-x-8 gap-y-4"),children:[f.jsx(k0,{label:"Filter by Entity",name:"select-entity",placeholder:"Select...",options:n||[],onValueChange:l=>{const c=n?.find(u=>u.value===l);c&&e(c)},value:r?.value||"",className:"min-w-[20rem]",disabled:a}),f.jsxs("div",{className:re("flex gap-4 items-center flex-wrap"),children:[f.jsx("span",{className:re("shrink-0 text-ui-md text-neutral3"),children:"Filter by Date & time range"}),f.jsx(Oxe,{placeholder:"From",value:i,maxValue:o,onValueChange:l=>s?.(l,"from"),className:"min-w-32",defaultTimeStrValue:"12:00 AM",disabled:a}),f.jsx(Oxe,{placeholder:"To",value:o,minValue:i,onValueChange:l=>s?.(l,"to"),className:"min-w-32",defaultTimeStrValue:"11:59 PM",disabled:a}),f.jsxs(Je,{variant:"light",size:"lg",className:"min-w-32",onClick:t,disabled:a,children:[f.jsx(qe,{children:f.jsx(Ia,{})}),"Reset"]})]})]})}const uI=[{name:"shortId",label:"ID",size:"6rem"},{name:"date",label:"Date",size:"4.5rem"},{name:"time",label:"Time",size:"6.5rem"},{name:"name",label:"Name",size:"1fr"},{name:"entityId",label:"Entity",size:"10rem"},{name:"status",label:"Status",size:"3rem"}];function Q4r({traces:e,selectedTraceId:t,onTraceClick:r,errorMsg:n,setEndOfListElement:s,filtersApplied:i,isFetchingNextPage:o,hasNextPage:a}){return e?f.jsxs(Xn,{children:[f.jsxs(Xn.Trim,{children:[f.jsx(Xn.Header,{columns:uI}),n?f.jsx(Xn.Message,{message:n,type:"error"}):f.jsx(f.Fragment,{children:e.length>0?f.jsx(Xn.Entries,{children:e.map(l=>{const c=new Date(l.createdAt),u=oJ(c),d={id:l.traceId,shortId:$h(l?.traceId)||"n/a",date:u?"Today":zn(c,"MMM dd"),time:zn(c,"h:mm:ss aaa"),name:l?.name,entityId:l?.entityName||l?.entityId||l?.attributes?.agentId||l?.attributes?.workflowId,status:l?.attributes?.status};return f.jsx(Xn.Entry,{entry:d,isSelected:t===l.traceId,columns:uI,onClick:r,children:uI.map((p,m)=>{const g=`${m}-${l.traceId}`;return p.name==="status"?f.jsx(Xn.EntryStatus,{status:d?.[p.name]},g):f.jsx(Xn.EntryText,{children:d?.[p.name]},g)})},d.id)})}):f.jsx(Xn.Message,{message:i?"No traces found for applied filters":"No traces found yet"})})]}),f.jsx(Xn.NextPageLoading,{setEndOfListElement:s,loadingText:"Loading more traces...",noMoreDataText:"All traces loaded",isLoading:o,hasMore:a})]}):null}const s$=[{name:"shortId",label:"ID",size:"1fr"},{name:"date",label:"Date",size:"1fr"},{name:"time",label:"Time",size:"1fr"},{name:"score",label:"Score",size:"1fr"},{name:"scorer",label:"Scorer",size:"1fr"}];function Z4r({scoresData:e,isLoadingScoresData:t,traceId:r,spanId:n,initialScoreId:s,onPageChange:i,computeTraceLink:o}){const{navigate:a}=Lr(),[l,c]=E.useState(!1),[u,d]=E.useState();E.useEffect(()=>{s&&p(s)},[s]);const p=b=>{const w=e?.scores?.find(S=>S?.id===b);d(w),c(!0)};if(t)return f.jsx(Sqe,{columns:s$});const m=b=>{const w=e?.scores?.find(S=>S?.id===b);d(w)},g=kte({entries:e?.scores||[],id:u?.id,update:m}),v=Ete({entries:e?.scores||[],id:u?.id,update:m});return f.jsxs(f.Fragment,{children:[f.jsxs(Xn,{children:[f.jsxs(Xn.Trim,{children:[f.jsx(Xn.Header,{columns:s$}),e?.scores&&e.scores.length>0?f.jsx(Xn.Entries,{children:e?.scores?.map(b=>{const w=new Date(b.createdAt),S=oJ(w),O={id:b?.id,shortId:$h(b?.id)||"n/a",date:S?"Today":zn(w,"MMM dd"),time:zn(w,"h:mm:ss aaa"),score:b?.score,scorer:b?.scorer?.name||b?.scorer?.id};return f.jsx(Xn.Entry,{columns:s$,onClick:()=>p(b.id),entry:O,children:s$.map(k=>{const C=`col-${k.name}`;return f.jsx(Xn.EntryText,{children:String(O?.[k.name]??"")},C)})},b.id)})}):f.jsx(Xn.Message,{message:"No scores found",type:"info"})]}),f.jsx(Xn.Pagination,{currentPage:e?.pagination?.page||0,hasMore:e?.pagination?.hasMore,onNextPage:()=>i&&i((e?.pagination?.page||0)+1),onPrevPage:()=>i&&i((e?.pagination?.page||0)-1)})]}),f.jsx(_qe,{scorerName:u?.scorer?.name||u?.scorer?.id||"",score:u,isOpen:l,onClose:()=>{r&&a(`${o(r,n)}&tab=scores`),c(!1)},dialogLevel:3,onNext:g,onPrevious:v,computeTraceLink:(b,w)=>`/observability?traceId=${b}${w?`&spanId=${w}`:""}`,usageContext:"SpanDialog"})]})}const q4r=()=>{const e=rr();return bs({mutationFn:async({scorerName:t,traceId:r,spanId:n})=>await e.score({scorerName:t,targets:[{traceId:r,spanId:n}]})})};function Jz({children:e,className:t,isVisible:r,autoDismiss:n=!0,dismissTime:s=5e3,dismissible:i=!0,type:o="info"}){const[a,l]=E.useState(r),[c,u]=E.useState(!1);E.useEffect(()=>{if(i&&n&&r){const g=setTimeout(()=>{d()},s);return()=>clearTimeout(g)}},[n,r,s,i]),E.useEffect(()=>{r&&(u(!1),l(!0))},[r]);const d=()=>{u(!0),setTimeout(()=>{l(!1),u(!1)},200)};if(!a)return null;const p={info:"bg-surface4 border-border1",error:"bg-accent2Darker border-accent2/30",success:"bg-accent1Darker border-accent1/30",warning:"bg-accent6Darker border-accent6/30"},m={info:"text-accent5",error:"text-accent2",success:"text-accent1",warning:"text-accent6"};return f.jsxs("div",{className:re("grid grid-cols-[auto_1fr_auto] gap-3 rounded-lg border p-4 text-ui-md text-neutral4 items-start","shadow-card",kr.all,c?"animate-out fade-out-0 slide-out-to-right-2 duration-200":"animate-in fade-in-0 slide-in-from-right-2 duration-300",p[o],t),children:[f.jsx("div",{className:re("flex-shrink-0 mt-0.5",m[o]),children:o==="error"||o==="warning"?f.jsx(I0,{className:"h-4 w-4"}):f.jsx(sl,{className:"h-4 w-4"})}),f.jsx("div",{className:"flex gap-2 items-start min-w-0",children:e}),i&&f.jsxs(Je,{variant:"ghost",className:re("h-6 w-6 p-0 flex-shrink-0",kr.colors,"hover:bg-surface5"),onClick:d,children:[f.jsx(Ia,{className:"h-4 w-4"}),f.jsx(Td,{children:"Dismiss"})]})]})}const H4r=({traceId:e,spanId:t,entityType:r,isTopLevelSpan:n,scorers:s,isLoadingScorers:i})=>{const[o,a]=E.useState(null),{mutate:l,isPending:c,isSuccess:u}=q4r(),[d,p]=E.useState(!1);E.useEffect(()=>{u&&p(!0)},[u]);let m=Object.entries(s||{}).map(([S,O])=>({id:S,name:O.scorer.config.name,description:O.scorer.config.description,isRegistered:O.isRegistered,type:O.scorer.config.type})).filter(S=>S.isRegistered);(r!=="Agent"||!n)&&(m=m.filter(S=>S.type!=="agent"));const g=c||i,v=()=>{o&&(p(!1),l({scorerName:o,traceId:e||"",spanId:t}))},b=S=>{a(S),p(!1)},w=m.find(S=>S.name===o)?.description||"";return s===void 0&&!i?f.jsxs(Jz,{isVisible:!0,autoDismiss:!1,type:"error",children:[f.jsx(sl,{})," Failed to load scorers."]}):m.length===0?f.jsxs(Jz,{isVisible:!0,dismissible:!1,children:[f.jsx(sl,{})," No eligible scorers have been defined to run."]}):f.jsxs("div",{children:[f.jsxs("div",{className:"grid grid-cols-[3fr_1fr] gap-4 items-start",children:[f.jsxs("div",{className:"grid gap-2",children:[f.jsx(k0,{name:"select-scorer",placeholder:"Select a scorer...",options:m.map(S=>({label:S.name||S.id,value:S.id||S.name||""})),onValueChange:b,value:o||"",className:"min-w-[20rem]",disabled:g}),w&&f.jsxs(nl,{className:"text-neutral3",children:[f.jsx(sl,{})," ",w]})]}),f.jsx(Je,{disabled:!o||g,onClick:v,children:c?"Starting...":"Start Scoring"})]}),f.jsxs(Jz,{isVisible:d,className:"mt-4",children:[f.jsx(sl,{})," Scorer triggered! When finished successfully, it will appear in the list below. It could take a moment."]})]})},sp=({children:e,label:t})=>f.jsx("nav",{"aria-label":t,children:f.jsx("ol",{className:"gap-0.5 flex items-center",children:e})}),Da=({className:e,as:t,isCurrent:r,action:n,...s})=>{const i=t||"span";return f.jsxs(f.Fragment,{children:[f.jsxs("li",{className:"flex h-full shrink-0 items-center gap-1",children:[f.jsx(i,{"aria-current":r?"page":void 0,className:re("text-ui-md leading-ui-md flex items-center gap-2",kr.colors,r?"text-white":"text-neutral3 hover:text-neutral5",e),...s}),n]}),!r&&f.jsx("li",{role:"separator",className:"flex h-full items-center",children:f.jsx(qe,{className:re("text-neutral2",kr.colors),children:f.jsx(E2r,{})})})]})},W4r=({children:e,className:t,onClick:r})=>f.jsx("div",{tabIndex:r?0:void 0,onKeyDown:n=>{r&&(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),r?.())},className:re("flex gap-3 group/entity bg-surface3 rounded-lg border border-border1 py-3 px-4",r&&"cursor-pointer hover:bg-surface4 transition-all",t),onClick:r,children:e}),G4r=({children:e,className:t})=>f.jsx(qe,{size:"lg",className:re("text-neutral3 mt-1",t),children:e}),X4r=({children:e,className:t})=>f.jsx(Ze,{as:"p",variant:"ui-lg",className:re("text-neutral6 font-medium",t),children:e}),Y4r=({children:e,className:t})=>f.jsx(Ze,{as:"p",variant:"ui-sm",className:re("text-neutral3",t),children:e}),J4r=({children:e,className:t})=>f.jsx("div",{className:t,children:e}),ti=({children:e,border:t=!0})=>f.jsx("header",{className:re("h-header-default z-50 flex w-full items-center gap-4 bg-transparent px-3",{"border-b border-border1":t}),children:e}),_c=({children:e})=>f.jsx(Ze,{as:"h1",variant:"ui-md",className:"text-white flex items-center gap-2",children:e}),Ma=({children:e})=>f.jsx("div",{className:"ml-auto flex items-center gap-3",children:e}),E0=({children:e})=>f.jsx("div",{className:"gap-2 flex items-center",children:e}),aq=e=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 34 21",fill:"none",...e,children:f.jsx("path",{d:"M4.49805 11.6934C6.98237 11.6934 8.99609 13.7081 8.99609 16.1924C8.9959 18.6765 6.98225 20.6904 4.49805 20.6904C2.01394 20.6903 0.000196352 18.6765 0 16.1924C0 13.7081 2.01382 11.6935 4.49805 11.6934ZM10.3867 0C12.8709 0 14.8846 2.01388 14.8848 4.49805C14.8848 4.8377 14.847 5.16846 14.7755 5.48643C14.4618 6.88139 14.1953 8.4633 14.9928 9.65L16.2575 11.5319C16.3363 11.6491 16.4727 11.7115 16.6137 11.703C16.7369 11.6957 16.8525 11.6343 16.9214 11.5318L18.1876 9.64717C18.9772 8.47198 18.7236 6.90783 18.4205 5.52484C18.3523 5.21392 18.3164 4.89094 18.3164 4.55957C18.3167 2.07546 20.3313 0.0615234 22.8154 0.0615234C25.2994 0.0617476 27.3132 2.0756 27.3135 4.55957C27.3135 4.93883 27.2665 5.30712 27.178 5.65896C26.8547 6.94441 26.5817 8.37932 27.2446 9.52714L28.459 11.6301C28.4819 11.6697 28.5245 11.6934 28.5703 11.6934C31.0545 11.6935 33.0684 13.7081 33.0684 16.1924C33.0682 18.6765 31.0544 20.6903 28.5703 20.6904C26.0861 20.6904 24.0725 18.6765 24.0723 16.1924C24.0723 15.8049 24.1212 15.4288 24.2133 15.0701C24.5458 13.7746 24.8298 12.3251 24.1609 11.1668L23.0044 9.16384C22.9656 9.09659 22.8931 9.05859 22.8154 9.05859C22.7983 9.05859 22.7824 9.06614 22.7728 9.08033L21.4896 10.9895C20.686 12.1851 20.9622 13.781 21.284 15.1851C21.3582 15.5089 21.3975 15.8461 21.3975 16.1924C21.3973 18.6764 19.3834 20.6902 16.8994 20.6904C14.4152 20.6904 12.4006 18.6765 12.4004 16.1924C12.4004 15.932 12.4226 15.6768 12.4651 15.4286C12.6859 14.14 12.8459 12.7122 12.1167 11.6271L11.2419 10.3253C10.6829 9.49347 9.71913 9.05932 8.78286 8.70188C7.0906 8.05584 5.88867 6.41734 5.88867 4.49805C5.88886 2.0139 7.90254 3.29835e-05 10.3867 0Z",fill:"white"})}),Zqe="sidebar:state",qqe=me.createContext(null);function Hqe(){const e=me.useContext(qqe);if(!e)throw new Error("useMainSidebar must be used within a MainSidebarProvider.");return e}const K4r=e=>{window.localStorage.setItem(Zqe,e.toString())};function eNr({children:e}){const[t,r]=me.useState(()=>"default");me.useLayoutEffect(()=>{const i=window.localStorage.getItem(Zqe);(i==="collapsed"||i==="default")&&r(i)},[]);const n=me.useCallback(()=>{K4r(t==="default"?"collapsed":"default"),r(t==="default"?"collapsed":"default")},[t]),s=me.useMemo(()=>({state:t,toggleSidebar:n}),[t,n]);return f.jsx(qqe.Provider,{value:s,children:e})}function Ate({className:e}){return f.jsx("div",{className:re("min-h-5 relative",'[&:after]:content-[""] [&:after]:block [&:after]:absolute [&:after]:h-0 [&:after]:border-border1 [&:after]:border-t [&:after]:top-1/2 [&:after]:left-3 [&:after]:right-3',e)})}function tNr({children:e,className:t}){const{state:r,toggleSidebar:n}=Hqe(),s=r==="collapsed";return E.useEffect(()=>{const i=o=>{o.ctrlKey&&o.key==="b"&&(o.preventDefault(),n())};return document.addEventListener("keydown",i),()=>{document.removeEventListener("keydown",i)}},[n]),f.jsxs("div",{className:re("flex flex-col h-full px-4 relative overflow-y-auto","transition-all duration-slow ease-out-custom",{"lg:min-w-52 xl:min-w-56 2xl:min-w-60 3xl:min-w-64 4xl:min-w-72":!s},t),children:[e,f.jsxs("div",{className:"bg-surface1 grid sticky bottom-0 pb-3",children:[f.jsx(Ate,{}),f.jsxs(Ss,{children:[f.jsx(Os,{asChild:!0,children:f.jsx("button",{onClick:n,className:re("inline-flex w-auto items-center text-neutral3 h-8 px-3 rounded-md ml-auto","hover:bg-surface4 hover:text-neutral5","transition-all duration-normal ease-out-custom","focus:outline-none focus:ring-1 focus:ring-accent1 focus:shadow-focus-ring","[&_svg]:w-[1rem] [&_svg]:h-[1rem] [&_svg]:text-neutral3 [&_svg]:transition-transform [&_svg]:duration-normal",{"ml-auto":!s}),"aria-label":"Toggle sidebar",children:f.jsx(Mdt,{className:re({"rotate-180":s})})})}),f.jsxs(is,{children:["Toggle Sidebar",f.jsxs("div",{className:"flex items-center gap-1 [&>svg]:w-[1em] [&>svg]:h-[1em]",children:[f.jsx(cdt,{})," Ctrl+B"]})]})]})]}),f.jsx("button",{onClick:n,className:re("w-[.75rem] h-full right-0 top-0 absolute opacity-10",{"cursor-w-resize":!s,"cursor-e-resize":s}),"aria-label":"Toggle sidebar"})]})}function rNr({children:e,className:t}){return f.jsx("div",{className:re("mt-auto",t),children:e})}function nNr({children:e,className:t}){return f.jsx("nav",{className:re("",t),children:e})}function sNr({children:e,className:t}){return f.jsx("section",{className:re("grid items-start content-center relative",t),children:e})}function iNr({link:e,state:t="default",children:r,isActive:n,className:s}){const{Link:i}=Lr(),o=t==="collapsed",a=e?.variant==="featured",l=e?.url?.startsWith("http")?{target:"_blank",rel:"noreferrer"}:{};return f.jsx("li",{className:re("flex relative","[&>a]:flex [&>a]:items-center [&>a]:min-h-8 [&>a]:gap-2.5 [&>a]:text-ui-md [&>a]:text-neutral3 [&>a]:py-1.5 [&>a]:px-3 [&>a]:w-full [&>a]:rounded-lg [&>a]:justify-center","[&>a]:transition-all [&>a]:duration-normal [&>a]:ease-out-custom","[&_svg]:w-4 [&_svg]:h-4 [&_svg]:text-neutral3/60 [&_svg]:transition-colors [&_svg]:duration-normal","[&>a:hover]:bg-surface4 [&>a:hover]:text-neutral5 [&>a:hover_svg]:text-neutral3",{"[&>a]:text-neutral5 [&>a]:bg-surface3":n,"[&_svg]:text-neutral5":n,"before:absolute before:left-0 before:top-1/2 before:-translate-y-1/2 before:w-0.5 before:h-5 before:bg-accent1 before:rounded-r-full before:transition-all before:duration-normal":n&&!o,"[&>a]:justify-start":!o,"[&_svg]:text-neutral3":o,"[&>a]:rounded-md [&>a]:my-2 [&>a]:bg-accent1/75 [&>a:hover]:bg-accent1/85 [&>a]:text-black [&>a:hover]:text-black":a,"[&_svg]:text-black/75 [&>a:hover_svg]:text-black":a},s),children:e?f.jsx(f.Fragment,{children:o||e.tooltipMsg?f.jsxs(Ss,{children:[f.jsx(Os,{asChild:!0,children:f.jsxs(i,{href:e.url,...l,children:[e.icon&&e.icon,o?f.jsx(Td,{children:e.name}):e.name," ",r]})}),f.jsx(is,{side:"right",align:"center",className:"bg-border1 text-neutral6 ml-4",children:e.tooltipMsg?f.jsxs(f.Fragment,{children:[o&&`${e.name} | `," ",e.tooltipMsg]}):e.name})]}):f.jsxs(i,{href:e.url,...l,children:[e.icon&&e.icon,o?f.jsx(Td,{children:e.name}):e.name," ",r]})}):r})}function oNr({children:e,className:t,state:r="default"}){const n=r==="default";return f.jsxs("div",{className:re("grid grid-cols-[auto_1fr] items-center min-h-11",t),children:[f.jsx("header",{className:re("text-ui-xs uppercase text-neutral3/75 tracking-widest",{"pl-3":n}),children:n?e:f.jsx(Td,{children:e})}),f.jsx(Ate,{})]})}function aNr({children:e,className:t}){return f.jsx("ul",{className:re("grid gap-1 items-start content-center",t),children:e})}const pa=Object.assign(tNr,{Bottom:rNr,Nav:nNr,NavSection:sNr,NavLink:iNr,NavHeader:oNr,NavList:aNr,NavSeparator:Ate});function Wqe({title:e,description:t,icon:r,className:n}){const s=e==="loading",i=t==="loading";return f.jsxs("header",{className:re("grid gap-2 pt-8 pb-8",n),children:[f.jsx("h1",{className:re("text-neutral6 text-xl font-normal flex items-center gap-2","[&>svg]:w-6 [&>svg]:h-6 [&>svg]:text-neutral3",{"bg-surface4 w-60 max-w-[50%] rounded-md animate-pulse":s}),children:s?f.jsx(f.Fragment,{children:" "}):f.jsxs(f.Fragment,{children:[r&&r," ",e]})}),t&&f.jsx("p",{className:re("text-neutral4 text-sm m-0",{"bg-surface4 w-[40rem] max-w-[80%] rounded-md animate-pulse":i}),children:i?f.jsx(f.Fragment,{children:" "}):t})]})}const lNr=({children:e,options:t})=>{const r=new GCt(t);return f.jsx(XCt,{client:r,children:e})},Fxe="Something went wrong while fetching the data.",cNr=e=>{try{const t=/^HTTP error! status:\s*\d+\s*- \s*/,r=e?.message.replace(t,""),n=JSON.parse(r||"{}");return{error:n?.error||Fxe,stack:n?.stack||e?.stack}}catch{return{error:e?.message||Fxe,stack:void 0}}},uNr=({workflowId:e,runId:t})=>{const[r,n]=E.useState(null),{Link:s,paths:i,navigate:o}=Lr(),{isLoading:a,data:l,setEndOfListElement:c,isFetchingNextPage:u}=RZe(e),{mutateAsync:d}=W2r(e),p=async g=>{try{await d({runId:g}),n(null),o(i.workflowLink(e))}catch{n(null)}},m=l||[];return a?f.jsx("div",{className:"p-4",children:f.jsx(fr,{className:"h-[600px]"})}):f.jsxs("div",{className:"overflow-y-auto h-full w-full",children:[f.jsx(Eqe,{children:f.jsxs(Cqe,{children:[f.jsx(q4,{children:f.jsx(Z4,{as:s,to:i.workflowLink(e),children:f.jsxs("span",{className:"text-accent1 flex items-center gap-4",children:[f.jsx(qe,{className:"bg-surface4 rounded-lg",size:"lg",children:f.jsx($0,{})}),"New workflow run"]})})}),m.length===0&&f.jsx(Ze,{variant:"ui-md",className:"text-neutral3 py-3 px-5",children:"Your run history will appear here once you run the workflow"}),m.map(g=>f.jsxs(q4,{isActive:g.runId===t,className:"h-auto",children:[f.jsxs(Z4,{as:s,to:i.workflowRunLink(e,g.runId),children:[typeof g?.snapshot=="object"&&f.jsx("div",{className:"pb-1",children:f.jsx(dNr,{status:g.snapshot.status})}),f.jsx("span",{className:"truncate max-w-32 text-neutral3",children:g.runId}),f.jsx("span",{children:typeof g?.snapshot=="string"?"":g?.snapshot?.timestamp?zn(g?.snapshot?.timestamp,"MMM d, yyyy h:mm a"):""})]}),f.jsx(Tqe,{onClick:()=>n(g.runId)})]},g.runId))]})}),f.jsx(fNr,{open:!!r,onOpenChange:()=>n(null),onDelete:()=>{r&&p(r)}}),u&&f.jsx("div",{className:"flex justify-center items-center",children:f.jsx(qe,{children:f.jsx(ea,{})})}),f.jsx("div",{ref:c})]})},dNr=({status:e})=>e==="running"?f.jsx(Xt,{variant:"default",icon:f.jsx(ea,{}),children:e}):e==="failed"?f.jsx(Xt,{variant:"default",icon:f.jsx(Ia,{className:"text-accent2"}),children:e}):e==="canceled"?f.jsx(Xt,{variant:"default",icon:f.jsx(Dut,{className:"text-neutral3"}),children:e}):e==="pending"||e==="waiting"?f.jsx(Xt,{variant:"default",icon:f.jsx(iTe,{className:"text-neutral3"}),children:e}):e==="suspended"?f.jsx(Xt,{variant:"default",icon:f.jsx(rTe,{className:"text-accent3"}),children:e}):e==="success"?f.jsx(Xt,{variant:"default",icon:f.jsx(lu,{className:"text-accent1"}),children:e}):f.jsx(Xt,{variant:"default",children:e}),fNr=({open:e,onOpenChange:t,onDelete:r})=>f.jsx(gs,{open:e,onOpenChange:t,children:f.jsxs(gs.Content,{children:[f.jsxs(gs.Header,{children:[f.jsx(gs.Title,{children:"Are you absolutely sure?"}),f.jsx(gs.Description,{children:"This action cannot be undone. This will permanently delete the workflow run and remove it from our servers."})]}),f.jsxs(gs.Footer,{children:[f.jsx(gs.Cancel,{children:"Cancel"}),f.jsx(gs.Action,{onClick:r,children:"Continue"})]})]})}),Gqe=e=>{const t=rr();return ds({queryKey:["mcpserver-tools",e?.id],queryFn:async()=>{const n=(await t.getMcpServerTools(e?.id)).tools,s={};return n.forEach(i=>{s[i.id]=i}),s},retry:!1,refetchOnWindowFocus:!1})},pNr=({row:e})=>{const t=rr(),r=e.original,{Link:n,paths:s}=Lr(),o=`${t.options.baseUrl||"http://localhost:4111"}/api/mcp/${r.id}/sse`;return f.jsx(DS,{name:f.jsx(n,{className:"w-full space-y-0",href:s.mcpServerLink(e.original.id),children:e.original.name}),description:o})},hNr=[{header:"Name",accessorKey:"name",cell:pNr},{header:"Attached tools",accessorKey:"attachedTools",cell:({row:e})=>{const t=e.original,{data:r,isLoading:n}=Gqe(t);if(n)return f.jsx(Ks,{children:f.jsx(fr,{className:"h-4 w-24"})});const s=Object.keys(r||{}).length,i=Object.keys(r||{}).filter(a=>r?.[a]?.toolType==="agent").length,o=Object.keys(r||{}).filter(a=>r?.[a]?.toolType==="workflow").length;return f.jsx(Ks,{children:f.jsxs("span",{className:"flex flex-row gap-2 w-full items-center",children:[f.jsxs(Xt,{variant:"default",icon:f.jsx(Fo,{className:"text-accent1"}),children:[i," agent",i>1?"s":""]}),f.jsxs(Xt,{variant:"default",icon:f.jsx(Cu,{className:"text-accent6"}),children:[s," tool",s>1?"s":""]}),f.jsxs(Xt,{variant:"default",icon:f.jsx(Tu,{className:"text-accent3"}),children:[o," workflow",o>1?"s":""]})]})})}}];function mNr({mcpServers:e,isLoading:t}){const{navigate:r,paths:n}=Lr(),[s,i]=E.useState(""),o=bS({data:e,columns:hNr,getCoreRowModel:vS()}),a=o.getHeaderGroups()[0],l=o.getRowModel().rows.concat();if(l.length===0&&!t)return f.jsx(yNr,{});const c=l.filter(u=>u.original.name.toLowerCase().includes(s.toLowerCase()));return f.jsxs("div",{children:[f.jsx($S,{children:f.jsx(PS,{onSearch:i,label:"Search MCP servers",placeholder:"Search MCP servers"})}),t?f.jsx(gNr,{}):f.jsx(AS,{children:f.jsx(Dc,{children:f.jsxs(Du,{children:[f.jsx(Au,{className:"sticky top-0",children:a.headers.map(u=>f.jsx(Fi,{style:{width:u.column.getSize()??"auto"},children:yu(u.column.columnDef.header,u.getContext())},u.id))}),f.jsx(Pu,{children:c.map(u=>f.jsx($u,{onClick:()=>r(n.mcpServerLink(u.original.id)),children:u.getVisibleCells().map(d=>f.jsx(me.Fragment,{children:yu(d.column.columnDef.cell,d.getContext())},d.id))},u.id))})]})})})]})}const gNr=()=>f.jsxs(Du,{children:[f.jsxs(Au,{children:[f.jsx(Fi,{children:"Name"}),f.jsx(Fi,{children:"Model"}),f.jsx(Fi,{children:"Attached entities"})]}),f.jsx(Pu,{children:Array.from({length:3}).map((e,t)=>f.jsxs($u,{children:[f.jsx(Ks,{children:f.jsx(fr,{className:"h-4 w-1/2"})}),f.jsx(Ks,{children:f.jsx(fr,{className:"h-4 w-1/2"})}),f.jsx(Ks,{children:f.jsx(fr,{className:"h-4 w-1/2"})})]},t))})]}),yNr=()=>f.jsx("div",{className:"flex h-full items-center justify-center",children:f.jsx(TS,{iconSlot:f.jsx(D2r,{}),titleSlot:"Configure MCP servers",descriptionSlot:"MCP servers are not configured yet. You can find more information in the documentation.",actionSlot:f.jsxs(Je,{size:"lg",className:"w-full",variant:"light",as:"a",href:"https://mastra.ai/en/docs/tools-mcp/mcp-overview",target:"_blank",children:[f.jsx(qe,{children:f.jsx(sb,{})}),"Docs"]})})}),sR=()=>{const e=rr(),{requestContext:t}=Qn();return ds({queryKey:["mcp-servers"],queryFn:async()=>(await e.getMcpServers(t)).servers})},Xqe=(e,t)=>{const{requestContext:r}=Qn(),n=rr();return ds({queryKey:["mcp-server-tool",e,t],queryFn:()=>n.getMcpServerTool(e,t).details(r)})},vNr=(e,t)=>{const{requestContext:r}=Qn(),n=rr();return bs({mutationFn:s=>n.getMcpServerTool(e,t).execute({data:s,requestContext:r})})},bNr=({toolId:e,serverId:t})=>{const{data:r,isLoading:n,error:s}=Xqe(t,e),{mutateAsync:i,isPending:o,data:a}=vNr(t,e);E.useEffect(()=>{if(s){const u=s instanceof Error?s.message:"Failed to load tool";Js.error(`Error loading tool: ${u}`)}},[s]);const l=async u=>{if(r)return await i(u)};if(n)return f.jsxs("div",{className:"p-6",children:[f.jsx(fr,{className:"h-8 w-48 mb-4"}),f.jsx(fr,{className:"h-32 w-full"})]});if(s)return null;if(!r)return f.jsx("div",{className:"py-12 text-center px-6",children:f.jsx(Ze,{variant:"header-md",className:"text-neutral3",children:"Tool not found"})});let c;try{c=Tg(kg(r.inputSchema))}catch(u){console.error("Error processing input schema:",u),Js.error("Failed to process tool input schema."),c=Uw({})}return f.jsx(Dte,{executionResult:a,isExecutingTool:o,zodInputSchema:c,handleExecuteTool:l,toolDescription:r.description||"",toolId:r.id})},xNr=({isLoading:e,server:t})=>{const[{sseUrl:r,httpStreamUrl:n},s]=E.useState({sseUrl:"",httpStreamUrl:""});if(E.useEffect(()=>{if(!t)return;const o=window.MASTRA_SERVER_HOST,a=window.MASTRA_SERVER_PORT;let l=null;o&&a&&(l=`http://${o}:${a}`);const c=l||"http://localhost:4111",u=`${c}/api/mcp/${t.id}/sse`,d=`${c}/api/mcp/${t.id}/mcp`;s({sseUrl:u,httpStreamUrl:d})},[t]),e)return null;if(!t)return f.jsx(Oc,{children:f.jsx(Ze,{as:"h1",variant:"header-md",className:"text-neutral3 font-medium py-20 text-center",children:"Server not found"})});const i=`npx -y mcp-remote ${r}`;return f.jsxs(Oc,{isDivided:!0,children:[f.jsxs("div",{className:"px-8 py-12 mx-auto max-w-2xl w-full",children:[f.jsx(Ze,{as:"h1",variant:"header-md",className:"text-neutral6 font-medium pb-4",children:t.name}),f.jsxs("div",{className:"flex items-center gap-1 pb-6",children:[f.jsx(Xt,{icon:f.jsx(T2r,{className:"text-neutral6"}),className:"rounded-r-sm !text-neutral4",children:"Version"}),f.jsx(Xt,{className:"rounded-l-sm !text-neutral4",children:t.version_detail.version})]}),f.jsx(Ze,{className:"text-neutral3 pb-4",children:"This MCP server can be accessed through multiple transport methods. Choose the one that best fits your use case."}),f.jsxs("div",{className:"flex flex-col gap-4",children:[f.jsxs("div",{className:"rounded-lg border border-border1 bg-surface3 p-4",children:[f.jsx(Xt,{icon:f.jsx("span",{className:"font-mono w-6 text-accent1 font-medium mr-1",children:"HTTP"}),children:"Regular HTTP Endpoint"}),f.jsx(Ze,{className:"text-neutral3 pt-1 pb-2",children:"Use for stateless HTTP transport with streamable responses."}),f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx(Ze,{className:"px-2 py-1 bg-surface4 rounded-lg",children:n}),f.jsx("div",{className:"pt-1",children:f.jsx(Uf,{tooltip:"Copy HTTP Stream URL",content:n,iconSize:"sm"})})]})]}),f.jsxs("div",{className:"rounded-lg border border-border1 bg-surface3 p-4",children:[f.jsx(Xt,{icon:f.jsx("span",{className:"font-mono w-6 text-accent1 font-medium mr-1",children:"SSE"}),children:"Server-Sent Events"}),f.jsx(Ze,{className:"text-neutral3 pt-1 pb-2",children:"Use for real-time communication via SSE."}),f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx(Ze,{className:"px-2 py-1 bg-surface4 rounded-lg",children:r}),f.jsx("div",{className:"pt-1",children:f.jsx(Uf,{tooltip:"Copy SSE URL",content:r,iconSize:"sm"})})]})]}),f.jsxs("div",{className:"rounded-lg border border-border1 bg-surface3 p-4",children:[f.jsx(Xt,{icon:f.jsx("span",{className:"font-mono w-6 text-accent1 font-medium mr-1",children:"CLI"}),children:"Command Line"}),f.jsx(Ze,{className:"text-neutral3 pt-1 pb-2",children:"Use for local command-line access via npx and mcp-remote."}),f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx(Ze,{className:"px-2 py-1 bg-surface4 rounded-lg",children:i}),f.jsx("div",{className:"pt-1",children:f.jsx(Uf,{tooltip:"Copy Command Line Config",content:i,iconSize:"sm"})})]})]})]})]}),f.jsx("div",{className:"h-full overflow-y-scroll border-l border-border1",children:f.jsx(wNr,{server:t})})]})},wNr=({server:e})=>{const{data:t={},isLoading:r}=Gqe(e);if(r)return null;const n=Object.keys(t);return f.jsxs("div",{className:"p-5 overflow-y-scroll",children:[f.jsxs("div",{className:"text-neutral6 flex gap-2 items-center",children:[f.jsx(qe,{size:"lg",className:"bg-surface4 rounded-md p-1",children:f.jsx(sb,{})}),f.jsx(Ze,{variant:"header-md",as:"h2",className:"font-medium",children:"Available Tools"})]}),f.jsx("div",{className:"flex flex-col gap-2 pt-6",children:n.map(s=>{const i=t[s];return f.jsx(SNr,{tool:i,serverId:e.id},s)})})]})},SNr=({tool:e,serverId:t})=>{const r=E.useRef(null),{Link:n,paths:s}=Lr(),i=jqe[e.toolType||"tool"];return f.jsxs(W4r,{onClick:()=>r.current?.click(),children:[f.jsx(G4r,{children:f.jsx(i,{className:"group-hover/entity:text-accent6"})}),f.jsxs(J4r,{children:[f.jsx(X4r,{children:f.jsx(n,{ref:r,href:s.mcpServerToolLink(t,e.id),children:e.id})}),f.jsx(Y4r,{children:e.description})]})]})};function ONr({value:e,onValueChange:t,placeholder:r="Select an MCP server...",searchPlaceholder:n="Search MCP servers...",emptyText:s="No MCP servers found.",className:i,disabled:o=!1}){const{data:a=[],isLoading:l,isError:c,error:u}=sR(),{navigate:d,paths:p}=Lr();E.useEffect(()=>{if(c){const v=u instanceof Error?u.message:"Failed to load MCP servers";mn.error(`Error loading MCP servers: ${v}`)}},[c,u]);const m=a.map(v=>({label:v.name,value:v.id})),g=v=>{t?t(v):v&&v!==e&&d(p.mcpServerLink(v))};return f.jsx(UD,{options:m,value:e,onValueChange:g,placeholder:l?"Loading MCP servers...":r,searchPlaceholder:n,emptyText:s,className:i,disabled:o||l||c})}const _Nr=async(e="http://localhost:4111")=>{try{return{status:(await fetch(e)).ok?"active":"inactive"}}catch{return{status:"inactive"}}},kNr=(e="http://localhost:4111")=>ds({queryKey:["mastra-instance-status",e],queryFn:()=>_Nr(e),retry:!1}),Yqe=E.createContext({baseUrl:"",headers:{},isLoading:!1,setConfig:()=>{}}),Pte=()=>E.useContext(Yqe),Lxe="mastra-studio-config",ENr=({children:e,endpoint:t="http://localhost:4111"})=>{const{data:r,isLoading:n,error:s}=kNr(t),[i,o]=E.useState({baseUrl:"",headers:{},isLoading:!0});E.useLayoutEffect(()=>{if(s&&!n)return o({baseUrl:"",headers:{},isLoading:!1});if(!r?.status)return;const l=localStorage.getItem(Lxe);if(l){const c=JSON.parse(l);if(typeof c=="object"&&c!==null)return o({...c,isLoading:!1})}return r.status==="active"?o(c=>({...c,baseUrl:t,isLoading:!1})):o({baseUrl:"",headers:{},isLoading:!1})},[r,t,n,s]);const a=l=>{o(c=>{const u={...c,...l};return localStorage.setItem(Lxe,JSON.stringify(u)),u})};return f.jsx(Yqe.Provider,{value:{...i,setConfig:a},children:e})},CNr=({headers:e,onAddHeader:t,onRemoveHeader:r})=>f.jsxs("div",{className:"space-y-4",children:[f.jsx(Ze,{as:"h2",variant:"header-md",className:"text-neutral6",children:"Headers"}),f.jsxs("div",{className:"bg-surface4 rounded-lg p-4 border border-border2 space-y-4",children:[e.length>0&&f.jsx("ul",{className:"space-y-4",children:e.map((n,s)=>f.jsx("li",{children:f.jsx(TNr,{index:s,header:n,onRemove:()=>r(s)})},s))}),f.jsxs(Je,{type:"button",variant:"light",className:"w-full border-dashed !bg-surface4 !border-border2 hover:!bg-surface5",size:"lg",onClick:()=>t({name:"",value:""}),children:[f.jsx(qe,{children:f.jsx($0,{})}),"Add Header"]})]})]}),TNr=({index:e,header:t,onRemove:r})=>{const n=E.useId(),s=E.useId();return f.jsxs("div",{className:"grid grid-cols-[1fr_1fr_auto] gap-4 items-end",children:[f.jsx(_0,{id:n,name:`headers.${e}.name`,label:"Name",placeholder:"e.g. Authorization",required:!0,defaultValue:t.name}),f.jsx(_0,{id:s,name:`headers.${e}.value`,label:"Value",placeholder:"e.g. Bearer <token>",required:!0,defaultValue:t.value}),f.jsx(Je,{type:"button",variant:"light",className:"w-full !bg-surface4 !border-border2 hover:!bg-surface5",size:"lg",onClick:r,children:f.jsx(qe,{children:f.jsx(lG,{"aria-label":"Remove header"})})})]})},Jqe=({initialConfig:e})=>{const{setConfig:t}=Pte(),[r,n]=E.useState(()=>e?Object.entries(e.headers).map(([a,l])=>({name:a,value:l})):[]),s=a=>{a.preventDefault();const l=new FormData(a.target),c=l.get("url"),u={};for(let d=0;d<r.length;d++){const p=l.get(`headers.${d}.name`),m=l.get(`headers.${d}.value`);u[p]=m}t({headers:u,baseUrl:c}),mn.success("Configuration saved")},i=a=>{n(l=>[...l,a])},o=a=>{n(l=>l.filter((c,u)=>u!==a))};return f.jsxs("form",{onSubmit:s,className:"space-y-4",children:[f.jsx(_0,{name:"url",label:"Mastra instance URL",placeholder:"e.g: http://localhost:4111",required:!0,defaultValue:e?.baseUrl}),f.jsx(CNr,{headers:r,onAddHeader:i,onRemoveHeader:o}),f.jsxs(Je,{type:"submit",variant:"light",className:"w-full",size:"lg",children:[f.jsx(qe,{children:f.jsx(pdt,{})}),"Set Configuration"]})]})},DNr=()=>{const e=rr();return ds({queryKey:["mastra-packages"],queryFn:()=>e.getSystemPackages()})};async function ANr(e,t){const r=m_.prerelease(t),n=r?String(r[0]):null;try{const s=await fetch(`https://registry.npmjs.org/${encodeURIComponent(e)}`);if(!s.ok)return{name:e,version:t,latestVersion:null,isOutdated:!1,isDeprecated:!1,prereleaseTag:n,targetPrereleaseTag:null};const i=await s.json(),o=i["dist-tags"]?.latest??null,l=i.versions?.[t]?.deprecated,c=o?m_.prerelease(o):null,u=c?String(c[0]):null;let d=!1;return o!==null&&m_.valid(t)&&m_.valid(o)&&(d=m_.gt(o,t)),{name:e,version:t,latestVersion:o,isOutdated:d,isDeprecated:!!l,prereleaseTag:n,targetPrereleaseTag:u,deprecationMessage:l}}catch{return{name:e,version:t,latestVersion:null,isOutdated:!1,isDeprecated:!1,prereleaseTag:n,targetPrereleaseTag:null}}}function PNr(e){const t=KCt({queries:e.map(a=>({queryKey:["package-update",a.name,a.version],queryFn:()=>ANr(a.name,a.version),staleTime:36e5,gcTime:864e5}))}),r=t.some(a=>a.isLoading),n=t.map(a=>a.data).filter(a=>a!==void 0),s=!r&&n.length===e.length,i=s?n.filter(a=>a.isOutdated&&!a.isDeprecated).length:0,o=s?n.filter(a=>a.isDeprecated).length:0;return{packages:n,isLoading:r,outdatedCount:i,deprecatedCount:o}}const $Nr={pnpm:"pnpm add",npm:"npm install",yarn:"yarn add",bun:"bun add"},INr=({collapsed:e})=>{const{data:t,isLoading:r}=DNr(),n=t?.packages??[],{packages:s,isLoading:i,outdatedCount:o,deprecatedCount:a}=PNr(n),[l,c]=E.useState("pnpm");if(e)return null;if(r)return f.jsx("div",{className:"px-3 py-2",children:f.jsx("div",{className:"animate-pulse h-4 bg-surface2 rounded w-16"})});const u=n.find(m=>m.name==="@mastra/core");if(!u&&n.length===0)return null;const d=u?.version??n[0]?.version??"",p=NNr(s,l);return f.jsxs(qo,{children:[f.jsx(j2r,{asChild:!0,children:f.jsxs("button",{className:"px-3 py-2 hover:bg-surface2 transition-colors rounded w-full text-left",children:[f.jsx("div",{className:"flex items-center gap-1.5",children:f.jsx(Ze,{as:"span",variant:"ui-sm",className:"text-accent1 font-mono",children:"mastra version:"})}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(Ze,{as:"span",variant:"ui-sm",className:"text-neutral3 font-mono",children:d}),i&&f.jsx(ea,{className:"w-3 h-3",color:"currentColor"}),f.jsxs("span",{className:"flex items-center -space-x-1.5",children:[o>0&&f.jsx(zxe,{count:o,variant:"warning"}),a>0&&f.jsx(zxe,{count:a,variant:"error"})]})]})]})}),f.jsx(RNr,{packages:s,isLoadingUpdates:i,outdatedCount:o,deprecatedCount:a,updateCommand:p,packageManager:l,onPackageManagerChange:c})]})};function NNr(e,t){const r=e.filter(i=>i.isOutdated||i.isDeprecated);if(r.length===0)return null;const n=$Nr[t],s=r.map(i=>`${i.name}@${i.targetPrereleaseTag??"latest"}`).join(" ");return`${n} ${s}`}function zxe({count:e,variant:t}){return f.jsx("span",{className:re("inline-flex items-center justify-center min-w-[1.125rem] h-[1.125rem] px-1 rounded-full text-ui-xs font-bold text-black",t==="error"?"bg-red-700":"bg-yellow-700"),children:e})}function Bxe({value:e,variant:t}){return f.jsx("span",{className:re("inline-flex font-bold rounded-md px-1.5 py-0.5 items-center justify-center text-black text-xs min-w-[1.25rem]",t==="error"?"bg-red-700":"bg-yellow-700"),children:e})}const RNr=({packages:e,isLoadingUpdates:t,outdatedCount:r,deprecatedCount:n,updateCommand:s,packageManager:i,onPackageManagerChange:o})=>{const a=r>0||n>0,l=e.map(m=>`${m.name}@${m.version}`).join(`
|
|
567
|
-
`),{isCopied:c,handleCopy:u}=np({text:l,copyMessage:"Copied package versions!"}),{isCopied:d,handleCopy:p}=np({text:s??"",copyMessage:"Copied update command!"});return f.jsxs(So,{className:"max-w-2xl",children:[f.jsxs(Oo,{children:[f.jsx(ko,{children:"Installed Mastra Packages"}),f.jsx(Eo,{children:"View and update installed Mastra packages"})]}),f.jsxs(_o,{children:[f.jsx("div",{className:"text-sm text-neutral3 py-2",children:t?f.jsx("span",{className:"text-neutral3",children:"Checking for updates..."}):a?f.jsxs("div",{className:"flex items-center gap-3",children:[r>0&&f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx(Bxe,{value:r,variant:"warning"}),f.jsxs("span",{children:["package",r!==1?"s":""," outdated"]})]}),n>0&&f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx(Bxe,{value:n,variant:"error"}),f.jsxs("span",{children:["package",n!==1?"s":""," deprecated"]})]})]}):f.jsx("span",{className:"text-accent1",children:"✓ All packages are up to date"})}),f.jsx("div",{className:"max-h-64 overflow-y-auto border border-border1 rounded-md",children:f.jsx("div",{className:"grid grid-cols-[1fr_auto_auto] text-sm",children:e.map((m,g)=>f.jsxs("div",{className:re("contents",g>0&&"[&>div]:border-t [&>div]:border-border1"),children:[f.jsx("div",{className:"py-2 px-3 font-mono text-text1 truncate min-w-0",children:f.jsxs("a",{href:`https://www.npmjs.com/package/${m.name}`,target:"_blank",rel:"noopener noreferrer",className:"hover:text-accent1 hover:underline inline-flex items-center gap-1 group",children:[m.name,f.jsx(FT,{className:"w-3 h-3 opacity-0 group-hover:opacity-100 transition-opacity"})]})}),f.jsx("div",{className:"py-2 px-3 font-mono text-neutral3 flex items-center gap-1.5",children:m.isOutdated||m.isDeprecated?f.jsxs(Ss,{children:[f.jsx(Os,{asChild:!0,children:f.jsx("span",{className:re("cursor-help",m.isDeprecated?"text-red-500":m.isOutdated?"text-yellow-500":""),children:m.version})}),f.jsx(is,{children:m.isDeprecated?m.deprecationMessage||"This version is deprecated":"Newer version available"})]}):f.jsx("span",{children:m.version})}),f.jsx("div",{className:"py-2 px-3 font-mono text-neutral3 flex items-center",children:(m.isOutdated||m.isDeprecated)&&m.latestVersion&&f.jsxs(f.Fragment,{children:[f.jsx(Edt,{className:"w-4 h-4 mx-2 text-neutral3"}),f.jsx("span",{className:"text-accent1",children:m.latestVersion})]})})]},m.name))})}),f.jsxs("button",{onClick:u,className:"flex items-center justify-center gap-2 w-full py-2 px-3 rounded bg-surface2 hover:bg-surface3 text-neutral3 hover:text-neutral1 transition-colors",children:[c?f.jsx(lu,{className:"w-4 h-4 text-accent1"}):f.jsx(cu,{className:"w-4 h-4"}),f.jsx(Ze,{as:"span",variant:"ui-sm",children:c?"Copied!":"Copy current versions"})]}),a&&s&&f.jsxs("div",{className:"space-y-3 pt-2 border-t border-border1",children:[f.jsxs("div",{className:"flex items-center gap-2 text-sm text-neutral3 pt-3",children:[f.jsx(sl,{className:"w-4 h-4"}),f.jsx("span",{children:"Use the command below to update your packages"})]}),f.jsxs("div",{className:"flex gap-2 items-center",children:[f.jsx(k0,{value:i,onValueChange:m=>o(m),options:[{label:"pnpm",value:"pnpm"},{label:"npm",value:"npm"},{label:"yarn",value:"yarn"},{label:"bun",value:"bun"}]}),f.jsx("pre",{className:"flex-1 text-sm text-neutral3 bg-surface2 rounded-md px-3 py-1.5 overflow-x-auto whitespace-pre-wrap break-all",children:s})]}),f.jsxs("button",{onClick:p,className:"flex items-center justify-center gap-2 w-full py-2 px-3 rounded bg-surface2 hover:bg-surface3 text-neutral3 hover:text-neutral1 transition-colors",children:[d?f.jsx(lu,{className:"w-4 h-4 text-accent1"}):f.jsx(cu,{className:"w-4 h-4"}),f.jsx(Ze,{as:"span",variant:"ui-sm",children:d?"Copied!":"Copy command"})]})]})]})]})},MNr=()=>f.jsx("div",{className:"flex flex-col h-screen w-full items-center justify-center bg-surface1",children:f.jsxs("div",{className:"max-w-md w-full mx-auto px-4 pt-4",children:[f.jsx("div",{className:"flex items-center justify-center pb-4",children:f.jsx(aq,{className:"size-32"})}),f.jsx(Jqe,{})]})}),Kqe=()=>{const e=window.MASTRA_CLOUD_API_ENDPOINT;return{isMastraPlatform:!!e,mastraPlatformEndpoint:e}},jNr=[{key:"main",links:[{name:"Agents",url:"/agents",icon:f.jsx(Fo,{}),isOnMastraPlatform:!0},{name:"Workflows",url:"/workflows",icon:f.jsx(Tu,{}),isOnMastraPlatform:!0},{name:"Processors",url:"/processors",icon:f.jsx(xB,{})},{name:"MCP Servers",url:"/mcps",icon:f.jsx(sb,{}),isOnMastraPlatform:!0},{name:"Tools",url:"/tools",icon:f.jsx(Cu,{}),isOnMastraPlatform:!0},{name:"Scorers",url:"/scorers",icon:f.jsx(mI,{}),isOnMastraPlatform:!0},{name:"Request Context",url:"/request-context",icon:f.jsx(awe,{}),isOnMastraPlatform:!0}]},{key:"observability",separator:!0,links:[{name:"Observability",url:"/observability",icon:f.jsx(wB,{}),isOnMastraPlatform:!0}]},{key:"Templates",separator:!0,links:[{name:"Templates",url:"/templates",icon:f.jsx(Uq,{}),isOnMastraPlatform:!1}]},{key:"Settings",separator:!0,links:[{name:"Settings",url:"/settings",icon:f.jsx(DZe,{}),isOnMastraPlatform:!1}]}],FNr={links:[{name:"Mastra APIs",url:"http://localhost:4111/swagger-ui",icon:f.jsx(fJe,{}),isOnMastraPlatform:!1},{name:"Documentation",url:"https://mastra.ai/en/docs",icon:f.jsx(iJe,{}),isOnMastraPlatform:!0},{name:"Github",url:"https://github.com/mastra-ai/mastra",icon:f.jsx(ute,{}),isOnMastraPlatform:!0},{name:"Community",url:"https://discord.gg/BTYqqHKUrf",icon:f.jsx(yJe,{}),isOnMastraPlatform:!0}]};function LNr(){const{state:e}=Hqe(),r=op().pathname,n=window?.MASTRA_HIDE_CLOUD_CTA==="true",{isMastraPlatform:s}=Kqe(),i=o=>s?o.isOnMastraPlatform:!0;return f.jsxs(pa,{children:[f.jsx("div",{className:"pt-3 mb-4 -ml-0.5 sticky top-0 bg-surface1 z-10",children:e==="collapsed"?f.jsx(aq,{className:"h-[1.5rem] w-[1.5rem] shrink-0 ml-3"}):f.jsxs("span",{className:"flex items-center gap-2 pl-3",children:[f.jsx(aq,{className:"h-[1.5rem] w-[1.5rem] shrink-0"}),f.jsx("span",{className:"font-serif text-sm",children:"Mastra Studio"})]})}),f.jsx(pa.Nav,{children:jNr.map(o=>{const a=o.links.filter(i),l=a.length>0&&o?.separator;return f.jsxs(pa.NavSection,{children:[o?.title?f.jsx(pa.NavHeader,{state:e,children:o.title}):f.jsx(f.Fragment,{children:l&&f.jsx(pa.NavSeparator,{})}),f.jsx(pa.NavList,{children:a.map(c=>{const u=r.startsWith(c.url);return f.jsx(pa.NavLink,{state:e,link:c,isActive:u},c.name)})})]},o.key)})}),f.jsxs(pa.Bottom,{children:[f.jsx(pa.Nav,{children:f.jsxs(pa.NavSection,{children:[f.jsx(pa.NavSeparator,{}),f.jsxs(pa.NavList,{children:[FNr.links.filter(i).map(o=>f.jsx(pa.NavLink,{link:o,state:e},o.name)),!n&&!s?f.jsx(pa.NavLink,{link:{name:"Share",url:"https://mastra.ai/cloud",icon:f.jsx(cJe,{}),variant:"featured",tooltipMsg:"You’re running Mastra Studio locally. Want your team to collaborate?",isOnMastraPlatform:!1},state:e}):null]})]})}),e!=="collapsed"&&f.jsxs(f.Fragment,{children:[f.jsx(pa.NavSeparator,{}),f.jsx(INr,{collapsed:!1})]})]})]})}const zNr=E.createContext({theme:"system",setTheme:()=>null});function BNr({children:e,defaultTheme:t="system"}){const[r,n]=E.useState(t);return E.useEffect(()=>{const s=window.document.documentElement;if(s.classList.remove("light","dark"),r==="system"){const i=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";s.classList.add(i);return}s.classList.add(r)},[r]),f.jsx(zNr.Provider,{value:{theme:r,setTheme:n},children:e})}const VNr=({children:e})=>f.jsxs("div",{className:"bg-surface1 font-sans h-screen",children:[f.jsx(pCt,{position:"bottom-right"}),f.jsx(BNr,{defaultTheme:"dark",attribute:"class",children:f.jsx(Dc,{delayDuration:0,children:f.jsxs("div",{className:"grid grid-cols-[auto_1fr] h-full",children:[f.jsx(eNr,{children:f.jsx(LNr,{})}),f.jsx("div",{className:"bg-surface2 my-3 mr-3 rounded-lg border border-border1 overflow-y-auto",children:e})]})})})]});function UNr({agentName:e,agentId:t}){return f.jsxs(ti,{children:[f.jsx(sp,{children:f.jsxs(Da,{as:Br,to:"/agents",isCurrent:!0,children:[f.jsx(qe,{children:f.jsx(Fo,{})}),"Agents"]})}),f.jsxs(E0,{children:[f.jsx("div",{className:"w-48",children:f.jsx(k3r,{value:t})}),f.jsx(j4,{}),f.jsx(Je,{as:Br,to:`/agents/${t}/chat`,children:"Chat"}),f.jsx(j4,{}),f.jsx(Je,{as:Br,to:`/observability?entity=${t}`,children:"Traces"})]}),f.jsx(Ma,{children:f.jsxs(Je,{as:Br,to:"https://mastra.ai/en/docs/agents/overview",target:"_blank",children:[f.jsx(qe,{children:f.jsx(Ra,{})}),"Agents documentation"]})})]})}const QNr=({children:e})=>{const{agentId:t}=xu(),{data:r,isLoading:n}=Sy(t);return f.jsxs(lo,{children:[n?f.jsx(ti,{children:f.jsx(_c,{children:f.jsx(fr,{className:"h-6 w-[200px]"})})}):f.jsx(UNr,{agentName:r?.name,agentId:t}),e]})};function ZNr(){const{data:e={},isLoading:t}=ob(),{data:r={},isLoading:n}=zqe(),s=!n&&Object.keys(r).length===0;return f.jsxs(lo,{children:[f.jsxs(ti,{children:[f.jsxs(_c,{children:[f.jsx(qe,{children:f.jsx(Cu,{})}),"Tools"]}),f.jsx(Ma,{children:f.jsxs(Je,{as:Br,to:"https://mastra.ai/en/docs/agents/using-tools-and-mcp",target:"_blank",children:[f.jsx(qe,{children:f.jsx(Ra,{})}),"Tools documentation"]})})]}),f.jsx(Oc,{isCentered:s,children:f.jsx(o4r,{tools:r,agents:e,isLoading:t||n})})]})}function qNr(){const{data:e={},isLoading:t}=Y3r(),r=!t&&Object.keys(e).length===0;return f.jsxs(lo,{children:[f.jsxs(ti,{children:[f.jsxs(_c,{children:[f.jsx(qe,{children:f.jsx(F4,{})}),"Processors"]}),f.jsx(Ma,{children:f.jsxs(Je,{as:Br,to:"https://mastra.ai/en/docs/processors",target:"_blank",rel:"noopener noreferrer",children:[f.jsx(qe,{children:f.jsx(Ra,{})}),"Processors documentation"]})})]}),f.jsx(Oc,{isCentered:r,children:f.jsx(W3r,{processors:e,isLoading:t})})]})}function HNr(){const{processorId:e}=xu(),{data:t,isLoading:r}=Lqe(e);return!r&&t?.isWorkflow?f.jsx(ewe,{to:`/workflows/${e}/graph`,replace:!0}):r?f.jsxs("div",{className:"h-full w-full overflow-y-hidden",children:[f.jsxs(ti,{children:[f.jsx(sp,{children:f.jsxs(Da,{as:Br,to:"/processors",isCurrent:!0,children:[f.jsx(qe,{children:f.jsx(xB,{})}),"Processors"]})}),f.jsx(E0,{children:f.jsx(fr,{className:"h-6 w-48"})})]}),f.jsxs("div",{className:"p-6",children:[f.jsx(fr,{className:"h-8 w-48 mb-4"}),f.jsx(fr,{className:"h-32 w-full"})]})]}):f.jsxs("div",{className:"h-full w-full overflow-y-hidden",children:[f.jsxs(ti,{children:[f.jsx(sp,{children:f.jsxs(Da,{as:Br,to:"/processors",isCurrent:!0,children:[f.jsx(qe,{children:f.jsx(xB,{})}),"Processors"]})}),f.jsx(E0,{children:f.jsx("div",{className:"text-icon1 font-medium truncate max-w-md",children:e})}),f.jsx(Ma,{children:f.jsxs(Je,{as:Br,to:"https://mastra.ai/en/docs/processors",target:"_blank",rel:"noopener noreferrer",children:[f.jsx(qe,{children:f.jsx(Ra,{})}),"Processors documentation"]})})]}),f.jsx(e4r,{processorId:e})]})}function WNr(){const{Link:e}=Lr(),{data:t={},isLoading:r}=ob();return f.jsxs(lo,{children:[f.jsxs(ti,{children:[f.jsxs(_c,{children:[f.jsx(qe,{children:f.jsx(Fo,{})}),"Agents"]}),f.jsx(Ma,{children:f.jsxs(Je,{as:e,to:"https://mastra.ai/en/docs/agents/overview",target:"_blank",children:[f.jsx(qe,{children:f.jsx(Ra,{})}),"Agents documentation"]})})]}),f.jsx(Oc,{isCentered:!r&&Object.keys(t||{}).length===0,children:f.jsx(yIr,{agents:t,isLoading:r})})]})}function GNr({agentId:e,threadId:t,threads:r,isLoading:n}){const{mutateAsync:s}=lIr(),{paths:i,navigate:o}=Lr(),a=async l=>{await s({threadId:l,agentId:e}),l===t&&o(i.agentNewThreadLink(e))};return f.jsx(b3r,{resourceId:e,resourceType:"agent",threads:r||[],isLoading:n,threadId:t,onDelete:a})}function Vxe(){const{agentId:e,threadId:t}=xu(),[r,n]=dN(),{data:s,isLoading:i}=Sy(e),{data:o}=QD(e),a=Mw(),l=r.get("new")==="true",{data:c,isLoading:u,refetch:d}=aIr({resourceId:e,agentId:e,isMemoryEnabled:!!o?.result});E.useEffect(()=>{o?.result&&!t&&a(`/agents/${e}/chat/${Go()}?new=true`)},[o?.result,t]);const p=r.get("messageId")??void 0,m=E.useMemo(()=>{if(!s)return{modelSettings:{}};const v=s.defaultOptions,{maxOutputTokens:b,...w}=v?.modelSettings??{};return{modelSettings:{...w,...b!==void 0&&{maxTokens:b},...v?.maxSteps!==void 0&&{maxSteps:v.maxSteps},...v?.providerOptions!==void 0&&{providerOptions:v.providerOptions}}}},[s]);if(i)return null;const g=()=>{r.delete("new"),n(r),d()};return f.jsx(IZe,{entityId:e,entityType:"agent",children:f.jsx(tIr,{initialPrompt:s.instructions,agentId:e,children:f.jsx(J$r,{agentId:e,defaultSettings:m,children:f.jsx(q$r,{agentId:e,threadId:t,resourceId:e,children:f.jsx(j$r,{children:f.jsx(U3r,{agentId:e,leftSlot:!!o?.result&&f.jsx(GNr,{agentId:e,threadId:t,threads:c||[],isLoading:u}),rightSlot:f.jsx(F3r,{agentId:e,threadId:t}),children:f.jsx(iIr,{agentId:e,agentName:s?.name,modelVersion:s?.modelVersion,threadId:t,memory:o?.result,refreshThreadList:g,modelList:s?.modelList,messageId:p,isNewThread:l},t)})})})})})})}const XNr=()=>{const{toolId:e,agentId:t}=xu();return f.jsxs(lo,{children:[f.jsxs(ti,{children:[f.jsxs(sp,{children:[f.jsxs(Da,{as:Br,to:"/agents",children:[f.jsx(qe,{children:f.jsx(Fo,{})}),"Agents"]}),f.jsx(Da,{as:Br,to:`/agents/${t}/chat`,children:t}),f.jsx(Da,{as:Br,to:`/tools/${t}/${e}`,isCurrent:!0,children:e})]}),f.jsx(Ma,{children:f.jsxs(Je,{as:Br,to:"https://mastra.ai/en/docs/agents/using-tools-and-mcp",target:"_blank",children:[f.jsx(qe,{children:f.jsx(Ra,{})}),"Tools documentation"]})})]}),f.jsx(T3r,{toolId:e,agentId:t})]})},YNr=()=>{const{toolId:e}=xu();return f.jsxs("div",{className:"h-full w-full overflow-y-hidden",children:[f.jsxs(ti,{children:[f.jsx(sp,{children:f.jsxs(Da,{as:Br,to:"/tools",isCurrent:!0,children:[f.jsx(qe,{children:f.jsx(Cu,{})}),"Tools"]})}),f.jsx(E0,{children:f.jsx("div",{className:"w-48",children:f.jsx(f4r,{value:e})})}),f.jsx(Ma,{children:f.jsxs(Je,{as:Br,to:"https://mastra.ai/en/docs/agents/using-tools-and-mcp",target:"_blank",children:[f.jsx(qe,{children:f.jsx(Ra,{})}),"Tools documentation"]})})]}),f.jsx(d4r,{toolId:e})]})};function JNr(){const{data:e,isLoading:t}=Y6(),r=!t&&Object.keys(e||{}).length===0;return f.jsxs(lo,{children:[f.jsxs(ti,{children:[f.jsxs(_c,{children:[f.jsx(qe,{children:f.jsx(Tu,{})}),"Workflows"]}),f.jsx(Ma,{children:f.jsxs(Je,{as:Br,to:"https://mastra.ai/en/docs/workflows/overview",target:"_blank",children:[f.jsx(qe,{children:f.jsx(Ra,{})}),"Workflows documentation"]})})]}),f.jsx(Oc,{isCentered:r,children:f.jsx(UPr,{workflows:e||{},isLoading:t})})]})}const Uxe=()=>{const{workflowId:e}=xu(),{data:t,isLoading:r}=FD(e);return f.jsx(JZe,{workflowId:e,workflow:t??void 0,isLoading:r})};function KNr({workflowName:e,workflowId:t,runId:r}){return f.jsx("div",{className:"shrink-0",children:f.jsxs(ti,{children:[f.jsx(sp,{children:f.jsxs(Da,{as:Br,to:"/workflows",isCurrent:!0,children:[f.jsx(qe,{children:f.jsx(Tu,{})}),"Workflows"]})}),f.jsxs(E0,{children:[f.jsx("div",{className:"w-48",children:f.jsx(YPr,{value:t})}),r&&f.jsxs(f.Fragment,{children:[f.jsx(j4,{}),f.jsxs(Xt,{variant:"default",children:["Run: ",r]})]}),f.jsx(j4,{}),f.jsx(Je,{as:Br,to:`/observability?entity=${e}`,children:"Traces"})]}),f.jsxs(Ma,{children:[f.jsxs(Je,{as:Br,target:"_blank",to:"/swagger-ui",children:[f.jsx(qe,{children:f.jsx(w2r,{})}),"API endpoints"]}),f.jsxs(Je,{as:Br,to:"https://mastra.ai/en/docs/workflows/overview",target:"_blank",children:[f.jsx(qe,{children:f.jsx(Ra,{})}),"Workflows documentation"]})]})]})})}const e5r=({children:e})=>{const{workflowId:t,runId:r}=xu(),{data:n,isLoading:s}=FD(t),{data:i}=MZe(t??"",r??"");if(!t)return f.jsxs(lo,{children:[f.jsx(ti,{children:f.jsx(_c,{children:f.jsx(fr,{className:"h-6 w-[200px]"})})}),f.jsx(Oc,{isCentered:!0,children:f.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:f.jsx(Ze,{variant:"ui-md",className:"text-neutral6 text-center",children:"No workflow ID provided"})})})]});if(s)return f.jsx(lo,{children:f.jsx(ti,{children:f.jsx(_c,{children:f.jsx(fr,{className:"h-6 w-[200px]"})})})});const o=i&&r?{context:{input:i?.payload,...i?.steps},status:i?.status,result:i?.result,error:i?.error,runId:r,serializedStepGraph:i?.serializedStepGraph}:void 0;return f.jsx(IZe,{entityId:t,entityType:"workflow",children:f.jsx(hte,{snapshot:o,workflowId:t,initialRunId:r,children:f.jsxs(lo,{children:[f.jsx(KNr,{workflowName:n?.name||"",workflowId:t,runId:r}),f.jsx(JPr,{workflowId:t,leftSlot:f.jsx(uNr,{workflowId:t,runId:r}),rightSlot:f.jsx(XPr,{workflowId:t,initialRunId:r}),children:e})]})})})};var Pe=typeof window<"u"?window:void 0,Io=typeof globalThis<"u"?globalThis:Pe;typeof self>"u"&&(Io.self=Io),typeof File>"u"&&(Io.File=function(){});var eHe=Array.prototype,Qxe=eHe.forEach,Zxe=eHe.indexOf,nc=Io?.navigator,wt=Io?.document,rl=Io?.location,lq=Io?.fetch,cq=Io!=null&&Io.XMLHttpRequest&&"withCredentials"in new Io.XMLHttpRequest?Io.XMLHttpRequest:void 0,qxe=Io?.AbortController,Ja=nc?.userAgent,pr=Pe??{},dh={DEBUG:!1,LIB_VERSION:"1.302.2"};function Hxe(e,t,r,n,s,i,o){try{var a=e[i](o),l=a.value}catch(c){return void r(c)}a.done?t(l):Promise.resolve(l).then(n,s)}function Wxe(e){return function(){var t=this,r=arguments;return new Promise((function(n,s){var i=e.apply(t,r);function o(l){Hxe(i,n,s,o,a,"next",l)}function a(l){Hxe(i,n,s,o,a,"throw",l)}o(void 0)}))}}function Dt(){return Dt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Dt.apply(null,arguments)}function tHe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var t5r=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],Gxe=function(e,t){if(t===void 0&&(t=[]),!e)return!1;var r=e.toLowerCase();return t5r.concat(t).some((n=>{var s=n.toLowerCase();return r.indexOf(s)!==-1}))},r5r=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"];function qr(e,t){return e.indexOf(t)!==-1}var iR=function(e){return e.trim()},uq=function(e){return e.replace(/^\$/,"")},n5r=Array.isArray,rHe=Object.prototype,nHe=rHe.hasOwnProperty,oR=rHe.toString,ss=n5r||function(e){return oR.call(e)==="[object Array]"},Dg=e=>typeof e=="function",no=e=>e===Object(e)&&!ss(e),Lx=e=>{if(no(e)){for(var t in e)if(nHe.call(e,t))return!1;return!0}return!1},bt=e=>e===void 0,Ki=e=>oR.call(e)=="[object String]",dq=e=>Ki(e)&&e.trim().length===0,lm=e=>e===null,Yn=e=>bt(e)||lm(e),ip=e=>oR.call(e)=="[object Number]",Ag=e=>oR.call(e)==="[object Boolean]",s5r=e=>e instanceof FormData,i5r=e=>qr(r5r,e);function fq(e){return e===null||typeof e!="object"}function W4(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function sHe(e){return!bt(Event)&&(function(t,r){try{return t instanceof r}catch{return!1}})(e,Event)}var o5r=[!0,"true",1,"1","yes"],Kz=e=>qr(o5r,e),a5r=[!1,"false",0,"0","no"];function If(e,t,r,n,s){return t>r&&(n.warn("min cannot be greater than max."),t=r),ip(e)?e>r?(n.warn(" cannot be greater than max: "+r+". Using max value instead."),r):e<t?(n.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(n.warn(" must be a number. using max or fallback. max: "+r+", fallback: "+s),If(s||r,t,r,n))}class l5r{constructor(t){this.t={},this.i=t.i,this.o=If(t.bucketSize,0,100,t.h),this.m=If(t.refillRate,0,this.o,t.h),this.S=If(t.refillInterval,0,864e5,t.h)}$(t,r){var n=r-t.lastAccess,s=Math.floor(n/this.S);if(s>0){var i=s*this.m;t.tokens=Math.min(t.tokens+i,this.o),t.lastAccess=t.lastAccess+s*this.S}}consumeRateLimit(t){var r,n=Date.now(),s=String(t),i=this.t[s];return i?this.$(i,n):(i={tokens:this.o,lastAccess:n},this.t[s]=i),i.tokens===0||(i.tokens--,i.tokens===0&&((r=this.i)==null||r.call(this,t)),i.tokens===0)}stop(){this.t={}}}var i$,Xxe,eB,c5r=e=>e instanceof Error;function u5r(e){var t=globalThis._posthogChunkIds;if(t){var r=Object.keys(t);return eB&&r.length===Xxe||(Xxe=r.length,eB=r.reduce(((n,s)=>{i$||(i$={});var i=i$[s];if(i)n[i[0]]=i[1];else for(var o=e(s),a=o.length-1;a>=0;a--){var l=o[a],c=l?.filename,u=t[s];if(c&&u){n[c]=u,i$[s]=[c,u];break}}return n}),{})),eB}}class d5r{constructor(t,r,n){n===void 0&&(n=[]),this.coercers=t,this.stackParser=r,this.modifiers=n}buildFromUnknown(t,r){r===void 0&&(r={});var n=r&&r.mechanism||{handled:!0,type:"generic"},s=this.buildCoercingContext(n,r,0).apply(t),i=this.buildParsingContext(),o=this.parseStacktrace(s,i);return{$exception_list:this.convertToExceptionList(o,n),$exception_level:"error"}}modifyFrames(t){var r=this;return Wxe((function*(){for(var n of t)n.stacktrace&&n.stacktrace.frames&&ss(n.stacktrace.frames)&&(n.stacktrace.frames=yield r.applyModifiers(n.stacktrace.frames));return t}))()}coerceFallback(t){var r;return{type:"Error",value:"Unknown error",stack:(r=t.syntheticException)==null?void 0:r.stack,synthetic:!0}}parseStacktrace(t,r){var n,s;return t.cause!=null&&(n=this.parseStacktrace(t.cause,r)),t.stack!=""&&t.stack!=null&&(s=this.applyChunkIds(this.stackParser(t.stack,t.synthetic?1:0),r.chunkIdMap)),Dt({},t,{cause:n,stack:s})}applyChunkIds(t,r){return t.map((n=>(n.filename&&r&&(n.chunk_id=r[n.filename]),n)))}applyCoercers(t,r){for(var n of this.coercers)if(n.match(t))return n.coerce(t,r);return this.coerceFallback(r)}applyModifiers(t){var r=this;return Wxe((function*(){var n=t;for(var s of r.modifiers)n=yield s(n);return n}))()}convertToExceptionList(t,r){var n,s,i,o={type:t.type,value:t.value,mechanism:{type:(n=r.type)!==null&&n!==void 0?n:"generic",handled:(s=r.handled)===null||s===void 0||s,synthetic:(i=t.synthetic)!==null&&i!==void 0&&i}};t.stack&&(o.stacktrace={type:"raw",frames:t.stack});var a=[o];return t.cause!=null&&a.push(...this.convertToExceptionList(t.cause,Dt({},r,{handled:!0}))),a}buildParsingContext(){return{chunkIdMap:u5r(this.stackParser)}}buildCoercingContext(t,r,n){n===void 0&&(n=0);var s=(i,o)=>{if(o<=4){var a=this.buildCoercingContext(t,r,o);return this.applyCoercers(i,a)}};return Dt({},r,{syntheticException:n==0?r.syntheticException:void 0,mechanism:t,apply:i=>s(i,n),next:i=>s(i,n+1)})}}var Dw="?";function pq(e,t,r,n,s){var i={platform:e,filename:t,function:r==="<anonymous>"?Dw:r,in_app:!0};return bt(n)||(i.lineno=n),bt(s)||(i.colno=s),i}var iHe=(e,t)=>{var r=e.indexOf("safari-extension")!==-1,n=e.indexOf("safari-web-extension")!==-1;return r||n?[e.indexOf("@")!==-1?e.split("@")[0]:Dw,r?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},f5r=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,p5r=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,h5r=/\((\S*)(?::(\d+))(?::(\d+))\)/,m5r=(e,t)=>{var r=f5r.exec(e);if(r){var[,n,s,i]=r;return pq(t,n,Dw,+s,+i)}var o=p5r.exec(e);if(o){if(o[2]&&o[2].indexOf("eval")===0){var a=h5r.exec(o[2]);a&&(o[2]=a[1],o[3]=a[2],o[4]=a[3])}var[l,c]=iHe(o[1]||Dw,o[2]);return pq(t,c,l,o[3]?+o[3]:void 0,o[4]?+o[4]:void 0)}},g5r=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,y5r=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,v5r=(e,t)=>{var r=g5r.exec(e);if(r){if(r[3]&&r[3].indexOf(" > eval")>-1){var n=y5r.exec(r[3]);n&&(r[1]=r[1]||"eval",r[3]=n[1],r[4]=n[2],r[5]="")}var s=r[3],i=r[1]||Dw;return[i,s]=iHe(i,s),pq(t,s,i,r[4]?+r[4]:void 0,r[5]?+r[5]:void 0)}},Yxe=/\(error: (.*)\)/,Jxe=50;function b5r(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return function(s,i){i===void 0&&(i=0);for(var o=[],a=s.split(`
|
|
567
|
+
`),{isCopied:c,handleCopy:u}=np({text:l,copyMessage:"Copied package versions!"}),{isCopied:d,handleCopy:p}=np({text:s??"",copyMessage:"Copied update command!"});return f.jsxs(So,{className:"max-w-2xl",children:[f.jsxs(Oo,{children:[f.jsx(ko,{children:"Installed Mastra Packages"}),f.jsx(Eo,{children:"View and update installed Mastra packages"})]}),f.jsxs(_o,{children:[f.jsx("div",{className:"text-sm text-neutral3 py-2",children:t?f.jsx("span",{className:"text-neutral3",children:"Checking for updates..."}):a?f.jsxs("div",{className:"flex items-center gap-3",children:[r>0&&f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx(Bxe,{value:r,variant:"warning"}),f.jsxs("span",{children:["package",r!==1?"s":""," outdated"]})]}),n>0&&f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx(Bxe,{value:n,variant:"error"}),f.jsxs("span",{children:["package",n!==1?"s":""," deprecated"]})]})]}):f.jsx("span",{className:"text-accent1",children:"✓ All packages are up to date"})}),f.jsx("div",{className:"max-h-64 overflow-y-auto border border-border1 rounded-md",children:f.jsx("div",{className:"grid grid-cols-[1fr_auto_auto] text-sm",children:e.map((m,g)=>f.jsxs("div",{className:re("contents",g>0&&"[&>div]:border-t [&>div]:border-border1"),children:[f.jsx("div",{className:"py-2 px-3 font-mono text-text1 truncate min-w-0",children:f.jsxs("a",{href:`https://www.npmjs.com/package/${m.name}`,target:"_blank",rel:"noopener noreferrer",className:"hover:text-accent1 hover:underline inline-flex items-center gap-1 group",children:[m.name,f.jsx(FT,{className:"w-3 h-3 opacity-0 group-hover:opacity-100 transition-opacity"})]})}),f.jsx("div",{className:"py-2 px-3 font-mono text-neutral3 flex items-center gap-1.5",children:m.isOutdated||m.isDeprecated?f.jsxs(Ss,{children:[f.jsx(Os,{asChild:!0,children:f.jsx("span",{className:re("cursor-help",m.isDeprecated?"text-red-500":m.isOutdated?"text-yellow-500":""),children:m.version})}),f.jsx(is,{children:m.isDeprecated?m.deprecationMessage||"This version is deprecated":"Newer version available"})]}):f.jsx("span",{children:m.version})}),f.jsx("div",{className:"py-2 px-3 font-mono text-neutral3 flex items-center",children:(m.isOutdated||m.isDeprecated)&&m.latestVersion&&f.jsxs(f.Fragment,{children:[f.jsx(Edt,{className:"w-4 h-4 mx-2 text-neutral3"}),f.jsx("span",{className:"text-accent1",children:m.latestVersion})]})})]},m.name))})}),f.jsxs("button",{onClick:u,className:"flex items-center justify-center gap-2 w-full py-2 px-3 rounded bg-surface2 hover:bg-surface3 text-neutral3 hover:text-neutral1 transition-colors",children:[c?f.jsx(lu,{className:"w-4 h-4 text-accent1"}):f.jsx(cu,{className:"w-4 h-4"}),f.jsx(Ze,{as:"span",variant:"ui-sm",children:c?"Copied!":"Copy current versions"})]}),a&&s&&f.jsxs("div",{className:"space-y-3 pt-2 border-t border-border1",children:[f.jsxs("div",{className:"flex items-center gap-2 text-sm text-neutral3 pt-3",children:[f.jsx(sl,{className:"w-4 h-4"}),f.jsx("span",{children:"Use the command below to update your packages"})]}),f.jsxs("div",{className:"flex gap-2 items-center",children:[f.jsx(k0,{value:i,onValueChange:m=>o(m),options:[{label:"pnpm",value:"pnpm"},{label:"npm",value:"npm"},{label:"yarn",value:"yarn"},{label:"bun",value:"bun"}]}),f.jsx("pre",{className:"flex-1 text-sm text-neutral3 bg-surface2 rounded-md px-3 py-1.5 overflow-x-auto whitespace-pre-wrap break-all",children:s})]}),f.jsxs("button",{onClick:p,className:"flex items-center justify-center gap-2 w-full py-2 px-3 rounded bg-surface2 hover:bg-surface3 text-neutral3 hover:text-neutral1 transition-colors",children:[d?f.jsx(lu,{className:"w-4 h-4 text-accent1"}):f.jsx(cu,{className:"w-4 h-4"}),f.jsx(Ze,{as:"span",variant:"ui-sm",children:d?"Copied!":"Copy command"})]})]})]})]})},MNr=()=>f.jsx("div",{className:"flex flex-col h-screen w-full items-center justify-center bg-surface1",children:f.jsxs("div",{className:"max-w-md w-full mx-auto px-4 pt-4",children:[f.jsx("div",{className:"flex items-center justify-center pb-4",children:f.jsx(aq,{className:"size-32"})}),f.jsx(Jqe,{})]})}),Kqe=()=>{const e=window.MASTRA_CLOUD_API_ENDPOINT;return{isMastraPlatform:!!e,mastraPlatformEndpoint:e}},jNr=[{key:"main",links:[{name:"Agents",url:"/agents",icon:f.jsx(Fo,{}),isOnMastraPlatform:!0},{name:"Workflows",url:"/workflows",icon:f.jsx(Tu,{}),isOnMastraPlatform:!0},{name:"Processors",url:"/processors",icon:f.jsx(xB,{})},{name:"MCP Servers",url:"/mcps",icon:f.jsx(sb,{}),isOnMastraPlatform:!0},{name:"Tools",url:"/tools",icon:f.jsx(Cu,{}),isOnMastraPlatform:!0},{name:"Scorers",url:"/scorers",icon:f.jsx(mI,{}),isOnMastraPlatform:!0},{name:"Request Context",url:"/request-context",icon:f.jsx(awe,{}),isOnMastraPlatform:!0}]},{key:"observability",separator:!0,links:[{name:"Observability",url:"/observability",icon:f.jsx(wB,{}),isOnMastraPlatform:!0}]},{key:"Templates",separator:!0,links:[{name:"Templates",url:"/templates",icon:f.jsx(Uq,{}),isOnMastraPlatform:!1}]},{key:"Settings",separator:!0,links:[{name:"Settings",url:"/settings",icon:f.jsx(DZe,{}),isOnMastraPlatform:!1}]}],FNr={links:[{name:"Mastra APIs",url:"http://localhost:4111/swagger-ui",icon:f.jsx(fJe,{}),isOnMastraPlatform:!1},{name:"Documentation",url:"https://mastra.ai/en/docs",icon:f.jsx(iJe,{}),isOnMastraPlatform:!0},{name:"Github",url:"https://github.com/mastra-ai/mastra",icon:f.jsx(ute,{}),isOnMastraPlatform:!0},{name:"Community",url:"https://discord.gg/BTYqqHKUrf",icon:f.jsx(yJe,{}),isOnMastraPlatform:!0}]};function LNr(){const{state:e}=Hqe(),r=op().pathname,n=window?.MASTRA_HIDE_CLOUD_CTA==="true",{isMastraPlatform:s}=Kqe(),i=o=>s?o.isOnMastraPlatform:!0;return f.jsxs(pa,{children:[f.jsx("div",{className:"pt-3 mb-4 -ml-0.5 sticky top-0 bg-surface1 z-10",children:e==="collapsed"?f.jsx(aq,{className:"h-[1.5rem] w-[1.5rem] shrink-0 ml-3"}):f.jsxs("span",{className:"flex items-center gap-2 pl-3",children:[f.jsx(aq,{className:"h-[1.5rem] w-[1.5rem] shrink-0"}),f.jsx("span",{className:"font-serif text-sm",children:"Mastra Studio"})]})}),f.jsx(pa.Nav,{children:jNr.map(o=>{const a=o.links.filter(i),l=a.length>0&&o?.separator;return f.jsxs(pa.NavSection,{children:[o?.title?f.jsx(pa.NavHeader,{state:e,children:o.title}):f.jsx(f.Fragment,{children:l&&f.jsx(pa.NavSeparator,{})}),f.jsx(pa.NavList,{children:a.map(c=>{const u=r.startsWith(c.url);return f.jsx(pa.NavLink,{state:e,link:c,isActive:u},c.name)})})]},o.key)})}),f.jsxs(pa.Bottom,{children:[f.jsx(pa.Nav,{children:f.jsxs(pa.NavSection,{children:[f.jsx(pa.NavSeparator,{}),f.jsxs(pa.NavList,{children:[FNr.links.filter(i).map(o=>f.jsx(pa.NavLink,{link:o,state:e},o.name)),!n&&!s?f.jsx(pa.NavLink,{link:{name:"Share",url:"https://mastra.ai/cloud",icon:f.jsx(cJe,{}),variant:"featured",tooltipMsg:"You’re running Mastra Studio locally. Want your team to collaborate?",isOnMastraPlatform:!1},state:e}):null]})]})}),e!=="collapsed"&&f.jsxs(f.Fragment,{children:[f.jsx(pa.NavSeparator,{}),f.jsx(INr,{collapsed:!1})]})]})]})}const zNr=E.createContext({theme:"system",setTheme:()=>null});function BNr({children:e,defaultTheme:t="system"}){const[r,n]=E.useState(t);return E.useEffect(()=>{const s=window.document.documentElement;if(s.classList.remove("light","dark"),r==="system"){const i=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";s.classList.add(i);return}s.classList.add(r)},[r]),f.jsx(zNr.Provider,{value:{theme:r,setTheme:n},children:e})}const VNr=({children:e})=>f.jsxs("div",{className:"bg-surface1 font-sans h-screen",children:[f.jsx(pCt,{position:"bottom-right"}),f.jsx(BNr,{defaultTheme:"dark",attribute:"class",children:f.jsx(Dc,{delayDuration:0,children:f.jsxs("div",{className:"grid grid-cols-[auto_1fr] h-full",children:[f.jsx(eNr,{children:f.jsx(LNr,{})}),f.jsx("div",{className:"bg-surface2 my-3 mr-3 rounded-lg border border-border1 overflow-y-auto",children:e})]})})})]});function UNr({agentName:e,agentId:t}){return f.jsxs(ti,{children:[f.jsx(sp,{children:f.jsxs(Da,{as:Br,to:"/agents",isCurrent:!0,children:[f.jsx(qe,{children:f.jsx(Fo,{})}),"Agents"]})}),f.jsxs(E0,{children:[f.jsx("div",{className:"w-48",children:f.jsx(k3r,{value:t})}),f.jsx(j4,{}),f.jsx(Je,{as:Br,to:`/agents/${t}/chat`,children:"Chat"}),f.jsx(j4,{}),f.jsx(Je,{as:Br,to:`/observability?entity=${t}`,children:"Traces"})]}),f.jsx(Ma,{children:f.jsxs(Je,{as:Br,to:"https://mastra.ai/en/docs/agents/overview",target:"_blank",children:[f.jsx(qe,{children:f.jsx(Ra,{})}),"Agents documentation"]})})]})}const QNr=({children:e})=>{const{agentId:t}=xu(),{data:r,isLoading:n}=Sy(t);return f.jsxs(lo,{children:[n?f.jsx(ti,{children:f.jsx(_c,{children:f.jsx(fr,{className:"h-6 w-[200px]"})})}):f.jsx(UNr,{agentName:r?.name,agentId:t}),e]})};function ZNr(){const{data:e={},isLoading:t}=ob(),{data:r={},isLoading:n}=zqe(),s=!n&&Object.keys(r).length===0;return f.jsxs(lo,{children:[f.jsxs(ti,{children:[f.jsxs(_c,{children:[f.jsx(qe,{children:f.jsx(Cu,{})}),"Tools"]}),f.jsx(Ma,{children:f.jsxs(Je,{as:Br,to:"https://mastra.ai/en/docs/agents/using-tools-and-mcp",target:"_blank",children:[f.jsx(qe,{children:f.jsx(Ra,{})}),"Tools documentation"]})})]}),f.jsx(Oc,{isCentered:s,children:f.jsx(o4r,{tools:r,agents:e,isLoading:t||n})})]})}function qNr(){const{data:e={},isLoading:t}=Y3r(),r=!t&&Object.keys(e).length===0;return f.jsxs(lo,{children:[f.jsxs(ti,{children:[f.jsxs(_c,{children:[f.jsx(qe,{children:f.jsx(F4,{})}),"Processors"]}),f.jsx(Ma,{children:f.jsxs(Je,{as:Br,to:"https://mastra.ai/docs/agents/processors",target:"_blank",rel:"noopener noreferrer",children:[f.jsx(qe,{children:f.jsx(Ra,{})}),"Processors documentation"]})})]}),f.jsx(Oc,{isCentered:r,children:f.jsx(W3r,{processors:e,isLoading:t})})]})}function HNr(){const{processorId:e}=xu(),{data:t,isLoading:r}=Lqe(e);return!r&&t?.isWorkflow?f.jsx(ewe,{to:`/workflows/${e}/graph`,replace:!0}):r?f.jsxs("div",{className:"h-full w-full overflow-y-hidden",children:[f.jsxs(ti,{children:[f.jsx(sp,{children:f.jsxs(Da,{as:Br,to:"/processors",isCurrent:!0,children:[f.jsx(qe,{children:f.jsx(xB,{})}),"Processors"]})}),f.jsx(E0,{children:f.jsx(fr,{className:"h-6 w-48"})})]}),f.jsxs("div",{className:"p-6",children:[f.jsx(fr,{className:"h-8 w-48 mb-4"}),f.jsx(fr,{className:"h-32 w-full"})]})]}):f.jsxs("div",{className:"h-full w-full overflow-y-hidden",children:[f.jsxs(ti,{children:[f.jsx(sp,{children:f.jsxs(Da,{as:Br,to:"/processors",isCurrent:!0,children:[f.jsx(qe,{children:f.jsx(xB,{})}),"Processors"]})}),f.jsx(E0,{children:f.jsx("div",{className:"text-icon1 font-medium truncate max-w-md",children:e})}),f.jsx(Ma,{children:f.jsxs(Je,{as:Br,to:"https://mastra.ai/docs/agents/processors",target:"_blank",rel:"noopener noreferrer",children:[f.jsx(qe,{children:f.jsx(Ra,{})}),"Processors documentation"]})})]}),f.jsx(e4r,{processorId:e})]})}function WNr(){const{Link:e}=Lr(),{data:t={},isLoading:r}=ob();return f.jsxs(lo,{children:[f.jsxs(ti,{children:[f.jsxs(_c,{children:[f.jsx(qe,{children:f.jsx(Fo,{})}),"Agents"]}),f.jsx(Ma,{children:f.jsxs(Je,{as:e,to:"https://mastra.ai/en/docs/agents/overview",target:"_blank",children:[f.jsx(qe,{children:f.jsx(Ra,{})}),"Agents documentation"]})})]}),f.jsx(Oc,{isCentered:!r&&Object.keys(t||{}).length===0,children:f.jsx(yIr,{agents:t,isLoading:r})})]})}function GNr({agentId:e,threadId:t,threads:r,isLoading:n}){const{mutateAsync:s}=lIr(),{paths:i,navigate:o}=Lr(),a=async l=>{await s({threadId:l,agentId:e}),l===t&&o(i.agentNewThreadLink(e))};return f.jsx(b3r,{resourceId:e,resourceType:"agent",threads:r||[],isLoading:n,threadId:t,onDelete:a})}function Vxe(){const{agentId:e,threadId:t}=xu(),[r,n]=dN(),{data:s,isLoading:i}=Sy(e),{data:o}=QD(e),a=Mw(),l=r.get("new")==="true",{data:c,isLoading:u,refetch:d}=aIr({resourceId:e,agentId:e,isMemoryEnabled:!!o?.result});E.useEffect(()=>{o?.result&&!t&&a(`/agents/${e}/chat/${Go()}?new=true`)},[o?.result,t]);const p=r.get("messageId")??void 0,m=E.useMemo(()=>{if(!s)return{modelSettings:{}};const v=s.defaultOptions,{maxOutputTokens:b,...w}=v?.modelSettings??{};return{modelSettings:{...w,...b!==void 0&&{maxTokens:b},...v?.maxSteps!==void 0&&{maxSteps:v.maxSteps},...v?.providerOptions!==void 0&&{providerOptions:v.providerOptions}}}},[s]);if(i)return null;const g=()=>{r.delete("new"),n(r),d()};return f.jsx(IZe,{entityId:e,entityType:"agent",children:f.jsx(tIr,{initialPrompt:s.instructions,agentId:e,children:f.jsx(J$r,{agentId:e,defaultSettings:m,children:f.jsx(q$r,{agentId:e,threadId:t,resourceId:e,children:f.jsx(j$r,{children:f.jsx(U3r,{agentId:e,leftSlot:!!o?.result&&f.jsx(GNr,{agentId:e,threadId:t,threads:c||[],isLoading:u}),rightSlot:f.jsx(F3r,{agentId:e,threadId:t}),children:f.jsx(iIr,{agentId:e,agentName:s?.name,modelVersion:s?.modelVersion,threadId:t,memory:o?.result,refreshThreadList:g,modelList:s?.modelList,messageId:p,isNewThread:l},t)})})})})})})}const XNr=()=>{const{toolId:e,agentId:t}=xu();return f.jsxs(lo,{children:[f.jsxs(ti,{children:[f.jsxs(sp,{children:[f.jsxs(Da,{as:Br,to:"/agents",children:[f.jsx(qe,{children:f.jsx(Fo,{})}),"Agents"]}),f.jsx(Da,{as:Br,to:`/agents/${t}/chat`,children:t}),f.jsx(Da,{as:Br,to:`/tools/${t}/${e}`,isCurrent:!0,children:e})]}),f.jsx(Ma,{children:f.jsxs(Je,{as:Br,to:"https://mastra.ai/en/docs/agents/using-tools-and-mcp",target:"_blank",children:[f.jsx(qe,{children:f.jsx(Ra,{})}),"Tools documentation"]})})]}),f.jsx(T3r,{toolId:e,agentId:t})]})},YNr=()=>{const{toolId:e}=xu();return f.jsxs("div",{className:"h-full w-full overflow-y-hidden",children:[f.jsxs(ti,{children:[f.jsx(sp,{children:f.jsxs(Da,{as:Br,to:"/tools",isCurrent:!0,children:[f.jsx(qe,{children:f.jsx(Cu,{})}),"Tools"]})}),f.jsx(E0,{children:f.jsx("div",{className:"w-48",children:f.jsx(f4r,{value:e})})}),f.jsx(Ma,{children:f.jsxs(Je,{as:Br,to:"https://mastra.ai/en/docs/agents/using-tools-and-mcp",target:"_blank",children:[f.jsx(qe,{children:f.jsx(Ra,{})}),"Tools documentation"]})})]}),f.jsx(d4r,{toolId:e})]})};function JNr(){const{data:e,isLoading:t}=Y6(),r=!t&&Object.keys(e||{}).length===0;return f.jsxs(lo,{children:[f.jsxs(ti,{children:[f.jsxs(_c,{children:[f.jsx(qe,{children:f.jsx(Tu,{})}),"Workflows"]}),f.jsx(Ma,{children:f.jsxs(Je,{as:Br,to:"https://mastra.ai/en/docs/workflows/overview",target:"_blank",children:[f.jsx(qe,{children:f.jsx(Ra,{})}),"Workflows documentation"]})})]}),f.jsx(Oc,{isCentered:r,children:f.jsx(UPr,{workflows:e||{},isLoading:t})})]})}const Uxe=()=>{const{workflowId:e}=xu(),{data:t,isLoading:r}=FD(e);return f.jsx(JZe,{workflowId:e,workflow:t??void 0,isLoading:r})};function KNr({workflowName:e,workflowId:t,runId:r}){return f.jsx("div",{className:"shrink-0",children:f.jsxs(ti,{children:[f.jsx(sp,{children:f.jsxs(Da,{as:Br,to:"/workflows",isCurrent:!0,children:[f.jsx(qe,{children:f.jsx(Tu,{})}),"Workflows"]})}),f.jsxs(E0,{children:[f.jsx("div",{className:"w-48",children:f.jsx(YPr,{value:t})}),r&&f.jsxs(f.Fragment,{children:[f.jsx(j4,{}),f.jsxs(Xt,{variant:"default",children:["Run: ",r]})]}),f.jsx(j4,{}),f.jsx(Je,{as:Br,to:`/observability?entity=${e}`,children:"Traces"})]}),f.jsxs(Ma,{children:[f.jsxs(Je,{as:Br,target:"_blank",to:"/swagger-ui",children:[f.jsx(qe,{children:f.jsx(w2r,{})}),"API endpoints"]}),f.jsxs(Je,{as:Br,to:"https://mastra.ai/en/docs/workflows/overview",target:"_blank",children:[f.jsx(qe,{children:f.jsx(Ra,{})}),"Workflows documentation"]})]})]})})}const e5r=({children:e})=>{const{workflowId:t,runId:r}=xu(),{data:n,isLoading:s}=FD(t),{data:i}=MZe(t??"",r??"");if(!t)return f.jsxs(lo,{children:[f.jsx(ti,{children:f.jsx(_c,{children:f.jsx(fr,{className:"h-6 w-[200px]"})})}),f.jsx(Oc,{isCentered:!0,children:f.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:f.jsx(Ze,{variant:"ui-md",className:"text-neutral6 text-center",children:"No workflow ID provided"})})})]});if(s)return f.jsx(lo,{children:f.jsx(ti,{children:f.jsx(_c,{children:f.jsx(fr,{className:"h-6 w-[200px]"})})})});const o=i&&r?{context:{input:i?.payload,...i?.steps},status:i?.status,result:i?.result,error:i?.error,runId:r,serializedStepGraph:i?.serializedStepGraph}:void 0;return f.jsx(IZe,{entityId:t,entityType:"workflow",children:f.jsx(hte,{snapshot:o,workflowId:t,initialRunId:r,children:f.jsxs(lo,{children:[f.jsx(KNr,{workflowName:n?.name||"",workflowId:t,runId:r}),f.jsx(JPr,{workflowId:t,leftSlot:f.jsx(uNr,{workflowId:t,runId:r}),rightSlot:f.jsx(XPr,{workflowId:t,initialRunId:r}),children:e})]})})})};var Pe=typeof window<"u"?window:void 0,Io=typeof globalThis<"u"?globalThis:Pe;typeof self>"u"&&(Io.self=Io),typeof File>"u"&&(Io.File=function(){});var eHe=Array.prototype,Qxe=eHe.forEach,Zxe=eHe.indexOf,nc=Io?.navigator,wt=Io?.document,rl=Io?.location,lq=Io?.fetch,cq=Io!=null&&Io.XMLHttpRequest&&"withCredentials"in new Io.XMLHttpRequest?Io.XMLHttpRequest:void 0,qxe=Io?.AbortController,Ja=nc?.userAgent,pr=Pe??{},dh={DEBUG:!1,LIB_VERSION:"1.302.2"};function Hxe(e,t,r,n,s,i,o){try{var a=e[i](o),l=a.value}catch(c){return void r(c)}a.done?t(l):Promise.resolve(l).then(n,s)}function Wxe(e){return function(){var t=this,r=arguments;return new Promise((function(n,s){var i=e.apply(t,r);function o(l){Hxe(i,n,s,o,a,"next",l)}function a(l){Hxe(i,n,s,o,a,"throw",l)}o(void 0)}))}}function Dt(){return Dt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Dt.apply(null,arguments)}function tHe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var t5r=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],Gxe=function(e,t){if(t===void 0&&(t=[]),!e)return!1;var r=e.toLowerCase();return t5r.concat(t).some((n=>{var s=n.toLowerCase();return r.indexOf(s)!==-1}))},r5r=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"];function qr(e,t){return e.indexOf(t)!==-1}var iR=function(e){return e.trim()},uq=function(e){return e.replace(/^\$/,"")},n5r=Array.isArray,rHe=Object.prototype,nHe=rHe.hasOwnProperty,oR=rHe.toString,ss=n5r||function(e){return oR.call(e)==="[object Array]"},Dg=e=>typeof e=="function",no=e=>e===Object(e)&&!ss(e),Lx=e=>{if(no(e)){for(var t in e)if(nHe.call(e,t))return!1;return!0}return!1},bt=e=>e===void 0,Ki=e=>oR.call(e)=="[object String]",dq=e=>Ki(e)&&e.trim().length===0,lm=e=>e===null,Yn=e=>bt(e)||lm(e),ip=e=>oR.call(e)=="[object Number]",Ag=e=>oR.call(e)==="[object Boolean]",s5r=e=>e instanceof FormData,i5r=e=>qr(r5r,e);function fq(e){return e===null||typeof e!="object"}function W4(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function sHe(e){return!bt(Event)&&(function(t,r){try{return t instanceof r}catch{return!1}})(e,Event)}var o5r=[!0,"true",1,"1","yes"],Kz=e=>qr(o5r,e),a5r=[!1,"false",0,"0","no"];function If(e,t,r,n,s){return t>r&&(n.warn("min cannot be greater than max."),t=r),ip(e)?e>r?(n.warn(" cannot be greater than max: "+r+". Using max value instead."),r):e<t?(n.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(n.warn(" must be a number. using max or fallback. max: "+r+", fallback: "+s),If(s||r,t,r,n))}class l5r{constructor(t){this.t={},this.i=t.i,this.o=If(t.bucketSize,0,100,t.h),this.m=If(t.refillRate,0,this.o,t.h),this.S=If(t.refillInterval,0,864e5,t.h)}$(t,r){var n=r-t.lastAccess,s=Math.floor(n/this.S);if(s>0){var i=s*this.m;t.tokens=Math.min(t.tokens+i,this.o),t.lastAccess=t.lastAccess+s*this.S}}consumeRateLimit(t){var r,n=Date.now(),s=String(t),i=this.t[s];return i?this.$(i,n):(i={tokens:this.o,lastAccess:n},this.t[s]=i),i.tokens===0||(i.tokens--,i.tokens===0&&((r=this.i)==null||r.call(this,t)),i.tokens===0)}stop(){this.t={}}}var i$,Xxe,eB,c5r=e=>e instanceof Error;function u5r(e){var t=globalThis._posthogChunkIds;if(t){var r=Object.keys(t);return eB&&r.length===Xxe||(Xxe=r.length,eB=r.reduce(((n,s)=>{i$||(i$={});var i=i$[s];if(i)n[i[0]]=i[1];else for(var o=e(s),a=o.length-1;a>=0;a--){var l=o[a],c=l?.filename,u=t[s];if(c&&u){n[c]=u,i$[s]=[c,u];break}}return n}),{})),eB}}class d5r{constructor(t,r,n){n===void 0&&(n=[]),this.coercers=t,this.stackParser=r,this.modifiers=n}buildFromUnknown(t,r){r===void 0&&(r={});var n=r&&r.mechanism||{handled:!0,type:"generic"},s=this.buildCoercingContext(n,r,0).apply(t),i=this.buildParsingContext(),o=this.parseStacktrace(s,i);return{$exception_list:this.convertToExceptionList(o,n),$exception_level:"error"}}modifyFrames(t){var r=this;return Wxe((function*(){for(var n of t)n.stacktrace&&n.stacktrace.frames&&ss(n.stacktrace.frames)&&(n.stacktrace.frames=yield r.applyModifiers(n.stacktrace.frames));return t}))()}coerceFallback(t){var r;return{type:"Error",value:"Unknown error",stack:(r=t.syntheticException)==null?void 0:r.stack,synthetic:!0}}parseStacktrace(t,r){var n,s;return t.cause!=null&&(n=this.parseStacktrace(t.cause,r)),t.stack!=""&&t.stack!=null&&(s=this.applyChunkIds(this.stackParser(t.stack,t.synthetic?1:0),r.chunkIdMap)),Dt({},t,{cause:n,stack:s})}applyChunkIds(t,r){return t.map((n=>(n.filename&&r&&(n.chunk_id=r[n.filename]),n)))}applyCoercers(t,r){for(var n of this.coercers)if(n.match(t))return n.coerce(t,r);return this.coerceFallback(r)}applyModifiers(t){var r=this;return Wxe((function*(){var n=t;for(var s of r.modifiers)n=yield s(n);return n}))()}convertToExceptionList(t,r){var n,s,i,o={type:t.type,value:t.value,mechanism:{type:(n=r.type)!==null&&n!==void 0?n:"generic",handled:(s=r.handled)===null||s===void 0||s,synthetic:(i=t.synthetic)!==null&&i!==void 0&&i}};t.stack&&(o.stacktrace={type:"raw",frames:t.stack});var a=[o];return t.cause!=null&&a.push(...this.convertToExceptionList(t.cause,Dt({},r,{handled:!0}))),a}buildParsingContext(){return{chunkIdMap:u5r(this.stackParser)}}buildCoercingContext(t,r,n){n===void 0&&(n=0);var s=(i,o)=>{if(o<=4){var a=this.buildCoercingContext(t,r,o);return this.applyCoercers(i,a)}};return Dt({},r,{syntheticException:n==0?r.syntheticException:void 0,mechanism:t,apply:i=>s(i,n),next:i=>s(i,n+1)})}}var Dw="?";function pq(e,t,r,n,s){var i={platform:e,filename:t,function:r==="<anonymous>"?Dw:r,in_app:!0};return bt(n)||(i.lineno=n),bt(s)||(i.colno=s),i}var iHe=(e,t)=>{var r=e.indexOf("safari-extension")!==-1,n=e.indexOf("safari-web-extension")!==-1;return r||n?[e.indexOf("@")!==-1?e.split("@")[0]:Dw,r?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},f5r=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,p5r=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,h5r=/\((\S*)(?::(\d+))(?::(\d+))\)/,m5r=(e,t)=>{var r=f5r.exec(e);if(r){var[,n,s,i]=r;return pq(t,n,Dw,+s,+i)}var o=p5r.exec(e);if(o){if(o[2]&&o[2].indexOf("eval")===0){var a=h5r.exec(o[2]);a&&(o[2]=a[1],o[3]=a[2],o[4]=a[3])}var[l,c]=iHe(o[1]||Dw,o[2]);return pq(t,c,l,o[3]?+o[3]:void 0,o[4]?+o[4]:void 0)}},g5r=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,y5r=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,v5r=(e,t)=>{var r=g5r.exec(e);if(r){if(r[3]&&r[3].indexOf(" > eval")>-1){var n=y5r.exec(r[3]);n&&(r[1]=r[1]||"eval",r[3]=n[1],r[4]=n[2],r[5]="")}var s=r[3],i=r[1]||Dw;return[i,s]=iHe(i,s),pq(t,s,i,r[4]?+r[4]:void 0,r[5]?+r[5]:void 0)}},Yxe=/\(error: (.*)\)/,Jxe=50;function b5r(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return function(s,i){i===void 0&&(i=0);for(var o=[],a=s.split(`
|
|
568
568
|
`),l=i;l<a.length;l++){var c=a[l];if(!(c.length>1024)){var u=Yxe.test(c)?c.replace(Yxe,"$1"):c;if(!u.match(/\S*Error: /)){for(var d of r){var p=d(u,e);if(p){o.push(p);break}}if(o.length>=Jxe)break}}}return(function(m){if(!m.length)return[];var g=Array.from(m);return g.reverse(),g.slice(0,Jxe).map((v=>{return Dt({},v,{filename:v.filename||(b=g,b[b.length-1]||{}).filename,function:v.function||Dw});var b}))})(o)}}class x5r{match(t){return this.isDOMException(t)||this.isDOMError(t)}coerce(t,r){var n=Ki(t.stack);return{type:this.getType(t),value:this.getValue(t),stack:n?t.stack:void 0,cause:t.cause?r.next(t.cause):void 0,synthetic:!1}}getType(t){return this.isDOMError(t)?"DOMError":"DOMException"}getValue(t){var r=t.name||(this.isDOMError(t)?"DOMError":"DOMException");return t.message?r+": "+t.message:r}isDOMException(t){return W4(t,"DOMException")}isDOMError(t){return W4(t,"DOMError")}}class w5r{match(t){return(r=>r instanceof Error)(t)}coerce(t,r){return{type:this.getType(t),value:this.getMessage(t,r),stack:this.getStack(t),cause:t.cause?r.next(t.cause):void 0,synthetic:!1}}getType(t){return t.name||t.constructor.name}getMessage(t,r){var n=t.message;return n.error&&typeof n.error.message=="string"?String(n.error.message):String(n)}getStack(t){return t.stacktrace||t.stack||void 0}}class S5r{constructor(){}match(t){return W4(t,"ErrorEvent")&&t.error!=null}coerce(t,r){var n,s=r.apply(t.error);return s||{type:"ErrorEvent",value:t.message,stack:(n=r.syntheticException)==null?void 0:n.stack,synthetic:!0}}}var O5r=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class _5r{match(t){return typeof t=="string"}coerce(t,r){var n,[s,i]=this.getInfos(t);return{type:s??"Error",value:i??t,stack:(n=r.syntheticException)==null?void 0:n.stack,synthetic:!0}}getInfos(t){var r="Error",n=t,s=t.match(O5r);return s&&(r=s[1],n=s[2]),[r,n]}}var k5r=["fatal","error","warning","log","info","debug"];function oHe(e,t){t===void 0&&(t=40);var r=Object.keys(e);if(r.sort(),!r.length)return"[object has no keys]";for(var n=r.length;n>0;n--){var s=r.slice(0,n).join(", ");if(!(s.length>t))return n===r.length||s.length<=t?s:s.slice(0,t)+"..."}return""}class E5r{match(t){return typeof t=="object"&&t!==null}coerce(t,r){var n,s=this.getErrorPropertyFromObject(t);return s?r.apply(s):{type:this.getType(t),value:this.getValue(t),stack:(n=r.syntheticException)==null?void 0:n.stack,level:this.isSeverityLevel(t.level)?t.level:"error",synthetic:!0}}getType(t){return sHe(t)?t.constructor.name:"Error"}getValue(t){if("name"in t&&typeof t.name=="string"){var r="'"+t.name+"' captured as exception";return"message"in t&&typeof t.message=="string"&&(r+=" with message: '"+t.message+"'"),r}if("message"in t&&typeof t.message=="string")return t.message;var n=this.getObjectClassName(t);return(n&&n!=="Object"?"'"+n+"'":"Object")+" captured as exception with keys: "+oHe(t)}isSeverityLevel(t){return Ki(t)&&!dq(t)&&k5r.indexOf(t)>=0}getErrorPropertyFromObject(t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var n=t[r];if(c5r(n))return n}}getObjectClassName(t){try{var r=Object.getPrototypeOf(t);return r?r.constructor.name:void 0}catch{return}}}class C5r{match(t){return sHe(t)}coerce(t,r){var n,s=t.constructor.name;return{type:s,value:s+" captured as exception with keys: "+oHe(t),stack:(n=r.syntheticException)==null?void 0:n.stack,synthetic:!0}}}class T5r{match(t){return fq(t)}coerce(t,r){var n;return{type:"Error",value:"Primitive value captured as exception: "+String(t),stack:(n=r.syntheticException)==null?void 0:n.stack,synthetic:!0}}}class D5r{match(t){return W4(t,"PromiseRejectionEvent")}coerce(t,r){var n,s=this.getUnhandledRejectionReason(t);return fq(s)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(s),stack:(n=r.syntheticException)==null?void 0:n.stack,synthetic:!0}:r.apply(s)}getUnhandledRejectionReason(t){if(fq(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return t}}var aHe=function(e,t){var{debugEnabled:r}=t===void 0?{}:t,n={k:function(s){if(Pe&&(dh.DEBUG||pr.POSTHOG_DEBUG||r)&&!bt(Pe.console)&&Pe.console){for(var i=("__rrweb_original__"in Pe.console[s])?Pe.console[s].__rrweb_original__:Pe.console[s],o=arguments.length,a=new Array(o>1?o-1:0),l=1;l<o;l++)a[l-1]=arguments[l];i(e,...a)}},info:function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];n.k("log",...i)},warn:function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];n.k("warn",...i)},error:function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];n.k("error",...i)},critical:function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];console.error(e,...i)},uninitializedWarning:s=>{n.error("You must initialize PostHog before calling "+s)},createLogger:(s,i)=>aHe(e+" "+s,i)};return n},St=aHe("[PostHog.js]"),to=St.createLogger,A5r=to("[ExternalScriptsLoader]"),Kxe=(e,t,r)=>{if(e.config.disable_external_dependency_loading)return A5r.warn(t+" was requested but loading of external scripts is disabled."),r("Loading of external scripts is disabled");var n=wt?.querySelectorAll("script");if(n){for(var s,i=function(){if(n[o].src===t){var l=n[o];return l.__posthog_loading_callback_fired?{v:r()}:(l.addEventListener("load",(c=>{l.__posthog_loading_callback_fired=!0,r(void 0,c)})),l.onerror=c=>r(c),{v:void 0})}},o=0;o<n.length;o++)if(s=i())return s.v}var a=()=>{if(!wt)return r("document not found");var l=wt.createElement("script");if(l.type="text/javascript",l.crossOrigin="anonymous",l.src=t,l.onload=d=>{l.__posthog_loading_callback_fired=!0,r(void 0,d)},l.onerror=d=>r(d),e.config.prepare_external_dependency_script&&(l=e.config.prepare_external_dependency_script(l)),!l)return r("prepare_external_dependency_script returned null");var c,u=wt.querySelectorAll("body > script");u.length>0?(c=u[0].parentNode)==null||c.insertBefore(l,u[0]):wt.body.appendChild(l)};wt!=null&&wt.body?a():wt?.addEventListener("DOMContentLoaded",a)};pr.__PosthogExtensions__=pr.__PosthogExtensions__||{},pr.__PosthogExtensions__.loadExternalDependency=(e,t,r)=>{var n="/static/"+t+".js?v="+e.version;if(t==="remote-config"&&(n="/array/"+e.config.token+"/config.js"),t==="toolbar"){var s=3e5;n=n+"&t="+Math.floor(Date.now()/s)*s}var i=e.requestRouter.endpointFor("assets",n);Kxe(e,i,r)},pr.__PosthogExtensions__.loadSiteApp=(e,t,r)=>{var n=e.requestRouter.endpointFor("api",t);Kxe(e,n,r)};var G4={};function Pg(e,t,r){if(ss(e)){if(Qxe&&e.forEach===Qxe)e.forEach(t,r);else if("length"in e&&e.length===+e.length){for(var n=0,s=e.length;n<s;n++)if(n in e&&t.call(r,e[n],n)===G4)return}}}function ys(e,t,r){if(!Yn(e)){if(ss(e))return Pg(e,t,r);if(s5r(e)){for(var n of e.entries())if(t.call(r,n[1],n[0])===G4)return}else for(var s in e)if(nHe.call(e,s)&&t.call(r,e[s],s)===G4)return}}var wi=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return Pg(r,(function(s){for(var i in s)s[i]!==void 0&&(e[i]=s[i])})),e},IS=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return Pg(r,(function(s){Pg(s,(function(i){e.push(i)}))})),e};function dI(e){for(var t=Object.keys(e),r=t.length,n=new Array(r);r--;)n[r]=[t[r],e[t[r]]];return n}var e1e=function(e){try{return e()}catch{return}},P5r=function(e){return function(){try{for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.apply(this,r)}catch(s){St.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),St.critical(s)}}},$te=function(e){var t={};return ys(e,(function(r,n){(Ki(r)&&r.length>0||ip(r))&&(t[n]=r)})),t};function $5r(e,t){return r=e,n=i=>Ki(i)&&!lm(t)?i.slice(0,t):i,s=new Set,(function i(o,a){return o!==Object(o)?n?n(o,a):o:s.has(o)?void 0:(s.add(o),ss(o)?(l=[],Pg(o,(c=>{l.push(i(c))}))):(l={},ys(o,((c,u)=>{s.has(c)||(l[u]=i(c,u))}))),l);var l})(r);var r,n,s}var I5r=["herokuapp.com","vercel.app","netlify.app"];function N5r(e){var t=e?.hostname;if(!Ki(t))return!1;var r=t.split(".").slice(-2).join(".");for(var n of I5r)if(r===n)return!1;return!0}function lHe(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return e[r]}function Ni(e,t,r,n){var{capture:s=!1,passive:i=!0}=n??{};e?.addEventListener(t,r,{capture:s,passive:i})}var cHe="$people_distinct_id",q_="__alias",H_="__timers",t1e="$autocapture_disabled_server_side",hq="$heatmaps_enabled_server_side",r1e="$exception_capture_enabled_server_side",mq="$error_tracking_suppression_rules",n1e="$error_tracking_capture_extension_exceptions",s1e="$web_vitals_enabled_server_side",uHe="$dead_clicks_enabled_server_side",i1e="$web_vitals_allowed_metrics",tB="$session_recording_remote_config",X4="$sesid",dHe="$session_is_sampled",zx="$enabled_feature_flags",W_="$early_access_features",gq="$feature_flag_details",G_="$stored_person_properties",av="$stored_group_properties",yq="$surveys",o$="$surveys_activated",Y4="$flag_call_reported",fh="$user_state",vq="$client_session_props",bq="$capture_rate_limit",xq="$initial_campaign_params",wq="$initial_referrer_info",J4="$initial_person_info",K4="$epp",fHe="__POSTHOG_TOOLBAR__",v_="$posthog_cookieless",R5r=[cHe,q_,"__cmpns",H_,"$session_recording_enabled_server_side",hq,X4,zx,mq,fh,W_,gq,av,G_,yq,Y4,vq,bq,xq,wq,K4,J4];function o1e(e){return e instanceof Element&&(e.id===fHe||!(e.closest==null||!e.closest(".toolbar-global-fade-container")))}function aR(e){return!!e&&e.nodeType===1}function $g(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function pHe(e){return!!e&&e.nodeType===3}function hHe(e){return!!e&&e.nodeType===11}function Ite(e){return e?iR(e).split(/\s+/):[]}function a1e(e){var t=Pe?.location.href;return!!(t&&e&&e.some((r=>t.match(r))))}function eN(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return Ite(t)}function mHe(e){return Yn(e)?null:iR(e).split(/(\s+)/).filter((t=>uT(t))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function HD(e){var t="";return Sq(e)&&!xHe(e)&&e.childNodes&&e.childNodes.length&&ys(e.childNodes,(function(r){var n;pHe(r)&&r.textContent&&(t+=(n=mHe(r.textContent))!==null&&n!==void 0?n:"")})),iR(t)}function gHe(e){return bt(e.target)?e.srcElement||null:(t=e.target)!=null&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}var Nte=["a","button","form","input","select","textarea","label"];function yHe(e,t){if(bt(t))return!0;var r,n=function(i){if(t.some((o=>i.matches(o))))return{v:!0}};for(var s of e)if(r=n(s))return r.v;return!1}function vHe(e){var t=e.parentNode;return!(!t||!aR(t))&&t}var M5r=["next","previous","prev",">","<"],l1e=10,c1e=[".ph-no-rageclick",".ph-no-capture"];function j5r(e,t){if(!Pe||Rte(e))return!1;var r,n,s;if(Ag(t)?(r=!!t&&c1e,n=void 0):(r=(s=t?.css_selector_ignorelist)!==null&&s!==void 0?s:c1e,n=t?.content_ignorelist),r===!1)return!1;var{targetElementList:i}=bHe(e,!1);return!(function(o,a){if(o===!1||bt(o))return!1;var l;if(o===!0)l=M5r;else{if(!ss(o))return!1;if(o.length>l1e)return St.error("[PostHog] content_ignorelist array cannot exceed "+l1e+" items. Use css_selector_ignorelist for more complex matching."),!1;l=o.map((c=>c.toLowerCase()))}return a.some((c=>{var{safeText:u,ariaLabel:d}=c;return l.some((p=>u.includes(p)||d.includes(p)))}))})(n,i.map((o=>{var a;return{safeText:HD(o).toLowerCase(),ariaLabel:((a=o.getAttribute("aria-label"))==null?void 0:a.toLowerCase().trim())||""}})))&&!yHe(i,r)}var Rte=e=>!e||$g(e,"html")||!aR(e),bHe=(e,t)=>{if(!Pe||Rte(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var r=!1,n=[e],s=e;s.parentNode&&!$g(s,"body");)if(hHe(s.parentNode))n.push(s.parentNode.host),s=s.parentNode.host;else{var i=vHe(s);if(!i)break;if(t||Nte.indexOf(i.tagName.toLowerCase())>-1)r=!0;else{var o=Pe.getComputedStyle(i);o&&o.getPropertyValue("cursor")==="pointer"&&(r=!0)}n.push(i),s=i}return{parentIsUsefulElement:r,targetElementList:n}};function F5r(e,t,r,n,s){var i,o,a,l;if(r===void 0&&(r=void 0),!Pe||Rte(e)||(i=r)!=null&&i.url_allowlist&&!a1e(r.url_allowlist)||(o=r)!=null&&o.url_ignorelist&&a1e(r.url_ignorelist))return!1;if((a=r)!=null&&a.dom_event_allowlist){var c=r.dom_event_allowlist;if(c&&!c.some((g=>t.type===g)))return!1}var{parentIsUsefulElement:u,targetElementList:d}=bHe(e,n);if(!(function(g,v){var b=v?.element_allowlist;if(bt(b))return!0;var w,S=function(k){if(b.some((C=>k.tagName.toLowerCase()===C)))return{v:!0}};for(var O of g)if(w=S(O))return w.v;return!1})(d,r)||!yHe(d,(l=r)==null?void 0:l.css_selector_allowlist))return!1;var p=Pe.getComputedStyle(e);if(p&&p.getPropertyValue("cursor")==="pointer"&&t.type==="click")return!0;var m=e.tagName.toLowerCase();switch(m){case"html":return!1;case"form":return(s||["submit"]).indexOf(t.type)>=0;case"input":case"select":case"textarea":return(s||["change","click"]).indexOf(t.type)>=0;default:return u?(s||["click"]).indexOf(t.type)>=0:(s||["click"]).indexOf(t.type)>=0&&(Nte.indexOf(m)>-1||e.getAttribute("contenteditable")==="true")}}function Sq(e){for(var t=e;t.parentNode&&!$g(t,"body");t=t.parentNode){var r=eN(t);if(qr(r,"ph-sensitive")||qr(r,"ph-no-capture"))return!1}if(qr(eN(e),"ph-include"))return!0;var n=e.type||"";if(Ki(n))switch(n.toLowerCase()){case"hidden":case"password":return!1}var s=e.name||e.id||"";return!(Ki(s)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(s.replace(/[^a-zA-Z0-9]/g,"")))}function xHe(e){return!!($g(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||$g(e,"select")||$g(e,"textarea")||e.getAttribute("contenteditable")==="true")}var wHe="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",L5r=new RegExp("^(?:"+wHe+")$"),z5r=new RegExp(wHe),SHe="\\d{3}-?\\d{2}-?\\d{4}",B5r=new RegExp("^("+SHe+")$"),V5r=new RegExp("("+SHe+")");function uT(e,t){return t===void 0&&(t=!0),!(Yn(e)||Ki(e)&&(e=iR(e),(t?L5r:z5r).test((e||"").replace(/[- ]/g,""))||(t?B5r:V5r).test(e)))}function OHe(e){var t=HD(e);return uT(t=(t+" "+_He(e)).trim())?t:""}function _He(e){var t="";return e&&e.childNodes&&e.childNodes.length&&ys(e.childNodes,(function(r){var n;if(r&&((n=r.tagName)==null?void 0:n.toLowerCase())==="span")try{var s=HD(r);t=(t+" "+s).trim(),r.childNodes&&r.childNodes.length&&(t=(t+" "+_He(r)).trim())}catch(i){St.error("[AutoCapture]",i)}})),t}function U5r(e){return(function(t){var r=t.map((n=>{var s,i,o="";if(n.tag_name&&(o+=n.tag_name),n.attr_class)for(var a of(n.attr_class.sort(),n.attr_class))o+="."+a.replace(/"/g,"");var l=Dt({},n.text?{text:n.text}:{},{"nth-child":(s=n.nth_child)!==null&&s!==void 0?s:0,"nth-of-type":(i=n.nth_of_type)!==null&&i!==void 0?i:0},n.href?{href:n.href}:{},n.attr_id?{attr_id:n.attr_id}:{},n.attributes),c={};return dI(l).sort(((u,d)=>{var[p]=u,[m]=d;return p.localeCompare(m)})).forEach((u=>{var[d,p]=u;return c[u1e(d.toString())]=u1e(p.toString())})),o+=":",o+=dI(c).map((u=>{var[d,p]=u;return d+'="'+p+'"'})).join("")}));return r.join(";")})((function(t){return t.map((r=>{var n,s,i={text:(n=r.$el_text)==null?void 0:n.slice(0,400),tag_name:r.tag_name,href:(s=r.attr__href)==null?void 0:s.slice(0,2048),attr_class:Q5r(r),attr_id:r.attr__id,nth_child:r.nth_child,nth_of_type:r.nth_of_type,attributes:{}};return dI(r).filter((o=>{var[a]=o;return a.indexOf("attr__")===0})).forEach((o=>{var[a,l]=o;return i.attributes[a]=l})),i}))})(e))}function u1e(e){return e.replace(/"|\\"/g,'\\"')}function Q5r(e){var t=e.attr__class;return t?ss(t)?t:Ite(t):void 0}class kHe{constructor(t){this.disabled=t===!1;var r=no(t)?t:{};this.thresholdPx=r.threshold_px||30,this.timeoutMs=r.timeout_ms||1e3,this.clickCount=r.click_count||3,this.clicks=[]}isRageClick(t,r,n){if(this.disabled)return!1;var s=this.clicks[this.clicks.length-1];if(s&&Math.abs(t-s.x)+Math.abs(r-s.y)<this.thresholdPx&&n-s.timestamp<this.timeoutMs){if(this.clicks.push({x:t,y:r,timestamp:n}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:t,y:r,timestamp:n}];return!1}}var rB="$copy_autocapture",bh=(function(e){return e.GZipJS="gzip-js",e.Base64="base64",e})({}),tN=e=>{var t=wt?.createElement("a");return bt(t)?null:(t.href=e,t)},Z5r=function(e,t){var r,n;t===void 0&&(t="&");var s=[];return ys(e,(function(i,o){bt(i)||bt(o)||o==="undefined"||(r=encodeURIComponent((a=>a instanceof File)(i)?i.name:i.toString()),n=encodeURIComponent(o),s[s.length]=n+"="+r)})),s.join(t)},rN=function(e,t){for(var r,n=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),s=0;s<n.length;s++){var i=n[s].split("=");if(i[0]===t){r=i;break}}if(!ss(r)||r.length<2)return"";var o=r[1];try{o=decodeURIComponent(o)}catch{St.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},WD=function(e,t,r){if(!e||!t||!t.length)return e;for(var n=e.split("#"),s=n[0]||"",i=n[1],o=s.split("?"),a=o[1],l=o[0],c=(a||"").split("&"),u=[],d=0;d<c.length;d++){var p=c[d].split("=");ss(p)&&(t.includes(p[0])?u.push(p[0]+"="+r):u.push(c[d]))}var m=l;return a!=null&&(m+="?"+u.join("&")),i!=null&&(m+="#"+i),m},nN=function(e,t){var r=e.match(new RegExp(t+"=([^&]*)"));return r?r[1]:null},d1e=to("[AutoCapture]");function nB(e,t){return t.length>e?t.slice(0,e)+"...":t}function q5r(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!aR(t));return t}function H5r(e,t,r,n){var s=e.tagName.toLowerCase(),i={tag_name:s};Nte.indexOf(s)>-1&&!r&&(s.toLowerCase()==="a"||s.toLowerCase()==="button"?i.$el_text=nB(1024,OHe(e)):i.$el_text=nB(1024,HD(e)));var o=eN(e);o.length>0&&(i.classes=o.filter((function(u){return u!==""}))),ys(e.attributes,(function(u){var d;if((!xHe(e)||["name","id","class","aria-label"].indexOf(u.name)!==-1)&&(n==null||!n.includes(u.name))&&!t&&uT(u.value)&&(d=u.name,!Ki(d)||d.substring(0,10)!=="_ngcontent"&&d.substring(0,7)!=="_nghost")){var p=u.value;u.name==="class"&&(p=Ite(p).join(" ")),i["attr__"+u.name]=nB(1024,p)}}));for(var a=1,l=1,c=e;c=q5r(c);)a++,c.tagName===e.tagName&&l++;return i.nth_child=a,i.nth_of_type=l,i}function W5r(e,t){for(var r,n,{e:s,maskAllElementAttributes:i,maskAllText:o,elementAttributeIgnoreList:a,elementsChainAsString:l}=t,c=[e],u=e;u.parentNode&&!$g(u,"body");)hHe(u.parentNode)?(c.push(u.parentNode.host),u=u.parentNode.host):(c.push(u.parentNode),u=u.parentNode);var d,p=[],m={},g=!1,v=!1;if(ys(c,(k=>{var C=Sq(k);k.tagName.toLowerCase()==="a"&&(g=k.getAttribute("href"),g=C&&g&&uT(g)&&g),qr(eN(k),"ph-no-capture")&&(v=!0),p.push(H5r(k,i,o,a));var T=(function(P){if(!Sq(P))return{};var A={};return ys(P.attributes,(function(R){if(R.name&&R.name.indexOf("data-ph-capture-attribute")===0){var M=R.name.replace("data-ph-capture-attribute-",""),z=R.value;M&&z&&uT(z)&&(A[M]=z)}})),A})(k);wi(m,T)})),v)return{props:{},explicitNoCapture:v};if(o||(e.tagName.toLowerCase()==="a"||e.tagName.toLowerCase()==="button"?p[0].$el_text=OHe(e):p[0].$el_text=HD(e)),g){var b,w;p[0].attr__href=g;var S=(b=tN(g))==null?void 0:b.host,O=Pe==null||(w=Pe.location)==null?void 0:w.host;S&&O&&S!==O&&(d=g)}return{props:wi({$event_type:s.type,$ce_version:1},l?{}:{$elements:p},{$elements_chain:U5r(p)},(r=p[0])!=null&&r.$el_text?{$el_text:(n=p[0])==null?void 0:n.$el_text}:{},d&&s.type==="click"?{$external_click_url:d}:{},m)}}class G5r{constructor(t){this.P=!1,this.T=null,this.R=!1,this.instance=t,this.rageclicks=new kHe(t.config.rageclick),this.I=null}get F(){var t,r,n=no(this.instance.config.autocapture)?this.instance.config.autocapture:{};return n.url_allowlist=(t=n.url_allowlist)==null?void 0:t.map((s=>new RegExp(s))),n.url_ignorelist=(r=n.url_ignorelist)==null?void 0:r.map((s=>new RegExp(s))),n}C(){if(this.isBrowserSupported()){if(Pe&&wt){var t=n=>{n=n||Pe?.event;try{this.M(n)}catch(s){d1e.error("Failed to capture event",s)}};if(Ni(wt,"submit",t,{capture:!0}),Ni(wt,"change",t,{capture:!0}),Ni(wt,"click",t,{capture:!0}),this.F.capture_copied_text){var r=n=>{n=n||Pe?.event,this.M(n,rB)};Ni(wt,"copy",r,{capture:!0}),Ni(wt,"cut",r,{capture:!0})}}}else d1e.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.P&&(this.C(),this.P=!0)}onRemoteConfig(t){t.elementsChainAsString&&(this.R=t.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[t1e]:!!t.autocapture_opt_out}),this.T=!!t.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(t){this.I=t}getElementSelectors(t){var r,n=[];return(r=this.I)==null||r.forEach((s=>{var i=wt?.querySelectorAll(s);i?.forEach((o=>{t===o&&n.push(s)}))})),n}get isEnabled(){var t,r,n=(t=this.instance.persistence)==null?void 0:t.props[t1e],s=this.T;if(lm(s)&&!Ag(n)&&!this.instance.O())return!1;var i=(r=this.T)!==null&&r!==void 0?r:!!n;return!!this.instance.config.autocapture&&!i}M(t,r){if(r===void 0&&(r="$autocapture"),this.isEnabled){var n,s=gHe(t);pHe(s)&&(s=s.parentNode||null),r==="$autocapture"&&t.type==="click"&&t instanceof MouseEvent&&this.instance.config.rageclick&&(n=this.rageclicks)!=null&&n.isRageClick(t.clientX,t.clientY,t.timeStamp||new Date().getTime())&&j5r(s,this.instance.config.rageclick)&&this.M(t,"$rageclick");var i=r===rB;if(s&&F5r(s,t,this.F,i,i?["copy","cut"]:void 0)){var{props:o,explicitNoCapture:a}=W5r(s,{e:t,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.F.element_attribute_ignorelist,elementsChainAsString:this.R});if(a)return!1;var l=this.getElementSelectors(s);if(l&&l.length>0&&(o.$element_selectors=l),r===rB){var c,u=mHe(Pe==null||(c=Pe.getSelection())==null?void 0:c.toString()),d=t.type||"clipboard";if(!u)return!1;o.$selected_content=u,o.$copy_type=d}return this.instance.capture(r,o),!0}}}isBrowserSupported(){return Dg(wt?.querySelectorAll)}}Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return ip(e)&&isFinite(e)&&Math.floor(e)===e});var f1e="0123456789abcdef";class sN{constructor(t){if(this.bytes=t,t.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(t,r,n,s){if(!Number.isInteger(t)||!Number.isInteger(r)||!Number.isInteger(n)||!Number.isInteger(s)||t<0||r<0||n<0||s<0||t>0xffffffffffff||r>4095||n>1073741823||s>4294967295)throw new RangeError("invalid field value");var i=new Uint8Array(16);return i[0]=t/Math.pow(2,40),i[1]=t/Math.pow(2,32),i[2]=t/Math.pow(2,24),i[3]=t/Math.pow(2,16),i[4]=t/Math.pow(2,8),i[5]=t,i[6]=112|r>>>8,i[7]=r,i[8]=128|n>>>24,i[9]=n>>>16,i[10]=n>>>8,i[11]=n,i[12]=s>>>24,i[13]=s>>>16,i[14]=s>>>8,i[15]=s,new sN(i)}toString(){for(var t="",r=0;r<this.bytes.length;r++)t=t+f1e.charAt(this.bytes[r]>>>4)+f1e.charAt(15&this.bytes[r]),r!==3&&r!==5&&r!==7&&r!==9||(t+="-");if(t.length!==36)throw new Error("Invalid UUIDv7 was generated");return t}clone(){return new sN(this.bytes.slice(0))}equals(t){return this.compareTo(t)===0}compareTo(t){for(var r=0;r<16;r++){var n=this.bytes[r]-t.bytes[r];if(n!==0)return Math.sign(n)}return 0}}class X5r{constructor(){this.A=0,this.D=0,this.j=new Y5r}generate(){var t=this.generateOrAbort();if(bt(t)){this.A=0;var r=this.generateOrAbort();if(bt(r))throw new Error("Could not generate UUID after timestamp reset");return r}return t}generateOrAbort(){var t=Date.now();if(t>this.A)this.A=t,this.L();else{if(!(t+1e4>this.A))return;this.D++,this.D>4398046511103&&(this.A++,this.L())}return sN.fromFieldsV7(this.A,Math.trunc(this.D/Math.pow(2,30)),this.D&Math.pow(2,30)-1,this.j.nextUint32())}L(){this.D=1024*this.j.nextUint32()+(1023&this.j.nextUint32())}}var p1e,EHe=e=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;t<e.length;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};Pe&&!bt(Pe.crypto)&&crypto.getRandomValues&&(EHe=e=>crypto.getRandomValues(e));class Y5r{constructor(){this.N=new Uint32Array(8),this.U=1/0}nextUint32(){return this.U>=this.N.length&&(EHe(this.N),this.U=0),this.N[this.U++]}}var gg=()=>J5r().toString(),J5r=()=>(p1e||(p1e=new X5r)).generate(),b_="",K5r=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;function e6r(e,t){if(t){var r=(function(s,i){if(i===void 0&&(i=wt),b_)return b_;if(!i||["localhost","127.0.0.1"].includes(s))return"";for(var o=s.split("."),a=Math.min(o.length,8),l="dmn_chk_"+gg();!b_&&a--;){var c=o.slice(a).join("."),u=l+"=1;domain=."+c+";path=/";i.cookie=u+";max-age=3",i.cookie.includes(l)&&(i.cookie=u+";max-age=0",b_=c)}return b_})(e);if(!r){var n=(s=>{var i=s.match(K5r);return i?i[0]:""})(e);n!==r&&St.info("Warning: cookie subdomain discovery mismatch",n,r),r=n}return r?"; domain=."+r:""}return""}var Qf={H:()=>!!wt,B:function(e){St.error("cookieStore error: "+e)},q:function(e){if(wt){try{for(var t=e+"=",r=wt.cookie.split(";").filter((i=>i.length)),n=0;n<r.length;n++){for(var s=r[n];s.charAt(0)==" ";)s=s.substring(1,s.length);if(s.indexOf(t)===0)return decodeURIComponent(s.substring(t.length,s.length))}}catch{}return null}},W:function(e){var t;try{t=JSON.parse(Qf.q(e))||{}}catch{}return t},G:function(e,t,r,n,s){if(wt)try{var i="",o="",a=e6r(wt.location.hostname,n);if(r){var l=new Date;l.setTime(l.getTime()+24*r*60*60*1e3),i="; expires="+l.toUTCString()}s&&(o="; secure");var c=e+"="+encodeURIComponent(JSON.stringify(t))+i+"; SameSite=Lax; path=/"+a+o;return c.length>3686.4&&St.warn("cookieStore warning: large cookie, len="+c.length),wt.cookie=c,c}catch{return}},V:function(e,t){if(wt!=null&&wt.cookie)try{Qf.G(e,"",-1,t)}catch{return}}},sB=null,Ys={H:function(){if(!lm(sB))return sB;var e=!0;if(bt(Pe))e=!1;else try{var t="__mplssupport__";Ys.G(t,"xyz"),Ys.q(t)!=='"xyz"'&&(e=!1),Ys.V(t)}catch{e=!1}return e||St.error("localStorage unsupported; falling back to cookie store"),sB=e,e},B:function(e){St.error("localStorage error: "+e)},q:function(e){try{return Pe?.localStorage.getItem(e)}catch(t){Ys.B(t)}return null},W:function(e){try{return JSON.parse(Ys.q(e))||{}}catch{}return null},G:function(e,t){try{Pe?.localStorage.setItem(e,JSON.stringify(t))}catch(r){Ys.B(r)}},V:function(e){try{Pe?.localStorage.removeItem(e)}catch(t){Ys.B(t)}}},t6r=["distinct_id",X4,dHe,K4,J4],a$=Dt({},Ys,{W:function(e){try{var t={};try{t=Qf.W(e)||{}}catch{}var r=wi(t,JSON.parse(Ys.q(e)||"{}"));return Ys.G(e,r),r}catch{}return null},G:function(e,t,r,n,s,i){try{Ys.G(e,t,void 0,void 0,i);var o={};t6r.forEach((a=>{t[a]&&(o[a]=t[a])})),Object.keys(o).length&&Qf.G(e,o,r,n,s,i)}catch(a){Ys.B(a)}},V:function(e,t){try{Pe?.localStorage.removeItem(e),Qf.V(e,t)}catch(r){Ys.B(r)}}}),l$={},r6r={H:function(){return!0},B:function(e){St.error("memoryStorage error: "+e)},q:function(e){return l$[e]||null},W:function(e){return l$[e]||null},G:function(e,t){l$[e]=t},V:function(e){delete l$[e]}},Ky=null,Co={H:function(){if(!lm(Ky))return Ky;if(Ky=!0,bt(Pe))Ky=!1;else try{var e="__support__";Co.G(e,"xyz"),Co.q(e)!=='"xyz"'&&(Ky=!1),Co.V(e)}catch{Ky=!1}return Ky},B:function(e){St.error("sessionStorage error: ",e)},q:function(e){try{return Pe?.sessionStorage.getItem(e)}catch(t){Co.B(t)}return null},W:function(e){try{return JSON.parse(Co.q(e))||null}catch{}return null},G:function(e,t){try{Pe?.sessionStorage.setItem(e,JSON.stringify(t))}catch(r){Co.B(r)}},V:function(e){try{Pe?.sessionStorage.removeItem(e)}catch(t){Co.B(t)}}},ph=(function(e){return e[e.PENDING=-1]="PENDING",e[e.DENIED=0]="DENIED",e[e.GRANTED=1]="GRANTED",e})({});class n6r{constructor(t){this._instance=t}get F(){return this._instance.config}get consent(){return this.J()?ph.DENIED:this.K}isOptedOut(){return this.F.cookieless_mode==="always"||this.consent===ph.DENIED||this.consent===ph.PENDING&&(this.F.opt_out_capturing_by_default||this.F.cookieless_mode==="on_reject")}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===ph.DENIED}optInOut(t){this.Y.G(this.X,t?1:0,this.F.cookie_expiration,this.F.cross_subdomain_cookie,this.F.secure_cookie)}reset(){this.Y.V(this.X,this.F.cross_subdomain_cookie)}get X(){var{token:t,opt_out_capturing_cookie_prefix:r,consent_persistence_name:n}=this._instance.config;return n||(r?r+t:"__ph_opt_in_out_"+t)}get K(){var t=this.Y.q(this.X);return Kz(t)?ph.GRANTED:qr(a5r,t)?ph.DENIED:ph.PENDING}get Y(){if(!this.Z){var t=this.F.opt_out_capturing_persistence_type;this.Z=t==="localStorage"?Ys:Qf;var r=t==="localStorage"?Qf:Ys;r.q(this.X)&&(this.Z.q(this.X)||this.optInOut(Kz(r.q(this.X))),r.V(this.X,this.F.cross_subdomain_cookie))}return this.Z}J(){return!!this.F.respect_dnt&&!!lHe([nc?.doNotTrack,nc?.msDoNotTrack,pr.doNotTrack],(t=>Kz(t)))}}var c$=to("[Dead Clicks]"),s6r=()=>!0,i6r=e=>{var t,r=!((t=e.instance.persistence)==null||!t.get_property(uHe)),n=e.instance.config.capture_dead_clicks;return Ag(n)?n:!!no(n)||r};class CHe{get lazyLoadedDeadClicksAutocapture(){return this.tt}constructor(t,r,n){this.instance=t,this.isEnabled=r,this.onCapture=n,this.startIfEnabled()}onRemoteConfig(t){this.instance.persistence&&this.instance.persistence.register({[uHe]:t?.captureDeadClicks}),this.startIfEnabled()}startIfEnabled(){this.isEnabled(this)&&this.it((()=>{this.et()}))}it(t){var r,n;(r=pr.__PosthogExtensions__)!=null&&r.initDeadClicksAutocapture&&t(),(n=pr.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this.instance,"dead-clicks-autocapture",(s=>{s?c$.error("failed to load script",s):t()}))}et(){var t;if(wt){if(!this.tt&&(t=pr.__PosthogExtensions__)!=null&&t.initDeadClicksAutocapture){var r=no(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};r.__onCapture=this.onCapture,this.tt=pr.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,r),this.tt.start(wt),c$.info("starting...")}}else c$.error("`document` not found. Cannot start.")}stop(){this.tt&&(this.tt.stop(),this.tt=void 0,c$.info("stopping..."))}}var x_=to("[ExceptionAutocapture]");class o6r{constructor(t){var r,n,s;this.rt=()=>{var i;if(Pe&&this.isEnabled&&(i=pr.__PosthogExtensions__)!=null&&i.errorWrappingFunctions){var o=pr.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,a=pr.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,l=pr.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.st&&this.F.capture_unhandled_errors&&(this.st=o(this.captureException.bind(this))),!this.nt&&this.F.capture_unhandled_rejections&&(this.nt=a(this.captureException.bind(this))),!this.ot&&this.F.capture_console_errors&&(this.ot=l(this.captureException.bind(this)))}catch(c){x_.error("failed to start",c),this.lt()}}},this._instance=t,this.ut=!((r=this._instance.persistence)==null||!r.props[r1e]),this.F=this.ht(),this.vt=new l5r({refillRate:(n=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&n!==void 0?n:1,bucketSize:(s=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&s!==void 0?s:10,refillInterval:1e4,h:x_}),this.startIfEnabled()}ht(){var t=this._instance.config.capture_exceptions,r={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return no(t)?r=Dt({},r,t):(bt(t)?this.ut:t)&&(r=Dt({},r,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),r}get isEnabled(){return this.F.capture_console_errors||this.F.capture_unhandled_errors||this.F.capture_unhandled_rejections}startIfEnabled(){this.isEnabled&&(x_.info("enabled"),this.it(this.rt))}it(t){var r,n;(r=pr.__PosthogExtensions__)!=null&&r.errorWrappingFunctions&&t(),(n=pr.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"exception-autocapture",(s=>{if(s)return x_.error("failed to load script",s);t()}))}lt(){var t,r,n;(t=this.st)==null||t.call(this),this.st=void 0,(r=this.nt)==null||r.call(this),this.nt=void 0,(n=this.ot)==null||n.call(this),this.ot=void 0}onRemoteConfig(t){var r=t.autocaptureExceptions;this.ut=!!r||!1,this.F=this.ht(),this._instance.persistence&&this._instance.persistence.register({[r1e]:this.ut}),this.startIfEnabled()}captureException(t){var r,n,s=(r=t==null||(n=t.$exception_list)==null||(n=n[0])==null?void 0:n.type)!==null&&r!==void 0?r:"Exception";this.vt.consumeRateLimit(s)?x_.info("Skipping exception capture because of client rate limiting.",{exception:s}):this._instance.exceptions.sendExceptionEvent(t)}}function h1e(e,t,r){try{if(!(t in e))return()=>{};var n=e[t],s=r(n);return Dg(s)&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=s,()=>{e[t]=n}}catch{return()=>{}}}class a6r{constructor(t){var r;this._instance=t,this.dt=(Pe==null||(r=Pe.location)==null?void 0:r.pathname)||""}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(St.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.ct&&this.ct(),this.ct=void 0,St.info("History API monitoring stopped")}monitorHistoryChanges(){var t,r;if(Pe&&Pe.history){var n=this;(t=Pe.history.pushState)!=null&&t.__posthog_wrapped__||h1e(Pe.history,"pushState",(s=>function(i,o,a){s.call(this,i,o,a),n.ft("pushState")})),(r=Pe.history.replaceState)!=null&&r.__posthog_wrapped__||h1e(Pe.history,"replaceState",(s=>function(i,o,a){s.call(this,i,o,a),n.ft("replaceState")})),this.gt()}}ft(t){try{var r,n=Pe==null||(r=Pe.location)==null?void 0:r.pathname;if(!n)return;n!==this.dt&&this.isEnabled&&this._instance.capture("$pageview",{navigation_type:t}),this.dt=n}catch(s){St.error("Error capturing "+t+" pageview",s)}}gt(){if(!this.ct){var t=()=>{this.ft("popstate")};Ni(Pe,"popstate",t),this.ct=()=>{Pe&&Pe.removeEventListener("popstate",t)}}}}var iB=to("[SegmentIntegration]");function l6r(e,t){var r=e.config.segment;if(!r)return t();(function(n,s){var i=n.config.segment;if(!i)return s();var o=l=>{var c=()=>l.anonymousId()||gg();n.config.get_device_id=c,l.id()&&(n.register({distinct_id:l.id(),$device_id:c()}),n.persistence.set_property(fh,"identified")),s()},a=i.user();"then"in a&&Dg(a.then)?a.then((l=>o(l))):o(a)})(e,(()=>{r.register((n=>{Promise&&Promise.resolve||iB.warn("This browser does not have Promise support, and can not use the segment integration");var s=(i,o)=>{if(!o)return i;i.event.userId||i.event.anonymousId===n.get_distinct_id()||(iB.info("No userId set, resetting PostHog"),n.reset()),i.event.userId&&i.event.userId!==n.get_distinct_id()&&(iB.info("UserId set, identifying with PostHog"),n.identify(i.event.userId));var a=n.calculateEventProperties(o,i.event.properties);return i.event.properties=Object.assign({},a,i.event.properties),i};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:i=>s(i,i.event.event),page:i=>s(i,"$pageview"),identify:i=>s(i,"$identify"),screen:i=>s(i,"$screen")}})(e)).then((()=>{t()}))}))}var THe="posthog-js";function DHe(e,t){var{organization:r,projectId:n,prefix:s,severityAllowList:i=["error"],sendExceptionsToPostHog:o=!0}=t===void 0?{}:t;return a=>{var l,c,u,d,p;if(!(i==="*"||i.includes(a.level))||!e.__loaded)return a;a.tags||(a.tags={});var m=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());a.tags["PostHog Person URL"]=m,e.sessionRecordingStarted()&&(a.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var g=((l=a.exception)==null?void 0:l.values)||[],v=g.map((w=>Dt({},w,{stacktrace:w.stacktrace?Dt({},w.stacktrace,{type:"raw",frames:(w.stacktrace.frames||[]).map((S=>Dt({},S,{platform:"web:javascript"})))}):void 0}))),b={$exception_message:((c=g[0])==null?void 0:c.value)||a.message,$exception_type:(u=g[0])==null?void 0:u.type,$exception_level:a.level,$exception_list:v,$sentry_event_id:a.event_id,$sentry_exception:a.exception,$sentry_exception_message:((d=g[0])==null?void 0:d.value)||a.message,$sentry_exception_type:(p=g[0])==null?void 0:p.type,$sentry_tags:a.tags};return r&&n&&(b.$sentry_url=(s||"https://sentry.io/organizations/")+r+"/issues/?project="+n+"&query="+a.event_id),o&&e.exceptions.sendExceptionEvent(b),a}}class c6r{constructor(t,r,n,s,i,o){this.name=THe,this.setupOnce=function(a){a(DHe(t,{organization:r,projectId:n,prefix:s,severityAllowList:i,sendExceptionsToPostHog:o==null||o}))}}}var u6r=Pe!=null&&Pe.location?nN(Pe.location.hash,"__posthog")||nN(location.hash,"state"):null,m1e="_postHogToolbarParams",g1e=to("[Toolbar]"),tg=(function(e){return e[e.UNINITIALIZED=0]="UNINITIALIZED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED",e})(tg||{});class d6r{constructor(t){this.instance=t}_t(t){pr.ph_toolbar_state=t}yt(){var t;return(t=pr.ph_toolbar_state)!==null&&t!==void 0?t:tg.UNINITIALIZED}maybeLoadToolbar(t,r,n){if(t===void 0&&(t=void 0),r===void 0&&(r=void 0),n===void 0&&(n=void 0),!Pe||!wt)return!1;t=t??Pe.location,n=n??Pe.history;try{if(!r){try{Pe.localStorage.setItem("test","test"),Pe.localStorage.removeItem("test")}catch{return!1}r=Pe?.localStorage}var s,i=u6r||nN(t.hash,"__posthog")||nN(t.hash,"state"),o=i?e1e((()=>JSON.parse(atob(decodeURIComponent(i)))))||e1e((()=>JSON.parse(decodeURIComponent(i)))):null;return o&&o.action==="ph_authorize"?((s=o).source="url",s&&Object.keys(s).length>0&&(o.desiredHash?t.hash=o.desiredHash:n?n.replaceState(n.state,"",t.pathname+t.search):t.hash="")):((s=JSON.parse(r.getItem(m1e)||"{}")).source="localstorage",delete s.userIntent),!(!s.token||this.instance.config.token!==s.token)&&(this.loadToolbar(s),!0)}catch{return!1}}bt(t){var r=pr.ph_load_toolbar||pr.ph_load_editor;!Yn(r)&&Dg(r)?r(t,this.instance):g1e.warn("No toolbar load function found")}loadToolbar(t){var r=!(wt==null||!wt.getElementById(fHe));if(!Pe||r)return!1;var n=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,s=Dt({token:this.instance.config.token},t,{apiURL:this.instance.requestRouter.endpointFor("ui")},n?{instrument:!1}:{});if(Pe.localStorage.setItem(m1e,JSON.stringify(Dt({},s,{source:void 0}))),this.yt()===tg.LOADED)this.bt(s);else if(this.yt()===tg.UNINITIALIZED){var i;this._t(tg.LOADING),(i=pr.__PosthogExtensions__)==null||i.loadExternalDependency==null||i.loadExternalDependency(this.instance,"toolbar",(o=>{if(o)return g1e.error("[Toolbar] Failed to load",o),void this._t(tg.UNINITIALIZED);this._t(tg.LOADED),this.bt(s)})),Ni(Pe,"turbolinks:load",(()=>{this._t(tg.UNINITIALIZED),this.loadToolbar(s)}))}return!0}wt(t){return this.loadToolbar(t)}maybeLoadEditor(t,r,n){return t===void 0&&(t=void 0),r===void 0&&(r=void 0),n===void 0&&(n=void 0),this.maybeLoadToolbar(t,r,n)}}var f6r=to("[TracingHeaders]");class p6r{constructor(t){this.xt=void 0,this.St=void 0,this.rt=()=>{var r,n;bt(this.xt)&&((r=pr.__PosthogExtensions__)==null||(r=r.tracingHeadersPatchFns)==null||r._patchXHR(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager)),bt(this.St)&&((n=pr.__PosthogExtensions__)==null||(n=n.tracingHeadersPatchFns)==null||n._patchFetch(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=t}it(t){var r,n;(r=pr.__PosthogExtensions__)!=null&&r.tracingHeadersPatchFns&&t(),(n=pr.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"tracing-headers",(s=>{if(s)return f6r.error("failed to load script",s);t()}))}startIfEnabledOrStop(){var t,r;this._instance.config.__add_tracing_headers?this.it(this.rt):((t=this.xt)==null||t.call(this),(r=this.St)==null||r.call(this),this.xt=void 0,this.St=void 0)}}var iu="Mobile",iN="iOS",Nf="Android",dT="Tablet",AHe=Nf+" "+dT,PHe="iPad",$He="Apple",IHe=$He+" Watch",fT="Safari",Aw="BlackBerry",NHe="Samsung",RHe=NHe+"Browser",MHe=NHe+" Internet",C0="Chrome",h6r=C0+" OS",jHe=C0+" "+iN,Mte="Internet Explorer",FHe=Mte+" "+iu,jte="Opera",m6r=jte+" Mini",Fte="Edge",LHe="Microsoft "+Fte,d1="Firefox",zHe=d1+" "+iN,pT="Nintendo",hT="PlayStation",f1="Xbox",BHe=Nf+" "+iu,VHe=iu+" "+fT,X_="Windows",Oq=X_+" Phone",y1e="Nokia",_q="Ouya",UHe="Generic",g6r=UHe+" "+iu.toLowerCase(),QHe=UHe+" "+dT.toLowerCase(),kq="Konqueror",ma="(\\d+(\\.\\d+)?)",oB=new RegExp("Version/"+ma),y6r=new RegExp(f1,"i"),v6r=new RegExp(hT+" \\w+","i"),b6r=new RegExp(pT+" \\w+","i"),Lte=new RegExp(Aw+"|PlayBook|BB10","i"),x6r={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},w6r=(e,t)=>t&&qr(t,$He)||(function(r){return qr(r,fT)&&!qr(r,C0)&&!qr(r,Nf)})(e),ZHe=function(e,t){return t=t||"",qr(e," OPR/")&&qr(e,"Mini")?m6r:qr(e," OPR/")?jte:Lte.test(e)?Aw:qr(e,"IE"+iu)||qr(e,"WPDesktop")?FHe:qr(e,RHe)?MHe:qr(e,Fte)||qr(e,"Edg/")?LHe:qr(e,"FBIOS")?"Facebook "+iu:qr(e,"UCWEB")||qr(e,"UCBrowser")?"UC Browser":qr(e,"CriOS")?jHe:qr(e,"CrMo")||qr(e,C0)?C0:qr(e,Nf)&&qr(e,fT)?BHe:qr(e,"FxiOS")?zHe:qr(e.toLowerCase(),kq.toLowerCase())?kq:w6r(e,t)?qr(e,iu)?VHe:fT:qr(e,d1)?d1:qr(e,"MSIE")||qr(e,"Trident/")?Mte:qr(e,"Gecko")?d1:""},S6r={[FHe]:[new RegExp("rv:"+ma)],[LHe]:[new RegExp(Fte+"?\\/"+ma)],[C0]:[new RegExp("("+C0+"|CrMo)\\/"+ma)],[jHe]:[new RegExp("CriOS\\/"+ma)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+ma)],[fT]:[oB],[VHe]:[oB],[jte]:[new RegExp("(Opera|OPR)\\/"+ma)],[d1]:[new RegExp(d1+"\\/"+ma)],[zHe]:[new RegExp("FxiOS\\/"+ma)],[kq]:[new RegExp("Konqueror[:/]?"+ma,"i")],[Aw]:[new RegExp(Aw+" "+ma),oB],[BHe]:[new RegExp("android\\s"+ma,"i")],[MHe]:[new RegExp(RHe+"\\/"+ma)],[Mte]:[new RegExp("(rv:|MSIE )"+ma)],Mozilla:[new RegExp("rv:"+ma)]},O6r=function(e,t){var r=ZHe(e,t),n=S6r[r];if(bt(n))return null;for(var s=0;s<n.length;s++){var i=n[s],o=e.match(i);if(o)return parseFloat(o[o.length-2])}return null},v1e=[[new RegExp(f1+"; "+f1+" (.*?)[);]","i"),e=>[f1,e&&e[1]||""]],[new RegExp(pT,"i"),[pT,""]],[new RegExp(hT,"i"),[hT,""]],[Lte,[Aw,""]],[new RegExp(X_,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[Oq,""];if(new RegExp(iu).test(t)&&!/IEMobile\b/.test(t))return[X_+" "+iu,""];var r=/Windows NT ([0-9.]+)/i.exec(t);if(r&&r[1]){var n=r[1],s=x6r[n]||"";return/arm/i.test(t)&&(s="RT"),[X_,s]}return[X_,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>{if(e&&e[3]){var t=[e[3],e[4],e[5]||"0"];return[iN,t.join(".")]}return[iN,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=bt(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+Nf+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+Nf+")","i"),e=>{if(e&&e[2]){var t=[e[2],e[3],e[4]||"0"];return[Nf,t.join(".")]}return[Nf,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];if(e&&e[1]){var r=[e[1],e[2],e[3]||"0"];t[1]=r.join(".")}return t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[h6r,""]],[/Linux|debian/i,["Linux",""]]],b1e=function(e){return b6r.test(e)?pT:v6r.test(e)?hT:y6r.test(e)?f1:new RegExp(_q,"i").test(e)?_q:new RegExp("("+Oq+"|WPDesktop)","i").test(e)?Oq:/iPad/.test(e)?PHe:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?IHe:Lte.test(e)?Aw:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(y1e,"i").test(e)?y1e:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?!new RegExp(iu).test(e)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)?/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?Nf:AHe:Nf:new RegExp("(pda|"+iu+")","i").test(e)?g6r:new RegExp(dT,"i").test(e)&&!new RegExp(dT+" pc","i").test(e)?QHe:""},u$="https?://(.*)",NS=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],_6r=IS(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],NS),GD="<masked>",k6r=["li_fat_id"];function qHe(e,t,r){if(!wt)return{};var n,s=t?IS([],NS,r||[]):[],i=HHe(WD(wt.URL,s,GD),e),o=(n={},ys(k6r,(function(a){var l=Qf.q(a);n[a]=l||null})),n);return wi(o,i)}function HHe(e,t){var r=_6r.concat(t||[]),n={};return ys(r,(function(s){var i=rN(e,s);n[s]=i||null})),n}function WHe(e){var t=(function(i){return i?i.search(u$+"google.([^/?]*)")===0?"google":i.search(u$+"bing.com")===0?"bing":i.search(u$+"yahoo.com")===0?"yahoo":i.search(u$+"duckduckgo.com")===0?"duckduckgo":null:null})(e),r=t!="yahoo"?"q":"p",n={};if(!lm(t)){n.$search_engine=t;var s=wt?rN(wt.referrer,r):"";s.length&&(n.ph_keyword=s)}return n}function x1e(){return navigator.language||navigator.userLanguage}function GHe(){return wt?.referrer||"$direct"}function XHe(e,t){var r=e?IS([],NS,t||[]):[],n=rl?.href.substring(0,1e3);return{r:GHe().substring(0,1e3),u:n?WD(n,r,GD):void 0}}function YHe(e){var t,{r,u:n}=e,s={$referrer:r,$referring_domain:r==null?void 0:r=="$direct"?"$direct":(t=tN(r))==null?void 0:t.host};if(n){s.$current_url=n;var i=tN(n);s.$host=i?.host,s.$pathname=i?.pathname;var o=HHe(n);wi(s,o)}if(r){var a=WHe(r);wi(s,a)}return s}function JHe(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function E6r(){try{return new Date().getTimezoneOffset()}catch{return}}function C6r(e,t){if(!Ja)return{};var r,n,s,i=e?IS([],NS,t||[]):[],[o,a]=(function(l){for(var c=0;c<v1e.length;c++){var[u,d]=v1e[c],p=u.exec(l),m=p&&(Dg(d)?d(p,l):d);if(m)return m}return["",""]})(Ja);return wi($te({$os:o,$os_version:a,$browser:ZHe(Ja,navigator.vendor),$device:b1e(Ja),$device_type:(n=Ja,s=b1e(n),s===PHe||s===AHe||s==="Kobo"||s==="Kindle Fire"||s===QHe?dT:s===pT||s===f1||s===hT||s===_q?"Console":s===IHe?"Wearable":s?iu:"Desktop"),$timezone:JHe(),$timezone_offset:E6r()}),{$current_url:WD(rl?.href,i,GD),$host:rl?.host,$pathname:rl?.pathname,$raw_user_agent:Ja.length>1e3?Ja.substring(0,997)+"...":Ja,$browser_version:O6r(Ja,navigator.vendor),$browser_language:x1e(),$browser_language_prefix:(r=x1e(),typeof r=="string"?r.split("-")[0]:void 0),$screen_height:Pe?.screen.height,$screen_width:Pe?.screen.width,$viewport_height:Pe?.innerHeight,$viewport_width:Pe?.innerWidth,$lib:"web",$lib_version:dh.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}var Gm=to("[Web Vitals]"),w1e=9e5;class T6r{constructor(t){var r;this.Et=!1,this.P=!1,this.N={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.$t=()=>{clearTimeout(this.kt),this.N.metrics.length!==0&&(this._instance.capture("$web_vitals",this.N.metrics.reduce(((n,s)=>Dt({},n,{["$web_vitals_"+s.name+"_event"]:Dt({},s),["$web_vitals_"+s.name+"_value"]:s.value})),{})),this.N={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.Pt=n=>{var s,i=(s=this._instance.sessionManager)==null?void 0:s.checkAndGetSessionAndWindowId(!0);if(bt(i))Gm.error("Could not read session ID. Dropping metrics!");else{this.N=this.N||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var o=this.Tt();bt(o)||(Yn(n?.name)||Yn(n?.value)?Gm.error("Invalid metric received",n):this.Rt&&n.value>=this.Rt?Gm.error("Ignoring metric with value >= "+this.Rt,n):(this.N.url!==o&&(this.$t(),this.kt=setTimeout(this.$t,this.flushToCaptureTimeoutMs)),bt(this.N.url)&&(this.N.url=o),this.N.firstMetricTimestamp=bt(this.N.firstMetricTimestamp)?Date.now():this.N.firstMetricTimestamp,n.attribution&&n.attribution.interactionTargetElement&&(n.attribution.interactionTargetElement=void 0),this.N.metrics.push(Dt({},n,{$current_url:o,$session_id:i.sessionId,$window_id:i.windowId,timestamp:Date.now()})),this.N.metrics.length===this.allowedMetrics.length&&this.$t()))}},this.rt=()=>{var n,s,i,o,a=pr.__PosthogExtensions__;bt(a)||bt(a.postHogWebVitalsCallbacks)||({onLCP:n,onCLS:s,onFCP:i,onINP:o}=a.postHogWebVitalsCallbacks),n&&s&&i&&o?(this.allowedMetrics.indexOf("LCP")>-1&&n(this.Pt.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&s(this.Pt.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&i(this.Pt.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&o(this.Pt.bind(this)),this.P=!0):Gm.error("web vitals callbacks not loaded - not starting")},this._instance=t,this.Et=!((r=this._instance.persistence)==null||!r.props[s1e]),this.startIfEnabled()}get allowedMetrics(){var t,r,n=no(this._instance.config.capture_performance)?(t=this._instance.config.capture_performance)==null?void 0:t.web_vitals_allowed_metrics:void 0;return bt(n)?((r=this._instance.persistence)==null?void 0:r.props[i1e])||["CLS","FCP","INP","LCP"]:n}get flushToCaptureTimeoutMs(){return(no(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_delayed_flush_ms:void 0)||5e3}get Rt(){var t=no(this._instance.config.capture_performance)&&ip(this._instance.config.capture_performance.__web_vitals_max_value)?this._instance.config.capture_performance.__web_vitals_max_value:w1e;return 0<t&&t<=6e4?w1e:t}get isEnabled(){var t=rl?.protocol;if(t!=="http:"&&t!=="https:")return Gm.info("Web Vitals are disabled on non-http/https protocols"),!1;var r=no(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals:Ag(this._instance.config.capture_performance)?this._instance.config.capture_performance:void 0;return Ag(r)?r:this.Et}startIfEnabled(){this.isEnabled&&!this.P&&(Gm.info("enabled, starting..."),this.it(this.rt))}onRemoteConfig(t){var r=no(t.capturePerformance)&&!!t.capturePerformance.web_vitals,n=no(t.capturePerformance)?t.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[s1e]:r}),this._instance.persistence.register({[i1e]:n})),this.Et=r,this.startIfEnabled()}it(t){var r,n;(r=pr.__PosthogExtensions__)!=null&&r.postHogWebVitalsCallbacks&&t(),(n=pr.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"web-vitals",(s=>{s?Gm.error("failed to load script",s):t()}))}Tt(){var t=Pe?Pe.location.href:void 0;if(t){var r=this._instance.config.mask_personal_data_properties,n=this._instance.config.custom_personal_data_properties,s=r?IS([],NS,n||[]):[];return WD(t,s,GD)}Gm.error("Could not determine current URL")}}var D6r=to("[Heatmaps]");function S1e(e){return no(e)&&"clientX"in e&&"clientY"in e&&ip(e.clientX)&&ip(e.clientY)}class A6r{constructor(t){var r;this.Et=!1,this.P=!1,this.It=null,this.instance=t,this.Et=!((r=this.instance.persistence)==null||!r.props[hq]),this.rageclicks=new kHe(t.config.rageclick)}get flushIntervalMilliseconds(){var t=5e3;return no(this.instance.config.capture_heatmaps)&&this.instance.config.capture_heatmaps.flush_interval_milliseconds&&(t=this.instance.config.capture_heatmaps.flush_interval_milliseconds),t}get isEnabled(){return bt(this.instance.config.capture_heatmaps)?bt(this.instance.config.enable_heatmaps)?this.Et:this.instance.config.enable_heatmaps:this.instance.config.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.P)return;D6r.info("starting..."),this.Ft(),this.Ct()}else{var t;clearInterval((t=this.It)!==null&&t!==void 0?t:void 0),this.Mt(),this.getAndClearBuffer()}}onRemoteConfig(t){var r=!!t.heatmaps;this.instance.persistence&&this.instance.persistence.register({[hq]:r}),this.Et=r,this.startIfEnabled()}getAndClearBuffer(){var t=this.N;return this.N=void 0,t}Ot(t){this.At(t.originalEvent,"deadclick")}Ct(){this.It&&clearInterval(this.It),this.It=(function(t){return t?.visibilityState==="visible"})(wt)?setInterval(this.Dt.bind(this),this.flushIntervalMilliseconds):null}Ft(){Pe&&wt&&(this.jt=this.Dt.bind(this),Ni(Pe,"beforeunload",this.jt),this.Lt=t=>this.At(t||Pe?.event),Ni(wt,"click",this.Lt,{capture:!0}),this.Nt=t=>this.Ut(t||Pe?.event),Ni(wt,"mousemove",this.Nt,{capture:!0}),this.zt=new CHe(this.instance,s6r,this.Ot.bind(this)),this.zt.startIfEnabled(),this.Ht=this.Ct.bind(this),Ni(wt,"visibilitychange",this.Ht),this.P=!0)}Mt(){var t;Pe&&wt&&(this.jt&&Pe.removeEventListener("beforeunload",this.jt),this.Lt&&wt.removeEventListener("click",this.Lt,{capture:!0}),this.Nt&&wt.removeEventListener("mousemove",this.Nt,{capture:!0}),this.Ht&&wt.removeEventListener("visibilitychange",this.Ht),clearTimeout(this.Bt),(t=this.zt)==null||t.stop(),this.P=!1)}qt(t,r){var n=this.instance.scrollManager.scrollY(),s=this.instance.scrollManager.scrollX(),i=this.instance.scrollManager.scrollElement(),o=(function(a,l,c){for(var u=a;u&&aR(u)&&!$g(u,"body");){if(u===c)return!1;if(qr(l,Pe?.getComputedStyle(u).position))return!0;u=vHe(u)}return!1})(gHe(t),["fixed","sticky"],i);return{x:t.clientX+(o?0:s),y:t.clientY+(o?0:n),target_fixed:o,type:r}}At(t,r){var n;if(r===void 0&&(r="click"),!o1e(t.target)&&S1e(t)){var s=this.qt(t,r);(n=this.rageclicks)!=null&&n.isRageClick(t.clientX,t.clientY,new Date().getTime())&&this.Wt(Dt({},s,{type:"rageclick"})),this.Wt(s)}}Ut(t){!o1e(t.target)&&S1e(t)&&(clearTimeout(this.Bt),this.Bt=setTimeout((()=>{this.Wt(this.qt(t,"mousemove"))}),500))}Wt(t){if(Pe){var r=Pe.location.href,n=this.instance.config.mask_personal_data_properties,s=this.instance.config.custom_personal_data_properties,i=n?IS([],NS,s||[]):[],o=WD(r,i,GD);this.N=this.N||{},this.N[o]||(this.N[o]=[]),this.N[o].push(t)}}Dt(){this.N&&!Lx(this.N)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}}class P6r{constructor(t){this._instance=t}doPageView(t,r){var n,s=this.Gt(t,r);return this.Vt={pathname:(n=Pe?.location.pathname)!==null&&n!==void 0?n:"",pageViewId:r,timestamp:t},this._instance.scrollManager.resetContext(),s}doPageLeave(t){var r;return this.Gt(t,(r=this.Vt)==null?void 0:r.pageViewId)}doEvent(){var t;return{$pageview_id:(t=this.Vt)==null?void 0:t.pageViewId}}Gt(t,r){var n=this.Vt;if(!n)return{$pageview_id:r};var s={$pageview_id:r,$prev_pageview_id:n.pageViewId},i=this._instance.scrollManager.getContext();if(i&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:o,lastScrollY:a,maxScrollY:l,maxContentHeight:c,lastContentY:u,maxContentY:d}=i;if(!(bt(o)||bt(a)||bt(l)||bt(c)||bt(u)||bt(d))){o=Math.ceil(o),a=Math.ceil(a),l=Math.ceil(l),c=Math.ceil(c),u=Math.ceil(u),d=Math.ceil(d);var p=o<=1?1:If(a/o,0,1,St),m=o<=1?1:If(l/o,0,1,St),g=c<=1?1:If(u/c,0,1,St),v=c<=1?1:If(d/c,0,1,St);s=wi(s,{$prev_pageview_last_scroll:a,$prev_pageview_last_scroll_percentage:p,$prev_pageview_max_scroll:l,$prev_pageview_max_scroll_percentage:m,$prev_pageview_last_content:u,$prev_pageview_last_content_percentage:g,$prev_pageview_max_content:d,$prev_pageview_max_content_percentage:v})}}return n.pathname&&(s.$prev_pageview_pathname=n.pathname),n.timestamp&&(s.$prev_pageview_duration=(t.getTime()-n.timestamp.getTime())/1e3),s}}var ou=Uint8Array,fl=Uint16Array,Pw=Uint32Array,zte=new ou([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Bte=new ou([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),O1e=new ou([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),KHe=function(e,t){for(var r=new fl(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];var s=new Pw(r[30]);for(n=1;n<30;++n)for(var i=r[n];i<r[n+1];++i)s[i]=i-r[n]<<5|n;return[r,s]},eWe=KHe(zte,2),$6r=eWe[0],Eq=eWe[1];$6r[28]=258,Eq[258]=28;for(var _1e=KHe(Bte,0)[1],tWe=new fl(32768),Rs=0;Rs<32768;++Rs){var ev=(43690&Rs)>>>1|(21845&Rs)<<1;ev=(61680&(ev=(52428&ev)>>>2|(13107&ev)<<2))>>>4|(3855&ev)<<4,tWe[Rs]=((65280&ev)>>>8|(255&ev)<<8)>>>1}var Fk=function(e,t,r){for(var n=e.length,s=0,i=new fl(t);s<n;++s)++i[e[s]-1];var o,a=new fl(t);for(s=0;s<t;++s)a[s]=a[s-1]+i[s-1]<<1;for(o=new fl(n),s=0;s<n;++s)o[s]=tWe[a[e[s]-1]++]>>>15-e[s];return o},T0=new ou(288);for(Rs=0;Rs<144;++Rs)T0[Rs]=8;for(Rs=144;Rs<256;++Rs)T0[Rs]=9;for(Rs=256;Rs<280;++Rs)T0[Rs]=7;for(Rs=280;Rs<288;++Rs)T0[Rs]=8;var oN=new ou(32);for(Rs=0;Rs<32;++Rs)oN[Rs]=5;var I6r=Fk(T0,9),N6r=Fk(oN,5),rWe=function(e){return(e/8>>0)+(7&e&&1)},nWe=function(e,t,r){(r==null||r>e.length)&&(r=e.length);var n=new(e instanceof fl?fl:e instanceof Pw?Pw:ou)(r-t);return n.set(e.subarray(t,r)),n},nh=function(e,t,r){r<<=7&t;var n=t/8>>0;e[n]|=r,e[n+1]|=r>>>8},w_=function(e,t,r){r<<=7&t;var n=t/8>>0;e[n]|=r,e[n+1]|=r>>>8,e[n+2]|=r>>>16},aB=function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var s=r.length,i=r.slice();if(!s)return[new ou(0),0];if(s==1){var o=new ou(r[0].s+1);return o[r[0].s]=1,[o,1]}r.sort((function(C,T){return C.f-T.f})),r.push({s:-1,f:25001});var a=r[0],l=r[1],c=0,u=1,d=2;for(r[0]={s:-1,f:a.f+l.f,l:a,r:l};u!=s-1;)a=r[r[c].f<r[d].f?c++:d++],l=r[c!=u&&r[c].f<r[d].f?c++:d++],r[u++]={s:-1,f:a.f+l.f,l:a,r:l};var p=i[0].s;for(n=1;n<s;++n)i[n].s>p&&(p=i[n].s);var m=new fl(p+1),g=Cq(r[u-1],m,0);if(g>t){n=0;var v=0,b=g-t,w=1<<b;for(i.sort((function(C,T){return m[T.s]-m[C.s]||C.f-T.f}));n<s;++n){var S=i[n].s;if(!(m[S]>t))break;v+=w-(1<<g-m[S]),m[S]=t}for(v>>>=b;v>0;){var O=i[n].s;m[O]<t?v-=1<<t-m[O]++-1:++n}for(;n>=0&&v;--n){var k=i[n].s;m[k]==t&&(--m[k],++v)}g=t}return[new ou(m),g]},Cq=function(e,t,r){return e.s==-1?Math.max(Cq(e.l,t,r+1),Cq(e.r,t,r+1)):t[e.s]=r},k1e=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new fl(++t),n=0,s=e[0],i=1,o=function(l){r[n++]=l},a=1;a<=t;++a)if(e[a]==s&&a!=t)++i;else{if(!s&&i>2){for(;i>138;i-=138)o(32754);i>2&&(o(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(o(s),--i;i>6;i-=6)o(8304);i>2&&(o(i-3<<5|8208),i=0)}for(;i--;)o(s);i=1,s=e[a]}return[r.subarray(0,n),t]},S_=function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},Tq=function(e,t,r){var n=r.length,s=rWe(t+2);e[s]=255&n,e[s+1]=n>>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var i=0;i<n;++i)e[s+i+4]=r[i];return 8*(s+4+n)},E1e=function(e,t,r,n,s,i,o,a,l,c,u){nh(t,u++,r),++s[256];for(var d=aB(s,15),p=d[0],m=d[1],g=aB(i,15),v=g[0],b=g[1],w=k1e(p),S=w[0],O=w[1],k=k1e(v),C=k[0],T=k[1],P=new fl(19),A=0;A<S.length;++A)P[31&S[A]]++;for(A=0;A<C.length;++A)P[31&C[A]]++;for(var R=aB(P,7),M=R[0],z=R[1],Q=19;Q>4&&!M[O1e[Q-1]];--Q);var U,L,V,j,N=c+5<<3,I=S_(s,T0)+S_(i,oN)+o,H=S_(s,p)+S_(i,v)+o+14+3*Q+S_(P,M)+(2*P[16]+3*P[17]+7*P[18]);if(N<=I&&N<=H)return Tq(t,u,e.subarray(l,l+c));if(nh(t,u,1+(H<I)),u+=2,H<I){U=Fk(p,m),L=p,V=Fk(v,b),j=v;var B=Fk(M,z);for(nh(t,u,O-257),nh(t,u+5,T-1),nh(t,u+10,Q-4),u+=14,A=0;A<Q;++A)nh(t,u+3*A,M[O1e[A]]);u+=3*Q;for(var J=[S,C],Z=0;Z<2;++Z){var F=J[Z];for(A=0;A<F.length;++A){var W=31&F[A];nh(t,u,B[W]),u+=M[W],W>15&&(nh(t,u,F[A]>>>5&127),u+=F[A]>>>12)}}}else U=I6r,L=T0,V=N6r,j=oN;for(A=0;A<a;++A)if(n[A]>255){W=n[A]>>>18&31,w_(t,u,U[W+257]),u+=L[W+257],W>7&&(nh(t,u,n[A]>>>23&31),u+=zte[W]);var K=31&n[A];w_(t,u,V[K]),u+=j[K],K>3&&(w_(t,u,n[A]>>>5&8191),u+=Bte[K])}else w_(t,u,U[n[A]]),u+=L[n[A]];return w_(t,u,U[256]),u+L[256]},R6r=new Pw([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),M6r=(function(){for(var e=new Pw(256),t=0;t<256;++t){for(var r=t,n=9;--n;)r=(1&r&&3988292384)^r>>>1;e[t]=r}return e})(),j6r=function(e,t,r,n,s){return(function(i,o,a,l,c,u){var d=i.length,p=new ou(l+d+5*(1+Math.floor(d/7e3))+c),m=p.subarray(l,p.length-c),g=0;if(!o||d<8)for(var v=0;v<=d;v+=65535){var b=v+65535;b<d?g=Tq(m,g,i.subarray(v,b)):(m[v]=u,g=Tq(m,g,i.subarray(v,d)))}else{for(var w=R6r[o-1],S=w>>>13,O=8191&w,k=(1<<a)-1,C=new fl(32768),T=new fl(k+1),P=Math.ceil(a/3),A=2*P,R=function(Ke){return(i[Ke]^i[Ke+1]<<P^i[Ke+2]<<A)&k},M=new Pw(25e3),z=new fl(288),Q=new fl(32),U=0,L=0,V=(v=0,0),j=0,N=0;v<d;++v){var I=R(v),H=32767&v,B=T[I];if(C[H]=B,T[I]=H,j<=v){var J=d-v;if((U>7e3||V>24576)&&J>423){g=E1e(i,m,0,M,z,Q,L,V,N,v-N,g),V=U=L=0,N=v;for(var Z=0;Z<286;++Z)z[Z]=0;for(Z=0;Z<30;++Z)Q[Z]=0}var F=2,W=0,K=O,se=H-B&32767;if(J>2&&I==R(v-se))for(var X=Math.min(S,J)-1,te=Math.min(32767,v),de=Math.min(258,J);se<=te&&--K&&H!=B;){if(i[v+F]==i[v+F-se]){for(var ue=0;ue<de&&i[v+ue]==i[v+ue-se];++ue);if(ue>F){if(F=ue,W=se,ue>X)break;var Ae=Math.min(se,ue-2),_e=0;for(Z=0;Z<Ae;++Z){var De=v-se+Z+32768&32767,Me=De-C[De]+32768&32767;Me>_e&&(_e=Me,B=De)}}}se+=(H=B)-(B=C[H])+32768&32767}if(W){M[V++]=268435456|Eq[F]<<18|_1e[W];var We=31&Eq[F],lt=31&_1e[W];L+=zte[We]+Bte[lt],++z[257+We],++Q[lt],j=v+F,++U}else M[V++]=i[v],++z[i[v]]}}g=E1e(i,m,u,M,z,Q,L,V,N,v-N,g)}return nWe(p,0,l+rWe(g)+c)})(e,t.level==null?6:t.level,t.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,r,n,!0)},lB=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8};function F6r(e,t){t===void 0&&(t={});var r=(function(){var a=4294967295;return{p:function(l){for(var c=a,u=0;u<l.length;++u)c=M6r[255&c^l[u]]^c>>>8;a=c},d:function(){return 4294967295^a}}})(),n=e.length;r.p(e);var s,i=j6r(e,t,10+((s=t).filename&&s.filename.length+1||0),8),o=i.length;return(function(a,l){var c=l.filename;if(a[0]=31,a[1]=139,a[2]=8,a[8]=l.level<2?4:l.level==9?2:0,a[9]=3,l.mtime!=0&&lB(a,4,Math.floor(new Date(l.mtime||Date.now())/1e3)),c){a[3]=8;for(var u=0;u<=c.length;++u)a[u+10]=c.charCodeAt(u)}})(i,t),lB(i,o-8,r.d()),lB(i,o-4,n),i}var L6r=function(e){var t,r,n,s,i="";for(t=r=0,n=(e=(e+"").replace(/\r\n/g,`
|
|
569
569
|
`).replace(/\r/g,`
|
|
570
570
|
`)).length,s=0;s<n;s++){var o=e.charCodeAt(s),a=null;o<128?r++:a=o>127&&o<2048?String.fromCharCode(o>>6|192,63&o|128):String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128),lm(a)||(r>t&&(i+=e.substring(t,r)),i+=a,t=r=s+1)}return r>t&&(i+=e.substring(t,e.length)),i},z6r=!!cq||!!lq,C1e="text/plain",aN=function(e,t,r){var n;r===void 0&&(r=!0);var[s,i]=e.split("?"),o=Dt({},t),a=(n=i?.split("&").map((c=>{var u,[d,p]=c.split("="),m=r&&(u=o[d])!==null&&u!==void 0?u:p;return delete o[d],d+"="+m})))!==null&&n!==void 0?n:[],l=Z5r(o);return l&&a.push(l),s+"?"+a.join("&")},Y_=(e,t)=>JSON.stringify(e,((r,n)=>typeof n=="bigint"?n.toString():n),t),cB=e=>{var{data:t,compression:r}=e;if(t){if(r===bh.GZipJS){var n=F6r((function(l,c){var u=l.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(l);for(var d=new ou(l.length+(l.length>>>1)),p=0,m=function(w){d[p++]=w},g=0;g<u;++g){if(p+5>d.length){var v=new ou(p+8+(u-g<<1));v.set(d),d=v}var b=l.charCodeAt(g);b<128||c?m(b):b<2048?(m(192|b>>>6),m(128|63&b)):b>55295&&b<57344?(m(240|(b=65536+(1047552&b)|1023&l.charCodeAt(++g))>>>18),m(128|b>>>12&63),m(128|b>>>6&63),m(128|63&b)):(m(224|b>>>12),m(128|b>>>6&63),m(128|63&b))}return nWe(d,0,p)})(Y_(t)),{mtime:0}),s=new Blob([n],{type:C1e});return{contentType:C1e,body:s,estimatedSize:s.size}}if(r===bh.Base64){var i=(function(l){var c,u,d,p,m,g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",v=0,b=0,w="",S=[];if(!l)return l;l=L6r(l);do c=(m=l.charCodeAt(v++)<<16|l.charCodeAt(v++)<<8|l.charCodeAt(v++))>>18&63,u=m>>12&63,d=m>>6&63,p=63&m,S[b++]=g.charAt(c)+g.charAt(u)+g.charAt(d)+g.charAt(p);while(v<l.length);switch(w=S.join(""),l.length%3){case 1:w=w.slice(0,-2)+"==";break;case 2:w=w.slice(0,-1)+"="}return w})(Y_(t)),o=(l=>"data="+encodeURIComponent(typeof l=="string"?l:Y_(l)))(i);return{contentType:"application/x-www-form-urlencoded",body:o,estimatedSize:new Blob([o]).size}}var a=Y_(t);return{contentType:"application/json",body:a,estimatedSize:new Blob([a]).size}}},fI=[];lq&&fI.push({transport:"fetch",method:e=>{var t,r,{contentType:n,body:s,estimatedSize:i}=(t=cB(e))!==null&&t!==void 0?t:{},o=new Headers;ys(e.headers,(function(u,d){o.append(d,u)})),n&&o.append("Content-Type",n);var a=e.url,l=null;if(qxe){var c=new qxe;l={signal:c.signal,timeout:setTimeout((()=>c.abort()),e.timeout)}}lq(a,Dt({method:e?.method||"GET",headers:o,keepalive:e.method==="POST"&&(i||0)<52428.8,body:s,signal:(r=l)==null?void 0:r.signal},e.fetchOptions)).then((u=>u.text().then((d=>{var p={statusCode:u.status,text:d};if(u.status===200)try{p.json=JSON.parse(d)}catch(m){St.error(m)}e.callback==null||e.callback(p)})))).catch((u=>{St.error(u),e.callback==null||e.callback({statusCode:0,text:u})})).finally((()=>l?clearTimeout(l.timeout):null))}}),cq&&fI.push({transport:"XHR",method:e=>{var t,r=new cq;r.open(e.method||"GET",e.url,!0);var{contentType:n,body:s}=(t=cB(e))!==null&&t!==void 0?t:{};ys(e.headers,(function(i,o){r.setRequestHeader(o,i)})),n&&r.setRequestHeader("Content-Type",n),e.timeout&&(r.timeout=e.timeout),e.disableXHRCredentials||(r.withCredentials=!0),r.onreadystatechange=()=>{if(r.readyState===4){var i={statusCode:r.status,text:r.responseText};if(r.status===200)try{i.json=JSON.parse(r.responseText)}catch{}e.callback==null||e.callback(i)}},r.send(s)}}),nc!=null&&nc.sendBeacon&&fI.push({transport:"sendBeacon",method:e=>{var t=aN(e.url,{beacon:"1"});try{var r,{contentType:n,body:s}=(r=cB(e))!==null&&r!==void 0?r:{},i=typeof s=="string"?new Blob([s],{type:n}):s;nc.sendBeacon(t,i)}catch{}}});var lN=function(e,t){if(!(function(r){try{new RegExp(r)}catch{return!1}return!0})(t))return!1;try{return new RegExp(t).test(e)}catch{return!1}};function T1e(e,t,r){return Y_({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:r})}var sWe={exact:(e,t)=>t.some((r=>e.some((n=>r===n)))),is_not:(e,t)=>t.every((r=>e.every((n=>r!==n)))),regex:(e,t)=>t.some((r=>e.some((n=>lN(r,n))))),not_regex:(e,t)=>t.every((r=>e.every((n=>!lN(r,n))))),icontains:(e,t)=>t.map(d$).some((r=>e.map(d$).some((n=>r.includes(n))))),not_icontains:(e,t)=>t.map(d$).every((r=>e.map(d$).every((n=>!r.includes(n)))))},d$=e=>e.toLowerCase();function iWe(e,t){return!e||Object.entries(e).every((r=>{var[n,s]=r,i=t?.[n];if(bt(i)||lm(i))return!1;var o=[String(i)],a=sWe[s.operator];return!!a&&a(s.values,o)}))}var uB=to("[Error tracking]");class B6r{constructor(t){var r,n;this.Jt=[],this.Kt=new d5r([new x5r,new D5r,new S5r,new w5r,new C5r,new E5r,new _5r,new T5r],b5r("web:javascript",m5r,v5r)),this._instance=t,this.Jt=(r=(n=this._instance.persistence)==null?void 0:n.get_property(mq))!==null&&r!==void 0?r:[]}onRemoteConfig(t){var r,n,s,i=(r=(n=t.errorTracking)==null?void 0:n.suppressionRules)!==null&&r!==void 0?r:[],o=(s=t.errorTracking)==null?void 0:s.captureExtensionExceptions;this.Jt=i,this._instance.persistence&&this._instance.persistence.register({[mq]:this.Jt,[n1e]:o})}get Yt(){var t,r=!!this._instance.get_property(n1e),n=this._instance.config.error_tracking.captureExtensionExceptions;return(t=n??r)!==null&&t!==void 0&&t}buildProperties(t,r){return this.Kt.buildFromUnknown(t,{syntheticException:r?.syntheticException,mechanism:{handled:r?.handled}})}sendExceptionEvent(t){var r=t.$exception_list;if(this.Xt(r)){if(this.Qt(r))return void uB.info("Skipping exception capture because a suppression rule matched");if(!this.Yt&&this.Zt(r))return void uB.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.ti(r))return void uB.info("Skipping exception capture because it was thrown by the PostHog SDK")}return this._instance.capture("$exception",t,{_noTruncate:!0,_batchKey:"exceptionEvent"})}Qt(t){if(t.length===0)return!1;var r=t.reduce(((n,s)=>{var{type:i,value:o}=s;return Ki(i)&&i.length>0&&n.$exception_types.push(i),Ki(o)&&o.length>0&&n.$exception_values.push(o),n}),{$exception_types:[],$exception_values:[]});return this.Jt.some((n=>{var s=n.values.map((i=>{var o,a=sWe[i.operator],l=ss(i.value)?i.value:[i.value],c=(o=r[i.key])!==null&&o!==void 0?o:[];return l.length>0&&a(l,c)}));return n.type==="OR"?s.some(Boolean):s.every(Boolean)}))}Zt(t){return t.flatMap((r=>{var n,s;return(n=(s=r.stacktrace)==null?void 0:s.frames)!==null&&n!==void 0?n:[]})).some((r=>r.filename&&r.filename.startsWith("chrome-extension://")))}ti(t){if(t.length>0){var r,n,s,i,o=(r=(n=t[0].stacktrace)==null?void 0:n.frames)!==null&&r!==void 0?r:[],a=o[o.length-1];return(s=a==null||(i=a.filename)==null?void 0:i.includes("posthog.com/static"))!==null&&s!==void 0&&s}return!1}Xt(t){return!Yn(t)&&ss(t)}}var Yu=to("[FeatureFlags]"),O_=to("[FeatureFlags]",{debugEnabled:!0}),dB="$active_feature_flags",dx="$override_feature_flags",D1e="$feature_flag_payloads",__="$override_feature_flag_payloads",A1e="$feature_flag_request_id",P1e="$feature_flag_evaluated_at",$1e=e=>{var t={};for(var[r,n]of dI(e||{}))n&&(t[r]=n);return t},V6r=e=>{var t=e.flags;return t?(e.featureFlags=Object.fromEntries(Object.keys(t).map((r=>{var n;return[r,(n=t[r].variant)!==null&&n!==void 0?n:t[r].enabled]}))),e.featureFlagPayloads=Object.fromEntries(Object.keys(t).filter((r=>t[r].enabled)).filter((r=>{var n;return(n=t[r].metadata)==null?void 0:n.payload})).map((r=>{var n;return[r,(n=t[r].metadata)==null?void 0:n.payload]})))):Yu.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e},U6r=(function(e){return e.FeatureFlags="feature_flags",e.Recordings="recordings",e})({});class Q6r{constructor(t){this.ii=!1,this.ei=!1,this.ri=!1,this.si=!1,this.ni=!1,this.oi=!1,this.ai=!1,this._instance=t,this.featureFlagEventHandlers=[]}li(){var t=this._instance.config.evaluation_environments;return t!=null&&t.length?t.filter((r=>{var n=r&&typeof r=="string"&&r.trim().length>0;return n||Yu.error("Invalid evaluation environment found:",r,"Expected non-empty string"),n})):[]}ui(){return this.li().length>0}flags(){if(this._instance.config.__preview_remote_config)this.oi=!0;else{var t=!this.hi&&(this._instance.config.advanced_disable_feature_flags||this._instance.config.advanced_disable_feature_flags_on_first_load);this.vi({disableFlags:t})}}get hasLoadedFlags(){return this.ei}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var t=this._instance.get_property(gq),r=this._instance.get_property(dx),n=this._instance.get_property(__);if(!n&&!r)return t||{};var s=wi({},t||{}),i=[...new Set([...Object.keys(n||{}),...Object.keys(r||{})])];for(var o of i){var a,l,c=s[o],u=r?.[o],d=bt(u)?(a=c?.enabled)!==null&&a!==void 0&&a:!!u,p=bt(u)?c.variant:typeof u=="string"?u:void 0,m=n?.[o],g=Dt({},c,{enabled:d,variant:d?p??c?.variant:void 0});d!==c?.enabled&&(g.original_enabled=c?.enabled),p!==c?.variant&&(g.original_variant=c?.variant),m&&(g.metadata=Dt({},c?.metadata,{payload:m,original_payload:c==null||(l=c.metadata)==null?void 0:l.payload})),s[o]=g}return this.ii||(Yu.warn(" Overriding feature flag details!",{flagDetails:t,overriddenPayloads:n,finalDetails:s}),this.ii=!0),s}getFlagVariants(){var t=this._instance.get_property(zx),r=this._instance.get_property(dx);if(!r)return t||{};for(var n=wi({},t),s=Object.keys(r),i=0;i<s.length;i++)n[s[i]]=r[s[i]];return this.ii||(Yu.warn(" Overriding feature flags!",{enabledFlags:t,overriddenFlags:r,finalFlags:n}),this.ii=!0),n}getFlagPayloads(){var t=this._instance.get_property(D1e),r=this._instance.get_property(__);if(!r)return t||{};for(var n=wi({},t||{}),s=Object.keys(r),i=0;i<s.length;i++)n[s[i]]=r[s[i]];return this.ii||(Yu.warn(" Overriding feature flag payloads!",{flagPayloads:t,overriddenPayloads:r,finalPayloads:n}),this.ii=!0),n}reloadFeatureFlags(){this.si||this._instance.config.advanced_disable_feature_flags||this.hi||(this.hi=setTimeout((()=>{this.vi()}),5))}di(){clearTimeout(this.hi),this.hi=void 0}ensureFlagsLoaded(){this.ei||this.ri||this.hi||this.reloadFeatureFlags()}setAnonymousDistinctId(t){this.$anon_distinct_id=t}setReloadingPaused(t){this.si=t}vi(t){var r;if(this.di(),!this._instance.O())if(this.ri)this.ni=!0;else{var n={token:this._instance.config.token,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:Dt({},((r=this._instance.persistence)==null?void 0:r.get_initial_props())||{},this._instance.get_property(G_)||{}),group_properties:this._instance.get_property(av)};(t!=null&&t.disableFlags||this._instance.config.advanced_disable_feature_flags)&&(n.disable_flags=!0),this.ui()&&(n.evaluation_environments=this.li());var s=this._instance.config.__preview_remote_config,i=s?"/flags/?v=2":"/flags/?v=2&config=true",o=this._instance.config.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":"",a=this._instance.requestRouter.endpointFor("flags",i+o);s&&(n.timezone=JHe()),this.ri=!0,this._instance.ci({method:"POST",url:a,data:n,compression:this._instance.config.disable_compression?void 0:bh.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:l=>{var c,u,d=!0;if(l.statusCode===200&&(this.ni||(this.$anon_distinct_id=void 0),d=!1),this.ri=!1,this.oi||(this.oi=!0,this._instance.fi((u=l.json)!==null&&u!==void 0?u:{})),!n.disable_flags||this.ni)if(this.ai=!d,l.json&&(c=l.json.quotaLimited)!=null&&c.includes(U6r.FeatureFlags))Yu.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more.");else{var p;n.disable_flags||this.receivedFeatureFlags((p=l.json)!==null&&p!==void 0?p:{},d),this.ni&&(this.ni=!1,this.vi())}}})}}getFeatureFlag(t,r){if(r===void 0&&(r={}),this.ei||this.getFlags()&&this.getFlags().length>0){var n=this.getFlagVariants()[t],s=""+n,i=this._instance.get_property(A1e)||void 0,o=this._instance.get_property(P1e)||void 0,a=this._instance.get_property(Y4)||{};if((r.send_event||!("send_event"in r))&&(!(t in a)||!a[t].includes(s))){var l,c,u,d,p,m,g,v,b;ss(a[t])?a[t].push(s):a[t]=[s],(l=this._instance.persistence)==null||l.register({[Y4]:a});var w=this.getFeatureFlagDetails(t),S={$feature_flag:t,$feature_flag_response:n,$feature_flag_payload:this.getFeatureFlagPayload(t)||null,$feature_flag_request_id:i,$feature_flag_evaluated_at:o,$feature_flag_bootstrapped_response:((c=this._instance.config.bootstrap)==null||(c=c.featureFlags)==null?void 0:c[t])||null,$feature_flag_bootstrapped_payload:((u=this._instance.config.bootstrap)==null||(u=u.featureFlagPayloads)==null?void 0:u[t])||null,$used_bootstrap_value:!this.ai};bt(w==null||(d=w.metadata)==null?void 0:d.version)||(S.$feature_flag_version=w.metadata.version);var O,k=(p=w==null||(m=w.reason)==null?void 0:m.description)!==null&&p!==void 0?p:w==null||(g=w.reason)==null?void 0:g.code;k&&(S.$feature_flag_reason=k),w!=null&&(v=w.metadata)!=null&&v.id&&(S.$feature_flag_id=w.metadata.id),bt(w?.original_variant)&&bt(w?.original_enabled)||(S.$feature_flag_original_response=bt(w.original_variant)?w.original_enabled:w.original_variant),w!=null&&(b=w.metadata)!=null&&b.original_payload&&(S.$feature_flag_original_payload=w==null||(O=w.metadata)==null?void 0:O.original_payload),this._instance.capture("$feature_flag_called",S)}return n}Yu.warn('getFeatureFlag for key "'+t+`" failed. Feature flags didn't load in time.`)}getFeatureFlagDetails(t){return this.getFlagsWithDetails()[t]}getFeatureFlagPayload(t){return this.getFlagPayloads()[t]}getRemoteConfigPayload(t,r){var n=this._instance.config.token,s={distinct_id:this._instance.get_distinct_id(),token:n};this.ui()&&(s.evaluation_environments=this.li()),this._instance.ci({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2&config=true"),data:s,compression:this._instance.config.disable_compression?void 0:bh.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:i=>{var o,a=(o=i.json)==null?void 0:o.featureFlagPayloads;r(a?.[t]||void 0)}})}isFeatureEnabled(t,r){if(r===void 0&&(r={}),this.ei||this.getFlags()&&this.getFlags().length>0){var n=this.getFeatureFlag(t,r);return bt(n)?void 0:!!n}Yu.warn('isFeatureEnabled for key "'+t+`" failed. Feature flags didn't load in time.`)}addFeatureFlagsHandler(t){this.featureFlagEventHandlers.push(t)}removeFeatureFlagsHandler(t){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((r=>r!==t))}receivedFeatureFlags(t,r){if(this._instance.persistence){this.ei=!0;var n=this.getFlagVariants(),s=this.getFlagPayloads(),i=this.getFlagsWithDetails();(function(o,a,l,c,u){l===void 0&&(l={}),c===void 0&&(c={}),u===void 0&&(u={});var d=V6r(o),p=d.flags,m=d.featureFlags,g=d.featureFlagPayloads;if(m){var v=o.requestId,b=o.evaluatedAt;if(ss(m)){Yu.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var w={};if(m)for(var S=0;S<m.length;S++)w[m[S]]=!0;a&&a.register({[dB]:m,[zx]:w})}else{var O=m,k=g,C=p;o.errorsWhileComputingFlags&&(O=Dt({},l,O),k=Dt({},c,k),C=Dt({},u,C)),a&&a.register(Dt({[dB]:Object.keys($1e(O)),[zx]:O||{},[D1e]:k||{},[gq]:C||{}},v?{[A1e]:v}:{},b?{[P1e]:b}:{}))}}})(t,this._instance.persistence,n,s,i),this.pi(r)}}override(t,r){r===void 0&&(r=!1),Yu.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:t,suppressWarning:r})}overrideFeatureFlags(t){if(!this._instance.__loaded||!this._instance.persistence)return Yu.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(t===!1)return this._instance.persistence.unregister(dx),this._instance.persistence.unregister(__),this.pi(),O_.info("All overrides cleared");if(t&&typeof t=="object"&&("flags"in t||"payloads"in t)){var r,n=t;if(this.ii=!!((r=n.suppressWarning)!==null&&r!==void 0&&r),"flags"in n){if(n.flags===!1)this._instance.persistence.unregister(dx),O_.info("Flag overrides cleared");else if(n.flags){if(ss(n.flags)){for(var s={},i=0;i<n.flags.length;i++)s[n.flags[i]]=!0;this._instance.persistence.register({[dx]:s})}else this._instance.persistence.register({[dx]:n.flags});O_.info("Flag overrides set",{flags:n.flags})}}return"payloads"in n&&(n.payloads===!1?(this._instance.persistence.unregister(__),O_.info("Payload overrides cleared")):n.payloads&&(this._instance.persistence.register({[__]:n.payloads}),O_.info("Payload overrides set",{payloads:n.payloads}))),void this.pi()}this.pi()}onFeatureFlags(t){if(this.addFeatureFlagsHandler(t),this.ei){var{flags:r,flagVariants:n}=this.gi();t(r,n)}return()=>this.removeFeatureFlagsHandler(t)}updateEarlyAccessFeatureEnrollment(t,r,n){var s,i=(this._instance.get_property(W_)||[]).find((c=>c.flagKey===t)),o={["$feature_enrollment/"+t]:r},a={$feature_flag:t,$feature_enrollment:r,$set:o};i&&(a.$early_access_feature_name=i.name),n&&(a.$feature_enrollment_stage=n),this._instance.capture("$feature_enrollment_update",a),this.setPersonPropertiesForFlags(o,!1);var l=Dt({},this.getFlagVariants(),{[t]:r});(s=this._instance.persistence)==null||s.register({[dB]:Object.keys($1e(l)),[zx]:l}),this.pi()}getEarlyAccessFeatures(t,r,n){r===void 0&&(r=!1);var s=this._instance.get_property(W_),i=n?"&"+n.map((o=>"stage="+o)).join("&"):"";if(s&&!r)return t(s);this._instance.ci({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this._instance.config.token+i),method:"GET",callback:o=>{var a,l;if(o.json){var c=o.json.earlyAccessFeatures;return(a=this._instance.persistence)==null||a.unregister(W_),(l=this._instance.persistence)==null||l.register({[W_]:c}),t(c)}}})}gi(){var t=this.getFlags(),r=this.getFlagVariants();return{flags:t.filter((n=>r[n])),flagVariants:Object.keys(r).filter((n=>r[n])).reduce(((n,s)=>(n[s]=r[s],n)),{})}}pi(t){var{flags:r,flagVariants:n}=this.gi();this.featureFlagEventHandlers.forEach((s=>s(r,n,{errorsLoading:t})))}setPersonPropertiesForFlags(t,r){r===void 0&&(r=!0);var n=this._instance.get_property(G_)||{};this._instance.register({[G_]:Dt({},n,t)}),r&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(G_)}setGroupPropertiesForFlags(t,r){r===void 0&&(r=!0);var n=this._instance.get_property(av)||{};Object.keys(n).length!==0&&Object.keys(n).forEach((s=>{n[s]=Dt({},n[s],t[s]),delete t[s]})),this._instance.register({[av]:Dt({},n,t)}),r&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(t){if(t){var r=this._instance.get_property(av)||{};this._instance.register({[av]:Dt({},r,{[t]:{}})})}else this._instance.unregister(av)}reset(){this.ei=!1,this.ri=!1,this.si=!1,this.ni=!1,this.oi=!1,this.ai=!1,this.$anon_distinct_id=void 0,this.di(),this.ii=!1}}var Z6r=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class fB{constructor(t,r){this.F=t,this.props={},this.mi=!1,this.yi=(n=>{var s="";return n.token&&(s=n.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),n.persistence_name?"ph_"+n.persistence_name:"ph_"+s+"_posthog"})(t),this.Y=this.bi(t),this.load(),t.debug&&St.info("Persistence loaded",t.persistence,Dt({},this.props)),this.update_config(t,t,r),this.save()}isDisabled(){return!!this.wi}bi(t){Z6r.indexOf(t.persistence.toLowerCase())===-1&&(St.critical("Unknown persistence type "+t.persistence+"; falling back to localStorage+cookie"),t.persistence="localStorage+cookie");var r=t.persistence.toLowerCase();return r==="localstorage"&&Ys.H()?Ys:r==="localstorage+cookie"&&a$.H()?a$:r==="sessionstorage"&&Co.H()?Co:r==="memory"?r6r:r==="cookie"?Qf:a$.H()?a$:Qf}properties(){var t={};return ys(this.props,(function(r,n){if(n===zx&&no(r))for(var s=Object.keys(r),i=0;i<s.length;i++)t["$feature/"+s[i]]=r[s[i]];else a=n,l=!1,(lm(o=R5r)?l:Zxe&&o.indexOf===Zxe?o.indexOf(a)!=-1:(ys(o,(function(c){if(l||(l=c===a))return G4})),l))||(t[n]=r);var o,a,l})),t}load(){if(!this.wi){var t=this.Y.W(this.yi);t&&(this.props=wi({},t))}}save(){this.wi||this.Y.G(this.yi,this.props,this.xi,this.Si,this.Ei,this.F.debug)}remove(){this.Y.V(this.yi,!1),this.Y.V(this.yi,!0)}clear(){this.remove(),this.props={}}register_once(t,r,n){if(no(t)){bt(r)&&(r="None"),this.xi=bt(n)?this.$i:n;var s=!1;if(ys(t,((i,o)=>{this.props.hasOwnProperty(o)&&this.props[o]!==r||(this.props[o]=i,s=!0)})),s)return this.save(),!0}return!1}register(t,r){if(no(t)){this.xi=bt(r)?this.$i:r;var n=!1;if(ys(t,((s,i)=>{t.hasOwnProperty(i)&&this.props[i]!==s&&(this.props[i]=s,n=!0)})),n)return this.save(),!0}return!1}unregister(t){t in this.props&&(delete this.props[t],this.save())}update_campaign_params(){if(!this.mi){var t=qHe(this.F.custom_campaign_params,this.F.mask_personal_data_properties,this.F.custom_personal_data_properties);Lx($te(t))||this.register(t),this.mi=!0}}update_search_keyword(){var t;this.register((t=wt?.referrer)?WHe(t):{})}update_referrer_info(){var t;this.register_once({$referrer:GHe(),$referring_domain:wt!=null&&wt.referrer&&((t=tN(wt.referrer))==null?void 0:t.host)||"$direct"},void 0)}set_initial_person_info(){this.props[xq]||this.props[wq]||this.register_once({[J4]:XHe(this.F.mask_personal_data_properties,this.F.custom_personal_data_properties)},void 0)}get_initial_props(){var t={};ys([wq,xq],(o=>{var a=this.props[o];a&&ys(a,(function(l,c){t["$initial_"+uq(c)]=l}))}));var r,n,s=this.props[J4];if(s){var i=(r=YHe(s),n={},ys(r,(function(o,a){n["$initial_"+uq(a)]=o})),n);wi(t,i)}return t}safe_merge(t){return ys(this.props,(function(r,n){n in t||(t[n]=r)})),t}update_config(t,r,n){if(this.$i=this.xi=t.cookie_expiration,this.set_disabled(t.disable_persistence||!!n),this.set_cross_subdomain(t.cross_subdomain_cookie),this.set_secure(t.secure_cookie),t.persistence!==r.persistence){var s=this.bi(t),i=this.props;this.clear(),this.Y=s,this.props=i,this.save()}}set_disabled(t){this.wi=t,this.wi?this.remove():this.save()}set_cross_subdomain(t){t!==this.Si&&(this.Si=t,this.remove(),this.save())}set_secure(t){t!==this.Ei&&(this.Ei=t,this.remove(),this.save())}set_event_timer(t,r){var n=this.props[H_]||{};n[t]=r,this.props[H_]=n,this.save()}remove_event_timer(t){var r=(this.props[H_]||{})[t];return bt(r)||(delete this.props[H_][t],this.save()),r}get_property(t){return this.props[t]}set_property(t,r){this.props[t]=r,this.save()}}var k_=(function(e){return e.Activation="events",e.Cancellation="cancelEvents",e})({});(function(e){return e.Button="button",e.Tab="tab",e.Selector="selector",e})({});(function(e){return e.TopLeft="top_left",e.TopRight="top_right",e.TopCenter="top_center",e.MiddleLeft="middle_left",e.MiddleRight="middle_right",e.MiddleCenter="middle_center",e.Left="left",e.Center="center",e.Right="right",e.NextToTrigger="next_to_trigger",e})({});(function(e){return e.Top="top",e.Left="left",e.Right="right",e.Bottom="bottom",e})({});var pB=(function(e){return e.Popover="popover",e.API="api",e.Widget="widget",e.ExternalSurvey="external_survey",e})({});(function(e){return e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link",e})({});(function(e){return e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question",e})({});(function(e){return e.Once="once",e.Recurring="recurring",e.Always="always",e})({});var pI=(function(e){return e.SHOWN="survey shown",e.DISMISSED="survey dismissed",e.SENT="survey sent",e})({}),I1e=(function(e){return e.SURVEY_ID="$survey_id",e.SURVEY_NAME="$survey_name",e.SURVEY_RESPONSE="$survey_response",e.SURVEY_ITERATION="$survey_iteration",e.SURVEY_ITERATION_START_DATE="$survey_iteration_start_date",e.SURVEY_PARTIALLY_COMPLETED="$survey_partially_completed",e.SURVEY_SUBMISSION_ID="$survey_submission_id",e.SURVEY_QUESTIONS="$survey_questions",e.SURVEY_COMPLETED="$survey_completed",e})({}),oWe=(function(e){return e.Popover="popover",e.Inline="inline",e})({});class Vte{constructor(){this.ki={},this.ki={}}on(t,r){return this.ki[t]||(this.ki[t]=[]),this.ki[t].push(r),()=>{this.ki[t]=this.ki[t].filter((n=>n!==r))}}emit(t,r){for(var n of this.ki[t]||[])n(r);for(var s of this.ki["*"]||[])s(t,r)}}function fx(e,t,r){if(Yn(e))return!1;switch(r){case"exact":return e===t;case"contains":var n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(n,"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch{return!1}default:return!1}}class q6r{constructor(t){this.Pi=new Vte,this.Ti=(r,n)=>this.Ri(r,n)&&this.Ii(r,n)&&this.Fi(r,n)&&this.Ci(r,n),this.Ri=(r,n)=>n==null||!n.event||r?.event===n?.event,this._instance=t,this.Mi=new Set,this.Oi=new Set}init(){var t;if(!bt((t=this._instance)==null?void 0:t.Ai)){var r;(r=this._instance)==null||r.Ai(((n,s)=>{this.on(n,s)}))}}register(t){var r,n;if(!bt((r=this._instance)==null?void 0:r.Ai)&&(t.forEach((o=>{var a,l;(a=this.Oi)==null||a.add(o),(l=o.steps)==null||l.forEach((c=>{var u;(u=this.Mi)==null||u.add(c?.event||"")}))})),(n=this._instance)!=null&&n.autocapture)){var s,i=new Set;t.forEach((o=>{var a;(a=o.steps)==null||a.forEach((l=>{l!=null&&l.selector&&i.add(l?.selector)}))})),(s=this._instance)==null||s.autocapture.setElementSelectors(i)}}on(t,r){var n;r!=null&&t.length!=0&&(this.Mi.has(t)||this.Mi.has(r?.event))&&this.Oi&&((n=this.Oi)==null?void 0:n.size)>0&&this.Oi.forEach((s=>{this.Di(r,s)&&this.Pi.emit("actionCaptured",s.name)}))}ji(t){this.onAction("actionCaptured",(r=>t(r)))}Di(t,r){if(r?.steps==null)return!1;for(var n of r.steps)if(this.Ti(t,n))return!0;return!1}onAction(t,r){return this.Pi.on(t,r)}Ii(t,r){if(r!=null&&r.url){var n,s=t==null||(n=t.properties)==null?void 0:n.$current_url;if(!s||typeof s!="string"||!fx(s,r.url,r.url_matching||"contains"))return!1}return!0}Fi(t,r){return!!this.Li(t,r)&&!!this.Ni(t,r)&&!!this.Ui(t,r)}Li(t,r){var n;if(r==null||!r.href)return!0;var s=this.zi(t);if(s.length>0)return s.some((a=>fx(a.href,r.href,r.href_matching||"exact")));var i,o=(t==null||(n=t.properties)==null?void 0:n.$elements_chain)||"";return!!o&&fx((i=o.match(/(?::|")href="(.*?)"/))?i[1]:"",r.href,r.href_matching||"exact")}Ni(t,r){var n;if(r==null||!r.text)return!0;var s=this.zi(t);if(s.length>0)return s.some((c=>fx(c.text,r.text,r.text_matching||"exact")||fx(c.$el_text,r.text,r.text_matching||"exact")));var i,o,a,l=(t==null||(n=t.properties)==null?void 0:n.$elements_chain)||"";return!!l&&(i=(function(c){for(var u,d=[],p=/(?::|")text="(.*?)"/g;!Yn(u=p.exec(c));)d.includes(u[1])||d.push(u[1]);return d})(l),o=r.text,a=r.text_matching||"exact",i.some((c=>fx(c,o,a))))}Ui(t,r){var n,s;if(r==null||!r.selector)return!0;var i=t==null||(n=t.properties)==null?void 0:n.$element_selectors;if(i!=null&&i.includes(r.selector))return!0;var o=(t==null||(s=t.properties)==null?void 0:s.$elements_chain)||"";if(r.selector_regex&&o)try{return new RegExp(r.selector_regex).test(o)}catch{return!1}return!1}zi(t){var r;return(t==null||(r=t.properties)==null?void 0:r.$elements)==null?[]:t?.properties.$elements}Ci(t,r){return r==null||!r.properties||r.properties.length===0||iWe(r.properties.reduce(((n,s)=>{var i=ss(s.value)?s.value.map(String):s.value!=null?[String(s.value)]:[];return n[s.key]={values:i,operator:s.operator||"exact"},n}),{}),t?.properties)}}var In=to("[Surveys]"),Dq="seenSurvey_",H6r=(e,t)=>{var r="$survey_"+t+"/"+e.id;return e.current_iteration&&e.current_iteration>0&&(r="$survey_"+t+"/"+e.id+"/"+e.current_iteration),r},N1e=e=>{var t=""+Dq+e.id;return e.current_iteration&&e.current_iteration>0&&(t=""+Dq+e.id+"_"+e.current_iteration),t},W6r=[pB.Popover,pB.Widget,pB.API],G6r={ignoreConditions:!1,ignoreDelay:!1,displayType:oWe.Popover};class X6r{constructor(t){this._instance=t,this.Hi=new Map,this.Bi=new Map,this.qi=new Map}Wi(t,r){return!!t&&iWe(t.propertyFilters,r?.properties)}Gi(t,r){var n=new Map;return t.forEach((s=>{var i;(i=s.conditions)==null||(i=i[r])==null||(i=i.values)==null||i.forEach((o=>{if(o!=null&&o.name){var a=n.get(o.name)||[];a.push(s.id),n.set(o.name,a)}}))})),n}Vi(t,r,n){var s,i=(n===k_.Activation?this.Hi:this.Bi).get(t),o=[];return(s=this._instance)==null||s.getSurveys((a=>{o=a.filter((l=>i?.includes(l.id)))})),o.filter((a=>{var l,c=(l=a.conditions)==null||(l=l[n])==null||(l=l.values)==null?void 0:l.find((u=>u.name===t));return this.Wi(c,r)}))}register(t){var r;bt((r=this._instance)==null?void 0:r.Ai)||(this.Ji(t),this.Ki(t))}Ki(t){var r=t.filter((n=>{var s,i;return((s=n.conditions)==null?void 0:s.actions)&&((i=n.conditions)==null||(i=i.actions)==null||(i=i.values)==null?void 0:i.length)>0}));r.length!==0&&(this.Yi==null&&(this.Yi=new q6r(this._instance),this.Yi.init(),this.Yi.ji((n=>{this.onAction(n)}))),r.forEach((n=>{var s,i,o,a,l;n.conditions&&(s=n.conditions)!=null&&s.actions&&(i=n.conditions)!=null&&(i=i.actions)!=null&&i.values&&((o=n.conditions)==null||(o=o.actions)==null||(o=o.values)==null?void 0:o.length)>0&&((a=this.Yi)==null||a.register(n.conditions.actions.values),(l=n.conditions)==null||(l=l.actions)==null||(l=l.values)==null||l.forEach((c=>{if(c&&c.name){var u=this.qi.get(c.name);u&&u.push(n.id),this.qi.set(c.name,u||[n.id])}})))})))}Ji(t){var r,n=t.filter((i=>{var o,a;return((o=i.conditions)==null?void 0:o.events)&&((a=i.conditions)==null||(a=a.events)==null||(a=a.values)==null?void 0:a.length)>0})),s=t.filter((i=>{var o,a;return((o=i.conditions)==null?void 0:o.cancelEvents)&&((a=i.conditions)==null||(a=a.cancelEvents)==null||(a=a.values)==null?void 0:a.length)>0}));(n.length!==0||s.length!==0)&&((r=this._instance)==null||r.Ai(((i,o)=>{this.onEvent(i,o)})),this.Hi=this.Gi(t,k_.Activation),this.Bi=this.Gi(t,k_.Cancellation))}onEvent(t,r){var n,s=((n=this._instance)==null||(n=n.persistence)==null?void 0:n.props[o$])||[];if(pI.SHOWN===t&&r&&s.length>0){var i;In.info("survey event matched, removing survey from activated surveys",{event:t,eventPayload:r,existingActivatedSurveys:s});var o=r==null||(i=r.properties)==null?void 0:i.$survey_id;if(o){var a=s.indexOf(o);a>=0&&(s.splice(a,1),this.Xi(s))}}else{if(this.Bi.has(t)){var l=this.Vi(t,r,k_.Cancellation);l.length>0&&(In.info("cancel event matched, cancelling surveys",{event:t,surveysToCancel:l.map((u=>u.id))}),l.forEach((u=>{var d,p=s.indexOf(u.id);p>=0&&s.splice(p,1),(d=this._instance)==null||d.cancelPendingSurvey(u.id)})),this.Xi(s))}if(this.Hi.has(t)){In.info("survey event name matched",{event:t,eventPayload:r,surveys:this.Hi.get(t)});var c=this.Vi(t,r,k_.Activation);this.Xi(s.concat(c.map((u=>u.id))||[]))}}}onAction(t){var r,n=((r=this._instance)==null||(r=r.persistence)==null?void 0:r.props[o$])||[];this.qi.has(t)&&this.Xi(n.concat(this.qi.get(t)||[]))}Xi(t){var r;In.info("updating activated surveys",{activatedSurveys:t}),(r=this._instance)==null||(r=r.persistence)==null||r.register({[o$]:[...new Set(t)]})}getSurveys(){var t,r=(t=this._instance)==null||(t=t.persistence)==null?void 0:t.props[o$];return r||[]}getEventToSurveys(){return this.Hi}Qi(){return this.Yi}}class Y6r{constructor(t){this.Zi=void 0,this._surveyManager=null,this.te=!1,this.ie=!1,this.ee=[],this._instance=t,this._surveyEventReceiver=null}onRemoteConfig(t){if(!this._instance.config.disable_surveys){var r=t.surveys;if(Yn(r))return In.warn("Flags not loaded yet. Not loading surveys.");var n=ss(r);this.Zi=n?r.length>0:r,In.info("flags response received, isSurveysEnabled: "+this.Zi),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var t=[],r=0;r<localStorage.length;r++){var n=localStorage.key(r);(n!=null&&n.startsWith(Dq)||n!=null&&n.startsWith("inProgressSurvey_"))&&t.push(n)}t.forEach((s=>localStorage.removeItem(s)))}loadIfEnabled(){if(!this._surveyManager)if(this.ie)In.info("Already initializing surveys, skipping...");else if(this._instance.config.disable_surveys)In.info("Disabled. Not loading surveys.");else if(this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())In.info("Not loading surveys in cookieless mode without consent.");else{var t=pr?.__PosthogExtensions__;if(t){if(!bt(this.Zi)||this._instance.config.advanced_enable_surveys){var r=this.Zi||this._instance.config.advanced_enable_surveys;this.ie=!0;try{var n=t.generateSurveys;if(n)return void this.re(n,r);var s=t.loadExternalDependency;if(!s)return void this.se("PostHog loadExternalDependency extension not found.");s(this._instance,"surveys",(i=>{i||!t.generateSurveys?this.se("Could not load surveys script",i):this.re(t.generateSurveys,r)}))}catch(i){throw this.se("Error initializing surveys",i),i}finally{this.ie=!1}}}else In.error("PostHog Extensions not found.")}}re(t,r){this._surveyManager=t(this._instance,r),this._surveyEventReceiver=new X6r(this._instance),In.info("Surveys loaded successfully"),this.ne({isLoaded:!0})}se(t,r){In.error(t,r),this.ne({isLoaded:!1,error:t})}onSurveysLoaded(t){return this.ee.push(t),this._surveyManager&&this.ne({isLoaded:!0}),()=>{this.ee=this.ee.filter((r=>r!==t))}}getSurveys(t,r){if(r===void 0&&(r=!1),this._instance.config.disable_surveys)return In.info("Disabled. Not loading surveys."),t([]);var n=this._instance.get_property(yq);if(n&&!r)return t(n,{isLoaded:!0});if(this.te)return t([],{isLoaded:!1,error:"Surveys are already being loaded"});try{this.te=!0,this._instance.ci({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this._instance.config.token),method:"GET",timeout:this._instance.config.surveys_request_timeout_ms,callback:s=>{var i;this.te=!1;var o=s.statusCode;if(o!==200||!s.json){var a="Surveys API could not be loaded, status: "+o;return In.error(a),t([],{isLoaded:!1,error:a})}var l,c=s.json.surveys||[],u=c.filter((d=>(function(p){return!(!p.start_date||p.end_date)})(d)&&((function(p){var m;return!((m=p.conditions)==null||(m=m.events)==null||(m=m.values)==null||!m.length)})(d)||(function(p){var m;return!((m=p.conditions)==null||(m=m.actions)==null||(m=m.values)==null||!m.length)})(d))));return u.length>0&&((l=this._surveyEventReceiver)==null||l.register(u)),(i=this._instance.persistence)==null||i.register({[yq]:c}),t(c,{isLoaded:!0})}})}catch(s){throw this.te=!1,s}}ne(t){for(var r of this.ee)try{if(!t.isLoaded)return r([],t);this.getSurveys(r)}catch(n){In.error("Error in survey callback",n)}}getActiveMatchingSurveys(t,r){if(r===void 0&&(r=!1),!Yn(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(t,r);In.warn("init was not called")}oe(t){var r=null;return this.getSurveys((n=>{var s;r=(s=n.find((i=>i.id===t)))!==null&&s!==void 0?s:null})),r}ae(t){if(Yn(this._surveyManager))return{eligible:!1,reason:"SDK is not enabled or survey functionality is not yet loaded"};var r=typeof t=="string"?this.oe(t):t;return r?this._surveyManager.checkSurveyEligibility(r):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(t){if(Yn(this._surveyManager))return In.warn("init was not called"),{visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"};var r=this.ae(t);return{visible:r.eligible,disabledReason:r.reason}}canRenderSurveyAsync(t,r){return Yn(this._surveyManager)?(In.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"})):new Promise((n=>{this.getSurveys((s=>{var i,o=(i=s.find((l=>l.id===t)))!==null&&i!==void 0?i:null;if(o){var a=this.ae(o);n({visible:a.eligible,disabledReason:a.reason})}else n({visible:!1,disabledReason:"Survey not found"})}),r)}))}renderSurvey(t,r){var n;if(Yn(this._surveyManager))In.warn("init was not called");else{var s=typeof t=="string"?this.oe(t):t;if(s!=null&&s.id)if(W6r.includes(s.type)){var i=wt?.querySelector(r);if(i)return(n=s.appearance)!=null&&n.surveyPopupDelaySeconds?(In.info("Rendering survey "+s.id+" with delay of "+s.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout((()=>{var o,a;In.info("Rendering survey "+s.id+" with delay of "+((o=s.appearance)==null?void 0:o.surveyPopupDelaySeconds)+" seconds"),(a=this._surveyManager)==null||a.renderSurvey(s,i),In.info("Survey "+s.id+" rendered")}),1e3*s.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(s,i);In.warn("Survey element not found")}else In.warn("Surveys of type "+s.type+" cannot be rendered in the app");else In.warn("Survey not found")}}displaySurvey(t,r){var n;if(Yn(this._surveyManager))In.warn("init was not called");else{var s=this.oe(t);if(s){var i=s;if((n=s.appearance)!=null&&n.surveyPopupDelaySeconds&&r.ignoreDelay&&(i=Dt({},s,{appearance:Dt({},s.appearance,{surveyPopupDelaySeconds:0})})),r.ignoreConditions===!1){var o=this.canRenderSurvey(s);if(!o.visible)return void In.warn("Survey is not eligible to be displayed: ",o.disabledReason)}r.displayType!==oWe.Inline?this._surveyManager.handlePopoverSurvey(i):this.renderSurvey(i,r.selector)}else In.warn("Survey not found")}}cancelPendingSurvey(t){Yn(this._surveyManager)?In.warn("init was not called"):this._surveyManager.cancelSurvey(t)}}var R1e=to("[RateLimiter]");class J6r{constructor(t){var r,n;this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=s=>{var i=s.text;if(i&&i.length)try{(JSON.parse(i).quota_limited||[]).forEach((o=>{R1e.info((o||"events")+" is quota limited."),this.serverLimits[o]=new Date().getTime()+6e4}))}catch(o){return void R1e.warn('could not rate limit - continuing. Error: "'+o?.message+'"',{text:i})}},this.instance=t,this.captureEventsPerSecond=((r=t.config.rate_limiting)==null?void 0:r.events_per_second)||10,this.captureEventsBurstLimit=Math.max(((n=t.config.rate_limiting)==null?void 0:n.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond),this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}clientRateLimitContext(t){var r,n,s;t===void 0&&(t=!1);var i=new Date().getTime(),o=(r=(n=this.instance.persistence)==null?void 0:n.get_property(bq))!==null&&r!==void 0?r:{tokens:this.captureEventsBurstLimit,last:i};o.tokens+=(i-o.last)/1e3*this.captureEventsPerSecond,o.last=i,o.tokens>this.captureEventsBurstLimit&&(o.tokens=this.captureEventsBurstLimit);var a=o.tokens<1;return a||t||(o.tokens=Math.max(0,o.tokens-1)),!a||this.lastEventRateLimited||t||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+this.captureEventsPerSecond+" events per second and "+this.captureEventsBurstLimit+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=a,(s=this.instance.persistence)==null||s.set_property(bq,o),{isRateLimited:a,remainingTokens:o.tokens}}isServerRateLimited(t){var r=this.serverLimits[t||"events"]||!1;return r!==!1&&new Date().getTime()<r}}var tv=to("[RemoteConfig]");class K6r{constructor(t){this._instance=t}get remoteConfig(){var t;return(t=pr._POSTHOG_REMOTE_CONFIG)==null||(t=t[this._instance.config.token])==null?void 0:t.config}le(t){var r,n;(r=pr.__PosthogExtensions__)!=null&&r.loadExternalDependency?(n=pr.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"remote-config",(()=>t(this.remoteConfig))):(tv.error("PostHog Extensions not found. Cannot load remote config."),t())}ue(t){this._instance.ci({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback:r=>{t(r.json)}})}load(){try{if(this.remoteConfig)return tv.info("Using preloaded remote config",this.remoteConfig),void this.fi(this.remoteConfig);if(this._instance.O())return void tv.warn("Remote config is disabled. Falling back to local config.");this.le((t=>{if(!t)return tv.info("No config found after loading remote JS config. Falling back to JSON."),void this.ue((r=>{this.fi(r)}));this.fi(t)}))}catch(t){tv.error("Error loading remote config",t)}}fi(t){t?this._instance.config.__preview_remote_config?(this._instance.fi(t),t.hasFeatureFlags!==!1&&this._instance.featureFlags.ensureFlagsLoaded()):tv.info("__preview_remote_config is disabled. Logging config instead",t):tv.error("Failed to fetch remote config from PostHog.")}}var Aq=3e3;class eRr{constructor(t,r){this.he=!0,this.ve=[],this.de=If(r?.flush_interval_ms||Aq,250,5e3,St.createLogger("flush interval"),Aq),this.ce=t}enqueue(t){this.ve.push(t),this.fe||this.pe()}unload(){this.ge();var t=this.ve.length>0?this._e():{},r=Object.values(t);[...r.filter((n=>n.url.indexOf("/e")===0)),...r.filter((n=>n.url.indexOf("/e")!==0))].map((n=>{this.ce(Dt({},n,{transport:"sendBeacon"}))}))}enable(){this.he=!1,this.pe()}pe(){var t=this;this.he||(this.fe=setTimeout((()=>{if(this.ge(),this.ve.length>0){var r=this._e(),n=function(){var i=r[s],o=new Date().getTime();i.data&&ss(i.data)&&ys(i.data,(a=>{a.offset=Math.abs(a.timestamp-o),delete a.timestamp})),t.ce(i)};for(var s in r)n()}}),this.de))}ge(){clearTimeout(this.fe),this.fe=void 0}_e(){var t={};return ys(this.ve,(r=>{var n,s=r,i=(s?s.batchKey:null)||s.url;bt(t[i])&&(t[i]=Dt({},s,{data:[]})),(n=t[i].data)==null||n.push(s.data)})),this.ve=[],t}}var tRr=["retriesPerformedSoFar"];class rRr{constructor(t){this.me=!1,this.ye=3e3,this.ve=[],this._instance=t,this.ve=[],this.be=!0,!bt(Pe)&&"onLine"in Pe.navigator&&(this.be=Pe.navigator.onLine,this.we=()=>{this.be=!0,this.Dt()},this.xe=()=>{this.be=!1},Ni(Pe,"online",this.we),Ni(Pe,"offline",this.xe))}get length(){return this.ve.length}retriableRequest(t){var{retriesPerformedSoFar:r}=t,n=tHe(t,tRr);ip(r)&&r>0&&(n.url=aN(n.url,{retry_count:r})),this._instance.ci(Dt({},n,{callback:s=>{s.statusCode!==200&&(s.statusCode<400||s.statusCode>=500)&&(r??0)<10?this.Se(Dt({retriesPerformedSoFar:r},n)):n.callback==null||n.callback(s)}}))}Se(t){var r=t.retriesPerformedSoFar||0;t.retriesPerformedSoFar=r+1;var n=(function(o){var a=3e3*Math.pow(2,o),l=a/2,c=Math.min(18e5,a),u=(Math.random()-.5)*(c-l);return Math.ceil(c+u)})(r),s=Date.now()+n;this.ve.push({retryAt:s,requestOptions:t});var i="Enqueued failed request for retry in "+n;navigator.onLine||(i+=" (Browser is offline)"),St.warn(i),this.me||(this.me=!0,this.Ee())}Ee(){if(this.$e&&clearTimeout(this.$e),this.ve.length===0)return this.me=!1,void(this.$e=void 0);this.$e=setTimeout((()=>{this.be&&this.ve.length>0&&this.Dt(),this.Ee()}),this.ye)}Dt(){var t=Date.now(),r=[],n=this.ve.filter((i=>i.retryAt<t||(r.push(i),!1)));if(this.ve=r,n.length>0)for(var{requestOptions:s}of n)this.retriableRequest(s)}unload(){for(var{requestOptions:t}of(this.$e&&(clearTimeout(this.$e),this.$e=void 0),this.me=!1,bt(Pe)||(this.we&&(Pe.removeEventListener("online",this.we),this.we=void 0),this.xe&&(Pe.removeEventListener("offline",this.xe),this.xe=void 0)),this.ve))try{this._instance.ci(Dt({},t,{transport:"sendBeacon"}))}catch(r){St.error(r)}this.ve=[]}}class nRr{constructor(t){this.ke=()=>{var r,n,s,i;this.Pe||(this.Pe={});var o=this.scrollElement(),a=this.scrollY(),l=o?Math.max(0,o.scrollHeight-o.clientHeight):0,c=a+(o?.clientHeight||0),u=o?.scrollHeight||0;this.Pe.lastScrollY=Math.ceil(a),this.Pe.maxScrollY=Math.max(a,(r=this.Pe.maxScrollY)!==null&&r!==void 0?r:0),this.Pe.maxScrollHeight=Math.max(l,(n=this.Pe.maxScrollHeight)!==null&&n!==void 0?n:0),this.Pe.lastContentY=c,this.Pe.maxContentY=Math.max(c,(s=this.Pe.maxContentY)!==null&&s!==void 0?s:0),this.Pe.maxContentHeight=Math.max(u,(i=this.Pe.maxContentHeight)!==null&&i!==void 0?i:0)},this._instance=t}getContext(){return this.Pe}resetContext(){var t=this.Pe;return setTimeout(this.ke,0),t}startMeasuringScrollPosition(){Ni(Pe,"scroll",this.ke,{capture:!0}),Ni(Pe,"scrollend",this.ke,{capture:!0}),Ni(Pe,"resize",this.ke)}scrollElement(){if(!this._instance.config.scroll_root_selector)return Pe?.document.documentElement;var t=ss(this._instance.config.scroll_root_selector)?this._instance.config.scroll_root_selector:[this._instance.config.scroll_root_selector];for(var r of t){var n=Pe?.document.querySelector(r);if(n)return n}}scrollY(){if(this._instance.config.scroll_root_selector){var t=this.scrollElement();return t&&t.scrollTop||0}return Pe&&(Pe.scrollY||Pe.pageYOffset||Pe.document.documentElement.scrollTop)||0}scrollX(){if(this._instance.config.scroll_root_selector){var t=this.scrollElement();return t&&t.scrollLeft||0}return Pe&&(Pe.scrollX||Pe.pageXOffset||Pe.document.documentElement.scrollLeft)||0}}var sRr=e=>XHe(e?.config.mask_personal_data_properties,e?.config.custom_personal_data_properties);class M1e{constructor(t,r,n,s){this.Te=i=>{var o=this.Re();if(!o||o.sessionId!==i){var a={sessionId:i,props:this.Ie(this._instance)};this.Fe.register({[vq]:a})}},this._instance=t,this.Ce=r,this.Fe=n,this.Ie=s||sRr,this.Ce.onSessionId(this.Te)}Re(){return this.Fe.props[vq]}getSetOnceProps(){var t,r=(t=this.Re())==null?void 0:t.props;return r?"r"in r?YHe(r):{$referring_domain:r.referringDomain,$pathname:r.initialPathName,utm_source:r.utm_source,utm_campaign:r.utm_campaign,utm_medium:r.utm_medium,utm_content:r.utm_content,utm_term:r.utm_term}:{}}getSessionProps(){var t={};return ys($te(this.getSetOnceProps()),((r,n)=>{n==="$current_url"&&(n="url"),t["$session_entry_"+uq(n)]=r})),t}}var hB=to("[SessionId]");class j1e{on(t,r){return this.Me.on(t,r)}constructor(t,r,n){var s;if(this.Oe=[],this.Ae=void 0,this.Me=new Vte,this.De=(u,d)=>Math.abs(u-d)>this.sessionTimeoutMs,!t.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(t.config.cookieless_mode==="always")throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.F=t.config,this.Fe=t.persistence,this.je=void 0,this.Le=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.Ne=r||gg,this.Ue=n||gg;var i=this.F.persistence_name||this.F.token,o=this.F.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*If(o,60,36e3,hB.createLogger("session_idle_timeout_seconds"),1800),t.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.ze(),this.He="ph_"+i+"_window_id",this.Be="ph_"+i+"_primary_window_exists",this.qe()){var a=Co.W(this.He),l=Co.W(this.Be);a&&!l?this.je=a:Co.V(this.He),Co.G(this.Be,!0)}if((s=this.F.bootstrap)!=null&&s.sessionID)try{var c=(u=>{var d=u.replace(/-/g,"");if(d.length!==32)throw new Error("Not a valid UUID");if(d[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(d.substring(0,12),16)})(this.F.bootstrap.sessionID);this.We(this.F.bootstrap.sessionID,new Date().getTime(),c)}catch(u){hB.error("Invalid sessionID in bootstrap",u)}this.Ge()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(t){return bt(this.Oe)&&(this.Oe=[]),this.Oe.push(t),this.Le&&t(this.Le,this.je),()=>{this.Oe=this.Oe.filter((r=>r!==t))}}qe(){return this.F.persistence!=="memory"&&!this.Fe.wi&&Co.H()}Ve(t){t!==this.je&&(this.je=t,this.qe()&&Co.G(this.He,t))}Je(){return this.je?this.je:this.qe()?Co.W(this.He):null}We(t,r,n){t===this.Le&&r===this._sessionActivityTimestamp&&n===this._sessionStartTimestamp||(this._sessionStartTimestamp=n,this._sessionActivityTimestamp=r,this.Le=t,this.Fe.register({[X4]:[r,t,n]}))}Ke(){var t=this.Fe.props[X4];return ss(t)&&t.length===2&&t.push(t[0]),t||[0,null,0]}resetSessionId(){this.We(null,null,null)}destroy(){clearTimeout(this.Ye),this.Ye=void 0,this.Ae&&Pe&&(Pe.removeEventListener("beforeunload",this.Ae,{capture:!1}),this.Ae=void 0),this.Oe=[]}Ge(){this.Ae=()=>{this.qe()&&Co.V(this.Be)},Ni(Pe,"beforeunload",this.Ae,{capture:!1})}checkAndGetSessionAndWindowId(t,r){if(t===void 0&&(t=!1),r===void 0&&(r=null),this.F.cookieless_mode==="always")throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var n=r||new Date().getTime(),[s,i,o]=this.Ke(),a=this.Je(),l=ip(o)&&o>0&&Math.abs(n-o)>864e5,c=!1,u=!i,d=!u&&!t&&this.De(n,s);u||d||l?(i=this.Ne(),a=this.Ue(),hB.info("new session ID generated",{sessionId:i,windowId:a,changeReason:{noSessionId:u,activityTimeout:d,sessionPastMaximumLength:l}}),o=n,c=!0):a||(a=this.Ue(),c=!0);var p=s===0||!t||l?n:s,m=o===0?new Date().getTime():o;return this.Ve(a),this.We(i,p,m),t||this.ze(),c&&this.Oe.forEach((g=>g(i,a,c?{noSessionId:u,activityTimeout:d,sessionPastMaximumLength:l}:void 0))),{sessionId:i,windowId:a,sessionStartTimestamp:m,changeReason:c?{noSessionId:u,activityTimeout:d,sessionPastMaximumLength:l}:void 0,lastActivityTimestamp:s}}ze(){clearTimeout(this.Ye),this.Ye=setTimeout((()=>{var[t]=this.Ke();if(this.De(new Date().getTime(),t)){var r=this.Le;this.resetSessionId(),this.Me.emit("forcedIdleReset",{idleSessionId:r})}}),1.1*this.sessionTimeoutMs)}}var iRr=["$set_once","$set"],Xm=to("[SiteApps]");class oRr{constructor(t){this._instance=t,this.Xe=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}Qe(t,r){if(r){var n=this.globalsForEvent(r);this.Xe.push(n),this.Xe.length>1e3&&(this.Xe=this.Xe.slice(10))}}get siteAppLoaders(){var t;return(t=pr._POSTHOG_REMOTE_CONFIG)==null||(t=t[this._instance.config.token])==null?void 0:t.siteApps}init(){if(this.isEnabled){var t=this._instance.Ai(this.Qe.bind(this));this.Ze=()=>{t(),this.Xe=[],this.Ze=void 0}}}globalsForEvent(t){var r,n,s,i,o,a,l;if(!t)throw new Error("Event payload is required");var c={},u=this._instance.get_property("$groups")||[],d=this._instance.get_property("$stored_group_properties")||{};for(var[p,m]of Object.entries(d))c[p]={id:u[p],type:p,properties:m};var{$set_once:g,$set:v}=t;return{event:Dt({},tHe(t,iRr),{properties:Dt({},t.properties,v?{$set:Dt({},(r=(n=t.properties)==null?void 0:n.$set)!==null&&r!==void 0?r:{},v)}:{},g?{$set_once:Dt({},(s=(i=t.properties)==null?void 0:i.$set_once)!==null&&s!==void 0?s:{},g)}:{}),elements_chain:(o=(a=t.properties)==null?void 0:a.$elements_chain)!==null&&o!==void 0?o:"",distinct_id:(l=t.properties)==null?void 0:l.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:c}}setupSiteApp(t){var r=this.apps[t.id],n=()=>{var a;!r.errored&&this.Xe.length&&(Xm.info("Processing "+this.Xe.length+" events for site app with id "+t.id),this.Xe.forEach((l=>r.processEvent==null?void 0:r.processEvent(l))),r.processedBuffer=!0),Object.values(this.apps).every((l=>l.processedBuffer||l.errored))&&((a=this.Ze)==null||a.call(this))},s=!1,i=a=>{r.errored=!a,r.loaded=!0,Xm.info("Site app with id "+t.id+" "+(a?"loaded":"errored")),s&&n()};try{var{processEvent:o}=t.init({posthog:this._instance,callback:a=>{i(a)}});o&&(r.processEvent=o),s=!0}catch(a){Xm.error("Error while initializing PostHog app with config id "+t.id,a),i(!1)}if(s&&r.loaded)try{n()}catch(a){Xm.error("Error while processing buffered events PostHog app with config id "+t.id,a),r.errored=!0}}tr(){var t=this.siteAppLoaders||[];for(var r of t)this.apps[r.id]={id:r.id,loaded:!1,errored:!1,processedBuffer:!1};for(var n of t)this.setupSiteApp(n)}ir(t){if(Object.keys(this.apps).length!==0){var r=this.globalsForEvent(t);for(var n of Object.values(this.apps))try{n.processEvent==null||n.processEvent(r)}catch(s){Xm.error("Error while processing event "+t.event+" for site app "+n.id,s)}}}onRemoteConfig(t){var r,n,s,i=this;if((r=this.siteAppLoaders)!=null&&r.length)return this.isEnabled?(this.tr(),void this._instance.on("eventCaptured",(c=>this.ir(c)))):void Xm.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((n=this.Ze)==null||n.call(this),(s=t.siteApps)!=null&&s.length)if(this.isEnabled){var o=function(c){var u;pr["__$$ph_site_app_"+c]=i._instance,(u=pr.__PosthogExtensions__)==null||u.loadSiteApp==null||u.loadSiteApp(i._instance,l,(d=>{if(d)return Xm.error("Error while initializing PostHog app with config id "+c,d)}))};for(var{id:a,url:l}of t.siteApps)o(a)}else Xm.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}var aWe=function(e,t){if(!e)return!1;var r=e.userAgent;if(r&&Gxe(r,t))return!0;try{var n=e?.userAgentData;if(n!=null&&n.brands&&n.brands.some((s=>Gxe(s?.brand,t))))return!0}catch{}return!!e.webdriver},J_=(function(e){return e.US="us",e.EU="eu",e.CUSTOM="custom",e})({}),F1e="i.posthog.com";class aRr{constructor(t){this.er={},this.instance=t}get apiHost(){var t=this.instance.config.api_host.trim().replace(/\/$/,"");return t==="https://app.posthog.com"?"https://us.i.posthog.com":t}get flagsApiHost(){var t=this.instance.config.flags_api_host;return t?t.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var t,r=(t=this.instance.config.ui_host)==null?void 0:t.replace(/\/$/,"");return r||(r=this.apiHost.replace("."+F1e,".posthog.com")),r==="https://app.posthog.com"?"https://us.posthog.com":r}get region(){return this.er[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.er[this.apiHost]=J_.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.er[this.apiHost]=J_.EU:this.er[this.apiHost]=J_.CUSTOM),this.er[this.apiHost]}endpointFor(t,r){if(r===void 0&&(r=""),r&&(r=r[0]==="/"?r:"/"+r),t==="ui")return this.uiHost+r;if(t==="flags")return this.flagsApiHost+r;if(this.region===J_.CUSTOM)return this.apiHost+r;var n=F1e+r;switch(t){case"assets":return"https://"+this.region+"-assets."+n;case"api":return"https://"+this.region+"."+n}}}var lRr={icontains:(e,t)=>!!Pe&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!Pe&&t.href.toLowerCase().indexOf(e.toLowerCase())===-1,regex:(e,t)=>!!Pe&&lN(t.href,e),not_regex:(e,t)=>!!Pe&&!lN(t.href,e),exact:(e,t)=>t.href===e,is_not:(e,t)=>t.href!==e};class Uo{constructor(t){var r=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(n){n===void 0&&(n=!1),r.getWebExperiments((s=>{Uo.rr("retrieved web experiments from the server"),r.sr=new Map,s.forEach((i=>{if(i.feature_flag_key){var o;r.sr&&(Uo.rr("setting flag key ",i.feature_flag_key," to web experiment ",i),(o=r.sr)==null||o.set(i.feature_flag_key,i));var a=r._instance.getFeatureFlag(i.feature_flag_key);Ki(a)&&i.variants[a]&&r.nr(i.name,a,i.variants[a].transforms)}else if(i.variants)for(var l in i.variants){var c=i.variants[l];Uo.ar(c)&&r.nr(i.name,l,c.transforms)}}))}),n)},this._instance=t,this._instance.onFeatureFlags((n=>{this.onFeatureFlags(n)}))}onFeatureFlags(t){if(this._is_bot())Uo.rr("Refusing to render web experiment since the viewer is a likely bot");else if(!this._instance.config.disable_web_experiments){if(Yn(this.sr))return this.sr=new Map,this.loadIfEnabled(),void this.previewWebExperiment();Uo.rr("applying feature flags",t),t.forEach((r=>{var n;if(this.sr&&(n=this.sr)!=null&&n.has(r)){var s,i=this._instance.getFeatureFlag(r),o=(s=this.sr)==null?void 0:s.get(r);i&&o!=null&&o.variants[i]&&this.nr(o.name,i,o.variants[i].transforms)}}))}}previewWebExperiment(){var t=Uo.getWindowLocation();if(t!=null&&t.search){var r=rN(t?.search,"__experiment_id"),n=rN(t?.search,"__experiment_variant");r&&n&&(Uo.rr("previewing web experiments "+r+" && "+n),this.getWebExperiments((s=>{this.lr(parseInt(r),n,s)}),!1,!0))}}loadIfEnabled(){this._instance.config.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(t,r,n){if(this._instance.config.disable_web_experiments&&!n)return t([]);var s=this._instance.get_property("$web_experiments");if(s&&!r)return t(s);this._instance.ci({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this._instance.config.token),method:"GET",callback:i=>{if(i.statusCode!==200||!i.json)return t([]);var o=i.json.experiments||[];return t(o)}})}lr(t,r,n){var s=n.filter((i=>i.id===t));s&&s.length>0&&(Uo.rr("Previewing web experiment ["+s[0].name+"] with variant ["+r+"]"),this.nr(s[0].name,r,s[0].variants[r].transforms))}static ar(t){return!Yn(t.conditions)&&Uo.ur(t)&&Uo.hr(t)}static ur(t){var r;if(Yn(t.conditions)||Yn((r=t.conditions)==null?void 0:r.url))return!0;var n,s,i,o=Uo.getWindowLocation();return!!o&&((n=t.conditions)==null||!n.url||lRr[(s=(i=t.conditions)==null?void 0:i.urlMatchType)!==null&&s!==void 0?s:"icontains"](t.conditions.url,o))}static getWindowLocation(){return Pe?.location}static hr(t){var r;if(Yn(t.conditions)||Yn((r=t.conditions)==null?void 0:r.utm))return!0;var n=qHe();if(n.utm_source){var s,i,o,a,l,c,u,d,p=(s=t.conditions)==null||(s=s.utm)==null||!s.utm_campaign||((i=t.conditions)==null||(i=i.utm)==null?void 0:i.utm_campaign)==n.utm_campaign,m=(o=t.conditions)==null||(o=o.utm)==null||!o.utm_source||((a=t.conditions)==null||(a=a.utm)==null?void 0:a.utm_source)==n.utm_source,g=(l=t.conditions)==null||(l=l.utm)==null||!l.utm_medium||((c=t.conditions)==null||(c=c.utm)==null?void 0:c.utm_medium)==n.utm_medium,v=(u=t.conditions)==null||(u=u.utm)==null||!u.utm_term||((d=t.conditions)==null||(d=d.utm)==null?void 0:d.utm_term)==n.utm_term;return p&&g&&v&&m}return!1}static rr(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];St.info("[WebExperiments] "+t,n)}nr(t,r,n){this._is_bot()?Uo.rr("Refusing to render web experiment since the viewer is a likely bot"):r!=="control"?n.forEach((s=>{if(s.selector){var i;Uo.rr("applying transform of variant "+r+" for experiment "+t+" ",s);var o=(i=document)==null?void 0:i.querySelectorAll(s.selector);o?.forEach((a=>{var l=a;s.html&&(l.innerHTML=s.html),s.css&&l.setAttribute("style",s.css)}))}})):Uo.rr("Control variants leave the page unmodified.")}_is_bot(){return nc&&this._instance?aWe(nc,this._instance.config.custom_blocked_useragents):void 0}}var cRr=to("[PostHog ExternalIntegrations]"),uRr={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class dRr{constructor(t){this._instance=t}it(t,r){var n;(n=pr.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,t,(s=>{if(s)return cRr.error("failed to load script",s);r()}))}startIfEnabledOrStop(){var t=this,r=function(o){var a,l,c;!s||(a=pr.__PosthogExtensions__)!=null&&(a=a.integrations)!=null&&a[o]||t.it(uRr[o],(()=>{var u;(u=pr.__PosthogExtensions__)==null||(u=u.integrations)==null||(u=u[o])==null||u.start(t._instance)})),!s&&(l=pr.__PosthogExtensions__)!=null&&(l=l.integrations)!=null&&l[o]&&((c=pr.__PosthogExtensions__)==null||(c=c.integrations)==null||(c=c[o])==null||c.stop())};for(var[n,s]of Object.entries((i=this._instance.config.integrations)!==null&&i!==void 0?i:{})){var i;r(n)}}}var Pq="[SessionRecording]",E_=to(Pq);class L1e{get started(){var t;return!((t=this.vr)==null||!t.isStarted)}get status(){return this.vr?this.vr.status:this.dr&&!this.cr?"disabled":"lazy_loading"}constructor(t){if(this._forceAllowLocalhostNetworkCapture=!1,this.dr=!1,this.pr=void 0,this._instance=t,!this._instance.sessionManager)throw E_.error("started without valid sessionManager"),new Error(Pq+" started without valid sessionManager. This is a bug.");if(this._instance.config.cookieless_mode==="always")throw new Error(Pq+' cannot be used with cookieless_mode="always"')}get cr(){var t,r=!((t=this._instance.get_property(tB))==null||!t.enabled),n=!this._instance.config.disable_session_recording,s=this._instance.config.disable_session_recording||this._instance.consent.isOptedOut();return Pe&&r&&n&&!s}startIfEnabledOrStop(t){var r;if(!this.cr||(r=this.vr)==null||!r.isStarted){var n=!bt(Object.assign)&&!bt(Array.from);this.cr&&n?(this.gr(t),E_.info("starting")):this.stopRecording()}}gr(t){var r,n,s;this.cr&&(pr!=null&&(r=pr.__PosthogExtensions__)!=null&&(r=r.rrweb)!=null&&r.record&&(n=pr.__PosthogExtensions__)!=null&&n.initSessionRecording?this._r(t):(s=pr.__PosthogExtensions__)==null||s.loadExternalDependency==null||s.loadExternalDependency(this._instance,this.mr,(i=>{if(i)return E_.error("could not load recorder",i);this._r(t)})))}stopRecording(){var t,r;(t=this.pr)==null||t.call(this),this.pr=void 0,(r=this.vr)==null||r.stop()}yr(){var t;(t=this._instance.persistence)==null||t.unregister(dHe)}br(t){if(this._instance.persistence){var r,n,s=this._instance.persistence,i=()=>{var o=t.sessionRecording===!1?void 0:t.sessionRecording,a=o?.sampleRate,l=Yn(a)?null:parseFloat(a);Yn(l)&&this.yr();var c=o?.minimumDurationMilliseconds;s.register({[tB]:Dt({enabled:!!o},o,{networkPayloadCapture:Dt({capturePerformance:t.capturePerformance},o?.networkPayloadCapture),canvasRecording:{enabled:o?.recordCanvas,fps:o?.canvasFps,quality:o?.canvasQuality},sampleRate:l,minimumDurationMilliseconds:bt(c)?null:c,endpoint:o?.endpoint,triggerMatchType:o?.triggerMatchType,masking:o?.masking,urlTriggers:o?.urlTriggers})})};i(),(r=this.pr)==null||r.call(this),this.pr=(n=this._instance.sessionManager)==null?void 0:n.onSessionId(i)}}onRemoteConfig(t){"sessionRecording"in t?t.sessionRecording!==!1?(this.br(t),this.dr=!0,this.startIfEnabledOrStop()):this.dr=!0:E_.info("skipping remote config with no sessionRecording",t)}log(t,r){var n;r===void 0&&(r="log"),(n=this.vr)!=null&&n.log?this.vr.log(t,r):E_.warn("log called before recorder was ready")}get mr(){var t,r,n=(t=this._instance)==null||(t=t.persistence)==null?void 0:t.get_property(tB);return(n==null||(r=n.scriptConfig)==null?void 0:r.script)||"lazy-recorder"}_r(t){var r,n;if((r=pr.__PosthogExtensions__)==null||!r.initSessionRecording)throw Error("Called on script loaded before session recording is available");this.vr||(this.vr=(n=pr.__PosthogExtensions__)==null?void 0:n.initSessionRecording(this._instance),this.vr._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),this.vr.start(t)}onRRwebEmit(t){var r;(r=this.vr)==null||r.onRRwebEmit==null||r.onRRwebEmit(t)}overrideLinkedFlag(){var t,r;this.vr||(r=this._instance.persistence)==null||r.register({$replay_override_linked_flag:!0}),(t=this.vr)==null||t.overrideLinkedFlag()}overrideSampling(){var t,r;this.vr||(r=this._instance.persistence)==null||r.register({$replay_override_sampling:!0}),(t=this.vr)==null||t.overrideSampling()}overrideTrigger(t){var r,n;this.vr||(n=this._instance.persistence)==null||n.register({[t==="url"?"$replay_override_url_trigger":"$replay_override_event_trigger"]:!0}),(r=this.vr)==null||r.overrideTrigger(t)}get sdkDebugProperties(){var t;return((t=this.vr)==null?void 0:t.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(t,r){var n;return!((n=this.vr)==null||!n.tryAddCustomEvent(t,r))}}var Lk={},$q=()=>{},_x="posthog",lWe=!z6r&&Ja?.indexOf("MSIE")===-1&&Ja?.indexOf("Mozilla")===-1,z1e=e=>{var t;return Dt({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:N5r(wt?.location),persistence:"localStorage+cookie",persistence_name:"",loaded:$q,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:e??"unset",__preview_deferred_init_extensions:!1,debug:rl&&Ki(rl?.search)&&rl.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:(Pe==null||(t=Pe.location)==null?void 0:t.protocol)==="https:",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error:r=>{var n="Bad HTTP status: "+r.statusCode+" "+r.text;St.error(n)},get_device_id:r=>r,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:"identified_only",before_send:void 0,request_queue_config:{flush_interval_ms:Aq},error_tracking:{},_onCapture:$q,__preview_eager_load_replay:!1},(r=>({rageclick:!(r&&r>="2025-11-30")||{content_ignorelist:!0},capture_pageview:!(r&&r>="2025-05-24")||"history_change",session_recording:r&&r>="2025-11-30"?{strictMinimumDuration:!0}:{}}))(e))},B1e=e=>{var t={};bt(e.process_person)||(t.person_profiles=e.process_person),bt(e.xhr_headers)||(t.request_headers=e.xhr_headers),bt(e.cookie_name)||(t.persistence_name=e.cookie_name),bt(e.disable_cookie)||(t.disable_persistence=e.disable_cookie),bt(e.store_google)||(t.save_campaign_params=e.store_google),bt(e.verbose)||(t.debug=e.verbose);var r=wi({},t,e);return ss(e.property_blacklist)&&(bt(e.property_denylist)?r.property_denylist=e.property_blacklist:ss(e.property_denylist)?r.property_denylist=[...e.property_blacklist,...e.property_denylist]:St.error("Invalid value for property_denylist config: "+e.property_denylist)),r};class fRr{constructor(){this.__forceAllowLocalhost=!1}get wr(){return this.__forceAllowLocalhost}set wr(t){St.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=t}}class lR{get decideEndpointWasHit(){var t,r;return(t=(r=this.featureFlags)==null?void 0:r.hasLoadedFlags)!==null&&t!==void 0&&t}get flagsEndpointWasHit(){var t,r;return(t=(r=this.featureFlags)==null?void 0:r.hasLoadedFlags)!==null&&t!==void 0&&t}constructor(){this.webPerformance=new fRr,this.Sr=!1,this.version=dh.LIB_VERSION,this.Er=new Vte,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=z1e(),this.SentryIntegration=c6r,this.sentryIntegration=t=>(function(r,n){var s=DHe(r,n);return{name:THe,processEvent:i=>s(i)}})(this,t),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.$r=!1,this.kr=null,this.Pr=null,this.Tr=null,this.featureFlags=new Q6r(this),this.toolbar=new d6r(this),this.scrollManager=new nRr(this),this.pageViewManager=new P6r(this),this.surveys=new Y6r(this),this.experiments=new Uo(this),this.exceptions=new B6r(this),this.rateLimiter=new J6r(this),this.requestRouter=new aRr(this),this.consent=new n6r(this),this.externalIntegrations=new dRr(this),this.people={set:(t,r,n)=>{var s=Ki(t)?{[t]:r}:t;this.setPersonProperties(s),n?.({})},set_once:(t,r,n)=>{var s=Ki(t)?{[t]:r}:t;this.setPersonProperties(void 0,s),n?.({})}},this.on("eventCaptured",(t=>St.info('send "'+t?.event+'"',t)))}init(t,r,n){if(n&&n!==_x){var s,i=(s=Lk[n])!==null&&s!==void 0?s:new lR;return i._init(t,r,n),Lk[n]=i,Lk[_x][n]=i,i}return this._init(t,r,n)}_init(t,r,n){var s;if(r===void 0&&(r={}),bt(t)||dq(t))return St.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},r.debug=this.Rr(r.debug),this.Ir=r,this.Fr=[],r.person_profiles&&(this.Pr=r.person_profiles),this.set_config(wi({},z1e(r.defaults),B1e(r),{name:n,token:t})),this.config.on_xhr_error&&St.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=r.disable_compression?void 0:bh.GZipJS;var i=this.Cr();this.persistence=new fB(this.config,i),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new fB(Dt({},this.config,{persistence:"sessionStorage"}),i);var o=Dt({},this.persistence.props),a=Dt({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Mr=new eRr((S=>this.Or(S)),this.config.request_queue_config),this.Ar=new rRr(this),this.__request_queue=[];var l=this.config.cookieless_mode==="always"||this.config.cookieless_mode==="on_reject"&&this.consent.isExplicitlyOptedOut();if(l||(this.sessionManager=new j1e(this),this.sessionPropsManager=new M1e(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(St.info("Deferring extension initialization to improve startup performance"),setTimeout((()=>{this.Dr(l)}),0)):(St.info("Initializing extensions synchronously"),this.Dr(l)),dh.DEBUG=dh.DEBUG||this.config.debug,dh.DEBUG&&St.info("Starting in debug mode",{this:this,config:r,thisC:Dt({},this.config),p:o,s:a}),((s=r.bootstrap)==null?void 0:s.distinctID)!==void 0){var c,u,d=this.config.get_device_id(gg()),p=(c=r.bootstrap)!=null&&c.isIdentifiedID?d:r.bootstrap.distinctID;this.persistence.set_property(fh,(u=r.bootstrap)!=null&&u.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:r.bootstrap.distinctID,$device_id:p})}if(this.jr()){var m,g,v=Object.keys(((m=r.bootstrap)==null?void 0:m.featureFlags)||{}).filter((S=>{var O;return!((O=r.bootstrap)==null||(O=O.featureFlags)==null||!O[S])})).reduce(((S,O)=>{var k;return S[O]=((k=r.bootstrap)==null||(k=k.featureFlags)==null?void 0:k[O])||!1,S}),{}),b=Object.keys(((g=r.bootstrap)==null?void 0:g.featureFlagPayloads)||{}).filter((S=>v[S])).reduce(((S,O)=>{var k,C;return(k=r.bootstrap)!=null&&(k=k.featureFlagPayloads)!=null&&k[O]&&(S[O]=(C=r.bootstrap)==null||(C=C.featureFlagPayloads)==null?void 0:C[O]),S}),{});this.featureFlags.receivedFeatureFlags({featureFlags:v,featureFlagPayloads:b})}if(l)this.register_once({distinct_id:v_,$device_id:null},"");else if(!this.get_distinct_id()){var w=this.config.get_device_id(gg());this.register_once({distinct_id:w,$device_id:w},""),this.persistence.set_property(fh,"anonymous")}return Ni(Pe,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),this.toolbar.maybeLoadToolbar(),r.segment?l6r(this,(()=>this.Lr())):this.Lr(),Dg(this.config._onCapture)&&this.config._onCapture!==$q&&(St.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(S=>this.config._onCapture(S.event,S)))),this.config.ip&&St.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this}Dr(t){var r=performance.now();this.historyAutocapture=new a6r(this),this.historyAutocapture.startIfEnabled();var n=[];n.push((()=>{new p6r(this).startIfEnabledOrStop()})),n.push((()=>{var s;this.siteApps=new oRr(this),(s=this.siteApps)==null||s.init()})),t||n.push((()=>{this.sessionRecording=new L1e(this),this.sessionRecording.startIfEnabledOrStop()})),this.config.disable_scroll_properties||n.push((()=>{this.scrollManager.startMeasuringScrollPosition()})),n.push((()=>{this.autocapture=new G5r(this),this.autocapture.startIfEnabled()})),n.push((()=>{this.surveys.loadIfEnabled()})),n.push((()=>{this.heatmaps=new A6r(this),this.heatmaps.startIfEnabled()})),n.push((()=>{this.webVitalsAutocapture=new T6r(this)})),n.push((()=>{this.exceptionObserver=new o6r(this),this.exceptionObserver.startIfEnabled()})),n.push((()=>{this.deadClicksAutocapture=new CHe(this,i6r),this.deadClicksAutocapture.startIfEnabled()})),n.push((()=>{if(this.Nr){var s=this.Nr;this.Nr=void 0,this.fi(s)}})),this.Ur(n,r)}Ur(t,r){for(;t.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-r>=30&&t.length>0)return void setTimeout((()=>{this.Ur(t,r)}),0);var n=t.shift();if(n)try{n()}catch(i){St.error("Error initializing extension:",i)}}var s=Math.round(performance.now()-r);this.register_for_session({$sdk_debug_extensions_init_method:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",$sdk_debug_extensions_init_time_ms:s}),this.config.__preview_deferred_init_extensions&&St.info("PostHog extensions initialized ("+s+"ms)")}fi(t){var r,n,s,i,o,a,l,c;if(!wt||!wt.body)return St.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((()=>{this.fi(t)}),500);this.config.__preview_deferred_init_extensions&&(this.Nr=t),this.compression=void 0,t.supportedCompression&&!this.config.disable_compression&&(this.compression=qr(t.supportedCompression,bh.GZipJS)?bh.GZipJS:qr(t.supportedCompression,bh.Base64)?bh.Base64:void 0),(r=t.analytics)!=null&&r.endpoint&&(this.analyticsDefaultEndpoint=t.analytics.endpoint),this.set_config({person_profiles:this.Pr?this.Pr:"identified_only"}),(n=this.siteApps)==null||n.onRemoteConfig(t),(s=this.sessionRecording)==null||s.onRemoteConfig(t),(i=this.autocapture)==null||i.onRemoteConfig(t),(o=this.heatmaps)==null||o.onRemoteConfig(t),this.surveys.onRemoteConfig(t),(a=this.webVitalsAutocapture)==null||a.onRemoteConfig(t),(l=this.exceptionObserver)==null||l.onRemoteConfig(t),this.exceptions.onRemoteConfig(t),(c=this.deadClicksAutocapture)==null||c.onRemoteConfig(t)}Lr(){try{this.config.loaded(this)}catch(t){St.critical("`loaded` function failed",t)}this.zr(),this.config.capture_pageview&&setTimeout((()=>{(this.consent.isOptedIn()||this.config.cookieless_mode==="always")&&this.Hr()}),1),new K6r(this).load(),this.featureFlags.flags()}zr(){var t;this.is_capturing()&&this.config.request_batching&&((t=this.Mr)==null||t.enable())}_dom_loaded(){this.is_capturing()&&Pg(this.__request_queue,(t=>this.Or(t))),this.__request_queue=[],this.zr()}_handle_unload(){var t,r;this.config.request_batching?(this.Br()&&this.capture("$pageleave"),(t=this.Mr)==null||t.unload(),(r=this.Ar)==null||r.unload()):this.Br()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}ci(t){this.__loaded&&(lWe?this.__request_queue.push(t):this.rateLimiter.isServerRateLimited(t.batchKey)||(t.transport=t.transport||this.config.api_transport,t.url=aN(t.url,{ip:this.config.ip?1:0}),t.headers=Dt({},this.config.request_headers),t.compression=t.compression==="best-available"?this.compression:t.compression,t.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(t.disableTransport=["sendBeacon"]),t.fetchOptions=t.fetchOptions||this.config.fetch_options,(r=>{var n,s,i,o=Dt({},r);o.timeout=o.timeout||6e4,o.url=aN(o.url,{_:new Date().getTime().toString(),ver:dh.LIB_VERSION,compression:o.compression});var a=(n=o.transport)!==null&&n!==void 0?n:"fetch",l=fI.filter((u=>!o.disableTransport||!u.transport||!o.disableTransport.includes(u.transport))),c=(s=(i=lHe(l,(u=>u.transport===a)))==null?void 0:i.method)!==null&&s!==void 0?s:l[0].method;if(!c)throw new Error("No available transport method");c(o)})(Dt({},t,{callback:r=>{var n,s;this.rateLimiter.checkForLimiting(r),r.statusCode>=400&&((n=(s=this.config).on_request_error)==null||n.call(s,r)),t.callback==null||t.callback(r)}}))))}Or(t){this.Ar?this.Ar.retriableRequest(t):this.ci(t)}_execute_array(t){var r,n=[],s=[],i=[];Pg(t,(a=>{a&&(r=a[0],ss(r)?i.push(a):Dg(a)?a.call(this):ss(a)&&r==="alias"?n.push(a):ss(a)&&r.indexOf("capture")!==-1&&Dg(this[r])?i.push(a):s.push(a))}));var o=function(a,l){Pg(a,(function(c){if(ss(c[0])){var u=l;ys(c,(function(d){u=u[d[0]].apply(u,d.slice(1))}))}else this[c[0]].apply(this,c.slice(1))}),l)};o(n,this),o(s,this),o(i,this)}jr(){var t,r;return((t=this.config.bootstrap)==null?void 0:t.featureFlags)&&Object.keys((r=this.config.bootstrap)==null?void 0:r.featureFlags).length>0||!1}push(t){this._execute_array([t])}capture(t,r,n){var s;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Mr){if(this.is_capturing())if(!bt(t)&&Ki(t)){var i=!this.config.opt_out_useragent_filter&&this._is_bot();if(!(i&&!this.config.__preview_capture_bot_pageviews)){var o=n!=null&&n.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(o==null||!o.isRateLimited){r!=null&&r.$current_url&&!Ki(r?.$current_url)&&(St.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),r==null||delete r.$current_url),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var a=new Date,l=n?.timestamp||a,c=gg(),u={uuid:c,event:t,properties:this.calculateEventProperties(t,r||{},l,c)};t==="$pageview"&&this.config.__preview_capture_bot_pageviews&&i&&(u.event="$bot_pageview",u.properties.$browser_type="bot"),o&&(u.properties.$lib_rate_limit_remaining_tokens=o.remainingTokens),n?.$set&&(u.$set=n?.$set);var d,p=this.qr(n?.$set_once);if(p&&(u.$set_once=p),(u=$5r(u,n!=null&&n._noTruncate?null:this.config.properties_string_max_length)).timestamp=l,bt(n?.timestamp)||(u.properties.$event_time_override_provided=!0,u.properties.$event_time_override_system_time=a),t===pI.DISMISSED||t===pI.SENT){var m=r?.[I1e.SURVEY_ID],g=r?.[I1e.SURVEY_ITERATION];d={id:m,current_iteration:g},localStorage.getItem(N1e(d))||localStorage.setItem(N1e(d),"true"),u.$set=Dt({},u.$set,{[H6r({id:m,current_iteration:g},t===pI.SENT?"responded":"dismissed")]:!0})}var v=Dt({},u.properties.$set,u.$set);if(Lx(v)||this.setPersonPropertiesForFlags(v),!Yn(this.config.before_send)){var b=this.Wr(u);if(!b)return;u=b}this.Er.emit("eventCaptured",u);var w={method:"POST",url:(s=n?._url)!==null&&s!==void 0?s:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:u,compression:"best-available",batchKey:n?._batchKey};return!this.config.request_batching||n&&(n==null||!n._batchKey)||n!=null&&n.send_instantly?this.Or(w):this.Mr.enqueue(w),u}St.critical("This capture call is ignored due to client rate limiting.")}}else St.error("No event name provided to posthog.capture")}else St.uninitializedWarning("posthog.capture")}Ai(t){return this.on("eventCaptured",(r=>t(r.event,r)))}calculateEventProperties(t,r,n,s,i){if(n=n||new Date,!this.persistence||!this.sessionPersistence)return r;var o=i?void 0:this.persistence.remove_event_timer(t),a=Dt({},r);if(a.token=this.config.token,a.$config_defaults=this.config.defaults,(this.config.cookieless_mode=="always"||this.config.cookieless_mode=="on_reject"&&this.consent.isExplicitlyOptedOut())&&(a.$cookieless_mode=!0),t==="$snapshot"){var l=Dt({},this.persistence.properties(),this.sessionPersistence.properties());return a.distinct_id=l.distinct_id,(!Ki(a.distinct_id)&&!ip(a.distinct_id)||dq(a.distinct_id))&&St.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),a}var c,u=C6r(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:d,windowId:p}=this.sessionManager.checkAndGetSessionAndWindowId(i,n.getTime());a.$session_id=d,a.$window_id=p}this.sessionPropsManager&&wi(a,this.sessionPropsManager.getSessionProps());try{var m;this.sessionRecording&&wi(a,this.sessionRecording.sdkDebugProperties),a.$sdk_debug_retry_queue_size=(m=this.Ar)==null?void 0:m.length}catch(w){a.$sdk_debug_error_capturing_properties=String(w)}if(this.requestRouter.region===J_.CUSTOM&&(a.$lib_custom_api_host=this.config.api_host),c=t!=="$pageview"||i?t!=="$pageleave"||i?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(n):this.pageViewManager.doPageView(n,s),a=wi(a,c),t==="$pageview"&&wt&&(a.title=wt.title),!bt(o)){var g=n.getTime()-o;a.$duration=parseFloat((g/1e3).toFixed(3))}Ja&&this.config.opt_out_useragent_filter&&(a.$browser_type=this._is_bot()?"bot":"browser"),(a=wi({},u,this.persistence.properties(),this.sessionPersistence.properties(),a)).$is_identified=this._isIdentified(),ss(this.config.property_denylist)?ys(this.config.property_denylist,(function(w){delete a[w]})):St.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var v=this.config.sanitize_properties;v&&(St.error("sanitize_properties is deprecated. Use before_send instead"),a=v(a,t));var b=this.Gr();return a.$process_person_profile=b,b&&!i&&this.Vr("_calculate_event_properties"),a}qr(t){var r;if(!this.persistence||!this.Gr()||this.Sr)return t;var n=this.persistence.get_initial_props(),s=(r=this.sessionPropsManager)==null?void 0:r.getSetOnceProps(),i=wi({},n,s||{},t||{}),o=this.config.sanitize_properties;return o&&(St.error("sanitize_properties is deprecated. Use before_send instead"),i=o(i,"$set_once")),this.Sr=!0,Lx(i)?void 0:i}register(t,r){var n;(n=this.persistence)==null||n.register(t,r)}register_once(t,r,n){var s;(s=this.persistence)==null||s.register_once(t,r,n)}register_for_session(t){var r;(r=this.sessionPersistence)==null||r.register(t)}unregister(t){var r;(r=this.persistence)==null||r.unregister(t)}unregister_for_session(t){var r;(r=this.sessionPersistence)==null||r.unregister(t)}Jr(t,r){this.register({[t]:r})}getFeatureFlag(t,r){return this.featureFlags.getFeatureFlag(t,r)}getFeatureFlagPayload(t){var r=this.featureFlags.getFeatureFlagPayload(t);try{return JSON.parse(r)}catch{return r}}isFeatureEnabled(t,r){return this.featureFlags.isFeatureEnabled(t,r)}reloadFeatureFlags(){this.featureFlags.reloadFeatureFlags()}updateEarlyAccessFeatureEnrollment(t,r,n){this.featureFlags.updateEarlyAccessFeatureEnrollment(t,r,n)}getEarlyAccessFeatures(t,r,n){return r===void 0&&(r=!1),this.featureFlags.getEarlyAccessFeatures(t,r,n)}on(t,r){return this.Er.on(t,r)}onFeatureFlags(t){return this.featureFlags.onFeatureFlags(t)}onSurveysLoaded(t){return this.surveys.onSurveysLoaded(t)}onSessionId(t){var r,n;return(r=(n=this.sessionManager)==null?void 0:n.onSessionId(t))!==null&&r!==void 0?r:()=>{}}getSurveys(t,r){r===void 0&&(r=!1),this.surveys.getSurveys(t,r)}getActiveMatchingSurveys(t,r){r===void 0&&(r=!1),this.surveys.getActiveMatchingSurveys(t,r)}renderSurvey(t,r){this.surveys.renderSurvey(t,r)}displaySurvey(t,r){r===void 0&&(r=G6r),this.surveys.displaySurvey(t,r)}cancelPendingSurvey(t){this.surveys.cancelPendingSurvey(t)}canRenderSurvey(t){return this.surveys.canRenderSurvey(t)}canRenderSurveyAsync(t,r){return r===void 0&&(r=!1),this.surveys.canRenderSurveyAsync(t,r)}identify(t,r,n){if(!this.__loaded||!this.persistence)return St.uninitializedWarning("posthog.identify");if(ip(t)&&(t=t.toString(),St.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),t)if(["distinct_id","distinctid"].includes(t.toLowerCase()))St.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.');else if(t!==v_){if(this.Vr("posthog.identify")){var s=this.get_distinct_id();if(this.register({$user_id:t}),!this.get_property("$device_id")){var i=s;this.register_once({$had_persisted_distinct_id:!0,$device_id:i},"")}t!==s&&t!==this.get_property(q_)&&(this.unregister(q_),this.register({distinct_id:t}));var o=(this.persistence.get_property(fh)||"anonymous")==="anonymous";t!==s&&o?(this.persistence.set_property(fh,"identified"),this.setPersonPropertiesForFlags(Dt({},n||{},r||{}),!1),this.capture("$identify",{distinct_id:t,$anon_distinct_id:s},{$set:r||{},$set_once:n||{}}),this.Tr=T1e(t,r,n),this.featureFlags.setAnonymousDistinctId(s)):(r||n)&&this.setPersonProperties(r,n),t!==s&&(this.reloadFeatureFlags(),this.unregister(Y4))}}else St.critical('The string "'+v_+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.');else St.error("Unique user id has not been set in posthog.identify")}setPersonProperties(t,r){if((t||r)&&this.Vr("posthog.setPersonProperties")){var n=T1e(this.get_distinct_id(),t,r);this.Tr!==n?(this.setPersonPropertiesForFlags(Dt({},r||{},t||{})),this.capture("$set",{$set:t||{},$set_once:r||{}}),this.Tr=n):St.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(t,r,n){if(t&&r){if(this.Vr("posthog.group")){var s=this.getGroups();s[t]!==r&&this.resetGroupPropertiesForFlags(t),this.register({$groups:Dt({},s,{[t]:r})}),n&&(this.capture("$groupidentify",{$group_type:t,$group_key:r,$group_set:n}),this.setGroupPropertiesForFlags({[t]:n})),s[t]===r||n||this.reloadFeatureFlags()}}else St.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(t,r){r===void 0&&(r=!0),this.featureFlags.setPersonPropertiesForFlags(t,r)}resetPersonPropertiesForFlags(){this.featureFlags.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(t,r){r===void 0&&(r=!0),this.Vr("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(t,r)}resetGroupPropertiesForFlags(t){this.featureFlags.resetGroupPropertiesForFlags(t)}reset(t){var r,n,s,i;if(St.info("reset"),!this.__loaded)return St.uninitializedWarning("posthog.reset");var o=this.get_property("$device_id");if(this.consent.reset(),(r=this.persistence)==null||r.clear(),(n=this.sessionPersistence)==null||n.clear(),this.surveys.reset(),this.featureFlags.reset(),(s=this.persistence)==null||s.set_property(fh,"anonymous"),(i=this.sessionManager)==null||i.resetSessionId(),this.Tr=null,this.config.cookieless_mode==="always")this.register_once({distinct_id:v_,$device_id:null},"");else{var a=this.config.get_device_id(gg());this.register_once({distinct_id:a,$device_id:t?a:o},"")}this.register({$last_posthog_reset:new Date().toISOString()},1)}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var t,r;return(t=(r=this.sessionManager)==null?void 0:r.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&t!==void 0?t:""}get_session_replay_url(t){if(!this.sessionManager)return"";var{sessionId:r,sessionStartTimestamp:n}=this.sessionManager.checkAndGetSessionAndWindowId(!0),s=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+r);if(t!=null&&t.withTimestamp&&n){var i,o=(i=t.timestampLookBack)!==null&&i!==void 0?i:10;if(!n)return s;s+="?t="+Math.max(Math.floor((new Date().getTime()-n)/1e3)-o,0)}return s}alias(t,r){return t===this.get_property(cHe)?(St.critical("Attempting to create alias for existing People user - aborting."),-2):this.Vr("posthog.alias")?(bt(r)&&(r=this.get_distinct_id()),t!==r?(this.Jr(q_,t),this.capture("$create_alias",{alias:t,distinct_id:r})):(St.warn("alias matches current distinct_id - skipping api call."),this.identify(t),-1)):void 0}set_config(t){var r=Dt({},this.config);if(no(t)){var n,s,i,o,a;wi(this.config,B1e(t));var l=this.Cr();(n=this.persistence)==null||n.update_config(this.config,r,l),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new fB(Dt({},this.config,{persistence:"sessionStorage"}),l);var c=this.Rr(this.config.debug);Ag(c)&&(this.config.debug=c),Ag(this.config.debug)&&(this.config.debug?(dh.DEBUG=!0,Ys.H()&&Ys.G("ph_debug","true"),St.info("set_config",{config:t,oldConfig:r,newConfig:Dt({},this.config)})):(dh.DEBUG=!1,Ys.H()&&Ys.V("ph_debug"))),(s=this.sessionRecording)==null||s.startIfEnabledOrStop(),(i=this.autocapture)==null||i.startIfEnabled(),(o=this.heatmaps)==null||o.startIfEnabled(),this.surveys.loadIfEnabled(),this.Kr(),(a=this.externalIntegrations)==null||a.startIfEnabledOrStop()}}startSessionRecording(t){var r=t===!0,n={sampling:r||!(t==null||!t.sampling),linked_flag:r||!(t==null||!t.linked_flag),url_trigger:r||!(t==null||!t.url_trigger),event_trigger:r||!(t==null||!t.event_trigger)};if(Object.values(n).some(Boolean)){var s,i,o,a,l;(s=this.sessionManager)==null||s.checkAndGetSessionAndWindowId(),n.sampling&&((i=this.sessionRecording)==null||i.overrideSampling()),n.linked_flag&&((o=this.sessionRecording)==null||o.overrideLinkedFlag()),n.url_trigger&&((a=this.sessionRecording)==null||a.overrideTrigger("url")),n.event_trigger&&((l=this.sessionRecording)==null||l.overrideTrigger("event"))}this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var t;return!((t=this.sessionRecording)==null||!t.started)}captureException(t,r){var n=new Error("PostHog syntheticException"),s=this.exceptions.buildProperties(t,{handled:!0,syntheticException:n});return this.exceptions.sendExceptionEvent(Dt({},s,r))}loadToolbar(t){return this.toolbar.loadToolbar(t)}get_property(t){var r;return(r=this.persistence)==null?void 0:r.props[t]}getSessionProperty(t){var r;return(r=this.sessionPersistence)==null?void 0:r.props[t]}toString(){var t,r=(t=this.config.name)!==null&&t!==void 0?t:_x;return r!==_x&&(r=_x+"."+r),r}_isIdentified(){var t,r;return((t=this.persistence)==null?void 0:t.get_property(fh))==="identified"||((r=this.sessionPersistence)==null?void 0:r.get_property(fh))==="identified"}Gr(){var t,r;return!(this.config.person_profiles==="never"||this.config.person_profiles==="identified_only"&&!this._isIdentified()&&Lx(this.getGroups())&&((t=this.persistence)==null||(t=t.props)==null||!t[q_])&&((r=this.persistence)==null||(r=r.props)==null||!r[K4]))}Br(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.Gr()||this.Vr("posthog.createPersonProfile")&&this.setPersonProperties({},{})}Vr(t){return this.config.person_profiles==="never"?(St.error(t+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Jr(K4,!0),!0)}Cr(){if(this.config.cookieless_mode==="always")return!0;var t=this.consent.isOptedOut(),r=this.config.opt_out_persistence_by_default||this.config.cookieless_mode==="on_reject";return this.config.disable_persistence||t&&!!r}Kr(){var t,r,n,s,i=this.Cr();return((t=this.persistence)==null?void 0:t.wi)!==i&&((n=this.persistence)==null||n.set_disabled(i)),((r=this.sessionPersistence)==null?void 0:r.wi)!==i&&((s=this.sessionPersistence)==null||s.set_disabled(i)),i}opt_in_capturing(t){var r;if(this.config.cookieless_mode!=="always"){var n,s;this.config.cookieless_mode==="on_reject"&&this.consent.isExplicitlyOptedOut()&&(this.reset(!0),(n=this.sessionManager)==null||n.destroy(),this.sessionManager=new j1e(this),this.persistence&&(this.sessionPropsManager=new M1e(this,this.sessionManager,this.persistence)),this.sessionRecording=new L1e(this),this.sessionRecording.startIfEnabledOrStop()),this.consent.optInOut(!0),this.Kr(),this.zr(),(r=this.sessionRecording)==null||r.startIfEnabledOrStop(),this.config.cookieless_mode=="on_reject"&&this.surveys.loadIfEnabled(),(bt(t?.captureEventName)||t!=null&&t.captureEventName)&&this.capture((s=t?.captureEventName)!==null&&s!==void 0?s:"$opt_in",t?.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Hr()}else St.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}opt_out_capturing(){var t,r;this.config.cookieless_mode!=="always"?(this.config.cookieless_mode==="on_reject"&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.Kr(),this.config.cookieless_mode==="on_reject"&&(this.register({distinct_id:v_,$device_id:null}),(t=this.sessionManager)==null||t.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,(r=this.sessionRecording)==null||r.stopRecording(),this.sessionRecording=void 0,this.Hr())):St.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var t=this.consent.consent;return t===ph.GRANTED?"granted":t===ph.DENIED?"denied":"pending"}is_capturing(){return this.config.cookieless_mode==="always"||(this.config.cookieless_mode==="on_reject"?this.consent.isExplicitlyOptedOut()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.Kr()}_is_bot(){return nc?aWe(nc,this.config.custom_blocked_useragents):void 0}Hr(){wt&&(wt.visibilityState==="visible"?this.$r||(this.$r=!0,this.capture("$pageview",{title:wt.title},{send_instantly:!0}),this.kr&&(wt.removeEventListener("visibilitychange",this.kr),this.kr=null)):this.kr||(this.kr=this.Hr.bind(this),Ni(wt,"visibilitychange",this.kr)))}debug(t){t===!1?(Pe?.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(Pe?.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}O(){var t,r,n,s,i,o,a,l=this.Ir||{};return"advanced_disable_flags"in l?!!l.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(St.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(n="advanced_disable_decide",s=!1,i=St,o=(r="advanced_disable_flags")in(t=l)&&!bt(t[r]),a=n in t&&!bt(t[n]),o?t[r]:a?(i&&i.warn("Config field '"+n+"' is deprecated. Please use '"+r+"' instead. The old field will be removed in a future major version."),t[n]):s)}Wr(t){if(Yn(this.config.before_send))return t;var r=ss(this.config.before_send)?this.config.before_send:[this.config.before_send],n=t;for(var s of r){if(n=s(n),Yn(n)){var i="Event '"+t.event+"' was rejected in beforeSend function";return i5r(t.event)?St.warn(i+". This can cause unexpected behavior."):St.info(i),null}n.properties&&!Lx(n.properties)||St.warn("Event '"+t.event+"' has no properties after beforeSend function, this is likely an error.")}return n}getPageViewId(){var t;return(t=this.pageViewManager.Vt)==null?void 0:t.pageViewId}captureTraceFeedback(t,r){this.capture("$ai_feedback",{$ai_trace_id:String(t),$ai_feedback_text:r})}captureTraceMetric(t,r,n){this.capture("$ai_metric",{$ai_trace_id:String(t),$ai_metric_name:r,$ai_metric_value:String(n)})}Rr(t){var r=Ag(t)&&!t,n=Ys.H()&&Ys.q("ph_debug")==="true";return!r&&(!!n||t)}}(function(e,t){for(var r=0;r<t.length;r++)e.prototype[t[r]]=P5r(e.prototype[t[r]])})(lR,["identify"]);var V1e,xh=(V1e=Lk[_x]=new lR,(function(){function e(){e.done||(e.done=!0,lWe=!1,ys(Lk,(function(t){t._dom_loaded()})))}wt!=null&&wt.addEventListener?wt.readyState==="complete"?e():Ni(wt,"DOMContentLoaded",e,{capture:!1}):Pe&&St.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")})(),V1e),cWe=E.createContext({client:xh,bootstrap:void 0});function uWe(e,t,r){if(r===void 0&&(r=new WeakMap),e===t)return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(r.has(e)&&r.get(e)===t)return!0;r.set(e,t);var n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(var i=0,o=n;i<o.length;i++){var a=o[i];if(!s.includes(a)||!uWe(e[a],t[a],r))return!1}return!0}function pRr(e){var t,r,n=e.children,s=e.client,i=e.apiKey,o=e.options,a=E.useRef(null),l=E.useMemo(function(){return s?(i&&console.warn("[PostHog.js] You have provided both `client` and `apiKey` to `PostHogProvider`. `apiKey` will be ignored in favour of `client`."),o&&console.warn("[PostHog.js] You have provided both `client` and `options` to `PostHogProvider`. `options` will be ignored in favour of `client`."),s):(i||console.warn("[PostHog.js] No `apiKey` or `client` were provided to `PostHogProvider`. Using default global `window.posthog` instance. You must initialize it manually. This is not recommended behavior."),xh)},[s,i,JSON.stringify(o)]);return E.useEffect(function(){if(!s){var c=a.current;c?(i!==c.apiKey&&console.warn("[PostHog.js] You have provided a different `apiKey` to `PostHogProvider` than the one that was already initialized. This is not supported by our provider and we'll keep using the previous key. If you need to toggle between API Keys you need to control the `client` yourself and pass it in as a prop rather than an `apiKey` prop."),o&&!uWe(o,c.options)&&xh.set_config(o),a.current={apiKey:i,options:o??{}}):(xh.__loaded&&console.warn("[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues."),xh.init(i,o),a.current={apiKey:i,options:o??{}})}},[s,i,JSON.stringify(o)]),me.createElement(cWe.Provider,{value:{client:l,bootstrap:(t=o?.bootstrap)!==null&&t!==void 0?t:(r=s?.config)===null||r===void 0?void 0:r.bootstrap}},n)}var mB=function(e){return typeof e=="function"},Iq=function(e,t){return Iq=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(r[s]=n[s])},Iq(e,t)};function hRr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Iq(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var mRr={componentStack:null,exceptionEvent:null,error:null},gRr={INVALID_FALLBACK:"[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element."};(function(e){hRr(t,e);function t(r){var n=e.call(this,r)||this;return n.state=mRr,n}return t.prototype.componentDidCatch=function(r,n){var s=this.props.additionalProperties,i;mB(s)?i=s(r):typeof s=="object"&&(i=s);var o=this.context.client,a=o.captureException(r,i),l=n.componentStack;this.setState({error:r,componentStack:l,exceptionEvent:a})},t.prototype.render=function(){var r=this.props,n=r.children,s=r.fallback,i=this.state;if(i.componentStack==null)return mB(n)?n():n;var o=mB(s)?me.createElement(s,{error:i.error,componentStack:i.componentStack,exceptionEvent:i.exceptionEvent}):s;return me.isValidElement(o)?o:(console.warn(gRr.INVALID_FALLBACK),me.createElement(me.Fragment,null))},t.contextType=cWe,t})(me.Component);function yRr({children:e}){return E.useEffect(()=>{if("brave"in navigator){console.info("[Analytics]: Telemetry is disabled for browser constraints.");return}if(window.MASTRA_TELEMETRY_DISABLED){console.info("[Analytics]: Telemetry is disabled.");return}xh.init("phc_SBLpZVAB6jmHOct9CABq3PF0Yn5FU3G2FgT4xUr2XrT",{api_host:"https://us.posthog.com"}),xh.register({mastraSource:"playground"})},[]),f.jsx(pRr,{client:xh,children:e})}function vRr(){return f.jsxs(lo,{children:[f.jsx(ti,{children:f.jsxs(_c,{children:[f.jsx(qe,{children:f.jsx(awe,{})}),"Request Context"]})}),f.jsx(Oc,{children:f.jsx(wIr,{children:f.jsx(xIr,{})})})]})}const bRr=()=>{const{data:e=[],isLoading:t}=sR(),r=!t&&e.length===0;return f.jsxs(lo,{children:[f.jsxs(ti,{children:[f.jsxs(_c,{children:[f.jsx(qe,{children:f.jsx(sb,{})}),"MCP Servers"]}),f.jsx(Ma,{children:f.jsxs(Je,{as:Br,to:"https://mastra.ai/en/docs/tools-mcp/mcp-overview",target:"_blank",children:[f.jsx(qe,{children:f.jsx(Ra,{})}),"MCP documentation"]})})]}),f.jsx(Oc,{isCentered:r,children:f.jsx(mNr,{mcpServers:e,isLoading:t})})]})},xRr=()=>{const{data:e}=sR(),{serverId:t,toolId:r}=xu(),{data:n,isLoading:s}=Xqe(t,r),i=e?.find(l=>l.id===t),o=n?.name,a=i?.name||"";return s||!n?null:f.jsxs("div",{className:"h-full w-full bg-surface2 overflow-y-hidden",children:[f.jsxs(ti,{children:[f.jsxs(sp,{children:[f.jsxs(Da,{as:Br,to:"/mcps",children:[f.jsx(qe,{children:f.jsx(sb,{})}),"MCP Servers"]}),f.jsx(Da,{as:Br,to:`/mcps/${t}`,children:a}),f.jsx(Da,{as:"span",to:"",isCurrent:!0,children:o})]}),f.jsx(Ma,{children:f.jsxs(Je,{as:Br,to:"https://mastra.ai/en/docs/tools-mcp/mcp-overview",target:"_blank",children:[f.jsx(qe,{children:f.jsx(Ra,{})}),"MCP documentation"]})})]}),f.jsx(bNr,{toolId:r,serverId:t})]})},wRr=()=>{const{serverId:e}=xu(),{data:t=[],isLoading:r}=sR(),n=t.find(s=>s.id===e);return f.jsxs(lo,{children:[f.jsxs(ti,{children:[f.jsx(sp,{children:f.jsxs(Da,{as:Br,to:"/mcps",isCurrent:!0,children:[f.jsx(qe,{children:f.jsx(sb,{})}),"MCP Servers"]})}),f.jsx(E0,{children:f.jsx("div",{className:"w-48",children:f.jsx(ONr,{value:e})})}),f.jsx(Ma,{children:f.jsxs(Je,{as:Br,to:"https://mastra.ai/en/docs/tools-mcp/mcp-overview",target:"_blank",children:[f.jsx(qe,{children:f.jsx(Ra,{})}),"MCP documentation"]})})]}),f.jsx(xNr,{isLoading:r,server:n})]})},gB=({to:e,options:t})=>{const r=xu(),n=SRr(e);let s=e;for(const i of n)s=s.replace(`:${i}`,r[i]);return f.jsx(ewe,{to:s,...t})};function SRr(e){const t=[],r=e.split("/");for(const n of r)n.startsWith(":")&&t.push(n.slice(1));return t}const ORr=E.forwardRef(({children:e,href:t,...r},n)=>f.jsx(Br,{ref:n,to:t,...r,children:e}));function _Rr(){const{data:e={},isLoading:t}=rR();return f.jsxs(lo,{children:[f.jsxs(ti,{children:[f.jsxs(_c,{children:[f.jsx(qe,{children:f.jsx(mI,{})}),"Scorers"]}),f.jsx(Ma,{children:f.jsxs(Je,{as:Br,to:"https://mastra.ai/en/docs/scorers/overview",target:"_blank",children:[f.jsx(qe,{children:f.jsx(Ra,{})}),"Scorers documentation"]})})]}),f.jsx(Oc,{isCentered:!t&&Object.keys(e||{}).length===0,children:f.jsx(GIr,{isLoading:t,scorers:e})})]})}function kRr(){const{scorerId:e}=xu(),[t,r]=dN(),[n,s]=E.useState(),[i,o]=E.useState(0),[a,l]=E.useState(!1),[c,u]=E.useState({value:"all",label:"All",type:"ALL"}),{scorer:d,isLoading:p,error:m}=ZIr(e),{data:g={},isLoading:v,error:b}=ob(),{data:w,isLoading:S,error:O}=Y6(),{data:k,isLoading:C,error:T}=QIr({scorerId:e,page:i,entityId:c?.value==="all"?void 0:c?.value,entityType:c?.type==="ALL"?void 0:c?.type}),P=d?.agentIds?.map(B=>({value:B,label:g[B].name,type:"AGENT"}))||[],A=d?.workflowIds?.map(B=>({value:B,label:B,type:"WORKFLOW"}))||[],R=[{value:"all",label:"All",type:"ALL"},...P,...A];if(E.useEffect(()=>{if(R){const B=t.get("entity"),J=R.find(Z=>Z.value===B);J&&J.value!==c?.value&&u(J)}},[t,c,R]),E.useEffect(()=>{if(m){const B=m instanceof Error?m.message:"Failed to load scorer";Js.error(`Error loading scorer: ${B}`)}},[m]),E.useEffect(()=>{if(b){const B=b instanceof Error?b.message:"Failed to load agents";Js.error(`Error loading agents: ${B}`)}},[b]),E.useEffect(()=>{if(O){const B=O instanceof Error?O.message:"Failed to load workflows";Js.error(`Error loading workflows: ${B}`)}},[O]),p||m||b||O)return null;const M=d?.agentIds.map(B=>({name:B,id:Object.entries(g).find(([J,Z])=>Z.name===B)?.[0]}))||[],z=d?.workflowIds.map(B=>({name:B,id:Object.entries(w||{}).find(([J,Z])=>Z.name===B)?.[0]}))||[],U=[{key:"entities",label:"Entities",value:([...M.map(B=>({id:B.id,name:B.name,type:"AGENT"})),...z.map(B=>({id:B.id,name:B.name,type:"WORKFLOW"}))]||[]).map(B=>({id:B.id,name:B.name||B.id,path:`${B.type==="AGENT"?"/agents":"/workflows"}/${B.name}`}))}],L=B=>{B?.value&&r({entity:B?.value})},V=k?.scores||[],j=k?.pagination,N=B=>{s(B),l(!0)},I=kte({entries:V,id:n,update:s}),H=Ete({entries:V,id:n,update:s});return f.jsxs(f.Fragment,{children:[f.jsxs(lo,{children:[f.jsxs(ti,{children:[f.jsx(sp,{children:f.jsxs(Da,{as:Br,to:"/scorers",isCurrent:!0,children:[f.jsx(qe,{children:f.jsx(mI,{})}),"Scorers"]})}),f.jsx(E0,{children:f.jsx("div",{className:"w-48",children:f.jsx(qIr,{value:e})})}),f.jsx(Ma,{children:f.jsxs(Je,{as:Br,to:"https://mastra.ai/en/docs/scorers/overview",target:"_blank",children:[f.jsx(qe,{children:f.jsx(Ra,{})}),"Scorers documentation"]})})]}),f.jsx("div",{className:re("grid overflow-y-auto h-full"),children:f.jsxs("div",{className:re("max-w-[100rem] w-full px-12 mx-auto grid content-start gap-8 h-full"),children:[f.jsx(Wqe,{title:d?.scorer?.config?.name||"loading",description:d?.scorer?.config?.description||"loading",icon:f.jsx(mI,{})}),f.jsx(ib,{data:U,LinkComponent:Br,isLoading:v||S}),f.jsx(UIr,{selectedEntity:c,entityOptions:R,onEntityChange:L,onReset:()=>r({entity:"all"}),isLoading:C||v||S}),C?f.jsx("div",{className:"h-full w-full flex items-center justify-center",children:f.jsx(ea,{})}):f.jsx(AIr,{scores:V,selectedScoreId:n,pagination:{total:j?.total||0,hasMore:j?.hasMore||!1,perPage:j?.perPage||0,page:j?.page||0},onScoreClick:N,onPageChange:o,errorMsg:T?.message})]})})]}),f.jsx(_qe,{scorerName:d?.scorer?.config?.name,score:ERr(V.find(B=>B.id===n)),isOpen:a,onClose:()=>l(!1),onNext:I,onPrevious:H,computeTraceLink:(B,J)=>`/observability?traceId=${B}${J?`&spanId=${J}`:""}`})]})}const ERr=e=>{if(e)return{...e,createdAt:new Date(e.createdAt),updatedAt:new Date(e.updatedAt)}},CRr=async({client:e,page:t,perPage:r,filters:n})=>(await e.listTraces({pagination:{page:t,perPage:r},filters:n})).spans||[],TRr=({filters:e})=>{const t=rr(),{inView:r,setRef:n}=NZe(),s=z$e({queryKey:["traces",e],queryFn:({pageParam:i})=>CRr({client:t,page:i,perPage:25,filters:e}),initialPageParam:0,getNextPageParam:(i,o,a)=>{if(i?.length)return a+1},staleTime:0,gcTime:0,select:i=>i.pages.flatMap(o=>o),retry:!1,refetchInterval:3e3});return E.useEffect(()=>{r&&s.hasNextPage&&!s.isFetchingNextPage&&s.fetchNextPage()},[r,s.hasNextPage,s.isFetchingNextPage]),{...s,setEndOfListElement:n}},DRr=(e,t)=>{const r=rr();return ds({queryKey:["trace",e],queryFn:async()=>{if(!e)throw new Error("Trace ID is required");return await r.getTrace(e)},enabled:!!e,refetchInterval:3e3,...t})};function ARr(){const e=Mw(),[t,r]=dN(),[n,s]=E.useState(),[i,o]=E.useState({value:"all",label:"All",type:"all"}),[a,l]=E.useState(void 0),[c,u]=E.useState(void 0),[d,p]=E.useState(!1),{data:m={},isLoading:g}=ob(),{data:v,isLoading:b}=Y6(),{data:w={},isLoading:S}=rR(),{data:O,isLoading:k}=DRr(n,{enabled:!!n}),C=t.get("traceId"),T=t.get("spanId"),P=t.get("tab"),A=t.get("scoreId"),{data:R=[],isLoading:M,isFetchingNextPage:z,hasNextPage:Q,setEndOfListElement:U,error:L,isError:V}=TRr({filters:{...i?.type!=="all"&&{entityId:i?.value,entityType:i?.type},...a&&{startedAt:{start:a}},...c&&{endedAt:{end:c}}}});E.useEffect(()=>{C&&(s(C),p(!0))},[C]);const j=(Object.entries(m)||[]).map(([X,te])=>({value:te.id,label:te.name,type:sT.AGENT})),N=(Object.entries(v||{})||[]).map(([,X])=>({value:X.name,label:X.name,type:sT.WORKFLOW_RUN})),I=[{value:"all",label:"All",type:"all"},...j,...N];E.useEffect(()=>{if(I){const X=t.get("entity"),te=I.find(de=>de.value===X);te&&te.value!==i?.value&&o(te)}},[t,i,I]);const H=()=>{s(void 0),r({entity:"all",traceId:""}),p(!1),l(void 0),u(void 0)},B=(X,te)=>{if(te==="from")return l(X);u(X)},J=X=>{X?.value&&r({entity:X?.value})},Z=X=>{if(X===n)return s(void 0);s(X),p(!0)},F=V?cNr(L):void 0,W=i?.value!=="all"||a||c,K=kte({entries:R.map(X=>({id:X.traceId})),id:n,update:s}),se=Ete({entries:R.map(X=>({id:X.traceId})),id:n,update:s});return f.jsxs(f.Fragment,{children:[f.jsxs(lo,{children:[f.jsxs(ti,{children:[f.jsxs(_c,{children:[f.jsx(qe,{children:f.jsx(wB,{})}),"Observability"]}),f.jsx(Ma,{children:f.jsxs(Je,{as:Br,to:"https://mastra.ai/en/docs/observability/tracing/overview",target:"_blank",children:[f.jsx(qe,{children:f.jsx(Ra,{})}),"Observability documentation"]})})]}),f.jsx("div",{className:re("grid overflow-y-auto h-full"),children:f.jsxs("div",{className:re("max-w-[100rem] px-12 mx-auto grid content-start gap-8 h-full"),children:[f.jsx(Wqe,{title:"Observability",description:"Explore observability traces for your entities",icon:f.jsx(wB,{})}),f.jsx(U4r,{onEntityChange:J,onReset:H,selectedEntity:i,entityOptions:I,onDateChange:B,selectedDateFrom:a,selectedDateTo:c,isLoading:M||g||b}),M?f.jsx(Sqe,{columns:uI}):f.jsx(Q4r,{traces:R,selectedTraceId:n,onTraceClick:Z,errorMsg:F?.error,setEndOfListElement:U,filtersApplied:!!W,isFetchingNextPage:z,hasNextPage:Q})]})})]}),f.jsx(V4r,{traceSpans:O?.spans,traceId:n,initialSpanId:T||void 0,initialSpanTab:P==="scores"?"scores":"details",initialScoreId:A||void 0,traceDetails:R.find(X=>X.traceId===n),isOpen:d,onClose:()=>{e("/observability"),p(!1)},onNext:K,onPrevious:se,isLoadingSpans:k,computeTraceLink:(X,te)=>`/observability?traceId=${X}${te?`&spanId=${te}`:""}`,scorers:w,isLoadingScorers:S})]})}async function dWe(){const e=await fetch("https://mastra.ai/api/templates.json");if(!e.ok)throw new Error(`Failed to fetch templates: ${e.statusText}`);const t=await e.json(),r=[{title:"Weather Agent",slug:"weather-agent",githubUrl:"https://github.com/mastra-ai/weather-agent",description:"Get weather information of any city.",longDescription:"One Agent, one Workflow and one Tool to bring you the weather in your city.",imageURL:"",tags:["Agent","Workflow","Tool"],useCase:"",supportedProviders:["openai","anthropic","google","groq"],agents:["weatherAgent"],tools:["weatherTool"],workflows:["weatherWorkflow"]},...t],n=Array.from(new Set(r.flatMap(i=>i.tags))),s=Array.from(new Set(r.flatMap(i=>i.supportedProviders)));return{templates:r,tags:n,providers:s}}async function PRr({repo:e,owner:t}){const r=await fetch(`https://api.github.com/repos/${t}/${e}`);if(!r.ok)throw new Error(`Failed to fetch template: ${r.statusText}`);const n=await r.json();if(!n.is_template)throw new Error("Repo is not a template, please update the repo settings to make it a template");return{title:n.name,slug:n.name,description:n.description??"",imageURL:"",tags:[],useCase:"",longDescription:n.description??"",githubUrl:n.html_url,supportedProviders:[]}}async function $Rr({repoOrSlug:e,owner:t}){const{templates:r}=await dWe(),n=r.find(s=>s.slug===e);if(!n){if(e.startsWith("template-")){const i=r.find(o=>`template-${o.slug}`===e);if(i)return i}const s=await PRr({repo:e,owner:t});if(s)return s;throw new Error(`Template ${e} not found`)}return n}async function IRr({repo:e,owner:t,branch:r}){const n=`https://raw.githubusercontent.com/${t}/${e}/${r}/.env.example`,s=await fetch(n);return s.ok?(await s.text()).split(`
|
|
571
|
-
`).reduce((a,l)=>{if(!l||l.startsWith("#"))return a;const[c,u]=l.split("=");return c&&(a[c]=u?.split("")?.every(d=>d==="*")?"":u?.replaceAll('"',"")),a},{}):{}}const NRr=()=>ds({queryKey:["mastra-templates"],queryFn:dWe}),RRr=({repoOrSlug:e,owner:t})=>ds({queryKey:["template-repo",e,t],queryFn:()=>$Rr({repoOrSlug:e,owner:t})}),MRr=({repo:e,owner:t,branch:r})=>ds({queryKey:["template-repo-env-vars",e,t,r],queryFn:()=>IRr({repo:e,owner:t,branch:r})}),jRr=()=>{const e=rr();return ds({queryKey:["agent-builder-workflow"],queryFn:async()=>await e.getAgentBuilderAction("merge-template").details()})},FRr=()=>{const e=rr();return bs({mutationFn:async({runId:t})=>await e.getAgentBuilderAction("merge-template").createRun({runId:t})})},LRr=()=>{const e=rr();return bs({mutationFn:async({runId:t})=>await e.getAgentBuilderAction("merge-template").runById(t)})},U1e=(e,t,r)=>{let n={...t};if(!(n.payload?.workflowState?.steps&&Object.keys(n.payload.workflowState.steps).length>0)&&r?.allSteps&&(n.payload={...n.payload,workflowState:{...n.payload?.workflowState,steps:Object.keys(r.allSteps).reduce((i,o)=>(i[o]={id:o,description:r.allSteps[o].description,status:"pending"},i),{})}}),e.type==="start"||e.type==="workflow-start"){const i={};r?.allSteps&&Object.entries(r.allSteps).forEach(([a,l])=>{i[a]={id:l.id,description:l.description,status:"pending"}});const o=e.runId||e.payload?.runId;n={...n,runId:o,eventTimestamp:new Date().toISOString(),status:"running",phase:"initializing",payload:{workflowState:{status:"running",steps:i},currentStep:null}}}if(e.type==="step-start"||e.type==="workflow-step-start"){const i=e.payload.id;n={...n,phase:"processing",payload:{...n.payload,currentStep:{id:i,status:"running",startTime:new Date,...e.payload},workflowState:{...n.payload.workflowState,steps:{...n.payload.workflowState.steps,[i]:{...n.payload.workflowState.steps[i],status:"running",startTime:new Date,...e.payload}}}}}}if(e.type==="step-result"||e.type==="workflow-step-result"){const i=e.payload.id,o=e.payload.status,a=e.payload.error;n={...n,payload:{...n.payload,currentStep:{...n.payload.currentStep,status:e.payload.status,output:e.payload.output,error:e.payload.error,endTime:new Date},workflowState:{...n.payload.workflowState,steps:{...n.payload.workflowState.steps,[i]:{...n.payload.workflowState.steps[i],status:e.payload.status,output:e.payload.output,error:e.payload.error,endTime:new Date}}}}},o==="failed"&&a&&(n={...n,status:"failed",error:a,phase:"error",failedStep:{id:i,error:a,description:e.payload.description||i},payload:{...n.payload,workflowState:{...n.payload.workflowState,status:"failed"}},errorTimestamp:new Date})}return(e.type==="step-finish"||e.type==="workflow-step-finish")&&(n={...n,payload:{...n.payload,currentStep:null}}),(e.type==="finish"||e.type==="workflow-finish")&&(n.phase==="error"||n.status==="failed"?n={...n,completedAt:new Date}:n={...n,status:e.payload.status||"completed",phase:"completed",payload:{...n.payload,currentStep:null,workflowState:{...n.payload.workflowState,status:e.payload.status||"completed"}},completedAt:new Date}),e.type==="error"&&(n={...n,status:"failed",error:e.payload.error,phase:"error",payload:{...n.payload,workflowState:{...n.payload.workflowState,status:"failed"}},errorTimestamp:new Date}),{newState:n}},zRr=(e,t)=>{try{localStorage.setItem(`template-install-${e}`,JSON.stringify({state:t,timestamp:Date.now()}))}catch(r){console.warn("Failed to save template state to localStorage:",r)}},fWe=(e,t)=>{const[r,n]=E.useState({}),[s,i]=E.useState(!1);return{streamResult:r,isStreaming:s,processStream:async(a,l)=>{if(i(!0),n({}),!a)throw new Error("No stream returned");const c=a.getReader();let u={runId:l||t,eventTimestamp:new Date().toISOString(),phase:"running",payload:{workflowState:{steps:{}},currentStep:null}};try{for(;;){const{done:d,value:p}=await c.read();if(d)break;const{newState:m}=U1e(p,u,e);if(u=m,n(m),p.runId||l||t){const g=p.runId||l||t;zRr(g,m)}}}catch(d){console.error("💥 [processStream] Error processing template installation stream:",d);const{newState:p}=U1e({type:"error",payload:{error:d instanceof Error?d.message:"Unknown error"}},u,e);n(p)}finally{i(!1),c.releaseLock()}}}},BRr=e=>{const t=rr(),{streamResult:r,isStreaming:n,processStream:s}=fWe(e);return{streamInstall:bs({mutationFn:async({inputData:o,selectedModel:a,runId:l})=>{for(let u=1;u<=3;u++)try{const d=t.getAgentBuilderAction("merge-template"),p=new al;p.set("selectedModel",a);const m=await d.stream({inputData:o,requestContext:p},l);await s(m,l);return}catch(d){console.error(`💥 [streamInstall] Attempt ${u} failed:`,d);const p=d?.message?.includes("Failed to fetch")||d?.message?.includes("NetworkError")||d?.message?.includes("network error")||d?.message?.includes("fetch")||d?.code==="NETWORK_ERROR"||d?.name==="TypeError";if(console.warn(`Stream attempt ${u}/3 failed:`,d),p){const m=l?`Network error during template installation (likely hot reload). Please refresh the page to resume from where you left off using runId: ${l}`:"Network error during template installation (likely hot reload). Please try again.";throw console.error("🔌 Stream network error:",m),new Error(m)}throw console.error("❌ [streamInstall] Non-network error or max retries reached, throwing:",d),d}}}),streamResult:r,isStreaming:n}},VRr=e=>{const t=rr(),{streamResult:r,isStreaming:n,processStream:s}=fWe(e);return{observeInstall:bs({mutationFn:async({runId:o})=>{for(let c=1;c<=3;c++)try{const d=await t.getAgentBuilderAction("merge-template").observeStream({runId:o});await s(d,o);return}catch(u){console.error(`💥 [observeInstall] Attempt ${c} failed:`,u);const d=u?.message?.includes("Failed to fetch")||u?.message?.includes("NetworkError")||u?.message?.includes("network error")||u?.message?.includes("fetch")||u?.code==="NETWORK_ERROR"||u?.name==="TypeError";if(console.warn(`ObserveStream attempt ${c}/3 failed:`,u),d&&c<3){console.log(`🔄 ObserveStream network error detected (likely hot reload), retrying in 2000ms... (attempt ${c+1}/3)`),await new Promise(p=>setTimeout(p,2e3));continue}throw console.error("❌ [observeInstall] Non-network error or max retries reached, throwing:",u),u}}}),streamResult:r,isStreaming:n}};function URr(){const{data:e,isLoading:t}=NRr(),{templates:r,tags:n,providers:s}=e??{templates:[],tags:[],providers:[]},[i,o]=E.useState("all"),[a,l]=E.useState("all"),[c,u]=E.useState(""),d=[{value:"all",label:"All"}];(n||[]).forEach(S=>{d.push({value:S,label:S})});const p=[{value:"all",label:"All"}];(s||[]).forEach(S=>{p.push({value:S,label:S})});const m=(S,O)=>{O==="tag"?o(S):O==="provider"&&l(S)},g=S=>{u(S)},v=()=>{o("all"),l("all"),u("")},b=r.filter(S=>!(c&&!S.title.toLowerCase().includes(c)&&!S.description.toLowerCase().includes(c)||i!=="all"&&!S.tags.includes(i)||a!=="all"&&!S.supportedProviders.includes(a))),w=c||i!=="all"||a!=="all";return f.jsxs(lo,{children:[f.jsx(ti,{children:f.jsxs(_c,{children:[f.jsx(qe,{children:f.jsx(Uq,{})}),"Templates"]})}),f.jsxs("div",{className:re("overflow-y-auto w-full h-full px-8 pb-12 z-10"),children:[f.jsx(p4r,{selectedTag:i,onTagChange:S=>m(S,"tag"),tagOptions:d,selectedProvider:a,onProviderChange:S=>m(S,"provider"),providerOptions:p,searchTerm:c,onSearchChange:g,onReset:w?v:void 0,className:"max-w-[80rem]",isLoading:t}),f.jsx(m4r,{templates:b,linkComponent:Br,className:"max-w-[80rem] mx-auto",isLoading:t})]})]})}const QRr="1.0.0-beta.26";function ZRr(){const{templateSlug:e}=xu(),[t,r]=dN(),[n,s]=E.useState(""),[i,o]=E.useState(""),[a,l]=E.useState(""),[c,u]=E.useState({}),[d,p]=E.useState([]),[m,g]=E.useState(null),[v,b]=E.useState(!1),[w,S]=E.useState(""),[O,k]=E.useState(!1),[C,T]=E.useState(!1),[P,A]=E.useState([]),{data:R,isLoading:M}=RRr({repoOrSlug:e,owner:"mastra-ai"}),Q=QRr?.includes("beta")??!1?"beta":"main",{data:U,isLoading:L}=MRr({repo:R?.githubUrl?new URL(R.githubUrl).pathname.split("/")[2]:`template-${e}`,owner:"mastra-ai",branch:Q}),{data:V,isLoading:j}=jRr(),{mutateAsync:N,isPending:I}=FRr(),{mutateAsync:H,isPending:B}=LRr(),{streamInstall:J,streamResult:Z,isStreaming:F}=BRr(V),{observeInstall:W,streamResult:K,isStreaming:se}=VRr(V);E.useEffect(()=>{const Me=t.get("runId");Me&&!v&&!m&&!F&&!se&&(console.log("🔄 Checking completed run after hot reload:",{runId:Me}),S(Me),H({runId:Me}).then(We=>{const lt=We.snapshot;if(lt?.status==="success"&<?.result?.success)b(!0);else if(lt?.result?.success===!1)if(lt?.result?.validationResults&&!lt?.result?.validationResults?.valid&<?.result?.validationResults?.remainingErrors>0){const{remainingErrors:zr,errors:Or}=lt.result.validationResults,le=`Template installation completed but ${zr} validation issue${zr>1?"s":""} remain unresolved.`;g(le),A(Or||[])}else g(lt?.result?.message||lt?.result?.error||"Template installation failed")}).catch(We=>{console.error("❌ Failed to fetch run details:",We),g("Failed to retrieve installation status after reload")}))},[t,v,m,F,se,H]),E.useEffect(()=>{const Me=t.get("runId"),We=t.get("resume"),lt=t.get("provider");if(Me&&We==="true"&<&&!F&&!se&&!O&&!C&&V){S(Me),k(!0);try{H({runId:Me}).then(Ke=>{if(Ke.snapshot?.status==="running")return W.mutateAsync({runId:Me})}).then(()=>{r(Ke=>{const zr=new URLSearchParams(Ke);return zr.delete("resume"),zr})}).catch(Ke=>{console.error("❌ Failed to resume template installation:",Ke),Ke.message?.includes("404")||Ke.message?.includes("not found")?g("Template installation run not found. It may have expired or been completed."):g("Failed to resume template installation. Please try again.")})}catch(Ke){console.error("❌ Auto-resume failed with error:",Ke),g("Failed to resume template installation. Please refresh and try again.")}}},[t,e,F,se,O,C,V,H,W,r]);const X=[{value:"openai",label:"OpenAI"},{value:"anthropic",label:"Anthropic"},{value:"groq",label:"Groq"},{value:"google",label:"Google"}],te=[{key:"tools",label:"Tools",value:R?.tools?.length?R.tools.map(Me=>Me).join(", "):"n/a",icon:f.jsx(Cu,{})},{key:"agents",label:"Agents",value:R?.agents?.length?R.agents.map(Me=>Me).join(", "):"n/a",icon:f.jsx(Fo,{})},{key:"workflows",label:"Workflows",value:R?.workflows?.length?R.workflows.map(Me=>Me).join(", "):"n/a",icon:f.jsx(SJe,{})},{key:"providers",label:"Providers",value:R?.supportedProviders?.length?R.supportedProviders.join(", "):"n/a",icon:f.jsx(aJe,{})},{key:"tags",label:"Tags",value:R?.tags?.length?R.tags.join(", "):"n/a",icon:f.jsx(xJe,{})}],de=[{...te[0]},{...te[1]},{...te[2]}].filter(Me=>Me.value!=="n/a");E.useEffect(()=>{U&&u(U)},[U]),E.useEffect(()=>{const Me=Z||K;Me?.phase==="error"&&Me?.error&&g(Me.error)},[Z?.phase,Z?.error,K?.phase,K?.error]);const ue=Me=>{s(Me)},Ae=async Me=>(o(Me.provider),l(Me.modelId),{message:"Model updated successfully"}),_e=async()=>{const Me=Object.entries(c).reduce((We,[lt,Ke])=>(Ke===""&&We.push(lt),We),[]);if(Me.length>0){p(Me);return}if(R){g(null),b(!1),S(""),T(!0);try{const lt={repo:R.githubUrl||`https://github.com/mastra-ai/template-${R.slug}`,ref:Q,slug:R.slug,variables:c},{runId:Ke}=await N({});S(Ke),r(zr=>{const Or=new URLSearchParams(zr);return Or.set("runId",Ke),Or.set("resume","true"),Or.set("provider",n||"openai"),Or}),await J.mutateAsync({inputData:lt,selectedModel:{provider:i,modelId:a},runId:Ke})}catch(We){T(!1),g(We?.message||"Template installation failed"),console.error("Template installation failed",We)}}},De=Me=>{const{name:We,value:lt}=Me.target;lt.trim()===""?p(Ke=>[...Ke,We]):p(Ke=>Ke.filter(zr=>zr!==We)),u(Ke=>({...Ke,[We]:lt}))};return f.jsxs(lo,{children:[f.jsx(ti,{children:f.jsxs(sp,{children:[f.jsxs(Da,{as:Br,to:"/templates",children:[f.jsx(qe,{children:f.jsx(Uq,{})}),"Templates"]}),f.jsx(Da,{as:Br,to:`/templates/${R?.slug}`,isCurrent:!0,children:R?.title&&R.title})]})}),f.jsx("div",{className:re("w-full lg:px-12 h-full overflow-y-scroll"),children:f.jsxs("div",{className:"p-6 w-full max-w-[80rem] mx-auto grid gap-y-4",children:[f.jsx(g4r,{isLoading:M,title:R?.title,description:R?.longDescription,imageURL:R?.imageURL,githubUrl:R?.githubUrl,infoData:te,templateSlug:e}),R&&f.jsxs(f.Fragment,{children:[(F||se)&&f.jsx(S4r,{name:R.title,streamResult:se?K:Z,runId:w,workflowInfo:V}),v&&f.jsx(O4r,{name:R.title,installedEntities:de,linkComponent:Br}),m&&f.jsx(_4r,{errorMsg:m,validationErrors:P.length>0?P:Z?.validationResults?.errors||K?.validationResults?.errors}),!F&&!se&&!v&&!m&&f.jsx(y4r,{providerOptions:X,selectedProvider:n,onProviderChange:ue,variables:c,setVariables:u,errors:d,setErrors:p,handleInstallTemplate:_e,handleVariableChange:De,isLoadingEnvVars:L||j,isInstalling:I,defaultModelProvider:i,defaultModelId:a,onModelUpdate:Ae})]})]})})]})}const qRr=()=>{const{baseUrl:e,headers:t}=Pte();return f.jsxs(lo,{children:[f.jsx(ti,{children:f.jsxs(_c,{children:[f.jsx(qe,{children:f.jsx(DZe,{})}),"Settings"]})}),f.jsx(Oc,{children:f.jsx("div",{className:"p-5",children:f.jsx("div",{className:"max-w-2xl p-5 w-full bg-surface3 border border-border1 rounded-lg",children:f.jsx(Jqe,{initialConfig:{baseUrl:e,headers:t}})})})})]})},HRr={agentLink:e=>`/agents/${e}`,agentToolLink:(e,t)=>`/agents/${e}/tools/${t}`,agentsLink:()=>"/agents",agentNewThreadLink:e=>`/agents/${e}/chat/${Go()}?new=true`,agentThreadLink:(e,t,r)=>r?`/agents/${e}/chat/${t}?messageId=${r}`:`/agents/${e}/chat/${t}`,workflowsLink:()=>"/workflows",workflowLink:e=>`/workflows/${e}`,networkLink:e=>`/networks/v-next/${e}/chat`,networkNewThreadLink:e=>`/networks/v-next/${e}/chat/${Go()}`,networkThreadLink:(e,t)=>`/networks/v-next/${e}/chat/${t}`,scorerLink:e=>`/scorers/${e}`,toolLink:e=>`/tools/${e}`,processorsLink:()=>"/processors",processorLink:e=>`/processors/${e}`,mcpServerLink:e=>`/mcps/${e}`,mcpServerToolLink:(e,t)=>`/mcps/${e}/tools/${t}`,workflowRunLink:(e,t)=>`/workflows/${e}/graph/${t}`},WRr=({children:e})=>{const t=Mw(),r=n=>{t(n)};return f.jsx(BPr,{Link:ORr,navigate:r,paths:HRr,children:e})};function GRr(){const e=window.MASTRA_STUDIO_BASE_PATH||"",{baseUrl:t,headers:r,isLoading:n}=Pte(),{isMastraPlatform:s}=Kqe();return n?null:t?f.jsx(P3t,{baseUrl:t,headers:r,children:f.jsx(yRr,{children:f.jsx(UYe,{basename:e,children:f.jsx(WRr,{children:f.jsx(bYe,{children:f.jsxs(Wn,{element:f.jsx(VNr,{children:f.jsx(_j,{})}),children:[s?null:f.jsxs(f.Fragment,{children:[f.jsx(Wn,{path:"/settings",element:f.jsx(qRr,{})}),f.jsx(Wn,{path:"/templates",element:f.jsx(URr,{})}),f.jsx(Wn,{path:"/templates/:templateSlug",element:f.jsx(ZRr,{})})]}),f.jsx(Wn,{path:"/scorers",element:f.jsx(_Rr,{})}),f.jsx(Wn,{path:"/scorers/:scorerId",element:f.jsx(kRr,{})}),f.jsx(Wn,{path:"/observability",element:f.jsx(ARr,{})}),f.jsx(Wn,{path:"/agents",element:f.jsx(WNr,{})}),f.jsx(Wn,{path:"/agents/:agentId",element:f.jsx(gB,{to:"/agents/:agentId/chat"})}),f.jsx(Wn,{path:"/agents/:agentId/tools/:toolId",element:f.jsx(XNr,{})}),f.jsxs(Wn,{path:"/agents/:agentId",element:f.jsx(QNr,{children:f.jsx(_j,{})}),children:[f.jsx(Wn,{path:"chat",element:f.jsx(Vxe,{})}),f.jsx(Wn,{path:"chat/:threadId",element:f.jsx(Vxe,{})})]}),f.jsx(Wn,{path:"/tools",element:f.jsx(ZNr,{})}),f.jsx(Wn,{path:"/tools/:toolId",element:f.jsx(YNr,{})}),f.jsx(Wn,{path:"/processors",element:f.jsx(qNr,{})}),f.jsx(Wn,{path:"/processors/:processorId",element:f.jsx(HNr,{})}),f.jsx(Wn,{path:"/mcps",element:f.jsx(bRr,{})}),f.jsx(Wn,{path:"/mcps/:serverId",element:f.jsx(wRr,{})}),f.jsx(Wn,{path:"/mcps/:serverId/tools/:toolId",element:f.jsx(xRr,{})}),f.jsx(Wn,{path:"/workflows",element:f.jsx(JNr,{})}),f.jsx(Wn,{path:"/workflows/:workflowId",element:f.jsx(gB,{to:"/workflows/:workflowId/graph"})}),f.jsxs(Wn,{path:"/workflows/:workflowId",element:f.jsx(e5r,{children:f.jsx(_j,{})}),children:[f.jsx(Wn,{path:"/workflows/:workflowId/graph",element:f.jsx(Uxe,{})}),f.jsx(Wn,{path:"/workflows/:workflowId/graph/:runId",element:f.jsx(Uxe,{})})]}),f.jsx(Wn,{path:"/",element:f.jsx(gB,{to:"/agents"})}),f.jsx(Wn,{path:"/request-context",element:f.jsx(vRr,{})})]})})})})})}):f.jsx(MNr,{})}function XRr(){const e=window.MASTRA_SERVER_PROTOCOL||"http",t=window.MASTRA_SERVER_HOST||"localhost",r=window.MASTRA_SERVER_PORT||4111,s=window.MASTRA_CLOUD_API_ENDPOINT||""||`${e}://${t}:${r}`;return f.jsx(lNr,{children:f.jsx(ENr,{endpoint:s,children:f.jsx(GRr,{})})})}CXe.createRoot(document.getElementById("root")).render(f.jsx(E.StrictMode,{children:f.jsx(XRr,{})}));const P9r=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));export{kQe as A,JDe as B,eAe as C,fQe as D,Cc as E,q2e as F,tu as G,JRr as H,vs as I,Wh as J,A6 as K,Kv as L,O9r as M,YDe as N,Ggr as O,P9r as P,P5 as _,jft as a,Kft as b,Vae as c,XMr as d,Wv as e,Gft as f,t0 as g,Jft as h,M0 as i,j0 as j,R0 as k,t1 as l,fkt as m,VPe as n,Kn as o,MSt as p,jSt as q,H3t as r,fG as s,Y as t,JG as u,QI as v,Vft as w,Wa as x,rt as y,Ne as z};
|
|
571
|
+
`).reduce((a,l)=>{if(!l||l.startsWith("#"))return a;const[c,u]=l.split("=");return c&&(a[c]=u?.split("")?.every(d=>d==="*")?"":u?.replaceAll('"',"")),a},{}):{}}const NRr=()=>ds({queryKey:["mastra-templates"],queryFn:dWe}),RRr=({repoOrSlug:e,owner:t})=>ds({queryKey:["template-repo",e,t],queryFn:()=>$Rr({repoOrSlug:e,owner:t})}),MRr=({repo:e,owner:t,branch:r})=>ds({queryKey:["template-repo-env-vars",e,t,r],queryFn:()=>IRr({repo:e,owner:t,branch:r})}),jRr=()=>{const e=rr();return ds({queryKey:["agent-builder-workflow"],queryFn:async()=>await e.getAgentBuilderAction("merge-template").details()})},FRr=()=>{const e=rr();return bs({mutationFn:async({runId:t})=>await e.getAgentBuilderAction("merge-template").createRun({runId:t})})},LRr=()=>{const e=rr();return bs({mutationFn:async({runId:t})=>await e.getAgentBuilderAction("merge-template").runById(t)})},U1e=(e,t,r)=>{let n={...t};if(!(n.payload?.workflowState?.steps&&Object.keys(n.payload.workflowState.steps).length>0)&&r?.allSteps&&(n.payload={...n.payload,workflowState:{...n.payload?.workflowState,steps:Object.keys(r.allSteps).reduce((i,o)=>(i[o]={id:o,description:r.allSteps[o].description,status:"pending"},i),{})}}),e.type==="start"||e.type==="workflow-start"){const i={};r?.allSteps&&Object.entries(r.allSteps).forEach(([a,l])=>{i[a]={id:l.id,description:l.description,status:"pending"}});const o=e.runId||e.payload?.runId;n={...n,runId:o,eventTimestamp:new Date().toISOString(),status:"running",phase:"initializing",payload:{workflowState:{status:"running",steps:i},currentStep:null}}}if(e.type==="step-start"||e.type==="workflow-step-start"){const i=e.payload.id;n={...n,phase:"processing",payload:{...n.payload,currentStep:{id:i,status:"running",startTime:new Date,...e.payload},workflowState:{...n.payload.workflowState,steps:{...n.payload.workflowState.steps,[i]:{...n.payload.workflowState.steps[i],status:"running",startTime:new Date,...e.payload}}}}}}if(e.type==="step-result"||e.type==="workflow-step-result"){const i=e.payload.id,o=e.payload.status,a=e.payload.error;n={...n,payload:{...n.payload,currentStep:{...n.payload.currentStep,status:e.payload.status,output:e.payload.output,error:e.payload.error,endTime:new Date},workflowState:{...n.payload.workflowState,steps:{...n.payload.workflowState.steps,[i]:{...n.payload.workflowState.steps[i],status:e.payload.status,output:e.payload.output,error:e.payload.error,endTime:new Date}}}}},o==="failed"&&a&&(n={...n,status:"failed",error:a,phase:"error",failedStep:{id:i,error:a,description:e.payload.description||i},payload:{...n.payload,workflowState:{...n.payload.workflowState,status:"failed"}},errorTimestamp:new Date})}return(e.type==="step-finish"||e.type==="workflow-step-finish")&&(n={...n,payload:{...n.payload,currentStep:null}}),(e.type==="finish"||e.type==="workflow-finish")&&(n.phase==="error"||n.status==="failed"?n={...n,completedAt:new Date}:n={...n,status:e.payload.status||"completed",phase:"completed",payload:{...n.payload,currentStep:null,workflowState:{...n.payload.workflowState,status:e.payload.status||"completed"}},completedAt:new Date}),e.type==="error"&&(n={...n,status:"failed",error:e.payload.error,phase:"error",payload:{...n.payload,workflowState:{...n.payload.workflowState,status:"failed"}},errorTimestamp:new Date}),{newState:n}},zRr=(e,t)=>{try{localStorage.setItem(`template-install-${e}`,JSON.stringify({state:t,timestamp:Date.now()}))}catch(r){console.warn("Failed to save template state to localStorage:",r)}},fWe=(e,t)=>{const[r,n]=E.useState({}),[s,i]=E.useState(!1);return{streamResult:r,isStreaming:s,processStream:async(a,l)=>{if(i(!0),n({}),!a)throw new Error("No stream returned");const c=a.getReader();let u={runId:l||t,eventTimestamp:new Date().toISOString(),phase:"running",payload:{workflowState:{steps:{}},currentStep:null}};try{for(;;){const{done:d,value:p}=await c.read();if(d)break;const{newState:m}=U1e(p,u,e);if(u=m,n(m),p.runId||l||t){const g=p.runId||l||t;zRr(g,m)}}}catch(d){console.error("💥 [processStream] Error processing template installation stream:",d);const{newState:p}=U1e({type:"error",payload:{error:d instanceof Error?d.message:"Unknown error"}},u,e);n(p)}finally{i(!1),c.releaseLock()}}}},BRr=e=>{const t=rr(),{streamResult:r,isStreaming:n,processStream:s}=fWe(e);return{streamInstall:bs({mutationFn:async({inputData:o,selectedModel:a,runId:l})=>{for(let u=1;u<=3;u++)try{const d=t.getAgentBuilderAction("merge-template"),p=new al;p.set("selectedModel",a);const m=await d.stream({inputData:o,requestContext:p},l);await s(m,l);return}catch(d){console.error(`💥 [streamInstall] Attempt ${u} failed:`,d);const p=d?.message?.includes("Failed to fetch")||d?.message?.includes("NetworkError")||d?.message?.includes("network error")||d?.message?.includes("fetch")||d?.code==="NETWORK_ERROR"||d?.name==="TypeError";if(console.warn(`Stream attempt ${u}/3 failed:`,d),p){const m=l?`Network error during template installation (likely hot reload). Please refresh the page to resume from where you left off using runId: ${l}`:"Network error during template installation (likely hot reload). Please try again.";throw console.error("🔌 Stream network error:",m),new Error(m)}throw console.error("❌ [streamInstall] Non-network error or max retries reached, throwing:",d),d}}}),streamResult:r,isStreaming:n}},VRr=e=>{const t=rr(),{streamResult:r,isStreaming:n,processStream:s}=fWe(e);return{observeInstall:bs({mutationFn:async({runId:o})=>{for(let c=1;c<=3;c++)try{const d=await t.getAgentBuilderAction("merge-template").observeStream({runId:o});await s(d,o);return}catch(u){console.error(`💥 [observeInstall] Attempt ${c} failed:`,u);const d=u?.message?.includes("Failed to fetch")||u?.message?.includes("NetworkError")||u?.message?.includes("network error")||u?.message?.includes("fetch")||u?.code==="NETWORK_ERROR"||u?.name==="TypeError";if(console.warn(`ObserveStream attempt ${c}/3 failed:`,u),d&&c<3){console.log(`🔄 ObserveStream network error detected (likely hot reload), retrying in 2000ms... (attempt ${c+1}/3)`),await new Promise(p=>setTimeout(p,2e3));continue}throw console.error("❌ [observeInstall] Non-network error or max retries reached, throwing:",u),u}}}),streamResult:r,isStreaming:n}};function URr(){const{data:e,isLoading:t}=NRr(),{templates:r,tags:n,providers:s}=e??{templates:[],tags:[],providers:[]},[i,o]=E.useState("all"),[a,l]=E.useState("all"),[c,u]=E.useState(""),d=[{value:"all",label:"All"}];(n||[]).forEach(S=>{d.push({value:S,label:S})});const p=[{value:"all",label:"All"}];(s||[]).forEach(S=>{p.push({value:S,label:S})});const m=(S,O)=>{O==="tag"?o(S):O==="provider"&&l(S)},g=S=>{u(S)},v=()=>{o("all"),l("all"),u("")},b=r.filter(S=>!(c&&!S.title.toLowerCase().includes(c)&&!S.description.toLowerCase().includes(c)||i!=="all"&&!S.tags.includes(i)||a!=="all"&&!S.supportedProviders.includes(a))),w=c||i!=="all"||a!=="all";return f.jsxs(lo,{children:[f.jsx(ti,{children:f.jsxs(_c,{children:[f.jsx(qe,{children:f.jsx(Uq,{})}),"Templates"]})}),f.jsxs("div",{className:re("overflow-y-auto w-full h-full px-8 pb-12 z-10"),children:[f.jsx(p4r,{selectedTag:i,onTagChange:S=>m(S,"tag"),tagOptions:d,selectedProvider:a,onProviderChange:S=>m(S,"provider"),providerOptions:p,searchTerm:c,onSearchChange:g,onReset:w?v:void 0,className:"max-w-[80rem]",isLoading:t}),f.jsx(m4r,{templates:b,linkComponent:Br,className:"max-w-[80rem] mx-auto",isLoading:t})]})]})}const QRr="1.0.0-beta.27";function ZRr(){const{templateSlug:e}=xu(),[t,r]=dN(),[n,s]=E.useState(""),[i,o]=E.useState(""),[a,l]=E.useState(""),[c,u]=E.useState({}),[d,p]=E.useState([]),[m,g]=E.useState(null),[v,b]=E.useState(!1),[w,S]=E.useState(""),[O,k]=E.useState(!1),[C,T]=E.useState(!1),[P,A]=E.useState([]),{data:R,isLoading:M}=RRr({repoOrSlug:e,owner:"mastra-ai"}),Q=QRr?.includes("beta")??!1?"beta":"main",{data:U,isLoading:L}=MRr({repo:R?.githubUrl?new URL(R.githubUrl).pathname.split("/")[2]:`template-${e}`,owner:"mastra-ai",branch:Q}),{data:V,isLoading:j}=jRr(),{mutateAsync:N,isPending:I}=FRr(),{mutateAsync:H,isPending:B}=LRr(),{streamInstall:J,streamResult:Z,isStreaming:F}=BRr(V),{observeInstall:W,streamResult:K,isStreaming:se}=VRr(V);E.useEffect(()=>{const Me=t.get("runId");Me&&!v&&!m&&!F&&!se&&(console.log("🔄 Checking completed run after hot reload:",{runId:Me}),S(Me),H({runId:Me}).then(We=>{const lt=We.snapshot;if(lt?.status==="success"&<?.result?.success)b(!0);else if(lt?.result?.success===!1)if(lt?.result?.validationResults&&!lt?.result?.validationResults?.valid&<?.result?.validationResults?.remainingErrors>0){const{remainingErrors:zr,errors:Or}=lt.result.validationResults,le=`Template installation completed but ${zr} validation issue${zr>1?"s":""} remain unresolved.`;g(le),A(Or||[])}else g(lt?.result?.message||lt?.result?.error||"Template installation failed")}).catch(We=>{console.error("❌ Failed to fetch run details:",We),g("Failed to retrieve installation status after reload")}))},[t,v,m,F,se,H]),E.useEffect(()=>{const Me=t.get("runId"),We=t.get("resume"),lt=t.get("provider");if(Me&&We==="true"&<&&!F&&!se&&!O&&!C&&V){S(Me),k(!0);try{H({runId:Me}).then(Ke=>{if(Ke.snapshot?.status==="running")return W.mutateAsync({runId:Me})}).then(()=>{r(Ke=>{const zr=new URLSearchParams(Ke);return zr.delete("resume"),zr})}).catch(Ke=>{console.error("❌ Failed to resume template installation:",Ke),Ke.message?.includes("404")||Ke.message?.includes("not found")?g("Template installation run not found. It may have expired or been completed."):g("Failed to resume template installation. Please try again.")})}catch(Ke){console.error("❌ Auto-resume failed with error:",Ke),g("Failed to resume template installation. Please refresh and try again.")}}},[t,e,F,se,O,C,V,H,W,r]);const X=[{value:"openai",label:"OpenAI"},{value:"anthropic",label:"Anthropic"},{value:"groq",label:"Groq"},{value:"google",label:"Google"}],te=[{key:"tools",label:"Tools",value:R?.tools?.length?R.tools.map(Me=>Me).join(", "):"n/a",icon:f.jsx(Cu,{})},{key:"agents",label:"Agents",value:R?.agents?.length?R.agents.map(Me=>Me).join(", "):"n/a",icon:f.jsx(Fo,{})},{key:"workflows",label:"Workflows",value:R?.workflows?.length?R.workflows.map(Me=>Me).join(", "):"n/a",icon:f.jsx(SJe,{})},{key:"providers",label:"Providers",value:R?.supportedProviders?.length?R.supportedProviders.join(", "):"n/a",icon:f.jsx(aJe,{})},{key:"tags",label:"Tags",value:R?.tags?.length?R.tags.join(", "):"n/a",icon:f.jsx(xJe,{})}],de=[{...te[0]},{...te[1]},{...te[2]}].filter(Me=>Me.value!=="n/a");E.useEffect(()=>{U&&u(U)},[U]),E.useEffect(()=>{const Me=Z||K;Me?.phase==="error"&&Me?.error&&g(Me.error)},[Z?.phase,Z?.error,K?.phase,K?.error]);const ue=Me=>{s(Me)},Ae=async Me=>(o(Me.provider),l(Me.modelId),{message:"Model updated successfully"}),_e=async()=>{const Me=Object.entries(c).reduce((We,[lt,Ke])=>(Ke===""&&We.push(lt),We),[]);if(Me.length>0){p(Me);return}if(R){g(null),b(!1),S(""),T(!0);try{const lt={repo:R.githubUrl||`https://github.com/mastra-ai/template-${R.slug}`,ref:Q,slug:R.slug,variables:c},{runId:Ke}=await N({});S(Ke),r(zr=>{const Or=new URLSearchParams(zr);return Or.set("runId",Ke),Or.set("resume","true"),Or.set("provider",n||"openai"),Or}),await J.mutateAsync({inputData:lt,selectedModel:{provider:i,modelId:a},runId:Ke})}catch(We){T(!1),g(We?.message||"Template installation failed"),console.error("Template installation failed",We)}}},De=Me=>{const{name:We,value:lt}=Me.target;lt.trim()===""?p(Ke=>[...Ke,We]):p(Ke=>Ke.filter(zr=>zr!==We)),u(Ke=>({...Ke,[We]:lt}))};return f.jsxs(lo,{children:[f.jsx(ti,{children:f.jsxs(sp,{children:[f.jsxs(Da,{as:Br,to:"/templates",children:[f.jsx(qe,{children:f.jsx(Uq,{})}),"Templates"]}),f.jsx(Da,{as:Br,to:`/templates/${R?.slug}`,isCurrent:!0,children:R?.title&&R.title})]})}),f.jsx("div",{className:re("w-full lg:px-12 h-full overflow-y-scroll"),children:f.jsxs("div",{className:"p-6 w-full max-w-[80rem] mx-auto grid gap-y-4",children:[f.jsx(g4r,{isLoading:M,title:R?.title,description:R?.longDescription,imageURL:R?.imageURL,githubUrl:R?.githubUrl,infoData:te,templateSlug:e}),R&&f.jsxs(f.Fragment,{children:[(F||se)&&f.jsx(S4r,{name:R.title,streamResult:se?K:Z,runId:w,workflowInfo:V}),v&&f.jsx(O4r,{name:R.title,installedEntities:de,linkComponent:Br}),m&&f.jsx(_4r,{errorMsg:m,validationErrors:P.length>0?P:Z?.validationResults?.errors||K?.validationResults?.errors}),!F&&!se&&!v&&!m&&f.jsx(y4r,{providerOptions:X,selectedProvider:n,onProviderChange:ue,variables:c,setVariables:u,errors:d,setErrors:p,handleInstallTemplate:_e,handleVariableChange:De,isLoadingEnvVars:L||j,isInstalling:I,defaultModelProvider:i,defaultModelId:a,onModelUpdate:Ae})]})]})})]})}const qRr=()=>{const{baseUrl:e,headers:t}=Pte();return f.jsxs(lo,{children:[f.jsx(ti,{children:f.jsxs(_c,{children:[f.jsx(qe,{children:f.jsx(DZe,{})}),"Settings"]})}),f.jsx(Oc,{children:f.jsx("div",{className:"p-5",children:f.jsx("div",{className:"max-w-2xl p-5 w-full bg-surface3 border border-border1 rounded-lg",children:f.jsx(Jqe,{initialConfig:{baseUrl:e,headers:t}})})})})]})},HRr={agentLink:e=>`/agents/${e}`,agentToolLink:(e,t)=>`/agents/${e}/tools/${t}`,agentsLink:()=>"/agents",agentNewThreadLink:e=>`/agents/${e}/chat/${Go()}?new=true`,agentThreadLink:(e,t,r)=>r?`/agents/${e}/chat/${t}?messageId=${r}`:`/agents/${e}/chat/${t}`,workflowsLink:()=>"/workflows",workflowLink:e=>`/workflows/${e}`,networkLink:e=>`/networks/v-next/${e}/chat`,networkNewThreadLink:e=>`/networks/v-next/${e}/chat/${Go()}`,networkThreadLink:(e,t)=>`/networks/v-next/${e}/chat/${t}`,scorerLink:e=>`/scorers/${e}`,toolLink:e=>`/tools/${e}`,processorsLink:()=>"/processors",processorLink:e=>`/processors/${e}`,mcpServerLink:e=>`/mcps/${e}`,mcpServerToolLink:(e,t)=>`/mcps/${e}/tools/${t}`,workflowRunLink:(e,t)=>`/workflows/${e}/graph/${t}`},WRr=({children:e})=>{const t=Mw(),r=n=>{t(n)};return f.jsx(BPr,{Link:ORr,navigate:r,paths:HRr,children:e})};function GRr(){const e=window.MASTRA_STUDIO_BASE_PATH||"",{baseUrl:t,headers:r,isLoading:n}=Pte(),{isMastraPlatform:s}=Kqe();return n?null:t?f.jsx(P3t,{baseUrl:t,headers:r,children:f.jsx(yRr,{children:f.jsx(UYe,{basename:e,children:f.jsx(WRr,{children:f.jsx(bYe,{children:f.jsxs(Wn,{element:f.jsx(VNr,{children:f.jsx(_j,{})}),children:[s?null:f.jsxs(f.Fragment,{children:[f.jsx(Wn,{path:"/settings",element:f.jsx(qRr,{})}),f.jsx(Wn,{path:"/templates",element:f.jsx(URr,{})}),f.jsx(Wn,{path:"/templates/:templateSlug",element:f.jsx(ZRr,{})})]}),f.jsx(Wn,{path:"/scorers",element:f.jsx(_Rr,{})}),f.jsx(Wn,{path:"/scorers/:scorerId",element:f.jsx(kRr,{})}),f.jsx(Wn,{path:"/observability",element:f.jsx(ARr,{})}),f.jsx(Wn,{path:"/agents",element:f.jsx(WNr,{})}),f.jsx(Wn,{path:"/agents/:agentId",element:f.jsx(gB,{to:"/agents/:agentId/chat"})}),f.jsx(Wn,{path:"/agents/:agentId/tools/:toolId",element:f.jsx(XNr,{})}),f.jsxs(Wn,{path:"/agents/:agentId",element:f.jsx(QNr,{children:f.jsx(_j,{})}),children:[f.jsx(Wn,{path:"chat",element:f.jsx(Vxe,{})}),f.jsx(Wn,{path:"chat/:threadId",element:f.jsx(Vxe,{})})]}),f.jsx(Wn,{path:"/tools",element:f.jsx(ZNr,{})}),f.jsx(Wn,{path:"/tools/:toolId",element:f.jsx(YNr,{})}),f.jsx(Wn,{path:"/processors",element:f.jsx(qNr,{})}),f.jsx(Wn,{path:"/processors/:processorId",element:f.jsx(HNr,{})}),f.jsx(Wn,{path:"/mcps",element:f.jsx(bRr,{})}),f.jsx(Wn,{path:"/mcps/:serverId",element:f.jsx(wRr,{})}),f.jsx(Wn,{path:"/mcps/:serverId/tools/:toolId",element:f.jsx(xRr,{})}),f.jsx(Wn,{path:"/workflows",element:f.jsx(JNr,{})}),f.jsx(Wn,{path:"/workflows/:workflowId",element:f.jsx(gB,{to:"/workflows/:workflowId/graph"})}),f.jsxs(Wn,{path:"/workflows/:workflowId",element:f.jsx(e5r,{children:f.jsx(_j,{})}),children:[f.jsx(Wn,{path:"/workflows/:workflowId/graph",element:f.jsx(Uxe,{})}),f.jsx(Wn,{path:"/workflows/:workflowId/graph/:runId",element:f.jsx(Uxe,{})})]}),f.jsx(Wn,{path:"/",element:f.jsx(gB,{to:"/agents"})}),f.jsx(Wn,{path:"/request-context",element:f.jsx(vRr,{})})]})})})})})}):f.jsx(MNr,{})}function XRr(){const e=window.MASTRA_SERVER_PROTOCOL||"http",t=window.MASTRA_SERVER_HOST||"localhost",r=window.MASTRA_SERVER_PORT||4111,s=window.MASTRA_CLOUD_API_ENDPOINT||""||`${e}://${t}:${r}`;return f.jsx(lNr,{children:f.jsx(ENr,{endpoint:s,children:f.jsx(GRr,{})})})}CXe.createRoot(document.getElementById("root")).render(f.jsx(E.StrictMode,{children:f.jsx(XRr,{})}));const P9r=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));export{kQe as A,JDe as B,eAe as C,fQe as D,Cc as E,q2e as F,tu as G,JRr as H,vs as I,Wh as J,A6 as K,Kv as L,O9r as M,YDe as N,Ggr as O,P9r as P,P5 as _,jft as a,Kft as b,Vae as c,XMr as d,Wv as e,Gft as f,t0 as g,Jft as h,M0 as i,j0 as j,R0 as k,t1 as l,fkt as m,VPe as n,Kn as o,MSt as p,jSt as q,H3t as r,fG as s,Y as t,JG as u,QI as v,Vft as w,Wa as x,rt as y,Ne as z};
|