openpond 0.2.66 → 0.2.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-server.d.ts +691 -1
- package/dist/app-server.js +1 -1
- package/dist/chunks/{account-context-TIJOM22A.js → account-context-MWB6HN6I.js} +1 -1
- package/dist/chunks/{acp-YYZ3ZO3Q.js → acp-2OIXATRY.js} +1 -1
- package/dist/chunks/{acp-agent-T26S7TU2.js → acp-agent-PAGX2B47.js} +1 -1
- package/dist/chunks/actions-command-2VE6YI4W.js +2 -0
- package/dist/chunks/{app-layer-5XUMNHDO.js → app-layer-YNEUEOEP.js} +1 -1
- package/dist/chunks/{app-server-connected-apps-IB6M35NS.js → app-server-connected-apps-TZOAUOYR.js} +1 -1
- package/dist/chunks/app-server-evaluations-RRLYWLPK.js +2 -0
- package/dist/chunks/app-server-harness-services-XXM336NU.js +2 -0
- package/dist/chunks/app-server-runtime-GBX65JJ7.js +2 -0
- package/dist/chunks/apps-RSFEJOQN.js +2 -0
- package/dist/chunks/chunk-2PXKSAG6.js +2 -0
- package/dist/chunks/{chunk-GRLQHYAU.js → chunk-2TGHZXJE.js} +2 -2
- package/dist/chunks/{chunk-YU4JYWCA.js → chunk-3A2Y7UK3.js} +1 -1
- package/dist/chunks/chunk-3Z4VM2LF.js +4 -0
- package/dist/chunks/chunk-4BUM6JEC.js +33 -0
- package/dist/chunks/chunk-4G3GTEVS.js +23 -0
- package/dist/chunks/{chunk-FUFI4THX.js → chunk-4KNPCJR4.js} +1 -1
- package/dist/chunks/chunk-4KTGYHCE.js +2 -0
- package/dist/chunks/chunk-4PUOWSDE.js +13 -0
- package/dist/chunks/chunk-55YD4UTW.js +2 -0
- package/dist/chunks/chunk-5G7BQAUA.js +2 -0
- package/dist/chunks/chunk-65FJWWXG.js +2 -0
- package/dist/chunks/{chunk-2GJD23CM.js → chunk-65WRWLUD.js} +1 -1
- package/dist/chunks/chunk-6D3FI2XT.js +2 -0
- package/dist/chunks/chunk-73TW6BKK.js +6 -0
- package/dist/chunks/{chunk-6S2MWJVD.js → chunk-7NCM6GBN.js} +1 -1
- package/dist/chunks/chunk-7OFD6TFD.js +2 -0
- package/dist/chunks/chunk-7OKZCJHS.js +3 -0
- package/dist/chunks/{chunk-NTM3KQ25.js → chunk-7PKDJHT6.js} +1 -1
- package/dist/chunks/chunk-7RJOCGQ6.js +2 -0
- package/dist/chunks/{chunk-SAZTOGX6.js → chunk-7RSQOC5M.js} +3 -3
- package/dist/chunks/{chunk-6TRVEA3T.js → chunk-AFH462DO.js} +1 -1
- package/dist/chunks/{chunk-GUG2SWRZ.js → chunk-AFKFN25T.js} +1 -1
- package/dist/chunks/chunk-AFYYIJ6K.js +2 -0
- package/dist/chunks/chunk-APKXXAUF.js +2 -0
- package/dist/chunks/chunk-AQUZCWM3.js +2 -0
- package/dist/chunks/chunk-AUO5DCEU.js +2 -0
- package/dist/chunks/chunk-AYOMVI7J.js +2 -0
- package/dist/chunks/{chunk-EVQISX7M.js → chunk-B66QCXH2.js} +1 -1
- package/dist/chunks/{chunk-S6UCVXBC.js → chunk-BHKXPWFB.js} +1 -1
- package/dist/chunks/chunk-BU6MW65V.js +10 -0
- package/dist/chunks/{chunk-C5B3FMV3.js → chunk-CCZ276IA.js} +1 -1
- package/dist/chunks/{chunk-LYVHYT3L.js → chunk-CIZI6Z7D.js} +1 -1
- package/dist/chunks/{chunk-4D3CICBG.js → chunk-CO23RRN7.js} +1 -1
- package/dist/chunks/{chunk-QAFXQHHG.js → chunk-D6L6UNUQ.js} +2 -2
- package/dist/chunks/chunk-DDOIPTOM.js +2 -0
- package/dist/chunks/{chunk-ZU3YBRXS.js → chunk-DKOVZ6R2.js} +3 -3
- package/dist/chunks/chunk-DRLP7GIU.js +2 -0
- package/dist/chunks/{chunk-DAEUVT2I.js → chunk-DRTHKWHK.js} +1 -1
- package/dist/chunks/{chunk-W22KWKF6.js → chunk-DWF3FCY4.js} +1 -1
- package/dist/chunks/{chunk-NABPZ7AK.js → chunk-DWM5G7BU.js} +1 -1
- package/dist/chunks/chunk-DXJC3QW7.js +2 -0
- package/dist/chunks/{chunk-V3S2B6WU.js → chunk-E2JB5OCO.js} +1 -1
- package/dist/chunks/{chunk-GI7LTJV3.js → chunk-EDYCSW22.js} +1 -1
- package/dist/chunks/{chunk-4JYTFEND.js → chunk-EFP75UEX.js} +1 -1
- package/dist/chunks/{chunk-WKHGXLJD.js → chunk-EGP6DF34.js} +2 -2
- package/dist/chunks/{chunk-M5QPL5NO.js → chunk-ESYPMD7Q.js} +1 -1
- package/dist/chunks/{chunk-PWKJ5KLZ.js → chunk-EXYSD45J.js} +1 -1
- package/dist/chunks/{chunk-XHBMK6LC.js → chunk-EYTTZ5H4.js} +1 -1
- package/dist/chunks/chunk-FKUWCJ73.js +161 -0
- package/dist/chunks/{chunk-U2BD545L.js → chunk-FNGZ4UDZ.js} +1 -1
- package/dist/chunks/{chunk-JFZ6USNQ.js → chunk-G7X73SBG.js} +1 -1
- package/dist/chunks/{chunk-36FNNR5N.js → chunk-GEYZVOGD.js} +1 -1
- package/dist/chunks/{chunk-ULJZ7NUF.js → chunk-GY7YSD6J.js} +1 -1
- package/dist/chunks/{chunk-JLW5BQVO.js → chunk-GYYJ47GX.js} +1 -1
- package/dist/chunks/chunk-HG2YFMVU.js +4 -0
- package/dist/chunks/{chunk-BTJACFU3.js → chunk-HKVFU3B3.js} +1 -1
- package/dist/chunks/chunk-IHAEZ73V.js +2 -0
- package/dist/chunks/{chunk-LI3FTPAH.js → chunk-IIT66347.js} +4 -4
- package/dist/chunks/{chunk-Q4AXZY2P.js → chunk-IO5DZUKL.js} +1 -1
- package/dist/chunks/chunk-J256AEEE.js +2 -0
- package/dist/chunks/{chunk-CRDKBFRN.js → chunk-JEMECEQH.js} +1 -1
- package/dist/chunks/{chunk-7P5SH3CI.js → chunk-JPUSTFZC.js} +1 -1
- package/dist/chunks/{chunk-5AU5Y6KS.js → chunk-JQOVC35K.js} +1 -1
- package/dist/chunks/{chunk-VS3AMJEK.js → chunk-JT5YQ52I.js} +1 -1
- package/dist/chunks/chunk-JVMSN7LH.js +2 -0
- package/dist/chunks/{chunk-HORMGT2Q.js → chunk-JXYJQT5Q.js} +1 -1
- package/dist/chunks/{chunk-OTUS7NTQ.js → chunk-K7KBFM2T.js} +1 -1
- package/dist/chunks/{chunk-FS2VKOT7.js → chunk-KCLMA2IH.js} +1 -1
- package/dist/chunks/chunk-KDER7R45.js +2 -0
- package/dist/chunks/{chunk-WBO6FQHR.js → chunk-KOC3YJEU.js} +2 -2
- package/dist/chunks/{chunk-6ZTP6CUJ.js → chunk-KP2MYTP5.js} +1 -1
- package/dist/chunks/{chunk-YRDPVTEI.js → chunk-KU4TPDPH.js} +2 -2
- package/dist/chunks/{chunk-WJSJXK2N.js → chunk-KUE46HTH.js} +1 -1
- package/dist/chunks/chunk-LVXL7T5O.js +2 -0
- package/dist/chunks/{chunk-5KWKSR4P.js → chunk-M4A7G4S5.js} +2 -2
- package/dist/chunks/{chunk-KAWXVMHI.js → chunk-M4ZHFDRJ.js} +1 -1
- package/dist/chunks/{chunk-HX6GXMDK.js → chunk-MEJLWNRS.js} +1 -1
- package/dist/chunks/{chunk-B666Z2NS.js → chunk-MIFVX5PK.js} +1 -1
- package/dist/chunks/{chunk-66HFW4OU.js → chunk-MOXIGLN2.js} +1 -1
- package/dist/chunks/{chunk-7XOUM6RK.js → chunk-N5EAVX4G.js} +1 -1
- package/dist/chunks/{chunk-Z2TOBS3P.js → chunk-NMMHXYDJ.js} +1 -1
- package/dist/chunks/{chunk-EBOTNBUS.js → chunk-NRYC4NH6.js} +1 -1
- package/dist/chunks/chunk-NSSZ2ZIU.js +2 -0
- package/dist/chunks/{chunk-4TTXNVCE.js → chunk-OFJPOTES.js} +1 -1
- package/dist/chunks/chunk-OIH2LPIT.js +2 -0
- package/dist/chunks/chunk-OUJ63LMU.js +2 -0
- package/dist/chunks/{chunk-DXA2UHBE.js → chunk-P4QM63L3.js} +1 -1
- package/dist/chunks/chunk-PACLKDTN.js +2 -0
- package/dist/chunks/{chunk-AF3AVDPP.js → chunk-PAYFJHPO.js} +1 -1
- package/dist/chunks/{chunk-OPTJYDZN.js → chunk-PHZZBXDO.js} +1 -1
- package/dist/chunks/{chunk-HPTEJBP4.js → chunk-PKJHN666.js} +1 -1
- package/dist/chunks/{chunk-HNDAGZCF.js → chunk-PLROXHG2.js} +1 -1
- package/dist/chunks/{chunk-W7NXFRHN.js → chunk-PNPV2LDE.js} +1 -1
- package/dist/chunks/{chunk-DSJZS77R.js → chunk-PSY6IRJE.js} +8 -8
- package/dist/chunks/{chunk-UK5LGSGT.js → chunk-Q73RKX7I.js} +1 -1
- package/dist/chunks/{chunk-PLVWARB7.js → chunk-Q7FBVLLB.js} +1 -1
- package/dist/chunks/{chunk-QAEZNFAM.js → chunk-Q7P34B2O.js} +1 -1
- package/dist/chunks/{chunk-QYQZQVVN.js → chunk-QLGP2OAQ.js} +1 -1
- package/dist/chunks/{chunk-GIU3Z45P.js → chunk-QUNQM2E3.js} +1 -1
- package/dist/chunks/chunk-R2FYCJL6.js +2 -0
- package/dist/chunks/{chunk-KOKBDIGR.js → chunk-R4EEGWXB.js} +1 -1
- package/dist/chunks/chunk-RBTDSI4L.js +11 -0
- package/dist/chunks/chunk-RCQYEHHD.js +2 -0
- package/dist/chunks/{chunk-TGULVWPV.js → chunk-RFQD6B44.js} +1 -1
- package/dist/chunks/{chunk-3WJQ4IGK.js → chunk-RPM4FDRX.js} +1 -1
- package/dist/chunks/{chunk-MCBRB5D6.js → chunk-RY46UPBO.js} +4 -4
- package/dist/chunks/{chunk-67HXM6AL.js → chunk-SDHG6CKU.js} +1 -1
- package/dist/chunks/{chunk-DIDQHTAX.js → chunk-SO4GMSNP.js} +1 -1
- package/dist/chunks/{chunk-O6ZYDHEJ.js → chunk-SSHE6B7Z.js} +1 -1
- package/dist/chunks/{chunk-SH7POUVX.js → chunk-SV7ZBEK2.js} +6 -6
- package/dist/chunks/{chunk-BJXPQIVD.js → chunk-U7D6Q744.js} +1 -1
- package/dist/chunks/chunk-U7X5ZLAL.js +2 -0
- package/dist/chunks/{chunk-LARJARMS.js → chunk-UANH7U3Y.js} +1 -1
- package/dist/chunks/{chunk-CYQLXS2U.js → chunk-UGFSAG4U.js} +1 -1
- package/dist/chunks/chunk-ULTV6INR.js +2 -0
- package/dist/chunks/{chunk-FHLSLOKH.js → chunk-UMAVVMXL.js} +7 -7
- package/dist/chunks/chunk-V24VHT76.js +2 -0
- package/dist/chunks/chunk-VEBW7NKD.js +2 -0
- package/dist/chunks/chunk-VJR2GNRY.js +2 -0
- package/dist/chunks/{chunk-JD76ANPN.js → chunk-VJYOKU3C.js} +1 -1
- package/dist/chunks/{chunk-5Z3AU5CL.js → chunk-VWWKWYSQ.js} +1 -1
- package/dist/chunks/chunk-WCNPGKST.js +2 -0
- package/dist/chunks/chunk-WD4KAKEX.js +2 -0
- package/dist/chunks/chunk-WGQ3FMRF.js +2 -0
- package/dist/chunks/{chunk-6C3CXME7.js → chunk-WNXUSELC.js} +1 -1
- package/dist/chunks/{chunk-GFAI2MCJ.js → chunk-WZ35ICTE.js} +3 -3
- package/dist/chunks/chunk-XHACK2KR.js +2 -0
- package/dist/chunks/chunk-XOPHFUUY.js +2 -0
- package/dist/chunks/{chunk-UXPO3ZV7.js → chunk-XQAUHXL4.js} +4 -4
- package/dist/chunks/{chunk-OXRVILDW.js → chunk-XT4CSKHM.js} +1 -1
- package/dist/chunks/{chunk-QJJNHKLT.js → chunk-XY7HFXLH.js} +1 -1
- package/dist/chunks/{chunk-ZUT4EM64.js → chunk-XYZV3FKD.js} +1 -1
- package/dist/chunks/{chunk-7FBWUVX7.js → chunk-Y2WNZWT2.js} +1 -1
- package/dist/chunks/chunk-Y4I6CFZJ.js +2 -0
- package/dist/chunks/chunk-YDZBX4XQ.js +2 -0
- package/dist/chunks/chunk-YI6ME6PU.js +22 -0
- package/dist/chunks/{chunk-H42UW6IF.js → chunk-YXMYK5P7.js} +1 -1
- package/dist/chunks/{chunk-D7R2AAX2.js → chunk-Z33RVGP6.js} +1 -1
- package/dist/chunks/{chunk-B32CW3NT.js → chunk-ZDEIVUUI.js} +1 -1
- package/dist/chunks/{chunk-IEVJLG3V.js → chunk-ZIQJDTQB.js} +1 -1
- package/dist/chunks/{chunk-GDJ4X2ZN.js → chunk-ZYLLPRPU.js} +1 -1
- package/dist/chunks/cli-R7TAP6Z2.js +2 -0
- package/dist/chunks/command-LNOVZQSK.js +58 -0
- package/dist/chunks/{configuration-command-4WTS2MZS.js → configuration-command-CNITTZRP.js} +1 -1
- package/dist/chunks/connected-app-executor-FGWCLOJO.js +2 -0
- package/dist/chunks/connected-evidence-5VZBYNWN.js +2 -0
- package/dist/chunks/{connected-starting-assets-4LDXQVLN.js → connected-starting-assets-KWOFEIE4.js} +1 -1
- package/dist/chunks/{connection-GDWPMHPC.js → connection-VMBXW5PD.js} +1 -1
- package/dist/chunks/{continual-HQCFY7GN.js → continual-FVOLGGOE.js} +1 -1
- package/dist/chunks/core-commands-BPYXVT7O.js +2 -0
- package/dist/chunks/dataset-preparation-authoring-UUYFWWCT.js +4 -0
- package/dist/chunks/datasets-E5TXSVIY.js +2 -0
- package/dist/chunks/desktop-test-FX7DTY4N.js +3 -0
- package/dist/chunks/dist-2MKJC6HN.js +2 -0
- package/dist/chunks/{dist-GR56E3QK.js → dist-DKE7RJZN.js} +1 -1
- package/dist/chunks/evaluation-coordination-KUTZEEPB.js +2 -0
- package/dist/chunks/experiment-improvements-PQNR5YHN.js +2 -0
- package/dist/chunks/experiments-Z4BJWT3Y.js +2 -0
- package/dist/chunks/experiments-signal-3GCLKUWZ.js +2 -0
- package/dist/chunks/{extension-UH34ZF7N.js → extension-3EKIT6BB.js} +1 -1
- package/dist/chunks/{help-JQA3YMCX.js → help-K6YLZ3KL.js} +1 -1
- package/dist/chunks/host-profile-evaluation-tools-UF4ATIUF.js +2 -0
- package/dist/chunks/host-profile-external-dataset-KSEPXY2S.js +2 -0
- package/dist/chunks/hosted-app-server-composition-LA3BZ4SE.js +2 -0
- package/dist/chunks/hosted-experiment-improvement-VG2WE7XZ.js +3 -0
- package/dist/chunks/hosted-harness-runtime-MMTLCL23.js +2 -0
- package/dist/chunks/hosted-profile-candidate-PTGQLPZO.js +3 -0
- package/dist/chunks/hosted-profile-compiler-FS5R6CHJ.js +2 -0
- package/dist/chunks/hosted-profile-evaluation-control-UUEZEMXU.js +2 -0
- package/dist/chunks/hosted-profile-evaluation-inspection-4F7OEF4T.js +3 -0
- package/dist/chunks/hosted-profile-evaluation-preparation-LIJJZDHQ.js +3 -0
- package/dist/chunks/hosted-tasksets-NXVF4AQA.js +2 -0
- package/dist/chunks/human-review-2ZOB7CJZ.js +2 -0
- package/dist/chunks/{import-CLWTKDG6.js → import-YHYKZ6JN.js} +2 -2
- package/dist/chunks/javascript-isolate-process-source-YAT3GPW4.js +2 -0
- package/dist/chunks/javascript-verifier-worker-source-LGRP74W4.js +2 -0
- package/dist/chunks/{learning-XTY5VOTK.js → learning-LAXMGWSQ.js} +1 -1
- package/dist/chunks/learning-Y3UKNUGE.js +2 -0
- package/dist/chunks/local-harness-improvement-runtime-3YJQRYXC.js +2 -0
- package/dist/chunks/local-harness-taskset-review-XQHQ6JCR.js +2 -0
- package/dist/chunks/{model-projects-GHWCKDON.js → model-projects-6YWVD2TS.js} +1 -1
- package/dist/chunks/opchat-XXI2ZM53.js +3 -0
- package/dist/chunks/opchat-bounded-chat-3MZGCRLY.js +2 -0
- package/dist/chunks/organizations-W7HI2JA4.js +2 -0
- package/dist/chunks/{profile-RIDNU2I5.js → profile-P2SJPBOJ.js} +1 -1
- package/dist/chunks/project-action-payload-LTIQBX77.js +2 -0
- package/dist/chunks/project-agent-XRIXMXQK.js +2 -0
- package/dist/chunks/published-experiment-source-SDXUVPE7.js +2 -0
- package/dist/chunks/refiner-profile-service-56VYLZQJ.js +2 -0
- package/dist/chunks/{runtime-VSOOPNYN.js → runtime-Q7JUJO4D.js} +2 -2
- package/dist/chunks/sandbox-command-HVA5FJU4.js +2 -0
- package/dist/chunks/{sandbox-template-NN3XQI7M.js → sandbox-template-U536EEWY.js} +1 -1
- package/dist/chunks/saved-work-KSIQPXC2.js +2 -0
- package/dist/chunks/{send-turn-D3GTSSHI.js → send-turn-YLY3YNEQ.js} +1 -1
- package/dist/chunks/setup-RMZ2BHLM.js +2 -0
- package/dist/chunks/{src-662QOKNP.js → src-C3ZUESMK.js} +1 -1
- package/dist/chunks/src-SGQYVBNQ.js +424 -0
- package/dist/chunks/standalone-experiment-turn-owner-TW5MTWIO.js +2 -0
- package/dist/chunks/store-chat-resources-IRHBW2EC.js +2 -0
- package/dist/chunks/{store-continual-support-reviews-7PDLGRWF.js → store-continual-support-reviews-3KK42L4I.js} +1 -1
- package/dist/chunks/store-conversation-serving-IVURK52V.js +2 -0
- package/dist/chunks/{store-create-improve-G46KIUVT.js → store-create-improve-UTCLBXF2.js} +1 -1
- package/dist/chunks/{store-datasets-O67F75BL.js → store-datasets-4AQOVAQY.js} +1 -1
- package/dist/chunks/store-evaluation-results-PK2P3IMH.js +7 -0
- package/dist/chunks/{store-harness-workspaces-PJJQ74G6.js → store-harness-workspaces-YEXB4IRV.js} +1 -1
- package/dist/chunks/store-human-review-O4BVHP25.js +7 -0
- package/dist/chunks/store-learned-preference-migration-validation-44SVX6YB.js +2 -0
- package/dist/chunks/{store-learning-6P6IS7GH.js → store-learning-SIUQIY5C.js} +1 -1
- package/dist/chunks/{store-learning-credentials-EGJ2WTZI.js → store-learning-credentials-BUHR7SN6.js} +1 -1
- package/dist/chunks/store-local-experiments-BHVTKPPE.js +97 -0
- package/dist/chunks/store-model-batch-review-RVAYUVK2.js +2 -0
- package/dist/chunks/{store-model-configuration-T6XJJDAB.js → store-model-configuration-6L3OYXF4.js} +1 -1
- package/dist/chunks/store-model-project-preparation-AAEKCF6V.js +2 -0
- package/dist/chunks/store-modification-recordings-LCPK6K2T.js +9 -0
- package/dist/chunks/{store-preference-comparison-XQFTLMGH.js → store-preference-comparison-5YVIQNVB.js} +1 -1
- package/dist/chunks/{store-sidebar-file-bookmarks-J3JEVAYR.js → store-sidebar-file-bookmarks-WLMYDA4E.js} +1 -1
- package/dist/chunks/{store-sidebar-preferences-2JHTFXJK.js → store-sidebar-preferences-AFMYIDWT.js} +1 -1
- package/dist/chunks/{store-subagents-PUBQVWSU.js → store-subagents-KFPVSTRO.js} +1 -1
- package/dist/chunks/{store-task-inbox-VVXZUJIO.js → store-task-inbox-L6IQTY26.js} +1 -1
- package/dist/chunks/{store-task-inventory-MQX44AI6.js → store-task-inventory-QWS2C656.js} +1 -1
- package/dist/chunks/store-taskset-drafts-FRFL6ITK.js +9 -0
- package/dist/chunks/{store-training-DUVIDYK5.js → store-training-FYXZU2FE.js} +1 -1
- package/dist/chunks/{store-training-jobs-HHFH3V5O.js → store-training-jobs-3N3VKPIY.js} +1 -1
- package/dist/chunks/{store-training-models-C7UUZDTO.js → store-training-models-VOFVGPZR.js} +1 -1
- package/dist/chunks/{taskset-7FQCJ55X.js → taskset-UDDLFYKV.js} +1 -1
- package/dist/chunks/taskset-catalog-RZYEBCRQ.js +2 -0
- package/dist/chunks/taskset-packages-T6B6HYKZ.js +2 -0
- package/dist/chunks/taskset-packages-WMG5DUBN.js +2 -0
- package/dist/chunks/{teams-bot-FXMCOCPP.js → teams-bot-MPWL2PP4.js} +1 -1
- package/dist/chunks/tool-learning-ZQ6NSJ5K.js +2 -0
- package/dist/chunks/training-5NT2YB2L.js +2 -0
- package/dist/chunks/training-5UMT45UL.js +2 -0
- package/dist/chunks/training-UY6KRG4M.js +2 -0
- package/dist/chunks/{training-error-LQKCOQDJ.js → training-error-WF463UNZ.js} +1 -1
- package/dist/chunks/{training-hardware-ESXRWUIK.js → training-hardware-UWQCRDMV.js} +1 -1
- package/dist/chunks/training-hosted-CKSDRVL6.js +2 -0
- package/dist/chunks/training-hosted-alphaedit-HSMRDJTD.js +2 -0
- package/dist/chunks/training-hosted-checkpoint-evaluation-2X7RSOLC.js +2 -0
- package/dist/chunks/training-hosted-decision-7JALOU6O.js +2 -0
- package/dist/chunks/training-hosted-engram-SXO75MFG.js +2 -0
- package/dist/chunks/{training-hosted-learning-YN5VD3PW.js → training-hosted-learning-E2N32YU5.js} +1 -1
- package/dist/chunks/training-hosted-modification-comparison-TXFDJFTG.js +2 -0
- package/dist/chunks/training-hosted-neuron-training-J42WK4EH.js +2 -0
- package/dist/chunks/training-hosted-report-T633TNJG.js +2 -0
- package/dist/chunks/training-hosted-serving-report-BAEABGJH.js +2 -0
- package/dist/chunks/training-hosted-steering-T556BUBG.js +2 -0
- package/dist/chunks/training-hosted-workers-Y2PO5IOA.js +2 -0
- package/dist/chunks/training-model-start-P3PXDWNT.js +2 -0
- package/dist/chunks/web-search-ZEKJHZW4.js +2 -0
- package/dist/chunks/{workspaces-MCS2AQX6.js → workspaces-EK62ANTB.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/sandbox/types/billing.d.ts +87 -6
- package/dist/sandbox/types/io.d.ts +3 -0
- package/dist/sandbox-template/manifest.js +1 -1
- package/dist/skills/manifest.json +3 -3
- package/dist/skills/openpond-cli/references/experiments-and-training.md +461 -1
- package/dist/web/assets/App-CCuh99JW.js +54 -0
- package/dist/web/assets/{AppDialog-DuSd0wk6.js → AppDialog-CxjDHVk9.js} +1 -1
- package/dist/web/assets/AppTerminalPanel-CKJIVpKa.js +2 -0
- package/dist/web/assets/{AppToastContext-Dklk6CaG.js → AppToastContext-EpiT1dHs.js} +1 -1
- package/dist/web/assets/AppsView-BsMyPX_3.js +1 -0
- package/dist/web/assets/{AppsView-DNHWzJb2.css → AppsView-D3vVesNd.css} +1 -1
- package/dist/web/assets/{AttachmentTypeIcon-DipNT6Tj.js → AttachmentTypeIcon-BXvZy5gB.js} +1 -1
- package/dist/web/assets/BrowserSidebar-BIIV4aq4.js +1 -0
- package/dist/web/assets/{CartesianChart-UU1sdoUO.js → CartesianChart-brqLBqnF.js} +1 -1
- package/dist/web/assets/ChatTimelineEntry-CwZbn16X.js +8 -0
- package/dist/web/assets/{CollaborationTabs-BWYRQ1PE.js → CollaborationTabs-BU4uc4tZ.js} +1 -1
- package/dist/web/assets/{CommandMenu-B08F9x5g.js → CommandMenu-DkWpXR55.js} +1 -1
- package/dist/web/assets/CommunityView-CsSxJZGn.js +1 -0
- package/dist/web/assets/{ComposerAttachments-srWBKvCv.js → ComposerAttachments-BdJGCYzI.js} +1 -1
- package/dist/web/assets/{ComposerCreateImproveStrip-DqTpU5cO.js → ComposerCreateImproveStrip-CWy0j1vv.js} +1 -1
- package/dist/web/assets/{ConversationImportsSettings-2KC-KQvu.js → ConversationImportsSettings-DCmiakbZ.js} +1 -1
- package/dist/web/assets/DatasetReviewImport-DEnF_pGu.js +1 -0
- package/dist/web/assets/ExperimentTrainingDataWorkspace-WhwQ0QBi.js +2 -0
- package/dist/web/assets/{FilePagePreview-B-iUVPhh.js → FilePagePreview-BRhhz99q.js} +2 -2
- package/dist/web/assets/{GetStartedView-5v0vBWXy.js → GetStartedView-CLVD-qEi.js} +1 -1
- package/dist/web/assets/{GettingStartedDialog-Bn4072K-.js → GettingStartedDialog-CMxaAMg-.js} +1 -1
- package/dist/web/assets/HostedModelLearningReview-Cn-j-rDo.js +1 -0
- package/dist/web/assets/HostedModelLearningSettings-VNBvf38S.js +1 -0
- package/dist/web/assets/{HtmlVisual-C2WsMj90.js → HtmlVisual-D5y2WG9L.js} +10 -10
- package/dist/web/assets/LabModelVersionDetailPage-BxRmYD6h.js +1 -0
- package/dist/web/assets/{TrainingRunLineage-PXzWR65d.css → LabModelWorkspace-DOrgCk9Z.css} +1 -1
- package/dist/web/assets/LabModelWorkspace-u2Ulm_z4.js +1 -0
- package/dist/web/assets/{LabSkillSidebar-C50P74LI.js → LabSkillSidebar-C7IceJTJ.js} +1 -1
- package/dist/web/assets/LabsRoute-C9Y0GU34.css +1 -0
- package/dist/web/assets/LabsRoute-CbztQaEf.js +74 -0
- package/dist/web/assets/LearningBatchesPage-B1NZTBSv.css +1 -0
- package/dist/web/assets/LearningBatchesPage-CJqgZNvM.js +26 -0
- package/dist/web/assets/MainChatThread-DNMfrrRq.js +2 -0
- package/dist/web/assets/{MainPane-Dje-hfUM.css → MainPane-BZlNLfTM.css} +1 -1
- package/dist/web/assets/MainPane-CQQxSDPS.js +13 -0
- package/dist/web/assets/ModelProjectPageHeader-Dge19aE1.js +1 -0
- package/dist/web/assets/NativeSetupTerminal-D4JnbpyD.js +2 -0
- package/dist/web/assets/{NativeSkillSidebar-Clv0IWyn.js → NativeSkillSidebar-Jzx1BeKV.js} +1 -1
- package/dist/web/assets/{NewProjectDialog-Cw_F5Eaa.js → NewProjectDialog-DcnGzEd9.js} +1 -1
- package/dist/web/assets/{OutputsPage-Btyiie4B.js → OutputsPage-Cmk15Vt_.js} +1 -1
- package/dist/web/assets/{PageChrome-BLLw_cEA.js → PageChrome-Cz_fCqtn.js} +1 -1
- package/dist/web/assets/{ProjectsPage-BpSHWQgj.js → ProjectsPage-BZ3Eo3Mz.js} +1 -1
- package/dist/web/assets/RightChatPanelStack-C6H2vU9N.js +1 -0
- package/dist/web/assets/RightSidebarHomePanel-BfMMVkM1.js +1 -0
- package/dist/web/assets/{ScheduledWorkPage-WytWGQgw.js → ScheduledWorkPage-CAkSwM0T.js} +1 -1
- package/dist/web/assets/{SettingsView-BJq5zNkv.js → SettingsView-DvQXGw3_.js} +3 -3
- package/dist/web/assets/{TasksetDraftEditorPrimitives-BxFEWI9W.js → TasksetDraftEditorPrimitives-JuU1k8vr.js} +1 -1
- package/dist/web/assets/TeamChatView-DmHjr8W9.js +1 -0
- package/dist/web/assets/{TerminalOverlay-C7OM2F0-.js → TerminalOverlay-DlaM9d8F.js} +1 -1
- package/dist/web/assets/{TrainingCreationPanel-KH5GFacT.js → TrainingCreationPanel-ClpylNsr.js} +1 -1
- package/dist/web/assets/{TrainingDraftPanel-DzOw13Md.js → TrainingDraftPanel-6tH2xSDj.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-nZHno_4P.js → UsageSettingsSection-CzDqxOYM.js} +2 -2
- package/dist/web/assets/WorkSidebarPanel-CY-AHZ4-.js +1 -0
- package/dist/web/assets/WorkspaceDiffPanel-B4e0lyF7.js +11 -0
- package/dist/web/assets/WorkspaceEnvironmentMenu-D01ZkZZF.js +35 -0
- package/dist/web/assets/{WorkspaceFileLocation-1U8DDj1J.js → WorkspaceFileLocation-C5s_njZb.js} +1 -1
- package/dist/web/assets/{WorkspaceGitDialogs-BO1EUA3G.js → WorkspaceGitDialogs-DjPZ6KIh.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-Rqq_sKW_.js → WorkspaceMonacoEditor-CC4sfOiU.js} +3 -3
- package/dist/web/assets/{WorkspacePdfPreview-zmmMp09R.js → WorkspacePdfPreview-vszQqFa4.js} +2 -2
- package/dist/web/assets/{WorkspacePresentationPreview-DNbhGjkE.js → WorkspacePresentationPreview-DQTvhaRD.js} +1 -1
- package/dist/web/assets/api-client-DJRVOFzS.js +1 -0
- package/dist/web/assets/{app-models-Cz3yxq4x.js → app-models-BUdzQbXo.js} +1 -1
- package/dist/web/assets/bot-Doyx3T4j.js +1 -0
- package/dist/web/assets/{browser-sidebar-links-ZyYiYBBd.js → browser-sidebar-links-PVPCrsDJ.js} +1 -1
- package/dist/web/assets/chat-resources-Beh5lB36.js +1 -0
- package/dist/web/assets/chevron-down-DX1hzujj.js +1 -0
- package/dist/web/assets/chevron-right-DHN0y3KC.js +1 -0
- package/dist/web/assets/chevron-up-_QrW88NF.js +1 -0
- package/dist/web/assets/chunk-3BYFS4RO-ztZjcMmt.js +1 -0
- package/dist/web/assets/chunk-AG6UJ3DI-D9KZjTYP.js +1 -0
- package/dist/web/assets/chunk-C3TS766N-ppRhs95p.js +1 -0
- package/dist/web/assets/chunk-GCUWJUUM-Dy6oUNJ6.js +9 -0
- package/dist/web/assets/chunk-GS5HEE4M-C0RLeIsy.js +1 -0
- package/dist/web/assets/chunk-H3JZ3P5T-DolwEJXo.js +2 -0
- package/dist/web/assets/chunk-Q4RGCEOI-Cr-dg4Nk.js +1 -0
- package/dist/web/assets/client-DwZ92xtu.js +1 -0
- package/dist/web/assets/{client-choice-storage-CXlWJW5g.js → client-choice-storage-DitqKiIT.js} +1 -1
- package/dist/web/assets/cloud-upload-HdzNTgr2.js +1 -0
- package/dist/web/assets/common-BWVSBnpX.js +1 -0
- package/dist/web/assets/copy-DTQhoBNg.js +1 -0
- package/dist/web/assets/create-pipeline-DsZzNkt9.js +1 -0
- package/dist/web/assets/{cssMode-Cps-05f3.js → cssMode-BRTtfXxU.js} +1 -1
- package/dist/web/assets/dataset-workspaces-BTPi71mz.js +1 -0
- package/dist/web/assets/external-link-H1629UU6.js +1 -0
- package/dist/web/assets/folder-open-CAGdWOrr.js +1 -0
- package/dist/web/assets/folder-plus-C14cs2mE.js +1 -0
- package/dist/web/assets/git-commit-horizontal-DFUfuVvF.js +1 -0
- package/dist/web/assets/{htmlMode-Do72TyNy.js → htmlMode-BVaCcL76.js} +1 -1
- package/dist/web/assets/icons-Bk2b68aC.js +1 -0
- package/dist/web/assets/image-0DPVY6Ev.js +1 -0
- package/dist/web/assets/{index-D7igQSAg.js → index-B6XX_0h3.js} +2 -2
- package/dist/web/assets/info-C8b_tafZ.js +1 -0
- package/dist/web/assets/intake-contracts-B8JZKYwb.js +1 -0
- package/dist/web/assets/{jsonMode-B2N7W15Y.js → jsonMode-BCKKQmmV.js} +1 -1
- package/dist/web/assets/loader-circle-y-SSPwpk.js +1 -0
- package/dist/web/assets/{lspLanguageFeatures-DPmyOFVA.js → lspLanguageFeatures-DozmNUOx.js} +1 -1
- package/dist/web/assets/maximize-2-CByk9-zN.js +1 -0
- package/dist/web/assets/message-square-C889vRqm.js +1 -0
- package/dist/web/assets/{monaco.contribution-DqqJBDzF.js → monaco.contribution-B9q6qbbo.js} +2 -2
- package/dist/web/assets/{monaco.contribution-BfOxF9PJ.js → monaco.contribution-BITdsRbn.js} +2 -2
- package/dist/web/assets/{monaco.contribution-DNONXznc.js → monaco.contribution-BqA-XZ44.js} +2 -2
- package/dist/web/assets/{monaco.contribution-CRdTg0FH.js → monaco.contribution-DxAV1oS5.js} +2 -2
- package/dist/web/assets/monitor-BtxlcLuI.js +1 -0
- package/dist/web/assets/paperclip-BeIdaspf.js +1 -0
- package/dist/web/assets/{pdf-BCq2Oosd.js → pdf-perlzwEB.js} +1 -1
- package/dist/web/assets/play-CHXXdkuO.js +1 -0
- package/dist/web/assets/plus-DFFWjhPw.js +1 -0
- package/dist/web/assets/{ponder-desktop-Dm7tOkKo.js → ponder-desktop-Ca-9KggQ.js} +1 -1
- package/dist/web/assets/presentation-0bzvu6_u.js +1 -0
- package/dist/web/assets/{profile-ref-DSNkG6Ol.js → profile-ref-D8lxL7dW.js} +1 -1
- package/dist/web/assets/{python-DuGMr666.js → python-B9hOnkOI.js} +1 -1
- package/dist/web/assets/refresh-cw-D61-Ozk3.js +1 -0
- package/dist/web/assets/{requests-BCbaFiqV.js → requests-DmeUYik4.js} +1 -1
- package/dist/web/assets/reward-checks-DJJZYgf8.js +7 -0
- package/dist/web/assets/save-iEMNZoPe.js +1 -0
- package/dist/web/assets/schemas-Brv9Vmnk.js +64 -0
- package/dist/web/assets/settings-BC-bzgk6.js +21 -0
- package/dist/web/assets/settings-lists-C84qxFmP.js +5 -0
- package/dist/web/assets/square-BE_4JMR3.js +1 -0
- package/dist/web/assets/square-terminal-Djpzo2Qs.js +1 -0
- package/dist/web/assets/{submit-issue-command-wfngGS6Y.js → submit-issue-command-HfKzyxg5.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-cl0cw2QK.js → toggleHighContrast-ClsXu39R.js} +1 -1
- package/dist/web/assets/training-DWfghwfZ.js +1 -0
- package/dist/web/assets/{training-model-data-CWnu1bz9.js → training-model-data-CIysl8wH.js} +4 -4
- package/dist/web/assets/{tsMode-DLEc0PYL.js → tsMode-nbmaMc-D.js} +1 -1
- package/dist/web/assets/upload-C6ug8RD-.js +1 -0
- package/dist/web/assets/{useAccountSettings-ByxjI9BG.js → useAccountSettings-Dr9h4Qz_.js} +1 -1
- package/dist/web/assets/{useAgentInventory-Df64T07n.js → useAgentInventory-ByCk2JAv.js} +1 -1
- package/dist/web/assets/useChatContextSelection-C0eMm2g6.js +1 -0
- package/dist/web/assets/{useLocalAgentSchedules-DNh_x9gQ.js → useLocalAgentSchedules-Do0y_leJ.js} +1 -1
- package/dist/web/assets/useQuery-D2MQ7e5U.js +1 -0
- package/dist/web/assets/wifi-off-Dr-CapyW.js +1 -0
- package/dist/web/assets/work-outputs-D_8TovAK.js +1 -0
- package/dist/web/assets/{workers-CnqrOtic.js → workers-DKvM2NdM.js} +1 -1
- package/dist/web/assets/x-Jx2jlP9u.js +1 -0
- package/dist/web/assets/{yaml-C9vtYV4w.js → yaml-C02vq4ar.js} +1 -1
- package/dist/web/index.html +1 -1
- package/docs/command-reference.md +100 -4
- package/package.json +1 -1
- package/dist/chunks/actions-command-VLKMHCMI.js +0 -2
- package/dist/chunks/app-server-evaluations-V6LRWDUF.js +0 -2
- package/dist/chunks/app-server-harness-services-6ZRLA3YD.js +0 -2
- package/dist/chunks/app-server-runtime-TH56EG2Z.js +0 -2
- package/dist/chunks/apps-MNT3KXIY.js +0 -2
- package/dist/chunks/chunk-2W22IXHB.js +0 -2
- package/dist/chunks/chunk-2ZNW6GUU.js +0 -2
- package/dist/chunks/chunk-3BJ7LPE3.js +0 -2
- package/dist/chunks/chunk-3MVKXAH7.js +0 -2
- package/dist/chunks/chunk-4MQHIFZL.js +0 -2
- package/dist/chunks/chunk-55Q64WWF.js +0 -2
- package/dist/chunks/chunk-5KJMFK65.js +0 -2
- package/dist/chunks/chunk-5WPMI6QX.js +0 -2
- package/dist/chunks/chunk-7PKTCMZ6.js +0 -2
- package/dist/chunks/chunk-ANG2YMMD.js +0 -2
- package/dist/chunks/chunk-BQVB2SPF.js +0 -10
- package/dist/chunks/chunk-DMO3UIS7.js +0 -6
- package/dist/chunks/chunk-FEQ7HNJR.js +0 -2
- package/dist/chunks/chunk-G4E3WGLM.js +0 -13
- package/dist/chunks/chunk-H5ML7735.js +0 -2
- package/dist/chunks/chunk-I3NYYOSS.js +0 -2
- package/dist/chunks/chunk-IOSBGCRT.js +0 -2
- package/dist/chunks/chunk-JBFPTEVE.js +0 -2
- package/dist/chunks/chunk-JKI53ED7.js +0 -161
- package/dist/chunks/chunk-JRGECNP3.js +0 -2
- package/dist/chunks/chunk-L4EJ5R3B.js +0 -23
- package/dist/chunks/chunk-LXZLLTYQ.js +0 -2
- package/dist/chunks/chunk-MHPCVQOE.js +0 -2
- package/dist/chunks/chunk-MVPKU72J.js +0 -4
- package/dist/chunks/chunk-OKEC2EIE.js +0 -2
- package/dist/chunks/chunk-OW3EOC5Q.js +0 -4
- package/dist/chunks/chunk-QCJY6FTC.js +0 -3
- package/dist/chunks/chunk-SBQ6KLXB.js +0 -33
- package/dist/chunks/chunk-TVDZXDQW.js +0 -2
- package/dist/chunks/chunk-V3KEG6MI.js +0 -2
- package/dist/chunks/chunk-VD2TQCMH.js +0 -2
- package/dist/chunks/chunk-WLZJOCLA.js +0 -10
- package/dist/chunks/chunk-Y3B6ZUE6.js +0 -22
- package/dist/chunks/chunk-YBKDEEEH.js +0 -2
- package/dist/chunks/chunk-ZWW227M3.js +0 -2
- package/dist/chunks/cli-TE7RP5H7.js +0 -2
- package/dist/chunks/command-NW6BGKOM.js +0 -13
- package/dist/chunks/connected-app-executor-7DYMZCD7.js +0 -2
- package/dist/chunks/connected-evidence-D7C45HYD.js +0 -2
- package/dist/chunks/core-commands-RXPXOYOP.js +0 -2
- package/dist/chunks/dataset-preparation-authoring-KWRTMKN6.js +0 -4
- package/dist/chunks/datasets-LBLEKLCS.js +0 -2
- package/dist/chunks/desktop-test-INJPZ5VP.js +0 -3
- package/dist/chunks/dist-J4KHAVO3.js +0 -2
- package/dist/chunks/evaluation-coordination-3ARLJAFH.js +0 -2
- package/dist/chunks/experiment-improvements-UB4C5CSP.js +0 -2
- package/dist/chunks/experiments-AHHKFJD6.js +0 -2
- package/dist/chunks/experiments-signal-MTR475QV.js +0 -2
- package/dist/chunks/host-profile-evaluation-tools-75EPCRSZ.js +0 -2
- package/dist/chunks/host-profile-external-dataset-YRKG2GL5.js +0 -2
- package/dist/chunks/hosted-app-server-composition-GPXH3BOG.js +0 -2
- package/dist/chunks/hosted-experiment-improvement-NZTPZTDH.js +0 -3
- package/dist/chunks/hosted-harness-runtime-3AJGEIFD.js +0 -2
- package/dist/chunks/hosted-profile-candidate-3CAT3XBI.js +0 -3
- package/dist/chunks/hosted-profile-compiler-RXU626Q6.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-control-CBDRKJ5J.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-inspection-CHYKDYUQ.js +0 -3
- package/dist/chunks/hosted-profile-evaluation-preparation-H5S7JZMD.js +0 -3
- package/dist/chunks/hosted-tasksets-AMGDDB2R.js +0 -2
- package/dist/chunks/human-review-DVHVJXBA.js +0 -2
- package/dist/chunks/javascript-isolate-process-source-ZPQKKLR4.js +0 -2
- package/dist/chunks/javascript-verifier-worker-source-F3LSGPOY.js +0 -2
- package/dist/chunks/learning-NJLTGZFQ.js +0 -2
- package/dist/chunks/local-harness-improvement-runtime-XEA73RGS.js +0 -2
- package/dist/chunks/local-harness-taskset-review-SW35G4DM.js +0 -2
- package/dist/chunks/opchat-LMKH3OWR.js +0 -3
- package/dist/chunks/opchat-bounded-chat-PPOWO7H4.js +0 -2
- package/dist/chunks/organizations-T6ZUSHNJ.js +0 -2
- package/dist/chunks/project-action-payload-2G57RL74.js +0 -2
- package/dist/chunks/project-agent-GBMVDJY3.js +0 -2
- package/dist/chunks/published-experiment-source-D3C2AWQD.js +0 -2
- package/dist/chunks/refiner-profile-service-PPGGNVOV.js +0 -2
- package/dist/chunks/sandbox-command-L5VQ2T6C.js +0 -2
- package/dist/chunks/saved-work-LAVTNKPT.js +0 -2
- package/dist/chunks/setup-TXEM2QSG.js +0 -2
- package/dist/chunks/src-HJHIBDFX.js +0 -424
- package/dist/chunks/standalone-experiment-turn-owner-KKYIGGPF.js +0 -2
- package/dist/chunks/store-chat-resources-ZWDYMDJF.js +0 -2
- package/dist/chunks/store-conversation-serving-WRT4N7N2.js +0 -2
- package/dist/chunks/store-evaluation-results-BEPR4LVD.js +0 -7
- package/dist/chunks/store-human-review-HJ3D7ZFA.js +0 -7
- package/dist/chunks/store-learned-preference-migration-validation-EXNRDHCO.js +0 -2
- package/dist/chunks/store-local-experiments-CBJA56X2.js +0 -97
- package/dist/chunks/store-model-batch-review-YIVD7T2T.js +0 -2
- package/dist/chunks/store-model-project-preparation-WWU5CJTV.js +0 -2
- package/dist/chunks/store-taskset-drafts-G3WFVN4M.js +0 -9
- package/dist/chunks/taskset-packages-NRRPON7B.js +0 -2
- package/dist/chunks/taskset-packages-RW4SFGDU.js +0 -2
- package/dist/chunks/tool-learning-O7QTTEDB.js +0 -2
- package/dist/chunks/training-XFM3OOPN.js +0 -2
- package/dist/chunks/training-XILDD5RG.js +0 -2
- package/dist/chunks/training-hosted-6BX2IASC.js +0 -2
- package/dist/chunks/training-hosted-checkpoint-evaluation-UXFW33QL.js +0 -2
- package/dist/chunks/training-hosted-report-UVGTPDOK.js +0 -2
- package/dist/chunks/training-hosted-serving-report-J4YOZLRP.js +0 -2
- package/dist/chunks/training-hosted-workers-6JTDCCWA.js +0 -2
- package/dist/chunks/training-model-start-E5MP3URL.js +0 -2
- package/dist/chunks/web-search-56QRZGPR.js +0 -2
- package/dist/web/assets/App-CNQi3RlI.js +0 -53
- package/dist/web/assets/AppTerminalPanel-DLz34eSs.js +0 -2
- package/dist/web/assets/AppsView-DkCMr67-.js +0 -1
- package/dist/web/assets/BrowserSidebar-BBaaanMS.js +0 -1
- package/dist/web/assets/ChatTimelineEntry-Ct59FKw1.js +0 -8
- package/dist/web/assets/CommunityView-BLTlSxyb.js +0 -1
- package/dist/web/assets/HostedModelLearningReview-DWF6WPao.js +0 -1
- package/dist/web/assets/HostedModelLearningSettings-BYl-2j7B.js +0 -1
- package/dist/web/assets/LabModelVersionDetailPage-CQz29DwD.js +0 -1
- package/dist/web/assets/LabsRoute-CE45yAXJ.css +0 -1
- package/dist/web/assets/LabsRoute-DJRgF1kQ.js +0 -101
- package/dist/web/assets/MainChatThread-gwmhe1Nw.js +0 -2
- package/dist/web/assets/MainPane-CqtgV9rU.js +0 -10
- package/dist/web/assets/NativeSetupTerminal-DrQldDsG.js +0 -2
- package/dist/web/assets/RightChatPanelStack-xW5rKbp0.js +0 -1
- package/dist/web/assets/RightSidebarHomePanel-BDmIxvIm.js +0 -1
- package/dist/web/assets/TeamChatView-BisSMAXy.js +0 -1
- package/dist/web/assets/TrainingRunLineage-B2WBOchk.js +0 -1
- package/dist/web/assets/WorkSidebarPanel-D3Ub_jVj.js +0 -1
- package/dist/web/assets/WorkspaceDiffPanel-CyTa8Cjs.js +0 -11
- package/dist/web/assets/WorkspaceEnvironmentMenu-CtZzxQ1e.js +0 -35
- package/dist/web/assets/api-client-Dgz-fOMl.js +0 -1
- package/dist/web/assets/bot-D-eTQib6.js +0 -1
- package/dist/web/assets/chat-resources-CTN4f6KC.js +0 -1
- package/dist/web/assets/chevron-down-75im8nFF.js +0 -1
- package/dist/web/assets/chevron-right-CpbCIUFo.js +0 -1
- package/dist/web/assets/chevron-up-BD8jg0bQ.js +0 -1
- package/dist/web/assets/chunk-GJRXJL6G-pJp1DyJd.js +0 -9
- package/dist/web/assets/chunk-H3JZ3P5T-B0SCoPw4.js +0 -2
- package/dist/web/assets/chunk-TLSP5JKG-DZmxtX-4.js +0 -1
- package/dist/web/assets/cloud-upload-4lP-5zmp.js +0 -1
- package/dist/web/assets/common-BMjyKlX-.js +0 -1
- package/dist/web/assets/contracts-BLiqJxBv.js +0 -1
- package/dist/web/assets/copy-DRnATDDY.js +0 -1
- package/dist/web/assets/create-pipeline-CyUZrbbO.js +0 -1
- package/dist/web/assets/createLucideIcon-CmkSm39S.js +0 -1
- package/dist/web/assets/external-link-D_nBEDFO.js +0 -1
- package/dist/web/assets/folder-open-tD5Lle1M.js +0 -1
- package/dist/web/assets/folder-plus-DlZ4hM48.js +0 -1
- package/dist/web/assets/git-commit-horizontal-g8KBhvfr.js +0 -1
- package/dist/web/assets/icons-B8_Rkg-l.js +0 -1
- package/dist/web/assets/image-CUZMnZYi.js +0 -1
- package/dist/web/assets/info-SmuBZiE5.js +0 -1
- package/dist/web/assets/intake-contracts-BW0Y0C2R.js +0 -1
- package/dist/web/assets/loader-circle-D_KVxLLz.js +0 -1
- package/dist/web/assets/maximize-2-B8HN3jsA.js +0 -1
- package/dist/web/assets/message-square-CrDvzn66.js +0 -1
- package/dist/web/assets/models-route-CWcJuOd0.js +0 -1
- package/dist/web/assets/monitor-CW-M_aaj.js +0 -1
- package/dist/web/assets/paperclip-DL449Io5.js +0 -1
- package/dist/web/assets/play-DYLqBrwg.js +0 -1
- package/dist/web/assets/plus-DXZIpQuY.js +0 -1
- package/dist/web/assets/presentation-CupIXaYv.js +0 -1
- package/dist/web/assets/refresh-cw-CzVf5_oo.js +0 -1
- package/dist/web/assets/reward-checks-Bcq9ETCA.js +0 -7
- package/dist/web/assets/save-DatjrYPV.js +0 -1
- package/dist/web/assets/schemas-lO3MoWQr.js +0 -64
- package/dist/web/assets/settings-D7C-Auyi.js +0 -21
- package/dist/web/assets/settings-lists-D2ol3uNK.js +0 -5
- package/dist/web/assets/square-BWB1nbZF.js +0 -1
- package/dist/web/assets/square-terminal-Buj-s-fz.js +0 -1
- package/dist/web/assets/training-DCdoHJ0Y.js +0 -2
- package/dist/web/assets/upload-DaFVH6R1.js +0 -1
- package/dist/web/assets/useQuery-yUz7Ui8g.js +0 -1
- package/dist/web/assets/wifi-off-CtNwnIJc.js +0 -1
- package/dist/web/assets/work-outputs-CK0nHe4g.js +0 -1
- package/dist/web/assets/x-Bhl-4Zlt.js +0 -1
- /package/dist/chunks/{chunk-SFR32TMJ.js → chunk-JXLDEYRW.js} +0 -0
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
var e;function t(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var n=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},r=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(e=globalThis).__zod_globalConfig??(e.__zod_globalConfig={});var i=globalThis.__zod_globalConfig;function a(e){return e&&Object.assign(i,e),i}function o(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function s(e,t){return typeof t==`bigint`?t.toString():t}function c(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function l(e){return e==null}function u(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function d(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var f=Symbol(`evaluating`);function p(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==f)return r===void 0&&(r=f,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function m(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function h(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function ee(e){return JSON.stringify(e)}function te(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var ne=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function g(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var re=c(()=>{if(i.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function _(e){if(g(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return g(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function ie(e){return _(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var ae=new Set([`string`,`number`,`symbol`]),oe=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]);function v(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function y(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function b(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function se(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var ce={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function le(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return y(e,h(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return m(this,`shape`,e),e},checks:[]}))}function ue(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return y(e,h(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return m(this,`shape`,r),r},checks:[]}))}function de(e,t){if(!_(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return y(e,h(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return m(this,`shape`,n),n}}))}function fe(e,t){if(!_(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return y(e,h(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return m(this,`shape`,n),n}}))}function pe(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return y(e,h(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return m(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function me(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return y(t,h(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return m(this,`shape`,i),i},checks:[]}))}function he(e,t,n){return y(t,h(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return m(this,`shape`,i),i}}))}function x(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function ge(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function S(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function C(e){return typeof e==`string`?e:e?.message}function w(e,t,n){let r=e.message?e.message:C(e.inst?._zod.def?.error?.(e))??C(t?.error?.(e))??C(n.customError?.(e))??C(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function T(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function E(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var _e=(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,s,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ve=t(`$ZodError`,_e),ye=t(`$ZodError`,_e,{Parent:Error});function be(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function xe(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var D=e=>(t,r,i,o)=>{let s=i?{...i,async:!1}:{async:!1},c=t._zod.run({value:r,issues:[]},s);if(c instanceof Promise)throw new n;if(c.issues.length){let t=new((o?.Err)??e)(c.issues.map(e=>w(e,s,a())));throw ne(t,o?.callee),t}return c.value},Se=e=>async(t,n,r,i)=>{let o=r?{...r,async:!0}:{async:!0},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let t=new((i?.Err)??e)(s.issues.map(e=>w(e,o,a())));throw ne(t,i?.callee),t}return s.value},O=e=>(t,r,i)=>{let o=i?{...i,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new n;return s.issues.length?{success:!1,error:new(e??ve)(s.issues.map(e=>w(e,o,a())))}:{success:!0,data:s.value}},Ce=O(ye),k=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(e=>w(e,i,a())))}:{success:!0,data:o.value}},we=k(ye),Te=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return D(e)(t,n,i)},Ee=e=>(t,n,r)=>D(e)(t,n,r),De=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Se(e)(t,n,i)},Oe=e=>async(t,n,r)=>Se(e)(t,n,r),ke=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return O(e)(t,n,i)},Ae=e=>(t,n,r)=>O(e)(t,n,r),je=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return k(e)(t,n,i)},Me=e=>async(t,n,r)=>k(e)(t,n,r),Ne=/^[cC][0-9a-z]{6,}$/,Pe=/^[0-9a-z]+$/,Fe=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ie=/^[0-9a-vA-V]{20}$/,Le=/^[A-Za-z0-9]{27}$/,Re=/^[a-zA-Z0-9_-]{21}$/,ze=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Be=/^([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})$/,Ve=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,He=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ue=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function We(){return new RegExp(Ue,`u`)}var Ge=/^(?:(?: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])$/,Ke=/^(([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}|:))$/,qe=/^((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])$/,Je=/^(([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])$/,Ye=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Xe=/^[A-Za-z0-9_-]*$/,Ze=/^https?$/,Qe=/^\+[1-9]\d{6,14}$/,$e=`(?:(?:\\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])))`,et=RegExp(`^${$e}$`);function tt(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function nt(e){return RegExp(`^${tt(e)}$`)}function rt(e){let t=tt({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${$e}T(?:${r})$`)}var it=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},at=/^-?\d+$/,ot=/^-?\d+(?:\.\d+)?$/,st=/^(?:true|false)$/i,ct=/^null$/i,lt=/^[^A-Z]*$/,ut=/^[^a-z]*$/,A=t(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),dt={number:`number`,bigint:`bigint`,object:`date`},ft=t(`$ZodCheckLessThan`,(e,t)=>{A.init(e,t);let n=dt[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),pt=t(`$ZodCheckGreaterThan`,(e,t)=>{A.init(e,t);let n=dt[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),mt=t(`$ZodCheckMultipleOf`,(e,t)=>{A.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):d(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})}}),ht=t(`$ZodCheckNumberFormat`,(e,t)=>{A.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ce[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=at)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),gt=t(`$ZodCheckMaxLength`,(e,t)=>{var n;A.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!l(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=T(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),_t=t(`$ZodCheckMinLength`,(e,t)=>{var n;A.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!l(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=T(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),vt=t(`$ZodCheckLengthEquals`,(e,t)=>{var n;A.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!l(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=T(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),j=t(`$ZodCheckStringFormat`,(e,t)=>{var n,r;A.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),yt=t(`$ZodCheckRegex`,(e,t)=>{j.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})}}),bt=t(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=lt,j.init(e,t)}),xt=t(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=ut,j.init(e,t)}),St=t(`$ZodCheckIncludes`,(e,t)=>{A.init(e,t);let n=v(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Ct=t(`$ZodCheckStartsWith`,(e,t)=>{A.init(e,t);let n=RegExp(`^${v(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),wt=t(`$ZodCheckEndsWith`,(e,t)=>{A.init(e,t);let n=RegExp(`.*${v(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Tt=t(`$ZodCheckOverwrite`,(e,t)=>{A.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Et=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
2
|
-
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
3
|
-
`))}},Dt={major:4,minor:4,patch:3},M=t(`$ZodType`,(e,t)=>{var r;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Dt;let i=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&i.unshift(e);for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,r)=>{let i=x(e),a;for(let o of t){if(o._zod.def.when){if(ge(e)||!o._zod.def.when(e))continue}else if(i)continue;let t=e.issues.length,s=o._zod.check(e);if(s instanceof Promise&&r?.async===!1)throw new n;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,e.issues.length!==t&&(i||=x(e,t))});else{if(e.issues.length===t)continue;i||=x(e,t)}}return a?a.then(()=>e):e},r=(r,a,o)=>{if(x(r))return r.aborted=!0,r;let s=t(a,i,o);if(s instanceof Promise){if(o.async===!1)throw new n;return s.then(t=>e._zod.parse(t,o))}return e._zod.parse(s,o)};e._zod.run=(a,o)=>{if(o.skipChecks)return e._zod.parse(a,o);if(o.direction===`backward`){let t=e._zod.parse({value:a.value,issues:[]},{...o,skipChecks:!0});return t instanceof Promise?t.then(e=>r(e,a,o)):r(t,a,o)}let s=e._zod.parse(a,o);if(s instanceof Promise){if(o.async===!1)throw new n;return s.then(e=>t(e,i,o))}return t(s,i,o)}}p(e,`~standard`,()=>({validate:t=>{try{let n=Ce(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return we(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),N=t(`$ZodString`,(e,t)=>{M.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??it(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),P=t(`$ZodStringFormat`,(e,t)=>{j.init(e,t),N.init(e,t)}),Ot=t(`$ZodGUID`,(e,t)=>{t.pattern??=Be,P.init(e,t)}),kt=t(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Ve(e)}else t.pattern??=Ve();P.init(e,t)}),At=t(`$ZodEmail`,(e,t)=>{t.pattern??=He,P.init(e,t)}),jt=t(`$ZodURL`,(e,t)=>{P.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===Ze.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),n.value=t.normalize?i.href:r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Mt=t(`$ZodEmoji`,(e,t)=>{t.pattern??=We(),P.init(e,t)}),Nt=t(`$ZodNanoID`,(e,t)=>{t.pattern??=Re,P.init(e,t)}),Pt=t(`$ZodCUID`,(e,t)=>{t.pattern??=Ne,P.init(e,t)}),Ft=t(`$ZodCUID2`,(e,t)=>{t.pattern??=Pe,P.init(e,t)}),It=t(`$ZodULID`,(e,t)=>{t.pattern??=Fe,P.init(e,t)}),Lt=t(`$ZodXID`,(e,t)=>{t.pattern??=Ie,P.init(e,t)}),Rt=t(`$ZodKSUID`,(e,t)=>{t.pattern??=Le,P.init(e,t)}),zt=t(`$ZodISODateTime`,(e,t)=>{t.pattern??=rt(t),P.init(e,t)}),Bt=t(`$ZodISODate`,(e,t)=>{t.pattern??=et,P.init(e,t)}),Vt=t(`$ZodISOTime`,(e,t)=>{t.pattern??=nt(t),P.init(e,t)}),Ht=t(`$ZodISODuration`,(e,t)=>{t.pattern??=ze,P.init(e,t)}),Ut=t(`$ZodIPv4`,(e,t)=>{t.pattern??=Ge,P.init(e,t),e._zod.bag.format=`ipv4`}),Wt=t(`$ZodIPv6`,(e,t)=>{t.pattern??=Ke,P.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})}}}),Gt=t(`$ZodCIDRv4`,(e,t)=>{t.pattern??=qe,P.init(e,t)}),Kt=t(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Je,P.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function qt(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Jt=t(`$ZodBase64`,(e,t)=>{t.pattern??=Ye,P.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{qt(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function Yt(e){if(!Xe.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return qt(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Xt=t(`$ZodBase64URL`,(e,t)=>{t.pattern??=Xe,P.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Yt(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Zt=t(`$ZodE164`,(e,t)=>{t.pattern??=Qe,P.init(e,t)});function Qt(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var $t=t(`$ZodJWT`,(e,t)=>{P.init(e,t),e._zod.check=n=>{Qt(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),en=t(`$ZodNumber`,(e,t)=>{M.init(e,t),e._zod.pattern=e._zod.bag.pattern??ot,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),tn=t(`$ZodNumberFormat`,(e,t)=>{ht.init(e,t),en.init(e,t)}),nn=t(`$ZodBoolean`,(e,t)=>{M.init(e,t),e._zod.pattern=st,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),rn=t(`$ZodNull`,(e,t)=>{M.init(e,t),e._zod.pattern=ct,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),an=t(`$ZodUnknown`,(e,t)=>{M.init(e,t),e._zod.parse=e=>e}),on=t(`$ZodNever`,(e,t)=>{M.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function sn(e,t,n){e.issues.length&&t.issues.push(...S(n,e.issues)),t.value[n]=e.value}var cn=t(`$ZodArray`,(e,t)=>{M.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>sn(t,n,e))):sn(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function F(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...S(n,e.issues))}!o&&!i?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function ln(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=se(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function un(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>F(e,n,i,t,u,d))):F(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var dn=t(`$ZodObject`,(e,t)=>{if(M.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=c(()=>ln(t));p(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=g,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>F(n,t,e,s,r,i))):F(a,t,e,s,r,i)}return i?un(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),fn=t(`$ZodObjectJIT`,(e,t)=>{dn.init(e,t);let n=e._zod.parse,r=c(()=>ln(t)),a=e=>{let t=new Et([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=ee(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=ee(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
|
|
4
|
-
if (${n}.issues.length) {
|
|
5
|
-
if (${o} in input) {
|
|
6
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
7
|
-
...iss,
|
|
8
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
9
|
-
})));
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
if (${n}.value === undefined) {
|
|
14
|
-
if (${o} in input) {
|
|
15
|
-
newResult[${o}] = undefined;
|
|
16
|
-
}
|
|
17
|
-
} else {
|
|
18
|
-
newResult[${o}] = ${n}.value;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
`):c?t.write(`
|
|
22
|
-
if (${n}.issues.length) {
|
|
23
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
24
|
-
...iss,
|
|
25
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
26
|
-
})));
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if (${n}.value === undefined) {
|
|
30
|
-
if (${o} in input) {
|
|
31
|
-
newResult[${o}] = undefined;
|
|
32
|
-
}
|
|
33
|
-
} else {
|
|
34
|
-
newResult[${o}] = ${n}.value;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
`):t.write(`
|
|
38
|
-
const ${n}_present = ${o} in input;
|
|
39
|
-
if (${n}.issues.length) {
|
|
40
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
41
|
-
...iss,
|
|
42
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
43
|
-
})));
|
|
44
|
-
}
|
|
45
|
-
if (!${n}_present && !${n}.issues.length) {
|
|
46
|
-
payload.issues.push({
|
|
47
|
-
code: "invalid_type",
|
|
48
|
-
expected: "nonoptional",
|
|
49
|
-
input: undefined,
|
|
50
|
-
path: [${o}]
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
if (${n}_present) {
|
|
55
|
-
if (${n}.value === undefined) {
|
|
56
|
-
newResult[${o}] = undefined;
|
|
57
|
-
} else {
|
|
58
|
-
newResult[${o}] = ${n}.value;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},o,s=g,l=!i.jitless,u=l&&re.value,d=t.catchall,f;e._zod.parse=(i,c)=>{f??=r.value;let p=i.value;return s(p)?l&&u&&c?.async===!1&&c.jitless!==!0?(o||=a(t.shape),i=o(i,c),d?un([],p,i,c,f,e):i):n(i,c):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function pn(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!x(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>w(e,r,a())))}),t)}var mn=t(`$ZodUnion`,(e,t)=>{M.init(e,t),p(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),p(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),p(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),p(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>u(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>pn(t,r,e,i)):pn(o,r,e,i)}}),hn=t(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,mn.init(e,t);let n=e._zod.parse;p(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=c(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!g(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),gn=t(`$ZodIntersection`,(e,t)=>{M.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>_n(e,t,n)):_n(e,i,a)}});function I(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(_(e)&&_(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=I(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=I(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function _n(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),x(e))return e;let o=I(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var vn=t(`$ZodRecord`,(e,t)=>{M.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!_(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let o=[],s=t.keyType._zod.values;if(s){n.value={};let c=new Set;for(let l of s)if(typeof l==`string`||typeof l==`number`||typeof l==`symbol`){c.add(typeof l==`number`?l.toString():l);let s=t.keyType._zod.run({value:l,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>w(e,r,a())),input:l,path:[l],inst:e});continue}let u=s.value,d=t.valueType._zod.run({value:i[l],issues:[]},r);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&n.issues.push(...S(l,e.issues)),n.value[u]=e.value})):(d.issues.length&&n.issues.push(...S(l,d.issues)),n.value[u]=d.value)}let l;for(let e in i)c.has(e)||(l??=[],l.push(e));l&&l.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:l})}else{n.value={};for(let s of Reflect.ownKeys(i)){if(s===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,s))continue;let c=t.keyType._zod.run({value:s,issues:[]},r);if(c instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof s==`string`&&ot.test(s)&&c.issues.length){let e=t.keyType._zod.run({value:Number(s),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(c=e)}if(c.issues.length){t.mode===`loose`?n.value[s]=i[s]:n.issues.push({code:`invalid_key`,origin:`record`,issues:c.issues.map(e=>w(e,r,a())),input:s,path:[s],inst:e});continue}let l=t.valueType._zod.run({value:i[s],issues:[]},r);l instanceof Promise?o.push(l.then(e=>{e.issues.length&&n.issues.push(...S(s,e.issues)),n.value[c.value]=e.value})):(l.issues.length&&n.issues.push(...S(s,l.issues)),n.value[c.value]=l.value)}}return o.length?Promise.all(o).then(()=>n):n}}),yn=t(`$ZodEnum`,(e,t)=>{M.init(e,t);let n=o(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>ae.has(typeof e)).map(e=>typeof e==`string`?v(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),bn=t(`$ZodLiteral`,(e,t)=>{if(M.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?v(e):e?v(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),xn=t(`$ZodTransform`,(e,t)=>{M.init(e,t),e._zod.optin=`optional`,e._zod.parse=(i,a)=>{if(a.direction===`backward`)throw new r(e.constructor.name);let o=t.transform(i.value,i);if(a.async)return(o instanceof Promise?o:Promise.resolve(o)).then(e=>(i.value=e,i.fallback=!0,i));if(o instanceof Promise)throw new n;return i.value=o,i.fallback=!0,i}});function Sn(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Cn=t(`$ZodOptional`,(e,t)=>{M.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,p(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),p(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${u(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>Sn(e,r)):Sn(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),wn=t(`$ZodExactOptional`,(e,t)=>{Cn.init(e,t),p(e._zod,`values`,()=>t.innerType._zod.values),p(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Tn=t(`$ZodNullable`,(e,t)=>{M.init(e,t),p(e._zod,`optin`,()=>t.innerType._zod.optin),p(e._zod,`optout`,()=>t.innerType._zod.optout),p(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${u(e.source)}|null)$`):void 0}),p(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),En=t(`$ZodDefault`,(e,t)=>{M.init(e,t),e._zod.optin=`optional`,p(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Dn(e,t)):Dn(r,t)}});function Dn(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var On=t(`$ZodPrefault`,(e,t)=>{M.init(e,t),e._zod.optin=`optional`,p(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),kn=t(`$ZodNonOptional`,(e,t)=>{M.init(e,t),p(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>An(t,e)):An(i,e)}});function An(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var jn=t(`$ZodCatch`,(e,t)=>{M.init(e,t),e._zod.optin=`optional`,p(e._zod,`optout`,()=>t.innerType._zod.optout),p(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>w(e,n,a()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>w(e,n,a()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Mn=t(`$ZodPipe`,(e,t)=>{M.init(e,t),p(e._zod,`values`,()=>t.in._zod.values),p(e._zod,`optin`,()=>t.in._zod.optin),p(e._zod,`optout`,()=>t.out._zod.optout),p(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>L(e,t.in,n)):L(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>L(e,t.out,n)):L(r,t.out,n)}});function L(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var Nn=t(`$ZodPreprocess`,(e,t)=>{Mn.init(e,t)}),Pn=t(`$ZodReadonly`,(e,t)=>{M.init(e,t),p(e._zod,`propValues`,()=>t.innerType._zod.propValues),p(e._zod,`values`,()=>t.innerType._zod.values),p(e._zod,`optin`,()=>t.innerType?._zod?.optin),p(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Fn):Fn(r)}});function Fn(e){return e.value=Object.freeze(e.value),e}var In=t(`$ZodTemplateLiteral`,(e,t)=>{M.init(e,t);let n=[];for(let e of t.parts)if(typeof e==`object`&&e){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let r=+!!t.startsWith(`^`),i=t.endsWith(`$`)?t.length-1:t.length;n.push(t.slice(r,i))}else if(e===null||oe.has(typeof e))n.push(v(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join(``)}$`),e._zod.parse=(n,r)=>typeof n.value==`string`?(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:`invalid_format`,format:t.format??`template_literal`,pattern:e._zod.pattern.source}),n):(n.issues.push({input:n.value,inst:e,expected:`string`,code:`invalid_type`}),n)}),Ln=t(`$ZodLazy`,(e,t)=>{M.init(e,t),p(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),p(e._zod,`pattern`,()=>e._zod.innerType?._zod?.pattern),p(e._zod,`propValues`,()=>e._zod.innerType?._zod?.propValues),p(e._zod,`optin`,()=>e._zod.innerType?._zod?.optin??void 0),p(e._zod,`optout`,()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Rn=t(`$ZodCustom`,(e,t)=>{A.init(e,t),M.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>zn(t,n,r,e));zn(i,n,r,e)}});function zn(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(E(e))}}var Bn,Vn=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Hn(){return new Vn}(Bn=globalThis).__zod_globalRegistry??(Bn.__zod_globalRegistry=Hn());var R=globalThis.__zod_globalRegistry;function Un(e,t){return new e({type:`string`,...b(t)})}function Wn(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...b(t)})}function Gn(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...b(t)})}function Kn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...b(t)})}function qn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...b(t)})}function Jn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...b(t)})}function Yn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...b(t)})}function Xn(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...b(t)})}function Zn(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...b(t)})}function Qn(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...b(t)})}function $n(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...b(t)})}function er(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...b(t)})}function tr(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...b(t)})}function nr(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...b(t)})}function rr(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...b(t)})}function ir(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...b(t)})}function ar(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...b(t)})}function or(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...b(t)})}function sr(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...b(t)})}function cr(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...b(t)})}function lr(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...b(t)})}function ur(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...b(t)})}function dr(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...b(t)})}function fr(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...b(t)})}function pr(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...b(t)})}function mr(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...b(t)})}function hr(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...b(t)})}function gr(e,t){return new e({type:`number`,checks:[],...b(t)})}function _r(e,t){return new e({type:`number`,coerce:!0,checks:[],...b(t)})}function vr(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...b(t)})}function yr(e,t){return new e({type:`boolean`,...b(t)})}function br(e,t){return new e({type:`null`,...b(t)})}function xr(e){return new e({type:`unknown`})}function Sr(e,t){return new e({type:`never`,...b(t)})}function Cr(e,t){return new ft({check:`less_than`,...b(t),value:e,inclusive:!1})}function z(e,t){return new ft({check:`less_than`,...b(t),value:e,inclusive:!0})}function wr(e,t){return new pt({check:`greater_than`,...b(t),value:e,inclusive:!1})}function B(e,t){return new pt({check:`greater_than`,...b(t),value:e,inclusive:!0})}function Tr(e,t){return new mt({check:`multiple_of`,...b(t),value:e})}function Er(e,t){return new gt({check:`max_length`,...b(t),maximum:e})}function V(e,t){return new _t({check:`min_length`,...b(t),minimum:e})}function Dr(e,t){return new vt({check:`length_equals`,...b(t),length:e})}function Or(e,t){return new yt({check:`string_format`,format:`regex`,...b(t),pattern:e})}function kr(e){return new bt({check:`string_format`,format:`lowercase`,...b(e)})}function Ar(e){return new xt({check:`string_format`,format:`uppercase`,...b(e)})}function jr(e,t){return new St({check:`string_format`,format:`includes`,...b(t),includes:e})}function Mr(e,t){return new Ct({check:`string_format`,format:`starts_with`,...b(t),prefix:e})}function Nr(e,t){return new wt({check:`string_format`,format:`ends_with`,...b(t),suffix:e})}function H(e){return new Tt({check:`overwrite`,tx:e})}function Pr(e){return H(t=>t.normalize(e))}function Fr(){return H(e=>e.trim())}function Ir(){return H(e=>e.toLowerCase())}function Lr(){return H(e=>e.toUpperCase())}function Rr(){return H(e=>te(e))}function zr(e,t,n){return new e({type:`array`,element:t,...b(n)})}function Br(e,t,n){let r=b(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function Vr(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...b(n)})}function Hr(e,t){let n=Ur(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(E(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(E(r))}},e(t.value,t)),t);return n}function Ur(e,t){let n=new A({check:`custom`,...b(t)});return n._zod.check=e,n}function Wr(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??R,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function U(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,U(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&W(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Gr(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
63
|
-
|
|
64
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}}function Kr(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:G(t,`input`,e.processors),output:G(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function W(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return W(r.element,n);if(r.type===`set`)return W(r.valueType,n);if(r.type===`lazy`)return W(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 W(r.innerType,n);if(r.type===`intersection`)return W(r.left,n)||W(r.right,n);if(r.type===`record`||r.type===`map`)return W(r.keyType,n)||W(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:W(r.in,n)||W(r.out,n);if(r.type===`object`){for(let e in r.shape)if(W(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(W(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(W(e,n))return!0;return!!(r.rest&&W(r.rest,n))}return!1}var qr=(e,t={})=>n=>{let r=Wr({...n,processors:t});return U(e,r),Gr(r,e),Kr(r,e)},G=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Wr({...i??{},target:a,io:t,processors:n});return U(e,o),Gr(o,e),Kr(o,e)},Jr={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Yr=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Jr[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Xr=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},Zr=(e,t,n,r)=>{n.type=`boolean`},Qr=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},$r=(e,t,n,r)=>{n.not={}},ei=(e,t,n,r)=>{let i=e._zod.def,a=o(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},ti=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},ni=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},ri=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},ii=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},ai=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=U(a.element,t,{...r,path:[...r.path,`items`]})},oi=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=U(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=U(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},si=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>U(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},ci=(e,t,n,r)=>{let i=e._zod.def,a=U(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=U(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},li=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=U(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=U(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=U(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},ui=(e,t,n,r)=>{let i=e._zod.def,a=U(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},di=(e,t,n,r)=>{let i=e._zod.def;U(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},fi=(e,t,n,r)=>{let i=e._zod.def;U(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},pi=(e,t,n,r)=>{let i=e._zod.def;U(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},mi=(e,t,n,r)=>{let i=e._zod.def;U(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},hi=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;U(o,t,r);let s=t.seen.get(e);s.ref=o},gi=(e,t,n,r)=>{let i=e._zod.def;U(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},_i=(e,t,n,r)=>{let i=e._zod.def;U(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},vi=(e,t,n,r)=>{let i=e._zod.innerType;U(i,t,r);let a=t.seen.get(e);a.ref=i},yi=t(`ZodISODateTime`,(e,t)=>{zt.init(e,t),X.init(e,t)});function bi(e){return fr(yi,e)}var xi=t(`ZodISODate`,(e,t)=>{Bt.init(e,t),X.init(e,t)});function Si(e){return pr(xi,e)}var Ci=t(`ZodISOTime`,(e,t)=>{Vt.init(e,t),X.init(e,t)});function wi(e){return mr(Ci,e)}var Ti=t(`ZodISODuration`,(e,t)=>{Ht.init(e,t),X.init(e,t)});function Ei(e){return hr(Ti,e)}var Di=(e,t)=>{ve.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>xe(e,t)},flatten:{value:t=>be(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,s,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,s,2)}},isEmpty:{get(){return e.issues.length===0}}})},Oi=t(`ZodError`,Di),K=t(`ZodError`,Di,{Parent:Error}),ki=D(K),Ai=Se(K),ji=O(K),Mi=k(K),Ni=Te(K),Pi=Ee(K),Fi=De(K),Ii=Oe(K),Li=ke(K),Ri=Ae(K),zi=je(K),Bi=Me(K),Vi=new WeakMap;function q(e,t,n){let r=Object.getPrototypeOf(e),i=Vi.get(r);if(i||(i=new Set,Vi.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var J=t(`ZodType`,(e,t)=>(M.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:G(e,`input`),output:G(e,`output`)}}),e.toJSONSchema=qr(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>ki(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>ji(e,t,n),e.parseAsync=async(t,n)=>Ai(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Mi(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Ni(e,t,n),e.decode=(t,n)=>Pi(e,t,n),e.encodeAsync=async(t,n)=>Fi(e,t,n),e.decodeAsync=async(t,n)=>Ii(e,t,n),e.safeEncode=(t,n)=>Li(e,t,n),e.safeDecode=(t,n)=>Ri(e,t,n),e.safeEncodeAsync=async(t,n)=>zi(e,t,n),e.safeDecodeAsync=async(t,n)=>Bi(e,t,n),q(e,`ZodType`,{check(...e){let t=this.def;return this.clone(h(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return y(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(uo(e,t))},superRefine(e,t){return this.check(fo(e,t))},overwrite(e){return this.check(H(e))},optional(){return Ba(this)},exactOptional(){return Ha(this)},nullable(){return Wa(this)},nullish(){return Ba(Wa(this))},nonoptional(e){return Xa(this,e)},array(){return xa(this)},or(e){return Ea([this,e])},and(e){return Aa(this,e)},transform(e){return eo(this,Ra(e))},default(e){return Ka(this,e)},prefault(e){return Ja(this,e)},catch(e){return Qa(this,e)},pipe(e){return eo(this,e)},readonly(){return ro(this)},describe(e){let t=this.clone();return R.add(t,{description:e}),t},meta(...e){if(e.length===0)return R.get(this);let t=this.clone();return R.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return R.get(e)?.description},configurable:!0}),e)),Hi=t(`_ZodString`,(e,t)=>{N.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yr(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,q(e,`_ZodString`,{regex(...e){return this.check(Or(...e))},includes(...e){return this.check(jr(...e))},startsWith(...e){return this.check(Mr(...e))},endsWith(...e){return this.check(Nr(...e))},min(...e){return this.check(V(...e))},max(...e){return this.check(Er(...e))},length(...e){return this.check(Dr(...e))},nonempty(...e){return this.check(V(1,...e))},lowercase(e){return this.check(kr(e))},uppercase(e){return this.check(Ar(e))},trim(){return this.check(Fr())},normalize(...e){return this.check(Pr(...e))},toLowerCase(){return this.check(Ir())},toUpperCase(){return this.check(Lr())},slugify(){return this.check(Rr())}})}),Ui=t(`ZodString`,(e,t)=>{N.init(e,t),Hi.init(e,t),e.email=t=>e.check(Wn(Wi,t)),e.url=t=>e.check(Xn(qi,t)),e.jwt=t=>e.check(dr(la,t)),e.emoji=t=>e.check(Zn(Yi,t)),e.guid=t=>e.check(Gn(Gi,t)),e.uuid=t=>e.check(Kn(Z,t)),e.uuidv4=t=>e.check(qn(Z,t)),e.uuidv6=t=>e.check(Jn(Z,t)),e.uuidv7=t=>e.check(Yn(Z,t)),e.nanoid=t=>e.check(Qn(Xi,t)),e.guid=t=>e.check(Gn(Gi,t)),e.cuid=t=>e.check($n(Zi,t)),e.cuid2=t=>e.check(er(Qi,t)),e.ulid=t=>e.check(tr($i,t)),e.base64=t=>e.check(cr(oa,t)),e.base64url=t=>e.check(lr(sa,t)),e.xid=t=>e.check(nr(ea,t)),e.ksuid=t=>e.check(rr(ta,t)),e.ipv4=t=>e.check(ir(na,t)),e.ipv6=t=>e.check(ar(ra,t)),e.cidrv4=t=>e.check(or(ia,t)),e.cidrv6=t=>e.check(sr(aa,t)),e.e164=t=>e.check(ur(ca,t)),e.datetime=t=>e.check(bi(t)),e.date=t=>e.check(Si(t)),e.time=t=>e.check(wi(t)),e.duration=t=>e.check(Ei(t))});function Y(e){return Un(Ui,e)}var X=t(`ZodStringFormat`,(e,t)=>{P.init(e,t),Hi.init(e,t)}),Wi=t(`ZodEmail`,(e,t)=>{At.init(e,t),X.init(e,t)}),Gi=t(`ZodGUID`,(e,t)=>{Ot.init(e,t),X.init(e,t)}),Z=t(`ZodUUID`,(e,t)=>{kt.init(e,t),X.init(e,t)});function Ki(e){return Kn(Z,e)}var qi=t(`ZodURL`,(e,t)=>{jt.init(e,t),X.init(e,t)});function Ji(e){return Xn(qi,e)}var Yi=t(`ZodEmoji`,(e,t)=>{Mt.init(e,t),X.init(e,t)}),Xi=t(`ZodNanoID`,(e,t)=>{Nt.init(e,t),X.init(e,t)}),Zi=t(`ZodCUID`,(e,t)=>{Pt.init(e,t),X.init(e,t)}),Qi=t(`ZodCUID2`,(e,t)=>{Ft.init(e,t),X.init(e,t)}),$i=t(`ZodULID`,(e,t)=>{It.init(e,t),X.init(e,t)}),ea=t(`ZodXID`,(e,t)=>{Lt.init(e,t),X.init(e,t)}),ta=t(`ZodKSUID`,(e,t)=>{Rt.init(e,t),X.init(e,t)}),na=t(`ZodIPv4`,(e,t)=>{Ut.init(e,t),X.init(e,t)}),ra=t(`ZodIPv6`,(e,t)=>{Wt.init(e,t),X.init(e,t)}),ia=t(`ZodCIDRv4`,(e,t)=>{Gt.init(e,t),X.init(e,t)}),aa=t(`ZodCIDRv6`,(e,t)=>{Kt.init(e,t),X.init(e,t)}),oa=t(`ZodBase64`,(e,t)=>{Jt.init(e,t),X.init(e,t)}),sa=t(`ZodBase64URL`,(e,t)=>{Xt.init(e,t),X.init(e,t)}),ca=t(`ZodE164`,(e,t)=>{Zt.init(e,t),X.init(e,t)}),la=t(`ZodJWT`,(e,t)=>{$t.init(e,t),X.init(e,t)}),Q=t(`ZodNumber`,(e,t)=>{en.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xr(e,t,n,r),q(e,`ZodNumber`,{gt(e,t){return this.check(wr(e,t))},gte(e,t){return this.check(B(e,t))},min(e,t){return this.check(B(e,t))},lt(e,t){return this.check(Cr(e,t))},lte(e,t){return this.check(z(e,t))},max(e,t){return this.check(z(e,t))},int(e){return this.check(fa(e))},safe(e){return this.check(fa(e))},positive(e){return this.check(wr(0,e))},nonnegative(e){return this.check(B(0,e))},negative(e){return this.check(Cr(0,e))},nonpositive(e){return this.check(z(0,e))},multipleOf(e,t){return this.check(Tr(e,t))},step(e,t){return this.check(Tr(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function ua(e){return gr(Q,e)}var da=t(`ZodNumberFormat`,(e,t)=>{tn.init(e,t),Q.init(e,t)});function fa(e){return vr(da,e)}var pa=t(`ZodBoolean`,(e,t)=>{nn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zr(e,t,n,r)});function ma(e){return yr(pa,e)}var ha=t(`ZodNull`,(e,t)=>{rn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qr(e,t,n,r)});function ga(e){return br(ha,e)}var _a=t(`ZodUnknown`,(e,t)=>{an.init(e,t),J.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function $(){return xr(_a)}var va=t(`ZodNever`,(e,t)=>{on.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$r(e,t,n,r)});function ya(e){return Sr(va,e)}var ba=t(`ZodArray`,(e,t)=>{cn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ai(e,t,n,r),e.element=t.element,q(e,`ZodArray`,{min(e,t){return this.check(V(e,t))},nonempty(e){return this.check(V(1,e))},max(e,t){return this.check(Er(e,t))},length(e,t){return this.check(Dr(e,t))},unwrap(){return this.element}})});function xa(e,t){return zr(ba,e,t)}var Sa=t(`ZodObject`,(e,t)=>{fn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oi(e,t,n,r),p(e,`shape`,()=>t.shape),q(e,`ZodObject`,{keyof(){return Pa(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:$()})},loose(){return this.clone({...this._zod.def,catchall:$()})},strict(){return this.clone({...this._zod.def,catchall:ya()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return de(this,e)},safeExtend(e){return fe(this,e)},merge(e){return pe(this,e)},pick(e){return le(this,e)},omit(e){return ue(this,e)},partial(...e){return me(za,this,e[0])},required(...e){return he(Ya,this,e[0])}})});function Ca(e,t){return new Sa({type:`object`,shape:e??{},...b(t)})}function wa(e,t){return new Sa({type:`object`,shape:e,catchall:ya(),...b(t)})}var Ta=t(`ZodUnion`,(e,t)=>{mn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>si(e,t,n,r),e.options=t.options});function Ea(e,t){return new Ta({type:`union`,options:e,...b(t)})}var Da=t(`ZodDiscriminatedUnion`,(e,t)=>{Ta.init(e,t),hn.init(e,t)});function Oa(e,t,n){return new Da({type:`union`,options:t,discriminator:e,...b(n)})}var ka=t(`ZodIntersection`,(e,t)=>{gn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ci(e,t,n,r)});function Aa(e,t){return new ka({type:`intersection`,left:e,right:t})}var ja=t(`ZodRecord`,(e,t)=>{vn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>li(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Ma(e,t,n){return!t||!t._zod?new ja({type:`record`,keyType:Y(),valueType:e,...b(t)}):new ja({type:`record`,keyType:e,valueType:t,...b(n)})}var Na=t(`ZodEnum`,(e,t)=>{yn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ei(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Na({...t,checks:[],...b(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Na({...t,checks:[],...b(r),entries:i})}});function Pa(e,t){return new Na({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...b(t)})}var Fa=t(`ZodLiteral`,(e,t)=>{bn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ti(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Ia(e,t){return new Fa({type:`literal`,values:Array.isArray(e)?e:[e],...b(t)})}var La=t(`ZodTransform`,(e,t)=>{xn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ii(e,t,n,r),e._zod.parse=(n,i)=>{if(i.direction===`backward`)throw new r(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(E(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(E(t))}};let a=t.transform(n.value,n);return a instanceof Promise?a.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=a,n.fallback=!0,n)}});function Ra(e){return new La({type:`transform`,transform:e})}var za=t(`ZodOptional`,(e,t)=>{Cn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_i(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ba(e){return new za({type:`optional`,innerType:e})}var Va=t(`ZodExactOptional`,(e,t)=>{wn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_i(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ha(e){return new Va({type:`optional`,innerType:e})}var Ua=t(`ZodNullable`,(e,t)=>{Tn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ui(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Wa(e){return new Ua({type:`nullable`,innerType:e})}var Ga=t(`ZodDefault`,(e,t)=>{En.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ka(e,t){return new Ga({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():ie(t)}})}var qa=t(`ZodPrefault`,(e,t)=>{On.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ja(e,t){return new qa({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():ie(t)}})}var Ya=t(`ZodNonOptional`,(e,t)=>{kn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>di(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Xa(e,t){return new Ya({type:`nonoptional`,innerType:e,...b(t)})}var Za=t(`ZodCatch`,(e,t)=>{jn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Qa(e,t){return new Za({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var $a=t(`ZodPipe`,(e,t)=>{Mn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hi(e,t,n,r),e.in=t.in,e.out=t.out});function eo(e,t){return new $a({type:`pipe`,in:e,out:t})}var to=t(`ZodPreprocess`,(e,t)=>{$a.init(e,t),Nn.init(e,t)}),no=t(`ZodReadonly`,(e,t)=>{Pn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ro(e){return new no({type:`readonly`,innerType:e})}var io=t(`ZodTemplateLiteral`,(e,t)=>{In.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ni(e,t,n,r)});function ao(e,t){return new io({type:`template_literal`,parts:e,...b(t)})}var oo=t(`ZodLazy`,(e,t)=>{Ln.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vi(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function so(e){return new oo({type:`lazy`,getter:e})}var co=t(`ZodCustom`,(e,t)=>{Rn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ri(e,t,n,r)});function lo(e,t){return Br(co,e??(()=>!0),t)}function uo(e,t={}){return Vr(co,e,t)}function fo(e,t){return Hr(e,t)}function po(e){let t=so(()=>Ea([Y(e),ua(),ma(),ga(),xa(t),Ma(Y(),t)]));return t}function mo(e,t){return new to({type:`pipe`,in:Ra(e),out:t})}export{Ki as C,_r as E,Ji as S,bi as T,wa as _,xa as a,Ea as b,Oa as c,Ia as d,ya as f,Ma as g,mo as h,ga as i,po as l,Ca as m,Sa as n,ma as o,ua as p,Pa as r,lo as s,Q as t,so as u,Y as v,Oi as w,$ as x,ao as y};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import{a as e,b as t,d as n,g as r,m as i,o as a,p as o,r as s,v as c,x as l,y as u}from"./schemas-lO3MoWQr.js";import{o as d,s as f}from"./common-BMjyKlX-.js";var p=i({provider:f,model:f,revision:c().trim().min(1).max(500).nullable().default(null),artifactHash:d.nullable().default(null),tokenizerRevision:c().trim().min(1).max(500).nullable().default(null),chatTemplateHash:d.nullable().default(null)}).strict(),ee=[`openpond`,`codex`,`claude-code`,`grok-build`,`opencode`,`anthropic`,`openai`,`xai`,`google`,`openrouter`,`deepseek`,`zai`,`moonshot`,`together`,`groq`,`custom-openai-compatible`],m=u([`acp:`,c().regex(/^[a-z0-9][a-z0-9-]{0,100}$/)]),h=t([s(ee),m]);function g(e){return/^acp:[a-z0-9][a-z0-9-]{0,100}$/.test(e)}var _=i({providerId:h,modelId:c().trim().min(1).max(300)});s([`coding`,`research`,`review`,`test`,`docs`,`planner`,`summarizer`]);var v=c().trim().min(1).max(80).regex(/^[a-z][a-z0-9_-]*$/),y=s([`none`,`worktree`,`copy_on_write`]),b=s([`read_only`,`workspace_write`,`full_tools`]),x=s([`disabled`,`parent_scoped`]),S=s([`manual`,`balanced`,`proactive`]),C=s([`queued`,`running`,`completed`,`failed`,`cancelled`,`needs_resume`]),w=[`subagent.started`,`subagent.reported`,`subagent.completed`,`subagent.progress`,`subagent.failed`,`subagent.cancelled`,`subagent.cleanup`,`subagent.workspace_retained`,`subagent.workspace_retention_expiring`,`subagent.archived`,`subagent.message`];s(w);var T=[{id:`coding`,label:`Coding`,description:`Make scoped code changes and return patch, diff, and test evidence.`,defaultToolPolicy:`full_tools`},{id:`research`,label:`Research`,description:`Inspect docs, code, web or repo context and return cited findings.`,defaultToolPolicy:`full_tools`},{id:`review`,label:`Review`,description:`Inspect diffs or implementation plans and return ranked findings.`,defaultToolPolicy:`full_tools`},{id:`test`,label:`Test`,description:`Run or design validation in isolation and return command evidence.`,defaultToolPolicy:`full_tools`},{id:`docs`,label:`Docs`,description:`Update or draft project documentation in an isolated target.`,defaultToolPolicy:`full_tools`},{id:`planner`,label:`Planner`,description:`Decompose a goal into child assignments and context packs.`,defaultToolPolicy:`full_tools`},{id:`summarizer`,label:`Summarizer`,description:`Compact transcripts, child results, and goal state for parent context.`,defaultToolPolicy:`full_tools`}],E=i({id:v,enabled:a().default(!0),modelRef:_.nullable().default(null),isolationMode:y.default(`none`),maxConcurrentRuns:o().int().min(1).max(16).default(1),toolPolicy:b.default(`read_only`),background:a().default(!0),peerMessages:x.default(`parent_scoped`)}),D=i({enabled:a().default(!0),workspaceDefaultsVersion:n(1).default(1),toolDefaultsVersion:n(1).default(1),delegationMode:S.default(`manual`),defaultModelRef:_.nullable().default(null),roles:e(E).max(64).default(()=>I()),maxConcurrentRuns:o().int().min(1).max(32).default(4),maxConcurrentRunsPerProvider:o().int().min(1).max(32).nullable().default(2),maxConcurrentRunsPerWorkspaceTarget:o().int().min(1).max(32).nullable().default(1)}).transform(e=>({...e,roles:oe(e.roles)})),O=i({kind:s([`session`,`turn`,`file`,`diff`,`artifact`]),id:c().trim().min(1).max(500),label:c().trim().min(1).max(500)}),k=i({kind:s([`retain_with_parent`]).default(`retain_with_parent`),messageRetentionDays:o().int().min(1).max(3650).nullable().default(null),artifactRetentionDays:o().int().min(1).max(3650).nullable().default(null),cleanupAfterExpiry:a().default(!1)}).default(()=>({kind:`retain_with_parent`,messageRetentionDays:null,artifactRetentionDays:null,cleanupAfterExpiry:!1})),A=s([`orient`,`edit`,`validate`,`report`]),j=i({command:c().trim().min(1).max(2e3),status:s([`passed`,`failed`,`unknown`]).default(`unknown`),exitCode:o().int().nullable().default(null),outputSummary:c().trim().max(5e3).nullable().default(null),startedAt:c().nullable().default(null),completedAt:c().nullable().default(null)}),M=i({phase:A.default(`orient`),inspectedFiles:e(c().trim().min(1).max(1e3)).max(500).default([]),inspectedResources:e(c().trim().min(1).max(1e3)).max(500).default([]),repeatedSearches:e(c().trim().min(1).max(1e3)).max(200).default([]),repeatedReads:e(c().trim().min(1).max(1e3)).max(200).default([]),repeatedCommands:e(c().trim().min(1).max(1e3)).max(200).default([]),changedFiles:e(c().trim().min(1).max(1e3)).max(500).default([]),patchRefs:e(O).max(100).default([]),validationAttempts:e(j).max(100).default([]),latestMeaningfulActivity:c().trim().max(5e3).nullable().default(null),currentBlocker:c().trim().max(5e3).nullable().default(null),updatedAt:c().nullable().default(null)}).default(()=>({phase:`orient`,inspectedFiles:[],inspectedResources:[],repeatedSearches:[],repeatedReads:[],repeatedCommands:[],changedFiles:[],patchRefs:[],validationAttempts:[],latestMeaningfulActivity:null,currentBlocker:null,updatedAt:null})),N=i({summary:c().trim().max(2e4).default(``),findings:e(c().trim().min(1).max(5e3)).max(200).default([]),artifacts:e(O).max(200).default([]),patchRef:O.nullable().default(null),diffRef:O.nullable().default(null),testsRun:e(c().trim().min(1).max(2e3)).max(100).default([]),blockers:e(c().trim().min(1).max(5e3)).max(100).default([]),confidence:s([`low`,`medium`,`high`]).nullable().default(null),followUpNeeded:a().default(!1)}),P=i({id:c().trim().min(1).max(200),parentSessionId:c().trim().min(1).max(200),parentTurnId:c().trim().min(1).max(200).nullable().default(null),childSessionId:c().trim().min(1).max(200).nullable().default(null),roleId:v,objective:c().trim().min(1).max(5e4),modelRef:_.nullable().default(null),isolationMode:y.default(`none`),toolPolicy:b.default(`read_only`),background:a().default(!0),peerMessages:x.default(`parent_scoped`),status:C.default(`queued`),progress:M,evidenceRetention:k,createdAt:c(),startedAt:c().nullable().default(null),completedAt:c().nullable().default(null),updatedAt:c().nullable().default(null),error:c().nullable().default(null),report:N.nullable().default(null),metadata:r(c(),l()).optional().default({})}),F=s([`cleanup`,`archive`,`cleanup_and_archive`]);i({action:F,reason:c().trim().min(1).max(2e3).nullable().default(null)}),i({action:F,run:P,workspaceCleanup:r(c(),l()).nullable().default(null),sessionArchive:r(c(),l()).nullable().default(null),nextStep:c()});var te=s([`question`,`answer`,`handoff`,`artifact`,`status`,`blocker`]),ne=s([`normal`,`interrupt`]),re=i({inputIds:e(c()).default([]),status:s([`pending`,`delivered`,`undelivered`]).default(`pending`),deliveredRunIds:e(c().trim().min(1).max(200)).max(200).default([]),acknowledgedRunIds:e(c().trim().min(1).max(200)).max(200).default([]),deliveredParentSessionId:c().trim().min(1).max(200).nullable().default(null),acknowledgedParentSessionId:c().trim().min(1).max(200).nullable().default(null),wakeRequestedParentSessionId:c().trim().min(1).max(200).nullable().default(null),wakeQueuedParentSessionId:c().trim().min(1).max(200).nullable().default(null),wakeDeferredParentSessionId:c().trim().min(1).max(200).nullable().default(null),wakeParentReason:c().trim().min(1).max(1e3).nullable().default(null),wakeRequestedRunIds:e(c().trim().min(1).max(200)).max(200).default([]),wakeInterruptedRunIds:e(c().trim().min(1).max(200)).max(200).default([]),wakeDeferredRunIds:e(c().trim().min(1).max(200)).max(200).default([]),reason:c().trim().min(1).max(1e3).nullable().default(null)}),ie=i({id:c().trim().min(1).max(200),fromRunId:c().trim().min(1).max(200),toRunId:c().trim().min(1).max(200).nullable().default(null),toRole:v.nullable().default(null),kind:te,priority:ne.optional(),body:c().trim().min(1).max(5e4),refs:e(O).max(100).default([]),delivery:re.optional(),createdAt:c()});function I(){return T.map(e=>E.parse({id:e.id,toolPolicy:e.defaultToolPolicy}))}function ae(){return D.parse({})}function oe(e){let t=I(),n=new Map(t.map(e=>[e.id,e])),r=[];for(let t of e??[]){let e=E.parse(t);n.has(e.id)?n.set(e.id,e):r.push(e)}return[...t.map(e=>n.get(e.id)??e),...r]}var se=`gpt-5.6-sol`,L=`openpond-chat`,R=`openpond`,z=L,B=`default`,V=`high`,H=h,U=s([`default`,`auto-review`,`full-access`]),W=s([`ask`,`full-access`,`disabled`]),G=s([`off`,`low`,`medium`,`high`,`xhigh`,`max`]),ce=s([`sandbox_app`,`local_project`,`sandbox`,`sandbox_template`]);s([`openpond`]);var le=s([`provider_usage`,`provider_tokenizer`,`model_family`,`heuristic`]),ue=i({provider:H,model:c().min(1),usedTokens:o().int().nonnegative(),maxContextTokens:o().int().positive(),usableContextTokens:o().int().positive(),percentFull:o().min(0).max(100),source:le,updatedAtEventId:c().nullable()}),K=i({pinned:a().default(!1),projects:a().default(!1),cloudProjects:a().default(!1),chats:a().default(!1),savedForLater:a().default(!0)}),de=s([`auto`,`off`]),fe=s([`typescript`,`python`,`rust`]),q=s([`auto`,`disabled`,`custom`]),J=i({mode:q.default(`auto`),customCommand:c().trim().max(4096).default(``)}),Y=i({languageServers:de.default(`auto`),diagnosticsWhileEditing:a().default(!0),checkOnSave:a().default(!0),languages:i({typescript:J.optional().default(()=>J.parse({})),python:J.optional().default(()=>J.parse({})),rust:J.optional().default(()=>J.parse({}))}).optional().default(()=>({typescript:J.parse({}),python:J.parse({}),rust:J.parse({})}))}),X=i({language:fe,label:c(),mode:q,status:s([`found`,`missing`,`disabled`,`error`]),command:c().nullable(),message:c().nullable()});i({settings:Y,languages:e(X),updatedAt:c()});var pe=i({id:c(),root:c(),status:s([`starting`,`connected`,`unavailable`,`error`]),message:c().nullable().optional().default(null),openedDocuments:o().int().nonnegative(),pendingRequests:o().int().nonnegative(),lastUsedAt:c(),stderrTail:c()});i({clients:e(pe),maxClients:o().int().positive(),idleTimeoutMs:o().int().positive(),updatedAt:c()});var Z=i({autoEnabled:a().default(!0),triggerPercent:o().int().min(50).max(95).default(85),summaryModel:s([`same_model`]).default(`same_model`)}),Q=i({defaultModelRef:_.nullable().default(null),creationMode:s([`defaults`,`customize`]).default(`customize`),autoApproveEvidence:a().default(!1)});i({defaultChatProvider:H.default(R),defaultChatModel:c().min(1).default(z),defaultChatModelRef:_.nullable().optional(),subagents:D.optional().default(()=>D.parse({})),codexPermissionMode:U.default(B),codexReasoningEffort:G.default(V),openPondCommandAccessMode:W.default(`ask`),defaultBranchPrefix:c().trim().max(48).default(`feat/`),defaultNewProjectDirectory:c().trim().max(4096).default(``),defaultTeamId:c().trim().max(191).nullable().default(null),advancedWorkspaceControls:a().default(!1),steerActiveResponses:a().default(!0),contextCompaction:Z.optional().default(()=>Z.parse({})),training:Q.optional().default(()=>Q.parse({})),sidebarWidth:o().int().min(244).max(560).default(332),diffPanelWidth:o().int().min(320).max(2400).default(560),sidebarSectionsCollapsed:K.optional().default(()=>K.parse({})),editor:Y.optional().default(()=>Y.parse({}))});var me=`default`,he=[{id:`default`,name:`Balanced`,source:`built_in`,description:`Clear, useful, and concise.`,content:`You are OpenPond Chat, a clear and useful AI assistant.
|
|
2
|
-
Be concise, accurate, and direct.
|
|
3
|
-
Do not use emojis.
|
|
4
|
-
Ask only when missing information would materially change the answer.
|
|
5
|
-
Prioritize practical next steps.`},{id:`pragmatic`,name:`Pragmatic`,source:`built_in`,description:`Direct, practical, and engineering-minded.`,content:`You are a pragmatic AI assistant with strong engineering judgment.
|
|
6
|
-
Be direct, concrete, and outcome-focused.
|
|
7
|
-
Do not use emojis.
|
|
8
|
-
Prefer simple working solutions over clever abstractions.
|
|
9
|
-
Call out weak assumptions plainly.`},{id:`friendly`,name:`Friendly`,source:`built_in`,description:`Warm, conversational, and approachable.`,content:`You are a friendly AI assistant.
|
|
10
|
-
Use a warm, conversational tone without filler.
|
|
11
|
-
Do not use emojis.
|
|
12
|
-
Explain decisions clearly and keep the user moving.
|
|
13
|
-
Be patient when clarifying tradeoffs.`},{id:`formal`,name:`Formal`,source:`built_in`,description:`Polished, careful, and professional.`,content:`You are a formal AI assistant.
|
|
14
|
-
Use precise, professional language.
|
|
15
|
-
Do not use emojis.
|
|
16
|
-
Structure answers clearly and avoid casual phrasing.
|
|
17
|
-
State uncertainty and assumptions explicitly.`},{id:`technical`,name:`Technical`,source:`built_in`,description:`Precise, detailed, and implementation-focused.`,content:`You are a technical AI assistant.
|
|
18
|
-
Prioritize correctness, implementation detail, and edge cases.
|
|
19
|
-
Do not use emojis.
|
|
20
|
-
Use concise explanations, but include necessary specifics.
|
|
21
|
-
Surface risks, constraints, and verification steps.`}],$=c().trim().min(1).max(120),ge=i({id:$,name:c(),source:s([`built_in`,`custom`]).default(`custom`),description:c(),content:c()});i({activeTemplateId:$.default(me),customized:a().default(!1),soul:c(),soulPath:c().nullable(),updatedAt:c().nullable(),templates:e(ge).default(()=>[...he])}),i({id:c(),host:c(),port:o(),startedAt:c(),storePath:c(),version:c(),runtimeVersion:c()});export{g as A,v as C,_ as D,m as E,p as O,D as S,ae as T,ce as _,ue as a,S as b,se as c,L as d,W as f,Y as g,Q as h,Z as i,h as k,B as l,K as m,U as n,z as o,$ as p,G as r,R as s,H as t,V as u,T as v,P as w,ie as x,w as y};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-D7igQSAg.js";import{A as r}from"./settings-D7C-Auyi.js";import{t as i}from"./model-display-zPvC4L2B.js";import{S as a,g as o,v as s}from"./app-models-Cz3yxq4x.js";import{n as c}from"./api-client-Dgz-fOMl.js";import"./icons-B8_Rkg-l.js";import{t as l}from"./createLucideIcon-CmkSm39S.js";import{F as u}from"./training-model-data-CWnu1bz9.js";import{t as d}from"./loader-circle-D_KVxLLz.js";import{t as f}from"./plus-DXZIpQuY.js";import{t as p}from"./refresh-cw-CzVf5_oo.js";import{t as m}from"./save-DatjrYPV.js";import{t as h}from"./x-Bhl-4Zlt.js";import{a as g}from"./AppToastContext-Dklk6CaG.js";import{t as _}from"./NativeSetupTerminal-DrQldDsG.js";import{t as v}from"./AppDialog-DuSd0wk6.js";import{Bt as y,Nt as b,Rt as x,bn as S,bt as C,ht as w,ln as T,mt as E,t as D,un as O}from"./App-CNQi3RlI.js";var k=l(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),A=e(t(),1),j=n();function M({connection:e,onChanged:t,onAdded:n}){let r=(0,A.useId)(),[i,a]=(0,A.useState)(!1),[o,s]=(0,A.useState)(!1),[l,u]=(0,A.useState)(null),[m,g]=(0,A.useState)(0),[_,b]=(0,A.useState)(``),[x,S]=(0,A.useState)(null),[C,w]=(0,A.useState)(``),[T,E]=(0,A.useState)(``),[D,O]=(0,A.useState)(``),[k,M]=(0,A.useState)(``),[N,P]=(0,A.useState)(`[]`),[F,I]=(0,A.useState)(`{}`),[L,R]=(0,A.useState)(!1),[z,B]=(0,A.useState)(!1),[V,H]=(0,A.useState)(null);(0,A.useEffect)(()=>{if(!i||o||!e)return;let t=new AbortController;return R(!0),H(null),c(e,`/v1/providers/acp-registry${m?`?refresh=true`:``}`,{signal:t.signal}).then(e=>{t.signal.aborted||(u(e),S(null))}).catch(e=>{t.signal.aborted||H(e instanceof Error?e.message:`Could not load ACP registry.`)}).finally(()=>{t.signal.aborted||R(!1)}),()=>t.abort()},[i,o,e,m]);let U=x?[x.distribution.binary?.[l?.platform??``]?`binary`:null,x.distribution.npx?`npx`:null,x.distribution.uvx?`uvx`:null].filter(e=>!!e):[],W=l?.agents.filter(e=>`${e.name} ${e.id} ${e.description}`.toLowerCase().includes(_.trim().toLowerCase()))??[],G=U.includes(C)?C:U[0],K=G===`binary`?x?.distribution.binary?.[l?.platform??``]:G===`npx`?x?.distribution.npx:x?.distribution.uvx;async function q(r){if(r.preventDefault(),e&&!z){B(!0),H(null);try{let r=o?{custom:{displayName:D.trim(),command:k.trim(),args:JSON.parse(N),env:JSON.parse(F)}}:{registryId:x?.id,version:x?.version,distribution:G,displayName:T.trim()||x?.name},i=await c(e,`/v1/providers/acp-registry`,{method:`POST`,body:JSON.stringify(r)});t(i.settings),n(i.providerId),a(!1),S(null),E(``),O(``),M(``),P(`[]`),I(`{}`)}catch(e){H(e instanceof Error?e.message:`Could not add ACP agent.`)}finally{B(!1)}}}function J(){z||a(!1)}return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`button`,{type:`button`,className:`settings-secondary acp-add-button`,disabled:!e||z,onClick:()=>a(!0),children:[(0,j.jsx)(f,{size:16,"aria-hidden":`true`}),` ACP Agent`]}),i?(0,j.jsxs)(v,{ariaLabel:`Add ACP agent`,backdropClassName:`git-dialog-backdrop provider-dialog-backdrop`,className:`git-dialog provider-details-dialog acp-agent-dialog`,dismissDisabled:z,onClose:J,children:[(0,j.jsx)(`button`,{type:`button`,className:`git-dialog-close`,"aria-label":`Close`,disabled:z,onClick:J,children:(0,j.jsx)(h,{size:18})}),(0,j.jsx)(`div`,{className:`provider-dialog-header`,children:(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h2`,{children:`Add ACP agent`}),(0,j.jsx)(`span`,{children:`Choose from the registry or register your own agent.`})]})}),(0,j.jsxs)(`div`,{className:`surface-tabs`,role:`tablist`,"aria-label":`Agent registration`,onKeyDown:e=>{if(z||![`ArrowLeft`,`ArrowRight`,`Home`,`End`].includes(e.key))return;e.preventDefault();let t=e.key===`Home`?!1:e.key===`End`||!o;s(t),H(null),e.currentTarget.querySelectorAll(`[role="tab"]`)[+!!t]?.focus()},children:[(0,j.jsx)(`button`,{type:`button`,role:`tab`,id:`${r}-registry-tab`,"aria-controls":`${r}-panel`,"aria-selected":!o,tabIndex:o?-1:0,disabled:z,onClick:()=>{s(!1),H(null)},children:`Registry`}),(0,j.jsx)(`button`,{type:`button`,role:`tab`,id:`${r}-custom-tab`,"aria-controls":`${r}-panel`,"aria-selected":o,tabIndex:o?0:-1,disabled:z,onClick:()=>{s(!0),H(null)},children:`Custom agent`})]}),(0,j.jsxs)(`div`,{className:`provider-dialog-body`,role:`tabpanel`,id:`${r}-panel`,"aria-labelledby":`${r}-${o?`custom`:`registry`}-tab`,children:[(0,j.jsx)(`p`,{children:o?`Register an installed agent using its ACP executable and launch settings.`:`Browse agents from the Agent Client Protocol registry.`}),V?(0,j.jsx)(y,{error:V}):null,(0,j.jsxs)(`form`,{className:`provider-card-form`,onSubmit:e=>void q(e),children:[o?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`label`,{className:`settings-select-field`,children:[(0,j.jsx)(`span`,{children:`Name`}),(0,j.jsx)(`input`,{required:!0,maxLength:160,value:D,disabled:z,onChange:e=>O(e.target.value),placeholder:`My ACP agent`})]}),(0,j.jsxs)(`label`,{className:`settings-select-field`,children:[(0,j.jsx)(`span`,{children:`ACP executable`}),(0,j.jsx)(`input`,{required:!0,value:k,disabled:z,onChange:e=>M(e.target.value),placeholder:`Executable from PATH or absolute path`})]}),(0,j.jsxs)(`label`,{className:`settings-select-field`,children:[(0,j.jsx)(`span`,{children:`Arguments (JSON array)`}),(0,j.jsx)(`textarea`,{value:N,disabled:z,onChange:e=>P(e.target.value),placeholder:`["--acp"]`})]}),(0,j.jsxs)(`label`,{className:`settings-select-field`,children:[(0,j.jsx)(`span`,{children:`Environment overrides (JSON object)`}),(0,j.jsx)(`textarea`,{value:F,disabled:z,onChange:e=>I(e.target.value)})]}),(0,j.jsx)(`small`,{children:`Overrides are saved in your local configuration. Inherited environment variables do not need to be entered here.`})]}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`div`,{className:`acp-registry-search`,children:[(0,j.jsxs)(`label`,{className:`settings-select-field`,children:[(0,j.jsx)(`span`,{children:`Search registry`}),(0,j.jsx)(`input`,{value:_,disabled:z,onChange:e=>b(e.target.value),placeholder:`Search agents`})]}),(0,j.jsx)(`button`,{type:`button`,className:`settings-secondary`,disabled:L||z,onClick:()=>g(e=>e+1),"aria-label":`Refresh ACP registry`,children:(0,j.jsx)(p,{size:14})})]}),L?(0,j.jsxs)(`p`,{role:`status`,children:[(0,j.jsx)(d,{size:16,className:`settings-spin`}),` Loading registry…`]}):null,(0,j.jsxs)(`div`,{className:`acp-registry-content`,children:[l?(0,j.jsxs)(`div`,{className:`acp-registry-list`,role:`group`,"aria-label":`ACP registry agents`,children:[W.map(e=>(0,j.jsxs)(`button`,{type:`button`,className:`acp-registry-entry`,disabled:z,"aria-pressed":x?.id===e.id,onClick:()=>{S(e),w(``),E(e.name)},children:[(0,j.jsxs)(`strong`,{children:[e.name,` `,(0,j.jsx)(`small`,{children:e.version})]}),(0,j.jsx)(`span`,{children:e.description}),e.supported?null:(0,j.jsxs)(`small`,{children:[`No distribution for `,l.platform,`; use a custom command.`]})]},e.id)),W.length?null:(0,j.jsx)(`p`,{className:`acp-registry-empty`,children:`No agents match your search.`})]}):null,x?(0,j.jsxs)(`div`,{className:`acp-install-summary`,children:[(0,j.jsxs)(`label`,{className:`settings-select-field`,children:[(0,j.jsx)(`span`,{children:`Connection name`}),(0,j.jsx)(`input`,{value:T,disabled:z,onChange:e=>E(e.target.value)})]}),U.length?(0,j.jsxs)(`label`,{className:`settings-select-field`,children:[(0,j.jsx)(`span`,{children:`Distribution`}),(0,j.jsx)(`select`,{value:G,disabled:z,onChange:e=>w(e.target.value),children:U.map(e=>(0,j.jsx)(`option`,{value:e,children:e===`binary`?`Binary for ${l?.platform}`:e},e))})]}):null,K?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`code`,{children:G===`binary`?K.archive:`${G} ${K.package} ${(K.args??[]).join(` `)}`}),(0,j.jsxs)(`p`,{children:[G===`binary`?`Adding downloads and installs this version locally.`:`Connecting runs ${G}, which downloads this package version if needed.`,` The agent uses its own authentication and model catalog.`]})]}):null,x.website||x.repository?(0,j.jsx)(`a`,{href:x.website??x.repository,target:`_blank`,rel:`noreferrer`,children:`Agent documentation`}):null]}):null,!x&&l?(0,j.jsx)(`div`,{className:`acp-registry-hint`,children:`Select an agent to see its installation options.`}):null]})]}),(0,j.jsxs)(`div`,{className:`acp-registration-actions`,children:[(0,j.jsx)(`button`,{type:`button`,className:`settings-secondary`,disabled:z,onClick:J,children:`Cancel`}),(0,j.jsx)(`button`,{className:`settings-primary`,disabled:z||!e||(o?!D.trim()||!k.trim():!x||!G),children:z?`Adding agent…`:`Add and connect`})]})]})]})]}):null]})}function N(e){let t=(0,A.useRef)(null),n=(0,A.useRef)(e);return n.current=e,(0,A.useEffect)(()=>{let e=document.activeElement instanceof HTMLElement?document.activeElement:null,r=()=>[...t.current?.querySelectorAll(`button:not(:disabled), input:not(:disabled), select:not(:disabled), a[href], [tabindex="0"]`)??[]].filter(e=>e.getClientRects().length>0);r()[0]?.focus();let i=e=>{if(document.querySelector(`.native-setup-terminal`)||(e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),n.current()),e.key!==`Tab`))return;let t=r(),i=t[0],a=t.at(-1);e.shiftKey&&document.activeElement===i?(e.preventDefault(),a?.focus()):!e.shiftKey&&document.activeElement===a&&(e.preventDefault(),i?.focus())};return document.addEventListener(`keydown`,i),()=>{document.removeEventListener(`keydown`,i),e?.isConnected&&e.focus()}},[]),t}function P(e,t,n){let{recovery:r}=C(e),i=(0,A.useRef)(r);(0,A.useEffect)(()=>{let e=i.current!==r;i.current=r,e&&t&&g(t)&&n()},[r,t,n])}function F({connection:e,onChanged:t}){let[n,r]=(0,A.useState)(!1),[i,a]=(0,A.useState)([]),[o,s]=(0,A.useState)(null),[l,u]=(0,A.useState)(null),[d,f]=(0,A.useState)(0);P(e,o,()=>f(e=>e+1)),(0,A.useEffect)(()=>{let t=new AbortController;return a([]),s(null),e&&c(e,`/v1/url-models/list`,{signal:t.signal}).then(e=>{t.signal.aborted||a(e.models)}).catch(e=>{t.signal.aborted||s(e instanceof Error?e.message:`Could not load your model connections.`)}),()=>t.abort()},[e,d]);async function p(n){if(e&&!l){u(n.id),s(null);try{let r=await c(e,`/v1/url-models/remove`,{method:`POST`,body:JSON.stringify({id:n.id})});a(r.models),await t()}catch(e){s(e instanceof Error?e.message:`Could not remove the connection.`)}finally{u(null)}}}return(0,j.jsxs)(`section`,{"aria-label":`Models from URL`,className:`url-model-connections`,children:[(0,j.jsxs)(`div`,{className:`provider-connections-intro`,children:[(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h2`,{children:`Models from URL`}),(0,j.jsx)(`p`,{children:`Connect a model endpoint and select it in your chats. `})]}),(0,j.jsx)(`button`,{type:`button`,className:`settings-primary`,disabled:!e,onClick:()=>r(!0),children:`Add model`})]}),o?(0,j.jsx)(y,{error:o,children:(0,j.jsx)(`button`,{type:`button`,onClick:()=>f(e=>e+1),children:`Retry`})}):null,(0,j.jsx)(`div`,{className:`provider-connections-grid`,children:i.map(e=>(0,j.jsxs)(`div`,{className:`provider-connection-card`,children:[(0,j.jsx)(`strong`,{children:e.name}),(0,j.jsx)(`p`,{className:`url-model-endpoint`,children:e.endpoint}),(0,j.jsxs)(`p`,{children:[e.providerName,` · `,e.model,` · `,e.hasToken?`Key saved securely`:`No API key`]}),(0,j.jsx)(`button`,{type:`button`,className:`settings-secondary`,disabled:!!l,onClick:()=>void p(e),children:l===e.id?`Removing…`:`Remove model`})]},e.id))}),n&&e?(0,j.jsx)(I,{providerNames:[...new Set(i.map(e=>e.providerName))],connection:e,onClose:()=>r(!1),onSaved:async e=>{a(e.models),await t(),r(!1)}}):null]})}function I({connection:e,providerNames:t,onClose:n,onSaved:r}){let i=N(n),[a,o]=(0,A.useState)(t[0]?`provider:${t[0]}`:`__new__`),[s,l]=(0,A.useState)(``),u=a===`__new__`?s.trim():a.slice(9),[d,f]=(0,A.useState)(``),[p,m]=(0,A.useState)(``),[g,_]=(0,A.useState)(``),[v,b]=(0,A.useState)(``),[S,C]=(0,A.useState)(null),[w,T]=(0,A.useState)(!1),[E,D]=(0,A.useState)(null),O=(0,A.useRef)(null);(0,A.useEffect)(()=>()=>O.current?.abort(),[]);function k(){C(null),b(``),D(null)}async function M(t){if(O.current)return;let n=new AbortController;O.current=n,T(!0),D(null);try{if(t){let t=await c(e,`/v1/url-models/save`,{method:`POST`,signal:n.signal,body:JSON.stringify({endpoint:d.trim(),token:p,name:g.trim(),model:v,providerName:u})});n.signal.aborted||(m(``),await r(t))}else{let t=await c(e,`/v1/url-models/inspect`,{method:`POST`,signal:n.signal,body:JSON.stringify({endpoint:d.trim(),token:p})});n.signal.aborted||(C(t),b(t.models[0]??``),g.trim()||_(t.models[0]??``))}}catch(e){n.signal.aborted||D(e instanceof Error?e.message:`Connection failed.`)}finally{O.current=null,n.signal.aborted||T(!1)}}function P(e){e.preventDefault(),M(!!S)}return(0,j.jsx)(`div`,{className:`git-dialog-backdrop provider-dialog-backdrop`,role:`presentation`,onMouseDown:e=>{e.target===e.currentTarget&&n()},children:(0,j.jsxs)(`section`,{ref:i,className:`git-dialog provider-details-dialog`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`url-model-title`,tabIndex:-1,children:[(0,j.jsxs)(`div`,{className:`provider-dialog-header`,children:[(0,j.jsx)(`h2`,{id:`url-model-title`,children:`Add model`}),(0,j.jsx)(`button`,{type:`button`,className:`git-dialog-close`,"aria-label":`Close Add model`,onClick:n,children:(0,j.jsx)(h,{size:18})})]}),(0,j.jsxs)(`form`,{className:`url-model-connection-form`,onSubmit:P,children:[(0,j.jsxs)(`div`,{className:`url-model-field`,children:[(0,j.jsx)(`span`,{children:`Provider`}),(0,j.jsx)(x,{label:`Provider`,value:a,disabled:w,floating:!0,options:[...t.map(e=>({value:`provider:${e}`,label:e})),{value:`__new__`,label:`Create new provider`,icon:`plus`,separatorBefore:!!t.length}],onChange:o})]}),a===`__new__`?(0,j.jsxs)(`label`,{children:[`Provider name`,(0,j.jsx)(`input`,{required:!0,maxLength:100,placeholder:`My model provider`,value:s,disabled:w,onChange:e=>l(e.target.value)})]}):null,(0,j.jsxs)(`label`,{children:[`Endpoint URL`,(0,j.jsx)(`input`,{type:`url`,required:!0,placeholder:`https://api.example.com/v1`,value:d,disabled:w,onChange:e=>{f(e.target.value),k()}})]}),(0,j.jsxs)(`label`,{children:[`API key `,(0,j.jsx)(`span`,{className:`settings-footnote`,children:`Optional for endpoints that do not require one`}),(0,j.jsx)(`input`,{type:`password`,autoComplete:`new-password`,spellCheck:!1,value:p,disabled:w,placeholder:`API key`,onChange:e=>{m(e.target.value),k()}})]}),S?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`div`,{className:`url-model-field`,children:[(0,j.jsx)(`span`,{children:`Model`}),(0,j.jsx)(x,{label:`Model`,value:v,disabled:w,floating:!0,searchable:!0,options:S.models.map(e=>({value:e,label:e})),onChange:e=>{b(e),_(e)}})]}),(0,j.jsxs)(`label`,{children:[`Display name`,(0,j.jsx)(`input`,{required:!0,maxLength:100,value:g,disabled:w,onChange:e=>_(e.target.value)})]})]}):(0,j.jsx)(`p`,{className:`settings-footnote`,children:`Use the model service’s API base URL. Keys are encrypted on this machine.`}),E?(0,j.jsx)(y,{error:E}):null,(0,j.jsxs)(`div`,{className:`url-model-connection-actions`,children:[(0,j.jsx)(`button`,{className:`settings-primary`,type:`submit`,disabled:w||!u||!!S&&(!v||!g.trim()),children:w?`Connecting…`:S?`Add model`:`Fetch models`}),(0,j.jsx)(`button`,{type:`button`,className:`settings-secondary`,onClick:n,children:`Cancel`})]})]})]})})}var L=[`codex`,`claude-code`,`grok-build`,`opencode`];function R(e){return r(e)||[`claude-code`,`grok-build`,`opencode`].includes(e)}var z={codex:{executable:`codex`,install:`https://developers.openai.com/codex/cli`},"claude-code":{executable:`claude`,install:`https://code.claude.com/docs/en/setup`},"grok-build":{executable:`grok`,install:`https://docs.x.ai/build/cli`},opencode:{executable:`opencode`,install:`https://opencode.ai/docs`}},B=(e,t)=>JSON.stringify([e||``,t||``]);function V({connection:e,providerId:t,config:n,status:a,cachedModels:o,busy:s,onCheck:l}){let[u,f]=(0,A.useState)(null),[m,h]=(0,A.useState)(null),[g,v]=(0,A.useState)(null),[b,x]=(0,A.useState)(!1),[S,C]=(0,A.useState)(n.binaryPath??``),[w,E]=(0,A.useState)(n.sourceHome??``),k=(0,A.useRef)(null),M=(0,A.useRef)(null),N=(0,A.useRef)(l);N.current=l;let P=D(),F=r(t),I=z[t]??{executable:n.acp?.command??``,install:n.acp?.installUrl??``},[L,V]=(0,A.useState)(n.acp?.command??``),[H,U]=(0,A.useState)(JSON.stringify(n.acp?.args??[])),[W,G]=(0,A.useState)(JSON.stringify(n.acp?.env??{},null,2)),K=B(n.binaryPath,n.sourceHome)+JSON.stringify(n.acp),q=B(S.trim(),w.trim())!==B(n.binaryPath,n.sourceHome)||F&&(L!==n.acp?.command||H!==JSON.stringify(n.acp?.args??[])||W!==JSON.stringify(n.acp?.env??{},null,2)),J=s||b||u!==null,Y=(0,A.useCallback)(async e=>{k.current?.abort();let n=new AbortController;k.current=n;let r=setTimeout(()=>n.abort(Error(`Connection check timed out. Retry when the agent is available.`)),45e3);x(!0),h(null);try{let r=await N.current(t,n.signal,e);k.current===n&&!n.signal.aborted&&v(r)}catch(e){k.current===n&&h(e instanceof Error?e.message:`Could not check the agent.`)}finally{clearTimeout(r),k.current===n&&(k.current=null,x(!1))}},[t]);(0,A.useEffect)(()=>{V(n.acp?.command??``),U(JSON.stringify(n.acp?.args??[])),G(JSON.stringify(n.acp?.env??{},null,2)),C(n.binaryPath??``),E(n.sourceHome??``),M.current===K?M.current=null:(f(null),v(null),Y())},[Y,K,n.binaryPath,n.sourceHome,e?.serverUrl,e?.token]),(0,A.useEffect)(()=>()=>{let e=k.current;k.current=null,e?.abort()},[]);async function X(e){if(e.preventDefault(),q&&!J){try{let e=F&&n.acp?{...n.acp,command:L.trim(),args:JSON.parse(H),env:JSON.parse(W)}:n.acp;M.current=B(S.trim(),w.trim())+JSON.stringify(e),await Y({binaryPath:S.trim()||null,sourceHome:w.trim()||null,...F?{acp:e}:{}})}catch(e){h(e instanceof Error?e.message:`Invalid command configuration.`)}M.current=null}}async function Z(){if(!e||g?.status!==`needs_login`)return;let n=new AbortController,r=setTimeout(()=>n.abort(),1e4);k.current?.abort(),k.current=n,x(!0),h(null);try{let r=await c(e,`/v1/providers/${t}/native-setup`,{method:`POST`,body:JSON.stringify({action:`login`}),signal:n.signal});k.current===n&&!n.signal.aborted&&(t===`claude-code`?P.start(r):f(r))}catch(e){k.current===n&&h(e instanceof Error?e.message:`Could not open native login.`)}finally{clearTimeout(r),k.current===n&&(k.current=null,x(!1))}}async function ee(n){if(!e||J||q)return;x(!0),h(null);let r=new AbortController;k.current=r;let i=setTimeout(()=>r.abort(Error(`Authentication timed out. Use the agent’s login and refresh.`)),185e3);try{let i=await c(e,`/v1/providers/${t}/native-setup`,{method:`POST`,body:JSON.stringify({action:`authenticate`,authMethodId:n}),signal:r.signal});r.signal.aborted||(M.current=B(i.settings.providers[t]?.binaryPath,i.settings.providers[t]?.sourceHome)+JSON.stringify(i.settings.providers[t]?.acp),v(i),await Y(),M.current=null)}catch(e){r.signal.aborted||h(e instanceof Error?e.message:`Authentication failed.`)}finally{clearTimeout(i),k.current===r&&(k.current=null,x(!1))}}(0,A.useEffect)(()=>{if(t!==`claude-code`||!P.result)return;let e=P.result.settings.providers[t];(e?.binaryPath||null)===(n.binaryPath||null)&&(e?.sourceHome||null)===(n.sourceHome||null)&&(v(P.result),h(P.result.status===`unavailable`?P.result.error:null))},[P.result,t,n.binaryPath,n.sourceHome]);let Q=g?.settings.modelCaches[t]?.models??o,$=[...new Set(Q.map(e=>i(e.displayName||e.id)))],te=m??g?.error;return(0,j.jsxs)(`div`,{className:`provider-dialog-body native-agent-setup`,children:[(0,j.jsx)(`p`,{children:F?`Uses the configured ${a.displayName} ACP command and its own login.`:`Uses your existing ${a.displayName} installation and login.`}),(0,j.jsxs)(`div`,{className:`native-connection-status`,children:[(0,j.jsx)(`div`,{role:`status`,"aria-live":`polite`,children:b?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(d,{size:16,className:`settings-spin`}),(0,j.jsx)(`span`,{children:`Checking connection…`})]}):g?.status===`ready`?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(O,{size:16}),(0,j.jsx)(`span`,{children:n.enabled?`Connected`:`Connected, disabled for chat`})]}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(T,{size:16}),(0,j.jsx)(`span`,{children:g?.status===`missing`?`Installation not found`:g?.status===`needs_login`?`Sign in required`:`Connection needs attention`})]})}),(0,j.jsxs)(`button`,{type:`button`,className:`settings-secondary`,disabled:J||!e,onClick:()=>void Y(),title:`Refresh connection`,"aria-label":`Refresh connection`,children:[(0,j.jsx)(p,{size:14}),` Refresh`]})]}),te?(0,j.jsx)(y,{error:te}):null,$.length?(0,j.jsxs)(`section`,{className:`native-model-section`,"aria-label":`Available models`,children:[(0,j.jsxs)(`div`,{className:`native-model-heading`,children:[(0,j.jsx)(`h3`,{children:`Models`}),(0,j.jsxs)(`small`,{children:[$.length,` available`]})]}),(0,j.jsx)(`div`,{className:`native-model-list`,tabIndex:0,"aria-label":`Models`,role:`list`,children:$.map(e=>(0,j.jsx)(`span`,{role:`listitem`,children:e},e))}),(0,j.jsx)(`small`,{children:`Choose a model when starting a chat.`})]}):null,g?.version?(0,j.jsx)(`small`,{className:`native-agent-version`,children:g.version}):null,!F&&g?.status===`needs_login`?(0,j.jsx)(`button`,{type:`button`,className:`settings-secondary`,disabled:J||q||!e,title:q?`Save changes before signing in to a different installation`:void 0,onClick:()=>t===`claude-code`&&P.active?P.resume():void Z(),children:t===`claude-code`&&P.active?`Continue sign-in`:`Sign in`}):null,F&&g?.authMethods?.length?(0,j.jsx)(`div`,{className:`acp-auth-methods`,children:g.authMethods.map(t=>t.type===`terminal`?(0,j.jsxs)(`p`,{children:[`Use `,t.name,` in the agent’s own terminal, then refresh this connection.`]},t.id):(0,j.jsx)(`button`,{type:`button`,className:`settings-secondary`,disabled:J||q||!e,onClick:()=>void ee(t.id),title:t.description,children:t.name},t.id))}):null,g?.status===`missing`&&I.install?(0,j.jsxs)(`p`,{children:[(0,j.jsxs)(`a`,{href:I.install,target:`_blank`,rel:`noreferrer`,children:[`Install `,a.displayName]}),`, then refresh this connection.`]}):null,t===`codex`&&g?.status===`missing`?(0,j.jsx)(`p`,{children:`OpenPond needs the Codex CLI installed separately from ChatGPT.`}):null,(m||g?.status===`unavailable`)&&!b?(0,j.jsx)(`button`,{type:`button`,className:`settings-secondary`,disabled:J||!e,onClick:()=>void Y(),children:`Retry`}):null,u&&e?(0,j.jsx)(_,{connection:e,command:u.command,displayCommand:u.displayCommand,onComplete:()=>{f(null),Y()},onClose:()=>{f(null),Y()}}):null,R(t)?(0,j.jsxs)(`details`,{children:[(0,j.jsx)(`summary`,{children:`Advanced`}),(0,j.jsxs)(`form`,{className:`provider-card-form`,onSubmit:e=>void X(e),children:[F?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`label`,{className:`settings-select-field`,children:[(0,j.jsx)(`span`,{children:`ACP command`}),(0,j.jsx)(`input`,{value:L,disabled:J,onChange:e=>V(e.target.value)})]}),(0,j.jsxs)(`label`,{className:`settings-select-field`,children:[(0,j.jsx)(`span`,{children:`Arguments (JSON array)`}),(0,j.jsx)(`textarea`,{value:H,disabled:J,onChange:e=>U(e.target.value)})]}),(0,j.jsxs)(`label`,{className:`settings-select-field`,children:[(0,j.jsx)(`span`,{children:`Environment overrides (JSON object)`}),(0,j.jsx)(`textarea`,{value:W,disabled:J,onChange:e=>G(e.target.value)})]})]}):null,(0,j.jsxs)(`label`,{className:`settings-select-field`,children:[(0,j.jsx)(`span`,{children:`Executable override`}),(0,j.jsx)(`input`,{value:S,placeholder:`${I.executable} from PATH, or an absolute path`,disabled:J,onChange:e=>C(e.currentTarget.value)})]}),(0,j.jsxs)(`label`,{className:`settings-select-field`,children:[(0,j.jsx)(`span`,{children:F?`Home directory`:`Source home`}),(0,j.jsx)(`input`,{value:w,placeholder:`Use the agent's existing home`,disabled:J,onChange:e=>E(e.currentTarget.value)})]}),q?(0,j.jsx)(`button`,{className:`settings-secondary`,disabled:J||!e,children:`Save changes`}):null]})]}):null]})}var H=[{value:`local_secret`,label:`Saved key`,description:`Encrypted on this machine`},{value:`env`,label:`Environment variable`,description:`Read by the local server`}],U=120,W=new Set([`openai`,`xai`,`zai`]),G=new Set([`chatgpt-subscription`]),K=`https://api.z.ai/api/coding/paas/v4`;function q(e){return e.split(/[\n,]/).map(e=>e.trim()).filter(Boolean)}function J(e){return e?e.available?`Ready`:e.credential.connected?`Configured`:e.credential.lastError||e.lastError?`Needs attention`:e.id===`codex`?`Needs Codex login`:R(e.id)?`Check connection`:e.routing.localByok?`Needs key`:e.enabled?`Enabled`:`Off`:`Unknown`}function Y(e){return e?e.available?`ready`:e.credential.connected?`configured`:e.credential.lastError||e.lastError||e.id===`codex`?`warning`:`muted`:`unknown`}function X(e){return e.credential.connected?e.credential.redacted?e.credential.redacted:e.credential.source===`native_agent_login`?`Native login`:e.credential.source===`chatgpt_subscription`?`ChatGPT subscription`:e.credential.source:e.credential.lastError??`Not connected`}function Z(e){return e?.trim().replace(/\/+$/,``)??``}function ee(e,t){return e.id===`zai`&&Z(t.providers.zai?.baseUrl)===K}function Q(e){return e!==`openpond`&&o(e)}function $(e){return e?W.has(e.id)||e.credentialModes.some(e=>G.has(e)):!1}function te(e){return $(e)?[`api`,`subscription`]:[`api`]}function ne(e,t){return!e||!t||!$(e)?`api`:e.credential.source===`chatgpt_subscription`||ee(e,t)?`subscription`:`api`}function re(e){if(!e)return`Never`;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function ie(e,t,n=U){let r=[],i=new Set,a=new Set(t.map(e=>e.trim()).filter(Boolean)),o=e=>{i.has(e.value)||r.length>=n||(i.add(e.value),r.push(e))};for(let t of e)a.has(t.value)&&o(t);for(let t of e)o(t);return r}function ae({onProvidersChanged:e,checkNativeProvider:t,connection:n,account:i,codex:a,providers:o,providerBusy:s,validationMessage:l,deleteProviderCredential:u,loadProviderModels:f,refreshProviderModels:p,saveProviderConfig:m,saveProviderCredential:h,startOpenAiSubscriptionAuth:g,validateProvider:_}){let[v,x]=(0,A.useState)(null),[C,T]=(0,A.useState)(null),[D,O]=(0,A.useState)(null),k=[...L,...Object.keys(o?.statuses??{}).filter(r)].filter(e=>o?.statuses[e]),N=D?o?.statuses[D]??null:null;function P(e,t){O(e),t&&f(e)}return(0,j.jsxs)(`section`,{className:`account-settings provider-connections-settings`,children:[(0,j.jsxs)(`div`,{className:`provider-connections-heading`,children:[(0,j.jsx)(`h1`,{children:`Providers`}),(0,j.jsx)(M,{connection:n,onChanged:e,onAdded:e=>O(e)})]}),(0,j.jsxs)(`div`,{className:`provider-connections-intro`,children:[(0,j.jsx)(`p`,{children:`Manage your installed agents and login. Sync conversations from Continuous learning.`}),(0,j.jsx)(`button`,{type:`button`,className:`settings-secondary`,onClick:()=>void b({kind:`view`,view:`apps`}),children:`Apps & learning`})]}),o?(0,j.jsx)(`div`,{className:`provider-connections-panel`,children:k.length>0?(0,j.jsx)(`div`,{className:`provider-connections-grid`,role:`list`,children:k.map(t=>{let i=o.statuses[t],a=o.modelCaches[t],l=i.modelIds.length>0&&(a?.models.length??0)<i.modelIds.length,u=s?.startsWith(`${t}:`)??!1,f=Q(t),p=t===`openpond`||!!o.providers[t]?.enabled;return(0,j.jsxs)(`div`,{className:`provider-connection-card`,role:`listitem`,children:[(0,j.jsxs)(`div`,{className:`provider-connection-identity`,children:[(0,j.jsx)(`strong`,{children:i.displayName}),(0,j.jsxs)(`div`,{className:`provider-connection-controls`,children:[t===`codex`||t===`claude-code`?(0,j.jsx)(w,{connection:n,provider:t}):null,(0,j.jsxs)(`label`,{className:`provider-toggle`,"aria-label":`Enable ${i.displayName}`,children:[(0,j.jsx)(`input`,{type:`checkbox`,checked:p,disabled:!f||u,onChange:e=>{m(t,{enabled:e.currentTarget.checked})}}),(0,j.jsx)(`span`,{})]})]})]}),(0,j.jsxs)(`div`,{className:`provider-connection-status ${Y(i)}`,children:[u?(0,j.jsx)(d,{size:13,className:`settings-spin`}):null,(0,j.jsx)(`span`,{children:J(i)})]}),t===`codex`||t===`claude-code`?(0,j.jsx)(E,{connection:n,provider:t}):null,(0,j.jsx)(`button`,{type:`button`,className:`settings-secondary`,onClick:()=>{P(t,l)},children:`Manage`}),r(t)?(0,j.jsx)(`button`,{type:`button`,className:`settings-secondary`,disabled:v!==null||!n,onClick:async()=>{if(n){x(t),T(null);try{e((await c(n,`/v1/providers/acp-registry`,{method:`DELETE`,body:JSON.stringify({providerId:t})})).settings),D===t&&O(null)}catch(e){T(e instanceof Error?e.message:`Could not remove ACP agent.`)}finally{x(null)}}},children:v===t?`Removing…`:`Remove connection`}):null]},t)})}):(0,j.jsx)(`div`,{className:`empty-account-list provider-manager-empty`,children:(0,j.jsx)(`strong`,{children:`No agent providers available`})})}):null,C?(0,j.jsx)(y,{error:C}):null,(0,j.jsx)(F,{connection:n,onChanged:async()=>{n&&e(await S.providerSettings(n))}}),l?(0,j.jsxs)(`div`,{className:`settings-footnote provider-validation-message`,children:[(0,j.jsx)(`span`,{children:`Last validation`}),(0,j.jsx)(`strong`,{children:l})]}):null,D&&N&&o?(0,j.jsx)(oe,{checkNativeProvider:t,connection:n,account:i,codex:a,providerId:D,providerBusy:s,settings:o,status:N,onClose:()=>O(null),onDeleteCredential:u,onRefreshModels:p,onSaveConfig:m,onSaveCredential:h,onStartOpenAiSubscriptionAuth:g,onValidate:_}):null]})}function oe({checkNativeProvider:e,connection:t,account:n,codex:i,providerId:a,providerBusy:s,settings:c,status:l,onClose:u,onDeleteCredential:d,onRefreshModels:f,onSaveConfig:p,onSaveCredential:m,onStartOpenAiSubscriptionAuth:g,onValidate:_,conversationPanel:v}){let y=N(u),[b,x]=(0,A.useState)(`setup`),S=(0,A.useId)(),C=c.providers[a],w=c.modelCaches[a],E=(0,A.useId)(),D=(0,A.useRef)(a),O=Math.max(w?.models.length??0,l.modelIds.length),k=l.routing.localByok&&o(a)&&a!==`codex`&&!R(a),M=(0,A.useMemo)(()=>k?te(l):[],[k,l]),P=M.includes(`subscription`),[F,I]=(0,A.useState)(()=>ne(l,c)),z=k&&F===`subscription`&&P,B=e=>`${E}-${e}-panel`,H=a===`codex`?`Codex app server`:C?.baseUrl??(a===`openpond`?n?.chatApiBaseUrl:null)??`Not set`;return(0,A.useEffect)(()=>{D.current===a?k&&!M.includes(F)&&I(`api`):(D.current=a,I(ne(l,c)))},[F,M,k,a,c,l]),(0,j.jsx)(`div`,{className:`git-dialog-backdrop provider-dialog-backdrop`,role:`presentation`,onMouseDown:u,children:(0,j.jsxs)(`section`,{ref:y,className:`git-dialog provider-details-dialog${v?` agent-setup-dialog`:``}`,role:`dialog`,"aria-modal":`true`,"aria-label":`${l.displayName} provider details`,onMouseDown:e=>e.stopPropagation(),children:[(0,j.jsx)(`button`,{className:`git-dialog-close`,type:`button`,title:`Close`,"aria-label":`Close`,onClick:u,children:(0,j.jsx)(h,{size:16})}),(0,j.jsxs)(`div`,{className:`provider-dialog-header`,children:[(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h2`,{children:l.displayName}),(0,j.jsx)(`span`,{children:L.includes(a)||r(a)?`Installation and login`:`API and subscription settings`})]}),(0,j.jsx)(`div`,{className:`provider-state-pill ${Y(l)}`,children:J(l)})]}),(L.includes(a)||r(a))&&C?(0,j.jsxs)(`label`,{className:`provider-chat-toggle`,children:[(0,j.jsxs)(`span`,{className:`provider-toggle`,children:[(0,j.jsx)(`input`,{type:`checkbox`,"aria-label":`Enable ${l.displayName} for chat`,checked:C.enabled,disabled:s!==null,onChange:e=>void p(a,{enabled:e.target.checked})}),(0,j.jsx)(`span`,{"aria-hidden":`true`})]}),(0,j.jsxs)(`span`,{children:[`Use `,l.displayName,` for chats`]})]}):null,v?(0,j.jsxs)(`div`,{className:`surface-tabs provider-agent-tabs`,role:`tablist`,"aria-label":`Agent settings`,onKeyDown:e=>{if(e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)return;e.preventDefault();let t=b===`setup`?`sync`:`setup`;x(t),e.currentTarget.querySelector(`#${CSS.escape(`${S}-${t}`)}`)?.focus()},children:[(0,j.jsx)(`button`,{type:`button`,role:`tab`,id:`${S}-setup`,"aria-controls":`${S}-setup-panel`,"aria-selected":b===`setup`,tabIndex:b===`setup`?0:-1,onClick:()=>x(`setup`),children:`Agent setup`}),(0,j.jsx)(`button`,{type:`button`,role:`tab`,id:`${S}-sync`,"aria-controls":`${S}-sync-panel`,"aria-selected":b===`sync`,tabIndex:b===`sync`?0:-1,onClick:()=>x(`sync`),children:`Conversation sync`})]}):null,(0,j.jsxs)(`div`,{hidden:b!==`setup`,id:`${S}-setup-panel`,role:v?`tabpanel`:void 0,"aria-labelledby":v?`${S}-setup`:void 0,children:[k?(0,j.jsx)(`div`,{className:`surface-tabs provider-mode-tabs`,role:`tablist`,"aria-label":`${l.displayName} mode`,children:M.map(e=>(0,j.jsx)(`button`,{type:`button`,role:`tab`,id:`${E}-${e}`,className:F===e?`active`:void 0,"aria-selected":F===e,"aria-controls":B(e),onClick:()=>I(e),children:e===`api`?`API`:`Subscription`},e))}):null,L.includes(a)||r(a)?null:(0,j.jsxs)(`dl`,{className:`provider-dialog-stats`,children:[(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`dt`,{children:`Credential`}),(0,j.jsx)(`dd`,{title:X(l),children:X(l)})]}),z?null:(0,j.jsxs)(j.Fragment,{children:[R(a)?null:(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`dt`,{children:`Base URL`}),(0,j.jsx)(`dd`,{title:H,children:H})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`dt`,{children:`Model`}),(0,j.jsx)(`dd`,{title:C?.defaultModel??l.defaultModel??void 0,children:C?.defaultModel??l.defaultModel??`Not set`})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`dt`,{children:`Models`}),(0,j.jsxs)(`dd`,{title:w?.lastError??void 0,children:[O,` cached, `,re(w?.fetchedAt)]})]})]}),a===`codex`?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`dt`,{children:`Account`}),(0,j.jsx)(`dd`,{title:i?.account?.email??void 0,children:i?.account?.label??i?.account?.email??`Not signed in`})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`dt`,{children:`Binary`}),(0,j.jsx)(`dd`,{title:i?.binaryPath??void 0,children:i?.binaryPath??`Not found`})]})]}):null,l.credential.lastError||w?.lastError||l.lastError?(0,j.jsxs)(`div`,{className:`provider-dialog-error`,children:[(0,j.jsx)(`dt`,{children:`Error`}),(0,j.jsx)(`dd`,{title:l.credential.lastError??w?.lastError??l.lastError??void 0,children:l.credential.lastError??w?.lastError??l.lastError})]}):null]}),a===`codex`?(0,j.jsxs)(j.Fragment,{children:[C?(0,j.jsx)(V,{connection:t,providerId:a,config:C,status:l,cachedModels:w?.models??[],busy:s!==null,onCheck:e},a):null,(0,j.jsxs)(`div`,{className:`provider-dialog-body`,children:[(0,j.jsx)(`h3`,{children:`ChatGPT with the OpenPond harness`}),(0,j.jsx)(`p`,{children:`Native Codex and the OpenPond harness keep their own connections. Choose the execution path in the model picker.`}),(0,j.jsx)(`p`,{children:c.statuses.openai?.credential.connected?`OpenPond harness connected`:`OpenPond harness not connected`}),(0,j.jsx)(`button`,{type:`button`,className:`settings-secondary`,disabled:s!==null,onClick:()=>void g(`browser`),children:`Connect ChatGPT for OpenPond`}),(0,j.jsxs)(`button`,{type:`button`,className:`settings-secondary`,disabled:s!==null,onClick:()=>void p(`openai`,{enabled:!c.providers.openai?.enabled}),children:[c.providers.openai?.enabled?`Disable`:`Enable`,` OpenPond harness route`]})]})]}):R(a)&&C?(0,j.jsx)(V,{connection:t,providerId:a,config:C,status:l,cachedModels:w?.models??[],busy:s!==null,onCheck:e},a):k&&C&&w?(0,j.jsx)(se,{credentialTab:F,credentialTabsId:E,hasSubscriptionTab:P,providerId:a,providerBusy:s,settings:c,status:l,onDeleteCredential:d,onRefreshModels:f,onSaveConfig:p,onSaveCredential:m,onStartOpenAiSubscriptionAuth:g,onValidate:_}):l.routing.localByok&&!o(a)?(0,j.jsxs)(`div`,{className:`provider-dialog-note`,children:[(0,j.jsx)(T,{size:15}),(0,j.jsx)(`span`,{children:`Adapter pending`})]}):null]}),b===`sync`?(0,j.jsx)(`div`,{role:`tabpanel`,id:`${S}-sync-panel`,"aria-labelledby":`${S}-sync`,children:v}):null]})})}function se({credentialTab:e,credentialTabsId:t,hasSubscriptionTab:n,providerId:r,providerBusy:i,settings:a,status:o,onDeleteCredential:c,onRefreshModels:l,onSaveConfig:f,onSaveCredential:h,onStartOpenAiSubscriptionAuth:g,onValidate:_}){let v=a.providers[r],y=(0,A.useMemo)(()=>s(r,a),[r,a]),b=`provider-models-${r}`,S=(0,A.useRef)(r),[C,w]=(0,A.useState)(v.baseUrl??``),[T,E]=(0,A.useState)(v.defaultModel??``),[D,M]=(0,A.useState)(v.modelOverrides.join(`
|
|
2
|
-
`)),[N,P]=(0,A.useState)({baseUrl:!1,defaultModel:!1,modelOverrides:!1}),[F,I]=(0,A.useState)(`local_secret`),[L,R]=(0,A.useState)(``),[z,B]=(0,A.useState)(``),V=i===`${r}:config`,U=i===`${r}:credential`,W=i===`${r}:validate`,G=i===`${r}:models`,K=i===`openai:credential`,J=r===`openai`,Y=r===`xai`,X=r===`zai`,Z=(e=>`${t}-${e}-panel`)(e),ee=e===`subscription`&&n,Q=e===`subscription`&&X?`coding-plan`:`api`,$=Q===`coding-plan`?`Coding Plan key`:`API key`,te=o.credential.connected?Q===`coding-plan`?`Replace saved plan key`:`Replace saved key`:$,ne=Q===`coding-plan`?`Save plan key`:`Save key`,re=(0,A.useMemo)(()=>ie(y,[T,...q(D)]),[T,y,D]),ae=Math.max(0,y.length-re.length);(0,A.useEffect)(()=>{S.current===r?(N.baseUrl||w(v.baseUrl??``),N.defaultModel||E(v.defaultModel??``),N.modelOverrides||M(v.modelOverrides.join(`
|
|
3
|
-
`))):(S.current=r,P({baseUrl:!1,defaultModel:!1,modelOverrides:!1}),w(v.baseUrl??``),E(v.defaultModel??``),M(v.modelOverrides.join(`
|
|
4
|
-
`)))},[v.baseUrl,v.defaultModel,v.modelOverrides,N.baseUrl,N.defaultModel,N.modelOverrides,r]);let oe=F===`env`?!!z.trim():!!L.trim();async function se(e){e.preventDefault(),await f(r,{enabled:!0,baseUrl:C.trim()||null,defaultModel:T.trim()||null,modelOverrides:q(D)}),P({baseUrl:!1,defaultModel:!1,modelOverrides:!1})}async function ce(e){e.preventDefault(),oe&&(F===`env`?await h(r,{source:`env`,envVar:z.trim()}):(await h(r,{source:`local_secret`,value:L}),R(``)))}function le({panel:n=!0}={}){return(0,j.jsxs)(`form`,{className:`provider-credential-panel`,id:n?Z:void 0,role:n?`tabpanel`:void 0,"aria-labelledby":n?`${t}-${e}`:void 0,onSubmit:e=>void ce(e),children:[(0,j.jsxs)(`div`,{className:`provider-card-grid credential-grid`,children:[(0,j.jsxs)(`div`,{className:`settings-select-field`,children:[(0,j.jsx)(`span`,{children:`Credential source`}),(0,j.jsx)(x,{value:F,disabled:U,label:`Credential source`,options:H,onChange:e=>I(e)})]}),F===`env`?(0,j.jsxs)(`label`,{className:`settings-select-field`,children:[(0,j.jsx)(`span`,{children:`Environment variable`}),(0,j.jsx)(`input`,{value:z,disabled:U,placeholder:`PROVIDER_API_KEY`,onChange:e=>B(e.currentTarget.value)})]}):(0,j.jsxs)(`label`,{className:`settings-select-field`,children:[(0,j.jsx)(`span`,{children:$}),(0,j.jsx)(`input`,{type:`password`,value:L,disabled:U,placeholder:te,autoComplete:`off`,onChange:e=>R(e.currentTarget.value)})]})]}),(0,j.jsxs)(`div`,{className:`settings-button-row`,children:[(0,j.jsxs)(`button`,{className:`settings-secondary`,disabled:U||!oe,children:[U?(0,j.jsx)(d,{size:14,className:`settings-spin`}):(0,j.jsx)(k,{size:14}),(0,j.jsx)(`span`,{children:U?`Saving`:ne})]}),(0,j.jsx)(`button`,{type:`button`,className:`settings-icon-button ghost`,"aria-label":`Delete ${o.displayName} credential`,disabled:U||!o.credential.connected,onClick:()=>void c(r),children:(0,j.jsx)(u,{size:15})})]})]})}function ue(){return J?(0,j.jsxs)(`div`,{className:`provider-subscription-panel`,id:Z,role:`tabpanel`,"aria-labelledby":`${t}-subscription`,children:[(0,j.jsxs)(`div`,{className:`provider-dialog-note codex-provider-note`,children:[(0,j.jsx)(k,{size:15}),(0,j.jsx)(`span`,{children:`ChatGPT subscription auth opens OpenAI login and stores a refresh token locally. API keys remain available under the API tab for raw Platform billing.`})]}),(0,j.jsxs)(`div`,{className:`settings-button-row`,children:[(0,j.jsxs)(`button`,{type:`button`,className:`settings-secondary`,disabled:K,onClick:()=>void g(`browser`),children:[K?(0,j.jsx)(d,{size:14,className:`settings-spin`}):(0,j.jsx)(k,{size:14}),(0,j.jsx)(`span`,{children:K?`Opening`:`Connect ChatGPT`})]}),(0,j.jsxs)(`button`,{type:`button`,className:`settings-secondary`,disabled:K,onClick:()=>void g(`device`),children:[K?(0,j.jsx)(d,{size:14,className:`settings-spin`}):(0,j.jsx)(k,{size:14}),(0,j.jsx)(`span`,{children:`Device code`})]}),(0,j.jsx)(`button`,{type:`button`,className:`settings-icon-button ghost`,"aria-label":`Delete ${o.displayName} credential`,disabled:K||!o.credential.connected,onClick:()=>void c(r),children:(0,j.jsx)(u,{size:15})})]})]}):Y?(0,j.jsx)(`div`,{className:`provider-subscription-panel`,id:Z,role:`tabpanel`,"aria-labelledby":`${t}-subscription`,children:(0,j.jsxs)(`div`,{className:`provider-dialog-note xai-provider-note`,children:[(0,j.jsx)(k,{size:15}),(0,j.jsx)(`span`,{children:`SuperGrok includes Grok app and Grok Build access. xAI API calls here still use an xAI Console API key with API credits or invoiced billing, so there is no separate Connect SuperGrok step yet.`})]})}):X?(0,j.jsxs)(`div`,{className:`provider-subscription-panel`,id:Z,role:`tabpanel`,"aria-labelledby":`${t}-subscription`,children:[(0,j.jsxs)(`div`,{className:`provider-dialog-note subscription-provider-note`,children:[(0,j.jsx)(k,{size:15}),(0,j.jsx)(`span`,{children:`GLM Coding Plan uses a plan API key with the dedicated Coding endpoint. General Z.ai API keys and balances are separate.`})]}),le({panel:!1})]}):null}return(0,j.jsxs)(`div`,{className:`provider-dialog-body`,children:[ee?null:(0,j.jsxs)(`form`,{className:`provider-card-form`,onSubmit:e=>void se(e),children:[(0,j.jsxs)(`div`,{className:`provider-card-grid`,children:[(0,j.jsxs)(`label`,{className:`settings-select-field`,children:[(0,j.jsx)(`span`,{children:`Base URL`}),(0,j.jsx)(`input`,{value:C,disabled:V,placeholder:`https://api.example.com/v1`,onChange:e=>{P(e=>({...e,baseUrl:!0})),w(e.currentTarget.value)}})]}),(0,j.jsxs)(`label`,{className:`settings-select-field`,children:[(0,j.jsx)(`span`,{children:`Default model`}),(0,j.jsx)(`input`,{list:b,value:T,disabled:V,placeholder:`Model id`,onChange:e=>{P(e=>({...e,defaultModel:!0})),E(e.currentTarget.value)}}),(0,j.jsx)(`datalist`,{id:b,children:re.map(e=>(0,j.jsx)(`option`,{value:e.value,children:e.label},e.value))}),ae>0?(0,j.jsxs)(`small`,{children:[ae,` more cached models hidden from suggestions`]}):null]})]}),(0,j.jsxs)(`div`,{className:`settings-button-row`,children:[(0,j.jsxs)(`button`,{className:`settings-secondary`,disabled:V,children:[V?(0,j.jsx)(d,{size:14,className:`settings-spin`}):(0,j.jsx)(m,{size:14}),(0,j.jsx)(`span`,{children:V?`Saving`:`Save config`})]}),(0,j.jsxs)(`button`,{type:`button`,className:`settings-secondary`,disabled:G,onClick:()=>void l(r),children:[G?(0,j.jsx)(d,{size:14,className:`settings-spin`}):(0,j.jsx)(p,{size:14}),(0,j.jsx)(`span`,{children:G?`Refreshing`:`Refresh models`})]}),(0,j.jsxs)(`button`,{type:`button`,className:`settings-secondary`,disabled:W||!T.trim(),onClick:()=>void _(r,{baseUrl:C.trim()||void 0,modelId:T.trim()||void 0}),children:[W?(0,j.jsx)(d,{size:14,className:`settings-spin`}):(0,j.jsx)(O,{size:14}),(0,j.jsx)(`span`,{children:W?`Testing`:`Test`})]})]})]}),(0,j.jsx)(`div`,{className:`provider-card-form credential-form`,children:ee?ue():le()})]})}function ce({connection:e,onError:t,onPreferences:n,onProviders:r,preferences:i,providers:o}){let s=(0,A.useRef)(e);s.current=e;let[l,u]=(0,A.useState)(i.defaultChatProvider),[d,f]=(0,A.useState)(i.defaultChatModel),[p,m]=(0,A.useState)(!1),[h,g]=(0,A.useState)(null),[_,v]=(0,A.useState)(null);(0,A.useEffect)(()=>{u(i.defaultChatProvider),f(i.defaultChatModel)},[i.defaultChatProvider,i.defaultChatModel]);async function y(r){if(r.preventDefault(),e){m(!0),t(null);try{n(await S.savePreferences(e,{defaultChatProvider:l,defaultChatModel:a(l,d,o)}))}catch(e){t(e instanceof Error?e.message:String(e))}finally{m(!1)}}}function b(e){u(e),f(t=>a(e,t,o))}async function x(n,r,i){if(!e)return null;g(`${n}:${r}`),v(null),t(null);try{return await i()}catch(e){return t(e instanceof Error?e.message:String(e)),null}finally{g(null)}}async function C(t,n){await x(t,`config`,async()=>{let i=await S.saveProviderSettings(e,{providers:{[t]:n}});return r(i),i})}async function w(t,n){await x(t,`credential`,async()=>{let i=await S.saveProviderCredential(e,t,n);return r(i),i})}async function T(t){await x(t,`credential`,async()=>{let n=await S.deleteProviderCredential(e,t,{});return r(n),n})}async function E(t){return x(`openai`,`credential`,async()=>{let n=await S.startOpenAiSubscriptionAuth(e,{method:t});return n.method===`browser`?(window.open(n.url,`_blank`,`noopener,noreferrer`),v(`OpenAI ChatGPT login opened in your browser. Return here after authorization.`)):(window.open(n.url,`_blank`,`noopener,noreferrer`),v(`OpenAI device login started. Enter code ${n.userCode}.`)),D(n.expiresAt),n})}async function D(t){if(e)for(;Date.now()<t;){await new Promise(e=>setTimeout(e,2500));try{let t=await S.providerSettings(e);r(t);let n=t.statuses.openai?.credential;if(n?.connected&&n.source===`chatgpt_subscription`){v(`OpenAI ChatGPT subscription connected.`);return}}catch{}}}async function O(t){await x(t,`models`,async()=>{let n=await S.refreshProviderModels(e,t,{force:!0});return r(n.providers),n})}async function k(t){await x(t,`models`,async()=>{let n=await S.loadProviderModels(e,t,{limit:500});return r(n.providers),n})}async function j(t,n={}){await x(t,`validate`,async()=>{let i=await S.validateProviderCredential(e,t,n);return v(i.ok?`${t} validated${i.modelId?` with ${i.modelId}`:``}.`:i.errors.join(`
|
|
5
|
-
`)||`${t} validation failed.`),r(i.providers),i})}return{checkNativeProvider:async(t,n,i)=>{if(!e)throw Error(`Connect to the local OpenPond server first.`);n.throwIfAborted(),i&&await S.saveProviderSettings(e,{providers:{[t]:i}}),n.throwIfAborted();let a=await c(e,`/v1/providers/${t}/native-setup`,{method:`POST`,body:JSON.stringify({action:`check`}),signal:n});if(n.throwIfAborted(),s.current?.serverUrl!==e.serverUrl||s.current?.token!==e.token)throw new DOMException(`Connection changed`,`AbortError`);return r(a.settings),a},defaultModel:d,defaultProvider:l,providerBusy:h,saving:p,validationMessage:_,changeDefaultProvider:b,deleteProviderCredential:T,loadProviderModels:k,refreshProviderModels:O,saveProviderConfig:C,saveProviderCredential:w,saveProviders:y,setDefaultModel:f,startOpenAiSubscriptionAuth:E,validateProvider:j}}export{N as a,P as i,oe as n,k as o,ae as r,ce as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-CmkSm39S.js";var t=e(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-CmkSm39S.js";var t=e(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]);export{t};
|