@kyro-cms/core 0.13.2 → 0.13.5

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 (262) hide show
  1. package/dist/{WebhookService-BOJMgjBm.d.cts → WebhookService-BJTCP3cU.d.cts} +1 -1
  2. package/dist/{WebhookService-BLi5Rz2m.d.ts → WebhookService-Bqr_66lK.d.ts} +1 -1
  3. package/dist/api-handler-graphql.cjs +1 -1
  4. package/dist/api-handler-graphql.js +1 -1
  5. package/dist/api-handler-trpc.cjs +1 -1
  6. package/dist/api-handler-trpc.js +1 -1
  7. package/dist/api-handler.cjs +1 -1
  8. package/dist/api-handler.js +1 -1
  9. package/dist/{base-OYfoYPYP.d.ts → base-A9AJPCG5.d.ts} +1 -0
  10. package/dist/{base-BCgFt3Yx.d.ts → base-C2DOe8wD.d.ts} +3 -2
  11. package/dist/{base-BaOJ5uWd.d.cts → base-C6wyX2nC.d.cts} +1 -0
  12. package/dist/{base-B-i-tjm1.d.ts → base-DIpT2Vuz.d.cts} +3 -2
  13. package/dist/{bootstrap-QQ6D3OYG.js → bootstrap-PG2LGDLB.js} +1 -1
  14. package/dist/bootstrap-YD3GLTWX.cjs +1 -0
  15. package/dist/chunk-2SPWRQ5O.js +122 -0
  16. package/dist/chunk-2TYITUOC.js +122 -0
  17. package/dist/{chunk-GV2IB4WQ.cjs → chunk-3CIMGC2F.cjs} +3 -3
  18. package/dist/{chunk-S5HTTLN7.cjs → chunk-4NTIK6DF.cjs} +1 -1
  19. package/dist/chunk-6E44MQQ5.js +115 -0
  20. package/dist/{chunk-PTPVFLET.js → chunk-6LWF5MPL.js} +1 -1
  21. package/dist/chunk-6YS6XLOD.cjs +121 -0
  22. package/dist/{chunk-2OS5Y4LE.cjs → chunk-7KLEANTO.cjs} +1 -1
  23. package/dist/{chunk-3GXLOYM3.js → chunk-ALTU3FDG.js} +1 -1
  24. package/dist/{chunk-OPTVCCQQ.cjs → chunk-EQN3HDES.cjs} +7 -6
  25. package/dist/{chunk-3O3AVMWM.cjs → chunk-EW424IBO.cjs} +1 -1
  26. package/dist/{chunk-JZ7Z6WC2.cjs → chunk-GTR7JAKP.cjs} +2 -2
  27. package/dist/{chunk-M75VGFCI.js → chunk-HPIJI7TM.js} +1 -1
  28. package/dist/chunk-J6V573PE.cjs +1 -0
  29. package/dist/{chunk-3LAWUINR.cjs → chunk-LKRI5X2V.cjs} +1 -1
  30. package/dist/{chunk-6MNLRAKM.cjs → chunk-NRE6VKL6.cjs} +12 -12
  31. package/dist/{chunk-MYHNTJLR.cjs → chunk-OOVNTOZC.cjs} +6 -6
  32. package/dist/{chunk-SMQ6736Y.js → chunk-PYUWSKKP.js} +1 -1
  33. package/dist/{chunk-XBQ6HV3T.cjs → chunk-QYN6C3FZ.cjs} +4 -4
  34. package/dist/{chunk-ATI2UZ7U.js → chunk-RYXLEFS5.js} +1 -1
  35. package/dist/{chunk-E4H3ZZ7U.js → chunk-SRIXRJHL.js} +1 -1
  36. package/dist/chunk-V4FAL7AG.js +2 -0
  37. package/dist/{chunk-6DD4J7LI.js → chunk-WAVGRSE6.js} +1 -1
  38. package/dist/{chunk-N6MNQIQU.js → chunk-WNU76M2C.js} +7 -6
  39. package/dist/chunk-XDQVYCIR.cjs +1 -0
  40. package/dist/{chunk-K5XGP57D.cjs → chunk-XOR64WUQ.cjs} +1 -1
  41. package/dist/chunk-YGI5W4RS.js +2 -0
  42. package/dist/{chunk-I6UJVO2P.js → chunk-YIFKTA5N.js} +6 -6
  43. package/dist/cli/index.cjs +86 -86
  44. package/dist/cli/index.js +87 -87
  45. package/dist/client.d.cts +26 -0
  46. package/dist/client.d.ts +26 -0
  47. package/dist/drizzle/index.cjs +1 -1
  48. package/dist/drizzle/index.d.cts +3 -3
  49. package/dist/drizzle/index.d.ts +3 -3
  50. package/dist/drizzle/index.js +1 -1
  51. package/dist/fields/index.d.cts +2 -2
  52. package/dist/fields/index.d.ts +2 -2
  53. package/dist/graphql/index.d.cts +3 -3
  54. package/dist/graphql/index.d.ts +3 -3
  55. package/dist/{index-BttsFZDa.d.ts → index-C9uBoJtm.d.ts} +2 -2
  56. package/dist/{index-8Ino7vKq.d.ts → index-Ci7aUrmN.d.cts} +2 -2
  57. package/dist/index.cjs +4 -4
  58. package/dist/index.d.cts +13 -10
  59. package/dist/index.d.ts +13 -10
  60. package/dist/index.js +4 -4
  61. package/dist/{local-DPLKZQA3.js → local-6UUGBZ4M.js} +1 -1
  62. package/dist/{local-KR3AIGVA.cjs → local-ZYHV3J2K.cjs} +1 -1
  63. package/dist/{mongo-auth-adapter-EUHAYWJ6.cjs → mongo-auth-adapter-2H2AXDRH.cjs} +1 -1
  64. package/dist/{mongo-auth-adapter-FW7ATYQ6.js → mongo-auth-adapter-YWMEOC42.js} +1 -1
  65. package/dist/mongodb/index.cjs +1 -1
  66. package/dist/mongodb/index.d.cts +3 -3
  67. package/dist/mongodb/index.d.ts +3 -3
  68. package/dist/mongodb/index.js +1 -1
  69. package/dist/{postgres-auth-adapter-SK3N3OSS.js → postgres-auth-adapter-QKBNXVPT.js} +1 -1
  70. package/dist/{postgres-auth-adapter-ZO6HK5AK.cjs → postgres-auth-adapter-WMLM4UUC.cjs} +1 -1
  71. package/dist/{redis-adapter-EGMUN65D.cjs → redis-adapter-EVK2SMKH.cjs} +1 -1
  72. package/dist/{redis-adapter-QPCTMF55.js → redis-adapter-LY2NBSAG.js} +1 -1
  73. package/dist/rest/index.cjs +1 -1
  74. package/dist/rest/index.d.cts +4 -4
  75. package/dist/rest/index.d.ts +4 -4
  76. package/dist/rest/index.js +1 -1
  77. package/dist/{sqlite-adapter-MNNZZXGX.cjs → sqlite-adapter-KPSISY6E.cjs} +1 -1
  78. package/dist/{sqlite-adapter-52PL52VU.js → sqlite-adapter-PI6SIY7O.js} +1 -1
  79. package/dist/templates/index.cjs +1 -1
  80. package/dist/templates/index.d.cts +2 -2
  81. package/dist/templates/index.d.ts +2 -2
  82. package/dist/templates/index.js +1 -1
  83. package/dist/trpc/index.d.cts +3 -3
  84. package/dist/trpc/index.d.ts +3 -3
  85. package/dist/{types-Bii0bhUV.d.ts → types-C3QFX0l6.d.cts} +5 -0
  86. package/dist/{types-B9oXBEKI.d.cts → types-C3QFX0l6.d.ts} +5 -1
  87. package/dist/{types-Cdssrcbz.d.cts → types-CKWnrUAh.d.ts} +23 -2
  88. package/dist/{types-BRDBNacn.d.ts → types-CdwfDpyW.d.cts} +23 -2
  89. package/package.json +2 -2
  90. package/dist/WebhookService-BcuD8tnn.d.cts +0 -143
  91. package/dist/WebhookService-CFe6Zd0_.d.cts +0 -143
  92. package/dist/WebhookService-CVXmjbtQ.d.cts +0 -143
  93. package/dist/WebhookService-D5PSI5t6.d.cts +0 -143
  94. package/dist/WebhookService-DPCCn_12.d.ts +0 -143
  95. package/dist/WebhookService-Dk1lzSrG.d.cts +0 -143
  96. package/dist/WebhookService-Dncnbgm9.d.cts +0 -143
  97. package/dist/WebhookService-I6hdue2Y.d.ts +0 -143
  98. package/dist/WebhookService-KnQ2UDlW.d.ts +0 -143
  99. package/dist/WebhookService-UY5p89Bj.d.ts +0 -143
  100. package/dist/WebhookService-YZXBCRXA.d.ts +0 -143
  101. package/dist/WebhookService-fk0FGRlk.d.ts +0 -143
  102. package/dist/WebhookService-vsFnWrOh.d.ts +0 -143
  103. package/dist/WebhookService-zrDmAx7L.d.cts +0 -143
  104. package/dist/base-B--L0lCn.d.cts +0 -218
  105. package/dist/base-B-siit_y.d.cts +0 -218
  106. package/dist/base-B8SyZI4D.d.ts +0 -218
  107. package/dist/base-BHRGJ40F.d.cts +0 -218
  108. package/dist/base-BVoDPNjJ.d.cts +0 -218
  109. package/dist/base-BfPaVEAE.d.cts +0 -218
  110. package/dist/base-BxrX5EPU.d.cts +0 -218
  111. package/dist/base-CAb9EYQs.d.ts +0 -218
  112. package/dist/base-CcZIEll-.d.ts +0 -218
  113. package/dist/base-CyG7aF1e.d.cts +0 -218
  114. package/dist/base-DOImeJ-F.d.ts +0 -218
  115. package/dist/base-DbnwE42-.d.cts +0 -218
  116. package/dist/base-NyiSsD-n.d.ts +0 -218
  117. package/dist/base-xflndGDO.d.ts +0 -218
  118. package/dist/bootstrap-E24SGUJP.cjs +0 -1
  119. package/dist/bootstrap-QVKSKXJF.cjs +0 -1
  120. package/dist/bootstrap-RILR44UM.cjs +0 -1
  121. package/dist/bootstrap-YFVE7MRG.js +0 -1
  122. package/dist/bootstrap-ZRRUPRUR.js +0 -1
  123. package/dist/chunk-2FSOHXOU.cjs +0 -56
  124. package/dist/chunk-2PXXQKN3.cjs +0 -3
  125. package/dist/chunk-355R4LS5.cjs +0 -56
  126. package/dist/chunk-35IVNLMA.js +0 -122
  127. package/dist/chunk-3U6MKWET.cjs +0 -120
  128. package/dist/chunk-4YCI3HBD.js +0 -3
  129. package/dist/chunk-4ZWLNGLS.js +0 -2
  130. package/dist/chunk-5A7E7N4B.cjs +0 -431
  131. package/dist/chunk-5ZEYOFAK.js +0 -2
  132. package/dist/chunk-6GGPY7U2.js +0 -4
  133. package/dist/chunk-73Y63IPP.js +0 -57
  134. package/dist/chunk-7DUKWHRN.cjs +0 -1
  135. package/dist/chunk-7K6ZUNJM.js +0 -4
  136. package/dist/chunk-7LLCXY5O.cjs +0 -19
  137. package/dist/chunk-A35ZP72D.cjs +0 -132
  138. package/dist/chunk-A3IOQOV6.js +0 -2
  139. package/dist/chunk-A3XVL6ED.cjs +0 -3
  140. package/dist/chunk-APDQ6ZTG.cjs +0 -120
  141. package/dist/chunk-AWQGDMOE.js +0 -3
  142. package/dist/chunk-B3BSVEFC.cjs +0 -3
  143. package/dist/chunk-B4AC23SG.js +0 -122
  144. package/dist/chunk-BD6XHMMM.cjs +0 -2
  145. package/dist/chunk-CHYVUWZ3.js +0 -2
  146. package/dist/chunk-CIVA6SKW.js +0 -2
  147. package/dist/chunk-CNHUCCQJ.js +0 -121
  148. package/dist/chunk-CRP6PSCE.js +0 -2
  149. package/dist/chunk-DI6TCZSE.js +0 -122
  150. package/dist/chunk-DORUYZQV.cjs +0 -1
  151. package/dist/chunk-EFKEVWAD.js +0 -4
  152. package/dist/chunk-EI7FRSNY.js +0 -57
  153. package/dist/chunk-EON4XLKQ.cjs +0 -1
  154. package/dist/chunk-EUQAOYEO.cjs +0 -121
  155. package/dist/chunk-EVAUBT7H.js +0 -57
  156. package/dist/chunk-EYHD7HZE.cjs +0 -1
  157. package/dist/chunk-EYYIPA5N.js +0 -432
  158. package/dist/chunk-FBWLSWZ4.js +0 -122
  159. package/dist/chunk-FDKU7HJX.js +0 -2
  160. package/dist/chunk-FG3IFGJP.cjs +0 -1
  161. package/dist/chunk-FGN6IMPY.cjs +0 -3
  162. package/dist/chunk-FLS2FJM6.cjs +0 -431
  163. package/dist/chunk-FP5UK272.cjs +0 -1
  164. package/dist/chunk-FSL3NLRT.cjs +0 -2
  165. package/dist/chunk-FUFS65Q5.js +0 -133
  166. package/dist/chunk-GWIZT2P5.js +0 -57
  167. package/dist/chunk-H3FJ54KB.cjs +0 -121
  168. package/dist/chunk-HY3EAWB2.js +0 -4
  169. package/dist/chunk-IQSF6XRV.js +0 -57
  170. package/dist/chunk-IXGDTAES.js +0 -4
  171. package/dist/chunk-JCEJ4VTN.js +0 -20
  172. package/dist/chunk-LPFRMQFQ.js +0 -121
  173. package/dist/chunk-LYU44UNN.cjs +0 -56
  174. package/dist/chunk-MFNN5DYG.cjs +0 -1
  175. package/dist/chunk-MJAODEFC.cjs +0 -121
  176. package/dist/chunk-MSC4G2HF.cjs +0 -2
  177. package/dist/chunk-N2YHO2WI.cjs +0 -3
  178. package/dist/chunk-NPBXLPOP.js +0 -3
  179. package/dist/chunk-ON5XJEPO.cjs +0 -3
  180. package/dist/chunk-OT2Z4XBD.cjs +0 -1
  181. package/dist/chunk-PFKVHUOT.js +0 -432
  182. package/dist/chunk-PFTBTWSC.cjs +0 -1
  183. package/dist/chunk-PZDLPRJF.js +0 -4
  184. package/dist/chunk-QC4YXUBT.cjs +0 -383
  185. package/dist/chunk-QUTYCUST.js +0 -4
  186. package/dist/chunk-REKKBAQX.cjs +0 -56
  187. package/dist/chunk-RTNQP6BV.js +0 -2
  188. package/dist/chunk-RUJW47ZJ.js +0 -2
  189. package/dist/chunk-RXYCFZJC.cjs +0 -121
  190. package/dist/chunk-S2MZNEBQ.cjs +0 -1
  191. package/dist/chunk-S73YERS2.js +0 -57
  192. package/dist/chunk-T3DJ3UTP.cjs +0 -121
  193. package/dist/chunk-TJZO7ZSX.cjs +0 -3
  194. package/dist/chunk-TKUNRCRH.js +0 -4
  195. package/dist/chunk-TQLCOMKC.js +0 -4
  196. package/dist/chunk-TRXYDWGE.cjs +0 -1
  197. package/dist/chunk-TS55CUNJ.js +0 -57
  198. package/dist/chunk-UFBJ3WOZ.js +0 -2
  199. package/dist/chunk-UQRVQUVR.js +0 -2
  200. package/dist/chunk-UW5W35NP.js +0 -122
  201. package/dist/chunk-VI7WCO2J.cjs +0 -3
  202. package/dist/chunk-VTOL3URF.js +0 -4
  203. package/dist/chunk-VVVCCB6R.js +0 -2
  204. package/dist/chunk-W2GPP6RB.js +0 -122
  205. package/dist/chunk-WHOA7YJU.cjs +0 -1
  206. package/dist/chunk-WNRUPL26.js +0 -2
  207. package/dist/chunk-XIAJQLGS.js +0 -2
  208. package/dist/chunk-XK6UB77Q.js +0 -4
  209. package/dist/chunk-Y2VHO66Q.cjs +0 -3
  210. package/dist/chunk-Y5O2OD7J.cjs +0 -3
  211. package/dist/chunk-YARB43JG.cjs +0 -56
  212. package/dist/chunk-YLCEMVYY.cjs +0 -56
  213. package/dist/chunk-YSOM57GK.cjs +0 -3
  214. package/dist/chunk-Z3UVDGYS.cjs +0 -56
  215. package/dist/chunk-ZO3YB5DK.cjs +0 -1
  216. package/dist/chunk-ZOVH6QT5.cjs +0 -1
  217. package/dist/chunk-ZRIBWDYJ.js +0 -384
  218. package/dist/chunk-ZWDBPEXL.js +0 -115
  219. package/dist/index-B9BFNOHd.d.cts +0 -105
  220. package/dist/index-BMcYFpTv.d.cts +0 -105
  221. package/dist/index-ByOM1Y5x.d.ts +0 -105
  222. package/dist/index-C6xmtRio.d.cts +0 -105
  223. package/dist/index-CTI3K_uq.d.cts +0 -105
  224. package/dist/index-CTL4zv_u.d.ts +0 -105
  225. package/dist/index-CaDbioSg.d.ts +0 -105
  226. package/dist/index-CxA9uOv0.d.ts +0 -105
  227. package/dist/index-D6AXbuPI.d.ts +0 -105
  228. package/dist/index-DF0KDBaM.d.cts +0 -105
  229. package/dist/index-DG4Xu7gA.d.cts +0 -105
  230. package/dist/index-DS3DpJli.d.cts +0 -105
  231. package/dist/index-eHex8Iwj.d.ts +0 -105
  232. package/dist/index-rm7uyOK1.d.cts +0 -105
  233. package/dist/lib-5QYYN6ML.cjs +0 -12
  234. package/dist/lib-XXYYUPMW.js +0 -13
  235. package/dist/local-S5VA7IXE.cjs +0 -1
  236. package/dist/local-T7GISZBL.js +0 -1
  237. package/dist/mongo-auth-adapter-GR2CFFEA.js +0 -1
  238. package/dist/mongo-auth-adapter-UOO2LZUJ.cjs +0 -1
  239. package/dist/nodemailer-transport-CHO2WKIY.js +0 -1
  240. package/dist/nodemailer-transport-ED2IXNGW.cjs +0 -1
  241. package/dist/types-6ShQp2EM.d.cts +0 -839
  242. package/dist/types-B5Qz1svz.d.cts +0 -822
  243. package/dist/types-B9oXBEKI.d.ts +0 -330
  244. package/dist/types-Bii0bhUV.d.cts +0 -329
  245. package/dist/types-Bt2_ycUO.d.ts +0 -811
  246. package/dist/types-C4wXHImf.d.ts +0 -822
  247. package/dist/types-C8yIAV6K.d.cts +0 -839
  248. package/dist/types-CORUQhY-.d.ts +0 -839
  249. package/dist/types-CjGqxBd3.d.cts +0 -330
  250. package/dist/types-CjGqxBd3.d.ts +0 -330
  251. package/dist/types-DBGR-eQl.d.cts +0 -839
  252. package/dist/types-DCWgPFmi.d.cts +0 -822
  253. package/dist/types-DROqAsr0.d.cts +0 -330
  254. package/dist/types-DROqAsr0.d.ts +0 -330
  255. package/dist/types-DlGSbh7I.d.cts +0 -297
  256. package/dist/types-DlGSbh7I.d.ts +0 -297
  257. package/dist/types-DsF64Wrc.d.cts +0 -811
  258. package/dist/types-IeKFn7Ky.d.ts +0 -839
  259. package/dist/types-ZrjEVWfi.d.ts +0 -811
  260. package/dist/types-dEy5JxvN.d.ts +0 -822
  261. package/dist/types-tVJc9YbX.d.cts +0 -811
  262. package/dist/types-zt5qIvje.d.ts +0 -839
package/dist/index.d.ts CHANGED
@@ -1,20 +1,20 @@
1
1
  import * as hono from 'hono';
2
2
  import * as hono_types from 'hono/types';
3
- import { R as Registry } from './index-NGnJpSgf.js';
4
- export { c as createRegistry, g as getRegistry, r as resetRegistry } from './index-NGnJpSgf.js';
5
- import { a as StorageProvider, C as CollectionConfig, G as GlobalConfig, B as BaseAdapter, P as PluginManager, h as KyroConfig, i as User, R as Request$1, F as FindArgs, b as FindResult, c as FindByIDArgs, d as CreateArgs, U as UpdateArgs, D as DeleteArgs, e as FindOneArgs, f as FindVersionsArgs, V as VersionRecord, g as CreateVersionArgs } from './types-BCOhfwHC.js';
6
- export { A as AccessArgs, j as AccessControl, k as AdapterConfig, l as AdminConfig, m as AnalyticsPlugin, n as AuthConfig, o as CollectionAccess, p as CollectionHooks, q as CommentsPlugin, r as ConfigService, s as CreateResult, E as EmailConfig, t as FieldAccess, u as FieldHooks, v as GlobalAccess, w as GlobalHooks, H as HierarchyConfig, x as Hook, y as HookArgs, I as ImageSize, K as KyroPlugin, O as OrganizationConfig, z as PluginAPI, J as PluginHooks, L as ProjectConfig, M as ReviewsPlugin, N as SEOPlugin, Q as SmartViewConfig, S as StorageConfig, W as UploadConfig, X as VersionConfig, Y as WhereClause, Z as WishlistPlugin, _ as evaluateAccess, $ as getWhereClause, a0 as mergeWhereClauses, a1 as presetPlugins, a2 as resolveProvider, a3 as runFieldHooks, a4 as runHooks } from './types-BCOhfwHC.js';
3
+ import { R as Registry } from './index-C9uBoJtm.js';
4
+ export { c as createRegistry, g as getRegistry, r as resetRegistry } from './index-C9uBoJtm.js';
5
+ import { a as StorageProvider, C as CollectionConfig, G as GlobalConfig, B as BaseAdapter, P as PluginManager, h as KyroConfig, i as User, R as Request$1, F as FindArgs, b as FindResult, c as FindByIDArgs, d as CreateArgs, U as UpdateArgs, D as DeleteArgs, e as FindOneArgs, f as FindVersionsArgs, V as VersionRecord, g as CreateVersionArgs } from './types-CKWnrUAh.js';
6
+ export { A as AccessArgs, j as AccessControl, k as AdapterConfig, l as AdminConfig, m as AnalyticsPlugin, n as AuthConfig, o as CollectionAccess, p as CollectionHooks, q as CommentsPlugin, r as ConfigService, s as CreateResult, E as EmailConfig, t as ExperimentalConfig, u as FieldAccess, v as FieldHooks, w as GlobalAccess, x as GlobalHooks, H as HierarchyConfig, y as Hook, z as HookArgs, I as ImageSize, K as KyroPlugin, O as OrganizationConfig, J as PluginAPI, L as PluginHooks, M as ProjectConfig, N as ReviewsPlugin, Q as SEOPlugin, W as SmartViewConfig, S as StorageConfig, X as UploadConfig, Y as VersionConfig, Z as WhereClause, _ as WishlistPlugin, $ as evaluateAccess, a0 as getWhereClause, a1 as mergeWhereClauses, a2 as presetPlugins, a3 as resolveProvider, a4 as runFieldHooks, a5 as runHooks } from './types-CKWnrUAh.js';
7
7
  import { KyroPubSub, KyroWSServer } from './ws/index.js';
8
8
  export { PubSub, createWSServer } from './ws/index.js';
9
- import { W as WebhookPayload, D as DeliveryResult, a as WebhookDelivery, b as WebhookConfig, c as DeliveryOptions, d as WebhookService } from './WebhookService-CNC1lYz7.js';
10
- export { A as ALL_WEBHOOK_EVENTS, C as CreateWebhookData, U as UpdateWebhookData, e as WEBHOOK_COLLECTION, f as WEBHOOK_DELIVERY_COLLECTION, g as WEBHOOK_EVENTS, h as WebhookEvent, i as WebhookTriggerResult, j as createWebhookService } from './WebhookService-CNC1lYz7.js';
11
- import { F as Field } from './types-DxaK39ix.js';
12
- export { A as ALL_FIELD_TYPES, b as ArrayField, B as BaseField, c as Block, f as BlocksField, C as COMPLEX_FIELD_TYPES, h as CheckboxField, i as CodeField, j as CollapsibleField, k as ColorField, D as DateField, E as EmailField, o as FieldAdmin, p as FieldType, G as GroupField, q as ImageField, J as JSONField, L as LAYOUT_FIELD_TYPES, M as MarkdownField, N as NumberField, P as PRIMITIVE_FIELD_TYPES, s as PasswordField, R as RELATIONAL_FIELD_TYPES, t as RadioField, u as RelationshipField, v as RichTextBlock, w as RichTextField, x as RowField, y as SelectField, T as TabsField, z as TextField, O as TextareaField, U as UploadField, V as ValidateOptions, W as isArrayField, X as isBlocksField, Z as isGroupField, $ as isImageField, a0 as isLayoutField, a1 as isNumberField, a2 as isRelationshipField, a3 as isRichTextField, a4 as isSelectField, a5 as isTextField, a6 as isUploadField } from './types-DxaK39ix.js';
9
+ import { W as WebhookPayload, D as DeliveryResult, a as WebhookDelivery, b as WebhookConfig, c as DeliveryOptions, d as WebhookService } from './WebhookService-Bqr_66lK.js';
10
+ export { A as ALL_WEBHOOK_EVENTS, C as CreateWebhookData, U as UpdateWebhookData, e as WEBHOOK_COLLECTION, f as WEBHOOK_DELIVERY_COLLECTION, g as WEBHOOK_EVENTS, h as WebhookEvent, i as WebhookTriggerResult, j as createWebhookService } from './WebhookService-Bqr_66lK.js';
11
+ import { F as Field } from './types-C3QFX0l6.js';
12
+ export { A as ALL_FIELD_TYPES, b as ArrayField, B as BaseField, c as Block, f as BlocksField, C as COMPLEX_FIELD_TYPES, h as CheckboxField, i as CodeField, j as CollapsibleField, k as ColorField, D as DateField, E as EmailField, o as FieldAdmin, p as FieldType, G as GroupField, q as ImageField, J as JSONField, L as LAYOUT_FIELD_TYPES, M as MarkdownField, N as NumberField, P as PRIMITIVE_FIELD_TYPES, s as PasswordField, R as RELATIONAL_FIELD_TYPES, t as RadioField, u as RelationshipField, v as RichTextBlock, w as RichTextField, x as RowField, y as SelectField, T as TabsField, z as TextField, O as TextareaField, U as UploadField, V as ValidateOptions, W as isArrayField, X as isBlocksField, Z as isGroupField, $ as isImageField, a0 as isLayoutField, a1 as isNumberField, a2 as isRelationshipField, a3 as isRichTextField, a4 as isSelectField, a5 as isTextField, a6 as isUploadField } from './types-C3QFX0l6.js';
13
13
  import { ZodTypeAny, z } from 'zod';
14
14
  export { z } from 'zod';
15
15
  export { n as normalizeRichTextValue, r as renderRichText, a as richTextStyles } from './richtext-DrhORshE.js';
16
- import { A as AuditLog, a as AuditLogFilter, b as AbstractBaseAdapter, c as AuthAdapter, U as UserRole, d as AuthUser, S as Session, e as AuthTokenConfig, R as RegisterData, f as AuthResult, L as LoginCredentials, J as JWTPayload } from './base-OYfoYPYP.js';
17
- export { g as AuditAction } from './base-OYfoYPYP.js';
16
+ import { A as AuditLog, a as AuditLogFilter, b as AbstractBaseAdapter, c as AuthAdapter, U as UserRole, d as AuthUser, S as Session, e as AuthTokenConfig, R as RegisterData, f as AuthResult, L as LoginCredentials, J as JWTPayload } from './base-C2DOe8wD.js';
17
+ export { g as AuditAction } from './base-C2DOe8wD.js';
18
18
  import { Dialect } from './drizzle/index.js';
19
19
  export { DrizzleAdapter, PostgresAuthAdapter, collectionToDrizzleSchema, createDatabase, createDrizzleAdapter, fieldToDrizzleType, runMigrations, seedDefaultRoles } from './drizzle/index.js';
20
20
  export { MongoDBAdapter, MongoDBAuthAdapter, createMongoDBAdapter } from './mongodb/index.js';
@@ -1060,8 +1060,11 @@ declare class InMemoryAuthAdapter implements AuthAdapter {
1060
1060
  createUser(data: {
1061
1061
  email: string;
1062
1062
  password: string;
1063
+ name?: string;
1063
1064
  role?: UserRole;
1065
+ avatar?: string;
1064
1066
  tenantId?: string;
1067
+ metadata?: Record<string, unknown>;
1065
1068
  }): Promise<AuthUser>;
1066
1069
  findUserByEmail(email: string): Promise<AuthUser | null>;
1067
1070
  findUserById(userId: string): Promise<AuthUser | null>;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export{a as LocalAdapter,b as createLocalAdapter}from'./chunk-PTPVFLET.js';export{a as RedisAuthAdapter}from'./chunk-M75VGFCI.js';import {a as a$6}from'./chunk-RPRGGGIW.js';export{k as allGlobalSettings,q as blogCollections,l as coreGlobalSettings,V as createTemplateConfig,r as ecommerceCollections,s as ecommerceGlobals,t as kitchenSinkCollections,v as mediaCollections,a as minimalCollections,U as templateCollections}from'./chunk-E4H3ZZ7U.js';export{r as ALL_FIELD_TYPES,o as COMPLEX_FIELD_TYPES,q as LAYOUT_FIELD_TYPES,n as PRIMITIVE_FIELD_TYPES,p as RELATIONAL_FIELD_TYPES,d as isArrayField,f as isBlocksField,e as isGroupField,h as isImageField,k as isLayoutField,b as isNumberField,c as isRelationshipField,i as isRichTextField,j as isSelectField,a as isTextField,g as isUploadField,u as normalizeRichTextValue,v as renderRichText,t as richTextStyles}from'./chunk-4BMWWGJN.js';export{a as kyro}from'./chunk-XDPLVJRO.js';import {f}from'./chunk-SMQ6736Y.js';export{t as AnalyticsPlugin,u as CommentsPlugin,a as ConfigValidationError,y as FIELD_DEFINITION_KEYS,G as Kyro,q as KyroPlugin,J as Logger,r as PluginManager,m as Registry,v as ReviewsPlugin,s as SEOPlugin,w as WishlistPlugin,C as applyBlocksOverrides,E as applyCollectionOverrides,F as applyGlobalOverrides,D as applyTabsOverrides,i as collectionToCreateZod,j as collectionToUpdateZod,k as collectionToWhereZod,h as collectionToZod,H as createKyro,I as createKyroHandler,p as createRegistry,g as fieldToZod,A as flattenFieldOverrides,n as getRegistry,l as globalToZod,z as isFieldOverrideDefinition,K as logger,x as presetPlugins,o as resetRegistry,B as updateFieldByPath,b as validateCollection,e as validateConfig,d as validateFields,c as validateGlobal,f as z}from'./chunk-SMQ6736Y.js';export{e as autoBootstrap,a as bootstrapAdmin,f as bootstrapWithRetry,d as getBootstrapFromEnv}from'./chunk-ATI2UZ7U.js';import'./chunk-LWM4WABU.js';import'./chunk-D6SDGHY6.js';export{a as createContext,g as createCountProcedure,d as createCreateProcedure,f as createDeleteProcedure,h as createDynamicRouter,c as createFindByIDProcedure,b as createFindProcedure,i as createKyroServer,e as createUpdateProcedure}from'./chunk-RYHOWZLK.js';export{J as buildGraphQLSchema,K as createGraphQLSchema}from'./chunk-X473JI7Z.js';import {bb,ab,db,eb}from'./chunk-B4AC23SG.js';export{bb as AuditLogger,db as InMemoryAuditLogger,ab as InMemoryRateLimiter,gb as MediaService,cb as createAuditContext,ib as createKyroApp,_a as createLocalStorage,jb as createRESTAPI,fb as isEdgeRuntime,Za as resolveProvider}from'./chunk-B4AC23SG.js';import {a}from'./chunk-3KZXF4US.js';export{a as PasswordPolicy}from'./chunk-3KZXF4US.js';import {q}from'./chunk-CH4TZZI5.js';export{p as ConfigService,q as EmailTransport,o as getEmailTemplates,n as renderAbandonedCart,g as renderAccountLocked,a as renderBaseLayout,f as renderMagicLink,i as renderNewLogin,j as renderOrderConfirmation,l as renderOrderDelivered,m as renderOrderRefunded,k as renderOrderShipped,e as renderPasswordChanged,c as renderResetPassword,h as renderUserInvite,b as renderVerifyEmail,d as renderWelcome}from'./chunk-CH4TZZI5.js';import'./chunk-OLRCZ6E3.js';import {a as a$3}from'./chunk-N6MNQIQU.js';export{a as SQLiteAuthAdapter}from'./chunk-N6MNQIQU.js';import {f as f$1}from'./chunk-6TPICJ2L.js';export{c as getAppSecret,d as getEncryptionKey,e as getSessionConfig,b as loadSecrets,a as setDbAdapter}from'./chunk-6TPICJ2L.js';import'./chunk-YENNL5HG.js';import'./chunk-W45TLOOT.js';import'./chunk-IKGVPXMK.js';import'./chunk-YUUXFD73.js';import'./chunk-LVBHOZZF.js';import'./chunk-OBYAIJVU.js';import'./chunk-JRUQ5ABB.js';import'./chunk-CIVA6SKW.js';import'./chunk-WPM6LFCY.js';import'./chunk-U6KFONKM.js';import'./chunk-TYQYKKWJ.js';export{d as ALL_WEBHOOK_EVENTS,e as WEBHOOK_COLLECTION,f as WEBHOOK_DELIVERY_COLLECTION,c as WEBHOOK_EVENTS,m as WebhookService,k as buildDeliveryRecord,l as createTestPayload,n as createWebhookService,i as deliverWebhook,j as deliverWithRetry,h as generateWebhookSecret,g as signPayload}from'./chunk-REQ622YC.js';export{h as evaluateAccess,j as getWhereClause,i as mergeWhereClauses}from'./chunk-GQGFNTDZ.js';export{b as KyroPubSub,d as KyroWSServer,a as PubSub,e as createWSServer}from'./chunk-KEITOXIP.js';import'./chunk-7MNDQU6K.js';export{c as DrizzleAdapter,b as collectionToDrizzleSchema,d as createDrizzleAdapter,a as fieldToDrizzleType}from'./chunk-6NBZDW53.js';import'./chunk-JV4HJBXW.js';export{b as createDatabase,c as runMigrations,d as seedDefaultRoles}from'./chunk-ZAKYTBEN.js';import {a as a$4}from'./chunk-ZWDBPEXL.js';export{a as PostgresAuthAdapter}from'./chunk-ZWDBPEXL.js';import'./chunk-47CXBWMA.js';import'./chunk-3TAUNYEM.js';import'./chunk-N5POANYV.js';import'./chunk-2HA6EKXX.js';import'./chunk-FLMUMPDE.js';import'./chunk-EML5FDUU.js';import'./chunk-HRAY65XH.js';import'./chunk-3NSZZCOJ.js';export{a as MongoDBAdapter,b as createMongoDBAdapter}from'./chunk-FK2BG4HU.js';import'./chunk-WXT2XW7T.js';import {a as a$2}from'./chunk-XIAJQLGS.js';export{a as MongoDBAuthAdapter}from'./chunk-XIAJQLGS.js';import {a as a$5}from'./chunk-SLMIYECU.js';export{a as AbstractBaseAdapter}from'./chunk-SLMIYECU.js';import {a as a$1}from'./chunk-P6JITOFF.js';import'./chunk-7NH7H3WA.js';import'./chunk-JA44K75G.js';import'./chunk-TBHNE4VV.js';import {g}from'./chunk-Y2YAKDEQ.js';import oe,{randomBytes}from'crypto';import {readFileSync}from'fs';import tt,{join,resolve}from'path';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
1
+ export{a as LocalAdapter,b as createLocalAdapter}from'./chunk-6LWF5MPL.js';export{a as RedisAuthAdapter}from'./chunk-HPIJI7TM.js';import {a as a$6}from'./chunk-RPRGGGIW.js';export{k as allGlobalSettings,q as blogCollections,l as coreGlobalSettings,V as createTemplateConfig,r as ecommerceCollections,s as ecommerceGlobals,t as kitchenSinkCollections,v as mediaCollections,a as minimalCollections,U as templateCollections}from'./chunk-SRIXRJHL.js';export{r as ALL_FIELD_TYPES,o as COMPLEX_FIELD_TYPES,q as LAYOUT_FIELD_TYPES,n as PRIMITIVE_FIELD_TYPES,p as RELATIONAL_FIELD_TYPES,d as isArrayField,f as isBlocksField,e as isGroupField,h as isImageField,k as isLayoutField,b as isNumberField,c as isRelationshipField,i as isRichTextField,j as isSelectField,a as isTextField,g as isUploadField,u as normalizeRichTextValue,v as renderRichText,t as richTextStyles}from'./chunk-4BMWWGJN.js';export{a as kyro}from'./chunk-XDPLVJRO.js';import {f}from'./chunk-YIFKTA5N.js';export{t as AnalyticsPlugin,u as CommentsPlugin,a as ConfigValidationError,y as FIELD_DEFINITION_KEYS,G as Kyro,q as KyroPlugin,J as Logger,r as PluginManager,m as Registry,v as ReviewsPlugin,s as SEOPlugin,w as WishlistPlugin,C as applyBlocksOverrides,E as applyCollectionOverrides,F as applyGlobalOverrides,D as applyTabsOverrides,i as collectionToCreateZod,j as collectionToUpdateZod,k as collectionToWhereZod,h as collectionToZod,H as createKyro,I as createKyroHandler,p as createRegistry,g as fieldToZod,A as flattenFieldOverrides,n as getRegistry,l as globalToZod,z as isFieldOverrideDefinition,K as logger,x as presetPlugins,o as resetRegistry,B as updateFieldByPath,b as validateCollection,e as validateConfig,d as validateFields,c as validateGlobal,f as z}from'./chunk-YIFKTA5N.js';export{e as autoBootstrap,a as bootstrapAdmin,f as bootstrapWithRetry,d as getBootstrapFromEnv}from'./chunk-RYXLEFS5.js';import'./chunk-LWM4WABU.js';import'./chunk-D6SDGHY6.js';export{a as createContext,g as createCountProcedure,d as createCreateProcedure,f as createDeleteProcedure,h as createDynamicRouter,c as createFindByIDProcedure,b as createFindProcedure,i as createKyroServer,e as createUpdateProcedure}from'./chunk-RYHOWZLK.js';export{J as buildGraphQLSchema,K as createGraphQLSchema}from'./chunk-X473JI7Z.js';import {bb,ab,db,eb}from'./chunk-2TYITUOC.js';export{bb as AuditLogger,db as InMemoryAuditLogger,ab as InMemoryRateLimiter,gb as MediaService,cb as createAuditContext,ib as createKyroApp,_a as createLocalStorage,jb as createRESTAPI,fb as isEdgeRuntime,Za as resolveProvider}from'./chunk-2TYITUOC.js';import {a}from'./chunk-3KZXF4US.js';export{a as PasswordPolicy}from'./chunk-3KZXF4US.js';import {q}from'./chunk-CH4TZZI5.js';export{p as ConfigService,q as EmailTransport,o as getEmailTemplates,n as renderAbandonedCart,g as renderAccountLocked,a as renderBaseLayout,f as renderMagicLink,i as renderNewLogin,j as renderOrderConfirmation,l as renderOrderDelivered,m as renderOrderRefunded,k as renderOrderShipped,e as renderPasswordChanged,c as renderResetPassword,h as renderUserInvite,b as renderVerifyEmail,d as renderWelcome}from'./chunk-CH4TZZI5.js';import'./chunk-OLRCZ6E3.js';import {a as a$3}from'./chunk-WNU76M2C.js';export{a as SQLiteAuthAdapter}from'./chunk-WNU76M2C.js';import {f as f$1}from'./chunk-6TPICJ2L.js';export{c as getAppSecret,d as getEncryptionKey,e as getSessionConfig,b as loadSecrets,a as setDbAdapter}from'./chunk-6TPICJ2L.js';import'./chunk-YENNL5HG.js';import'./chunk-W45TLOOT.js';import'./chunk-IKGVPXMK.js';import'./chunk-YUUXFD73.js';import'./chunk-LVBHOZZF.js';import'./chunk-OBYAIJVU.js';import'./chunk-JRUQ5ABB.js';import'./chunk-V4FAL7AG.js';import'./chunk-WPM6LFCY.js';import'./chunk-U6KFONKM.js';import'./chunk-TYQYKKWJ.js';export{d as ALL_WEBHOOK_EVENTS,e as WEBHOOK_COLLECTION,f as WEBHOOK_DELIVERY_COLLECTION,c as WEBHOOK_EVENTS,m as WebhookService,k as buildDeliveryRecord,l as createTestPayload,n as createWebhookService,i as deliverWebhook,j as deliverWithRetry,h as generateWebhookSecret,g as signPayload}from'./chunk-REQ622YC.js';export{h as evaluateAccess,j as getWhereClause,i as mergeWhereClauses}from'./chunk-GQGFNTDZ.js';export{b as KyroPubSub,d as KyroWSServer,a as PubSub,e as createWSServer}from'./chunk-KEITOXIP.js';import'./chunk-7MNDQU6K.js';export{c as DrizzleAdapter,b as collectionToDrizzleSchema,d as createDrizzleAdapter,a as fieldToDrizzleType}from'./chunk-6NBZDW53.js';import'./chunk-JV4HJBXW.js';export{b as createDatabase,c as runMigrations,d as seedDefaultRoles}from'./chunk-ZAKYTBEN.js';import {a as a$4}from'./chunk-6E44MQQ5.js';export{a as PostgresAuthAdapter}from'./chunk-6E44MQQ5.js';import'./chunk-47CXBWMA.js';import'./chunk-3TAUNYEM.js';import'./chunk-N5POANYV.js';import'./chunk-2HA6EKXX.js';import'./chunk-FLMUMPDE.js';import'./chunk-EML5FDUU.js';import'./chunk-HRAY65XH.js';import'./chunk-3NSZZCOJ.js';export{a as MongoDBAdapter,b as createMongoDBAdapter}from'./chunk-FK2BG4HU.js';import'./chunk-WXT2XW7T.js';import {a as a$2}from'./chunk-YGI5W4RS.js';export{a as MongoDBAuthAdapter}from'./chunk-YGI5W4RS.js';import {a as a$5}from'./chunk-SLMIYECU.js';export{a as AbstractBaseAdapter}from'./chunk-SLMIYECU.js';import {a as a$1}from'./chunk-P6JITOFF.js';import'./chunk-7NH7H3WA.js';import'./chunk-JA44K75G.js';import'./chunk-TBHNE4VV.js';import {g}from'./chunk-Y2YAKDEQ.js';import oe,{randomBytes}from'crypto';import {readFileSync}from'fs';import tt,{join,resolve}from'path';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
2
2
  g();g();g();g();async function Be(n,e){let t=e.data;for(let r of n){let o=await r({...e,data:t});o!==void 0&&(t=o);}return t}async function Wr(n,e){return Be(n,e)}g();g();var U=class extends a$5{connectionString;constructor(e){super(),this.connectionString=e.connectionString;}async connect(){this.connected=true;}async disconnect(){this.connected=false;}async query(e,t=[]){if(!this.connectionString)throw new Error("NeonAdapter: Connection string is required.");try{let r=await fetch(`${this.connectionString}/sql`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:e,params:t})});return r.ok?(await r.json()).rows||[]:[]}catch{return []}}async find(e){return {docs:[],totalDocs:0,limit:e.limit||10,totalPages:1,page:e.page||1,hasNextPage:false,hasPrevPage:false}}async findByID(e){return null}async create(e){return e.data}async update(e){return e.data}async delete(e){return {success:true,id:e.id}}async count(e){return 0}async findOne(e){return null}async findVersions(e){return {docs:[],totalDocs:0,limit:10,totalPages:1,page:1,hasNextPage:false,hasPrevPage:false}}async findVersionByID(e){return null}async createVersion(e){return {id:"v1",parentId:e.documentId,version:e.version||1,snapshot:e.snapshot||{},createdAt:new Date().toISOString()}}async updateLatestVersion(e){return {id:"v1",parentId:e.documentId,version:e.version||1,snapshot:e.snapshot||{},createdAt:new Date().toISOString()}}async deleteVersions(e){}};function Ne(n){return new U(n)}g();var V=class extends a$5{url;authToken;constructor(e){super(),this.url=e.url.replace(/^libsql:\/\//,"https://"),this.authToken=e.authToken;}async connect(){this.connected=true;}async disconnect(){this.connected=false;}async query(e,t=[]){if(!this.url)throw new Error("TursoAdapter: Database URL is required.");try{let r={"Content-Type":"application/json"};this.authToken&&(r.Authorization=`Bearer ${this.authToken}`);let o=await fetch(`${this.url}/v2/pipeline`,{method:"POST",headers:r,body:JSON.stringify({requests:[{type:"execute",stmt:{sql:e,args:t.map(l=>({type:"text",value:String(l)}))}},{type:"close"}]})});if(!o.ok)return [];let i=(await o.json())?.results?.[0]?.response?.result;if(!i||!i.rows)return [];let c=i.cols.map(l=>l.name);return i.rows.map(l=>{let f={};return c.forEach((h,u)=>{f[h]=l[u]?.value??null;}),f})}catch{return []}}async find(e){return {docs:[],totalDocs:0,limit:e.limit||10,totalPages:1,page:e.page||1,hasNextPage:false,hasPrevPage:false}}async findByID(e){return null}async create(e){return e.data}async update(e){return e.data}async delete(e){return {success:true,id:e.id}}async count(e){return 0}async findOne(e){return null}async findVersions(e){return {docs:[],totalDocs:0,limit:10,totalPages:1,page:1,hasNextPage:false,hasPrevPage:false}}async findVersionByID(e){return null}async createVersion(e){return {id:"v1",parentId:e.documentId,version:e.version||1,snapshot:e.snapshot||{},createdAt:new Date().toISOString()}}async updateLatestVersion(e){return {id:"v1",parentId:e.documentId,version:e.version||1,snapshot:e.snapshot||{},createdAt:new Date().toISOString()}}async deleteVersions(e){}};function $e(n){return new V(n)}g();g();g();var Y=class{constructor(e){this.config=e;}config;css=[];addRule(e,t){let r=Object.entries(t).map(([o,s])=>` ${o}: ${s};`).join(`
3
3
  `);return this.css.push(`${e} {
4
4
  ${r}
@@ -18,7 +18,7 @@ ${s}
18
18
  ${n.customStyles||""}
19
19
  ${t.join(`
20
20
  `)}
21
- `}var Jr={text:{wrapper:{marginBottom:"var(--spacing-md)"},label:{display:"block",marginBottom:"var(--spacing-xs)",fontWeight:"500",color:"var(--color-text)"},input:{width:"100%",padding:"var(--spacing-sm) var(--spacing-md)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-md)",fontSize:"0.875rem"},error:{color:"var(--color-error)",fontSize:"0.75rem",marginTop:"var(--spacing-xs)"}},number:{wrapper:{marginBottom:"var(--spacing-md)"},label:{display:"block",marginBottom:"var(--spacing-xs)",fontWeight:"500"},input:{width:"100%",padding:"var(--spacing-sm) var(--spacing-md)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-md)"}},checkbox:{wrapper:{display:"flex",alignItems:"center",gap:"var(--spacing-sm)"},input:{width:"1rem",height:"1rem"},label:{cursor:"pointer"}},select:{wrapper:{marginBottom:"var(--spacing-md)"},input:{width:"100%",padding:"var(--spacing-sm) var(--spacing-md)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-md)",backgroundColor:"white"}}};g();g();var Xr={maxAttempts:5,lockDuration:9e5,notifyUser:true,notifyAdmin:true,adminNotifyAfter:3},D=class{redis;prefix;config;constructor(e,t={},r="kyro:lockout:"){this.redis=e,this.prefix=r,this.config={...Xr,...t};}lockKey(e){return `${this.prefix}${e}`}historyKey(e){return `${this.prefix}${e}:history`}async checkLockout(e){let t=this.lockKey(e),r=await this.redis.hgetall(t);if(!r||Object.keys(r).length===0)return {locked:false,attemptsRemaining:this.config.maxAttempts,totalAttempts:0};let o=parseInt(r.attempts,10),s=r.lockedUntil?new Date(parseInt(r.lockedUntil,10)):void 0;return s&&s>new Date?{locked:true,attemptsRemaining:0,lockedUntil:s,totalAttempts:o}:s&&s<=new Date?(await this.unlockAccount(e),{locked:false,attemptsRemaining:this.config.maxAttempts,totalAttempts:0}):{locked:false,attemptsRemaining:Math.max(0,this.config.maxAttempts-o),totalAttempts:o}}async recordFailedAttempt(e){let t=this.lockKey(e),r=this.historyKey(e),o=Date.now(),s=await this.redis.hincrby(t,"attempts",1);if(await this.redis.hset(t,"lastAttempt",o.toString()),await this.redis.lpush(r,o.toString()),await this.redis.ltrim(r,0,99),s>=this.config.maxAttempts){let i=new Date(o+this.config.lockDuration);return await this.redis.hset(t,{lockedAt:o.toString(),lockedUntil:i.getTime().toString()}),await this.redis.expire(t,Math.ceil(this.config.lockDuration/1e3)+3600),{locked:true,attemptsRemaining:0,lockedUntil:i,totalAttempts:s}}return {locked:false,attemptsRemaining:Math.max(0,this.config.maxAttempts-s),totalAttempts:s}}async lockAccount(e,t){let r=this.lockKey(e),o=Date.now(),s=t||this.config.lockDuration,i=new Date(o+s),c=this.redis.pipeline();c.hset(r,{attempts:this.config.maxAttempts.toString(),lockedAt:o.toString(),lockedUntil:i.getTime().toString()}),c.expire(r,Math.ceil(s/1e3)+3600),await c.exec();}async unlockAccount(e){let t=this.lockKey(e);await this.redis.del(t);}async resetAttempts(e){let t=this.lockKey(e);(await this.redis.hgetall(t)).lockedAt?await this.redis.hset(t,{attempts:"0",lockedAt:"",lockedUntil:""}):await this.redis.del(t);}async getLockoutHistory(e,t=10){let r=this.historyKey(e);return (await this.redis.lrange(r,0,t-1)).map(s=>new Date(parseInt(s,10)))}async getLockoutStats(e){let t=this.historyKey(e),r=await this.redis.lrange(t,0,-1),o=r.filter((i,c)=>(c+1)%this.config.maxAttempts===0).length,s=await this.redis.hget(this.lockKey(e),"lockedAt");return {totalFailedAttempts:r.length,lockoutCount:o,lastLockout:s?new Date(parseInt(s,10)):null,averageAttemptsBeforeLockout:o>0?this.config.maxAttempts:0}}shouldNotifyAdmin(e){return this.config.notifyAdmin&&e>=this.config.adminNotifyAfter}getConfig(){return {...this.config}}setConfig(e){this.config={...this.config,...e};}};g();var Zr={"auth:login":{window:9e5,max:5},"auth:register":{window:36e5,max:3},"auth:forgot":{window:36e5,max:3},"auth:reset":{window:36e5,max:5},"auth:verify":{window:36e5,max:5},"api:general":{window:6e4,max:100},"api:authenticated":{window:6e4,max:200}},I=class{redis;prefix;limits;userLimits;constructor(e,t,r,o="kyro:ratelimit:"){this.redis=e,this.prefix=o,this.limits={...Zr,...t},this.userLimits=r||{"user:api":{window:6e4,max:500},"user:write":{window:36e5,max:100}};}getKey(e,t){return `${this.prefix}${e}:${t}`}async check(e,t){let r=this.limits[e]||this.limits["api:general"],o=this.getKey(e,t),s=Date.now(),i=s-r.window,c=this.redis.pipeline();c.zremrangebyscore(o,0,i),c.zcard(o),c.zadd(o,s,`${s}:${Math.random()}`),c.expire(o,Math.ceil(r.window/1e3)+1);let f=(await c.exec())?.[1]?.[1]||0;if(f>=r.max){let h=await this.redis.zrange(o,0,0,"WITHSCORES"),u=h.length>1?parseInt(h[1],10)+r.window:s+r.window;return {allowed:false,remaining:0,resetAt:u,retryAfter:Math.ceil((u-s)/1e3)}}return {allowed:true,remaining:r.max-f-1,resetAt:s+r.window}}async checkUser(e,t,r){let o=this.userLimits[e]||this.userLimits["user:api"],s=this.getKey(`user:${e}:${t}`,r),i=Date.now(),c=i-o.window,l=this.redis.pipeline();l.zremrangebyscore(s,0,c),l.zcard(s),l.zadd(s,i,`${i}:${Math.random()}`),l.expire(s,Math.ceil(o.window/1e3)+1);let h=(await l.exec())?.[1]?.[1]||0;if(h>=o.max){let u=await this.redis.zrange(s,0,0,"WITHSCORES"),d=u.length>1?parseInt(u[1],10)+o.window:i+o.window;return {allowed:false,remaining:0,resetAt:d,retryAfter:Math.ceil((d-i)/1e3)}}return {allowed:true,remaining:o.max-h-1,resetAt:i+o.window}}async reset(e,t){let r=this.getKey(e,t);await this.redis.del(r);}async resetUser(e,t,r){let o=this.getKey(`user:${e}:${t}`,r);await this.redis.del(o);}async getStatus(e,t){let r=this.limits[e]||this.limits["api:general"],o=this.getKey(e,t),s=Date.now(),i=s-r.window;await this.redis.zremrangebyscore(o,0,i);let c=await this.redis.zcard(o);return {count:c,limit:r.max,remaining:Math.max(0,r.max-c),resetAt:s+r.window}}setLimit(e,t){this.limits[e]=t;}setUserLimit(e,t){this.userLimits[e]=t;}};g();g();g();var L=class{users=new Map;sessions=new Map;refreshTokens=new Map;emailToUserId=new Map;passwordHistory=new Map;emailVerificationTokens=new Map;passwordResetTokens=new Map;auditLogs=[];externalDb=false;constructor(){}async connect(){}async disconnect(){this.users.clear(),this.sessions.clear(),this.refreshTokens.clear(),this.emailToUserId.clear(),this.passwordHistory.clear();}async createUser(e){let t=randomBytes(16).toString("hex"),r=new Date().toISOString(),o=await this.hashPassword(e.password),s={id:t,email:e.email.toLowerCase(),passwordHash:o,role:e.role||"customer",tenantId:e.tenantId,createdAt:r,updatedAt:r};return this.users.set(t,s),this.emailToUserId.set(e.email.toLowerCase(),t),this.passwordHistory.set(t,[]),s}async findUserByEmail(e){let t=this.emailToUserId.get(e.toLowerCase());return t?this.findUserById(t):null}async findUserById(e){return this.users.get(e)||null}async updateUser(e,t){let r=await this.findUserById(e);if(!r)return null;let o={...r,...t,id:e,updatedAt:new Date().toISOString()};return t.email&&t.email!==r.email&&(this.emailToUserId.delete(r.email.toLowerCase()),this.emailToUserId.set(t.email.toLowerCase(),e)),this.users.set(e,o),o}async deleteUser(e){let t=await this.findUserById(e);return t?(this.users.delete(e),this.emailToUserId.delete(t.email.toLowerCase()),this.refreshTokens.forEach((r,o)=>{this.sessions.get(r)?.userId===e&&(this.refreshTokens.delete(o),this.sessions.delete(r));}),this.passwordHistory.delete(e),this.sessions.forEach((r,o)=>{r.userId===e&&this.sessions.delete(o);}),true):false}async hashPassword(e){return (await import('./bcryptjs-ZEEHSMAG.js')).default.hash(e,12)}async verifyPassword(e,t){let r=await this.findUserByEmail(e);return !r||!r.passwordHash?null:await(await import('./bcryptjs-ZEEHSMAG.js')).default.compare(t,r.passwordHash)?r:null}async createSession(e,t={}){let r=randomBytes(32).toString("hex"),o=randomBytes(32).toString("base64url"),s=randomBytes(32).toString("base64url"),i=new Date,c={id:r,userId:e,token:o,refreshToken:s,expiresAt:new Date(i.getTime()+86400*1e3).toISOString(),createdAt:i.toISOString(),ipAddress:t.ipAddress,userAgent:t.userAgent};return this.sessions.set(r,c),this.refreshTokens.set(s,r),c}async findSessionByToken(e){return this.sessions.get(e)||null}async findSessionByRefreshToken(e){let t=this.refreshTokens.get(e);return t&&this.sessions.get(t)||null}async deleteSession(e){let t=this.sessions.get(e);return t?(t.refreshToken&&this.refreshTokens.delete(t.refreshToken),this.sessions.delete(e),true):false}async deleteUserSessions(e){let t=0;return this.sessions.forEach((r,o)=>{r.userId===e&&(r.refreshToken&&this.refreshTokens.delete(r.refreshToken),this.sessions.delete(o),t++);}),t}async addPasswordToHistory(e,t){let r=this.passwordHistory.get(e)||[];r.push(t),r.length>5&&r.splice(0,r.length-5),this.passwordHistory.set(e,r);}async getPasswordHistory(e,t=5){return this.passwordHistory.get(e)||[]}async isPasswordInHistory(e,t,r=5){let o=await this.getPasswordHistory(t,r),s=(await import('./bcryptjs-ZEEHSMAG.js')).default;for(let i of o)if(await s.compare(e,i))return true;return false}async createEmailVerificationToken(e){let t=randomBytes(32).toString("hex"),r=new Date(Date.now()+1440*60*1e3);return this.emailVerificationTokens.set(t,{userId:e,expiresAt:r}),{token:t,expiresAt:r}}async verifyEmailToken(e){let t=this.emailVerificationTokens.get(e);return !t||t.expiresAt<new Date?(this.emailVerificationTokens.delete(e),{success:false,error:"Invalid or expired token"}):(this.emailVerificationTokens.delete(e),{success:true,userId:t.userId})}async createPasswordResetToken(e){let t=await this.findUserByEmail(e);if(!t)return {token:"",expiresAt:new Date,error:"User not found"};let r=randomBytes(32).toString("hex"),o=new Date(Date.now()+3600*1e3);return this.passwordResetTokens.set(r,{userId:t.id,expiresAt:o}),{token:r,expiresAt:o}}async resetPasswordWithToken(e,t){let r=this.passwordResetTokens.get(e);if(!r||r.expiresAt<new Date)return this.passwordResetTokens.delete(e),{success:false,error:"Invalid or expired token"};let o=await this.hashPassword(t);return await this.updateUser(r.userId,{passwordHash:o}),this.passwordResetTokens.delete(e),{success:true}}async hasAnyUsers(){return this.users.size>0}async findAuditLogs(e){let{limit:t=50,offset:r=0}=e,o=this.auditLogs.slice().reverse();return e.userId&&(o=o.filter(s=>s.userId===e.userId)),e.action&&(Array.isArray(e.action)?o=o.filter(s=>e.action.includes(String(s.action))):o=o.filter(s=>s.action===e.action)),e.resource&&(o=o.filter(s=>s.resource===e.resource)),e.success!==void 0&&(o=o.filter(s=>s.success===e.success)),{logs:o.slice(r,r+t),total:o.length}}async createAuditLog(e){let t=randomBytes(16).toString("hex"),o={...e,id:t,timestamp:new Date};return this.auditLogs.push(o),o}};g();var E=class{storage=new Map;history=new Map;config;constructor(e={}){this.config={maxAttempts:5,lockDuration:9e5,notifyUser:true,notifyAdmin:true,adminNotifyAfter:3,...e};}async checkLockout(e){let t=Date.now(),r=this.storage.get(e);if(r&&r.lockedUntil!==null&&r.lockedUntil<=t)return await this.resetAttempts(e),{locked:false,attemptsRemaining:this.config.maxAttempts,totalAttempts:0};if(!r)return {locked:false,attemptsRemaining:this.config.maxAttempts,totalAttempts:0};let{attempts:o,lockedUntil:s}=r;return s!==null&&s>t?{locked:true,attemptsRemaining:0,lockedUntil:new Date(s),totalAttempts:o}:{locked:false,attemptsRemaining:Math.max(0,this.config.maxAttempts-o),totalAttempts:o}}async recordFailedAttempt(e){let t=Date.now(),r=this.storage.get(e)||{attempts:0,lastAttempt:null,lockedAt:null,lockedUntil:null};r.attempts+=1,r.lastAttempt=t;let o=this.history.get(e)||[];if(o.push(t),o.length>100&&o.splice(0,o.length-100),this.history.set(e,o),this.storage.set(e,r),r.attempts>=this.config.maxAttempts){let s=new Date(t+this.config.lockDuration);return r.lockedAt=t,r.lockedUntil=s.getTime(),this.storage.set(e,r),{locked:true,attemptsRemaining:0,lockedUntil:s,totalAttempts:r.attempts}}return {locked:false,attemptsRemaining:Math.max(0,this.config.maxAttempts-r.attempts),totalAttempts:r.attempts}}async lockAccount(e,t){let r=Date.now(),o=t||this.config.lockDuration,s=new Date(r+o),i=this.storage.get(e)||{attempts:0,lastAttempt:null,lockedAt:null,lockedUntil:null};i.attempts=this.config.maxAttempts,i.lockedAt=r,i.lockedUntil=s.getTime(),this.storage.set(e,i);}async unlockAccount(e){await this.resetAttempts(e);}async resetAttempts(e){let t=this.storage.get(e);t&&(t.attempts=0,t.lockedAt=null,t.lockedUntil=null,this.storage.set(e,t)),this.history.delete(e);}async getLockoutHistory(e,t=10){return (this.history.get(e)||[]).slice(-t).reverse().map(o=>new Date(o))}async getLockoutStats(e){let r=(this.history.get(e)||[]).length,o=Math.floor(r/this.config.maxAttempts),s=null,i=this.storage.get(e);i&&i.lockedAt!==null&&(s=new Date(i.lockedAt));let c=o>0?this.config.maxAttempts:0;return {totalFailedAttempts:r,lockoutCount:o,lastLockout:s,averageAttemptsBeforeLockout:c}}shouldNotifyAdmin(e){return this.config.notifyAdmin&&e>=this.config.adminNotifyAfter}getConfig(){return {...this.config}}setConfig(e){this.config={...this.config,...e};}};function x(n,e=""){return process.env[n]||e}function P(n,e=false){let t=process.env[n];return t?t.toLowerCase()==="true":e}function w(n,e=0){let t=process.env[n];return t?parseInt(t,10):e}function je(){let n=process.env.KYRO_AUTH_DATABASE?.toLowerCase();if(n&&["sqlite","postgres","mongodb","memory"].includes(n))return n;try{let e=join(process.cwd(),"kyro.config.ts"),t=readFileSync(e,"utf8");if(t.includes("createLocalAdapter"))return "sqlite";if(t.includes("createDrizzleAdapter"))return t.includes("postgres")||t.includes("postgresql"),"postgres";if(t.includes("createMongoDBAdapter"))return "mongodb"}catch{}return "memory"}async function ro(n){let e=process.cwd(),t=e.endsWith("admin")?join(e,".."):e,r=resolve(t,"data","auth.db");switch(n){case "sqlite":return new a$3({path:x("KYRO_AUTH_DB_PATH",r)});case "postgres":{let o=x("DATABASE_URL","");if(o){let s,i;try{s=(await import('./postgres-js-JLFIWOBH.js')).drizzle,i=await import('./src-QBADSZV4.js');}catch{a$1(["postgres","drizzle-orm"]),s=(await import('./postgres-js-JLFIWOBH.js')).drizzle,i=await import('./src-QBADSZV4.js');}let c=i.default(o,{onnotice:()=>{}}),l=s(c);return new a$4({db:l})}return new a$3({path:x("KYRO_AUTH_DB_PATH",r)})}case "mongodb":{let o=x("MONGODB_URI","");if(o){let s;try{let h=await import('./lib-JQD2JAOO.js');s=h.MongoClient??h.default?.MongoClient;}catch{a$1(["mongodb"]);let u=await import('./lib-JQD2JAOO.js');s=u.MongoClient??u.default?.MongoClient;}let i=new s(o);await i.connect();let l=new URL(o).pathname.replace(/^\//,"")||"kyro_cms",f=i.db(l);return new a$2({db:f})}return new a$3({path:x("KYRO_AUTH_DB_PATH",r)})}default:return new L}}async function J(n,e){let t=P("KYRO_DISTRIBUTED",false),r;if(t){let{RedisAuthAdapter:u}=await import('./redis-adapter-QPCTMF55.js'),d=x("REDIS_URL","redis://localhost:6379"),A=P("REDIS_TLS",false),p=new u({url:d,tls:A});await p.connect?.(),r=p;}else {let u=n||je();r=await ro(u),r.connect&&await r.connect();}let o=e?await q.fromConfig(e).catch(()=>null)||q.fromEnv()||void 0:q.fromEnv()||void 0,s=new a({minLength:w("PASSWORD_MIN_LENGTH",12),requireUppercase:P("PASSWORD_REQUIRE_UPPERCASE",true),requireLowercase:P("PASSWORD_REQUIRE_LOWERCASE",true),requireNumbers:P("PASSWORD_REQUIRE_NUMBERS",true),requireSpecialChars:P("PASSWORD_REQUIRE_SPECIAL",true),preventReuse:w("PASSWORD_PREVENT_REUSE",5),maxLength:w("PASSWORD_MAX_LENGTH",128)}),i,c,l;if(t){let d=r.redis;i=new D(d,{maxAttempts:w("LOCKOUT_MAX_ATTEMPTS",5),lockDuration:w("LOCKOUT_DURATION_MINUTES",15)*60*1e3}),c=new I(d,{"auth:login":{window:w("RATE_LIMIT_AUTH_WINDOW_MS",9e5),max:w("RATE_LIMIT_AUTH_MAX_REQUESTS",10)},"api:general":{window:w("RATE_LIMIT_WINDOW_MS",6e4),max:w("RATE_LIMIT_MAX_REQUESTS",100)}}),l=new bb(d,w("AUDIT_LOG_RETENTION_DAYS",30));}else i=new E({maxAttempts:w("LOCKOUT_MAX_ATTEMPTS",5),lockDuration:w("LOCKOUT_DURATION_MINUTES",15)*60*1e3}),c=new ab({"auth:login":{window:w("RATE_LIMIT_AUTH_WINDOW_MS",9e5),max:w("RATE_LIMIT_AUTH_MAX_REQUESTS",10)},"api:general":{window:w("RATE_LIMIT_WINDOW_MS",6e4),max:w("RATE_LIMIT_MAX_REQUESTS",100)}}),l=P("AUDIT_LOG_ENABLED",true)?new db(w("AUDIT_LOG_RETENTION_DAYS",30)):void 0;let f=new eb({redis:r,email:o,jwtSecret:x("APP_SECRET","change-me"),jwtExpiresIn:x("JWT_EXPIRES_IN","24h"),jwtIssuer:x("JWT_ISSUER","kyro-cms"),jwtAudience:x("JWT_AUDIENCE","kyro-cms-client"),passwordPolicy:s,lockout:i,rateLimiter:c,auditLogger:l,baseUrl:x("EMAIL_BASE_URL","http://localhost:4321"),emailVerificationRequired:P("EMAIL_VERIFICATION_REQUIRED",true)}),h=t?"distributed":n||je();return {authAdapter:r,databaseType:h,email:o,passwordPolicy:s,lockout:i,rateLimiter:c,auditLogger:l,routes:f}}var We=J().catch(n=>(console.warn("[AuthConfig] Failed to initialize auth config:",n.message),null));var oo=12,no="24h",so="7d",K=class{adapter;config;constructor(e,t){this.adapter=e,this.config={secret:t.secret,expiresIn:t.expiresIn??no,refreshExpiresIn:t.refreshExpiresIn??so,issuer:t.issuer??"kyro-cms",audience:t.audience??[],saltRounds:t.saltRounds??oo};}async register(e){try{if(await this.adapter.findUserByEmail(e.email))return {success:!1,error:"Email already registered"};let r=await this.adapter.createUser({email:e.email,password:e.password,role:e.role??"customer",tenantId:e.tenantId});return this.createSessionForUser(r)}catch(t){return {success:false,error:String(t)}}}async login(e){try{let t=await this.adapter.verifyPassword(e.email,e.password);return t?this.createSessionForUser(t):{success:!1,error:"Invalid credentials"}}catch(t){return {success:false,error:String(t)}}}async logout(e){await this.adapter.deleteSession(e);}async refreshToken(e){try{let t=await this.adapter.findSessionByToken(e);if(!t||new Date(t.expiresAt)<new Date)return {success:!1,error:"Invalid or expired refresh token"};let r=await this.adapter.findUserById(t.userId);return r?(await this.adapter.deleteSession(e),this.createSessionForUser(r)):{success:!1,error:"User not found"}}catch(t){return {success:false,error:String(t)}}}async verifyToken(e){try{let{default:t}=await import('./jsonwebtoken-OD67R5JS.js');return t.verify(e,this.config.secret,{issuer:this.config.issuer,audience:this.config.audience.length>0?this.config.audience[0]:void 0})}catch{return null}}async getUserFromToken(e){let t=await this.verifyToken(e);return t?this.adapter.findUserById(t.sub):null}async changePassword(e,t,r){try{let o=await this.adapter.findUserById(e);return o?await this.adapter.verifyPassword(o.email,t)?(await this.adapter.updateUser(e,{password:r}),await this.adapter.deleteUserSessions(e),{success:!0,user:o}):{success:!1,error:"Current password is incorrect"}:{success:!1,error:"User not found"}}catch(o){return {success:false,error:String(o)}}}async resetPassword(e,t){try{let r=await this.adapter.findUserByEmail(e);return r?(await this.adapter.updateUser(r.id,{password:t}),await this.adapter.deleteUserSessions(r.id),{success:!0,user:r}):{success:!1,error:"User not found"}}catch(r){return {success:false,error:String(r)}}}async sendEmailVerification(e){try{let{token:t,expiresAt:r}=await this.adapter.createEmailVerificationToken(e);return {success:!0}}catch(t){return {success:false,error:String(t)}}}async verifyEmail(e){try{return await this.adapter.verifyEmailToken(e)}catch(t){return {success:false,error:String(t)}}}async requestPasswordReset(e){try{let t=await this.adapter.createPasswordResetToken(e);return t.error?{success:!1,error:t.error}:{success:!0}}catch(t){return {success:false,error:String(t)}}}async resetPasswordWithToken(e,t){try{return await this.adapter.resetPasswordWithToken(e,t)}catch(r){return {success:false,error:String(r)}}}async deleteAccount(e){try{return await this.adapter.findUserById(e)?(await this.adapter.deleteUserSessions(e),await this.adapter.deleteUser(e),{success:!0}):{success:!1,error:"User not found"}}catch(t){return {success:false,error:String(t)}}}async createSessionForUser(e){let t=await this.generateToken(e),r=await this.adapter.createSession(e.id);return {success:true,user:e,session:r,token:t}}async generateToken(e){let{default:t}=await import('./jsonwebtoken-OD67R5JS.js'),r={sub:e.id,email:e.email,role:e.role,tenantId:e.tenantId},o={expiresIn:this.parseExpiresIn(this.config.expiresIn)/1e3,issuer:this.config.issuer};return this.config.audience.length>0&&(o.audience=this.config.audience[0]),t.sign(r,this.config.secret,o)}async hashPassword(e){let{default:t}=await import('./bcryptjs-ZEEHSMAG.js');return t.hash(e,this.config.saltRounds)}parseExpiresIn(e){if(typeof e=="number")return e;let t=e.match(/^(\d+)([smhd])$/);if(!t)return 864e5;let r=parseInt(t[1],10);switch(t[2]){case "s":return r*1e3;case "m":return r*6e4;case "h":return r*36e5;case "d":return r*864e5;default:return 864e5}}};function io(n,e){return new K(n,e)}g();g();function j(){return {enabled:true,draftsEnabled:true,publishEnabled:true,scheduleEnabled:false,versioningEnabled:true,maxVersionsPerDocument:50,autoPublish:false,requirePublishPermission:true}}var z=class{adapter;config;constructor(e,t){this.adapter=e,this.config={...j(),...t};}async createVersion(e){let r=((await this.adapter.getLatestVersion(e.collection,e.documentId))?.version??0)+1,o={...e,version:r},s=await this.adapter.createVersion(o);return this.config.maxVersionsPerDocument>0&&await this.pruneOldVersions(e.collection,e.documentId),s}async publishVersion(e){let t=await this.adapter.getVersion(e.collection,e.versionId);if(!t)throw new Error("Version not found");if(t.status==="published")throw new Error("Version is already published");await this.adapter.publishVersion(e);}async unpublishDocument(e,t){let r=await this.adapter.getVersions({collection:e,documentId:t,limit:1e3});for(let o of r)if(o.status==="published"){await this.createVersion({collection:e,documentId:t,data:o.data,status:"draft",createdBy:"system",changeDescription:"Unpublished document"});break}}async revertToVersion(e,t,r,o){if(!await this.adapter.getVersion(e,r))throw new Error("Version not found");return await this.adapter.revertToVersion({collection:e,documentId:t,versionId:r,userId:o})}async getVersionHistory(e,t,r=20,o=0){return this.adapter.getVersions({collection:e,documentId:t,limit:r,offset:o})}async compareTwoVersions(e,t,r,o){return this.adapter.compareVersions({collection:e,documentId:t,versionA:r,versionB:o})}async getLatestDraft(e,t){return this.adapter.getLatestVersion(e,t)}async getPublishedVersion(e,t){return this.adapter.getPublishedVersion(e,t)}async getVersion(e,t){return this.adapter.getVersion(e,t)}async schedulePublish(e,t,r,o){if(!this.config.scheduleEnabled)throw new Error("Scheduled publishing is not enabled");if(!await this.adapter.getVersion(e,r))throw new Error("Version not found")}async deleteVersionHistory(e,t){await this.adapter.deleteVersions(e,t);}async pruneOldVersions(e,t){let r=await this.adapter.getVersions({collection:e,documentId:t,limit:this.config.maxVersionsPerDocument+100});if(r.length<=this.config.maxVersionsPerDocument)return;r.slice(0,this.config.maxVersionsPerDocument);let s=r.slice(this.config.maxVersionsPerDocument);for(let i of s)if(i.status!=="published"){await this.adapter.deleteVersions(e,t);break}}};function ao(n,e){return new z(n,e)}function co(n){return n==="published"}function lo(n){return n==="draft"}function uo(n){return n==="archived"}g();function po(n){return n?Array.isArray(n)?n:Object.values(n):[]}function go(n){return n?Array.isArray(n)?n:Object.values(n):[]}function qe(n){return {collections:po(n.collections),globals:go(n.globals),adapter:n.adapter,storage:n.storage,plugins:n.plugins,auth:n.auth,cors:n.cors,admin:n.admin,upload:n.upload,graphQL:n.graphQL,typescript:n.typescript,localization:n.localization,rateLimit:n.rateLimit,debug:n.debug}}var mo=qe;g();function fo(n){let{siteSettings:e,seoSettings:t,title:r,description:o,image:s,url:i}=n;if(!e)return "";let c=e.siteName||"",l=r||t?.defaultTitle||c,f=t?.titleTemplate,h=t?.separator||" | ",u=t?.siteNameInTitle!==false,d=f?f.replace(/\{\{title\}\}/g,l).replace(/\{\{siteName\}\}/g,u?c:"").replace(/\{\{separator\}\}/g,h).replace(/\s+/g," ").trim():l,A=o||t?.defaultDescription||e.siteDescription||"",p=s||e.siteOgImage?.url||"",y=i||e.siteUrl||"",b=`
21
+ `}var Jr={text:{wrapper:{marginBottom:"var(--spacing-md)"},label:{display:"block",marginBottom:"var(--spacing-xs)",fontWeight:"500",color:"var(--color-text)"},input:{width:"100%",padding:"var(--spacing-sm) var(--spacing-md)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-md)",fontSize:"0.875rem"},error:{color:"var(--color-error)",fontSize:"0.75rem",marginTop:"var(--spacing-xs)"}},number:{wrapper:{marginBottom:"var(--spacing-md)"},label:{display:"block",marginBottom:"var(--spacing-xs)",fontWeight:"500"},input:{width:"100%",padding:"var(--spacing-sm) var(--spacing-md)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-md)"}},checkbox:{wrapper:{display:"flex",alignItems:"center",gap:"var(--spacing-sm)"},input:{width:"1rem",height:"1rem"},label:{cursor:"pointer"}},select:{wrapper:{marginBottom:"var(--spacing-md)"},input:{width:"100%",padding:"var(--spacing-sm) var(--spacing-md)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-md)",backgroundColor:"white"}}};g();g();var Xr={maxAttempts:5,lockDuration:9e5,notifyUser:true,notifyAdmin:true,adminNotifyAfter:3},D=class{redis;prefix;config;constructor(e,t={},r="kyro:lockout:"){this.redis=e,this.prefix=r,this.config={...Xr,...t};}lockKey(e){return `${this.prefix}${e}`}historyKey(e){return `${this.prefix}${e}:history`}async checkLockout(e){let t=this.lockKey(e),r=await this.redis.hgetall(t);if(!r||Object.keys(r).length===0)return {locked:false,attemptsRemaining:this.config.maxAttempts,totalAttempts:0};let o=parseInt(r.attempts,10),s=r.lockedUntil?new Date(parseInt(r.lockedUntil,10)):void 0;return s&&s>new Date?{locked:true,attemptsRemaining:0,lockedUntil:s,totalAttempts:o}:s&&s<=new Date?(await this.unlockAccount(e),{locked:false,attemptsRemaining:this.config.maxAttempts,totalAttempts:0}):{locked:false,attemptsRemaining:Math.max(0,this.config.maxAttempts-o),totalAttempts:o}}async recordFailedAttempt(e){let t=this.lockKey(e),r=this.historyKey(e),o=Date.now(),s=await this.redis.hincrby(t,"attempts",1);if(await this.redis.hset(t,"lastAttempt",o.toString()),await this.redis.lpush(r,o.toString()),await this.redis.ltrim(r,0,99),s>=this.config.maxAttempts){let i=new Date(o+this.config.lockDuration);return await this.redis.hset(t,{lockedAt:o.toString(),lockedUntil:i.getTime().toString()}),await this.redis.expire(t,Math.ceil(this.config.lockDuration/1e3)+3600),{locked:true,attemptsRemaining:0,lockedUntil:i,totalAttempts:s}}return {locked:false,attemptsRemaining:Math.max(0,this.config.maxAttempts-s),totalAttempts:s}}async lockAccount(e,t){let r=this.lockKey(e),o=Date.now(),s=t||this.config.lockDuration,i=new Date(o+s),c=this.redis.pipeline();c.hset(r,{attempts:this.config.maxAttempts.toString(),lockedAt:o.toString(),lockedUntil:i.getTime().toString()}),c.expire(r,Math.ceil(s/1e3)+3600),await c.exec();}async unlockAccount(e){let t=this.lockKey(e);await this.redis.del(t);}async resetAttempts(e){let t=this.lockKey(e);(await this.redis.hgetall(t)).lockedAt?await this.redis.hset(t,{attempts:"0",lockedAt:"",lockedUntil:""}):await this.redis.del(t);}async getLockoutHistory(e,t=10){let r=this.historyKey(e);return (await this.redis.lrange(r,0,t-1)).map(s=>new Date(parseInt(s,10)))}async getLockoutStats(e){let t=this.historyKey(e),r=await this.redis.lrange(t,0,-1),o=r.filter((i,c)=>(c+1)%this.config.maxAttempts===0).length,s=await this.redis.hget(this.lockKey(e),"lockedAt");return {totalFailedAttempts:r.length,lockoutCount:o,lastLockout:s?new Date(parseInt(s,10)):null,averageAttemptsBeforeLockout:o>0?this.config.maxAttempts:0}}shouldNotifyAdmin(e){return this.config.notifyAdmin&&e>=this.config.adminNotifyAfter}getConfig(){return {...this.config}}setConfig(e){this.config={...this.config,...e};}};g();var Zr={"auth:login":{window:9e5,max:5},"auth:register":{window:36e5,max:3},"auth:forgot":{window:36e5,max:3},"auth:reset":{window:36e5,max:5},"auth:verify":{window:36e5,max:5},"api:general":{window:6e4,max:100},"api:authenticated":{window:6e4,max:200}},I=class{redis;prefix;limits;userLimits;constructor(e,t,r,o="kyro:ratelimit:"){this.redis=e,this.prefix=o,this.limits={...Zr,...t},this.userLimits=r||{"user:api":{window:6e4,max:500},"user:write":{window:36e5,max:100}};}getKey(e,t){return `${this.prefix}${e}:${t}`}async check(e,t){let r=this.limits[e]||this.limits["api:general"],o=this.getKey(e,t),s=Date.now(),i=s-r.window,c=this.redis.pipeline();c.zremrangebyscore(o,0,i),c.zcard(o),c.zadd(o,s,`${s}:${Math.random()}`),c.expire(o,Math.ceil(r.window/1e3)+1);let f=(await c.exec())?.[1]?.[1]||0;if(f>=r.max){let h=await this.redis.zrange(o,0,0,"WITHSCORES"),u=h.length>1?parseInt(h[1],10)+r.window:s+r.window;return {allowed:false,remaining:0,resetAt:u,retryAfter:Math.ceil((u-s)/1e3)}}return {allowed:true,remaining:r.max-f-1,resetAt:s+r.window}}async checkUser(e,t,r){let o=this.userLimits[e]||this.userLimits["user:api"],s=this.getKey(`user:${e}:${t}`,r),i=Date.now(),c=i-o.window,l=this.redis.pipeline();l.zremrangebyscore(s,0,c),l.zcard(s),l.zadd(s,i,`${i}:${Math.random()}`),l.expire(s,Math.ceil(o.window/1e3)+1);let h=(await l.exec())?.[1]?.[1]||0;if(h>=o.max){let u=await this.redis.zrange(s,0,0,"WITHSCORES"),d=u.length>1?parseInt(u[1],10)+o.window:i+o.window;return {allowed:false,remaining:0,resetAt:d,retryAfter:Math.ceil((d-i)/1e3)}}return {allowed:true,remaining:o.max-h-1,resetAt:i+o.window}}async reset(e,t){let r=this.getKey(e,t);await this.redis.del(r);}async resetUser(e,t,r){let o=this.getKey(`user:${e}:${t}`,r);await this.redis.del(o);}async getStatus(e,t){let r=this.limits[e]||this.limits["api:general"],o=this.getKey(e,t),s=Date.now(),i=s-r.window;await this.redis.zremrangebyscore(o,0,i);let c=await this.redis.zcard(o);return {count:c,limit:r.max,remaining:Math.max(0,r.max-c),resetAt:s+r.window}}setLimit(e,t){this.limits[e]=t;}setUserLimit(e,t){this.userLimits[e]=t;}};g();g();g();var L=class{users=new Map;sessions=new Map;refreshTokens=new Map;emailToUserId=new Map;passwordHistory=new Map;emailVerificationTokens=new Map;passwordResetTokens=new Map;auditLogs=[];externalDb=false;constructor(){}async connect(){}async disconnect(){this.users.clear(),this.sessions.clear(),this.refreshTokens.clear(),this.emailToUserId.clear(),this.passwordHistory.clear();}async createUser(e){let t=randomBytes(16).toString("hex"),r=new Date().toISOString(),o=await this.hashPassword(e.password),s={id:t,name:e.name,email:e.email.toLowerCase(),passwordHash:o,role:e.role||"customer",avatar:e.avatar,tenantId:e.tenantId,metadata:e.metadata,createdAt:r,updatedAt:r};return this.users.set(t,s),this.emailToUserId.set(e.email.toLowerCase(),t),this.passwordHistory.set(t,[]),s}async findUserByEmail(e){let t=this.emailToUserId.get(e.toLowerCase());return t?this.findUserById(t):null}async findUserById(e){return this.users.get(e)||null}async updateUser(e,t){let r=await this.findUserById(e);if(!r)return null;let o={...r,...t,id:e,updatedAt:new Date().toISOString()};return t.email&&t.email!==r.email&&(this.emailToUserId.delete(r.email.toLowerCase()),this.emailToUserId.set(t.email.toLowerCase(),e)),this.users.set(e,o),o}async deleteUser(e){let t=await this.findUserById(e);return t?(this.users.delete(e),this.emailToUserId.delete(t.email.toLowerCase()),this.refreshTokens.forEach((r,o)=>{this.sessions.get(r)?.userId===e&&(this.refreshTokens.delete(o),this.sessions.delete(r));}),this.passwordHistory.delete(e),this.sessions.forEach((r,o)=>{r.userId===e&&this.sessions.delete(o);}),true):false}async hashPassword(e){return (await import('./bcryptjs-ZEEHSMAG.js')).default.hash(e,12)}async verifyPassword(e,t){let r=await this.findUserByEmail(e);return !r||!r.passwordHash?null:await(await import('./bcryptjs-ZEEHSMAG.js')).default.compare(t,r.passwordHash)?r:null}async createSession(e,t={}){let r=randomBytes(32).toString("hex"),o=randomBytes(32).toString("base64url"),s=randomBytes(32).toString("base64url"),i=new Date,c={id:r,userId:e,token:o,refreshToken:s,expiresAt:new Date(i.getTime()+86400*1e3).toISOString(),createdAt:i.toISOString(),ipAddress:t.ipAddress,userAgent:t.userAgent};return this.sessions.set(r,c),this.refreshTokens.set(s,r),c}async findSessionByToken(e){return this.sessions.get(e)||null}async findSessionByRefreshToken(e){let t=this.refreshTokens.get(e);return t&&this.sessions.get(t)||null}async deleteSession(e){let t=this.sessions.get(e);return t?(t.refreshToken&&this.refreshTokens.delete(t.refreshToken),this.sessions.delete(e),true):false}async deleteUserSessions(e){let t=0;return this.sessions.forEach((r,o)=>{r.userId===e&&(r.refreshToken&&this.refreshTokens.delete(r.refreshToken),this.sessions.delete(o),t++);}),t}async addPasswordToHistory(e,t){let r=this.passwordHistory.get(e)||[];r.push(t),r.length>5&&r.splice(0,r.length-5),this.passwordHistory.set(e,r);}async getPasswordHistory(e,t=5){return this.passwordHistory.get(e)||[]}async isPasswordInHistory(e,t,r=5){let o=await this.getPasswordHistory(t,r),s=(await import('./bcryptjs-ZEEHSMAG.js')).default;for(let i of o)if(await s.compare(e,i))return true;return false}async createEmailVerificationToken(e){let t=randomBytes(32).toString("hex"),r=new Date(Date.now()+1440*60*1e3);return this.emailVerificationTokens.set(t,{userId:e,expiresAt:r}),{token:t,expiresAt:r}}async verifyEmailToken(e){let t=this.emailVerificationTokens.get(e);return !t||t.expiresAt<new Date?(this.emailVerificationTokens.delete(e),{success:false,error:"Invalid or expired token"}):(this.emailVerificationTokens.delete(e),{success:true,userId:t.userId})}async createPasswordResetToken(e){let t=await this.findUserByEmail(e);if(!t)return {token:"",expiresAt:new Date,error:"User not found"};let r=randomBytes(32).toString("hex"),o=new Date(Date.now()+3600*1e3);return this.passwordResetTokens.set(r,{userId:t.id,expiresAt:o}),{token:r,expiresAt:o}}async resetPasswordWithToken(e,t){let r=this.passwordResetTokens.get(e);if(!r||r.expiresAt<new Date)return this.passwordResetTokens.delete(e),{success:false,error:"Invalid or expired token"};let o=await this.hashPassword(t);return await this.updateUser(r.userId,{passwordHash:o}),this.passwordResetTokens.delete(e),{success:true}}async hasAnyUsers(){return this.users.size>0}async findAuditLogs(e){let{limit:t=50,offset:r=0}=e,o=this.auditLogs.slice().reverse();return e.userId&&(o=o.filter(s=>s.userId===e.userId)),e.action&&(Array.isArray(e.action)?o=o.filter(s=>e.action.includes(String(s.action))):o=o.filter(s=>s.action===e.action)),e.resource&&(o=o.filter(s=>s.resource===e.resource)),e.success!==void 0&&(o=o.filter(s=>s.success===e.success)),{logs:o.slice(r,r+t),total:o.length}}async createAuditLog(e){let t=randomBytes(16).toString("hex"),o={...e,id:t,timestamp:new Date};return this.auditLogs.push(o),o}};g();var E=class{storage=new Map;history=new Map;config;constructor(e={}){this.config={maxAttempts:5,lockDuration:9e5,notifyUser:true,notifyAdmin:true,adminNotifyAfter:3,...e};}async checkLockout(e){let t=Date.now(),r=this.storage.get(e);if(r&&r.lockedUntil!==null&&r.lockedUntil<=t)return await this.resetAttempts(e),{locked:false,attemptsRemaining:this.config.maxAttempts,totalAttempts:0};if(!r)return {locked:false,attemptsRemaining:this.config.maxAttempts,totalAttempts:0};let{attempts:o,lockedUntil:s}=r;return s!==null&&s>t?{locked:true,attemptsRemaining:0,lockedUntil:new Date(s),totalAttempts:o}:{locked:false,attemptsRemaining:Math.max(0,this.config.maxAttempts-o),totalAttempts:o}}async recordFailedAttempt(e){let t=Date.now(),r=this.storage.get(e)||{attempts:0,lastAttempt:null,lockedAt:null,lockedUntil:null};r.attempts+=1,r.lastAttempt=t;let o=this.history.get(e)||[];if(o.push(t),o.length>100&&o.splice(0,o.length-100),this.history.set(e,o),this.storage.set(e,r),r.attempts>=this.config.maxAttempts){let s=new Date(t+this.config.lockDuration);return r.lockedAt=t,r.lockedUntil=s.getTime(),this.storage.set(e,r),{locked:true,attemptsRemaining:0,lockedUntil:s,totalAttempts:r.attempts}}return {locked:false,attemptsRemaining:Math.max(0,this.config.maxAttempts-r.attempts),totalAttempts:r.attempts}}async lockAccount(e,t){let r=Date.now(),o=t||this.config.lockDuration,s=new Date(r+o),i=this.storage.get(e)||{attempts:0,lastAttempt:null,lockedAt:null,lockedUntil:null};i.attempts=this.config.maxAttempts,i.lockedAt=r,i.lockedUntil=s.getTime(),this.storage.set(e,i);}async unlockAccount(e){await this.resetAttempts(e);}async resetAttempts(e){let t=this.storage.get(e);t&&(t.attempts=0,t.lockedAt=null,t.lockedUntil=null,this.storage.set(e,t)),this.history.delete(e);}async getLockoutHistory(e,t=10){return (this.history.get(e)||[]).slice(-t).reverse().map(o=>new Date(o))}async getLockoutStats(e){let r=(this.history.get(e)||[]).length,o=Math.floor(r/this.config.maxAttempts),s=null,i=this.storage.get(e);i&&i.lockedAt!==null&&(s=new Date(i.lockedAt));let c=o>0?this.config.maxAttempts:0;return {totalFailedAttempts:r,lockoutCount:o,lastLockout:s,averageAttemptsBeforeLockout:c}}shouldNotifyAdmin(e){return this.config.notifyAdmin&&e>=this.config.adminNotifyAfter}getConfig(){return {...this.config}}setConfig(e){this.config={...this.config,...e};}};function x(n,e=""){return process.env[n]||e}function P(n,e=false){let t=process.env[n];return t?t.toLowerCase()==="true":e}function w(n,e=0){let t=process.env[n];return t?parseInt(t,10):e}function je(){let n=process.env.KYRO_AUTH_DATABASE?.toLowerCase();if(n&&["sqlite","postgres","mongodb","memory"].includes(n))return n;try{let e=join(process.cwd(),"kyro.config.ts"),t=readFileSync(e,"utf8");if(t.includes("createLocalAdapter"))return "sqlite";if(t.includes("createDrizzleAdapter"))return t.includes("postgres")||t.includes("postgresql"),"postgres";if(t.includes("createMongoDBAdapter"))return "mongodb"}catch{}return "memory"}async function ro(n){let e=process.cwd(),t=e.endsWith("admin")?join(e,".."):e,r=resolve(t,"data","auth.db");switch(n){case "sqlite":return new a$3({path:x("KYRO_AUTH_DB_PATH",r)});case "postgres":{let o=x("DATABASE_URL","");if(o){let s,i;try{s=(await import('./postgres-js-JLFIWOBH.js')).drizzle,i=await import('./src-QBADSZV4.js');}catch{a$1(["postgres","drizzle-orm"]),s=(await import('./postgres-js-JLFIWOBH.js')).drizzle,i=await import('./src-QBADSZV4.js');}let c=i.default(o,{onnotice:()=>{}}),l=s(c);return new a$4({db:l})}return new a$3({path:x("KYRO_AUTH_DB_PATH",r)})}case "mongodb":{let o=x("MONGODB_URI","");if(o){let s;try{let h=await import('./lib-JQD2JAOO.js');s=h.MongoClient??h.default?.MongoClient;}catch{a$1(["mongodb"]);let u=await import('./lib-JQD2JAOO.js');s=u.MongoClient??u.default?.MongoClient;}let i=new s(o);await i.connect();let l=new URL(o).pathname.replace(/^\//,"")||"kyro_cms",f=i.db(l);return new a$2({db:f})}return new a$3({path:x("KYRO_AUTH_DB_PATH",r)})}default:return new L}}async function J(n,e){let t=P("KYRO_DISTRIBUTED",false),r;if(t){let{RedisAuthAdapter:u}=await import('./redis-adapter-LY2NBSAG.js'),d=x("REDIS_URL","redis://localhost:6379"),A=P("REDIS_TLS",false),p=new u({url:d,tls:A});await p.connect?.(),r=p;}else {let u=n||je();r=await ro(u),r.connect&&await r.connect();}let o=e?await q.fromConfig(e).catch(()=>null)||q.fromEnv()||void 0:q.fromEnv()||void 0,s=new a({minLength:w("PASSWORD_MIN_LENGTH",12),requireUppercase:P("PASSWORD_REQUIRE_UPPERCASE",true),requireLowercase:P("PASSWORD_REQUIRE_LOWERCASE",true),requireNumbers:P("PASSWORD_REQUIRE_NUMBERS",true),requireSpecialChars:P("PASSWORD_REQUIRE_SPECIAL",true),preventReuse:w("PASSWORD_PREVENT_REUSE",5),maxLength:w("PASSWORD_MAX_LENGTH",128)}),i,c,l;if(t){let d=r.redis;i=new D(d,{maxAttempts:w("LOCKOUT_MAX_ATTEMPTS",5),lockDuration:w("LOCKOUT_DURATION_MINUTES",15)*60*1e3}),c=new I(d,{"auth:login":{window:w("RATE_LIMIT_AUTH_WINDOW_MS",9e5),max:w("RATE_LIMIT_AUTH_MAX_REQUESTS",10)},"api:general":{window:w("RATE_LIMIT_WINDOW_MS",6e4),max:w("RATE_LIMIT_MAX_REQUESTS",100)}}),l=new bb(d,w("AUDIT_LOG_RETENTION_DAYS",30));}else i=new E({maxAttempts:w("LOCKOUT_MAX_ATTEMPTS",5),lockDuration:w("LOCKOUT_DURATION_MINUTES",15)*60*1e3}),c=new ab({"auth:login":{window:w("RATE_LIMIT_AUTH_WINDOW_MS",9e5),max:w("RATE_LIMIT_AUTH_MAX_REQUESTS",10)},"api:general":{window:w("RATE_LIMIT_WINDOW_MS",6e4),max:w("RATE_LIMIT_MAX_REQUESTS",100)}}),l=P("AUDIT_LOG_ENABLED",true)?new db(w("AUDIT_LOG_RETENTION_DAYS",30)):void 0;let f=new eb({redis:r,email:o,jwtSecret:x("APP_SECRET","change-me"),jwtExpiresIn:x("JWT_EXPIRES_IN","24h"),jwtIssuer:x("JWT_ISSUER","kyro-cms"),jwtAudience:x("JWT_AUDIENCE","kyro-cms-client"),passwordPolicy:s,lockout:i,rateLimiter:c,auditLogger:l,baseUrl:x("EMAIL_BASE_URL","http://localhost:4321"),emailVerificationRequired:P("EMAIL_VERIFICATION_REQUIRED",true)}),h=t?"distributed":n||je();return {authAdapter:r,databaseType:h,email:o,passwordPolicy:s,lockout:i,rateLimiter:c,auditLogger:l,routes:f}}var We=J().catch(n=>(console.warn("[AuthConfig] Failed to initialize auth config:",n.message),null));var oo=12,no="24h",so="7d",K=class{adapter;config;constructor(e,t){this.adapter=e,this.config={secret:t.secret,expiresIn:t.expiresIn??no,refreshExpiresIn:t.refreshExpiresIn??so,issuer:t.issuer??"kyro-cms",audience:t.audience??[],saltRounds:t.saltRounds??oo};}async register(e){try{if(await this.adapter.findUserByEmail(e.email))return {success:!1,error:"Email already registered"};let r=await this.adapter.createUser({email:e.email,password:e.password,role:e.role??"customer",tenantId:e.tenantId});return this.createSessionForUser(r)}catch(t){return {success:false,error:String(t)}}}async login(e){try{let t=await this.adapter.verifyPassword(e.email,e.password);return t?this.createSessionForUser(t):{success:!1,error:"Invalid credentials"}}catch(t){return {success:false,error:String(t)}}}async logout(e){await this.adapter.deleteSession(e);}async refreshToken(e){try{let t=await this.adapter.findSessionByToken(e);if(!t||new Date(t.expiresAt)<new Date)return {success:!1,error:"Invalid or expired refresh token"};let r=await this.adapter.findUserById(t.userId);return r?(await this.adapter.deleteSession(e),this.createSessionForUser(r)):{success:!1,error:"User not found"}}catch(t){return {success:false,error:String(t)}}}async verifyToken(e){try{let{default:t}=await import('./jsonwebtoken-OD67R5JS.js');return t.verify(e,this.config.secret,{issuer:this.config.issuer,audience:this.config.audience.length>0?this.config.audience[0]:void 0})}catch{return null}}async getUserFromToken(e){let t=await this.verifyToken(e);return t?this.adapter.findUserById(t.sub):null}async changePassword(e,t,r){try{let o=await this.adapter.findUserById(e);return o?await this.adapter.verifyPassword(o.email,t)?(await this.adapter.updateUser(e,{password:r}),await this.adapter.deleteUserSessions(e),{success:!0,user:o}):{success:!1,error:"Current password is incorrect"}:{success:!1,error:"User not found"}}catch(o){return {success:false,error:String(o)}}}async resetPassword(e,t){try{let r=await this.adapter.findUserByEmail(e);return r?(await this.adapter.updateUser(r.id,{password:t}),await this.adapter.deleteUserSessions(r.id),{success:!0,user:r}):{success:!1,error:"User not found"}}catch(r){return {success:false,error:String(r)}}}async sendEmailVerification(e){try{let{token:t,expiresAt:r}=await this.adapter.createEmailVerificationToken(e);return {success:!0}}catch(t){return {success:false,error:String(t)}}}async verifyEmail(e){try{return await this.adapter.verifyEmailToken(e)}catch(t){return {success:false,error:String(t)}}}async requestPasswordReset(e){try{let t=await this.adapter.createPasswordResetToken(e);return t.error?{success:!1,error:t.error}:{success:!0}}catch(t){return {success:false,error:String(t)}}}async resetPasswordWithToken(e,t){try{return await this.adapter.resetPasswordWithToken(e,t)}catch(r){return {success:false,error:String(r)}}}async deleteAccount(e){try{return await this.adapter.findUserById(e)?(await this.adapter.deleteUserSessions(e),await this.adapter.deleteUser(e),{success:!0}):{success:!1,error:"User not found"}}catch(t){return {success:false,error:String(t)}}}async createSessionForUser(e){let t=await this.generateToken(e),r=await this.adapter.createSession(e.id);return {success:true,user:e,session:r,token:t}}async generateToken(e){let{default:t}=await import('./jsonwebtoken-OD67R5JS.js'),r={sub:e.id,email:e.email,role:e.role,tenantId:e.tenantId},o={expiresIn:this.parseExpiresIn(this.config.expiresIn)/1e3,issuer:this.config.issuer};return this.config.audience.length>0&&(o.audience=this.config.audience[0]),t.sign(r,this.config.secret,o)}async hashPassword(e){let{default:t}=await import('./bcryptjs-ZEEHSMAG.js');return t.hash(e,this.config.saltRounds)}parseExpiresIn(e){if(typeof e=="number")return e;let t=e.match(/^(\d+)([smhd])$/);if(!t)return 864e5;let r=parseInt(t[1],10);switch(t[2]){case "s":return r*1e3;case "m":return r*6e4;case "h":return r*36e5;case "d":return r*864e5;default:return 864e5}}};function io(n,e){return new K(n,e)}g();g();function j(){return {enabled:true,draftsEnabled:true,publishEnabled:true,scheduleEnabled:false,versioningEnabled:true,maxVersionsPerDocument:50,autoPublish:false,requirePublishPermission:true}}var z=class{adapter;config;constructor(e,t){this.adapter=e,this.config={...j(),...t};}async createVersion(e){let r=((await this.adapter.getLatestVersion(e.collection,e.documentId))?.version??0)+1,o={...e,version:r},s=await this.adapter.createVersion(o);return this.config.maxVersionsPerDocument>0&&await this.pruneOldVersions(e.collection,e.documentId),s}async publishVersion(e){let t=await this.adapter.getVersion(e.collection,e.versionId);if(!t)throw new Error("Version not found");if(t.status==="published")throw new Error("Version is already published");await this.adapter.publishVersion(e);}async unpublishDocument(e,t){let r=await this.adapter.getVersions({collection:e,documentId:t,limit:1e3});for(let o of r)if(o.status==="published"){await this.createVersion({collection:e,documentId:t,data:o.data,status:"draft",createdBy:"system",changeDescription:"Unpublished document"});break}}async revertToVersion(e,t,r,o){if(!await this.adapter.getVersion(e,r))throw new Error("Version not found");return await this.adapter.revertToVersion({collection:e,documentId:t,versionId:r,userId:o})}async getVersionHistory(e,t,r=20,o=0){return this.adapter.getVersions({collection:e,documentId:t,limit:r,offset:o})}async compareTwoVersions(e,t,r,o){return this.adapter.compareVersions({collection:e,documentId:t,versionA:r,versionB:o})}async getLatestDraft(e,t){return this.adapter.getLatestVersion(e,t)}async getPublishedVersion(e,t){return this.adapter.getPublishedVersion(e,t)}async getVersion(e,t){return this.adapter.getVersion(e,t)}async schedulePublish(e,t,r,o){if(!this.config.scheduleEnabled)throw new Error("Scheduled publishing is not enabled");if(!await this.adapter.getVersion(e,r))throw new Error("Version not found")}async deleteVersionHistory(e,t){await this.adapter.deleteVersions(e,t);}async pruneOldVersions(e,t){let r=await this.adapter.getVersions({collection:e,documentId:t,limit:this.config.maxVersionsPerDocument+100});if(r.length<=this.config.maxVersionsPerDocument)return;r.slice(0,this.config.maxVersionsPerDocument);let s=r.slice(this.config.maxVersionsPerDocument);for(let i of s)if(i.status!=="published"){await this.adapter.deleteVersions(e,t);break}}};function ao(n,e){return new z(n,e)}function co(n){return n==="published"}function lo(n){return n==="draft"}function uo(n){return n==="archived"}g();function po(n){return n?Array.isArray(n)?n:Object.values(n):[]}function go(n){return n?Array.isArray(n)?n:Object.values(n):[]}function qe(n){return {collections:po(n.collections),globals:go(n.globals),adapter:n.adapter,storage:n.storage,plugins:n.plugins,auth:n.auth,cors:n.cors,admin:n.admin,upload:n.upload,graphQL:n.graphQL,typescript:n.typescript,localization:n.localization,rateLimit:n.rateLimit,debug:n.debug}}var mo=qe;g();function fo(n){let{siteSettings:e,seoSettings:t,title:r,description:o,image:s,url:i}=n;if(!e)return "";let c=e.siteName||"",l=r||t?.defaultTitle||c,f=t?.titleTemplate,h=t?.separator||" | ",u=t?.siteNameInTitle!==false,d=f?f.replace(/\{\{title\}\}/g,l).replace(/\{\{siteName\}\}/g,u?c:"").replace(/\{\{separator\}\}/g,h).replace(/\s+/g," ").trim():l,A=o||t?.defaultDescription||e.siteDescription||"",p=s||e.siteOgImage?.url||"",y=i||e.siteUrl||"",b=`
22
22
  <title>${d}</title>
23
23
  <meta name="description" content="${A}">
24
24
  `;e.siteFavicon?.url&&(b+=`
@@ -60,11 +60,11 @@ ${s}
60
60
  `),r&&(o+=`
61
61
  <!-- Plausible Analytics -->
62
62
  <script defer data-domain="${r}" src="https://plausible.io/js/script.js"></script>
63
- `),o}g();var yo={facebook:{label:"Facebook"},twitter:{label:"Twitter / X"},instagram:{label:"Instagram"},linkedin:{label:"LinkedIn"},youtube:{label:"YouTube"},tiktok:{label:"TikTok"},pinterest:{label:"Pinterest"},discord:{label:"Discord"},twitch:{label:"Twitch"},github:{label:"GitHub"},mastodon:{label:"Mastodon"}},bo=["facebook","twitter","instagram","linkedin","youtube","tiktok","pinterest","discord","twitch","github","mastodon"];function Ge(n){if(!n)return [];let e=n.showAll===true,t=[];for(let r of bo){let o=n[r];if(!o||["tiktok","pinterest","discord","twitch","github","mastodon"].includes(r)&&!e)continue;let i=yo[r];t.push({platform:r,url:o,label:i?.label||r});}return t}async function Ao(n,e){try{let t=await n.findOne({collection:"_globals_social-settings",where:{},draft:e?.draft??!1});return Ge(t)}catch{return []}}g();function Qe(n){return n?{storeName:n.storeName,storeEmail:n.storeEmail,storePhone:n.storePhone,address:n.address,currency:n.currency,tax:n.tax,shipping:n.shipping,orders:n.orders}:{}}async function wo(n,e){try{let t=await n.findOne({collection:"_globals_store-settings",where:{},draft:e?.draft??!1});return Qe(t)}catch{return {}}}g();function Ye(n){return n?{testMode:n.testMode,provider:n.provider,stripe:n.stripe,paypal:n.paypal,square:n.square,methods:n.methods,bankTransfer:n.bankTransfer}:{}}async function xo(n,e){try{let t=await n.findOne({collection:"_globals_payment-settings",where:{},draft:e?.draft??!1});return Ye(t)}catch{return {}}}g();g();g();g();g();function C(n){return new Promise((e,t)=>{n.oncomplete=n.onsuccess=()=>e(n.result),n.onabort=n.onerror=()=>t(n.error);})}function Z(n,e){let t,r=()=>{if(t)return t;let o=indexedDB.open(n);return o.onupgradeneeded=()=>o.result.createObjectStore(e),t=C(o),t.then(s=>{s.onclose=()=>t=void 0;},()=>{t=void 0;}),t};return (o,s)=>r().then(i=>s(i.transaction(e,o).objectStore(e)))}var X;function M(){return X||(X=Z("keyval-store","keyval")),X}function W(n,e=M()){return e("readonly",t=>C(t.get(n)))}function ee(n,e,t=M()){return t("readwrite",r=>(r.put(e,n),C(r.transaction)))}function Je(n,e=M()){return e("readwrite",t=>(t.delete(n),C(t.transaction)))}function Xe(n=M()){return n("readwrite",e=>(e.clear(),C(e.transaction)))}function So(n,e){return n.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue());},C(n.transaction)}function Ze(n=M()){return n("readonly",e=>{if(e.getAllKeys)return C(e.getAllKeys());let t=[];return So(e,r=>t.push(r.key)).then(()=>t)})}var To="idb-keyval",et=(n={})=>{let e=n.base&&n.base.length>0?`${n.base}:`:"",t=o=>e+o,r;return n.dbName&&n.storeName&&(r=Z(n.dbName,n.storeName)),{name:To,options:n,async hasItem(o){return await W(t(o),r)!==void 0},async getItem(o){return await W(t(o),r)??null},async getItemRaw(o){return await W(t(o),r)??null},setItem(o,s){return ee(t(o),s,r)},setItemRaw(o,s){return ee(t(o),s,r)},removeItem(o){return Je(t(o),r)},getKeys(){return Ze(r)},clear(){return Xe(r)}}};async function te(n={}){let{namespace:e="kyro",ttl:t}=n,r=f$1({driver:et({dbName:"kyro-cms",storeName:e})}),o=e?`${e}:`:"";return {storage:{getItem:async i=>{let c=`${o}${i}`,l=await r.getItem(c);if(l==null)return null;try{let f=JSON.parse(l);return f.expiry&&Date.now()>f.expiry?(await r.removeItem(c),null):f.value}catch{return l}},setItem:async(i,c)=>{let l=`${o}${i}`,f=JSON.stringify(t?{value:c,expiry:Date.now()+t}:{value:c});await r.setItem(l,f);},removeItem:async i=>{await r.removeItem(`${o}${i}`);}},cleanup:async()=>{await r.dispose?.();}}}g();g();function re(n){let e=n||process.env.APP_SECRET||process.env.AUTH_SECRET||"development-secret-key";return oe.createHash("sha256").update(e).digest("hex")}function ko(n,e){let t=oe.randomBytes(16),r=oe.createCipheriv("aes-256-gcm",Buffer.from(e,"hex").subarray(0,32),t),o=r.update(n,"utf8","hex");o+=r.final("hex");let s=r.getAuthTag().toString("hex");return `${t.toString("hex")}:${s}:${o}`}function Co(n,e){let[t,r,o]=n.split(":"),s=Buffer.from(t,"hex"),i=Buffer.from(r,"hex"),c=oe.createDecipheriv("aes-256-gcm",Buffer.from(e,"hex").subarray(0,32),s);c.setAuthTag(i);let l=c.update(o,"hex","utf8");return l+=c.final("utf8"),l}async function ne(n={}){let{namespace:e="kyro",ttl:t,encryption:r=true,secret:o,basePath:s}=n,i=s?tt.join(s,".astro","kyro.json"):tt.join(process.cwd(),".astro","kyro.json"),c=f$1({driver:a$6({base:i})}),l=r?re(o):null,f=e?`${e}:`:"";return {storage:{getItem:async h=>{let u=`${f}${h}`,d=await c.getItem(u);if(d==null)return null;try{let A=l?Co(d,l):d,p=JSON.parse(A);return p.expiry&&Date.now()>p.expiry?(await c.removeItem(u),null):p.value}catch{return d}},setItem:async(h,u)=>{let d=`${f}${h}`,A=JSON.stringify(t?{value:u,expiry:Date.now()+t}:{value:u});await c.setItem(d,l?ko(A,l):A);},removeItem:async h=>{await c.removeItem(`${f}${h}`);}},cleanup:async()=>{await c.dispose?.();}}}async function se(n){let{environment:e,adapter:t,connectionString:r,encryption:o}=n,s=process.env.APP_SECRET||process.env.AUTH_SECRET,i={enabled:o?.enabled??true,algorithm:o?.algorithm};return e==="browser"?te({namespace:"kyro"}):ne({namespace:"kyro",encryption:i.enabled,secret:s})}async function rt(n){let e={...n,encryption:{enabled:true,algorithm:n.encryption?.algorithm}};return se(e)}g();function Ro(n){return {name:"kyro-loader",load:async e=>{let{store:t,logger:r,parseData:o}=e;r.info(`Loading Kyro CMS collection: "${n.collection}"`);try{let s=[];t.clear();for(let i of s){let c=String(i.id||i._id),l=await o({id:c,data:i});t.set({id:c,data:l,digest:JSON.stringify(l)});}r.info(`Successfully synced ${s.length} entries for "${n.collection}" into Astro store.`);}catch(s){r.error(`Failed to load Kyro collection "${n.collection}": ${s.message}`);}},schema:f.object({id:f.string(),createdAt:f.string().optional(),updatedAt:f.string().optional()}).passthrough()}}g();function vo(n){return {input:n.schema||f.object({}).passthrough(),handler:async(t,r)=>{try{return {success:!0,collection:n.collection,action:n.action,data:t,timestamp:new Date().toISOString()}}catch(o){return {success:false,error:o.message||"CMS Action Execution Failed"}}}}}g();function Do(n={}){let e=n.protectedRoutes||[],t=n.loginPath||"/admin/login",r=n.cookieName||"kyro_session";return async(o,s)=>{let{request:i,cookies:c,redirect:l,locals:f}=o,h=new URL(i.url),u=c?.get?.(r)?.value||i.headers.get("authorization")?.replace("Bearer ",""),d=null;return u&&(d={id:"user_1",email:"admin@kyro-cms.com",role:"admin"}),f.kyroUser=d,e.some(p=>new RegExp("^"+p.replace(/\*/g,".*")+"$").test(h.pathname))&&!d?l(`${t}?redirect=${encodeURIComponent(h.pathname)}`):s()}}g();function Io(n){let e=n?.collections||[],t=`// Auto-generated by Kyro CMS
63
+ `),o}g();var yo={facebook:{label:"Facebook"},twitter:{label:"Twitter / X"},instagram:{label:"Instagram"},linkedin:{label:"LinkedIn"},youtube:{label:"YouTube"},tiktok:{label:"TikTok"},pinterest:{label:"Pinterest"},discord:{label:"Discord"},twitch:{label:"Twitch"},github:{label:"GitHub"},mastodon:{label:"Mastodon"}},bo=["facebook","twitter","instagram","linkedin","youtube","tiktok","pinterest","discord","twitch","github","mastodon"];function Ge(n){if(!n)return [];let e=n.showAll===true,t=[];for(let r of bo){let o=n[r];if(!o||["tiktok","pinterest","discord","twitch","github","mastodon"].includes(r)&&!e)continue;let i=yo[r];t.push({platform:r,url:o,label:i?.label||r});}return t}async function Ao(n,e){try{let t=await n.findOne({collection:"_globals_social-settings",where:{},draft:e?.draft??!1});return Ge(t)}catch{return []}}g();function Qe(n){return n?{storeName:n.storeName,storeEmail:n.storeEmail,storePhone:n.storePhone,address:n.address,currency:n.currency,tax:n.tax,shipping:n.shipping,orders:n.orders}:{}}async function wo(n,e){try{let t=await n.findOne({collection:"_globals_store-settings",where:{},draft:e?.draft??!1});return Qe(t)}catch{return {}}}g();function Ye(n){return n?{testMode:n.testMode,provider:n.provider,stripe:n.stripe,paypal:n.paypal,square:n.square,methods:n.methods,bankTransfer:n.bankTransfer}:{}}async function xo(n,e){try{let t=await n.findOne({collection:"_globals_payment-settings",where:{},draft:e?.draft??!1});return Ye(t)}catch{return {}}}g();g();g();g();g();function v(n){return new Promise((e,t)=>{n.oncomplete=n.onsuccess=()=>e(n.result),n.onabort=n.onerror=()=>t(n.error);})}function Z(n,e){let t,r=()=>{if(t)return t;let o=indexedDB.open(n);return o.onupgradeneeded=()=>o.result.createObjectStore(e),t=v(o),t.then(s=>{s.onclose=()=>t=void 0;},()=>{t=void 0;}),t};return (o,s)=>r().then(i=>s(i.transaction(e,o).objectStore(e)))}var X;function M(){return X||(X=Z("keyval-store","keyval")),X}function W(n,e=M()){return e("readonly",t=>v(t.get(n)))}function ee(n,e,t=M()){return t("readwrite",r=>(r.put(e,n),v(r.transaction)))}function Je(n,e=M()){return e("readwrite",t=>(t.delete(n),v(t.transaction)))}function Xe(n=M()){return n("readwrite",e=>(e.clear(),v(e.transaction)))}function So(n,e){return n.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue());},v(n.transaction)}function Ze(n=M()){return n("readonly",e=>{if(e.getAllKeys)return v(e.getAllKeys());let t=[];return So(e,r=>t.push(r.key)).then(()=>t)})}var To="idb-keyval",et=(n={})=>{let e=n.base&&n.base.length>0?`${n.base}:`:"",t=o=>e+o,r;return n.dbName&&n.storeName&&(r=Z(n.dbName,n.storeName)),{name:To,options:n,async hasItem(o){return await W(t(o),r)!==void 0},async getItem(o){return await W(t(o),r)??null},async getItemRaw(o){return await W(t(o),r)??null},setItem(o,s){return ee(t(o),s,r)},setItemRaw(o,s){return ee(t(o),s,r)},removeItem(o){return Je(t(o),r)},getKeys(){return Ze(r)},clear(){return Xe(r)}}};async function te(n={}){let{namespace:e="kyro",ttl:t}=n,r=f$1({driver:et({dbName:"kyro-cms",storeName:e})}),o=e?`${e}:`:"";return {storage:{getItem:async i=>{let c=`${o}${i}`,l=await r.getItem(c);if(l==null)return null;try{let f=JSON.parse(l);return f.expiry&&Date.now()>f.expiry?(await r.removeItem(c),null):f.value}catch{return l}},setItem:async(i,c)=>{let l=`${o}${i}`,f=JSON.stringify(t?{value:c,expiry:Date.now()+t}:{value:c});await r.setItem(l,f);},removeItem:async i=>{await r.removeItem(`${o}${i}`);}},cleanup:async()=>{await r.dispose?.();}}}g();g();function re(n){let e=n||process.env.APP_SECRET||process.env.AUTH_SECRET||"development-secret-key";return oe.createHash("sha256").update(e).digest("hex")}function ko(n,e){let t=oe.randomBytes(16),r=oe.createCipheriv("aes-256-gcm",Buffer.from(e,"hex").subarray(0,32),t),o=r.update(n,"utf8","hex");o+=r.final("hex");let s=r.getAuthTag().toString("hex");return `${t.toString("hex")}:${s}:${o}`}function vo(n,e){let[t,r,o]=n.split(":"),s=Buffer.from(t,"hex"),i=Buffer.from(r,"hex"),c=oe.createDecipheriv("aes-256-gcm",Buffer.from(e,"hex").subarray(0,32),s);c.setAuthTag(i);let l=c.update(o,"hex","utf8");return l+=c.final("utf8"),l}async function ne(n={}){let{namespace:e="kyro",ttl:t,encryption:r=true,secret:o,basePath:s}=n,i=s?tt.join(s,".astro","kyro.json"):tt.join(process.cwd(),".astro","kyro.json"),c=f$1({driver:a$6({base:i})}),l=r?re(o):null,f=e?`${e}:`:"";return {storage:{getItem:async h=>{let u=`${f}${h}`,d=await c.getItem(u);if(d==null)return null;try{let A=l?vo(d,l):d,p=JSON.parse(A);return p.expiry&&Date.now()>p.expiry?(await c.removeItem(u),null):p.value}catch{return d}},setItem:async(h,u)=>{let d=`${f}${h}`,A=JSON.stringify(t?{value:u,expiry:Date.now()+t}:{value:u});await c.setItem(d,l?ko(A,l):A);},removeItem:async h=>{await c.removeItem(`${f}${h}`);}},cleanup:async()=>{await c.dispose?.();}}}async function se(n){let{environment:e,adapter:t,connectionString:r,encryption:o}=n,s=process.env.APP_SECRET||process.env.AUTH_SECRET,i={enabled:o?.enabled??true,algorithm:o?.algorithm};return e==="browser"?te({namespace:"kyro"}):ne({namespace:"kyro",encryption:i.enabled,secret:s})}async function rt(n){let e={...n,encryption:{enabled:true,algorithm:n.encryption?.algorithm}};return se(e)}g();function Co(n){return {name:"kyro-loader",load:async e=>{let{store:t,logger:r,parseData:o}=e;r.info(`Loading Kyro CMS collection: "${n.collection}"`);try{let s=[];t.clear();for(let i of s){let c=String(i.id||i._id),l=await o({id:c,data:i});t.set({id:c,data:l,digest:JSON.stringify(l)});}r.info(`Successfully synced ${s.length} entries for "${n.collection}" into Astro store.`);}catch(s){r.error(`Failed to load Kyro collection "${n.collection}": ${s.message}`);}},schema:f.object({id:f.string(),createdAt:f.string().optional(),updatedAt:f.string().optional()}).passthrough()}}g();function Ro(n){return {input:n.schema||f.object({}).passthrough(),handler:async(t,r)=>{try{return {success:!0,collection:n.collection,action:n.action,data:t,timestamp:new Date().toISOString()}}catch(o){return {success:false,error:o.message||"CMS Action Execution Failed"}}}}}g();function Do(n={}){let e=n.protectedRoutes||[],t=n.loginPath||"/admin/login",r=n.cookieName||"kyro_session";return async(o,s)=>{let{request:i,cookies:c,redirect:l,locals:f}=o,h=new URL(i.url),u=c?.get?.(r)?.value||i.headers.get("authorization")?.replace("Bearer ",""),d=null;return u&&(d={id:"user_1",email:"admin@kyro-cms.com",role:"admin"}),f.kyroUser=d,e.some(p=>new RegExp("^"+p.replace(/\*/g,".*")+"$").test(h.pathname))&&!d?l(`${t}?redirect=${encodeURIComponent(h.pathname)}`):s()}}g();function Io(n){let e=n?.collections||[],t=`// Auto-generated by Kyro CMS
64
64
  declare module 'kyro:collections' {
65
65
  export interface KyroCollections {
66
66
  `;for(let r of e){let o=r.name||r.slug;t+=` '${o}': Record<string, any>;
67
67
  `;}return t+=` }
68
68
  }
69
69
  `,t}g();function Lo(n={}){return {APP_SECRET:{context:"server",access:"secret",type:"string",optional:false},DATABASE_URL:{context:"server",access:"secret",type:"string",optional:!n.requireDatabase},PUBLIC_KYRO_URL:{context:"client",access:"public",type:"string",optional:true,default:"http://localhost:4321"}}}g();function Eo(n,e={}){let{idField:t="id",parentField:r="parent",slugField:o="slug",slugPrefix:s=true,basePath:i="",maxDepth:c=10}=e,l=new Map,f=[];for(let u of n){let d=u[t];d!=null&&l.set(d,{doc:u,id:d,slug:u[o],depth:0,path:"",fullPath:"",children:[]});}for(let u of n){let d=u[t],A=l.get(d);if(!A)continue;let p=u[r];p&&typeof p=="object"&&(p=p[t]||p.id||p._id),p&&l.has(p)?l.get(p).children.push(A):f.push(A);}function h(u,d,A){if(!(d>c))for(let p of u){p.depth=d;let y=p.slug||String(p.id),b="";s?b=A?`${A}/${y}`:i?`${i.replace(/\/$/,"")}/${y}`:`/${y}`:b=i?`${i.replace(/\/$/,"")}/${y}`:`/${y}`,p.path=b,p.fullPath=b,p.children.length>0&&h(p.children,d+1,p.path);}}return h(f,0,""),f}function ot(n,e,t={}){let r,o;Array.isArray(n)?(r=n,o=e):(o=n,r=e);let{idField:s="id",parentField:i="parent",labelField:c="title",slugField:l="slug",basePath:f=""}=t,h=new Map;for(let y of r){let b=y[s];b!=null&&h.set(b,y);}let u=[],d=o,A=new Set;for(;d!==void 0&&h.has(d)&&!A.has(d);){A.add(d);let y=h.get(d),b=y[c]||y.name||y.label||y[l]||String(d);u.unshift({id:d,label:b,slug:y[l]});let S=y[i];S&&typeof S=="object"&&(S=S[s]||S.id||S._id),d=S;}let p=f?f.replace(/\/$/,""):"";return u.map(y=>{let b=y.slug||String(y.id);return p=`${p}/${b}`,{...y,path:p}})}function Oo(n,e,t={}){let r=ot(n,e,t);return r[r.length-1]?.path||(t.basePath?t.basePath:"/")}function Uo(n){let e=[];function t(r){for(let o of r)e.push({doc:o.doc,id:o.id,depth:o.depth,path:o.path,fullPath:o.fullPath,hasChildren:o.children.length>0}),o.children.length>0&&t(o.children);}return t(n),e}
70
- export{D as AccountLockout,K as Auth,Y as CSSGenerator,E as InMemoryAccountLockout,L as InMemoryAuthAdapter,U as NeonAdapter,I as RateLimiter,V as TursoAdapter,z as VersionManager,We as authConfig,Eo as buildDocumentTree,Yr as createAdminStyling,io as createAuth,J as createAuthConfig,rt as createAuthStorage,Ne as createNeonAdapter,se as createStorage,$e as createTursoAdapter,ao as createVersionManager,Gr as defaultDarkTheme,Jr as defaultFieldStyling,F as defaultLightTheme,qe as defineConfig,mo as defineKyroConfig,Qr as ecommerce2026Theme,Uo as flattenDocumentTree,ho as generateAnalyticsTags,Ke as generateCSSVariables,Io as generateKyroAstroTypes,fo as generateSeoTags,qr as generateTailwindConfig,ot as getBreadcrumbs,j as getDefaultDraftPublishConfig,Oo as getNestedPath,xo as getPaymentConfig,Ye as getPaymentConfigFromSettings,Ao as getSocialLinks,Ge as getSocialLinksFromSettings,wo as getStoreConfig,Qe as getStoreConfigFromSettings,uo as isArchived,lo as isDraft,co as isPublished,vo as kyroAction,Do as kyroAuthMiddleware,Lo as kyroEnvSchema,Ro as kyroLoader,Wr as runFieldHooks,Be as runHooks};
70
+ export{D as AccountLockout,K as Auth,Y as CSSGenerator,E as InMemoryAccountLockout,L as InMemoryAuthAdapter,U as NeonAdapter,I as RateLimiter,V as TursoAdapter,z as VersionManager,We as authConfig,Eo as buildDocumentTree,Yr as createAdminStyling,io as createAuth,J as createAuthConfig,rt as createAuthStorage,Ne as createNeonAdapter,se as createStorage,$e as createTursoAdapter,ao as createVersionManager,Gr as defaultDarkTheme,Jr as defaultFieldStyling,F as defaultLightTheme,qe as defineConfig,mo as defineKyroConfig,Qr as ecommerce2026Theme,Uo as flattenDocumentTree,ho as generateAnalyticsTags,Ke as generateCSSVariables,Io as generateKyroAstroTypes,fo as generateSeoTags,qr as generateTailwindConfig,ot as getBreadcrumbs,j as getDefaultDraftPublishConfig,Oo as getNestedPath,xo as getPaymentConfig,Ye as getPaymentConfigFromSettings,Ao as getSocialLinks,Ge as getSocialLinksFromSettings,wo as getStoreConfig,Qe as getStoreConfigFromSettings,uo as isArchived,lo as isDraft,co as isPublished,Ro as kyroAction,Do as kyroAuthMiddleware,Lo as kyroEnvSchema,Co as kyroLoader,Wr as runFieldHooks,Be as runHooks};
@@ -1 +1 @@
1
- export{a as LocalAdapter,b as createLocalAdapter}from'./chunk-JCEJ4VTN.js';import'./chunk-SLMIYECU.js';import'./chunk-VVVCCB6R.js';import'./chunk-TBHNE4VV.js';import'./chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
1
+ export{a as LocalAdapter,b as createLocalAdapter}from'./chunk-6LWF5MPL.js';import'./chunk-SLMIYECU.js';import'./chunk-JA44K75G.js';import'./chunk-TBHNE4VV.js';import'./chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
@@ -1 +1 @@
1
- 'use strict';var chunkK5XGP57D_cjs=require('./chunk-K5XGP57D.cjs');require('./chunk-VQ53TFYA.cjs'),require('./chunk-ZUBJ6RLQ.cjs'),require('./chunk-7WMMKGEO.cjs'),require('./chunk-BUNLC3II.cjs');Object.defineProperty(exports,"LocalAdapter",{enumerable:true,get:function(){return chunkK5XGP57D_cjs.a}});Object.defineProperty(exports,"createLocalAdapter",{enumerable:true,get:function(){return chunkK5XGP57D_cjs.b}});
1
+ 'use strict';var chunkXOR64WUQ_cjs=require('./chunk-XOR64WUQ.cjs');require('./chunk-VQ53TFYA.cjs'),require('./chunk-ZUBJ6RLQ.cjs'),require('./chunk-7WMMKGEO.cjs'),require('./chunk-BUNLC3II.cjs');Object.defineProperty(exports,"LocalAdapter",{enumerable:true,get:function(){return chunkXOR64WUQ_cjs.a}});Object.defineProperty(exports,"createLocalAdapter",{enumerable:true,get:function(){return chunkXOR64WUQ_cjs.b}});
@@ -1 +1 @@
1
- 'use strict';var chunk7DUKWHRN_cjs=require('./chunk-7DUKWHRN.cjs');require('./chunk-HTYVI2HK.cjs'),require('./chunk-BUNLC3II.cjs');Object.defineProperty(exports,"MongoDBAuthAdapter",{enumerable:true,get:function(){return chunk7DUKWHRN_cjs.a}});
1
+ 'use strict';var chunkJ6V573PE_cjs=require('./chunk-J6V573PE.cjs');require('./chunk-HTYVI2HK.cjs'),require('./chunk-BUNLC3II.cjs');Object.defineProperty(exports,"MongoDBAuthAdapter",{enumerable:true,get:function(){return chunkJ6V573PE_cjs.a}});
@@ -1 +1 @@
1
- export{a as MongoDBAuthAdapter}from'./chunk-5ZEYOFAK.js';import'./chunk-7NH7H3WA.js';import'./chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
1
+ export{a as MongoDBAuthAdapter}from'./chunk-YGI5W4RS.js';import'./chunk-7NH7H3WA.js';import'./chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
@@ -1 +1 @@
1
- 'use strict';var chunkXFYSADHV_cjs=require('../chunk-XFYSADHV.cjs');require('../chunk-ZTLGK6R4.cjs');var chunkEYHD7HZE_cjs=require('../chunk-EYHD7HZE.cjs');require('../chunk-VQ53TFYA.cjs'),require('../chunk-F4ITQ6XQ.cjs'),require('../chunk-HTYVI2HK.cjs'),require('../chunk-ZUBJ6RLQ.cjs'),require('../chunk-7WMMKGEO.cjs'),require('../chunk-BUNLC3II.cjs');Object.defineProperty(exports,"MongoDBAdapter",{enumerable:true,get:function(){return chunkXFYSADHV_cjs.a}});Object.defineProperty(exports,"createMongoDBAdapter",{enumerable:true,get:function(){return chunkXFYSADHV_cjs.b}});Object.defineProperty(exports,"MongoDBAuthAdapter",{enumerable:true,get:function(){return chunkEYHD7HZE_cjs.a}});
1
+ 'use strict';var chunkXFYSADHV_cjs=require('../chunk-XFYSADHV.cjs');require('../chunk-ZTLGK6R4.cjs');var chunkJ6V573PE_cjs=require('../chunk-J6V573PE.cjs');require('../chunk-VQ53TFYA.cjs'),require('../chunk-F4ITQ6XQ.cjs'),require('../chunk-HTYVI2HK.cjs'),require('../chunk-ZUBJ6RLQ.cjs'),require('../chunk-7WMMKGEO.cjs'),require('../chunk-BUNLC3II.cjs');Object.defineProperty(exports,"MongoDBAdapter",{enumerable:true,get:function(){return chunkXFYSADHV_cjs.a}});Object.defineProperty(exports,"createMongoDBAdapter",{enumerable:true,get:function(){return chunkXFYSADHV_cjs.b}});Object.defineProperty(exports,"MongoDBAuthAdapter",{enumerable:true,get:function(){return chunkJ6V573PE_cjs.a}});
@@ -1,6 +1,6 @@
1
- import { b as AbstractBaseAdapter, c as AuthAdapter, U as UserRole, d as AuthUser, S as Session, a as AuditLogFilter, A as AuditLog } from '../base-BaOJ5uWd.cjs';
2
- import { F as FindArgs, b as FindResult, c as FindByIDArgs, d as CreateArgs, U as UpdateArgs, D as DeleteArgs, e as FindOneArgs, f as FindVersionsArgs, V as VersionRecord, g as CreateVersionArgs } from '../types-QglJ7PwT.cjs';
3
- import '../types-DxaK39ix.cjs';
1
+ import { b as AbstractBaseAdapter, c as AuthAdapter, U as UserRole, d as AuthUser, S as Session, a as AuditLogFilter, A as AuditLog } from '../base-DIpT2Vuz.cjs';
2
+ import { F as FindArgs, b as FindResult, c as FindByIDArgs, d as CreateArgs, U as UpdateArgs, D as DeleteArgs, e as FindOneArgs, f as FindVersionsArgs, V as VersionRecord, g as CreateVersionArgs } from '../types-CdwfDpyW.cjs';
3
+ import '../types-C3QFX0l6.cjs';
4
4
 
5
5
  declare class MongoDBAdapter extends AbstractBaseAdapter {
6
6
  dialect: "mongodb";
@@ -1,6 +1,6 @@
1
- import { b as AbstractBaseAdapter, c as AuthAdapter, U as UserRole, d as AuthUser, S as Session, a as AuditLogFilter, A as AuditLog } from '../base-OYfoYPYP.js';
2
- import { F as FindArgs, b as FindResult, c as FindByIDArgs, d as CreateArgs, U as UpdateArgs, D as DeleteArgs, e as FindOneArgs, f as FindVersionsArgs, V as VersionRecord, g as CreateVersionArgs } from '../types-BCOhfwHC.js';
3
- import '../types-DxaK39ix.js';
1
+ import { b as AbstractBaseAdapter, c as AuthAdapter, U as UserRole, d as AuthUser, S as Session, a as AuditLogFilter, A as AuditLog } from '../base-C2DOe8wD.js';
2
+ import { F as FindArgs, b as FindResult, c as FindByIDArgs, d as CreateArgs, U as UpdateArgs, D as DeleteArgs, e as FindOneArgs, f as FindVersionsArgs, V as VersionRecord, g as CreateVersionArgs } from '../types-CKWnrUAh.js';
3
+ import '../types-C3QFX0l6.js';
4
4
 
5
5
  declare class MongoDBAdapter extends AbstractBaseAdapter {
6
6
  dialect: "mongodb";
@@ -1 +1 @@
1
- export{a as MongoDBAdapter,b as createMongoDBAdapter}from'../chunk-FK2BG4HU.js';import'../chunk-WXT2XW7T.js';export{a as MongoDBAuthAdapter}from'../chunk-XIAJQLGS.js';import'../chunk-SLMIYECU.js';import'../chunk-P6JITOFF.js';import'../chunk-7NH7H3WA.js';import'../chunk-JA44K75G.js';import'../chunk-TBHNE4VV.js';import'../chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
1
+ export{a as MongoDBAdapter,b as createMongoDBAdapter}from'../chunk-FK2BG4HU.js';import'../chunk-WXT2XW7T.js';export{a as MongoDBAuthAdapter}from'../chunk-YGI5W4RS.js';import'../chunk-SLMIYECU.js';import'../chunk-P6JITOFF.js';import'../chunk-7NH7H3WA.js';import'../chunk-JA44K75G.js';import'../chunk-TBHNE4VV.js';import'../chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
@@ -1 +1 @@
1
- export{a as PostgresAuthAdapter}from'./chunk-ZWDBPEXL.js';import'./chunk-47CXBWMA.js';import'./chunk-FLMUMPDE.js';import'./chunk-EML5FDUU.js';import'./chunk-HRAY65XH.js';import'./chunk-3NSZZCOJ.js';import'./chunk-7NH7H3WA.js';import'./chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
1
+ export{a as PostgresAuthAdapter}from'./chunk-6E44MQQ5.js';import'./chunk-47CXBWMA.js';import'./chunk-FLMUMPDE.js';import'./chunk-EML5FDUU.js';import'./chunk-HRAY65XH.js';import'./chunk-3NSZZCOJ.js';import'./chunk-7NH7H3WA.js';import'./chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
@@ -1 +1 @@
1
- 'use strict';var chunkXBQ6HV3T_cjs=require('./chunk-XBQ6HV3T.cjs');require('./chunk-7JWQ2PZP.cjs'),require('./chunk-BAVN7VDR.cjs'),require('./chunk-NGNJSUGL.cjs'),require('./chunk-BCEE4NBZ.cjs'),require('./chunk-VRZC4TTF.cjs'),require('./chunk-HTYVI2HK.cjs'),require('./chunk-BUNLC3II.cjs');Object.defineProperty(exports,"PostgresAuthAdapter",{enumerable:true,get:function(){return chunkXBQ6HV3T_cjs.a}});
1
+ 'use strict';var chunkQYN6C3FZ_cjs=require('./chunk-QYN6C3FZ.cjs');require('./chunk-7JWQ2PZP.cjs'),require('./chunk-BAVN7VDR.cjs'),require('./chunk-NGNJSUGL.cjs'),require('./chunk-BCEE4NBZ.cjs'),require('./chunk-VRZC4TTF.cjs'),require('./chunk-HTYVI2HK.cjs'),require('./chunk-BUNLC3II.cjs');Object.defineProperty(exports,"PostgresAuthAdapter",{enumerable:true,get:function(){return chunkQYN6C3FZ_cjs.a}});
@@ -1 +1 @@
1
- 'use strict';var chunkS5HTTLN7_cjs=require('./chunk-S5HTTLN7.cjs');require('./chunk-F4ITQ6XQ.cjs'),require('./chunk-HTYVI2HK.cjs'),require('./chunk-BUNLC3II.cjs');Object.defineProperty(exports,"RedisAuthAdapter",{enumerable:true,get:function(){return chunkS5HTTLN7_cjs.a}});
1
+ 'use strict';var chunk4NTIK6DF_cjs=require('./chunk-4NTIK6DF.cjs');require('./chunk-F4ITQ6XQ.cjs'),require('./chunk-HTYVI2HK.cjs'),require('./chunk-BUNLC3II.cjs');Object.defineProperty(exports,"RedisAuthAdapter",{enumerable:true,get:function(){return chunk4NTIK6DF_cjs.a}});
@@ -1 +1 @@
1
- export{a as RedisAuthAdapter}from'./chunk-M75VGFCI.js';import'./chunk-P6JITOFF.js';import'./chunk-7NH7H3WA.js';import'./chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
1
+ export{a as RedisAuthAdapter}from'./chunk-HPIJI7TM.js';import'./chunk-P6JITOFF.js';import'./chunk-7NH7H3WA.js';import'./chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
@@ -1 +1 @@
1
- 'use strict';var chunk6MNLRAKM_cjs=require('../chunk-6MNLRAKM.cjs');require('../chunk-Q5TFO66G.cjs'),require('../chunk-7NKNSRCB.cjs'),require('../chunk-HPYH7GTS.cjs'),require('../chunk-OPTVCCQQ.cjs'),require('../chunk-O4YE57OS.cjs'),require('../chunk-MCIZG4A3.cjs'),require('../chunk-35PGCW3S.cjs'),require('../chunk-UNYXWPLZ.cjs'),require('../chunk-PITMDQYN.cjs'),require('../chunk-GIS6X43A.cjs'),require('../chunk-LEBM6ZSZ.cjs'),require('../chunk-GNEVCEJU.cjs'),require('../chunk-ZO3YB5DK.cjs'),require('../chunk-3VXEK5ZW.cjs'),require('../chunk-EZIDQBXI.cjs'),require('../chunk-LQ3YZTPU.cjs'),require('../chunk-SBNMXQNO.cjs'),require('../chunk-ZHA446FA.cjs'),require('../chunk-TCFL3UWT.cjs'),require('../chunk-XBQ6HV3T.cjs'),require('../chunk-7JWQ2PZP.cjs'),require('../chunk-RVBSJ4UQ.cjs'),require('../chunk-GNOSG3PK.cjs'),require('../chunk-LY7N3UHH.cjs'),require('../chunk-BAVN7VDR.cjs'),require('../chunk-NGNJSUGL.cjs'),require('../chunk-BCEE4NBZ.cjs'),require('../chunk-VRZC4TTF.cjs'),require('../chunk-EYHD7HZE.cjs'),require('../chunk-HTYVI2HK.cjs'),require('../chunk-ZUBJ6RLQ.cjs'),require('../chunk-7WMMKGEO.cjs'),require('../chunk-BUNLC3II.cjs');Object.defineProperty(exports,"createKyroApp",{enumerable:true,get:function(){return chunk6MNLRAKM_cjs.ib}});Object.defineProperty(exports,"createRESTAPI",{enumerable:true,get:function(){return chunk6MNLRAKM_cjs.jb}});
1
+ 'use strict';var chunk6YS6XLOD_cjs=require('../chunk-6YS6XLOD.cjs');require('../chunk-Q5TFO66G.cjs'),require('../chunk-7NKNSRCB.cjs'),require('../chunk-HPYH7GTS.cjs'),require('../chunk-EQN3HDES.cjs'),require('../chunk-O4YE57OS.cjs'),require('../chunk-MCIZG4A3.cjs'),require('../chunk-35PGCW3S.cjs'),require('../chunk-UNYXWPLZ.cjs'),require('../chunk-PITMDQYN.cjs'),require('../chunk-GIS6X43A.cjs'),require('../chunk-LEBM6ZSZ.cjs'),require('../chunk-GNEVCEJU.cjs'),require('../chunk-XDQVYCIR.cjs'),require('../chunk-3VXEK5ZW.cjs'),require('../chunk-EZIDQBXI.cjs'),require('../chunk-LQ3YZTPU.cjs'),require('../chunk-SBNMXQNO.cjs'),require('../chunk-ZHA446FA.cjs'),require('../chunk-TCFL3UWT.cjs'),require('../chunk-QYN6C3FZ.cjs'),require('../chunk-7JWQ2PZP.cjs'),require('../chunk-RVBSJ4UQ.cjs'),require('../chunk-GNOSG3PK.cjs'),require('../chunk-LY7N3UHH.cjs'),require('../chunk-BAVN7VDR.cjs'),require('../chunk-NGNJSUGL.cjs'),require('../chunk-BCEE4NBZ.cjs'),require('../chunk-VRZC4TTF.cjs'),require('../chunk-J6V573PE.cjs'),require('../chunk-HTYVI2HK.cjs'),require('../chunk-ZUBJ6RLQ.cjs'),require('../chunk-7WMMKGEO.cjs'),require('../chunk-BUNLC3II.cjs');Object.defineProperty(exports,"createKyroApp",{enumerable:true,get:function(){return chunk6YS6XLOD_cjs.ib}});Object.defineProperty(exports,"createRESTAPI",{enumerable:true,get:function(){return chunk6YS6XLOD_cjs.jb}});
@@ -1,8 +1,8 @@
1
1
  import { Hono } from 'hono';
2
- import { B as BaseAdapter, i as User } from '../types-QglJ7PwT.cjs';
3
- import { R as Registry } from '../index-Zrg3sZ6R.cjs';
4
- import { j as createWebhookService } from '../WebhookService-CGxHtw7E.cjs';
5
- import '../types-DxaK39ix.cjs';
2
+ import { B as BaseAdapter, i as User } from '../types-CdwfDpyW.cjs';
3
+ import { R as Registry } from '../index-Ci7aUrmN.cjs';
4
+ import { j as createWebhookService } from '../WebhookService-BJTCP3cU.cjs';
5
+ import '../types-C3QFX0l6.cjs';
6
6
  import 'zod';
7
7
 
8
8
  interface KyroAppOptions {
@@ -1,8 +1,8 @@
1
1
  import { Hono } from 'hono';
2
- import { B as BaseAdapter, i as User } from '../types-BCOhfwHC.js';
3
- import { R as Registry } from '../index-NGnJpSgf.js';
4
- import { j as createWebhookService } from '../WebhookService-CNC1lYz7.js';
5
- import '../types-DxaK39ix.js';
2
+ import { B as BaseAdapter, i as User } from '../types-CKWnrUAh.js';
3
+ import { R as Registry } from '../index-C9uBoJtm.js';
4
+ import { j as createWebhookService } from '../WebhookService-Bqr_66lK.js';
5
+ import '../types-C3QFX0l6.js';
6
6
  import 'zod';
7
7
 
8
8
  interface KyroAppOptions {
@@ -1 +1 @@
1
- export{ib as createKyroApp,jb as createRESTAPI}from'../chunk-B4AC23SG.js';import'../chunk-3KZXF4US.js';import'../chunk-CH4TZZI5.js';import'../chunk-OLRCZ6E3.js';import'../chunk-N6MNQIQU.js';import'../chunk-6TPICJ2L.js';import'../chunk-YENNL5HG.js';import'../chunk-W45TLOOT.js';import'../chunk-IKGVPXMK.js';import'../chunk-YUUXFD73.js';import'../chunk-LVBHOZZF.js';import'../chunk-OBYAIJVU.js';import'../chunk-JRUQ5ABB.js';import'../chunk-CIVA6SKW.js';import'../chunk-WPM6LFCY.js';import'../chunk-U6KFONKM.js';import'../chunk-TYQYKKWJ.js';import'../chunk-REQ622YC.js';import'../chunk-GQGFNTDZ.js';import'../chunk-ZAKYTBEN.js';import'../chunk-ZWDBPEXL.js';import'../chunk-47CXBWMA.js';import'../chunk-3TAUNYEM.js';import'../chunk-N5POANYV.js';import'../chunk-2HA6EKXX.js';import'../chunk-FLMUMPDE.js';import'../chunk-EML5FDUU.js';import'../chunk-HRAY65XH.js';import'../chunk-3NSZZCOJ.js';import'../chunk-XIAJQLGS.js';import'../chunk-7NH7H3WA.js';import'../chunk-JA44K75G.js';import'../chunk-TBHNE4VV.js';import'../chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
1
+ export{ib as createKyroApp,jb as createRESTAPI}from'../chunk-2TYITUOC.js';import'../chunk-3KZXF4US.js';import'../chunk-CH4TZZI5.js';import'../chunk-OLRCZ6E3.js';import'../chunk-WNU76M2C.js';import'../chunk-6TPICJ2L.js';import'../chunk-YENNL5HG.js';import'../chunk-W45TLOOT.js';import'../chunk-IKGVPXMK.js';import'../chunk-YUUXFD73.js';import'../chunk-LVBHOZZF.js';import'../chunk-OBYAIJVU.js';import'../chunk-JRUQ5ABB.js';import'../chunk-V4FAL7AG.js';import'../chunk-WPM6LFCY.js';import'../chunk-U6KFONKM.js';import'../chunk-TYQYKKWJ.js';import'../chunk-REQ622YC.js';import'../chunk-GQGFNTDZ.js';import'../chunk-ZAKYTBEN.js';import'../chunk-6E44MQQ5.js';import'../chunk-47CXBWMA.js';import'../chunk-3TAUNYEM.js';import'../chunk-N5POANYV.js';import'../chunk-2HA6EKXX.js';import'../chunk-FLMUMPDE.js';import'../chunk-EML5FDUU.js';import'../chunk-HRAY65XH.js';import'../chunk-3NSZZCOJ.js';import'../chunk-YGI5W4RS.js';import'../chunk-7NH7H3WA.js';import'../chunk-JA44K75G.js';import'../chunk-TBHNE4VV.js';import'../chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
@@ -1 +1 @@
1
- 'use strict';var chunkOPTVCCQQ_cjs=require('./chunk-OPTVCCQQ.cjs');require('./chunk-HTYVI2HK.cjs'),require('./chunk-BUNLC3II.cjs');Object.defineProperty(exports,"SQLiteAuthAdapter",{enumerable:true,get:function(){return chunkOPTVCCQQ_cjs.a}});
1
+ 'use strict';var chunkEQN3HDES_cjs=require('./chunk-EQN3HDES.cjs');require('./chunk-HTYVI2HK.cjs'),require('./chunk-BUNLC3II.cjs');Object.defineProperty(exports,"SQLiteAuthAdapter",{enumerable:true,get:function(){return chunkEQN3HDES_cjs.a}});
@@ -1 +1 @@
1
- export{a as SQLiteAuthAdapter}from'./chunk-N6MNQIQU.js';import'./chunk-7NH7H3WA.js';import'./chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
1
+ export{a as SQLiteAuthAdapter}from'./chunk-WNU76M2C.js';import'./chunk-7NH7H3WA.js';import'./chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
@@ -1 +1 @@
1
- 'use strict';var chunkJZ7Z6WC2_cjs=require('../chunk-JZ7Z6WC2.cjs'),chunk7GGZA5YU_cjs=require('../chunk-7GGZA5YU.cjs'),chunkZO3YB5DK_cjs=require('../chunk-ZO3YB5DK.cjs');require('../chunk-BUNLC3II.cjs');Object.defineProperty(exports,"accessSettingsGlobal",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.g}});Object.defineProperty(exports,"allGlobalSettings",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.k}});Object.defineProperty(exports,"blogCollections",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.q}});Object.defineProperty(exports,"brandSettingsGlobal",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.e}});Object.defineProperty(exports,"brandsCollection",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.S}});Object.defineProperty(exports,"brandsCollections",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.T}});Object.defineProperty(exports,"categoriesCollection",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.A}});Object.defineProperty(exports,"categoriesCollections",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.B}});Object.defineProperty(exports,"coreGlobalSettings",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.l}});Object.defineProperty(exports,"couponsCollection",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.K}});Object.defineProperty(exports,"couponsCollections",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.L}});Object.defineProperty(exports,"createTemplateConfig",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.V}});Object.defineProperty(exports,"customersCollection",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.G}});Object.defineProperty(exports,"customersCollections",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.H}});Object.defineProperty(exports,"ecommerceCollections",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.r}});Object.defineProperty(exports,"ecommerceGlobals",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.s}});Object.defineProperty(exports,"emailSettingsGlobal",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.f}});Object.defineProperty(exports,"formEntriesCollection",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.O}});Object.defineProperty(exports,"formEntriesCollections",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.P}});Object.defineProperty(exports,"formsCollection",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.M}});Object.defineProperty(exports,"formsCollections",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.N}});Object.defineProperty(exports,"getSettingsForTemplate",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.n}});Object.defineProperty(exports,"kitchenSinkCollections",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.t}});Object.defineProperty(exports,"mediaCollection",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.u}});Object.defineProperty(exports,"mediaCollections",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.v}});Object.defineProperty(exports,"menuCollection",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.w}});Object.defineProperty(exports,"menuCollections",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.x}});Object.defineProperty(exports,"minimalCollections",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.a}});Object.defineProperty(exports,"ordersCollection",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.I}});Object.defineProperty(exports,"ordersCollections",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.J}});Object.defineProperty(exports,"pageCollection",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.y}});Object.defineProperty(exports,"pageCollections",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.z}});Object.defineProperty(exports,"postsCollection",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.o}});Object.defineProperty(exports,"postsCollections",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.p}});Object.defineProperty(exports,"productCategoriesCollection",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.C}});Object.defineProperty(exports,"productCategoriesCollections",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.D}});Object.defineProperty(exports,"productsCollection",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.E}});Object.defineProperty(exports,"productsCollections",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.F}});Object.defineProperty(exports,"reviewsCollection",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.Q}});Object.defineProperty(exports,"reviewsCollections",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.R}});Object.defineProperty(exports,"seoSettingsGlobal",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.d}});Object.defineProperty(exports,"settingsBySlug",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.m}});Object.defineProperty(exports,"shippingSettingsGlobal",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.i}});Object.defineProperty(exports,"siteSettingsGlobal",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.c}});Object.defineProperty(exports,"starterCollections",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.b}});Object.defineProperty(exports,"storeSettingsGlobal",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.h}});Object.defineProperty(exports,"systemSettingsGlobal",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.j}});Object.defineProperty(exports,"templateCollections",{enumerable:true,get:function(){return chunkJZ7Z6WC2_cjs.U}});Object.defineProperty(exports,"storageSettingsGlobal",{enumerable:true,get:function(){return chunk7GGZA5YU_cjs.a}});Object.defineProperty(exports,"authCollections",{enumerable:true,get:function(){return chunkZO3YB5DK_cjs.b}});
1
+ 'use strict';var chunkGTR7JAKP_cjs=require('../chunk-GTR7JAKP.cjs'),chunk7GGZA5YU_cjs=require('../chunk-7GGZA5YU.cjs'),chunkXDQVYCIR_cjs=require('../chunk-XDQVYCIR.cjs');require('../chunk-BUNLC3II.cjs');Object.defineProperty(exports,"accessSettingsGlobal",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.g}});Object.defineProperty(exports,"allGlobalSettings",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.k}});Object.defineProperty(exports,"blogCollections",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.q}});Object.defineProperty(exports,"brandSettingsGlobal",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.e}});Object.defineProperty(exports,"brandsCollection",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.S}});Object.defineProperty(exports,"brandsCollections",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.T}});Object.defineProperty(exports,"categoriesCollection",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.A}});Object.defineProperty(exports,"categoriesCollections",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.B}});Object.defineProperty(exports,"coreGlobalSettings",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.l}});Object.defineProperty(exports,"couponsCollection",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.K}});Object.defineProperty(exports,"couponsCollections",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.L}});Object.defineProperty(exports,"createTemplateConfig",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.V}});Object.defineProperty(exports,"customersCollection",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.G}});Object.defineProperty(exports,"customersCollections",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.H}});Object.defineProperty(exports,"ecommerceCollections",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.r}});Object.defineProperty(exports,"ecommerceGlobals",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.s}});Object.defineProperty(exports,"emailSettingsGlobal",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.f}});Object.defineProperty(exports,"formEntriesCollection",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.O}});Object.defineProperty(exports,"formEntriesCollections",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.P}});Object.defineProperty(exports,"formsCollection",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.M}});Object.defineProperty(exports,"formsCollections",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.N}});Object.defineProperty(exports,"getSettingsForTemplate",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.n}});Object.defineProperty(exports,"kitchenSinkCollections",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.t}});Object.defineProperty(exports,"mediaCollection",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.u}});Object.defineProperty(exports,"mediaCollections",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.v}});Object.defineProperty(exports,"menuCollection",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.w}});Object.defineProperty(exports,"menuCollections",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.x}});Object.defineProperty(exports,"minimalCollections",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.a}});Object.defineProperty(exports,"ordersCollection",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.I}});Object.defineProperty(exports,"ordersCollections",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.J}});Object.defineProperty(exports,"pageCollection",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.y}});Object.defineProperty(exports,"pageCollections",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.z}});Object.defineProperty(exports,"postsCollection",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.o}});Object.defineProperty(exports,"postsCollections",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.p}});Object.defineProperty(exports,"productCategoriesCollection",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.C}});Object.defineProperty(exports,"productCategoriesCollections",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.D}});Object.defineProperty(exports,"productsCollection",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.E}});Object.defineProperty(exports,"productsCollections",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.F}});Object.defineProperty(exports,"reviewsCollection",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.Q}});Object.defineProperty(exports,"reviewsCollections",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.R}});Object.defineProperty(exports,"seoSettingsGlobal",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.d}});Object.defineProperty(exports,"settingsBySlug",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.m}});Object.defineProperty(exports,"shippingSettingsGlobal",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.i}});Object.defineProperty(exports,"siteSettingsGlobal",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.c}});Object.defineProperty(exports,"starterCollections",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.b}});Object.defineProperty(exports,"storeSettingsGlobal",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.h}});Object.defineProperty(exports,"systemSettingsGlobal",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.j}});Object.defineProperty(exports,"templateCollections",{enumerable:true,get:function(){return chunkGTR7JAKP_cjs.U}});Object.defineProperty(exports,"storageSettingsGlobal",{enumerable:true,get:function(){return chunk7GGZA5YU_cjs.a}});Object.defineProperty(exports,"authCollections",{enumerable:true,get:function(){return chunkXDQVYCIR_cjs.b}});
@@ -1,5 +1,5 @@
1
- import { G as GlobalConfig, C as CollectionConfig } from '../types-QglJ7PwT.cjs';
2
- import '../types-DxaK39ix.cjs';
1
+ import { G as GlobalConfig, C as CollectionConfig } from '../types-CdwfDpyW.cjs';
2
+ import '../types-C3QFX0l6.cjs';
3
3
 
4
4
  declare const minimalCollections: Record<string, any>;
5
5
 
@@ -1,5 +1,5 @@
1
- import { G as GlobalConfig, C as CollectionConfig } from '../types-BCOhfwHC.js';
2
- import '../types-DxaK39ix.js';
1
+ import { G as GlobalConfig, C as CollectionConfig } from '../types-CKWnrUAh.js';
2
+ import '../types-C3QFX0l6.js';
3
3
 
4
4
  declare const minimalCollections: Record<string, any>;
5
5
 
@@ -1 +1 @@
1
- export{g as accessSettingsGlobal,k as allGlobalSettings,q as blogCollections,e as brandSettingsGlobal,S as brandsCollection,T as brandsCollections,A as categoriesCollection,B as categoriesCollections,l as coreGlobalSettings,K as couponsCollection,L as couponsCollections,V as createTemplateConfig,G as customersCollection,H as customersCollections,r as ecommerceCollections,s as ecommerceGlobals,f as emailSettingsGlobal,O as formEntriesCollection,P as formEntriesCollections,M as formsCollection,N as formsCollections,n as getSettingsForTemplate,t as kitchenSinkCollections,u as mediaCollection,v as mediaCollections,w as menuCollection,x as menuCollections,a as minimalCollections,I as ordersCollection,J as ordersCollections,y as pageCollection,z as pageCollections,o as postsCollection,p as postsCollections,C as productCategoriesCollection,D as productCategoriesCollections,E as productsCollection,F as productsCollections,Q as reviewsCollection,R as reviewsCollections,d as seoSettingsGlobal,m as settingsBySlug,i as shippingSettingsGlobal,c as siteSettingsGlobal,b as starterCollections,h as storeSettingsGlobal,j as systemSettingsGlobal,U as templateCollections}from'../chunk-E4H3ZZ7U.js';export{a as storageSettingsGlobal}from'../chunk-LWM4WABU.js';export{b as authCollections}from'../chunk-CIVA6SKW.js';import'../chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
1
+ export{g as accessSettingsGlobal,k as allGlobalSettings,q as blogCollections,e as brandSettingsGlobal,S as brandsCollection,T as brandsCollections,A as categoriesCollection,B as categoriesCollections,l as coreGlobalSettings,K as couponsCollection,L as couponsCollections,V as createTemplateConfig,G as customersCollection,H as customersCollections,r as ecommerceCollections,s as ecommerceGlobals,f as emailSettingsGlobal,O as formEntriesCollection,P as formEntriesCollections,M as formsCollection,N as formsCollections,n as getSettingsForTemplate,t as kitchenSinkCollections,u as mediaCollection,v as mediaCollections,w as menuCollection,x as menuCollections,a as minimalCollections,I as ordersCollection,J as ordersCollections,y as pageCollection,z as pageCollections,o as postsCollection,p as postsCollections,C as productCategoriesCollection,D as productCategoriesCollections,E as productsCollection,F as productsCollections,Q as reviewsCollection,R as reviewsCollections,d as seoSettingsGlobal,m as settingsBySlug,i as shippingSettingsGlobal,c as siteSettingsGlobal,b as starterCollections,h as storeSettingsGlobal,j as systemSettingsGlobal,U as templateCollections}from'../chunk-SRIXRJHL.js';export{a as storageSettingsGlobal}from'../chunk-LWM4WABU.js';export{b as authCollections}from'../chunk-V4FAL7AG.js';import'../chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
@@ -1,6 +1,6 @@
1
- import { B as BaseAdapter, i as User, R as Request, b as FindResult } from '../types-QglJ7PwT.cjs';
2
- import { j as createWebhookService } from '../WebhookService-CGxHtw7E.cjs';
3
- import '../types-DxaK39ix.cjs';
1
+ import { B as BaseAdapter, i as User, R as Request, b as FindResult } from '../types-CdwfDpyW.cjs';
2
+ import { j as createWebhookService } from '../WebhookService-BJTCP3cU.cjs';
3
+ import '../types-C3QFX0l6.cjs';
4
4
 
5
5
  interface ApiKeyContext {
6
6
  userId: string;
@@ -1,6 +1,6 @@
1
- import { B as BaseAdapter, i as User, R as Request, b as FindResult } from '../types-BCOhfwHC.js';
2
- import { j as createWebhookService } from '../WebhookService-CNC1lYz7.js';
3
- import '../types-DxaK39ix.js';
1
+ import { B as BaseAdapter, i as User, R as Request, b as FindResult } from '../types-CKWnrUAh.js';
2
+ import { j as createWebhookService } from '../WebhookService-Bqr_66lK.js';
3
+ import '../types-C3QFX0l6.js';
4
4
 
5
5
  interface ApiKeyContext {
6
6
  userId: string;
@@ -31,6 +31,7 @@ interface FieldAdmin {
31
31
  method?: string;
32
32
  inline?: boolean;
33
33
  compact?: boolean;
34
+ display?: "pills" | "default";
34
35
  collapsible?: boolean;
35
36
  initCollapsed?: boolean;
36
37
  pickerMode?: "drawer" | "dropdown";
@@ -297,6 +298,10 @@ interface SecretField extends BaseField {
297
298
  interface IconField extends BaseField {
298
299
  type: "icon";
299
300
  }
301
+ /**
302
+ * @experimental
303
+ * Native embedding field for AI semantic search and RAG workflows.
304
+ */
300
305
  interface EmbeddingField extends BaseField {
301
306
  type: "embedding";
302
307
  sourceField: string;
@@ -31,7 +31,7 @@ interface FieldAdmin {
31
31
  method?: string;
32
32
  inline?: boolean;
33
33
  compact?: boolean;
34
- display?: "pills" | "badges" | "chips" | "receipt" | "default";
34
+ display?: "pills" | "default";
35
35
  collapsible?: boolean;
36
36
  initCollapsed?: boolean;
37
37
  pickerMode?: "drawer" | "dropdown";
@@ -298,6 +298,10 @@ interface SecretField extends BaseField {
298
298
  interface IconField extends BaseField {
299
299
  type: "icon";
300
300
  }
301
+ /**
302
+ * @experimental
303
+ * Native embedding field for AI semantic search and RAG workflows.
304
+ */
301
305
  interface EmbeddingField extends BaseField {
302
306
  type: "embedding";
303
307
  sourceField: string;