@recombine-ai/bosun 0.3.12 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/_app/immutable/assets/0.B5gApcUL.css +1 -0
- package/build/client/_app/immutable/assets/0.B5gApcUL.css.br +0 -0
- package/build/client/_app/immutable/assets/0.B5gApcUL.css.gz +0 -0
- package/build/client/_app/immutable/chunks/8B3OPwlB.js +1 -0
- package/build/client/_app/immutable/chunks/8B3OPwlB.js.br +2 -0
- package/build/client/_app/immutable/chunks/8B3OPwlB.js.gz +0 -0
- package/build/client/_app/immutable/chunks/B3ux6SZZ.js +1 -0
- package/build/client/_app/immutable/chunks/B3ux6SZZ.js.br +0 -0
- package/build/client/_app/immutable/chunks/B3ux6SZZ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/B5-6Ezv3.js +1 -0
- package/build/client/_app/immutable/chunks/B5-6Ezv3.js.br +2 -0
- package/build/client/_app/immutable/chunks/B5-6Ezv3.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BA8mqPb-.js +1 -0
- package/build/client/_app/immutable/chunks/BA8mqPb-.js.br +0 -0
- package/build/client/_app/immutable/chunks/BA8mqPb-.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BCG4zvjp.js +2 -0
- package/build/client/_app/immutable/chunks/BCG4zvjp.js.br +0 -0
- package/build/client/_app/immutable/chunks/BCG4zvjp.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{oeB0PCTX.js → BMYSavKM.js} +1 -1
- package/build/client/_app/immutable/chunks/BMYSavKM.js.br +0 -0
- package/build/client/_app/immutable/chunks/BMYSavKM.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{TO5ESkEd.js → BY8d35y9.js} +1 -1
- package/build/client/_app/immutable/chunks/BY8d35y9.js.br +0 -0
- package/build/client/_app/immutable/chunks/BY8d35y9.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CFwu9ET3.js → BdZ7JhAm.js} +1 -1
- package/build/client/_app/immutable/chunks/BdZ7JhAm.js.br +0 -0
- package/build/client/_app/immutable/chunks/BdZ7JhAm.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BWo2H__f.js → BmadykGs.js} +3 -3
- package/build/client/_app/immutable/chunks/BmadykGs.js.br +0 -0
- package/build/client/_app/immutable/chunks/BmadykGs.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Bmb8cHfR.js +1 -0
- package/build/client/_app/immutable/chunks/Bmb8cHfR.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bmb8cHfR.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Bx2X1niE.js +1 -0
- package/build/client/_app/immutable/chunks/Bx2X1niE.js.br +2 -0
- package/build/client/_app/immutable/chunks/Bx2X1niE.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C-xhOnoy.js +1 -0
- package/build/client/_app/immutable/chunks/C-xhOnoy.js.br +0 -0
- package/build/client/_app/immutable/chunks/C-xhOnoy.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C1FmrZbK.js +1 -0
- package/build/client/_app/immutable/chunks/C1FmrZbK.js.br +0 -0
- package/build/client/_app/immutable/chunks/C1FmrZbK.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{Bdb5tyDH.js → C4mbwMvt.js} +1 -1
- package/build/client/_app/immutable/chunks/C4mbwMvt.js.br +0 -0
- package/build/client/_app/immutable/chunks/C4mbwMvt.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C5HWpeo9.js +1 -0
- package/build/client/_app/immutable/chunks/C5HWpeo9.js.br +0 -0
- package/build/client/_app/immutable/chunks/C5HWpeo9.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CdzpH-Ca.js → CAFoob5N.js} +1 -1
- package/build/client/_app/immutable/chunks/CAFoob5N.js.br +0 -0
- package/build/client/_app/immutable/chunks/CAFoob5N.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{Bk1rEq7o.js → CGinwM47.js} +1 -1
- package/build/client/_app/immutable/chunks/CGinwM47.js.br +0 -0
- package/build/client/_app/immutable/chunks/CGinwM47.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CI-reiW2.js +1 -0
- package/build/client/_app/immutable/chunks/CI-reiW2.js.br +0 -0
- package/build/client/_app/immutable/chunks/CI-reiW2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C_ZSt1CI.js +2 -0
- package/build/client/_app/immutable/chunks/C_ZSt1CI.js.br +0 -0
- package/build/client/_app/immutable/chunks/C_ZSt1CI.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CVHvdSBf.js → CfbYRn5k.js} +1 -1
- package/build/client/_app/immutable/chunks/CfbYRn5k.js.br +0 -0
- package/build/client/_app/immutable/chunks/{CVHvdSBf.js.gz → CfbYRn5k.js.gz} +0 -0
- package/build/client/_app/immutable/chunks/{CNMNmz2q.js → CrxwEwqu.js} +1 -1
- package/build/client/_app/immutable/chunks/CrxwEwqu.js.br +0 -0
- package/build/client/_app/immutable/chunks/CrxwEwqu.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CsYbWoTD.js +8 -0
- package/build/client/_app/immutable/chunks/CsYbWoTD.js.br +0 -0
- package/build/client/_app/immutable/chunks/CsYbWoTD.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CIIE25ox.js → CwmAWymP.js} +1 -1
- package/build/client/_app/immutable/chunks/CwmAWymP.js.br +0 -0
- package/build/client/_app/immutable/chunks/CwmAWymP.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CxPv-oiS.js +1 -0
- package/build/client/_app/immutable/chunks/CxPv-oiS.js.br +0 -0
- package/build/client/_app/immutable/chunks/CxPv-oiS.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DOatwnEt.js → DDMPVpvs.js} +1 -1
- package/build/client/_app/immutable/chunks/DDMPVpvs.js.br +0 -0
- package/build/client/_app/immutable/chunks/DDMPVpvs.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DGa-EyU2.js +1 -0
- package/build/client/_app/immutable/chunks/DGa-EyU2.js.br +0 -0
- package/build/client/_app/immutable/chunks/DGa-EyU2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BfHUxT3G.js → DLQqXQ6R.js} +7 -7
- package/build/client/_app/immutable/chunks/DLQqXQ6R.js.br +0 -0
- package/build/client/_app/immutable/chunks/DLQqXQ6R.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DQA6NP5y.js +2 -0
- package/build/client/_app/immutable/chunks/DQA6NP5y.js.br +0 -0
- package/build/client/_app/immutable/chunks/DQA6NP5y.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{HPBQctDD.js → DRIMs3uA.js} +1 -1
- package/build/client/_app/immutable/chunks/DRIMs3uA.js.br +0 -0
- package/build/client/_app/immutable/chunks/DRIMs3uA.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{ByQey8Oa.js → DUeN9t8P.js} +1 -1
- package/build/client/_app/immutable/chunks/DUeN9t8P.js.br +0 -0
- package/build/client/_app/immutable/chunks/DUeN9t8P.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{KDW88ZZa.js → DWH0347h.js} +1 -1
- package/build/client/_app/immutable/chunks/DWH0347h.js.br +0 -0
- package/build/client/_app/immutable/chunks/DWH0347h.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BnxfhlSj.js → DZxMt77D.js} +1 -1
- package/build/client/_app/immutable/chunks/DZxMt77D.js.br +0 -0
- package/build/client/_app/immutable/chunks/DZxMt77D.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DaR1ExPh.js +1 -0
- package/build/client/_app/immutable/chunks/DaR1ExPh.js.br +0 -0
- package/build/client/_app/immutable/chunks/DaR1ExPh.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{rtsVMmSs.js → DjDhNM9l.js} +1 -1
- package/build/client/_app/immutable/chunks/DjDhNM9l.js.br +0 -0
- package/build/client/_app/immutable/chunks/DjDhNM9l.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Dl6q6wVH.js +1 -0
- package/build/client/_app/immutable/chunks/Dl6q6wVH.js.br +0 -0
- package/build/client/_app/immutable/chunks/Dl6q6wVH.js.gz +0 -0
- package/build/client/_app/immutable/chunks/JA_7cQFn.js +1 -0
- package/build/client/_app/immutable/chunks/JA_7cQFn.js.br +0 -0
- package/build/client/_app/immutable/chunks/JA_7cQFn.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BqROrg0C.js → OMeqFb0I.js} +1 -1
- package/build/client/_app/immutable/chunks/OMeqFb0I.js.br +0 -0
- package/build/client/_app/immutable/chunks/OMeqFb0I.js.gz +0 -0
- package/build/client/_app/immutable/chunks/WMLo4l1V.js +4 -0
- package/build/client/_app/immutable/chunks/WMLo4l1V.js.br +0 -0
- package/build/client/_app/immutable/chunks/WMLo4l1V.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{Ct9HfpvA.js → ZGfwyPNq.js} +1 -1
- package/build/client/_app/immutable/chunks/ZGfwyPNq.js.br +0 -0
- package/build/client/_app/immutable/chunks/ZGfwyPNq.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DSfxalyG.js → bynEV6cE.js} +1 -1
- package/build/client/_app/immutable/chunks/bynEV6cE.js.br +0 -0
- package/build/client/_app/immutable/chunks/bynEV6cE.js.gz +0 -0
- package/build/client/_app/immutable/chunks/i_HX2z3K.js +1 -0
- package/build/client/_app/immutable/chunks/i_HX2z3K.js.br +0 -0
- package/build/client/_app/immutable/chunks/i_HX2z3K.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{yWz0pZR0.js → wDFujNbC.js} +1 -1
- package/build/client/_app/immutable/chunks/wDFujNbC.js.br +0 -0
- package/build/client/_app/immutable/chunks/wDFujNbC.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CZPhtqrs.js → wtOMB7ao.js} +3 -3
- package/build/client/_app/immutable/chunks/wtOMB7ao.js.br +0 -0
- package/build/client/_app/immutable/chunks/wtOMB7ao.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.DQ_2_Lfy.js +2 -0
- package/build/client/_app/immutable/entry/app.DQ_2_Lfy.js.br +0 -0
- package/build/client/_app/immutable/entry/app.DQ_2_Lfy.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.DvKwzZNe.js +1 -0
- package/build/client/_app/immutable/entry/start.DvKwzZNe.js.br +2 -0
- package/build/client/_app/immutable/entry/start.DvKwzZNe.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{0.CwdXLzyE.js → 0.CgivU_tm.js} +1 -1
- package/build/client/_app/immutable/nodes/0.CgivU_tm.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.CgivU_tm.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.DP8kLfpI.js +1 -0
- package/build/client/_app/immutable/nodes/1.DP8kLfpI.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.DP8kLfpI.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{13.DaAF9e8t.js → 14.zP-B7lEl.js} +1 -1
- package/build/client/_app/immutable/nodes/14.zP-B7lEl.js.br +0 -0
- package/build/client/_app/immutable/nodes/14.zP-B7lEl.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{14.BcXGBqPj.js → 15.B2GzYnI3.js} +3 -3
- package/build/client/_app/immutable/nodes/15.B2GzYnI3.js.br +0 -0
- package/build/client/_app/immutable/nodes/15.B2GzYnI3.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.Bhgshf0y.js +35 -0
- package/build/client/_app/immutable/nodes/2.Bhgshf0y.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.Bhgshf0y.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.0QEF0Tq5.js +1 -0
- package/build/client/_app/immutable/nodes/3.0QEF0Tq5.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.0QEF0Tq5.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.DBO0gLSr.js +1 -0
- package/build/client/_app/immutable/nodes/4.DBO0gLSr.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.DBO0gLSr.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{5.CqUx8Ggk.js → 5.CZiuS-IZ.js} +1 -1
- package/build/client/_app/immutable/nodes/5.CZiuS-IZ.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.CZiuS-IZ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.CkeP1yO3.js +1 -0
- package/build/client/_app/immutable/nodes/6.CkeP1yO3.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.CkeP1yO3.js.gz +0 -0
- package/build/client/_app/immutable/nodes/7.CB2Z5SOz.js +2 -0
- package/build/client/_app/immutable/nodes/7.CB2Z5SOz.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.CB2Z5SOz.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{7.B6QVJ_di.js → 8.BAhMFXe7.js} +2 -2
- package/build/client/_app/immutable/nodes/8.BAhMFXe7.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.BAhMFXe7.js.gz +0 -0
- package/build/client/_app/immutable/nodes/9.D7VQfn4o.js +6 -0
- package/build/client/_app/immutable/nodes/9.D7VQfn4o.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.D7VQfn4o.js.gz +0 -0
- package/build/client/_app/version.json +1 -1
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/server/chunks/0-bATz_nPm.js +9 -0
- package/build/server/chunks/0-bATz_nPm.js.map +1 -0
- package/build/server/chunks/1-B8t1doqY.js +9 -0
- package/build/server/chunks/1-B8t1doqY.js.map +1 -0
- package/build/server/chunks/{9-W6XYayeK.js → 10-DZjMDIvS.js} +3 -3
- package/build/server/chunks/10-DZjMDIvS.js.map +1 -0
- package/build/server/chunks/{10-C7WLHR92.js → 11-D6F4I8KX.js} +3 -3
- package/build/server/chunks/{10-C7WLHR92.js.map → 11-D6F4I8KX.js.map} +1 -1
- package/build/server/chunks/{11-CPYwUx-7.js → 12-2vbUmx0n.js} +3 -3
- package/build/server/chunks/{11-CPYwUx-7.js.map → 12-2vbUmx0n.js.map} +1 -1
- package/build/server/chunks/{12-C5OSs5Op.js → 13-11CHqz2G.js} +3 -3
- package/build/server/chunks/{12-C5OSs5Op.js.map → 13-11CHqz2G.js.map} +1 -1
- package/build/server/chunks/{13-DPcsc1p-.js → 14-C4iOZL2L.js} +3 -3
- package/build/server/chunks/14-C4iOZL2L.js.map +1 -0
- package/build/server/chunks/15-BrQMoggr.js +9 -0
- package/build/server/chunks/15-BrQMoggr.js.map +1 -0
- package/build/server/chunks/2-B0R4hYal.js +9 -0
- package/build/server/chunks/2-B0R4hYal.js.map +1 -0
- package/build/server/chunks/3-DV-OHzXy.js +9 -0
- package/build/server/chunks/3-DV-OHzXy.js.map +1 -0
- package/build/server/chunks/4-ClIdwABM.js +9 -0
- package/build/server/chunks/4-ClIdwABM.js.map +1 -0
- package/build/server/chunks/5-BznYQ30T.js +9 -0
- package/build/server/chunks/5-BznYQ30T.js.map +1 -0
- package/build/server/chunks/{6-uS_X9B0s.js → 6-B6C38HXu.js} +7 -3
- package/build/server/chunks/6-B6C38HXu.js.map +1 -0
- package/build/server/chunks/7-BgYWIBj-.js +9 -0
- package/build/server/chunks/7-BgYWIBj-.js.map +1 -0
- package/build/server/chunks/8-NaJ61xSe.js +9 -0
- package/build/server/chunks/8-NaJ61xSe.js.map +1 -0
- package/build/server/chunks/9-oaBsE2zR.js +9 -0
- package/build/server/chunks/9-oaBsE2zR.js.map +1 -0
- package/build/server/chunks/{ChatStepTrace-B5HQ8Zv3.js → ChatStepTrace-BIghWRaw.js} +3 -59
- package/build/server/chunks/ChatStepTrace-BIghWRaw.js.map +1 -0
- package/build/server/chunks/Dropdown-Bz9eHilg.js +61 -0
- package/build/server/chunks/Dropdown-Bz9eHilg.js.map +1 -0
- package/build/server/chunks/{_layout.svelte-Svi5xbzP.js → _layout.svelte-B6NfHVfy.js} +2 -2
- package/build/server/chunks/{_layout.svelte-Svi5xbzP.js.map → _layout.svelte-B6NfHVfy.js.map} +1 -1
- package/build/server/chunks/{_layout.svelte-Fo2hGNeP.js → _layout.svelte-BKnunWZl.js} +129 -14
- package/build/server/chunks/_layout.svelte-BKnunWZl.js.map +1 -0
- package/build/server/chunks/{_layout.svelte-h89mGXIj.js → _layout.svelte-WXSvPGRU.js} +2 -2
- package/build/server/chunks/{_layout.svelte-h89mGXIj.js.map → _layout.svelte-WXSvPGRU.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-CnjXZO9K.js → _page.svelte-CLBi-ypL.js} +2 -2
- package/build/server/chunks/{_page.svelte-CnjXZO9K.js.map → _page.svelte-CLBi-ypL.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-Hg-ZSzf1.js → _page.svelte-CLiLwJTq.js} +4 -3
- package/build/server/chunks/_page.svelte-CLiLwJTq.js.map +1 -0
- package/build/server/chunks/{_page.svelte-CC26hDwf.js → _page.svelte-CdczF37D.js} +3 -2
- package/build/server/chunks/_page.svelte-CdczF37D.js.map +1 -0
- package/build/server/chunks/_page.svelte-Ck9Utnoc.js +60 -0
- package/build/server/chunks/_page.svelte-Ck9Utnoc.js.map +1 -0
- package/build/server/chunks/{_page.svelte-Dl3GoTy1.js → _page.svelte-DBrprjQP.js} +5 -4
- package/build/server/chunks/_page.svelte-DBrprjQP.js.map +1 -0
- package/build/server/chunks/{error.svelte-zyW9aOoU.js → error.svelte-DP2oBSvv.js} +2 -2
- package/build/server/chunks/{error.svelte-zyW9aOoU.js.map → error.svelte-DP2oBSvv.js.map} +1 -1
- package/build/server/chunks/{index3-DeV2OWZf.js → index3-CpMl6FwG.js} +7 -2
- package/build/server/chunks/index3-CpMl6FwG.js.map +1 -0
- package/build/server/index.js +1 -1
- package/build/server/index.js.map +1 -1
- package/build/server/manifest.js +32 -24
- package/build/server/manifest.js.map +1 -1
- package/package.json +1 -1
- package/src/backend/lib/get-agent-factories.ts +13 -2
- package/src/backend/lib/get-root-path.ts +30 -5
- package/src/backend/lib/import-nonce.ts +10 -0
- package/src/backend/region/router.ts +67 -0
- package/src/backend/roleplay/agents.ts +51 -11
- package/src/backend/roleplay/old-server.ts +4 -1
- package/src/backend/server.ts +3 -1
- package/src/backend/tests/academy.ts +37 -24
- package/src/backend/tests/emulate-agents.ts +20 -1
- package/src/backend/tests/router.ts +220 -38
- package/build/client/_app/immutable/assets/0.DsZUjxNX.css +0 -1
- package/build/client/_app/immutable/assets/0.DsZUjxNX.css.br +0 -0
- package/build/client/_app/immutable/assets/0.DsZUjxNX.css.gz +0 -0
- package/build/client/_app/immutable/chunks/BTlUd_Lo.js +0 -8
- package/build/client/_app/immutable/chunks/BTlUd_Lo.js.br +0 -0
- package/build/client/_app/immutable/chunks/BTlUd_Lo.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BVDwc-2z.js +0 -1
- package/build/client/_app/immutable/chunks/BVDwc-2z.js.br +0 -0
- package/build/client/_app/immutable/chunks/BVDwc-2z.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BWo2H__f.js.br +0 -0
- package/build/client/_app/immutable/chunks/BWo2H__f.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BXkrt826.js +0 -1
- package/build/client/_app/immutable/chunks/BXkrt826.js.br +0 -0
- package/build/client/_app/immutable/chunks/BXkrt826.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Bdb5tyDH.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bdb5tyDH.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BfHUxT3G.js.br +0 -0
- package/build/client/_app/immutable/chunks/BfHUxT3G.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Bk1rEq7o.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bk1rEq7o.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BkclRFLx.js +0 -3
- package/build/client/_app/immutable/chunks/BkclRFLx.js.br +0 -0
- package/build/client/_app/immutable/chunks/BkclRFLx.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BnxfhlSj.js.br +0 -0
- package/build/client/_app/immutable/chunks/BnxfhlSj.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BqROrg0C.js.br +0 -0
- package/build/client/_app/immutable/chunks/BqROrg0C.js.gz +0 -0
- package/build/client/_app/immutable/chunks/ByQey8Oa.js.br +0 -0
- package/build/client/_app/immutable/chunks/ByQey8Oa.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CFwu9ET3.js.br +0 -0
- package/build/client/_app/immutable/chunks/CFwu9ET3.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CIIE25ox.js.br +0 -0
- package/build/client/_app/immutable/chunks/CIIE25ox.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CNMNmz2q.js.br +0 -0
- package/build/client/_app/immutable/chunks/CNMNmz2q.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CNvyTQrC.js +0 -1
- package/build/client/_app/immutable/chunks/CNvyTQrC.js.br +0 -2
- package/build/client/_app/immutable/chunks/CNvyTQrC.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CVHvdSBf.js.br +0 -0
- package/build/client/_app/immutable/chunks/CYiRxJxs.js +0 -1
- package/build/client/_app/immutable/chunks/CYiRxJxs.js.br +0 -0
- package/build/client/_app/immutable/chunks/CYiRxJxs.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CZPhtqrs.js.br +0 -0
- package/build/client/_app/immutable/chunks/CZPhtqrs.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CdzpH-Ca.js.br +0 -0
- package/build/client/_app/immutable/chunks/CdzpH-Ca.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Cf8q8_nj.js +0 -1
- package/build/client/_app/immutable/chunks/Cf8q8_nj.js.br +0 -0
- package/build/client/_app/immutable/chunks/Cf8q8_nj.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Cg3F7Z11.js +0 -1
- package/build/client/_app/immutable/chunks/Cg3F7Z11.js.br +0 -0
- package/build/client/_app/immutable/chunks/Cg3F7Z11.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CpSIcnXs.js +0 -1
- package/build/client/_app/immutable/chunks/CpSIcnXs.js.br +0 -0
- package/build/client/_app/immutable/chunks/CpSIcnXs.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Ct9HfpvA.js.br +0 -0
- package/build/client/_app/immutable/chunks/Ct9HfpvA.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D42t-LiJ.js +0 -4
- package/build/client/_app/immutable/chunks/D42t-LiJ.js.br +0 -0
- package/build/client/_app/immutable/chunks/D42t-LiJ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DJPBfZIx.js +0 -1
- package/build/client/_app/immutable/chunks/DJPBfZIx.js.br +0 -0
- package/build/client/_app/immutable/chunks/DJPBfZIx.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DOatwnEt.js.br +0 -0
- package/build/client/_app/immutable/chunks/DOatwnEt.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DQqJYxgt.js +0 -1
- package/build/client/_app/immutable/chunks/DQqJYxgt.js.br +0 -0
- package/build/client/_app/immutable/chunks/DQqJYxgt.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DSfxalyG.js.br +0 -0
- package/build/client/_app/immutable/chunks/DSfxalyG.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DujX6kBV.js +0 -2
- package/build/client/_app/immutable/chunks/DujX6kBV.js.br +0 -0
- package/build/client/_app/immutable/chunks/DujX6kBV.js.gz +0 -0
- package/build/client/_app/immutable/chunks/HPBQctDD.js.br +0 -0
- package/build/client/_app/immutable/chunks/HPBQctDD.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Jaf1TUfw.js +0 -1
- package/build/client/_app/immutable/chunks/Jaf1TUfw.js.br +0 -2
- package/build/client/_app/immutable/chunks/Jaf1TUfw.js.gz +0 -0
- package/build/client/_app/immutable/chunks/KDW88ZZa.js.br +0 -0
- package/build/client/_app/immutable/chunks/KDW88ZZa.js.gz +0 -0
- package/build/client/_app/immutable/chunks/TO5ESkEd.js.br +0 -0
- package/build/client/_app/immutable/chunks/TO5ESkEd.js.gz +0 -0
- package/build/client/_app/immutable/chunks/ZH2wGpZM.js +0 -1
- package/build/client/_app/immutable/chunks/ZH2wGpZM.js.br +0 -0
- package/build/client/_app/immutable/chunks/ZH2wGpZM.js.gz +0 -0
- package/build/client/_app/immutable/chunks/axPa8Xqj.js +0 -1
- package/build/client/_app/immutable/chunks/axPa8Xqj.js.br +0 -0
- package/build/client/_app/immutable/chunks/axPa8Xqj.js.gz +0 -0
- package/build/client/_app/immutable/chunks/oeB0PCTX.js.br +0 -0
- package/build/client/_app/immutable/chunks/oeB0PCTX.js.gz +0 -0
- package/build/client/_app/immutable/chunks/rtsVMmSs.js.br +0 -0
- package/build/client/_app/immutable/chunks/rtsVMmSs.js.gz +0 -0
- package/build/client/_app/immutable/chunks/uS7H_Vea.js +0 -1
- package/build/client/_app/immutable/chunks/uS7H_Vea.js.br +0 -0
- package/build/client/_app/immutable/chunks/uS7H_Vea.js.gz +0 -0
- package/build/client/_app/immutable/chunks/yWz0pZR0.js.br +0 -0
- package/build/client/_app/immutable/chunks/yWz0pZR0.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.yCT9HX-q.js +0 -2
- package/build/client/_app/immutable/entry/app.yCT9HX-q.js.br +0 -0
- package/build/client/_app/immutable/entry/app.yCT9HX-q.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.FbJeJ8ru.js +0 -1
- package/build/client/_app/immutable/entry/start.FbJeJ8ru.js.br +0 -2
- package/build/client/_app/immutable/entry/start.FbJeJ8ru.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.CwdXLzyE.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.CwdXLzyE.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.CJSJdR2U.js +0 -1
- package/build/client/_app/immutable/nodes/1.CJSJdR2U.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.CJSJdR2U.js.gz +0 -0
- package/build/client/_app/immutable/nodes/13.DaAF9e8t.js.br +0 -0
- package/build/client/_app/immutable/nodes/13.DaAF9e8t.js.gz +0 -0
- package/build/client/_app/immutable/nodes/14.BcXGBqPj.js.br +0 -0
- package/build/client/_app/immutable/nodes/14.BcXGBqPj.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.DISE-c5q.js +0 -35
- package/build/client/_app/immutable/nodes/2.DISE-c5q.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.DISE-c5q.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.BtAUfPNQ.js +0 -1
- package/build/client/_app/immutable/nodes/3.BtAUfPNQ.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.BtAUfPNQ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.DylMSvDw.js +0 -1
- package/build/client/_app/immutable/nodes/4.DylMSvDw.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.DylMSvDw.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.CqUx8Ggk.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.CqUx8Ggk.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.CPYhLc46.js +0 -1
- package/build/client/_app/immutable/nodes/6.CPYhLc46.js.br +0 -4
- package/build/client/_app/immutable/nodes/6.CPYhLc46.js.gz +0 -0
- package/build/client/_app/immutable/nodes/7.B6QVJ_di.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.B6QVJ_di.js.gz +0 -0
- package/build/client/_app/immutable/nodes/8.DhQWMEsP.js +0 -6
- package/build/client/_app/immutable/nodes/8.DhQWMEsP.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.DhQWMEsP.js.gz +0 -0
- package/build/server/chunks/0-DnZ1CmpH.js +0 -9
- package/build/server/chunks/0-DnZ1CmpH.js.map +0 -1
- package/build/server/chunks/1-BW2Kegam.js +0 -9
- package/build/server/chunks/1-BW2Kegam.js.map +0 -1
- package/build/server/chunks/13-DPcsc1p-.js.map +0 -1
- package/build/server/chunks/14-Ddk1gksy.js +0 -9
- package/build/server/chunks/14-Ddk1gksy.js.map +0 -1
- package/build/server/chunks/2-Co5sKQqN.js +0 -9
- package/build/server/chunks/2-Co5sKQqN.js.map +0 -1
- package/build/server/chunks/3-Czp3KEzr.js +0 -9
- package/build/server/chunks/3-Czp3KEzr.js.map +0 -1
- package/build/server/chunks/4-BML64sIA.js +0 -9
- package/build/server/chunks/4-BML64sIA.js.map +0 -1
- package/build/server/chunks/5-9yHXJzTj.js +0 -9
- package/build/server/chunks/5-9yHXJzTj.js.map +0 -1
- package/build/server/chunks/6-uS_X9B0s.js.map +0 -1
- package/build/server/chunks/7-CgqcRvLC.js +0 -9
- package/build/server/chunks/7-CgqcRvLC.js.map +0 -1
- package/build/server/chunks/8-CddjGDu2.js +0 -9
- package/build/server/chunks/8-CddjGDu2.js.map +0 -1
- package/build/server/chunks/9-W6XYayeK.js.map +0 -1
- package/build/server/chunks/ChatStepTrace-B5HQ8Zv3.js.map +0 -1
- package/build/server/chunks/_layout.svelte-Fo2hGNeP.js.map +0 -1
- package/build/server/chunks/_page.svelte-CC26hDwf.js.map +0 -1
- package/build/server/chunks/_page.svelte-Dl3GoTy1.js.map +0 -1
- package/build/server/chunks/_page.svelte-Hg-ZSzf1.js.map +0 -1
- package/build/server/chunks/index3-DeV2OWZf.js.map +0 -1
- /package/build/client/_app/immutable/assets/{14.C5apk4jm.css → 15.C5apk4jm.css} +0 -0
- /package/build/client/_app/immutable/assets/{14.C5apk4jm.css.br → 15.C5apk4jm.css.br} +0 -0
- /package/build/client/_app/immutable/assets/{14.C5apk4jm.css.gz → 15.C5apk4jm.css.gz} +0 -0
- /package/build/client/_app/immutable/assets/{7.DlSPCZj0.css → 8.DlSPCZj0.css} +0 -0
- /package/build/client/_app/immutable/assets/{7.DlSPCZj0.css.br → 8.DlSPCZj0.css.br} +0 -0
- /package/build/client/_app/immutable/assets/{7.DlSPCZj0.css.gz → 8.DlSPCZj0.css.gz} +0 -0
- /package/build/client/_app/immutable/assets/{8.BX46PfEJ.css → 9.BX46PfEJ.css} +0 -0
- /package/build/client/_app/immutable/assets/{8.BX46PfEJ.css.br → 9.BX46PfEJ.css.br} +0 -0
- /package/build/client/_app/immutable/assets/{8.BX46PfEJ.css.gz → 9.BX46PfEJ.css.gz} +0 -0
- /package/build/client/_app/immutable/assets/{bosun-theme.tn0RQdqM.css → Modal.tn0RQdqM.css} +0 -0
- /package/build/client/_app/immutable/assets/{bosun-theme.tn0RQdqM.css.br → Modal.tn0RQdqM.css.br} +0 -0
- /package/build/client/_app/immutable/assets/{bosun-theme.tn0RQdqM.css.gz → Modal.tn0RQdqM.css.gz} +0 -0
- /package/build/client/_app/immutable/assets/{ChatStepTrace.NFJFjHv0.css → chat-content.NFJFjHv0.css} +0 -0
- /package/build/client/_app/immutable/assets/{ChatStepTrace.NFJFjHv0.css.br → chat-content.NFJFjHv0.css.br} +0 -0
- /package/build/client/_app/immutable/assets/{ChatStepTrace.NFJFjHv0.css.gz → chat-content.NFJFjHv0.css.gz} +0 -0
- /package/build/client/_app/immutable/nodes/{9.BVI-eEdV.js → 10.BVI-eEdV.js} +0 -0
- /package/build/client/_app/immutable/nodes/{9.BVI-eEdV.js.br → 10.BVI-eEdV.js.br} +0 -0
- /package/build/client/_app/immutable/nodes/{9.BVI-eEdV.js.gz → 10.BVI-eEdV.js.gz} +0 -0
- /package/build/client/_app/immutable/nodes/{10.BHSGZYEC.js → 11.BHSGZYEC.js} +0 -0
- /package/build/client/_app/immutable/nodes/{10.BHSGZYEC.js.br → 11.BHSGZYEC.js.br} +0 -0
- /package/build/client/_app/immutable/nodes/{10.BHSGZYEC.js.gz → 11.BHSGZYEC.js.gz} +0 -0
- /package/build/client/_app/immutable/nodes/{11.CZ_7M4AF.js → 12.CZ_7M4AF.js} +0 -0
- /package/build/client/_app/immutable/nodes/{11.CZ_7M4AF.js.br → 12.CZ_7M4AF.js.br} +0 -0
- /package/build/client/_app/immutable/nodes/{11.CZ_7M4AF.js.gz → 12.CZ_7M4AF.js.gz} +0 -0
- /package/build/client/_app/immutable/nodes/{12.DRr2l3NZ.js → 13.DRr2l3NZ.js} +0 -0
- /package/build/client/_app/immutable/nodes/{12.DRr2l3NZ.js.br → 13.DRr2l3NZ.js.br} +0 -0
- /package/build/client/_app/immutable/nodes/{12.DRr2l3NZ.js.gz → 13.DRr2l3NZ.js.gz} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var Wt=t=>{throw TypeError(t)};var Te=(t,e,n)=>e.has(t)||Wt("Cannot "+n);var v=(t,e,n)=>(Te(t,e,"read from private field"),n?n.call(t):e.get(t)),T=(t,e,n)=>e.has(t)?Wt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);import{w as It,o as Yt,f as Pe}from"./DujX6kBV.js";import{b as Ie,H as Ot,S as $t,R as jt}from"./BUApaBEI.js";import{e as I,h as O,i as $,x as zt,q as Oe}from"./CVHvdSBf.js";new URL("sveltekit-internal://");function $e(t,e){return t==="/"||e==="ignore"?t:e==="never"?t.endsWith("/")?t.slice(0,-1):t:e==="always"&&!t.endsWith("/")?t+"/":t}function je(t){return t.split("%25").map(decodeURI).join("%25")}function Ce(t){for(const e in t)t[e]=decodeURIComponent(t[e]);return t}function Rt({href:t}){return t.split("#")[0]}function Ne(t,e,n,r=!1){const a=new URL(t);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(o,i){if(i==="get"||i==="getAll"||i==="has")return c=>(n(c),o[i](c));e();const l=Reflect.get(o,i);return typeof l=="function"?l.bind(o):l}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const o of s)Object.defineProperty(a,o,{get(){return e(),t[o]},enumerable:!0,configurable:!0});return a}function De(...t){let e=5381;for(const n of t)if(typeof n=="string"){let r=n.length;for(;r;)e=e*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)e=e*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(e>>>0).toString(36)}const qe=window.fetch;window.fetch=(t,e)=>((t instanceof Request?t.method:(e==null?void 0:e.method)||"GET")!=="GET"&&M.delete(Ct(t)),qe(t,e));const M=new Map;function Ve(t,e){const n=Ct(t,e),r=document.querySelector(n);if(r!=null&&r.textContent){r.remove();let{body:a,...s}=JSON.parse(r.textContent);const o=r.getAttribute("data-ttl");return o&&M.set(n,{body:a,init:s,ttl:1e3*Number(o)}),r.getAttribute("data-b64")!==null&&(a=Ie(a)),Promise.resolve(new Response(a,s))}return window.fetch(t,e)}function Be(t,e,n){if(M.size>0){const r=Ct(t,n),a=M.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(a.body,a.init);M.delete(r)}}return window.fetch(e,n)}function Ct(t,e){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(t instanceof Request?t.url:t)}]`;if(e!=null&&e.headers||e!=null&&e.body){const a=[];e.headers&&a.push([...new Headers(e.headers)].join(",")),e.body&&(typeof e.body=="string"||ArrayBuffer.isView(e.body))&&a.push(e.body),r+=`[data-hash="${De(...a)}"]`}return r}const Ke=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Fe(t){const e=[];return{pattern:t==="/"?/^\/$/:new RegExp(`^${He(t).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return e.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return e.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const o=r.split(/\[(.+?)\](?!\])/);return"/"+o.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return Et(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return Et(String.fromCharCode(...l.slice(2).split("-").map(f=>parseInt(f,16))));const g=Ke.exec(l),[,h,w,u,m]=g;return e.push({name:u,matcher:m,optional:!!h,rest:!!w,chained:w?c===1&&o[0]==="":!1}),w?"([^]*?)":h?"([^/]*)?":"([^/]+?)"}return Et(l)}).join("")}).join("")}/?$`),params:e}}function Ge(t){return t!==""&&!/^\([^)]+\)$/.test(t)}function He(t){return t.slice(1).split("/").filter(Ge)}function Me(t,e,n){const r={},a=t.slice(1),s=a.filter(i=>i!==void 0);let o=0;for(let i=0;i<e.length;i+=1){const l=e[i];let c=a[i-o];if(l.chained&&l.rest&&o&&(c=a.slice(i-o,i+1).filter(g=>g).join("/"),o=0),c===void 0){l.rest&&(r[l.name]="");continue}if(!l.matcher||n[l.matcher](c)){r[l.name]=c;const g=e[i+1],h=a[i+1];g&&!g.rest&&g.optional&&h&&l.chained&&(o=0),!g&&!h&&Object.keys(r).length===s.length&&(o=0);continue}if(l.optional&&l.chained){o++;continue}return}if(!o)return r}function Et(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function We({nodes:t,server_loads:e,dictionary:n,matchers:r}){const a=new Set(e);return Object.entries(n).map(([i,[l,c,g]])=>{const{pattern:h,params:w}=Fe(i),u={id:i,exec:m=>{const f=h.exec(m);if(f)return Me(f,w,r)},errors:[1,...g||[]].map(m=>t[m]),layouts:[0,...c||[]].map(o),leaf:s(l)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function s(i){const l=i<0;return l&&(i=~i),[l,t[i]]}function o(i){return i===void 0?i:[a.has(i),t[i]]}}function ce(t,e=JSON.parse){try{return e(sessionStorage[t])}catch{}}function Jt(t,e,n=JSON.stringify){const r=n(e);try{sessionStorage[t]=r}catch{}}var re;const U=((re=globalThis.__sveltekit_10ju1g9)==null?void 0:re.base)??"";var oe;const Ye=((oe=globalThis.__sveltekit_10ju1g9)==null?void 0:oe.assets)??U??"",ze="1772195451992",fe="sveltekit:snapshot",ue="sveltekit:scroll",Nt="sveltekit:states",de="sveltekit:pageurl",V="sveltekit:history",G="sveltekit:navigation",D={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},wt=location.origin;function vt(t){if(t instanceof URL)return t;let e=document.baseURI;if(!e){const n=document.getElementsByTagName("base");e=n.length?n[0].href:document.URL}return new URL(t,e)}function yt(){return{x:pageXOffset,y:pageYOffset}}function K(t,e){return t.getAttribute(`data-sveltekit-${e}`)}const Xt={...D,"":D.hover};function he(t){let e=t.assignedSlot??t.parentNode;return(e==null?void 0:e.nodeType)===11&&(e=e.host),e}function pe(t,e){for(;t&&t!==e;){if(t.nodeName.toUpperCase()==="A"&&t.hasAttribute("href"))return t;t=he(t)}}function At(t,e,n){let r;try{if(r=new URL(t instanceof SVGAElement?t.href.baseVal:t.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const i=location.hash.split("#")[1]||"/";r.hash=`#${i}${r.hash}`}}catch{}const a=t instanceof SVGAElement?t.target.baseVal:t.target,s=!r||!!a||bt(r,e,n)||(t.getAttribute("rel")||"").split(/\s+/).includes("external"),o=(r==null?void 0:r.origin)===wt&&t.hasAttribute("download");return{url:r,external:s,target:a,download:o}}function ft(t){let e=null,n=null,r=null,a=null,s=null,o=null,i=t;for(;i&&i!==document.documentElement;)r===null&&(r=K(i,"preload-code")),a===null&&(a=K(i,"preload-data")),e===null&&(e=K(i,"keepfocus")),n===null&&(n=K(i,"noscroll")),s===null&&(s=K(i,"reload")),o===null&&(o=K(i,"replacestate")),i=he(i);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Xt[r??"off"],preload_data:Xt[a??"off"],keepfocus:l(e),noscroll:l(n),reload:l(s),replace_state:l(o)}}function Qt(t){const e=It(t);let n=!0;function r(){n=!0,e.update(o=>o)}function a(o){n=!1,e.set(o)}function s(o){let i;return e.subscribe(l=>{(i===void 0||n&&l!==i)&&o(i=l)})}return{notify:r,set:a,subscribe:s}}const ge={v:()=>{}};function Je(){const{set:t,subscribe:e}=It(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Ye}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const o=(await a.json()).version!==ze;return o&&(t(!0),ge.v(),clearTimeout(n)),o}catch{return!1}}return{subscribe:e,check:r}}function bt(t,e,n){return t.origin!==wt||!t.pathname.startsWith(e)?!0:n?!(t.pathname===e+"/"||t.pathname===e+"/index.html"||t.protocol==="file:"&&t.pathname.replace(/\/[^/]+\.html?$/,"")===e):!1}function An(t){}const me=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...me];const Xe=new Set([...me]);[...Xe];function Qe(t){return t.filter(e=>e!=null)}function Dt(t){return t instanceof Ot||t instanceof $t?t.status:500}function Ze(t){return t instanceof $t?t.text:"Internal Error"}let R,Y,xt;const tn=Yt.toString().includes("$$")||/function \w+\(\) \{\}/.test(Yt.toString());var Z,tt,et,nt,at,rt,ot,st,se,it,ie,lt,le;tn?(R={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},Y={current:null},xt={current:!1}):(R=new(se=class{constructor(){T(this,Z,I({}));T(this,tt,I(null));T(this,et,I(null));T(this,nt,I({}));T(this,at,I({id:null}));T(this,rt,I({}));T(this,ot,I(-1));T(this,st,I(new URL("https://example.com")))}get data(){return O(v(this,Z))}set data(e){$(v(this,Z),e)}get form(){return O(v(this,tt))}set form(e){$(v(this,tt),e)}get error(){return O(v(this,et))}set error(e){$(v(this,et),e)}get params(){return O(v(this,nt))}set params(e){$(v(this,nt),e)}get route(){return O(v(this,at))}set route(e){$(v(this,at),e)}get state(){return O(v(this,rt))}set state(e){$(v(this,rt),e)}get status(){return O(v(this,ot))}set status(e){$(v(this,ot),e)}get url(){return O(v(this,st))}set url(e){$(v(this,st),e)}},Z=new WeakMap,tt=new WeakMap,et=new WeakMap,nt=new WeakMap,at=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,se),Y=new(ie=class{constructor(){T(this,it,I(null))}get current(){return O(v(this,it))}set current(e){$(v(this,it),e)}},it=new WeakMap,ie),xt=new(le=class{constructor(){T(this,lt,I(!1))}get current(){return O(v(this,lt))}set current(e){$(v(this,lt),e)}},lt=new WeakMap,le),ge.v=()=>xt.current=!0);function en(t){Object.assign(R,t)}const Zt={spanContext(){return nn},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},nn={traceId:"",spanId:"",traceFlags:0},{tick:an}=Pe,rn=Oe??(t=>t()),on=new Set(["icon","shortcut icon","apple-touch-icon"]),B=ce(ue)??{},z=ce(fe)??{},N={url:Qt({}),page:Qt({}),navigating:It(null),updated:Je()};function qt(t){B[t]=yt()}function sn(t,e){let n=t+1;for(;B[n];)delete B[n],n+=1;for(n=e+1;z[n];)delete z[n],n+=1}function J(t,e=!1){return e?location.replace(t.href):location.href=t.href,new Promise(()=>{})}async function _e(){if("serviceWorker"in navigator){const t=await navigator.serviceWorker.getRegistration(U||"/");t&&await t.update()}}function te(){}let Vt,Ut,ut,j,Tt,y;const dt=[],ht=[];let x=null;const ct=new Map,we=new Set,ln=new Set,W=new Set;let _={branch:[],error:null,url:null},ve=!1,pt=!1,ee=!0,X=!1,H=!1,ye=!1,Bt=!1,Kt,S,L,q;const gt=new Set,ne=new Map;async function In(t,e,n){var s,o,i,l,c;(s=globalThis.__sveltekit_10ju1g9)!=null&&s.data&&globalThis.__sveltekit_10ju1g9.data,document.URL!==location.href&&(location.href=location.href),y=t,await((i=(o=t.hooks).init)==null?void 0:i.call(o)),Vt=We(t),j=document.documentElement,Tt=e,Ut=t.nodes[0],ut=t.nodes[1],Ut(),ut(),S=(l=history.state)==null?void 0:l[V],L=(c=history.state)==null?void 0:c[G],S||(S=L=Date.now(),history.replaceState({...history.state,[V]:S,[G]:L},""));const r=B[S];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await yn(Tt,n)):(await F({type:"enter",url:vt(y.hash?Sn(new URL(location.href)):location.href),replace_state:!0}),a()),vn()}function cn(){dt.length=0,Bt=!1}function be(t){ht.some(e=>e==null?void 0:e.snapshot)&&(z[t]=ht.map(e=>{var n;return(n=e==null?void 0:e.snapshot)==null?void 0:n.capture()}))}function ke(t){var e;(e=z[t])==null||e.forEach((n,r)=>{var a,s;(s=(a=ht[r])==null?void 0:a.snapshot)==null||s.restore(n)})}function ae(){qt(S),Jt(ue,B),be(L),Jt(fe,z)}async function Se(t,e,n,r){let a;e.invalidateAll&&(x=null),await F({type:"goto",url:vt(t),keepfocus:e.keepFocus,noscroll:e.noScroll,replace_state:e.replaceState,state:e.state,redirect_count:n,nav_token:r,accept:()=>{e.invalidateAll&&(Bt=!0,a=[...ne.keys()]),e.invalidate&&e.invalidate.forEach(wn)}}),e.invalidateAll&&zt().then(zt).then(()=>{ne.forEach(({resource:s},o)=>{var i;a!=null&&a.includes(o)&&((i=s.refresh)==null||i.call(s))})})}async function fn(t){if(t.id!==(x==null?void 0:x.id)){const e={};gt.add(e),x={id:t.id,token:e,promise:xe({...t,preload:e}).then(n=>(gt.delete(e),n.type==="loaded"&&n.state.error&&(x=null),n))}}return x.promise}async function Lt(t){var n;const e=(n=await kt(t,!1))==null?void 0:n.route;e&&await Promise.all([...e.layouts,e.leaf].map(r=>r==null?void 0:r[1]()))}function Re(t,e,n){var a;_=t.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(R,t.props.page),Kt=new y.root({target:e,props:{...t.props,stores:N,components:ht},hydrate:n,sync:!1}),ke(L),n){const s={from:null,to:{params:_.params,route:{id:((a=_.route)==null?void 0:a.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};W.forEach(o=>o(s))}pt=!0}function mt({url:t,params:e,branch:n,status:r,error:a,route:s,form:o}){let i="never";if(U&&(t.pathname===U||t.pathname===U+"/"))i="always";else for(const u of n)(u==null?void 0:u.slash)!==void 0&&(i=u.slash);t.pathname=$e(t.pathname,i),t.search=t.search;const l={type:"loaded",state:{url:t,params:e,branch:n,error:a,route:s},props:{constructors:Qe(n).map(u=>u.node.component),page:St(R)}};o!==void 0&&(l.props.form=o);let c={},g=!R,h=0;for(let u=0;u<Math.max(n.length,_.branch.length);u+=1){const m=n[u],f=_.branch[u];(m==null?void 0:m.data)!==(f==null?void 0:f.data)&&(g=!0),m&&(c={...c,...m.data},g&&(l.props[`data_${h}`]=c),h+=1)}return(!_.url||t.href!==_.url.href||_.error!==a||o!==void 0&&o!==R.form||g)&&(l.props.page={error:a,params:e,route:{id:(s==null?void 0:s.id)??null},state:{},status:r,url:new URL(t),form:o??null,data:g?c:R.data}),l}async function Ft({loader:t,parent:e,url:n,params:r,route:a,server_data_node:s}){var g,h,w;let o=null,i=!0;const l={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await t();if((g=c.universal)!=null&&g.load){let u=function(...f){for(const d of f){const{href:p}=new URL(d,n);l.dependencies.add(p)}};const m={tracing:{enabled:!1,root:Zt,current:Zt},route:new Proxy(a,{get:(f,d)=>(i&&(l.route=!0),f[d])}),params:new Proxy(r,{get:(f,d)=>(i&&l.params.add(d),f[d])}),data:(s==null?void 0:s.data)??null,url:Ne(n,()=>{i&&(l.url=!0)},f=>{i&&l.search_params.add(f)},y.hash),async fetch(f,d){f instanceof Request&&(d={body:f.method==="GET"||f.method==="HEAD"?void 0:await f.blob(),cache:f.cache,credentials:f.credentials,headers:[...f.headers].length>0?f==null?void 0:f.headers:void 0,integrity:f.integrity,keepalive:f.keepalive,method:f.method,mode:f.mode,redirect:f.redirect,referrer:f.referrer,referrerPolicy:f.referrerPolicy,signal:f.signal,...d});const{resolved:p,promise:b}=Ee(f,d,n);return i&&u(p.href),b},setHeaders:()=>{},depends:u,parent(){return i&&(l.parent=!0),e()},untrack(f){i=!1;try{return f()}finally{i=!0}}};o=await c.universal.load.call(null,m)??null}return{node:c,loader:t,server:s,universal:(h=c.universal)!=null&&h.load?{type:"data",data:o,uses:l}:null,data:o??(s==null?void 0:s.data)??null,slash:((w=c.universal)==null?void 0:w.trailingSlash)??(s==null?void 0:s.slash)}}function Ee(t,e,n){let r=t instanceof Request?t.url:t;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const s=pt?Be(r,a.href,e):Ve(r,e);return{resolved:a,promise:s}}function un(t,e,n,r,a,s){if(Bt)return!0;if(!a)return!1;if(a.parent&&t||a.route&&e||a.url&&n)return!0;for(const o of a.search_params)if(r.has(o))return!0;for(const o of a.params)if(s[o]!==_.params[o])return!0;for(const o of a.dependencies)if(dt.some(i=>i(new URL(o))))return!0;return!1}function Gt(t,e){return(t==null?void 0:t.type)==="data"?t:(t==null?void 0:t.type)==="skip"?e??null:null}function dn(t,e){if(!t)return new Set(e.searchParams.keys());const n=new Set([...t.searchParams.keys(),...e.searchParams.keys()]);for(const r of n){const a=t.searchParams.getAll(r),s=e.searchParams.getAll(r);a.every(o=>s.includes(o))&&s.every(o=>a.includes(o))&&n.delete(r)}return n}function hn({error:t,url:e,route:n,params:r}){return{type:"loaded",state:{error:t,url:e,route:n,params:r,branch:[]},props:{page:St(R),constructors:[]}}}async function xe({id:t,invalidating:e,url:n,params:r,route:a,preload:s}){if((x==null?void 0:x.id)===t)return gt.delete(x.token),x.promise;const{errors:o,layouts:i,leaf:l}=a,c=[...i,l];o.forEach(d=>d==null?void 0:d().catch(()=>{})),c.forEach(d=>d==null?void 0:d[1]().catch(()=>{}));const g=_.url?t!==_t(_.url):!1,h=_.route?a.id!==_.route.id:!1,w=dn(_.url,n);let u=!1;const m=c.map(async(d,p)=>{var C;if(!d)return;const b=_.branch[p];return d[1]===(b==null?void 0:b.loader)&&!un(u,h,g,w,(C=b.universal)==null?void 0:C.uses,r)?b:(u=!0,Ft({loader:d[1],url:n,params:r,route:a,parent:async()=>{var A;const k={};for(let P=0;P<p;P+=1)Object.assign(k,(A=await m[P])==null?void 0:A.data);return k},server_data_node:Gt(d[0]?{type:"skip"}:null,d[0]?b==null?void 0:b.server:void 0)}))});for(const d of m)d.catch(()=>{});const f=[];for(let d=0;d<c.length;d+=1)if(c[d])try{f.push(await m[d])}catch(p){if(p instanceof jt)return{type:"redirect",location:p.location};if(gt.has(s))return hn({error:await Q(p,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let b=Dt(p),E;if(p instanceof Ot)E=p.body;else{if(await N.updated.check())return await _e(),await J(n);E=await Q(p,{params:r,url:n,route:{id:a.id}})}const C=await pn(d,f,o);return C?mt({url:n,params:r,branch:f.slice(0,C.idx).concat(C.node),status:b,error:E,route:a}):await Ae(n,{id:a.id},E,b)}else f.push(void 0);return mt({url:n,params:r,branch:f,status:200,error:null,route:a,form:e?void 0:null})}async function pn(t,e,n){for(;t--;)if(n[t]){let r=t;for(;!e[r];)r-=1;try{return{idx:r+1,node:{node:await n[t](),loader:n[t],data:{},server:null,universal:null}}}catch{continue}}}async function Ht({status:t,error:e,url:n,route:r}){const a={};let s=null;try{const o=await Ft({loader:Ut,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Gt(s)}),i={node:await ut(),loader:ut,universal:null,server:null,data:null};return mt({url:n,params:a,branch:[o,i],status:t,error:e,route:null})}catch(o){if(o instanceof jt)return Se(new URL(o.location,location.href),{},0);throw o}}async function gn(t){const e=t.href;if(ct.has(e))return ct.get(e);let n;try{const r=(async()=>{let a=await y.hooks.reroute({url:new URL(t),fetch:async(s,o)=>Ee(s,o,t).promise})??t;if(typeof a=="string"){const s=new URL(t);y.hash?s.hash=a:s.pathname=a,a=s}return a})();ct.set(e,r),n=await r}catch{ct.delete(e);return}return n}async function kt(t,e){if(t&&!bt(t,U,y.hash)){const n=await gn(t);if(!n)return;const r=mn(n);for(const a of Vt){const s=a.exec(r);if(s)return{id:_t(t),invalidating:e,route:a,params:Ce(s),url:t}}}}function mn(t){return je(y.hash?t.hash.replace(/^#/,"").replace(/[?#].+/,""):t.pathname.slice(U.length))||"/"}function _t(t){return(y.hash?t.hash.replace(/^#/,""):t.pathname)+t.search}function Le({url:t,type:e,intent:n,delta:r,event:a}){let s=!1;const o=Mt(_,n,t,e);r!==void 0&&(o.navigation.delta=r),a!==void 0&&(o.navigation.event=a);const i={...o.navigation,cancel:()=>{s=!0,o.reject(new Error("navigation cancelled"))}};return X||we.forEach(l=>l(i)),s?null:o}async function F({type:t,url:e,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:o={},redirect_count:i=0,nav_token:l={},accept:c=te,block:g=te,event:h}){const w=q;q=l;const u=await kt(e,!1),m=t==="enter"?Mt(_,u,e,t):Le({url:e,type:t,delta:n==null?void 0:n.delta,intent:u,event:h});if(!m){g(),q===l&&(q=w);return}const f=S,d=L;c(),X=!0,pt&&m.navigation.type!=="enter"&&N.navigating.set(Y.current=m.navigation);let p=u&&await xe(u);if(!p){if(bt(e,U,y.hash))return await J(e,s);p=await Ae(e,{id:null},await Q(new $t(404,"Not Found",`Not found: ${e.pathname}`),{url:e,params:{},route:{id:null}}),404,s)}if(e=(u==null?void 0:u.url)||e,q!==l)return m.reject(new Error("navigation aborted")),!1;if(p.type==="redirect"){if(i<20){await F({type:t,url:new URL(p.location,e),popped:n,keepfocus:r,noscroll:a,replace_state:s,state:o,redirect_count:i+1,nav_token:l}),m.fulfil(void 0);return}p=await Ht({status:500,error:await Q(new Error("Redirect loop"),{url:e,params:{},route:{id:null}}),url:e,route:{id:null}})}else p.props.page.status>=400&&await N.updated.check()&&(await _e(),await J(e,s));if(cn(),qt(f),be(d),p.props.page.url.pathname!==e.pathname&&(e.pathname=p.props.page.url.pathname),o=n?n.state:o,!n){const k=s?0:1,A={[V]:S+=k,[G]:L+=k,[Nt]:o};(s?history.replaceState:history.pushState).call(history,A,"",e),s||sn(S,L)}if(x=null,p.props.page.state=o,pt){const k=(await Promise.all(Array.from(ln,A=>A(m.navigation)))).filter(A=>typeof A=="function");if(k.length>0){let A=function(){k.forEach(P=>{W.delete(P)})};k.push(A),k.forEach(P=>{W.add(P)})}_=p.state,p.props.page&&(p.props.page.url=e),Kt.$set(p.props),en(p.props.page),ye=!0}else Re(p,Tt,!1);const{activeElement:b}=document;await an();let E=n?n.scroll:a?yt():null;if(ee){const k=e.hash&&document.getElementById(Ue(e));if(E)scrollTo(E.x,E.y);else if(k){k.scrollIntoView();const{top:A,left:P}=k.getBoundingClientRect();E={x:pageXOffset+P,y:pageYOffset+A}}else scrollTo(0,0)}const C=document.activeElement!==b&&document.activeElement!==document.body;!r&&!C&&kn(e,E),ee=!0,p.props.page&&Object.assign(R,p.props.page),X=!1,t==="popstate"&&ke(L),m.fulfil(void 0),W.forEach(k=>k(m.navigation)),N.navigating.set(Y.current=null)}async function Ae(t,e,n,r,a){return t.origin===wt&&t.pathname===location.pathname&&!ve?await Ht({status:r,error:n,url:t,route:e}):await J(t,a)}function _n(){let t,e,n;j.addEventListener("mousemove",i=>{const l=i.target;clearTimeout(t),t=setTimeout(()=>{s(l,D.hover)},20)});function r(i){i.defaultPrevented||s(i.composedPath()[0],D.tap)}j.addEventListener("mousedown",r),j.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(i=>{for(const l of i)l.isIntersecting&&(Lt(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function s(i,l){const c=pe(i,j),g=c===e&&l>=n;if(!c||g)return;const{url:h,external:w,download:u}=At(c,U,y.hash);if(w||u)return;const m=ft(c),f=h&&_t(_.url)===_t(h);if(!(m.reload||f))if(l<=m.preload_data){e=c,n=D.tap;const d=await kt(h,!1);if(!d)return;fn(d)}else l<=m.preload_code&&(e=c,n=l,Lt(h))}function o(){a.disconnect();for(const i of j.querySelectorAll("a")){const{url:l,external:c,download:g}=At(i,U,y.hash);if(c||g)continue;const h=ft(i);h.reload||(h.preload_code===D.viewport&&a.observe(i),h.preload_code===D.eager&&Lt(l))}}W.add(o),o()}function Q(t,e){if(t instanceof Ot)return t.body;const n=Dt(t),r=Ze(t);return y.hooks.handleError({error:t,event:e,status:n,message:r})??{message:r}}function On(t,e={}){return t=new URL(vt(t)),t.origin!==wt?Promise.reject(new Error("goto: invalid URL")):Se(t,e,0)}function wn(t){if(typeof t=="function")dt.push(t);else{const{href:e}=new URL(t,location.href);dt.push(n=>n.href===e)}}function $n(t,e){const n={[V]:S,[G]:L,[de]:R.url.href,[Nt]:e};history.replaceState(n,"",vt(t)),R.state=e,Kt.$set({page:rn(()=>St(R))})}function vn(){var e;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let r=!1;if(ae(),!X){const a=Mt(_,void 0,null,"leave"),s={...a.navigation,cancel:()=>{r=!0,a.reject(new Error("navigation cancelled"))}};we.forEach(o=>o(s))}r?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&ae()}),(e=navigator.connection)!=null&&e.saveData||_n(),j.addEventListener("click",async n=>{if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const r=pe(n.composedPath()[0],j);if(!r)return;const{url:a,external:s,target:o,download:i}=At(r,U,y.hash);if(!a)return;if(o==="_parent"||o==="_top"){if(window.parent!==window)return}else if(o&&o!=="_self")return;const l=ft(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||i)return;const[g,h]=(y.hash?a.hash.replace(/^#/,""):a.href).split("#"),w=g===Rt(location);if(s||l.reload&&(!w||!h)){Le({url:a,type:"link",event:n})?X=!0:n.preventDefault();return}if(h!==void 0&&w){const[,u]=_.url.href.split("#");if(u===h){if(n.preventDefault(),h===""||h==="top"&&r.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const m=r.ownerDocument.getElementById(decodeURIComponent(h));m&&(m.scrollIntoView(),m.focus())}return}if(H=!0,qt(S),t(a),!l.replace_state)return;H=!1}n.preventDefault(),await new Promise(u=>{requestAnimationFrame(()=>{setTimeout(u,0)}),setTimeout(u,100)}),await F({type:"link",url:a,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??a.href===location.href,event:n})}),j.addEventListener("submit",n=>{if(n.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(n.target),a=n.submitter;if(((a==null?void 0:a.formTarget)||r.target)==="_blank"||((a==null?void 0:a.formMethod)||r.method)!=="get")return;const i=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(bt(i,U,!1))return;const l=n.target,c=ft(l);if(c.reload)return;n.preventDefault(),n.stopPropagation();const g=new FormData(l,a);i.search=new URLSearchParams(g).toString(),F({type:"form",url:i,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??i.href===location.href,event:n})}),addEventListener("popstate",async n=>{var r;if(!Pt){if((r=n.state)!=null&&r[V]){const a=n.state[V];if(q={},a===S)return;const s=B[a],o=n.state[Nt]??{},i=new URL(n.state[de]??location.href),l=n.state[G],c=_.url?Rt(location)===Rt(_.url):!1;if(l===L&&(ye||c)){o!==R.state&&(R.state=o),t(i),B[S]=yt(),s&&scrollTo(s.x,s.y),S=a;return}const h=a-S;await F({type:"popstate",url:i,popped:{state:o,scroll:s,delta:h},accept:()=>{S=a,L=l},block:()=>{history.go(-h)},nav_token:q,event:n})}else if(!H){const a=new URL(location.href);t(a),y.hash&&location.reload()}}}),addEventListener("hashchange",()=>{H&&(H=!1,history.replaceState({...history.state,[V]:++S,[G]:L},"",location.href))});for(const n of document.querySelectorAll("link"))on.has(n.rel)&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&N.navigating.set(Y.current=null)});function t(n){_.url=R.url=n,N.page.set(St(R)),N.page.notify()}}async function yn(t,{status:e=200,error:n,node_ids:r,params:a,route:s,server_route:o,data:i,form:l}){ve=!0;const c=new URL(location.href);let g;({params:a={},route:s={id:null}}=await kt(c,!1)||{}),g=Vt.find(({id:u})=>u===s.id);let h,w=!0;try{const u=r.map(async(f,d)=>{const p=i[d];return p!=null&&p.uses&&(p.uses=bn(p.uses)),Ft({loader:y.nodes[f],url:c,params:a,route:s,parent:async()=>{const b={};for(let E=0;E<d;E+=1)Object.assign(b,(await u[E]).data);return b},server_data_node:Gt(p)})}),m=await Promise.all(u);if(g){const f=g.layouts;for(let d=0;d<f.length;d++)f[d]||m.splice(d,0,void 0)}h=mt({url:c,params:a,branch:m,status:e,error:n,form:l,route:g??null})}catch(u){if(u instanceof jt){await J(new URL(u.location,location.href));return}h=await Ht({status:Dt(u),error:await Q(u,{url:c,params:a,route:s}),url:c,route:s}),t.textContent="",w=!1}h.props.page&&(h.props.page.state={}),Re(h,t,w)}function bn(t){return{dependencies:new Set((t==null?void 0:t.dependencies)??[]),params:new Set((t==null?void 0:t.params)??[]),parent:!!(t!=null&&t.parent),route:!!(t!=null&&t.route),url:!!(t!=null&&t.url),search_params:new Set((t==null?void 0:t.search_params)??[])}}let Pt=!1;function kn(t,e=null){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=Ue(t);if(r&&document.getElementById(r)){const{x:s,y:o}=e??yt();setTimeout(()=>{const i=history.state;Pt=!0,location.replace(`#${r}`),y.hash&&location.replace(t.hash),history.replaceState(i,"",t.hash),scrollTo(s,o),Pt=!1})}else{const s=document.body,o=s.getAttribute("tabindex");s.tabIndex=-1,s.focus({preventScroll:!0,focusVisible:!1}),o!==null?s.setAttribute("tabindex",o):s.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const s=[];for(let o=0;o<a.rangeCount;o+=1)s.push(a.getRangeAt(o));setTimeout(()=>{if(a.rangeCount===s.length){for(let o=0;o<a.rangeCount;o+=1){const i=s[o],l=a.getRangeAt(o);if(i.commonAncestorContainer!==l.commonAncestorContainer||i.startContainer!==l.startContainer||i.endContainer!==l.endContainer||i.startOffset!==l.startOffset||i.endOffset!==l.endOffset)return}a.removeAllRanges()}})}}}function Mt(t,e,n,r){var l,c;let a,s;const o=new Promise((g,h)=>{a=g,s=h});return o.catch(()=>{}),{navigation:{from:{params:t.params,route:{id:((l=t.route)==null?void 0:l.id)??null},url:t.url},to:n&&{params:(e==null?void 0:e.params)??null,route:{id:((c=e==null?void 0:e.route)==null?void 0:c.id)??null},url:n},willUnload:!e,type:r,complete:o},fulfil:a,reject:s}}function St(t){return{data:t.data,error:t.error,form:t.form,params:t.params,route:t.route,state:t.state,status:t.status,url:t.url}}function Sn(t){const e=new URL(t);return e.hash=decodeURIComponent(t.hash),e}function Ue(t){let e;if(y.hash){const[,,n]=t.hash.split("#",3);e=n??""}else e=t.hash.slice(1);return decodeURIComponent(e)}export{In as a,On as g,An as l,R as p,$n as r,N as s};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./CWj6FrbW.js";import{A as q,p as E,g as N,u as R,ab as B,f as M,d as S,t as T,b as z,c as I,r as C,ac as K,h as _,l as O,e as U,i as j}from"./CVHvdSBf.js";import{w as F,a as L,o as G,c as J}from"./DujX6kBV.js";import{c as V,s as k}from"./BkclRFLx.js";import{p as h,s as P,a as Q}from"./yWz0pZR0.js";import{b as W}from"./DQqJYxgt.js";function X(a,e,l,g,f){const r=e()==="horizontal";if(a.key==="Home"){a.preventDefault(),l.length&&g(l[0].value,!0);return}if(a.key==="End"){a.preventDefault(),l.length&&g(l[l.length-1].value,!0);return}if(r&&(a.key==="ArrowRight"||a.key==="ArrowLeft")){a.preventDefault(),f(a.key==="ArrowRight"?1:-1);return}if(!r&&(a.key==="ArrowDown"||a.key==="ArrowUp")){a.preventDefault(),f(a.key==="ArrowDown"?1:-1);return}}var Y=M('<div><div class="tablist svelte-126ak3w" role="tablist"><!></div></div>');function ie(a,e){E(e,!0);let l=h(e,"value",11,null),g=h(e,"defaultValue",3,null),f=h(e,"ariaLabel",3,"Tabs"),r=h(e,"class",3,""),d=h(e,"orientation",3,"horizontal");const t=N([]);let u=null;const x=F(null);R(()=>{l()!==null?u=l():u===null&&t.length&&(u=g()??t[0].value),x.set(u)});function y(n){var c;const i=t.find(m=>m.value===n);(c=i==null?void 0:i.getEl())==null||c.focus()}function s(n,i=!1){var c;n!==(l()??u)&&(l()===null&&(u=n),(c=e.onChange)==null||c.call(e,{value:n}),i&&queueMicrotask(()=>y(n)))}function D(n){const i=t.findIndex(c=>c.id===n.id);i===-1?t.push(n):t[i]=n}function w(n){var c;const i=t.findIndex(m=>m.id===n);if(i!==-1&&t.splice(i,1),l()===null&&u&&!t.some(m=>m.value===u)&&t.length){const m=t[Math.max(0,i-1)].value;u=m,(c=e.onChange)==null||c.call(e,{value:m})}}function o(n){return t.findIndex(i=>i.value===n)}function A(n){if(!t.length)return;const c=((u?o(u):0)+n+t.length)%t.length;s(t[c].value,!0)}B("rc-tabs",{value:x,requestSelect:n=>s(n),register:D,unregister:w});var b=Y(),v=S(b);v.__keydown=[X,d,t,s,A];var H=S(v);L(H,()=>e.children),C(v),C(b),T(()=>{V(b,1,`tabs-root ${r()}`,"svelte-126ak3w"),k(v,"aria-label",f()),k(v,"aria-orientation",d())}),z(a,b),I()}q(["keydown"]);function Z(a,e,l,g,f){var r;e()||(l==null||l.requestSelect(g()),(r=f.onclick)==null||r.call(f,a))}var p=M('<button type="button" role="tab"><!></button>');function re(a,e){E(e,!0);const l=()=>Q(D,"$valueStore",g),[g,f]=P();let r=h(e,"value",7,""),d=h(e,"id",7,""),t=h(e,"disabled",3,!1),u=h(e,"class",3,"");const x=Math.random().toString(36).slice(2,8);d()||d(`tab-${x}`),r()||r(d());let y=U(null);const s=K("rc-tabs"),D=s.value;let w=O(()=>l()===r());G(()=>{s==null||s.register({id:d(),value:r(),getEl:()=>_(y)})}),J(()=>{s==null||s.unregister(d())});var o=p();let A;o.__click=[Z,t,s,r,e];var b=S(o);L(b,()=>e.children),C(o),W(o,v=>j(y,v),()=>_(y)),T(v=>{A=V(o,1,`tab ${u()??""}`,"svelte-184qymf",A,v),o.disabled=t(),k(o,"id",d()),k(o,"aria-selected",_(w)),k(o,"aria-controls",`panel-${r()}`),k(o,"tabindex",_(w)?0:-1)},[()=>({active:_(w)})]),z(a,o),I(),f()}q(["click"]);export{ie as T,re as a};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as e,p as r}from"./ZH2wGpZM.js";const t={get error(){return r.error},get params(){return r.params},get status(){return r.status},get url(){return r.url}};e.updated.check;const a=t;export{a as p};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.CwdXLzyE.js","../chunks/CWj6FrbW.js","../chunks/DujX6kBV.js","../chunks/CVHvdSBf.js","../chunks/BXkrt826.js","../chunks/CNvyTQrC.js","../chunks/uS7H_Vea.js","../chunks/ZH2wGpZM.js","../chunks/BUApaBEI.js","../assets/0.DsZUjxNX.css","../nodes/1.CJSJdR2U.js","../chunks/Jaf1TUfw.js","../chunks/BqROrg0C.js","../nodes/2.DISE-c5q.js","../chunks/BTlUd_Lo.js","../chunks/CpSIcnXs.js","../chunks/yWz0pZR0.js","../chunks/BkclRFLx.js","../assets/bosun-theme.tn0RQdqM.css","../chunks/DJPBfZIx.js","../chunks/CYiRxJxs.js","../chunks/CZPhtqrs.js","../chunks/DQqJYxgt.js","../chunks/axPa8Xqj.js","../assets/Tab.DlCfjMY1.css","../chunks/BWo2H__f.js","../chunks/BEJ5fU19.js","../chunks/Cf8q8_nj.js","../assets/AgentSidebar.BL1i3rB_.css","../chunks/BVDwc-2z.js","../chunks/Cg3F7Z11.js","../assets/2.DxwYfh1z.css","../nodes/3.BtAUfPNQ.js","../chunks/CFwu9ET3.js","../assets/Input.NBh3BL7E.css","../chunks/W8E9z4jl.js","../assets/3.Dzh7_Q8n.css","../nodes/4.DylMSvDw.js","../assets/4.CZVw96CJ.css","../nodes/5.CqUx8Ggk.js","../nodes/6.CPYhLc46.js","../chunks/hp4PFHFv.js","../nodes/7.B6QVJ_di.js","../chunks/D42t-LiJ.js","../assets/ChatStepTrace.NFJFjHv0.css","../assets/7.DlSPCZj0.css","../nodes/8.DhQWMEsP.js","../assets/8.BX46PfEJ.css","../nodes/9.BVI-eEdV.js","../nodes/10.BHSGZYEC.js","../nodes/11.CZ_7M4AF.js","../nodes/12.DRr2l3NZ.js","../nodes/13.DaAF9e8t.js","../nodes/14.BcXGBqPj.js","../assets/14.C5apk4jm.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
var F=r=>{throw TypeError(r)};var H=(r,t,e)=>t.has(r)||F("Cannot "+e);var n=(r,t,e)=>(H(r,t,"read from private field"),e?e.call(r):t.get(r)),G=(r,t,e)=>t.has(r)?F("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,e),W=(r,t,e,i)=>(H(r,t,"write to private field"),i?i.call(r,e):t.set(r,e),e);import{c as L,_ as o}from"../chunks/CpSIcnXs.js";import{i as k,a9 as ot,h as l,ai as nt,V as it,X as _t,p as mt,C as ut,u as ct,e as X,x as dt,f as J,a as y,s as lt,b as v,c as ft,T as p,l as T,d as vt,r as gt,k as ht,t as Et}from"../chunks/CVHvdSBf.js";import{h as Pt,m as yt,u as Rt,o as Ot,s as pt}from"../chunks/DujX6kBV.js";import"../chunks/CWj6FrbW.js";import{i as x}from"../chunks/BXkrt826.js";import{b as V}from"../chunks/DQqJYxgt.js";import{p as w}from"../chunks/yWz0pZR0.js";function bt(r){return class extends At{constructor(t){super({component:r,...t})}}}var g,m;class At{constructor(t){G(this,g);G(this,m);var b;var e=new Map,i=(a,s)=>{var f=_t(s,!1,!1);return e.set(a,f),f};const u=new Proxy({...t.props||{},$$events:{}},{get(a,s){return l(e.get(s)??i(s,Reflect.get(a,s)))},has(a,s){return s===ot?!0:(l(e.get(s)??i(s,Reflect.get(a,s))),Reflect.has(a,s))},set(a,s,f){return k(e.get(s)??i(s,f),f),Reflect.set(a,s,f)}});W(this,m,(t.hydrate?Pt:yt)(t.component,{target:t.target,anchor:t.anchor,props:u,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((b=t==null?void 0:t.props)!=null&&b.$$host)||t.sync===!1)&&nt(),W(this,g,u.$$events);for(const a of Object.keys(n(this,m)))a==="$set"||a==="$destroy"||a==="$on"||it(this,a,{get(){return n(this,m)[a]},set(s){n(this,m)[a]=s},enumerable:!0});n(this,m).$set=a=>{Object.assign(u,a)},n(this,m).$destroy=()=>{Rt(n(this,m))}}$set(t){n(this,m).$set(t)}$on(t,e){n(this,g)[t]=n(this,g)[t]||[];const i=(...u)=>e.call(this,...u);return n(this,g)[t].push(i),()=>{n(this,g)[t]=n(this,g)[t].filter(u=>u!==i)}}$destroy(){n(this,m).$destroy()}}g=new WeakMap,m=new WeakMap;const It=({url:r})=>{const t=r.pathname;if(t.startsWith("/view"))return t.replace(/^\/view(?=\/|$)/,"/traces")},qt={};var Lt=J('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),Tt=J("<!> <!>",1);function Vt(r,t){mt(t,!0);let e=w(t,"components",23,()=>[]),i=w(t,"data_0",3,null),u=w(t,"data_1",3,null),b=w(t,"data_2",3,null);ut(()=>t.stores.page.set(t.page)),ct(()=>{t.stores,t.page,t.constructors,e(),t.form,i(),u(),b(),t.stores.page.notify()});let a=X(!1),s=X(!1),f=X(null);Ot(()=>{const _=t.stores.page.subscribe(()=>{l(a)&&(k(s,!0),dt().then(()=>{k(f,document.title||"untitled page",!0)}))});return k(a,!0),_});const K=T(()=>t.constructors[2]);var Y=Tt(),q=y(Y);{var N=_=>{const h=T(()=>t.constructors[0]);var E=p(),A=y(E);L(A,()=>l(h),(P,R)=>{V(R(P,{get data(){return i()},get form(){return t.form},get params(){return t.page.params},children:(c,wt)=>{var z=p(),$=y(z);{var tt=O=>{const C=T(()=>t.constructors[1]);var I=p(),j=y(I);L(j,()=>l(C),(S,M)=>{V(M(S,{get data(){return u()},get form(){return t.form},get params(){return t.page.params},children:(d,kt)=>{var B=p(),rt=y(B);L(rt,()=>l(K),(at,st)=>{V(st(at,{get data(){return b()},get form(){return t.form},get params(){return t.page.params}}),D=>e()[2]=D,()=>{var D;return(D=e())==null?void 0:D[2]})}),v(d,B)},$$slots:{default:!0}}),d=>e()[1]=d,()=>{var d;return(d=e())==null?void 0:d[1]})}),v(O,I)},et=O=>{const C=T(()=>t.constructors[1]);var I=p(),j=y(I);L(j,()=>l(C),(S,M)=>{V(M(S,{get data(){return u()},get form(){return t.form},get params(){return t.page.params}}),d=>e()[1]=d,()=>{var d;return(d=e())==null?void 0:d[1]})}),v(O,I)};x($,O=>{t.constructors[2]?O(tt):O(et,!1)})}v(c,z)},$$slots:{default:!0}}),c=>e()[0]=c,()=>{var c;return(c=e())==null?void 0:c[0]})}),v(_,E)},Q=_=>{const h=T(()=>t.constructors[0]);var E=p(),A=y(E);L(A,()=>l(h),(P,R)=>{V(R(P,{get data(){return i()},get form(){return t.form},get params(){return t.page.params}}),c=>e()[0]=c,()=>{var c;return(c=e())==null?void 0:c[0]})}),v(_,E)};x(q,_=>{t.constructors[1]?_(N):_(Q,!1)})}var U=lt(q,2);{var Z=_=>{var h=Lt(),E=vt(h);{var A=P=>{var R=ht();Et(()=>pt(R,l(f))),v(P,R)};x(E,P=>{l(s)&&P(A)})}gt(h),v(_,h)};x(U,_=>{l(a)&&_(Z)})}v(r,Y),ft()}const zt=bt(Vt),Bt=[()=>o(()=>import("../nodes/0.CwdXLzyE.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url),()=>o(()=>import("../nodes/1.CJSJdR2U.js"),__vite__mapDeps([10,1,11,3,2,12,6,7,8]),import.meta.url),()=>o(()=>import("../nodes/2.DISE-c5q.js"),__vite__mapDeps([13,1,2,3,4,14,15,16,17,18,19,20,21,22,23,24,25,7,8,6,26,27,28,5,11,12,29,30,31]),import.meta.url),()=>o(()=>import("../nodes/3.BtAUfPNQ.js"),__vite__mapDeps([32,1,2,3,4,17,16,7,8,6,21,22,33,19,34,35,23,24,27,28,5,36]),import.meta.url),()=>o(()=>import("../nodes/4.DylMSvDw.js"),__vite__mapDeps([37,1,2,3,27,4,17,16,28,5,26,38]),import.meta.url),()=>o(()=>import("../nodes/5.CqUx8Ggk.js"),__vite__mapDeps([39,1,2,3,7,8,5,26,27,4,17,16,28,23,22,24,6]),import.meta.url),()=>o(()=>import("../nodes/6.CPYhLc46.js"),__vite__mapDeps([40,41,8]),import.meta.url),()=>o(()=>import("../nodes/7.B6QVJ_di.js"),__vite__mapDeps([42,1,3,4,2,21,17,16,22,43,14,15,18,23,24,7,8,26,29,44,20,33,19,34,30,45]),import.meta.url),()=>o(()=>import("../nodes/8.DhQWMEsP.js"),__vite__mapDeps([46,1,2,3,4,14,15,16,17,18,19,20,21,22,25,33,34,26,47]),import.meta.url),()=>o(()=>import("../nodes/9.BVI-eEdV.js"),__vite__mapDeps([48,41,8]),import.meta.url),()=>o(()=>import("../nodes/10.BHSGZYEC.js"),__vite__mapDeps([49,41,8]),import.meta.url),()=>o(()=>import("../nodes/11.CZ_7M4AF.js"),__vite__mapDeps([50,41,8]),import.meta.url),()=>o(()=>import("../nodes/12.DRr2l3NZ.js"),__vite__mapDeps([51,41,8]),import.meta.url),()=>o(()=>import("../nodes/13.DaAF9e8t.js"),__vite__mapDeps([52,1,11,3]),import.meta.url),()=>o(()=>import("../nodes/14.BcXGBqPj.js"),__vite__mapDeps([53,1,11,3,2,4,17,16,12,7,8,35,21,22,43,14,15,18,23,24,26,29,44,54]),import.meta.url)],Ft=[],Ht={"/":[4],"/edit":[5],"/edit/[agent]":[6,[2]],"/edit/[agent]/roleplay":[7,[2]],"/edit/[agent]/tests":[8,[2]],"/roleplay":[9],"/tests":[10],"/tests/[agent]":[11],"/traces":[12],"/traces/conversations":[13,[3]],"/traces/conversations/[conversationId]/traces":[14,[3]]},Dt={handleError:({error:r})=>{console.error(r)},reroute:It||(()=>{}),transport:{}},xt=Object.fromEntries(Object.entries(Dt.transport).map(([r,t])=>[r,t.decode])),Jt=!1,Kt=(r,t)=>xt[r](t);export{Kt as decode,xt as decoders,Ht as dictionary,Jt as hash,Dt as hooks,qt as matchers,Bt as nodes,zt as root,Ft as server_loads};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as o,a as r}from"../chunks/ZH2wGpZM.js";export{o as load_css,r as start};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../chunks/CWj6FrbW.js";import"../chunks/Jaf1TUfw.js";import{p as c,f as l,a as v,t as u,b as _,c as d,d as e,r as o,s as g}from"../chunks/CVHvdSBf.js";import{s as p}from"../chunks/DujX6kBV.js";import{i as x}from"../chunks/BqROrg0C.js";import{p as m}from"../chunks/uS7H_Vea.js";var b=l("<h1> </h1> <p> </p>",1);function z(i,f){c(f,!1),x();var t=b(),r=v(t),n=e(r,!0);o(r);var a=g(r,2),h=e(a,!0);o(a),u(()=>{var s;p(n,m.status),p(h,(s=m.error)==null?void 0:s.message)}),_(i,t),d()}export{z as component};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks/BfHUxT3G.js","../chunks/CpSIcnXs.js","../chunks/CVHvdSBf.js","../chunks/DujX6kBV.js","../assets/editor.BMIWPGx3.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
var At=Object.defineProperty;var Nt=(V,I,_)=>I in V?At(V,I,{enumerable:!0,configurable:!0,writable:!0,value:_}):V[I]=_;var Oe=(V,I,_)=>Nt(V,typeof I!="symbol"?I+"":I,_);import"../chunks/CWj6FrbW.js";import{o as lt,c as yt,s as Fe,a as Ct}from"../chunks/DujX6kBV.js";import{p as et,h as j,e as De,i as Ae,u as We,f as be,d as ce,r as le,b as se,c as tt,A as ct,s as we,n as Ke,t as Me,l as je,k as Ve,T as He,a as Ce,X as Pt,bq as It,g as ut}from"../chunks/CVHvdSBf.js";import{i as Se}from"../chunks/BXkrt826.js";import{e as _t,a as xt,c as Rt,k as Ft,M as Bt}from"../chunks/BTlUd_Lo.js";import{r as bt,g as Mt,e as nt,i as wt,c as Kt}from"../chunks/BkclRFLx.js";import{a as jt}from"../chunks/DJPBfZIx.js";import{P as Ze,g as Et,s as Dt}from"../chunks/CYiRxJxs.js";import{B as kt}from"../chunks/CZPhtqrs.js";import{T as at,a as Je}from"../chunks/axPa8Xqj.js";import{C as Ut,P as ft}from"../chunks/BWo2H__f.js";import{g as Xe,r as Vt}from"../chunks/ZH2wGpZM.js";import{p as $e}from"../chunks/uS7H_Vea.js";import{t as rt}from"../chunks/BEJ5fU19.js";import{_ as Ot}from"../chunks/CpSIcnXs.js";import{b as Tt}from"../chunks/DQqJYxgt.js";import{p as st}from"../chunks/yWz0pZR0.js";import{A as Wt}from"../chunks/Cf8q8_nj.js";import{g as Ht}from"../chunks/CNvyTQrC.js";import"../chunks/Jaf1TUfw.js";import{i as Gt}from"../chunks/BqROrg0C.js";import{d as pt,e as qt,f as $t,g as zt}from"../chunks/BVDwc-2z.js";import{c as ht,a as Qt}from"../chunks/Cg3F7Z11.js";var Yt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Jt(V){return V&&V.__esModule&&Object.prototype.hasOwnProperty.call(V,"default")?V.default:V}const Xt=globalThis.__sveltekit_10ju1g9.env;class Zt{constructor(I){Oe(this,"ws",null);Oe(this,"openHandler",null);Oe(this,"closeHandler",null);Oe(this,"errorHandler",null);Oe(this,"messageHandler",null);Oe(this,"retries",0);Oe(this,"maxRetries",5);Oe(this,"retryDelay",500);Oe(this,"retryTimeout",null);Oe(this,"isOpen",!1);Oe(this,"isDestroyed",!1);Oe(this,"agentsLoaded",!1);Oe(this,"init",()=>{if(!this.isOpen){this.agentsLoaded=!1,console.log(`Initializing websocket connection with [${this.wsUrl}]`);try{this.ws=new WebSocket(this.wsUrl)}catch{this.retryConnect();return}this.isDestroyed=!1,this.ws.onmessage=I=>{var C,O,y,k,f,s,m,E;const _=JSON.parse(I.data);_.channel==="error"?(C=this.errorHandler)==null||C.call(this,_.message):_.channel==="app-events"?(console.log("MSG:",_.event.type),_.event.type==="agents-loaded"&&(this.agentsLoaded=!0)):_.channel==="log"?console.log(`MSG: log [${_.message.severity}]`,_.message.message):_.channel==="api-call-trace"?console.log("MSG: api-call-trace",(O=_.trace)==null?void 0:O.operationName,(y=_.trace)==null?void 0:y.method,(k=_.trace)==null?void 0:k.path):_.channel==="conversational-trace"&&console.log("MSG: conversational-trace",(f=_.trace)==null?void 0:f.eventName,(s=_.trace)==null?void 0:s.role,(m=_.trace)==null?void 0:m.medium),(E=this.messageHandler)==null||E.call(this,_)},this.ws.onerror=I=>{var _;console.error("Websocket error:",I),(_=this.ws)==null||_.close(),this.retryConnect()},this.ws.onclose=()=>{console.log("Websocket closed"),this.isOpen=!1,this.retryConnect()},this.ws.onopen=()=>{var I;this.retries=0,this.isOpen=!0,this.retryTimeout&&clearTimeout(this.retryTimeout),(I=this.openHandler)==null||I.call(this),console.log("Websocket connected")}}});Oe(this,"destroy",()=>{var I;this.isDestroyed=!0,(I=this.ws)==null||I.close()});Oe(this,"onOpen",I=>{this.openHandler=I,this.isOpen&&I()});Oe(this,"onClose",I=>{this.closeHandler=I,this.isOpen||I()});Oe(this,"onError",I=>{this.errorHandler=I});Oe(this,"onMessage",I=>{this.messageHandler=I});Oe(this,"sendMessage",I=>{var _;I.channel,(_=this.ws)==null||_.send(JSON.stringify(I))});Oe(this,"isReady",()=>this.isOpen&&this.agentsLoaded);Oe(this,"retryConnect",()=>{var I,_;this.isDestroyed||(!this.isOpen&&this.retries<this.maxRetries?(this.retries++,this.init(),this.retryTimeout=setTimeout(this.retryConnect,this.retryDelay)):((I=this.errorHandler)==null||I.call(this,"WebSocket Error, please reload the browser"),(_=this.closeHandler)==null||_.call(this)))});this.wsUrl=I}}const en=Xt.PUBLIC_WS_HOST??"ws://localhost:8080",ze=new Zt(en);var tn=be('<div class="flex h-full flex-col"><div class="h-full w-full"></div></div>');function nn(V,I){et(I,!0);let _=De(null),C=null,O=[],y=!1,k;lt(async()=>{if(!k)return;_t();const f=await Ot(()=>import("../chunks/BfHUxT3G.js").then(s=>s.e),__vite__mapDeps([0,1,2,3,4]),import.meta.url);y||(xt(f),Ae(_,f.editor.create(k,{value:I.schema??"",language:"typescript",theme:"bosun-dark",lineNumbers:"off",automaticLayout:!0,minimap:{enabled:!1},matchBrackets:"never",bracketPairColorization:{enabled:!1},guides:{highlightActiveBracketPair:!1,bracketPairs:!1,bracketPairsHorizontal:!1},occurrencesHighlight:"off",selectionHighlight:!1,unicodeHighlight:{ambiguousCharacters:!1,nonBasicASCII:!1,invisibleCharacters:!1,includeStrings:!1,includeComments:!1},autoClosingQuotes:"never"}),!0),C=j(_).getModel(),O.push(j(_).onDidChangeModelContent(()=>{if(!j(_))return;const s=j(_).getValue();s!==I.schema&&I.onChange(s)})))}),yt(()=>{y=!0;for(const s of O)try{s.dispose()}catch{}O=[];const f=C;C=null;try{if(j(_)){try{j(_).setModel(null)}catch{}j(_).dispose()}}finally{Ae(_,null)}try{f==null||f.dispose()}catch{}}),We(()=>{if(!j(_))return;const f=I.schema??"";j(_).getValue()!==f&&j(_).setValue(f)}),Ze(V,{get class(){return`overflow-hidden ${I.class??""}`},children:(f,s)=>{var m=tn(),E=ce(m);Tt(E,M=>k=M,()=>k),le(m),se(f,m)}}),tt()}function rn(V,I){return V.languages.registerCompletionItemProvider("markdown",{triggerCharacters:[" ","."],provideCompletionItems:(_,C)=>{const O=_.getValueInRange({startLineNumber:C.lineNumber,startColumn:1,endLineNumber:C.lineNumber,endColumn:C.column}),y=O.match(/\{%\s*(if|elif|for)\s+([^%]*)$/),k=O.match(/\{\{\s*([^}]*)$/);if(y||k){let s="";y?s=y[2].trim():k&&(s=k[1].trim());const{keys:m,lastPartLength:E}=on(I,s);return{suggestions:m.map(K=>({label:K,kind:V.languages.CompletionItemKind.Variable,insertText:K,range:{startLineNumber:C.lineNumber,endLineNumber:C.lineNumber,startColumn:C.column-E,endColumn:C.column}}))}}const f=O.match(/\{%\s*([^%]*)$/);if(f){const s=f[1].trim();return{suggestions:["if","elif","else","endif","for","endfor"].filter(E=>E.startsWith(s)).map((E,M)=>({label:E,kind:V.languages.CompletionItemKind.Keyword,insertText:E,sortText:String(M).padStart(2,"0"),range:{startLineNumber:C.lineNumber,endLineNumber:C.lineNumber,startColumn:C.column-s.length,endColumn:C.column}}))}}return{suggestions:[]}}})}function on(V,I){let _=V,C=[],O=0;if(I==="")C=Object.keys(V??{}),O=0;else if(I.includes(".")){const y=I.split("."),k=y.pop()||"";O=k.length;for(const f of y)if(_&&typeof _=="object"&&f in _)_=_[f];else{_=null;break}_&&typeof _=="object"&&(C=Object.keys(_).filter(f=>f.startsWith(k)))}else O=I.length,C=Object.keys(V??{}).filter(y=>y.startsWith(I));return{keys:C,lastPartLength:O}}var Lt={exports:{}};/*! Browser bundle of nunjucks 3.2.4 */(function(V,I){(function(C,O){V.exports=O()})(typeof self<"u"?self:Yt,function(){return function(_){var C={};function O(y){if(C[y])return C[y].exports;var k=C[y]={i:y,l:!1,exports:{}};return _[y].call(k.exports,k,k.exports,O),k.l=!0,k.exports}return O.m=_,O.c=C,O.d=function(y,k,f){O.o(y,k)||Object.defineProperty(y,k,{configurable:!1,enumerable:!0,get:f})},O.n=function(y){var k=y&&y.__esModule?function(){return y.default}:function(){return y};return O.d(k,"a",k),k},O.o=function(y,k){return Object.prototype.hasOwnProperty.call(y,k)},O.p="",O(O.s=11)}([function(_,m,O){var y=Array.prototype,k=Object.prototype,f={"&":"&",'"':""","'":"'","<":"<",">":">","\\":"\"},s=/[&"'<>\\]/g,m=_.exports={};function E(d,S){return k.hasOwnProperty.call(d,S)}m.hasOwnProp=E;function M(d){return f[d]}function K(d,S,D){if(D.Update||(D=new m.TemplateError(D)),D.Update(d),!S){var U=D;D=new Error(U.message),D.name=U.name}return D}m._prettifyError=K;function R(d,S,D){var U,H;d instanceof Error&&(H=d,d=H.name+": "+H.message),Object.setPrototypeOf?(U=new Error(d),Object.setPrototypeOf(U,R.prototype)):(U=this,Object.defineProperty(U,"message",{enumerable:!1,writable:!0,value:d})),Object.defineProperty(U,"name",{value:"Template render error"}),Error.captureStackTrace&&Error.captureStackTrace(U,this.constructor);var re;if(H){var q=Object.getOwnPropertyDescriptor(H,"stack");re=q&&(q.get||function(){return q.value}),re||(re=function(){return H.stack})}else{var ie=new Error(d).stack;re=function(){return ie}}return Object.defineProperty(U,"stack",{get:function(){return re.call(U)}}),Object.defineProperty(U,"cause",{value:H}),U.lineno=S,U.colno=D,U.firstUpdate=!0,U.Update=function(ee){var oe="("+(ee||"unknown path")+")";return this.firstUpdate&&(this.lineno&&this.colno?oe+=" [Line "+this.lineno+", Column "+this.colno+"]":this.lineno&&(oe+=" [Line "+this.lineno+"]")),oe+=`
|
|
3
|
-
`,this.firstUpdate&&(oe+=" "),this.message=oe+(this.message||""),this.firstUpdate=!1,this},U}Object.setPrototypeOf?Object.setPrototypeOf(R.prototype,Error.prototype):R.prototype=Object.create(Error.prototype,{constructor:{value:R}}),m.TemplateError=R;function b(d){return d.replace(s,M)}m.escape=b;function N(d){return k.toString.call(d)==="[object Function]"}m.isFunction=N;function e(d){return k.toString.call(d)==="[object Array]"}m.isArray=e;function n(d){return k.toString.call(d)==="[object String]"}m.isString=n;function r(d){return k.toString.call(d)==="[object Object]"}m.isObject=r;function h(d){return d?typeof d=="string"?d.split("."):[d]:[]}function c(d){var S=h(d);return function(U){for(var H=U,re=0;re<S.length;re++){var q=S[re];if(E(H,q))H=H[q];else return}return H}}m.getAttrGetter=c;function p(d,S,D){for(var U={},H=N(S)?S:c(S),re=0;re<d.length;re++){var q=d[re],ie=H(q,re);if(ie===void 0&&D===!0)throw new TypeError('groupby: attribute "'+S+'" resolved to undefined');(U[ie]||(U[ie]=[])).push(q)}return U}m.groupBy=p;function t(d){return Array.prototype.slice.call(d)}m.toArray=t;function i(d){var S=[];if(!d)return S;for(var D=d.length,U=t(arguments).slice(1),H=-1;++H<D;)w(U,d[H])===-1&&S.push(d[H]);return S}m.without=i;function l(d,S){for(var D="",U=0;U<S;U++)D+=d;return D}m.repeat=l;function o(d,S,D){if(d!=null){if(y.forEach&&d.forEach===y.forEach)d.forEach(S,D);else if(d.length===+d.length)for(var U=0,H=d.length;U<H;U++)S.call(D,d[U],U,d)}}m.each=o;function a(d,S){var D=[];if(d==null)return D;if(y.map&&d.map===y.map)return d.map(S);for(var U=0;U<d.length;U++)D[D.length]=S(d[U],U);return d.length===+d.length&&(D.length=d.length),D}m.map=a;function v(d,S,D){var U=-1;function H(){U++,U<d.length?S(d[U],U,H,D):D()}H()}m.asyncIter=v;function u(d,S,D){var U=L(d||{}),H=U.length,re=-1;function q(){re++;var ie=U[re];re<H?S(ie,d[ie],re,H,q):D()}q()}m.asyncFor=u;function w(d,S,D){return Array.prototype.indexOf.call(d||[],S,D)}m.indexOf=w;function L(d){var S=[];for(var D in d)E(d,D)&&S.push(D);return S}m.keys=L;function T(d){return L(d).map(function(S){return[S,d[S]]})}m._entries=T;function A(d){return L(d).map(function(S){return d[S]})}m._values=A;function B(d,S){return d=d||{},L(S).forEach(function(D){d[D]=S[D]}),d}m._assign=m.extend=B;function g(d,S){if(e(S)||n(S))return S.indexOf(d)!==-1;if(r(S))return d in S;throw new Error('Cannot use "in" operator to search for "'+d+'" in unexpected types.')}m.inOperator=g},function(_,C,O){function y(n,r){for(var h=0;h<r.length;h++){var c=r[h];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(n,f(c.key),c)}}function k(n,r,h){return r&&y(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n}function f(n){var r=s(n,"string");return typeof r=="symbol"?r:String(r)}function s(n,r){if(typeof n!="object"||n===null)return n;var h=n[Symbol.toPrimitive];if(h!==void 0){var c=h.call(n,r);if(typeof c!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}function m(n,r){n.prototype=Object.create(r.prototype),n.prototype.constructor=n,E(n,r)}function E(n,r){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(c,p){return c.__proto__=p,c},E(n,r)}var M=O(16),K=O(0);function R(n,r){return typeof n!="function"||typeof r!="function"?r:function(){var c=this.parent;this.parent=n;var p=r.apply(this,arguments);return this.parent=c,p}}function b(n,r,h){h=h||{},K.keys(h).forEach(function(p){h[p]=R(n.prototype[p],h[p])});var c=function(p){m(t,p);function t(){return p.apply(this,arguments)||this}return k(t,[{key:"typename",get:function(){return r}}]),t}(n);return K._assign(c.prototype,h),c}var N=function(){function n(){this.init.apply(this,arguments)}var r=n.prototype;return r.init=function(){},n.extend=function(c,p){return typeof c=="object"&&(p=c,c="anonymous"),b(this,c,p)},k(n,[{key:"typename",get:function(){return this.constructor.name}}]),n}(),e=function(n){m(r,n);function r(){var c,p;return p=n.call(this)||this,(c=p).init.apply(c,arguments),p}var h=r.prototype;return h.init=function(){},r.extend=function(p,t){return typeof p=="object"&&(t=p,p="anonymous"),b(this,p,t)},k(r,[{key:"typename",get:function(){return this.constructor.name}}]),r}(M);_.exports={Obj:N,EmitterObj:e}},function(_,C,O){var y=O(0),k=Array.from,f=typeof Symbol=="function"&&Symbol.iterator&&typeof k=="function",s=function(){function a(u,w){this.variables=Object.create(null),this.parent=u,this.topLevel=!1,this.isolateWrites=w}var v=a.prototype;return v.set=function(w,L,T){var A=w.split("."),B=this.variables,g=this;if(T&&(g=this.resolve(A[0],!0))){g.set(w,L);return}for(var d=0;d<A.length-1;d++){var S=A[d];B[S]||(B[S]={}),B=B[S]}B[A[A.length-1]]=L},v.get=function(w){var L=this.variables[w];return L!==void 0?L:null},v.lookup=function(w){var L=this.parent,T=this.variables[w];return T!==void 0?T:L&&L.lookup(w)},v.resolve=function(w,L){var T=L&&this.isolateWrites?void 0:this.parent,A=this.variables[w];return A!==void 0?this:T&&T.resolve(w)},v.push=function(w){return new a(this,w)},v.pop=function(){return this.parent},a}();function m(a,v,u){return function(){for(var L=arguments.length,T=new Array(L),A=0;A<L;A++)T[A]=arguments[A];var B=R(T),g,d=K(T);if(B>a.length)g=T.slice(0,a.length),T.slice(g.length,B).forEach(function(U,H){H<v.length&&(d[v[H]]=U)}),g.push(d);else if(B<a.length){g=T.slice(0,B);for(var S=B;S<a.length;S++){var D=a[S];g.push(d[D]),delete d[D]}g.push(d)}else g=T;return u.apply(this,g)}}function E(a){return a.__keywords=!0,a}function M(a){return a&&Object.prototype.hasOwnProperty.call(a,"__keywords")}function K(a){var v=a.length;if(v){var u=a[v-1];if(M(u))return u}return{}}function R(a){var v=a.length;if(v===0)return 0;var u=a[v-1];return M(u)?v-1:v}function b(a){if(typeof a!="string")return a;this.val=a,this.length=a.length}b.prototype=Object.create(String.prototype,{length:{writable:!0,configurable:!0,value:0}}),b.prototype.valueOf=function(){return this.val},b.prototype.toString=function(){return this.val};function N(a,v){return a instanceof b?new b(v):v.toString()}function e(a){var v=typeof a;return v==="string"?new b(a):v!=="function"?a:function(w){var L=a.apply(this,arguments);return typeof L=="string"?new b(L):L}}function n(a,v){return a=a??"",v&&!(a instanceof b)&&(a=y.escape(a.toString())),a}function r(a,v,u){if(a==null)throw new y.TemplateError("attempted to output null or undefined value",v+1,u+1);return a}function h(a,v){if(a!=null)return typeof a[v]=="function"?function(){for(var u=arguments.length,w=new Array(u),L=0;L<u;L++)w[L]=arguments[L];return a[v].apply(a,w)}:a[v]}function c(a,v,u,w){if(a){if(typeof a!="function")throw new Error("Unable to call `"+v+"`, which is not a function")}else throw new Error("Unable to call `"+v+"`, which is undefined or falsey");return a.apply(u,w)}function p(a,v,u){var w=v.lookup(u);return w!==void 0?w:a.lookup(u)}function t(a,v,u){return a.lineno?a:new y.TemplateError(a,v,u)}function i(a,v,u,w){if(y.isArray(a)){var L=a.length;y.asyncIter(a,function(A,B,g){switch(v){case 1:u(A,B,L,g);break;case 2:u(A[0],A[1],B,L,g);break;case 3:u(A[0],A[1],A[2],B,L,g);break;default:A.push(B,L,g),u.apply(this,A)}},w)}else y.asyncFor(a,function(A,B,g,d,S){u(A,B,g,d,S)},w)}function l(a,v,u,w){var L=0,T,A;function B(H,re){L++,A[H]=re,L===T&&w(null,A.join(""))}if(y.isArray(a))if(T=a.length,A=new Array(T),T===0)w(null,"");else for(var g=0;g<a.length;g++){var d=a[g];switch(v){case 1:u(d,g,T,B);break;case 2:u(d[0],d[1],g,T,B);break;case 3:u(d[0],d[1],d[2],g,T,B);break;default:d.push(g,T,B),u.apply(this,d)}}else{var S=y.keys(a||{});if(T=S.length,A=new Array(T),T===0)w(null,"");else for(var D=0;D<S.length;D++){var U=S[D];u(U,a[U],D,T,B)}}}function o(a){return typeof a!="object"||a===null||y.isArray(a)?a:f&&Symbol.iterator in a?k(a):a}_.exports={Frame:s,makeMacro:m,makeKeywordArgs:E,numArgs:R,suppressValue:n,ensureDefined:r,memberLookup:h,contextOrFrameLookup:p,callWrap:c,handleError:t,isArray:y.isArray,keys:y.keys,SafeString:b,copySafeness:N,markSafe:e,asyncEach:i,asyncAll:l,inOperator:y.inOperator,fromIterator:o}},function(_,C,O){function y(Y,J){for(var ve=0;ve<J.length;ve++){var fe=J[ve];fe.enumerable=fe.enumerable||!1,fe.configurable=!0,"value"in fe&&(fe.writable=!0),Object.defineProperty(Y,f(fe.key),fe)}}function k(Y,J,ve){return J&&y(Y.prototype,J),Object.defineProperty(Y,"prototype",{writable:!1}),Y}function f(Y){var J=s(Y,"string");return typeof J=="symbol"?J:String(J)}function s(Y,J){if(typeof Y!="object"||Y===null)return Y;var ve=Y[Symbol.toPrimitive];if(ve!==void 0){var fe=ve.call(Y,J);if(typeof fe!="object")return fe;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Y)}function m(Y,J){Y.prototype=Object.create(J.prototype),Y.prototype.constructor=Y,E(Y,J)}function E(Y,J){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(fe,me){return fe.__proto__=me,fe},E(Y,J)}var M=O(1),K=M.Obj;function R(Y,J,ve){Y instanceof J&&ve.push(Y),Y instanceof b&&Y.findAll(J,ve)}var b=function(Y){m(J,Y);function J(){return Y.apply(this,arguments)||this}var ve=J.prototype;return ve.init=function(me,pe){for(var ke=arguments,Ne=this,Be=arguments.length,Ge=new Array(Be>2?Be-2:0),Ie=2;Ie<Be;Ie++)Ge[Ie-2]=arguments[Ie];this.lineno=me,this.colno=pe,this.fields.forEach(function(Qe,qe){var Ye=ke[qe+2];Ye===void 0&&(Ye=null),Ne[Qe]=Ye})},ve.findAll=function(me,pe){var ke=this;return pe=pe||[],this instanceof e?this.children.forEach(function(Ne){return R(Ne,me,pe)}):this.fields.forEach(function(Ne){return R(ke[Ne],me,pe)}),pe},ve.iterFields=function(me){var pe=this;this.fields.forEach(function(ke){me(pe[ke],ke)})},J}(K),N=function(Y){m(J,Y);function J(){return Y.apply(this,arguments)||this}return k(J,[{key:"typename",get:function(){return"Value"}},{key:"fields",get:function(){return["value"]}}]),J}(b),e=function(Y){m(J,Y);function J(){return Y.apply(this,arguments)||this}var ve=J.prototype;return ve.init=function(me,pe,ke){Y.prototype.init.call(this,me,pe,ke||[])},ve.addChild=function(me){this.children.push(me)},k(J,[{key:"typename",get:function(){return"NodeList"}},{key:"fields",get:function(){return["children"]}}]),J}(b),n=e.extend("Root"),r=N.extend("Literal"),h=N.extend("Symbol"),c=e.extend("Group"),p=e.extend("Array"),t=b.extend("Pair",{fields:["key","value"]}),i=e.extend("Dict"),l=b.extend("LookupVal",{fields:["target","val"]}),o=b.extend("If",{fields:["cond","body","else_"]}),a=o.extend("IfAsync"),v=b.extend("InlineIf",{fields:["cond","body","else_"]}),u=b.extend("For",{fields:["arr","name","body","else_"]}),w=u.extend("AsyncEach"),L=u.extend("AsyncAll"),T=b.extend("Macro",{fields:["name","args","body"]}),A=T.extend("Caller"),B=b.extend("Import",{fields:["template","target","withContext"]}),g=function(Y){m(J,Y);function J(){return Y.apply(this,arguments)||this}var ve=J.prototype;return ve.init=function(me,pe,ke,Ne,Be){Y.prototype.init.call(this,me,pe,ke,Ne||new e,Be)},k(J,[{key:"typename",get:function(){return"FromImport"}},{key:"fields",get:function(){return["template","names","withContext"]}}]),J}(b),d=b.extend("FunCall",{fields:["name","args"]}),S=d.extend("Filter"),D=S.extend("FilterAsync",{fields:["name","args","symbol"]}),U=i.extend("KeywordArgs"),H=b.extend("Block",{fields:["name","body"]}),re=b.extend("Super",{fields:["blockName","symbol"]}),q=b.extend("TemplateRef",{fields:["template"]}),ie=q.extend("Extends"),ye=b.extend("Include",{fields:["template","ignoreMissing"]}),ee=b.extend("Set",{fields:["targets","value"]}),oe=b.extend("Switch",{fields:["expr","cases","default"]}),G=b.extend("Case",{fields:["cond","body"]}),Q=e.extend("Output"),z=b.extend("Capture",{fields:["body"]}),ue=r.extend("TemplateData"),Ee=b.extend("UnaryOp",{fields:["target"]}),_e=b.extend("BinOp",{fields:["left","right"]}),Te=_e.extend("In"),x=_e.extend("Is"),F=_e.extend("Or"),$=_e.extend("And"),W=Ee.extend("Not"),Z=_e.extend("Add"),te=_e.extend("Concat"),he=_e.extend("Sub"),ae=_e.extend("Mul"),xe=_e.extend("Div"),Pe=_e.extend("FloorDiv"),Re=_e.extend("Mod"),Ue=_e.extend("Pow"),it=Ee.extend("Neg"),ot=Ee.extend("Pos"),P=b.extend("Compare",{fields:["expr","ops"]}),ne=b.extend("CompareOperand",{fields:["expr","type"]}),X=b.extend("CallExtension",{init:function(J,ve,fe,me){this.parent(),this.extName=J.__name||J,this.prop=ve,this.args=fe||new e,this.contentArgs=me||[],this.autoescape=J.autoescape},fields:["extName","prop","args","contentArgs"]}),de=X.extend("CallExtensionAsync");function ge(Y,J,ve){var fe=Y.split(`
|
|
4
|
-
`);fe.forEach(function(me,pe){me&&(ve&&pe>0||!ve)&&process.stdout.write(" ".repeat(J));var ke=pe===fe.length-1?"":`
|
|
5
|
-
`;process.stdout.write(""+me+ke)})}function Le(Y,J){if(J=J||0,ge(Y.typename+": ",J),Y instanceof e)ge(`
|
|
6
|
-
`),Y.children.forEach(function(me){Le(me,J+2)});else if(Y instanceof X)ge(Y.extName+"."+Y.prop+`
|
|
7
|
-
`),Y.args&&Le(Y.args,J+2),Y.contentArgs&&Y.contentArgs.forEach(function(me){Le(me,J+2)});else{var ve=[],fe=null;Y.iterFields(function(me,pe){me instanceof b?ve.push([pe,me]):(fe=fe||{},fe[pe]=me)}),fe?ge(JSON.stringify(fe,null,2)+`
|
|
8
|
-
`,null,!0):ge(`
|
|
9
|
-
`),ve.forEach(function(me){var pe=me[0],ke=me[1];ge("["+pe+"] =>",J+2),Le(ke,J+4)})}}_.exports={Node:b,Root:n,NodeList:e,Value:N,Literal:r,Symbol:h,Group:c,Array:p,Pair:t,Dict:i,Output:Q,Capture:z,TemplateData:ue,If:o,IfAsync:a,InlineIf:v,For:u,AsyncEach:w,AsyncAll:L,Macro:T,Caller:A,Import:B,FromImport:g,FunCall:d,Filter:S,FilterAsync:D,KeywordArgs:U,Block:H,Super:re,Extends:ie,Include:ye,Set:ee,Switch:oe,Case:G,LookupVal:l,BinOp:_e,In:Te,Is:x,Or:F,And:$,Not:W,Add:Z,Concat:te,Sub:he,Mul:ae,Div:xe,FloorDiv:Pe,Mod:Re,Pow:Ue,Neg:it,Pos:ot,Compare:P,CompareOperand:ne,CallExtension:X,CallExtensionAsync:de,printNodes:Le}},function(_,C){},function(_,C,O){function y(r,h){r.prototype=Object.create(h.prototype),r.prototype.constructor=r,k(r,h)}function k(r,h){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,t){return p.__proto__=t,p},k(r,h)}var f=O(8),s=O(17),m=O(3),E=O(0),M=E.TemplateError,K=O(2),R=K.Frame,b=O(1),N=b.Obj,e={"==":"==","===":"===","!=":"!=","!==":"!==","<":"<",">":">","<=":"<=",">=":">="},n=function(r){y(h,r);function h(){return r.apply(this,arguments)||this}var c=h.prototype;return c.init=function(t,i){this.templateName=t,this.codebuf=[],this.lastId=0,this.buffer=null,this.bufferStack=[],this._scopeClosers="",this.inBlock=!1,this.throwOnUndefined=i},c.fail=function(t,i,l){throw i!==void 0&&(i+=1),l!==void 0&&(l+=1),new M(t,i,l)},c._pushBuffer=function(){var t=this._tmpid();return this.bufferStack.push(this.buffer),this.buffer=t,this._emit("var "+this.buffer+' = "";'),t},c._popBuffer=function(){this.buffer=this.bufferStack.pop()},c._emit=function(t){this.codebuf.push(t)},c._emitLine=function(t){this._emit(t+`
|
|
10
|
-
`)},c._emitLines=function(){for(var t=this,i=arguments.length,l=new Array(i),o=0;o<i;o++)l[o]=arguments[o];l.forEach(function(a){return t._emitLine(a)})},c._emitFuncBegin=function(t,i){this.buffer="output",this._scopeClosers="",this._emitLine("function "+i+"(env, context, frame, runtime, cb) {"),this._emitLine("var lineno = "+t.lineno+";"),this._emitLine("var colno = "+t.colno+";"),this._emitLine("var "+this.buffer+' = "";'),this._emitLine("try {")},c._emitFuncEnd=function(t){t||this._emitLine("cb(null, "+this.buffer+");"),this._closeScopeLevels(),this._emitLine("} catch (e) {"),this._emitLine(" cb(runtime.handleError(e, lineno, colno));"),this._emitLine("}"),this._emitLine("}"),this.buffer=null},c._addScopeLevel=function(){this._scopeClosers+="})"},c._closeScopeLevels=function(){this._emitLine(this._scopeClosers+";"),this._scopeClosers=""},c._withScopedSyntax=function(t){var i=this._scopeClosers;this._scopeClosers="",t.call(this),this._closeScopeLevels(),this._scopeClosers=i},c._makeCallback=function(t){var i=this._tmpid();return"function("+i+(t?","+t:"")+`) {
|
|
11
|
-
if(`+i+") { cb("+i+"); return; }"},c._tmpid=function(){return this.lastId++,"t_"+this.lastId},c._templateName=function(){return this.templateName==null?"undefined":JSON.stringify(this.templateName)},c._compileChildren=function(t,i){var l=this;t.children.forEach(function(o){l.compile(o,i)})},c._compileAggregate=function(t,i,l,o){var a=this;l&&this._emit(l),t.children.forEach(function(v,u){u>0&&a._emit(","),a.compile(v,i)}),o&&this._emit(o)},c._compileExpression=function(t,i){this.assertType(t,m.Literal,m.Symbol,m.Group,m.Array,m.Dict,m.FunCall,m.Caller,m.Filter,m.LookupVal,m.Compare,m.InlineIf,m.In,m.Is,m.And,m.Or,m.Not,m.Add,m.Concat,m.Sub,m.Mul,m.Div,m.FloorDiv,m.Mod,m.Pow,m.Neg,m.Pos,m.Compare,m.NodeList),this.compile(t,i)},c.assertType=function(t){for(var i=arguments.length,l=new Array(i>1?i-1:0),o=1;o<i;o++)l[o-1]=arguments[o];l.some(function(a){return t instanceof a})||this.fail("assertType: invalid type: "+t.typename,t.lineno,t.colno)},c.compileCallExtension=function(t,i,l){var o=this,a=t.args,v=t.contentArgs,u=typeof t.autoescape=="boolean"?t.autoescape:!0;if(l||this._emit(this.buffer+" += runtime.suppressValue("),this._emit('env.getExtension("'+t.extName+'")["'+t.prop+'"]('),this._emit("context"),(a||v)&&this._emit(","),a&&(a instanceof m.NodeList||this.fail("compileCallExtension: arguments must be a NodeList, use `parser.parseSignature`"),a.children.forEach(function(L,T){o._compileExpression(L,i),(T!==a.children.length-1||v.length)&&o._emit(",")})),v.length&&v.forEach(function(L,T){if(T>0&&o._emit(","),L){o._emitLine("function(cb) {"),o._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}");var A=o._pushBuffer();o._withScopedSyntax(function(){o.compile(L,i),o._emitLine("cb(null, "+A+");")}),o._popBuffer(),o._emitLine("return "+A+";"),o._emitLine("}")}else o._emit("null")}),l){var w=this._tmpid();this._emitLine(", "+this._makeCallback(w)),this._emitLine(this.buffer+" += runtime.suppressValue("+w+", "+u+" && env.opts.autoescape);"),this._addScopeLevel()}else this._emit(")"),this._emit(", "+u+` && env.opts.autoescape);
|
|
12
|
-
`)},c.compileCallExtensionAsync=function(t,i){this.compileCallExtension(t,i,!0)},c.compileNodeList=function(t,i){this._compileChildren(t,i)},c.compileLiteral=function(t){if(typeof t.value=="string"){var i=t.value.replace(/\\/g,"\\\\");i=i.replace(/"/g,'\\"'),i=i.replace(/\n/g,"\\n"),i=i.replace(/\r/g,"\\r"),i=i.replace(/\t/g,"\\t"),i=i.replace(/\u2028/g,"\\u2028"),this._emit('"'+i+'"')}else t.value===null?this._emit("null"):this._emit(t.value.toString())},c.compileSymbol=function(t,i){var l=t.value,o=i.lookup(l);o?this._emit(o):this._emit('runtime.contextOrFrameLookup(context, frame, "'+l+'")')},c.compileGroup=function(t,i){this._compileAggregate(t,i,"(",")")},c.compileArray=function(t,i){this._compileAggregate(t,i,"[","]")},c.compileDict=function(t,i){this._compileAggregate(t,i,"{","}")},c.compilePair=function(t,i){var l=t.key,o=t.value;l instanceof m.Symbol?l=new m.Literal(l.lineno,l.colno,l.value):l instanceof m.Literal&&typeof l.value=="string"||this.fail("compilePair: Dict keys must be strings or names",l.lineno,l.colno),this.compile(l,i),this._emit(": "),this._compileExpression(o,i)},c.compileInlineIf=function(t,i){this._emit("("),this.compile(t.cond,i),this._emit("?"),this.compile(t.body,i),this._emit(":"),t.else_!==null?this.compile(t.else_,i):this._emit('""'),this._emit(")")},c.compileIn=function(t,i){this._emit("runtime.inOperator("),this.compile(t.left,i),this._emit(","),this.compile(t.right,i),this._emit(")")},c.compileIs=function(t,i){var l=t.right.name?t.right.name.value:t.right.value;this._emit('env.getTest("'+l+'").call(context, '),this.compile(t.left,i),t.right.args&&(this._emit(","),this.compile(t.right.args,i)),this._emit(") === true")},c._binOpEmitter=function(t,i,l){this.compile(t.left,i),this._emit(l),this.compile(t.right,i)},c.compileOr=function(t,i){return this._binOpEmitter(t,i," || ")},c.compileAnd=function(t,i){return this._binOpEmitter(t,i," && ")},c.compileAdd=function(t,i){return this._binOpEmitter(t,i," + ")},c.compileConcat=function(t,i){return this._binOpEmitter(t,i,' + "" + ')},c.compileSub=function(t,i){return this._binOpEmitter(t,i," - ")},c.compileMul=function(t,i){return this._binOpEmitter(t,i," * ")},c.compileDiv=function(t,i){return this._binOpEmitter(t,i," / ")},c.compileMod=function(t,i){return this._binOpEmitter(t,i," % ")},c.compileNot=function(t,i){this._emit("!"),this.compile(t.target,i)},c.compileFloorDiv=function(t,i){this._emit("Math.floor("),this.compile(t.left,i),this._emit(" / "),this.compile(t.right,i),this._emit(")")},c.compilePow=function(t,i){this._emit("Math.pow("),this.compile(t.left,i),this._emit(", "),this.compile(t.right,i),this._emit(")")},c.compileNeg=function(t,i){this._emit("-"),this.compile(t.target,i)},c.compilePos=function(t,i){this._emit("+"),this.compile(t.target,i)},c.compileCompare=function(t,i){var l=this;this.compile(t.expr,i),t.ops.forEach(function(o){l._emit(" "+e[o.type]+" "),l.compile(o.expr,i)})},c.compileLookupVal=function(t,i){this._emit("runtime.memberLookup(("),this._compileExpression(t.target,i),this._emit("),"),this._compileExpression(t.val,i),this._emit(")")},c._getNodeName=function(t){switch(t.typename){case"Symbol":return t.value;case"FunCall":return"the return value of ("+this._getNodeName(t.name)+")";case"LookupVal":return this._getNodeName(t.target)+'["'+this._getNodeName(t.val)+'"]';case"Literal":return t.value.toString();default:return"--expression--"}},c.compileFunCall=function(t,i){this._emit("(lineno = "+t.lineno+", colno = "+t.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(t.name,i),this._emit(', "'+this._getNodeName(t.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(t.args,i,"[","])"),this._emit(")")},c.compileFilter=function(t,i){var l=t.name;this.assertType(l,m.Symbol),this._emit('env.getFilter("'+l.value+'").call(context, '),this._compileAggregate(t.args,i),this._emit(")")},c.compileFilterAsync=function(t,i){var l=t.name,o=t.symbol.value;this.assertType(l,m.Symbol),i.set(o,o),this._emit('env.getFilter("'+l.value+'").call(context, '),this._compileAggregate(t.args,i),this._emitLine(", "+this._makeCallback(o)),this._addScopeLevel()},c.compileKeywordArgs=function(t,i){this._emit("runtime.makeKeywordArgs("),this.compileDict(t,i),this._emit(")")},c.compileSet=function(t,i){var l=this,o=[];t.targets.forEach(function(a){var v=a.value,u=i.lookup(v);u==null&&(u=l._tmpid(),l._emitLine("var "+u+";")),o.push(u)}),t.value?(this._emit(o.join(" = ")+" = "),this._compileExpression(t.value,i),this._emitLine(";")):(this._emit(o.join(" = ")+" = "),this.compile(t.body,i),this._emitLine(";")),t.targets.forEach(function(a,v){var u=o[v],w=a.value;l._emitLine('frame.set("'+w+'", '+u+", true);"),l._emitLine("if(frame.topLevel) {"),l._emitLine('context.setVariable("'+w+'", '+u+");"),l._emitLine("}"),w.charAt(0)!=="_"&&(l._emitLine("if(frame.topLevel) {"),l._emitLine('context.addExport("'+w+'", '+u+");"),l._emitLine("}"))})},c.compileSwitch=function(t,i){var l=this;this._emit("switch ("),this.compile(t.expr,i),this._emit(") {"),t.cases.forEach(function(o,a){l._emit("case "),l.compile(o.cond,i),l._emit(": "),l.compile(o.body,i),o.body.children.length&&l._emitLine("break;")}),t.default&&(this._emit("default:"),this.compile(t.default,i)),this._emit("}")},c.compileIf=function(t,i,l){var o=this;this._emit("if("),this._compileExpression(t.cond,i),this._emitLine(") {"),this._withScopedSyntax(function(){o.compile(t.body,i),l&&o._emit("cb()")}),t.else_?(this._emitLine(`}
|
|
13
|
-
else {`),this._withScopedSyntax(function(){o.compile(t.else_,i),l&&o._emit("cb()")})):l&&(this._emitLine(`}
|
|
14
|
-
else {`),this._emit("cb()")),this._emitLine("}")},c.compileIfAsync=function(t,i){this._emit("(function(cb) {"),this.compileIf(t,i,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},c._emitLoopBindings=function(t,i,l,o){var a=this,v=[{name:"index",val:l+" + 1"},{name:"index0",val:l},{name:"revindex",val:o+" - "+l},{name:"revindex0",val:o+" - "+l+" - 1"},{name:"first",val:l+" === 0"},{name:"last",val:l+" === "+o+" - 1"},{name:"length",val:o}];v.forEach(function(u){a._emitLine('frame.set("loop.'+u.name+'", '+u.val+");")})},c.compileFor=function(t,i){var l=this,o=this._tmpid(),a=this._tmpid(),v=this._tmpid();if(i=i.push(),this._emitLine("frame = frame.push();"),this._emit("var "+v+" = "),this._compileExpression(t.arr,i),this._emitLine(";"),this._emit("if("+v+") {"),this._emitLine(v+" = runtime.fromIterator("+v+");"),t.name instanceof m.Array){this._emitLine("var "+o+";"),this._emitLine("if(runtime.isArray("+v+")) {"),this._emitLine("var "+a+" = "+v+".length;"),this._emitLine("for("+o+"=0; "+o+" < "+v+".length; "+o+"++) {"),t.name.children.forEach(function(g,d){var S=l._tmpid();l._emitLine("var "+S+" = "+v+"["+o+"]["+d+"];"),l._emitLine('frame.set("'+g+'", '+v+"["+o+"]["+d+"]);"),i.set(t.name.children[d].value,S)}),this._emitLoopBindings(t,v,o,a),this._withScopedSyntax(function(){l.compile(t.body,i)}),this._emitLine("}"),this._emitLine("} else {");var u=t.name.children,w=u[0],L=u[1],T=this._tmpid(),A=this._tmpid();i.set(w.value,T),i.set(L.value,A),this._emitLine(o+" = -1;"),this._emitLine("var "+a+" = runtime.keys("+v+").length;"),this._emitLine("for(var "+T+" in "+v+") {"),this._emitLine(o+"++;"),this._emitLine("var "+A+" = "+v+"["+T+"];"),this._emitLine('frame.set("'+w.value+'", '+T+");"),this._emitLine('frame.set("'+L.value+'", '+A+");"),this._emitLoopBindings(t,v,o,a),this._withScopedSyntax(function(){l.compile(t.body,i)}),this._emitLine("}"),this._emitLine("}")}else{var B=this._tmpid();i.set(t.name.value,B),this._emitLine("var "+a+" = "+v+".length;"),this._emitLine("for(var "+o+"=0; "+o+" < "+v+".length; "+o+"++) {"),this._emitLine("var "+B+" = "+v+"["+o+"];"),this._emitLine('frame.set("'+t.name.value+'", '+B+");"),this._emitLoopBindings(t,v,o,a),this._withScopedSyntax(function(){l.compile(t.body,i)}),this._emitLine("}")}this._emitLine("}"),t.else_&&(this._emitLine("if (!"+a+") {"),this.compile(t.else_,i),this._emitLine("}")),this._emitLine("frame = frame.pop();")},c._compileAsyncLoop=function(t,i,l){var o=this,a=this._tmpid(),v=this._tmpid(),u=this._tmpid(),w=l?"asyncAll":"asyncEach";if(i=i.push(),this._emitLine("frame = frame.push();"),this._emit("var "+u+" = runtime.fromIterator("),this._compileExpression(t.arr,i),this._emitLine(");"),t.name instanceof m.Array){var L=t.name.children.length;this._emit("runtime."+w+"("+u+", "+L+", function("),t.name.children.forEach(function(B){o._emit(B.value+",")}),this._emit(a+","+v+",next) {"),t.name.children.forEach(function(B){var g=B.value;i.set(g,g),o._emitLine('frame.set("'+g+'", '+g+");")})}else{var T=t.name.value;this._emitLine("runtime."+w+"("+u+", 1, function("+T+", "+a+", "+v+",next) {"),this._emitLine('frame.set("'+T+'", '+T+");"),i.set(T,T)}this._emitLoopBindings(t,u,a,v),this._withScopedSyntax(function(){var B;l&&(B=o._pushBuffer()),o.compile(t.body,i),o._emitLine("next("+a+(B?","+B:"")+");"),l&&o._popBuffer()});var A=this._tmpid();this._emitLine("}, "+this._makeCallback(A)),this._addScopeLevel(),l&&this._emitLine(this.buffer+" += "+A+";"),t.else_&&(this._emitLine("if (!"+u+".length) {"),this.compile(t.else_,i),this._emitLine("}")),this._emitLine("frame = frame.pop();")},c.compileAsyncEach=function(t,i){this._compileAsyncLoop(t,i)},c.compileAsyncAll=function(t,i){this._compileAsyncLoop(t,i,!0)},c._compileMacro=function(t,i){var l=this,o=[],a=null,v="macro_"+this._tmpid(),u=i!==void 0;t.args.children.forEach(function(g,d){d===t.args.children.length-1&&g instanceof m.Dict?a=g:(l.assertType(g,m.Symbol),o.push(g))});var w=[].concat(o.map(function(g){return"l_"+g.value}),["kwargs"]),L=o.map(function(g){return'"'+g.value+'"'}),T=(a&&a.children||[]).map(function(g){return'"'+g.key.value+'"'}),A;u?A=i.push(!0):A=new R,this._emitLines("var "+v+" = runtime.makeMacro(","["+L.join(", ")+"], ","["+T.join(", ")+"], ","function ("+w.join(", ")+") {","var callerFrame = frame;","frame = "+(u?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),o.forEach(function(g){l._emitLine('frame.set("'+g.value+'", l_'+g.value+");"),A.set(g.value,"l_"+g.value)}),a&&a.children.forEach(function(g){var d=g.key.value;l._emit('frame.set("'+d+'", '),l._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+d+'")'),l._emit(' ? kwargs["'+d+'"] : '),l._compileExpression(g.value,A),l._emit(");")});var B=this._pushBuffer();return this._withScopedSyntax(function(){l.compile(t.body,A)}),this._emitLine("frame = "+(u?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+B+");"),this._emitLine("});"),this._popBuffer(),v},c.compileMacro=function(t,i){var l=this._compileMacro(t),o=t.name.value;i.set(o,l),i.parent?this._emitLine('frame.set("'+o+'", '+l+");"):(t.name.value.charAt(0)!=="_"&&this._emitLine('context.addExport("'+o+'");'),this._emitLine('context.setVariable("'+o+'", '+l+");"))},c.compileCaller=function(t,i){this._emit("(function (){");var l=this._compileMacro(t,i);this._emit("return "+l+";})()")},c._compileGetTemplate=function(t,i,l,o){var a=this._tmpid(),v=this._templateName(),u=this._makeCallback(a),w=l?"true":"false",L=o?"true":"false";return this._emit("env.getTemplate("),this._compileExpression(t.template,i),this._emitLine(", "+w+", "+v+", "+L+", "+u),a},c.compileImport=function(t,i){var l=t.target.value,o=this._compileGetTemplate(t,i,!1,!1);this._addScopeLevel(),this._emitLine(o+".getExported("+(t.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(o)),this._addScopeLevel(),i.set(l,o),i.parent?this._emitLine('frame.set("'+l+'", '+o+");"):this._emitLine('context.setVariable("'+l+'", '+o+");")},c.compileFromImport=function(t,i){var l=this,o=this._compileGetTemplate(t,i,!1,!1);this._addScopeLevel(),this._emitLine(o+".getExported("+(t.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(o)),this._addScopeLevel(),t.names.children.forEach(function(a){var v,u,w=l._tmpid();a instanceof m.Pair?(v=a.key.value,u=a.value.value):(v=a.value,u=v),l._emitLine("if(Object.prototype.hasOwnProperty.call("+o+', "'+v+'")) {'),l._emitLine("var "+w+" = "+o+"."+v+";"),l._emitLine("} else {"),l._emitLine(`cb(new Error("cannot import '`+v+`'")); return;`),l._emitLine("}"),i.set(u,w),i.parent?l._emitLine('frame.set("'+u+'", '+w+");"):l._emitLine('context.setVariable("'+u+'", '+w+");")})},c.compileBlock=function(t){var i=this._tmpid();this.inBlock||this._emit('(parentTemplate ? function(e, c, f, r, cb) { cb(""); } : '),this._emit('context.getBlock("'+t.name.value+'")'),this.inBlock||this._emit(")"),this._emitLine("(env, context, frame, runtime, "+this._makeCallback(i)),this._emitLine(this.buffer+" += "+i+";"),this._addScopeLevel()},c.compileSuper=function(t,i){var l=t.blockName.value,o=t.symbol.value,a=this._makeCallback(o);this._emitLine('context.getSuper(env, "'+l+'", b_'+l+", frame, runtime, "+a),this._emitLine(o+" = runtime.markSafe("+o+");"),this._addScopeLevel(),i.set(o,o)},c.compileExtends=function(t,i){var l=this._tmpid(),o=this._compileGetTemplate(t,i,!0,!1);this._emitLine("parentTemplate = "+o),this._emitLine("for(var "+l+" in parentTemplate.blocks) {"),this._emitLine("context.addBlock("+l+", parentTemplate.blocks["+l+"]);"),this._emitLine("}"),this._addScopeLevel()},c.compileInclude=function(t,i){this._emitLine("var tasks = [];"),this._emitLine("tasks.push("),this._emitLine("function(callback) {");var l=this._compileGetTemplate(t,i,!1,t.ignoreMissing);this._emitLine("callback(null,"+l+");});"),this._emitLine("});");var o=this._tmpid();this._emitLine("tasks.push("),this._emitLine("function(template, callback){"),this._emitLine("template.render(context.getVariables(), frame, "+this._makeCallback(o)),this._emitLine("callback(null,"+o+");});"),this._emitLine("});"),this._emitLine("tasks.push("),this._emitLine("function(result, callback){"),this._emitLine(this.buffer+" += result;"),this._emitLine("callback(null);"),this._emitLine("});"),this._emitLine("env.waterfall(tasks, function(){"),this._addScopeLevel()},c.compileTemplateData=function(t,i){this.compileLiteral(t,i)},c.compileCapture=function(t,i){var l=this,o=this.buffer;this.buffer="output",this._emitLine("(function() {"),this._emitLine('var output = "";'),this._withScopedSyntax(function(){l.compile(t.body,i)}),this._emitLine("return output;"),this._emitLine("})()"),this.buffer=o},c.compileOutput=function(t,i){var l=this,o=t.children;o.forEach(function(a){a instanceof m.TemplateData?a.value&&(l._emit(l.buffer+" += "),l.compileLiteral(a,i),l._emitLine(";")):(l._emit(l.buffer+" += runtime.suppressValue("),l.throwOnUndefined&&l._emit("runtime.ensureDefined("),l.compile(a,i),l.throwOnUndefined&&l._emit(","+t.lineno+","+t.colno+")"),l._emit(`, env.opts.autoescape);
|
|
15
|
-
`))})},c.compileRoot=function(t,i){var l=this;i&&this.fail("compileRoot: root node can't have frame"),i=new R,this._emitFuncBegin(t,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(t,i),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0;var o=[],a=t.findAll(m.Block);a.forEach(function(v,u){var w=v.name.value;if(o.indexOf(w)!==-1)throw new Error('Block "'+w+'" defined more than once.');o.push(w),l._emitFuncBegin(v,"b_"+w);var L=new R;l._emitLine("var frame = frame.push(true);"),l.compile(v.body,L),l._emitFuncEnd()}),this._emitLine("return {"),a.forEach(function(v,u){var w="b_"+v.name.value;l._emitLine(w+": "+w+",")}),this._emitLine(`root: root
|
|
16
|
-
};`)},c.compile=function(t,i){var l=this["compile"+t.typename];l?l.call(this,t,i):this.fail("compile: Cannot compile node: "+t.typename,t.lineno,t.colno)},c.getCode=function(){return this.codebuf.join("")},h}(N);_.exports={compile:function(h,c,p,t,i){i===void 0&&(i={});var l=new n(t,i.throwOnUndefined),o=(p||[]).map(function(v){return v.preprocess}).filter(function(v){return!!v}),a=o.reduce(function(v,u){return u(v)},h);return l.compile(s.transform(f.parse(a,p,i),c,t)),l.getCode()},Compiler:n}},function(_,C,O){function y(E,M){E.prototype=Object.create(M.prototype),E.prototype.constructor=E,k(E,M)}function k(E,M){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(R,b){return R.__proto__=b,R},k(E,M)}var f=O(4),s=O(1),m=s.EmitterObj;_.exports=function(E){y(M,E);function M(){return E.apply(this,arguments)||this}var K=M.prototype;return K.resolve=function(b,N){return f.resolve(f.dirname(b),N)},K.isRelative=function(b){return b.indexOf("./")===0||b.indexOf("../")===0},M}(m)},function(_,C,O){function y(L,T){L.prototype=Object.create(T.prototype),L.prototype.constructor=L,k(L,T)}function k(L,T){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(B,g){return B.__proto__=g,B},k(L,T)}var f=O(12),s=O(15),m=O(0),E=O(5),M=O(18),K=O(10),R=K.FileSystemLoader,b=K.WebLoader,N=K.PrecompiledLoader,e=O(20),n=O(21),r=O(1),h=r.Obj,c=r.EmitterObj,p=O(2),t=p.handleError,i=p.Frame,l=O(22);function o(L,T,A){f(function(){L(T,A)})}var a={type:"code",obj:{root:function(T,A,B,g,d){try{d(null,"")}catch(S){d(t(S,null,null))}}}},v=function(L){y(T,L);function T(){return L.apply(this,arguments)||this}var A=T.prototype;return A.init=function(g,d){var S=this;d=this.opts=d||{},this.opts.dev=!!d.dev,this.opts.autoescape=d.autoescape!=null?d.autoescape:!0,this.opts.throwOnUndefined=!!d.throwOnUndefined,this.opts.trimBlocks=!!d.trimBlocks,this.opts.lstripBlocks=!!d.lstripBlocks,this.loaders=[],g?this.loaders=m.isArray(g)?g:[g]:R?this.loaders=[new R("views")]:b&&(this.loaders=[new b("/views")]),typeof window<"u"&&window.nunjucksPrecompiled&&this.loaders.unshift(new N(window.nunjucksPrecompiled)),this._initLoaders(),this.globals=n(),this.filters={},this.tests={},this.asyncFilters=[],this.extensions={},this.extensionsList=[],m._entries(M).forEach(function(D){var U=D[0],H=D[1];return S.addFilter(U,H)}),m._entries(e).forEach(function(D){var U=D[0],H=D[1];return S.addTest(U,H)})},A._initLoaders=function(){var g=this;this.loaders.forEach(function(d){d.cache={},typeof d.on=="function"&&(d.on("update",function(S,D){d.cache[S]=null,g.emit("update",S,D,d)}),d.on("load",function(S,D){g.emit("load",S,D,d)}))})},A.invalidateCache=function(){this.loaders.forEach(function(g){g.cache={}})},A.addExtension=function(g,d){return d.__name=g,this.extensions[g]=d,this.extensionsList.push(d),this},A.removeExtension=function(g){var d=this.getExtension(g);d&&(this.extensionsList=m.without(this.extensionsList,d),delete this.extensions[g])},A.getExtension=function(g){return this.extensions[g]},A.hasExtension=function(g){return!!this.extensions[g]},A.addGlobal=function(g,d){return this.globals[g]=d,this},A.getGlobal=function(g){if(typeof this.globals[g]>"u")throw new Error("global not found: "+g);return this.globals[g]},A.addFilter=function(g,d,S){var D=d;return S&&this.asyncFilters.push(g),this.filters[g]=D,this},A.getFilter=function(g){if(!this.filters[g])throw new Error("filter not found: "+g);return this.filters[g]},A.addTest=function(g,d){return this.tests[g]=d,this},A.getTest=function(g){if(!this.tests[g])throw new Error("test not found: "+g);return this.tests[g]},A.resolveTemplate=function(g,d,S){var D=g.isRelative&&d?g.isRelative(S):!1;return D&&g.resolve?g.resolve(d,S):S},A.getTemplate=function(g,d,S,D,U){var H=this,re=this,q=null;if(g&&g.raw&&(g=g.raw),m.isFunction(S)&&(U=S,S=null,d=d||!1),m.isFunction(d)&&(U=d,d=!1),g instanceof w)q=g;else{if(typeof g!="string")throw new Error("template names must be a string: "+g);for(var ie=0;ie<this.loaders.length;ie++){var ye=this.loaders[ie];if(q=ye.cache[this.resolveTemplate(ye,S,g)],q)break}}if(q)if(d&&q.compile(),U){U(null,q);return}else return q;var ee,oe=function(Q,z){if(!z&&!Q&&!D&&(Q=new Error("template not found: "+g)),Q)if(U){U(Q);return}else throw Q;var ue;z?(ue=new w(z.src,H,z.path,d),z.noCache||(z.loader.cache[g]=ue)):ue=new w(a,H,"",d),U?U(null,ue):ee=ue};return m.asyncIter(this.loaders,function(G,Q,z,ue){function Ee(_e,Te){_e?ue(_e):Te?(Te.loader=G,ue(null,Te)):z()}g=re.resolveTemplate(G,S,g),G.async?G.getSource(g,Ee):Ee(null,G.getSource(g))},oe),ee},A.express=function(g){return l(this,g)},A.render=function(g,d,S){m.isFunction(d)&&(S=d,d=null);var D=null;return this.getTemplate(g,function(U,H){if(U&&S)o(S,U);else{if(U)throw U;D=H.render(d,S)}}),D},A.renderString=function(g,d,S,D){m.isFunction(S)&&(D=S,S={}),S=S||{};var U=new w(g,this,S.path);return U.render(d,D)},A.waterfall=function(g,d,S){return s(g,d,S)},T}(c),u=function(L){y(T,L);function T(){return L.apply(this,arguments)||this}var A=T.prototype;return A.init=function(g,d,S){var D=this;this.env=S||new v,this.ctx=m.extend({},g),this.blocks={},this.exported=[],m.keys(d).forEach(function(U){D.addBlock(U,d[U])})},A.lookup=function(g){return g in this.env.globals&&!(g in this.ctx)?this.env.globals[g]:this.ctx[g]},A.setVariable=function(g,d){this.ctx[g]=d},A.getVariables=function(){return this.ctx},A.addBlock=function(g,d){return this.blocks[g]=this.blocks[g]||[],this.blocks[g].push(d),this},A.getBlock=function(g){if(!this.blocks[g])throw new Error('unknown block "'+g+'"');return this.blocks[g][0]},A.getSuper=function(g,d,S,D,U,H){var re=m.indexOf(this.blocks[d]||[],S),q=this.blocks[d][re+1],ie=this;if(re===-1||!q)throw new Error('no super block available for "'+d+'"');q(g,ie,D,U,H)},A.addExport=function(g){this.exported.push(g)},A.getExported=function(){var g=this,d={};return this.exported.forEach(function(S){d[S]=g.ctx[S]}),d},T}(h),w=function(L){y(T,L);function T(){return L.apply(this,arguments)||this}var A=T.prototype;return A.init=function(g,d,S,D){if(this.env=d||new v,m.isObject(g))switch(g.type){case"code":this.tmplProps=g.obj;break;case"string":this.tmplStr=g.obj;break;default:throw new Error("Unexpected template object type "+g.type+"; expected 'code', or 'string'")}else if(m.isString(g))this.tmplStr=g;else throw new Error("src must be a string or an object describing the source");if(this.path=S,D)try{this._compile()}catch(U){throw m._prettifyError(this.path,this.env.opts.dev,U)}else this.compiled=!1},A.render=function(g,d,S){var D=this;typeof g=="function"?(S=g,g={}):typeof d=="function"&&(S=d,d=null);var U=!d;try{this.compile()}catch(ee){var H=m._prettifyError(this.path,this.env.opts.dev,ee);if(S)return o(S,H);throw H}var re=new u(g||{},this.blocks,this.env),q=d?d.push(!0):new i;q.topLevel=!0;var ie=null,ye=!1;return this.rootRenderFunc(this.env,re,q,p,function(ee,oe){if(!(ye&&S&&typeof oe<"u"))if(ee&&(ee=m._prettifyError(D.path,D.env.opts.dev,ee),ye=!0),S)U?o(S,ee,oe):S(ee,oe);else{if(ee)throw ee;ie=oe}}),ie},A.getExported=function(g,d,S){typeof g=="function"&&(S=g,g={}),typeof d=="function"&&(S=d,d=null);try{this.compile()}catch(H){if(S)return S(H);throw H}var D=d?d.push():new i;D.topLevel=!0;var U=new u(g||{},this.blocks,this.env);this.rootRenderFunc(this.env,U,D,p,function(H){H?S(H,null):S(null,U.getExported())})},A.compile=function(){this.compiled||this._compile()},A._compile=function(){var g;if(this.tmplProps)g=this.tmplProps;else{var d=E.compile(this.tmplStr,this.env.asyncFilters,this.env.extensionsList,this.path,this.env.opts),S=new Function(d);g=S()}this.blocks=this._getBlocks(g),this.rootRenderFunc=g.root,this.compiled=!0},A._getBlocks=function(g){var d={};return m.keys(g).forEach(function(S){S.slice(0,2)==="b_"&&(d[S.slice(2)]=g[S])}),d},T}(h);_.exports={Environment:v,Template:w}},function(_,C,O){function y(K,R){K.prototype=Object.create(R.prototype),K.prototype.constructor=K,k(K,R)}function k(K,R){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(N,e){return N.__proto__=e,N},k(K,R)}var f=O(9),s=O(3),m=O(1).Obj,E=O(0),M=function(K){y(R,K);function R(){return K.apply(this,arguments)||this}var b=R.prototype;return b.init=function(e){this.tokens=e,this.peeked=null,this.breakOnBlocks=null,this.dropLeadingWhitespace=!1,this.extensions=[]},b.nextToken=function(e){var n;if(this.peeked)if(!e&&this.peeked.type===f.TOKEN_WHITESPACE)this.peeked=null;else return n=this.peeked,this.peeked=null,n;if(n=this.tokens.nextToken(),!e)for(;n&&n.type===f.TOKEN_WHITESPACE;)n=this.tokens.nextToken();return n},b.peekToken=function(){return this.peeked=this.peeked||this.nextToken(),this.peeked},b.pushToken=function(e){if(this.peeked)throw new Error("pushToken: can only push one token on between reads");this.peeked=e},b.error=function(e,n,r){if(n===void 0||r===void 0){var h=this.peekToken()||{};n=h.lineno,r=h.colno}return n!==void 0&&(n+=1),r!==void 0&&(r+=1),new E.TemplateError(e,n,r)},b.fail=function(e,n,r){throw this.error(e,n,r)},b.skip=function(e){var n=this.nextToken();return!n||n.type!==e?(this.pushToken(n),!1):!0},b.expect=function(e){var n=this.nextToken();return n.type!==e&&this.fail("expected "+e+", got "+n.type,n.lineno,n.colno),n},b.skipValue=function(e,n){var r=this.nextToken();return!r||r.type!==e||r.value!==n?(this.pushToken(r),!1):!0},b.skipSymbol=function(e){return this.skipValue(f.TOKEN_SYMBOL,e)},b.advanceAfterBlockEnd=function(e){var n;return e||(n=this.peekToken(),n||this.fail("unexpected end of file"),n.type!==f.TOKEN_SYMBOL&&this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"),e=this.nextToken().value),n=this.nextToken(),n&&n.type===f.TOKEN_BLOCK_END?n.value.charAt(0)==="-"&&(this.dropLeadingWhitespace=!0):this.fail("expected block end in "+e+" statement"),n},b.advanceAfterVariableEnd=function(){var e=this.nextToken();e&&e.type===f.TOKEN_VARIABLE_END?this.dropLeadingWhitespace=e.value.charAt(e.value.length-this.tokens.tags.VARIABLE_END.length-1)==="-":(this.pushToken(e),this.fail("expected variable end"))},b.parseFor=function(){var e=this.peekToken(),n,r;this.skipSymbol("for")?(n=new s.For(e.lineno,e.colno),r="endfor"):this.skipSymbol("asyncEach")?(n=new s.AsyncEach(e.lineno,e.colno),r="endeach"):this.skipSymbol("asyncAll")?(n=new s.AsyncAll(e.lineno,e.colno),r="endall"):this.fail("parseFor: expected for{Async}",e.lineno,e.colno),n.name=this.parsePrimary(),n.name instanceof s.Symbol||this.fail("parseFor: variable name expected for loop");var h=this.peekToken().type;if(h===f.TOKEN_COMMA){var c=n.name;for(n.name=new s.Array(c.lineno,c.colno),n.name.addChild(c);this.skip(f.TOKEN_COMMA);){var p=this.parsePrimary();n.name.addChild(p)}}return this.skipSymbol("in")||this.fail('parseFor: expected "in" keyword for loop',e.lineno,e.colno),n.arr=this.parseExpression(),this.advanceAfterBlockEnd(e.value),n.body=this.parseUntilBlocks(r,"else"),this.skipSymbol("else")&&(this.advanceAfterBlockEnd("else"),n.else_=this.parseUntilBlocks(r)),this.advanceAfterBlockEnd(),n},b.parseMacro=function(){var e=this.peekToken();this.skipSymbol("macro")||this.fail("expected macro");var n=this.parsePrimary(!0),r=this.parseSignature(),h=new s.Macro(e.lineno,e.colno,n,r);return this.advanceAfterBlockEnd(e.value),h.body=this.parseUntilBlocks("endmacro"),this.advanceAfterBlockEnd(),h},b.parseCall=function(){var e=this.peekToken();this.skipSymbol("call")||this.fail("expected call");var n=this.parseSignature(!0)||new s.NodeList,r=this.parsePrimary();this.advanceAfterBlockEnd(e.value);var h=this.parseUntilBlocks("endcall");this.advanceAfterBlockEnd();var c=new s.Symbol(e.lineno,e.colno,"caller"),p=new s.Caller(e.lineno,e.colno,c,n,h),t=r.args.children;t[t.length-1]instanceof s.KeywordArgs||t.push(new s.KeywordArgs);var i=t[t.length-1];return i.addChild(new s.Pair(e.lineno,e.colno,c,p)),new s.Output(e.lineno,e.colno,[r])},b.parseWithContext=function(){var e=this.peekToken(),n=null;return this.skipSymbol("with")?n=!0:this.skipSymbol("without")&&(n=!1),n!==null&&(this.skipSymbol("context")||this.fail("parseFrom: expected context after with/without",e.lineno,e.colno)),n},b.parseImport=function(){var e=this.peekToken();this.skipSymbol("import")||this.fail("parseImport: expected import",e.lineno,e.colno);var n=this.parseExpression();this.skipSymbol("as")||this.fail('parseImport: expected "as" keyword',e.lineno,e.colno);var r=this.parseExpression(),h=this.parseWithContext(),c=new s.Import(e.lineno,e.colno,n,r,h);return this.advanceAfterBlockEnd(e.value),c},b.parseFrom=function(){var e=this.peekToken();this.skipSymbol("from")||this.fail("parseFrom: expected from");var n=this.parseExpression();this.skipSymbol("import")||this.fail("parseFrom: expected import",e.lineno,e.colno);for(var r=new s.NodeList,h;;){var c=this.peekToken();if(c.type===f.TOKEN_BLOCK_END){r.children.length||this.fail("parseFrom: Expected at least one import name",e.lineno,e.colno),c.value.charAt(0)==="-"&&(this.dropLeadingWhitespace=!0),this.nextToken();break}r.children.length>0&&!this.skip(f.TOKEN_COMMA)&&this.fail("parseFrom: expected comma",e.lineno,e.colno);var p=this.parsePrimary();if(p.value.charAt(0)==="_"&&this.fail("parseFrom: names starting with an underscore cannot be imported",p.lineno,p.colno),this.skipSymbol("as")){var t=this.parsePrimary();r.addChild(new s.Pair(p.lineno,p.colno,p,t))}else r.addChild(p);h=this.parseWithContext()}return new s.FromImport(e.lineno,e.colno,n,r,h)},b.parseBlock=function(){var e=this.peekToken();this.skipSymbol("block")||this.fail("parseBlock: expected block",e.lineno,e.colno);var n=new s.Block(e.lineno,e.colno);n.name=this.parsePrimary(),n.name instanceof s.Symbol||this.fail("parseBlock: variable name expected",e.lineno,e.colno),this.advanceAfterBlockEnd(e.value),n.body=this.parseUntilBlocks("endblock"),this.skipSymbol("endblock"),this.skipSymbol(n.name.value);var r=this.peekToken();return r||this.fail("parseBlock: expected endblock, got end of file"),this.advanceAfterBlockEnd(r.value),n},b.parseExtends=function(){var e="extends",n=this.peekToken();this.skipSymbol(e)||this.fail("parseTemplateRef: expected "+e);var r=new s.Extends(n.lineno,n.colno);return r.template=this.parseExpression(),this.advanceAfterBlockEnd(n.value),r},b.parseInclude=function(){var e="include",n=this.peekToken();this.skipSymbol(e)||this.fail("parseInclude: expected "+e);var r=new s.Include(n.lineno,n.colno);return r.template=this.parseExpression(),this.skipSymbol("ignore")&&this.skipSymbol("missing")&&(r.ignoreMissing=!0),this.advanceAfterBlockEnd(n.value),r},b.parseIf=function(){var e=this.peekToken(),n;this.skipSymbol("if")||this.skipSymbol("elif")||this.skipSymbol("elseif")?n=new s.If(e.lineno,e.colno):this.skipSymbol("ifAsync")?n=new s.IfAsync(e.lineno,e.colno):this.fail("parseIf: expected if, elif, or elseif",e.lineno,e.colno),n.cond=this.parseExpression(),this.advanceAfterBlockEnd(e.value),n.body=this.parseUntilBlocks("elif","elseif","else","endif");var r=this.peekToken();switch(r&&r.value){case"elseif":case"elif":n.else_=this.parseIf();break;case"else":this.advanceAfterBlockEnd(),n.else_=this.parseUntilBlocks("endif"),this.advanceAfterBlockEnd();break;case"endif":n.else_=null,this.advanceAfterBlockEnd();break;default:this.fail("parseIf: expected elif, else, or endif, got end of file")}return n},b.parseSet=function(){var e=this.peekToken();this.skipSymbol("set")||this.fail("parseSet: expected set",e.lineno,e.colno);for(var n=new s.Set(e.lineno,e.colno,[]),r;(r=this.parsePrimary())&&(n.targets.push(r),!!this.skip(f.TOKEN_COMMA)););return this.skipValue(f.TOKEN_OPERATOR,"=")?(n.value=this.parseExpression(),this.advanceAfterBlockEnd(e.value)):this.skip(f.TOKEN_BLOCK_END)?(n.body=new s.Capture(e.lineno,e.colno,this.parseUntilBlocks("endset")),n.value=null,this.advanceAfterBlockEnd()):this.fail("parseSet: expected = or block end in set tag",e.lineno,e.colno),n},b.parseSwitch=function(){var e="switch",n="endswitch",r="case",h="default",c=this.peekToken();!this.skipSymbol(e)&&!this.skipSymbol(r)&&!this.skipSymbol(h)&&this.fail('parseSwitch: expected "switch," "case" or "default"',c.lineno,c.colno);var p=this.parseExpression();this.advanceAfterBlockEnd(e),this.parseUntilBlocks(r,h,n);var t=this.peekToken(),i=[],l;do{this.skipSymbol(r);var o=this.parseExpression();this.advanceAfterBlockEnd(e);var a=this.parseUntilBlocks(r,h,n);i.push(new s.Case(t.line,t.col,o,a)),t=this.peekToken()}while(t&&t.value===r);switch(t.value){case h:this.advanceAfterBlockEnd(),l=this.parseUntilBlocks(n),this.advanceAfterBlockEnd();break;case n:this.advanceAfterBlockEnd();break;default:this.fail('parseSwitch: expected "case," "default" or "endswitch," got EOF.')}return new s.Switch(c.lineno,c.colno,p,i,l)},b.parseStatement=function(){var e=this.peekToken(),n;if(e.type!==f.TOKEN_SYMBOL&&this.fail("tag name expected",e.lineno,e.colno),this.breakOnBlocks&&E.indexOf(this.breakOnBlocks,e.value)!==-1)return null;switch(e.value){case"raw":return this.parseRaw();case"verbatim":return this.parseRaw("verbatim");case"if":case"ifAsync":return this.parseIf();case"for":case"asyncEach":case"asyncAll":return this.parseFor();case"block":return this.parseBlock();case"extends":return this.parseExtends();case"include":return this.parseInclude();case"set":return this.parseSet();case"macro":return this.parseMacro();case"call":return this.parseCall();case"import":return this.parseImport();case"from":return this.parseFrom();case"filter":return this.parseFilterStatement();case"switch":return this.parseSwitch();default:if(this.extensions.length)for(var r=0;r<this.extensions.length;r++){var h=this.extensions[r];if(E.indexOf(h.tags||[],e.value)!==-1)return h.parse(this,s,f)}this.fail("unknown block tag: "+e.value,e.lineno,e.colno)}return n},b.parseRaw=function(e){e=e||"raw";for(var n="end"+e,r=new RegExp("([\\s\\S]*?){%\\s*("+e+"|"+n+")\\s*(?=%})%}"),h=1,c="",p=null,t=this.advanceAfterBlockEnd();(p=this.tokens._extractRegex(r))&&h>0;){var i=p[0],l=p[1],o=p[2];o===e?h+=1:o===n&&(h-=1),h===0?(c+=l,this.tokens.backN(i.length-l.length)):c+=i}return new s.Output(t.lineno,t.colno,[new s.TemplateData(t.lineno,t.colno,c)])},b.parsePostfix=function(e){for(var n,r=this.peekToken();r;){if(r.type===f.TOKEN_LEFT_PAREN)e=new s.FunCall(r.lineno,r.colno,e,this.parseSignature());else if(r.type===f.TOKEN_LEFT_BRACKET)n=this.parseAggregate(),n.children.length>1&&this.fail("invalid index"),e=new s.LookupVal(r.lineno,r.colno,e,n.children[0]);else if(r.type===f.TOKEN_OPERATOR&&r.value==="."){this.nextToken();var h=this.nextToken();h.type!==f.TOKEN_SYMBOL&&this.fail("expected name as lookup value, got "+h.value,h.lineno,h.colno),n=new s.Literal(h.lineno,h.colno,h.value),e=new s.LookupVal(r.lineno,r.colno,e,n)}else break;r=this.peekToken()}return e},b.parseExpression=function(){var e=this.parseInlineIf();return e},b.parseInlineIf=function(){var e=this.parseOr();if(this.skipSymbol("if")){var n=this.parseOr(),r=e;e=new s.InlineIf(e.lineno,e.colno),e.body=r,e.cond=n,this.skipSymbol("else")?e.else_=this.parseOr():e.else_=null}return e},b.parseOr=function(){for(var e=this.parseAnd();this.skipSymbol("or");){var n=this.parseAnd();e=new s.Or(e.lineno,e.colno,e,n)}return e},b.parseAnd=function(){for(var e=this.parseNot();this.skipSymbol("and");){var n=this.parseNot();e=new s.And(e.lineno,e.colno,e,n)}return e},b.parseNot=function(){var e=this.peekToken();return this.skipSymbol("not")?new s.Not(e.lineno,e.colno,this.parseNot()):this.parseIn()},b.parseIn=function(){for(var e=this.parseIs();;){var n=this.nextToken();if(!n)break;var r=n.type===f.TOKEN_SYMBOL&&n.value==="not";if(r||this.pushToken(n),this.skipSymbol("in")){var h=this.parseIs();e=new s.In(e.lineno,e.colno,e,h),r&&(e=new s.Not(e.lineno,e.colno,e))}else{r&&this.pushToken(n);break}}return e},b.parseIs=function(){var e=this.parseCompare();if(this.skipSymbol("is")){var n=this.skipSymbol("not"),r=this.parseCompare();e=new s.Is(e.lineno,e.colno,e,r),n&&(e=new s.Not(e.lineno,e.colno,e))}return e},b.parseCompare=function(){for(var e=["==","===","!=","!==","<",">","<=",">="],n=this.parseConcat(),r=[];;){var h=this.nextToken();if(h)if(e.indexOf(h.value)!==-1)r.push(new s.CompareOperand(h.lineno,h.colno,this.parseConcat(),h.value));else{this.pushToken(h);break}else break}return r.length?new s.Compare(r[0].lineno,r[0].colno,n,r):n},b.parseConcat=function(){for(var e=this.parseAdd();this.skipValue(f.TOKEN_TILDE,"~");){var n=this.parseAdd();e=new s.Concat(e.lineno,e.colno,e,n)}return e},b.parseAdd=function(){for(var e=this.parseSub();this.skipValue(f.TOKEN_OPERATOR,"+");){var n=this.parseSub();e=new s.Add(e.lineno,e.colno,e,n)}return e},b.parseSub=function(){for(var e=this.parseMul();this.skipValue(f.TOKEN_OPERATOR,"-");){var n=this.parseMul();e=new s.Sub(e.lineno,e.colno,e,n)}return e},b.parseMul=function(){for(var e=this.parseDiv();this.skipValue(f.TOKEN_OPERATOR,"*");){var n=this.parseDiv();e=new s.Mul(e.lineno,e.colno,e,n)}return e},b.parseDiv=function(){for(var e=this.parseFloorDiv();this.skipValue(f.TOKEN_OPERATOR,"/");){var n=this.parseFloorDiv();e=new s.Div(e.lineno,e.colno,e,n)}return e},b.parseFloorDiv=function(){for(var e=this.parseMod();this.skipValue(f.TOKEN_OPERATOR,"//");){var n=this.parseMod();e=new s.FloorDiv(e.lineno,e.colno,e,n)}return e},b.parseMod=function(){for(var e=this.parsePow();this.skipValue(f.TOKEN_OPERATOR,"%");){var n=this.parsePow();e=new s.Mod(e.lineno,e.colno,e,n)}return e},b.parsePow=function(){for(var e=this.parseUnary();this.skipValue(f.TOKEN_OPERATOR,"**");){var n=this.parseUnary();e=new s.Pow(e.lineno,e.colno,e,n)}return e},b.parseUnary=function(e){var n=this.peekToken(),r;return this.skipValue(f.TOKEN_OPERATOR,"-")?r=new s.Neg(n.lineno,n.colno,this.parseUnary(!0)):this.skipValue(f.TOKEN_OPERATOR,"+")?r=new s.Pos(n.lineno,n.colno,this.parseUnary(!0)):r=this.parsePrimary(),e||(r=this.parseFilter(r)),r},b.parsePrimary=function(e){var n=this.nextToken(),r,h=null;if(n?n.type===f.TOKEN_STRING?r=n.value:n.type===f.TOKEN_INT?r=parseInt(n.value,10):n.type===f.TOKEN_FLOAT?r=parseFloat(n.value):n.type===f.TOKEN_BOOLEAN?n.value==="true"?r=!0:n.value==="false"?r=!1:this.fail("invalid boolean: "+n.value,n.lineno,n.colno):n.type===f.TOKEN_NONE?r=null:n.type===f.TOKEN_REGEX&&(r=new RegExp(n.value.body,n.value.flags)):this.fail("expected expression, got end of file"),r!==void 0?h=new s.Literal(n.lineno,n.colno,r):n.type===f.TOKEN_SYMBOL?h=new s.Symbol(n.lineno,n.colno,n.value):(this.pushToken(n),h=this.parseAggregate()),e||(h=this.parsePostfix(h)),h)return h;throw this.error("unexpected token: "+n.value,n.lineno,n.colno)},b.parseFilterName=function(){for(var e=this.expect(f.TOKEN_SYMBOL),n=e.value;this.skipValue(f.TOKEN_OPERATOR,".");)n+="."+this.expect(f.TOKEN_SYMBOL).value;return new s.Symbol(e.lineno,e.colno,n)},b.parseFilterArgs=function(e){if(this.peekToken().type===f.TOKEN_LEFT_PAREN){var n=this.parsePostfix(e);return n.args.children}return[]},b.parseFilter=function(e){for(;this.skip(f.TOKEN_PIPE);){var n=this.parseFilterName();e=new s.Filter(n.lineno,n.colno,n,new s.NodeList(n.lineno,n.colno,[e].concat(this.parseFilterArgs(e))))}return e},b.parseFilterStatement=function(){var e=this.peekToken();this.skipSymbol("filter")||this.fail("parseFilterStatement: expected filter");var n=this.parseFilterName(),r=this.parseFilterArgs(n);this.advanceAfterBlockEnd(e.value);var h=new s.Capture(n.lineno,n.colno,this.parseUntilBlocks("endfilter"));this.advanceAfterBlockEnd();var c=new s.Filter(n.lineno,n.colno,n,new s.NodeList(n.lineno,n.colno,[h].concat(r)));return new s.Output(n.lineno,n.colno,[c])},b.parseAggregate=function(){var e=this.nextToken(),n;switch(e.type){case f.TOKEN_LEFT_PAREN:n=new s.Group(e.lineno,e.colno);break;case f.TOKEN_LEFT_BRACKET:n=new s.Array(e.lineno,e.colno);break;case f.TOKEN_LEFT_CURLY:n=new s.Dict(e.lineno,e.colno);break;default:return null}for(;;){var r=this.peekToken().type;if(r===f.TOKEN_RIGHT_PAREN||r===f.TOKEN_RIGHT_BRACKET||r===f.TOKEN_RIGHT_CURLY){this.nextToken();break}if(n.children.length>0&&(this.skip(f.TOKEN_COMMA)||this.fail("parseAggregate: expected comma after expression",e.lineno,e.colno)),n instanceof s.Dict){var h=this.parsePrimary();this.skip(f.TOKEN_COLON)||this.fail("parseAggregate: expected colon after dict key",e.lineno,e.colno);var c=this.parseExpression();n.addChild(new s.Pair(h.lineno,h.colno,h,c))}else{var p=this.parseExpression();n.addChild(p)}}return n},b.parseSignature=function(e,n){var r=this.peekToken();if(!n&&r.type!==f.TOKEN_LEFT_PAREN){if(e)return null;this.fail("expected arguments",r.lineno,r.colno)}r.type===f.TOKEN_LEFT_PAREN&&(r=this.nextToken());for(var h=new s.NodeList(r.lineno,r.colno),c=new s.KeywordArgs(r.lineno,r.colno),p=!1;;){if(r=this.peekToken(),!n&&r.type===f.TOKEN_RIGHT_PAREN){this.nextToken();break}else if(n&&r.type===f.TOKEN_BLOCK_END)break;if(p&&!this.skip(f.TOKEN_COMMA))this.fail("parseSignature: expected comma after expression",r.lineno,r.colno);else{var t=this.parseExpression();this.skipValue(f.TOKEN_OPERATOR,"=")?c.addChild(new s.Pair(t.lineno,t.colno,t,this.parseExpression())):h.addChild(t)}p=!0}return c.children.length&&h.addChild(c),h},b.parseUntilBlocks=function(){for(var e=this.breakOnBlocks,n=arguments.length,r=new Array(n),h=0;h<n;h++)r[h]=arguments[h];this.breakOnBlocks=r;var c=this.parse();return this.breakOnBlocks=e,c},b.parseNodes=function(){for(var e,n=[];e=this.nextToken();)if(e.type===f.TOKEN_DATA){var r=e.value,h=this.peekToken(),c=h&&h.value;this.dropLeadingWhitespace&&(r=r.replace(/^\s*/,""),this.dropLeadingWhitespace=!1),h&&(h.type===f.TOKEN_BLOCK_START&&c.charAt(c.length-1)==="-"||h.type===f.TOKEN_VARIABLE_START&&c.charAt(this.tokens.tags.VARIABLE_START.length)==="-"||h.type===f.TOKEN_COMMENT&&c.charAt(this.tokens.tags.COMMENT_START.length)==="-")&&(r=r.replace(/\s*$/,"")),n.push(new s.Output(e.lineno,e.colno,[new s.TemplateData(e.lineno,e.colno,r)]))}else if(e.type===f.TOKEN_BLOCK_START){this.dropLeadingWhitespace=!1;var p=this.parseStatement();if(!p)break;n.push(p)}else if(e.type===f.TOKEN_VARIABLE_START){var t=this.parseExpression();this.dropLeadingWhitespace=!1,this.advanceAfterVariableEnd(),n.push(new s.Output(e.lineno,e.colno,[t]))}else e.type===f.TOKEN_COMMENT?this.dropLeadingWhitespace=e.value.charAt(e.value.length-this.tokens.tags.COMMENT_END.length-1)==="-":this.fail("Unexpected token at top-level: "+e.type,e.lineno,e.colno);return n},b.parse=function(){return new s.NodeList(0,0,this.parseNodes())},b.parseAsRoot=function(){return new s.Root(0,0,this.parseNodes())},R}(m);_.exports={parse:function(R,b,N){var e=new M(f.lex(R,N));return b!==void 0&&(e.extensions=b),e.parseAsRoot()},Parser:M}},function(_,C,O){var y=O(0),k=`
|
|
17
|
-
\r `,f="()[]{}%*-+~/#,:|.<>=!",s="0123456789",m="{%",E="%}",M="{{",K="}}",R="{#",b="#}",N="string",e="whitespace",n="data",r="block-start",h="block-end",c="variable-start",p="variable-end",t="comment",i="left-paren",l="right-paren",o="left-bracket",a="right-bracket",v="left-curly",u="right-curly",w="operator",L="comma",T="colon",A="tilde",B="pipe",g="int",d="float",S="boolean",D="none",U="symbol",H="special",re="regex";function q(ye,ee,oe,G){return{type:ye,value:ee,lineno:oe,colno:G}}var ie=function(){function ye(oe,G){this.str=oe,this.index=0,this.len=oe.length,this.lineno=0,this.colno=0,this.in_code=!1,G=G||{};var Q=G.tags||{};this.tags={BLOCK_START:Q.blockStart||m,BLOCK_END:Q.blockEnd||E,VARIABLE_START:Q.variableStart||M,VARIABLE_END:Q.variableEnd||K,COMMENT_START:Q.commentStart||R,COMMENT_END:Q.commentEnd||b},this.trimBlocks=!!G.trimBlocks,this.lstripBlocks=!!G.lstripBlocks}var ee=ye.prototype;return ee.nextToken=function(){var G=this.lineno,Q=this.colno,z;if(this.in_code){var ue=this.current();if(this.isFinished())return null;if(ue==='"'||ue==="'")return q(N,this._parseString(ue),G,Q);if(z=this._extract(k))return q(e,z,G,Q);if((z=this._extractString(this.tags.BLOCK_END))||(z=this._extractString("-"+this.tags.BLOCK_END)))return this.in_code=!1,this.trimBlocks&&(ue=this.current(),ue===`
|
|
18
|
-
`?this.forward():ue==="\r"&&(this.forward(),ue=this.current(),ue===`
|
|
19
|
-
`?this.forward():this.back())),q(h,z,G,Q);if((z=this._extractString(this.tags.VARIABLE_END))||(z=this._extractString("-"+this.tags.VARIABLE_END)))return this.in_code=!1,q(p,z,G,Q);if(ue==="r"&&this.str.charAt(this.index+1)==="/"){this.forwardN(2);for(var Ee="";!this.isFinished();)if(this.current()==="/"&&this.previous()!=="\\"){this.forward();break}else Ee+=this.current(),this.forward();for(var _e=["g","i","m","y"],Te="";!this.isFinished();){var x=_e.indexOf(this.current())!==-1;if(x)Te+=this.current(),this.forward();else break}return q(re,{body:Ee,flags:Te},G,Q)}else if(f.indexOf(ue)!==-1){this.forward();var F=["==","===","!=","!==","<=",">=","//","**"],$=ue+this.current(),W;switch(y.indexOf(F,$)!==-1&&(this.forward(),ue=$,y.indexOf(F,$+this.current())!==-1&&(ue=$+this.current(),this.forward())),ue){case"(":W=i;break;case")":W=l;break;case"[":W=o;break;case"]":W=a;break;case"{":W=v;break;case"}":W=u;break;case",":W=L;break;case":":W=T;break;case"~":W=A;break;case"|":W=B;break;default:W=w}return q(W,ue,G,Q)}else if(z=this._extractUntil(k+f),z.match(/^[-+]?[0-9]+$/))if(this.current()==="."){this.forward();var Z=this._extract(s);return q(d,z+"."+Z,G,Q)}else return q(g,z,G,Q);else{if(z.match(/^(true|false)$/))return q(S,z,G,Q);if(z==="none")return q(D,z,G,Q);if(z==="null")return q(D,z,G,Q);if(z)return q(U,z,G,Q);throw new Error("Unexpected value while parsing: "+z)}}else{var te=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if((z=this._extractString(this.tags.BLOCK_START+"-"))||(z=this._extractString(this.tags.BLOCK_START)))return this.in_code=!0,q(r,z,G,Q);if((z=this._extractString(this.tags.VARIABLE_START+"-"))||(z=this._extractString(this.tags.VARIABLE_START)))return this.in_code=!0,q(c,z,G,Q);z="";var he,ae=!1;for(this._matches(this.tags.COMMENT_START)&&(ae=!0,z=this._extractString(this.tags.COMMENT_START));(he=this._extractUntil(te))!==null;)if(z+=he,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!ae){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&this.colno>0&&this.colno<=z.length){var xe=z.slice(-this.colno);if(/^\s+$/.test(xe)&&(z=z.slice(0,-this.colno),!z.length))return this.nextToken()}break}else if(this._matches(this.tags.COMMENT_END)){if(!ae)throw new Error("unexpected end of comment");z+=this._extractString(this.tags.COMMENT_END);break}else z+=this.current(),this.forward();if(he===null&&ae)throw new Error("expected end of comment, got end of file");return q(ae?t:n,z,G,Q)}},ee._parseString=function(G){this.forward();for(var Q="";!this.isFinished()&&this.current()!==G;){var z=this.current();if(z==="\\"){switch(this.forward(),this.current()){case"n":Q+=`
|
|
20
|
-
`;break;case"t":Q+=" ";break;case"r":Q+="\r";break;default:Q+=this.current()}this.forward()}else Q+=z,this.forward()}return this.forward(),Q},ee._matches=function(G){if(this.index+G.length>this.len)return null;var Q=this.str.slice(this.index,this.index+G.length);return Q===G},ee._extractString=function(G){return this._matches(G)?(this.forwardN(G.length),G):null},ee._extractUntil=function(G){return this._extractMatching(!0,G||"")},ee._extract=function(G){return this._extractMatching(!1,G)},ee._extractMatching=function(G,Q){if(this.isFinished())return null;var z=Q.indexOf(this.current());if(G&&z===-1||!G&&z!==-1){var ue=this.current();this.forward();for(var Ee=Q.indexOf(this.current());(G&&Ee===-1||!G&&Ee!==-1)&&!this.isFinished();)ue+=this.current(),this.forward(),Ee=Q.indexOf(this.current());return ue}return""},ee._extractRegex=function(G){var Q=this.currentStr().match(G);return Q?(this.forwardN(Q[0].length),Q):null},ee.isFinished=function(){return this.index>=this.len},ee.forwardN=function(G){for(var Q=0;Q<G;Q++)this.forward()},ee.forward=function(){this.index++,this.previous()===`
|
|
21
|
-
`?(this.lineno++,this.colno=0):this.colno++},ee.backN=function(G){for(var Q=0;Q<G;Q++)this.back()},ee.back=function(){if(this.index--,this.current()===`
|
|
22
|
-
`){this.lineno--;var G=this.src.lastIndexOf(`
|
|
23
|
-
`,this.index-1);G===-1?this.colno=this.index:this.colno=this.index-G}else this.colno--},ee.current=function(){return this.isFinished()?"":this.str.charAt(this.index)},ee.currentStr=function(){return this.isFinished()?"":this.str.substr(this.index)},ee.previous=function(){return this.str.charAt(this.index-1)},ye}();_.exports={lex:function(ee,oe){return new ie(ee,oe)},TOKEN_STRING:N,TOKEN_WHITESPACE:e,TOKEN_DATA:n,TOKEN_BLOCK_START:r,TOKEN_BLOCK_END:h,TOKEN_VARIABLE_START:c,TOKEN_VARIABLE_END:p,TOKEN_COMMENT:t,TOKEN_LEFT_PAREN:i,TOKEN_RIGHT_PAREN:l,TOKEN_LEFT_BRACKET:o,TOKEN_RIGHT_BRACKET:a,TOKEN_LEFT_CURLY:v,TOKEN_RIGHT_CURLY:u,TOKEN_OPERATOR:w,TOKEN_COMMA:L,TOKEN_COLON:T,TOKEN_TILDE:A,TOKEN_PIPE:B,TOKEN_INT:g,TOKEN_FLOAT:d,TOKEN_BOOLEAN:S,TOKEN_NONE:D,TOKEN_SYMBOL:U,TOKEN_SPECIAL:H,TOKEN_REGEX:re}},function(_,C,O){function y(M,K){M.prototype=Object.create(K.prototype),M.prototype.constructor=M,k(M,K)}function k(M,K){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,N){return b.__proto__=N,b},k(M,K)}var f=O(6),s=O(19),m=s.PrecompiledLoader,E=function(M){y(K,M);function K(b,N){var e;return e=M.call(this)||this,e.baseURL=b||".",N=N||{},e.useCache=!!N.useCache,e.async=!!N.async,e}var R=K.prototype;return R.resolve=function(N,e){throw new Error("relative templates not support in the browser yet")},R.getSource=function(N,e){var n=this,r=this.useCache,h;return this.fetch(this.baseURL+"/"+N,function(c,p){if(c)if(e)e(c.content);else if(c.status===404)h=null;else throw c.content;else h={src:p,path:N,noCache:!r},n.emit("load",N,h),e&&e(null,h)}),h},R.fetch=function(N,e){if(typeof window>"u")throw new Error("WebLoader can only by used in a browser");var n=new XMLHttpRequest,r=!0;n.onreadystatechange=function(){n.readyState===4&&r&&(r=!1,n.status===0||n.status===200?e(null,n.responseText):e({status:n.status,content:n.responseText}))},N+=(N.indexOf("?")===-1?"?":"&")+"s="+new Date().getTime(),n.open("GET",N,this.async),n.send()},K}(f);_.exports={WebLoader:E,PrecompiledLoader:m}},function(_,C,O){var y=O(0),k=O(7),f=k.Environment,s=k.Template,m=O(6),E=O(10),M=O(23),K=O(5),R=O(8),b=O(9),N=O(2),e=O(3),n=O(25),r;function h(c,p){p=p||{},y.isObject(c)&&(p=c,c=null);var t;return E.FileSystemLoader?t=new E.FileSystemLoader(c,{watch:p.watch,noCache:p.noCache}):E.WebLoader&&(t=new E.WebLoader(c,{useCache:p.web&&p.web.useCache,async:p.web&&p.web.async})),r=new f(t,p),p&&p.express&&r.express(p.express),r}_.exports={Environment:f,Template:s,Loader:m,FileSystemLoader:E.FileSystemLoader,NodeResolveLoader:E.NodeResolveLoader,PrecompiledLoader:E.PrecompiledLoader,WebLoader:E.WebLoader,compiler:K,parser:R,lexer:b,runtime:N,lib:y,nodes:e,installJinjaCompat:n,configure:h,reset:function(){r=void 0},compile:function(p,t,i,l){return r||h(),new s(p,t,i,l)},render:function(p,t,i){return r||h(),r.render(p,t,i)},renderString:function(p,t,i){return r||h(),r.renderString(p,t,i)},precompile:M?M.precompile:void 0,precompileString:M?M.precompileString:void 0}},function(_,C,O){var y=O(13),k=[],f=[],s=y.makeRequestCallFromTimer(m);function m(){if(f.length)throw f.shift()}_.exports=E;function E(K){var R;k.length?R=k.pop():R=new M,R.task=K,y(R)}function M(){this.task=null}M.prototype.call=function(){try{this.task.call()}catch(K){E.onerror?E.onerror(K):(f.push(K),s())}finally{this.task=null,k[k.length]=this}}},function(_,C,O){(function(y){_.exports=k;function k(e){f.length||s(),f[f.length]=e}var f=[],s,m=0,E=1024;function M(){for(;m<f.length;){var e=m;if(m=m+1,f[e].call(),m>E){for(var n=0,r=f.length-m;n<r;n++)f[n]=f[n+m];f.length-=m,m=0}}f.length=0,m=0}var K=typeof y<"u"?y:self,R=K.MutationObserver||K.WebKitMutationObserver;typeof R=="function"?s=b(M):s=N(M),k.requestFlush=s;function b(e){var n=1,r=new R(e),h=document.createTextNode("");return r.observe(h,{characterData:!0}),function(){n=-n,h.data=n}}function N(e){return function(){var r=setTimeout(c,0),h=setInterval(c,50);function c(){clearTimeout(r),clearInterval(h),e()}}}k.makeRequestCallFromTimer=N}).call(C,O(14))},function(_,C){var O;O=function(){return this}();try{O=O||Function("return this")()||(0,eval)("this")}catch{typeof window=="object"&&(O=window)}_.exports=O},function(_,C,O){var y,k;(function(f){var s=function(){var R=Array.prototype.slice.call(arguments);typeof R[0]=="function"&&R[0].apply(null,R.splice(1))},m=function(R){typeof setImmediate=="function"?setImmediate(R):typeof process<"u"&&process.nextTick?process.nextTick(R):setTimeout(R,0)},E=function(R){var b=function(N){var e=function(){return R.length&&R[N].apply(null,arguments),e.next()};return e.next=function(){return N<R.length-1?b(N+1):null},e};return b(0)},M=Array.isArray||function(R){return Object.prototype.toString.call(R)==="[object Array]"},K=function(R,b,N){var e=N?m:s;if(b=b||function(){},!M(R)){var n=new Error("First argument to waterfall must be an array of functions");return b(n)}if(!R.length)return b();var r=function(h){return function(c){if(c)b.apply(null,arguments),b=function(){};else{var p=Array.prototype.slice.call(arguments,1),t=h.next();t?p.push(r(t)):p.push(b),e(function(){h.apply(null,p)})}}};r(E(R))()};y=[],k=(function(){return K}).apply(C,y),k!==void 0&&(_.exports=k)})()},function(_,C,O){var y=typeof Reflect=="object"?Reflect:null,k=y&&typeof y.apply=="function"?y.apply:function(a,v,u){return Function.prototype.apply.call(a,v,u)},f;y&&typeof y.ownKeys=="function"?f=y.ownKeys:Object.getOwnPropertySymbols?f=function(a){return Object.getOwnPropertyNames(a).concat(Object.getOwnPropertySymbols(a))}:f=function(a){return Object.getOwnPropertyNames(a)};function s(o){console&&console.warn&&console.warn(o)}var m=Number.isNaN||function(a){return a!==a};function E(){E.init.call(this)}_.exports=E,_.exports.once=t,E.EventEmitter=E,E.prototype._events=void 0,E.prototype._eventsCount=0,E.prototype._maxListeners=void 0;var M=10;function K(o){if(typeof o!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof o)}Object.defineProperty(E,"defaultMaxListeners",{enumerable:!0,get:function(){return M},set:function(o){if(typeof o!="number"||o<0||m(o))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+o+".");M=o}}),E.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},E.prototype.setMaxListeners=function(a){if(typeof a!="number"||a<0||m(a))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+a+".");return this._maxListeners=a,this};function R(o){return o._maxListeners===void 0?E.defaultMaxListeners:o._maxListeners}E.prototype.getMaxListeners=function(){return R(this)},E.prototype.emit=function(a){for(var v=[],u=1;u<arguments.length;u++)v.push(arguments[u]);var w=a==="error",L=this._events;if(L!==void 0)w=w&&L.error===void 0;else if(!w)return!1;if(w){var T;if(v.length>0&&(T=v[0]),T instanceof Error)throw T;var A=new Error("Unhandled error."+(T?" ("+T.message+")":""));throw A.context=T,A}var B=L[a];if(B===void 0)return!1;if(typeof B=="function")k(B,this,v);else for(var g=B.length,d=h(B,g),u=0;u<g;++u)k(d[u],this,v);return!0};function b(o,a,v,u){var w,L,T;if(K(v),L=o._events,L===void 0?(L=o._events=Object.create(null),o._eventsCount=0):(L.newListener!==void 0&&(o.emit("newListener",a,v.listener?v.listener:v),L=o._events),T=L[a]),T===void 0)T=L[a]=v,++o._eventsCount;else if(typeof T=="function"?T=L[a]=u?[v,T]:[T,v]:u?T.unshift(v):T.push(v),w=R(o),w>0&&T.length>w&&!T.warned){T.warned=!0;var A=new Error("Possible EventEmitter memory leak detected. "+T.length+" "+String(a)+" listeners added. Use emitter.setMaxListeners() to increase limit");A.name="MaxListenersExceededWarning",A.emitter=o,A.type=a,A.count=T.length,s(A)}return o}E.prototype.addListener=function(a,v){return b(this,a,v,!1)},E.prototype.on=E.prototype.addListener,E.prototype.prependListener=function(a,v){return b(this,a,v,!0)};function N(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function e(o,a,v){var u={fired:!1,wrapFn:void 0,target:o,type:a,listener:v},w=N.bind(u);return w.listener=v,u.wrapFn=w,w}E.prototype.once=function(a,v){return K(v),this.on(a,e(this,a,v)),this},E.prototype.prependOnceListener=function(a,v){return K(v),this.prependListener(a,e(this,a,v)),this},E.prototype.removeListener=function(a,v){var u,w,L,T,A;if(K(v),w=this._events,w===void 0)return this;if(u=w[a],u===void 0)return this;if(u===v||u.listener===v)--this._eventsCount===0?this._events=Object.create(null):(delete w[a],w.removeListener&&this.emit("removeListener",a,u.listener||v));else if(typeof u!="function"){for(L=-1,T=u.length-1;T>=0;T--)if(u[T]===v||u[T].listener===v){A=u[T].listener,L=T;break}if(L<0)return this;L===0?u.shift():c(u,L),u.length===1&&(w[a]=u[0]),w.removeListener!==void 0&&this.emit("removeListener",a,A||v)}return this},E.prototype.off=E.prototype.removeListener,E.prototype.removeAllListeners=function(a){var v,u,w;if(u=this._events,u===void 0)return this;if(u.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):u[a]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete u[a]),this;if(arguments.length===0){var L=Object.keys(u),T;for(w=0;w<L.length;++w)T=L[w],T!=="removeListener"&&this.removeAllListeners(T);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(v=u[a],typeof v=="function")this.removeListener(a,v);else if(v!==void 0)for(w=v.length-1;w>=0;w--)this.removeListener(a,v[w]);return this};function n(o,a,v){var u=o._events;if(u===void 0)return[];var w=u[a];return w===void 0?[]:typeof w=="function"?v?[w.listener||w]:[w]:v?p(w):h(w,w.length)}E.prototype.listeners=function(a){return n(this,a,!0)},E.prototype.rawListeners=function(a){return n(this,a,!1)},E.listenerCount=function(o,a){return typeof o.listenerCount=="function"?o.listenerCount(a):r.call(o,a)},E.prototype.listenerCount=r;function r(o){var a=this._events;if(a!==void 0){var v=a[o];if(typeof v=="function")return 1;if(v!==void 0)return v.length}return 0}E.prototype.eventNames=function(){return this._eventsCount>0?f(this._events):[]};function h(o,a){for(var v=new Array(a),u=0;u<a;++u)v[u]=o[u];return v}function c(o,a){for(;a+1<o.length;a++)o[a]=o[a+1];o.pop()}function p(o){for(var a=new Array(o.length),v=0;v<a.length;++v)a[v]=o[v].listener||o[v];return a}function t(o,a){return new Promise(function(v,u){function w(T){o.removeListener(a,L),u(T)}function L(){typeof o.removeListener=="function"&&o.removeListener("error",w),v([].slice.call(arguments))}l(o,a,L,{once:!0}),a!=="error"&&i(o,w,{once:!0})})}function i(o,a,v){typeof o.on=="function"&&l(o,"error",a,v)}function l(o,a,v,u){if(typeof o.on=="function")u.once?o.once(a,v):o.on(a,v);else if(typeof o.addEventListener=="function")o.addEventListener(a,function w(L){u.once&&o.removeEventListener(a,w),v(L)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof o)}},function(_,C,O){var y=O(3),k=O(0),f=0;function s(){return"hole_"+f++}function m(r,h){for(var c=null,p=0;p<r.length;p++){var t=h(r[p]);t!==r[p]&&(c||(c=r.slice()),c[p]=t)}return c||r}function E(r,h,c){if(!(r instanceof y.Node))return r;if(!c){var p=h(r);if(p&&p!==r)return p}if(r instanceof y.NodeList){var t=m(r.children,function(v){return E(v,h,c)});t!==r.children&&(r=new y[r.typename](r.lineno,r.colno,t))}else if(r instanceof y.CallExtension){var i=E(r.args,h,c),l=m(r.contentArgs,function(v){return E(v,h,c)});(i!==r.args||l!==r.contentArgs)&&(r=new y[r.typename](r.extName,r.prop,i,l))}else{var o=r.fields.map(function(v){return r[v]}),a=m(o,function(v){return E(v,h,c)});a!==o&&(r=new y[r.typename](r.lineno,r.colno),a.forEach(function(v,u){r[r.fields[u]]=v}))}return c&&h(r)||r}function M(r,h){return E(r,h,!0)}function K(r,h,c){var p=[],t=M(c?r[c]:r,function(i){var l;return i instanceof y.Block?i:((i instanceof y.Filter&&k.indexOf(h,i.name.value)!==-1||i instanceof y.CallExtensionAsync)&&(l=new y.Symbol(i.lineno,i.colno,s()),p.push(new y.FilterAsync(i.lineno,i.colno,i.name,i.args,l))),l)});return c?r[c]=t:r=t,p.length?(p.push(r),new y.NodeList(r.lineno,r.colno,p)):r}function R(r,h){return M(r,function(c){return c instanceof y.Output?K(c,h):c instanceof y.Set?K(c,h,"value"):c instanceof y.For?K(c,h,"arr"):c instanceof y.If?K(c,h,"cond"):c instanceof y.CallExtension?K(c,h,"args"):void 0})}function b(r){return E(r,function(h){if(h instanceof y.Block){var c=!1,p=s();h.body=E(h.body,function(t){if(t instanceof y.FunCall&&t.name.value==="super")return c=!0,new y.Symbol(t.lineno,t.colno,p)}),c&&h.body.children.unshift(new y.Super(0,0,h.name,new y.Symbol(0,0,p)))}})}function N(r){return M(r,function(h){if(!(!(h instanceof y.If)&&!(h instanceof y.For))){var c=!1;if(E(h,function(p){if(p instanceof y.FilterAsync||p instanceof y.IfAsync||p instanceof y.AsyncEach||p instanceof y.AsyncAll||p instanceof y.CallExtensionAsync)return c=!0,p}),c){if(h instanceof y.If)return new y.IfAsync(h.lineno,h.colno,h.cond,h.body,h.else_);if(h instanceof y.For&&!(h instanceof y.AsyncAll))return new y.AsyncEach(h.lineno,h.colno,h.arr,h.name,h.body,h.else_)}}})}function e(r,h){return N(b(R(r,h)))}function n(r,h){return e(r,h||[])}_.exports={transform:n}},function(_,f,O){var y=O(0),k=O(2),f=_.exports={};function s(x,F){return x==null||x===!1?F:x}f.abs=Math.abs;function m(x){return x!==x}function E(x,F,$){var W,Z=[],te=[];for(W=0;W<x.length;W++)W%F===0&&te.length&&(Z.push(te),te=[]),te.push(x[W]);if(te.length){if($)for(W=te.length;W<F;W++)te.push($);Z.push(te)}return Z}f.batch=E;function M(x){x=s(x,"");var F=x.toLowerCase();return k.copySafeness(x,F.charAt(0).toUpperCase()+F.slice(1))}f.capitalize=M;function K(x,F){if(x=s(x,""),F=F||80,x.length>=F)return x;var $=F-x.length,W=y.repeat(" ",$/2-$%2),Z=y.repeat(" ",$/2);return k.copySafeness(x,W+x+Z)}f.center=K;function R(x,F,$){return $?x||F:x!==void 0?x:F}f.default=R;function b(x,F,$){if(!y.isObject(x))throw new y.TemplateError("dictsort filter: val must be an object");var W=[];for(var Z in x)W.push([Z,x[Z]]);var te;if($===void 0||$==="key")te=0;else if($==="value")te=1;else throw new y.TemplateError("dictsort filter: You can only sort by either key or value");return W.sort(function(he,ae){var xe=he[te],Pe=ae[te];return F||(y.isString(xe)&&(xe=xe.toUpperCase()),y.isString(Pe)&&(Pe=Pe.toUpperCase())),xe>Pe?1:xe===Pe?0:-1}),W}f.dictsort=b;function N(x,F){return JSON.stringify(x,null,F)}f.dump=N;function e(x){return x instanceof k.SafeString?x:(x=x??"",k.markSafe(y.escape(x.toString())))}f.escape=e;function n(x){return x instanceof k.SafeString?x:(x=x??"",k.markSafe(x.toString()))}f.safe=n;function r(x){return x[0]}f.first=r;function h(x){return x=x??"",k.markSafe(y.escape(x.toString()))}f.forceescape=h;function c(x,F){return y.groupBy(x,F,this.env.opts.throwOnUndefined)}f.groupby=c;function p(x,F,$){if(x=s(x,""),x==="")return"";F=F||4;var W=x.split(`
|
|
24
|
-
`),Z=y.repeat(" ",F),te=W.map(function(he,ae){return ae===0&&!$?he:""+Z+he}).join(`
|
|
25
|
-
`);return k.copySafeness(x,te)}f.indent=p;function t(x,F,$){return F=F||"",$&&(x=y.map(x,function(W){return W[$]})),x.join(F)}f.join=t;function i(x){return x[x.length-1]}f.last=i;function l(x){var F=s(x,"");return F!==void 0?typeof Map=="function"&&F instanceof Map||typeof Set=="function"&&F instanceof Set?F.size:y.isObject(F)&&!(F instanceof k.SafeString)?y.keys(F).length:F.length:0}f.length=l;function o(x){if(y.isString(x))return x.split("");if(y.isObject(x))return y._entries(x||{}).map(function(F){var $=F[0],W=F[1];return{key:$,value:W}});if(y.isArray(x))return x;throw new y.TemplateError("list filter: type not iterable")}f.list=o;function a(x){return x=s(x,""),x.toLowerCase()}f.lower=a;function v(x){return x==null?"":k.copySafeness(x,x.replace(/\r\n|\n/g,`<br />
|
|
26
|
-
`))}f.nl2br=v;function u(x){return x[Math.floor(Math.random()*x.length)]}f.random=u;function w(x){function F($,W,Z){W===void 0&&(W="truthy");var te=this,he=te.env.getTest(W);return y.toArray($).filter(function(xe){return he.call(te,xe,Z)===x})}return F}f.reject=w(!1);function L(x,F){return x.filter(function($){return!$[F]})}f.rejectattr=L,f.select=w(!0);function T(x,F){return x.filter(function($){return!!$[F]})}f.selectattr=T;function A(x,F,$,W){var Z=x;if(F instanceof RegExp)return x.replace(F,$);typeof W>"u"&&(W=-1);var te="";if(typeof F=="number")F=""+F;else if(typeof F!="string")return x;if(typeof x=="number"&&(x=""+x),typeof x!="string"&&!(x instanceof k.SafeString))return x;if(F==="")return te=$+x.split("").join($)+$,k.copySafeness(x,te);var he=x.indexOf(F);if(W===0||he===-1)return x;for(var ae=0,xe=0;he>-1&&(W===-1||xe<W);)te+=x.substring(ae,he)+$,ae=he+F.length,xe++,he=x.indexOf(F,ae);return ae<x.length&&(te+=x.substring(ae)),k.copySafeness(Z,te)}f.replace=A;function B(x){var F;return y.isString(x)?F=o(x):F=y.map(x,function($){return $}),F.reverse(),y.isString(x)?k.copySafeness(x,F.join("")):F}f.reverse=B;function g(x,F,$){F=F||0;var W=Math.pow(10,F),Z;return $==="ceil"?Z=Math.ceil:$==="floor"?Z=Math.floor:Z=Math.round,Z(x*W)/W}f.round=g;function d(x,F,$){for(var W=Math.floor(x.length/F),Z=x.length%F,te=[],he=0,ae=0;ae<F;ae++){var xe=he+ae*W;ae<Z&&he++;var Pe=he+(ae+1)*W,Re=x.slice(xe,Pe);$&&ae>=Z&&Re.push($),te.push(Re)}return te}f.slice=d;function S(x,F,$){return $===void 0&&($=0),F&&(x=y.map(x,function(W){return W[F]})),$+x.reduce(function(W,Z){return W+Z},0)}f.sum=S,f.sort=k.makeMacro(["value","reverse","case_sensitive","attribute"],[],function(F,$,W,Z){var te=this,he=y.map(F,function(xe){return xe}),ae=y.getAttrGetter(Z);return he.sort(function(xe,Pe){var Re=Z?ae(xe):xe,Ue=Z?ae(Pe):Pe;if(te.env.opts.throwOnUndefined&&Z&&(Re===void 0||Ue===void 0))throw new TypeError('sort: attribute "'+Z+'" resolved to undefined');return!W&&y.isString(Re)&&y.isString(Ue)&&(Re=Re.toLowerCase(),Ue=Ue.toLowerCase()),Re<Ue?$?1:-1:Re>Ue?$?-1:1:0}),he});function D(x){return k.copySafeness(x,x)}f.string=D;function U(x,F){x=s(x,"");var $=/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi,W=re(x.replace($,"")),Z="";return F?Z=W.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,`
|
|
27
|
-
`).replace(/\n\n\n+/g,`
|
|
28
|
-
|
|
29
|
-
`):Z=W.replace(/\s+/gi," "),k.copySafeness(x,Z)}f.striptags=U;function H(x){x=s(x,"");var F=x.split(" ").map(function($){return M($)});return k.copySafeness(x,F.join(" "))}f.title=H;function re(x){return k.copySafeness(x,x.replace(/^\s*|\s*$/g,""))}f.trim=re;function q(x,F,$,W){var Z=x;if(x=s(x,""),F=F||255,x.length<=F)return x;if($)x=x.substring(0,F);else{var te=x.lastIndexOf(" ",F);te===-1&&(te=F),x=x.substring(0,te)}return x+=W??"...",k.copySafeness(Z,x)}f.truncate=q;function ie(x){return x=s(x,""),x.toUpperCase()}f.upper=ie;function ye(x){var F=encodeURIComponent;if(y.isString(x))return F(x);var $=y.isArray(x)?x:y._entries(x);return $.map(function(W){var Z=W[0],te=W[1];return F(Z)+"="+F(te)}).join("&")}f.urlencode=ye;var ee=/^(?:\(|<|<)?(.*?)(?:\.|,|\)|\n|>)?$/,oe=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,G=/^https?:\/\/.*$/,Q=/^www\./,z=/\.(?:org|net|com)(?:\:|\/|$)/;function ue(x,F,$){m(F)&&(F=1/0);var W=$===!0?' rel="nofollow"':"",Z=x.split(/(\s+)/).filter(function(te){return te&&te.length}).map(function(te){var he=te.match(ee),ae=he?he[1]:te,xe=ae.substr(0,F);return G.test(ae)?'<a href="'+ae+'"'+W+">"+xe+"</a>":Q.test(ae)?'<a href="http://'+ae+'"'+W+">"+xe+"</a>":oe.test(ae)?'<a href="mailto:'+ae+'">'+ae+"</a>":z.test(ae)?'<a href="http://'+ae+'"'+W+">"+xe+"</a>":te});return Z.join("")}f.urlize=ue;function Ee(x){x=s(x,"");var F=x?x.match(/\w+/g):null;return F?F.length:null}f.wordcount=Ee;function _e(x,F){var $=parseFloat(x);return m($)?F:$}f.float=_e;var Te=k.makeMacro(["value","default","base"],[],function(F,$,W){W===void 0&&(W=10);var Z=parseInt(F,W);return m(Z)?$:Z});f.int=Te,f.d=f.default,f.e=f.escape},function(_,C,O){function y(m,E){m.prototype=Object.create(E.prototype),m.prototype.constructor=m,k(m,E)}function k(m,E){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(K,R){return K.__proto__=R,K},k(m,E)}var f=O(6),s=function(m){y(E,m);function E(K){var R;return R=m.call(this)||this,R.precompiled=K||{},R}var M=E.prototype;return M.getSource=function(R){return this.precompiled[R]?{src:{type:"code",obj:this.precompiled[R]},path:R}:null},E}(f);_.exports={PrecompiledLoader:s}},function(_,C,O){var y=O(2).SafeString;function k(u){return typeof u=="function"}C.callable=k;function f(u){return u!==void 0}C.defined=f;function s(u,w){return u%w===0}C.divisibleby=s;function m(u){return u instanceof y}C.escaped=m;function E(u,w){return u===w}C.equalto=E,C.eq=C.equalto,C.sameas=C.equalto;function M(u){return u%2===0}C.even=M;function K(u){return!u}C.falsy=K;function R(u,w){return u>=w}C.ge=R;function b(u,w){return u>w}C.greaterthan=b,C.gt=C.greaterthan;function N(u,w){return u<=w}C.le=N;function e(u,w){return u<w}C.lessthan=e,C.lt=C.lessthan;function n(u){return u.toLowerCase()===u}C.lower=n;function r(u,w){return u!==w}C.ne=r;function h(u){return u===null}C.null=h;function c(u){return typeof u=="number"}C.number=c;function p(u){return u%2===1}C.odd=p;function t(u){return typeof u=="string"}C.string=t;function i(u){return!!u}C.truthy=i;function l(u){return u===void 0}C.undefined=l;function o(u){return u.toUpperCase()===u}C.upper=o;function a(u){return typeof Symbol<"u"?!!u[Symbol.iterator]:Array.isArray(u)||typeof u=="string"}C.iterable=a;function v(u){var w=u!=null&&typeof u=="object"&&!Array.isArray(u);return Set?w&&!(u instanceof Set):w}C.mapping=v},function(_,C,O){function y(s){var m=-1;return{current:null,reset:function(){m=-1,this.current=null},next:function(){return m++,m>=s.length&&(m=0),this.current=s[m],this.current}}}function k(s){s=s||",";var m=!0;return function(){var E=m?"":s;return m=!1,E}}function f(){return{range:function(m,E,M){typeof E>"u"?(E=m,m=0,M=1):M||(M=1);var K=[];if(M>0)for(var R=m;R<E;R+=M)K.push(R);else for(var b=m;b>E;b+=M)K.push(b);return K},cycler:function(){return y(Array.prototype.slice.call(arguments))},joiner:function(m){return k(m)}}}_.exports=f},function(_,C,O){var y=O(4);_.exports=function(f,s){function m(E,M){if(this.name=E,this.path=E,this.defaultEngine=M.defaultEngine,this.ext=y.extname(E),!this.ext&&!this.defaultEngine)throw new Error("No default engine was specified and no extension was provided.");this.ext||(this.name+=this.ext=(this.defaultEngine[0]!=="."?".":"")+this.defaultEngine)}return m.prototype.render=function(M,K){f.render(this.name,M,K)},s.set("view",m),s.set("nunjucksEnv",f),f}},function(_,C,O){var y=O(4),k=O(4),f=O(0),s=f._prettifyError,m=O(5),E=O(7),M=E.Environment,K=O(24);function R(n,r){return Array.isArray(r)?r.some(function(h){return n.match(h)}):!1}function b(n,r){r=r||{},r.isString=!0;var h=r.env||new M([]),c=r.wrapper||K;if(!r.name)throw new Error('the "name" option is required when compiling a string');return c([e(n,r.name,h)],r)}function N(n,r){r=r||{};var h=r.env||new M([]),c=r.wrapper||K;if(r.isString)return b(n,r);var p=y.existsSync(n)&&y.statSync(n),t=[],i=[];function l(v){y.readdirSync(v).forEach(function(u){var w=k.join(v,u),L=w.substr(k.join(n,"/").length),T=y.statSync(w);T&&T.isDirectory()?(L+="/",R(L,r.exclude)||l(w)):R(L,r.include)&&i.push(w)})}if(p.isFile())t.push(e(y.readFileSync(n,"utf-8"),r.name||n,h));else if(p.isDirectory()){l(n);for(var o=0;o<i.length;o++){var a=i[o].replace(k.join(n,"/"),"");try{t.push(e(y.readFileSync(i[o],"utf-8"),a,h))}catch(v){if(r.force)console.error(v);else throw v}}}return c(t,r)}function e(n,r,h){h=h||new M([]);var c=h.asyncFilters,p=h.extensionsList,t;r=r.replace(/\\/g,"/");try{t=m.compile(n,c,p,r,h.opts)}catch(i){throw s(r,!1,i)}return{name:r,template:t}}_.exports={precompile:N,precompileString:b}},function(_,C,O){function y(k,f){var s="";f=f||{};for(var m=0;m<k.length;m++){var E=JSON.stringify(k[m].name),M=k[m].template;s+="(function() {(window.nunjucksPrecompiled = window.nunjucksPrecompiled || {})["+E+`] = (function() {
|
|
30
|
-
`+M+`
|
|
31
|
-
})();
|
|
32
|
-
`,f.asFunction&&(s+="return function(ctx, cb) { return nunjucks.render("+E+`, ctx, cb); }
|
|
33
|
-
`),s+=`})();
|
|
34
|
-
`}return s}_.exports=y},function(_,C,O){function y(){var k=this.runtime,f=this.lib,s=this.compiler.Compiler,m=this.parser.Parser,E=this.nodes,M=this.lexer,K=k.contextOrFrameLookup,R=k.memberLookup,b,N;s&&(b=s.prototype.assertType),m&&(N=m.prototype.parseAggregate);function e(){k.contextOrFrameLookup=K,k.memberLookup=R,s&&(s.prototype.assertType=b),m&&(m.prototype.parseAggregate=N)}k.contextOrFrameLookup=function(l,o,a){var v=K.apply(this,arguments);if(v!==void 0)return v;switch(a){case"True":return!0;case"False":return!1;case"None":return null;default:return}};function n(i){return{index:i.index,lineno:i.lineno,colno:i.colno}}if(E&&s&&m){var r=E.Node.extend("Slice",{fields:["start","stop","step"],init:function(l,o,a,v,u){a=a||new E.Literal(l,o,null),v=v||new E.Literal(l,o,null),u=u||new E.Literal(l,o,1),this.parent(l,o,a,v,u)}});s.prototype.assertType=function(l){l instanceof r||b.apply(this,arguments)},s.prototype.compileSlice=function(l,o){this._emit("("),this._compileExpression(l.start,o),this._emit("),("),this._compileExpression(l.stop,o),this._emit("),("),this._compileExpression(l.step,o),this._emit(")")},m.prototype.parseAggregate=function(){var l=this,o=n(this.tokens);o.colno--,o.index--;try{return N.apply(this)}catch(B){var a=n(this.tokens),v=function(){return f._assign(l.tokens,a),B};f._assign(this.tokens,o),this.peeked=!1;var u=this.peekToken();if(u.type!==M.TOKEN_LEFT_BRACKET)throw v();this.nextToken();for(var w=new r(u.lineno,u.colno),L=!1,T=0;T<=w.fields.length&&!this.skip(M.TOKEN_RIGHT_BRACKET);T++){if(T===w.fields.length)if(L)this.fail("parseSlice: too many slice components",u.lineno,u.colno);else break;if(this.skip(M.TOKEN_COLON))L=!0;else{var A=w.fields[T];w[A]=this.parseExpression(),L=this.skip(M.TOKEN_COLON)||L}}if(!L)throw v();return new E.Array(u.lineno,u.colno,[w])}}}function h(i,l,o,a){i=i||[],l===null&&(l=a<0?i.length-1:0),o===null?o=a<0?-1:i.length:o<0&&(o+=i.length),l<0&&(l+=i.length);for(var v=[],u=l;!(u<0||u>i.length||a>0&&u>=o||a<0&&u<=o);u+=a)v.push(k.memberLookup(i,u));return v}function c(i,l){return Object.prototype.hasOwnProperty.call(i,l)}var p={pop:function(l){if(l===void 0)return this.pop();if(l>=this.length||l<0)throw new Error("KeyError");return this.splice(l,1)},append:function(l){return this.push(l)},remove:function(l){for(var o=0;o<this.length;o++)if(this[o]===l)return this.splice(o,1);throw new Error("ValueError")},count:function(l){for(var o=0,a=0;a<this.length;a++)this[a]===l&&o++;return o},index:function(l){var o;if((o=this.indexOf(l))===-1)throw new Error("ValueError");return o},find:function(l){return this.indexOf(l)},insert:function(l,o){return this.splice(l,0,o)}},t={items:function(){return f._entries(this)},values:function(){return f._values(this)},keys:function(){return f.keys(this)},get:function(l,o){var a=this[l];return a===void 0&&(a=o),a},has_key:function(l){return c(this,l)},pop:function(l,o){var a=this[l];if(a===void 0&&o!==void 0)a=o;else{if(a===void 0)throw new Error("KeyError");delete this[l]}return a},popitem:function(){var l=f.keys(this);if(!l.length)throw new Error("KeyError");var o=l[0],a=this[o];return delete this[o],[o,a]},setdefault:function(l,o){return o===void 0&&(o=null),l in this||(this[l]=o),this[l]},update:function(l){return f._assign(this,l),null}};return t.iteritems=t.items,t.itervalues=t.values,t.iterkeys=t.keys,k.memberLookup=function(l,o,a){return arguments.length===4?h.apply(this,arguments):(l=l||{},f.isArray(l)&&c(p,o)?p[o].bind(l):f.isObject(l)&&c(t,o)?t[o].bind(l):R.apply(this,arguments))},e}_.exports=y}])})})(Lt);var sn=Lt.exports;const dt=Jt(sn);var an=(V,I)=>I(V.currentTarget.checked),ln=be('<label class="absolute right-6 top-1 z-10 inline-flex cursor-pointer items-center gap-2 bg-transparent text-rc-gray-100 focus:outline-none focus:ring-0"><input type="checkbox" class="checkbox svelte-1br1z62"/> <span>Preview</span></label>'),cn=be('<div class="flex justify-end"><!></div>'),un=be('<div class="prompt-editor flex h-full flex-col"><div class="relative flex-1"><div class="h-full w-full"></div> <!></div> <!></div>');function fn(V,I){et(I,!0);let _=De(null),C,O=st(I,"readOnly",3,!1),y=st(I,"showPreviewToggle",3,!0),k=st(I,"preview",3,null),f=!1,s=null,m=null,E=!1,M=null,K=[],R=null,b=null,N=0;const e=24;let n=De(!1);const r=je(()=>k()!==null?k():j(n));function h(L,T){const A=L.getLayoutInfo(),B=Number((A==null?void 0:A.contentWidth)??0);if(!Number.isFinite(B)||B<=0)return 80;const g=L.getOption(T.editor.EditorOption.fontInfo),d=Number(g==null?void 0:g.typicalHalfwidthCharacterWidth)||Number(g==null?void 0:g.typicalFullwidthCharacterWidth)||7;if(!Number.isFinite(d)||d<=0)return 80;const S=Math.floor((B-e)/d);return Math.max(20,S)}function c(){!j(_)||!m||b==null&&(b=requestAnimationFrame(()=>{if(b=null,!j(_)||!m)return;const L=h(j(_),m);L!==N&&(N=L,j(_).updateOptions({wordWrap:"bounded",wordWrapColumn:L}))}))}lt(()=>{if(!C)return;_t();let L=!1;return Ot(()=>import("../chunks/BfHUxT3G.js").then(T=>T.e),__vite__mapDeps([0,1,2,3,4]),import.meta.url).then(T=>{if(L)return;m=T,xt(T),Ae(_,T.editor.create(C,{value:"",language:"markdown",theme:"bosun-dark",lineNumbers:"off",fontSize:14,fontFamily:'ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',automaticLayout:!0,minimap:{enabled:!1},wordBasedSuggestions:"off",wordWrap:"bounded",wordWrapColumn:120,wrappingStrategy:"advanced",matchBrackets:"never",bracketPairColorization:{enabled:!0},guides:{highlightActiveBracketPair:!1,bracketPairs:!1,bracketPairsHorizontal:!1},occurrencesHighlight:"off",selectionHighlight:!1,unicodeHighlight:{ambiguousCharacters:!1,nonBasicASCII:!1,invisibleCharacters:!1,includeStrings:!1,includeComments:!1},autoClosingQuotes:"never",padding:{top:32},readOnly:O()}),!0),M=j(_).getModel(),c(),K.push(j(_).onDidLayoutChange(()=>c())),rt.agents.context.query({agentId:I.agentId}).then(g=>{L||(R==null||R.dispose(),R=rn(T,g))}),s=Rt(T,j(_));const A=I.prompt??"";f=!0,j(_).setValue(A),f=!1,requestAnimationFrame(()=>{s==null||s.update()});const B=t(I.onPromptChanged,500);if(K.push(j(_).onDidChangeModelContent(()=>{if(j(_)&&(s==null||s.update(),!f))try{const g=j(_).getValue();if(g===I.prompt)return;B(g)}catch(g){console.error("Error updating prompt",g)}})),E=!0,I.onEditorReady)try{I.onEditorReady(j(_),T)}catch(g){console.error("PromptEditor onEditorReady error",g)}}).catch(T=>{console.error("Error initializing Monaco editor:",T)}),()=>{L=!0,b!=null&&cancelAnimationFrame(b),b=null,clearTimeout(p);try{R==null||R.dispose()}catch{}R=null;for(const A of K)try{A.dispose()}catch{}K=[],s==null||s.dispose(),s=null;const T=M;if(M=null,j(_)){try{j(_).setModel(null)}catch{}j(_).dispose(),Ae(_,null)}try{T==null||T.dispose()}catch{}}}),We(()=>{if(!j(_)||!E)return;const L=j(_).getValue(),T=I.prompt??"";if(L!==T){f=!0;try{j(_).setValue(T),s==null||s.update()}finally{f=!1}}}),We(()=>{!j(_)||!E||j(_).updateOptions({readOnly:O()})});let p;function t(L,T=300){return(...A)=>{clearTimeout(p),p=setTimeout(()=>{L(...A)},T)}}function i(L,T){return dt.configure({autoescape:!1,trimBlocks:!0,lstripBlocks:!0}),dt.renderString(L,T||{})}let l="",o=0;function a(L){var T;if(k()!==null){(T=I.onPreviewChange)==null||T.call(I,L);return}Ae(n,L,!0)}function v(){if(o+=1,!!j(_)){f=!0;try{l&&(j(_).setValue(l),l=""),j(_).updateOptions({readOnly:O()})}finally{f=!1}}}async function u(){if(!j(_)||O())return;l=j(_).getValue();const L=o+=1;let T=null;try{T=await rt.agents.context.query({agentId:I.agentId})}catch(B){console.error("Failed to load agent context for preview:",B),T=null}if(L!==o||!j(_)||!j(r))return;const A=i(l,T||{});f=!0;try{j(_).setValue(A),j(_).updateOptions({readOnly:!0})}finally{f=!1}}let w=De(!1);We(()=>{if(!j(_)||!E)return;const L=!!j(r)&&!O();L!==j(w)&&(Ae(w,L,!0),L?u():v())}),Ze(V,{get class(){return`relative overflow-hidden ${I.class??""}`},children:(L,T)=>{var A=un(),B=ce(A),g=ce(B);Tt(g,H=>C=H,()=>C);var d=we(g,2);{var S=H=>{var re=ln(),q=ce(re);bt(q),q.__change=[an,a],Ke(2),le(re),Me(()=>Mt(q,j(r))),se(H,re)};Se(d,H=>{y()&&!O()&&H(S)})}le(B);var D=we(B,2);{var U=H=>{var re=cn(),q=ce(re);kt(q,{variant:"secondary",get onclick(){return I.onSchemaClick},class:"absolute bottom-2 right-6 !font-medium",children:(ie,ye)=>{Ke();var ee=Ve("Schema");se(ie,ee)},$$slots:{default:!0}}),le(re),se(H,re)};Se(D,H=>{I.showSchemaButton&&I.onSchemaClick&&H(U)})}le(A),se(L,A)}}),tt()}ct(["change"]);var pn=be("<!> <!>",1),hn=be('<div class="flex h-full items-center justify-center text-sm text-rc-gray-300">Loading</div>'),dn=be('<pre class="whitespace-pre-wrap font-mono text-xs text-rc-gray-200"> </pre>'),vn=be('<div class="flex h-full flex-col gap-3"><div class="text-sm text-red-400"> </div></div>'),mn=be('<pre class="whitespace-pre-wrap font-mono text-xs text-rc-gray-200"> </pre>'),gn=(V,I,_)=>I.focusQuote(j(_).quote),yn=be('<button type="button" class="rounded-md border border-rc-gray-700 bg-rc-gray-900/40 px-3 py-2 text-left hover:border-rc-gray-500"><div class="flex items-center justify-between text-xs text-rc-gray-400"><div> </div> <div> </div></div> <div class="whitespace-pre-wrap break-words text-sm text-rc-gray-100"> </div></button>'),_n=be('<div class="flex flex-col gap-2"></div>'),xn=be('<div class="text-sm text-rc-gray-300">No quotes returned.</div>'),bn=be('<div class="mb-3 text-sm font-semibold text-rc-gray-100"> </div> <!>',1),wn=(V,I,_)=>I.focusQuote(_),En=be('<button type="button" class="rounded-md border border-rc-gray-700 bg-rc-gray-900/40 px-3 py-2 text-left hover:border-rc-gray-500"><div class="whitespace-pre-wrap break-words text-sm text-rc-gray-100"> </div></button>'),kn=be('<div class="mt-3 flex flex-col gap-2"></div>'),On=be('<div class="rounded-md border border-rc-gray-700 bg-rc-gray-900/40 p-3"><div class="flex items-start justify-between gap-3"><div class="text-xs font-semibold text-rc-gray-400"></div> <div class="text-xs text-rc-gray-500"> </div></div> <div class="mt-1 whitespace-pre-wrap break-words text-sm text-rc-gray-100"> </div> <!></div>'),Tn=be('<div class="flex flex-col gap-3"></div>'),Ln=be('<div class="text-sm text-rc-gray-300">No issues found.</div>'),Sn=be('<div class="mb-3 text-sm font-semibold text-rc-gray-100"> </div> <!>',1),An=be('<div class="border-b border-rc-gray-700 px-2 py-1"><!></div> <div class="min-h-0 flex-1 overflow-auto p-3"><!></div>',1);function Nn(V,I){et(I,!0);const{state:_,actions:C}=Et();let O=De("results"),y=De(null);We(()=>{var E;const m=((E=_.edit.popover)==null?void 0:E.requestId)??null;m!==j(y)&&(Ae(y,m,!0),Ae(O,"results"))});var k=He(),f=Ce(k);{var s=m=>{const E=je(()=>_.edit.popover);var M=An(),K=Ce(M),R=ce(K);at(R,{get value(){return j(O)},ariaLabel:"Popover tabs",onChange:({value:r})=>Ae(O,r,!0),children:(r,h)=>{var c=pn(),p=Ce(c);Je(p,{value:"results",children:(i,l)=>{Ke();var o=Ve("Results");se(i,o)},$$slots:{default:!0}});var t=we(p,2);Je(t,{value:"raw",children:(i,l)=>{Ke();var o=Ve("Raw");se(i,o)},$$slots:{default:!0}}),se(r,c)},$$slots:{default:!0}}),le(K);var b=we(K,2),N=ce(b);{var e=r=>{var h=hn();se(r,h)},n=r=>{var h=He(),c=Ce(h);{var p=i=>{var l=He(),o=Ce(l);{var a=u=>{const w=je(()=>{var A;return typeof((A=j(E).data)==null?void 0:A.raw)=="string"?j(E).data.raw:j(E).error});var L=dn(),T=ce(L,!0);le(L),Me(()=>Fe(T,j(w)||"—")),se(u,L)},v=u=>{var w=vn(),L=ce(w),T=ce(L,!0);le(L),le(w),Me(()=>Fe(T,j(E).error)),se(u,w)};Se(o,u=>{j(O)==="raw"?u(a):u(v,!1)})}se(i,l)},t=i=>{const l=je(()=>j(E).data);var o=He(),a=Ce(o);{var v=w=>{var L=mn(),T=ce(L,!0);le(L),Me(()=>{var A;return Fe(T,typeof((A=j(l))==null?void 0:A.raw)=="string"?j(l).raw:"—")}),se(w,L)},u=w=>{var L=He(),T=Ce(L);{var A=g=>{var d=bn(),S=Ce(d),D=ce(S,!0);le(S);var U=we(S,2);{var H=q=>{var ie=_n();nt(ie,23,()=>j(l).quotes,ye=>ye.quote,(ye,ee,oe)=>{var G=yn();G.__click=[gn,C,ee];var Q=ce(G),z=ce(Q),ue=ce(z);le(z);var Ee=we(z,2),_e=ce(Ee);le(Ee),le(Q);var Te=we(Q,2),x=ce(Te,!0);le(Te),le(G),Me(()=>{Fe(ue,`Quote ${j(oe)+1}`),Fe(_e,`x${j(ee).count??""}/10`),Fe(x,j(ee).quote)}),se(ye,G)}),le(ie),se(q,ie)},re=q=>{var ie=xn();se(q,ie)};Se(U,q=>{var ie;Array.isArray((ie=j(l))==null?void 0:ie.quotes)&&j(l).quotes.length>0?q(H):q(re,!1)})}Me(()=>{var q;return Fe(D,((q=j(l))==null?void 0:q.title)??"Analysis")}),se(g,d)},B=g=>{var d=Sn(),S=Ce(d),D=ce(S,!0);le(S);var U=we(S,2);{var H=q=>{var ie=Tn();nt(ie,21,()=>j(l).issues,wt,(ye,ee,oe)=>{var G=On(),Q=ce(G),z=ce(Q);z.textContent=`Issue ${oe+1}`;var ue=we(z,2),Ee=ce(ue,!0);le(ue),le(Q);var _e=we(Q,2),Te=ce(_e,!0);le(_e);var x=we(_e,2);{var F=$=>{var W=kn();nt(W,20,()=>j(ee).contradictingQuotes,Z=>Z,(Z,te)=>{var he=En();he.__click=[wn,C,te];var ae=ce(he),xe=ce(ae,!0);le(ae),le(he),Me(()=>Fe(xe,te)),se(Z,he)}),le(W),se($,W)};Se(x,$=>{j(ee).contradictingQuotes&&j(ee).contradictingQuotes.length>0&&$(F)})}le(G),Me(()=>{Fe(Ee,j(ee).type),Fe(Te,j(ee).reason)}),se(ye,G)}),le(ie),se(q,ie)},re=q=>{var ie=Ln();se(q,ie)};Se(U,q=>{var ie;Array.isArray((ie=j(l))==null?void 0:ie.issues)&&j(l).issues.length>0?q(H):q(re,!1)})}Me(()=>{var q;return Fe(D,((q=j(l))==null?void 0:q.title)??"Prompt issues")}),se(g,d)};Se(T,g=>{j(E).kind==="analyze"?g(A):g(B,!1)},!0)}se(w,L)};Se(a,w=>{j(O)==="raw"?w(v):w(u,!1)})}se(i,o)};Se(c,i=>{j(E).status==="error"?i(p):i(t,!1)},!0)}se(r,h)};Se(N,r=>{j(E).status==="loading"?r(e):r(n,!1)})}le(b),se(m,M)};Se(f,m=>{_.edit.popover&&m(s)})}se(V,k),tt()}ct(["click"]);var Cn=be('<div class="min-h-0 flex-1 overflow-hidden p-3"><!></div>');function Pn(V,I){et(I,!1);const _=Et(),C=Pt(_.state),O=_.actions;function y(s){It(C,j(C).context=s),O.sendAppEvent({type:"context-updated",context:s})}Gt();var k=Cn(),f=ce(k);Ut(f,{class:"h-full min-h-0 border-thin border-rc-gray-650 shadow-inner-white-soft backdrop-blur-3xl focus:outline-none focus:ring-0",get context(){return j(C).context},onContextChanged:y,suppressErrors:!0}),le(k),se(V,k),tt()}function In(V){try{return decodeURIComponent(V)}catch{return V}}function St(V){var y;const _=(((y=String(V||"").split("?")[0])==null?void 0:y.split("#")[0])??"").split("/").filter(Boolean);if(_[0]!=="edit")return{agentId:null,tab:null};if(_.length===1)return{agentId:null,tab:null};const C=In(_[1]??""),O=_[2]??null;return O?O==="roleplay"?{agentId:C,tab:"roleplay"}:O==="tests"?{agentId:C,tab:"tests"}:{agentId:C,tab:null}:{agentId:C,tab:"roleplay"}}function Rn(V){return{tab:St(V.pathname).tab??"roleplay",popover:null,highlights:null,requestSeq:0}}function Fn(V,I){const C=St(I.pathname).tab??"roleplay";return{...V,tab:C,popover:null,highlights:null}}function Bn(V,I){const _=V.requestSeq+1;return{...V,requestSeq:_,popover:{kind:I.kind,status:"loading",requestId:_},highlights:null}}function Mn(V,I){return!V.popover||V.popover.requestId!==I.requestId?V:{...V,popover:{...V.popover,status:"ready",data:I.data,error:void 0}}}function Kn(V,I){return!V.popover||V.popover.requestId!==I.requestId?V:{...V,popover:{...V.popover,status:"error",error:String(I.error||"Unknown error"),data:I.data}}}function jn(V){return{...V,popover:null,highlights:null}}function Dn(V,I){return{...V,highlights:{quotes:I??[],focusQuote:null,focusNonce:0}}}function Un(V,I){const _=String(I||"");if(!_)return V;const C=V.highlights??{quotes:[],focusQuote:null,focusNonce:0};return{...V,highlights:{...C,focusQuote:_,focusNonce:(C.focusNonce??0)+1}}}function Vn(V,I){const _=String(V??""),C=Wn(I),O=gt(_);for(const y of C){const k=vt(_,y);if(k.length>0)return k;const f=mt(_,y);if(f.length>0)return f;const s=gt(y);if(O!==_||s!==y){const m=vt(O,s);if(m.length>0)return m;const E=mt(O,s);if(E.length>0)return E}}return[]}function vt(V,I){const _=String(I??"");if(!_)return[];const C=[];let O=0;for(;O<=V.length-_.length;){const y=V.indexOf(_,O);if(y===-1)break;C.push({start:y,end:y+_.length}),O=y+1}return C}function mt(V,I){const _=String(I??"");if(!_.trim())return[];const C=Hn(_).replace(/\s+/g,"\\s+");let O;try{O=new RegExp(`(?=(${C}))`,"gu")}catch{return[]}const y=[];let k;for(;(k=O.exec(V))!==null;){const f=k.index,s=k[1]??"",m=f+s.length;m>f&&y.push({start:f,end:m}),O.lastIndex===f&&(O.lastIndex+=1)}return y}function Wn(V){const I=String(V??""),_=I.trim(),C=new Set;for(const k of[I,_])k&&C.add(k);const O=_.replace(/^[-*•]\s+/,"");O&&O!==_&&C.add(O);const y=_.replace(/^(?:\(?\d+\)?[.)]|[a-zA-Z][.)])\s+/,"");return y&&y!==_&&C.add(y),[...C].filter(k=>k.trim().length>0)}function gt(V){return String(V??"").replace(/\r/g,`
|
|
35
|
-
`).replace(/[\u00A0\u2007\u202F\u2009\u200A\u200B\uFEFF]/g," ").replace(/[\u201C\u201D\u201E\u00AB\u00BB]/g,'"').replace(/[\u2018\u2019]/g,"'").replace(/[\u2013\u2014]/g,"-")}function Hn(V){return V.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Gn(V,I){const _=V.createDecorationsCollection(),C=V.createDecorationsCollection();let O=null,y=new Map,k=new Map,f=0;function s(){y=new Map,k=new Map,f=0}function m(e,n,r){return Number.isNaN(e)?n:Math.max(n,Math.min(r,e))}function E(e){const n=m(e,1,10);return`rgba(220, 38, 38, ${m(.22+n*.06,.28,.82)})`}function M(e,n){const r=String(e??"");if(!r)return[];const h=y.get(r);if(h)return h;const c=Vn(n,r);return y.set(r,c),c}function K(e){const n=V.getModel();if(!n)return;const r=n.getValue()??"",h=[],c=[...e||[]].sort((p,t)=>(p.count||0)-(t.count||0));for(const p of c){const t=String(p.quote||"");if(!t)continue;const i=m(Number(p.count||0),1,10),l=E(i),o=M(t,r);for(const a of o){const v=n.getPositionAt(a.start),u=n.getPositionAt(a.end);h.push({range:new I.Range(v.lineNumber,v.column,u.lineNumber,u.column),options:{inlineClassName:`analysis-quote analysis-quote-l${i}`,overviewRuler:{color:l,position:I.editor.OverviewRulerLane.Center}}})}}_.set(h)}function R(e){const n=V.getModel();if(!n)return;const r=n.getValue()??"",h=M(e,r);if(h.length===0)return;const p=((k.get(e)??-1)+1)%h.length;k.set(e,p);const t=h[p],i=n.getPositionAt(t.start),l=n.getPositionAt(t.end),o=new I.Range(i.lineNumber,i.column,l.lineNumber,l.column);C.set([{range:o,options:{inlineClassName:"analysis-quote-focus"}}]),V.setSelection(o),V.revealRangeInCenter(o,I.editor.ScrollType.Smooth),V.focus()}function b(e){if(O=e,!O){_.clear(),C.clear(),s();return}K(O.quotes||[]),O.focusQuote&&O.focusNonce!==f?(f=O.focusNonce,R(O.focusQuote)):O.focusQuote||C.clear()}const N=V.onDidChangeModelContent(()=>{O&&(y=new Map,C.clear(),K(O.quotes||[]))});return{setHighlights:b,dispose:()=>{try{N.dispose(),_.clear(),C.clear()}finally{O=null,s()}}}}var qn=be("<!> <!>",1),$n=be('<div class="p-2 text-rc-gray-400">Connecting…</div>'),zn=be('<div class="p-2 text-rc-gray-400">No steps</div>'),Qn=(V,I,_)=>I(j(_).name),Yn=be('<button><span class="block truncate"> </span></button>'),Jn=be('<div class="rc-scroll min-h-0 flex-1 overflow-auto p-2"><!></div>'),Xn=be("<!> <!>",1),Zn=be('<div class="border-b border-rc-gray-700 p-2"><!></div> <div class="min-h-0 flex-1"><!></div> <!> <!>',1),er=be('<div class="flex h-screen"><!> <div class="flex h-full min-w-0 flex-1 flex-col bg-rc-gray-980 pb-3 pr-4 pt-2"><nav class="flex flex-none items-center justify-center bg-rc-gray-980"><!></nav> <div class="flex-1 overflow-hidden"><div class="grid h-full w-full grid-cols-[minmax(140px,2fr)_minmax(0,10fr)_minmax(0,11fr)]"><!> <div class="flex h-full min-w-0 flex-col"><div class="flex h-14 flex-none items-center justify-between gap-3 border-b border-rc-gray-700 p-2"><div class="min-w-0"><div class="truncate font-semibold text-rc-gray-100"> </div></div> <div class="flex items-center gap-3"><label class="inline-flex items-center gap-2 text-rc-gray-300"><input type="checkbox" aria-label="Preview rendered prompt" class="h-4 w-4 appearance-none rounded border border-rc-gray-300 bg-rc-gray-600 !accent-rc-gray-600 outline-none ring-0 checked:border-rc-gray-200 checked:bg-rc-gray-600 hover:border-rc-gray-200 hover:bg-rc-gray-600 focus:outline-none focus:ring-0 active:border-rc-gray-200 active:bg-rc-gray-600 disabled:cursor-not-allowed disabled:opacity-50"/> <span>Preview</span></label> <!></div></div> <div class="min-h-0 flex-1"><!></div></div> <!></div></div></div></div> <!>',1);function Or(V,I){et(I,!0);const{onError:_}=Ht();let C=De(ut([]));const O=P=>{try{return P?decodeURIComponent(P):""}catch{return P||""}},y=P=>encodeURIComponent(P);function k(P){return O(P).trim().replace(/^\/+|\/+$/g,"")}const f=je(()=>k(I.params.agent)),s=ut({agentId:k(I.params.agent),wsLoaded:!1,steps:[],currentStep:null,prompt:"",context:null,promptContext:null,agentStates:[],currentState:null,contextPopoverOpen:!1,edit:Rn({pathname:$e.url.pathname})});let m=null;function E(P,ne){if(typeof window>"u")return;const X=new URL(window.location.href);ne===null?X.searchParams.delete(P):X.searchParams.set(P,ne),Vt(X.toString(),{})}function M(P){ze.sendMessage({channel:"app-events",event:P})}function K(P){var ne;u(),s.currentStep=s.steps.find(X=>X.name===P)||null,s.prompt=((ne=s.currentStep)==null?void 0:ne.prompt)??"",s.currentStep?(E("step",s.currentStep.name),M({type:"step-selected",step:s.currentStep.name})):E("step",null)}function R(P){s.prompt=P,M({type:"prompt-updated",prompt:P})}const b=je(()=>{var P;return((P=s.currentStep)==null?void 0:P.schema)??null}),N=je(()=>!!j(b)&&j(b).trim().length>0);let e=De(!1);function n(){j(b)&&Ae(e,!0)}function r({value:P}){if(P===s.edit.tab)return;u();const ne=$e.url.searchParams.get("step"),X=`/edit/${y(s.agentId)}/${P}`,de=ne?`${X}?step=${y(ne)}`:X;Xe(de)}const h=je(()=>{const P=$e.url.pathname.split("/")[1];return P==="traces"?"view":P});function c({value:P}){if(P!==j(h)){if(u(),P==="edit")return Xe("/edit");if(P==="view")return Xe("/view");Xe("/"+P)}}function p(P){var ne;return s.contextPopoverOpen=!1,s.edit=Bn(s.edit,{kind:P}),((ne=s.edit.popover)==null?void 0:ne.requestId)??0}function t(P,ne){s.edit=Mn(s.edit,{requestId:P,data:ne})}function i(P,ne,X){s.edit=Kn(s.edit,{requestId:P,error:ne,data:X})}function l(){s.edit=jn(s.edit)}function o(){l(),s.contextPopoverOpen=!0}function a(){s.contextPopoverOpen=!1}function v(){s.contextPopoverOpen?a():o()}function u(){l(),a()}function w(P){return P==="analyze"?"Analyze":"Find issues"}function L(P){s.edit=Dn(s.edit,P)}function T(P){s.edit=Un(s.edit,P)}let A=null,B=De(!1),g=null;We(()=>{var ne;const P=((ne=s.currentStep)==null?void 0:ne.name)??null;P!==g&&(g=P,Ae(B,!1))});function d(P,ne){A==null||A.dispose(),A=Gn(P,ne),A.setHighlights(s.edit.highlights)}We(()=>{const P=s.edit.highlights;A==null||A.setHighlights(P)});let S=De("");We(()=>{const P=$e.url.toString();P!==j(S)&&(Ae(S,P,!0),s.edit=Fn(s.edit,{pathname:$e.url.pathname}),s.contextPopoverOpen=!1)});function D(P,ne,X){return Math.max(ne,Math.min(X,P))}function U(P){const ne=new Map;for(const X of P||[])for(const de of X.contradictingQuotes||[]){const ge=String(de||"").trim();ge&&ne.set(ge,(ne.get(ge)||0)+1)}return[...ne.entries()].map(([X,de])=>({quote:X,count:D(de,1,10)})).sort((X,de)=>de.count-X.count||X.quote.localeCompare(de.quote))}let H=De(!1);async function re(){var ne;if(j(H)||!s.currentStep)return;Ae(H,!0);const P=p("findIssues");try{const X=await rt.tests.findPromptIssues.mutate({agent:s.agentId,step:s.currentStep.name,prompt:s.prompt??""}),de=U(X.issues||[]);if(((ne=s.edit.popover)==null?void 0:ne.requestId)!==P)return;L(de);let ge=null;try{ge=JSON.stringify(X.raw,null,2)}catch{ge=null}t(P,{title:`Prompt issues — ${s.currentStep.name}`,issues:X.issues,raw:ge})}catch(X){console.error(X);const de=typeof(X==null?void 0:X.message)=="string"?X.message:(()=>{try{return JSON.stringify(X)}catch{return String(X)}})();i(P,de||"Failed to find issues in this prompt",{title:`Prompt issues failed — ${s.currentStep.name}`,raw:de})}finally{Ae(H,!1)}}function q(P){u();const ne=$e.url.searchParams.get("step"),X=`/edit/${y(P)}/${s.edit.tab}`,de=ne?`${X}?step=${y(ne)}`:X;Xe(de)}Dt({state:s,actions:{openPopover:p,setPopoverReady:t,setPopoverError:i,closePopover:l,setHighlightQuotes:L,focusQuote:T,openContextPopover:o,closeContextPopover:a,toggleContextPopover:v,sendAppEvent:M,sendChatMessage:P=>ze.sendMessage({channel:"chat",message:P}),selectState:P=>{u(),s.currentState=P,pt(),ht(),M({type:"select-agent",agent:s.agentId,state:P})}}}),lt(async()=>{try{Ae(C,await rt.agents.list.query(),!0)}catch(P){console.error("Failed to load agents",P)}ze.onClose(()=>{s.wsLoaded=!1,s.steps=[],s.currentStep=null,s.prompt="",s.context=null,s.promptContext=null,s.agentStates=[],s.currentState=null,s.contextPopoverOpen=!1,m=null}),ze.onError(P=>_(P)),ze.onMessage(P=>{if(P.channel==="app-events"){if(P.event.type==="agents-loaded"){s.wsLoaded=!0;return}if(P.event.type==="context-updated"){s.context=P.event.context,P.event.promptContext&&(s.promptContext=P.event.promptContext);return}if(P.event.type==="prompt-updated"){s.prompt=P.event.prompt??"";return}if(P.event.type==="update-states"){const ne=s.agentStates.length;s.agentStates=P.event.states,(!s.currentState&&s.agentStates.length>0||s.agentStates.length>ne)&&(s.currentState=s.agentStates[s.agentStates.length-1].id);return}if(P.event.type==="agent-selected"){s.steps=P.event.agent.steps;const ne=($e.url.searchParams.get("step")||"").trim()||null,X=ne?s.steps.find(Le=>Le.name===ne)??null:null,de=s.steps.find(Le=>Le.name.toLowerCase()==="main")??s.steps[0]??null,ge=X??de;s.currentStep=ge,s.prompt=(ge==null?void 0:ge.prompt)??"",ge?(ge.name!==ne&&E("step",ge.name),M({type:"step-selected",step:ge.name})):E("step",null);return}return}if(P.channel==="log"){Qt(P.message);return}if(P.channel==="step-trace"){qt(P.trace);return}if(P.channel==="api-call-trace"){$t(P.trace);return}if(P.channel==="conversational-trace"){zt(P.trace);return}if(P.channel==="error"){_(P.message);return}}),ze.init(),s.wsLoaded=ze.isReady()}),yt(()=>{A==null||A.dispose(),A=null}),We(()=>{s.agentId=j(f),s.wsLoaded&&s.agentId&&m!==s.agentId&&(m=s.agentId,pt(),ht(),u(),s.currentState=null,s.agentStates=[],s.context=null,s.promptContext=null,s.steps=[],s.currentStep=null,s.prompt="",M({type:"select-agent",agent:s.agentId}))});var ie=er(),ye=Ce(ie),ee=ce(ye);Wt(ee,{className:"flex-none",get agents(){return j(C)},get currentAgent(){return s.agentId},onAgentClick:q});var oe=we(ee,2),G=ce(oe),Q=ce(G);at(Q,{get value(){return j(h)},ariaLabel:"Top tabs",onChange:c,children:(P,ne)=>{var X=qn(),de=Ce(X);Je(de,{value:"edit",children:(Le,Y)=>{Ke();var J=Ve("Edit");se(Le,J)},$$slots:{default:!0}});var ge=we(de,2);Je(ge,{value:"view",children:(Le,Y)=>{Ke();var J=Ve("View");se(Le,J)},$$slots:{default:!0}}),se(P,X)},$$slots:{default:!0}}),le(G);var z=we(G,2),ue=ce(z),Ee=ce(ue);Ze(Ee,{class:"flex h-full min-w-0 flex-col !rounded-none p-0",children:(P,ne)=>{var X=Jn(),de=ce(X);{var ge=Y=>{var J=$n();se(Y,J)},Le=Y=>{var J=He(),ve=Ce(J);{var fe=pe=>{var ke=zn();se(pe,ke)},me=pe=>{var ke=He(),Ne=Ce(ke);nt(Ne,17,()=>s.steps,wt,(Be,Ge)=>{var Ie=Yn();Ie.__click=[Qn,K,Ge];var Qe=ce(Ie),qe=ce(Qe,!0);le(Qe),le(Ie),Me(()=>{var Ye;Kt(Ie,1,`my-1 w-full rounded-lg px-3 py-2 text-left text-rc-gray-200 hover:bg-rc-gray-700 ${j(Ge).name===((Ye=s.currentStep)==null?void 0:Ye.name)?"bg-rc-gray-600":"bg-transparent"}`),Fe(qe,j(Ge).name)}),se(Be,Ie)}),se(pe,ke)};Se(ve,pe=>{s.steps.length===0?pe(fe):pe(me,!1)},!0)}se(Y,J)};Se(de,Y=>{s.wsLoaded?Y(Le,!1):Y(ge)})}le(X),se(P,X)}});var _e=we(Ee,2),Te=ce(_e),x=ce(Te),F=ce(x),$=ce(F,!0);le(F),le(x);var W=we(x,2),Z=ce(W),te=ce(Z);bt(te),Ke(2),le(Z);var he=we(Z,2);{let P=je(()=>!s.currentStep||j(H));kt(he,{variant:"secondary",get disabled(){return j(P)},onclick:re,children:(ne,X)=>{Ke();var de=Ve("Find issues");se(ne,de)},$$slots:{default:!0}})}le(W),le(Te);var ae=we(Te,2),xe=ce(ae);{var Pe=P=>{var ne=He(),X=Ce(ne);Ft(X,()=>s.currentStep.name,de=>{{let ge=je(()=>s.prompt??"");fn(de,{class:"h-full min-w-0 border-thin border-rc-gray-650 bg-rc-gray-800 shadow-inner-white-soft backdrop-blur-3xl focus:outline-none focus:ring-0",get prompt(){return j(ge)},get agentId(){return s.agentId},onPromptChanged:R,get showSchemaButton(){return j(N)},onSchemaClick:n,showPreviewToggle:!1,get preview(){return j(B)},onEditorReady:d})}}),se(P,ne)},Re=P=>{Ze(P,{class:"flex h-full min-w-0 items-center justify-center !rounded-none p-4 text-sm text-rc-gray-400",children:(ne,X)=>{Ke();var de=Ve("Select a step to edit its prompt");se(ne,de)}})};Se(xe,P=>{s.currentStep?P(Pe):P(Re,!1)})}le(ae),le(_e);var Ue=we(_e,2);Ze(Ue,{class:"relative flex h-full min-w-0 flex-col overflow-hidden !rounded-none p-0",children:(P,ne)=>{var X=Zn(),de=Ce(X),ge=ce(de);at(ge,{get value(){return s.edit.tab},ariaLabel:"Mode tabs",onChange:r,children:(pe,ke)=>{var Ne=Xn(),Be=Ce(Ne);Je(Be,{value:"roleplay",children:(Ie,Qe)=>{Ke();var qe=Ve("Roleplay");se(Ie,qe)},$$slots:{default:!0}});var Ge=we(Be,2);Je(Ge,{value:"tests",children:(Ie,Qe)=>{Ke();var qe=Ve("Tests");se(Ie,qe)},$$slots:{default:!0}}),se(pe,Ne)},$$slots:{default:!0}}),le(de);var Le=we(de,2),Y=ce(Le);Ct(Y,()=>I.children),le(Le);var J=we(Le,2);{var ve=pe=>{{const ke=Be=>{Nn(Be,{})};let Ne=je(()=>w(s.edit.popover.kind));ft(pe,{get title(){return j(Ne)},onClose:l,children:ke})}};Se(J,pe=>{s.edit.popover&&pe(ve)})}var fe=we(J,2);{var me=pe=>{ft(pe,{title:"Edit context",onClose:a,children:Ne=>{Pn(Ne,{})}})};Se(fe,pe=>{s.contextPopoverOpen&&pe(me)})}se(P,X)}}),le(ue),le(z),le(oe),le(ye);var it=we(ye,2);{var ot=P=>{Bt(P,{title:"Schema",class:"!w-[80vw] !max-w-5xl",get open(){return j(e)},set open(X){Ae(e,X,!0)},children:X=>{nn(X,{class:"h-[70vh] min-w-0",get schema(){return j(b)},onChange:console.log})},$$slots:{default:!0}})};Se(it,P=>{j(b)&&P(ot)})}Me(()=>{var P;Fe($,((P=s.currentStep)==null?void 0:P.name)??"Prompt"),te.disabled=!s.currentStep}),jt(te,()=>j(B),P=>Ae(B,P)),se(V,ie),tt()}ct(["click"]);export{Or as component};
|
|
Binary file
|
|
Binary file
|