@recombine-ai/platform 0.5.0-test.0 → 0.5.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/README.md +0 -1
- package/build/agent/index.d.ts +0 -1
- package/build/agent/index.d.ts.map +1 -1
- package/build/agent/text-agent.d.ts +3 -4
- package/build/agent/text-agent.d.ts.map +1 -1
- package/build/agent/text-agent.js +1 -8
- package/build/agent/voice-agent.d.ts +3 -4
- package/build/agent/voice-agent.d.ts.map +1 -1
- package/build/agent/voice-agent.js +1 -8
- package/build/bosun/std-mocks/platform.d.ts.map +1 -1
- package/build/bosun/std-mocks/platform.js +0 -2
- package/build/bosun/test-agent.d.ts.map +1 -1
- package/build/bosun/test-agent.js +1 -2
- package/build/bosun-app/backend/server.js +1 -1
- package/build/bosun-app/backend/server.js.map +2 -2
- package/build/bosun-app/frontend/client/_app/immutable/assets/0.B5fEz2jr.css +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/assets/0.B5fEz2jr.css.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/assets/0.B5fEz2jr.css.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/9mOMnnWN.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/9mOMnnWN.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/9mOMnnWN.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/B0nqNj93.js +2 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/B0nqNj93.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/B0nqNj93.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/B1dhmiqQ.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/B1dhmiqQ.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/B1dhmiqQ.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{B9e8MCJ2.js → B9pMb6OP.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/B9pMb6OP.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/B9pMb6OP.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{NwoUwoIi.js → BBk8_Xpk.js} +2 -2
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BBk8_Xpk.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BBk8_Xpk.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{BDIIq0ko.js → BEdAvgYp.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BEdAvgYp.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BEdAvgYp.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{DsRUoWL6.js → BJ9KKLWf.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BJ9KKLWf.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BJ9KKLWf.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{BZeEhZ9x.js → BQIf5msi.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BQIf5msi.js.br +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BQIf5msi.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{DOVgTfHj.js → BW6P0Ecp.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BW6P0Ecp.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BW6P0Ecp.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{D6r2pB3T.js → BcbX6huO.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BcbX6huO.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BcbX6huO.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{CINamuM5.js → BfQeNRSV.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BfQeNRSV.js.br +3 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BfQeNRSV.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BoX_BZZY.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BoX_BZZY.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BoX_BZZY.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{BHwgmBN2.js → Bp8N7Z1t.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/Bp8N7Z1t.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/Bp8N7Z1t.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BwC8XjMu.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BwC8XjMu.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BwC8XjMu.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{9pOOTteE.js → C0rPkxmP.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/C0rPkxmP.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/C0rPkxmP.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/C3cROXCy.js +9 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/C3cROXCy.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/C3cROXCy.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{VLxbY_3V.js → C9yBjdYI.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/C9yBjdYI.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/C9yBjdYI.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{D24F_tet.js → CCYriF4C.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CCYriF4C.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CCYriF4C.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CHCMKZAC.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CHCMKZAC.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CHCMKZAC.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CKcQhCJC.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CKcQhCJC.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CKcQhCJC.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CR-uVjxM.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CR-uVjxM.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CR-uVjxM.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CR5IRTqC.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CR5IRTqC.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CR5IRTqC.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{DJFKRYxi.js → ClLUwVGq.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/ClLUwVGq.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/ClLUwVGq.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{4OgEIyh1.js → DEz15oJb.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DEz15oJb.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DEz15oJb.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{BtJ1grIE.js → DJnDF3d9.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DJnDF3d9.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DJnDF3d9.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{D35JKLYq.js → DNvczHUR.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DNvczHUR.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DNvczHUR.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DWlUaO0d.js +3 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DWlUaO0d.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DWlUaO0d.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DXsF11_5.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DXsF11_5.js.br +2 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DXsF11_5.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/Dba0_Upf.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/Dba0_Upf.js.br +2 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/Dba0_Upf.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{FLx39vZ1.js → DjujL8K1.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DjujL8K1.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DjujL8K1.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{BHU9AXbn.js → DnMQeiTY.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DnMQeiTY.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DnMQeiTY.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DuQdgMax.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DuQdgMax.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DuQdgMax.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/OERrxy3_.js +64 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/OERrxy3_.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/OERrxy3_.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/ddC1NP9R.js +2 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/ddC1NP9R.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/ddC1NP9R.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/dqHFzkrz.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/dqHFzkrz.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/dqHFzkrz.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{Csai_DUZ.js → joiJcRPz.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/joiJcRPz.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/joiJcRPz.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{DSFEfk-V.js → ouMvMh56.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/ouMvMh56.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/ouMvMh56.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/qiSVE_6c.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/qiSVE_6c.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/qiSVE_6c.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{CkCJ1-zx.js → sKHuRf4Z.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/sKHuRf4Z.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/sKHuRf4Z.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/app.D21MRecj.js +2 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/app.D21MRecj.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/app.D21MRecj.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/start.CfsLMJez.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/start.CfsLMJez.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/start.CfsLMJez.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{0.sWxZKx1V.js → 0.DTw_tt3s.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/0.DTw_tt3s.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/0.DTw_tt3s.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/1.llCYq9Hg.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/1.llCYq9Hg.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/1.llCYq9Hg.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{10.BP2gctlm.js → 10.D9R5gFET.js} +7 -7
- package/build/bosun-app/frontend/client/_app/immutable/nodes/10.D9R5gFET.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/10.D9R5gFET.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{15.D4h0JT65.js → 15.drIyAxl2.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/15.drIyAxl2.js.br +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/15.drIyAxl2.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/17.BJPfWzEW.js +3 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/17.BJPfWzEW.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/17.BJPfWzEW.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/18.vMqDwRaL.js +11 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/18.vMqDwRaL.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/18.vMqDwRaL.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{2.DaZm8LbH.js → 2.DqYksi1m.js} +3 -3
- package/build/bosun-app/frontend/client/_app/immutable/nodes/2.DqYksi1m.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/2.DqYksi1m.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/3.DY4cCysm.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/3.DY4cCysm.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/3.DY4cCysm.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{4.BWY-PEkr.js → 4.CT5azNVy.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/4.CT5azNVy.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/4.CT5azNVy.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{5.Cl70jzrZ.js → 5.D3K2hLe5.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/5.D3K2hLe5.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/5.D3K2hLe5.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{6.Cfkc99si.js → 6.C50_01kw.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/6.C50_01kw.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/6.C50_01kw.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{8.CmB3ZvKy.js → 8.BDWagOdA.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/8.BDWagOdA.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/8.BDWagOdA.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{9.8UAsXj0n.js → 9.DjkNtG73.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/9.DjkNtG73.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/9.DjkNtG73.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/version.json +1 -1
- package/build/bosun-app/frontend/client/_app/version.json.br +0 -0
- package/build/bosun-app/frontend/client/_app/version.json.gz +0 -0
- package/build/bosun-app/frontend/handler.js +4 -4
- package/build/bosun-app/frontend/index.js +4 -4
- package/build/bosun-app/frontend/server/chunks/chunks/{internal.js-BYUssiWE.js → internal.js-CZxAejkO.js} +2 -2
- package/build/bosun-app/frontend/server/chunks/chunks/{internal.js-BYUssiWE.js.map → internal.js-CZxAejkO.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/chunks/{schemas.js-b9Mui_5N.js → schemas.js-W-DP3mDr.js} +2 -187
- package/build/bosun-app/frontend/server/chunks/chunks/schemas.js-W-DP3mDr.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/chunks/{source-selection.js-BpCr9ar-.js → source-selection.js-Cc6RX6-m.js} +4 -47
- package/build/bosun-app/frontend/server/chunks/chunks/source-selection.js-Cc6RX6-m.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/chunks/{sources.server.js-DIj2VjCx.js → sources.server.js-B6fpC51P.js} +2 -2
- package/build/bosun-app/frontend/server/chunks/chunks/{sources.server.js-DIj2VjCx.js.map → sources.server.js-B6fpC51P.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/entries/endpoints/traces/api/latency/_conversationId_/{_server.ts.js-mL82mAit.js → _server.ts.js-hHR2eFvt.js} +2 -2
- package/build/bosun-app/frontend/server/chunks/entries/endpoints/traces/api/latency/_conversationId_/{_server.ts.js-mL82mAit.js.map → _server.ts.js-hHR2eFvt.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/entries/endpoints/traces/api/proxy/_...path_/{_server.ts.js-DDDiZFhL.js → _server.ts.js-CHrOiduq.js} +10 -17
- package/build/bosun-app/frontend/server/chunks/entries/endpoints/traces/api/proxy/_...path_/_server.ts.js-CHrOiduq.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/entries/endpoints/traces/api/sources/{_server.ts.js-D_UoR_Ph.js → _server.ts.js-C2FIU8Kr.js} +3 -3
- package/build/bosun-app/frontend/server/chunks/entries/endpoints/traces/api/sources/{_server.ts.js-D_UoR_Ph.js.map → _server.ts.js-C2FIU8Kr.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/entries/pages/traces/conversations/_conversationId_/latency/{_page.svelte.js-DXMXSrkC.js → _page.svelte.js-tdUdTo4m.js} +5 -5
- package/build/bosun-app/frontend/server/chunks/entries/pages/traces/conversations/_conversationId_/latency/_page.svelte.js-tdUdTo4m.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/entries/pages/traces/conversations/_conversationId_/traces/{_page.svelte.js-CZkbHRGl.js → _page.svelte.js-Ca79DBzJ.js} +9 -28
- package/build/bosun-app/frontend/server/chunks/entries/pages/traces/conversations/_conversationId_/traces/_page.svelte.js-Ca79DBzJ.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/entries/pages/traces/conversations/{_layout.svelte.js-B4Yws-GS.js → _layout.svelte.js-Dvn3tfM7.js} +35 -328
- package/build/bosun-app/frontend/server/chunks/entries/pages/traces/conversations/_layout.svelte.js-Dvn3tfM7.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/{handler-B-UxYyko.js → handler-Jnrg3wPg.js} +3 -3
- package/build/bosun-app/frontend/server/chunks/{handler-B-UxYyko.js.map → handler-Jnrg3wPg.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/{index.js-CleJzVFo.js → index.js-CHqxWZDr.js} +2 -2
- package/build/bosun-app/frontend/server/chunks/{index.js-CleJzVFo.js.map → index.js-CHqxWZDr.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/{manifest.js-C8NquSUu.js → manifest.js-DmcqihPV.js} +18 -18
- package/build/bosun-app/frontend/server/chunks/{manifest.js-C8NquSUu.js.map → manifest.js-DmcqihPV.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/nodes/0.js-AzmZoy1E.js +9 -0
- package/build/bosun-app/frontend/server/chunks/nodes/0.js-AzmZoy1E.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/nodes/1.js-DHw5LmcV.js +9 -0
- package/build/bosun-app/frontend/server/chunks/nodes/{1.js-BKMg62KW.js.map → 1.js-DHw5LmcV.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/nodes/10.js-Bma8SASV.js +9 -0
- package/build/bosun-app/frontend/server/chunks/nodes/10.js-Bma8SASV.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/nodes/{15.js-nE6nl5S8.js → 15.js-cNd06B9T.js} +2 -2
- package/build/bosun-app/frontend/server/chunks/nodes/{15.js-nE6nl5S8.js.map → 15.js-cNd06B9T.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/nodes/17.js-CDQ0obMk.js +9 -0
- package/build/bosun-app/frontend/server/chunks/nodes/17.js-CDQ0obMk.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/nodes/18.js-3gRfKzfa.js +9 -0
- package/build/bosun-app/frontend/server/chunks/nodes/18.js-3gRfKzfa.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/nodes/2.js-BxBjD7OX.js +9 -0
- package/build/bosun-app/frontend/server/chunks/nodes/2.js-BxBjD7OX.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/nodes/3.js-bfS0t-8E.js +9 -0
- package/build/bosun-app/frontend/server/chunks/nodes/3.js-bfS0t-8E.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/nodes/4.js--eSSRL0B.js +9 -0
- package/build/bosun-app/frontend/server/chunks/nodes/4.js--eSSRL0B.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/nodes/5.js-D6sqQZLO.js +9 -0
- package/build/bosun-app/frontend/server/chunks/nodes/{5.js-CqRWSoO5.js.map → 5.js-D6sqQZLO.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/nodes/6.js-DAEsXANu.js +9 -0
- package/build/bosun-app/frontend/server/chunks/nodes/6.js-DAEsXANu.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/nodes/8.js-CaZXsO-L.js +9 -0
- package/build/bosun-app/frontend/server/chunks/nodes/8.js-CaZXsO-L.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/nodes/9.js-B8aSYLuv.js +9 -0
- package/build/bosun-app/frontend/server/chunks/nodes/9.js-B8aSYLuv.js.map +1 -0
- package/build/build/build.d.ts.map +1 -1
- package/build/build/build.js +1 -3
- package/build/build/common.d.ts +0 -1
- package/build/build/common.d.ts.map +1 -1
- package/build/build/common.js +0 -12
- package/build/call-control/types.d.ts +1 -1
- package/build/call-control/types.d.ts.map +1 -1
- package/build/core/get-text-platform.d.ts +15 -0
- package/build/core/get-text-platform.d.ts.map +1 -0
- package/build/core/{make-text-platform.js → get-text-platform.js} +8 -6
- package/build/core/{make-voice-platform.d.ts → get-voice-platform.d.ts} +4 -6
- package/build/core/get-voice-platform.d.ts.map +1 -0
- package/build/core/{make-voice-platform.js → get-voice-platform.js} +8 -6
- package/build/core/index.d.ts +4 -4
- package/build/core/index.d.ts.map +1 -1
- package/build/core/index.js +2 -2
- package/build/core/platform.d.ts +0 -2
- package/build/core/platform.d.ts.map +1 -1
- package/build/engine/interfaces/other.d.ts +1 -1
- package/build/engine/interfaces/other.d.ts.map +1 -1
- package/build/engine/stream/get-client.d.ts.map +1 -1
- package/build/engine/stream/get-client.js +8 -102
- package/build/text-agent-handlers/incoming-message.d.ts +3 -2
- package/build/text-agent-handlers/incoming-message.d.ts.map +1 -1
- package/build/text-agent-handlers/incoming-message.js +8 -10
- package/build/text-agent-handlers/index.d.ts +1 -1
- package/build/text-agent-handlers/index.d.ts.map +1 -1
- package/build/text-agent-handlers/instrument.d.ts +0 -1
- package/build/text-agent-handlers/instrument.d.ts.map +1 -1
- package/build/text-agent-handlers/instrument.js +5 -5
- package/build/text-agent-handlers/jobs-handler.d.ts +3 -2
- package/build/text-agent-handlers/jobs-handler.d.ts.map +1 -1
- package/build/text-agent-handlers/jobs-handler.js +12 -9
- package/build/text-agent-handlers/jobs.d.ts +1 -1
- package/build/text-agent-handlers/jobs.d.ts.map +1 -1
- package/build/text-agent-handlers/ports.d.ts +2 -4
- package/build/text-agent-handlers/ports.d.ts.map +1 -1
- package/build/text-agent-handlers/ports.js +12 -0
- package/build/voice-agent-api/voice-http.d.ts +1 -3
- package/build/voice-agent-api/voice-http.d.ts.map +1 -1
- package/build/voice-agent-api/voice-http.js +16 -53
- package/package.json +1 -5
- package/build/agent/agent-analytics.d.ts +0 -14
- package/build/agent/agent-analytics.d.ts.map +0 -1
- package/build/agent/agent-analytics.js +0 -29
- package/build/analytics/analytics.d.ts +0 -49
- package/build/analytics/analytics.d.ts.map +0 -1
- package/build/analytics/analytics.js +0 -223
- package/build/analytics/index.d.ts +0 -7
- package/build/analytics/index.d.ts.map +0 -1
- package/build/analytics/index.js +0 -3
- package/build/analytics/postgres-analytics-query.d.ts +0 -117
- package/build/analytics/postgres-analytics-query.d.ts.map +0 -1
- package/build/analytics/postgres-analytics-query.js +0 -504
- package/build/analytics/postgres-analytics.d.ts +0 -33
- package/build/analytics/postgres-analytics.d.ts.map +0 -1
- package/build/analytics/postgres-analytics.js +0 -310
- package/build/bosun-app/frontend/client/_app/immutable/assets/0.BhaOIA8N.css +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/assets/0.BhaOIA8N.css.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/assets/0.BhaOIA8N.css.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/-ZTJLlC3.js +0 -2
- package/build/bosun-app/frontend/client/_app/immutable/chunks/-ZTJLlC3.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/-ZTJLlC3.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/0Q6TVg1G.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/0Q6TVg1G.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/0Q6TVg1G.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/4OgEIyh1.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/4OgEIyh1.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/8bHWYDyT.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/8bHWYDyT.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/8bHWYDyT.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/9pOOTteE.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/9pOOTteE.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/AlWqjAqK.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/AlWqjAqK.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/AlWqjAqK.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/B9e8MCJ2.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/B9e8MCJ2.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BDIIq0ko.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BDIIq0ko.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BFiP5U7M.js +0 -3
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BFiP5U7M.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BFiP5U7M.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BHU9AXbn.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BHU9AXbn.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BHwgmBN2.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BHwgmBN2.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BOlSQbHE.js +0 -2
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BOlSQbHE.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BOlSQbHE.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BXO2WwQx.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BXO2WwQx.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BXO2WwQx.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BZeEhZ9x.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BZeEhZ9x.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BbB1C_YH.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BbB1C_YH.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BbB1C_YH.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BtJ1grIE.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BtJ1grIE.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/C5z36vOP.js +0 -8
- package/build/bosun-app/frontend/client/_app/immutable/chunks/C5z36vOP.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/C5z36vOP.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CHNsNZYZ.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CHNsNZYZ.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CHNsNZYZ.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CINamuM5.js.br +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CINamuM5.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CR6hF_YT.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CR6hF_YT.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CR6hF_YT.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CbXT0Qet.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CbXT0Qet.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CbXT0Qet.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CkCJ1-zx.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CkCJ1-zx.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/Cm25Ihk6.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/Cm25Ihk6.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/Cm25Ihk6.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CmJrlnQL.js +0 -64
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CmJrlnQL.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CmJrlnQL.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CofRL0YY.js +0 -2
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CofRL0YY.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CofRL0YY.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/Csai_DUZ.js.br +0 -6
- package/build/bosun-app/frontend/client/_app/immutable/chunks/Csai_DUZ.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/D24F_tet.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/D24F_tet.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/D35JKLYq.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/D35JKLYq.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/D6r2pB3T.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/D6r2pB3T.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DJFKRYxi.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DJFKRYxi.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DOVgTfHj.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DOVgTfHj.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DPfKTQVx.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DPfKTQVx.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DPfKTQVx.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DSFEfk-V.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DSFEfk-V.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DbY589nb.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DbY589nb.js.br +0 -2
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DbY589nb.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DfEgi1lN.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DfEgi1lN.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DfEgi1lN.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DsRUoWL6.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DsRUoWL6.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/FLx39vZ1.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/FLx39vZ1.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/NwoUwoIi.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/NwoUwoIi.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/VLxbY_3V.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/VLxbY_3V.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/uEzaTD9T.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/uEzaTD9T.js.br +0 -2
- package/build/bosun-app/frontend/client/_app/immutable/chunks/uEzaTD9T.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/app.fITODAfp.js +0 -2
- package/build/bosun-app/frontend/client/_app/immutable/entry/app.fITODAfp.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/app.fITODAfp.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/start.CuqUO5EQ.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/entry/start.CuqUO5EQ.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/start.CuqUO5EQ.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/0.sWxZKx1V.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/0.sWxZKx1V.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/1.PQXY4edq.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/1.PQXY4edq.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/1.PQXY4edq.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/10.BP2gctlm.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/10.BP2gctlm.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/15.D4h0JT65.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/15.D4h0JT65.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/17.D5wsHo5R.js +0 -3
- package/build/bosun-app/frontend/client/_app/immutable/nodes/17.D5wsHo5R.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/17.D5wsHo5R.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/18.CZp-IBH8.js +0 -11
- package/build/bosun-app/frontend/client/_app/immutable/nodes/18.CZp-IBH8.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/18.CZp-IBH8.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/2.DaZm8LbH.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/2.DaZm8LbH.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/3.Bk3buFqf.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/3.Bk3buFqf.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/3.Bk3buFqf.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/4.BWY-PEkr.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/4.BWY-PEkr.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/5.Cl70jzrZ.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/5.Cl70jzrZ.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/6.Cfkc99si.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/6.Cfkc99si.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/8.CmB3ZvKy.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/8.CmB3ZvKy.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/9.8UAsXj0n.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/9.8UAsXj0n.js.gz +0 -0
- package/build/bosun-app/frontend/server/chunks/chunks/schemas.js-b9Mui_5N.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/chunks/source-selection.js-BpCr9ar-.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/entries/endpoints/traces/api/proxy/_...path_/_server.ts.js-DDDiZFhL.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/entries/pages/traces/conversations/_conversationId_/latency/_page.svelte.js-DXMXSrkC.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/entries/pages/traces/conversations/_conversationId_/traces/_page.svelte.js-CZkbHRGl.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/entries/pages/traces/conversations/_layout.svelte.js-B4Yws-GS.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/nodes/0.js-BUVJh5Uv.js +0 -9
- package/build/bosun-app/frontend/server/chunks/nodes/0.js-BUVJh5Uv.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/nodes/1.js-BKMg62KW.js +0 -9
- package/build/bosun-app/frontend/server/chunks/nodes/10.js-Bz0enUzA.js +0 -9
- package/build/bosun-app/frontend/server/chunks/nodes/10.js-Bz0enUzA.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/nodes/17.js-CplX6Ruz.js +0 -9
- package/build/bosun-app/frontend/server/chunks/nodes/17.js-CplX6Ruz.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/nodes/18.js-cGVVSoEn.js +0 -9
- package/build/bosun-app/frontend/server/chunks/nodes/18.js-cGVVSoEn.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/nodes/2.js-CliMdUrH.js +0 -9
- package/build/bosun-app/frontend/server/chunks/nodes/2.js-CliMdUrH.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/nodes/3.js-BQpmmrUv.js +0 -9
- package/build/bosun-app/frontend/server/chunks/nodes/3.js-BQpmmrUv.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/nodes/4.js-BgSyMW3D.js +0 -9
- package/build/bosun-app/frontend/server/chunks/nodes/4.js-BgSyMW3D.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/nodes/5.js-CqRWSoO5.js +0 -9
- package/build/bosun-app/frontend/server/chunks/nodes/6.js-CrEQ411L.js +0 -9
- package/build/bosun-app/frontend/server/chunks/nodes/6.js-CrEQ411L.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/nodes/8.js-CiOj2-c5.js +0 -9
- package/build/bosun-app/frontend/server/chunks/nodes/8.js-CiOj2-c5.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/nodes/9.js-BMwqRSfy.js +0 -9
- package/build/bosun-app/frontend/server/chunks/nodes/9.js-BMwqRSfy.js.map +0 -1
- package/build/core/make-text-platform.d.ts +0 -17
- package/build/core/make-text-platform.d.ts.map +0 -1
- package/build/core/make-voice-platform.d.ts.map +0 -1
- package/build/voice-agent-api/call-end.d.ts +0 -19
- package/build/voice-agent-api/call-end.d.ts.map +0 -1
- package/build/voice-agent-api/call-end.js +0 -58
- /package/build/bosun-app/frontend/client/_app/immutable/assets/{Modal.iiWNRlR-.css → ReadOnlyMonacoDiff.iiWNRlR-.css} +0 -0
- /package/build/bosun-app/frontend/client/_app/immutable/assets/{Modal.iiWNRlR-.css.br → ReadOnlyMonacoDiff.iiWNRlR-.css.br} +0 -0
- /package/build/bosun-app/frontend/client/_app/immutable/assets/{Modal.iiWNRlR-.css.gz → ReadOnlyMonacoDiff.iiWNRlR-.css.gz} +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DLQqXQ6R.js","./C1FmrZbK.js","../assets/editor.BMIWPGx3.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{d as Dt,b as be,a as o,f as y,t as U}from"./CCYriF4C.js";import{a as Et,o as Vt}from"./DnMQeiTY.js";import{p as ht,f as Fe,c as i,j as e,s as d,r as s,t as J,y as a,a as pt,w as j,n as c,o as Z,d as Ct,x as Wt}from"./CR-uVjxM.js";import{s as H}from"./B0nqNj93.js";import{i as I}from"./BQIf5msi.js";import{s as We,c as Jt}from"./C9yBjdYI.js";import{M as vt,R as jt}from"./C3cROXCy.js";import{T as mt,a as Pe}from"./BEdAvgYp.js";import{B as rt}from"./joiJcRPz.js";import{I as Lt}from"./BBk8_Xpk.js";import{R as tt}from"./sKHuRf4Z.js";import{c as At}from"./CR5IRTqC.js";import{p as pe}from"./BcbX6huO.js";import{t as St}from"./CKcQhCJC.js";import{i as it}from"./DgGeUDDh.js";import{c as Gt}from"./ouMvMh56.js";import{_ as Xt}from"./C1FmrZbK.js";import{b as Yt}from"./ClLUwVGq.js";import{e as Kt,a as Qt}from"./BU7aeYn4.js";function Ot(f={}){const t=f.thresholdPx??4,N=f.dragCursor??"text";let D=0,T=0,p=!1,w=!1,v=null,k=null;function E(){w=!1,p=!1,v==null||v.style.removeProperty("cursor"),v=null,k==null||k.abort(),k=null}function B(M){if(typeof window>"u"||M.button!==0)return;k==null||k.abort(),k=null,v==null||v.style.removeProperty("cursor"),D=M.clientX,T=M.clientY,p=!1,w=!0,v=M.currentTarget instanceof HTMLElement?M.currentTarget:null;const _=new AbortController;k=_;const fe=ve=>{if(!w||p)return;const te=Math.abs(ve.clientX-D),Me=Math.abs(ve.clientY-T);te+Me<t||(p=!0,v==null||v.style.setProperty("cursor",N))},oe=()=>{w=!1,v==null||v.style.removeProperty("cursor"),v=null,_.abort(),k===_&&(k=null)};window.addEventListener("pointermove",fe,{signal:_.signal}),window.addEventListener("pointerup",oe,{signal:_.signal}),window.addEventListener("pointercancel",oe,{signal:_.signal})}function ee(M){return M.detail>0&&p}return{onPointerDown:B,shouldSuppressClick:ee,cleanup:E}}var Zt=y('<span class="text-[13px] leading-none text-rc-gray-400"> </span>'),$t=y('<div class="rounded-md border border-red-500 bg-red-950/40 p-3 font-mono text-sm text-red-200"> </div>'),er=y("<!> <!>",1),tr=y('<div class="flex flex-col gap-3"><!> <div class="flex flex-wrap items-center justify-between gap-2 text-sm text-rc-gray-200"><div class="flex flex-wrap items-center gap-x-4 gap-y-1"><div><span class="text-rc-gray-400">Timing:</span> </div> <div><span class="text-rc-gray-400">Response time:</span> </div> <div><span class="text-rc-gray-400">URL:</span> </div></div> <!></div> <div><!> <div class="mt-2 h-[55vh]"><!></div></div></div>'),rr=y('<button type="button" class="flex w-full cursor-pointer select-text items-baseline gap-2 truncate rounded-md bg-transparent px-2 py-1 text-left text-sm text-rc-gray-200 hover:bg-rc-gray-800/40"><!> <!> <span> </span></button> <!>',1);function gn(f,t){ht(t,!0);let N=j(!1),D=j("request");const T=Ot();Et(T.cleanup);function p(A){try{if(typeof A=="string"){const P=A.trim();if(!P)return"";const $=JSON.parse(P);return JSON.stringify($,null,2)}}catch{}try{return JSON.stringify(A??null,null,2)}catch{return String(A)}}function w(A){return new Date(A).toISOString()}function v(A){if(typeof A!="number"||!Number.isFinite(A))return null;const P=new Date(A);if(Number.isNaN(P.getTime()))return null;const $=String(P.getHours()).padStart(2,"0"),Ie=String(P.getMinutes()).padStart(2,"0"),ye=String(P.getSeconds()).padStart(2,"0");return`${$}:${Ie}:${ye}`}const k=c(()=>v(t.trace.createdAt)),E=c(()=>{if(t.trace.error!=null)return t.trace.error;if(!(t.trace.ok===!1||typeof t.trace.status=="number"&&t.trace.status>=400))return;const P=t.trace.response;return P&&typeof P=="object"&&"error"in P&&P.error!=null?P.error:{status:t.trace.status,ok:t.trace.ok}}),B=c(()=>e(E)!=null),ee=c(()=>`API: ${t.trace.operationName}`),M=c(()=>t.trace.operationName),_=c(()=>typeof t.trace.createdAt!="number"?"—":w(t.trace.createdAt));async function fe(){const A=p(t.trace);try{await navigator.clipboard.writeText(A)}catch(P){console.error("Failed to copy",P)}}const oe=c(()=>p({method:t.trace.method,path:t.trace.path,baseUrl:t.trace.baseUrl,request:t.trace.request})),ve=c(()=>p({status:t.trace.status,ok:t.trace.ok,response:t.trace.response,error:e(E)})),te=c(()=>e(E)!=null?p(e(E)):"");var Me=rr(),ge=Fe(Me),V=i(ge);{let A=c(()=>e(B)?"close":"checkmark"),P=c(()=>e(B)?"self-center text-red-400":"self-center text-rc-green-200");Lt(V,{get name(){return e(A)},width:18,height:18,get class(){return e(P)}})}var He=d(V,2);{var nt=A=>{var P=Zt(),$=i(P,!0);s(P),J(()=>H($,e(k))),o(A,P)};I(He,A=>{e(k)&&A(nt)})}var Le=d(He,2),qe=i(Le,!0);s(Le),s(ge);var ze=d(ge,2);{var Qe=A=>{vt(A,{get title(){return e(ee)},class:"!w-[85vw] !max-w-5xl",get open(){return e(N)},set open($){a(N,$,!0)},children:$=>{var Ie=tr(),ye=i(Ie);{var Ne=x=>{var L=$t(),O=i(L,!0);s(L),J(()=>H(O,e(te))),o(x,L)};I(ye,x=>{e(te)&&x(Ne)})}var De=d(ye,2),m=i(De),C=i(m),R=d(i(C));s(C);var K=d(C,2),xe=d(i(K));s(K);var Ce=d(K,2),Se=d(i(Ce));s(Ce),s(m);var Ue=d(m,2);rt(Ue,{variant:"secondary",size:"small",onclick:fe,children:(x,L)=>{Z();var O=U("Copy raw trace");o(x,O)},$$slots:{default:!0}}),s(De);var le=d(De,2),ce=i(le);mt(ce,{get value(){return e(D)},ariaLabel:"API trace tabs",onChange:({value:x})=>a(D,x,!0),children:(x,L)=>{var O=er(),W=Fe(O);Pe(W,{value:"request",class:"px-3",children:(Q,re)=>{Z();var ne=U("Request");o(Q,ne)},$$slots:{default:!0}});var ie=d(W,2);Pe(ie,{value:"response",class:"px-3",children:(Q,re)=>{Z();var ne=U("Response");o(Q,ne)},$$slots:{default:!0}}),o(x,O)},$$slots:{default:!0}});var Te=d(ce,2),Oe=i(Te);{var Be=x=>{tt(x,{get value(){return e(oe)},language:"json",class:"h-full"})},u=x=>{tt(x,{get value(){return e(ve)},language:"json",class:"h-full"})};I(Oe,x=>{e(D)==="request"?x(Be):x(u,-1)})}s(Te),s(le),s(Ie),J(x=>{H(R,` ${e(_)??""}`),H(xe,` ${x??""}`),H(Se,` ${t.trace.path??""}`)},[()=>typeof t.trace.durationMs=="number"?`${Math.round(t.trace.durationMs)}ms`:"—"]),o($,Ie)},$$slots:{default:!0}})};I(ze,A=>{e(N)&&A(Qe)})}J(()=>{We(Le,1,Jt(e(B)?"text-red-200":"")),H(qe,e(M))}),be("pointerdown",ge,function(...A){var P;(P=T.onPointerDown)==null||P.apply(this,A)}),be("click",ge,A=>{T.shouldSuppressClick(A)||a(N,!0)}),o(f,Me),pt()}Dt(["pointerdown","click"]);function nr(f){return xt(f)&&xt(f.context)?gt(f.context):gt(f)}function Ft(f){if(!(!xt(f)||!xt(f.mocks)))return gt(f.mocks)}function gt(f){return xt(f)?ar(f):{}}function xt(f){return!!f&&typeof f=="object"&&!Array.isArray(f)}function ar(f){try{return structuredClone(f)}catch{try{return JSON.parse(JSON.stringify(f))}catch{return f}}}function Ht(f){return!("operationName"in f)&&!("eventName"in f)}function or(f){return Ht(f)&&it(f.name)}function ir(f,t,N={}){if(t<0)return null;const D=T=>or(T)?N.requireRenderedPrompt?typeof T.renderedPrompt=="string"&&T.renderedPrompt.trim().length>0:!0:!1;return[...f.slice(0,t)].reverse().find(D)??f.slice(t+1).find(D)??null}function sr(f,t){return t<=0?null:[...f.slice(0,t)].reverse().map(N=>{var D;return Ht(N)?(D=N.stringifiedConversation)==null?void 0:D.trim():""}).find(Boolean)??null}function lr({entries:f,trace:t,sourceStep:N,fallbackRuntimeContext:D,requireReceivedContext:T=!1}){const p=f.indexOf(t);if(p===-1)throw new Error("Could not locate the response in its trace history");const w=N??ir(f,p);if(T&&typeof(w==null?void 0:w.receivedContext)>"u")throw new Error("The source step trace does not have receivedContext");const v=typeof(w==null?void 0:w.stringifiedConversation)=="string"&&w.stringifiedConversation.trim()?w.stringifiedConversation:sr(f,p)??"",k=(t.content??"").trim(),E=w&&typeof w.receivedContext<"u"?gt(w.receivedContext):nr(D),B=Ft(D);return{pinned:"TRUE",step:"main",evaluation_mode:"assertion",context_mode:"replace",assertion_type:"llm-rubric",assertion_value:"",conversation:v,expected_output:k,similarity_threshold:"60",timeout:"0",context:E,...typeof B<"u"?{mocks:B}:{}}}function cr(f,{fallbackConversation:t="",fallbackRuntimeContext:N}={}){var v;if(typeof f.receivedContext>"u")throw new Error("The source step trace does not have receivedContext");const D=(f.response??"").trim();if(!D)throw new Error("The source step trace does not have a response");const T=(v=f.stringifiedConversation)!=null&&v.trim()?f.stringifiedConversation:t??"",p=dr(D)?"json-deep-equal":"assertion",w=Ft(N);return{pinned:"TRUE",step:it(f.name)?"main":f.name,evaluation_mode:p,context_mode:"replace",assertion_type:"llm-rubric",assertion_value:"",conversation:T,expected_output:D,similarity_threshold:"60",timeout:"0",context:gt(f.receivedContext),...typeof w<"u"?{mocks:w}:{}}}function dr(f){try{const t=JSON.parse(f);return typeof t=="object"&&t!==null}catch{return!1}}var ur=y('<div><div class="h-full w-full"></div></div>');function Pt(f,t){ht(t,!0);let N=pe(t,"language",3,"plaintext"),D=pe(t,"class",3,""),T=j(null),p=null,w=null,v=null,k=null,E=j(!1);Vt(()=>{if(!e(T))return;Kt();let M=!1;return Xt(()=>import("./DLQqXQ6R.js").then(_=>_.e),__vite__mapDeps([0,1,2]),import.meta.url).then(_=>{if(M)return;Qt(_),w=_,p=_.editor.createDiffEditor(e(T),{theme:"bosun-dark",readOnly:!1,originalEditable:!1,automaticLayout:!0,lineNumbers:"on",renderSideBySide:!0,renderIndicators:!0,ignoreTrimWhitespace:!1,diffWordWrap:"on",diffAlgorithm:"advanced",maxComputationTime:2e4,renderMarginRevertIcon:!1,renderGutterMenu:!1,minimap:{enabled:!1},scrollBeyondLastLine:!1,wordWrap:"on",overviewRulerBorder:!1,hideCursorInOverviewRuler:!0,matchBrackets:"never",bracketPairColorization:{enabled:!1},guides:{highlightActiveBracketPair:!1,bracketPairs:!1,bracketPairsHorizontal:!1},occurrencesHighlight:"off",selectionHighlight:!1,renderLineHighlight:"none"});const fe=_.editor.createModel(t.original??"",N()),oe=_.editor.createModel(t.modified??"",N());v={original:fe,modified:oe},p.setModel(v),k=oe.onDidChangeContent(()=>{var te;const ve=oe.getValue();ve!==t.modified&&((te=t.onChange)==null||te.call(t,ve))}),a(E,!0)}).catch(_=>{console.error("EditableMonacoDiff: failed to initialise",_)}),()=>{if(M=!0,k==null||k.dispose(),k=null,p){try{p.setModel(null)}catch{}p.dispose(),p=null}v==null||v.original.dispose(),v==null||v.modified.dispose(),v=null,w=null}}),Ct(()=>{if(!v||!e(E))return;const M=t.original??"",_=t.modified??"";v.original.getValue()!==M&&v.original.setValue(M),v.modified.getValue()!==_&&v.modified.setValue(_)}),Ct(()=>{if(!v||!e(E)||!w)return;const M=N()||"plaintext";v.original.getLanguageId()!==M&&w.editor.setModelLanguage(v.original,M),v.modified.getLanguageId()!==M&&w.editor.setModelLanguage(v.modified,M)});var B=ur(),ee=i(B);Yt(ee,M=>a(T,M),()=>e(T)),s(B),J(()=>We(B,1,`overflow-hidden rounded-md border border-rc-gray-700 ${D()}`)),o(f,B),pt()}var fr=y('<div class="flex flex-1 items-center justify-center text-rc-gray-200">Removing personal data...</div>'),vr=y('<div class="flex flex-1 flex-col items-center justify-center gap-4"><div class="max-w-2xl text-center text-red-300"> </div> <div class="flex flex-wrap justify-center gap-2"><!> <!></div></div>'),mr=y('<div class="text-xs text-rc-gray-500"> </div>'),gr=y('<div class="rounded-md border border-amber-600 bg-amber-950/30 px-3 py-2 text-sm text-amber-200"> </div>'),xr=y("<!> <!> <!> <!>",1),hr=y('<div class="flex flex-wrap items-center justify-between gap-2 text-sm"><div class="text-rc-gray-200"><!></div> <!></div> <!> <div class="flex min-h-0 flex-1 flex-col"><!> <div class="mt-2 min-h-0 flex-1"><!></div></div>',1),pr=y('<div class="flex h-[70vh] min-h-[32rem] flex-col gap-3"><!></div>'),_r=y("<!> <!>",1);function qt(f,t){ht(t,!0);let N=pe(t,"open",15,!1),D=pe(t,"region",3,null),T=j("idle"),p=j(""),w=j(""),v=j(!1),k=j("conversation"),E=j(""),B=j(null),ee=j(null),M=j(Wt([])),_=j(""),fe=j(""),oe=j(""),ve=j("{}"),te=j("{}"),Me=null,ge=0;const V=c(()=>{var m;return typeof((m=e(ee))==null?void 0:m.mocks)<"u"}),He=c(()=>e(M).reduce((m,C)=>m+C.paths.length,0)),nt=c(()=>{var m;return((m=e(B))==null?void 0:m.conversation)??""}),Le=c(()=>{var m;return((m=e(B))==null?void 0:m.expected_output)??""}),qe=c(()=>{var m;return Ne(((m=e(B))==null?void 0:m.context)??{})}),ze=c(()=>{var m;return Ne(((m=e(B))==null?void 0:m.mocks)??{})});Ct(()=>{const m=N(),C=t.seed;!m||!C||Me===C||(Me=C,Qe(C))}),Ct(()=>{N()||(ge+=1,a(T,"idle"),a(p,""),a(w,""),a(v,!1),Me=null,a(E,""),a(B,null),a(ee,null),a(M,[],!0),a(_,""),a(k,"conversation"))});async function Qe(m){const C=++ge;a(T,"preparing"),a(p,""),a(w,""),a(v,!1),a(B,m,!0),a(ee,null),a(E,""),a(M,[],!0);try{const R=await St.tests.createPiiSanitizedTestDraft.mutate({agent:t.agent,region:D(),seed:m});if(C!==ge)return;if(R.status==="sanitizer-error"){a(p,R.message,!0),a(w,R.aiResponse,!0),a(T,"error");return}P(R.draftId,R.seed,R.findings,R.model),a(T,"ready")}catch(R){if(C!==ge)return;console.error("Failed to prepare PII-sanitised test draft",R),a(p,De(R,"Could not prepare a PII-sanitised test draft."),!0),a(T,"error")}}async function A(){if(e(w))try{await navigator.clipboard.writeText(e(w)),a(v,!0)}catch(m){console.error("Failed to copy PII sanitiser AI response",m),a(p,"Could not copy the AI response to the clipboard.")}}function P(m,C,R,K=e(_)){a(E,m,!0),a(ee,C,!0),a(M,R,!0),a(_,K,!0),a(fe,C.conversation,!0),a(oe,C.expected_output,!0),a(ve,Ne(C.context),!0),a(te,Ne(C.mocks??{}),!0),e(k)==="mocks"&&typeof C.mocks>"u"&&a(k,"conversation")}async function $(){var C,R;if(!e(ee)||!e(E)||e(T)!=="ready")return;const m=window.open("about:blank","_blank");m&&(m.opener=null),a(T,"creating"),a(p,"");try{const K=Ie(),xe=await St.tests.createTestFromPiiSanitizedTestDraft.mutate({agent:t.agent,region:D(),draftId:e(E),reviewed:K}),Ce=new URLSearchParams({step:xe.test.step||e(ee).step||"main",test:xe.test.id});(C=D())!=null&&C.trim()&&Ce.set("region",D().trim());const Se=`/edit/${encodeURIComponent(t.agent)}/tests?${Ce.toString()}`;m?m.location.replace(Se):window.open(Se,"_blank","noopener"),N(!1),(R=t.onCreated)==null||R.call(t,xe.test)}catch(K){m==null||m.close(),console.error("Failed to create test from PII-sanitised draft",K),a(p,De(K,"Could not create the test."),!0),a(T,"ready")}}function Ie(){const m=ye(e(ve),"Context"),C=e(V)?ye(e(te),"Mocks"):void 0;return{conversation:e(fe),expected_output:e(oe),context:m,...typeof C>"u"?{}:{mocks:C}}}function ye(m,C){let R;try{R=JSON.parse(m)}catch{throw new Error(`${C} must be valid JSON.`)}if(!R||typeof R!="object"||Array.isArray(R))throw new Error(`${C} must be a JSON object.`);return R}function Ne(m){return JSON.stringify(m??{},null,2)}function De(m,C){return m instanceof Error&&m.message.trim()?m.message:C}vt(f,{title:"Review test before creating",class:"!w-[94vw] !max-w-[90rem]",get open(){return N()},set open(R){N(R)},children:R=>{var K=pr(),xe=i(K);{var Ce=le=>{var ce=fr();o(le,ce)},Se=le=>{var ce=vr(),Te=i(ce),Oe=i(Te,!0);s(Te);var Be=d(Te,2),u=i(Be);rt(u,{variant:"secondary",onclick:()=>t.seed&&Qe(t.seed),children:(O,W)=>{Z();var ie=U("Try again");o(O,ie)},$$slots:{default:!0}});var x=d(u,2);{var L=O=>{rt(O,{variant:"secondary",onclick:A,children:(W,ie)=>{Z();var Q=U();J(()=>H(Q,e(v)?"AI response copied":"Copy AI response")),o(W,Q)},$$slots:{default:!0}})};I(x,O=>{e(w)&&O(L)})}s(Be),s(ce),J(()=>H(Oe,e(p))),o(le,ce)},Ue=le=>{var ce=hr(),Te=Fe(ce),Oe=i(Te),Be=i(Oe);{var u=S=>{var F=U("No personal data replacements were proposed.");o(S,F)},x=S=>{var F=U();J(()=>H(F,`${e(He)??""} personal data ${e(He)===1?"replacement":"replacements"} proposed.`)),o(S,F)};I(Be,S=>{e(He)===0?S(u):S(x,-1)})}s(Oe);var L=d(Oe,2);{var O=S=>{var F=mr(),z=i(F);s(F),J(()=>H(z,`Model: ${e(_)??""}`)),o(S,F)};I(L,S=>{e(_)&&S(O)})}s(Te);var W=d(Te,2);{var ie=S=>{var F=gr(),z=i(F,!0);s(F),J(()=>H(z,e(p))),o(S,F)};I(W,S=>{e(p)&&S(ie)})}var Q=d(W,2),re=i(Q);mt(re,{get value(){return e(k)},ariaLabel:"PII-sanitised test draft fields",onChange:({value:S})=>a(k,S,!0),children:(S,F)=>{var z=xr(),b=Fe(z);Pe(b,{value:"conversation",class:"px-3",children:(he,Ve)=>{Z();var ke=U("Conversation");o(he,ke)},$$slots:{default:!0}});var X=d(b,2);Pe(X,{value:"expected_output",class:"px-3",children:(he,Ve)=>{Z();var ke=U("Expected output");o(he,ke)},$$slots:{default:!0}});var ae=d(X,2);Pe(ae,{value:"context",class:"px-3",children:(he,Ve)=>{Z();var ke=U("Context");o(he,ke)},$$slots:{default:!0}});var we=d(ae,2);{var Ye=he=>{Pe(he,{value:"mocks",class:"px-3",children:(Ve,ke)=>{Z();var at=U("Mocks");o(Ve,at)},$$slots:{default:!0}})};I(we,he=>{e(V)&&he(Ye)})}o(S,z)},$$slots:{default:!0}});var ne=d(re,2),G=i(ne);{var se=S=>{Pt(S,{get original(){return e(nt)},get modified(){return e(fe)},onChange:F=>a(fe,F,!0),language:"plaintext",class:"h-full"})},Ee=S=>{Pt(S,{get original(){return e(Le)},get modified(){return e(oe)},onChange:F=>a(oe,F,!0),language:"plaintext",class:"h-full"})},Ge=S=>{Pt(S,{get original(){return e(qe)},get modified(){return e(ve)},onChange:F=>a(ve,F,!0),language:"json",class:"h-full"})},Xe=S=>{Pt(S,{get original(){return e(ze)},get modified(){return e(te)},onChange:F=>a(te,F,!0),language:"json",class:"h-full"})};I(G,S=>{e(k)==="conversation"?S(se):e(k)==="expected_output"?S(Ee,1):e(k)==="context"?S(Ge,2):S(Xe,-1)})}s(ne),s(Q),o(le,ce)};I(xe,le=>{e(T)==="preparing"?le(Ce):e(T)==="error"&&!e(ee)?le(Se,1):e(ee)&&e(B)&&le(Ue,2)})}s(K),o(R,K)},footer:R=>{var K=_r(),xe=Fe(K);rt(xe,{variant:"secondary",onclick:()=>N(!1),children:(Se,Ue)=>{Z();var le=U("Cancel");o(Se,le)},$$slots:{default:!0}});var Ce=d(xe,2);{let Se=c(()=>!e(ee)||e(T)==="preparing"||e(T)==="creating");rt(Ce,{get disabled(){return e(Se)},onclick:$,children:(Ue,le)=>{Z();var ce=U();J(()=>H(ce,e(T)==="creating"?"Creating…":"Create test")),o(Ue,ce)},$$slots:{default:!0}})}o(R,K)},$$slots:{default:!0,footer:!0}}),pt()}var br=y('<span class="text-[13px] leading-none text-rc-gray-400"> </span>'),yr=y('<span><span class="cursor-pointer" title="Show prompt-cache calc"> </span></span>'),wr=y("<span> </span>"),kr=y('<div class="mb-2 ml-7 max-w-[83%]"><button type="button" class="block w-full cursor-pointer overflow-hidden rounded-lg border border-rc-gray-110 bg-rc-gray-800 p-3 text-left hover:bg-rc-gray-700"><pre class="truncate whitespace-pre font-mono text-sm text-rc-gray-100"> </pre></button> <div class="mt-1 flex items-center"><button type="button" class="inline-flex items-center rounded border-0 bg-transparent px-1 py-0.5 text-rc-gray-400 transition-colors hover:bg-rc-gray-900 hover:text-rc-gray-200 disabled:cursor-not-allowed disabled:opacity-50"> </button></div></div>'),Pr=y('<div class="rounded-md border border-red-500 bg-red-950/40 p-3 font-mono text-sm text-red-200"> </div>'),Cr=y("<!> <!> <!> <!> <!>",1),Sr=y('<div class="flex h-full flex-col gap-2"><div class="grid grid-cols-2 gap-2"><div class="flex items-center justify-start"><!></div> <div class="flex items-center justify-end"><!></div></div> <!></div>'),Tr=y('<div class="flex flex-col gap-3"><!> <div class="flex flex-wrap items-center gap-x-4 gap-y-1 text-sm text-rc-gray-200"><div><span class="text-rc-gray-400">Timing:</span> </div> <div><span class="text-rc-gray-400">Response time:</span> —</div> <div><span class="text-rc-gray-400">Model:</span> </div></div> <div><!> <div class="mt-2 h-[55vh]"><!></div></div></div>'),Mr=y("<!> <!>",1),Ir=y('<div class="flex h-[65vh] min-h-0 flex-col gap-2"><!> <div class="min-h-0 flex-1"><!></div></div>'),Nr=y('<div class="flex w-full select-text items-baseline gap-2 truncate rounded-md bg-transparent px-2 py-1 text-left text-sm text-rc-gray-200 hover:bg-rc-gray-800/40"><button type="button" class="flex min-w-0 cursor-pointer items-baseline gap-2 truncate bg-transparent p-0 text-left text-sm text-rc-gray-200"><!> <!> <span> </span></button> <!> <!></div> <!> <!> <!> <!>',1);function xn(f,t){ht(t,!0);let N=pe(t,"region",3,null),D=pe(t,"promptEditProposalId",3,null),T=pe(t,"fallbackConversation",3,null),p=j(!1),w=j(!1),v=j("diff"),k=j("response"),E=j("idle"),B=j(!1),ee=j(null);const M=Ot();Et(M.cleanup);function _(r){return r&&typeof r.renderedPrompt=="string"?r.renderedPrompt:null}function fe(r,n){if(r===n)return r.length;const l=Math.min(r.length,n.length);for(let g=0;g<l;g++)if(r.charCodeAt(g)!==n.charCodeAt(g))return g;return l}function oe(r,n){const l=Math.max(r.length,n.length);if(l===0)return 100;const g=fe(r,n);return Math.floor(g/l*100)}function ve(r,n){const l=r.length,g=n.length,h=fe(r,n),q=Math.max(l,g),ue=q===0?100:Math.floor(h/q*100);return{currentLength:l,baselineLength:g,commonPrefixLength:h,denom:q,similarityPct:ue}}function te(r,n){const h=r.slice(0,600),q=r.slice(Math.max(h.length,r.length-600)),ue=Math.max(0,r.length-h.length-q.length);return{length:r.length,head:h,tail:q,omittedChars:ue}}function Me(r){const n=r.llmUsage;return!n||typeof n.promptTokens!="number"||!Number.isFinite(n.promptTokens)||n.promptTokens<=0||typeof n.cachedPromptTokens!="number"||!Number.isFinite(n.cachedPromptTokens)||n.cachedPromptTokens<0?null:Math.max(0,Math.min(100,Math.floor(n.cachedPromptTokens/n.promptTokens*100)))}function ge(r){const n=new WeakSet;try{return JSON.stringify(r,(l,g)=>{if(typeof g=="bigint")return g.toString();if(g instanceof Error)return{name:g.name,message:g.message,stack:g.stack};if(typeof g=="object"&&g!==null){if(n.has(g))return"[Circular]";n.add(g)}return g},2)??""}catch{return String(r)}}function V(r){if(r==null)return"";if(typeof r=="string"){const n=r.trim();if(!n)return"";try{return JSON.stringify(JSON.parse(n),null,2)}catch{return r}}return ge(r)}function He(r){var Re,je,_e;const n=V(r),l=n.split(`
|
|
3
|
+
`);if(l.length<=1)return n;const g=(Re=l[0])==null?void 0:Re.trim(),h=(je=l.slice(1).find(bt=>bt.trim()))==null?void 0:je.trim();if(!g||!h)return n;const q=g==="["?"]":"}";if(l.length===3&&((_e=l.at(-1))==null?void 0:_e.trim())===q)return`${g} ${h} ${q}`;const ue=h.endsWith("{")?" }":h.endsWith("[")?" ]":"";return`${g} ${h} …${ue} ${q}`}function nt(r){return new Date(r).toISOString()}function Le(r){if(typeof r!="number"||!Number.isFinite(r))return null;const n=new Date(r);if(Number.isNaN(n.getTime()))return null;const l=String(n.getHours()).padStart(2,"0"),g=String(n.getMinutes()).padStart(2,"0"),h=String(n.getSeconds()).padStart(2,"0");return`${l}:${g}:${h}`}const qe=c(()=>Le(t.trace.createdAt)),ze=c(()=>t.trace.error!=null),Qe=c(()=>`AI: ${t.trace.name}`),A=c(()=>t.trace.name),P=c(()=>{if(!it(t.trace.name))return null;const r=_(t.trace),n=_(t.compareTrace);return r==null||n==null?null:oe(r,n)}),$=c(()=>it(t.trace.name)?Me(t.trace):null),Ie=90,ye=90,Ne=/<break\b[^>]*\/?>/i,De='<break /> tag disables streaming and increases latency. If pauses are not large enough, use "..." instead.';function m(r){return typeof r=="string"&&Ne.test(r)}const C=c(()=>it(t.trace.name)?e($)!=null?e($)===0&&e(P)!=null&&e(P)>=ye?{text:"0% tokens cached. Cache miss",className:"text-red-200"}:e($)>=Ie?{text:`${e($)}% tokens cached`,className:"text-rc-gray-400"}:{text:`${e($)}% tokens cached - move dynamic parts of prompt to the bottom`,className:"text-red-200"}:e(P)!=null?e(P)>=Ie?{text:`${e(P)}%`,className:"text-rc-gray-400"}:{text:`${e(P)}% cached - move dynamic parts of prompt to the bottom`,className:"text-red-200"}:null:null),R=c(()=>m(t.trace.response)?{text:"LLM output has <break /> tags",className:"text-red-200"}:null),K=c(()=>{var Re;if(!it(t.trace.name))return null;const r=_(t.trace),n=_(t.compareTrace),l=r!=null&&n!=null?ve(r,n):null,g=t.trace.llmUsage??null,h=e($),q=h===0&&(l==null?void 0:l.similarityPct)!=null&&l.similarityPct>=ye;return{version:1,labelSource:h!=null?"llmUsage":e(P)!=null?"promptSimilarityFallback":"none",thresholds:{okPct:Ie,cacheMissSimilarityPct:ye},inputs:{llmUsage:g,currentRenderedPrompt:r!=null?te(r):null,baselineRenderedPrompt:n!=null?te(n):null},computed:{cachedTokensPct:h,promptSimilarityPct:(l==null?void 0:l.similarityPct)??null,promptSimilarity:l,cacheMiss:q},decision:{text:((Re=e(C))==null?void 0:Re.text)??null}}}),xe=c(()=>e(K)?ge(e(K)):"{}"),Ce=c(()=>_(t.compareTrace)??""),Se=c(()=>_(t.trace)??""),Ue=c(()=>V(t.trace.response)),le=c(()=>He(t.trace.response)),ce=c(()=>{if(typeof t.trace.response!="string"||!t.trace.response.trim())return!1;try{const r=JSON.parse(t.trace.response);return typeof r=="object"&&r!==null}catch{return!1}}),Te=c(()=>{const r=t.trace.response;if(typeof r!="string")return"json";try{return JSON.parse(r),"json"}catch{return"text"}}),Oe=c(()=>t.trace.stringifiedConversation??""),Be=c(()=>V(t.trace.renderedPrompt)),u=c(()=>V(t.trace.receivedPrompt)),x=c(()=>V(t.trace.receivedContext)),L=c(()=>V(t.trace.schema)),O=c(()=>t.trace.error?ge(t.trace.error):"");function W(r){return r==null?"":typeof r=="string"?r:ge(r)}const ie=c(()=>W(t.trace.receivedPrompt)),Q=c(()=>W(t.trace.renderedPrompt));let re=j(null),ne=j(null);async function G(r){try{const n=r==="raw"?e(ie):e(Q);await navigator.clipboard.writeText(n),a(re,r,!0),e(ne)&&clearTimeout(e(ne)),a(ne,window.setTimeout(()=>{a(re,null),a(ne,null)},2e3),!0)}catch(n){console.error("Failed to copy prompt",n)}}function se(r,n){var g;const l=new URLSearchParams({step:t.trace.name,test:n});return(g=N())!=null&&g.trim()&&l.set("region",N().trim()),D()&&l.set("promptEdit",D()),`/edit/${encodeURIComponent(r)}/tests?${l.toString()}`}async function Ee(){const r=(t.agentId||"").trim();if(!r||e(E)!=="idle")return;let n=null;try{const l=cr(t.trace,{fallbackConversation:T(),fallbackRuntimeContext:t.runtimeContext});if(t.testCreationMode==="pii-sanitized"){a(ee,l,!0),a(B,!0);return}n=window.open("about:blank","_blank"),n&&(n.opener=null),a(E,"adding");const g=await St.tests.addTest.mutate({agent:r,region:N(),seed:l}),h=se(r,g.id);n?n.location.replace(h):window.open(h,"_blank","noopener"),Ge()}catch(l){n==null||n.close(),console.error("Failed to add step test",l),a(E,"failed"),window.setTimeout(()=>a(E,"idle"),3e3)}}function Ge(){a(E,"added"),window.setTimeout(()=>a(E,"idle"),3e3)}var Xe=Nr(),S=Fe(Xe),F=i(S),z=i(F);{let r=c(()=>e(ze)?"close":"checkmark"),n=c(()=>e(ze)?"self-center text-red-400":"self-center text-rc-green-200");Lt(z,{get name(){return e(r)},width:18,height:18,get class(){return e(n)}})}var b=d(z,2);{var X=r=>{var n=br(),l=i(n,!0);s(n),J(()=>H(l,e(qe))),o(r,n)};I(b,r=>{e(qe)&&r(X)})}var ae=d(b,2),we=i(ae);s(ae),s(F);var Ye=d(F,2);{var he=r=>{var n=yr(),l=i(n),g=i(l,!0);s(l),s(n),J(()=>{We(n,1,`shrink-0 text-xs ${e(C).className}`),H(g,e(C).text)}),be("click",l,h=>{h.stopPropagation(),!M.shouldSuppressClick(h)&&e(K)&&(a(v,"diff"),a(w,!0))}),o(r,n)};I(Ye,r=>{e(C)!=null&&r(he)})}var Ve=d(Ye,2);{var ke=r=>{var n=wr();At(n,"title",De);var l=i(n,!0);s(n),J(()=>{We(n,1,`shrink-0 text-xs ${e(R).className}`),H(l,e(R).text)}),o(r,n)};I(Ve,r=>{e(R)!=null&&r(ke)})}s(S);var at=d(S,2);{var Tt=r=>{var n=kr(),l=i(n),g=i(l),h=i(g,!0);s(g),s(l);var q=d(l,2),ue=i(q),Re=i(ue,!0);s(ue),s(q),s(n),J(je=>{H(h,e(le)),ue.disabled=je,H(Re,e(E)==="adding"?"Adding…":e(E)==="added"?"Added":e(E)==="failed"?"Failed":"Add test")},[()=>{var je;return!((je=t.agentId)!=null&&je.trim())||typeof t.trace.receivedContext>"u"||e(E)!=="idle"||e(B)}]),be("click",l,()=>{a(k,"response"),a(p,!0)}),be("click",ue,Ee),o(r,n)};I(at,r=>{e(ce)&&r(Tt)})}var _t=d(at,2);{var Mt=r=>{{let n=c(()=>(t.agentId||"").trim());qt(r,{get agent(){return e(n)},get region(){return N()},get seed(){return e(ee)},onCreated:Ge,get open(){return e(B)},set open(l){a(B,l,!0)}})}};I(_t,r=>{e(ee)&&r(Mt)})}var me=d(_t,2);{var de=r=>{vt(r,{get title(){return e(Qe)},class:"!w-[85vw] !max-w-5xl",get open(){return e(p)},set open(l){a(p,l,!0)},children:l=>{var g=Tr(),h=i(g);{var q=Y=>{var Ze=Pr(),$e=i(Ze,!0);s(Ze),J(()=>H($e,e(O))),o(Y,Ze)};I(h,Y=>{e(O)&&Y(q)})}var ue=d(h,2),Re=i(ue),je=d(i(Re));s(Re);var _e=d(Re,4),bt=d(i(_e));s(_e),s(ue);var st=d(ue,2),lt=i(st);mt(lt,{get value(){return e(k)},ariaLabel:"Step trace tabs",onChange:({value:Y})=>a(k,Y,!0),children:(Y,Ze)=>{var $e=Cr(),ot=Fe($e);Pe(ot,{value:"response",class:"px-3",children:(Ae,et)=>{Z();var Je=U("Response");o(Ae,Je)},$$slots:{default:!0}});var wt=d(ot,2);Pe(wt,{value:"conversation",class:"px-3",children:(Ae,et)=>{Z();var Je=U("Conversation");o(Ae,Je)},$$slots:{default:!0}});var ut=d(wt,2);Pe(ut,{value:"prompt",class:"px-3",children:(Ae,et)=>{Z();var Je=U("Prompt");o(Ae,Je)},$$slots:{default:!0}});var kt=d(ut,2);Pe(kt,{value:"context",class:"px-3",children:(Ae,et)=>{Z();var Je=U("Context");o(Ae,Je)},$$slots:{default:!0}});var Rt=d(kt,2);Pe(Rt,{value:"schema",class:"px-3",children:(Ae,et)=>{Z();var Je=U("Schema");o(Ae,Je)},$$slots:{default:!0}}),o(Y,$e)},$$slots:{default:!0}});var yt=d(lt,2),ct=i(yt);{var Nt=Y=>{tt(Y,{get value(){return e(Ue)},get language(){return e(Te)},class:"h-full"})},dt=Y=>{tt(Y,{get value(){return e(Oe)},language:"text",class:"h-full"})},zt=Y=>{var Ze=Sr(),$e=i(Ze),ot=i($e),wt=i(ot);{let Ae=c(()=>!e(ie).trim());rt(wt,{variant:"secondary",size:"small",get disabled(){return e(Ae)},onclick:()=>G("raw"),children:(et,Je)=>{Z();var ft=U();J(()=>H(ft,e(re)==="raw"?"Copied raw prompt":"Copy raw prompt")),o(et,ft)},$$slots:{default:!0}})}s(ot);var ut=d(ot,2),kt=i(ut);{let Ae=c(()=>!e(Q).trim());rt(kt,{variant:"secondary",size:"small",get disabled(){return e(Ae)},onclick:()=>G("rendered"),children:(et,Je)=>{Z();var ft=U();J(()=>H(ft,e(re)==="rendered"?"Copied rendered prompt":"Copy rendered prompt")),o(et,ft)},$$slots:{default:!0}})}s(ut),s($e);var Rt=d($e,2);jt(Rt,{get original(){return e(u)},get modified(){return e(Be)},language:"markdown",class:"min-h-0 flex-1"}),s(Ze),o(Y,Ze)},Ut=Y=>{tt(Y,{get value(){return e(x)},language:"json",class:"h-full"})},Bt=Y=>{tt(Y,{get value(){return e(L)},language:"json",class:"h-full"})};I(ct,Y=>{e(k)==="response"?Y(Nt):e(k)==="conversation"?Y(dt,1):e(k)==="prompt"?Y(zt,2):e(k)==="context"?Y(Ut,3):Y(Bt,-1)})}s(yt),s(st),s(g),J(Y=>{H(je,` ${Y??""}`),H(bt,` ${t.trace.model??"—"??""}`)},[()=>typeof t.trace.createdAt=="number"?nt(t.trace.createdAt):"—"]),o(l,g)},$$slots:{default:!0}})};I(me,r=>{e(p)&&r(de)})}var Ke=d(me,2);{var It=r=>{vt(r,{title:"Prompt cache calc",class:"!w-[85vw] !max-w-5xl",get open(){return e(w)},set open(l){a(w,l,!0)},children:l=>{var g=Ir(),h=i(g);mt(h,{get value(){return e(v)},ariaLabel:"Prompt cache calc tabs",onChange:({value:_e})=>a(v,_e,!0),children:(_e,bt)=>{var st=Mr(),lt=Fe(st);Pe(lt,{value:"diff",class:"px-3",children:(ct,Nt)=>{Z();var dt=U("Diff");o(ct,dt)},$$slots:{default:!0}});var yt=d(lt,2);Pe(yt,{value:"raw",class:"px-3",children:(ct,Nt)=>{Z();var dt=U("Raw");o(ct,dt)},$$slots:{default:!0}}),o(_e,st)},$$slots:{default:!0}});var q=d(h,2),ue=i(q);{var Re=_e=>{jt(_e,{get original(){return e(Ce)},get modified(){return e(Se)},language:"markdown",class:"h-full"})},je=_e=>{tt(_e,{get value(){return e(xe)},language:"json",class:"h-full"})};I(ue,_e=>{e(v)==="diff"?_e(Re):_e(je,-1)})}s(q),s(g),o(l,g)},$$slots:{default:!0}})};I(Ke,r=>{e(w)&&r(It)})}J(()=>{We(ae,1,Jt(e(ze)?"text-red-200":"")),H(we,`AI: ${e(A)??""}`)}),be("pointerdown",F,function(...r){var n;(n=M.onPointerDown)==null||n.apply(this,r)}),be("click",F,r=>{M.shouldSuppressClick(r)||a(p,!0)}),o(f,Xe),pt()}Dt(["pointerdown","click"]);var Rr=y('<span class="text-[13px] leading-none text-rc-gray-400"> </span>'),Ar=y('<div class="min-w-0 break-words"> </div>'),Dr=y('<div class="min-w-0 break-words">Conversation hanged up.</div>'),Er=y('<div class="flex w-full justify-center"><div role="button" tabindex="0"><div class="flex flex-wrap items-baseline gap-x-2 gap-y-0"><!> <!></div></div></div>'),Lr=y('<div class="mr-2 mt-1 flex h-5 w-5 shrink-0 items-center justify-center rounded-sm bg-rc-green-700 text-sm uppercase text-rc-gray-100 backdrop-blur-md"> </div>'),Or=y('<button type="button" title="Edit this message" class="mr-2 mt-1 shrink-0 self-start rounded p-1 text-rc-gray-500 opacity-80 transition-colors hover:bg-rc-gray-900 hover:text-rc-gray-200 focus:outline-none focus-visible:outline-none"><!></button>'),jr=y('<div class="mt-1 text-right text-xs text-rc-gray-200/70"> </div>'),Jr=y('<button type="button"><!></button>'),Fr=y('<button type="button" class="inline-flex items-center text-nowrap rounded border-0 bg-transparent px-1 py-0.5 text-rc-gray-400 transition-colors hover:bg-rc-gray-900 hover:text-rc-gray-200 focus:outline-none focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent disabled:hover:text-rc-gray-400">Analyze</button>'),Hr=y('<button type="button" class="inline-flex items-center text-nowrap rounded border-0 bg-transparent px-1 py-0.5 text-rc-gray-400 transition-colors hover:bg-rc-gray-900 hover:text-rc-gray-200 focus:outline-none focus-visible:outline-none">Regenerate</button>'),qr=y('<button type="button" class="inline-flex items-center text-nowrap rounded border-0 bg-transparent px-1 py-0.5 text-rc-gray-400 transition-colors hover:bg-rc-gray-900 hover:text-rc-gray-200 focus:outline-none focus-visible:outline-none">See variants</button>'),zr=y('<div class="mt-1 flex flex-wrap items-center gap-x-2 gap-y-1"><!> <!> <!> <!></div>'),Ur=y('<!> <!> <div><div role="button" tabindex="0" class="cursor-pointer select-text"><div><div> </div> <!></div></div> <!></div>',1),Br=y('<div class="rounded-md border border-red-500 bg-red-950/40 p-3 font-mono text-sm text-red-200"> </div>'),Vr=y("<!> <!>",1),Wr=y('<div class="whitespace-pre-wrap break-words rounded-md border border-rc-gray-650 bg-rc-gray-900/60 p-3 text-sm text-rc-gray-100"> </div>'),Gr=y('<div class="flex flex-col gap-3"><!> <div class="flex items-center justify-between gap-2 text-sm text-rc-gray-200"><div class="text-rc-gray-400"> </div> <!></div> <div><!> <div class="mt-2 h-[55vh] overflow-auto"><!></div></div></div>'),Xr=y("<div><!></div> <!> <!>",1);function hn(f,t){ht(t,!0);let N=pe(t,"region",3,null),D=pe(t,"promptEditProposalId",3,null),T=pe(t,"allowAddTest",3,!0),p=pe(t,"testSourceStep",3,void 0),w=pe(t,"testEntries",3,void 0),v=pe(t,"requireTestSourceStep",3,!1),k=pe(t,"analyzeDisabled",3,!1),E=pe(t,"showSeeVariants",3,!1),B=pe(t,"variantSelectionState",3,"none"),ee=pe(t,"suppressActionRow",3,!1),M=j(!1),_=j("idle"),fe=j("content"),oe=j(!1),ve=j(null);const te=Ot();Et(te.cleanup);function Me(u){return u?u.split("/").at(-1)??u:""}function ge(u){const x=Me(u).trim().charAt(0);return x?x.toUpperCase():"?"}const V=c(()=>{var u;return t.trace.eventName==="finished-main-streaming-step"||t.trace.eventName==="sent-message"?"agent":t.trace.role==="system"||((u=t.trace)==null?void 0:u.bosunInputMessageSender)==="system"?"system":(t.trace.role==="user","user")}),He=c(()=>e(V)==="agent"?"max-w-[83%]":e(V)==="user"?"max-w-[90%] sm:max-w-[80%] md:max-w-[70%]":e(V)==="system"?"max-w-[90%] sm:max-w-[85%] md:max-w-[75%]":""),nt=c(()=>{var u;return(e(V)==="user"||e(V)==="system")&&!!t.onRevert&&((u=t.trace)==null?void 0:u.bosunPrevStateId)!==void 0}),Le=c(()=>t.trace.error!=null),qe=c(()=>B()==="source");function ze(){a(M,!0),a(fe,"content")}function Qe(u){var x;if(!te.shouldSuppressClick(u)){if(e(qe)){(x=t.onSelectInVariantMode)==null||x.call(t,t.trace);return}ze()}}function A(u){if(typeof u!="number"||!Number.isFinite(u))return null;const x=new Date(u);if(Number.isNaN(x.getTime()))return null;const L=String(x.getHours()).padStart(2,"0"),O=String(x.getMinutes()).padStart(2,"0"),W=String(x.getSeconds()).padStart(2,"0");return`${L}:${O}:${W}`}const P=c(()=>{var u;return A((u=t.trace)==null?void 0:u.createdAt)});function $(u){try{return JSON.stringify(u??null,null,2)}catch{return String(u)}}async function Ie(){try{await navigator.clipboard.writeText($(t.trace))}catch(u){console.error("Failed to copy",u)}}function ye(){return T()&&e(V)==="agent"&&t.trace.eventName!=="transfer-requested"&&(t.trace.eventName==="finished-main-streaming-step"||t.trace.eventName==="sent-message")}function Ne(){return!ye()||!(t.agentId&&t.agentId.trim())?!1:v()?!!p()&&typeof p().receivedContext<"u":!0}function De(){return e(V)==="agent"&&t.trace.eventName!=="transfer-requested"&&!!(t.agentId&&t.agentId.trim())&&(t.trace.eventName==="finished-main-streaming-step"||t.trace.eventName==="sent-message")}function m(){return De()}async function C(){var x;let u=null;try{a(_,"idle");const L=(t.agentId||"").trim();if(!L)throw new Error("Agent id is not available; cannot add test");const O=lr({entries:w()??Gt,trace:t.trace,sourceStep:p(),fallbackRuntimeContext:t.context});if(t.testCreationMode==="pii-sanitized"){a(ve,O,!0),a(oe,!0);return}u=window.open("about:blank","_blank"),u&&(u.opener=null);const W=await St.tests.addTest.mutate({agent:L,region:N(),seed:O}),ie=new URLSearchParams({step:O.step||"main",test:W.id});(x=N())!=null&&x.trim()&&ie.set("region",N().trim()),D()&&ie.set("promptEdit",D());const Q=`/edit/${encodeURIComponent(L)}/tests?${ie.toString()}`;u?u.location.replace(Q):window.open(Q,"_blank","noopener"),R()}catch(L){u==null||u.close(),console.error("Failed to add test",L),a(_,"error"),setTimeout(()=>a(_,"idle"),4e3)}}function R(){a(_,"ok"),setTimeout(()=>a(_,"idle"),3e3)}var K=Xr(),xe=Fe(K);let Ce;var Se=i(xe);{var Ue=u=>{var x=Er(),L=i(x),O=i(L),W=i(O);{var ie=G=>{var se=Rr(),Ee=i(se,!0);s(se),J(()=>H(Ee,e(P))),o(G,se)};I(W,G=>{e(P)&&G(ie)})}var Q=d(W,2);{var re=G=>{var se=Ar(),Ee=i(se);s(se),J(()=>H(Ee,`Transfer requested: ${t.trace.content??""}`)),o(G,se)},ne=G=>{var se=Dr();o(G,se)};I(Q,G=>{t.trace.eventName==="transfer-requested"?G(re):G(ne,-1)})}s(O),s(L),s(x),J(()=>We(L,1,`cursor-pointer select-text rounded-full border border-rc-gray-650 bg-rc-gray-800/40 px-4 py-2 text-sm text-rc-gray-100 ${e(Le)?"border-red-500 bg-red-950/30 text-red-200":""}`)),be("pointerdown",L,function(...G){var se;(se=te.onPointerDown)==null||se.apply(this,G)}),be("click",L,G=>{te.shouldSuppressClick(G)||ze()}),o(u,x)},le=u=>{var x=Ur(),L=Fe(x);{var O=z=>{var b=Lr(),X=i(b,!0);s(b),J((ae,we)=>{At(b,"title",ae),H(X,we)},[()=>Me(t.agentId),()=>ge(t.agentId)]),o(z,b)};I(L,z=>{e(V)==="agent"&&t.agentId&&z(O)})}var W=d(L,2);{var ie=z=>{var b=Or(),X=i(b);Lt(X,{name:"undo",width:16,height:16}),s(b),be("click",b,ae=>{var we;ae.stopPropagation(),(we=t.onRevert)==null||we.call(t,t.trace)}),o(z,b)};I(W,z=>{e(nt)&&z(ie)})}var Q=d(W,2),re=i(Q),ne=i(re),G=i(ne),se=i(G,!0);s(G);var Ee=d(G,2);{var Ge=z=>{var b=jr(),X=i(b,!0);s(b),J(()=>H(X,e(P))),o(z,b)};I(Ee,z=>{e(P)&&z(Ge)})}s(ne),s(re);var Xe=d(re,2);{var S=z=>{var b=zr(),X=i(b);{var ae=me=>{var de=Jr(),Ke=i(de);{var It=h=>{var q=U("Added");o(h,q)},r=h=>{var q=U("Failed");o(h,q)},n=h=>{var q=U("Select agent to add test");o(h,q)},l=c(()=>!Ne()),g=h=>{var q=U("Add test");o(h,q)};I(Ke,h=>{e(_)==="ok"?h(It):e(_)==="error"?h(r,1):e(l)?h(n,2):h(g,-1)})}s(de),J((h,q,ue)=>{de.disabled=h,At(de,"title",q),We(de,1,`inline-flex items-center text-nowrap rounded border-0 bg-transparent px-1 py-0.5 transition-colors focus:outline-none focus-visible:outline-none ${ue??""}`)},[()=>!Ne()||e(_)!=="idle"||e(oe),()=>Ne()?void 0:"Select an agent in the sidebar before adding a test",()=>e(_)!=="idle"||!Ne()?"cursor-default text-rc-gray-400":"cursor-pointer text-rc-gray-400 hover:bg-rc-gray-900 hover:text-rc-gray-200"]),be("click",de,h=>{h.stopPropagation(),C()}),o(me,de)},we=c(()=>ye());I(X,me=>{e(we)&&me(ae)})}var Ye=d(X,2);{var he=me=>{var de=Fr();J(()=>de.disabled=k()),be("click",de,Ke=>{Ke.stopPropagation(),t.onAnalyze(t.trace)}),o(me,de)},Ve=c(()=>De()&&t.onAnalyze);I(Ye,me=>{e(Ve)&&me(he)})}var ke=d(Ye,2);{var at=me=>{var de=Hr();be("click",de,Ke=>{Ke.stopPropagation(),t.onRegenerate(t.trace)}),o(me,de)},Tt=c(()=>m()&&t.onRegenerate);I(ke,me=>{e(Tt)&&me(at)})}var _t=d(ke,2);{var Mt=me=>{var de=qr();be("click",de,Ke=>{Ke.stopPropagation(),t.onSeeVariants(t.trace)}),o(me,de)};I(_t,me=>{E()&&t.onSeeVariants&&me(Mt)})}s(b),o(z,b)},F=c(()=>!ee()&&(De()||ye()||m()&&t.onRegenerate||E()));I(Xe,z=>{e(F)&&z(S)})}s(Q),J(()=>{We(Q,1,`min-w-0 ${e(He)??""}`),We(ne,1,`rounded-lg ${e(V)==="system"?"justify-between whitespace-pre-line break-words border border-emerald-500 text-emerald-500":e(qe)?"w-full whitespace-pre-line break-words border border-rc-green-450 bg-transparent backdrop-blur-md hover:bg-rc-green-700":e(V)!=="user"?"w-full whitespace-pre-line break-words bg-rc-green-700 backdrop-blur-md":"whitespace-pre-line break-words bg-rc-gray-700"} ${e(V)==="system"||e(qe)?"":"border-thin border-rc-gray-110"} p-2 pt-1 text-rc-gray-100 ${e(Le)?"border-red-500 bg-red-950/30 text-red-200":""}`),H(se,t.trace.content)}),be("pointerdown",re,function(...z){var b;(b=te.onPointerDown)==null||b.apply(this,z)}),be("click",re,Qe),o(u,x)};I(Se,u=>{t.trace.eventName==="transfer-requested"||t.trace.eventName==="hangup-requested"?u(Ue):u(le,-1)})}s(xe);var ce=d(xe,2);{var Te=u=>{{const x=O=>{var W=Gr(),ie=i(W);{var Q=b=>{var X=Br(),ae=i(X,!0);s(X),J(we=>H(ae,we),[()=>$(t.trace.error)]),o(b,X)};I(ie,b=>{e(Le)&&b(Q)})}var re=d(ie,2),ne=i(re),G=i(ne);s(ne);var se=d(ne,2);rt(se,{variant:"secondary",size:"small",onclick:Ie,children:(b,X)=>{Z();var ae=U("Copy raw trace");o(b,ae)},$$slots:{default:!0}}),s(re);var Ee=d(re,2),Ge=i(Ee);mt(Ge,{get value(){return e(fe)},ariaLabel:"Conversational trace tabs",onChange:({value:b})=>a(fe,b,!0),children:(b,X)=>{var ae=Vr(),we=Fe(ae);Pe(we,{value:"content",class:"px-3",children:(he,Ve)=>{Z();var ke=U("Content");o(he,ke)},$$slots:{default:!0}});var Ye=d(we,2);Pe(Ye,{value:"raw",class:"px-3",children:(he,Ve)=>{Z();var ke=U("Raw");o(he,ke)},$$slots:{default:!0}}),o(b,ae)},$$slots:{default:!0}});var Xe=d(Ge,2),S=i(Xe);{var F=b=>{var X=Wr(),ae=i(X,!0);s(X),J(()=>H(ae,t.trace.content)),o(b,X)},z=b=>{{let X=c(()=>$(t.trace));tt(b,{get value(){return e(X)},language:"json",class:"h-full"})}};I(S,b=>{e(fe)==="content"?b(F):b(z,-1)})}s(Xe),s(Ee),s(W),J(()=>H(G,`${t.trace.role??""} • ${t.trace.medium??""}`)),o(O,W)};let L=c(()=>`Conversation: ${t.trace.eventName}`);vt(u,{get title(){return e(L)},class:"!w-[80vw] !max-w-4xl",get open(){return e(M)},set open(O){a(M,O,!0)},children:x,$$slots:{default:!0}})}};I(ce,u=>{e(M)&&u(Te)})}var Oe=d(ce,2);{var Be=u=>{{let x=c(()=>(t.agentId||"").trim());qt(u,{get agent(){return e(x)},get region(){return N()},get seed(){return e(ve)},onCreated:R,get open(){return e(oe)},set open(L){a(oe,L,!0)}})}};I(Oe,u=>{e(ve)&&u(Be)})}J(()=>Ce=We(xe,1,"group mb-2 flex w-full items-start",null,Ce,{"justify-end":e(V)==="user"||e(V)==="system"})),o(f,K),pt()}Dt(["pointerdown","click"]);export{gn as C,xn as a,hn as b,ir as c,gt as d,nr as e,sr as f,Ft as m};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{m as a}from"./CR-uVjxM.js";a();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{K as t}from"./CR-uVjxM.js";const[s,o]=t();export{s as g,o as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as o,A as _,B as g,H as p,C as t,D as v,E as i,F as l,G as r,I as E,J as m}from"./
|
|
1
|
+
import{z as o,A as _,B as g,H as p,C as t,D as v,E as i,F as l,G as r,I as E,J as m}from"./CR-uVjxM.js";function b(n,d){let a=null,f=t;var s;if(t){a=E;for(var e=m(document.head);e!==null&&(e.nodeType!==v||e.data!==n);)e=i(e);if(e===null)l(!1);else{var y=i(e);e.remove(),r(y)}}t||(s=document.head.appendChild(o()));try{_(()=>{var u=g(()=>d(s));u.f|=p})}finally{f&&(l(!0),r(a))}}export{b as h};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{al as e,d as u,b as t,am as c,h as a}from"./
|
|
1
|
+
import{al as e,d as u,b as t,am as c,h as a}from"./CR-uVjxM.js";function l(n){t===null&&e(),c&&t.l!==null?s(t).m.push(n):u(()=>{const o=a(n);if(typeof o=="function")return o})}function i(n){t===null&&e(),l(()=>()=>a(n))}function s(n){var o=n.l;return o.u??(o.u={a:[],b:[],m:[]})}export{i as a,l as o};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as fe,C as M,L as ie,j as P,N as le,U as ue,O as Q,G as Y,F as B,I as L,D as se,V as oe,W as $,S as de,z as V,X as A,B as U,Y as ve,Z as te,_ as ce,a0 as pe,a1 as G,a2 as ge,a3 as he,a4 as _e,a5 as j,a6 as Ee,a7 as me,a8 as ne,a9 as re,aa as q,ab as Te,ac as Ae,ad as Ce,ae as Se,E as we,J as Ie,af as ae,ag as Ne,ah as De}from"./CR-uVjxM.js";function Oe(e,r){return r}function xe(e,r,u){for(var s=[],c=r.length,l,i=r.length,p=0;p<c;p++){let E=r[p];re(E,()=>{if(l){if(l.pending.delete(E),l.done.add(E),l.pending.size===0){var d=e.outrogroups;X(e,G(l.done)),d.delete(l),d.size===0&&(e.outrogroups=null)}}else i-=1},!1)}if(i===0){var f=s.length===0&&u!==null&&e.pending.size===0;if(f){var t=u,a=t.parentNode;Ae(a),a.append(t),e.items.clear()}X(e,r,!f)}else l={pending:new Set(r),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(l)}function X(e,r,u=!0){var s;if(e.pending.size>0){s=new Set;for(const i of e.pending.values())for(const p of i)s.add(e.items.get(p).e)}for(var c=0;c<r.length;c++){var l=r[c];if(s!=null&&s.has(l)){l.f|=A;const i=document.createDocumentFragment();Ce(l,i)}else Se(r[c],u)}}var ee;function be(e,r,u,s,c,l=null){var i=e,p=new Map,f=(r&ae)!==0;if(f){var t=e;i=M?Y(Ie(t)):t.appendChild(V())}M&&ie();var a=null,E=ce(()=>{var v=u();return pe(v)?v:v==null?[]:G(v)}),d,m=new Map,T=!0;function D(v){S.effect.f&me||(S.pending.delete(v),S.fallback=a,Re(S,d,i,r,s),a!==null&&(d.length===0?a.f&A?(a.f^=A,b(a,null,i)):ne(a):re(a,()=>{a=null})))}function n(v){S.pending.delete(v)}var o=fe(()=>{d=P(E);var v=d.length;let h=!1;if(M){var z=le(i)===ue;z!==(v===0)&&(i=Q(),Y(i),B(!1),h=!0)}for(var w=new Set,g=de,R=te(),I=0;I<v;I+=1){M&&L.nodeType===se&&L.data===oe&&(i=L,h=!0,B(!1));var k=d[I],x=s(k,I),_=T?null:p.get(x);_?(_.v&&$(_.v,k),_.i&&$(_.i,I),R&&g.unskip_effect(_.e)):(_=ke(p,T?i:ee??(ee=V()),k,x,I,c,r,u),T||(_.e.f|=A),p.set(x,_)),w.add(x)}if(v===0&&l&&!a&&(T?a=U(()=>l(i)):(a=U(()=>l(ee??(ee=V()))),a.f|=A)),v>w.size&&ve(),M&&v>0&&Y(Q()),!T)if(m.set(g,w),R){for(const[F,H]of p)w.has(F)||g.skip_effect(H.e);g.oncommit(D),g.ondiscard(n)}else D(g);h&&B(!0),P(E)}),S={effect:o,items:p,pending:m,outrogroups:null,fallback:a};T=!1,M&&(i=L)}function O(e){for(;e!==null&&!(e.f&Te);)e=e.next;return e}function Re(e,r,u,s,c){var k,x,_,F,H,J,W,Z,y;var l=(s&De)!==0,i=r.length,p=e.items,f=O(e.effect.first),t,a=null,E,d=[],m=[],T,D,n,o;if(l)for(o=0;o<i;o+=1)T=r[o],D=c(T,o),n=p.get(D).e,n.f&A||((x=(k=n.nodes)==null?void 0:k.a)==null||x.measure(),(E??(E=new Set)).add(n));for(o=0;o<i;o+=1){if(T=r[o],D=c(T,o),n=p.get(D).e,e.outrogroups!==null)for(const C of e.outrogroups)C.pending.delete(n),C.done.delete(n);if(n.f&q&&(ne(n),l&&((F=(_=n.nodes)==null?void 0:_.a)==null||F.unfix(),(E??(E=new Set)).delete(n))),n.f&A)if(n.f^=A,n===f)b(n,null,u);else{var S=a?a.next:f;n===e.effect.last&&(e.effect.last=n.prev),n.prev&&(n.prev.next=n.next),n.next&&(n.next.prev=n.prev),N(e,a,n),N(e,n,S),b(n,S,u),a=n,d=[],m=[],f=O(a.next);continue}if(n!==f){if(t!==void 0&&t.has(n)){if(d.length<m.length){var v=m[0],h;a=v.prev;var z=d[0],w=d[d.length-1];for(h=0;h<d.length;h+=1)b(d[h],v,u);for(h=0;h<m.length;h+=1)t.delete(m[h]);N(e,z.prev,w.next),N(e,a,z),N(e,w,v),f=v,a=w,o-=1,d=[],m=[]}else t.delete(n),b(n,f,u),N(e,n.prev,n.next),N(e,n,a===null?e.effect.first:a.next),N(e,a,n),a=n;continue}for(d=[],m=[];f!==null&&f!==n;)(t??(t=new Set)).add(f),m.push(f),f=O(f.next);if(f===null)continue}n.f&A||d.push(n),a=n,f=O(n.next)}if(e.outrogroups!==null){for(const C of e.outrogroups)C.pending.size===0&&(X(e,G(C.done)),(H=e.outrogroups)==null||H.delete(C));e.outrogroups.size===0&&(e.outrogroups=null)}if(f!==null||t!==void 0){var g=[];if(t!==void 0)for(n of t)n.f&q||g.push(n);for(;f!==null;)!(f.f&q)&&f!==e.fallback&&g.push(f),f=O(f.next);var R=g.length;if(R>0){var I=s&ae&&i===0?u:null;if(l){for(o=0;o<R;o+=1)(W=(J=g[o].nodes)==null?void 0:J.a)==null||W.measure();for(o=0;o<R;o+=1)(y=(Z=g[o].nodes)==null?void 0:Z.a)==null||y.fix()}xe(e,g,I)}}l&&Ne(()=>{var C,K;if(E!==void 0)for(n of E)(K=(C=n.nodes)==null?void 0:C.a)==null||K.apply()})}function ke(e,r,u,s,c,l,i,p){var f=i&ge?i&he?j(u):_e(u,!1,!1):null,t=i&Ee?j(c):null;return{v:f,i:t,e:U(()=>(l(r,f??u,t??c,p),()=>{e.delete(s)}))}}function b(e,r,u){if(e.nodes)for(var s=e.nodes.start,c=e.nodes.end,l=r&&!(r.f&A)?r.nodes.start:u;s!==null;){var i=we(s);if(l.before(s),s===c)return;s=i}}function N(e,r,u){r===null?e.effect.first=u:r.next=u,u===null?e.effect.last=r:u.prev=r}export{be as e,Oe as i};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var Ze;function a(e,t,n){function r(c,u){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:u,constr:s,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,u);const l=s.prototype,f=Object.keys(l);for(let d=0;d<f.length;d++){const p=f[d];p in c||(c[p]=l[p].bind(c))}}const o=(n==null?void 0:n.Parent)??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function s(c){var u;const l=n!=null&&n.Parent?new i:this;r(l,c),(u=l._zod).deferred??(u.deferred=[]);for(const f of l._zod.deferred)f();return l}return Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:c=>{var u,l;return n!=null&&n.Parent&&c instanceof n.Parent?!0:(l=(u=c==null?void 0:c._zod)==null?void 0:u.traits)==null?void 0:l.has(e)}}),Object.defineProperty(s,"name",{value:e}),s}class W extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Ye extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(Ze=globalThis).__zod_globalConfig??(Ze.__zod_globalConfig={});const ge=globalThis.__zod_globalConfig;function x(e){return ge}function qe(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function pe(e,t){return typeof t=="bigint"?t.toString():t}function ce(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ve(e){return e==null}function be(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Tt(e,t){const n=e/t,r=Math.round(n),o=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<o?0:n-r}const Se=Symbol("evaluating");function g(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Se)return r===void 0&&(r=Se,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function M(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function U(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Oe(e){return JSON.stringify(e)}function Pt(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Xe="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function q(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Nt=ce(()=>{var e;if(ge.jitless||typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function X(e){if(q(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(q(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function He(e){return X(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const At=new Set(["string","number","symbol"]);function G(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function F(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(r._zod.parent=e),r}function m(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function jt(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Ct={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Rt(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=U(e._zod.def,{get shape(){const s={};for(const c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(s[c]=n.shape[c])}return M(this,"shape",s),s},checks:[]});return F(e,i)}function Dt(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=U(e._zod.def,{get shape(){const s={...e._zod.def.shape};for(const c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete s[c]}return M(this,"shape",s),s},checks:[]});return F(e,i)}function Ut(e,t){if(!X(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=U(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return M(this,"shape",i),i}});return F(e,o)}function Ft(e,t){if(!X(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=U(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return M(this,"shape",r),r}});return F(e,n)}function xt(e,t){var r;if((r=e._zod.def.checks)!=null&&r.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=U(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t._zod.def.shape};return M(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return F(e,n)}function Lt(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const s=U(t._zod.def,{get shape(){const c=t._zod.def.shape,u={...c};if(n)for(const l in n){if(!(l in c))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(u[l]=e?new e({type:"optional",innerType:c[l]}):c[l])}else for(const l in c)u[l]=e?new e({type:"optional",innerType:c[l]}):c[l];return M(this,"shape",u),u},checks:[]});return F(t,s)}function Mt(e,t,n){const r=U(t._zod.def,{get shape(){const o=t._zod.def.shape,i={...o};if(n)for(const s in n){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(i[s]=new e({type:"nonoptional",innerType:o[s]}))}else for(const s in o)i[s]=new e({type:"nonoptional",innerType:o[s]});return M(this,"shape",i),i}});return F(t,r)}function V(e,t=0){var n;if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(((n=e.issues[r])==null?void 0:n.continue)!==!0)return!0;return!1}function Jt(e,t=0){var n;if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(((n=e.issues[r])==null?void 0:n.continue)===!1)return!0;return!1}function Qe(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function te(e){return typeof e=="string"?e:e==null?void 0:e.message}function L(e,t,n){var u,l,f,d,p,h;const r=e.message?e.message:te((f=(l=(u=e.inst)==null?void 0:u._zod.def)==null?void 0:l.error)==null?void 0:f.call(l,e))??te((d=t==null?void 0:t.error)==null?void 0:d.call(t,e))??te((p=n.customError)==null?void 0:p.call(n,e))??te((h=n.localeError)==null?void 0:h.call(n,e))??"Invalid input",{inst:o,continue:i,input:s,...c}=e;return c.path??(c.path=[]),c.message=r,t!=null&&t.reportInput&&(c.input=s),c}function we(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function H(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const et=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,pe,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},tt=a("$ZodError",et),nt=a("$ZodError",et,{Parent:Error});function Vt(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function Wt(e,t=n=>n.message){const n={_errors:[]},r=(o,i=[])=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>r({issues:c},[...i,...s.path]));else if(s.code==="invalid_key")r({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")r({issues:s.issues},[...i,...s.path]);else{const c=[...i,...s.path];if(c.length===0)n._errors.push(t(s));else{let u=n,l=0;for(;l<c.length;){const f=c[l];l===c.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(t(s))):u[f]=u[f]||{_errors:[]},u=u[f],l++}}}};return r(e),n}const ze=e=>(t,n,r,o)=>{const i=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new W;if(s.issues.length){const c=new((o==null?void 0:o.Err)??e)(s.issues.map(u=>L(u,i,x())));throw Xe(c,o==null?void 0:o.callee),c}return s.value},ye=e=>async(t,n,r,o)=>{const i=r?{...r,async:!0}:{async:!0};let s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){const c=new((o==null?void 0:o.Err)??e)(s.issues.map(u=>L(u,i,x())));throw Xe(c,o==null?void 0:o.callee),c}return s.value},ue=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new W;return i.issues.length?{success:!1,error:new(e??tt)(i.issues.map(s=>L(s,o,x())))}:{success:!0,data:i.value}},Gt=ue(nt),ae=e=>async(t,n,r)=>{const o=r?{...r,async:!0}:{async:!0};let i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>L(s,o,x())))}:{success:!0,data:i.value}},Bt=ae(nt),Kt=e=>(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return ze(e)(t,n,o)},Yt=e=>(t,n,r)=>ze(e)(t,n,r),qt=e=>async(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return ye(e)(t,n,o)},Xt=e=>async(t,n,r)=>ye(e)(t,n,r),Ht=e=>(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return ue(e)(t,n,o)},Qt=e=>(t,n,r)=>ue(e)(t,n,r),en=e=>async(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return ae(e)(t,n,o)},tn=e=>async(t,n,r)=>ae(e)(t,n,r),nn=/^[cC][0-9a-z]{6,}$/,rn=/^[0-9a-z]+$/,on=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,sn=/^[0-9a-vA-V]{20}$/,cn=/^[A-Za-z0-9]{27}$/,un=/^[a-zA-Z0-9_-]{21}$/,an=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ln=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ie=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,fn=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,dn="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function hn(){return new RegExp(dn,"u")}const pn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,mn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,_n=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,gn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,vn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,rt=/^[A-Za-z0-9_-]*$/,bn=/^https?$/,wn=/^\+[1-9]\d{6,14}$/,ot="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",zn=new RegExp(`^${ot}$`);function it(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function yn(e){return new RegExp(`^${it(e)}$`)}function kn(e){const t=it({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${ot}T(?:${r})$`)}const $n=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Zn=/^-?\d+$/,Sn=/^-?\d+(?:\.\d+)?$/,On=/^(?:true|false)$/i,In=/^[^A-Z]*$/,En=/^[^a-z]*$/,A=a("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),st={number:"number",bigint:"bigint",object:"date"},ct=a("$ZodCheckLessThan",(e,t)=>{A.init(e,t);const n=st[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,i=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ut=a("$ZodCheckGreaterThan",(e,t)=>{A.init(e,t);const n=st[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,i=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Tn=a("$ZodCheckMultipleOf",(e,t)=>{A.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):Tt(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Pn=a("$ZodCheckNumberFormat",(e,t)=>{var s;A.init(e,t),t.format=t.format||"float64";const n=(s=t.format)==null?void 0:s.includes("int"),r=n?"int":"number",[o,i]=Ct[t.format];e._zod.onattach.push(c=>{const u=c._zod.bag;u.format=t.format,u.minimum=o,u.maximum=i,n&&(u.pattern=Zn)}),e._zod.check=c=>{const u=c.value;if(n){if(!Number.isInteger(u)){c.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?c.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):c.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}u<o&&c.issues.push({origin:"number",input:u,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),u>i&&c.issues.push({origin:"number",input:u,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Nn=a("$ZodCheckMaxLength",(e,t)=>{var n;A.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!ve(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const s=we(o);r.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),An=a("$ZodCheckMinLength",(e,t)=>{var n;A.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!ve(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const s=we(o);r.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),jn=a("$ZodCheckLengthEquals",(e,t)=>{var n;A.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!ve(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,i=o.length;if(i===t.length)return;const s=we(o),c=i>t.length;r.issues.push({origin:s,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),le=a("$ZodCheckStringFormat",(e,t)=>{var n,r;A.init(e,t),e._zod.onattach.push(o=>{const i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Cn=a("$ZodCheckRegex",(e,t)=>{le.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Rn=a("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=In),le.init(e,t)}),Dn=a("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=En),le.init(e,t)}),Un=a("$ZodCheckIncludes",(e,t)=>{A.init(e,t);const n=G(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),Fn=a("$ZodCheckStartsWith",(e,t)=>{A.init(e,t);const n=new RegExp(`^${G(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),xn=a("$ZodCheckEndsWith",(e,t)=>{A.init(e,t);const n=new RegExp(`.*${G(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),Ln=a("$ZodCheckOverwrite",(e,t)=>{A.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Mn{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
2
|
+
`).filter(s=>s),o=Math.min(...r.map(s=>s.length-s.trimStart().length)),i=r.map(s=>s.slice(o)).map(s=>" ".repeat(this.indent*2)+s);for(const s of i)this.content.push(s)}compile(){const t=Function,n=this==null?void 0:this.args,o=[...((this==null?void 0:this.content)??[""]).map(i=>` ${i}`)];return new t(...n,o.join(`
|
|
3
|
+
`))}}const Jn={major:4,minor:4,patch:3},w=a("$ZodType",(e,t)=>{var o;var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Jn;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const i of r)for(const s of i._zod.onattach)s(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),(o=e._zod.deferred)==null||o.push(()=>{e._zod.run=e._zod.parse});else{const i=(c,u,l)=>{let f=V(c),d;for(const p of u){if(p._zod.def.when){if(Jt(c)||!p._zod.def.when(c))continue}else if(f)continue;const h=c.issues.length,v=p._zod.check(c);if(v instanceof Promise&&(l==null?void 0:l.async)===!1)throw new W;if(d||v instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await v,c.issues.length!==h&&(f||(f=V(c,h)))});else{if(c.issues.length===h)continue;f||(f=V(c,h))}}return d?d.then(()=>c):c},s=(c,u,l)=>{if(V(c))return c.aborted=!0,c;const f=i(u,r,l);if(f instanceof Promise){if(l.async===!1)throw new W;return f.then(d=>e._zod.parse(d,l))}return e._zod.parse(f,l)};e._zod.run=(c,u)=>{if(u.skipChecks)return e._zod.parse(c,u);if(u.direction==="backward"){const f=e._zod.parse({value:c.value,issues:[]},{...u,skipChecks:!0});return f instanceof Promise?f.then(d=>s(d,c,u)):s(f,c,u)}const l=e._zod.parse(c,u);if(l instanceof Promise){if(u.async===!1)throw new W;return l.then(f=>i(f,r,u))}return i(l,r,u)}}g(e,"~standard",()=>({validate:i=>{var s;try{const c=Gt(e,i);return c.success?{value:c.data}:{issues:(s=c.error)==null?void 0:s.issues}}catch{return Bt(e,i).then(u=>{var l;return u.success?{value:u.data}:{issues:(l=u.error)==null?void 0:l.issues}})}},vendor:"zod",version:1}))}),ke=a("$ZodString",(e,t)=>{var n;w.init(e,t),e._zod.pattern=[...((n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)??[]].pop()??$n(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),b=a("$ZodStringFormat",(e,t)=>{le.init(e,t),ke.init(e,t)}),Vn=a("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=ln),b.init(e,t)}),Wn=a("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Ie(r))}else t.pattern??(t.pattern=Ie());b.init(e,t)}),Gn=a("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=fn),b.init(e,t)}),Bn=a("$ZodURL",(e,t)=>{b.init(e,t),e._zod.check=n=>{var r;try{const o=n.value.trim();if(!t.normalize&&((r=t.protocol)==null?void 0:r.source)===bn.source&&!/^https?:\/\//i.test(o)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}const i=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Kn=a("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=hn()),b.init(e,t)}),Yn=a("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=un),b.init(e,t)}),qn=a("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=nn),b.init(e,t)}),Xn=a("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=rn),b.init(e,t)}),Hn=a("$ZodULID",(e,t)=>{t.pattern??(t.pattern=on),b.init(e,t)}),Qn=a("$ZodXID",(e,t)=>{t.pattern??(t.pattern=sn),b.init(e,t)}),er=a("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=cn),b.init(e,t)}),tr=a("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=kn(t)),b.init(e,t)}),nr=a("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=zn),b.init(e,t)}),rr=a("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=yn(t)),b.init(e,t)}),or=a("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=an),b.init(e,t)}),ir=a("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=pn),b.init(e,t),e._zod.bag.format="ipv4"}),sr=a("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=mn),b.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),cr=a("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=_n),b.init(e,t)}),ur=a("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=gn),b.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[o,i]=r;if(!i)throw new Error;const s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function at(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const ar=a("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=vn),b.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{at(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function lr(e){if(!rt.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return at(n)}const fr=a("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=rt),b.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{lr(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),dr=a("$ZodE164",(e,t)=>{t.pattern??(t.pattern=wn),b.init(e,t)});function hr(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const pr=a("$ZodJWT",(e,t)=>{b.init(e,t),e._zod.check=n=>{hr(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),lt=a("$ZodNumber",(e,t)=>{w.init(e,t),e._zod.pattern=e._zod.bag.pattern??Sn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;const i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),n}}),mr=a("$ZodNumberFormat",(e,t)=>{Pn.init(e,t),lt.init(e,t)}),_r=a("$ZodBoolean",(e,t)=>{w.init(e,t),e._zod.pattern=On,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),gr=a("$ZodAny",(e,t)=>{w.init(e,t),e._zod.parse=n=>n}),vr=a("$ZodUnknown",(e,t)=>{w.init(e,t),e._zod.parse=n=>n}),br=a("$ZodNever",(e,t)=>{w.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Ee(e,t,n){e.issues.length&&t.issues.push(...Qe(n,e.issues)),t.value[n]=e.value}const wr=a("$ZodArray",(e,t)=>{w.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const i=[];for(let s=0;s<o.length;s++){const c=o[s],u=t.element._zod.run({value:c,issues:[]},r);u instanceof Promise?i.push(u.then(l=>Ee(l,n,s))):Ee(u,n,s)}return i.length?Promise.all(i).then(()=>n):n}});function oe(e,t,n,r,o,i){const s=n in r;if(e.issues.length){if(o&&i&&!s)return;t.issues.push(...Qe(n,e.issues))}if(!s&&!o){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?s&&(t.value[n]=void 0):t.value[n]=e.value}function ft(e){var r,o,i,s;const t=Object.keys(e.shape);for(const c of t)if(!((s=(i=(o=(r=e.shape)==null?void 0:r[c])==null?void 0:o._zod)==null?void 0:i.traits)!=null&&s.has("$ZodType")))throw new Error(`Invalid element at key "${c}": expected a Zod schema`);const n=jt(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function dt(e,t,n,r,o,i){const s=[],c=o.keySet,u=o.catchall._zod,l=u.def.type,f=u.optin==="optional",d=u.optout==="optional";for(const p in t){if(p==="__proto__"||c.has(p))continue;if(l==="never"){s.push(p);continue}const h=u.run({value:t[p],issues:[]},r);h instanceof Promise?e.push(h.then(v=>oe(v,n,p,t,f,d))):oe(h,n,p,t,f,d)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const zr=a("$ZodObject",(e,t)=>{w.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!(n!=null&&n.get)){const c=t.shape;Object.defineProperty(t,"shape",{get:()=>{const u={...c};return Object.defineProperty(t,"shape",{value:u}),u}})}const r=ce(()=>ft(t));g(e._zod,"propValues",()=>{const c=t.shape,u={};for(const l in c){const f=c[l]._zod;if(f.values){u[l]??(u[l]=new Set);for(const d of f.values)u[l].add(d)}}return u});const o=q,i=t.catchall;let s;e._zod.parse=(c,u)=>{s??(s=r.value);const l=c.value;if(!o(l))return c.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),c;c.value={};const f=[],d=s.shape;for(const p of s.keys){const h=d[p],v=h._zod.optin==="optional",$=h._zod.optout==="optional",P=h._zod.run({value:l[p],issues:[]},u);P instanceof Promise?f.push(P.then(Z=>oe(Z,c,p,l,v,$))):oe(P,c,p,l,v,$)}return i?dt(f,l,c,u,r.value,e):f.length?Promise.all(f).then(()=>c):c}}),yr=a("$ZodObjectJIT",(e,t)=>{zr.init(e,t);const n=e._zod.parse,r=ce(()=>ft(t)),o=p=>{var K,N;const h=new Mn(["shape","payload","ctx"]),v=r.value,$=C=>{const k=Oe(C);return`shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`};h.write("const input = payload.value;");const P=Object.create(null);let Z=0;for(const C of v.keys)P[C]=`key_${Z++}`;h.write("const newResult = {};");for(const C of v.keys){const k=P[C],I=Oe(C),J=p[C],$e=((K=J==null?void 0:J._zod)==null?void 0:K.optin)==="optional",Et=((N=J==null?void 0:J._zod)==null?void 0:N.optout)==="optional";h.write(`const ${k} = ${$(C)};`),$e&&Et?h.write(`
|
|
4
|
+
if (${k}.issues.length) {
|
|
5
|
+
if (${I} in input) {
|
|
6
|
+
payload.issues = payload.issues.concat(${k}.issues.map(iss => ({
|
|
7
|
+
...iss,
|
|
8
|
+
path: iss.path ? [${I}, ...iss.path] : [${I}]
|
|
9
|
+
})));
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
if (${k}.value === undefined) {
|
|
14
|
+
if (${I} in input) {
|
|
15
|
+
newResult[${I}] = undefined;
|
|
16
|
+
}
|
|
17
|
+
} else {
|
|
18
|
+
newResult[${I}] = ${k}.value;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
`):$e?h.write(`
|
|
22
|
+
if (${k}.issues.length) {
|
|
23
|
+
payload.issues = payload.issues.concat(${k}.issues.map(iss => ({
|
|
24
|
+
...iss,
|
|
25
|
+
path: iss.path ? [${I}, ...iss.path] : [${I}]
|
|
26
|
+
})));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (${k}.value === undefined) {
|
|
30
|
+
if (${I} in input) {
|
|
31
|
+
newResult[${I}] = undefined;
|
|
32
|
+
}
|
|
33
|
+
} else {
|
|
34
|
+
newResult[${I}] = ${k}.value;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
`):h.write(`
|
|
38
|
+
const ${k}_present = ${I} in input;
|
|
39
|
+
if (${k}.issues.length) {
|
|
40
|
+
payload.issues = payload.issues.concat(${k}.issues.map(iss => ({
|
|
41
|
+
...iss,
|
|
42
|
+
path: iss.path ? [${I}, ...iss.path] : [${I}]
|
|
43
|
+
})));
|
|
44
|
+
}
|
|
45
|
+
if (!${k}_present && !${k}.issues.length) {
|
|
46
|
+
payload.issues.push({
|
|
47
|
+
code: "invalid_type",
|
|
48
|
+
expected: "nonoptional",
|
|
49
|
+
input: undefined,
|
|
50
|
+
path: [${I}]
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (${k}_present) {
|
|
55
|
+
if (${k}.value === undefined) {
|
|
56
|
+
newResult[${I}] = undefined;
|
|
57
|
+
} else {
|
|
58
|
+
newResult[${I}] = ${k}.value;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
`)}h.write("payload.value = newResult;"),h.write("return payload;");const O=h.compile();return(C,k)=>O(p,C,k)};let i;const s=q,c=!ge.jitless,l=c&&Nt.value,f=t.catchall;let d;e._zod.parse=(p,h)=>{d??(d=r.value);const v=p.value;return s(v)?c&&l&&(h==null?void 0:h.async)===!1&&h.jitless!==!0?(i||(i=o(t.shape)),p=i(p,h),f?dt([],v,p,h,d,e):p):n(p,h):(p.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),p)}});function Te(e,t,n,r){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const o=e.filter(i=>!V(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(s=>L(s,r,x())))}),t)}const ht=a("$ZodUnion",(e,t)=>{w.init(e,t),g(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),g(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),g(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),g(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){const r=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${r.map(o=>be(o.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,o)=>{if(n)return n(r,o);let i=!1;const s=[];for(const c of t.options){const u=c._zod.run({value:r.value,issues:[]},o);if(u instanceof Promise)s.push(u),i=!0;else{if(u.issues.length===0)return u;s.push(u)}}return i?Promise.all(s).then(c=>Te(c,r,e,o)):Te(s,r,e,o)}}),kr=a("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,ht.init(e,t);const n=e._zod.parse;g(e._zod,"propValues",()=>{const o={};for(const i of t.options){const s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[c,u]of Object.entries(s)){o[c]||(o[c]=new Set);for(const l of u)o[c].add(l)}}return o});const r=ce(()=>{var s;const o=t.options,i=new Map;for(const c of o){const u=(s=c._zod.propValues)==null?void 0:s[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(const l of u){if(i.has(l))throw new Error(`Duplicate discriminator value "${String(l)}"`);i.set(l,c)}}return i});e._zod.parse=(o,i)=>{const s=o.value;if(!q(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;const c=r.value.get(s==null?void 0:s[t.discriminator]);return c?c._zod.run(o,i):t.unionFallback||i.direction==="backward"?n(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(r.value.keys()),input:s,path:[t.discriminator],inst:e}),o)}}),$r=a("$ZodIntersection",(e,t)=>{w.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,i=t.left._zod.run({value:o,issues:[]},r),s=t.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([u,l])=>Pe(n,u,l)):Pe(n,i,s)}});function me(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(X(e)&&X(t)){const n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),o={...e,...t};for(const i of r){const s=me(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],i=t[r],s=me(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Pe(e,t,n){const r=new Map;let o;for(const c of t.issues)if(c.code==="unrecognized_keys"){o??(o=c);for(const u of c.keys)r.has(u)||r.set(u,{}),r.get(u).l=!0}else e.issues.push(c);for(const c of n.issues)if(c.code==="unrecognized_keys")for(const u of c.keys)r.has(u)||r.set(u,{}),r.get(u).r=!0;else e.issues.push(c);const i=[...r].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(i.length&&o&&e.issues.push({...o,keys:i}),V(e))return e;const s=me(t.value,n.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}const Zr=a("$ZodEnum",(e,t)=>{w.init(e,t);const n=qe(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>At.has(typeof o)).map(o=>typeof o=="string"?G(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const s=o.value;return r.has(s)||o.issues.push({code:"invalid_value",values:n,input:s,inst:e}),o}}),Sr=a("$ZodLiteral",(e,t)=>{if(w.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?G(r):r?G(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,o)=>{const i=r.value;return n.has(i)||r.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),r}}),Or=a("$ZodTransform",(e,t)=>{w.init(e,t),e._zod.optin="optional",e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Ye(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(n.value=s,n.fallback=!0,n));if(o instanceof Promise)throw new W;return n.value=o,n.fallback=!0,n}});function Ne(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const pt=a("$ZodOptional",(e,t)=>{w.init(e,t),e._zod.optin="optional",e._zod.optout="optional",g(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),g(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${be(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=n.value,i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>Ne(s,o)):Ne(i,o)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),Ir=a("$ZodExactOptional",(e,t)=>{pt.init(e,t),g(e._zod,"values",()=>t.innerType._zod.values),g(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),Er=a("$ZodNullable",(e,t)=>{w.init(e,t),g(e._zod,"optin",()=>t.innerType._zod.optin),g(e._zod,"optout",()=>t.innerType._zod.optout),g(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${be(n.source)}|null)$`):void 0}),g(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),Tr=a("$ZodDefault",(e,t)=>{w.init(e,t),e._zod.optin="optional",g(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>Ae(i,t)):Ae(o,t)}});function Ae(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Pr=a("$ZodPrefault",(e,t)=>{w.init(e,t),e._zod.optin="optional",g(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),Nr=a("$ZodNonOptional",(e,t)=>{w.init(e,t),g(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>je(i,e)):je(o,e)}});function je(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Ar=a("$ZodCatch",(e,t)=>{w.init(e,t),e._zod.optin="optional",g(e._zod,"optout",()=>t.innerType._zod.optout),g(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(s=>L(s,r,x()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(i=>L(i,r,x()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),jr=a("$ZodPipe",(e,t)=>{w.init(e,t),g(e._zod,"values",()=>t.in._zod.values),g(e._zod,"optin",()=>t.in._zod.optin),g(e._zod,"optout",()=>t.out._zod.optout),g(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const i=t.out._zod.run(n,r);return i instanceof Promise?i.then(s=>ne(s,t.in,r)):ne(i,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(i=>ne(i,t.out,r)):ne(o,t.out,r)}});function ne(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const Cr=a("$ZodReadonly",(e,t)=>{w.init(e,t),g(e._zod,"propValues",()=>t.innerType._zod.propValues),g(e._zod,"values",()=>t.innerType._zod.values),g(e._zod,"optin",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optin}),g(e._zod,"optout",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optout}),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(Ce):Ce(o)}});function Ce(e){return e.value=Object.freeze(e.value),e}const Rr=a("$ZodCustom",(e,t)=>{A.init(e,t),w.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(i=>Re(i,n,r,e));Re(o,n,r,e)}});function Re(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(H(o))}}var De;class Dr{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Ur(){return new Dr}(De=globalThis).__zod_globalRegistry??(De.__zod_globalRegistry=Ur());const Y=globalThis.__zod_globalRegistry;function Fr(e,t){return new e({type:"string",...m(t)})}function xr(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...m(t)})}function Ue(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...m(t)})}function Lr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...m(t)})}function Mr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...m(t)})}function Jr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...m(t)})}function Vr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...m(t)})}function Wr(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...m(t)})}function Gr(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...m(t)})}function Br(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...m(t)})}function Kr(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...m(t)})}function Yr(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...m(t)})}function qr(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...m(t)})}function Xr(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...m(t)})}function Hr(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...m(t)})}function Qr(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...m(t)})}function eo(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...m(t)})}function to(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...m(t)})}function no(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...m(t)})}function ro(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...m(t)})}function oo(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...m(t)})}function io(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...m(t)})}function so(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...m(t)})}function co(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...m(t)})}function uo(e,t){return new e({type:"string",format:"date",check:"string_format",...m(t)})}function ao(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...m(t)})}function lo(e,t){return new e({type:"string",format:"duration",check:"string_format",...m(t)})}function fo(e,t){return new e({type:"number",checks:[],...m(t)})}function ho(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...m(t)})}function po(e,t){return new e({type:"boolean",...m(t)})}function mo(e){return new e({type:"any"})}function _o(e){return new e({type:"unknown"})}function go(e,t){return new e({type:"never",...m(t)})}function Fe(e,t){return new ct({check:"less_than",...m(t),value:e,inclusive:!1})}function de(e,t){return new ct({check:"less_than",...m(t),value:e,inclusive:!0})}function xe(e,t){return new ut({check:"greater_than",...m(t),value:e,inclusive:!1})}function he(e,t){return new ut({check:"greater_than",...m(t),value:e,inclusive:!0})}function Le(e,t){return new Tn({check:"multiple_of",...m(t),value:e})}function mt(e,t){return new Nn({check:"max_length",...m(t),maximum:e})}function ie(e,t){return new An({check:"min_length",...m(t),minimum:e})}function _t(e,t){return new jn({check:"length_equals",...m(t),length:e})}function vo(e,t){return new Cn({check:"string_format",format:"regex",...m(t),pattern:e})}function bo(e){return new Rn({check:"string_format",format:"lowercase",...m(e)})}function wo(e){return new Dn({check:"string_format",format:"uppercase",...m(e)})}function zo(e,t){return new Un({check:"string_format",format:"includes",...m(t),includes:e})}function yo(e,t){return new Fn({check:"string_format",format:"starts_with",...m(t),prefix:e})}function ko(e,t){return new xn({check:"string_format",format:"ends_with",...m(t),suffix:e})}function B(e){return new Ln({check:"overwrite",tx:e})}function $o(e){return B(t=>t.normalize(e))}function Zo(){return B(e=>e.trim())}function So(){return B(e=>e.toLowerCase())}function Oo(){return B(e=>e.toUpperCase())}function Io(){return B(e=>Pt(e))}function Eo(e,t,n){return new e({type:"array",element:t,...m(n)})}function To(e,t,n){return new e({type:"custom",check:"custom",fn:t,...m(n)})}function Po(e,t){const n=No(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(H(o,r.value,n._zod.def));else{const i=o;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),r.issues.push(H(i))}},e(r.value,r)),t);return n}function No(e,t){const n=new A({check:"custom",...m(t)});return n._zod.check=e,n}function gt(e){let t=(e==null?void 0:e.target)??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??Y,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function E(e,t,n={path:[],schemaPath:[]}){var f,d;var r;const o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);const c=(d=(f=e._zod).toJSONSchema)==null?void 0:d.call(f);if(c)s.schema=c;else{const p={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,p);else{const v=s.schema,$=t.processors[o.type];if(!$)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);$(e,t,v,p)}const h=e._zod.parent;h&&(s.ref||(s.ref=h),E(h,t,p),t.seen.get(h).isParent=!0)}const u=t.metadataRegistry.get(e);return u&&Object.assign(s.schema,u),t.io==="input"&&T(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&"_prefault"in s.schema&&((r=s.schema).default??(r.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function vt(e,t){var s,c,u,l;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const f of e.seen.entries()){const d=(s=e.metadataRegistry.get(f[0]))==null?void 0:s.id;if(d){const p=r.get(d);if(p&&p!==f[0])throw new Error(`Duplicate schema id "${d}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(d,f[0])}}const o=f=>{var $;const d=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const P=($=e.external.registry.get(f[0]))==null?void 0:$.id,Z=e.external.uri??(K=>K);if(P)return{ref:Z(P)};const O=f[1].defId??f[1].schema.id??`schema${e.counter++}`;return f[1].defId=O,{defId:O,ref:`${Z("__shared")}#/${d}/${O}`}}if(f[1]===n)return{ref:"#"};const h=`#/${d}/`,v=f[1].schema.id??`__schema${e.counter++}`;return{defId:v,ref:h+v}},i=f=>{if(f[1].schema.$ref)return;const d=f[1],{ref:p,defId:h}=o(f);d.def={...d.schema},h&&(d.defId=h);const v=d.schema;for(const $ in v)delete v[$];v.$ref=p};if(e.cycles==="throw")for(const f of e.seen.entries()){const d=f[1];if(d.cycle)throw new Error(`Cycle detected: #/${(c=d.cycle)==null?void 0:c.join("/")}/<root>
|
|
63
|
+
|
|
64
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const f of e.seen.entries()){const d=f[1];if(t===f[0]){i(f);continue}if(e.external){const h=(u=e.external.registry.get(f[0]))==null?void 0:u.id;if(t!==f[0]&&h){i(f);continue}}if((l=e.metadataRegistry.get(f[0]))==null?void 0:l.id){i(f);continue}if(d.cycle){i(f);continue}if(d.count>1&&e.reused==="ref"){i(f);continue}}}function bt(e,t){var c,u,l,f;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=d=>{const p=e.seen.get(d);if(p.ref===null)return;const h=p.def??p.schema,v={...h},$=p.ref;if(p.ref=null,$){r($);const Z=e.seen.get($),O=Z.schema;if(O.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(h.allOf=h.allOf??[],h.allOf.push(O)):Object.assign(h,O),Object.assign(h,v),d._zod.parent===$)for(const N in h)N==="$ref"||N==="allOf"||N in v||delete h[N];if(O.$ref&&Z.def)for(const N in h)N==="$ref"||N==="allOf"||N in Z.def&&JSON.stringify(h[N])===JSON.stringify(Z.def[N])&&delete h[N]}const P=d._zod.parent;if(P&&P!==$){r(P);const Z=e.seen.get(P);if(Z!=null&&Z.schema.$ref&&(h.$ref=Z.schema.$ref,Z.def))for(const O in h)O==="$ref"||O==="allOf"||O in Z.def&&JSON.stringify(h[O])===JSON.stringify(Z.def[O])&&delete h[O]}e.override({zodSchema:d,jsonSchema:h,path:p.path??[]})};for(const d of[...e.seen.entries()].reverse())r(d[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,(c=e.external)!=null&&c.uri){const d=(u=e.external.registry.get(t))==null?void 0:u.id;if(!d)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(d)}Object.assign(o,n.def??n.schema);const i=(l=e.metadataRegistry.get(t))==null?void 0:l.id;i!==void 0&&o.id===i&&delete o.id;const s=((f=e.external)==null?void 0:f.defs)??{};for(const d of e.seen.entries()){const p=d[1];p.def&&p.defId&&(p.def.id===p.defId&&delete p.def.id,s[p.defId]=p.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{const d=JSON.parse(JSON.stringify(o));return Object.defineProperty(d,"~standard",{value:{...t["~standard"],jsonSchema:{input:se(t,"input",e.processors),output:se(t,"output",e.processors)}},enumerable:!1,writable:!1}),d}catch{throw new Error("Error converting schema to JSON.")}}function T(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return T(r.element,n);if(r.type==="set")return T(r.valueType,n);if(r.type==="lazy")return T(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return T(r.innerType,n);if(r.type==="intersection")return T(r.left,n)||T(r.right,n);if(r.type==="record"||r.type==="map")return T(r.keyType,n)||T(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:T(r.in,n)||T(r.out,n);if(r.type==="object"){for(const o in r.shape)if(T(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(T(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(T(o,n))return!0;return!!(r.rest&&T(r.rest,n))}return!1}const Ao=(e,t={})=>n=>{const r=gt({...n,processors:t});return E(e,r),vt(r,e),bt(r,e)},se=(e,t,n={})=>r=>{const{libraryOptions:o,target:i}=r??{},s=gt({...o??{},target:i,io:t,processors:n});return E(e,s),vt(s,e),bt(s,e)},jo={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Co=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:i,maximum:s,format:c,patterns:u,contentEncoding:l}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),c&&(o.format=jo[c]??c,o.format===""&&delete o.format,c==="time"&&delete o.format),l&&(o.contentEncoding=l),u&&u.size>0){const f=[...u];f.length===1?o.pattern=f[0].source:f.length>1&&(o.allOf=[...f.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},Ro=(e,t,n,r)=>{const o=n,{minimum:i,maximum:s,format:c,multipleOf:u,exclusiveMaximum:l,exclusiveMinimum:f}=e._zod.bag;typeof c=="string"&&c.includes("int")?o.type="integer":o.type="number";const d=typeof f=="number"&&f>=(i??Number.NEGATIVE_INFINITY),p=typeof l=="number"&&l<=(s??Number.POSITIVE_INFINITY),h=t.target==="draft-04"||t.target==="openapi-3.0";d?h?(o.minimum=f,o.exclusiveMinimum=!0):o.exclusiveMinimum=f:typeof i=="number"&&(o.minimum=i),p?h?(o.maximum=l,o.exclusiveMaximum=!0):o.exclusiveMaximum=l:typeof s=="number"&&(o.maximum=s),typeof u=="number"&&(o.multipleOf=u)},Do=(e,t,n,r)=>{n.type="boolean"},Uo=(e,t,n,r)=>{n.not={}},Fo=(e,t,n,r)=>{},xo=(e,t,n,r)=>{},Lo=(e,t,n,r)=>{const o=e._zod.def,i=qe(o.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},Mo=(e,t,n,r)=>{const o=e._zod.def,i=[];for(const s of o.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){const s=i[0];n.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[s]:n.const=s}else i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),i.every(s=>typeof s=="boolean")&&(n.type="boolean"),i.every(s=>s===null)&&(n.type="null"),n.enum=i},Jo=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Vo=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Wo=(e,t,n,r)=>{const o=n,i=e._zod.def,{minimum:s,maximum:c}=e._zod.bag;typeof s=="number"&&(o.minItems=s),typeof c=="number"&&(o.maxItems=c),o.type="array",o.items=E(i.element,t,{...r,path:[...r.path,"items"]})},Go=(e,t,n,r)=>{var l;const o=n,i=e._zod.def;o.type="object",o.properties={};const s=i.shape;for(const f in s)o.properties[f]=E(s[f],t,{...r,path:[...r.path,"properties",f]});const c=new Set(Object.keys(s)),u=new Set([...c].filter(f=>{const d=i.shape[f]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));u.size>0&&(o.required=Array.from(u)),((l=i.catchall)==null?void 0:l._zod.def.type)==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=E(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},Bo=(e,t,n,r)=>{const o=e._zod.def,i=o.inclusive===!1,s=o.options.map((c,u)=>E(c,t,{...r,path:[...r.path,i?"oneOf":"anyOf",u]}));i?n.oneOf=s:n.anyOf=s},Ko=(e,t,n,r)=>{const o=e._zod.def,i=E(o.left,t,{...r,path:[...r.path,"allOf",0]}),s=E(o.right,t,{...r,path:[...r.path,"allOf",1]}),c=l=>"allOf"in l&&Object.keys(l).length===1,u=[...c(i)?i.allOf:[i],...c(s)?s.allOf:[s]];n.allOf=u},Yo=(e,t,n,r)=>{const o=e._zod.def,i=E(o.innerType,t,r),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},qo=(e,t,n,r)=>{const o=e._zod.def;E(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},Xo=(e,t,n,r)=>{const o=e._zod.def;E(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},Ho=(e,t,n,r)=>{const o=e._zod.def;E(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},Qo=(e,t,n,r)=>{const o=e._zod.def;E(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},ei=(e,t,n,r)=>{const o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?i?o.out:o.in:o.out;E(s,t,r);const c=t.seen.get(e);c.ref=s},ti=(e,t,n,r)=>{const o=e._zod.def;E(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},wt=(e,t,n,r)=>{const o=e._zod.def;E(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},ni=a("ZodISODateTime",(e,t)=>{tr.init(e,t),y.init(e,t)});function ri(e){return co(ni,e)}const oi=a("ZodISODate",(e,t)=>{nr.init(e,t),y.init(e,t)});function ii(e){return uo(oi,e)}const si=a("ZodISOTime",(e,t)=>{rr.init(e,t),y.init(e,t)});function ci(e){return ao(si,e)}const ui=a("ZodISODuration",(e,t)=>{or.init(e,t),y.init(e,t)});function ai(e){return lo(ui,e)}const li=(e,t)=>{tt.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Wt(e,n)},flatten:{value:n=>Vt(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,pe,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,pe,2)}},isEmpty:{get(){return e.issues.length===0}}})},j=a("ZodError",li,{Parent:Error}),fi=ze(j),di=ye(j),hi=ue(j),pi=ae(j),mi=Kt(j),_i=Yt(j),gi=qt(j),vi=Xt(j),bi=Ht(j),wi=Qt(j),zi=en(j),yi=tn(j),Me=new WeakMap;function Q(e,t,n){const r=Object.getPrototypeOf(e);let o=Me.get(r);if(o||(o=new Set,Me.set(r,o)),!o.has(t)){o.add(t);for(const i in n){const s=n[i];Object.defineProperty(r,i,{configurable:!0,enumerable:!1,get(){const c=s.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:c}),c},set(c){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:c})}})}}}const z=a("ZodType",(e,t)=>(w.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:se(e,"input"),output:se(e,"output")}}),e.toJSONSchema=Ao(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,r)=>fi(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>hi(e,n,r),e.parseAsync=async(n,r)=>di(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>pi(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>mi(e,n,r),e.decode=(n,r)=>_i(e,n,r),e.encodeAsync=async(n,r)=>gi(e,n,r),e.decodeAsync=async(n,r)=>vi(e,n,r),e.safeEncode=(n,r)=>bi(e,n,r),e.safeDecode=(n,r)=>wi(e,n,r),e.safeEncodeAsync=async(n,r)=>zi(e,n,r),e.safeDecodeAsync=async(n,r)=>yi(e,n,r),Q(e,"ZodType",{check(...n){const r=this.def;return this.clone(U(r,{checks:[...r.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,r){return F(this,n,r)},brand(){return this},register(n,r){return n.add(this,r),this},refine(n,r){return this.check(vs(n,r))},superRefine(n,r){return this.check(bs(n,r))},overwrite(n){return this.check(B(n))},optional(){return Ge(this)},exactOptional(){return is(this)},nullable(){return Be(this)},nullish(){return Ge(Be(this))},nonoptional(n){return fs(this,n)},array(){return ee(this)},or(n){return $t([this,n])},and(n){return Qi(this,n)},transform(n){return Ke(this,rs(n))},default(n){return us(this,n)},prefault(n){return ls(this,n)},catch(n){return hs(this,n)},pipe(n){return Ke(this,n)},readonly(){return _s(this)},describe(n){const r=this.clone();return Y.add(r,{description:n}),r},meta(...n){if(n.length===0)return Y.get(this);const r=this.clone();return Y.add(r,n[0]),r},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){var n;return(n=Y.get(e))==null?void 0:n.description},configurable:!0}),e)),zt=a("_ZodString",(e,t)=>{ke.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Co(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Q(e,"_ZodString",{regex(...r){return this.check(vo(...r))},includes(...r){return this.check(zo(...r))},startsWith(...r){return this.check(yo(...r))},endsWith(...r){return this.check(ko(...r))},min(...r){return this.check(ie(...r))},max(...r){return this.check(mt(...r))},length(...r){return this.check(_t(...r))},nonempty(...r){return this.check(ie(1,...r))},lowercase(r){return this.check(bo(r))},uppercase(r){return this.check(wo(r))},trim(){return this.check(Zo())},normalize(...r){return this.check($o(...r))},toLowerCase(){return this.check(So())},toUpperCase(){return this.check(Oo())},slugify(){return this.check(Io())}})}),ki=a("ZodString",(e,t)=>{ke.init(e,t),zt.init(e,t),e.email=n=>e.check(xr($i,n)),e.url=n=>e.check(Wr(Zi,n)),e.jwt=n=>e.check(so(xi,n)),e.emoji=n=>e.check(Gr(Si,n)),e.guid=n=>e.check(Ue(Je,n)),e.uuid=n=>e.check(Lr(re,n)),e.uuidv4=n=>e.check(Mr(re,n)),e.uuidv6=n=>e.check(Jr(re,n)),e.uuidv7=n=>e.check(Vr(re,n)),e.nanoid=n=>e.check(Br(Oi,n)),e.guid=n=>e.check(Ue(Je,n)),e.cuid=n=>e.check(Kr(Ii,n)),e.cuid2=n=>e.check(Yr(Ei,n)),e.ulid=n=>e.check(qr(Ti,n)),e.base64=n=>e.check(ro(Di,n)),e.base64url=n=>e.check(oo(Ui,n)),e.xid=n=>e.check(Xr(Pi,n)),e.ksuid=n=>e.check(Hr(Ni,n)),e.ipv4=n=>e.check(Qr(Ai,n)),e.ipv6=n=>e.check(eo(ji,n)),e.cidrv4=n=>e.check(to(Ci,n)),e.cidrv6=n=>e.check(no(Ri,n)),e.e164=n=>e.check(io(Fi,n)),e.datetime=n=>e.check(ri(n)),e.date=n=>e.check(ii(n)),e.time=n=>e.check(ci(n)),e.duration=n=>e.check(ai(n))});function _(e){return Fr(ki,e)}const y=a("ZodStringFormat",(e,t)=>{b.init(e,t),zt.init(e,t)}),$i=a("ZodEmail",(e,t)=>{Gn.init(e,t),y.init(e,t)}),Je=a("ZodGUID",(e,t)=>{Vn.init(e,t),y.init(e,t)}),re=a("ZodUUID",(e,t)=>{Wn.init(e,t),y.init(e,t)}),Zi=a("ZodURL",(e,t)=>{Bn.init(e,t),y.init(e,t)}),Si=a("ZodEmoji",(e,t)=>{Kn.init(e,t),y.init(e,t)}),Oi=a("ZodNanoID",(e,t)=>{Yn.init(e,t),y.init(e,t)}),Ii=a("ZodCUID",(e,t)=>{qn.init(e,t),y.init(e,t)}),Ei=a("ZodCUID2",(e,t)=>{Xn.init(e,t),y.init(e,t)}),Ti=a("ZodULID",(e,t)=>{Hn.init(e,t),y.init(e,t)}),Pi=a("ZodXID",(e,t)=>{Qn.init(e,t),y.init(e,t)}),Ni=a("ZodKSUID",(e,t)=>{er.init(e,t),y.init(e,t)}),Ai=a("ZodIPv4",(e,t)=>{ir.init(e,t),y.init(e,t)}),ji=a("ZodIPv6",(e,t)=>{sr.init(e,t),y.init(e,t)}),Ci=a("ZodCIDRv4",(e,t)=>{cr.init(e,t),y.init(e,t)}),Ri=a("ZodCIDRv6",(e,t)=>{ur.init(e,t),y.init(e,t)}),Di=a("ZodBase64",(e,t)=>{ar.init(e,t),y.init(e,t)}),Ui=a("ZodBase64URL",(e,t)=>{fr.init(e,t),y.init(e,t)}),Fi=a("ZodE164",(e,t)=>{dr.init(e,t),y.init(e,t)}),xi=a("ZodJWT",(e,t)=>{pr.init(e,t),y.init(e,t)}),yt=a("ZodNumber",(e,t)=>{lt.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Ro(e,r,o),Q(e,"ZodNumber",{gt(r,o){return this.check(xe(r,o))},gte(r,o){return this.check(he(r,o))},min(r,o){return this.check(he(r,o))},lt(r,o){return this.check(Fe(r,o))},lte(r,o){return this.check(de(r,o))},max(r,o){return this.check(de(r,o))},int(r){return this.check(Ve(r))},safe(r){return this.check(Ve(r))},positive(r){return this.check(xe(0,r))},nonnegative(r){return this.check(he(0,r))},negative(r){return this.check(Fe(0,r))},nonpositive(r){return this.check(de(0,r))},multipleOf(r,o){return this.check(Le(r,o))},step(r,o){return this.check(Le(r,o))},finite(){return this}});const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function S(e){return fo(yt,e)}const Li=a("ZodNumberFormat",(e,t)=>{mr.init(e,t),yt.init(e,t)});function Ve(e){return ho(Li,e)}const Mi=a("ZodBoolean",(e,t)=>{_r.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Do(e,n,r)});function Ji(e){return po(Mi,e)}const Vi=a("ZodAny",(e,t)=>{gr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Fo()});function D(){return mo(Vi)}const Wi=a("ZodUnknown",(e,t)=>{vr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>xo()});function We(){return _o(Wi)}const Gi=a("ZodNever",(e,t)=>{br.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Uo(e,n,r)});function Bi(e){return go(Gi,e)}const Ki=a("ZodArray",(e,t)=>{wr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Wo(e,n,r,o),e.element=t.element,Q(e,"ZodArray",{min(n,r){return this.check(ie(n,r))},nonempty(n){return this.check(ie(1,n))},max(n,r){return this.check(mt(n,r))},length(n,r){return this.check(_t(n,r))},unwrap(){return this.element}})});function ee(e,t){return Eo(Ki,e,t)}const Yi=a("ZodObject",(e,t)=>{yr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Go(e,n,r,o),g(e,"shape",()=>t.shape),Q(e,"ZodObject",{keyof(){return es(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:We()})},loose(){return this.clone({...this._zod.def,catchall:We()})},strict(){return this.clone({...this._zod.def,catchall:Bi()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return Ut(this,n)},safeExtend(n){return Ft(this,n)},merge(n){return xt(this,n)},pick(n){return Rt(this,n)},omit(n){return Dt(this,n)},partial(...n){return Lt(Zt,this,n[0])},required(...n){return Mt(St,this,n[0])}})});function R(e,t){const n={type:"object",shape:e??{},...m(t)};return new Yi(n)}const kt=a("ZodUnion",(e,t)=>{ht.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Bo(e,n,r,o),e.options=t.options});function $t(e,t){return new kt({type:"union",options:e,...m(t)})}const qi=a("ZodDiscriminatedUnion",(e,t)=>{kt.init(e,t),kr.init(e,t)});function Xi(e,t,n){return new qi({type:"union",options:t,discriminator:e,...m(n)})}const Hi=a("ZodIntersection",(e,t)=>{$r.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ko(e,n,r,o)});function Qi(e,t){return new Hi({type:"intersection",left:e,right:t})}const _e=a("ZodEnum",(e,t)=>{Zr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Lo(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const i={};for(const s of r)if(n.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new _e({...t,checks:[],...m(o),entries:i})},e.exclude=(r,o)=>{const i={...t.entries};for(const s of r)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new _e({...t,checks:[],...m(o),entries:i})}});function es(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new _e({type:"enum",entries:n,...m(t)})}const ts=a("ZodLiteral",(e,t)=>{Sr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Mo(e,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function fe(e,t){return new ts({type:"literal",values:Array.isArray(e)?e:[e],...m(t)})}const ns=a("ZodTransform",(e,t)=>{Or.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Vo(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Ye(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(H(i,n.value,t));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(H(s))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n.fallback=!0,n)):(n.value=o,n.fallback=!0,n)}});function rs(e){return new ns({type:"transform",transform:e})}const Zt=a("ZodOptional",(e,t)=>{pt.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>wt(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Ge(e){return new Zt({type:"optional",innerType:e})}const os=a("ZodExactOptional",(e,t)=>{Ir.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>wt(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function is(e){return new os({type:"optional",innerType:e})}const ss=a("ZodNullable",(e,t)=>{Er.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Yo(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Be(e){return new ss({type:"nullable",innerType:e})}const cs=a("ZodDefault",(e,t)=>{Tr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Xo(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function us(e,t){return new cs({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():He(t)}})}const as=a("ZodPrefault",(e,t)=>{Pr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ho(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function ls(e,t){return new as({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():He(t)}})}const St=a("ZodNonOptional",(e,t)=>{Nr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>qo(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function fs(e,t){return new St({type:"nonoptional",innerType:e,...m(t)})}const ds=a("ZodCatch",(e,t)=>{Ar.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Qo(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function hs(e,t){return new ds({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const ps=a("ZodPipe",(e,t)=>{jr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ei(e,n,r,o),e.in=t.in,e.out=t.out});function Ke(e,t){return new ps({type:"pipe",in:e,out:t})}const ms=a("ZodReadonly",(e,t)=>{Cr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ti(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function _s(e){return new ms({type:"readonly",innerType:e})}const gs=a("ZodCustom",(e,t)=>{Rr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Jo(e,n)});function vs(e,t={}){return To(gs,e,t)}function bs(e,t){return Po(e,t)}const ws=R({text:_(),role:_(),time:_(),duration:S()}),Ot=R({conversationId:_(),medium:_(),agentId:_().optional(),phoneNumber:_().optional(),duration:S().optional(),audioUrl:_().url().optional(),transcript:$t([_(),ee(ws)]).optional(),createdAt:S()}).passthrough(),zs=R({limit:S(),items:ee(Ot),lastConversationId:_().optional()}),ys=R({promptTokens:S().optional(),completionTokens:S().optional(),totalTokens:S().optional(),cachedPromptTokens:S().optional()}).passthrough(),ks=R({traceType:fe("STEP"),traceId:_().optional(),conversationId:_().optional(),scopeId:_().optional(),workflowId:_().optional(),workflowRunId:_().optional(),name:_().optional(),renderedPrompt:_().optional(),receivedContext:D().optional(),receivedPrompt:D().optional(),stringifiedConversation:_().optional(),response:_().optional(),model:_().optional(),llmUsage:ys.optional(),createdAt:S(),error:D().optional()}).passthrough(),$s=R({traceType:fe("API_CALL"),traceId:_().optional(),conversationId:_().optional(),scopeId:_().optional(),operationName:_(),method:_(),path:_(),baseUrl:_().optional(),request:D().optional(),response:D().optional(),status:S().optional(),ok:Ji().optional(),durationMs:S().optional(),createdAt:S(),error:D().optional()}).passthrough(),Zs=R({traceType:fe("CONVERSATIONAL"),traceId:_().optional(),conversationId:_().optional(),scopeId:_().optional(),eventName:_(),role:_(),medium:_(),content:_(),createdAt:S(),error:D().optional()}).passthrough(),Ss=R({traceType:fe("LATENCY"),traceId:_().optional(),conversationId:_().optional(),seq:S(),atMs:S(),eventType:_(),payload:D().optional(),createdAt:S()}).passthrough(),Os=Xi("traceType",[ks,$s,Zs]),Is=R({items:ee(Os),limit:S(),lastTraceId:_().optional()}),Es=R({items:ee(Ss),limit:S(),lastTraceId:_().optional()}),Ts="x-bosun-telescope-source";class Ps{constructor(t=globalThis.fetch,n){this.fetchFn=t,this.sourceId=n}setSourceId(t){this.sourceId=t}getUrl(t){return`/traces/api/proxy/${(t.startsWith("/")?t.slice(1):t).replace(/^dev\//,"")}`}async fetch(t="GET",n,r){const o=this.getUrl(n),i={};this.sourceId&&this.sourceId.trim()&&(i[Ts]=this.sourceId);const s=await this.fetchFn(o,{method:t,headers:i});if(!s)throw new Error("No response from server");if(!s.ok)throw new Error(`Error fetching data: ${s.statusText}`);return r?r.parse(await s.json()):s}async getConversations(t={}){var i;const n=new URLSearchParams({limit:((i=t.limit)==null?void 0:i.toString())??"10"});t.lastConversationId&&n.append("lastConversationId",t.lastConversationId),t.phoneNumber&&n.append("phoneNumber",t.phoneNumber),t.agentId&&n.append("agentId",t.agentId);const r=await this.fetch("GET",`/conversations?${n.toString()}`);if(!r.ok)throw new Error(`Error fetching conversations: ${r.status} ${r.statusText}`);const o=await r.json();return Array.isArray(o==null?void 0:o.items)?o.items=o.items.map(s=>({...s,phoneNumber:typeof(s==null?void 0:s.phoneNumber)=="string"?s.phoneNumber:""})):o.items=[],zs.parse(o)}async getConversation(t){return await this.fetch("GET",`/conversations/${t}`,Ot)}async getTraces(t,n,r){const o=new URLSearchParams;n&&o.set("limit",String(n)),r&&o.set("lastTraceId",r);const i=`/conversations/${t}/traces${o.toString()?`?${o.toString()}`:""}`,s=await this.fetch("GET",i);if(!s.ok)throw new Error(`Failed to fetch traces: ${s.status} ${s.statusText}`);return Is.parse(await s.json())}async getLatencyTraces(t,n,r){const o=new URLSearchParams;o.set("traceType","LATENCY"),n&&o.set("limit",String(n)),r&&o.set("lastTraceId",r);const i=`/conversations/${t}/traces${o.toString()?`?${o.toString()}`:""}`,s=await this.fetch("GET",i);if(!s.ok)throw new Error(`Failed to fetch latency traces: ${s.status} ${s.statusText}`);return Es.parse(await s.json())}getCalls(t={}){return this.getConversations(t)}getCall(t){return this.getConversation(t)}getStepTraces(t,n){return this.getTraces(t,n)}}const It="bosun.traces.telescopeSourceId";function Ns(){if(typeof window>"u")return null;try{return window.localStorage.getItem(It)}catch{return null}}function As(e){if(!(typeof window>"u")&&!(!e||!e.trim()))try{window.localStorage.setItem(It,e)}catch{}}export{Ps as T,Ns as g,As as p};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var p=Object.defineProperty;var f=(o,e,r)=>e in o?p(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r;var h=(o,e,r)=>f(o,typeof e!="symbol"?e+"":e,r);class g{constructor(){h(this,"poolSize",120)}async fetchConversations(e,r,s){return await m(150),this.generateConversations(e,r,s)}generateConversations(e,r,s){const u=Date.now(),i=[];for(let n=0;n<this.poolSize;n++){const c=String(1e5+n);i.push({conversationId:c,medium:n%2===0?"phone":"whatsapp",phoneNumber:`+44 7700 ${String(1e3+n%90).padStart(4,"0")}`,duration:Math.floor(Math.random()*600),createdAt:u-n*36e5})}let a=i;if(r){const n=r.replace(/\s+/g,"");a=i.filter(c=>{var l;return(l=c.phoneNumber)==null?void 0:l.replace(/\s+/g,"").includes(n)})}if(a.sort((n,c)=>c.createdAt-n.createdAt),s){const n=a.findIndex(c=>c.conversationId===s);n>=0&&(a=a.slice(n+1))}const t=a.slice(0,e),d=t.length?t[t.length-1].conversationId:void 0;return{limit:e,items:t,lastConversationId:d}}async fetchTraces(e){return await m(150),{items:this.generateTraces(e)}}generateTraces(e){const r=w($(e)),s=Math.floor(r()*5)+3,u=Date.now(),i=Array.from({length:s},(a,t)=>{const d=u-(s-t)*3e4,n=t%3;return n===0?{traceType:"CONVERSATIONAL",traceId:`conv-${e}-${t}`,conversationId:e,eventName:"received-message",role:"user",medium:"phone",content:`Hello (${t})`,createdAt:d}:n===1?{traceType:"API_CALL",traceId:`api-${e}-${t}`,conversationId:e,operationName:"getBooking",method:"GET",path:`/bookings/${e}`,createdAt:d,durationMs:Math.floor(r()*200)+50,status:200,ok:!0}:{traceType:"STEP",traceId:`step-${e}-${t}`,conversationId:e,scopeId:`scope-${t}`,workflowId:`workflow-${t}`,workflowRunId:`run-${e}-${t}`,name:"main",renderedPrompt:`Rendered prompt for ${e}/${t}`,receivedContext:{foo:"bar"},receivedPrompt:`User says #${t}`,createdAt:d,stringifiedConversation:`user: hi
|
|
2
|
+
agent: ok (${t})`,response:`response ${t}`,model:"gpt-4"}});return i.sort((a,t)=>a.createdAt-t.createdAt),i}}function m(o){return new Promise(e=>setTimeout(e,o))}function $(o){let e=1779033703^o.length;for(let r=0;r<o.length;r++)e=Math.imul(e^o.charCodeAt(r),3432918353),e=e<<13|e>>>19;return e>>>0}function w(o){return function(){let e=o+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}const k=new g;export{k as m};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var N=t=>{throw TypeError(t)};var W=(t,e,n)=>e.has(t)||N("Cannot "+n);var i=(t,e,n)=>(W(t,e,"read from private field"),n?n.call(t):e.get(t)),u=(t,e,n)=>e.has(t)?N("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);import{o as I}from"./DnMQeiTY.js";import{w as f,j as d,y as h}from"./CR-uVjxM.js";import{w as q}from"./DNvczHUR.js";import{b as X}from"./B0XwC4Ot.js";const z="1788427624840";var $;const M=(($=globalThis.__sveltekit_j2c3i6)==null?void 0:$.base)??"";var V;const F=((V=globalThis.__sveltekit_j2c3i6)==null?void 0:V.assets)??M??"";new URL("sveltekit-internal://");function ce(t,e){return t==="/"||e==="ignore"?t:e==="never"?t.endsWith("/")?t.slice(0,-1):t:e==="always"&&!t.endsWith("/")?t+"/":t}function ue(t){return t.split("%25").map(decodeURI).join("%25")}function fe(t){for(const e in t)t[e]=decodeURIComponent(t[e]);return t}function de({href:t}){return t.split("#")[0]}function he(t,e,n,r=!1){const s=new URL(t);Object.defineProperty(s,"searchParams",{value:new Proxy(s.searchParams,{get(o,a){if(a==="get"||a==="getAll"||a==="has")return(E,...J)=>(n(E),o[a](E,...J));e();const c=Reflect.get(o,a);return typeof c=="function"?c.bind(o):c}}),enumerable:!0,configurable:!0});const l=["href","pathname","search","toString","toJSON"];r&&l.push("hash");for(const o of l)Object.defineProperty(s,o,{get(){return e(),t[o]},enumerable:!0,configurable:!0});return s}function Q(){}function Z(...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 s=r.length;for(;s;)e=e*33^r[--s]}else throw new TypeError("value must be a string or TypedArray");return(e>>>0).toString(36)}const ee=window.fetch;window.fetch=(t,e)=>((t instanceof Request?t.method:(e==null?void 0:e.method)||"GET")!=="GET"&&_.delete(O(t)),ee(t,e));const _=new Map;function ge(t,e){const n=O(t,e),r=document.querySelector(n);if(r!=null&&r.textContent){r.remove();let{body:s,...l}=JSON.parse(r.textContent);r.getAttribute("data-b64")!==null&&(s=X(s));const a=r.getAttribute("data-ttl");return a&&_.set(n,{body:s,init:l,ttl:1e3*Number(a)}),Promise.resolve(new Response(s,l))}return window.fetch(t,e)}function _e(t,e,n){if(_.size>0){const r=O(t,n),s=_.get(r);if(s){if(performance.now()<s.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(s.body,s.init);_.delete(r)}}return window.fetch(e,n)}function O(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 s=[];e.headers&&s.push([...new Headers(e.headers)].join(",")),e.body&&(typeof e.body=="string"||ArrayBuffer.isView(e.body))&&s.push(e.body),r+=`[data-hash="${Z(...s)}"]`}return r}const be="sveltekit:snapshot",pe="sveltekit:scroll",me="sveltekit:states",we="sveltekit:pageurl",ve="sveltekit:history",ye="sveltekit:navigation",L={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},H=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...H];const te=new Set([...H]);[...te];const K=location.origin;function Re(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 Se(){return{x:pageXOffset,y:pageYOffset}}function g(t,e){return t.getAttribute(`data-sveltekit-${e}`)}const P={...L,"":L.hover};function B(t){let e=t.assignedSlot??t.parentNode;return(e==null?void 0:e.nodeType)===11&&(e=e.host),e}function Ae(t,e){for(;t&&t!==e;){if(t.nodeName.toUpperCase()==="A"&&t.hasAttribute("href"))return t;t=B(t)}}function ke(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 a=location.hash.split("#")[1]||"/";r.hash=`#${a}${r.hash}`}}catch{}const s=t instanceof SVGAElement?t.target.baseVal:t.target,l=!r||!!s||ne(r,e,n)||(t.getAttribute("rel")||"").split(/\s+/).includes("external"),o=(r==null?void 0:r.origin)===K&&t.hasAttribute("download");return{url:r,external:l,target:s,download:o}}function Ee(t){let e=null,n=null,r=null,s=null,l=null,o=null,a=t;for(;a&&a!==document.documentElement;)r===null&&(r=g(a,"preload-code")),s===null&&(s=g(a,"preload-data")),e===null&&(e=g(a,"keepfocus")),n===null&&(n=g(a,"noscroll")),l===null&&(l=g(a,"reload")),o===null&&(o=g(a,"replacestate")),a=B(a);function c(E){switch(E){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:P[r??"off"],preload_data:P[s??"off"],keepfocus:c(e),noscroll:c(n),reload:c(l),replace_state:c(o)}}function Te(t){const e=q(t);let n=!0;function r(){n=!0,e.update(o=>o)}function s(o){n=!1,e.set(o)}function l(o){let a;return e.subscribe(c=>{(a===void 0||n&&c!==a)&&o(a=c)})}return{notify:r,set:s,subscribe:l}}const D={v:Q};function Ue(){const{set:t,subscribe:e}=q(!1);let n;async function r(){clearTimeout(n);try{const s=await fetch(`${F}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!s.ok)return!1;const o=(await s.json()).version!==z;return o&&(t(!0),D.v(),clearTimeout(n)),o}catch{return!1}}return{subscribe:e,check:r}}function ne(t,e,n){return t.origin!==K||!t.pathname.startsWith(e)?!0:n?t.pathname!==location.pathname:!1}function Oe(t){}let U,x,T;const re=I.toString().includes("$$")||/function \w+\(\) \{\}/.test(I.toString()),j="a:";var b,p,m,w,v,y,R,S,C,A,G,k,Y;re?(U={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(j)},x={current:null},T={current:!1}):(U=new(C=class{constructor(){u(this,b,f({}));u(this,p,f(null));u(this,m,f(null));u(this,w,f({}));u(this,v,f({id:null}));u(this,y,f({}));u(this,R,f(-1));u(this,S,f(new URL(j)))}get data(){return d(i(this,b))}set data(e){h(i(this,b),e)}get form(){return d(i(this,p))}set form(e){h(i(this,p),e)}get error(){return d(i(this,m))}set error(e){h(i(this,m),e)}get params(){return d(i(this,w))}set params(e){h(i(this,w),e)}get route(){return d(i(this,v))}set route(e){h(i(this,v),e)}get state(){return d(i(this,y))}set state(e){h(i(this,y),e)}get status(){return d(i(this,R))}set status(e){h(i(this,R),e)}get url(){return d(i(this,S))}set url(e){h(i(this,S),e)}},b=new WeakMap,p=new WeakMap,m=new WeakMap,w=new WeakMap,v=new WeakMap,y=new WeakMap,R=new WeakMap,S=new WeakMap,C),x=new(G=class{constructor(){u(this,A,f(null))}get current(){return d(i(this,A))}set current(e){h(i(this,A),e)}},A=new WeakMap,G),T=new(Y=class{constructor(){u(this,k,f(!1))}get current(){return d(i(this,k))}set current(e){h(i(this,k),e)}},k=new WeakMap,Y),D.v=()=>T.current=!0);function Pe(t){Object.assign(U,t)}export{ve as H,ye as N,we as P,me as S,x as a,M as b,Ee as c,de as d,fe as e,Ae as f,ke as g,ce as h,ne as i,Ue as j,Te as k,L as l,he as m,Q as n,K as o,U as p,ue as q,Re as r,Se as s,be as t,Pe as u,_e as v,ge as w,pe as x,Oe as y};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as f,f as p}from"./
|
|
1
|
+
import{a as f,f as p}from"./CCYriF4C.js";import{p as v,a as x,j as h,c as _,r as z,n as C}from"./CR-uVjxM.js";import{s as k}from"./9mOMnnWN.js";import{a as w}from"./CR5IRTqC.js";import{b as B}from"./ClLUwVGq.js";import{p as e,r as j}from"./BcbX6huO.js";var N=new Set(["$$slots","$$events","$$legacy","variant","size","type","disabled","class","children","el"]),S=p("<button><!></button>");function H(o,r){v(r,!0);let s=e(r,"variant",3,"primary"),n=e(r,"size",3,"medium"),i=e(r,"type",3,"button"),d=e(r,"disabled",3,!1),c=e(r,"class",3,""),a=e(r,"el",15),b=j(r,N);const l={primary:"border border-thin border-rc-green-450 backdrop-blur-xl rounded-lg text-rc-gray-100 font-bold bg-rc-green-350 hover:bg-rc-green-250 focus:bg-rc-green-200 focus:outline-none active:bg-rc-green-250",secondary:"border border-thin border-rc-gray-600 backdrop-blur-2xl rounded-lg bg-rc-gray-800 text-rc-gray-100 font-bold hover:bg-rc-gray-700 focus:bg-rc-gray-700 focus:outline-none active:bg-rc-gray-650",outlined:"border border-rc-gray-500 bg-rc-gray-900 font-semibold hover:bg-rc-gray-700 hover:border-rc-gray-400 focus:outline-none focus:ring-0 focus:border-rc-gray-400 active:border-rc-gray-400",ghost:"bg-transparent rounded-lg hover:text-gray-100 focus:text-gray-100 active:text-gray-100"},g={big:"px-4 py-2 text-base",medium:"px-4 py-2 text-base",small:"px-4 py-2 text-base"};let u=C(()=>`text-gray-200
|
|
2
2
|
rounded
|
|
3
3
|
transition-colors
|
|
4
4
|
disabled:opacity-50
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as j,a as
|
|
1
|
+
import{c as j,a as b,f as K}from"./CCYriF4C.js";import{o as M}from"./DnMQeiTY.js";import{p as R,f as W,a as q,j as t,w as L,y as c,c as T,r as k,t as B,x as F}from"./CR-uVjxM.js";import{i as G}from"./BQIf5msi.js";import{c as x,s as H}from"./CR5IRTqC.js";import{b as h}from"./ClLUwVGq.js";import{p as i}from"./BcbX6huO.js";import{P as I}from"./DEz15oJb.js";var J=K('<div class="popover svelte-1fd3ybn" role="dialog" aria-modal="true"><div class="popover svelte-1fd3ybn" role="dialog" aria-modal="true"><!></div></div>');function te(e,n){R(n,!0);let p=i(n,"open",3,!1),d=i(n,"anchorEl",3,null),w=i(n,"id",3,""),N=i(n,"placement",3,"bottom-start"),O=i(n,"offset",19,()=>[0,2]),y=i(n,"flip",3,!0),z=i(n,"preventOverflow",3,!0),A=i(n,"onClose",3,()=>{}),a=L(null),s=L(null);function g(){A()()}function C(o){if(p()&&t(a)&&d()){const l=o.target;!t(a).contains(l)&&!d().contains(l)&&g()}}function E(o){o.key==="Escape"&&p()&&g()}M(()=>{document.addEventListener("click",C,!0),document.addEventListener("keydown",E);const o=()=>{t(s)&&t(s).update()},l=()=>{t(s)&&t(s).update()};return window.addEventListener("resize",o),window.addEventListener("scroll",l,!0),()=>{document.removeEventListener("click",C,!0),document.removeEventListener("keydown",E),window.removeEventListener("resize",o),window.removeEventListener("scroll",l,!0)}});var _=j(),D=W(_);{var P=o=>{h(I(o,{get referenceEl(){return d()},get placement(){return N()},get offset(){return O()},get flip(){return y()},get preventOverflow(){return z()},children:v=>{var f=J(),u=T(f),S=T(u);n.children(S),k(u),h(u,r=>c(a,r),()=>t(a)),k(f),h(f,r=>c(a,r),()=>t(a)),B(()=>{var r;x(f,"id",w()),x(u,"id",w()),H(u,`min-width:${((r=d())==null?void 0:r.offsetWidth)??0}px`)}),b(v,f)},$$slots:{default:!0}}),v=>c(s,v,!0),()=>t(s))};G(D,o=>{p()&&d()&&o(P)})}b(e,_),q()}const m=F([]);function ie(e){return!Q(e)&&!U(e)}function Q(e){return"operationName"in e&&"method"in e&&"path"in e}function U(e){return"eventName"in e&&"role"in e&&"medium"in e&&"content"in e}function ae(e){m.push(e)}function se(e){console.log("[chat-content] addApiCallTrace",e==null?void 0:e.operationName,e==null?void 0:e.method,e==null?void 0:e.path,e),m.push(e)}function le(e){console.log("[chat-content] addConversationalTrace",e==null?void 0:e.eventName,e==null?void 0:e.role,e==null?void 0:e.medium,e),m.push(e)}function re(){m.length=0}export{te as D,U as a,ie as b,m as c,re as d,ae as e,se as f,le as g,Q as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as v,C as o,L as y,M as f,N as l,O as m,G as p,F as i,P as T,I as A}from"./CR-uVjxM.js";import{B as N}from"./BoX_BZZY.js";function E(d,_,e){var s;o&&(s=A,y());var r=new N(d);v(()=>{var a=_()??null;if(o){var h=l(s),c=h===T,u=a!==null;if(c!==u){var t=m();p(t),r.anchor=t,i(!1),r.ensure(a,a&&(n=>e(n,a))),i(!0);return}}r.ensure(a,a&&(n=>e(n,a)))},f)}export{E as c};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DLQqXQ6R.js","./C1FmrZbK.js","../assets/editor.BMIWPGx3.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as g}from"./C1FmrZbK.js";import{a as p,f as _}from"./
|
|
2
|
+
import{_ as g}from"./C1FmrZbK.js";import{a as p,f as _}from"./CCYriF4C.js";import{o as b}from"./DnMQeiTY.js";import{p as y,j as s,y as u,d as k,c as R,r as w,t as P,a as B,w as d}from"./CR-uVjxM.js";import{s as L}from"./C9yBjdYI.js";import{b as M}from"./ClLUwVGq.js";import{p as f}from"./BcbX6huO.js";import{e as O,a as H}from"./BU7aeYn4.js";var x=_('<div><div class="h-full w-full"></div></div>');function T(c,t){y(t,!0);let m=f(t,"language",3,"json"),h=f(t,"class",3,""),r=null,i=null,l=d(null),n=d(!1);b(()=>{if(!s(l))return;O();let a=!1;return g(()=>import("./DLQqXQ6R.js").then(e=>e.e),__vite__mapDeps([0,1,2]),import.meta.url).then(e=>{a||(H(e),r=e.editor.create(s(l),{value:t.value??"",language:m(),theme:"bosun-dark",lineNumbers:"off",readOnly:!0,automaticLayout:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,wordWrap:"on",overviewRulerBorder:!1,hideCursorInOverviewRuler:!0,matchBrackets:"never",bracketPairColorization:{enabled:!1},guides:{highlightActiveBracketPair:!1,bracketPairs:!1,bracketPairsHorizontal:!1},occurrencesHighlight:"off",selectionHighlight:!1,renderLineHighlight:"none",contextmenu:!1}),i=r.getModel(),u(n,!0))}).catch(e=>{console.error("ReadOnlyMonaco: failed to init",e)}),()=>{a=!0;const e=i;if(i=null,r){try{r.setModel(null)}catch{}r.dispose(),r=null}try{e==null||e.dispose()}catch{}}}),k(()=>{if(!r||!s(n))return;const a=t.value??"";r.getValue()!==a&&r.setValue(a)});var o=x(),v=R(o);M(v,a=>u(l,a),()=>s(l)),w(o),P(()=>L(o,1,`overflow-hidden rounded-md border border-rc-gray-700 ${h()}`)),p(c,o),B()}export{T as R};
|