@lobu/runtime-server 24.7.0 → 24.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (275) hide show
  1. package/dist/catalogs/connectors.json +282 -322
  2. package/dist/catalogs/skills.json +1 -1
  3. package/dist/component.json +1 -1
  4. package/dist/connectors/README.md +6 -2
  5. package/dist/connectors/github.ts +16 -3
  6. package/dist/connectors/imessage.ts +953 -0
  7. package/dist/connectors/linkedin.ts +20 -377
  8. package/dist/connectors/market_quotes.ts +388 -91
  9. package/dist/connectors/postgres.ts +21 -14
  10. package/dist/connectors/x-dm-adapter.js +55 -21
  11. package/dist/connectors/x.ts +1 -1
  12. package/dist/db/migrations/20261109010000_workspace_navigation.sql +14 -0
  13. package/dist/db/migrations/20261110010000_view_resources.sql +11 -0
  14. package/dist/dependencies.bun.lock +135 -103
  15. package/dist/embeddings-server.mjs +14 -2
  16. package/dist/owletto/dist/assets/_-B2C9B2RM.js +2 -0
  17. package/dist/owletto/dist/assets/_-CjyiGzwB.js +3 -0
  18. package/dist/owletto/dist/assets/_agentId-DKHXGvS2.js +2 -0
  19. package/dist/owletto/dist/assets/_agentId-bna2tPsW.js +2 -0
  20. package/dist/owletto/dist/assets/_automationId-CowRFD4E.js +2 -0
  21. package/dist/owletto/dist/assets/_connectorKey._connectionId-dE6im18z.js +2 -0
  22. package/dist/owletto/dist/assets/_connectorKey.index-DqwSv8Zs.js +2 -0
  23. package/dist/owletto/dist/assets/_conversationId-zcs-S3dY.js +2 -0
  24. package/dist/owletto/dist/assets/_eventId-BVOVizs4.js +2 -0
  25. package/dist/owletto/dist/assets/_owner-DsvIC94q.js +3 -0
  26. package/dist/owletto/dist/assets/_shape-CWjpzcvv.js +2 -0
  27. package/dist/owletto/dist/assets/_slug-DuCxYsJk.js +2 -0
  28. package/dist/owletto/dist/assets/_viewKey-BqVeHB6Z.js +2 -0
  29. package/dist/owletto/dist/assets/_viewKey-DzyOCG5U.js +2 -0
  30. package/dist/owletto/dist/assets/{accept-invitation-CX7Egv-p.js → accept-invitation-k1u3zBcn.js} +2 -2
  31. package/dist/owletto/dist/assets/activity-route-view-jTBMW7a9.js +2 -0
  32. package/dist/owletto/dist/assets/agent-connect-pages-D3mVM_q4.js +4 -0
  33. package/dist/owletto/dist/assets/agent-editor-form-Bnc_q5WD.js +2 -0
  34. package/dist/owletto/dist/assets/{agent-loading-shells-DHvKiEUB.js → agent-loading-shells-xteN-pyK.js} +2 -2
  35. package/dist/owletto/dist/assets/agent-permissions-matrix-C_ayr0pd.js +2 -0
  36. package/dist/owletto/dist/assets/{agent-skill-context-DF5q0Dfr.js → agent-skill-context-r0O0BVOu.js} +2 -2
  37. package/dist/owletto/dist/assets/{agent-subpage-shell-Pi5cECga.js → agent-subpage-shell-C2KpYdu3.js} +2 -2
  38. package/dist/owletto/dist/assets/{agent-thread-B1ZepGZc.js → agent-thread-Bv_chdPy.js} +4 -4
  39. package/dist/owletto/dist/assets/agent-thread-storage-Bx2-WBHQ.js +2 -0
  40. package/dist/owletto/dist/assets/app._appId-BUcNaSMS.js +2 -0
  41. package/dist/owletto/dist/assets/assist-composer-B1LykXpD.js +2 -0
  42. package/dist/owletto/dist/assets/automation-run-now-CjkJIkaZ.js +2 -0
  43. package/dist/owletto/dist/assets/{callback-Ckrxv0eo.js → callback-kSLa4n5s.js} +2 -2
  44. package/dist/owletto/dist/assets/{card-DT9mSjSp.js → card-C01y1O-W.js} +2 -2
  45. package/dist/owletto/dist/assets/{claim-Bzby28tT.js → claim-Dnux9Lqf.js} +2 -2
  46. package/dist/owletto/dist/assets/{client-activity-scopes-DoIErdUy.js → client-activity-scopes-BBIq16tG.js} +2 -2
  47. package/dist/owletto/dist/assets/{client-rows-BbVQy5Ti.js → client-rows-DGh1O-Fu.js} +2 -2
  48. package/dist/owletto/dist/assets/clients-BCvjAJDT.js +2 -0
  49. package/dist/owletto/dist/assets/code-editor-BdRMYojw.js +26 -0
  50. package/dist/owletto/dist/assets/connect-DZeFSGIH.js +2 -0
  51. package/dist/owletto/dist/assets/connect-menu-D4w-JhJW.js +2 -0
  52. package/dist/owletto/dist/assets/connect._clientId-IZEMQJ64.js +2 -0
  53. package/dist/owletto/dist/assets/connected._clientId-BsDzltNz.js +2 -0
  54. package/dist/owletto/dist/assets/{connection-BOaMa324.js → connection-C7glVpPE.js} +2 -2
  55. package/dist/owletto/dist/assets/connection-feed-detail-CJju0qiw.js +2 -0
  56. package/dist/owletto/dist/assets/connector-page-shell-BeuyjiB2.js +2 -0
  57. package/dist/owletto/dist/assets/connector-provenance-B2C2cjBg.js +2 -0
  58. package/dist/owletto/dist/assets/{connectors-D5F5rHxX.js → connectors-DSQ5AWPf.js} +2 -2
  59. package/dist/owletto/dist/assets/consent-B6Aw_89N.js +2 -0
  60. package/dist/owletto/dist/assets/copy-button-BhXeXLIm.js +2 -0
  61. package/dist/owletto/dist/assets/{core.esm-BIE97rfo.js → core.esm-CJUp2aNZ.js} +3 -3
  62. package/dist/owletto/dist/assets/create-CWcza8NT.js +2 -0
  63. package/dist/owletto/dist/assets/{create-BPxsKwk7.js → create-DUlRsFNn.js} +2 -2
  64. package/dist/owletto/dist/assets/{create-automation-form-B12yTrmj.js → create-automation-form-D141prEG.js} +3 -3
  65. package/dist/owletto/dist/assets/create-bGOYifof.js +2 -0
  66. package/dist/owletto/dist/assets/create._connectorKey-Ds4tpwHP.js +2 -0
  67. package/dist/owletto/dist/assets/{custom-guardrail-edits-B9plaLBN.js → custom-guardrail-edits-DuQ28xv3.js} +2 -2
  68. package/dist/owletto/dist/assets/definition-comparison-BUDNuAN_.js +2 -0
  69. package/dist/owletto/dist/assets/{detail-page-skeleton-I5_7FkKx.js → detail-page-skeleton-BRHaq5Sj.js} +2 -2
  70. package/dist/owletto/dist/assets/{device-CadaiNF4.js → device-D3fzoIrM.js} +2 -2
  71. package/dist/owletto/dist/assets/device-pin-tombstone-BIM-ziCH.js +2 -0
  72. package/dist/owletto/dist/assets/device._deviceId-BnPqTgK1.js +2 -0
  73. package/dist/owletto/dist/assets/dynamic-schema-form-OkIZImgp.js +2 -0
  74. package/dist/owletto/dist/assets/entity-options-CpeX7iiX.js +2 -0
  75. package/dist/owletto/dist/assets/entity-page-Cjc8oXA2.js +2 -0
  76. package/dist/owletto/dist/assets/entity-pages-18xSANrS.js +2 -0
  77. package/dist/owletto/dist/assets/entity-schema-graph-uwZ-P0t8.js +2 -0
  78. package/dist/owletto/dist/assets/entity-type-page-MgZ7_0oh.js +2 -0
  79. package/dist/owletto/dist/assets/event-detail-D6AH6a2C.js +2 -0
  80. package/dist/owletto/dist/assets/event-kind-options-fHAIXu24.js +2 -0
  81. package/dist/owletto/dist/assets/events-feed-BI7wNRUY.js +2 -0
  82. package/dist/owletto/dist/assets/filter-editors-DDTwyYt0.js +3 -0
  83. package/dist/owletto/dist/assets/{full-page-spinner-CCU4PkRv.js → full-page-spinner-DWo519BU.js} +2 -2
  84. package/dist/owletto/dist/assets/index-9tTjJo_J.css +1 -0
  85. package/dist/owletto/dist/assets/{index-pmr1WUoG.js → index-BW7IFKXC.js} +2 -2
  86. package/dist/owletto/dist/assets/index-BYcFrinP.js +2 -0
  87. package/dist/owletto/dist/assets/index-BhJsTy-C.js +2 -0
  88. package/dist/owletto/dist/assets/index-CEcsgXDj.js +2 -0
  89. package/dist/owletto/dist/assets/index-CPscKk2u.js +2 -0
  90. package/dist/owletto/dist/assets/{index-B72KYdN1.js → index-Cd8jMsz8.js} +2 -2
  91. package/dist/owletto/dist/assets/index-CdDNNAx2.js +7906 -0
  92. package/dist/owletto/dist/assets/index-CfJ2-EpK.js +2 -0
  93. package/dist/owletto/dist/assets/index-D1UCJQl1.js +2 -0
  94. package/dist/owletto/dist/assets/index-D5DM4g2w.js +2 -0
  95. package/dist/owletto/dist/assets/index-DmqnKGqW.js +2 -0
  96. package/dist/owletto/dist/assets/index-DznAbTOF.js +2 -0
  97. package/dist/owletto/dist/assets/json-diff-C-WQqyIf.js +4 -0
  98. package/dist/owletto/dist/assets/{list-skeleton-BAqT0vxo.js → list-skeleton-0B1bTrAK.js} +2 -2
  99. package/dist/owletto/dist/assets/{login-D5bIjMtf.js → login-CH7P2AyR.js} +2 -2
  100. package/dist/owletto/dist/assets/{logout-JYZvxz8v.js → logout-D474YsYQ.js} +2 -2
  101. package/dist/owletto/dist/assets/member-scope-gate-CH_0jHiM.js +2 -0
  102. package/dist/owletto/dist/assets/memory-browse-page-Ba4aYavw.js +74 -0
  103. package/dist/owletto/dist/assets/model-selector-XYmk7Iru.js +2 -0
  104. package/dist/owletto/dist/assets/needs-you-list-Bd4iiiqm.js +2 -0
  105. package/dist/owletto/dist/assets/new-BOsrRqp8.js +2 -0
  106. package/dist/owletto/dist/assets/new-CJ6TF3Vc.js +2 -0
  107. package/dist/owletto/dist/assets/{new-B-Jd-vBl.js → new-DGPOjak2.js} +2 -2
  108. package/dist/owletto/dist/assets/new-Q0XqiZq2.js +2 -0
  109. package/dist/owletto/dist/assets/organization-hD_Z6TSd.js +2 -0
  110. package/dist/owletto/dist/assets/peek-pane-content-Cc8YX1oy.js +2 -0
  111. package/dist/owletto/dist/assets/{pending-seed-CoFPQ835.js → pending-seed-D7-ld7as.js} +2 -2
  112. package/dist/owletto/dist/assets/proposal-review-shell-BWRJidwb.js +2 -0
  113. package/dist/owletto/dist/assets/public-shell-ready-CRyAZATw.js +2 -0
  114. package/dist/owletto/dist/assets/record-activity-9ux6SfCd.js +2 -0
  115. package/dist/owletto/dist/assets/{record-session-Bpx4_LGk.js → record-session-ClKBr1_C.js} +2 -2
  116. package/dist/owletto/dist/assets/{renderer-CgaQKMoG.js → renderer-DZ0w2k2r.js} +2 -2
  117. package/dist/owletto/dist/assets/{reset-password-C-4Jnuqk.js → reset-password-D2RfrEVZ.js} +2 -2
  118. package/dist/owletto/dist/assets/run-initiator-B8IRlRd-.js +2 -0
  119. package/dist/owletto/dist/assets/runs-CuC7WMtd.js +2 -0
  120. package/dist/owletto/dist/assets/runs-list-8gUPWjP4.js +2 -0
  121. package/dist/owletto/dist/assets/{schema-value-BUgC0Ro8.js → schema-value-k19Ata7u.js} +3 -3
  122. package/dist/owletto/dist/assets/scoped-feed-bar-L7h-Ca4u.js +2 -0
  123. package/dist/owletto/dist/assets/{settings-DYYvrrZ4.js → settings-BZqntV3E.js} +2 -2
  124. package/dist/owletto/dist/assets/source-record-panels-C4UItfdk.js +2 -0
  125. package/dist/owletto/dist/assets/{status-variants-DT61YfsU.js → status-variants-BR_iGWN5.js} +2 -2
  126. package/dist/owletto/dist/assets/subDays-hOwerOLo.js +2 -0
  127. package/dist/owletto/dist/assets/{table-B6yimlsZ.js → table-C3DMoL4K.js} +2 -2
  128. package/dist/owletto/dist/assets/use-automations-CdtiVLCv.js +2 -0
  129. package/dist/owletto/dist/assets/use-login-redirect-CYlVkAhE.js +2 -0
  130. package/dist/owletto/dist/assets/use-mention-search-CtbixPEE.js +91 -0
  131. package/dist/owletto/dist/assets/view-param-filters-BdN8OU35.js +2 -0
  132. package/dist/owletto/dist/assets/{views-access-required-BVtMfgLh.js → views-access-required-CvIIxdS_.js} +2 -2
  133. package/dist/owletto/dist/index.html +19 -12
  134. package/dist/server-main.bundle.mjs +4518 -2567
  135. package/npm-shrinkwrap.json +644 -551
  136. package/package.json +4 -2
  137. package/vendor/connector-sdk/dist/connector-types.d.ts +23 -2
  138. package/vendor/connector-sdk/package.json +1 -1
  139. package/vendor/core/dist/classify-error.d.ts +3 -4
  140. package/vendor/core/dist/classify-error.js +8 -8
  141. package/vendor/core/dist/connector-query-errors.d.ts +6 -0
  142. package/vendor/core/dist/connector-query-errors.js +4 -0
  143. package/vendor/core/dist/contracts/tools/collection-presentation.d.ts +17 -1
  144. package/vendor/core/dist/contracts/tools/collection-presentation.js +27 -3
  145. package/vendor/core/dist/contracts/tools/manage-automations.d.ts +39 -0
  146. package/vendor/core/dist/contracts/tools/manage-automations.js +11 -1
  147. package/vendor/core/dist/contracts/tools/manage-entity-schema.js +1 -1
  148. package/vendor/core/dist/contracts/tools/manage-entity.d.ts +2 -0
  149. package/vendor/core/dist/contracts/tools/manage-entity.js +7 -0
  150. package/vendor/core/dist/contracts/tools/manage-feeds.d.ts +2 -0
  151. package/vendor/core/dist/contracts/tools/manage-feeds.js +3 -0
  152. package/vendor/core/dist/contracts/tools/manage-views.d.ts +249 -7
  153. package/vendor/core/dist/contracts/tools/manage-views.js +83 -21
  154. package/vendor/core/dist/contracts/tools/navigation.d.ts +248 -0
  155. package/vendor/core/dist/contracts/tools/navigation.js +284 -0
  156. package/vendor/core/dist/contracts/tools/view-attach.d.ts +7 -0
  157. package/vendor/core/dist/contracts/tools/view-attach.js +15 -0
  158. package/vendor/core/dist/contracts/tools/view-content-hash.d.ts +4 -1
  159. package/vendor/core/dist/contracts/tools/view-content-hash.js +4 -2
  160. package/vendor/core/dist/contracts/tools/view-definition.d.ts +2 -0
  161. package/vendor/core/dist/contracts/tools/view-definition.js +52 -0
  162. package/vendor/core/dist/contracts/tools/view-host.d.ts +68 -0
  163. package/vendor/core/dist/contracts/tools/view-host.js +30 -1
  164. package/vendor/core/dist/contracts/tools/view-scope.d.ts +31 -0
  165. package/vendor/core/dist/contracts/tools/view-scope.js +45 -0
  166. package/vendor/core/dist/error-report.js +1 -0
  167. package/vendor/core/dist/errors.d.ts +17 -24
  168. package/vendor/core/dist/errors.js +17 -24
  169. package/vendor/core/dist/types.d.ts +0 -6
  170. package/vendor/core/package.json +11 -1
  171. package/vendor/views/dist/api.d.ts +30 -5
  172. package/vendor/views/dist/api.js +22 -8
  173. package/vendor/views/dist/bridge.d.ts +17 -0
  174. package/vendor/views/dist/bridge.js +49 -1
  175. package/vendor/views/dist/components.d.ts +27 -5
  176. package/vendor/views/dist/components.js +57 -7
  177. package/vendor/views/dist/embed.d.ts +98 -0
  178. package/vendor/views/dist/embed.js +418 -0
  179. package/vendor/views/dist/index.d.ts +3 -1
  180. package/vendor/views/dist/index.js +1 -0
  181. package/vendor/views/package.json +1 -1
  182. package/dist/connectors/linkedin-takeout.ts +0 -577
  183. package/dist/connectors/takeout-utils.ts +0 -240
  184. package/dist/owletto/dist/assets/_-CZgmjLR9.js +0 -2
  185. package/dist/owletto/dist/assets/_-Cm5OgtYD.js +0 -3
  186. package/dist/owletto/dist/assets/_-DtqBFgK5.js +0 -2
  187. package/dist/owletto/dist/assets/_agentId-Cci6NFc1.js +0 -2
  188. package/dist/owletto/dist/assets/_agentId-GhWTlPO2.js +0 -2
  189. package/dist/owletto/dist/assets/_automationId-KUlxSTK2.js +0 -2
  190. package/dist/owletto/dist/assets/_connectorKey._connectionId-Zpy7Hvml.js +0 -2
  191. package/dist/owletto/dist/assets/_connectorKey.index-CYDRp9UX.js +0 -2
  192. package/dist/owletto/dist/assets/_conversationId-NNqDdije.js +0 -2
  193. package/dist/owletto/dist/assets/_eventId-0BSX6VHj.js +0 -2
  194. package/dist/owletto/dist/assets/_owner-C-CD22NB.js +0 -3
  195. package/dist/owletto/dist/assets/_shape-CvXp4omb.js +0 -2
  196. package/dist/owletto/dist/assets/_slug-DgK7zpKA.js +0 -2
  197. package/dist/owletto/dist/assets/_viewKey-cH54P0zY.js +0 -2
  198. package/dist/owletto/dist/assets/_viewKey-m0B5j7L9.js +0 -2
  199. package/dist/owletto/dist/assets/activity-link-rXNpmppV.js +0 -2
  200. package/dist/owletto/dist/assets/activity-route-view-B0m7_g9q.js +0 -2
  201. package/dist/owletto/dist/assets/agent-client-setup-list-BmD3-_Ox.js +0 -4
  202. package/dist/owletto/dist/assets/agent-connect-pages-BtOTCsTU.js +0 -2
  203. package/dist/owletto/dist/assets/agent-editor-form-CirqCpcM.js +0 -2
  204. package/dist/owletto/dist/assets/agent-list-row-SyACVYX7.js +0 -2
  205. package/dist/owletto/dist/assets/agent-permissions-matrix-Dsc26dyW.js +0 -2
  206. package/dist/owletto/dist/assets/agent-thread-storage-U6htL3ad.js +0 -2
  207. package/dist/owletto/dist/assets/agents-D1FHZ0jR.js +0 -2
  208. package/dist/owletto/dist/assets/app._appId-01I0CJal.js +0 -2
  209. package/dist/owletto/dist/assets/assist-composer-BD9msDk3.js +0 -2
  210. package/dist/owletto/dist/assets/automation-detail-content-BFv1TglZ.js +0 -2
  211. package/dist/owletto/dist/assets/automation-row-CmTpAD4r.js +0 -2
  212. package/dist/owletto/dist/assets/automation-source-list-D8ZSavQU.js +0 -2
  213. package/dist/owletto/dist/assets/automations-D1FHZ0jR.js +0 -2
  214. package/dist/owletto/dist/assets/change-summary-CGrKEJ04.js +0 -2
  215. package/dist/owletto/dist/assets/clients-6aJvabvS.js +0 -2
  216. package/dist/owletto/dist/assets/connect-BmDziBzI.js +0 -2
  217. package/dist/owletto/dist/assets/connect-menu-Bs8mxsga.js +0 -2
  218. package/dist/owletto/dist/assets/connect._clientId-t5aKu3aa.js +0 -2
  219. package/dist/owletto/dist/assets/connected._clientId-DswMAw8l.js +0 -2
  220. package/dist/owletto/dist/assets/connection-feed-detail-BLCjhP-H.js +0 -2
  221. package/dist/owletto/dist/assets/connector-boxes-BAP_f77M.js +0 -2
  222. package/dist/owletto/dist/assets/connector-page-shell-ClOmVPJr.js +0 -2
  223. package/dist/owletto/dist/assets/connector-provenance-wmYu5jwO.js +0 -2
  224. package/dist/owletto/dist/assets/consent-RqHNkmm8.js +0 -2
  225. package/dist/owletto/dist/assets/copy-button-D6zpsZLi.js +0 -2
  226. package/dist/owletto/dist/assets/create-GT8_yF0R.js +0 -2
  227. package/dist/owletto/dist/assets/create-Yx2qBMBy.js +0 -2
  228. package/dist/owletto/dist/assets/create._connectorKey-CzXqSkuI.js +0 -2
  229. package/dist/owletto/dist/assets/definition-comparison-C3k6Wa9B.js +0 -2
  230. package/dist/owletto/dist/assets/device-pin-tombstone-U7Bx05P6.js +0 -2
  231. package/dist/owletto/dist/assets/device._deviceId-DTZqj1HS.js +0 -2
  232. package/dist/owletto/dist/assets/dynamic-schema-form-DyT_9iVE.js +0 -2
  233. package/dist/owletto/dist/assets/entity-options-CGTjLlcS.js +0 -2
  234. package/dist/owletto/dist/assets/entity-page-DHHMmA8V.js +0 -2
  235. package/dist/owletto/dist/assets/entity-pages-eYbG2FDT.js +0 -2
  236. package/dist/owletto/dist/assets/entity-type-page-CjFqxSdL.js +0 -2
  237. package/dist/owletto/dist/assets/event-card-BtTUuf2q.js +0 -2
  238. package/dist/owletto/dist/assets/event-detail-8xHiplt_.js +0 -2
  239. package/dist/owletto/dist/assets/events-feed-zFnTSE27.js +0 -2
  240. package/dist/owletto/dist/assets/filter-editors-Dd5R2Etd.js +0 -2
  241. package/dist/owletto/dist/assets/home-stream-IVsNEkwp.js +0 -2
  242. package/dist/owletto/dist/assets/index-2oaMOFKe.js +0 -2
  243. package/dist/owletto/dist/assets/index-B-Ab8srM.js +0 -7899
  244. package/dist/owletto/dist/assets/index-B4RZgvvI.js +0 -2
  245. package/dist/owletto/dist/assets/index-BBZM53p8.js +0 -2
  246. package/dist/owletto/dist/assets/index-BOb0a5f9.js +0 -2
  247. package/dist/owletto/dist/assets/index-BYFDMIQC.js +0 -2
  248. package/dist/owletto/dist/assets/index-BwnFQcMe.js +0 -2
  249. package/dist/owletto/dist/assets/index-CvYsWYlF.js +0 -2
  250. package/dist/owletto/dist/assets/index-DIXIvtnM.js +0 -2
  251. package/dist/owletto/dist/assets/index-DLwokXHW.js +0 -2
  252. package/dist/owletto/dist/assets/index-_nlPHus1.js +0 -2
  253. package/dist/owletto/dist/assets/index-cwOgj4-i.js +0 -2
  254. package/dist/owletto/dist/assets/index-pp4qmhkA.js +0 -2
  255. package/dist/owletto/dist/assets/index-tTbno-PX.css +0 -1
  256. package/dist/owletto/dist/assets/json-diff-B-1Swv_y.js +0 -28
  257. package/dist/owletto/dist/assets/member-scope-gate-Lj9m4RL2.js +0 -2
  258. package/dist/owletto/dist/assets/memory-browse-page-rAKfVdQ_.js +0 -74
  259. package/dist/owletto/dist/assets/model-selector-onvGA9Ww.js +0 -2
  260. package/dist/owletto/dist/assets/new-BmehH1uR.js +0 -2
  261. package/dist/owletto/dist/assets/new-KDi15LWZ.js +0 -2
  262. package/dist/owletto/dist/assets/organization-B9bh20Xo.js +0 -2
  263. package/dist/owletto/dist/assets/peek-pane-content-Bqus80Mq.js +0 -2
  264. package/dist/owletto/dist/assets/proposal-review-shell-CnACXCUg.js +0 -2
  265. package/dist/owletto/dist/assets/public-shell-ready-Dlh-eWz0.js +0 -2
  266. package/dist/owletto/dist/assets/record-activity-6CfR95Ul.js +0 -2
  267. package/dist/owletto/dist/assets/run-initiator-BvruBM5H.js +0 -2
  268. package/dist/owletto/dist/assets/runs-BMzp7j7j.js +0 -2
  269. package/dist/owletto/dist/assets/runs-list-DVhrTr3v.js +0 -2
  270. package/dist/owletto/dist/assets/schema-type-editor-panel-Bdeumkux.js +0 -2
  271. package/dist/owletto/dist/assets/source-record-panels-CBV9tsR3.js +0 -2
  272. package/dist/owletto/dist/assets/use-automations-II_YJWtN.js +0 -2
  273. package/dist/owletto/dist/assets/use-login-redirect-BqtEilid.js +0 -2
  274. package/dist/owletto/dist/assets/use-mention-search-Bxlpd6Dp.js +0 -96
  275. package/dist/owletto/dist/assets/view-param-filters-DYlqBocg.js +0 -2
@@ -1,2 +0,0 @@
1
- import{fW as wt,j as O,L as Ct,c as Tt,u as St,r as w,q as Ot,a3 as ce,Q as de,g3 as Rt,p as Nt,g4 as Et,i as At,g5 as jt,g6 as Zt}from"./index-B-Ab8srM.js";import{D as It,E as $t}from"./app-bridge-C4nPtae3.js";import{l as Vt}from"./renderer-CgaQKMoG.js";import{F as Mt,o as Lt,v as Pt}from"./filter-editors-Dd5R2Etd.js";var _;(function(r){r.assertEqual=s=>{};function e(s){}r.assertIs=e;function t(s){throw new Error}r.assertNever=t,r.arrayToEnum=s=>{const a={};for(const i of s)a[i]=i;return a},r.getValidEnumValues=s=>{const a=r.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of a)i[o]=s[o];return r.objectValues(i)},r.objectValues=s=>r.objectKeys(s).map(function(a){return s[a]}),r.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const a=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&a.push(i);return a},r.find=(s,a)=>{for(const i of s)if(a(i))return i},r.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,a=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}r.joinValues=n,r.jsonStringifyReplacer=(s,a)=>typeof a=="bigint"?a.toString():a})(_||(_={}));var We;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(We||(We={}));const f=_.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),P=r=>{switch(typeof r){case"undefined":return f.undefined;case"string":return f.string;case"number":return Number.isNaN(r)?f.nan:f.number;case"boolean":return f.boolean;case"function":return f.function;case"bigint":return f.bigint;case"symbol":return f.symbol;case"object":return Array.isArray(r)?f.array:r===null?f.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?f.promise:typeof Map<"u"&&r instanceof Map?f.map:typeof Set<"u"&&r instanceof Set?f.set:typeof Date<"u"&&r instanceof Date?f.date:f.object;default:return f.unknown}},c=_.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class L extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(a){return a.message},n={_errors:[]},s=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let o=n,l=0;for(;l<i.path.length;){const u=i.path[l];l===i.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(t(i))):o[u]=o[u]||{_errors:[]},o=o[u],l++}}};return s(this),n}static assert(e){if(!(e instanceof L))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,_.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},n=[];for(const s of this.issues)if(s.path.length>0){const a=s.path[0];t[a]=t[a]||[],t[a].push(e(s))}else n.push(e(s));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}L.create=r=>new L(r);const je=(r,e)=>{let t;switch(r.code){case c.invalid_type:r.received===f.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case c.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,_.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:t=`Unrecognized key(s) in object: ${_.joinValues(r.keys,", ")}`;break;case c.invalid_union:t="Invalid input";break;case c.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${_.joinValues(r.options)}`;break;case c.invalid_enum_value:t=`Invalid enum value. Expected ${_.joinValues(r.options)}, received '${r.received}'`;break;case c.invalid_arguments:t="Invalid function arguments";break;case c.invalid_return_type:t="Invalid function return type";break;case c.invalid_date:t="Invalid date";break;case c.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:_.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case c.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="bigint"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case c.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case c.custom:t="Invalid input";break;case c.invalid_intersection_types:t="Intersection results could not be merged";break;case c.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case c.not_finite:t="Number must be finite";break;default:t=e.defaultError,_.assertNever(r)}return{message:t}};let zt=je;function Dt(){return zt}const Ut=r=>{const{data:e,path:t,errorMaps:n,issueData:s}=r,a=[...t,...s.path||[]],i={...s,path:a};if(s.message!==void 0)return{...s,path:a,message:s.message};let o="";const l=n.filter(u=>!!u).slice().reverse();for(const u of l)o=u(i,{data:e,defaultError:o}).message;return{...s,path:a,message:o}};function d(r,e){const t=Dt(),n=Ut({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===je?void 0:je].filter(s=>!!s)});r.common.issues.push(n)}class A{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const s of t){if(s.status==="aborted")return p;s.status==="dirty"&&e.dirty(),n.push(s.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const s of t){const a=await s.key,i=await s.value;n.push({key:a,value:i})}return A.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const s of t){const{key:a,value:i}=s;if(a.status==="aborted"||i.status==="aborted")return p;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(n[a.value]=i.value)}return{status:e.value,value:n}}}const p=Object.freeze({status:"aborted"}),oe=r=>({status:"dirty",value:r}),I=r=>({status:"valid",value:r}),Je=r=>r.status==="aborted",Ye=r=>r.status==="dirty",Q=r=>r.status==="valid",ge=r=>typeof Promise<"u"&&r instanceof Promise;var h;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e?.message})(h||(h={}));class B{constructor(e,t,n,s){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Xe=(r,e)=>{if(Q(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new L(r.common.issues);return this._error=t,this._error}}};function g(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:n,description:s}=r;if(e&&(t||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(i,o)=>{const{message:l}=r;return i.code==="invalid_enum_value"?{message:l??o.defaultError}:typeof o.data>"u"?{message:l??n??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:l??t??o.defaultError}},description:s}}class v{get description(){return this._def.description}_getType(e){return P(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:P(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new A,ctx:{common:e.parent.common,data:e.data,parsedType:P(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(ge(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){const n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:P(e)},s=this._parseSync({data:e,path:n.path,parent:n});return Xe(n,s)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:P(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:t});return Q(n)?{value:n.value}:{issues:t.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(n=>Q(n)?{value:n.value}:{issues:t.common.issues})}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:P(e)},s=this._parse({data:e,path:n.path,parent:n}),a=await(ge(s)?s:Promise.resolve(s));return Xe(n,a)}refine(e,t){const n=s=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(s):t;return this._refinement((s,a)=>{const i=e(s),o=()=>a.addIssue({code:c.custom,...n(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((n,s)=>e(n)?!0:(s.addIssue(typeof t=="function"?t(n,s):t),!1))}_refinement(e){return new te({schema:this,typeName:y.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return U.create(this,this._def)}nullable(){return re.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return M.create(this)}promise(){return ke.create(this,this._def)}or(e){return _e.create([this,e],this._def)}and(e){return xe.create(this,e,this._def)}transform(e){return new te({...g(this._def),schema:this,typeName:y.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new $e({...g(this._def),innerType:this,defaultValue:t,typeName:y.ZodDefault})}brand(){return new lr({typeName:y.ZodBranded,type:this,...g(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new Ve({...g(this._def),innerType:this,catchValue:t,typeName:y.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Le.create(this,e)}readonly(){return Me.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Bt=/^c[^\s-]{8,}$/i,Ft=/^[0-9a-z]+$/,qt=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Wt=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Jt=/^[a-z0-9_-]{21}$/i,Yt=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Xt=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Gt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ht="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Re;const Qt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Kt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,er=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,tr=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,rr=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,nr=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ft="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",sr=new RegExp(`^${ft}$`);function ht(r){let e="[0-5]\\d";r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`);const t=r.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function ar(r){return new RegExp(`^${ht(r)}$`)}function ir(r){let e=`${ft}T${ht(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function or(r,e){return!!((e==="v4"||!e)&&Qt.test(r)||(e==="v6"||!e)&&er.test(r))}function cr(r,e){if(!Yt.test(r))return!1;try{const[t]=r.split(".");if(!t)return!1;const n=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&s?.typ!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return!1}}function dr(r,e){return!!((e==="v4"||!e)&&Kt.test(r)||(e==="v6"||!e)&&tr.test(r))}class D extends v{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==f.string){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:f.string,received:a.parsedType}),p}const n=new A;let s;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(s=this._getOrReturnCtx(e,s),d(s,{code:c.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")e.data.length>a.value&&(s=this._getOrReturnCtx(e,s),d(s,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.length<a.value;(i||o)&&(s=this._getOrReturnCtx(e,s),i?d(s,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&d(s,{code:c.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")Gt.test(e.data)||(s=this._getOrReturnCtx(e,s),d(s,{validation:"email",code:c.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")Re||(Re=new RegExp(Ht,"u")),Re.test(e.data)||(s=this._getOrReturnCtx(e,s),d(s,{validation:"emoji",code:c.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")Wt.test(e.data)||(s=this._getOrReturnCtx(e,s),d(s,{validation:"uuid",code:c.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")Jt.test(e.data)||(s=this._getOrReturnCtx(e,s),d(s,{validation:"nanoid",code:c.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")Bt.test(e.data)||(s=this._getOrReturnCtx(e,s),d(s,{validation:"cuid",code:c.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")Ft.test(e.data)||(s=this._getOrReturnCtx(e,s),d(s,{validation:"cuid2",code:c.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")qt.test(e.data)||(s=this._getOrReturnCtx(e,s),d(s,{validation:"ulid",code:c.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),d(s,{validation:"url",code:c.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),d(s,{validation:"regex",code:c.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(s=this._getOrReturnCtx(e,s),d(s,{code:c.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(s=this._getOrReturnCtx(e,s),d(s,{code:c.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(s=this._getOrReturnCtx(e,s),d(s,{code:c.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?ir(a).test(e.data)||(s=this._getOrReturnCtx(e,s),d(s,{code:c.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?sr.test(e.data)||(s=this._getOrReturnCtx(e,s),d(s,{code:c.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?ar(a).test(e.data)||(s=this._getOrReturnCtx(e,s),d(s,{code:c.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?Xt.test(e.data)||(s=this._getOrReturnCtx(e,s),d(s,{validation:"duration",code:c.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?or(e.data,a.version)||(s=this._getOrReturnCtx(e,s),d(s,{validation:"ip",code:c.invalid_string,message:a.message}),n.dirty()):a.kind==="jwt"?cr(e.data,a.alg)||(s=this._getOrReturnCtx(e,s),d(s,{validation:"jwt",code:c.invalid_string,message:a.message}),n.dirty()):a.kind==="cidr"?dr(e.data,a.version)||(s=this._getOrReturnCtx(e,s),d(s,{validation:"cidr",code:c.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?rr.test(e.data)||(s=this._getOrReturnCtx(e,s),d(s,{validation:"base64",code:c.invalid_string,message:a.message}),n.dirty()):a.kind==="base64url"?nr.test(e.data)||(s=this._getOrReturnCtx(e,s),d(s,{validation:"base64url",code:c.invalid_string,message:a.message}),n.dirty()):_.assertNever(a);return{status:n.value,value:e.data}}_regex(e,t,n){return this.refinement(s=>e.test(s),{validation:t,code:c.invalid_string,...h.errToObj(n)})}_addCheck(e){return new D({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...h.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...h.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...h.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...h.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...h.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...h.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...h.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new D({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new D({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new D({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}D.create=r=>new D({checks:[],typeName:y.ZodString,coerce:r?.coerce??!1,...g(r)});function ur(r,e){const t=(r.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,s=t>n?t:n,a=Number.parseInt(r.toFixed(s).replace(".","")),i=Number.parseInt(e.toFixed(s).replace(".",""));return a%i/10**s}class K extends v{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==f.number){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:f.number,received:a.parsedType}),p}let n;const s=new A;for(const a of this._def.checks)a.kind==="int"?_.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{code:c.invalid_type,expected:"integer",received:"float",message:a.message}),s.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),d(n,{code:c.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),d(n,{code:c.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="multipleOf"?ur(e.data,a.value)!==0&&(n=this._getOrReturnCtx(e,n),d(n,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{code:c.not_finite,message:a.message}),s.dirty()):_.assertNever(a);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,n,s){return new K({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:h.toString(s)}]})}_addCheck(e){return new K({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&_.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(t===null||n.value>t)&&(t=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}K.create=r=>new K({checks:[],typeName:y.ZodNumber,coerce:r?.coerce||!1,...g(r)});class ue extends v{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==f.bigint)return this._getInvalidInput(e);let n;const s=new A;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),d(n,{code:c.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),d(n,{code:c.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),d(n,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):_.assertNever(a);return{status:s.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return d(t,{code:c.invalid_type,expected:f.bigint,received:t.parsedType}),p}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,n,s){return new ue({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:h.toString(s)}]})}_addCheck(e){return new ue({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}ue.create=r=>new ue({checks:[],typeName:y.ZodBigInt,coerce:r?.coerce??!1,...g(r)});class Ge extends v{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==f.boolean){const n=this._getOrReturnCtx(e);return d(n,{code:c.invalid_type,expected:f.boolean,received:n.parsedType}),p}return I(e.data)}}Ge.create=r=>new Ge({typeName:y.ZodBoolean,coerce:r?.coerce||!1,...g(r)});class ve extends v{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==f.date){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:f.date,received:a.parsedType}),p}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_date}),p}const n=new A;let s;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(s=this._getOrReturnCtx(e,s),d(s,{code:c.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(s=this._getOrReturnCtx(e,s),d(s,{code:c.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):_.assertNever(a);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ve({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}ve.create=r=>new ve({checks:[],coerce:r?.coerce||!1,typeName:y.ZodDate,...g(r)});class He extends v{_parse(e){if(this._getType(e)!==f.symbol){const n=this._getOrReturnCtx(e);return d(n,{code:c.invalid_type,expected:f.symbol,received:n.parsedType}),p}return I(e.data)}}He.create=r=>new He({typeName:y.ZodSymbol,...g(r)});class Qe extends v{_parse(e){if(this._getType(e)!==f.undefined){const n=this._getOrReturnCtx(e);return d(n,{code:c.invalid_type,expected:f.undefined,received:n.parsedType}),p}return I(e.data)}}Qe.create=r=>new Qe({typeName:y.ZodUndefined,...g(r)});class Ke extends v{_parse(e){if(this._getType(e)!==f.null){const n=this._getOrReturnCtx(e);return d(n,{code:c.invalid_type,expected:f.null,received:n.parsedType}),p}return I(e.data)}}Ke.create=r=>new Ke({typeName:y.ZodNull,...g(r)});class et extends v{constructor(){super(...arguments),this._any=!0}_parse(e){return I(e.data)}}et.create=r=>new et({typeName:y.ZodAny,...g(r)});class tt extends v{constructor(){super(...arguments),this._unknown=!0}_parse(e){return I(e.data)}}tt.create=r=>new tt({typeName:y.ZodUnknown,...g(r)});class F extends v{_parse(e){const t=this._getOrReturnCtx(e);return d(t,{code:c.invalid_type,expected:f.never,received:t.parsedType}),p}}F.create=r=>new F({typeName:y.ZodNever,...g(r)});class rt extends v{_parse(e){if(this._getType(e)!==f.undefined){const n=this._getOrReturnCtx(e);return d(n,{code:c.invalid_type,expected:f.void,received:n.parsedType}),p}return I(e.data)}}rt.create=r=>new rt({typeName:y.ZodVoid,...g(r)});class M extends v{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),s=this._def;if(t.parsedType!==f.array)return d(t,{code:c.invalid_type,expected:f.array,received:t.parsedType}),p;if(s.exactLength!==null){const i=t.data.length>s.exactLength.value,o=t.data.length<s.exactLength.value;(i||o)&&(d(t,{code:i?c.too_big:c.too_small,minimum:o?s.exactLength.value:void 0,maximum:i?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&t.data.length<s.minLength.value&&(d(t,{code:c.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&t.data.length>s.maxLength.value&&(d(t,{code:c.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>s.type._parseAsync(new B(t,i,t.path,o)))).then(i=>A.mergeArray(n,i));const a=[...t.data].map((i,o)=>s.type._parseSync(new B(t,i,t.path,o)));return A.mergeArray(n,a)}get element(){return this._def.type}min(e,t){return new M({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new M({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new M({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}}M.create=(r,e)=>new M({type:r,minLength:null,maxLength:null,exactLength:null,typeName:y.ZodArray,...g(e)});function G(r){if(r instanceof b){const e={};for(const t in r.shape){const n=r.shape[t];e[t]=U.create(G(n))}return new b({...r._def,shape:()=>e})}else return r instanceof M?new M({...r._def,type:G(r.element)}):r instanceof U?U.create(G(r.unwrap())):r instanceof re?re.create(G(r.unwrap())):r instanceof Y?Y.create(r.items.map(e=>G(e))):r}class b extends v{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=_.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==f.object){const u=this._getOrReturnCtx(e);return d(u,{code:c.invalid_type,expected:f.object,received:u.parsedType}),p}const{status:n,ctx:s}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof F&&this._def.unknownKeys==="strip"))for(const u in s.data)i.includes(u)||o.push(u);const l=[];for(const u of i){const m=a[u],S=s.data[u];l.push({key:{status:"valid",value:u},value:m._parse(new B(s,S,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof F){const u=this._def.unknownKeys;if(u==="passthrough")for(const m of o)l.push({key:{status:"valid",value:m},value:{status:"valid",value:s.data[m]}});else if(u==="strict")o.length>0&&(d(s,{code:c.unrecognized_keys,keys:o}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const m of o){const S=s.data[m];l.push({key:{status:"valid",value:m},value:u._parse(new B(s,S,s.path,m)),alwaysSet:m in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const m of l){const S=await m.key,N=await m.value;u.push({key:S,value:N,alwaysSet:m.alwaysSet})}return u}).then(u=>A.mergeObjectSync(n,u)):A.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new b({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,n)=>{const s=this._def.errorMap?.(t,n).message??n.defaultError;return t.code==="unrecognized_keys"?{message:h.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new b({...this._def,unknownKeys:"strip"})}passthrough(){return new b({...this._def,unknownKeys:"passthrough"})}extend(e){return new b({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new b({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:y.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new b({...this._def,catchall:e})}pick(e){const t={};for(const n of _.objectKeys(e))e[n]&&this.shape[n]&&(t[n]=this.shape[n]);return new b({...this._def,shape:()=>t})}omit(e){const t={};for(const n of _.objectKeys(this.shape))e[n]||(t[n]=this.shape[n]);return new b({...this._def,shape:()=>t})}deepPartial(){return G(this)}partial(e){const t={};for(const n of _.objectKeys(this.shape)){const s=this.shape[n];e&&!e[n]?t[n]=s:t[n]=s.optional()}return new b({...this._def,shape:()=>t})}required(e){const t={};for(const n of _.objectKeys(this.shape))if(e&&!e[n])t[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof U;)a=a._def.innerType;t[n]=a}return new b({...this._def,shape:()=>t})}keyof(){return mt(_.objectKeys(this.shape))}}b.create=(r,e)=>new b({shape:()=>r,unknownKeys:"strip",catchall:F.create(),typeName:y.ZodObject,...g(e)});b.strictCreate=(r,e)=>new b({shape:()=>r,unknownKeys:"strict",catchall:F.create(),typeName:y.ZodObject,...g(e)});b.lazycreate=(r,e)=>new b({shape:r,unknownKeys:"strip",catchall:F.create(),typeName:y.ZodObject,...g(e)});class _e extends v{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;function s(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new L(o.ctx.common.issues));return d(t,{code:c.invalid_union,unionErrors:i}),p}if(t.common.async)return Promise.all(n.map(async a=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(s);{let a;const i=[];for(const l of n){const u={...t,common:{...t.common,issues:[]},parent:null},m=l._parseSync({data:t.data,path:t.path,parent:u});if(m.status==="valid")return m;m.status==="dirty"&&!a&&(a={result:m,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(l=>new L(l));return d(t,{code:c.invalid_union,unionErrors:o}),p}}get options(){return this._def.options}}_e.create=(r,e)=>new _e({options:r,typeName:y.ZodUnion,...g(e)});function Ze(r,e){const t=P(r),n=P(e);if(r===e)return{valid:!0,data:r};if(t===f.object&&n===f.object){const s=_.objectKeys(e),a=_.objectKeys(r).filter(o=>s.indexOf(o)!==-1),i={...r,...e};for(const o of a){const l=Ze(r[o],e[o]);if(!l.valid)return{valid:!1};i[o]=l.data}return{valid:!0,data:i}}else if(t===f.array&&n===f.array){if(r.length!==e.length)return{valid:!1};const s=[];for(let a=0;a<r.length;a++){const i=r[a],o=e[a],l=Ze(i,o);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return t===f.date&&n===f.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class xe extends v{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),s=(a,i)=>{if(Je(a)||Je(i))return p;const o=Ze(a.value,i.value);return o.valid?((Ye(a)||Ye(i))&&t.dirty(),{status:t.value,value:o.data}):(d(n,{code:c.invalid_intersection_types}),p)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,i])=>s(a,i)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}xe.create=(r,e,t)=>new xe({left:r,right:e,typeName:y.ZodIntersection,...g(t)});class Y extends v{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.array)return d(n,{code:c.invalid_type,expected:f.array,received:n.parsedType}),p;if(n.data.length<this._def.items.length)return d(n,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),p;!this._def.rest&&n.data.length>this._def.items.length&&(d(n,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...n.data].map((i,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new B(n,i,n.path,o)):null}).filter(i=>!!i);return n.common.async?Promise.all(a).then(i=>A.mergeArray(t,i)):A.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new Y({...this._def,rest:e})}}Y.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Y({items:r,typeName:y.ZodTuple,rest:null,...g(e)})};class nt extends v{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.map)return d(n,{code:c.invalid_type,expected:f.map,received:n.parsedType}),p;const s=this._def.keyType,a=this._def.valueType,i=[...n.data.entries()].map(([o,l],u)=>({key:s._parse(new B(n,o,n.path,[u,"key"])),value:a._parse(new B(n,l,n.path,[u,"value"]))}));if(n.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of i){const u=await l.key,m=await l.value;if(u.status==="aborted"||m.status==="aborted")return p;(u.status==="dirty"||m.status==="dirty")&&t.dirty(),o.set(u.value,m.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const l of i){const u=l.key,m=l.value;if(u.status==="aborted"||m.status==="aborted")return p;(u.status==="dirty"||m.status==="dirty")&&t.dirty(),o.set(u.value,m.value)}return{status:t.value,value:o}}}}nt.create=(r,e,t)=>new nt({valueType:e,keyType:r,typeName:y.ZodMap,...g(t)});class le extends v{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.set)return d(n,{code:c.invalid_type,expected:f.set,received:n.parsedType}),p;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(d(n,{code:c.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),t.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(d(n,{code:c.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),t.dirty());const a=this._def.valueType;function i(l){const u=new Set;for(const m of l){if(m.status==="aborted")return p;m.status==="dirty"&&t.dirty(),u.add(m.value)}return{status:t.value,value:u}}const o=[...n.data.values()].map((l,u)=>a._parse(new B(n,l,n.path,u)));return n.common.async?Promise.all(o).then(l=>i(l)):i(o)}min(e,t){return new le({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new le({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}le.create=(r,e)=>new le({valueType:r,minSize:null,maxSize:null,typeName:y.ZodSet,...g(e)});class st extends v{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}st.create=(r,e)=>new st({getter:r,typeName:y.ZodLazy,...g(e)});class Ie extends v{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return d(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),p}return{status:"valid",value:e.data}}get value(){return this._def.value}}Ie.create=(r,e)=>new Ie({value:r,typeName:y.ZodLiteral,...g(e)});function mt(r,e){return new ee({values:r,typeName:y.ZodEnum,...g(e)})}class ee extends v{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),n=this._def.values;return d(t,{expected:_.joinValues(n),received:t.parsedType,code:c.invalid_type}),p}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return d(t,{received:t.data,code:c.invalid_enum_value,options:n}),p}return I(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ee.create(e,{...this._def,...t})}exclude(e,t=this._def){return ee.create(this.options.filter(n=>!e.includes(n)),{...this._def,...t})}}ee.create=mt;class at extends v{_parse(e){const t=_.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==f.string&&n.parsedType!==f.number){const s=_.objectValues(t);return d(n,{expected:_.joinValues(s),received:n.parsedType,code:c.invalid_type}),p}if(this._cache||(this._cache=new Set(_.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const s=_.objectValues(t);return d(n,{received:n.data,code:c.invalid_enum_value,options:s}),p}return I(e.data)}get enum(){return this._def.values}}at.create=(r,e)=>new at({values:r,typeName:y.ZodNativeEnum,...g(e)});class ke extends v{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.promise&&t.common.async===!1)return d(t,{code:c.invalid_type,expected:f.promise,received:t.parsedType}),p;const n=t.parsedType===f.promise?t.data:Promise.resolve(t.data);return I(n.then(s=>this._def.type.parseAsync(s,{path:t.path,errorMap:t.common.contextualErrorMap})))}}ke.create=(r,e)=>new ke({type:r,typeName:y.ZodPromise,...g(e)});class te extends v{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===y.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),s=this._def.effect||null,a={addIssue:i=>{d(n,i),i.fatal?t.abort():t.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),s.type==="preprocess"){const i=s.transform(n.data,a);if(n.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return p;const l=await this._def.schema._parseAsync({data:o,path:n.path,parent:n});return l.status==="aborted"?p:l.status==="dirty"||t.value==="dirty"?oe(l.value):l});{if(t.value==="aborted")return p;const o=this._def.schema._parseSync({data:i,path:n.path,parent:n});return o.status==="aborted"?p:o.status==="dirty"||t.value==="dirty"?oe(o.value):o}}if(s.type==="refinement"){const i=o=>{const l=s.refinement(o,a);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?p:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>o.status==="aborted"?p:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(s.type==="transform")if(n.common.async===!1){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Q(i))return p;const o=s.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>Q(i)?Promise.resolve(s.transform(i.value,a)).then(o=>({status:t.value,value:o})):p);_.assertNever(s)}}te.create=(r,e,t)=>new te({schema:r,typeName:y.ZodEffects,effect:e,...g(t)});te.createWithPreprocess=(r,e,t)=>new te({schema:e,effect:{type:"preprocess",transform:r},typeName:y.ZodEffects,...g(t)});class U extends v{_parse(e){return this._getType(e)===f.undefined?I(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}U.create=(r,e)=>new U({innerType:r,typeName:y.ZodOptional,...g(e)});class re extends v{_parse(e){return this._getType(e)===f.null?I(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}re.create=(r,e)=>new re({innerType:r,typeName:y.ZodNullable,...g(e)});class $e extends v{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===f.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}$e.create=(r,e)=>new $e({innerType:r,typeName:y.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...g(e)});class Ve extends v{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return ge(s)?s.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new L(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new L(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Ve.create=(r,e)=>new Ve({innerType:r,typeName:y.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...g(e)});class it extends v{_parse(e){if(this._getType(e)!==f.nan){const n=this._getOrReturnCtx(e);return d(n,{code:c.invalid_type,expected:f.nan,received:n.parsedType}),p}return{status:"valid",value:e.data}}}it.create=r=>new it({typeName:y.ZodNaN,...g(r)});class lr extends v{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class Le extends v{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?p:a.status==="dirty"?(t.dirty(),oe(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?p:s.status==="dirty"?(t.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(e,t){return new Le({in:e,out:t,typeName:y.ZodPipeline})}}class Me extends v{_parse(e){const t=this._def.innerType._parse(e),n=s=>(Q(s)&&(s.value=Object.freeze(s.value)),s);return ge(t)?t.then(s=>n(s)):n(t)}unwrap(){return this._def.innerType}}Me.create=(r,e)=>new Me({innerType:r,typeName:y.ZodReadonly,...g(e)});var y;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(y||(y={}));const ot=D.create,ct=K.create;F.create;M.create;const Ne=b.create,dt=_e.create;xe.create;Y.create;const fr=Ie.create,hr=ee.create;ke.create;U.create;re.create;function jr({viewKey:r,backTo:e,backLabel:t}){return O.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center","data-testid":"missing-view",children:[O.jsxs("h2",{className:"text-lg font-semibold",children:["No view named “",r,"” here"]}),O.jsx("p",{className:"text-muted-foreground mt-2 text-sm",children:"It may have been renamed or detached from this page."}),O.jsx(Ct,{to:e,className:"mt-4 text-sm font-medium underline underline-offset-4",children:t})]})}function Zr({error:r,onRetry:e}){const t=wt(r,{subject:"Views"});return O.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center","data-testid":"views-unavailable",children:[O.jsx("h2",{className:"text-lg font-semibold",children:t.title}),O.jsx("p",{className:"text-muted-foreground mt-2 max-w-md text-sm",children:t.body}),t.retryable?O.jsx("button",{type:"button",onClick:e,className:"mt-4 text-sm font-medium underline underline-offset-4",children:"Try again"}):null]})}const mr="lobu/open-record";function pr(r,e){return r==="manage_entity"?e?.action==="list"||e?.action==="get"||e?.action==="list_links":r==="manage_automations"?e?.action==="list":r==="manage_agents"?e?.action==="get":r==="manage_connections"?e?.action==="list":r==="manage_catalog"?e?.action==="list_installed":r==="manage_entity_schema"&&e?.schema_type==="entity_type"&&(e.action==="list"||e.action==="get")}const ut=Ne({method:fr(mr),params:Ne({record:Ne({entity_id:dt([ct().int().positive().max(Number.MAX_SAFE_INTEGER),ot().min(1).max(1024)]),entity_type:dt([ot().min(1),ct().int().positive()]).optional()}),mode:hr(["peek","page"])})}),yr=new Set(["query_sql","query_sdk"]),gr=200;function vr(r,e){const t=r?.title;return typeof t=="string"&&t.trim()?r??{}:{...r,title:e.slice(0,gr)}}const Ee=new Map;function _r(r){const e=Ee.get(r);if(e)return e;const t=ce(`${de}/api/${r}/tools`,{method:"GET",credentials:"include",timeoutMs:15e3}).then(async n=>{if(!n.ok)throw new Error(`tool list failed: ${n.status}`);const s=await n.json();return new Set((s.tools??[]).flatMap(a=>typeof a.name=="string"&&a.annotations?.readOnlyHint===!0?[a.name]:[]))});return Ee.set(r,t),t.catch(()=>Ee.delete(r)),t}const xr=[["--color-background-primary","--background"],["--color-background-secondary","--card"],["--color-background-tertiary","--muted"],["--color-background-inverse","--foreground"],["--color-text-primary","--foreground"],["--color-text-secondary","--muted-foreground"],["--color-text-inverse","--background"],["--color-text-info","--primary"],["--color-text-danger","--destructive"],["--color-border-primary","--border"],["--color-border-secondary","--input"],["--color-border-danger","--destructive"],["--color-ring-primary","--ring"],["--font-mono","--font-mono"],["--border-radius-sm","--radius-sm"],["--border-radius-md","--radius-md"],["--border-radius-lg","--radius-lg"],["--border-radius-xl","--radius-xl"]];function Ae(r){const e=document.documentElement,t=getComputedStyle(e),n={};for(const[a,i]of xr){const o=t.getPropertyValue(i).trim();o&&(n[a]=o)}const s=document.body?getComputedStyle(document.body).fontFamily:"";return s&&(n["--font-sans"]=s),{theme:e.classList.contains("dark")?"dark":"light",displayMode:r.displayMode,availableDisplayModes:r.expandable?["inline","fullscreen"]:[r.displayMode],containerDimensions:{...r.width?{width:r.width}:{},...r.maxHeight?{maxHeight:r.maxHeight}:{}},platform:"web",styles:{variables:n}}}async function kr(r,e,t,n,s,a){if(s!=="invoke_view_action"){const S=yr.has(s);return!S&&!pr(s,a)&&!(await _r(r)).has(s)?{error:`Views can only call read tools and their declared actions; "${s}" is neither`}:{url:`${de}/api/${r}/${encodeURIComponent(s)}`,body:S?vr(a,t):a??{}}}const{view:i,action:o,value:l,interaction_id:u,scope:m}=a??{};return m!==void 0&&(typeof m!="object"||m===null||m.event!==n.event)?{error:"The event context changed. Reopen the event before submitting."}:i!==e?{error:`This frame hosts "${e}", not "${String(i)}"`}:typeof o!="string"||!o?{error:"action is required"}:{url:`${de}/api/${r}/views/${encodeURIComponent(e)}/actions/${encodeURIComponent(o)}`,body:{value:l??null,interaction_id:u,...n.event===void 0?{}:{scope:{event:n.event}}}}}const lt=24,z=new Map,H=new Map;function br(r,e){const t=`${r}\0${e}`,n=z.get(t);return n!==void 0&&(z.delete(t),z.set(t,n)),n}function wr(r,e,t){H.delete(r),H.set(r,{hash:e,html:t});for(const s of H.keys()){if(H.size<=lt)break;H.delete(s)}if(e===null)return;const n=`${r}\0${e}`;z.delete(n),z.set(n,t);for(const s of z.keys()){if(z.size<=lt)break;z.delete(s)}}const ye=new Map;function Cr(r,e,t,n){const s=ye.get(r);if(s)return s;const a=ce(e,{credentials:"include"}).then(async i=>n&&(i.status===401||i.status===403)?ce(t,{credentials:"include"}):i).then(async i=>{if(!i.ok)throw new Error(`shell ${i.status}`);return{html:await i.text(),hash:i.headers.get("X-Lobu-View-Hash")}});return ye.set(r,a),a.then(()=>ye.delete(r),()=>ye.delete(r)),a}const Ir=({orgSlug:r,viewKey:e,scope:t,params:n,onParamsChange:s,contentHash:a,title:i,minHeight:o=96,fixedHeight:l,displayMode:u="fullscreen",maxHeight:m,onRequestDisplayMode:S,className:N,onLoadError:q})=>{const fe=Tt(),Pe=St(),ne=w.useRef(Pe);ne.current=Pe;const be=w.useRef(fe);be.current=fe;const{session:pt,isReady:yt}=Ot(),we=yt&&!pt,Ce=w.useRef(null),he=w.useRef(null),[se,Te]=w.useState(null),[me,Se]=w.useState(null),[ze,gt]=w.useState(o),ae=w.useRef(null),X=w.useRef(null),De=w.useRef(o);De.current=o;const Ue=w.useRef(l);Ue.current=l;const $=w.useRef({scope:t,params:n,onParamsChange:s,onLoadError:q,onRequestDisplayMode:S,title:i});$.current={scope:t,params:n,onParamsChange:s,onLoadError:q,onRequestDisplayMode:S,title:i};const[Be,vt]=w.useState(void 0),ie=w.useRef({displayMode:u,expandable:!1});ie.current={displayMode:u,maxHeight:m,width:Be,expandable:S!==void 0};const V=jt(r,e);w.useEffect(()=>{let j=!1;if(V!==X.current&&(Te(null),X.current=null,ae.current=null),Se(null),a!=null&&a===ae.current&&V===X.current)return()=>{j=!0};const Z=a==null?H.get(V):(()=>{const x=br(V,a);return x===void 0?void 0:{hash:a,html:x}})();if(Z!==void 0)return ae.current=Z.hash??a??null,X.current=V,Te(Z.html),()=>{j=!0};const W=x=>`${de}/api/${r}${x?"/public":""}/views/${encodeURIComponent(e)}/shell`;return Cr(V,W(we),W(!0),!we).then(({html:x,hash:T})=>{wr(V,T,x),!j&&(T!==null&&T===ae.current&&V===X.current||(ae.current=T,X.current=V,Se(null),Te(x)))}).catch(x=>{j||(Se(x instanceof Error?x.message:String(x)),$.current.onLoadError?.())}),()=>{j=!0}},[V,r,e,a,we]);const _t=S!==void 0;w.useEffect(()=>{he.current?.setHostContext(Ae(ie.current))},[u,m,Be,_t]),w.useEffect(()=>{const j=Ce.current;if(!j||typeof ResizeObserver>"u")return;const Z=new ResizeObserver(([W])=>{const x=Math.round(W.contentRect.width);x>0&&vt(x)});return Z.observe(j),()=>Z.disconnect()},[se]);const xt=JSON.stringify(n),kt=JSON.stringify(t);if(w.useEffect(()=>{he.current?.sendToolInput({arguments:{scope:$.current.scope,params:$.current.params}})},[kt,xt]),w.useEffect(()=>{if(!se||me)return;const j=Ce.current;if(!j?.contentWindow)return;const Z=r,W=e;let x=!1;const T=new It(null,{name:"Lobu",version:"1.0.0"},{openLinks:{},serverTools:{},updateModelContext:{structuredContent:{}}},{hostContext:Ae(ie.current)});T.addEventListener("sizechange",({height:C})=>{Ue.current||typeof C=="number"&&gt(Math.max(De.current,Math.ceil(C)))}),T.setRequestHandler(ut,async C=>{const{params:k}=ut.parse(C);if(x)throw new Error("View unmounted");if(typeof k.record.entity_id=="string"&&!k.record.entity_type)throw new Error("String record keys require entity_type");const E=await ce(`${de}/api/${Z}/manage_entity`,{method:"POST",credentials:"include",timeoutMs:15e3,headers:{"Content-Type":"application/json"},body:JSON.stringify({...k.record,action:"get"})});if(!E.ok)throw new Error(`Could not open record (${E.status})`);const R=(await E.json()).entity;if(x)throw new Error("View unmounted");if(!R?.view_url)throw new Error("Record is unavailable");if(k.mode==="peek"&&ne.current){const J={ownerSlug:Z,orgContext:{slug:Z},name:R.name};return ne.current.open(Vt(typeof R.id=="number"?{...J,entityId:R.id}:{...J,record:{type:R.entity_type,key:R.slug}})),{mode:"peek"}}return await be.current({href:R.view_url}),{mode:"page"}}),T.oncalltool=async({name:C,arguments:k})=>{if(x)return{content:[{type:"text",text:"view unmounted"}],isError:!0};let E;try{E=await kr(Z,W,$.current.title??W,$.current.scope,C,k)}catch(J){return{content:[{type:"text",text:String(J)}],isError:!0}}if(x)return{content:[{type:"text",text:"view unmounted"}],isError:!0};if("error"in E)return{content:[{type:"text",text:E.error}],isError:!0};const pe=await ce(E.url,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(E.body),timeoutMs:3e4}),R=await pe.json().catch(()=>null);if(!pe.ok){const J=R&&typeof R.error=="string"&&R.error||`API error: ${pe.status}`;return{content:[{type:"text",text:J}],isError:!0,structuredContent:{error:{message:J,code:R?.code}}}}return{content:[{type:"text",text:JSON.stringify(R)}],structuredContent:R??{}}},T.onupdatemodelcontext=async({structuredContent:C})=>{if(x)return{};const k=C?.params;return k&&typeof k=="object"&&!Array.isArray(k)&&$.current.onParamsChange(k),{}},T.onopenlink=async({url:C})=>{if(x)return{};const k=new URL(C,window.location.href);return k.origin===window.location.origin?(k.pathname=Rt(k.pathname),Nt(k.href)?.owner===Z&&ne.current?ne.current.open({href:k.pathname+k.search+k.hash,title:"Details"}):await be.current({href:k.href})):window.open(k.href,"_blank","noopener,noreferrer"),{}},T.onrequestdisplaymode=async({mode:C})=>{const k=ie.current.displayMode,E=$.current.onRequestDisplayMode;return!x&&E&&C!==k&&(C==="inline"||C==="fullscreen")&&E(C),{mode:k}},T.addEventListener("initialized",()=>{T.sendToolInput({arguments:{scope:$.current.scope,params:$.current.params}})});const Oe=new $t(j.contentWindow,j.contentWindow);T.connect(Oe).catch(C=>{console.error("[view-frame] failed to initialize",C)}),he.current=T;const bt=Et(()=>{x||Oe.send({jsonrpc:"2.0",method:"lobu/notifications/data-changed",params:{}}).catch(()=>{})}),qe=new MutationObserver(()=>{T.setHostContext(Ae(ie.current))});return qe.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>{x=!0,bt(),qe.disconnect(),he.current=null,Oe.close()}},[se,me,r,e]),me)return O.jsxs("div",{"data-testid":"view-frame-error",className:"text-sm text-destructive",children:["View failed to load: ",me]});const Fe=!l&&m!==void 0&&ze>m;return O.jsxs("div",{className:At(m!==void 0&&"relative overflow-hidden",N),style:m!==void 0?{maxHeight:m}:void 0,"data-testid":"view-frame","data-view":e,"data-clipped":Fe||void 0,children:[se?O.jsx("iframe",{ref:Ce,title:i??e,srcDoc:se,sandbox:"allow-scripts",style:{width:"100%",height:l??ze,border:"none",display:"block"}}):O.jsx("div",{className:"animate-pulse rounded-md bg-muted/40",style:{height:o}}),Fe?O.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-x-0 bottom-0 h-12 bg-gradient-to-t from-background to-transparent"}):null]})},Tr=[{value:!0,label:"Yes"},{value:!1,label:"No"}];function Sr(r,e,t){const n=[],s=[];for(const[a,i]of Object.entries(r??{})){const o=i.filter;if(!o)continue;const l=N=>t({...e,[a]:N}),u=o.options??(i.type==="boolean"?Tr:void 0),m=e[a],S=u?Lt({searchPlaceholder:`Search ${o.label.toLowerCase()}...`,options:u.map(N=>({value:String(N.value),label:N.label})),selected:m===void 0?[]:[String(m)],onSelect:N=>{const q=u.find(fe=>String(fe.value)===N);q&&l(q.value)}}):Pt({type:i.type==="number"?"number":"text",label:o.label,value:typeof m=="boolean"?void 0:m,onApply:l});n.push({key:`param:${a}`,label:o.label,group:"View",icon:O.jsx(Zt,{className:"h-4 w-4"}),editor:S}),m!==void 0&&s.push({id:`param:${a}`,label:o.label,op:"is",value:u?.find(N=>N.value===m)?.label??(m===""?"(empty)":String(m)),onRemove:()=>{const{[a]:N,...q}=e;t(q)}})}return{fields:n,chips:s}}function Or(r,e){const t={...e};for(const[n,s]of Object.entries(r??{}))s.filter&&delete t[n];return t}function $r({decls:r,params:e,onParamsChange:t}){const{fields:n,chips:s}=Sr(r,e,t);return n.length?O.jsx(Mt,{label:"View filters",className:"mb-3",fields:n,chips:s,onClearAll:()=>t(Or(r,e))}):null}export{jr as M,Zr as V,Ir as a,$r as b,Sr as v,Or as w};
2
- //# sourceMappingURL=view-param-filters-DYlqBocg.js.map