@p4code/cli 0.9.15 → 0.9.17

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.
Files changed (422) hide show
  1. package/dist/AcpMcpStdioBridge-Bv41U5Ym.mjs +3 -0
  2. package/dist/{AcpMcpStdioBridge-BPNHFfTr.mjs → AcpMcpStdioBridge-CvhQaaYj.mjs} +3 -3
  3. package/dist/{Effect-COOccdaU.mjs → Effect-_Rz7VLdg.mjs} +33 -2
  4. package/dist/{Schema-BXiVImR2.mjs → Schema-APnY3Ozr.mjs} +2 -2
  5. package/dist/{Stream-D2XZdzH6.mjs → Stream-CJtpwu3-.mjs} +2 -2
  6. package/dist/bin.mjs +2 -2
  7. package/dist/{binCli-06acKUH_.mjs → binCli-B298WI-F.mjs} +6254 -4331
  8. package/dist/claude-history-worker.mjs +1 -1
  9. package/dist/{claudeHistoryWorker-BJKXFgWC.mjs → claudeHistoryWorker-Dgk6e0nY.mjs} +2 -2
  10. package/dist/client/.vite/manifest.json +2296 -2067
  11. package/dist/client/assets/{2NI2N5EU-CzVcbH89.js → 2NI2N5EU-D4f5i1y_.js} +2 -2
  12. package/dist/client/assets/{4UO7MD6I-DS3UFSUE.js → 4UO7MD6I-RrpAQ0X1.js} +2 -2
  13. package/dist/client/assets/{5B3SVYGG-lbor_c4_.js → 5B3SVYGG-ClZSmzf_.js} +2 -2
  14. package/dist/client/assets/{5GK6JWQ2-DufacBFC.js → 5GK6JWQ2-B1md9I9Z.js} +2 -2
  15. package/dist/client/assets/{5N7A7DKN-B3iWX-TC.js → 5N7A7DKN-BQIARO23.js} +2 -2
  16. package/dist/client/assets/{5OC2THR4-DoDDWXtD.js → 5OC2THR4-351ZCzKk.js} +2 -2
  17. package/dist/client/assets/{5S6HY5KT-7n94quvm.js → 5S6HY5KT-DmJkK7tt.js} +2 -2
  18. package/dist/client/assets/{6IMQ5BUJ-CqcR9lZq.js → 6IMQ5BUJ-BpvNx_p4.js} +2 -2
  19. package/dist/client/assets/{6OLKWJ4F-BeCI6be_.js → 6OLKWJ4F-C2xPWRsp.js} +2 -2
  20. package/dist/client/assets/{74OO7NKP-XWvi4Kgp.js → 74OO7NKP--xC0IYpN.js} +2 -2
  21. package/dist/client/assets/{75O6YZUN-BbbGiqdI.js → 75O6YZUN-CK0ONIHW.js} +2 -2
  22. package/dist/client/assets/{77XECAW3-BVGMXOi_.js → 77XECAW3-BcsWkjLy.js} +2 -2
  23. package/dist/client/assets/{ABYRPUBD-D4oehH5y.js → ABYRPUBD-D3uBdyxY.js} +2 -2
  24. package/dist/client/assets/AlertDialogRoot-CPanDrss.js +2 -0
  25. package/dist/client/assets/{AnimatedHeight-DT585xP0.js → AnimatedHeight-CVfEvZ5q.js} +2 -2
  26. package/dist/client/assets/{AuthSurfaceShell-C312CXz7.js → AuthSurfaceShell-Cfzl0v4C.js} +2 -2
  27. package/dist/client/assets/{BB2UYUI2-BkFcdWkE.js → BB2UYUI2-BOnjWgZo.js} +2 -2
  28. package/dist/client/assets/{BUM34MOA-DK6xDbTB.js → BUM34MOA-B7RHMom2.js} +2 -2
  29. package/dist/client/assets/{CEQABKGZ-rLn9wSBN.js → CEQABKGZ-Cc9Oxare.js} +2 -2
  30. package/dist/client/assets/{CXAC5362-C1eQCQMX.js → CXAC5362-BNdOJTpr.js} +2 -2
  31. package/dist/client/assets/ChatGptUsageButton-xIp-6pmC.js +2 -0
  32. package/dist/client/assets/{ChatMarkdown-BUoR67CT.js → ChatMarkdown-Bueup3X5.js} +24 -24
  33. package/dist/client/assets/CheckboxIndicator-Bx7Oi3gX.js +2 -0
  34. package/dist/client/assets/ClippedText-CIorIVl7.js +2 -0
  35. package/dist/client/assets/CodexSetupSection.logic-C7e1n48R.js +2 -0
  36. package/dist/client/assets/ComboboxClear-HZ-hIKnq.js +2 -0
  37. package/dist/client/assets/ComboboxGroupLabel-DUYNaL5F.js +2 -0
  38. package/dist/client/assets/{CommandBlock-40eSIrOe.js → CommandBlock-4iMcWKQI.js} +2 -2
  39. package/dist/client/assets/CompositeRoot-BBK88_pH.js +2 -0
  40. package/dist/client/assets/ConnectAgentSurface-BWOV2eWU.js +2 -0
  41. package/dist/client/assets/{ConnectionStatusDot-7Tjfknn6.js → ConnectionStatusDot-ChSEZVFH.js} +2 -2
  42. package/dist/client/assets/DRACOLoader-DluumOSd.js +3 -0
  43. package/dist/client/assets/{DRLTVNUE-BPoomdQn.js → DRLTVNUE-DFsymRUq.js} +2 -2
  44. package/dist/client/assets/{DYY6UVD2-BVvdA84B.js → DYY6UVD2-CBGlYjYj.js} +2 -2
  45. package/dist/client/assets/DevicePanel-DbUlYPs5.js +2 -0
  46. package/dist/client/assets/DeviceSetup-DwoJ9gYG.js +2 -0
  47. package/dist/client/assets/DialogTitle-CZ-x-t6r.js +2 -0
  48. package/dist/client/assets/{DiffCommentAnnotation-C28NAT6f.js → DiffCommentAnnotation-I1NLNQ4a.js} +3 -3
  49. package/dist/client/assets/{DiffFileTree-DNP9E3To.js → DiffFileTree-D2Less6B.js} +2 -2
  50. package/dist/client/assets/DiffPanel-CbeaPGl7.js +2 -0
  51. package/dist/client/assets/{DiffWorkerPoolProvider-TgqbZJCv.js → DiffWorkerPoolProvider-Ed_Eu_5j.js} +3 -3
  52. package/dist/client/assets/{EmbeddedDesign-B4RMmwTG.css → EmbeddedDesign-2h_Gl1nY.css} +1 -1
  53. package/dist/client/assets/EmbeddedDesign-cg069GMG.js +22 -0
  54. package/dist/client/assets/{EnvironmentMachineIcon-B81Bujkx.js → EnvironmentMachineIcon-DX1kvIxN.js} +2 -2
  55. package/dist/client/assets/{ExpandableText-CViqRFUp.js → ExpandableText-DjawxN-Z.js} +2 -2
  56. package/dist/client/assets/{FNOVOB4O-CmMgcKnc.js → FNOVOB4O-CyUhwNfJ.js} +2 -2
  57. package/dist/client/assets/FieldControl-HtKPFtzy.js +2 -0
  58. package/dist/client/assets/{FileDiff-BnZVGRTP.js → FileDiff-B-y5La4j.js} +2 -2
  59. package/dist/client/assets/{FilePreviewPanel-BUTTBdpa.js → FilePreviewPanel-c9WvfrZ_.js} +6 -6
  60. package/dist/client/assets/{FoldedSettingsSection-CioXtXIT.js → FoldedSettingsSection-BJZLAjOM.js} +2 -2
  61. package/dist/client/assets/FormContext-CXpUoAJn.js +2 -0
  62. package/dist/client/assets/GLTFLoader-DL026JyV.js +3833 -0
  63. package/dist/client/assets/{HDGCDEEZ-BsN0BbNt.js → HDGCDEEZ-Bl6z86eT.js} +2 -2
  64. package/dist/client/assets/{HSJLKHB7-Bn8VFRt5.js → HSJLKHB7-Cfn1dqKq.js} +2 -2
  65. package/dist/client/assets/{Icons-D_LFMxsj.js → Icons-CnCqDzcX.js} +2 -2
  66. package/dist/client/assets/Input-DivTTwcy.js +2 -0
  67. package/dist/client/assets/IntervalSecondsField-BEYqyqtO.js +2 -0
  68. package/dist/client/assets/JZOYTAAL-5Iy_ls5m.js +1 -0
  69. package/dist/client/assets/{K3MD6TGW-BEaTend7.js → K3MD6TGW-DbKn4Q-g.js} +2 -2
  70. package/dist/client/assets/{K7RP3OMA-Ca837W6z.js → K7RP3OMA-C2LcLP3I.js} +2 -2
  71. package/dist/client/assets/KeybindingsSettings.logic-BBUqSPsh.js +2 -0
  72. package/dist/client/assets/{LHDIQX7Q-kLYZmy22.js → LHDIQX7Q-D15jphae.js} +2 -2
  73. package/dist/client/assets/{LUXOKEGN-C6-9ARpy.js → LUXOKEGN-a5epevQp.js} +2 -2
  74. package/dist/client/assets/LinkMachineSelect-BeDb1a2o.js +2 -0
  75. package/dist/client/assets/{MathTypeset-CO0wlzDm.js → MathTypeset-wh9NB-6n.js} +2 -2
  76. package/dist/client/assets/ModelLiveLayer-vM3B8fTs.js +3 -0
  77. package/dist/client/assets/{N3JZAHOW-BFAKVTw8.js → N3JZAHOW-CnXyo2Xv.js} +2 -2
  78. package/dist/client/assets/{NUIALGQ3-DJg3tvBl.js → NUIALGQ3-Be5ePBJU.js} +2 -2
  79. package/dist/client/assets/{NoProjectsHero-ClDVFY0-.js → NoProjectsHero-D-hOorzE.js} +2 -2
  80. package/dist/client/assets/{O65XPQGZ-C5dkxqix.js → O65XPQGZ-B6ecTWo6.js} +2 -2
  81. package/dist/client/assets/{O7XIQ6OM-BUT403yQ.js → O7XIQ6OM-DvY9hhop.js} +2 -2
  82. package/dist/client/assets/{OFQON5FD-BPK3FXUG.js → OFQON5FD-Csir9i2q.js} +2 -2
  83. package/dist/client/assets/P4ConnectAccountPages-0UQXNoHX.js +2 -0
  84. package/dist/client/assets/{P4ConnectSidebarSignIn-D7BBbl_u.js → P4ConnectSidebarSignIn-DNS-Ar_U.js} +2 -2
  85. package/dist/client/assets/{PJQHF43J-DrfICuu-.js → PJQHF43J-DDRN0fWF.js} +2 -2
  86. package/dist/client/assets/PanelLayoutControls-1wZHYpgc.js +216 -0
  87. package/dist/client/assets/PierreEntryIcon-C-UBRZGs.js +2 -0
  88. package/dist/client/assets/PopoverHandle-AuBayEmY.js +2 -0
  89. package/dist/client/assets/PreviewPanel-5UQIDtjs.js +2 -0
  90. package/dist/client/assets/ProjectDefaultsSettings-BuSgjMGJ.js +2 -0
  91. package/dist/client/assets/{ProjectFavicon-BbtNdeB8.js → ProjectFavicon-Rj7LmbUX.js} +3 -3
  92. package/dist/client/assets/ProjectIconPickerDialog-75VZboJk.js +2 -0
  93. package/dist/client/assets/{ProjectMonogram-CjAGnMXr.js → ProjectMonogram-o7ZBa1RK.js} +2 -2
  94. package/dist/client/assets/{ProviderAuthTerminal-83vDClUK.js → ProviderAuthTerminal-884jYkPg.js} +2 -2
  95. package/dist/client/assets/ProviderModelPicker-446NiacH.js +2 -0
  96. package/dist/client/assets/ProviderSettingsForm-CBS1Dlfm.js +2 -0
  97. package/dist/client/assets/PullRequestCodeTab-DQzL88wU.js +6 -0
  98. package/dist/client/assets/{RHNBAITX-CzAdLNMd.js → RHNBAITX-DkWE42El.js} +2 -2
  99. package/dist/client/assets/{ReadOnlySourcePreview-CRy5hHfx.js → ReadOnlySourcePreview-DwfiVQrm.js} +2 -2
  100. package/dist/client/assets/{RedactedSensitiveText-B-u4PB3I.js → RedactedSensitiveText-DCu9USVF.js} +2 -2
  101. package/dist/client/assets/{RenderErrorBoundary-BbxLD-66.js → RenderErrorBoundary-ZQ6mGx7s.js} +3 -3
  102. package/dist/client/assets/RightPanelResizeHandle-8oJQkwcU.js +2 -0
  103. package/dist/client/assets/RoomEnvironment-Iz7-KYrN.js +2 -0
  104. package/dist/client/assets/{SLD4V6NK-DIFaAadw.js → SLD4V6NK-DTdKN7s4.js} +2 -2
  105. package/dist/client/assets/ScheduledTasksSettings-BFBxrkf4.js +6 -0
  106. package/dist/client/assets/{ScopedSwitch-sSIKDf2q.js → ScopedSwitch-BC1gPotW.js} +2 -2
  107. package/dist/client/assets/ScrollAreaCorner-C2BGnFEt.js +2 -0
  108. package/dist/client/assets/{SecretInput-DxjaAnSE.js → SecretInput-CTGlsesz.js} +2 -2
  109. package/dist/client/assets/SelectScrollUpArrow-BCdPJCNh.js +2 -0
  110. package/dist/client/assets/SelfImproveSettingsSection-DrWeWHZ3.js +2 -0
  111. package/dist/client/assets/SettingsPanels-dLjfE4mE.js +46 -0
  112. package/dist/client/assets/SettingsPanels.logic-DmWR8tPG.js +2 -0
  113. package/dist/client/assets/{SettingsScopeNotice-B1JDmqM6.js → SettingsScopeNotice-C3QzVYEB.js} +2 -2
  114. package/dist/client/assets/{SidebarStageBackdrop-Bbv3JBlJ.js → SidebarStageBackdrop-B1pFHa1_.js} +2 -2
  115. package/dist/client/assets/{T3PCR2KE-CACWvOHn.js → T3PCR2KE-17rNrwIa.js} +2 -2
  116. package/dist/client/assets/{TKWO2OVW-DpiGaVko.js → TKWO2OVW-duPpJj5d.js} +2 -2
  117. package/dist/client/assets/{TSHNXIZL-Cs6g4gXN.js → TSHNXIZL-DU0_NvP6.js} +2 -2
  118. package/dist/client/assets/{ThemeEditorPanel-w-RJEK3t.js → ThemeEditorPanel-75j9OkFZ.js} +3 -3
  119. package/dist/client/assets/{ThreadDetailsItemsMenu-DEwUOoLt.js → ThreadDetailsItemsMenu-D9bVwLRx.js} +45 -45
  120. package/dist/client/assets/ThreadTerminalDrawer-CdfREoC-.js +5 -0
  121. package/dist/client/assets/TooltipProvider-BUHMH_xT.js +2 -0
  122. package/dist/client/assets/{UQJE5E4I-C2gKDRv_.js → UQJE5E4I-B6R9z_Jl.js} +2 -2
  123. package/dist/client/assets/{USNYFO5S-CQ8LfY6F.js → USNYFO5S-CoqkxDVj.js} +2 -2
  124. package/dist/client/assets/{Virtualizer-DsEq6qUF.js → Virtualizer-CmU5Fo0Z.js} +2 -2
  125. package/dist/client/assets/{WEVWDWVA-DK2GTAKk.js → WEVWDWVA-C_7PWsV9.js} +2 -2
  126. package/dist/client/assets/{WorkspaceBreadcrumb-BImJJpuo.js → WorkspaceBreadcrumb-wSY6JpgP.js} +2 -2
  127. package/dist/client/assets/{WorkspacePageContainer-BlYFBUKE.js → WorkspacePageContainer-Bv3Si0zJ.js} +2 -2
  128. package/dist/client/assets/{WorkspacePageHeader-B7O16593.js → WorkspacePageHeader-D35ZiFO-.js} +2 -2
  129. package/dist/client/assets/{X5RFHQXM-sPxDCIwv.js → X5RFHQXM-BUhlFLY4.js} +2 -2
  130. package/dist/client/assets/{X62E3GBT-DVWr270S.js → X62E3GBT-BpMRLXKj.js} +2 -2
  131. package/dist/client/assets/{XBNEOJTC-C4ZNtSrU.js → XBNEOJTC-BRtSarTS.js} +2 -2
  132. package/dist/client/assets/{YHV2MVVZ-aSYUfq9n.js → YHV2MVVZ-Csy6jL8n.js} +2 -2
  133. package/dist/client/assets/{YURCZMG2-fnxZxUja.js → YURCZMG2-BWgVyhae.js} +2 -2
  134. package/dist/client/assets/{YVG2LODB-DxaZKaXT.js → YVG2LODB-BaRjN-Cm.js} +2 -2
  135. package/dist/client/assets/_chat-3NFUtZzk.js +47 -0
  136. package/dist/client/assets/_chat.design-CPUGyCaX.js +2 -0
  137. package/dist/client/assets/{_chat.index-D1csjyRQ.js → _chat.index-BMWR9-dz.js} +2 -2
  138. package/dist/client/assets/_chat.new-CFxwzp_c.js +4 -0
  139. package/dist/client/assets/_chat.pull-requests-BeA7vnLo.js +2 -0
  140. package/dist/client/assets/alert-DNQ3Wqlu.js +2 -0
  141. package/dist/client/assets/{alert-dialog-BCq0Qme9.js → alert-dialog-BRZulAlJ.js} +2 -2
  142. package/dist/client/assets/{assetUrls-CpRsTTqn.js → assetUrls-C1PZWceM.js} +2 -2
  143. package/dist/client/assets/assets-DPxWpbK1.js +2 -0
  144. package/dist/client/assets/browserHistoryStore-or0m8nek.js +2 -0
  145. package/dist/client/assets/{browserLinkTarget-IOprEiHF.js → browserLinkTarget-DE8VZ118.js} +2 -2
  146. package/dist/client/assets/{checkbox-CGhJug34.js → checkbox-Cz3A131i.js} +2 -2
  147. package/dist/client/assets/{color-picker-CRaqqL5F.js → color-picker-BqJjpRIx.js} +2 -2
  148. package/dist/client/assets/combobox-D28ATySv.js +2 -0
  149. package/dist/client/assets/{command-06bu9QoQ.js → command-BjQ8TOGE.js} +2 -2
  150. package/dist/client/assets/{connect-7OV1IEwO.js → connect-CpfP9Azm.js} +2 -2
  151. package/dist/client/assets/connect-agent-19TQkO9t.js +2 -0
  152. package/dist/client/assets/design-Bz1IpqHZ.js +2 -0
  153. package/dist/client/assets/device-DuASmK9r.js +2 -0
  154. package/dist/client/assets/dialog-BJ3R7bWN.js +2 -0
  155. package/dist/client/assets/diffPanelStore-Yh6lox6N.js +2 -0
  156. package/dist/client/assets/{diffRendering-DAzPanqh.js → diffRendering-CeqwU9XS.js} +2 -2
  157. package/dist/client/assets/{dist-BuxsAlG0.js → dist-C2W3DEZU.js} +3 -3
  158. package/dist/client/assets/draco_decoder-DZ63_CFx.js +2 -0
  159. package/dist/client/assets/draco_decoder-Z1_iN-Ht.wasm +0 -0
  160. package/dist/client/assets/draco_wasm_wrapper-9cRAE0qV.js +2 -0
  161. package/dist/client/assets/draco_wasm_wrapper-fZCQGLGb.js +116 -0
  162. package/dist/client/assets/draft-input-D7yqLT1A.js +2 -0
  163. package/dist/client/assets/duoViewer-DQzDc4Z4.js +2 -0
  164. package/dist/client/assets/{dynamic-wBSCLNxy.js → dynamic-Dz4eLTaa.js} +3 -3
  165. package/dist/client/assets/{embeddedScripts-ZebptRJ0.js → embeddedScripts-DZ2Ii9dE.js} +2 -2
  166. package/dist/client/assets/empty-BwsFVBxJ.js +2 -0
  167. package/dist/client/assets/entities-CNmVqAZs.js +2 -0
  168. package/dist/client/assets/{fileLinks-BfcK2bJU.js → fileLinks-E3IIVHgM.js} +2 -2
  169. package/dist/client/assets/{fileTreeExpansion-DjiK1m5s.js → fileTreeExpansion-gTas243c.js} +2 -2
  170. package/dist/client/assets/{getDiffFileInput-XE3jyXxK.js → getDiffFileInput-CUXcOkYa.js} +2 -2
  171. package/dist/client/assets/{htmlRender-DGe3WaPg.js → htmlRender-DSw3CY7L.js} +2 -2
  172. package/dist/client/assets/hubAccess-CsZ8CNmg.js +2 -0
  173. package/dist/client/assets/image-up-f7X837EZ.js +2 -0
  174. package/dist/client/assets/{index-CurDuwfz.js → index-Bxj8VaXa.js} +3 -3
  175. package/dist/client/assets/{input-CQaedaQh.js → input-BwujRX3Y.js} +2 -2
  176. package/dist/client/assets/input-group-euoW8Z7h.js +2 -0
  177. package/dist/client/assets/{kbd-DQRicdHu.js → kbd-GiLKf_On.js} +2 -2
  178. package/dist/client/assets/keybindings-CCmLKtII.js +2 -0
  179. package/dist/client/assets/{lazy-DmPH_lNd.js → lazy-JsFnphfP.js} +4 -4
  180. package/dist/client/assets/{lazyRouteComponent-CE6uW_5p.js → lazyRouteComponent-DZOLCSfI.js} +2 -2
  181. package/dist/client/assets/{link-CKfckeju.js → link-ByE5ZkNW.js} +2 -2
  182. package/dist/client/assets/{linkedPrompt-68_t5vwh.js → linkedPrompt-Dv_ZP8G8.js} +2 -2
  183. package/dist/client/assets/main-D8lKEPYS.js +37 -0
  184. package/dist/client/assets/main-DIHqY9YX.css +2 -0
  185. package/dist/client/assets/{mediaReference-DQ6GIZY7.js → mediaReference-DKsJ-9R8.js} +2 -2
  186. package/dist/client/assets/mediaSource-CF8tZyds.js +2 -0
  187. package/dist/client/assets/meshopt_decoder.module-BE7cuDBs.js +2 -0
  188. package/dist/client/assets/modelScene-DxcxMNRA.js +3 -0
  189. package/dist/client/assets/number-field-CWsDuEfo.js +2 -0
  190. package/dist/client/assets/{observeResize-BbXolq6K.js → observeResize-BxfFu2qN.js} +2 -2
  191. package/dist/client/assets/onboarding-DbYQeYSX.js +2 -0
  192. package/dist/client/assets/openFileInPreview-BiuuqQ-l.js +2 -0
  193. package/dist/client/assets/orbit-CTbdaXs-.js +2 -0
  194. package/dist/client/assets/p4ProjectFile-CZQao9GZ.js +2 -0
  195. package/dist/client/assets/{pair-BpCo33SH.js → pair-JgOCPd7m.js} +2 -2
  196. package/dist/client/assets/pause-5XtmSS7L.js +2 -0
  197. package/dist/client/assets/{pendingSendStore-Ba--K6cH.js → pendingSendStore-Bf499-Oy.js} +2 -2
  198. package/dist/client/assets/phoneViewer-Bqeu_y-d.js +2 -0
  199. package/dist/client/assets/{pierre-icons-BdcegjLq.js → pierre-icons-tmWDDsbZ.js} +2 -2
  200. package/dist/client/assets/popover-D2KZg7__.js +2 -0
  201. package/dist/client/assets/preview-eatXH_DC.js +2 -0
  202. package/dist/client/assets/preview-rGycedjV.js +2 -0
  203. package/dist/client/assets/previewMiniPlayerStore-7pQoYbpL.js +2 -0
  204. package/dist/client/assets/primary-C0adlG4a.js +2 -0
  205. package/dist/client/assets/primaryCloudLinkState-DStOgXZ7.js +2 -0
  206. package/dist/client/assets/projectFilesQueryState-CXzO_JXd.js +2 -0
  207. package/dist/client/assets/projectScriptEditor-B9Q_BBbL.js +2 -0
  208. package/dist/client/assets/providerSkills-BYU6vU9U.js +2 -0
  209. package/dist/client/assets/pullRequestDetail.logic-CAA5BrcO.js +10 -0
  210. package/dist/client/assets/{pullRequestIcons-CbDg0o8q.js → pullRequestIcons-D0TNfVUp.js} +2 -2
  211. package/dist/client/assets/{pullRequestReviewStore-0WIH92NQ.js → pullRequestReviewStore-szmuenZj.js} +2 -2
  212. package/dist/client/assets/pullRequests-tu-Mn-gv.js +2 -0
  213. package/dist/client/assets/queries-BhrI_odm.js +2 -0
  214. package/dist/client/assets/query-DmYgeaGK.js +2 -0
  215. package/dist/client/assets/radio-group-YcYZQjQu.js +2 -0
  216. package/dist/client/assets/relay-DcCuBtiq.js +2 -0
  217. package/dist/client/assets/renderScheduler-BgdSr0UC.js +2 -0
  218. package/dist/client/assets/rightPanelStore-BpUwMEU6.js +2 -0
  219. package/dist/client/assets/runtime-DciS6GP9.js +7 -0
  220. package/dist/client/assets/{runtimeModeConfig-CRXk0H6e.js → runtimeModeConfig-B8OcO6E5.js} +2 -2
  221. package/dist/client/assets/{scheduledTasksSettings.logic-Dw_swg_M.js → scheduledTasksSettings.logic-Cnm8G_wO.js} +3 -3
  222. package/dist/client/assets/{scroll-area-Cm9XZdHp.js → scroll-area-D7wKdOM7.js} +2 -2
  223. package/dist/client/assets/select--26O8gr7.js +2 -0
  224. package/dist/client/assets/selfImproveFindings-CQHbA_SP.js +2 -0
  225. package/dist/client/assets/server-DKB_3xTN.js +2 -0
  226. package/dist/client/assets/session-D_OiLzln.js +2 -0
  227. package/dist/client/assets/session-logic-lUPcTQRy.js +26 -0
  228. package/dist/client/assets/{settings-Yvo1RMvg.js → settings-BDigjNQr.js} +2 -2
  229. package/dist/client/assets/{settings.appearance-ONDNW-gc.js → settings.appearance-pv_RhojI.js} +2 -2
  230. package/dist/client/assets/settings.archived-UHO0BqSp.js +2 -0
  231. package/dist/client/assets/settings.computer-use-C7FCVkB8.js +2 -0
  232. package/dist/client/assets/settings.connections-MCKul-Qb.js +2 -0
  233. package/dist/client/assets/settings.data-controls-DHSiH1XK.js +2 -0
  234. package/dist/client/assets/settings.decisions-DVAZFuiP.js +2 -0
  235. package/dist/client/assets/settings.designs-Cq_57Bul.js +2 -0
  236. package/dist/client/assets/settings.diagnostics-D3vvP_U2.js +2 -0
  237. package/dist/client/assets/{settings.general-Cf_bIbyH.js → settings.general-BVlKme_0.js} +2 -2
  238. package/dist/client/assets/settings.integrations-CfX639cu.js +2 -0
  239. package/dist/client/assets/settings.keybindings-C4ufqFiE.js +2 -0
  240. package/dist/client/assets/{settings.open-source-licenses-DlqO6HBa.js → settings.open-source-licenses-C7SQX7_o.js} +2 -2
  241. package/dist/client/assets/settings.plugins-JB-_3lB3.js +5 -0
  242. package/dist/client/assets/settings.projects-HbUqS8EQ.js +4 -0
  243. package/dist/client/assets/settings.providers-DDaicTRG.js +3 -0
  244. package/dist/client/assets/{settings.scheduled-tasks-BIaHEXVF.js → settings.scheduled-tasks-CsfZkMNc.js} +2 -2
  245. package/dist/client/assets/settings.secrets-DmkUTUBC.js +2 -0
  246. package/dist/client/assets/settings.snap-shot-CxBBb3GG.js +2 -0
  247. package/dist/client/assets/settings.source-control-Buh1svx1.js +2 -0
  248. package/dist/client/assets/settings.storage-BoCdHcfz.js +2 -0
  249. package/dist/client/assets/settingsLayout-EWRSNE9F.js +3 -0
  250. package/dist/client/assets/sidebar-B2McbSnM.js +2 -0
  251. package/dist/client/assets/{sidebarProjectGrouping-Cy06FqQF.js → sidebarProjectGrouping-ManvShfB.js} +2 -2
  252. package/dist/client/assets/skeleton-CfxEpnM8.js +2 -0
  253. package/dist/client/assets/sourceControl-2E-torWB.js +2 -0
  254. package/dist/client/assets/sourceControlClients-DTwwk4H6.js +2 -0
  255. package/dist/client/assets/spinner-DiQtYQvU.js +2 -0
  256. package/dist/client/assets/src-aYUfWMsw.js +15 -0
  257. package/dist/client/assets/{terminal-links-DkNuyYrs.js → terminal-links-DalIS_T6.js} +2 -2
  258. package/dist/client/assets/terminalSessions-BXRGhdwO.js +2 -0
  259. package/dist/client/assets/textarea-CgJxMEC6.js +2 -0
  260. package/dist/client/assets/{themePalette-1UQmJk98.js → themePalette-BAJL8JDR.js} +3 -3
  261. package/dist/client/assets/threadCheckpoints-A01VyLzN.js +2 -0
  262. package/dist/client/assets/toggle-fVPE0kyD.js +2 -0
  263. package/dist/client/assets/toggle-group-BQBgK4Fh.js +2 -0
  264. package/dist/client/assets/{tooltip-C7NAkYG3.js → tooltip-DDv-MvO4.js} +2 -2
  265. package/dist/client/assets/{uiStateStore-FYiLqqos.js → uiStateStore-Cyle2Grh.js} +2 -2
  266. package/dist/client/assets/usage-DfkVwFPy.js +2 -0
  267. package/dist/client/assets/usageAccess-DGGNF6kP.js +2 -0
  268. package/dist/client/assets/usageFormat-DvpnUmwI.js +2 -0
  269. package/dist/client/assets/{usageShortcuts-BJyp1xT6.js → usageShortcuts-BefcatkO.js} +2 -2
  270. package/dist/client/assets/{use-atom-command-BbFDhw_c.js → use-atom-command-Bfi4daMj.js} +2 -2
  271. package/dist/client/assets/{useAriaLabelledBy-BJnK5b5h.js → useAriaLabelledBy-DjrGw7Iw.js} +2 -2
  272. package/dist/client/assets/useHandleNewThread-idXLHXR7.js +2 -0
  273. package/dist/client/assets/{useLocation-NTw9A5XQ.js → useLocation-fNQqSFar.js} +2 -2
  274. package/dist/client/assets/{useNavigate-DV9bXnWr.js → useNavigate-DwXZ6yA7.js} +2 -2
  275. package/dist/client/assets/{useNavigateBack-D62rsj_4.js → useNavigateBack-mLGu4w8K.js} +2 -2
  276. package/dist/client/assets/{useP4ConnectAuthPrompt-Bj5GIxgy.js → useP4ConnectAuthPrompt-BXgvqiOd.js} +2 -2
  277. package/dist/client/assets/{useParams-jklHVL7l.js → useParams-qFbmBdAa.js} +2 -2
  278. package/dist/client/assets/{usePermissionStatus-DaCu90iN.js → usePermissionStatus-CTyZ03Js.js} +2 -2
  279. package/dist/client/assets/usePopupViewport-Dc46kF33.js +2 -0
  280. package/dist/client/assets/usePullRequestActions-DJ1WiiLA.js +3 -0
  281. package/dist/client/assets/useRegisterFieldControl-BL6Ml_ar.js +2 -0
  282. package/dist/client/assets/useRender-BP5vR6yH.js +2 -0
  283. package/dist/client/assets/{useScopedModelAvailability-hsJL85Tg.js → useScopedModelAvailability-CLTKL2Jf.js} +2 -2
  284. package/dist/client/assets/useSettings-CnHpxSBo.js +3 -0
  285. package/dist/client/assets/utils-CtzgibkN.js +24 -0
  286. package/dist/client/assets/vcsRefInvalidation-BewBnMos.js +2 -0
  287. package/dist/client/assets/welcome-BkJ7M2_8.js +2 -0
  288. package/dist/client/index.html +1 -1
  289. package/dist/{renderer-D9dDeERN.mjs → renderer-7PhJbGDm.mjs} +19 -4
  290. package/dist/{runtime-C3UJDGLb.mjs → runtime-Dbm6Vqjj.mjs} +511 -233
  291. package/package.json +1 -1
  292. package/dist/AcpMcpStdioBridge-CtXfvrFO.mjs +0 -3
  293. package/dist/client/assets/AlertDialogRoot-BI19p1Pb.js +0 -2
  294. package/dist/client/assets/ChatGptUsageButton-BldpBXxU.js +0 -2
  295. package/dist/client/assets/CheckboxIndicator-C4iAbUMh.js +0 -2
  296. package/dist/client/assets/ClippedText-TtLeyAVc.js +0 -2
  297. package/dist/client/assets/CodexSetupSection.logic-BO6ZAijp.js +0 -2
  298. package/dist/client/assets/ComboboxClear-CtNsa8Al.js +0 -2
  299. package/dist/client/assets/ComboboxGroupLabel-vQ7y8c50.js +0 -2
  300. package/dist/client/assets/CompositeRoot-CL7X20MU.js +0 -2
  301. package/dist/client/assets/ConnectAgentSurface-B_AYPHWs.js +0 -2
  302. package/dist/client/assets/DevicePanel-Cqexcbm2.js +0 -2
  303. package/dist/client/assets/DeviceSetup-Cdyw5Z9a.js +0 -2
  304. package/dist/client/assets/DialogTitle-CFYK6V6-.js +0 -2
  305. package/dist/client/assets/DiffPanel-CrswOKS6.js +0 -2
  306. package/dist/client/assets/EmbeddedDesign-Bdq5oAfI.js +0 -21
  307. package/dist/client/assets/FieldControl-95mCsa0m.js +0 -2
  308. package/dist/client/assets/FormContext-BcA1kdFD.js +0 -2
  309. package/dist/client/assets/Input-C9KIhPlP.js +0 -2
  310. package/dist/client/assets/JZOYTAAL-B8H2VC7A.js +0 -1
  311. package/dist/client/assets/KeybindingsSettings.logic-DwMUZYvv.js +0 -2
  312. package/dist/client/assets/LinkMachineSelect-BVNnYUBb.js +0 -2
  313. package/dist/client/assets/P4ConnectAccountPages-ChT866qO.js +0 -2
  314. package/dist/client/assets/PanelLayoutControls-DMUv135M.js +0 -216
  315. package/dist/client/assets/PierreEntryIcon-DLXDEcqA.js +0 -2
  316. package/dist/client/assets/PopoverHandle-D8JhsX32.js +0 -2
  317. package/dist/client/assets/PreviewPanel-D7YWnWZS.js +0 -2
  318. package/dist/client/assets/ProjectDefaultsSettings-BZSw74tU.js +0 -2
  319. package/dist/client/assets/ProjectIconPickerDialog-7vur_TCX.js +0 -2
  320. package/dist/client/assets/ProviderModelPicker-af7MWLPO.js +0 -2
  321. package/dist/client/assets/ProviderSettingsForm-B4N4tsxv.js +0 -2
  322. package/dist/client/assets/PullRequestCodeTab-B07M_QW4.js +0 -6
  323. package/dist/client/assets/RightPanelResizeHandle-BODMyZa6.js +0 -2
  324. package/dist/client/assets/ScheduledTasksSettings-BTi69FRq.js +0 -6
  325. package/dist/client/assets/ScrollAreaCorner-CsKGemsf.js +0 -2
  326. package/dist/client/assets/SelectScrollUpArrow-BMZtcPXM.js +0 -2
  327. package/dist/client/assets/SelfImproveSettingsSection-Dx6spJXh.js +0 -2
  328. package/dist/client/assets/SettingsPanels-DhuEF0_Y.js +0 -46
  329. package/dist/client/assets/SettingsPanels.logic-D5Fnq4gS.js +0 -2
  330. package/dist/client/assets/ThreadTerminalDrawer-CY2qHldP.js +0 -5
  331. package/dist/client/assets/TooltipProvider-Czzm7ro-.js +0 -2
  332. package/dist/client/assets/_chat-BeJoXsdK.js +0 -47
  333. package/dist/client/assets/_chat.design-AJz30uXq.js +0 -2
  334. package/dist/client/assets/_chat.new-IhhWgwNo.js +0 -4
  335. package/dist/client/assets/_chat.pull-requests-B84LUHIv.js +0 -2
  336. package/dist/client/assets/alert-D6MFRWZv.js +0 -2
  337. package/dist/client/assets/assets-Dh1LFwqL.js +0 -2
  338. package/dist/client/assets/browserHistoryStore-BVEWgOnh.js +0 -2
  339. package/dist/client/assets/combobox-5RzytEjd.js +0 -2
  340. package/dist/client/assets/connect-agent-B6pgZuy8.js +0 -2
  341. package/dist/client/assets/design-DSoix9e1.js +0 -2
  342. package/dist/client/assets/device-DQmQm4GC.js +0 -2
  343. package/dist/client/assets/dialog-DTVhbEqi.js +0 -2
  344. package/dist/client/assets/draft-input-BTetoXSt.js +0 -2
  345. package/dist/client/assets/duoViewer-DxmaOmHS.js +0 -2
  346. package/dist/client/assets/empty-B4h5DyMQ.js +0 -2
  347. package/dist/client/assets/entities-CWtNgawi.js +0 -2
  348. package/dist/client/assets/guideRunStore-CzF0q6A8.js +0 -2
  349. package/dist/client/assets/image-up-BN-uYqtM.js +0 -2
  350. package/dist/client/assets/input-group-BQ_2ox-w.js +0 -2
  351. package/dist/client/assets/keybindings-tgj8XFFz.js +0 -2
  352. package/dist/client/assets/main-B1sXOjZZ.js +0 -37
  353. package/dist/client/assets/main-CbkvDRKP.css +0 -2
  354. package/dist/client/assets/mediaSource-DfTsMdqm.js +0 -2
  355. package/dist/client/assets/number-field-xEi5ylvp.js +0 -2
  356. package/dist/client/assets/onboarding-CkdZxdNL.js +0 -2
  357. package/dist/client/assets/openFileInPreview-BHhDd-id.js +0 -2
  358. package/dist/client/assets/orbit-aOr6_vTe.js +0 -2
  359. package/dist/client/assets/p4ProjectFile-5VDI-yAx.js +0 -2
  360. package/dist/client/assets/pause-C-5l1Ug3.js +0 -2
  361. package/dist/client/assets/phoneViewer-C1aGY-h1.js +0 -2
  362. package/dist/client/assets/popover-BB2K1---.js +0 -2
  363. package/dist/client/assets/preview-B4_sjsUX.js +0 -2
  364. package/dist/client/assets/preview-DgXn94k5.js +0 -2
  365. package/dist/client/assets/previewMiniPlayerStore-DguWdL1f.js +0 -2
  366. package/dist/client/assets/primary-BDoRkJqU.js +0 -2
  367. package/dist/client/assets/primaryCloudLinkState-Cc0Xobh6.js +0 -2
  368. package/dist/client/assets/projectFilesQueryState-BdfD5cZ2.js +0 -2
  369. package/dist/client/assets/projectScriptEditor-faOsFlds.js +0 -2
  370. package/dist/client/assets/providerSkills-C8PrnHb-.js +0 -2
  371. package/dist/client/assets/pullRequestDetail.logic-kOhR5jr9.js +0 -10
  372. package/dist/client/assets/pullRequests-Cf9E2kW-.js +0 -2
  373. package/dist/client/assets/queries-Cl508kPw.js +0 -2
  374. package/dist/client/assets/query-D3KVoW9G.js +0 -2
  375. package/dist/client/assets/radio-group-BnZVD-CO.js +0 -2
  376. package/dist/client/assets/relay-Do9UB5iT.js +0 -2
  377. package/dist/client/assets/renderScheduler-DsjkE3rh.js +0 -3833
  378. package/dist/client/assets/rightPanelStore-DB1OP4MT.js +0 -2
  379. package/dist/client/assets/runtime-BBYIQ0f-.js +0 -7
  380. package/dist/client/assets/select-Cz_1ByI4.js +0 -2
  381. package/dist/client/assets/selfImproveFindings-DtoTFNL_.js +0 -2
  382. package/dist/client/assets/server-Dkj4NeYG.js +0 -2
  383. package/dist/client/assets/session-CBEVNHld.js +0 -2
  384. package/dist/client/assets/session-logic-DB_ei-pn.js +0 -26
  385. package/dist/client/assets/settings.archived-CjdyCMyi.js +0 -2
  386. package/dist/client/assets/settings.computer-use-97ffp9C_.js +0 -2
  387. package/dist/client/assets/settings.connections-w3qKRKGa.js +0 -2
  388. package/dist/client/assets/settings.data-controls-C8ozSexu.js +0 -2
  389. package/dist/client/assets/settings.decisions-BvR3_OTv.js +0 -2
  390. package/dist/client/assets/settings.designs-CB8PWHwW.js +0 -2
  391. package/dist/client/assets/settings.diagnostics-DdInPrq0.js +0 -2
  392. package/dist/client/assets/settings.integrations-pj9KVvtd.js +0 -2
  393. package/dist/client/assets/settings.keybindings-3diGciV1.js +0 -2
  394. package/dist/client/assets/settings.plugins-DpaJJH_J.js +0 -5
  395. package/dist/client/assets/settings.projects-Bfh3CJ1a.js +0 -4
  396. package/dist/client/assets/settings.providers-DNiEeQYT.js +0 -3
  397. package/dist/client/assets/settings.secrets-BSNXem5A.js +0 -2
  398. package/dist/client/assets/settings.snap-shot-Ds0ywKhE.js +0 -2
  399. package/dist/client/assets/settings.source-control-C41AVNSm.js +0 -2
  400. package/dist/client/assets/settings.storage-B-Hm5vEC.js +0 -2
  401. package/dist/client/assets/settingsLayout-BbEwQ6Fy.js +0 -3
  402. package/dist/client/assets/sidebar-B70J7v16.js +0 -2
  403. package/dist/client/assets/skeleton-BavPX8IL.js +0 -2
  404. package/dist/client/assets/sourceControl-De64nxc-.js +0 -2
  405. package/dist/client/assets/sourceControlClients-BofXnV5S.js +0 -2
  406. package/dist/client/assets/spinner-BiCpg0TU.js +0 -2
  407. package/dist/client/assets/terminalSessions-BLnAzTpE.js +0 -2
  408. package/dist/client/assets/textarea-DPWqoJRQ.js +0 -2
  409. package/dist/client/assets/threadCheckpoints-C5aLz9nv.js +0 -2
  410. package/dist/client/assets/toggle-DERKSGyC.js +0 -2
  411. package/dist/client/assets/toggle-group-DYSJFIn3.js +0 -2
  412. package/dist/client/assets/usage-CtcqAwlu.js +0 -2
  413. package/dist/client/assets/usageAccess-2Wks5kIN.js +0 -2
  414. package/dist/client/assets/usageFormat-BZJ9qCn4.js +0 -2
  415. package/dist/client/assets/useHandleNewThread-C6MtV3AM.js +0 -2
  416. package/dist/client/assets/usePopupViewport-D1lXH2SQ.js +0 -2
  417. package/dist/client/assets/usePullRequestActions-WFmep5Tm.js +0 -3
  418. package/dist/client/assets/useRegisterFieldControl-BtJcyaxh.js +0 -2
  419. package/dist/client/assets/useSettings-EYJbJzT3.js +0 -3
  420. package/dist/client/assets/utils-DjbLtxuo.js +0 -37
  421. package/dist/client/assets/vcsRefInvalidation-DkXoQApH.js +0 -2
  422. package/dist/client/assets/welcome-uKSqaFeK.js +0 -2
@@ -0,0 +1,2 @@
1
+ import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{Ds as i,Ts as a,t as o}from"./utils-CtzgibkN.js";import{tc as s}from"./src-aYUfWMsw.js";import{t as c}from"./useResizeDrag-CWrW8GV3.js";var l=e(t(),1),u=s,d=`--resizable-width`;function f(e){let{storageKey:t,defaultWidth:n,minWidth:r,maxWidth:o,edge:s}=e,f=(0,l.useCallback)(e=>Number.isFinite(e)?Math.max(r,Math.min(o,e)):n,[n,o,r]),p=()=>{if(typeof window>`u`)return n;try{let e=a(t,u);return f(e??n)}catch(e){return console.error(`Could not read persisted panel width.`,e),n}},[m,h]=(0,l.useState)(()=>({storageKey:t,width:p()}));m.storageKey!==t&&h({storageKey:t,width:p()});let g=f(m.width),_=(0,l.useRef)({clamp:f,storageKey:t,width:g});(0,l.useLayoutEffect)(()=>{_.current={clamp:f,storageKey:t,width:g}},[f,g,t]);let v=(e,t)=>{h({storageKey:e,width:t});try{i(e,t,u)}catch(e){console.error(`Could not persist panel width.`,e)}},{refresh:y,...b}=c(e=>{let n=e.currentTarget.parentElement;return n?.style.setProperty(`transition-property`,`none`),{width:g,edge:s,resize(e){let t=_.current.clamp(e);return n?.style.setProperty(d,`${t}px`),t},finish(e){h({storageKey:t,width:e});try{i(_.current.storageKey,e,u)}catch(e){console.error(`Could not persist panel width.`,e)}},cleanup(e){n?.style.removeProperty(`transition-property`),e||n?.style.setProperty(d,`${_.current.width}px`)}}},t);return(0,l.useLayoutEffect)(y,[f,g,y]),{width:g,setWidth:e=>v(t,f(e)),handlers:b}}var p=n(),m=e(r(),1);function h(e){let t=(0,p.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({handlers:r,className:n,label:i,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let s;t[5]===n?s=t[6]:(s=o(`group absolute inset-y-0 -left-1 z-20 w-2 cursor-col-resize select-none`,n),t[5]=n,t[6]=s);let c;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,m.jsx)(`span`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover:bg-border group-focus-visible:bg-primary/60 group-active:bg-primary/60`}),t[7]=c):c=t[7];let l;return t[8]!==r||t[9]!==i||t[10]!==a||t[11]!==s?(l=(0,m.jsx)(`div`,{role:`separator`,"aria-label":i,"aria-orientation":`vertical`,...a,className:s,...r,children:c}),t[8]=r,t[9]=i,t[10]=a,t[11]=s,t[12]=l):l=t[12],l}export{d as n,f as r,h as t};
2
+ //# sourceMappingURL=RightPanelResizeHandle-8oJQkwcU.js.map
@@ -0,0 +1,2 @@
1
+ import{A as e,F as t,M as n,P as r,S as i,U as a,s as o,z as s}from"./GLTFLoader-DL026JyV.js";var c=class extends a{constructor(){super();let n=new o;n.deleteAttribute(`uv`);let a=new r({side:1}),c=new r,u=new s(16777215,900,28,2);u.position.set(.418,16.199,.3),this.add(u);let d=new e(n,a);d.position.set(-.757,13.219,.717),d.scale.set(31.713,28.305,28.591),this.add(d);let f=new i(n,c,6),p=new t;p.position.set(-10.906,2.009,1.846),p.rotation.set(0,-.195,0),p.scale.set(2.328,7.905,4.651),p.updateMatrix(),f.setMatrixAt(0,p.matrix),p.position.set(-5.607,-.754,-.758),p.rotation.set(0,.994,0),p.scale.set(1.97,1.534,3.955),p.updateMatrix(),f.setMatrixAt(1,p.matrix),p.position.set(6.167,.857,7.803),p.rotation.set(0,.561,0),p.scale.set(3.927,6.285,3.687),p.updateMatrix(),f.setMatrixAt(2,p.matrix),p.position.set(-2.017,.018,6.124),p.rotation.set(0,.333,0),p.scale.set(2.002,4.566,2.064),p.updateMatrix(),f.setMatrixAt(3,p.matrix),p.position.set(2.291,-.756,-2.621),p.rotation.set(0,-.286,0),p.scale.set(1.546,1.552,1.496),p.updateMatrix(),f.setMatrixAt(4,p.matrix),p.position.set(-2.193,-.369,-5.547),p.rotation.set(0,.516,0),p.scale.set(3.875,3.487,2.986),p.updateMatrix(),f.setMatrixAt(5,p.matrix),this.add(f);let m=new e(n,l(50));m.position.set(-16.116,14.37,8.208),m.scale.set(.1,2.428,2.739),this.add(m);let h=new e(n,l(50));h.position.set(-16.109,18.021,-8.207),h.scale.set(.1,2.425,2.751),this.add(h);let g=new e(n,l(17));g.position.set(14.904,12.198,-1.832),g.scale.set(.15,4.265,6.331),this.add(g);let _=new e(n,l(43));_.position.set(-.462,8.89,14.52),_.scale.set(4.38,5.441,.088),this.add(_);let v=new e(n,l(20));v.position.set(3.235,11.486,-12.541),v.scale.set(2.5,2,.1),this.add(v);let y=new e(n,l(100));y.position.set(0,20,0),y.scale.set(1,.1,1),this.add(y)}dispose(){let e=new Set;this.traverse(t=>{t.isMesh&&(e.add(t.geometry),e.add(t.material))});for(let t of e)t.dispose()}};function l(e){return new n({color:0,emissive:16777215,emissiveIntensity:e})}export{c as t};
2
+ //# sourceMappingURL=RoomEnvironment-Iz7-KYrN.js.map
@@ -1,3 +1,3 @@
1
- import{_ as e,f as t,g as n,l as r,o as i,r as a,s as o,t as s}from"./77XECAW3-BVGMXOi_.js";import{a as c,i as l,s as u}from"./N3JZAHOW-BFAKVTw8.js";import{o as d,r as f}from"./DKTLEL5E-DciMwFJ1.js";import{t as p}from"./TSHNXIZL-Cs6g4gXN.js";import{a as m,i as h,o as g}from"./ABYRPUBD-D4oehH5y.js";import{PeleError as _,_ as v,i as y,r as b,u as x}from"./lazy-DmPH_lNd.js";var S=1e5;function C(e){switch(e){case`[]`:return`square`;case`()`:return`round`;case`(())`:return`circle`;case`>]`:return`rect_left_inv_arrow`;case`{}`:return`diamond`;case`{{}}`:return`hexagon`;case`([])`:return`stadium`;case`[[]]`:return`subroutine`;case`[()]`:return`cylinder`;case`((()))`:return`doublecircle`;case`[//]`:return`lean_right`;case`[\\\\]`:return`lean_left`;case`[/\\]`:return`trapezoid`;case`[\\/]`:return`inv_trapezoid`;case`<[]>`:return`block_arrow`;default:return`na`}}function w(e){switch(e.trim().slice(-1)){case`x`:return`arrow_cross`;case`o`:return`arrow_circle`;case`>`:return`arrow_point`;default:return``}}function T(e){switch(e.trim().charAt(0)){case`x`:return`arrow_cross`;case`o`:return`arrow_circle`;case`<`:return`arrow_point`;default:return`arrow_open`}}function E(e){return e.includes(`==`)?`thick`:`normal`}function D(e){return e.includes(`.-`)?`dotted`:`solid`}function O(e,t){let n=e.flat(),r=-1;for(let e of n)if(e.type===`column-setting`){r=e.columns??-1;break}return{list:n,at:0,parent:t,children:[],columns:r}}var k=class{type=`block`;title;root={id:`root`,type:`composite`,children:[],columns:-1};blocks=[];edges=[];classes=new Map;byId=new Map;typeStr2Type=C;edgeStrToEdgeData=w;edgeStrToEdgeStartData=T;edgeStrToThickness=E;edgeStrToPattern=D;warn;pending=new Set;edgeCount=new Map;ids=0;colors=0;spaces=0;constructor(e={}){this.warn=e.warn}generateId(){return`id-`+ ++this.ids}addStyleClass(e,t=``){let n=this.classes.get(e);n||(n={id:e,styles:[],textStyles:[]},this.classes.set(e,n));for(let e of t.split(`,`)){let t=e.indexOf(`;`),r=(t===-1?e:e.slice(0,t)+e.slice(t+1)).trim();e.includes(`color`)&&n.textStyles.push(r.replace(`fill`,`bgFill`).replace(`color`,`fill`)),n.styles.push(r)}}addStyle2Node(e,t=``){this.named(e).styles=t.split(`,`)}setCssClass(e,t){for(let n of e.split(`,`))(this.named(n.trim()).classes??=[]).push(t)}named(e){let t=this.byId.get(e);return t===void 0&&(t={id:e,type:`na`,children:[]},this.byId.set(e,t),this.pending.add(e)),t}setHierarchy(e){let t=[O(e,this.root)];for(;t.length>0;){let e=t[t.length-1];if(e.at===e.list.length){e.parent.children=e.children,t.pop();continue}let n=e.list[e.at++];switch(e.columns>0&&n.type!==`column-setting`&&typeof n.widthInColumns==`number`&&n.widthInColumns>e.columns&&this.warn?.(`Block ${n.id} width ${n.widthInColumns} exceeds configured column width ${e.columns}`),n.type){case`classDef`:this.addStyleClass(n.id,n.css);continue;case`applyClass`:this.setCssClass(n.id,n.styleClass??``);continue;case`applyStyles`:n.stylesStr&&this.addStyle2Node(n.id,n.stylesStr);continue;case`column-setting`:e.parent.columns=n.columns??-1;continue;case`edge`:{let e=(this.edgeCount.get(n.id)??0)+1;this.edgeCount.set(n.id,e),n.id=e+`-`+n.id,this.edges.push(n);continue}}n.id??=this.generateId(),n.label||=n.type===`composite`?``:n.id;let r=this.byId.get(n.id),i=r===void 0||this.pending.delete(n.id);i?(r&&(n.classes=r.classes,n.styles=r.styles),n.type===`composite`&&(n.colorIndex=this.colors++),this.byId.set(n.id,n)):(n.type!==`na`&&(r.type=n.type),n.label!==n.id&&(r.label=n.label));let a=n.children;if(n.children=[],n.type===`space`){let t=n.width??1;if(!(t<=S-this.spaces))throw new _(`A block diagram can hold at most ${S} space blocks.`,`limit`,{type:`block`});this.spaces+=Math.max(t,0);for(let r=0;r<t;r++){let t={...n,id:n.id+`-`+r,children:[]};this.byId.set(t.id,t),e.children.push(t)}}else i&&e.children.push(n);a&&a.length>0&&t.push(O(a,n))}this.blocks=this.root.children??[]}},A=`$end.INVALID.BLOCK_DIAGRAM_KEY.id-block.COLUMNS.MD_STR.STR.SPACE_BLOCK.DEFAULT.LINKSTYLE.INTERPOLATE.classDef.DEFAULT_CLASSDEF_ID.CLASSDEF_ID.CLASSDEF_STYLEOPTS.class.CLASSENTITY_IDS.STYLECLASS.style.STYLE_ENTITY_IDS.STYLE_DEFINITION_DATA.acc_title.acc_title_value.acc_descr.acc_descr_value.acc_descr_multiline_value.end.NODE_DSTART.NODE_DEND.BLOCK_ARROW_START.BLOCK_ARROW_END.DIR.NODE_ID.LINK.START_LINK.LINK_LABEL.SIZE.EOF`.split(`.`),j=[`right`,`left`,`x`,`y`,`up`,`down`],M=new Uint8Array(128);for(let e of[9,10,11,12,13,32,40,41,45,58,60,61,62,91,123,125])M[e]=1;function ee(e){let t=e.length,n=[],r=[],i=[],a=[],o=0,s=0,c=(e,t,a)=>(n.push(e),r.push(t),i.push(s),s=a,!0),l=(t,n)=>c(t,e.slice(s,n),n),u=e=>{a.push(o),o=e},d=()=>{a.length>0&&(o=a.pop())},f=n=>{for(;n<t&&b(e.charCodeAt(n));)n++;return n},p=n=>{for(;n<t;){let t=e.charCodeAt(n);if(t<48||t>57)break;n++}return n},m=n=>{for(;n<t&&y(e.charCodeAt(n));)n++;return n},h=t=>e.startsWith(t,s)&&!y(e.charCodeAt(s+t.length)),g=()=>(e.charCodeAt(s+1)===96?(u(2),s+=2):(u(1),s++),!0),_=t=>{if(e.charCodeAt(t)!==46)return-1;do t++;while(e.charCodeAt(t)===46);if(e.charCodeAt(t)!==45)return-1;let n=e.charCodeAt(t+1);return n===120||n===111||n===62?t+2:t+1},v=t=>{let n=e.charCodeAt(t);(n===120||n===111||n===60)&&t++;let r=e.charCodeAt(t);if(r===46)return _(t);if(r!==45&&r!==61)return-1;let i=t+1;for(;e.charCodeAt(i)===r;)i++;if(i-t===1)return r===45?_(i):-1;let a=e.charCodeAt(i);return a===120||a===111||a===62?i+1:i-t>=3?i:-1},x=()=>{let t=v(s);if(t>=0)return l(33,f(t));let n=e.charCodeAt(s)===60?s+1:s,r=e.charCodeAt(n),i=e.charCodeAt(n+1);return r===45&&(i===45||i===46)||r===61&&i===61?(u(6),l(34,f(n+2))):!1},S=n=>{let r=e.indexOf(`
1
+ import{_ as e,f as t,g as n,l as r,o as i,r as a,s as o,t as s}from"./77XECAW3-BcsWkjLy.js";import{a as c,i as l,s as u}from"./N3JZAHOW-CnXyo2Xv.js";import{o as d,r as f}from"./DKTLEL5E-DciMwFJ1.js";import{t as p}from"./TSHNXIZL-DU0_NvP6.js";import{a as m,i as h,o as g}from"./ABYRPUBD-D3uBdyxY.js";import{PeleError as _,_ as v,i as y,r as b,u as x}from"./lazy-JsFnphfP.js";var S=1e5;function C(e){switch(e){case`[]`:return`square`;case`()`:return`round`;case`(())`:return`circle`;case`>]`:return`rect_left_inv_arrow`;case`{}`:return`diamond`;case`{{}}`:return`hexagon`;case`([])`:return`stadium`;case`[[]]`:return`subroutine`;case`[()]`:return`cylinder`;case`((()))`:return`doublecircle`;case`[//]`:return`lean_right`;case`[\\\\]`:return`lean_left`;case`[/\\]`:return`trapezoid`;case`[\\/]`:return`inv_trapezoid`;case`<[]>`:return`block_arrow`;default:return`na`}}function w(e){switch(e.trim().slice(-1)){case`x`:return`arrow_cross`;case`o`:return`arrow_circle`;case`>`:return`arrow_point`;default:return``}}function T(e){switch(e.trim().charAt(0)){case`x`:return`arrow_cross`;case`o`:return`arrow_circle`;case`<`:return`arrow_point`;default:return`arrow_open`}}function E(e){return e.includes(`==`)?`thick`:`normal`}function D(e){return e.includes(`.-`)?`dotted`:`solid`}function O(e,t){let n=e.flat(),r=-1;for(let e of n)if(e.type===`column-setting`){r=e.columns??-1;break}return{list:n,at:0,parent:t,children:[],columns:r}}var k=class{type=`block`;title;root={id:`root`,type:`composite`,children:[],columns:-1};blocks=[];edges=[];classes=new Map;byId=new Map;typeStr2Type=C;edgeStrToEdgeData=w;edgeStrToEdgeStartData=T;edgeStrToThickness=E;edgeStrToPattern=D;warn;pending=new Set;edgeCount=new Map;ids=0;colors=0;spaces=0;constructor(e={}){this.warn=e.warn}generateId(){return`id-`+ ++this.ids}addStyleClass(e,t=``){let n=this.classes.get(e);n||(n={id:e,styles:[],textStyles:[]},this.classes.set(e,n));for(let e of t.split(`,`)){let t=e.indexOf(`;`),r=(t===-1?e:e.slice(0,t)+e.slice(t+1)).trim();e.includes(`color`)&&n.textStyles.push(r.replace(`fill`,`bgFill`).replace(`color`,`fill`)),n.styles.push(r)}}addStyle2Node(e,t=``){this.named(e).styles=t.split(`,`)}setCssClass(e,t){for(let n of e.split(`,`))(this.named(n.trim()).classes??=[]).push(t)}named(e){let t=this.byId.get(e);return t===void 0&&(t={id:e,type:`na`,children:[]},this.byId.set(e,t),this.pending.add(e)),t}setHierarchy(e){let t=[O(e,this.root)];for(;t.length>0;){let e=t[t.length-1];if(e.at===e.list.length){e.parent.children=e.children,t.pop();continue}let n=e.list[e.at++];switch(e.columns>0&&n.type!==`column-setting`&&typeof n.widthInColumns==`number`&&n.widthInColumns>e.columns&&this.warn?.(`Block ${n.id} width ${n.widthInColumns} exceeds configured column width ${e.columns}`),n.type){case`classDef`:this.addStyleClass(n.id,n.css);continue;case`applyClass`:this.setCssClass(n.id,n.styleClass??``);continue;case`applyStyles`:n.stylesStr&&this.addStyle2Node(n.id,n.stylesStr);continue;case`column-setting`:e.parent.columns=n.columns??-1;continue;case`edge`:{let e=(this.edgeCount.get(n.id)??0)+1;this.edgeCount.set(n.id,e),n.id=e+`-`+n.id,this.edges.push(n);continue}}n.id??=this.generateId(),n.label||=n.type===`composite`?``:n.id;let r=this.byId.get(n.id),i=r===void 0||this.pending.delete(n.id);i?(r&&(n.classes=r.classes,n.styles=r.styles),n.type===`composite`&&(n.colorIndex=this.colors++),this.byId.set(n.id,n)):(n.type!==`na`&&(r.type=n.type),n.label!==n.id&&(r.label=n.label));let a=n.children;if(n.children=[],n.type===`space`){let t=n.width??1;if(!(t<=S-this.spaces))throw new _(`A block diagram can hold at most ${S} space blocks.`,`limit`,{type:`block`});this.spaces+=Math.max(t,0);for(let r=0;r<t;r++){let t={...n,id:n.id+`-`+r,children:[]};this.byId.set(t.id,t),e.children.push(t)}}else i&&e.children.push(n);a&&a.length>0&&t.push(O(a,n))}this.blocks=this.root.children??[]}},A=`$end.INVALID.BLOCK_DIAGRAM_KEY.id-block.COLUMNS.MD_STR.STR.SPACE_BLOCK.DEFAULT.LINKSTYLE.INTERPOLATE.classDef.DEFAULT_CLASSDEF_ID.CLASSDEF_ID.CLASSDEF_STYLEOPTS.class.CLASSENTITY_IDS.STYLECLASS.style.STYLE_ENTITY_IDS.STYLE_DEFINITION_DATA.acc_title.acc_title_value.acc_descr.acc_descr_value.acc_descr_multiline_value.end.NODE_DSTART.NODE_DEND.BLOCK_ARROW_START.BLOCK_ARROW_END.DIR.NODE_ID.LINK.START_LINK.LINK_LABEL.SIZE.EOF`.split(`.`),j=[`right`,`left`,`x`,`y`,`up`,`down`],M=new Uint8Array(128);for(let e of[9,10,11,12,13,32,40,41,45,58,60,61,62,91,123,125])M[e]=1;function ee(e){let t=e.length,n=[],r=[],i=[],a=[],o=0,s=0,c=(e,t,a)=>(n.push(e),r.push(t),i.push(s),s=a,!0),l=(t,n)=>c(t,e.slice(s,n),n),u=e=>{a.push(o),o=e},d=()=>{a.length>0&&(o=a.pop())},f=n=>{for(;n<t&&b(e.charCodeAt(n));)n++;return n},p=n=>{for(;n<t;){let t=e.charCodeAt(n);if(t<48||t>57)break;n++}return n},m=n=>{for(;n<t&&y(e.charCodeAt(n));)n++;return n},h=t=>e.startsWith(t,s)&&!y(e.charCodeAt(s+t.length)),g=()=>(e.charCodeAt(s+1)===96?(u(2),s+=2):(u(1),s++),!0),_=t=>{if(e.charCodeAt(t)!==46)return-1;do t++;while(e.charCodeAt(t)===46);if(e.charCodeAt(t)!==45)return-1;let n=e.charCodeAt(t+1);return n===120||n===111||n===62?t+2:t+1},v=t=>{let n=e.charCodeAt(t);(n===120||n===111||n===60)&&t++;let r=e.charCodeAt(t);if(r===46)return _(t);if(r!==45&&r!==61)return-1;let i=t+1;for(;e.charCodeAt(i)===r;)i++;if(i-t===1)return r===45?_(i):-1;let a=e.charCodeAt(i);return a===120||a===111||a===62?i+1:i-t>=3?i:-1},x=()=>{let t=v(s);if(t>=0)return l(33,f(t));let n=e.charCodeAt(s)===60?s+1:s,r=e.charCodeAt(n),i=e.charCodeAt(n+1);return r===45&&(i===45||i===46)||r===61&&i===61?(u(6),l(34,f(n+2))):!1},S=n=>{let r=e.indexOf(`
2
2
  `,s);return r===-1&&(r=t),d(),l(n,r)},C=(t,n)=>{let r=m(s);if(r===s)return!1;for(;e.charCodeAt(r)===44;){let e=f(r+1),t=m(e);if(t===e)break;r=t}return o=n,l(t,r)},w=n=>{if(b(n))return s=f(s+1),!0;let r;switch(n){case 98:if(e.startsWith(`block`,s)){if(h(`block-beta`))return l(2,s+10);if(e.charCodeAt(s+5)===58)return l(3,s+6);if(!y(e.charCodeAt(s+5)))return l(2,s+5)}break;case 99:if(e.startsWith(`columns`,s)){if(r=f(s+7),r>s+7){if(e.startsWith(`auto`,r)&&!y(e.charCodeAt(r+4)))return c(4,`-1`,r+4);let t=p(r);if(t>r)return c(4,e.slice(r,t),t)}}else if(e.startsWith(`class`,s)){let t=e.startsWith(`Def`,s+5),n=t?s+8:s+5;if(r=f(n),r>n)return u(t?7:9),l(t?11:15,r)}break;case 34:return g();case 115:if(e.startsWith(`space`,s)){if(e.charCodeAt(s+5)===58){let t=p(s+6);if(t>s+6)return c(7,e.slice(s+6,t),t)}if(!y(e.charCodeAt(s+5)))return c(7,`1`,s+5)}else if(e.startsWith(`style`,s)&&(r=f(s+5),r>s+5))return u(11),l(18,r);break;case 100:if(h(`default`))return l(8,s+7);break;case 108:if(h(`linkStyle`))return l(9,s+9);break;case 105:if(h(`interpolate`))return l(10,s+11);break;case 97:if(e.startsWith(`accTitle`,s)){if(r=f(s+8),e.charCodeAt(r)===58)return u(13),l(21,f(r+1))}else if(e.startsWith(`accDescr`,s)){r=f(s+8);let t=e.charCodeAt(r);if(t===58)return u(14),l(23,f(r+1));if(t===123)return u(15),s=f(r+1),!0}break;case 101:if(h(`end`))return l(26,f(s+3));break;case 45:return e.charCodeAt(s+1)===41?(u(3),l(27,s+2)):x();case 61:return x();case 60:return e.charCodeAt(s+1)===91?(u(4),l(29,s+2)):x();case 40:{let t=e.charCodeAt(s+1),n=t===45||t===91?2:t===40?e.charCodeAt(s+2)===40?3:2:1;return u(3),l(27,s+n)}case 41:case 123:return u(3),l(27,e.charCodeAt(s+1)===n?s+2:s+1);case 62:return u(3),l(27,s+1);case 91:{let t=e.charCodeAt(s+1);return u(3),l(27,t===91||t===124||t===40||t===92||t===47?s+2:s+1)}case 58:{let t=p(s+1);return t>s+1&&c(36,e.slice(s+1,t),t)}}for(r=s;r<t;){let t=e.charCodeAt(r);if(t<128?M[t]===1:b(t))break;r++}return r>s&&l(32,r)},T=t=>{let n=e.charCodeAt(s+1),r=0;switch(t){case 34:return g();case 40:r=n===45?2:n===40?e.charCodeAt(s+2)===40?3:2:1;break;case 41:r=n===41?e.charCodeAt(s+2)===41?3:2:n===93?2:1;break;case 125:r=n===125?2:1;break;case 45:r=n===41?2:0;break;case 93:r=n===93||n===41||n===62?2:1;break;case 92:case 47:r=n===93?2:0}return r!==0&&(d(),l(28,s+r))},E=t=>{if(t===41)return d(),d(),c(30,`]>`,f(s+1));let n=f(t===44?s+1:s);for(let r of j)if(e.startsWith(r,n)){let i=f(n+r.length);return c(31,e.slice(t===44?n:s,i),i)}return!1};for(;;){if(s>=t){let e=-1;switch(o){case 0:e=37;break;case 1:e=6;break;case 8:e=14;break;case 10:e=17;break;case 12:e=20;break;case 13:e=22;break;case 14:e=24;break;case 15:e=25}s=t,e!==-1&&c(e,``,t);break}let a=e.charCodeAt(s),p=!0;switch(o){case 0:p=w(a);break;case 1:if(a===34)d(),s++;else{let n=e.indexOf(`"`,s);l(6,n===-1?t:n)}break;case 2:if(a===96)p=e.charCodeAt(s+1)===34,p&&(d(),s+=2);else if(a===34)p=!1;else{let n=s+1;for(;n<t;){let t=e.charCodeAt(n);if(t===96||t===34)break;n++}l(5,n)}break;case 3:p=T(a);break;case 4:if(a===34)g();else if(a===93&&e.charCodeAt(s+1)===62){let t=f(s+2);p=e.charCodeAt(t)===40,p&&(u(5),s=t+1)}else p=!1;break;case 5:p=E(a);break;case 6:if(a===34)e.charCodeAt(s+1)===96?g():(l(35,s+1),u(1));else{let e=v(f(s));p=e>=0,p&&(d(),l(33,f(e)))}break;case 7:{let t=12,n=e.startsWith(`DEFAULT`,s)?s+7:s,r=f(n);(n===s||r===n)&&(t=13,n=m(s),r=f(n)),p=n>s&&r>n,p&&(o=8,l(t,r));break}case 8:S(14);break;case 9:p=C(16,10);break;case 10:S(17);break;case 11:p=C(19,12);break;case 12:S(20);break;case 13:S(22);break;case 14:S(24);break;case 15:if(a===125)d(),s++;else{let n=e.indexOf(`}`,s);l(25,n===-1?t:n)}}if(!p)return n.push(1),r.push(``),i.push(s),{types:n,texts:r,starts:i}}return n.push(0),r.push(``),i.push(t),{types:n,texts:r,starts:i}}var N=`'NODE_ID', 'COLUMNS', 'SPACE_BLOCK', 'BLOCK_DIAGRAM_KEY', 'id-block', 'classDef', 'class', 'style'`;function P(e){let t=e[e.length-1];return Array.isArray(t)?(e.pop(),e.concat(t)):e}function te(e,t){let{types:n,texts:r,starts:i}=ee(e),a=0,o=t=>{let r=n[a];throw r===1?x(`block`,e,i[a],``,!0):x(`block`,e,i[a],`Expecting ${t}, got '${A[r]}'`)},s=e=>(n[a]!==e&&o(`'${A[e]}'`),r[a++]),c=()=>{let e=s(32);if(n[a]===27){let t=r[a++];return{id:e,label:s(6),typeStr:t+s(28)}}if(n[a]===29){let t=r[a++],i=s(6),o=[s(31)];for(;n[a]===31;)o.push(r[a++]);return{id:e,label:i,typeStr:t+s(30),directions:o}}return{id:e}},l=()=>{let e=c(),i=n[a]===36?parseInt(r[a++],10):1,o={id:e.id,label:e.label,type:t.typeStr2Type(e.typeStr),directions:e.directions,widthInColumns:i},l;for(;n[a]===33||n[a]===34;){let e=``;n[a++]===34&&(s(35),e=s(6),s(33));let i=r[a-1],u=c(),d=t.edgeStrToEdgeData(i),f=t.edgeStrToEdgeStartData(i),p=t.edgeStrToThickness(i),m=t.edgeStrToPattern(i);l??=[{id:o.id,label:o.label,type:o.type,directions:o.directions}],o={id:u.id,label:u.label,type:t.typeStr2Type(u.typeStr),directions:u.directions},l.push({id:l[l.length-1].id+`-`+u.id,start:l[l.length-1].id,end:u.id,label:e,type:`edge`,thickness:p,pattern:m,directions:u.directions,arrowTypeEnd:d,arrowTypeStart:f},o)}return l??o};s(2);let u=[],d=[];for(;;)switch(n[a]){case 32:d.push(l());break;case 4:d.push({type:`column-setting`,columns:parseInt(r[a++],10)});break;case 7:{let e=parseInt(r[a++],10);d.push({id:t.generateId(),type:`space`,label:``,width:e,children:[]});break}case 2:a++,u.push({list:d,header:void 0}),d=[];break;case 3:a++,n[a]!==32&&o(`'NODE_ID'`),u.push({list:d,header:l()}),d=[];break;case 26:{let e=u.pop();if(e===void 0||d.length===0)return o(N);a++;let n=t.generateId(),r=P(d);d=e.list,d.push(e.header===void 0?{id:n,type:`composite`,label:``,children:r}:{...e.header,type:`composite`,children:r});break}case 11:{a++;let e=s(13).trim();d.push({type:`classDef`,id:e,css:s(14).trim()});break}case 15:{a++;let e=s(16).trim();d.push({type:`applyClass`,id:e,styleClass:s(17).trim()});break}case 18:{a++;let e=s(19).trim();d.push({type:`applyStyles`,id:e,stylesStr:s(20).trim()});break}case 37:u.length>0&&o(N+`, 'end'`),d.length===0&&o(N),t.setHierarchy(P(d));return;default:o(d.length===0?N:N+(u.length>0?`, 'end'`:`, 'EOF'`))}}var F=1,I=2,L=4,R=8,z=7,B=20,V=12;function ne(e){let t=0;if(e)for(let n of e)switch(n.trim()){case`right`:t|=F;break;case`left`:t|=I;break;case`up`:t|=L;break;case`down`:t|=R;break;case`x`:t|=F|I;break;case`y`:t|=L|R}return t}var H=(e,t)=>e&t?1:0;function U(e){return e!==0&&(e&(L|R))===0?`x`:e!==0&&(e&(F|I))===0?`y`:``}function re(e,t,n){let r=U(e),i=H(e,I)-H(e,F),a=H(e,L)-H(e,R);if(r===`x`){let r=Math.max(n+8,14)+2*z,a=Math.min(r/2,B);return{w:Math.max(t+12,16)+a*(e===(F|I)?2:1),h:r,dx:i*a/2,dy:0}}if(r===`y`){let r=Math.max(t+16,14)+2*z,i=Math.min(r/2,B);return{w:r,h:Math.max(n+8,16)+i*(e===(L|R)?2:1),dx:0,dy:a*i/2}}return{w:Math.max(t+16,24)+V*(H(e,I)+H(e,F)),h:Math.max(n+8,24)+V*(H(e,L)+H(e,R)),dx:i*V/2,dy:a*V/2}}function ie(e,n,r,i){let a=U(e),o=n/2,s=r/2,c;if(a===`x`){let t=Math.min(s,B),n=s-z,r=e&I?-o+t:-o,i=e&F?o-t:o;c=[r,-n,i,-n],e&F&&c.push(i,-s,o,0,i,s),c.push(i,n,r,n),e&I&&c.push(r,s,-o,0,r,-s)}else if(a===`y`){let t=Math.min(o,B),n=o-z,r=e&L?-s+t:-s,i=e&R?s-t:s;c=[n,r,n,i],e&R&&c.push(o,i,0,s,-o,i),c.push(-n,i,-n,r),e&L&&c.push(-o,r,0,-s,o,r)}else{let t=e&I?-o+V:-o,n=e&F?o-V:o,r=e&L?-s+V:-s,i=e&R?s-V:s,a=(t+n)/2,l=(r+i)/2,u=Math.min(10,(n-t)/2),d=Math.min(10,(i-r)/2);c=[t,r],e&L&&c.push(a-u,r,a,-s,a+u,r),c.push(n,r),e&F&&c.push(n,l-d,o,l,n,l+d),c.push(n,i),e&R&&c.push(a+u,i,a,s,a-u,i),c.push(t,i),e&I&&c.push(t,l+d,-o,l,t,l-d)}let l=``;for(let e=0;e<c.length;e+=2)l+=(e?` `:``)+t(c[e])+`,`+t(c[e+1]);return`<polygon points="${l}" stroke-linejoin="round"${i}/>`}var ae=1e3;function W(e,t){if(e===0||!Number.isInteger(e))throw new _(`Columns must be an integer !== 0.`,`semantic`,{type:`block`});if(t<0||!Number.isInteger(t))throw new _(`Position must be a non-negative integer.`+t,`semantic`,{type:`block`});return e<0?{px:t,py:0}:{px:t%e,py:Math.floor(t/e)}}function G(e,t,n){let r=e.columns,i=[],a=0,o=0,s=0,c=0;for(let n of e.children){let{px:e,py:l}=W(r,a),u=n.span>=1?Math.min(n.span,ae):1;if(r>0&&u>r-e&&(u=r-e),n.span=u,n.col=e,n.row=l,a+=u,e+u>o&&(o=e+u),l===i.length&&i.push(0),n.children.length===0?i[l]=-1:i[l]>=0&&n.nh>i[l]&&(i[l]=n.nh),n.space)continue;let d=(n.nw-t*(u-1))/u;d>s&&(s=d),n.nh>c&&(c=n.nh)}let l=(i.length-1)*t;for(let e=0;e<i.length;e++)i[e]<0&&(i[e]=c),l+=i[e];e.cols=o,e.heights=i,e.nw=Math.max(e.nw,o*s+(o-1)*t+2*n),e.nh=l+2*n+e.head}function K(e,t,n){let{cols:r,heights:i}=e,a=i.length,o=(e.w-2*n-(r-1)*t)/r,s=e.h-2*n-e.head-(a-1)*t,c=0;for(let e of i)c+=e;let l=c>0?s/c:0,u=c>0?0:s/a,d=e.x-e.w/2+n,f=e.y-e.h/2+n+e.head,p=0;for(let n of e.children){for(;p<n.row;p++)f+=i[p]*l+u+t;n.w=o*n.span+t*(n.span-1),n.h=i[p]*l+u,n.x=d+n.col*(o+t)+n.w/2,n.y=f+n.h/2}}function oe(e,t){let n=[e];for(let e=0;e<n.length;e++)for(let t of n[e].children)n.push(t);for(let e=n.length-1;e>=0;e--){let r=n[e];r.children.length>0&&G(r,t,e===0?0:t)}e.w=e.nw,e.h=e.nh,e.x=e.w/2,e.y=e.h/2;for(let e=0;e<n.length;e++){let r=n[e];r.children.length>0&&K(r,t,e===0?0:t)}return{width:e.w,height:e.h}}var se=12,ce=200,q=8,le=` fill="var(--_s)" stroke="var(--_b)"`,ue=` stroke="var(--_b)"`,de=[],fe=[],pe=[],me=[`default`],he=2e6,ge=new Map([[`square`,`rect`],[`round`,`rounded`],[`circle`,`circle`],[`doublecircle`,`dbl-circ`],[`diamond`,`diam`],[`hexagon`,`hex`],[`stadium`,`stadium`],[`subroutine`,`fr-rect`],[`cylinder`,`cyl`],[`rect_left_inv_arrow`,`odd`],[`lean_right`,`lean-r`],[`lean_left`,`lean-l`],[`trapezoid`,`trap-b`],[`inv_trapezoid`,`trap-t`]]),_e=new Set([`circle`,`dbl-circ`,`diam`]),ve=new Set([`stadium`,`hex`,`odd`,`lean-r`,`lean-l`,`trap-b`,`trap-t`]);function J(e){return e.kind===0&&(e.shape===`circle`||e.shape===`dbl-circ`)}function Y(e,t,n){let r=e.bw/2,i=e.bh/2,a=Math.abs(t-e.x),o=i;return J(e)?o=Math.sqrt(Math.max(r*r-a*a,0)):e.kind===0&&e.shape===`diam`?o=i*Math.max(1-a/r,0):e.kind===0?o=i-g(e.shape,e.bw,e.bh,n>0?2:0):e.kind===1&&U(e.mask)===`x`&&(o=i-z),e.y+n*o}function X(e,t,n){let r=e.bw/2,i=e.bh/2,a=Math.abs(t-e.y),o=r;return J(e)?o=Math.sqrt(Math.max(i*i-a*a,0)):e.kind===0&&e.shape===`diam`?o=r*Math.max(1-a/i,0):e.kind===0?o=r-g(e.shape,e.bw,e.bh,n>0?1:3):e.kind===1&&U(e.mask)===`y`&&(o=r-z),e.x+n*o}function Z(e,t,n,r){let i=t-e.x,a=n-e.y,o=e.bw/2,s=e.bh/2,c;c=J(e)?o/(Math.hypot(i,a)||1):e.kind===0&&e.shape===`diam`?1/(Math.abs(i)/o+Math.abs(a)/s||1):Math.min(i===0?1/0:o/Math.abs(i),a===0?1/0:s/Math.abs(a)),c===1/0&&(c=0),r.push(e.x+i*c,e.y+a*c)}function ye(e,t,n,r,i){let a=i.x-i.bw/2+1,o=i.x+i.bw/2-1,s=i.y-i.bh/2+1,c=i.y+i.bh/2-1;if(e<a&&n<a||e>o&&n>o||t<s&&r<s||t>c&&r>c)return!1;if(e===n||t===r)return!0;let l=n-e,u=r-t,d=(n,r)=>Math.sign(l*(r-t)-u*(n-e)),f=d(a,s);return f===0||d(o,s)!==f||d(o,c)!==f||d(a,c)!==f}function Q(e,t,n,r){let i=0;for(let a of r)if(a!==t&&a!==n){for(let t=0;t+3<e.length;t+=2)if(ye(e[t],e[t+1],e[t+2],e[t+3],a)){i++;break}}return i}function be(e,t,n,r){let i=e.x-e.bw/2,a=e.x+e.bw/2,o=e.y-e.bh/2,s=e.y+e.bh/2,c=t.x-t.bw/2,l=t.x+t.bw/2,u=t.y-t.bh/2,d=t.y+t.bh/2,f=Math.max(i,c),p=Math.min(a,l),m=Math.max(o,u),h=Math.min(s,d),g=p-f>6,_=h-m>6;if(g&&_){let n=e.bw*e.bh<=t.bw*t.bh?e:t,r=n===e?t:e,i=n.y-n.bh/2-(r.y-r.bh/2),a=r.y+r.bh/2-(n.y+n.bh/2),o=n.x-n.bw/2-(r.x-r.bw/2),s=r.x+r.bw/2-(n.x+n.bw/2),c=Math.min(i,a,o,s),l;return l=c===a?[n.x,Y(n,n.x,1),n.x,r.y+r.bh/2]:c===i?[n.x,Y(n,n.x,-1),n.x,r.y-r.bh/2]:c===s?[X(n,n.y,1),n.y,r.x+r.bw/2,n.y]:[X(n,n.y,-1),n.y,r.x-r.bw/2,n.y],n===e?l:[l[2],l[3],l[0],l[1]]}if(g){let r=Math.min(6,(p-f)/2),i=Math.min(Math.max((f+p)/2+n,f+r),p-r),a=t.y>e.y?1:-1;return[i,Y(e,i,a),i,Y(t,i,-a)]}if(_){let r=Math.min(6,(h-m)/2),i=Math.min(Math.max((m+h)/2+n,m+r),h-r),a=t.x>e.x?1:-1;return[X(e,i,a),i,X(t,i,-a),i]}let v=t.x>e.x?1:-1,y=t.y>e.y?1:-1,b=[X(e,e.y,v),e.y,t.x,e.y,t.x,Y(t,t.x,-y)],x=[e.x,Y(e,e.x,y),e.x,t.y,X(t,t.y,-v),t.y],S=Math.abs(t.x-e.x)>=Math.abs(t.y-e.y),C=S?b:x;if(r===void 0)return C;let w=Q(C,e,t,r);if(w===0)return C;let T=S?x:b,E=Q(T,e,t,r);if(E<w&&(C=T,w=E),w===0)return C;let D=[];return Z(e,t.x,t.y,D),Z(t,e.x,e.y,D),Q(D,e,t,r)<w?D:C}function xe(e,n,r){let i=e.length,a=e[0],o=e[1],s=e[i-2],c=e[i-1],l=e[2]-a,u=e[3]-o,d=Math.hypot(l,u);l/=d||1,u/=d||1;let f=s-e[i-4],p=c-e[i-3],m=Math.hypot(f,p);if(f/=m||1,p/=m||1,i===4&&n+r>d){let e=d/(n+r);n*=e,r*=e}n=Math.min(n,d),r=Math.min(r,m);let h=`M${t(a+l*n)},${t(o+u*n)}`;if(i===6){let i=Math.max(0,Math.min(q,d-n,m-r));h+=`L${t(e[2]-l*i)},${t(e[3]-u*i)}Q${t(e[2])},${t(e[3])} ${t(e[2]+f*i)},${t(e[3]+p*i)}`}return h+=`L${t(s-f*r)},${t(c-p*r)}`,{d:h,sx:a,sy:o,sdx:-l,sdy:-u,ex:s,ey:c,edx:f,edy:p}}function Se(e,t){let n=e.bw/2,r=e.bh/2,i=Math.max(1,Math.min(10+5*(t-1),n,r));if(J(e)){let t=e.x+n*Math.SQRT1_2,r=e.y-n*Math.SQRT1_2,a=2*Math.asin(Math.min(1,i/(2*n))),o=i=>Math.atan2(e.y-n*Math.sin(i)-r,e.x+n*Math.cos(i)-t);return[t,r,i,o(Math.PI/4+a),o(Math.PI/4-a)]}if(e.kind===0&&e.shape===`diam`){let t=Math.atan2(r,n);return[e.x+n/2,e.y-r/2,i,t+Math.PI,t]}return[e.x+n,e.y-r,i,Math.PI,Math.PI/2]}function Ce(e,n,r,i){let[a,o,s,c,l]=Se(e,n),u=c+r/s,d=l-i/s,f=(d-u)%(2*Math.PI);f<=0&&(f+=2*Math.PI);let p=a+s*Math.cos(u),m=o+s*Math.sin(u),h=a+s*Math.cos(d),g=o+s*Math.sin(d),_=a+s*Math.cos(c),v=o+s*Math.sin(c),y=a+s*Math.cos(l),b=o+s*Math.sin(l),x=Math.hypot(_-p,v-m),S=Math.hypot(y-h,b-g);return{d:`M${t(p)},${t(m)}A${t(s)},${t(s)} 0 ${+(f>Math.PI)} 1 ${t(h)},${t(g)}`,sx:_,sy:v,sdx:x>0?(_-p)/x:Math.sin(c),sdy:x>0?(v-m)/x:-Math.cos(c),ex:y,ey:b,edx:S>0?(y-h)/S:-Math.sin(l),edy:S>0?(b-g)/S:Math.cos(l)}}var $=[.5,.3,.7,.15,.85];function we(e,t,n,r,i,a,o){if(o===void 0)return .5;for(let s of $){let c=e[t]+(e[t+2]-e[t])*s,l=e[t+1]+(e[t+3]-e[t+1])*s,u=!0;for(let e of o)if(e!==i&&e!==a&&Math.abs(c-e.x)<(n+e.bw)/2&&Math.abs(l-e.y)<(r+e.bh)/2){u=!1;break}if(u)return s}return .5}function Te(e,t,n){return d(n,r=>Ee(e,t,n,r))}function Ee(d,g,_,y){let b=_.fontSize??16,x=Math.round(b*.875),S=_.measurer??v(_.fontFamily),C=_.padding??8,w=_.icons,T=g.block?.padding,E=Math.min(typeof T==`number`&&T>=0?Math.min(T,200):se,y?6:1/0),D=y?80:ce,O=e=>{let t=[],n=e=>{for(let n of e)for(let e of n.split(`;`))t.push(e)};for(let t of e.classes&&e.classes.length>0?e.classes:me){let e=d.classes.get(t);e&&n(e.styles)}return e.styles&&n(e.styles),r(t)},k=(e,t)=>{let n=e.type,i=n===`space`?r(de):O(e),a=+!!i.bold|(i.italic?2:0),s=i.fontSize??b,c=0,l=``,u,d=0,p=0,m=0,g=0,v=0,x=0;if(n===`space`)c=3,u=o(void 0,!1,S,s,D);else if(n===`composite`)c=2,u=o(e.label,!1,S,s,y?f(_):4e3,a),m=u.height>0?u.height+4:0,d=u.width+2*E,p=m+2*E;else if(n===`block_arrow`){c=1,u=o(e.label,!1,S,s,D,a);let t=!0;for(let e of u.lines)for(let n of e)(n.icon!==void 0||n.text.trim()!==``)&&(t=!1);g=ne(e.directions);let n=t?re(g,0,0):re(g,u.width,u.height);d=n.w,p=n.h,v=n.dx,x=n.dy}else{l=ge.get(n??``)??`rect`,u=o(e.label,!1,S,s,D,a);let t=h(l,u.width,u.height);d=t.w,p=l===`cyl`?Math.max(t.h,u.height+40):t.h,x=t.dy}return{children:[],columns:c===2?e.columns??-1:-1,span:c===3?1:e.widthInColumns??1,space:c===3,head:m,nw:d,nh:p,col:0,row:0,cols:0,heights:pe,x:0,y:0,w:0,h:0,block:e,kind:c,index:t,shape:l,label:u,style:i,mask:g,dx:v,dy:x,bw:0,bh:0}},A=k(d.root,0);A.nw=0,A.nh=0;let j=[A],M=new Map;for(let e=0;e<j.length;e++){let t=j[e];if(t.kind===2)for(let e of t.block.children??fe){let n=k(e,j.length);t.children.push(n),j.push(n),n.kind!==3&&M.set(e.id,n)}}let ee=oe(A,E),N=[];for(let e of j)e.kind===0&&_e.has(e.shape)?(e.bw=e.nw,e.bh=e.nh):e.kind===1?(e.bw=e.span>1?e.w:e.nw,e.bh=e.nh):(e.bw=e.w,e.bh=e.kind===0&&ve.has(e.shape)?e.nh:e.h),e.kind===0&&e.shape===`cyl`&&(e.dy=Math.min(12,Math.max(6,e.bw/14))/2),(e.kind===0||e.kind===1)&&N.push(e);let P=new Map,te=new Set,F=[],I=[];for(let e of d.edges){let t=M.get(e.start??``),n=M.get(e.end??``);if(t===void 0||n===void 0)continue;let r=Math.min(t.index,n.index)*j.length+Math.max(t.index,n.index);P.set(r,(P.get(r)??0)+1),e.label&&te.add(r),F.push([t,n]),I.push(e)}let L=I.length*N.length<=he?N:void 0,R=new Map,z=[],B=0,V=0,H=ee.width,U=ee.height,ae=(e,t,n,r)=>{e-n/2<B&&(B=e-n/2),e+n/2>H&&(H=e+n/2),t-r/2<V&&(V=t-r/2),t+r/2>U&&(U=t+r/2)};for(let e=0;e<I.length;e++){let[t,n]=F[e],r=Math.min(t.index,n.index)*j.length+Math.max(t.index,n.index),i=P.get(r)??1,a=R.get(r)??0;R.set(r,a+1);let s=o(I[e].label,!1,S,x,ce),c,l,u;if(t===n){let[e,n,r]=Se(t,a+1);c=[],ae(e,n,2*r+2,2*r+2),l=e+r+6+s.width/2,u=n-r/2}else{let e=te.has(r)?Math.round(x*1.5)+2:14;c=be(t,n,(a-(i-1)/2)*e,L);let o=c.length,d=Math.abs(c[2]-c[0])+Math.abs(c[3]-c[1]),f=Math.abs(c[o-2]-c[o-4])+Math.abs(c[o-1]-c[o-3]),p=o===6&&f>d?2:0,m=s.width>0?we(c,p,s.width+8,s.height,t,n,L):.5;l=c[p]+(c[p+2]-c[p])*m,u=c[p+1]+(c[p+3]-c[p+1])*m}s.width>0&&ae(l,u,s.width+8,s.height),z.push({edge:I[e],points:c,loop:t===n?a+1:0,label:s,lx:l,ly:u})}let W=p(d.title,S,b,y?f(_):4e3),G=W.height>0?W.height+12:0,K=Math.max(H-B,W.width),q=C-B+(K-(H-B))/2,J=C+G-V;for(let e of j)e.x+=q,e.y+=J;let Y=Math.ceil(K+2*C),X=Math.ceil(U-V+G+2*C),Z=``,ye=``;for(let n=1;n<j.length;n++){let r=j[n];if(r.kind===3)continue;let o=e((r.block.classes??de).join(` `)),c=a(r.block.id);if(r.kind===2){let e=r.y-r.h/2;Z+=`<g class="pele-cluster${o}" data-id="${c}"><rect x="${t(r.x-r.w/2)}" y="${t(e)}" width="${t(r.w)}" height="${t(r.h)}" fill="var(--_a)" fill-opacity="0.5" stroke="var(--_b)"${i(r.style.shape)}/>`+s(r.label,r.x,e+(r.head+E)/2+2,` class="pele-cluster-label" fill="var(--_m)"${r.style.text}`,w)+`</g>`;continue}let l=r.kind===1;ye+=`<g class="pele-node pele-shape-${l?`block-arrow`:r.shape}${o}" data-id="${c}" transform="translate(${t(r.x)},${t(r.y)})">`+(l?ie(r.mask,r.bw,r.bh,le+r.style.shape):m(r.shape,r.bw,r.bh,le+r.style.shape,ue+r.style.line))+s(r.label,r.dx,r.dy,` class="pele-label"${r.style.text}`,w)+`</g>`}let Q=``,$=``;for(let e=0;e<z.length;e++){let{edge:t,points:n,loop:r,label:i}=z[e],o=t.arrowTypeStart??``,s=t.arrowTypeEnd??``,d;if(r>0)d=Ce(F[e][0],r,c(o),c(s));else{for(let e=0;e<n.length;e+=2)n[e]+=q,n[e+1]+=J;d=xe(n,c(o),c(s))}let f=a(t.id);if(Q+=`<g class="pele-edge" data-id="${f}"><path d="${d.d}"${t.thickness===`thick`?` stroke-width="2.5"`:``}${t.pattern===`dotted`?` stroke-dasharray="3 4"`:``}/>`+u(o,d.sx,d.sy,d.sdx,d.sdy,`var(--_l)`)+u(s,d.ex,d.ey,d.edx,d.edy,`var(--_l)`)+`</g>`,i.width>0){let n=z[e].lx+q,r=z[e].ly+J;$+=l(t.id,i,n,r,``,w)}}return{svg:n(`block`,Y,X,b,_,d,s(W,Y/2,C+W.height/2,` class="pele-title" font-weight="var(--_tw)"`)+(Z?`<g class="pele-clusters">${Z}</g>`:``)+(Q?`<g class="pele-edges" fill="none" stroke="var(--_l)" stroke-linecap="round">${Q}</g>`:``)+`<g class="pele-nodes">${ye}</g>`+($?`<g class="pele-edge-labels" font-size="${x}">${$}</g>`:``)),width:Y,height:X,links:[]}}var De={type:`block`,math:!0,parse(e,t,n){let r=new k;return r.title=n,te(e,r),r},render:Te};export{De as block};
3
- //# sourceMappingURL=SLD4V6NK-DIFaAadw.js.map
3
+ //# sourceMappingURL=SLD4V6NK-DTdKN7s4.js.map
@@ -0,0 +1,6 @@
1
+ import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{Du as i,Ft as a,Gu as o,Jo as s,Js as c,Kd as l,Lf as u,Ol as d,Ql as f,Td as p,Ut as m,Vd as h,Wl as g,Wt as _,Xn as v,Xt as y,Yd as b,Zn as x,Zo as S,es as C,fr as w,ls as T,mr as ee,rr as E,sr as te,t as D,tr as ne}from"./utils-CtzgibkN.js";import{T as O,V as k,da as A}from"./src-aYUfWMsw.js";import{Dr as re,Qr as j,Sr as ie,cr as M}from"./runtime-DciS6GP9.js";import{C as N,O as P}from"./entities-CNmVqAZs.js";import{a as F,c as I,o as L,s as R,t as z}from"./select--26O8gr7.js";import{t as B}from"./link-ByE5ZkNW.js";import{a as V,m as H}from"./relay-DcCuBtiq.js";import{C as U,S as ae,et as W,f as G}from"./useSettings-CnHpxSBo.js";import{f as K,t as q}from"./server-DKB_3xTN.js";import{n as oe}from"./session-D_OiLzln.js";import{n as se}from"./query-DmYgeaGK.js";import{t as ce}from"./use-atom-command-Bfi4daMj.js";import{t as J}from"./toastHelpers-DxXYm50b.js";import{h as Y,i as le,m as X,u as ue}from"./queries-BhrI_odm.js";import{a as de}from"./timestampFormat-wac2e_Jz.js";import{a as fe,n as pe,t as me}from"./tooltip-DDv-MvO4.js";import{t as he}from"./textarea-CgJxMEC6.js";import{n as ge,t as _e}from"./toggle-group-BQBgK4Fh.js";import{a as ve,c as ye,l as be,n as xe,o as Se,r as Ce,s as we,t as Te}from"./combobox-D28ATySv.js";import{t as Ee}from"./input-BwujRX3Y.js";import{n as De}from"./scroll-area-D7wKdOM7.js";import{a as Oe,c as ke,i as Ae,n as je,o as Me,r as Ne,s as Pe,t as Fe}from"./dialog-BJ3R7bWN.js";import{a as Ie,i as Le,o as Re,r as ze,t as Be}from"./empty-BwsFVBxJ.js";import{n as Ve}from"./EnvironmentMachineIcon-DX1kvIxN.js";import{V as He,a as Ue,i as We,n as Ge,s as Ke,u as qe,v as Je}from"./settingsLayout-EWRSNE9F.js";import{n as Ye}from"./primaryCloudLinkState-DStOgXZ7.js";import{a as Xe,c as Ze,d as Qe,f as $e,i as et,l as tt,n as nt,p as rt,r as it,s as at,t as ot,u as st}from"./scheduledTasksSettings.logic-Cnm8G_wO.js";import{Po as ct,Wo as lt,ba as ut,jn as dt,vn as ft}from"./main-D8lKEPYS.js";import{t as pt}from"./ProviderModelPicker-446NiacH.js";var mt=n(),Z=e(t(),1),Q=e(r(),1);function ht(e){let t=(0,mt.c)(69),{items:n,filteredItems:r,value:i,query:a,resultsQuery:o,onQueryChange:s,open:c,onOpenChange:l,onSelectItem:u,hasNextPage:d,isFetchingNextPage:f,onLoadNext:p,statusText:m,originControl:h,popupProps:g,renderItem:_,getItemType:v,children:y}=e,b=(0,Z.useRef)(null),x=(0,Z.useId)(),S=(0,Z.useRef)(null),C=(0,Z.useRef)(null),w;t[0]===l?w=t[1]:(w=e=>{C.current=null,e||(b.current=null),l(e)},t[0]=l,t[1]=w);let T=w,[ee,E]=(0,Z.useState)(!1),[te,ne]=(0,Z.useState)(!1),O;t[2]!==d||t[3]!==f||t[4]!==p?(O=()=>{d&&!f&&p()},t[2]=d,t[3]=f,t[4]=p,t[5]=O):O=t[5];let k=O,A;t[6]!==k||t[7]!==d||t[8]!==f||t[9]!==c?(A=()=>{let e=S.current;if(!e)return;let t=C.current;C.current=e.scrollTop,c&&d&&!f&&Y({previousScrollTop:t,scrollTop:e.scrollTop,scrollHeight:e.scrollHeight,clientHeight:e.clientHeight})&&k()},t[6]=k,t[7]=d,t[8]=f,t[9]=c,t[10]=A):A=t[10];let re=A,j=(0,Z.useRef)(null),ie;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(ie=()=>{let e=j.current?.getScrollableNode?.();if(!(e instanceof HTMLElement))return;S.current=e;let t=Math.max(0,e.scrollHeight-e.clientHeight);E(e.scrollTop>1),ne(t-e.scrollTop>1)},t[11]=ie):ie=t[11];let M=ie,N,P;t[12]===c?(N=t[13],P=t[14]):(N=()=>{if(!c)return;let e=0,t=requestAnimationFrame(()=>{M(),e=requestAnimationFrame(M)});return()=>{cancelAnimationFrame(t),cancelAnimationFrame(e)}},P=[c,M],t[12]=c,t[13]=N,t[14]=P),(0,Z.useLayoutEffect)(N,P);let F=(0,Z.useRef)(null),I,L;t[15]!==c||t[16]!==o?(I=()=>{c?F.current!==o&&(F.current=o,j.current?.scrollToOffset?.({offset:0,animated:!1})):F.current=null},L=[o,c],t[15]=c,t[16]=o,t[17]=I,t[18]=L):(I=t[17],L=t[18]),(0,Z.useEffect)(I,L);let R;t[19]===c?R=t[20]:(R=(e,t)=>{b.current=typeof e==`string`?e:null,!(!c||t.index<0||t.reason!==`keyboard`)&&j.current?.scrollIndexIntoView?.({index:t.index,animated:!1})},t[19]=c,t[20]=R);let z;t[21]===s?z=t[22]:(z=e=>s(e.target.value),t[21]=s,t[22]=z);let B;t[23]!==r||t[24]!==u?(B=e=>{if(e.key!==`Enter`||e.nativeEvent.isComposing||e.keyCode===229)return;let t=b.current;t!==null&&r.includes(t)&&(e.preventBaseUIHandler?.(),e.preventDefault(),e.stopPropagation(),b.current=null,u(t))},t[23]=r,t[24]=u,t[25]=B):B=t[25];let V;t[26]!==a||t[27]!==z||t[28]!==B?(V=(0,Q.jsx)(we,{placeholder:`Search refs...`,value:a,onChange:z,onKeyDown:B}),t[26]=a,t[27]=z,t[28]=B,t[29]=V):V=t[29];let H;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,Q.jsx)(xe,{children:`No refs found.`}),t[30]=H):H=t[30];let U;t[31]===v?U=t[32]:(U=v?{getItemType:v}:{},t[31]=v,t[32]=U);let ae;t[33]===_?ae=t[34]:(ae=e=>{let{item:t,index:n}=e;return _(t,n)},t[33]=_,t[34]=ae);let W;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(W=()=>{M(),C.current=S.current?.scrollTop??null},t[35]=W):W=t[35];let G;t[36]===re?G=t[37]:(G=()=>{M(),re()},t[36]=re,t[37]=G);let K;t[38]!==te||t[39]!==ee?(K=D(`max-h-56 scrollbar-gutter-stable overflow-x-hidden overscroll-y-contain ps-1 pe-0 pt-2 pb-1`,De({top:ee,bottom:te})),t[38]=te,t[39]=ee,t[40]=K):K=t[40];let q;t[41]!==r||t[42]!==U||t[43]!==ae||t[44]!==G||t[45]!==K?(q=(0,Q.jsx)(`div`,{className:`relative min-h-0 w-full max-h-56 flex-1 overflow-hidden`,children:(0,Q.jsx)(ve,{className:`size-full min-w-0`,children:(0,Q.jsx)(dt,{ref:j,data:r,keyExtractor:gt,...U,renderItem:ae,estimatedItemSize:28,drawDistance:336,onLayout:W,onScroll:G,className:K})})}),t[41]=r,t[42]=U,t[43]=ae,t[44]=G,t[45]=K,t[46]=q):q=t[46];let oe;t[47]!==h||t[48]!==x?(oe=h?(0,Q.jsxs)(me,{children:[(0,Q.jsx)(fe,{render:(0,Q.jsxs)(`label`,{htmlFor:x,className:`flex cursor-pointer items-center justify-between gap-3 border-t border-border/60 px-3 py-2 text-xs`,children:[(0,Q.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5 font-medium text-muted-foreground`,children:[(0,Q.jsx)(lt,{"aria-hidden":`true`,className:`size-3 shrink-0`}),(0,Q.jsx)(`span`,{className:`truncate`,children:`Start from origin`})]}),(0,Q.jsx)(ct,{id:x,checked:h.checked,size:`sm`,"aria-label":`Start worktree from origin`,onCheckedChange:e=>h.onCheckedChange(!!e)})]})}),(0,Q.jsx)(pe,{side:`top`,className:`max-w-72 whitespace-normal`,children:`Creates the worktree from the latest matching branch on origin instead of your local branch.`})]}):null,t[47]=h,t[48]=x,t[49]=oe):oe=t[49];let se;t[50]===m?se=t[51]:(se=m?(0,Q.jsx)(ye,{children:m}):null,t[50]=m,t[51]=se);let ce;t[52]!==q||t[53]!==oe||t[54]!==se?(ce=(0,Q.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden`,children:[H,q,oe,se]}),t[52]=q,t[53]=oe,t[54]=se,t[55]=ce):ce=t[55];let J;t[56]!==g||t[57]!==V||t[58]!==ce?(J=(0,Q.jsxs)(Se,{...g,children:[V,ce]}),t[56]=g,t[57]=V,t[58]=ce,t[59]=J):J=t[59];let le;return t[60]!==y||t[61]!==r||t[62]!==T||t[63]!==n||t[64]!==c||t[65]!==J||t[66]!==R||t[67]!==i?(le=(0,Q.jsxs)(Te,{items:n,filteredItems:r,autoHighlight:!0,virtualized:!0,onItemHighlighted:R,onOpenChange:T,open:c,value:i,children:[y,J]}),t[60]=y,t[61]=r,t[62]=T,t[63]=n,t[64]=c,t[65]=J,t[66]=R,t[67]=i,t[68]=le):le=t[68],le}function gt(e){return e}function _t(e){let t=(0,mt.c)(15),{branch:n,projectCwd:r,index:i,value:a,disabled:o,onClick:s,onContextMenu:c}=e,l=n.name,u=n.worktreePath&&r&&n.worktreePath!==r,d=n.current?`current`:u?`worktree`:n.isRemote?`remote`:n.isDefault?`default`:null,f=a??l,p;t[0]===l?p=t[1]:(p=(0,Q.jsx)(ft,{value:l,className:`flex-1`}),t[0]=l,t[1]=p);let m;t[2]===d?m=t[3]:(m=d&&(0,Q.jsx)(`span`,{className:`shrink-0 text-3xs text-muted-foreground/45`,children:d}),t[2]=d,t[3]=m);let h;t[4]!==p||t[5]!==m?(h=(0,Q.jsxs)(`div`,{className:`flex w-full min-w-0 items-center justify-between gap-2`,children:[p,m]}),t[4]=p,t[5]=m,t[6]=h):h=t[6];let g;return t[7]!==o||t[8]!==i||t[9]!==l||t[10]!==s||t[11]!==c||t[12]!==f||t[13]!==h?(g=(0,Q.jsx)(Ce,{disabled:o,hideIndicator:!0,index:i,value:f,onClick:s,onContextMenu:c,children:h},l),t[7]=o,t[8]=i,t[9]=l,t[10]=s,t[11]=c,t[12]=f,t[13]=h,t[14]=g):g=t[14],g}function vt(e,t){if(e.url!==null)return{address:e.url,copyable:!0,note:null};if(t===null)return{address:e.path,copyable:!1,note:`Link this environment to P4 Connect for a public URL.`};let n=new URL(e.path,t);return{address:n.href,copyable:!0,note:j(n.hostname)?`Only this computer can call this address. Link P4 Connect for a public URL.`:`Works wherever this environment's address is reachable, for example over Tailscale or your own proxy. Link P4 Connect for a public URL.`}}var yt=e=>e.join(`
2
+ `);function bt(e,t){return S(n=>C(e=>n===``?[]:n.split(`
3
+ `).map(n=>e(t(n)))).pipe(T(`${e}:${n}`)))}function xt(e){let t=(0,mt.c)(62),{environmentId:n,cwd:r,value:a,onValueChange:o,startFromOrigin:s,onStartFromOriginChange:c,disabled:l,id:u}=e,f=l!==void 0&&l,[p,m]=(0,Z.useState)(!1),[h,g]=(0,Z.useState)(``),_,v,y,b,x;t[0]!==r||t[1]!==n||t[2]!==h?(x=h.trim(),b=le,_=n,v=r,y=X(x),t[0]=r,t[1]=n,t[2]=h,t[3]=_,t[4]=v,t[5]=y,t[6]=b,t[7]=x):(_=t[3],v=t[4],y=t[5],b=t[6],x=t[7]);let S;t[8]!==_||t[9]!==v||t[10]!==y?(S={environmentId:_,cwd:v,query:y},t[8]=_,t[9]=v,t[10]=y,t[11]=S):S=t[11];let C=b(S),w;t[12]!==r||t[13]!==n||t[14]!==a?(w=r&&a?ue.listRefs({environmentId:n,input:{cwd:r,query:a,limit:10}}):null,t[12]=r,t[13]=n,t[14]=a,t[15]=w):w=t[15];let T=se(w),E;t[16]!==C.refs||t[17]!==T||t[18]!==a?(E=C.refs.find(e=>e.name===a)??T.data?.refs.find(e=>e.name===a),t[16]=C.refs,t[17]=T,t[18]=a,t[19]=E):E=t[19];let te=E,D=a||null,ne=te?te.isRemote===!0:null,O;t[20]!==s||t[21]!==ne||t[22]!==D?(O=Je({activeWorktreePath:null,effectiveEnvMode:`worktree`,resolvedActiveBranch:D,resolvedActiveBranchIsRemote:ne,startFromOrigin:s}),t[20]=s,t[21]=ne,t[22]=D,t[23]=O):O=t[23];let k=O,A;t[24]===C.refs?A=t[25]:(A=new Map(C.refs.map(St)),t[24]=C.refs,t[25]=A);let re=A,j;t[26]===re?j=t[27]:(j=[...re.keys()],t[26]=re,t[27]=j);let ie=j,M=C.data?.nextCursor!=null,N=C.error??(C.isPending&&C.data===null?`Loading refs...`:C.isFetchingNextPage?`Loading more refs...`:M?`Showing ${C.refs.length} of ${C.data?.totalCount} refs`:null),P;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(P=e=>{m(e),e||g(``)},t[28]=P):P=t[28];let F=P,I=a||null,L=p&&!f,R;t[29]===o?R=t[30]:(R=e=>{o(e),F(!1)},t[29]=o,t[30]=R);let z;t[31]!==c||t[32]!==s?(z={checked:s,onCheckedChange:c},t[31]=c,t[32]=s,t[33]=z):z=t[33];let B;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(B={align:`start`,side:`bottom`,className:`flex w-80 flex-col`},t[34]=B):B=t[34];let V;t[35]!==re||t[36]!==r||t[37]!==o?(V=(e,t)=>{let n=re.get(e);return n?(0,Q.jsx)(_t,{branch:n,projectCwd:r,index:t,onClick:()=>{o(n.name),F(!1)}}):null},t[35]=re,t[36]=r,t[37]=o,t[38]=V):V=t[38];let H=f||!r,U;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,Q.jsx)(ee,{variant:`outline`,size:`sm`}),t[39]=U):U=t[39];let ae;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,Q.jsx)(i,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[40]=ae):ae=t[40];let W;t[41]===k?W=t[42]:(W=(0,Q.jsx)(ft,{value:k,className:`flex-1 text-left`}),t[41]=k,t[42]=W);let G;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,Q.jsx)(d,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[43]=G):G=t[43];let K;t[44]!==u||t[45]!==H||t[46]!==W?(K=(0,Q.jsxs)(be,{id:u,disabled:H,render:U,className:`w-full justify-between `,children:[ae,W,G]}),t[44]=u,t[45]=H,t[46]=W,t[47]=K):K=t[47];let q;return t[48]!==C.isFetchingNextPage||t[49]!==C.loadNext||t[50]!==M||t[51]!==ie||t[52]!==h||t[53]!==N||t[54]!==I||t[55]!==L||t[56]!==R||t[57]!==z||t[58]!==V||t[59]!==K||t[60]!==x?(q=(0,Q.jsx)(ht,{items:ie,filteredItems:ie,value:I,query:h,resultsQuery:x,onQueryChange:g,open:L,onOpenChange:F,onSelectItem:R,hasNextPage:M,isFetchingNextPage:C.isFetchingNextPage,onLoadNext:C.loadNext,statusText:N,originControl:z,popupProps:B,renderItem:V,children:K}),t[48]=C.isFetchingNextPage,t[49]=C.loadNext,t[50]=M,t[51]=ie,t[52]=h,t[53]=N,t[54]=I,t[55]=L,t[56]=R,t[57]=z,t[58]=V,t[59]=K,t[60]=x,t[61]=q):q=t[61],q}function St(e){return[e.name,e]}var Ct=[1,2,3,4,5,6,0],wt=[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],Tt=[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],Et={auto:`Choose automatically`,worktree:`Create a new worktree`,root:`Use the project checkout`,existing_worktree:`Use a specific checkout`},Dt={editingId:null,title:``,prompt:``,enabled:!0,scheduleMode:`fixed`,intervalMinutes:`15`,timeOfDay:`09:00`,weekdays:new Set([1,2,3,4,5]),projectId:``,threadId:``,workspaceMode:`worktree`,baseRef:`main`,startFromOrigin:!0,existingWorktreePath:``,modelKey:``,runtimeMode:`full-access`,interactionMode:`default`,baseModelSelection:null,signatureEnabled:!1,...ot,signatureSecret:``,maxDeliveryAgeMinutes:``,replayKey:``,coalesceKey:``,coalesceWindowSeconds:``,filters:[],savedFilters:[]};function Ot(e){let t=(0,mt.c)(18),{filters:n,onChange:r}=e,i;t[0]!==n||t[1]!==r?(i=(e,t)=>r(n.map((n,r)=>r===e?{...n,...t}:n)),t[0]=n,t[1]=r,t[2]=i):i=t[2];let a=i,o;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Q.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,Q.jsx)(ut,{children:`Filters`}),(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Run only when every filter matches. Other requests are logged as filtered. Separate “is one of” values with commas; a value can't contain a comma.`})]}),t[3]=o):o=t[3];let s=n.length>=16,c;t[4]!==n||t[5]!==r?(c=()=>r([...n,Qe()]),t[4]=n,t[5]=r,t[6]=c):c=t[6];let l;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Q.jsx)(b,{}),t[7]=l):l=t[7];let d;t[8]!==s||t[9]!==c?(d=(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[o,(0,Q.jsxs)(ee,{className:`shrink-0`,variant:`outline`,size:`sm`,disabled:s,onClick:c,children:[l,`Add filter`]})]}),t[8]=s,t[9]=c,t[10]=d):d=t[10];let f;t[11]!==n||t[12]!==r||t[13]!==a?(f=n.map((e,t)=>(0,Q.jsxs)(`div`,{className:`space-y-2 pt-1`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(`div`,{className:`grid min-w-0 flex-1 grid-cols-1`,children:(0,Q.jsx)(Ee,{"aria-label":`Filter ${t+1} path`,placeholder:`body.action`,value:e.path,onChange:e=>a(t,{path:e.target.value})})}),(0,Q.jsx)(ee,{variant:`ghost`,size:`icon-sm`,"aria-label":`Remove filter ${t+1}`,onClick:()=>r(rt(n,e.id)),children:(0,Q.jsx)(u,{})})]}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsxs)(z,{value:e.op,onValueChange:e=>{let n=st.find(t=>t.op===e);n&&a(t,{op:n.op})},children:[(0,Q.jsx)(`div`,{className:`grid w-44 shrink-0 grid-cols-1`,children:(0,Q.jsx)(R,{size:`sm`,"aria-label":`Filter ${t+1} test`,children:(0,Q.jsx)(I,{children:st.find(t=>t.op===e.op)?.label})})}),(0,Q.jsx)(L,{children:st.map(kt)})]}),e.op===`exists`?null:(0,Q.jsx)(`div`,{className:`grid min-w-0 flex-1 grid-cols-1`,children:(0,Q.jsx)(Ee,{"aria-label":`Filter ${t+1} value`,placeholder:e.op===`in`?`opened, reopened`:`opened`,value:e.value,onChange:e=>a(t,{value:e.target.value})})})]})]},e.id)),t[11]=n,t[12]=r,t[13]=a,t[14]=f):f=t[14];let p;return t[15]!==d||t[16]!==f?(p=(0,Q.jsxs)(`div`,{className:`space-y-2`,children:[d,f]}),t[15]=d,t[16]=f,t[17]=p):p=t[17],p}function kt(e){return(0,Q.jsx)(F,{value:e.op,children:e.label},e.op)}function $(e){let t=(0,mt.c)(11),{label:n,hint:r,htmlFor:i,children:a}=e,o;t[0]===n?o=t[1]:(o=(0,Q.jsx)(`span`,{children:n}),t[0]=n,t[1]=o);let s;t[2]===r?s=t[3]:(s=r?(0,Q.jsx)(`span`,{className:`font-normal text-2xs text-muted-foreground/80`,children:r}):null,t[2]=r,t[3]=s);let c;t[4]!==i||t[5]!==o||t[6]!==s?(c=(0,Q.jsxs)(ut,{className:`flex items-baseline justify-between`,htmlFor:i,children:[o,s]}),t[4]=i,t[5]=o,t[6]=s,t[7]=c):c=t[7];let l;return t[8]!==a||t[9]!==c?(l=(0,Q.jsxs)(`div`,{className:`space-y-1.5`,children:[c,a]}),t[8]=a,t[9]=c,t[10]=l):l=t[10],l}function At(e){let t=e.indexOf(`:`);return t<=0||t===e.length-1?null:{instanceId:A.make(e.slice(0,t)),model:e.slice(t+1)}}function jt(e){if(e.type===`webhook`)return`On webhook`;if(e.type===`interval`){let t=e.everyMs/6e4;return Number.isInteger(t)?`Every ${t} min`:`Every ${Math.round(e.everyMs/1e3)} sec`}let t=e.weekdays??[];return`${t.length===0?`Daily`:t.length===5&&t.every(e=>e>=1&&e<=5)?`Weekdays`:t.map(e=>wt[e]).join(`, `)} at ${e.timeOfDay}`}function Mt(e){if(!e)return`Not scheduled`;let t=new Date(e).getTime()-Date.now();if(t<=0){let t=de(e);return t?t.suffix?`${t.value} ${t.suffix}`:t.value:`Not scheduled`}let n=Math.ceil(t/6e4);if(n<2)return`in under a minute`;if(n<60)return`in ${n}m`;let r=Math.round(n/60);return r<24?`in ${r}h`:`in ${Math.round(r/24)}d`}function Nt(e){return e===`accepted`?`success`:e===`duplicate`||e===`coalesced`||e===`disabled`||e===`rate_limited`||e===`expired`?`warning`:e===`dispatch_failed`||e===`rejected_signature`?`error`:`outline`}function Pt(e){return e===`failed`?`error`:e===`succeeded`?`success`:e===`running`?`info`:`outline`}function Ft(e){let t=(0,mt.c)(35),{scope:n,environments:r,connectedEnvironments:i,environment:a}=He(),o;t[0]!==e.environmentId||t[1]!==e.threadId?(o=()=>e.threadId&&e.environmentId?{environmentId:e.environmentId,task:null}:null,t[0]=e.environmentId,t[1]=e.threadId,t[2]=o):o=t[2];let[c,l]=(0,Z.useState)(o),u;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=(e,t)=>{l({environmentId:e,task:t})},t[3]=u):u=t[3];let d=u,f=a??i[0],p;t[4]===i?p=t[5]:(p=Lt(yt(i.map(It))),t[4]=i,t[5]=p);let m=s(p),h;if(t[6]!==i||t[7]!==m||t[8]!==f?.environmentId){let e;t[10]===m?e=t[11]:(e=(e,t)=>m[t],t[10]=m,t[11]=e);let n=i.filter(e);h=n.find(e=>e.environmentId===f?.environmentId)??n[0],t[6]=i,t[7]=m,t[8]=f?.environmentId,t[9]=h}else h=t[9];let _=h,v=!_,y;t[12]===_?y=t[13]:(y=()=>_&&l({environmentId:_.environmentId,task:null}),t[12]=_,t[13]=y);let x;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Q.jsx)(b,{className:`size-3`}),t[14]=x):x=t[14];let S;t[15]!==v||t[16]!==y?(S=(0,Q.jsxs)(ee,{size:`xs`,variant:`ghost-muted`,disabled:v,onClick:y,children:[x,`New task`]}),t[15]=v,t[16]=y,t[17]=S):S=t[17];let C;t[18]!==f?.environmentId||t[19]!==r||t[20]!==n.kind||t[21]!==n.message||t[22]!==e.environmentId||t[23]!==e.taskId?(C=n.kind===`unavailable`?(0,Q.jsx)(Ke,{title:`Unavailable selection`,children:(0,Q.jsx)(Ue,{title:n.message})}):r.length===0?(0,Q.jsx)(Be,{children:(0,Q.jsxs)(Le,{children:[(0,Q.jsx)(Ie,{variant:`icon`,children:(0,Q.jsx)(g,{})}),(0,Q.jsx)(Re,{children:`No environments available`}),(0,Q.jsx)(ze,{children:`Connect an environment to manage scheduled tasks.`})]})}):(0,Q.jsx)(`div`,{className:`space-y-8`,children:r.map(t=>(0,Q.jsx)(Rt,{environment:t,showEnvironmentHeading:r.length>1,taskId:(e.environmentId??f?.environmentId)===t.environmentId?e.taskId:void 0,onEdit:d},`${t.environmentId}:${e.taskId??``}`))}),t[18]=f?.environmentId,t[19]=r,t[20]=n.kind,t[21]=n.message,t[22]=e.environmentId,t[23]=e.taskId,t[24]=C):C=t[24];let w;t[25]!==S||t[26]!==C?(w=(0,Q.jsx)(Ke,{title:`Scheduled tasks`,variant:`plain`,headerAction:S,children:C}),t[25]=S,t[26]=C,t[27]=w):w=t[27];let T;t[28]!==c||t[29]!==e.projectId||t[30]!==e.threadId?(T=c?(0,Q.jsx)(qt,{initialThreadId:e.threadId,initialProjectId:e.projectId,initialEnvironmentId:c.environmentId,task:c.task,onClose:()=>l(null)},`${c.environmentId}:${c.task?.id??`new`}`):null,t[28]=c,t[29]=e.projectId,t[30]=e.threadId,t[31]=T):T=t[31];let E;return t[32]!==T||t[33]!==w?(E=(0,Q.jsxs)(We,{children:[w,T]}),t[32]=T,t[33]=w,t[34]=E):E=t[34],E}function It(e){return e.environmentId}var Lt=bt(`web-scheduled-task-create-permissions`,K.upsertScheduledTask.permissionAtom);function Rt(e){let t=(0,mt.c)(13),{environment:n,showEnvironmentHeading:r,taskId:i,onEdit:a}=e,{scope:o}=He(),s=n.connection.phase===`connected`&&n.serverConfig!==null,c;t[0]!==s||t[1]!==n.environmentId?(c=s?K.scheduledTasksLive({environmentId:n.environmentId,input:{}}):null,t[0]=s,t[1]=n.environmentId,t[2]=c):c=t[2];let l=se(c),u=l.data?.tasks.filter(e=>nt(o,n.environmentId,e.projectId)),d=u?.find(e=>e.id===i),f=(0,Z.useRef)(!1);(0,Z.useEffect)(()=>{!f.current&&d&&(f.current=!0,a(n.environmentId,d))},[n.environmentId,d,a]),qe(6e4);let p=Ke,m=n.label,h=!r,g;t[3]===n.serverConfig?g=t[4]:(g=k(n.serverConfig),t[3]=n.serverConfig,t[4]=g);let _;t[5]===g?_=t[6]:(_=(0,Q.jsx)(Ve,{kind:g,className:`size-3.5`}),t[5]=g,t[6]=_);let v=s?l.error?(0,Q.jsx)(Ue,{title:`Could not load scheduled tasks`,description:l.error}):u?(0,Q.jsxs)(Q.Fragment,{children:[i&&!d?(0,Q.jsx)(Ue,{title:`Task unavailable`,description:`This task was deleted or belongs to a different project. Check your project filter.`,role:`status`}):null,u.length===0?(0,Q.jsx)(Ue,{title:`No scheduled tasks`,description:`No tasks match this environment and project selection.`}):u.map(e=>(0,Q.jsx)(zt,{environmentId:n.environmentId,task:e,onEdit:()=>a(n.environmentId,e)},e.id))]}):(0,Q.jsx)(Ue,{title:`Loading scheduled tasks…`,role:`status`}):(0,Q.jsx)(Ue,{title:`Environment disconnected`,description:`Reconnect ${n.label} to view its scheduled tasks.`}),y;return t[7]!==p||t[8]!==n.label||t[9]!==h||t[10]!==_||t[11]!==v?(y=(0,Q.jsx)(p,{title:m,hideTitle:h,icon:_,children:v}),t[7]=p,t[8]=n.label,t[9]=h,t[10]=_,t[11]=v,t[12]=y):y=t[12],y}function zt(e){let t=(0,mt.c)(77),{environmentId:n,task:r,onEdit:i}=e,a;t[0]===n?a=t[1]:(a=K.upsertScheduledTask.permissionAtom(n),t[0]=n,t[1]=a);let c=s(a),[d,f]=(0,Z.useState)(!1),[m,g]=(0,Z.useState)(!1),_=r.schedule.type===`webhook`,y;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(y={label:`scheduled task enabled`},t[2]=y):y=t[2];let b=ce(K.setScheduledTaskEnabled,y),S;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(S={label:`scheduled task run now`},t[3]=S):S=t[3];let C=ce(K.runScheduledTaskNow,S),T;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(T={label:`scheduled task delete`},t[4]=T):T=t[4];let D=ce(K.deleteScheduledTask,T),O;t[5]!==d||t[6]!==n||t[7]!==D||t[8]!==C||t[9]!==r.enabled||t[10]!==r.id||t[11]!==b?(O=async e=>{if(d||!oe(n,`orchestration:operate`))return;f(!0);let t=e===`toggle`?await b({environmentId:n,input:{id:r.id,enabled:!r.enabled}}):e===`run`?await C({environmentId:n,input:{id:r.id}}):await D({environmentId:n,input:{id:r.id}});f(!1),t._tag===`Failure`&&!ie(t)&&V.add(J({type:`error`,title:`Could not update scheduled task`,description:String(re(t))}))},t[5]=d,t[6]=n,t[7]=D,t[8]=C,t[9]=r.enabled,t[10]=r.id,t[11]=b,t[12]=O):O=t[12];let k=O,A=r.title,j;t[13]===r.prompt?j=t[14]:(j=(0,Q.jsx)(`span`,{className:`line-clamp-2`,children:r.prompt}),t[13]=r.prompt,t[14]=j);let M;t[15]===r.schedule?M=t[16]:(M=jt(r.schedule),t[15]=r.schedule,t[16]=M);let N;t[17]!==_||t[18]!==r.enabled||t[19]!==r.nextRunAt?(N=r.enabled?_?`Listening`:r.nextRunAt?`Next run ${Mt(r.nextRunAt)}`:`Not scheduled`:`Paused`,t[17]=_,t[18]=r.enabled,t[19]=r.nextRunAt,t[20]=N):N=t[20];let P;t[21]!==M||t[22]!==N?(P=(0,Q.jsxs)(`span`,{children:[M,` ·`,` `,N]}),t[21]=M,t[22]=N,t[23]=P):P=t[23];let F;t[24]===r.lastRunStatus?F=t[25]:(F=r.lastRunStatus===`never`?null:(0,Q.jsx)(v,{variant:Pt(r.lastRunStatus),children:r.lastRunStatus}),t[24]=r.lastRunStatus,t[25]=F);let I;t[26]===r.lastRunError?I=t[27]:(I=r.lastRunError?(0,Q.jsx)(`span`,{className:`text-destructive`,children:r.lastRunError}):null,t[26]=r.lastRunError,t[27]=I);let L;t[28]!==P||t[29]!==F||t[30]!==I?(L=(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[P,F,I]}),t[28]=P,t[29]=F,t[30]=I,t[31]=L):L=t[31];let R=d||!c,z=`Enable ${r.title}`,B;t[32]===k?B=t[33]:(B=()=>void k(`toggle`),t[32]=k,t[33]=B);let H;t[34]!==R||t[35]!==z||t[36]!==B||t[37]!==r.enabled?(H=(0,Q.jsx)(ct,{checked:r.enabled,disabled:R,"aria-label":z,onCheckedChange:B}),t[34]=R,t[35]=z,t[36]=B,t[37]=r.enabled,t[38]=H):H=t[38];let U=d||!c,ae=`Actions for ${r.title}`,W;t[39]!==U||t[40]!==ae?(W=(0,Q.jsx)(ee,{size:`icon-sm`,variant:`ghost`,disabled:U,"aria-label":ae}),t[39]=U,t[40]=ae,t[41]=W):W=t[41];let G;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,Q.jsx)(p,{className:`size-4`}),t[42]=G):G=t[42];let q;t[43]===W?q=t[44]:(q=(0,Q.jsx)(w,{render:W,children:G}),t[43]=W,t[44]=q);let se;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(se=(0,Q.jsx)(h,{}),t[45]=se):se=t[45];let Y;t[46]===i?Y=t[47]:(Y=(0,Q.jsxs)(ne,{onClick:i,children:[se,`Edit`]}),t[46]=i,t[47]=Y);let le;t[48]!==k||t[49]!==_?(le=_?(0,Q.jsxs)(ne,{onClick:()=>g(!0),children:[(0,Q.jsx)(o,{}),`Deliveries`]}):(0,Q.jsxs)(ne,{onClick:()=>void k(`run`),children:[(0,Q.jsx)(l,{}),`Run now`]}),t[48]=k,t[49]=_,t[50]=le):le=t[50];let X;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(X=(0,Q.jsx)(te,{}),t[51]=X):X=t[51];let ue;t[52]===k?ue=t[53]:(ue=()=>void k(`delete`),t[52]=k,t[53]=ue);let de;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(de=(0,Q.jsx)(u,{}),t[54]=de):de=t[54];let fe;t[55]===ue?fe=t[56]:(fe=(0,Q.jsxs)(ne,{onClick:ue,children:[de,`Delete`]}),t[55]=ue,t[56]=fe);let pe;t[57]!==Y||t[58]!==le||t[59]!==fe?(pe=(0,Q.jsxs)(E,{align:`end`,children:[Y,le,X,fe]}),t[57]=Y,t[58]=le,t[59]=fe,t[60]=pe):pe=t[60];let me;t[61]!==q||t[62]!==pe?(me=(0,Q.jsxs)(x,{children:[q,pe]}),t[61]=q,t[62]=pe,t[63]=me):me=t[63];let he;t[64]!==m||t[65]!==n||t[66]!==r?(he=m?(0,Q.jsx)(Bt,{environmentId:n,task:r,onClose:()=>g(!1)}):null,t[64]=m,t[65]=n,t[66]=r,t[67]=he):he=t[67];let ge;t[68]!==H||t[69]!==me||t[70]!==he?(ge=(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[H,me,he]}),t[68]=H,t[69]=me,t[70]=he,t[71]=ge):ge=t[71];let _e;return t[72]!==L||t[73]!==ge||t[74]!==j||t[75]!==r.title?(_e=(0,Q.jsx)(Ue,{title:A,description:j,status:L,control:ge}),t[72]=L,t[73]=ge,t[74]=j,t[75]=r.title,t[76]=_e):_e=t[76],_e}function Bt(e){let t=(0,mt.c)(38),{environmentId:n,task:r,onClose:i}=e,a;t[0]!==n||t[1]!==r.id?(a=K.scheduledTaskWebhookDeliveries({environmentId:n,input:{id:r.id,acceptAnyOutcome:!0}}),t[0]=n,t[1]=r.id,t[2]=a):a=t[2];let o=se(a),[s,c]=(0,Z.useState)(null),l;t[3]!==n||t[4]!==s||t[5]!==r.id?(l=s===null?null:K.scheduledTaskWebhookDelivery({environmentId:n,input:{id:r.id,deliveryId:s,acceptAnyOutcome:!0}}),t[3]=n,t[4]=s,t[5]=r.id,t[6]=l):l=t[6];let u=se(l),d=o.data?.deliveries??null,f=u.data?.delivery??null,p=s===null?o.error:u.error,m;t[7]===i?m=t[8]:(m=e=>{e||i()},t[7]=i,t[8]=m);let h;t[9]===r.title?h=t[10]:(h=(0,Q.jsxs)(ke,{children:[`Deliveries · `,r.title]}),t[9]=r.title,t[10]=h);let g;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Q.jsx)(Ne,{children:`Recent requests to this task's webhook URL.`}),t[11]=g):g=t[11];let _;t[12]===h?_=t[13]:(_=(0,Q.jsxs)(Oe,{children:[h,g]}),t[12]=h,t[13]=_);let y;t[14]===p?y=t[15]:(y=p?(0,Q.jsx)(`p`,{className:`text-sm text-destructive`,children:p}):null,t[14]=p,t[15]=y);let b;t[16]!==d||t[17]!==f||t[18]!==s||t[19]!==u.error?(b=s!==null&&f===null&&u.error===null?(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,role:`status`,children:`Loading delivery…`}):f?(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-sm`,children:[(0,Q.jsx)(v,{variant:Nt(f.pendingWindow?`coalesced`:f.outcome),children:at(f)}),(0,Q.jsxs)(`span`,{children:[f.method,` · `,Mt(f.receivedAt)]}),f.signatureVerified?(0,Q.jsx)(`span`,{className:`text-muted-foreground`,children:`Signature verified`}):null]}),f.error?(0,Q.jsx)(`p`,{className:f.outcome===`filtered`?`text-sm text-muted-foreground`:`text-sm text-destructive`,children:f.error}):null,(0,Q.jsx)(Ht,{title:f.pendingWindow?`Scheduled run`:`Prompt sent to the agent`,children:f.renderedPrompt??(f.pendingWindow?`Run scheduled when the window closes; no run started yet.`:`No run was started for this request.`)}),f.missingFields.length>0?(0,Q.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Empty placeholders: `,f.missingFields.join(`, `)]}):null,(0,Q.jsx)(Ht,{title:`Headers`,children:Object.entries(f.headers).map(Vt).join(`
4
+ `)}),f.query?(0,Q.jsx)(Ht,{title:`Query`,children:f.query}):null,(0,Q.jsx)(Ht,{title:f.bodyTruncated?`Body (truncated)`:`Body`,children:f.body||`(empty)`})]}):s===null?d===null?(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,role:`status`,children:`Loading deliveries…`}):d.length===0?(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No requests yet.`}):(0,Q.jsx)(`ul`,{className:`divide-y divide-border`,children:d.map(e=>(0,Q.jsx)(`li`,{children:(0,Q.jsxs)(`button`,{type:`button`,className:`flex w-full flex-wrap items-center gap-2 py-2 text-left text-sm hover:bg-accent/40`,onClick:()=>c(e.id),children:[(0,Q.jsx)(v,{variant:Nt(e.pendingWindow?`coalesced`:e.outcome),children:at(e)}),(0,Q.jsx)(`span`,{children:e.method}),(0,Q.jsx)(`span`,{className:`text-muted-foreground`,children:Mt(e.receivedAt)}),e.outcome===`filtered`&&e.error?(0,Q.jsx)(`span`,{className:`text-muted-foreground`,children:e.error}):null,e.missingFields.length>0?(0,Q.jsxs)(`span`,{className:`text-muted-foreground`,children:[e.missingFields.length,` empty placeholder`,e.missingFields.length===1?``:`s`]}):null]})},e.id))}):null,t[16]=d,t[17]=f,t[18]=s,t[19]=u.error,t[20]=b):b=t[20];let x;t[21]!==y||t[22]!==b?(x=(0,Q.jsxs)(Me,{children:[y,b]}),t[21]=y,t[22]=b,t[23]=x):x=t[23];let S;t[24]!==o.isPending||t[25]!==o.refresh||t[26]!==s?(S=s===null?(0,Q.jsx)(ee,{variant:`outline`,size:`sm`,disabled:o.isPending,onClick:o.refresh,children:`Refresh`}):(0,Q.jsx)(ee,{variant:`outline`,size:`sm`,onClick:()=>c(null),children:`Back`}),t[24]=o.isPending,t[25]=o.refresh,t[26]=s,t[27]=S):S=t[27];let C;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Q.jsx)(je,{render:(0,Q.jsx)(ee,{size:`sm`}),children:`Done`}),t[28]=C):C=t[28];let w;t[29]===S?w=t[30]:(w=(0,Q.jsxs)(Ae,{children:[S,C]}),t[29]=S,t[30]=w);let T;t[31]!==w||t[32]!==_||t[33]!==x?(T=(0,Q.jsxs)(Pe,{className:`max-w-2xl`,children:[_,x,w]}),t[31]=w,t[32]=_,t[33]=x,t[34]=T):T=t[34];let E;return t[35]!==T||t[36]!==m?(E=(0,Q.jsx)(Fe,{open:!0,onOpenChange:m,children:T}),t[35]=T,t[36]=m,t[37]=E):E=t[37],E}function Vt(e){let[t,n]=e;return`${t}: ${n}`}function Ht(e){let t=(0,mt.c)(7),{title:n,children:r}=e,i;t[0]===n?i=t[1]:(i=(0,Q.jsx)(ut,{children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=(0,Q.jsx)(`pre`,{className:`max-h-64 overflow-auto rounded-md bg-muted p-2 text-xs whitespace-pre-wrap break-all`,children:r}),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function Ut(e){let t=(0,mt.c)(40),{environmentId:n,task:r}=e,i;t[0]===n?i=t[1]:(i=K.rotateScheduledTaskWebhookToken.permissionAtom(n),t[0]=n,t[1]=i);let a=s(i),o=U(n),c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c={target:`webhook URL`},t[2]=c):c=t[2];let{copyToClipboard:l,isCopied:u}=H(c),d;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(d={label:`scheduled task rotate webhook token`},t[3]=d):d=t[3];let p=ce(K.rotateScheduledTaskWebhookToken,d),[m,h]=(0,Z.useState)(!1),g=r?.webhook;if(!r||!g){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`The URL appears after you save.`}),t[4]=e):e=t[4],e}let _;t[5]!==g||t[6]!==o?(_=vt(g,o),t[5]=g,t[6]=o,t[7]=_):_=t[7];let{address:v,copyable:y,note:b}=_,x;t[8]!==n||t[9]!==p||t[10]!==r?(x=async()=>{if(!(await W(`Rotate this webhook URL?
5
+ The current URL stops working.`,{variant:`destructive`})??window.confirm(`Rotate this webhook URL? The current URL stops working.`)))return;h(!0);let e=await p({environmentId:n,input:{id:r.id}});h(!1),e._tag===`Failure`&&!ie(e)&&V.add(J({type:`error`,title:`Could not rotate webhook URL`,description:String(re(e))}))},t[8]=n,t[9]=p,t[10]=r,t[11]=x):x=t[11];let S=x,C;t[12]===v?C=t[13]:(C=(0,Q.jsx)(Ee,{readOnly:!0,"aria-label":`Webhook URL`,value:v,onFocus:Wt}),t[12]=v,t[13]=C);let w=!y,T;t[14]!==l||t[15]!==v?(T=()=>l(v,void 0),t[14]=l,t[15]=v,t[16]=T):T=t[16];let E;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Q.jsx)(f,{}),t[17]=E):E=t[17];let te=u?`Copied`:`Copy`,D;t[18]!==te||t[19]!==w||t[20]!==T?(D=(0,Q.jsxs)(ee,{size:`sm`,variant:`outline`,type:`button`,disabled:w,onClick:T,children:[E,te]}),t[18]=te,t[19]=w,t[20]=T,t[21]=D):D=t[21];let ne=m||!a,O;t[22]===S?O=t[23]:(O=()=>void S(),t[22]=S,t[23]=O);let k;t[24]!==ne||t[25]!==O?(k=(0,Q.jsx)(ee,{size:`sm`,variant:`outline`,type:`button`,disabled:ne,onClick:O,children:`Rotate`}),t[24]=ne,t[25]=O,t[26]=k):k=t[26];let A;t[27]!==D||t[28]!==k||t[29]!==C?(A=(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[C,D,k]}),t[27]=D,t[28]=k,t[29]=C,t[30]=A):A=t[30];let j;t[31]===b?j=t[32]:(j=b===null?null:(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:b}),t[31]=b,t[32]=j);let M;t[33]!==g.url||t[34]!==n?(M=g.url===null?null:(0,Q.jsx)(Gt,{environmentId:n}),t[33]=g.url,t[34]=n,t[35]=M):M=t[35];let N;return t[36]!==A||t[37]!==j||t[38]!==M?(N=(0,Q.jsxs)(`div`,{className:`space-y-1.5`,children:[A,j,M]}),t[36]=A,t[37]=j,t[38]=M,t[39]=N):N=t[39],N}function Wt(e){return e.currentTarget.select()}function Gt(e){let t=(0,mt.c)(3),{environmentId:n}=e,r=Ye();if(r.target?.environmentId!==n||r.data===null)return null;let i=r.data.holdWebhooksWhileOffline?`Held for up to 24 hours while this environment is offline. `:`Forwarded live. Requests fail while this environment is offline. `,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Q.jsx)(B,{to:`/settings/connections`,className:`underline underline-offset-2`,children:`Change in Connections`}),t[0]=a):a=t[0];let o;return t[1]===i?o=t[2]:(o=(0,Q.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[i,a]}),t[1]=i,t[2]=o),o}function Kt(e){let t=(0,mt.c)(6),{environmentId:n,threadId:r}=e,i;t[0]!==n||t[1]!==r?(i=r===null?null:c(n,r),t[0]=n,t[1]=r,t[2]=i):i=t[2];let a=i,o=P(a),s;return t[3]!==a||t[4]!==o?.title?(s=(0,Q.jsx)($,{label:`Destination`,children:a===null?(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Each run starts a new thread with the workspace and model below.`}):(0,Q.jsxs)(`div`,{className:`space-y-1 text-sm`,children:[(0,Q.jsx)(`p`,{className:`wrap-anywhere`,children:o?.title.trim()||`Thread ${a.threadId}`}),(0,Q.jsx)(`p`,{className:`text-muted-foreground`,children:`Each run continues this conversation, in its workspace and with its current model.`})]})}),t[3]=a,t[4]=o?.title,t[5]=s):s=t[5],s}function qt(e){let t=(0,mt.c)(211),{initialEnvironmentId:n,initialThreadId:r,initialProjectId:i,task:o,onClose:c}=e,{scope:l,connectedEnvironments:u}=He(),[d,f]=(0,Z.useState)(n),p=ae(d),h=p?.connection.phase===`connected`&&p.serverConfig!==null,g;t[0]!==h||t[1]!==d?(g=h?K.scheduledTasksLive({environmentId:d,input:{}}):null,t[0]=h,t[1]=d,t[2]=g):g=t[2];let v=se(g),b=N(),x;if(t[3]!==b||t[4]!==d||t[5]!==l){let e;t[7]!==d||t[8]!==l?(e=e=>e.environmentId===d&&nt(l,d,e.id),t[7]=d,t[8]=l,t[9]=e):e=t[9],x=b.filter(e),t[3]=b,t[4]=d,t[5]=l,t[6]=x}else x=t[6];let S=x,C=G(d),w=s(K.providersValueAtom(d))??q,T;t[10]===d?T=t[11]:(T=K.upsertScheduledTask.permissionAtom(d),t[10]=d,t[11]=T);let E=s(T),te;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(te={label:`scheduled task upsert`},t[12]=te):te=t[12];let D=ce(K.upsertScheduledTask,te),ne;t[13]!==i||t[14]!==r||t[15]!==S[0]?.id||t[16]!==o?(ne=()=>o?Xe(o):{...Dt,projectId:i??S[0]?.id??``,threadId:r??``},t[13]=i,t[14]=r,t[15]=S[0]?.id,t[16]=o,t[17]=ne):ne=t[17];let[A,j]=(0,Z.useState)(ne),[P,B]=(0,Z.useState)(!1),V=(0,Z.useRef)(!1),H;t[18]!==A.editingId||t[19]!==v.data?(H=A.editingId!==null&&v.data!==null&&!v.data.tasks.some(e=>e.id===A.editingId),t[18]=A.editingId,t[19]=v.data,t[20]=H):H=t[20];let U=H,W;t[21]!==A.editingId||t[22]!==o||t[23]!==v.data?(W=v.data?v.data.tasks.find(e=>e.id===A.editingId)??null:o,t[21]=A.editingId,t[22]=o,t[23]=v.data,t[24]=W):W=t[24];let J=W,Y=A.projectId||S[0]?.id||``,le;if(t[25]!==S||t[26]!==Y){let e;t[28]===Y?e=t[29]:(e=e=>e.id===Y,t[28]=Y,t[29]=e),le=S.find(e),t[25]=S,t[26]=Y,t[27]=le}else le=t[27];let X=le;X?.id;let ue;t[30]!==w||t[31]!==X?.id||t[32]!==C?(ue=y(m(_(w),C,X?.id??null)),t[30]=w,t[31]=X?.id,t[32]=C,t[33]=ue):ue=t[33];let de=ue,fe=de[0],pe;t[34]===A.modelKey?pe=t[35]:(pe=A.modelKey?At(A.modelKey):null,t[34]=A.modelKey,t[35]=pe);let me=pe,ve;t[36]!==me||t[37]!==de||t[38]!==X||t[39]!==C?(ve=me&&de.some(e=>e.instanceId===me.instanceId&&e.enabled)?me:et(C,X??null,de),t[36]=me,t[37]=de,t[38]=X,t[39]=C,t[40]=ve):ve=t[40];let ye=ve,be=ye?.instanceId??fe?.instanceId??``,xe=ye?.model??``,Se;t[41]!==be||t[42]!==xe||t[43]!==w||t[44]!==C?(Se=a(C,w,be,xe),t[41]=be,t[42]=xe,t[43]=w,t[44]=C,t[45]=Se):Se=t[45];let Ce=Se,we=Qt,Te;t[46]!==ye||t[47]!==h||t[48]!==A||t[49]!==U||t[50]!==d||t[51]!==J||t[52]!==c||t[53]!==S||t[54]!==P||t[55]!==Y||t[56]!==v.data||t[57]!==D?(Te=async()=>{if(!oe(d,`orchestration:operate`)||V.current||P||U||!h||v.data===null)return;let e=ye;if(!A.title.trim()||!A.prompt.trim()||!S.some(e=>e.id===Y)||e===null){we(`Scheduled task is incomplete`,`Add a title, prompt, project, and model.`);return}let t=$e(A.filters);if(A.scheduleMode===`webhook`&&`error`in t){we(`Invalid filter`,t.error);return}let n=it(A);if(n===null){for(let e of Ze(A))we(e.title,e.description);return}if(n.type===`webhook`&&n.signature&&(!n.signature.header||!n.signature.secret&&!(J?.schedule.type===`webhook`&&J.webhook?.hasSecret))){we(`Signing secret is required`,`Enter the signature header and secret.`);return}if(n.type===`interval`&&(!Number.isSafeInteger(n.everyMs)||n.everyMs<6e4)){we(`Invalid interval`,`Enter an interval of at least one minute.`);return}if(A.workspaceMode===`existing_worktree`&&!A.existingWorktreePath.trim()){we(`Checkout path is required`,`Enter the path of the checkout to run in.`);return}let r=A.baseModelSelection!==null&&A.baseModelSelection.instanceId===e.instanceId&&A.baseModelSelection.model===e.model?A.baseModelSelection:e,i=A.workspaceMode===`root`?{type:`root`}:A.workspaceMode===`existing_worktree`?{type:`existing_worktree`,worktreePath:A.existingWorktreePath.trim()}:{type:A.workspaceMode,baseRef:A.baseRef.trim()||`main`,startFromOrigin:A.startFromOrigin},a={...A.editingId?{id:A.editingId,requireExisting:!0}:{},title:A.title.trim(),prompt:A.prompt.trim(),enabled:A.enabled,schedule:n,projectId:Y,threadId:A.threadId?A.threadId:null,workspaceStrategy:i,modelSelection:r,runtimeMode:A.runtimeMode,interactionMode:A.interactionMode,creationSource:`web`};V.current=!0,B(!0);let o=await D({environmentId:d,input:a});B(!1),o._tag===`Failure`?(V.current=!1,ie(o)||we(`Could not save scheduled task`,re(o))):c()},t[46]=ye,t[47]=h,t[48]=A,t[49]=U,t[50]=d,t[51]=J,t[52]=c,t[53]=S,t[54]=P,t[55]=Y,t[56]=v.data,t[57]=D,t[58]=Te):Te=t[58];let De=Te,Ie;t[59]!==c||t[60]!==P?(Ie=e=>{!e&&!P&&c()},t[59]=c,t[60]=P,t[61]=Ie):Ie=t[61];let Le=A.editingId?`Edit task`:`New task`,Re;t[62]===Le?Re=t[63]:(Re=(0,Q.jsx)(ke,{children:Le}),t[62]=Le,t[63]=Re);let ze;t[64]===Symbol.for(`react.memo_cache_sentinel`)?(ze=(0,Q.jsx)(Ne,{children:`Run a prompt automatically — on an interval, at a fixed time, or when a webhook is called.`}),t[64]=ze):ze=t[64];let Be;t[65]===Re?Be=t[66]:(Be=(0,Q.jsxs)(Oe,{children:[Re,ze]}),t[65]=Re,t[66]=Be);let Ue;t[67]===h?Ue=t[68]:(Ue=h?null:(0,Q.jsx)(`p`,{className:`text-sm text-destructive`,children:`Reconnect this environment before saving.`}),t[67]=h,t[68]=Ue);let We=o!==null||P,Ke;t[69]===u?Ke=t[70]:(Ke=e=>{let t=u.find(t=>t.environmentId===e);t&&(f(t.environmentId),j(Zt))},t[69]=u,t[70]=Ke);let qe=p?.serverConfig??null,Je;t[71]===qe?Je=t[72]:(Je=k(qe),t[71]=qe,t[72]=Je);let Ye;t[73]===Je?Ye=t[74]:(Ye=(0,Q.jsx)(Ve,{kind:Je,className:`size-4`}),t[73]=Je,t[74]=Ye);let Qe=p?.label??`Unavailable environment`,rt;t[75]!==Ye||t[76]!==Qe?(rt=(0,Q.jsx)(R,{id:`scheduled-task-environment`,size:`sm`,children:(0,Q.jsx)(I,{children:(0,Q.jsxs)(`span`,{className:`flex items-center gap-2`,children:[Ye,Qe]})})}),t[75]=Ye,t[76]=Qe,t[77]=rt):rt=t[77];let at;t[78]===u?at=t[79]:(at=u.map(Xt),t[78]=u,t[79]=at);let ot;t[80]===at?ot=t[81]:(ot=(0,Q.jsx)(L,{children:at}),t[80]=at,t[81]=ot);let st;t[82]!==d||t[83]!==We||t[84]!==Ke||t[85]!==rt||t[86]!==ot?(st=(0,Q.jsx)($,{label:`Runs on`,htmlFor:`scheduled-task-environment`,children:(0,Q.jsxs)(z,{value:d,disabled:We,onValueChange:Ke,children:[rt,ot]})}),t[82]=d,t[83]=We,t[84]=Ke,t[85]=rt,t[86]=ot,t[87]=st):st=t[87];let lt;t[88]===v.error?lt=t[89]:(lt=v.error?(0,Q.jsx)(`p`,{className:`text-sm text-destructive`,role:`status`,children:v.error}):null,t[88]=v.error,t[89]=lt);let dt;t[90]===U?dt=t[91]:(dt=U?(0,Q.jsx)(`p`,{className:`text-xs text-destructive`,role:`status`,children:`This scheduled task no longer exists.`}):null,t[90]=U,t[91]=dt);let ft;t[92]===Symbol.for(`react.memo_cache_sentinel`)?(ft=e=>j(t=>({...t,title:e.target.value})),t[92]=ft):ft=t[92];let ht;t[93]===A.title?ht=t[94]:(ht=(0,Q.jsx)($,{label:`Name`,htmlFor:`scheduled-task-title`,children:(0,Q.jsx)(Ee,{id:`scheduled-task-title`,placeholder:`e.g. Check for Sentry issues`,value:A.title,onChange:ft})}),t[93]=A.title,t[94]=ht);let gt=A.threadId?A.threadId:null,_t;t[95]!==d||t[96]!==gt?(_t=(0,Q.jsx)(Kt,{environmentId:d,threadId:gt}),t[95]=d,t[96]=gt,t[97]=_t):_t=t[97];let vt;t[98]===Symbol.for(`react.memo_cache_sentinel`)?(vt=e=>j(t=>({...t,projectId:e??``})),t[98]=vt):vt=t[98];let yt=X?.title,bt;t[99]===yt?bt=t[100]:(bt=(0,Q.jsx)(R,{size:`sm`,id:`scheduled-task-project`,children:(0,Q.jsx)(I,{placeholder:`Select a project`,children:yt})}),t[99]=yt,t[100]=bt);let St;t[101]===S?St=t[102]:(St=S.map(Yt),t[101]=S,t[102]=St);let wt;t[103]===St?wt=t[104]:(wt=(0,Q.jsx)(L,{children:St}),t[103]=St,t[104]=wt);let Tt;t[105]!==Y||t[106]!==bt||t[107]!==wt?(Tt=(0,Q.jsx)($,{label:`Project`,htmlFor:`scheduled-task-project`,children:(0,Q.jsxs)(z,{value:Y,onValueChange:vt,children:[bt,wt]})}),t[105]=Y,t[106]=bt,t[107]=wt,t[108]=Tt):Tt=t[108];let kt;t[109]===Symbol.for(`react.memo_cache_sentinel`)?(kt=e=>j(t=>({...t,workspaceMode:e})),t[109]=kt):kt=t[109];let jt=Et[A.workspaceMode],Mt;t[110]===jt?Mt=t[111]:(Mt=(0,Q.jsx)(R,{size:`sm`,id:`scheduled-task-workspace`,children:(0,Q.jsx)(I,{children:jt})}),t[110]=jt,t[111]=Mt);let Nt;t[112]===Symbol.for(`react.memo_cache_sentinel`)?(Nt=(0,Q.jsxs)(L,{children:[(0,Q.jsx)(F,{value:`auto`,children:`Choose automatically`}),(0,Q.jsx)(F,{value:`worktree`,children:`Create a new worktree`}),(0,Q.jsx)(F,{value:`root`,children:`Use the project checkout`}),(0,Q.jsx)(F,{value:`existing_worktree`,children:`Use a specific checkout`})]}),t[112]=Nt):Nt=t[112];let Pt;t[113]!==A.workspaceMode||t[114]!==Mt?(Pt=(0,Q.jsx)($,{label:`Workspace`,htmlFor:`scheduled-task-workspace`,children:(0,Q.jsxs)(z,{value:A.workspaceMode,onValueChange:kt,children:[Mt,Nt]})}),t[113]=A.workspaceMode,t[114]=Mt,t[115]=Pt):Pt=t[115];let Ft;t[116]!==Tt||t[117]!==Pt?(Ft=(0,Q.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[Tt,Pt]}),t[116]=Tt,t[117]=Pt,t[118]=Ft):Ft=t[118];let It;t[119]!==h||t[120]!==A.baseRef||t[121]!==A.startFromOrigin||t[122]!==A.workspaceMode||t[123]!==d||t[124]!==P||t[125]!==X?.workspaceRoot||t[126]!==Y?(It=A.workspaceMode===`worktree`||A.workspaceMode===`auto`?(0,Q.jsx)($,{label:`Base branch`,htmlFor:`scheduled-task-base-ref`,children:(0,Q.jsx)(xt,{id:`scheduled-task-base-ref`,environmentId:d,cwd:X?.workspaceRoot??null,value:A.baseRef,onValueChange:e=>j(t=>({...t,baseRef:e})),startFromOrigin:A.startFromOrigin,onStartFromOriginChange:e=>j(t=>({...t,startFromOrigin:e})),disabled:P||!h},`${d}:${Y}`)}):null,t[119]=h,t[120]=A.baseRef,t[121]=A.startFromOrigin,t[122]=A.workspaceMode,t[123]=d,t[124]=P,t[125]=X?.workspaceRoot,t[126]=Y,t[127]=It):It=t[127];let Lt;t[128]!==A.existingWorktreePath||t[129]!==A.workspaceMode?(Lt=A.workspaceMode===`existing_worktree`?(0,Q.jsx)($,{label:`Checkout path`,htmlFor:`scheduled-task-checkout`,children:(0,Q.jsx)(Ee,{id:`scheduled-task-checkout`,value:A.existingWorktreePath,placeholder:`/path/to/checkout`,onChange:e=>j(t=>({...t,existingWorktreePath:M(t.existingWorktreePath,e.target.value)}))})}):null,t[128]=A.existingWorktreePath,t[129]=A.workspaceMode,t[130]=Lt):Lt=t[130];let Rt;t[131]===Symbol.for(`react.memo_cache_sentinel`)?(Rt=e=>j(t=>({...t,prompt:e.target.value})),t[131]=Rt):Rt=t[131];let zt;t[132]===A.prompt?zt=t[133]:(zt=(0,Q.jsx)($,{label:`Prompt`,htmlFor:`scheduled-task-prompt`,children:(0,Q.jsx)(he,{id:`scheduled-task-prompt`,className:`max-h-64 overflow-y-auto`,placeholder:`What should the agent do each time this runs?`,value:A.prompt,onChange:Rt})}),t[132]=A.prompt,t[133]=zt);let Bt=P||!h,Vt;t[134]===Symbol.for(`react.memo_cache_sentinel`)?(Vt=(e,t)=>j(n=>({...n,modelKey:`${e}:${t}`})),t[134]=Vt):Vt=t[134];let Ht;t[135]!==be||t[136]!==xe||t[137]!==d||t[138]!==de||t[139]!==Ce||t[140]!==Bt?(Ht=(0,Q.jsx)($,{label:`Model`,children:(0,Q.jsx)(`div`,{children:(0,Q.jsx)(pt,{environmentId:d,disabled:Bt,activeInstanceId:be,model:xe,lockedProvider:null,instanceEntries:de,modelOptionsByInstance:Ce,isComposerOwned:!1,triggerClassName:Ge,onInstanceModelChange:Vt})})}),t[135]=be,t[136]=xe,t[137]=d,t[138]=de,t[139]=Ce,t[140]=Bt,t[141]=Ht):Ht=t[141];let Wt;t[142]===o?Wt=t[143]:(Wt=o?.schedule.type===`interval`&&o.schedule.everyMs<6e4?(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,role:`status`,children:`This task uses a legacy interval below one minute. Saving updates it to at least one minute.`}):null,t[142]=o,t[143]=Wt);let Gt;t[144]===Symbol.for(`react.memo_cache_sentinel`)?(Gt=(0,Q.jsx)(ut,{children:`Schedule`}),t[144]=Gt):Gt=t[144];let qt;t[145]===A.scheduleMode?qt=t[146]:(qt=[A.scheduleMode],t[145]=A.scheduleMode,t[146]=qt);let $t,en,tn,nn;t[147]===Symbol.for(`react.memo_cache_sentinel`)?($t=e=>{let t=e[0];(t===`fixed`||t===`interval`||t===`webhook`)&&j(e=>({...e,scheduleMode:t,prompt:t===`webhook`&&!e.prompt.trim()?tt:e.prompt}))},en=(0,Q.jsx)(_e,{value:`fixed`,children:`At a time`}),tn=(0,Q.jsx)(_e,{value:`interval`,children:`Every interval`}),nn=(0,Q.jsx)(_e,{value:`webhook`,children:`On webhook`}),t[147]=$t,t[148]=en,t[149]=tn,t[150]=nn):($t=t[147],en=t[148],tn=t[149],nn=t[150]);let rn;t[151]===qt?rn=t[152]:(rn=(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[Gt,(0,Q.jsxs)(ge,{"aria-label":`Schedule type`,value:qt,onValueChange:$t,children:[en,tn,nn]})]}),t[151]=qt,t[152]=rn);let an;t[153]!==A.coalesceKey||t[154]!==A.coalesceWindowSeconds||t[155]!==A.filters||t[156]!==A.intervalMinutes||t[157]!==A.maxDeliveryAgeMinutes||t[158]!==A.replayKey||t[159]!==A.scheduleMode||t[160]!==A.signatureEnabled||t[161]!==A.signatureEncoding||t[162]!==A.signatureHeader||t[163]!==A.signaturePrefix||t[164]!==A.signatureSecret||t[165]!==A.timeOfDay||t[166]!==A.weekdays||t[167]!==d||t[168]!==J?(an=A.scheduleMode===`webhook`?(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[(0,Q.jsx)(Ut,{environmentId:d,task:J}),(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Each request runs the prompt. Use {{body.path}}, {{headers.name}}, {{query.name}}, {{body}} or {{request}} in the prompt; only what it names reaches the agent.`}),(0,Q.jsx)($,{label:`Skip requests older than`,hint:`minutes, optional`,htmlFor:`scheduled-task-max-age`,children:(0,Q.jsx)(Ee,{id:`scheduled-task-max-age`,type:`number`,nativeInput:!0,min:1,max:O,placeholder:`Run every request`,value:A.maxDeliveryAgeMinutes,onChange:e=>j(t=>({...t,maxDeliveryAgeMinutes:e.target.value}))})}),(0,Q.jsx)(Ot,{filters:A.filters,onChange:e=>j(t=>({...t,filters:e}))}),(0,Q.jsx)($,{label:`Duplicate request key`,hint:`template, optional`,htmlFor:`scheduled-task-replay-key`,children:(0,Q.jsx)(Ee,{id:`scheduled-task-replay-key`,placeholder:`{{headers.delivery-id}}`,value:A.replayKey,onChange:e=>j(t=>({...t,replayKey:e.target.value}))})}),(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Requests with the same key run only once within 7 days.`}),(0,Q.jsx)($,{label:`Coalesce key`,hint:`template, optional`,htmlFor:`scheduled-task-coalesce-key`,children:(0,Q.jsx)(Ee,{id:`scheduled-task-coalesce-key`,placeholder:`{{body.id}}`,value:A.coalesceKey,onChange:e=>j(t=>({...t,coalesceKey:e.target.value}))})}),(0,Q.jsx)($,{label:`Coalesce window`,hint:`seconds, 10–3600`,htmlFor:`scheduled-task-coalesce-window`,children:(0,Q.jsx)(Ee,{id:`scheduled-task-coalesce-window`,type:`number`,nativeInput:!0,min:10,max:3600,placeholder:`120`,value:A.coalesceWindowSeconds,onChange:e=>j(t=>({...t,coalesceWindowSeconds:e.target.value}))})}),(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Coalescing runs the latest payload once when the window from the first delivery closes. Empty keys run normally.`}),(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,Q.jsx)(ut,{htmlFor:`scheduled-task-signature`,children:`Require signature`}),(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Reject requests without a valid HMAC-SHA256 signature of the body.`})]}),(0,Q.jsx)(ct,{id:`scheduled-task-signature`,checked:A.signatureEnabled,onCheckedChange:e=>j(t=>({...t,signatureEnabled:e}))})]}),A.signatureEnabled?(0,Q.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,Q.jsx)($,{label:`Header`,htmlFor:`scheduled-task-signature-header`,children:(0,Q.jsx)(Ee,{id:`scheduled-task-signature-header`,value:A.signatureHeader,onChange:e=>j(t=>({...t,signatureHeader:e.target.value}))})}),(0,Q.jsx)($,{label:`Prefix`,htmlFor:`scheduled-task-signature-prefix`,children:(0,Q.jsx)(Ee,{id:`scheduled-task-signature-prefix`,value:A.signaturePrefix,placeholder:`None`,onChange:e=>j(t=>({...t,signaturePrefix:e.target.value}))})}),(0,Q.jsx)($,{label:`Encoding`,htmlFor:`scheduled-task-signature-encoding`,children:(0,Q.jsxs)(z,{value:A.signatureEncoding,onValueChange:e=>j(t=>({...t,signatureEncoding:e===`base64`?`base64`:`hex`})),children:[(0,Q.jsx)(R,{size:`sm`,id:`scheduled-task-signature-encoding`,children:(0,Q.jsx)(I,{children:A.signatureEncoding})}),(0,Q.jsxs)(L,{children:[(0,Q.jsx)(F,{value:`hex`,children:`hex`}),(0,Q.jsx)(F,{value:`base64`,children:`base64`})]})]})}),(0,Q.jsx)($,{label:`Secret`,htmlFor:`scheduled-task-signature-secret`,children:(0,Q.jsx)(Ee,{id:`scheduled-task-signature-secret`,type:`password`,autoComplete:`off`,value:A.signatureSecret,placeholder:J?.schedule.type===`webhook`&&J.webhook?.hasSecret?`Unchanged`:`Shared secret`,onChange:e=>j(t=>({...t,signatureSecret:e.target.value}))})})]}):null]}):A.scheduleMode===`fixed`?(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(ut,{htmlFor:`scheduled-task-time`,children:`Run at`}),(0,Q.jsx)(Ee,{type:`time`,id:`scheduled-task-time`,nativeInput:!0,className:`w-32`,value:A.timeOfDay,onChange:e=>j(t=>({...t,timeOfDay:e.target.value}))}),(0,Q.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`on`})]}),(0,Q.jsx)(ge,{multiple:!0,variant:`outline`,size:`sm`,"aria-label":`Days to run`,value:[...A.weekdays].map(String),onValueChange:e=>{e.length!==0&&j(t=>({...t,weekdays:new Set(e.map(Number))}))},children:Ct.map(Jt)})]}):(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(ut,{htmlFor:`scheduled-task-interval`,children:`Run every`}),(0,Q.jsx)(Ee,{type:`number`,id:`scheduled-task-interval`,nativeInput:!0,min:1,step:`any`,className:`w-24`,value:A.intervalMinutes,onChange:e=>j(t=>({...t,intervalMinutes:e.target.value}))}),(0,Q.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`minutes`})]}),t[153]=A.coalesceKey,t[154]=A.coalesceWindowSeconds,t[155]=A.filters,t[156]=A.intervalMinutes,t[157]=A.maxDeliveryAgeMinutes,t[158]=A.replayKey,t[159]=A.scheduleMode,t[160]=A.signatureEnabled,t[161]=A.signatureEncoding,t[162]=A.signatureHeader,t[163]=A.signaturePrefix,t[164]=A.signatureSecret,t[165]=A.timeOfDay,t[166]=A.weekdays,t[167]=d,t[168]=J,t[169]=an):an=t[169];let on;t[170]!==Wt||t[171]!==rn||t[172]!==an?(on=(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[Wt,rn,an]}),t[170]=Wt,t[171]=rn,t[172]=an,t[173]=on):on=t[173];let sn;t[174]===Symbol.for(`react.memo_cache_sentinel`)?(sn=(0,Q.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,Q.jsx)(ut,{htmlFor:`scheduled-task-enabled`,children:`Enabled`}),(0,Q.jsx)(`p`,{id:`scheduled-task-enabled-description`,className:`text-sm text-muted-foreground`,children:`Disabled tasks stay saved but do not run.`})]}),t[174]=sn):sn=t[174];let cn;t[175]===Symbol.for(`react.memo_cache_sentinel`)?(cn=e=>j(t=>({...t,enabled:e})),t[175]=cn):cn=t[175];let ln;t[176]===A.enabled?ln=t[177]:(ln=(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[sn,(0,Q.jsx)(ct,{id:`scheduled-task-enabled`,"aria-describedby":`scheduled-task-enabled-description`,checked:A.enabled,onCheckedChange:cn})]}),t[176]=A.enabled,t[177]=ln);let un;t[178]!==P||t[179]!==Ue||t[180]!==st||t[181]!==lt||t[182]!==dt||t[183]!==ht||t[184]!==_t||t[185]!==Ft||t[186]!==It||t[187]!==Lt||t[188]!==zt||t[189]!==Ht||t[190]!==on||t[191]!==ln?(un=(0,Q.jsx)(Me,{children:(0,Q.jsxs)(`fieldset`,{disabled:P,className:`space-y-5`,children:[Ue,st,lt,dt,ht,_t,Ft,It,Lt,zt,Ht,on,ln]})}),t[178]=P,t[179]=Ue,t[180]=st,t[181]=lt,t[182]=dt,t[183]=ht,t[184]=_t,t[185]=Ft,t[186]=It,t[187]=Lt,t[188]=zt,t[189]=Ht,t[190]=on,t[191]=ln,t[192]=un):un=t[192];let dn;t[193]===P?dn=t[194]:(dn=(0,Q.jsx)(je,{render:(0,Q.jsx)(ee,{variant:`outline`,size:`sm`,disabled:P}),children:`Cancel`}),t[193]=P,t[194]=dn);let fn=!E||P||U||!h||!v.data,pn;t[195]===De?pn=t[196]:(pn=()=>void De(),t[195]=De,t[196]=pn);let mn=A.editingId?`Save task`:`Create task`,hn;t[197]!==fn||t[198]!==pn||t[199]!==mn?(hn=(0,Q.jsx)(ee,{size:`sm`,disabled:fn,onClick:pn,children:mn}),t[197]=fn,t[198]=pn,t[199]=mn,t[200]=hn):hn=t[200];let gn;t[201]!==dn||t[202]!==hn?(gn=(0,Q.jsxs)(Ae,{children:[dn,hn]}),t[201]=dn,t[202]=hn,t[203]=gn):gn=t[203];let _n;t[204]!==Be||t[205]!==un||t[206]!==gn?(_n=(0,Q.jsxs)(Pe,{className:`max-w-xl`,children:[Be,un,gn]}),t[204]=Be,t[205]=un,t[206]=gn,t[207]=_n):_n=t[207];let vn;return t[208]!==Ie||t[209]!==_n?(vn=(0,Q.jsx)(Fe,{open:!0,onOpenChange:Ie,children:_n}),t[208]=Ie,t[209]=_n,t[210]=vn):vn=t[210],vn}function Jt(e){return(0,Q.jsx)(_e,{value:String(e),"aria-label":wt[e],children:Tt[e]},e)}function Yt(e){return(0,Q.jsx)(F,{value:e.id,children:e.title},e.id)}function Xt(e){return(0,Q.jsxs)(F,{value:e.environmentId,children:[(0,Q.jsx)(Ve,{kind:k(e.serverConfig),className:`size-4`}),e.label]},e.environmentId)}function Zt(e){return{...e,projectId:``,modelKey:``,baseModelSelection:null,baseRef:`main`,startFromOrigin:!0,existingWorktreePath:``}}function Qt(e,t){V.add(J({type:`error`,title:e,description:t instanceof Error?t.message:String(t)}))}export{_t as a,ht as i,Mt as n,jt as r,Ft as t};
6
+ //# sourceMappingURL=ScheduledTasksSettings-BFBxrkf4.js.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./react-BUfh6y28.js";import{n as t,t as n}from"./jsx-runtime-DJeoFXNw.js";import{I as r}from"./settingsLayout-BbEwQ6Fy.js";import{bo as i}from"./main-B1sXOjZZ.js";var a=t(),o=e(n(),1);function s(e){let t=(0,a.c)(8),n,s,c;t[0]===e?(n=t[1],s=t[2],c=t[3]):({settingKeys:c,checked:n,...s}=e,t[0]=e,t[1]=n,t[2]=s,t[3]=c);let l=r(c),u=!l&&n,d;return t[4]!==l||t[5]!==s||t[6]!==u?(d=(0,o.jsx)(i,{...s,mixed:l,checked:u}),t[4]=l,t[5]=s,t[6]=u,t[7]=d):d=t[7],d}export{s as t};
2
- //# sourceMappingURL=ScopedSwitch-sSIKDf2q.js.map
1
+ import{a as e}from"./react-BUfh6y28.js";import{n as t,t as n}from"./jsx-runtime-DJeoFXNw.js";import{I as r}from"./settingsLayout-EWRSNE9F.js";import{Po as i}from"./main-D8lKEPYS.js";var a=t(),o=e(n(),1);function s(e){let t=(0,a.c)(8),n,s,c;t[0]===e?(n=t[1],s=t[2],c=t[3]):({settingKeys:c,checked:n,...s}=e,t[0]=e,t[1]=n,t[2]=s,t[3]=c);let l=r(c),u=!l&&n,d;return t[4]!==l||t[5]!==s||t[6]!==u?(d=(0,o.jsx)(i,{...s,mixed:l,checked:u}),t[4]=l,t[5]=s,t[6]=u,t[7]=d):d=t[7],d}export{s as t};
2
+ //# sourceMappingURL=ScopedSwitch-BC1gPotW.js.map
@@ -0,0 +1,2 @@
1
+ import{a as e,t}from"./react-BUfh6y28.js";import{t as n}from"./jsx-runtime-DJeoFXNw.js";import{Ba as r,Na as i,Rr as a,Sa as o,Ua as s,Wa as c,_a as l,fa as u,ga as ee}from"./utils-CtzgibkN.js";import{f as d,n as f}from"./useRender-BP5vR6yH.js";import{a as p,i as m,n as h,t as g}from"./CSPContext-jKZ42W4p.js";var _=e(t()),v=_.createContext(void 0);function y(){let e=_.useContext(v);if(e===void 0)throw Error(d(53));return e}var b=function(e){return e.scrollAreaCornerHeight=`--scroll-area-corner-height`,e.scrollAreaCornerWidth=`--scroll-area-corner-width`,e}({});function x(e,t,n){if(!e)return 0;let r=getComputedStyle(e),i=n===`x`?`Inline`:`Block`;return n===`x`&&t===`margin`?parseFloat(r[`${t}InlineStart`])*2:parseFloat(r[`${t}${i}Start`])+parseFloat(r[`${t}${i}End`])}var S=function(e){return e.orientation=`data-orientation`,e.hovering=`data-hovering`,e.scrolling=`data-scrolling`,e.hasOverflowX=`data-has-overflow-x`,e.hasOverflowY=`data-has-overflow-y`,e.overflowXStart=`data-overflow-x-start`,e.overflowXEnd=`data-overflow-x-end`,e.overflowYStart=`data-overflow-y-start`,e.overflowYEnd=`data-overflow-y-end`,e}({}),C=function(e){return e.scrolling=`data-scrolling`,e.hasOverflowX=`data-has-overflow-x`,e.hasOverflowY=`data-has-overflow-y`,e.overflowXStart=`data-overflow-x-start`,e.overflowXEnd=`data-overflow-x-end`,e.overflowYStart=`data-overflow-y-start`,e.overflowYEnd=`data-overflow-y-end`,e}({}),w={hasOverflowX:e=>e?{[C.hasOverflowX]:``}:null,hasOverflowY:e=>e?{[C.hasOverflowY]:``}:null,overflowXStart:e=>e?{[C.overflowXStart]:``}:null,overflowXEnd:e=>e?{[C.overflowXEnd]:``}:null,overflowYStart:e=>e?{[C.overflowYStart]:``}:null,overflowYEnd:e=>e?{[C.overflowYEnd]:``}:null,cornerHidden:()=>null},T=e(n()),E={x:0,y:0},D={width:0,height:0},te={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},O={x:!0,y:!0,corner:!0},k=_.forwardRef(function(e,t){let{render:n,className:r,overflowEdgeThreshold:a,style:s,...l}=e,u=ne(a),d=i(),p=o(),m=o(),{nonce:y,disableStyleElements:C}=g(),[k,A]=_.useState(!1),[j,M]=_.useState(!1),[N,P]=_.useState(!1),[F,re]=_.useState(!1),[I,L]=_.useState(!1),[R,z]=_.useState(D),[B,V]=_.useState(D),[H,ie]=_.useState(te),[U,W]=_.useState(O),G=_.useRef(null),K=_.useRef(null),q=_.useRef(null),J=_.useRef(null),Y=_.useRef(null),X=_.useRef(null),ae=_.useRef(null),oe=_.useRef(!1),se=_.useRef(0),ce=_.useRef(0),le=_.useRef(0),ue=_.useRef(0),Z=_.useRef(`vertical`),Q=_.useRef(E),de=c(e=>{let t=e.x-Q.current.x,n=e.y-Q.current.y;Q.current=e,n!==0&&(P(!0),p.start(500,()=>{P(!1)})),t!==0&&(M(!0),m.start(500,()=>{M(!1)}))}),$=c(e=>{e.button===0&&(oe.current=!0,se.current=e.clientY,ce.current=e.clientX,Z.current=e.currentTarget.getAttribute(S.orientation),K.current&&(le.current=K.current.scrollTop,ue.current=K.current.scrollLeft),Y.current&&Z.current===`vertical`&&Y.current.setPointerCapture(e.pointerId),X.current&&Z.current===`horizontal`&&X.current.setPointerCapture(e.pointerId))}),fe=c(e=>{if(!oe.current)return;let t=e.clientY-se.current,n=e.clientX-ce.current;if(K.current){let r=K.current.scrollHeight,i=K.current.clientHeight,a=K.current.scrollWidth,o=K.current.clientWidth;if(Y.current&&q.current&&Z.current===`vertical`){let n=x(q.current,`padding`,`y`),a=x(Y.current,`margin`,`y`),o=Y.current.offsetHeight,s=t/(q.current.offsetHeight-o-n-a);K.current.scrollTop=le.current+s*(r-i),e.preventDefault(),P(!0),p.start(500,()=>{P(!1)})}if(X.current&&J.current&&Z.current===`horizontal`){let t=x(J.current,`padding`,`x`),r=x(X.current,`margin`,`x`),i=X.current.offsetWidth,s=n/(J.current.offsetWidth-i-t-r);K.current.scrollLeft=ue.current+s*(a-o),e.preventDefault(),M(!0),m.start(500,()=>{M(!1)})}}}),pe=c(e=>{oe.current=!1,Y.current&&Z.current===`vertical`&&Y.current.releasePointerCapture(e.pointerId),X.current&&Z.current===`horizontal`&&X.current.releasePointerCapture(e.pointerId)});function me(e){re(e.pointerType===`touch`)}function he(e){if(me(e),e.pointerType!==`touch`){let t=ee(G.current,e.target);A(t)}}let ge=_.useMemo(()=>({scrolling:j||N,hasOverflowX:!U.x,hasOverflowY:!U.y,overflowXStart:H.xStart,overflowXEnd:H.xEnd,overflowYStart:H.yStart,overflowYEnd:H.yEnd,cornerHidden:U.corner}),[j,N,U.x,U.y,U.corner,H]),_e={role:`presentation`,onPointerEnter:he,onPointerMove:he,onPointerDown:me,onPointerLeave(){A(!1)},style:{position:`relative`,[b.scrollAreaCornerHeight]:`${R.height}px`,[b.scrollAreaCornerWidth]:`${R.width}px`}},ve=f(`div`,e,{state:ge,ref:[t,G],props:[_e,l],stateAttributesMapping:w}),ye=_.useMemo(()=>({handlePointerDown:$,handlePointerMove:fe,handlePointerUp:pe,handleScroll:de,cornerSize:R,setCornerSize:z,thumbSize:B,setThumbSize:V,hasMeasuredScrollbar:I,setHasMeasuredScrollbar:L,touchModality:F,cornerRef:ae,scrollingX:j,setScrollingX:M,scrollingY:N,setScrollingY:P,hovering:k,setHovering:A,viewportRef:K,rootRef:G,scrollbarYRef:q,scrollbarXRef:J,thumbYRef:Y,thumbXRef:X,rootId:d,hiddenState:U,setHiddenState:W,overflowEdges:H,setOverflowEdges:ie,viewportState:ge,overflowEdgeThreshold:u}),[$,fe,pe,de,R,B,I,F,j,M,N,P,k,A,d,U,H,ge,u]);return(0,T.jsxs)(v.Provider,{value:ye,children:[!C&&h.getElement(y),ve]})});function ne(e){if(typeof e==`number`){let t=Math.max(0,e);return{xStart:t,xEnd:t,yStart:t,yEnd:t}}return{xStart:Math.max(0,e?.xStart||0),xEnd:Math.max(0,e?.xEnd||0),yStart:Math.max(0,e?.yStart||0),yEnd:Math.max(0,e?.yEnd||0)}}var A=_.createContext(void 0),j=function(e){return e.scrollAreaOverflowXStart=`--scroll-area-overflow-x-start`,e.scrollAreaOverflowXEnd=`--scroll-area-overflow-x-end`,e.scrollAreaOverflowYStart=`--scroll-area-overflow-y-start`,e.scrollAreaOverflowYEnd=`--scroll-area-overflow-y-end`,e}({}),M=!1;function N(){M||r||(typeof CSS<`u`&&`registerProperty`in CSS&&[j.scrollAreaOverflowXStart,j.scrollAreaOverflowXEnd,j.scrollAreaOverflowYStart,j.scrollAreaOverflowYEnd].forEach(e=>{try{CSS.registerProperty({name:e,syntax:`<length>`,inherits:!1,initialValue:`0px`})}catch{}}),M=!0)}var P=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...l}=e,{viewportRef:u,scrollbarYRef:ee,scrollbarXRef:d,thumbYRef:g,thumbXRef:v,cornerRef:b,cornerSize:S,setCornerSize:C,setThumbSize:E,rootId:D,setHiddenState:te,hiddenState:O,setHasMeasuredScrollbar:k,handleScroll:ne,setHovering:M,setOverflowEdges:P,overflowEdges:I,overflowEdgeThreshold:L,scrollingX:R,scrollingY:z}=y(),B=a(),V=_.useRef(!0),H=_.useRef([NaN,NaN,NaN,NaN]),ie=o(),U=o(),W=c(()=>{let e=u.current,t=ee.current,n=d.current,r=g.current,i=v.current,a=b.current;if(!e)return;let o=e.scrollHeight,s=e.scrollWidth,c=e.clientHeight,l=e.clientWidth,f=e.scrollTop,h=e.scrollLeft,_=H.current,y=Number.isNaN(_[0]);if(_[0]=c,_[1]=o,_[2]=l,_[3]=s,y&&k(!0),o===0||s===0)return;let w=F(e),T=w.y,D=w.x,O=l/s,ne=c/o,A=Math.max(0,s-l),M=Math.max(0,o-c),N=0,I=0;if(!D){let e=0;e=p(B===`rtl`?-h:h,0,A),N=m(e,A),I=A-N}let R=T?0:p(f,0,M),z=T?0:m(R,M),V=T?0:M-z,ie=D?0:l,U=T?0:c,W=0,G=0;!D&&!T&&(W=t?.offsetWidth||0,G=n?.offsetHeight||0);let K=S.width===0&&S.height===0,q=K?W:0,J=K?G:0,Y=x(n,`padding`,`x`),X=x(t,`padding`,`y`),ae=x(i,`margin`,`x`),oe=x(r,`margin`,`y`),se=ie-Y-ae,ce=U-X-oe,le=n?Math.min(n.offsetWidth-q,se):se,ue=t?Math.min(t.offsetHeight-J,ce):ce,Z=Math.max(16,le*O),Q=Math.max(16,ue*ne);if(E(e=>e.height===Q&&e.width===Z?e:{width:Z,height:Q}),t&&r){let e=t.offsetHeight-Q-X-oe,n=o-c,i=n===0?0:f/n,a=Math.min(e,Math.max(0,i*e));r.style.transform=`translate3d(0,${a}px,0)`}if(n&&i){let e=n.offsetWidth-Z-Y-ae,t=s-l,r=t===0?0:h/t,a=B===`rtl`?p(r*e,-e,0):p(r*e,0,e);i.style.transform=`translate3d(${a}px,0,0)`}let de=[[j.scrollAreaOverflowXStart,N],[j.scrollAreaOverflowXEnd,I],[j.scrollAreaOverflowYStart,z],[j.scrollAreaOverflowYEnd,V]];for(let[t,n]of de)e.style.setProperty(t,`${n}px`);a&&(D||T?C({width:0,height:0}):!D&&!T&&C({width:W,height:G})),te(e=>re(e,w));let $={xStart:!D&&N>L.xStart,xEnd:!D&&I>L.xEnd,yStart:!T&&z>L.yStart,yEnd:!T&&V>L.yEnd};P(e=>e.xStart===$.xStart&&e.xEnd===$.xEnd&&e.yStart===$.yStart&&e.yEnd===$.yEnd?e:$)});s(()=>{u.current&&N()},[u]),s(()=>{queueMicrotask(W)},[W,O,B]),s(()=>{u.current?.matches(`:hover`)&&M(!0)},[u,M]),_.useEffect(()=>{let e=u.current;if(typeof ResizeObserver>`u`||!e)return;let t=!1,n=new ResizeObserver(()=>{if(!t){t=!0;let n=H.current;if(n[0]===e.clientHeight&&n[1]===e.scrollHeight&&n[2]===e.clientWidth&&n[3]===e.scrollWidth)return}W()});return n.observe(e),U.start(0,()=>{let t=e.getAnimations({subtree:!0});t.length!==0&&Promise.allSettled(t.map(e=>e.finished)).then(W).catch(()=>{})}),()=>{n.disconnect(),U.clear()}},[W,u,U]);function G(){V.current=!1}let K={role:`presentation`,...D&&{"data-id":`${D}-viewport`},tabIndex:O.x&&O.y?-1:0,className:h.className,style:{overflow:`scroll`},onScroll(){u.current&&(W(),V.current||ne({x:u.current.scrollLeft,y:u.current.scrollTop}),ie.start(100,()=>{V.current=!0}))},onWheel:G,onTouchMove:G,onPointerMove:G,onPointerEnter:G,onKeyDown:G},q=_.useMemo(()=>({scrolling:R||z,hasOverflowX:!O.x,hasOverflowY:!O.y,overflowXStart:I.xStart,overflowXEnd:I.xEnd,overflowYStart:I.yStart,overflowYEnd:I.yEnd,cornerHidden:O.corner}),[R,z,O.x,O.y,O.corner,I]),J=f(`div`,e,{ref:[t,u],state:q,props:[K,l],stateAttributesMapping:w}),Y=_.useMemo(()=>({computeThumbPosition:W}),[W]);return(0,T.jsx)(A.Provider,{value:Y,children:J})});function F(e){let t=e.clientHeight>=e.scrollHeight,n=e.clientWidth>=e.scrollWidth;return{y:t,x:n,corner:t||n}}function re(e,t){return e.y===t.y&&e.x===t.x&&e.corner===t.corner?e:t}var I=_.createContext(void 0);function L(){let e=_.useContext(I);if(e===void 0)throw Error(d(54));return e}var R=function(e){return e.scrollAreaThumbHeight=`--scroll-area-thumb-height`,e.scrollAreaThumbWidth=`--scroll-area-thumb-width`,e}({}),z=_.forwardRef(function(e,t){let{render:n,className:r,orientation:i=`vertical`,keepMounted:o=!1,style:s,...c}=e,{hovering:d,scrollingX:p,scrollingY:m,hiddenState:h,overflowEdges:g,scrollbarYRef:v,scrollbarXRef:S,viewportRef:C,thumbYRef:E,thumbXRef:D,handlePointerDown:te,handlePointerUp:O,rootId:k,thumbSize:ne,hasMeasuredScrollbar:A}=y(),j={hovering:d,scrolling:{horizontal:p,vertical:m}[i],orientation:i,hasOverflowX:!h.x,hasOverflowY:!h.y,overflowXStart:g.xStart,overflowXEnd:g.xEnd,overflowYStart:g.yStart,overflowYEnd:g.yEnd,cornerHidden:h.corner},M=a(),N=!A&&!o,P=i===`vertical`?h.y:h.x,F=o||!P;_.useEffect(()=>{if(!F)return;let e=C.current,t=i===`vertical`?v.current:S.current;if(!t)return;function n(n){if(!e||!t||n.ctrlKey)return;n.preventDefault();let r=i===`horizontal`,a=r?`scrollLeft`:`scrollTop`,o=r?n.deltaX:n.deltaY,s=r?e.scrollWidth-e.clientWidth:e.scrollHeight-e.clientHeight,c=r&&M===`rtl`?-s:0,l=r&&M===`rtl`?0:s,u=e[a];u<=c&&o<0||u>=l&&o>0||(e[a]=Math.min(l,Math.max(c,u+o)))}return u(t,`wheel`,n,{passive:!1})},[M,i,S,v,F,C]);let re={...k&&{"data-id":`${k}-scrollbar`},onPointerDown(e){if(e.button!==0)return;let t=l(e.nativeEvent),n=i===`vertical`?E.current:D.current;if(!(n&&ee(n,t))&&C.current){if(E.current&&v.current&&i===`vertical`){let t=x(E.current,`margin`,`y`),n=x(v.current,`padding`,`y`),r=E.current.offsetHeight,i=v.current.getBoundingClientRect(),a=e.clientY-i.top-r/2-n+t/2,o=C.current.scrollHeight,s=C.current.clientHeight,c=a/(v.current.offsetHeight-r-n-t)*(o-s);C.current.scrollTop=c}if(D.current&&S.current&&i===`horizontal`){let t=x(D.current,`margin`,`x`),n=x(S.current,`padding`,`x`),r=D.current.offsetWidth,i=S.current.getBoundingClientRect(),a=e.clientX-i.left-r/2-n+t/2,o=C.current.scrollWidth,s=C.current.clientWidth,c=a/(S.current.offsetWidth-r-n-t),l;M===`rtl`?(l=(1-c)*(o-s),C.current.scrollLeft<=0&&(l=-l)):l=c*(o-s),C.current.scrollLeft=l}te(e)}},onPointerUp:O,style:{position:`absolute`,touchAction:`none`,WebkitUserSelect:`none`,userSelect:`none`,visibility:N?`hidden`:void 0,...i===`vertical`&&{top:0,bottom:`var(${b.scrollAreaCornerHeight})`,insetInlineEnd:0,[R.scrollAreaThumbHeight]:`${ne.height}px`},...i===`horizontal`&&{insetInlineStart:0,insetInlineEnd:`var(${b.scrollAreaCornerWidth})`,bottom:0,[R.scrollAreaThumbWidth]:`${ne.width}px`}}},L=f(`div`,e,{ref:[t,i===`vertical`?v:S],state:j,props:[re,c],stateAttributesMapping:w}),z=_.useMemo(()=>({orientation:i}),[i]);return F?(0,T.jsx)(I.Provider,{value:z,children:L}):null}),B=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{thumbYRef:o,thumbXRef:s,handlePointerDown:c,handlePointerMove:l,handlePointerUp:u,setScrollingX:ee,setScrollingY:d,hasMeasuredScrollbar:p}=y(),{orientation:m}=L();return f(`div`,e,{ref:[t,m===`vertical`?o:s],state:{orientation:m},props:[{onPointerDown:c,onPointerMove:l,onPointerUp(e){m===`vertical`&&d(!1),m===`horizontal`&&ee(!1),u(e)},style:{visibility:p?void 0:`hidden`,...m===`vertical`&&{height:`var(${R.scrollAreaThumbHeight})`},...m===`horizontal`&&{width:`var(${R.scrollAreaThumbWidth})`}}},a]})}),V=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{cornerRef:o,cornerSize:s,hiddenState:c}=y(),l=f(`div`,e,{ref:[t,o],props:[{style:{position:`absolute`,bottom:0,insetInlineEnd:0,width:s.width,height:s.height}},a]});return c.corner?null:l});export{k as a,P as i,B as n,z as r,V as t};
2
+ //# sourceMappingURL=ScrollAreaCorner-C2BGnFEt.js.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./react-BUfh6y28.js";import{n as t,t as n}from"./jsx-runtime-DJeoFXNw.js";import{t as r}from"./input-CQaedaQh.js";import{t as i}from"./draft-input-BTetoXSt.js";var a=t(),o=e(n(),1);function s(e){let t=(0,a.c)(16),n,s,c,l;t[0]===e?(n=t[1],s=t[2],c=t[3],l=t[4]):({configured:l,placeholder:s,onCommit:n,...c}=e,t[0]=e,t[1]=n,t[2]=s,t[3]=c,t[4]=l);let u=l!==void 0&&l,d=u?`Stored secret, enter a new value to replace`:s??`Not set`,f;t[5]!==c||t[6]!==d?(f={...c,type:`password`,autoComplete:`off`,spellCheck:!1,placeholder:d},t[5]=c,t[6]=d,t[7]=f):f=t[7];let p=f;if(n){let e;t[8]!==u||t[9]!==n?(e=e=>{u&&e===``||n(e)},t[8]=u,t[9]=n,t[10]=e):e=t[10];let r;return t[11]!==p||t[12]!==e?(r=(0,o.jsx)(i,{...p,onCommit:e}),t[11]=p,t[12]=e,t[13]=r):r=t[13],r}let m;return t[14]===p?m=t[15]:(m=(0,o.jsx)(r,{...p}),t[14]=p,t[15]=m),m}export{s as t};
2
- //# sourceMappingURL=SecretInput-DxjaAnSE.js.map
1
+ import{a as e}from"./react-BUfh6y28.js";import{n as t,t as n}from"./jsx-runtime-DJeoFXNw.js";import{t as r}from"./input-BwujRX3Y.js";import{t as i}from"./draft-input-D7yqLT1A.js";var a=t(),o=e(n(),1);function s(e){let t=(0,a.c)(16),n,s,c,l;t[0]===e?(n=t[1],s=t[2],c=t[3],l=t[4]):({configured:l,placeholder:s,onCommit:n,...c}=e,t[0]=e,t[1]=n,t[2]=s,t[3]=c,t[4]=l);let u=l!==void 0&&l,d=u?`Stored secret, enter a new value to replace`:s??`Not set`,f;t[5]!==c||t[6]!==d?(f={...c,type:`password`,autoComplete:`off`,spellCheck:!1,placeholder:d},t[5]=c,t[6]=d,t[7]=f):f=t[7];let p=f;if(n){let e;t[8]!==u||t[9]!==n?(e=e=>{u&&e===``||n(e)},t[8]=u,t[9]=n,t[10]=e):e=t[10];let r;return t[11]!==p||t[12]!==e?(r=(0,o.jsx)(i,{...p,onCommit:e}),t[11]=p,t[12]=e,t[13]=r):r=t[13],r}let m;return t[14]===p?m=t[15]:(m=(0,o.jsx)(r,{...p}),t[14]=p,t[15]=m),m}export{s as t};
2
+ //# sourceMappingURL=SecretInput-CTGlsesz.js.map
@@ -0,0 +1,2 @@
1
+ import{a as e,t}from"./react-BUfh6y28.js";import{t as n}from"./jsx-runtime-DJeoFXNw.js";import{An as r,Ba as i,Da as a,Di as o,En as s,Er as c,Fa as l,Fi as u,Fn as d,Fr as f,Hi as p,Hr as m,Ia as h,Ii as ee,In as g,Ir as _,Jn as v,Jr as y,Ka as b,Ki as x,Kn as S,Li as C,Ln as w,Mn as T,Nr as E,Oi as D,Or as te,Pi as O,Pn as k,Pr as A,Rn as j,Rr as M,Sa as N,To as P,Ua as F,Un as ne,Va as re,Wa as I,Ya as L,Yn as R,ai as z,ca as ie,ci as B,fa as ae,fo as V,ia as oe,ja as se,jn as ce,jr as le,ka as ue,kn as de,kr as H,la as fe,lo as U,pi as W,qn as G,sa as K,si as pe,ua as me,vi as he,vo as ge,wa as _e,xo as q,ya as J,zn as ve,zr as ye}from"./utils-CtzgibkN.js";import{d as be,f as Y,i as xe,n as Se,o as Ce,s as we,u as Te}from"./useRender-BP5vR6yH.js";import{t as Ee}from"./usePreviousValue-Dx4Nv0v8.js";import{t as De}from"./useRegisterFieldControl-BL6Ml_ar.js";import{t as Oe}from"./FormContext-CXpUoAJn.js";import{a as X,i as ke,n as Ae,r as je,t as Me}from"./CSPContext-jKZ42W4p.js";var Z=e(t()),Q=e(n());function Ne(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:l,defaultOpen:f=!1,onOpenChange:p,name:m,form:h,autoComplete:_,disabled:v=!1,readOnly:y=!1,required:b=!1,modal:x=!0,actionsRef:C,inputRef:w,onOpenChangeComplete:E,items:O,multiple:k=!1,itemToStringLabel:A,itemToStringValue:j,isItemEqualToValue:M=d,highlightItemOnHover:N=!0,children:P}=e,{clearErrors:re}=Oe(),{setDirty:R,setTouched:z,setFocused:ae,shouldValidateOnChange:oe,validityData:le,setFilled:ue,name:de,disabled:fe,validation:U,validationMode:ge}=ne(),q=ve({id:t}),J=fe||v,ye=de??m,[Y,Se]=L({controlled:n,default:k?r??Ce:r,name:`Select`,state:`value`}),[X,Ae]=L({controlled:l,default:f,name:`Select`,state:`open`}),Me=Z.useRef([]),Ne=Z.useRef([]),Pe=Z.useRef(null),Fe=Z.useRef(null),Ie=Z.useRef(0),Le=Z.useRef(null),Re=Z.useRef([]),ze=Z.useRef(!1),Be=Z.useRef(!1),Ve=Z.useRef(null),He=Z.useRef(null),Ue=Z.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),We=Z.useRef(!1),{mounted:Ge,setMounted:Ke,transitionStatus:qe}=a(X),{openMethod:Je,triggerProps:Ye}=c(X),$=be(()=>new o({id:q,labelId:void 0,modal:x,multiple:k,itemToStringLabel:A,itemToStringValue:j,isItemEqualToValue:M,value:Y,open:X,mounted:Ge,transitionStatus:qe,items:O,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,Xe=D($,s.activeIndex),Ze=D($,s.selectedIndex),Qe=D($,s.triggerElement),$e=D($,s.positionerElement),et=Ee(Je),tt=Je??et,nt=Z.useMemo(()=>k&&Array.isArray(Y)&&Y.length===0?``:T(Y,j),[k,Y,j]),rt=Z.useMemo(()=>k&&Array.isArray(Y)?Y.map(e=>T(e,j)):T(Y,j),[k,Y,j]),it=me($.state.triggerElement),at=I(()=>rt);De(it,q,Y,at);let ot=Z.useRef(Y),st=k?Array.isArray(Y)&&Y.length>0:Y!=null;F(()=>{Y!==ot.current&&$.set(`forceMount`,!0)},[$,Y]),F(()=>{ue(st)},[st,ue]),F(function(){let e=Re.current,t;if(k){let n=Array.isArray(Y)?Y:[];if(n.length===0)t=null;else{let r=n[n.length-1],i=g(e,r,M);t=i===-1?null:i}}else{let n=g(e,Y,M);t=n===-1?null:n}t===null&&(He.current=null),!X&&$.set(`selectedIndex`,t)},[st,k,X,Y,Re,M,$,He]),te(Y,()=>{re(ye),R(Y!==le.initialValue),oe()?U.commit(Y):U.commit(Y,!0)});let ct=I((e,t)=>{if(p?.(e,t),!t.isCanceled&&(Ae(e),e||t.reason!==`focus-out`&&t.reason!==`outside-press`||(z(!0),ae(!1),ge===`onBlur`&&U.commit(Y)),!e&&$.state.activeIndex!==null)){let e=Me.current[$.state.activeIndex];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}}),lt=I(()=>{Ke(!1),$.update({activeIndex:null,openMethod:null}),E?.(!1)});_e({enabled:!C,open:X,ref:Pe,onComplete(){X||lt()}}),Z.useImperativeHandle(C,()=>({unmount:lt}),[lt]);let ut=I((e,t)=>{i?.(e,t),!t.isCanceled&&Se(e)}),dt=I(()=>{let e=$.state.listElement||Pe.current;if(!e)return;let t=je(e.scrollHeight,e.clientHeight),n=ke(e.scrollTop,t),r=n>0,i=n<t;$.state.scrollUpArrowVisible!==r&&$.set(`scrollUpArrowVisible`,r),$.state.scrollDownArrowVisible!==i&&$.set(`scrollDownArrowVisible`,i)}),ft=W({open:X,onOpenChange:ct,elements:{reference:Qe,floating:$e}}),pt=ee(ft,{enabled:!y&&!J,event:`mousedown`}),mt=u(ft),ht=B(ft,{enabled:!y&&!J,listRef:Me,activeIndex:Xe,selectedIndex:Ze,disabledIndices:Ce,onNavigate(e){(e!==null||X)&&$.set(`activeIndex`,e)},focusItemOnHover:N}),gt=pe(ft,{enabled:!y&&!J&&(X||!k),listRef:Ne,activeIndex:Xe,selectedIndex:Ze,onMatch(e){X?$.set(`activeIndex`,e):ut(Re.current[e],se(`none`))},onTyping(e){ze.current=e}}),_t=Z.useMemo(()=>{let e=xe(gt.reference,ht.reference,mt.reference,pt.reference,Ye);return q&&(e.id=q),e},[pt.reference,gt.reference,ht.reference,mt.reference,Ye,q]),vt=Z.useMemo(()=>xe(he,gt.floating,ht.floating,mt.floating),[gt.floating,ht.floating,mt.floating]),yt=ht.item??we;H(()=>{$.update({popupProps:vt,triggerProps:_t})}),F(()=>{$.update({id:q,modal:x,multiple:k,value:Y,open:X,mounted:Ge,transitionStatus:qe,popupProps:vt,triggerProps:_t,items:O,itemToStringLabel:A,itemToStringValue:j,isItemEqualToValue:M,openMethod:tt})},[$,q,x,k,Y,X,Ge,qe,vt,_t,O,A,j,M,tt]);let bt=Z.useMemo(()=>({store:$,name:ye,required:b,disabled:J,readOnly:y,multiple:k,highlightItemOnHover:N,setValue:ut,setOpen:ct,listRef:Me,popupRef:Pe,scrollHandlerRef:Fe,handleScrollArrowVisibility:dt,scrollArrowsMountedCountRef:Ie,itemProps:yt,events:ft.context.events,valueRef:Le,valuesRef:Re,labelsRef:Ne,typingRef:ze,selectionRef:Ue,firstItemTextRef:Ve,selectedItemTextRef:He,validation:U,onOpenChangeComplete:E,keyboardActiveRef:Be,alignItemWithTriggerActiveRef:We,initialValueRef:ot}),[$,ye,b,J,y,k,N,ut,ct,yt,ft.context.events,U,E,dt]),xt=Te(w,U.inputRef),St=k&&Array.isArray(Y)&&Y.length>0,Ct=k?void 0:ye,wt=Z.useMemo(()=>!k||!Array.isArray(Y)||!ye?null:Y.map(e=>{let t=T(e,j);return(0,Q.jsx)(`input`,{type:`hidden`,form:h,name:ye,value:t},t)}),[k,Y,h,ye,j]);return(0,Q.jsx)(G.Provider,{value:bt,children:(0,Q.jsxs)(S.Provider,{value:ft,children:[P,(0,Q.jsx)(`input`,{...U.getInputValidationProps({onFocus(){$.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||J||y){e.preventBaseUIHandler?.();return}let t=e.currentTarget.value,n=se(V,e.nativeEvent);function r(){if(k)return;let e=Re.current.find(e=>T(e,j).toLowerCase()===t.toLowerCase()||ce(e,A).toLowerCase()===t.toLowerCase());e!=null&&(R(e!==le.initialValue),ut(e,n),oe()&&U.commit(e))}$.set(`forceMount`,!0),queueMicrotask(r)}}),id:q&&Ct==null?`${q}-hidden-input`:void 0,form:h,name:Ct,autoComplete:_,value:nt,disabled:J,required:b&&!St,readOnly:y,ref:xt,style:ye?ie:K,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),wt]})})}var Pe={value:()=>null},Fe=Z.forwardRef(function(e,t){let{className:n,render:i,children:a,placeholder:o,style:c,...l}=e,{store:u,valueRef:d}=R(),f=D(u,s.value),p=D(u,s.items),m=D(u,s.itemToStringLabel),h=D(u,s.hasSelectedValue),ee=!h&&o!=null&&a==null,g=D(u,s.hasNullItemLabel,ee),_={value:f,placeholder:!h},v=null;return v=typeof a==`function`?a(f):a??(!h&&o!=null&&!g?o:Array.isArray(f)?de(f,p,m):r(f,p,m)),Se(`span`,e,{state:_,ref:[t,d],props:[{children:v},l],stateAttributesMapping:Pe})}),Ie=Z.createContext(void 0),Le=Z.forwardRef(function(e,t){let{store:n}=R(),r=D(n,s.mounted),i=D(n,s.forceMount);return r||i?(0,Q.jsx)(Ie.Provider,{value:!0,children:(0,Q.jsx)(p,{ref:t,...e})}):null}),Re=Z.createContext(void 0);function ze(){let e=Z.useContext(Re);if(!e)throw Error(Y(59));return e}function Be(e,t){e&&Object.assign(e.style,t)}var Ve={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},He={position:`fixed`},Ue=Z.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o=`bottom`,align:c=`center`,sideOffset:l=0,alignOffset:u=0,collisionBoundary:d=`clipping-ancestors`,collisionPadding:p,arrowPadding:m=5,sticky:h=!1,disableAnchorTracking:ee,alignItemWithTrigger:y=!0,collisionAvoidance:b=x,style:S,...C}=e,{store:w,listRef:T,labelsRef:te,alignItemWithTriggerActiveRef:O,selectedItemTextRef:k,valuesRef:M,initialValueRef:N,popupRef:P,setValue:ne}=R(),re=v(),L=D(w,s.open),z=D(w,s.mounted),ie=D(w,s.modal),B=D(w,s.value),ae=D(w,s.openMethod),oe=D(w,s.positionerElement),ce=D(w,s.triggerElement),ue=D(w,s.isItemEqualToValue),de=D(w,s.transitionStatus),H=Z.useRef(null),fe=Z.useRef(null),[U,W]=Z.useState(y),G=z&&U&&ae!==`touch`;!z&&U!==y&&W(y),F(()=>{z||(s.scrollUpArrowVisible(w.state)&&w.set(`scrollUpArrowVisible`,!1),s.scrollDownArrowVisible(w.state)&&w.set(`scrollDownArrowVisible`,!1))},[w,z]),Z.useImperativeHandle(O,()=>G),le((G||ie)&&L,ae===`touch`,oe,ce);let K=_({anchor:n,floatingRootContext:re,positionMethod:r,mounted:z,side:o,sideOffset:l,align:c,alignOffset:u,arrowPadding:m,collisionBoundary:d,collisionPadding:p,sticky:h,disableAnchorTracking:ee??G,collisionAvoidance:b,keepMounted:!0}),pe=G?`none`:K.side,me=G?He:K.positionerStyles,he={open:L,side:pe,align:K.align,anchorHidden:K.anchorHidden};F(()=>{w.set(`popupSide`,K.side)},[w,K.side]);let ge=I(e=>{w.set(`positionerElement`,e)}),_e=E(e,he,{styles:me,transitionStatus:de,props:C,refs:[t,ge],hidden:!z,inert:!L}),q=Z.useRef(0),J=I(e=>{if(e.size===0&&q.current===0||M.current.length===0)return;let t=q.current;if(q.current=e.size,e.size===t)return;let n=se(V);if(t!==0&&!w.state.multiple&&B!==null&&g(M.current,B,ue)===-1){let e=N.current,t=e!=null&&g(M.current,e,ue)!==-1?e:null;ne(t,n),t===null&&(w.set(`selectedIndex`,null),k.current=null)}if(t!==0&&w.state.multiple&&Array.isArray(B)){let e=e=>g(M.current,e,ue)!==-1,t=B.filter(t=>e(t));(t.length!==B.length||t.some(e=>!j(B,e,ue)))&&(ne(t,n),t.length===0&&(w.set(`selectedIndex`,null),k.current=null))}if(L&&G){w.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};Be(oe,e),Be(P.current,e)}}),ve=Z.useMemo(()=>({...K,side:pe,alignItemWithTriggerActive:G,setControlledAlignItemWithTrigger:W,scrollUpArrowRef:H,scrollDownArrowRef:fe}),[K,pe,G,W]);return(0,Q.jsx)(f,{elementsRef:T,labelsRef:te,onMapChange:J,children:(0,Q.jsxs)(Re.Provider,{value:ve,children:[z&&ie&&(0,Q.jsx)(A,{inert:ye(!L),cutout:ce}),_e]})})}),We={...q,...P},Ge=Z.forwardRef(function(e,t){let{render:n,className:r,style:a,finalFocus:o,...c}=e,{store:l,popupRef:u,onOpenChangeComplete:d,setOpen:f,valueRef:p,firstItemTextRef:h,selectedItemTextRef:ee,keyboardActiveRef:g,multiple:_,handleScrollArrowVisibility:x,scrollHandlerRef:S,listRef:w,highlightItemOnHover:T}=R(),{side:E,align:te,alignItemWithTriggerActive:O,isPositioned:k,setControlledAlignItemWithTrigger:A,scrollDownArrowRef:j,scrollUpArrowRef:N}=ze(),P=z(!0)!=null,ne=v(),re=M(),{nonce:L,disableStyleElements:ie}=Me(),B=D(l,s.id),V=D(l,s.open),oe=D(l,s.mounted),ce=D(l,s.popupProps),le=D(l,s.transitionStatus),de=D(l,s.triggerElement),H=D(l,s.positionerElement),U=D(l,s.listElement),W=Z.useRef(!1),G=Z.useRef(!1),K=Z.useRef({}),pe=ue(),me=I(e=>{if(!H||!u.current||!G.current)return;if(W.current||!O){x();return}let t=H.style.top===`0px`,n=H.style.bottom===`0px`;if(!t&&!n){x();return}let r=Je(H),i=Ye(H.getBoundingClientRect().height,`y`,r),a=fe(H),o=getComputedStyle(H),s=parseFloat(o.marginTop),c=parseFloat(o.marginBottom),l=Ke(getComputedStyle(u.current)),d=Math.min(a.documentElement.clientHeight-s-c,l),f=e.scrollTop,p=qe(e),m=0,h=null,ee=!1,g=!1,_=e=>{H.style.height=`${e}px`},v=(t,n)=>{let r=X(t,0,d-i);r>0&&_(i+r),e.scrollTop=n,d-(i+r)<=1&&(W.current=!0),x()},y=t?p-f:f,b=Math.min(i+y,d);if(m=b,y<=1)v(y,t?p:0);else{if(d-b>1?t?g=!0:h=0:(ee=!0,n&&f<p&&(h=f-(y-(i+y-d)))),m=Math.ceil(m),m!==0&&_(m),g||h!=null){let t=qe(e),n=g?t:X(h,0,t);Math.abs(e.scrollTop-n)>1&&(e.scrollTop=n)}(ee||m>=d-1)&&(W.current=!0),x()}});Z.useImperativeHandle(S,()=>me,[me]),_e({open:V,ref:u,onComplete(){V&&d?.(!0)}});let he={open:V,transitionStatus:le,side:E,align:te};F(()=>{H&&u.current&&!Object.keys(K.current).length&&(K.current={top:H.style.top||`0`,left:H.style.left||`0`,right:H.style.right,height:H.style.height,bottom:H.style.bottom,minHeight:H.style.minHeight,maxHeight:H.style.maxHeight,marginTop:H.style.marginTop,marginBottom:H.style.marginBottom})},[u,H]),F(()=>{V||O||(G.current=!1,W.current=!1,Be(H,K.current))},[V,O,H,u]),F(()=>{let e=u.current;if(!V||!de||!H||!e||O&&!k||l.state.transitionStatus===`ending`)return;if(!O){G.current=!0,pe.request(x),e.style.removeProperty(`--transform-origin`);return}let t=Ze(e);e.style.removeProperty(`--transform-origin`);try{let t=ee.current;t?.isConnected||(t=!s.hasSelectedValue(l.state)&&h.current?.isConnected?h.current:null);let n=p.current,r=getComputedStyle(H),a=getComputedStyle(e),o=fe(de),c=b(H),u=Je(de),d=$(de.getBoundingClientRect(),u),f=$(H.getBoundingClientRect(),u),m=d.height,g=U||e,_=g.scrollHeight,v=parseFloat(a.borderBottomWidth),y=parseFloat(r.marginTop)||10,S=parseFloat(r.marginBottom)||10,C=parseFloat(r.minHeight)||100,E=Ke(a),D=o.documentElement.clientHeight-y-S,te=o.documentElement.clientWidth,O=D-d.bottom+m,k,j=re===`rtl`?d.right-f.width:d.left,M=0;if(t&&n){let e=$(n.getBoundingClientRect(),u);k=$(t.getBoundingClientRect(),u),j=f.left+(re===`rtl`?e.right-k.right:e.left-k.left);let r=e.top-d.top+e.height/2;M=k.top-f.top+k.height/2-r}let N=O+M+S+v,P=Math.min(D,N),F=D-y-S,ne=N-P,I=te-5;H.style.left=`${X(j,5,I-f.width)}px`,H.style.height=`${P}px`,H.style.maxHeight=`auto`,H.style.marginTop=`${y}px`,H.style.marginBottom=`${S}px`,e.style.height=`100%`;let L=qe(g),R=ne>=L-1;R&&(P=Math.min(D,f.height)-(ne-L));let z=d.top<20||d.bottom>D-20||Math.ceil(P)+1<Math.min(_,C),ie=(c.visualViewport?.scale??1)!==1&&i;if(z||ie){G.current=!0,Be(H,K.current),A(!1);return}let B=Math.max(C,P);if(R){let e=Math.max(0,D-N);H.style.top=f.height>=F?`0`:`${e}px`,H.style.height=`${P}px`,g.scrollTop=qe(g)}else H.style.bottom=`0`,g.scrollTop=ne;if(k){let t=f.top,n=f.height,r=k.top+k.height/2,i=n>0?(r-t)/n*100:50,a=X(i,0,100);e.style.setProperty(`--transform-origin`,`50% ${a}%`)}(B===D||P>=E)&&(W.current=!0),x(),T&&l.state.selectedIndex===null&&l.state.activeIndex===null&&w.current[0]!=null&&l.set(`activeIndex`,0),G.current=!0}finally{t()}},[l,V,H,de,p,h,ee,u,x,O,A,pe,j,N,U,w,T,re,k]),Z.useEffect(()=>{if(!O||!H||!V)return;let e=b(H);function t(e){f(!1,se(ge,e))}return ae(e,`resize`,t)},[f,O,H,V]);let q={...U?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":_||void 0,id:`${B}-list`},onKeyDown(e){g.current=!0,P&&y.has(e.key)&&e.stopPropagation()},onMouseMove(){g.current=!1},onScroll(e){U||me(e.currentTarget)},...O&&{style:U?{height:`100%`}:Ve}},J=Se(`div`,e,{ref:[t,u],state:he,stateAttributesMapping:We,props:[ce,q,m(le),{className:!U&&O?Ae.className:void 0},c]});return(0,Q.jsxs)(Z.Fragment,{children:[!ie&&Ae.getElement(L),(0,Q.jsx)(C,{context:ne,modal:!1,disabled:!oe,returnFocus:o,restoreFocus:!0,children:J})]})});function Ke(e){let t=e.maxHeight||``;return t.endsWith(`px`)&&parseFloat(t)||1/0}function qe(e){return je(e.scrollHeight,e.clientHeight)}function Je(e){return O.getScale(e)}function Ye(e,t,n){return e/n[t]}function $(e,t){return oe({x:Ye(e.x,`x`,t),y:Ye(e.y,`y`,t),width:Ye(e.width,`x`,t),height:Ye(e.height,`y`,t)})}var Xe=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function Ze(e){let{style:t}=e,n={};for(let[e,r]of Xe)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of Xe){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var Qe=Z.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o,scrollHandlerRef:c}=R(),{alignItemWithTriggerActive:l}=ze(),u=D(o,s.hasScrollArrows),d=D(o,s.openMethod),f=D(o,s.multiple),p={id:`${D(o,s.id)}-list`,role:`listbox`,"aria-multiselectable":f||void 0,onScroll(e){c.current?.(e.currentTarget)},...l&&{style:Ve},className:u&&d!==`touch`?Ae.className:void 0},m=I(e=>{o.set(`listElement`,e)});return Se(`div`,e,{ref:[t,m],props:[p,a]})}),$e=Z.createContext(void 0);function et(){let e=Z.useContext($e);if(!e)throw Error(Y(57));return e}var tt=Z.memo(Z.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,label:o,disabled:c=!1,nativeButton:u=!1,...d}=e,f=Z.useRef(null),p=h({label:o,textRef:f,indexGuessBehavior:l.GuessFromOrder}),{store:m,itemProps:ee,setOpen:g,setValue:_,selectionRef:v,typingRef:y,valuesRef:b,multiple:x,selectedItemTextRef:S}=R(),C=D(m,s.isActive,p.index),T=D(m,s.isSelected,p.index,a),E=D(m,s.isSelectedByFocus,p.index),te=D(m,s.isItemEqualToValue),O=p.index,A=O!==-1,j=Z.useRef(null);F(()=>{if(!A)return;let e=b.current;return e[O]=a,()=>{delete e[O]}},[A,O,a,b]),F(()=>{if(!A)return;let e=m.state.value,t=e;x&&Array.isArray(e)&&e.length>0&&(t=e[e.length-1]),t!==void 0&&k(a,t,te)&&(m.set(`selectedIndex`,O),f.current&&(S.current=f.current))},[A,O,x,te,m,a,S]);let M=Z.useRef(null),N=Z.useRef(`mouse`),P=Z.useRef(!1),{getButtonProps:ne,buttonRef:I}=re({disabled:c,focusableWhenDisabled:!0,native:u,composite:!0}),L={disabled:c,selected:T,highlighted:C};function z(e){let t=m.state.value;if(x){let n=Array.isArray(t)?t:[],r=T?w(n,a,te):[...n,a];_(r,se(U,e))}else _(a,se(U,e)),g(!1,se(U,e))}function ie(){v.current.dragY=0}let B={role:`option`,"aria-selected":T,tabIndex:C?0:-1,onKeyDown(e){M.current=e.key,m.set(`activeIndex`,O),e.key===` `&&y.current&&e.preventDefault()},onClick(e){let t=e.type===`click`&&N.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&J(e.nativeEvent)&&(n!==void 0||C),i=t&&!r&&!P.current;P.current=!1,e.type===`keydown`&&M.current===null||c||e.type===`keydown`&&M.current===` `&&y.current||i||(M.current=null,z(e.nativeEvent))},onPointerEnter(e){N.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=v.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){N.current=e.pointerType,P.current=!0,ie()},onMouseUp(){if(ie(),c||N.current===`touch`||P.current)return;let e=!v.current.allowSelectedMouseUp&&T,t=!v.current.allowUnselectedMouseUp&&!T;e||t||(P.current=!0,j.current?.click(),P.current=!1)}},ae=Se(`div`,e,{ref:[I,t,p.ref,j],state:L,props:[ee,B,d,ne]}),V=Z.useMemo(()=>({selected:T,index:O,textRef:f,selectedByFocus:E,hasRegistered:A}),[T,O,f,E,A]);return(0,Q.jsx)($e.Provider,{value:V,children:ae})})),nt=Z.memo(Z.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i,hasRegistered:a}=et(),{firstItemTextRef:o,selectedItemTextRef:s}=R(),{render:c,className:l,style:u,...d}=e,f=Z.useCallback(e=>{e&&(a&&n===0&&(o.current=e),a&&i&&(s.current=e))},[o,s,n,i,a]);return Se(`div`,e,{ref:[f,t,r],props:d})})),rt=Z.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:o,keepMounted:c=!1,...l}=e,u=o===`up`,{store:d,popupRef:f,listRef:p,handleScrollArrowVisibility:m,scrollArrowsMountedCountRef:h}=R(),{side:ee,scrollDownArrowRef:g,scrollUpArrowRef:_}=ze(),v=u?s.scrollUpArrowVisible:s.scrollDownArrowVisible,y=D(d,v),b=D(d,s.openMethod),x=y&&b!==`touch`,S=N(),C=u?_:g,{transitionStatus:w,setMounted:T}=a(x);F(()=>(h.current+=1,d.state.hasScrollArrows||d.set(`hasScrollArrows`,!0),()=>{h.current=Math.max(0,h.current-1),h.current===0&&d.state.hasScrollArrows&&d.set(`hasScrollArrows`,!1)}),[d,h]),_e({open:x,ref:C,onComplete(){x||T(!1)}});let E=Se(`div`,e,{ref:[t,C],state:{direction:o,visible:x,side:ee,transitionStatus:w},props:[{"aria-hidden":!0,children:u?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||S.isStarted())return;d.set(`activeIndex`,null);function t(){let e=d.state.listElement??f.current;if(!e)return;d.set(`activeIndex`,null),m();let n=je(e.scrollHeight,e.clientHeight),r=ke(e.scrollTop,n),i=r===(u?0:n),a=p.current;if(r!==e.scrollTop&&(e.scrollTop=r),a.length===0&&d.set(u?`scrollUpArrowVisible`:`scrollDownArrowVisible`,!i),i)S.clear();else{if(a.length>0){let t=C.current?.offsetHeight||0;e.scrollTop=it(a,u,r,e.clientHeight,t,n)}S.start(40,t)}}S.start(40,t)},onMouseLeave(){S.clear()}},l]});return x||c?E:null});function it(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n<e.length;n+=1){let i=e[n];if(i&&i.offsetTop>=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return o<t&&s?ke(s.offsetTop-i,a):0}let o=e.length-1,s=n+r-i+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?ke(l.offsetTop+l.offsetHeight-r+i,a):a}var at=Z.forwardRef(function(e,t){return(0,Q.jsx)(rt,{...e,ref:t,direction:`down`})}),ot=Z.forwardRef(function(e,t){return(0,Q.jsx)(rt,{...e,ref:t,direction:`up`})});export{Qe as a,Le as c,tt as i,Fe as l,at as n,Ge as o,nt as r,Ue as s,ot as t,Ne as u};
2
+ //# sourceMappingURL=SelectScrollUpArrow-BCdPJCNh.js.map
@@ -0,0 +1,2 @@
1
+ import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{Ft as i,Jo as a,Ut as o,Wt as s,Xt as c,mr as l,t as u}from"./utils-CtzgibkN.js";import{Hc as d,o as f}from"./src-aYUfWMsw.js";import{a as p,c as m,o as h,s as g,t as _}from"./select--26O8gr7.js";import{f as v,t as y}from"./server-DKB_3xTN.js";import{n as b}from"./query-DmYgeaGK.js";import{t as x}from"./use-atom-command-Bfi4daMj.js";import{i as S}from"./usageFormat-DvpnUmwI.js";import{t as C}from"./input-BwujRX3Y.js";import{F as w,V as T,a as E,n as D,s as O}from"./settingsLayout-EWRSNE9F.js";import{t as k}from"./ProviderModelPicker-446NiacH.js";import{i as A}from"./selfImproveFindings-CQHbA_SP.js";var j=n(),M={off:`Off`,shadow:`Record decisions only`,dispatch:`Review turns`},N={off:`Finished turns are not checked.`,shadow:`Decisions judges finished turns; nothing is reviewed.`,dispatch:`Reviewers suggest memories from turns Decisions judges worth a review.`};function P(e){return e.checkedTurns===0||e.lastCheckedAt===null?null:`${`${e.checkedTurns} ${e.checkedTurns===1?`turn`:`turns`} checked`} · ${e.reviewTurns} worth a review · last ${S(e.lastCheckedAt)}`}function ee(e){return e.mode===`off`?null:e.hasDecisionKey?e.mode===`dispatch`&&e.reviewerCount===0?`Choose a reviewer below. Without one, no review runs.`:null:`Needs an OpenRouter key above. No turn is judged until one is saved.`}function te(e,t,n){if(n===null)return e.filter((e,n)=>n!==t);let r=e[t],i=r&&r.instanceId===n.instanceId&&r.model===n.model?r:{instanceId:n.instanceId,model:n.model};return t<e.length?e.map((e,n)=>n===t?i:e):[...e,i]}var F=e(t(),1),I=e(r(),1),ne=d(f);function L(e){let t=(0,j.c)(8),n=!e.open,r=e.open?`grid-rows-[1fr] opacity-100`:`grid-rows-[0fr] opacity-0`,i;t[0]===r?i=t[1]:(i=u(`grid transition-[grid-template-rows,opacity] duration-200 ease-out motion-reduce:transition-opacity`,r),t[0]=r,t[1]=i);let a;t[2]===e.children?a=t[3]:(a=(0,I.jsx)(`div`,{className:`min-h-0 overflow-hidden`,children:e.children}),t[2]=e.children,t[3]=a);let o;return t[4]!==n||t[5]!==i||t[6]!==a?(o=(0,I.jsx)(`div`,{inert:n,className:i,children:a}),t[4]=n,t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function R(e){let[t,n]=(0,F.useState)(e);return e!==null&&e!==t&&n(e),t}function z(e){let t=(0,j.c)(6),n=R(e.text),r=e.text!==null,i=e.text?`status`:void 0,a;t[0]!==n||t[1]!==i?(a=(0,I.jsx)(`p`,{role:i,className:`pt-0.5 text-xs text-warning`,children:n}),t[0]=n,t[1]=i,t[2]=a):a=t[2];let o;return t[3]!==r||t[4]!==a?(o=(0,I.jsx)(L,{open:r,children:a}),t[3]=r,t[4]=a,t[5]=o):o=t[5],o}function B(){let e=(0,j.c)(3),{scope:t,environment:n}=T(),r=t.environmentIds.length===1?n?.environmentId??null:null,i=n?.connection.phase===`connected`&&n.serverConfig!==null,a;return e[0]!==i||e[1]!==r?(a=(0,I.jsx)(O,{title:`Self-improvement`,children:r&&i?(0,I.jsx)(V,{environmentId:r}):(0,I.jsx)(E,{title:`Review finished turns`,description:`Pick a single connected environment to set up self-improvement for it.`})}),e[0]=i,e[1]=r,e[2]=a):a=e[2],a}function V(e){let t=(0,j.c)(57),{environmentId:n}=e,{environment:r,target:u}=T(),d=w(),p;t[0]===n?p=t[1]:(p=v.selfImproveSettingsLive({environmentId:n,input:{}}),t[0]=n,t[1]=p);let S=b(p),C;t[2]===n?C=t[3]:(C=v.updateSelfImproveSettings.permissionAtom(n),t[2]=n,t[3]=C);let O=a(C),A=x(v.updateSelfImproveSettings),[L,R]=(0,F.useState)(!1),B=S.data,V=r?.serverConfig?.providers??y,U,W,G,K;if(t[4]!==O||t[5]!==n||t[6]!==L||t[7]!==B||t[8]!==S.error||t[9]!==d||t[10]!==V||t[11]!==u?.projectId||t[12]!==A){K=Symbol.for(`react.early_return_sentinel`);bb0:{let e=V.filter(ae),r=c(o(s(e),d,u?.projectId??null)),a=r.find(ie);if(!B){let e=S.error?`Couldn't load self-improvement settings.`:`Loading…`,n;t[17]===e?n=t[18]:(n=(0,I.jsx)(E,{title:`Review finished turns`,status:e}),t[17]=e,t[18]=n),K=n;break bb0}let p=!O||L,v;t[19]!==n||t[20]!==A?(v=async e=>{R(!0),await A({environmentId:n,input:e}),R(!1)},t[19]=n,t[20]=A,t[21]=v):v=t[21];let y=v,b=B.mode===`dispatch`,x=B.mode,C=!!d.decisionOpenRouterKey,w;t[22]!==B.mode||t[23]!==B.reviewers.length||t[24]!==C?(w=ee({mode:x,hasDecisionKey:C,reviewerCount:B.reviewers.length}),t[22]=B.mode,t[23]=B.reviewers.length,t[24]=C,t[25]=w):w=t[25];let T=w,j=t=>{let o=B.reviewers[t],s=t===0||B.reviewers.length>0,c=o?r.find(e=>e.instanceId===o.instanceId):void 0,u=o&&(!c||!c.enabled||!c.isAvailable)?`${c?.displayName??o.instanceId} is unavailable, so this reviewer is skipped.`:null,f=t===0?`First reviewer`:`Second reviewer`;return(0,I.jsx)(E,{title:f,"aria-disabled":!b||!s||void 0,className:`transition-opacity duration-200 ease-out motion-reduce:transition-none`,status:(0,I.jsx)(z,{text:b?u:null}),control:o||a?(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-1.5`,children:[(0,I.jsx)(k,{environmentId:n,activeInstanceId:o?.instanceId??a.instanceId,model:o?.model??``,lockedProvider:null,instanceEntries:r,modelOptionsByInstance:i(d,e,o?.instanceId??null,o?.model??null),triggerClassName:D,triggerAriaLabel:f,...o?{}:{triggerLabel:`Choose model`},disabled:p||!b||!s,onInstanceModelChange:(e,n)=>void y({mode:B.mode,reviewers:te(B.reviewers,t,{instanceId:e,model:n})})}),o?(0,I.jsx)(l,{size:`sm`,variant:`outline`,disabled:p||!b,onClick:()=>void y({mode:B.mode,reviewers:te(B.reviewers,t,null)}),children:`Remove`}):null]}):(0,I.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`No reviewer models available.`})},f)},F=N[B.mode],H;t[26]===B?H=t[27]:(H=P(B),t[26]=B,t[27]=H);let q;t[28]===T?q=t[29]:(q=(0,I.jsx)(z,{text:T}),t[28]=T,t[29]=q);let J;t[30]!==H||t[31]!==q?(J=(0,I.jsxs)(I.Fragment,{children:[H,q]}),t[30]=H,t[31]=q,t[32]=J):J=t[32];let Y;t[33]!==B.mode||t[34]!==B.reviewers||t[35]!==y?(Y=e=>{ne(e)&&e!==B.mode&&y({mode:e,reviewers:B.reviewers})},t[33]=B.mode,t[34]=B.reviewers,t[35]=y,t[36]=Y):Y=t[36];let X=M[B.mode],Z;t[37]===X?Z=t[38]:(Z=(0,I.jsx)(g,{"aria-label":`Review finished turns`,children:(0,I.jsx)(m,{children:X})}),t[37]=X,t[38]=Z);let Q;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(Q=(0,I.jsx)(h,{children:f.literals.map(re)}),t[39]=Q):Q=t[39];let $;t[40]!==p||t[41]!==B.mode||t[42]!==Y||t[43]!==Z?($=(0,I.jsxs)(_,{value:B.mode,disabled:p,onValueChange:Y,children:[Z,Q]}),t[40]=p,t[41]=B.mode,t[42]=Y,t[43]=Z,t[44]=$):$=t[44],t[45]!==F||t[46]!==J||t[47]!==$?(U=(0,I.jsx)(E,{id:`self-improve-mode`,title:`Review finished turns`,description:F,status:J,control:$}),t[45]=F,t[46]=J,t[47]=$,t[48]=U):U=t[48],W=j(0),G=j(1)}t[4]=O,t[5]=n,t[6]=L,t[7]=B,t[8]=S.error,t[9]=d,t[10]=V,t[11]=u?.projectId,t[12]=A,t[13]=U,t[14]=W,t[15]=G,t[16]=K}else U=t[13],W=t[14],G=t[15],K=t[16];if(K!==Symbol.for(`react.early_return_sentinel`))return K;let q;t[49]!==n||t[50]!==B.memoryMirror?(q=(0,I.jsx)(H,{environmentId:n,mirror:B.memoryMirror}),t[49]=n,t[50]=B.memoryMirror,t[51]=q):q=t[51];let J;return t[52]!==U||t[53]!==W||t[54]!==G||t[55]!==q?(J=(0,I.jsxs)(I.Fragment,{children:[U,W,G,q]}),t[52]=U,t[53]=W,t[54]=G,t[55]=q,t[56]=J):J=t[56],J}function re(e){return(0,I.jsx)(p,{value:e,children:M[e]},e)}function ie(e){return e.enabled&&e.isAvailable}function ae(e){return e.supportsTextGeneration!==!1}function H(e){let t=(0,j.c)(37),[n,r]=(0,F.useState)(``),[i,o]=(0,F.useState)(!1),[s,c]=(0,F.useState)(null),u;t[0]===e.environmentId?u=t[1]:(u=v.setSelfImproveMemoryMirror.permissionAtom(e.environmentId),t[0]=e.environmentId,t[1]=u);let d=a(u),f;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(f={reportFailure:!1},t[2]=f):f=t[2];let p=x(v.setSelfImproveMemoryMirror,f),m=!d||i,h;t[3]!==e.environmentId||t[4]!==p?(h=async t=>{o(!0);let n=A(await p({environmentId:e.environmentId,input:{memoryMirror:t}}),`Couldn't set the mirror.`);c(n.ok?null:n.message),n.ok&&r(``),o(!1)},t[3]=e.environmentId,t[4]=p,t[5]=h):h=t[5];let g=h,_=e.mirror??`Not mirrored`,y;t[6]===s?y=t[7]:(y=(0,I.jsx)(z,{text:s}),t[6]=s,t[7]=y);let b;t[8]!==_||t[9]!==y?(b=(0,I.jsxs)(I.Fragment,{children:[_,y]}),t[8]=_,t[9]=y,t[10]=b):b=t[10];let S;t[11]!==m||t[12]!==g||t[13]!==n?(S=e=>{e.preventDefault(),n.trim()&&!m&&g(n.trim())},t[11]=m,t[12]=g,t[13]=n,t[14]=S):S=t[14];let w=e.mirror?`Replace repository path`:`/path/to/repository`,T;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(T=e=>r(e.target.value),t[15]=T):T=t[15];let D;t[16]!==m||t[17]!==n||t[18]!==w?(D=(0,I.jsx)(`div`,{className:`min-w-40 flex-1`,children:(0,I.jsx)(C,{"aria-label":`Mirror saved memory`,autoComplete:`off`,value:n,disabled:m,placeholder:w,onChange:T})}),t[16]=m,t[17]=n,t[18]=w,t[19]=D):D=t[19];let O;t[20]!==m||t[21]!==n?(O=m||!n.trim(),t[20]=m,t[21]=n,t[22]=O):O=t[22];let k;t[23]===O?k=t[24]:(k=(0,I.jsx)(l,{type:`submit`,size:`sm`,disabled:O,children:`Save`}),t[23]=O,t[24]=k);let M;t[25]!==m||t[26]!==g||t[27]!==e.mirror?(M=e.mirror?(0,I.jsx)(l,{type:`button`,size:`sm`,variant:`outline`,disabled:m,onClick:()=>void g(null),children:`Remove`}):null,t[25]=m,t[26]=g,t[27]=e.mirror,t[28]=M):M=t[28];let N;t[29]!==k||t[30]!==M||t[31]!==S||t[32]!==D?(N=(0,I.jsxs)(`form`,{className:`flex max-w-lg flex-wrap items-center gap-2 pb-2`,onSubmit:S,children:[D,k,M]}),t[29]=k,t[30]=M,t[31]=S,t[32]=D,t[33]=N):N=t[33];let P;return t[34]!==N||t[35]!==b?(P=(0,I.jsx)(E,{title:`Mirror saved memory`,description:`A git checkout. Each save copies the changed files into its memory folder, commits them on the default branch, and pushes.`,status:b,children:N}),t[34]=N,t[35]=b,t[36]=P):P=t[36],P}export{B as n,z as r,L as t};
2
+ //# sourceMappingURL=SelfImproveSettingsSection-DrWeWHZ3.js.map