openpond 0.2.73 → 0.2.75
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.js +1 -1
- package/dist/chunks/{acp-35QBGOMJ.js → acp-HGJMC75K.js} +1 -1
- package/dist/chunks/{acp-agent-4PKMX52I.js → acp-agent-CWV5NF6V.js} +1 -1
- package/dist/chunks/{app-layer-42ZKHTPN.js → app-layer-76YRQY7S.js} +1 -1
- package/dist/chunks/{app-server-evaluations-5JVNCET7.js → app-server-evaluations-PQDIMJJ7.js} +1 -1
- package/dist/chunks/{app-server-harness-services-4E236TXE.js → app-server-harness-services-5MB7CCCT.js} +1 -1
- package/dist/chunks/{app-server-runtime-CI2NTKX7.js → app-server-runtime-N3XZV35H.js} +1 -1
- package/dist/chunks/{apps-EGFRTFAJ.js → apps-DJQ2ZJKC.js} +1 -1
- package/dist/chunks/{chunk-QKGNAYSC.js → chunk-2HWSF4FS.js} +1 -1
- package/dist/chunks/{chunk-KQ7RFPG5.js → chunk-3SIZBCEO.js} +1 -1
- package/dist/chunks/{chunk-TP222CV2.js → chunk-5SBKDKGI.js} +1 -1
- package/dist/chunks/{chunk-U73T66FP.js → chunk-5VHHQZMT.js} +1 -1
- package/dist/chunks/{chunk-NDNSLCPE.js → chunk-5W2OJKJW.js} +1 -1
- package/dist/chunks/{chunk-XSDWRRZP.js → chunk-6EZHEVXS.js} +1 -1
- package/dist/chunks/{chunk-YIZE3M5S.js → chunk-7NLKMY7L.js} +1 -1
- package/dist/chunks/{chunk-MHSSPMLB.js → chunk-B7ELZHQN.js} +1 -1
- package/dist/chunks/{chunk-KE5PYRJ6.js → chunk-BZPNCSUY.js} +1 -1
- package/dist/chunks/{chunk-IXMY4EKS.js → chunk-CABXOJ3I.js} +1 -1
- package/dist/chunks/{chunk-E7SQBMYW.js → chunk-CBJ33EIB.js} +1 -1
- package/dist/chunks/{chunk-2IIVBBF5.js → chunk-CILYQK2G.js} +1 -1
- package/dist/chunks/{chunk-OBMMO5NC.js → chunk-CNVPZKJG.js} +3 -3
- package/dist/chunks/{chunk-4KG7GJ5O.js → chunk-CZ2JSEUK.js} +1 -1
- package/dist/chunks/{chunk-H5EHSILL.js → chunk-D2PEB6AJ.js} +1 -1
- package/dist/chunks/{chunk-FRQYH4QD.js → chunk-DAWHZU7L.js} +1 -1
- package/dist/chunks/{chunk-WOYBWRRV.js → chunk-DVBZBJSK.js} +1 -1
- package/dist/chunks/{chunk-MXDSB2C5.js → chunk-EOQTBH4U.js} +1 -1
- package/dist/chunks/{chunk-P7RLDDPN.js → chunk-FPW3RFZR.js} +1 -1
- package/dist/chunks/{chunk-WAWVFSIQ.js → chunk-FWYJ3MIN.js} +1 -1
- package/dist/chunks/{chunk-5VQK3CCJ.js → chunk-FXLLAAGI.js} +1 -1
- package/dist/chunks/{chunk-ODH5XGE6.js → chunk-HCQTAFTX.js} +1 -1
- package/dist/chunks/{chunk-FCC24XUI.js → chunk-HHLQG7PN.js} +1 -1
- package/dist/chunks/{chunk-TRXOE7TT.js → chunk-HRJ4EPR3.js} +1 -1
- package/dist/chunks/{chunk-O6L4NO3M.js → chunk-HYYQCBX5.js} +1 -1
- package/dist/chunks/{chunk-OFC5N6R3.js → chunk-IPH4LGK2.js} +6 -6
- package/dist/chunks/{chunk-3XNUG4FO.js → chunk-JBIAEQHI.js} +1 -1
- package/dist/chunks/{chunk-XN5BXPAT.js → chunk-JQDZYC72.js} +1 -1
- package/dist/chunks/{chunk-3BIB6KKL.js → chunk-JRW6MFV6.js} +1 -1
- package/dist/chunks/{chunk-EAW5FHU4.js → chunk-JSJB3PR2.js} +2 -2
- package/dist/chunks/{chunk-O4YHISU2.js → chunk-KAW26NGC.js} +1 -1
- package/dist/chunks/{chunk-HIPKU57Y.js → chunk-LK7TJYEP.js} +1 -1
- package/dist/chunks/{chunk-2IECLXB2.js → chunk-LRGMGXL2.js} +1 -1
- package/dist/chunks/{chunk-G2P2PYEO.js → chunk-NACSY3HS.js} +1 -1
- package/dist/chunks/{chunk-E5HDJCKK.js → chunk-NGTNI3YX.js} +1 -1
- package/dist/chunks/{chunk-ONR2AKRI.js → chunk-O5FYAVDK.js} +4 -4
- package/dist/chunks/{chunk-LWF5MQJ4.js → chunk-OJEIYU7D.js} +1 -1
- package/dist/chunks/{chunk-AWUSAHXG.js → chunk-OOSF2SPF.js} +1 -1
- package/dist/chunks/{chunk-JG6JA7YT.js → chunk-P4SXDU55.js} +1 -1
- package/dist/chunks/{chunk-DUR32LJG.js → chunk-PQGR2MTX.js} +1 -1
- package/dist/chunks/{chunk-6IKIGVJF.js → chunk-QSITPC3X.js} +1 -1
- package/dist/chunks/chunk-RGSMU6N4.js +2 -0
- package/dist/chunks/{chunk-CBD554GZ.js → chunk-RORT6K3Y.js} +1 -1
- package/dist/chunks/{chunk-OXUS4QOT.js → chunk-SFLL3TKE.js} +1 -1
- package/dist/chunks/chunk-SYFJVLEL.js +2 -0
- package/dist/chunks/{chunk-6KKWSUEW.js → chunk-THLBUON5.js} +1 -1
- package/dist/chunks/{chunk-X4CN3FIN.js → chunk-VU6S2S3O.js} +1 -1
- package/dist/chunks/{chunk-H2YQ4AA2.js → chunk-W5FL7EH2.js} +1 -1
- package/dist/chunks/{chunk-WBV6A6NS.js → chunk-WHI4XNBI.js} +1 -1
- package/dist/chunks/{chunk-FA3GXQYA.js → chunk-WOA6XFQU.js} +1 -1
- package/dist/chunks/{chunk-SUILNZQJ.js → chunk-WOER246B.js} +1 -1
- package/dist/chunks/{chunk-645T6LH7.js → chunk-XJP7RIHL.js} +1 -1
- package/dist/chunks/{chunk-KOLVSUOS.js → chunk-Z3OW37CO.js} +1 -1
- package/dist/chunks/{chunk-OUOOKEU3.js → chunk-ZACCHQWK.js} +1 -1
- package/dist/chunks/{chunk-3V2XAYYA.js → chunk-ZKH4Z3EQ.js} +1 -1
- package/dist/chunks/{chunk-OXRN2257.js → chunk-ZLYQR44C.js} +1 -1
- package/dist/chunks/chunk-ZQOJLPWD.js +2 -0
- package/dist/chunks/{chunk-EZ435RGA.js → chunk-ZYJHMX4T.js} +1 -1
- package/dist/chunks/{cli-NHRYN2G3.js → cli-B6JFFXMI.js} +1 -1
- package/dist/chunks/{command-54MMVWS2.js → command-GZ3Z37WJ.js} +3 -3
- package/dist/chunks/{configuration-command-XMXTU2FQ.js → configuration-command-OHW7RPSC.js} +1 -1
- package/dist/chunks/{connected-app-executor-WJEDXUA4.js → connected-app-executor-P35Y6B5Y.js} +1 -1
- package/dist/chunks/{connected-evidence-NFQPO5E3.js → connected-evidence-I4I7DQRX.js} +1 -1
- package/dist/chunks/{connected-starting-assets-M54PSOEP.js → connected-starting-assets-Q7CYZT25.js} +1 -1
- package/dist/chunks/{continual-C2YWPEJZ.js → continual-3OIKJ3PG.js} +1 -1
- package/dist/chunks/{core-commands-SY4I5FHE.js → core-commands-BWDKP6AI.js} +1 -1
- package/dist/chunks/{dataset-preparation-authoring-CH6Z4NE6.js → dataset-preparation-authoring-RPYFOFBV.js} +1 -1
- package/dist/chunks/{datasets-2OQDMF7E.js → datasets-2W4JPKSP.js} +1 -1
- package/dist/chunks/{desktop-test-VNMR5H4I.js → desktop-test-EUBEZJDU.js} +1 -1
- package/dist/chunks/{evaluation-coordination-GULGPATI.js → evaluation-coordination-IYNDZB6X.js} +1 -1
- package/dist/chunks/{experiment-improvements-XNXTU6ZA.js → experiment-improvements-D3DHZ7QI.js} +1 -1
- package/dist/chunks/{experiments-DZX6ZU6F.js → experiments-7OXSDLJG.js} +1 -1
- package/dist/chunks/{experiments-signal-QDVPO3M5.js → experiments-signal-6SWD3TSR.js} +1 -1
- package/dist/chunks/{help-UCN67FN7.js → help-XVZ4RRAB.js} +1 -1
- package/dist/chunks/{host-profile-evaluation-tools-XMGGHVH3.js → host-profile-evaluation-tools-I7ESCZH7.js} +1 -1
- package/dist/chunks/{host-profile-external-dataset-C6ZPMTX6.js → host-profile-external-dataset-MD4X7BCL.js} +1 -1
- package/dist/chunks/{hosted-app-server-composition-U7WGMN5B.js → hosted-app-server-composition-PYKNSE3O.js} +1 -1
- package/dist/chunks/{hosted-experiment-improvement-VQN6PJKR.js → hosted-experiment-improvement-5L3Z7IV6.js} +1 -1
- package/dist/chunks/{hosted-harness-runtime-O6E5LCGN.js → hosted-harness-runtime-XDCLEP3C.js} +1 -1
- package/dist/chunks/{hosted-profile-candidate-HQ544PNP.js → hosted-profile-candidate-6Q3GOLII.js} +1 -1
- package/dist/chunks/{hosted-profile-compiler-K4OACT7S.js → hosted-profile-compiler-FYBOGHZF.js} +1 -1
- package/dist/chunks/{hosted-profile-evaluation-control-TKYM73YY.js → hosted-profile-evaluation-control-MXXZR6XA.js} +1 -1
- package/dist/chunks/{hosted-profile-evaluation-inspection-HFCFUYQ4.js → hosted-profile-evaluation-inspection-4J7LAVY2.js} +1 -1
- package/dist/chunks/{hosted-profile-evaluation-preparation-OJ6AR5P5.js → hosted-profile-evaluation-preparation-EF43QUMG.js} +1 -1
- package/dist/chunks/{human-review-DNVIVJRK.js → human-review-6WAUW3BG.js} +1 -1
- package/dist/chunks/{import-QT5AKEA3.js → import-333V3CGC.js} +1 -1
- package/dist/chunks/{local-harness-improvement-runtime-BWZBMOGL.js → local-harness-improvement-runtime-HC42DG74.js} +1 -1
- package/dist/chunks/{local-harness-taskset-review-JL2XNXML.js → local-harness-taskset-review-CUL73U4A.js} +1 -1
- package/dist/chunks/{opchat-7PWUXQSY.js → opchat-R7FBOSCD.js} +1 -1
- package/dist/chunks/{opchat-bounded-chat-B3GOCGWY.js → opchat-bounded-chat-IOV6FYBH.js} +1 -1
- package/dist/chunks/{organizations-TWBMN7KF.js → organizations-EG5BSG26.js} +1 -1
- package/dist/chunks/{profile-RVARQYG4.js → profile-VLGYQXEP.js} +1 -1
- package/dist/chunks/{project-action-payload-65MTQMQW.js → project-action-payload-5PL65D3W.js} +1 -1
- package/dist/chunks/{project-agent-ZC33YRZE.js → project-agent-XT47W7MT.js} +1 -1
- package/dist/chunks/{published-experiment-source-L7BER6AE.js → published-experiment-source-7TDPGSOJ.js} +1 -1
- package/dist/chunks/{refiner-profile-service-56776J7B.js → refiner-profile-service-4RRRB33P.js} +1 -1
- package/dist/chunks/{runtime-GN2H2R7L.js → runtime-K3BUZ3ZQ.js} +1 -1
- package/dist/chunks/{sandbox-command-HWIAH6JA.js → sandbox-command-D7T2GKQA.js} +1 -1
- package/dist/chunks/{sandbox-template-MNZ6OXQQ.js → sandbox-template-WTIQRKE6.js} +1 -1
- package/dist/chunks/{saved-work-OMBDT3ZR.js → saved-work-GQEYG77G.js} +1 -1
- package/dist/chunks/{setup-C6673TJK.js → setup-5MZKOZY2.js} +1 -1
- package/dist/chunks/{src-UHNSXT34.js → src-PEOADF2P.js} +2 -2
- package/dist/chunks/{src-HHFJIPL5.js → src-ZUOZOCQ2.js} +1 -1
- package/dist/chunks/{standalone-experiment-turn-owner-UYPA6XHW.js → standalone-experiment-turn-owner-N7PEBGW3.js} +1 -1
- package/dist/chunks/{store-chat-resources-TYR7D2UP.js → store-chat-resources-7JEZFCC2.js} +1 -1
- package/dist/chunks/{store-continual-support-reviews-63YCKG3P.js → store-continual-support-reviews-RJ5OQZTC.js} +1 -1
- package/dist/chunks/{store-conversation-serving-PDSBGL3E.js → store-conversation-serving-D3HJ5OZK.js} +1 -1
- package/dist/chunks/{store-create-improve-RYASTT56.js → store-create-improve-ERPWR2LH.js} +1 -1
- package/dist/chunks/{store-datasets-PELTRO4A.js → store-datasets-R6P5KBAH.js} +1 -1
- package/dist/chunks/{store-evaluation-results-OUTNEMAY.js → store-evaluation-results-ZCABU3X5.js} +1 -1
- package/dist/chunks/{store-human-review-GIMAXCJQ.js → store-human-review-2PHLILEI.js} +1 -1
- package/dist/chunks/{store-learned-preference-migration-validation-DHOSHA6C.js → store-learned-preference-migration-validation-OGFFAM3Q.js} +1 -1
- package/dist/chunks/{store-local-experiments-AH4Z6RWX.js → store-local-experiments-ZG4NWB63.js} +1 -1
- package/dist/chunks/{store-model-batch-review-UUW6ZLDH.js → store-model-batch-review-LQAM7FQJ.js} +1 -1
- package/dist/chunks/{store-model-configuration-4U5A6DU7.js → store-model-configuration-3S74O2IQ.js} +1 -1
- package/dist/chunks/{store-model-project-preparation-MYHO43VH.js → store-model-project-preparation-ARDV4U77.js} +1 -1
- package/dist/chunks/{store-modification-recordings-OZBLFYCT.js → store-modification-recordings-BHJTHW3A.js} +1 -1
- package/dist/chunks/{store-task-inbox-M7YZNCRF.js → store-task-inbox-YRN2UDW3.js} +1 -1
- package/dist/chunks/{store-task-inventory-TTJQAM3T.js → store-task-inventory-6V4UX5BY.js} +1 -1
- package/dist/chunks/{store-taskset-drafts-4GVHDLJJ.js → store-taskset-drafts-H2O4CRIF.js} +1 -1
- package/dist/chunks/{store-training-MGGTGTV2.js → store-training-MQGXXKTX.js} +1 -1
- package/dist/chunks/{store-training-jobs-XKDUX4SV.js → store-training-jobs-YASPKBB3.js} +1 -1
- package/dist/chunks/{store-training-models-4S4ZT3BL.js → store-training-models-HAJCN3IS.js} +1 -1
- package/dist/chunks/{taskset-SLQSCYJI.js → taskset-65BR2KOE.js} +1 -1
- package/dist/chunks/{teams-bot-7U6JOV6T.js → teams-bot-VMG23AFI.js} +1 -1
- package/dist/chunks/{tool-learning-25Z2JOBS.js → tool-learning-YSYQEASN.js} +1 -1
- package/dist/chunks/training-5V53RWI7.js +2 -0
- package/dist/chunks/training-U6OPNRP4.js +2 -0
- package/dist/chunks/{training-2LUQ2IZM.js → training-YUWQXGJX.js} +1 -1
- package/dist/chunks/{training-hosted-NLXMISNL.js → training-hosted-KO4SCSLZ.js} +1 -1
- package/dist/chunks/{training-hosted-alphaedit-WGMJ3L2D.js → training-hosted-alphaedit-HQTKGEZU.js} +1 -1
- package/dist/chunks/{training-hosted-decision-66EUMUIW.js → training-hosted-decision-LN7MQGBF.js} +1 -1
- package/dist/chunks/{training-hosted-engram-QDXSJ77I.js → training-hosted-engram-7UAVQFBA.js} +1 -1
- package/dist/chunks/{training-hosted-modification-comparison-2MH5FZMZ.js → training-hosted-modification-comparison-ZOYOSVHI.js} +1 -1
- package/dist/chunks/{training-hosted-neuron-training-3QXKIEKT.js → training-hosted-neuron-training-37Y6WJH5.js} +1 -1
- package/dist/chunks/{training-hosted-serving-report-ZG75ACZK.js → training-hosted-serving-report-EXJ5X7GB.js} +1 -1
- package/dist/chunks/{training-hosted-steering-KFMTKCTX.js → training-hosted-steering-EAFICV6I.js} +1 -1
- package/dist/chunks/{training-model-start-NMQ55UHZ.js → training-model-start-5QB7A5TD.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/skills/manifest.json +1 -1
- package/dist/web/assets/{App-CV1p0_Zy.js → App-CqqK4NLa.js} +4 -4
- package/dist/web/assets/{AppDialog-DdGt7aU1.js → AppDialog-wmL4BlOJ.js} +1 -1
- package/dist/web/assets/AppTerminalPanel-BHFgtq4f.js +2 -0
- package/dist/web/assets/{AppToastContext-D7z0w1PS.js → AppToastContext-DyaZYQXu.js} +1 -1
- package/dist/web/assets/{AppsView-B-Ts-M_V.js → AppsView-C6u5q5ro.js} +1 -1
- package/dist/web/assets/{AttachmentTypeIcon-BJ5i12im.js → AttachmentTypeIcon-AqiS2gzg.js} +1 -1
- package/dist/web/assets/{BrowserSidebar-BVHthjXU.js → BrowserSidebar-nNTQ1E4K.js} +1 -1
- package/dist/web/assets/{CartesianChart-BuJ1wFS7.js → CartesianChart-C5ptcXRG.js} +1 -1
- package/dist/web/assets/{ChatTimelineEntry-CfiiTrK4.js → ChatTimelineEntry-DH0-itET.js} +1 -1
- package/dist/web/assets/{CollaborationTabs-1t9zAhDC.js → CollaborationTabs-C22BMWJ4.js} +1 -1
- package/dist/web/assets/{CommandMenu-DTB6xjGG.js → CommandMenu-CKtBVjuO.js} +1 -1
- package/dist/web/assets/{CommunityView-BjeZ56id.js → CommunityView-Baq8HqVm.js} +1 -1
- package/dist/web/assets/{ComposerAttachments-C_K_05H9.js → ComposerAttachments-BOyEXVhV.js} +1 -1
- package/dist/web/assets/{ComposerCreateImproveStrip-A38jnNGd.js → ComposerCreateImproveStrip-EbNwu1gE.js} +1 -1
- package/dist/web/assets/{ConversationImportsSettings-jwaoKQZt.js → ConversationImportsSettings-Cqg66Lcb.js} +1 -1
- package/dist/web/assets/{DatasetReviewImport-DZA1s3XG.js → DatasetReviewImport--FgZ3Zk-.js} +1 -1
- package/dist/web/assets/{ExperimentTrainingDataWorkspace-DowPuAXk.js → ExperimentTrainingDataWorkspace-B04Cg7Hc.js} +2 -2
- package/dist/web/assets/{FilePagePreview-11ZNRtdT.js → FilePagePreview-CeZF-oOW.js} +2 -2
- package/dist/web/assets/{GetStartedView-bLVKmjqg.js → GetStartedView-DOpCgmrC.js} +1 -1
- package/dist/web/assets/{GettingStartedDialog-BeimFLZh.js → GettingStartedDialog-tB38Q6JA.js} +1 -1
- package/dist/web/assets/{HostedModelLearningReview-DiFVb3WK.js → HostedModelLearningReview-CQ0bI6Np.js} +1 -1
- package/dist/web/assets/{HostedModelLearningSettings-DtUF5ejq.js → HostedModelLearningSettings-DEdV2dXx.js} +1 -1
- package/dist/web/assets/{HtmlVisual-CgVTWr64.js → HtmlVisual-krrlNGFX.js} +1 -1
- package/dist/web/assets/{LabModelVersionDetailPage-BvinwnBN.js → LabModelVersionDetailPage-DeVfdS7p.js} +1 -1
- package/dist/web/assets/{LabModelWorkspace-Q5DG2mLP.js → LabModelWorkspace-Di_yTjzH.js} +1 -1
- package/dist/web/assets/{LabSkillSidebar-cmhZzr4f.js → LabSkillSidebar-CNjUmnfC.js} +1 -1
- package/dist/web/assets/{LabsRoute-DS_mlprv.js → LabsRoute-Gznx60Cp.js} +4 -4
- package/dist/web/assets/{LearningBatchesPage-Cm-btgWc.js → LearningBatchesPage-CpZ0UTX3.js} +1 -1
- package/dist/web/assets/{MainChatThread-DbTn4Bag.js → MainChatThread-Dr2DipCD.js} +2 -2
- package/dist/web/assets/{MainPane-BtzUF6O_.js → MainPane-aEELnEKb.js} +7 -7
- package/dist/web/assets/{ModelProjectPageHeader-C4mgVJGx.js → ModelProjectPageHeader-BVwW-R0w.js} +1 -1
- package/dist/web/assets/{NativeSetupTerminal-bJpDkKk1.js → NativeSetupTerminal-BXvrxj-m.js} +2 -2
- package/dist/web/assets/{NativeSkillSidebar-BuToZvK-.js → NativeSkillSidebar-CYsBopsX.js} +1 -1
- package/dist/web/assets/{NewProjectDialog-F0BPQy0S.js → NewProjectDialog-BR5DChE9.js} +1 -1
- package/dist/web/assets/{OutputsPage-DC4g59_8.js → OutputsPage-CR8pWUj0.js} +1 -1
- package/dist/web/assets/{PageChrome-ufq2jePD.js → PageChrome-BXMG877B.js} +1 -1
- package/dist/web/assets/{ProjectsPage-7mbOvMfO.js → ProjectsPage-CwCes2kZ.js} +1 -1
- package/dist/web/assets/{RightChatPanelStack-sR9xN3RP.js → RightChatPanelStack-BvApbQCc.js} +1 -1
- package/dist/web/assets/RightSidebarHomePanel-Dm6hhkKw.js +1 -0
- package/dist/web/assets/{ScheduledWorkPage-s9CN6nR_.js → ScheduledWorkPage-nJJH1fwV.js} +1 -1
- package/dist/web/assets/{SettingsView-CZNWYK-D.js → SettingsView-CBZ6rqak.js} +3 -3
- package/dist/web/assets/{TasksetDraftEditorPrimitives-BnMqzE-T.js → TasksetDraftEditorPrimitives-Bcw6T4Lf.js} +1 -1
- package/dist/web/assets/{TeamChatView-XthM6n4S.js → TeamChatView-CIwlZFqB.js} +1 -1
- package/dist/web/assets/{TerminalOverlay--HCFZaQW.js → TerminalOverlay-Dhgy0NC3.js} +1 -1
- package/dist/web/assets/{TrainingCreationPanel-D2F6kPg_.js → TrainingCreationPanel-yLiEL2tM.js} +1 -1
- package/dist/web/assets/{TrainingDraftPanel-BurWPp9F.js → TrainingDraftPanel-Dng3C-zU.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-D7jdscDm.js → UsageSettingsSection-CTa7T7tS.js} +1 -1
- package/dist/web/assets/WorkSidebarPanel-BEIDC3vx.js +1 -0
- package/dist/web/assets/{WorkspaceDiffPanel-CPaCC1_p.js → WorkspaceDiffPanel-DnZlUEbx.js} +3 -3
- package/dist/web/assets/{WorkspaceEnvironmentMenu-BZxu6mUS.js → WorkspaceEnvironmentMenu-D-w36AYB.js} +1 -1
- package/dist/web/assets/{WorkspaceFileLocation-C4K_D_yh.js → WorkspaceFileLocation-D2kiU_FJ.js} +1 -1
- package/dist/web/assets/{WorkspaceGitDialogs-C0Yf29V0.js → WorkspaceGitDialogs-CylEGfzD.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-BRPLaFZS.js → WorkspaceMonacoEditor-ChBjvgxE.js} +3 -3
- package/dist/web/assets/{WorkspacePdfPreview-9wypyV6H.js → WorkspacePdfPreview-CBS6GjeP.js} +2 -2
- package/dist/web/assets/{WorkspacePresentationPreview-C-Cn-9pj.js → WorkspacePresentationPreview-DhltPUL4.js} +1 -1
- package/dist/web/assets/{bot-BuaAVlz6.js → bot-C0e4zzW4.js} +1 -1
- package/dist/web/assets/{chat-resources-DMPHClhQ.js → chat-resources-BFT0vtdv.js} +1 -1
- package/dist/web/assets/chevron-down-C4LIbeSz.js +1 -0
- package/dist/web/assets/chevron-right-BKelERU6.js +1 -0
- package/dist/web/assets/chevron-up-Dj1vY1ME.js +1 -0
- package/dist/web/assets/{chunk-C3TS766N-BXUEjt7d.js → chunk-C3TS766N-bHAuW3qR.js} +1 -1
- package/dist/web/assets/chunk-GS5HEE4M-DTj6NX5d.js +1 -0
- package/dist/web/assets/{client-C-ZuakZR.js → client-BO8YuI8Z.js} +1 -1
- package/dist/web/assets/{client-choice-storage-DWIA0Vou.js → client-choice-storage-D_6dVX8O.js} +1 -1
- package/dist/web/assets/{cloud-upload-B5LqiNCG.js → cloud-upload-U0f9MSd8.js} +1 -1
- package/dist/web/assets/{copy-BYIypHbq.js → copy-B0gWkglr.js} +1 -1
- package/dist/web/assets/{cssMode-ByypIqUN.js → cssMode-BkR1YcfF.js} +1 -1
- package/dist/web/assets/{dataset-workspaces-BTPi71mz.js → dataset-workspaces-DM2zGcAK.js} +1 -1
- package/dist/web/assets/{external-link-Cv7TDVPT.js → external-link-DymjzX8a.js} +1 -1
- package/dist/web/assets/{folder-open-DlIP3g5o.js → folder-open-BPA5YifJ.js} +1 -1
- package/dist/web/assets/{folder-plus-CXwFJqcY.js → folder-plus-BCcE8Q4i.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-DMh_-WxU.js → git-commit-horizontal-DbTJXbet.js} +1 -1
- package/dist/web/assets/{htmlMode-CQGeb-h5.js → htmlMode-z1rCf6pX.js} +1 -1
- package/dist/web/assets/{icons-CYvTltSH.js → icons-nr5d1kC-.js} +1 -1
- package/dist/web/assets/{image-Ci1JxTQX.js → image-Us0M7Xxi.js} +1 -1
- package/dist/web/assets/{index-CDtTBysF.js → index-DG0kf1wK.js} +2 -2
- package/dist/web/assets/{info-EjyMkVzV.js → info-M5kOSB9T.js} +1 -1
- package/dist/web/assets/{jsonMode-Dm6YK6Dw.js → jsonMode-AMfP-lcX.js} +1 -1
- package/dist/web/assets/loader-circle-C1-u7BUs.js +1 -0
- package/dist/web/assets/{lspLanguageFeatures-BjtOz-Ln.js → lspLanguageFeatures-C6uY6TKM.js} +1 -1
- package/dist/web/assets/{maximize-2-CvvoALtI.js → maximize-2-B2pi1o5S.js} +1 -1
- package/dist/web/assets/{message-square-CPtIPRtf.js → message-square-CPvsC3Wv.js} +1 -1
- package/dist/web/assets/{monaco.contribution-ClH8Tmjq.js → monaco.contribution-5F6IVWCS.js} +2 -2
- package/dist/web/assets/{monaco.contribution-wpC0-Kxw.js → monaco.contribution-BUi28toA.js} +2 -2
- package/dist/web/assets/{monaco.contribution-VSFFgrfZ.js → monaco.contribution-CfQvs13S.js} +2 -2
- package/dist/web/assets/{monaco.contribution-e5DNaEix.js → monaco.contribution-DySvt1jU.js} +2 -2
- package/dist/web/assets/{monitor-BroZpIvk.js → monitor-1YJYctCB.js} +1 -1
- package/dist/web/assets/{paperclip-DYZEL_Gi.js → paperclip-CNTReC0m.js} +1 -1
- package/dist/web/assets/{pdf-DkU37Bi0.js → pdf-DaNAfjLW.js} +1 -1
- package/dist/web/assets/play-DF5h_-8T.js +1 -0
- package/dist/web/assets/plus-D6oFNFQ0.js +1 -0
- package/dist/web/assets/{presentation-CddfsTzp.js → presentation-DbkiE2BE.js} +1 -1
- package/dist/web/assets/{python-CMdyfF2B.js → python-CDlD-992.js} +1 -1
- package/dist/web/assets/{refresh-cw-Cx_7Zlbl.js → refresh-cw-avBifyns.js} +1 -1
- package/dist/web/assets/{save-BaeHeBBw.js → save-DBayPmp_.js} +1 -1
- package/dist/web/assets/{settings-lists-CVg9h-5z.js → settings-lists-Cca729es.js} +1 -1
- package/dist/web/assets/square-CJccmW-i.js +1 -0
- package/dist/web/assets/{square-terminal-CBlQtWQw.js → square-terminal-D7snuW2g.js} +1 -1
- package/dist/web/assets/{submit-issue-command-L5--gt9i.js → submit-issue-command-wDL6xK3b.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-hftC_Rxs.js → toggleHighContrast-CP0qM8JR.js} +1 -1
- package/dist/web/assets/training-KYW8yE6p.js +1 -0
- package/dist/web/assets/{training-model-data-vvvphDlO.js → training-model-data-CilS0W2N.js} +1 -1
- package/dist/web/assets/{tsMode-B0sZU1HD.js → tsMode-DxR6CkQb.js} +1 -1
- package/dist/web/assets/{upload-Bzt1ooBz.js → upload-DEtkeTGw.js} +1 -1
- package/dist/web/assets/{useAccountSettings-BnxwetkP.js → useAccountSettings-BTy8zF0n.js} +1 -1
- package/dist/web/assets/{useAgentInventory-D_qS4ols.js → useAgentInventory-8MWE3pbH.js} +1 -1
- package/dist/web/assets/{useChatContextSelection-D8aSVtCm.js → useChatContextSelection-CBVI5IYj.js} +1 -1
- package/dist/web/assets/{useLocalAgentSchedules-CUQ1MW4l.js → useLocalAgentSchedules-B09iSkPy.js} +1 -1
- package/dist/web/assets/{useQuery-9SCnxwmR.js → useQuery-CKHqHSr0.js} +1 -1
- package/dist/web/assets/{wifi-off-DWtVm7W7.js → wifi-off-C-GF_rPd.js} +1 -1
- package/dist/web/assets/{workers-B3jA6AOv.js → workers-CmqH-dTr.js} +1 -1
- package/dist/web/assets/x-CQ0pGF6Q.js +1 -0
- package/dist/web/assets/{yaml-BEUL30-5.js → yaml-J_HdACeF.js} +1 -1
- package/dist/web/index.html +1 -1
- package/docs/command-reference.md +1 -0
- package/package.json +1 -1
- package/dist/chunks/chunk-5AV2EWFX.js +0 -2
- package/dist/chunks/chunk-64EDQ7UV.js +0 -2
- package/dist/chunks/chunk-DLOJG7LP.js +0 -2
- package/dist/chunks/training-JA5ZQABE.js +0 -2
- package/dist/chunks/training-NL5GYZKU.js +0 -2
- package/dist/web/assets/AppTerminalPanel-B2p_tYh5.js +0 -2
- package/dist/web/assets/RightSidebarHomePanel-joZavyR9.js +0 -1
- package/dist/web/assets/WorkSidebarPanel-CmdXCmrZ.js +0 -1
- package/dist/web/assets/chevron-down-CkifKd_O.js +0 -1
- package/dist/web/assets/chevron-right-LsMXJ5SB.js +0 -1
- package/dist/web/assets/chevron-up-Dt5T2Sf5.js +0 -1
- package/dist/web/assets/chunk-GS5HEE4M-C0RLeIsy.js +0 -1
- package/dist/web/assets/loader-circle-AjP2mDJA.js +0 -1
- package/dist/web/assets/play-BrvX67t1.js +0 -1
- package/dist/web/assets/plus-DFjCZeRE.js +0 -1
- package/dist/web/assets/square-Di5JBnVr.js +0 -1
- package/dist/web/assets/training-CGYukv2L.js +0 -1
- package/dist/web/assets/x-EG07vYCF.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{f as t,g as n,h as r,m as i}from"./index-CDtTBysF.js";import{n as a}from"./api-client-DJRVOFzS.js";import{t as o}from"./icons-CYvTltSH.js";import{t as s}from"./copy-BYIypHbq.js";import{t as c}from"./x-EG07vYCF.js";import{Gt as l,O as u,Tn as d,b as f,dn as p,dr as m,gn as h,k as g,x as _}from"./App-CV1p0_Zy.js";var v=o(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),y=o(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),b=o(`clipboard`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}]]),x=o(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),S=o(`file`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]),C=o(`minimize-2`,[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]),ee=o(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),te=o(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),ne=o(`workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),re=o(`text-wrap`,[[`path`,{d:`m16 16-3 3 3 3`,key:`117b85`}],[`path`,{d:`M3 12h14.5a1 1 0 0 1 0 7H13`,key:`18xa6z`}],[`path`,{d:`M3 19h6`,key:`1ygdsz`}],[`path`,{d:`M3 5h18`,key:`1u36vt`}]]),w=e(n(),1);async function ie(e){if(!e)return!1;try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch(e){console.warn(`Clipboard write failed`,e)}try{let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.style.position=`fixed`,t.style.left=`-1000px`,t.style.top=`-1000px`,document.body.appendChild(t),t.select();let n=document.execCommand(`copy`);return t.remove(),n}catch(e){return console.warn(`Clipboard fallback failed`,e),!1}}var ae=e=>/\.html?(?:[?#].*)?$/i.test(e);async function oe(e,t,n,r=`local`){return(await a(e,`/v1/${r===`sandbox`?`sandboxes`:`workspaces`}/${encodeURIComponent(t)}/html-preview`,{method:`POST`,body:JSON.stringify({path:n})})).url}async function se(e,t,n){return(await a(e,`/v1/html-previews`,{method:`POST`,body:JSON.stringify({name:t,content:n})})).url}var ce=new Set(`bash.c.cc.cjs.cpp.css.csv.docx.env.gif.go.graphql.h.hpp.html.htm.ico.java.jpeg.jpg.js.json.jsx.lock.lockb.md.mdx.m4v.mjs.mov.mp4.pdf.pptx.png.py.rs.scss.sh.sql.svg.toml.ts.tsx.txt.xlsx.webp.webm.yaml.yml.zsh`.split(`.`)),le=new Set([`AGENTS.md`,`Dockerfile`,`LICENSE`,`Makefile`,`README`]),ue=String.raw`[A-Za-z0-9_.@+-]+`,de=new RegExp(String.raw`^(?:(?:\.{1,2}|~)?[\\/]|[A-Za-z]:[\\/])?(?:${ue}[\\/])+${ue}(?::\d+(?::\d+)?)?`),fe=new RegExp(String.raw`^${ue}(?::\d+(?::\d+)?)?`),pe=/^(?:workspace|sandbox):file:[^\s<>()]+/;function me({projectTargetDetail:e,projectTargetValue:t,workspaceRepoPath:n,workspaceTargetValue:r}){return n?.trim()||(r!==`local`||!t.startsWith(`local:`)?null:e.trim()||null)}function he(e,t,n={}){if(!xe(e[t-1]))return null;let r=e.slice(t),i=pe.exec(r),a=i?null:de.exec(r),o=i||a?null:fe.exec(r),s=Se((i??a??o)?.[0]??``);if(!s)return null;let c=ge(s,n);return c?{...c,end:t+s.length}:null}function ge(e,t={}){let n=Se(e.trim().replace(/^['"`]+|['"`]+$/g,``));if(!n||/^https?:\/\//i.test(n))return null;let r=ve(_e(n),t.href).replace(/:\d+(?::\d+)?$/,``);return be(r.replace(/(\.html?)[?#].*$/i,`$1`),t.href)?{displayPath:n,path:ye(t.fileBasePath&&!/^(?:workspace|sandbox):file:/i.test(n)&&!/^(?:[~/\\]|[A-Za-z]:|(?:workspace|sandbox):file:)/.test(r)?`${t.fileBasePath.replace(/[\\/]+$/,``)}/${r.replace(/^\.\//,``)}`:r)}:null}function _e(e){let t=/^(workspace|sandbox):file:(.*)$/i.exec(e);if(!t)return e;let n=t[1]?.toLowerCase(),r=t[2]??``;return n===`sandbox`&&(r=r.replace(/^\/workspace\/app\//,``).replace(/^\/workspace\//,``)),r}function ve(e,t=!1){if(!/^file:\/\//i.test(e)){if(t)try{return decodeURIComponent(e)}catch{}return e}try{let t=new URL(e);return decodeURIComponent(t.pathname)+(/\.html?$/i.test(t.pathname)?t.search+t.hash:``)}catch{return e.replace(/^file:\/\//i,``)}}function ye(e){return e.replace(/\\/g,`/`).replace(/^\.\/+/,``)}function be(e,t=!1){if(/[\n\r]/.test(e)||!t&&/^[^/\\]*\s/.test(e)||/[=;?<>|]/.test(e))return!1;if(/[\\/]$/.test(e)&&/[^.~/\\]/.test(e))return!0;let n=e.replace(/\\/g,`/`).split(`/`).filter(Boolean).at(-1)??e;if(le.has(n)||/^\.[A-Za-z_]/.test(n))return!0;let r=n.includes(`.`)?n.split(`.`).at(-1)?.toLowerCase():null;return!!(r&&ce.has(r))}function xe(e){return!e||/[\s([{<"'`]/.test(e)}function Se(e){return e.replace(/[.,;!?]+$/,``).replace(/[\])}]+$/,``)}function Ce(e){return/^(?:#{1,6}\s*)?(?:\*\*)?(?:(?:the|both|all)\s+)?(?:updated\s+)?(?:files|outputs|deliverables|everything|slide\s+and\s+deck)(?:\*\*)?\s*(?:(?:is|are)\s+)?(?:\(\s*)?(?:in|at|under|:)\s*`((?:~[\/]|[\/]|[A-Za-z]:[\/])[^`\n]+[\/])`/i.exec(e.trim())?.[1]??null}function we(e,t,n){let[r,i]=(0,w.useState)({key:t,url:null,status:`loading`}),a=(0,w.useRef)(null);(0,w.useEffect)(()=>{if(!e||!t)return;_.activateConnection(e);let r=_.watch(t,n,e=>i({...e,key:t}));a.current=r;let o=()=>{document.visibilityState!==`hidden`&&r.refresh()};return window.addEventListener(`focus`,o),window.addEventListener(`openpond-runtime-connected`,o),document.addEventListener(`visibilitychange`,o),()=>{r.close(),a.current=null,window.removeEventListener(`focus`,o),window.removeEventListener(`openpond-runtime-connected`,o),document.removeEventListener(`visibilitychange`,o)}},[e,t,n]);let o=(0,w.useCallback)(()=>a.current?.refresh(!0),[]);return{...r.key===t&&e&&t?r:{url:null,status:`loading`},retry:o}}function Te(e,t){return Ee(e,t).url}function Ee(e,t){let n=(0,w.useCallback)(()=>d.signLocalImageUrl(e,{path:t}),[e,t]);return we(e,e&&t?f(e,`local-image`,t):null,n)}function De(e){let[,t]=(0,w.useState)(0),n=(0,w.useCallback)(t=>!e||!t?null:(_.activateConnection(e),_.get(f(e,`local-image`,t))),[e]),r=(0,w.useCallback)(async n=>{if(!e||!n)return null;_.activateConnection(e);let r=f(e,`local-image`,n);return _.load(r,()=>d.signLocalImageUrl(e,{path:n})).finally(()=>t(e=>e+1))},[e]);return(0,w.useMemo)(()=>({getUrl:n,loadUrl:r}),[n,r])}function Oe(e,t,n){return/^(?:[~/\\]|[A-Za-z]:|file:\/\/)/.test(n)?d.signLocalImageUrl(e,{path:n}):d.signWorkspaceImageUrl(e,{appId:t,path:n})}function ke(e,t,n){return Ae(e,t,n).url}function Ae(e,t,n){let r=(0,w.useCallback)(()=>Oe(e,t,n),[e,t,n]);return we(e,e&&t&&n?f(e,`workspace-image`,t,n):null,r)}function je(e){let[,t]=(0,w.useState)(0),n=(0,w.useCallback)((t,n)=>!e||!t||!n?null:(_.activateConnection(e),_.get(f(e,`workspace-image`,t,n))),[e]),r=(0,w.useCallback)(async(n,r)=>{if(!e||!n||!r)return null;_.activateConnection(e);let i=f(e,`workspace-image`,n,r);return _.load(i,()=>Oe(e,n,r)).finally(()=>t(e=>e+1))},[e]),i=(0,w.useCallback)((e,t)=>{r(e,t)},[r]);return(0,w.useMemo)(()=>({ensureUrl:i,getUrl:n,loadUrl:r}),[i,n,r])}var Me=r();async function Ne(e,t){let n=window.openpond?.files?.saveImage;if(n){let r=await n({url:new URL(e,window.location.href).href,suggestedName:t});if(!r.ok&&!r.canceled)throw Error(r.error||`Could not save image.`);return}let r=window.showSaveFilePicker,i;try{i=r?await r.call(window,{suggestedName:t}):void 0}catch(e){if(e instanceof DOMException&&e.name===`AbortError`)return;throw e}let a=await fetch(e);if(!a.ok)throw Error(`Image download failed (${a.status}).`);let o=await a.blob();if(i){let e=await i.createWritable();try{await e.write(o),await e.close()}catch(t){throw await e.abort().catch(()=>void 0),t}return}let s=URL.createObjectURL(o),c=document.createElement(`a`);c.href=s,c.download=t,document.body.appendChild(c),c.click(),c.remove(),setTimeout(()=>URL.revokeObjectURL(s),6e4)}var T=i();function Pe({open:e,src:t,title:n,onClose:r}){let[i,a]=(0,w.useState)(!1),[o,s]=(0,w.useState)(!1),[u,d]=(0,w.useState)(null);if((0,w.useEffect)(()=>{if(!e)return;let t=e=>{e.key===`Escape`&&r()};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[r,e]),(0,w.useEffect)(()=>{a(!1),d(null)},[t]),!e||!t)return null;let f=(()=>{let e=n.split(`/`).pop()?.trim();if(e&&/\.[A-Za-z0-9]+$/.test(e))return e;try{let e=new URL(t,window.location.href),n=(e.searchParams.get(`path`)??e.searchParams.get(`storageName`)??e.pathname).split(/[\\/]/).pop()?.trim();if(n&&/\.[A-Za-z0-9]+$/.test(n))return n}catch{}return`image.png`})();return(0,Me.createPortal)((0,T.jsx)(`div`,{className:`image-lightbox-backdrop`,role:`presentation`,onMouseDown:e=>{e.target===e.currentTarget&&r()},children:(0,T.jsxs)(`section`,{"aria-label":n?`Image preview: ${n}`:`Image preview`,"aria-modal":`true`,className:`image-lightbox-dialog`,role:`dialog`,children:[(0,T.jsxs)(`header`,{className:`image-lightbox-header`,children:[(0,T.jsx)(`span`,{title:n,children:n}),(0,T.jsxs)(`div`,{className:`image-lightbox-actions`,children:[(0,T.jsx)(`button`,{type:`button`,"aria-label":`Download image`,title:`Download`,disabled:o,"aria-busy":o,onClick:async()=>{if(!o){s(!0),d(null);try{await Ne(t,f)}catch(e){d(e instanceof Error?e.message:`Could not save image.`)}finally{s(!1)}}},children:(0,T.jsx)(p,{size:16})}),(0,T.jsx)(`button`,{type:`button`,"aria-label":`Close image preview`,title:`Close`,onClick:r,children:(0,T.jsx)(c,{size:16})})]})]}),u&&(0,T.jsx)(l,{error:u}),(0,T.jsx)(`div`,{className:`image-lightbox-frame`,children:i?(0,T.jsx)(l,{error:`Image preview unavailable`}):(0,T.jsx)(`img`,{alt:n||`Image preview`,decoding:`async`,draggable:!1,src:t,onError:()=>a(!0)})})]})}),document.body)}function Fe(e){let t=e.replace(/\r\n/g,`
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{f as t,g as n,h as r,m as i}from"./index-DG0kf1wK.js";import{n as a}from"./api-client-DJRVOFzS.js";import{t as o}from"./icons-nr5d1kC-.js";import{t as s}from"./copy-B0gWkglr.js";import{t as c}from"./x-CQ0pGF6Q.js";import{Gt as l,O as u,Tn as d,b as f,dn as p,dr as m,gn as h,k as g,x as _}from"./App-CqqK4NLa.js";var v=o(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),y=o(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),b=o(`clipboard`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}]]),x=o(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),S=o(`file`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]),C=o(`minimize-2`,[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]),ee=o(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),te=o(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),ne=o(`workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),re=o(`text-wrap`,[[`path`,{d:`m16 16-3 3 3 3`,key:`117b85`}],[`path`,{d:`M3 12h14.5a1 1 0 0 1 0 7H13`,key:`18xa6z`}],[`path`,{d:`M3 19h6`,key:`1ygdsz`}],[`path`,{d:`M3 5h18`,key:`1u36vt`}]]),w=e(n(),1);async function ie(e){if(!e)return!1;try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch(e){console.warn(`Clipboard write failed`,e)}try{let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.style.position=`fixed`,t.style.left=`-1000px`,t.style.top=`-1000px`,document.body.appendChild(t),t.select();let n=document.execCommand(`copy`);return t.remove(),n}catch(e){return console.warn(`Clipboard fallback failed`,e),!1}}var ae=e=>/\.html?(?:[?#].*)?$/i.test(e);async function oe(e,t,n,r=`local`){return(await a(e,`/v1/${r===`sandbox`?`sandboxes`:`workspaces`}/${encodeURIComponent(t)}/html-preview`,{method:`POST`,body:JSON.stringify({path:n})})).url}async function se(e,t,n){return(await a(e,`/v1/html-previews`,{method:`POST`,body:JSON.stringify({name:t,content:n})})).url}var ce=new Set(`bash.c.cc.cjs.cpp.css.csv.docx.env.gif.go.graphql.h.hpp.html.htm.ico.java.jpeg.jpg.js.json.jsx.lock.lockb.md.mdx.m4v.mjs.mov.mp4.pdf.pptx.png.py.rs.scss.sh.sql.svg.toml.ts.tsx.txt.xlsx.webp.webm.yaml.yml.zsh`.split(`.`)),le=new Set([`AGENTS.md`,`Dockerfile`,`LICENSE`,`Makefile`,`README`]),ue=String.raw`[A-Za-z0-9_.@+-]+`,de=new RegExp(String.raw`^(?:(?:\.{1,2}|~)?[\\/]|[A-Za-z]:[\\/])?(?:${ue}[\\/])+${ue}(?::\d+(?::\d+)?)?`),fe=new RegExp(String.raw`^${ue}(?::\d+(?::\d+)?)?`),pe=/^(?:workspace|sandbox):file:[^\s<>()]+/;function me({projectTargetDetail:e,projectTargetValue:t,workspaceRepoPath:n,workspaceTargetValue:r}){return n?.trim()||(r!==`local`||!t.startsWith(`local:`)?null:e.trim()||null)}function he(e,t,n={}){if(!xe(e[t-1]))return null;let r=e.slice(t),i=pe.exec(r),a=i?null:de.exec(r),o=i||a?null:fe.exec(r),s=Se((i??a??o)?.[0]??``);if(!s)return null;let c=ge(s,n);return c?{...c,end:t+s.length}:null}function ge(e,t={}){let n=Se(e.trim().replace(/^['"`]+|['"`]+$/g,``));if(!n||/^https?:\/\//i.test(n))return null;let r=ve(_e(n),t.href).replace(/:\d+(?::\d+)?$/,``);return be(r.replace(/(\.html?)[?#].*$/i,`$1`),t.href)?{displayPath:n,path:ye(t.fileBasePath&&!/^(?:workspace|sandbox):file:/i.test(n)&&!/^(?:[~/\\]|[A-Za-z]:|(?:workspace|sandbox):file:)/.test(r)?`${t.fileBasePath.replace(/[\\/]+$/,``)}/${r.replace(/^\.\//,``)}`:r)}:null}function _e(e){let t=/^(workspace|sandbox):file:(.*)$/i.exec(e);if(!t)return e;let n=t[1]?.toLowerCase(),r=t[2]??``;return n===`sandbox`&&(r=r.replace(/^\/workspace\/app\//,``).replace(/^\/workspace\//,``)),r}function ve(e,t=!1){if(!/^file:\/\//i.test(e)){if(t)try{return decodeURIComponent(e)}catch{}return e}try{let t=new URL(e);return decodeURIComponent(t.pathname)+(/\.html?$/i.test(t.pathname)?t.search+t.hash:``)}catch{return e.replace(/^file:\/\//i,``)}}function ye(e){return e.replace(/\\/g,`/`).replace(/^\.\/+/,``)}function be(e,t=!1){if(/[\n\r]/.test(e)||!t&&/^[^/\\]*\s/.test(e)||/[=;?<>|]/.test(e))return!1;if(/[\\/]$/.test(e)&&/[^.~/\\]/.test(e))return!0;let n=e.replace(/\\/g,`/`).split(`/`).filter(Boolean).at(-1)??e;if(le.has(n)||/^\.[A-Za-z_]/.test(n))return!0;let r=n.includes(`.`)?n.split(`.`).at(-1)?.toLowerCase():null;return!!(r&&ce.has(r))}function xe(e){return!e||/[\s([{<"'`]/.test(e)}function Se(e){return e.replace(/[.,;!?]+$/,``).replace(/[\])}]+$/,``)}function Ce(e){return/^(?:#{1,6}\s*)?(?:\*\*)?(?:(?:the|both|all)\s+)?(?:updated\s+)?(?:files|outputs|deliverables|everything|slide\s+and\s+deck)(?:\*\*)?\s*(?:(?:is|are)\s+)?(?:\(\s*)?(?:in|at|under|:)\s*`((?:~[\/]|[\/]|[A-Za-z]:[\/])[^`\n]+[\/])`/i.exec(e.trim())?.[1]??null}function we(e,t,n){let[r,i]=(0,w.useState)({key:t,url:null,status:`loading`}),a=(0,w.useRef)(null);(0,w.useEffect)(()=>{if(!e||!t)return;_.activateConnection(e);let r=_.watch(t,n,e=>i({...e,key:t}));a.current=r;let o=()=>{document.visibilityState!==`hidden`&&r.refresh()};return window.addEventListener(`focus`,o),window.addEventListener(`openpond-runtime-connected`,o),document.addEventListener(`visibilitychange`,o),()=>{r.close(),a.current=null,window.removeEventListener(`focus`,o),window.removeEventListener(`openpond-runtime-connected`,o),document.removeEventListener(`visibilitychange`,o)}},[e,t,n]);let o=(0,w.useCallback)(()=>a.current?.refresh(!0),[]);return{...r.key===t&&e&&t?r:{url:null,status:`loading`},retry:o}}function Te(e,t){return Ee(e,t).url}function Ee(e,t){let n=(0,w.useCallback)(()=>d.signLocalImageUrl(e,{path:t}),[e,t]);return we(e,e&&t?f(e,`local-image`,t):null,n)}function De(e){let[,t]=(0,w.useState)(0),n=(0,w.useCallback)(t=>!e||!t?null:(_.activateConnection(e),_.get(f(e,`local-image`,t))),[e]),r=(0,w.useCallback)(async n=>{if(!e||!n)return null;_.activateConnection(e);let r=f(e,`local-image`,n);return _.load(r,()=>d.signLocalImageUrl(e,{path:n})).finally(()=>t(e=>e+1))},[e]);return(0,w.useMemo)(()=>({getUrl:n,loadUrl:r}),[n,r])}function Oe(e,t,n){return/^(?:[~/\\]|[A-Za-z]:|file:\/\/)/.test(n)?d.signLocalImageUrl(e,{path:n}):d.signWorkspaceImageUrl(e,{appId:t,path:n})}function ke(e,t,n){return Ae(e,t,n).url}function Ae(e,t,n){let r=(0,w.useCallback)(()=>Oe(e,t,n),[e,t,n]);return we(e,e&&t&&n?f(e,`workspace-image`,t,n):null,r)}function je(e){let[,t]=(0,w.useState)(0),n=(0,w.useCallback)((t,n)=>!e||!t||!n?null:(_.activateConnection(e),_.get(f(e,`workspace-image`,t,n))),[e]),r=(0,w.useCallback)(async(n,r)=>{if(!e||!n||!r)return null;_.activateConnection(e);let i=f(e,`workspace-image`,n,r);return _.load(i,()=>Oe(e,n,r)).finally(()=>t(e=>e+1))},[e]),i=(0,w.useCallback)((e,t)=>{r(e,t)},[r]);return(0,w.useMemo)(()=>({ensureUrl:i,getUrl:n,loadUrl:r}),[i,n,r])}var Me=r();async function Ne(e,t){let n=window.openpond?.files?.saveImage;if(n){let r=await n({url:new URL(e,window.location.href).href,suggestedName:t});if(!r.ok&&!r.canceled)throw Error(r.error||`Could not save image.`);return}let r=window.showSaveFilePicker,i;try{i=r?await r.call(window,{suggestedName:t}):void 0}catch(e){if(e instanceof DOMException&&e.name===`AbortError`)return;throw e}let a=await fetch(e);if(!a.ok)throw Error(`Image download failed (${a.status}).`);let o=await a.blob();if(i){let e=await i.createWritable();try{await e.write(o),await e.close()}catch(t){throw await e.abort().catch(()=>void 0),t}return}let s=URL.createObjectURL(o),c=document.createElement(`a`);c.href=s,c.download=t,document.body.appendChild(c),c.click(),c.remove(),setTimeout(()=>URL.revokeObjectURL(s),6e4)}var T=i();function Pe({open:e,src:t,title:n,onClose:r}){let[i,a]=(0,w.useState)(!1),[o,s]=(0,w.useState)(!1),[u,d]=(0,w.useState)(null);if((0,w.useEffect)(()=>{if(!e)return;let t=e=>{e.key===`Escape`&&r()};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[r,e]),(0,w.useEffect)(()=>{a(!1),d(null)},[t]),!e||!t)return null;let f=(()=>{let e=n.split(`/`).pop()?.trim();if(e&&/\.[A-Za-z0-9]+$/.test(e))return e;try{let e=new URL(t,window.location.href),n=(e.searchParams.get(`path`)??e.searchParams.get(`storageName`)??e.pathname).split(/[\\/]/).pop()?.trim();if(n&&/\.[A-Za-z0-9]+$/.test(n))return n}catch{}return`image.png`})();return(0,Me.createPortal)((0,T.jsx)(`div`,{className:`image-lightbox-backdrop`,role:`presentation`,onMouseDown:e=>{e.target===e.currentTarget&&r()},children:(0,T.jsxs)(`section`,{"aria-label":n?`Image preview: ${n}`:`Image preview`,"aria-modal":`true`,className:`image-lightbox-dialog`,role:`dialog`,children:[(0,T.jsxs)(`header`,{className:`image-lightbox-header`,children:[(0,T.jsx)(`span`,{title:n,children:n}),(0,T.jsxs)(`div`,{className:`image-lightbox-actions`,children:[(0,T.jsx)(`button`,{type:`button`,"aria-label":`Download image`,title:`Download`,disabled:o,"aria-busy":o,onClick:async()=>{if(!o){s(!0),d(null);try{await Ne(t,f)}catch(e){d(e instanceof Error?e.message:`Could not save image.`)}finally{s(!1)}}},children:(0,T.jsx)(p,{size:16})}),(0,T.jsx)(`button`,{type:`button`,"aria-label":`Close image preview`,title:`Close`,onClick:r,children:(0,T.jsx)(c,{size:16})})]})]}),u&&(0,T.jsx)(l,{error:u}),(0,T.jsx)(`div`,{className:`image-lightbox-frame`,children:i?(0,T.jsx)(l,{error:`Image preview unavailable`}):(0,T.jsx)(`img`,{alt:n||`Image preview`,decoding:`async`,draggable:!1,src:t,onError:()=>a(!0)})})]})}),document.body)}function Fe(e){let t=e.replace(/\r\n/g,`
|
|
2
2
|
`).split(`
|
|
3
3
|
`),n=[],r=[],i=[],a=[],o=!1,s,c=null,l,u=0,d=null;function f(){r.length!==0&&(n.push({type:`paragraph`,content:r.join(`
|
|
4
4
|
`).trim()}),r=[])}function p(){i.length!==0&&(n.push({type:`blockquote`,content:i.join(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,c as t,i as n,o as r,r as i,s as a}from"./WorkspaceMonacoEditor-
|
|
1
|
+
import{a as e,c as t,i as n,o as r,r as i,s as a}from"./WorkspaceMonacoEditor-ChBjvgxE.js";import"./toggleHighContrast-CP0qM8JR.js";import{t as o}from"./workers-CmqH-dTr.js";import{typescriptDefaults as s}from"./monaco.contribution-BUi28toA.js";var c=class{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;let e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||=(async()=>(this._worker=o({moduleId:`vs/language/typescript/tsWorker`,createWorker:()=>new Worker(new URL(`/assets/ts.worker-CwbYC1F9.js`,``+import.meta.url),{type:`module`}),label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(a.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))(),this._client}async getLanguageServiceWorker(...e){let t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}},l={};l[`lib.d.ts`]=!0,l[`lib.decorators.d.ts`]=!0,l[`lib.decorators.legacy.d.ts`]=!0,l[`lib.dom.asynciterable.d.ts`]=!0,l[`lib.dom.d.ts`]=!0,l[`lib.dom.iterable.d.ts`]=!0,l[`lib.es2015.collection.d.ts`]=!0,l[`lib.es2015.core.d.ts`]=!0,l[`lib.es2015.d.ts`]=!0,l[`lib.es2015.generator.d.ts`]=!0,l[`lib.es2015.iterable.d.ts`]=!0,l[`lib.es2015.promise.d.ts`]=!0,l[`lib.es2015.proxy.d.ts`]=!0,l[`lib.es2015.reflect.d.ts`]=!0,l[`lib.es2015.symbol.d.ts`]=!0,l[`lib.es2015.symbol.wellknown.d.ts`]=!0,l[`lib.es2016.array.include.d.ts`]=!0,l[`lib.es2016.d.ts`]=!0,l[`lib.es2016.full.d.ts`]=!0,l[`lib.es2016.intl.d.ts`]=!0,l[`lib.es2017.arraybuffer.d.ts`]=!0,l[`lib.es2017.d.ts`]=!0,l[`lib.es2017.date.d.ts`]=!0,l[`lib.es2017.full.d.ts`]=!0,l[`lib.es2017.intl.d.ts`]=!0,l[`lib.es2017.object.d.ts`]=!0,l[`lib.es2017.sharedmemory.d.ts`]=!0,l[`lib.es2017.string.d.ts`]=!0,l[`lib.es2017.typedarrays.d.ts`]=!0,l[`lib.es2018.asyncgenerator.d.ts`]=!0,l[`lib.es2018.asynciterable.d.ts`]=!0,l[`lib.es2018.d.ts`]=!0,l[`lib.es2018.full.d.ts`]=!0,l[`lib.es2018.intl.d.ts`]=!0,l[`lib.es2018.promise.d.ts`]=!0,l[`lib.es2018.regexp.d.ts`]=!0,l[`lib.es2019.array.d.ts`]=!0,l[`lib.es2019.d.ts`]=!0,l[`lib.es2019.full.d.ts`]=!0,l[`lib.es2019.intl.d.ts`]=!0,l[`lib.es2019.object.d.ts`]=!0,l[`lib.es2019.string.d.ts`]=!0,l[`lib.es2019.symbol.d.ts`]=!0,l[`lib.es2020.bigint.d.ts`]=!0,l[`lib.es2020.d.ts`]=!0,l[`lib.es2020.date.d.ts`]=!0,l[`lib.es2020.full.d.ts`]=!0,l[`lib.es2020.intl.d.ts`]=!0,l[`lib.es2020.number.d.ts`]=!0,l[`lib.es2020.promise.d.ts`]=!0,l[`lib.es2020.sharedmemory.d.ts`]=!0,l[`lib.es2020.string.d.ts`]=!0,l[`lib.es2020.symbol.wellknown.d.ts`]=!0,l[`lib.es2021.d.ts`]=!0,l[`lib.es2021.full.d.ts`]=!0,l[`lib.es2021.intl.d.ts`]=!0,l[`lib.es2021.promise.d.ts`]=!0,l[`lib.es2021.string.d.ts`]=!0,l[`lib.es2021.weakref.d.ts`]=!0,l[`lib.es2022.array.d.ts`]=!0,l[`lib.es2022.d.ts`]=!0,l[`lib.es2022.error.d.ts`]=!0,l[`lib.es2022.full.d.ts`]=!0,l[`lib.es2022.intl.d.ts`]=!0,l[`lib.es2022.object.d.ts`]=!0,l[`lib.es2022.regexp.d.ts`]=!0,l[`lib.es2022.string.d.ts`]=!0,l[`lib.es2023.array.d.ts`]=!0,l[`lib.es2023.collection.d.ts`]=!0,l[`lib.es2023.d.ts`]=!0,l[`lib.es2023.full.d.ts`]=!0,l[`lib.es2023.intl.d.ts`]=!0,l[`lib.es2024.arraybuffer.d.ts`]=!0,l[`lib.es2024.collection.d.ts`]=!0,l[`lib.es2024.d.ts`]=!0,l[`lib.es2024.full.d.ts`]=!0,l[`lib.es2024.object.d.ts`]=!0,l[`lib.es2024.promise.d.ts`]=!0,l[`lib.es2024.regexp.d.ts`]=!0,l[`lib.es2024.sharedmemory.d.ts`]=!0,l[`lib.es2024.string.d.ts`]=!0,l[`lib.es5.d.ts`]=!0,l[`lib.es6.d.ts`]=!0,l[`lib.esnext.array.d.ts`]=!0,l[`lib.esnext.collection.d.ts`]=!0,l[`lib.esnext.d.ts`]=!0,l[`lib.esnext.decorators.d.ts`]=!0,l[`lib.esnext.disposable.d.ts`]=!0,l[`lib.esnext.error.d.ts`]=!0,l[`lib.esnext.float16.d.ts`]=!0,l[`lib.esnext.full.d.ts`]=!0,l[`lib.esnext.intl.d.ts`]=!0,l[`lib.esnext.iterator.d.ts`]=!0,l[`lib.esnext.promise.d.ts`]=!0,l[`lib.esnext.sharedmemory.d.ts`]=!0,l[`lib.scripthost.d.ts`]=!0,l[`lib.webworker.asynciterable.d.ts`]=!0,l[`lib.webworker.d.ts`]=!0,l[`lib.webworker.importscripts.d.ts`]=!0,l[`lib.webworker.iterable.d.ts`]=!0;function u(e,t,n=0){if(typeof e==`string`)return e;if(e===void 0)return``;let r=``;if(n){r+=t;for(let e=0;e<n;e++)r+=` `}if(r+=e.messageText,n++,e.next)for(let i of e.next)r+=u(i,t,n);return r}function d(e){return e?e.map(e=>e.text).join(``):``}var f=class{constructor(e){this._worker=e}_textSpanToRange(e,t){let n=e.getPositionAt(t.start),r=e.getPositionAt(t.start+t.length),{lineNumber:i,column:a}=n,{lineNumber:o,column:s}=r;return{startLineNumber:i,startColumn:a,endLineNumber:o,endColumn:s}}},p=class{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e?e.path.indexOf(`/lib.`)===0&&!!l[e.path.slice(1)]:!1}getOrCreateModel(e){let t=r.parse(e),n=a.getModel(t);if(n)return n;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return a.createModel(this._libFiles[t.path.slice(1)],`typescript`,t);let i=s.getExtraLibs()[e];return i?a.createModel(i.content,`typescript`,t):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e}),this._fetchLibFilesPromise}},m=class extends f{constructor(e,t,n,r){super(r),this._libFiles=e,this._defaults=t,this._selector=n,this._disposables=[],this._listener=Object.create(null);let i=e=>{if(e.getLanguageId()!==n)return;let t=()=>{let{onlyVisible:t}=this._defaults.getDiagnosticsOptions();t?e.isAttachedToEditor()&&this._doValidate(e):this._doValidate(e)},r,i=e.onDidChangeContent(()=>{clearTimeout(r),r=window.setTimeout(t,500)}),o=e.onDidChangeAttached(()=>{let{onlyVisible:n}=this._defaults.getDiagnosticsOptions();n&&(e.isAttachedToEditor()?t():a.setModelMarkers(e,this._selector,[]))});this._listener[e.uri.toString()]={dispose(){i.dispose(),o.dispose(),clearTimeout(r)}},t()},o=e=>{a.setModelMarkers(e,this._selector,[]);let t=e.uri.toString();this._listener[t]&&(this._listener[t].dispose(),delete this._listener[t])};this._disposables.push(a.onDidCreateModel(e=>i(e))),this._disposables.push(a.onWillDisposeModel(o)),this._disposables.push(a.onDidChangeModelLanguage(e=>{o(e.model),i(e.model)})),this._disposables.push({dispose(){for(let e of a.getModels())o(e)}});let s=()=>{for(let e of a.getModels())o(e),i(e)};this._disposables.push(this._defaults.onDidChange(s)),this._disposables.push(this._defaults.onDidExtraLibsChange(s)),a.getModels().forEach(e=>i(e))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){let t=await this._worker(e.uri);if(e.isDisposed())return;let n=[],{noSyntaxValidation:i,noSemanticValidation:o,noSuggestionDiagnostics:s}=this._defaults.getDiagnosticsOptions();i||n.push(t.getSyntacticDiagnostics(e.uri.toString())),o||n.push(t.getSemanticDiagnostics(e.uri.toString())),s||n.push(t.getSuggestionDiagnostics(e.uri.toString()));let c=await Promise.all(n);if(!c||e.isDisposed())return;let l=c.reduce((e,t)=>t.concat(e),[]).filter(e=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(e.code)===-1),u=l.map(e=>e.relatedInformation||[]).reduce((e,t)=>t.concat(e),[]).map(e=>e.file?r.parse(e.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(u),!e.isDisposed()&&a.setModelMarkers(e,this._selector,l.map(t=>this._convertDiagnostics(e,t)))}_convertDiagnostics(e,t){let r=t.start||0,i=t.length||1,{lineNumber:a,column:o}=e.getPositionAt(r),{lineNumber:s,column:c}=e.getPositionAt(r+i),l=[];return t.reportsUnnecessary&&l.push(n.Unnecessary),t.reportsDeprecated&&l.push(n.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:a,startColumn:o,endLineNumber:s,endColumn:c,message:u(t.messageText,`
|
|
2
2
|
`),code:t.code.toString(),tags:l,relatedInformation:this._convertRelatedInformation(e,t.relatedInformation)}}_convertRelatedInformation(e,t){if(!t)return[];let n=[];return t.forEach(t=>{let r=e;if(t.file&&(r=this._libFiles.getOrCreateModel(t.file.fileName)),!r)return;let i=t.start||0,a=t.length||1,{lineNumber:o,column:s}=r.getPositionAt(i),{lineNumber:c,column:l}=r.getPositionAt(i+a);n.push({resource:r.uri,startLineNumber:o,startColumn:s,endLineNumber:c,endColumn:l,message:u(t.messageText,`
|
|
3
3
|
`)})}),n}_tsDiagnosticCategoryToMarkerSeverity(e){switch(e){case 1:return i.Error;case 3:return i.Info;case 0:return i.Warning;case 2:return i.Hint}return i.Info}},h=class n extends f{get triggerCharacters(){return[`.`]}async provideCompletionItems(r,i,a,o){let s=r.getWordUntilPosition(i),c=new e(i.lineNumber,s.startColumn,i.lineNumber,s.endColumn),l=r.uri,u=r.getOffsetAt(i),d=await this._worker(l);if(r.isDisposed())return;let f=await d.getCompletionsAtPosition(l.toString(),u);if(f&&!r.isDisposed())return{suggestions:f.entries.map(a=>{let o=c;if(a.replacementSpan){let t=r.getPositionAt(a.replacementSpan.start),n=r.getPositionAt(a.replacementSpan.start+a.replacementSpan.length);o=new e(t.lineNumber,t.column,n.lineNumber,n.column)}let s=[];return a.kindModifiers!==void 0&&a.kindModifiers.indexOf(`deprecated`)!==-1&&s.push(t.CompletionItemTag.Deprecated),{uri:l,position:i,offset:u,range:o,label:a.name,insertText:a.name,sortText:a.sortText,kind:n.convertKind(a.kind),tags:s}})}}async resolveCompletionItem(e,t){let r=e,i=r.uri,a=r.position,o=r.offset,s=await(await this._worker(i)).getCompletionEntryDetails(i.toString(),o,r.label);return s?{uri:i,position:a,label:s.name,kind:n.convertKind(s.kind),detail:d(s.displayParts),documentation:{value:n.createDocumentationString(s)}}:r}static convertKind(e){switch(e){case C.primitiveType:case C.keyword:return t.CompletionItemKind.Keyword;case C.variable:case C.localVariable:return t.CompletionItemKind.Variable;case C.memberVariable:case C.memberGetAccessor:case C.memberSetAccessor:return t.CompletionItemKind.Field;case C.function:case C.memberFunction:case C.constructSignature:case C.callSignature:case C.indexSignature:return t.CompletionItemKind.Function;case C.enum:return t.CompletionItemKind.Enum;case C.module:return t.CompletionItemKind.Module;case C.class:return t.CompletionItemKind.Class;case C.interface:return t.CompletionItemKind.Interface;case C.warning:return t.CompletionItemKind.File}return t.CompletionItemKind.Property}static createDocumentationString(e){let t=d(e.documentation);if(e.tags)for(let n of e.tags)t+=`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./icons-
|
|
1
|
+
import{t as e}from"./icons-nr5d1kC-.js";var t=e(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t}from"./index-
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t}from"./index-DG0kf1wK.js";import{Tn as n}from"./App-CqqK4NLa.js";var r=e(t(),1);function i({connection:e,onError:t,onPayload:i}){let[a,o]=(0,r.useState)(!1),[s,c]=(0,r.useState)(!1);async function l(r,a){if(e){o(!0),t(null);try{i(await n.switchOpenPondAccount(e,{handle:r,baseUrl:a??null}))}catch(e){t(e instanceof Error?e.message:String(e))}finally{o(!1)}}}async function u(r,a){if(!e)return!1;o(!0),t(null);try{return i(await n.removeOpenPondAccount(e,{handle:r,baseUrl:a??null})),!0}catch(e){return t(e instanceof Error?e.message:String(e)),!1}finally{o(!1)}}async function d(r){if(e&&r.apiKey.trim()){o(!0),t(null);try{let t=r.handle?.trim(),a=r.environment?.trim();i(await n.saveOpenPondAccount(e,{apiKey:r.apiKey.trim(),handle:t||void 0,baseUrl:r.baseUrl,apiBaseUrl:r.apiBaseUrl,environment:a||`custom`,setActive:!0}))}catch(e){throw t(e instanceof Error?e.message:String(e)),e}finally{o(!1)}}}async function f(){if(e){c(!0),t(null);try{i(await n.refreshOpenPondAccounts(e))}catch(e){t(e instanceof Error?e.message:String(e))}finally{c(!1)}}}return{refreshingAccounts:s,saving:a,refreshAccounts:f,removeAccount:u,saveAccount:d,switchAccount:l}}export{i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,s as n}from"./index-
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,s as n}from"./index-DG0kf1wK.js";import{n as r}from"./api-client-DJRVOFzS.js";var i=[{id:`openpond_chat`,name:`Pal`,icon:n},{id:`codex`,name:`Codex`,icon:`/agent-sources/codex.svg`,provider:`codex`},{id:`claude_code`,name:`Claude Code`,icon:`/agent-sources/claude-code.svg`,provider:`claude-code`},{id:`opencode`,name:`OpenCode`,icon:`/agent-sources/opencode.svg`,provider:`opencode`},{id:`grok_build`,name:`Grok Build`,icon:`/agent-sources/grok-build.svg`,provider:`grok-build`},{id:`hermes`,name:`Hermes`,icon:`/agent-sources/hermes.png`},{id:`pi`,name:`Pi`,icon:`/agent-sources/pi.svg`},{id:`openclaw`,name:`OpenClaw`,icon:`/agent-sources/openclaw.svg`},{id:`oh_my_pi`,name:`Oh My Pi`,icon:`/agent-sources/oh-my-pi.svg`}];function a(e,t){if(e.state===`disconnected`)return`Disconnected`;if(e.state===`paused`)return`Paused`;if(e.selectedConversations===0)return`Choose conversations to upload`;if(t.running&&e.run?.state===`running`)return`Importing conversations`;if(e.error||e.run?.state===`failed`)return`Needs attention`;let n=e.schedule;return n?.frequency===`hourly`?`Hourly`:n?.frequency===`cron`?`Cron: ${n.expression}`:n?.frequency===`daily`?`Daily at ${n.time}`:n?.frequency===`weekly`?`Weekly on ${[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`][n.day]} at ${n.time}`:`Manual imports`}var o=e(t(),1),s=new WeakMap;function c(e){let[t,n]=(0,o.useState)(null),[i,a]=(0,o.useState)(null),[c,l]=(0,o.useState)(!1),u=(0,o.useRef)(0),d=(0,o.useRef)(null),f=(0,o.useCallback)(async()=>{if(!e||d.current)return;let t=new AbortController;d.current=t;let i=u.current;l(!0);try{let o=await r(e,`/v1/native-history/collector`,{method:`POST`,body:JSON.stringify({command:`inventory`}),signal:t.signal});if(i!==u.current||t.signal.aborted)return;s.set(e,o),n({connection:e,value:o}),a(null)}catch(e){i===u.current&&!t.signal.aborted&&a(e instanceof Error?e.message:`Unable to read agent connections.`)}finally{d.current===t&&(d.current=null),i===u.current&&l(!1)}},[e]);return(0,o.useEffect)(()=>{u.current++,a(null),f();let e=window.setInterval(()=>{document.hidden||f()},1e4),t=()=>{f()};return window.addEventListener(`focus`,t),()=>{u.current++,d.current?.abort(),d.current=null,window.clearInterval(e),window.removeEventListener(`focus`,t)}},[f]),{inventory:t?.connection===e?t.value:e?s.get(e)??null:null,loading:c,error:i,refresh:f}}export{i as n,a as r,c as t};
|
package/dist/web/assets/{useChatContextSelection-D8aSVtCm.js → useChatContextSelection-CBVI5IYj.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t}from"./index-CDtTBysF.js";import{P as n,d as r,m as i,n as a,p as o,t as s}from"./useQuery-9SCnxwmR.js";import{C as c,a as l,d as u,m as d,p as f,r as p,v as m}from"./schemas-Brv9Vmnk.js";import{C as h,N as g,O as _,Q as v,R as y,ft as b,m as x,p as S,v as C}from"./training-CGYukv2L.js";import{nt as w}from"./chunk-GCUWJUUM-Dy6oUNJ6.js";import{a as T,n as E}from"./chat-resources-DMPHClhQ.js";import{t as D}from"./query-scope-BRpcgljO.js";import{It as O,Wt as k}from"./App-CV1p0_Zy.js";var A=class extends r{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:a,isRefetching:s,isError:c,isRefetchError:l}=r,u=n.fetchMeta?.fetchMore?.direction,d=c&&u===`forward`,f=a&&u===`forward`,p=c&&u===`backward`,m=a&&u===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:o(t,n.data),hasPreviousPage:i(t,n.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:l&&!d&&!p,isRefetching:s&&!f&&!m}}};function j(e,t){return a(e,A,t)}var M=v,N=new Set([`training_result`,`managed_modification_result`,`engram_result`,`decision_result`,`alphaedit_result`,`neuron_training_result`]),P=d({kind:p([`dataset`,`experiment`,`model`,`training`,`training_result`,`managed_modification_result`,`engram_result`,`decision_result`,`alphaedit_result`,`neuron_training_result`]),id:m().trim().min(1).max(240),draft:x.optional(),storedDraft:u(!0).optional(),revision:f().int().positive().optional(),location:p([`local`,`cloud`]).default(`local`),teamId:m().min(1).max(240).optional(),apiOrigin:c().max(2e3).optional(),scopeId:m().min(1).max(240).optional(),sessionId:m().min(1).max(240).optional(),result:M.optional()}).strict().superRefine((e,t)=>{(N.has(e.kind)?!e.result||e.result.kind!==e.kind||e.location!==`cloud`||e.id!==(e.result.kind===`training_result`?e.result.jobId:e.result.executionId)||e.teamId!==e.result.owner.teamId||e.apiOrigin!==e.result.apiOrigin||e.draft||e.storedDraft||e.revision||e.scopeId||e.sessionId:e.result!==void 0)&&t.addIssue({code:`custom`,path:[`result`],message:`Retain the exact completed result in its original hosted account.`}),e.draft&&(e.kind!==`experiment`||e.id!==e.draft.id||e.location!==`local`||e.scopeId||e.sessionId||e.revision||e.teamId||e.apiOrigin||e.storedDraft)&&t.addIssue({code:`custom`,path:[`draft`],message:`An unsaved draft requires its own local experiment identity.`}),e.storedDraft&&(e.kind!==`experiment`||e.location!==`cloud`||!e.teamId||!e.apiOrigin||e.scopeId||e.sessionId||e.revision)&&t.addIssue({code:`custom`,path:[`storedDraft`],message:`A stored experiment requires its canonical account reference.`})}),F=d({target:P,label:m().max(500),detail:m().max(2e3)}).strict(),I=F.extend({draft:x.optional(),draftRevision:f().int().positive().optional(),storedDraft:S.optional(),resource:E.optional(),dataset:E.optional(),graders:l(E).optional(),training:T.optional(),results:l(M).max(1).optional(),trainingResult:b.optional(),managedModificationResult:g.optional(),engramResult:_.optional(),decisionResult:h.optional(),alphaEditResult:C.optional(),neuronTrainingResult:y.optional(),model:d({id:m(),name:m(),portableProjectId:m(),baseModel:m().nullable(),trainingDataset:d({id:m(),revision:f().int().positive(),name:m()}).nullable(),evaluationDataset:d({id:m(),revision:f().int().positive(),name:m()}).nullable()}).strict().optional()}).strict().superRefine((e,t)=>{let n=e.target.kind,r=e.target.result,i=n===`decision_result`?e.decisionResult:n===`alphaedit_result`?e.alphaEditResult:n===`neuron_training_result`?e.neuronTrainingResult:void 0,a=[e.trainingResult,e.managedModificationResult,e.engramResult,e.decisionResult,e.alphaEditResult,e.neuronTrainingResult].filter(e=>e!==void 0);if(!N.has(n)){(a.length||e.results!==void 0)&&t.addIssue({code:`custom`,message:`Retained results require their exact result selection.`});return}let o=e.results?.[0],s=()=>t.addIssue({code:`custom`,message:`The selected evidence differs from its exact completed result.`});if(!r||!o||w(o)!==w(r)||a.length!==1){s();return}if(r.kind===`training_result`){let t=e.trainingResult,i=t?.candidate,a=i?{artifact:i.artifact,checkpointId:i.checkpointId,composition:i.composition,parent:i.parent}:null;(n!==r.kind||!t||t.candidateState!==`retained`||!i||t.job.id!==r.jobId||t.teamId!==r.owner.teamId||t.job.modelProjectId!==r.modelProjectId||t.job.portableProjectId!==r.portableProjectId||t.job.submissionHash!==r.submissionHash||w(a)!==w(r.candidate)||!t.outputs.receipt||t.outputs.receipt.id!==r.executionReceipt.id||!t.outputs.outputs.some(e=>e.kind===`receipt`&&e.id===`${t.outputs.receipt.id}:output`&&e.contentHash===r.executionReceipt.contentHash))&&s();return}if(r.kind===`managed_modification_result`||r.kind===`engram_result`){let t=r.kind===`engram_result`?e.engramResult:e.managedModificationResult;(n!==r.kind||!t||t.phase!==`completed`||!t.result||t.id!==r.executionId||t.teamId!==r.owner.teamId||t.ownerUserId!==r.owner.actorId||t.projectId!==r.projectId||t.plan.inputHash!==r.inputHash||t.plan.runtimeHash!==r.runtimeHash||t.result.contentHash!==r.resultHash||r.kind===`managed_modification_result`&&(t.method!==r.method||!e.managedModificationResult)||r.kind===`engram_result`&&(!e.engramResult||w({id:e.engramResult.result?.artifact.id,contentHash:e.engramResult.result?.artifact.contentHash})!==w(r.artifact)))&&s();return}let c=i?.result;(!r||r.kind!==n||!o||a.length!==1||!i||!c||i.phase!==`completed`||i.id!==r.executionId||i.teamId!==r.owner.teamId||i.ownerUserId!==r.owner.actorId||i.projectId!==r.projectId||i.plan.inputHash!==r.inputHash||c.modelHash!==r.modelHash||c.runtimeHash!==r.runtimeHash||c.contentHash!==r.resultHash||w(o)!==w(r)||i.schemaVersion===`openpond.managedDecisionExecution.v1`&&(r.kind!==`decision_result`||i.mode!==r.mode)||w(c.artifact?{id:c.artifact.id,contentHash:c.artifact.contentHash}:null)!==w(r.artifact))&&t.addIssue({code:`custom`,message:`The selected evidence differs from its exact completed result.`})}),L=e(t(),1),R=(0,L.createContext)(null),z=(0,L.createContext)(`default`),B=`openpond-chat-context-selected`,V=new Map,H=new Set,U=new Map,W=new Set;function G(e,t){V.set(e,t);for(let e of W)e()}var K=e=>(W.add(e),()=>{W.delete(e)});function q(e,t,r){let i=(0,L.useContext)(z),a=(0,L.useContext)(R),o=`${e?D(e):`disconnected`}:${r??i}`,c=`${o}:${t??`new`}`,l=(0,L.useRef)(c);l.current=c;let u=n(),d=(0,L.useRef)(null),f=(0,L.useSyncExternalStore)(K,()=>V.get(c),()=>void 0),p=(0,L.useSyncExternalStore)(K,()=>H.has(c),()=>!1),m=(0,L.useSyncExternalStore)(K,()=>U.get(c)??null,()=>null),h=j({queryKey:[`chat-context-catalog`,`pages`,o,t],enabled:!!e,staleTime:3e4,initialPageParam:void 0,getNextPageParam:e=>e.nextDraftCursor??void 0,queryFn:async({signal:n,pageParam:r})=>{let i=await k(e,`dataset`,{action:`context_catalog`,payload:{...t?{sessionId:t}:{},...r?{draftCursor:r}:{}}},n);return{...i,options:F.array().parse(i.options)}}}),g={...h,data:(0,L.useMemo)(()=>h.data?{options:[...new Map(h.data.pages.flatMap(e=>e.options).map(e=>[w(e.target),e])).values()],warning:[...new Set(h.data.pages.map(e=>e.warning).filter(Boolean))].join(` `)||null}:void 0,[h.data])},_=s({queryKey:[`chat-context-selection`,c],enabled:!!(e&&t&&!p),refetchInterval:1e4,queryFn:async({signal:n})=>{let r=await k(e,`dataset`,{action:`context_selection`,payload:{sessionId:t}},n),i=r.selection?I.parse(r.selection):null,a=u.getQueryData([`chat-context-catalog`,`pages`,o,t]);return i?.target.scopeId&&a&&!a.pages.some(e=>e.options.some(e=>e.target.scopeId===i.target.scopeId))&&u.invalidateQueries({queryKey:[`chat-context-catalog`,`pages`,o,t]}),i}}),v=t?_.data===void 0?f??null:_.data:f??null;(0,L.useEffect)(()=>{if(!e||!t)return;let n=e=>{e.detail?.sessionId===t&&u.invalidateQueries({queryKey:[`chat-context-selection`,c]})};return window.addEventListener(`openpond-resource-focus-changed`,n),()=>window.removeEventListener(`openpond-resource-focus-changed`,n)},[e,t,c,u]);let y=v?.training?v.training.location===`cloud`?{kind:`model`,id:v.training.job.modelProjectId,location:`cloud`,teamId:v.training.owner.teamId,apiOrigin:v.training.apiOrigin}:{kind:`model`,id:v.training.modelId,location:`local`}:v?.model?v.target:null,b=s({queryKey:[`chat-context-model-runs`,o,y],enabled:!!(e&&y),queryFn:async({signal:t})=>{let n=await k(e,`dataset`,{action:`context_runs`,payload:{target:y}},t);return{runs:F.array().parse(n.runs)}}}),S=(0,L.useCallback)(async(n,r)=>{if(!e)throw Error(`Connect before selecting experiment context.`);if(H.has(c))throw Error(`Wait for the current context selection to finish.`);let i=!1;if(await O(()=>{i=!0}),!i||l.current!==c)return!1;if(H.has(c))throw Error(`Wait for the current context selection to finish.`);H.add(c);for(let e of W)e();try{await u.cancelQueries({queryKey:[`chat-context-selection`,c]});let i=await k(e,`dataset`,{action:`context_select`,payload:{target:n,...r?.newExperiment?{newExperiment:!0}:{},...t?{sessionId:t}:{}}}),a=i.selection?I.parse(i.selection):null;return l.current===c&&(r?.newExperiment&&a?.draft?U.set(c,a.draft.id):U.delete(c),await u.cancelQueries({queryKey:[`chat-context-selection`,c]}),G(c,a),t&&u.setQueryData([`chat-context-selection`,c],a),r?.newExperiment&&u.invalidateQueries({queryKey:[`chat-context-catalog`,`pages`,o,t]}),t&&window.dispatchEvent(new CustomEvent(`openpond-resource-focus-changed`,{detail:{sessionId:t}})),a&&window.dispatchEvent(new CustomEvent(B,{detail:{sessionId:t,scope:o,targetKey:JSON.stringify(a.target)}})),!0)}finally{H.delete(c);for(let e of W)e()}},[e,c,u,o,t]),C=(0,L.useCallback)(async(n,r,i)=>{if(!e||!a?.teamId)throw Error(`The originating account is unavailable.`);await u.cancelQueries({queryKey:[`chat-context-selection`,c]});let o=await k(e,`dataset`,{action:`context_select`,payload:{target:{kind:`training`,id:n,location:`cloud`,teamId:a.teamId,apiOrigin:r},...t?{sessionId:t,sourceDraftId:i}:{}}}),s=o.selection?I.parse(o.selection):null;l.current===c&&(U.delete(c),G(c,s),t&&u.setQueryData([`chat-context-selection`,c],s),t&&window.dispatchEvent(new CustomEvent(`openpond-resource-focus-changed`,{detail:{sessionId:t}})))},[e,a?.teamId,c,t,u]),T=(0,L.useCallback)(e=>{let n=V.get(c);if(n!==void 0){let t=U.get(c);t&&U.set(`${o}:${e}`,t),G(`${o}:${e}`,n),u.setQueryData([`chat-context-selection`,`${o}:${e}`],n)}t||(U.delete(c),G(c,null))},[c,o,u,t]),E=(0,L.useCallback)(async(n,r)=>{if(v?.draft?.hostedEvaluationForm)throw Error(`Open this saved evaluation in its hosted editor to preserve its native settings.`);let i=x.parse(n);if(!e||!v?.draft||v.draft.id!==i.id||!a?.teamId)throw Error(`Reopen the intended experiment in an OpenPond workspace before saving settings.`);if(H.has(c))throw Error(`Wait for the current experiment action to finish.`);H.add(c);for(let e of W)e();try{await u.cancelQueries({queryKey:[`chat-context-selection`,c]});async function n(n){let r=await k(e,`dataset`,{action:`context_save_draft`,payload:{...t?{sessionId:t}:{},target:n.target,update:n.update}});return{saved:I.parse(r.saved),currentSaved:I.parse(r.currentSaved),focused:r.selection?I.parse(r.selection):null}}let s=r===void 0?v.storedDraft??null:r,f=null;if(d.current?.key===c&&(f=await n(d.current),s=f.saved.storedDraft??null,d.current=null),l.current!==c)throw Error(`The active chat or account changed. The draft remains in Experiments.`);if((!f||!s||w(s.draft)!==w(i))&&(d.current={key:c,target:v.target,update:{schemaVersion:`openpond.experimentDraftSave.v1`,teamId:a.teamId,projectId:s?.projectId??null,operationId:`draft-save-${crypto.randomUUID()}`,expectedRevision:s?.revision??0,draft:i}},f=await n(d.current),d.current=null),!f.saved.storedDraft||w(f.saved.draft)!==w(i)||f.currentSaved.storedDraft?.contentHash!==f.saved.storedDraft.contentHash)throw Error(`This experiment changed elsewhere. Your edits are still here; reopen the saved draft to load its current settings.`);return l.current===c&&(await u.cancelQueries({queryKey:[`chat-context-selection`,c]}),G(c,f.focused),t&&u.setQueryData([`chat-context-selection`,c],f.focused),u.invalidateQueries({queryKey:[`chat-context-catalog`,`pages`,o,t]}),u.invalidateQueries({queryKey:[`unified-experiments`]}),t&&window.dispatchEvent(new CustomEvent(`openpond-resource-focus-changed`,{detail:{sessionId:t}}))),f.saved}finally{H.delete(c);for(let e of W)e()}},[e,v,a?.teamId,c,u,o,t]);return{associateTraining:C,selection:v,selecting:p,configureDraftId:m,closeDraftEditor:(0,L.useCallback)(()=>{U.delete(c);for(let e of W)e()},[c]),catalog:g,runs:b,select:S,saveDraft:E,selectionError:_.error,moveToSession:T,scope:o}}export{I as a,R as i,z as n,P as o,q as r,j as s,B as t};
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t}from"./index-DG0kf1wK.js";import{P as n,d as r,m as i,n as a,p as o,t as s}from"./useQuery-CKHqHSr0.js";import{C as c,a as l,d as u,m as d,p as f,r as p,v as m}from"./schemas-Brv9Vmnk.js";import{C as h,N as g,O as _,Q as v,R as y,ft as b,m as x,p as S,v as C}from"./training-KYW8yE6p.js";import{nt as w}from"./chunk-GCUWJUUM-Dy6oUNJ6.js";import{a as T,n as E}from"./chat-resources-BFT0vtdv.js";import{t as D}from"./query-scope-BRpcgljO.js";import{It as O,Wt as k}from"./App-CqqK4NLa.js";var A=class extends r{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:a,isRefetching:s,isError:c,isRefetchError:l}=r,u=n.fetchMeta?.fetchMore?.direction,d=c&&u===`forward`,f=a&&u===`forward`,p=c&&u===`backward`,m=a&&u===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:o(t,n.data),hasPreviousPage:i(t,n.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:l&&!d&&!p,isRefetching:s&&!f&&!m}}};function j(e,t){return a(e,A,t)}var M=v,N=new Set([`training_result`,`managed_modification_result`,`engram_result`,`decision_result`,`alphaedit_result`,`neuron_training_result`]),P=d({kind:p([`dataset`,`experiment`,`model`,`training`,`training_result`,`managed_modification_result`,`engram_result`,`decision_result`,`alphaedit_result`,`neuron_training_result`]),id:m().trim().min(1).max(240),draft:x.optional(),storedDraft:u(!0).optional(),revision:f().int().positive().optional(),location:p([`local`,`cloud`]).default(`local`),teamId:m().min(1).max(240).optional(),apiOrigin:c().max(2e3).optional(),scopeId:m().min(1).max(240).optional(),sessionId:m().min(1).max(240).optional(),result:M.optional()}).strict().superRefine((e,t)=>{(N.has(e.kind)?!e.result||e.result.kind!==e.kind||e.location!==`cloud`||e.id!==(e.result.kind===`training_result`?e.result.jobId:e.result.executionId)||e.teamId!==e.result.owner.teamId||e.apiOrigin!==e.result.apiOrigin||e.draft||e.storedDraft||e.revision||e.scopeId||e.sessionId:e.result!==void 0)&&t.addIssue({code:`custom`,path:[`result`],message:`Retain the exact completed result in its original hosted account.`}),e.draft&&(e.kind!==`experiment`||e.id!==e.draft.id||e.location!==`local`||e.scopeId||e.sessionId||e.revision||e.teamId||e.apiOrigin||e.storedDraft)&&t.addIssue({code:`custom`,path:[`draft`],message:`An unsaved draft requires its own local experiment identity.`}),e.storedDraft&&(e.kind!==`experiment`||e.location!==`cloud`||!e.teamId||!e.apiOrigin||e.scopeId||e.sessionId||e.revision)&&t.addIssue({code:`custom`,path:[`storedDraft`],message:`A stored experiment requires its canonical account reference.`})}),F=d({target:P,label:m().max(500),detail:m().max(2e3)}).strict(),I=F.extend({draft:x.optional(),draftRevision:f().int().positive().optional(),storedDraft:S.optional(),resource:E.optional(),dataset:E.optional(),graders:l(E).optional(),training:T.optional(),results:l(M).max(1).optional(),trainingResult:b.optional(),managedModificationResult:g.optional(),engramResult:_.optional(),decisionResult:h.optional(),alphaEditResult:C.optional(),neuronTrainingResult:y.optional(),model:d({id:m(),name:m(),portableProjectId:m(),baseModel:m().nullable(),trainingDataset:d({id:m(),revision:f().int().positive(),name:m()}).nullable(),evaluationDataset:d({id:m(),revision:f().int().positive(),name:m()}).nullable()}).strict().optional()}).strict().superRefine((e,t)=>{let n=e.target.kind,r=e.target.result,i=n===`decision_result`?e.decisionResult:n===`alphaedit_result`?e.alphaEditResult:n===`neuron_training_result`?e.neuronTrainingResult:void 0,a=[e.trainingResult,e.managedModificationResult,e.engramResult,e.decisionResult,e.alphaEditResult,e.neuronTrainingResult].filter(e=>e!==void 0);if(!N.has(n)){(a.length||e.results!==void 0)&&t.addIssue({code:`custom`,message:`Retained results require their exact result selection.`});return}let o=e.results?.[0],s=()=>t.addIssue({code:`custom`,message:`The selected evidence differs from its exact completed result.`});if(!r||!o||w(o)!==w(r)||a.length!==1){s();return}if(r.kind===`training_result`){let t=e.trainingResult,i=t?.candidate,a=i?{artifact:i.artifact,checkpointId:i.checkpointId,composition:i.composition,parent:i.parent}:null;(n!==r.kind||!t||t.candidateState!==`retained`||!i||t.job.id!==r.jobId||t.teamId!==r.owner.teamId||t.job.modelProjectId!==r.modelProjectId||t.job.portableProjectId!==r.portableProjectId||t.job.submissionHash!==r.submissionHash||w(a)!==w(r.candidate)||!t.outputs.receipt||t.outputs.receipt.id!==r.executionReceipt.id||!t.outputs.outputs.some(e=>e.kind===`receipt`&&e.id===`${t.outputs.receipt.id}:output`&&e.contentHash===r.executionReceipt.contentHash))&&s();return}if(r.kind===`managed_modification_result`||r.kind===`engram_result`){let t=r.kind===`engram_result`?e.engramResult:e.managedModificationResult;(n!==r.kind||!t||t.phase!==`completed`||!t.result||t.id!==r.executionId||t.teamId!==r.owner.teamId||t.ownerUserId!==r.owner.actorId||t.projectId!==r.projectId||t.plan.inputHash!==r.inputHash||t.plan.runtimeHash!==r.runtimeHash||t.result.contentHash!==r.resultHash||r.kind===`managed_modification_result`&&(t.method!==r.method||!e.managedModificationResult)||r.kind===`engram_result`&&(!e.engramResult||w({id:e.engramResult.result?.artifact.id,contentHash:e.engramResult.result?.artifact.contentHash})!==w(r.artifact)))&&s();return}let c=i?.result;(!r||r.kind!==n||!o||a.length!==1||!i||!c||i.phase!==`completed`||i.id!==r.executionId||i.teamId!==r.owner.teamId||i.ownerUserId!==r.owner.actorId||i.projectId!==r.projectId||i.plan.inputHash!==r.inputHash||c.modelHash!==r.modelHash||c.runtimeHash!==r.runtimeHash||c.contentHash!==r.resultHash||w(o)!==w(r)||i.schemaVersion===`openpond.managedDecisionExecution.v1`&&(r.kind!==`decision_result`||i.mode!==r.mode)||w(c.artifact?{id:c.artifact.id,contentHash:c.artifact.contentHash}:null)!==w(r.artifact))&&t.addIssue({code:`custom`,message:`The selected evidence differs from its exact completed result.`})}),L=e(t(),1),R=(0,L.createContext)(null),z=(0,L.createContext)(`default`),B=`openpond-chat-context-selected`,V=new Map,H=new Set,U=new Map,W=new Set;function G(e,t){V.set(e,t);for(let e of W)e()}var K=e=>(W.add(e),()=>{W.delete(e)});function q(e,t,r){let i=(0,L.useContext)(z),a=(0,L.useContext)(R),o=`${e?D(e):`disconnected`}:${r??i}`,c=`${o}:${t??`new`}`,l=(0,L.useRef)(c);l.current=c;let u=n(),d=(0,L.useRef)(null),f=(0,L.useSyncExternalStore)(K,()=>V.get(c),()=>void 0),p=(0,L.useSyncExternalStore)(K,()=>H.has(c),()=>!1),m=(0,L.useSyncExternalStore)(K,()=>U.get(c)??null,()=>null),h=j({queryKey:[`chat-context-catalog`,`pages`,o,t],enabled:!!e,staleTime:3e4,initialPageParam:void 0,getNextPageParam:e=>e.nextDraftCursor??void 0,queryFn:async({signal:n,pageParam:r})=>{let i=await k(e,`dataset`,{action:`context_catalog`,payload:{...t?{sessionId:t}:{},...r?{draftCursor:r}:{}}},n);return{...i,options:F.array().parse(i.options)}}}),g={...h,data:(0,L.useMemo)(()=>h.data?{options:[...new Map(h.data.pages.flatMap(e=>e.options).map(e=>[w(e.target),e])).values()],warning:[...new Set(h.data.pages.map(e=>e.warning).filter(Boolean))].join(` `)||null}:void 0,[h.data])},_=s({queryKey:[`chat-context-selection`,c],enabled:!!(e&&t&&!p),refetchInterval:1e4,queryFn:async({signal:n})=>{let r=await k(e,`dataset`,{action:`context_selection`,payload:{sessionId:t}},n),i=r.selection?I.parse(r.selection):null,a=u.getQueryData([`chat-context-catalog`,`pages`,o,t]);return i?.target.scopeId&&a&&!a.pages.some(e=>e.options.some(e=>e.target.scopeId===i.target.scopeId))&&u.invalidateQueries({queryKey:[`chat-context-catalog`,`pages`,o,t]}),i}}),v=t?_.data===void 0?f??null:_.data:f??null;(0,L.useEffect)(()=>{if(!e||!t)return;let n=e=>{e.detail?.sessionId===t&&u.invalidateQueries({queryKey:[`chat-context-selection`,c]})};return window.addEventListener(`openpond-resource-focus-changed`,n),()=>window.removeEventListener(`openpond-resource-focus-changed`,n)},[e,t,c,u]);let y=v?.training?v.training.location===`cloud`?{kind:`model`,id:v.training.job.modelProjectId,location:`cloud`,teamId:v.training.owner.teamId,apiOrigin:v.training.apiOrigin}:{kind:`model`,id:v.training.modelId,location:`local`}:v?.model?v.target:null,b=s({queryKey:[`chat-context-model-runs`,o,y],enabled:!!(e&&y),queryFn:async({signal:t})=>{let n=await k(e,`dataset`,{action:`context_runs`,payload:{target:y}},t);return{runs:F.array().parse(n.runs)}}}),S=(0,L.useCallback)(async(n,r)=>{if(!e)throw Error(`Connect before selecting experiment context.`);if(H.has(c))throw Error(`Wait for the current context selection to finish.`);let i=!1;if(await O(()=>{i=!0}),!i||l.current!==c)return!1;if(H.has(c))throw Error(`Wait for the current context selection to finish.`);H.add(c);for(let e of W)e();try{await u.cancelQueries({queryKey:[`chat-context-selection`,c]});let i=await k(e,`dataset`,{action:`context_select`,payload:{target:n,...r?.newExperiment?{newExperiment:!0}:{},...t?{sessionId:t}:{}}}),a=i.selection?I.parse(i.selection):null;return l.current===c&&(r?.newExperiment&&a?.draft?U.set(c,a.draft.id):U.delete(c),await u.cancelQueries({queryKey:[`chat-context-selection`,c]}),G(c,a),t&&u.setQueryData([`chat-context-selection`,c],a),r?.newExperiment&&u.invalidateQueries({queryKey:[`chat-context-catalog`,`pages`,o,t]}),t&&window.dispatchEvent(new CustomEvent(`openpond-resource-focus-changed`,{detail:{sessionId:t}})),a&&window.dispatchEvent(new CustomEvent(B,{detail:{sessionId:t,scope:o,targetKey:JSON.stringify(a.target)}})),!0)}finally{H.delete(c);for(let e of W)e()}},[e,c,u,o,t]),C=(0,L.useCallback)(async(n,r,i)=>{if(!e||!a?.teamId)throw Error(`The originating account is unavailable.`);await u.cancelQueries({queryKey:[`chat-context-selection`,c]});let o=await k(e,`dataset`,{action:`context_select`,payload:{target:{kind:`training`,id:n,location:`cloud`,teamId:a.teamId,apiOrigin:r},...t?{sessionId:t,sourceDraftId:i}:{}}}),s=o.selection?I.parse(o.selection):null;l.current===c&&(U.delete(c),G(c,s),t&&u.setQueryData([`chat-context-selection`,c],s),t&&window.dispatchEvent(new CustomEvent(`openpond-resource-focus-changed`,{detail:{sessionId:t}})))},[e,a?.teamId,c,t,u]),T=(0,L.useCallback)(e=>{let n=V.get(c);if(n!==void 0){let t=U.get(c);t&&U.set(`${o}:${e}`,t),G(`${o}:${e}`,n),u.setQueryData([`chat-context-selection`,`${o}:${e}`],n)}t||(U.delete(c),G(c,null))},[c,o,u,t]),E=(0,L.useCallback)(async(n,r)=>{if(v?.draft?.hostedEvaluationForm)throw Error(`Open this saved evaluation in its hosted editor to preserve its native settings.`);let i=x.parse(n);if(!e||!v?.draft||v.draft.id!==i.id||!a?.teamId)throw Error(`Reopen the intended experiment in an OpenPond workspace before saving settings.`);if(H.has(c))throw Error(`Wait for the current experiment action to finish.`);H.add(c);for(let e of W)e();try{await u.cancelQueries({queryKey:[`chat-context-selection`,c]});async function n(n){let r=await k(e,`dataset`,{action:`context_save_draft`,payload:{...t?{sessionId:t}:{},target:n.target,update:n.update}});return{saved:I.parse(r.saved),currentSaved:I.parse(r.currentSaved),focused:r.selection?I.parse(r.selection):null}}let s=r===void 0?v.storedDraft??null:r,f=null;if(d.current?.key===c&&(f=await n(d.current),s=f.saved.storedDraft??null,d.current=null),l.current!==c)throw Error(`The active chat or account changed. The draft remains in Experiments.`);if((!f||!s||w(s.draft)!==w(i))&&(d.current={key:c,target:v.target,update:{schemaVersion:`openpond.experimentDraftSave.v1`,teamId:a.teamId,projectId:s?.projectId??null,operationId:`draft-save-${crypto.randomUUID()}`,expectedRevision:s?.revision??0,draft:i}},f=await n(d.current),d.current=null),!f.saved.storedDraft||w(f.saved.draft)!==w(i)||f.currentSaved.storedDraft?.contentHash!==f.saved.storedDraft.contentHash)throw Error(`This experiment changed elsewhere. Your edits are still here; reopen the saved draft to load its current settings.`);return l.current===c&&(await u.cancelQueries({queryKey:[`chat-context-selection`,c]}),G(c,f.focused),t&&u.setQueryData([`chat-context-selection`,c],f.focused),u.invalidateQueries({queryKey:[`chat-context-catalog`,`pages`,o,t]}),u.invalidateQueries({queryKey:[`unified-experiments`]}),t&&window.dispatchEvent(new CustomEvent(`openpond-resource-focus-changed`,{detail:{sessionId:t}}))),f.saved}finally{H.delete(c);for(let e of W)e()}},[e,v,a?.teamId,c,u,o,t]);return{associateTraining:C,selection:v,selecting:p,configureDraftId:m,closeDraftEditor:(0,L.useCallback)(()=>{U.delete(c);for(let e of W)e()},[c]),catalog:g,runs:b,select:S,saveDraft:E,selectionError:_.error,moveToSession:T,scope:o}}export{I as a,R as i,z as n,P as o,q as r,j as s,B as t};
|
package/dist/web/assets/{useLocalAgentSchedules-CUQ1MW4l.js → useLocalAgentSchedules-B09iSkPy.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t}from"./index-
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t}from"./index-DG0kf1wK.js";import{Tn as n}from"./App-CqqK4NLa.js";var r=e(t(),1),i=5e3;function a(e){let[t,a]=(0,r.useState)([]),[s,c]=(0,r.useState)(!1),[l,u]=(0,r.useState)(null),[d,f]=(0,r.useState)(()=>new Set);(0,r.useEffect)(()=>{if(!e){a([]),u(null),c(!1);return}let t=e,r=!1;async function s(e){if(!r){e&&c(!0);try{let e=await n.localAgentSchedules(t);if(r)return;a(e.schedules),u(null)}catch(e){r||u(o(e))}finally{!r&&e&&c(!1)}}}s(!0);let l=window.setInterval(()=>void s(!1),i);return()=>{r=!0,window.clearInterval(l)}},[e]);async function p(){if(e){c(!0);try{let t=await n.syncLocalAgentSchedules(e);a(t.schedules),u(null)}catch(e){u(o(e))}finally{c(!1)}}}async function m(t){if(e&&!d.has(t.id)){g(t.id,!0);try{await n.runLocalAgentSchedule(e,t.id);let r=await n.localAgentSchedules(e);a(r.schedules),u(null)}catch(e){u(o(e))}finally{g(t.id,!1)}}}async function h(t){if(e&&!d.has(t.id)){g(t.id,!0);try{await n.patchLocalAgentSchedule(e,t.id,{enabled:!t.enabled});let r=await n.localAgentSchedules(e);a(r.schedules),u(null)}catch(e){u(o(e))}finally{g(t.id,!1)}}}function g(e,t){f(n=>{let r=new Set(n);return t?r.add(e):r.delete(e),r})}return{error:l,loading:s,pendingScheduleIds:d,refresh:p,run:m,schedules:t,toggle:h}}function o(e){return e instanceof Error?e.message:String(e)}export{a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-CDtTBysF.js";var r=e(t(),1),i=n(),a=r.createContext(void 0),o=e=>{let t=r.useContext(a);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},s=({client:e,children:t})=>(r.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,i.jsx)(a.Provider,{value:e,children:t})),c={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},l=new class{#e=c;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function u(e){setTimeout(e,0)}var d=typeof window>`u`||`Deno`in globalThis;function f(){}function p(e,t){return typeof e==`function`?e(t):e}function m(e){return typeof e==`number`&&e>=0&&e!==1/0}function h(e,t){return Math.max(e+(t||0)-Date.now(),0)}function g(e,t){return typeof e==`function`?e(t):e}function _(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==y(o,t.options))return!1}else if(!x(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function v(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(b(t.options.mutationKey)!==b(a))return!1}else if(!x(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function y(e,t){return(t?.queryKeyHashFn||b)(e)}function b(e){return JSON.stringify(e,(e,t)=>T(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function x(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<t.length;n++)if(!x(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!x(e[r],t[r]))return!1;return!0}return!1}var ee=Object.prototype.hasOwnProperty;function S(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=w(e)&&w(t);if(!r&&!(T(e)&&T(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:ee.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=S(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function C(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function w(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function T(e){if(!E(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!E(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function E(e){return Object.prototype.toString.call(e)===`[object Object]`}function te(e){return new Promise(t=>{l.setTimeout(t,e)})}function D(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:S(e,t)}function ne(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function re(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var O=Symbol();function k(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===O?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function A(e,t){return typeof e==`function`?e(...t):!!e}function ie(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0})),i)}),e}var ae=()=>d,j=()=>ae(),M=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},N=new class extends M{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},oe=u;function se(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=oe,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var P=se(),F=new class extends M{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function ce(e){return Math.min(1e3*2**e,3e4)}function I(e){return(e??`online`)!==`online`||F.isOnline()}var L=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function R(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(f);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new L(t);g(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},p=()=>N.isFocused()&&(e.networkMode===`always`||F.isOnline())&&e.canRun(),m=()=>I(e.networkMode)&&e.canRun(),h=e=>{c()||(r?.(),i=`resolved`,a(e))},g=e=>{c()||(r?.(),i=`rejected`,o(e))},_=()=>new Promise(t=>{r=e=>{(c()||p())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),v=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(h).catch(r=>{if(c())return;let i=e.retry??(j()?0:3),a=e.retryDelay??ce,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);t||!s?g(r):(n++,e.onFail?.(n,r),te(o).then(()=>p()?void 0:_()).then(()=>{t?g(r):v()}))})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:m,start:()=>(m()?v():_().then(v),s)}}var z=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),m(this.gcTime)&&(this.#e=l.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(j()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(l.clearTimeout(this.#e),this.#e=void 0)}};function le(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{ie(e,()=>t.signal,()=>n=!0)},u=k(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?re:ne;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?V:B,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:B(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function B(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function V(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function ue(e,t){return t?B(e,t)!=null:!1}function de(e,t){return!t||!e.getPreviousPageParam?!1:V(e,t)!=null}var fe=class extends z{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=W(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=W(this.options);e.data!==void 0&&(this.setState(U(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=D(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(f).catch(f):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>g(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===O||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>g(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!h(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=k(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?le(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=R({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof L&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof L){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...H(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...U(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),P.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function H(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:I(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function U(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function W(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var G=class extends M{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),K(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return q(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return q(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof g(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!C(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&J(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||g(this.options.enabled,this.#t)!==g(t.enabled,this.#t)||g(this.options.staleTime,this.#t)!==g(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||g(this.options.enabled,this.#t)!==g(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return C(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(f)),t}#h(e){return!j()&&g(this.options.enabled,this.#t)!==!1&&m(e)}#g(){this.#b();let e=g(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=h(this.#r.dataUpdatedAt,e)+1;this.#u=l.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=l.setInterval(()=>{(this.options.refetchIntervalInBackground||N.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(l.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(l.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&K(e,t),o=i&&J(e,n,t,r);(a||o)&&(l={...l,...H(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=D(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=D(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let _=l.fetchStatus===`fetching`,v=m===`pending`,y=m===`error`,b=v&&_,x=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:v,isSuccess:m===`success`,isError:y,isInitialLoading:b,isLoading:b,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:_,isRefetching:_&&!v,isLoadingError:y&&!x,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:y&&x,isStale:Y(e,t),refetch:this.refetch,isEnabled:g(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),C(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();P.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function pe(e,t){return g(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||g(t.retryOnMount,e)!==!1)}function K(e,t){return pe(e,t)||e.state.data!==void 0&&q(e,t,t.refetchOnMount)}function q(e,t,n){if(g(t.enabled,e)!==!1&&g(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Y(e,t)}return!1}function J(e,t,n,r){return(e!==t||g(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Y(e,n)}function Y(e,t){return g(t.enabled,e)!==!1&&e.isStaleByTime(g(t.staleTime,e))}var X=r.createContext(!1),Z=()=>r.useContext(X);X.Provider;function me(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var he=r.createContext(me()),ge=()=>r.useContext(he),_e=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?A(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},Q=e=>{r.useEffect(()=>{e.clearReset()},[e])},ve=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||A(n,[e.error,r])),ye=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},be=(e,t)=>e?.suspense&&t.isPending,xe=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function $(e,t,n){let i=Z(),a=ge(),s=o(n),c=s.defaultQueryOptions(e),l=s.getQueryCache().get(c.queryHash),u=e.subscribed!==!1;c._optimisticResults=i?`isRestoring`:u?`optimistic`:void 0,ye(c),_e(c,a,l),Q(a);let[d]=r.useState(()=>new t(s,c)),p=d.getOptimisticResult(c),m=!i&&u;if(r.useSyncExternalStore(r.useCallback(e=>{let t=m?d.subscribe(P.batchCalls(e)):f;return d.updateResult(),t},[d,m]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),r.useEffect(()=>{d.setOptions(c)},[c,d]),be(c,p))throw xe(c,d,a);if(ve({result:p,errorResetBoundary:a,throwOnError:c.throwOnError,query:l,suspense:c.suspense}))throw p.error;return c.notifyOnChangeProps?p:d.trackResult(p)}function Se(e,t){return $(e,G,t)}export{C as A,y as C,x as D,f as E,O as M,s as N,S as O,o as P,b as S,_ as T,F as _,be as a,M as b,Q as c,G as d,fe as f,R as g,z as h,xe as i,A as j,g as k,ge as l,de as m,$ as n,_e as o,ue as p,ye as r,ve as s,Se as t,Z as u,P as v,v as w,p as x,N as y};
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-DG0kf1wK.js";var r=e(t(),1),i=n(),a=r.createContext(void 0),o=e=>{let t=r.useContext(a);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},s=({client:e,children:t})=>(r.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,i.jsx)(a.Provider,{value:e,children:t})),c={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},l=new class{#e=c;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function u(e){setTimeout(e,0)}var d=typeof window>`u`||`Deno`in globalThis;function f(){}function p(e,t){return typeof e==`function`?e(t):e}function m(e){return typeof e==`number`&&e>=0&&e!==1/0}function h(e,t){return Math.max(e+(t||0)-Date.now(),0)}function g(e,t){return typeof e==`function`?e(t):e}function _(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==y(o,t.options))return!1}else if(!x(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function v(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(b(t.options.mutationKey)!==b(a))return!1}else if(!x(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function y(e,t){return(t?.queryKeyHashFn||b)(e)}function b(e){return JSON.stringify(e,(e,t)=>T(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function x(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<t.length;n++)if(!x(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!x(e[r],t[r]))return!1;return!0}return!1}var ee=Object.prototype.hasOwnProperty;function S(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=w(e)&&w(t);if(!r&&!(T(e)&&T(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:ee.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=S(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function C(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function w(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function T(e){if(!E(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!E(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function E(e){return Object.prototype.toString.call(e)===`[object Object]`}function te(e){return new Promise(t=>{l.setTimeout(t,e)})}function D(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:S(e,t)}function ne(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function re(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var O=Symbol();function k(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===O?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function A(e,t){return typeof e==`function`?e(...t):!!e}function ie(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0})),i)}),e}var ae=()=>d,j=()=>ae(),M=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},N=new class extends M{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},oe=u;function se(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=oe,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var P=se(),F=new class extends M{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function ce(e){return Math.min(1e3*2**e,3e4)}function I(e){return(e??`online`)!==`online`||F.isOnline()}var L=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function R(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(f);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new L(t);g(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},p=()=>N.isFocused()&&(e.networkMode===`always`||F.isOnline())&&e.canRun(),m=()=>I(e.networkMode)&&e.canRun(),h=e=>{c()||(r?.(),i=`resolved`,a(e))},g=e=>{c()||(r?.(),i=`rejected`,o(e))},_=()=>new Promise(t=>{r=e=>{(c()||p())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),v=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(h).catch(r=>{if(c())return;let i=e.retry??(j()?0:3),a=e.retryDelay??ce,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);t||!s?g(r):(n++,e.onFail?.(n,r),te(o).then(()=>p()?void 0:_()).then(()=>{t?g(r):v()}))})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:m,start:()=>(m()?v():_().then(v),s)}}var z=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),m(this.gcTime)&&(this.#e=l.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(j()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(l.clearTimeout(this.#e),this.#e=void 0)}};function le(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{ie(e,()=>t.signal,()=>n=!0)},u=k(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?re:ne;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?V:B,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:B(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function B(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function V(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function ue(e,t){return t?B(e,t)!=null:!1}function de(e,t){return!t||!e.getPreviousPageParam?!1:V(e,t)!=null}var fe=class extends z{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=W(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=W(this.options);e.data!==void 0&&(this.setState(U(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=D(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(f).catch(f):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>g(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===O||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>g(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!h(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=k(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?le(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=R({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof L&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof L){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...H(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...U(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),P.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function H(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:I(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function U(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function W(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var G=class extends M{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),K(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return q(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return q(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof g(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!C(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&J(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||g(this.options.enabled,this.#t)!==g(t.enabled,this.#t)||g(this.options.staleTime,this.#t)!==g(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||g(this.options.enabled,this.#t)!==g(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return C(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(f)),t}#h(e){return!j()&&g(this.options.enabled,this.#t)!==!1&&m(e)}#g(){this.#b();let e=g(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=h(this.#r.dataUpdatedAt,e)+1;this.#u=l.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=l.setInterval(()=>{(this.options.refetchIntervalInBackground||N.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(l.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(l.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&K(e,t),o=i&&J(e,n,t,r);(a||o)&&(l={...l,...H(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=D(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=D(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let _=l.fetchStatus===`fetching`,v=m===`pending`,y=m===`error`,b=v&&_,x=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:v,isSuccess:m===`success`,isError:y,isInitialLoading:b,isLoading:b,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:_,isRefetching:_&&!v,isLoadingError:y&&!x,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:y&&x,isStale:Y(e,t),refetch:this.refetch,isEnabled:g(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),C(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();P.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function pe(e,t){return g(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||g(t.retryOnMount,e)!==!1)}function K(e,t){return pe(e,t)||e.state.data!==void 0&&q(e,t,t.refetchOnMount)}function q(e,t,n){if(g(t.enabled,e)!==!1&&g(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Y(e,t)}return!1}function J(e,t,n,r){return(e!==t||g(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Y(e,n)}function Y(e,t){return g(t.enabled,e)!==!1&&e.isStaleByTime(g(t.staleTime,e))}var X=r.createContext(!1),Z=()=>r.useContext(X);X.Provider;function me(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var he=r.createContext(me()),ge=()=>r.useContext(he),_e=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?A(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},Q=e=>{r.useEffect(()=>{e.clearReset()},[e])},ve=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||A(n,[e.error,r])),ye=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},be=(e,t)=>e?.suspense&&t.isPending,xe=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function $(e,t,n){let i=Z(),a=ge(),s=o(n),c=s.defaultQueryOptions(e),l=s.getQueryCache().get(c.queryHash),u=e.subscribed!==!1;c._optimisticResults=i?`isRestoring`:u?`optimistic`:void 0,ye(c),_e(c,a,l),Q(a);let[d]=r.useState(()=>new t(s,c)),p=d.getOptimisticResult(c),m=!i&&u;if(r.useSyncExternalStore(r.useCallback(e=>{let t=m?d.subscribe(P.batchCalls(e)):f;return d.updateResult(),t},[d,m]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),r.useEffect(()=>{d.setOptions(c)},[c,d]),be(c,p))throw xe(c,d,a);if(ve({result:p,errorResetBoundary:a,throwOnError:c.throwOnError,query:l,suspense:c.suspense}))throw p.error;return c.notifyOnChangeProps?p:d.trackResult(p)}function Se(e,t){return $(e,G,t)}export{C as A,y as C,x as D,f as E,O as M,s as N,S as O,o as P,b as S,_ as T,F as _,be as a,M as b,Q as c,G as d,fe as f,R as g,z as h,xe as i,A as j,g as k,ge as l,de as m,$ as n,_e as o,ue as p,ye as r,ve as s,Se as t,Z as u,P as v,v as w,p as x,N as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./icons-
|
|
1
|
+
import{t as e}from"./icons-nr5d1kC-.js";var t=e(`bell`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),n=e(`bell-off`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`,key:`178tsu`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`,key:`1hqiys`}]]),r=e(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),i=e(`wifi-off`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}],[`path`,{d:`M5 12.859a10 10 0 0 1 5.17-2.69`,key:`1dl1wf`}],[`path`,{d:`M19 12.859a10 10 0 0 0-2.007-1.523`,key:`4k23kn`}],[`path`,{d:`M2 8.82a15 15 0 0 1 4.177-2.643`,key:`1grhjp`}],[`path`,{d:`M22 8.82a15 15 0 0 0-11.288-3.764`,key:`z3jwby`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]);export{t as i,r as n,n as r,i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e}from"./WorkspaceMonacoEditor-
|
|
1
|
+
import{s as e}from"./WorkspaceMonacoEditor-ChBjvgxE.js";import"./toggleHighContrast-CP0qM8JR.js";function t(e,t){let n=globalThis.MonacoEnvironment;if(n?.createTrustedTypesPolicy)try{return n.createTrustedTypesPolicy(e,t)}catch(e){console.error(e);return}try{return globalThis.trustedTypes?.createPolicy(e,t)}catch(e){console.error(e);return}}var n=typeof self==`object`&&self.constructor&&self.constructor.name===`DedicatedWorkerGlobalScope`&&globalThis.workerttPolicy!==void 0?globalThis.workerttPolicy:t(`defaultWorkerFactory`,{createScriptURL:e=>e});function r(e){let t=e.label,r=globalThis.MonacoEnvironment;if(r){if(typeof r.getWorker==`function`)return r.getWorker(`workerMain.js`,t);if(typeof r.getWorkerUrl==`function`){let e=r.getWorkerUrl(`workerMain.js`,t);return new Worker(n?n.createScriptURL(e):e,{name:t,type:`module`})}}if(e.createWorker)return e.createWorker();throw Error(`You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker`)}function i(t){let n=Promise.resolve(r({label:t.label??`monaco-editor-worker`,moduleId:t.moduleId,createWorker:t.createWorker})).then(e=>(e.postMessage(`ignore`),e.postMessage(t.createData),e));return e.createWebWorker({worker:n,host:t.host,keepIdleModels:t.keepIdleModels})}export{i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./icons-nr5d1kC-.js";var t=e(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./WorkspaceMonacoEditor-
|
|
1
|
+
import{c as e}from"./WorkspaceMonacoEditor-ChBjvgxE.js";import"./toggleHighContrast-CP0qM8JR.js";var t={comments:{lineComment:`#`},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:e.IndentAction.Indent}}]},n={tokenPostfix:`.yaml`,brackets:[{token:`delimiter.bracket`,open:`{`,close:`}`},{token:`delimiter.square`,open:`[`,close:`]`}],keywords:[`true`,`True`,`TRUE`,`false`,`False`,`FALSE`,`null`,`Null`,`Null`,`~`],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:`@whitespace`},{include:`@comment`},[/%[^ ]+.*$/,`meta.directive`],[/---/,`operators.directivesEnd`],[/\.{3}/,`operators.documentEnd`],[/[-?:](?= )/,`operators`],{include:`@anchor`},{include:`@tagHandle`},{include:`@flowCollections`},{include:`@blockStyle`},[/@numberInteger(?![ \t]*\S+)/,`number`],[/@numberFloat(?![ \t]*\S+)/,`number.float`],[/@numberOctal(?![ \t]*\S+)/,`number.octal`],[/@numberHex(?![ \t]*\S+)/,`number.hex`],[/@numberInfinity(?![ \t]*\S+)/,`number.infinity`],[/@numberNaN(?![ \t]*\S+)/,`number.nan`],[/@numberDate(?![ \t]*\S+)/,`number.date`],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,[`type`,`white`,`operators`,`white`]],{include:`@flowScalars`},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],object:[{include:`@whitespace`},{include:`@comment`},[/\}/,`@brackets`,`@pop`],[/,/,`delimiter.comma`],[/:(?= )/,`operators`],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,`type`],{include:`@flowCollections`},{include:`@flowScalars`},{include:`@tagHandle`},{include:`@anchor`},{include:`@flowNumber`},[/[^\},]+/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],array:[{include:`@whitespace`},{include:`@comment`},[/\]/,`@brackets`,`@pop`],[/,/,`delimiter.comma`],{include:`@flowCollections`},{include:`@flowScalars`},{include:`@tagHandle`},{include:`@anchor`},{include:`@flowNumber`},[/[^\],]+/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],multiString:[[/^( +).+$/,`string`,`@multiStringContinued.$1`]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":`string`,"@default":{token:`@rematch`,next:`@popall`}}}]],whitespace:[[/[ \t\r\n]+/,`white`]],comment:[[/#.*$/,`comment`]],flowCollections:[[/\[/,`@brackets`,`@array`],[/\{/,`@brackets`,`@object`]],flowScalars:[[/"([^"\\]|\\.)*$/,`string.invalid`],[/'([^'\\]|\\.)*$/,`string.invalid`],[/'[^']*'/,`string`],[/"/,`string`,`@doubleQuotedString`]],doubleQuotedString:[[/[^\\"]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/"/,`string`,`@pop`]],blockStyle:[[/[>|][0-9]*[+-]?$/,`operators`,`@multiString`]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,`number`],[/@numberFloat(?=[ \t]*[,\]\}])/,`number.float`],[/@numberOctal(?=[ \t]*[,\]\}])/,`number.octal`],[/@numberHex(?=[ \t]*[,\]\}])/,`number.hex`],[/@numberInfinity(?=[ \t]*[,\]\}])/,`number.infinity`],[/@numberNaN(?=[ \t]*[,\]\}])/,`number.nan`],[/@numberDate(?=[ \t]*[,\]\}])/,`number.date`]],tagHandle:[[/\![^ ]*/,`tag`]],anchor:[[/[&*][^ ]+/,`namespace`]]}};export{t as conf,n as language};
|
package/dist/web/index.html
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
|
|
10
10
|
<link rel="apple-touch-icon" href="/openpond-icon.png" />
|
|
11
11
|
<title>OpenPond App</title>
|
|
12
|
-
<script type="module" crossorigin src="/assets/index-
|
|
12
|
+
<script type="module" crossorigin src="/assets/index-DG0kf1wK.js"></script>
|
|
13
13
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-Dd_uD5pT.js">
|
|
14
14
|
<link rel="stylesheet" crossorigin href="/assets/index-g7UqJhnX.css">
|
|
15
15
|
</head>
|