@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
@@ -1,432 +0,0 @@
1
- import {a}from'./chunk-OLRCZ6E3.js';import {g as g$1}from'./chunk-Y2YAKDEQ.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
2
- g$1();function g(i){let{brand:e,title:t,previewText:r=t,bodyHtml:s,ctaText:o,ctaUrl:n,secondaryCtaText:a,secondaryCtaUrl:l}=i,p=e?.siteName||"Kyro CMS",u=e?.logoUrl||"https://kyro-cms.com/logo.svg",f=e?.logoDarkUrl||e?.logoUrl||"https://kyro-cms.com/logo-white.svg",h=e?.appUrl||"https://kyro-cms.com";return `<!DOCTYPE html>
3
- <html lang="en">
4
- <head>
5
- <meta charset="UTF-8">
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <meta name="color-scheme" content="light dark">
8
- <meta name="supported-color-schemes" content="light dark">
9
- <title>${t}</title>
10
- <style>
11
- :root {
12
- color-scheme: light dark;
13
- supported-color-schemes: light dark;
14
- }
15
- @media (prefers-color-scheme: dark) {
16
- .email-body { background-color: #09090b !important; color: #f4f4f5 !important; }
17
- .email-card { background-color: #121215 !important; border-color: #27272a !important; box-shadow: none !important; }
18
- .email-header { background-color: #18181b !important; border-color: #27272a !important; }
19
- .email-brand-text { color: #ffffff !important; }
20
- .email-title { color: #ffffff !important; }
21
- .email-text { color: #a1a1aa !important; }
22
- .email-strong { color: #ffffff !important; }
23
- .email-table { background-color: #18181b !important; border-color: #27272a !important; }
24
- .email-td-border { border-color: #27272a !important; }
25
- .email-label { color: #a1a1aa !important; }
26
- .email-value { color: #f4f4f5 !important; }
27
- .email-code-box { background-color: #18181b !important; border-color: #27272a !important; color: #ffffff !important; }
28
- .email-btn-primary { background-color: #ffffff !important; color: #09090b !important; }
29
- .email-btn-secondary { background-color: #18181b !important; border-color: #27272a !important; color: #f4f4f5 !important; }
30
- .email-footer { background-color: #09090b !important; border-color: #27272a !important; }
31
- .email-footer-text { color: #71717a !important; }
32
- .email-footer-link { color: #a1a1aa !important; }
33
- .logo-light { display: none !important; }
34
- .logo-dark { display: inline-block !important; }
35
- }
36
- </style>
37
- </head>
38
- <body class="email-body" style="margin: 0; padding: 24px 12px; background-color: #fafafa; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; color: #09090b; -webkit-font-smoothing: antialiased;">
39
- <!-- Preview Text -->
40
- <div style="display: none; max-height: 0; overflow: hidden;">${r}</div>
41
-
42
- <table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" class="email-card" style="max-width: 480px; margin: 0 auto; background-color: #ffffff; border: 1px solid #f4f4f5; border-radius: 16px; overflow: hidden; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);">
43
- <!-- Header Bar -->
44
- <tr>
45
- <td class="email-header" style="padding: 16px 24px; border-bottom: 1px solid #fafafa; background-color: #ffffff;">
46
- <table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0">
47
- <tr>
48
- <td align="center" valign="middle">
49
- <a href="${h}" target="_blank" style="text-decoration: none; display: inline-flex; align-items: center; gap: 8px;">
50
- <!-- Light Mode Logo -->
51
- <img src="${u}" alt="${p} Logo" class="logo-light" height="22" style="display: inline-block; border: 0; max-height: 22px; vertical-align: middle;" />
52
- <!-- Dark Mode Logo -->
53
- <img src="${f}" alt="${p} Logo" class="logo-dark" height="22" style="display: none; border: 0; max-height: 22px; vertical-align: middle;" />
54
- <span class="email-brand-text" style="font-size: 15px; font-weight: 600; color: #09090b; letter-spacing: -0.2px; vertical-align: middle;">${p}</span>
55
- </a>
56
- </td>
57
- </tr>
58
- </table>
59
- </td>
60
- </tr>
61
-
62
- <!-- Body Section -->
63
- <tr>
64
- <td style="padding: 24px;">
65
- <h1 class="email-title" style="margin: 0 0 8px; font-size: 18px; font-weight: 600; color: #09090b; letter-spacing: -0.2px; text-align: center;">
66
- ${t}
67
- </h1>
68
-
69
- ${s}
70
-
71
- ${o&&n?`
72
- <!-- Action Buttons -->
73
- <table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top: 20px;">
74
- <tr>
75
- <td align="center">
76
- <a href="${n}" target="_blank" class="email-btn-primary" style="display: inline-block; padding: 10px 18px; background-color: #09090b; color: #ffffff; font-size: 13px; font-weight: 500; text-decoration: none; border-radius: 8px;">
77
- ${o} \u2192
78
- </a>
79
- ${a&&l?`<a href="${l}" target="_blank" class="email-btn-secondary" style="display: inline-block; padding: 10px 16px; margin-left: 8px; background-color: #ffffff; border: 1px solid #e4e4e7; color: #09090b; font-size: 13px; font-weight: 500; text-decoration: none; border-radius: 8px;">
80
- ${a}
81
- </a>`:""}
82
- </td>
83
- </tr>
84
- </table>`:""}
85
- </td>
86
- </tr>
87
-
88
- <!-- Footer -->
89
- <tr>
90
- <td class="email-footer" style="padding: 16px 24px; border-top: 1px solid #fafafa; background-color: #fdfdfd; text-align: center;">
91
- <p style="margin: 0; font-size: 12px; color: #a1a1aa;">
92
- <a href="${h}" target="_blank" class="email-footer-link" style="color: #71717a; text-decoration: none; font-weight: 500;">${h.replace(/^https?:\/\//,"")}</a> &nbsp;\u2022&nbsp;
93
- <a href="${h}/docs" target="_blank" class="email-footer-link" style="color: #71717a; text-decoration: none; font-weight: 500;">Docs</a>
94
- </p>
95
- </td>
96
- </tr>
97
- </table>
98
- </body>
99
- </html>`}g$1();function x(i,e="User",t){let r="Confirm your email address \u2014 Kyro CMS",s=`
100
- <p class="email-text" style="margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: #52525b;">
101
- Hello <strong class="email-strong" style="color: #09090b;">${e}</strong>,
102
- </p>
103
- <p class="email-text" style="margin: 0 0 20px; font-size: 14px; line-height: 1.6; color: #52525b;">
104
- Thank you for registering. Please confirm your email address by clicking the verification button below to activate your account.
105
- </p>
106
-
107
- <!-- Verification Token Link Card -->
108
- <table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" class="email-table" style="background-color: #fafafa; border: 1px solid #e4e4e7; border-radius: 8px; margin-bottom: 20px; padding: 14px; border-collapse: separate;">
109
- <tr>
110
- <td style="font-size: 12px; color: #71717a; line-height: 1.5; word-break: break-all;">
111
- <strong>Direct link:</strong><br />
112
- <a href="${i}" style="color: #09090b; text-decoration: underline;" class="email-value">${i}</a>
113
- </td>
114
- </tr>
115
- </table>
116
-
117
- <p class="email-text" style="margin: 0 0 8px; font-size: 12px; color: #71717a;">
118
- This verification link will expire in 24 hours. If you did not create an account, you can safely ignore this email.
119
- </p>
120
- `,o=g({brand:t,title:"Confirm Your Email Address",previewText:"Please confirm your email address to activate your Kyro CMS account.",bodyHtml:s,ctaText:"Confirm Email Address",ctaUrl:i,secondaryCtaText:"Documentation",secondaryCtaUrl:"https://kyro-cms.com/docs"}),n=`Welcome, ${e}!
121
-
122
- Please verify your email address by visiting:
123
- ${i}
124
-
125
- This link expires in 24 hours.
126
-
127
- Kyro CMS \u2014 https://kyro-cms.com`;return {subject:r,html:o,text:n}}g$1();function w(i,e="User",t){let r="Reset your password \u2014 Kyro CMS",s=`
128
- <p class="email-text" style="margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: #52525b;">
129
- Hello <strong class="email-strong" style="color: #09090b;">${e}</strong>,
130
- </p>
131
- <p class="email-text" style="margin: 0 0 20px; font-size: 14px; line-height: 1.6; color: #52525b;">
132
- We received a request to reset the password for your account. Click the button below to choose a new password.
133
- </p>
134
-
135
- <!-- Reset Link Box -->
136
- <table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" class="email-table" style="background-color: #fafafa; border: 1px solid #e4e4e7; border-radius: 8px; margin-bottom: 20px; padding: 14px; border-collapse: separate;">
137
- <tr>
138
- <td style="font-size: 12px; color: #71717a; line-height: 1.5; word-break: break-all;">
139
- <strong>Reset URL:</strong><br />
140
- <a href="${i}" style="color: #09090b; text-decoration: underline;" class="email-value">${i}</a>
141
- </td>
142
- </tr>
143
- </table>
144
-
145
- <p class="email-text" style="margin: 0 0 8px; font-size: 12px; color: #71717a;">
146
- For security reasons, this link will expire in 1 hour. If you did not request a password reset, no further action is required.
147
- </p>
148
- `,o=g({brand:t,title:"Reset Your Password",previewText:"Use this secure link to reset your Kyro CMS password.",bodyHtml:s,ctaText:"Reset Password",ctaUrl:i}),n=`Hello ${e},
149
-
150
- Reset your password using the following link:
151
- ${i}
152
-
153
- This link will expire in 1 hour.
154
-
155
- Kyro CMS \u2014 https://kyro-cms.com`;return {subject:r,html:o,text:n}}g$1();function _(i="User",e="https://kyro-cms.com",t){let r="Welcome to Kyro CMS!",s=`
156
- <p class="email-text" style="margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: #52525b;">
157
- Welcome <strong class="email-strong" style="color: #09090b;">${i}</strong>,
158
- </p>
159
- <p class="email-text" style="margin: 0 0 20px; font-size: 14px; line-height: 1.6; color: #52525b;">
160
- Your Kyro CMS account is now set up and ready to go. You can access your admin dashboard, build content collections, and manage schema endpoints.
161
- </p>
162
-
163
- <!-- Key Capabilities List -->
164
- <table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" class="email-table" style="background-color: #fafafa; border: 1px solid #e4e4e7; border-radius: 8px; margin-bottom: 24px; padding: 16px; border-collapse: separate;">
165
- <tr>
166
- <td style="font-size: 13px; color: #09090b; line-height: 1.6;" class="email-value">
167
- \u{1F680} <strong>What you can do next:</strong>
168
- <ul style="margin: 8px 0 0; padding-left: 20px; color: #52525b;">
169
- <li>Define collections & custom field schemas in <code style="font-family: monospace;">kyro.config.ts</code></li>
170
- <li>Explore auto-generated REST, GraphQL, tRPC & WebSocket endpoints</li>
171
- <li>Customize your visual Admin dashboard & branding settings</li>
172
- </ul>
173
- </td>
174
- </tr>
175
- </table>
176
- `,o=g({brand:t,title:"Welcome to Kyro CMS",previewText:"Your account is verified and ready. Start building content applications.",bodyHtml:s,ctaText:"Open Dashboard",ctaUrl:e,secondaryCtaText:"Documentation",secondaryCtaUrl:"https://kyro-cms.com/docs"}),n=`Welcome to Kyro CMS, ${i}!
177
-
178
- Your account is active. Log in at ${e} to start building.
179
-
180
- Documentation: https://kyro-cms.com/docs`;return {subject:r,html:o,text:n}}g$1();function C(i="User",e,t,r){let s="Security Alert: Password Changed \u2014 Kyro CMS",o=new Date().toUTCString(),n=`
181
- <p class="email-text" style="margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: #52525b; text-align: center;">
182
- Hello <strong class="email-strong" style="color: #09090b;">${i}</strong>,
183
- </p>
184
- <p class="email-text" style="margin: 0 0 20px; font-size: 14px; line-height: 1.6; color: #52525b; text-align: center;">
185
- This email confirms that the password for your Kyro CMS account was successfully updated on <strong>${o}</strong>.
186
- </p>
187
-
188
- <!-- Security Warning Card -->
189
- <table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" class="email-table" style="background-color: #fef2f2; border: 1px solid #fecaca; border-radius: 12px; margin-bottom: 20px; padding: 16px; border-collapse: separate;">
190
- <tr>
191
- <td style="font-size: 13px; color: #991b1b; line-height: 1.5; text-align: center;">
192
- \u26A0\uFE0F <strong>Did not request this change?</strong><br />
193
- If you did not initiate this change, your account may be compromised. Reset your password immediately and contact an administrator.
194
- </td>
195
- </tr>
196
- </table>
197
-
198
- ${t||r?`
199
- <table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" class="email-table" style="background-color: #fafafa; border: 1px solid #f4f4f5; border-radius: 12px; margin-bottom: 20px; padding: 16px; border-collapse: separate;">
200
- <tr>
201
- <td style="font-size: 13px; color: #09090b; line-height: 1.6;" class="email-value">
202
- <strong>Action IP:</strong> ${t||"Unknown"}<br />
203
- <strong>Device:</strong> ${r||"Unknown"}
204
- </td>
205
- </tr>
206
- </table>`:""}
207
- `,a=g({brand:e,title:"Password Updated",previewText:"Your Kyro CMS account password was updated.",bodyHtml:n,ctaText:"Account Security",ctaUrl:"https://kyro-cms.com"}),l=`Security Alert: Your Kyro CMS password was updated at ${o}.
208
-
209
- If you did not make this change, please reset your password immediately.
210
-
211
- Kyro CMS \u2014 https://kyro-cms.com`;return {subject:s,html:a,text:l}}g$1();function S(i,e,t="User",r){let s="Your one-time login link \u2014 Kyro CMS",o=`
212
- <p class="email-text" style="margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: #52525b;">
213
- Hello <strong class="email-strong" style="color: #09090b;">${t}</strong>,
214
- </p>
215
- <p class="email-text" style="margin: 0 0 20px; font-size: 14px; line-height: 1.6; color: #52525b;">
216
- Click the button below to sign in to your Kyro CMS account without entering a password.
217
- </p>
218
-
219
- ${e?`
220
- <!-- One-Time Passcode Box -->
221
- <table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" class="email-table" style="background-color: #fafafa; border: 1px solid #e4e4e7; border-radius: 8px; margin-bottom: 20px; padding: 16px; text-align: center;">
222
- <tr>
223
- <td style="font-size: 12px; color: #71717a; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px;">
224
- One-Time Passcode
225
- </td>
226
- </tr>
227
- <tr>
228
- <td style="font-size: 28px; font-weight: 800; font-family: monospace; color: #09090b; letter-spacing: 4px;" class="email-code-box">
229
- ${e}
230
- </td>
231
- </tr>
232
- </table>`:""}
233
-
234
- <p class="email-text" style="margin: 0 0 8px; font-size: 12px; color: #71717a;">
235
- This single-use link will expire in 10 minutes. Never share authentication links with anyone.
236
- </p>
237
- `,n=g({brand:r,title:"Sign in to Kyro CMS",previewText:"Your secure magic login link for Kyro CMS.",bodyHtml:o,ctaText:"Sign In Now",ctaUrl:i}),a=`Hello ${t},
238
-
239
- Sign in to Kyro CMS using the link below:
240
- ${i}${e?`
241
-
242
- Or enter code: ${e}`:""}
243
-
244
- This link expires in 10 minutes.
245
-
246
- Kyro CMS \u2014 https://kyro-cms.com`;return {subject:s,html:n,text:a}}g$1();function T(i,e,t="User",r,s,o){let n="Security Alert: Account Temporarily Locked \u2014 Kyro CMS",a=`
247
- <p class="email-text" style="margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: #52525b; text-align: center;">
248
- Hello <strong class="email-strong" style="color: #09090b;">${t}</strong>,
249
- </p>
250
- <p class="email-text" style="margin: 0 0 20px; font-size: 14px; line-height: 1.6; color: #52525b; text-align: center;">
251
- Your Kyro CMS account was temporarily locked after <strong>${i} failed login attempts</strong>.
252
- </p>
253
-
254
- <!-- Lockout Notice Card -->
255
- <table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" class="email-table" style="background-color: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; margin-bottom: 20px; padding: 16px; border-collapse: separate;">
256
- <tr>
257
- <td style="font-size: 13px; color: #b45309; line-height: 1.5; text-align: center;">
258
- \u{1F512} <strong>Lockout duration:</strong> ${e} minutes.<br />
259
- You may try logging in again after the cooling-off period expires.
260
- </td>
261
- </tr>
262
- </table>
263
-
264
- ${s||o?`
265
- <table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" class="email-table" style="background-color: #fafafa; border: 1px solid #f4f4f5; border-radius: 12px; margin-bottom: 20px; padding: 16px; border-collapse: separate;">
266
- <tr>
267
- <td style="font-size: 13px; color: #09090b; line-height: 1.6;" class="email-value">
268
- <strong>Failed Attempts IP:</strong> ${s||"Unknown"}<br />
269
- <strong>Device:</strong> ${o||"Unknown"}
270
- </td>
271
- </tr>
272
- </table>`:""}
273
- `,l=g({brand:r,title:"Account Temporarily Locked",previewText:"Your Kyro CMS account was locked due to multiple failed login attempts.",bodyHtml:a,ctaText:"Unlock Instructions",ctaUrl:"https://kyro-cms.com/docs"}),p=`Security Alert: Account temporarily locked for ${t} after ${i} failed login attempts. Unlocks in ${e} minutes.
274
-
275
- Kyro CMS \u2014 https://kyro-cms.com`;return {subject:n,html:l,text:p}}g$1();function k(i,e="Editor",t="An Administrator",r){let s="You're invited to join Kyro CMS",o=`
276
- <p class="email-text" style="margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: #52525b;">
277
- Hello,
278
- </p>
279
- <p class="email-text" style="margin: 0 0 20px; font-size: 14px; line-height: 1.6; color: #52525b;">
280
- <strong class="email-strong" style="color: #09090b;">${t}</strong> has invited you to join their team workspace as an <strong>${e}</strong> in Kyro CMS.
281
- </p>
282
-
283
- <!-- Invite Details Card -->
284
- <table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" class="email-table" style="background-color: #fafafa; border: 1px solid #e4e4e7; border-radius: 8px; margin-bottom: 20px; padding: 14px; border-collapse: separate;">
285
- <tr>
286
- <td style="font-size: 13px; color: #09090b; line-height: 1.6;" class="email-value">
287
- <strong>Assigned Role:</strong> ${e}<br />
288
- <strong>Invited By:</strong> ${t}
289
- </td>
290
- </tr>
291
- </table>
292
- `,n=g({brand:r,title:"Workspace Invitation",previewText:`You have been invited to join Kyro CMS as an ${e}.`,bodyHtml:o,ctaText:"Accept Invitation",ctaUrl:i,secondaryCtaText:"Documentation",secondaryCtaUrl:"https://kyro-cms.com/docs"}),a=`You're invited to join Kyro CMS as an ${e} by ${t}.
293
-
294
- Accept your invitation here:
295
- ${i}
296
-
297
- Kyro CMS \u2014 https://kyro-cms.com`;return {subject:s,html:n,text:a}}g$1();function E(i,e,t="User",r,s="Unknown Device"){let o="Security Alert: New Sign-in to Kyro CMS",n=`
298
- <p class="email-text" style="margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: #52525b; text-align: center;">
299
- Hello <strong class="email-strong" style="color: #09090b;">${t}</strong>,
300
- </p>
301
- <p class="email-text" style="margin: 0 0 20px; font-size: 14px; line-height: 1.6; color: #52525b; text-align: center;">
302
- A new sign-in to your Kyro CMS account was detected.
303
- </p>
304
-
305
- <!-- Sign-in Details -->
306
- <table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" class="email-table" style="background-color: #fafafa; border: 1px solid #f4f4f5; border-radius: 12px; margin-bottom: 20px; padding: 16px; border-collapse: separate;">
307
- <tr>
308
- <td style="font-size: 13px; color: #09090b; line-height: 1.6;" class="email-value">
309
- <strong>Time:</strong> ${e}<br />
310
- <strong>Location/IP:</strong> ${i}<br />
311
- <strong>Device:</strong> ${s}
312
- </td>
313
- </tr>
314
- </table>
315
-
316
- <!-- Security Warning Card -->
317
- <table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" class="email-table" style="background-color: #fef2f2; border: 1px solid #fecaca; border-radius: 12px; margin-bottom: 20px; padding: 16px; border-collapse: separate;">
318
- <tr>
319
- <td style="font-size: 13px; color: #991b1b; line-height: 1.5; text-align: center;">
320
- \u26A0\uFE0F <strong>Don't recognize this activity?</strong><br />
321
- If you did not sign in recently, your account may be compromised. Please reset your password immediately and contact an administrator.
322
- </td>
323
- </tr>
324
- </table>
325
- `,a=g({brand:r,title:"New Sign-in Detected",previewText:"A new sign-in was detected on your Kyro CMS account.",bodyHtml:n,ctaText:"Review Account Security",ctaUrl:"https://kyro-cms.com"}),l=`Security Alert: New Sign-in to Kyro CMS
326
-
327
- Hello ${t},
328
-
329
- A new sign-in to your account was detected at ${e} from ${i} using ${s}.
330
-
331
- If you did not sign in recently, please reset your password immediately.
332
-
333
- Kyro CMS \u2014 https://kyro-cms.com`;return {subject:o,html:a,text:l}}g$1();function v(i,e="Customer",t,r,s){let o=`Order Confirmation #${i}`,n=`
334
- <p class="email-text" style="margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: #52525b;">
335
- Hi <strong class="email-strong" style="color: #09090b;">${e}</strong>,
336
- </p>
337
- <p class="email-text" style="margin: 0 0 20px; font-size: 14px; line-height: 1.6; color: #52525b;">
338
- Thank you for your order! We've received your order <strong>#${i}</strong> and are getting it ready for shipment.
339
- </p>
340
-
341
- <table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" class="email-table" style="background-color: #fafafa; border: 1px solid #e4e4e7; border-radius: 8px; margin-bottom: 24px; padding: 16px; border-collapse: separate;">
342
- <tr>
343
- <td style="font-size: 13px; color: #09090b; line-height: 1.6;" class="email-value">
344
- \u{1F6D2} <strong>Order Summary:</strong><br/>
345
- Order Total: <strong>${t}</strong>
346
- </td>
347
- </tr>
348
- </table>
349
- `,a=g({brand:s,title:"Order Confirmed",previewText:`Your order #${i} has been confirmed.`,bodyHtml:n,ctaText:"View Order",ctaUrl:r||"https://kyro-cms.com"}),l=`Hi ${e},
350
-
351
- Thank you for your order #${i}!
352
-
353
- Order Total: ${t}
354
-
355
- View your order here: ${r||"https://kyro-cms.com"}`;return {subject:o,html:a,text:l}}g$1();function A(i,e="Customer",t,r,s){let o=`Your Order #${i} is on the way!`,n=`
356
- <p class="email-text" style="margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: #52525b;">
357
- Great news, <strong class="email-strong" style="color: #09090b;">${e}</strong>!
358
- </p>
359
- <p class="email-text" style="margin: 0 0 20px; font-size: 14px; line-height: 1.6; color: #52525b;">
360
- Your order <strong>#${i}</strong> has been shipped and is on its way to you.
361
- </p>
362
-
363
- <table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" class="email-table" style="background-color: #fafafa; border: 1px solid #e4e4e7; border-radius: 8px; margin-bottom: 24px; padding: 16px; border-collapse: separate;">
364
- <tr>
365
- <td style="font-size: 13px; color: #09090b; line-height: 1.6;" class="email-value">
366
- \u{1F4E6} <strong>Tracking Number:</strong> ${t}
367
- </td>
368
- </tr>
369
- </table>
370
- `,a=g({brand:s,title:"Order Shipped",previewText:`Your order #${i} has shipped. Track your package now.`,bodyHtml:n,ctaText:"Track Package",ctaUrl:r}),l=`Hi ${e},
371
-
372
- Your order #${i} has been shipped!
373
-
374
- Tracking Number: ${t}
375
- Track it here: ${r}`;return {subject:o,html:a,text:l}}g$1();function P(i,e="Customer",t,r){let s=`Your Order #${i} has been delivered`,o=`
376
- <p class="email-text" style="margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: #52525b;">
377
- Hi <strong class="email-strong" style="color: #09090b;">${e}</strong>,
378
- </p>
379
- <p class="email-text" style="margin: 0 0 20px; font-size: 14px; line-height: 1.6; color: #52525b;">
380
- Good news! Your order <strong>#${i}</strong> has been successfully delivered. We hope you love it!
381
- </p>
382
- <p class="email-text" style="margin: 0 0 20px; font-size: 14px; line-height: 1.6; color: #52525b;">
383
- We'd love to hear your thoughts. If you have a minute, please leave a review for your items.
384
- </p>
385
- `,n=g({brand:r,title:"Order Delivered",previewText:`Your order #${i} has arrived!`,bodyHtml:o,ctaText:"Leave a Review",ctaUrl:t}),a=`Hi ${e},
386
-
387
- Your order #${i} has been delivered!
388
-
389
- Leave a review here: ${t}`;return {subject:s,html:n,text:a}}g$1();function R(i,e="Customer",t,r){let s=`Refund Processed for Order #${i}`,o=`
390
- <p class="email-text" style="margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: #52525b;">
391
- Hi <strong class="email-strong" style="color: #09090b;">${e}</strong>,
392
- </p>
393
- <p class="email-text" style="margin: 0 0 20px; font-size: 14px; line-height: 1.6; color: #52525b;">
394
- We have processed a refund for your order <strong>#${i}</strong>. It may take 3-5 business days for the funds to appear on your original payment method.
395
- </p>
396
-
397
- <table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" class="email-table" style="background-color: #fafafa; border: 1px solid #e4e4e7; border-radius: 8px; margin-bottom: 24px; padding: 16px; border-collapse: separate;">
398
- <tr>
399
- <td style="font-size: 13px; color: #09090b; line-height: 1.6;" class="email-value">
400
- \u{1F4B8} <strong>Refund Amount:</strong> ${t}
401
- </td>
402
- </tr>
403
- </table>
404
- `,n=g({brand:r,title:"Refund Processed",previewText:`We have processed a refund of ${t} for order #${i}.`,bodyHtml:o,ctaText:"View Store",ctaUrl:"https://kyro-cms.com"}),a=`Hi ${e},
405
-
406
- We have processed a refund of ${t} for order #${i}.
407
-
408
- View store: https://kyro-cms.com`;return {subject:s,html:n,text:a}}g$1();function I(i="Customer",e,t){let r="You left something behind...",s=`
409
- <p class="email-text" style="margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: #52525b;">
410
- Hi <strong class="email-strong" style="color: #09090b;">${i}</strong>,
411
- </p>
412
- <p class="email-text" style="margin: 0 0 20px; font-size: 14px; line-height: 1.6; color: #52525b;">
413
- We noticed you left some great items in your shopping cart. They are still waiting for you, but they might sell out soon!
414
- </p>
415
- `,o=g({brand:t,title:"Complete Your Purchase",previewText:"Your shopping cart is waiting for you. Complete your purchase now.",bodyHtml:s,ctaText:"Return to Checkout",ctaUrl:e}),n=`Hi ${i},
416
-
417
- You left some items in your cart! Complete your purchase here: ${e}`;return {subject:r,html:o,text:n}}g$1();function O(i){return {verifyEmail:(e,t)=>x(e,t,i),resetPassword:(e,t)=>w(e,t,i),welcome:(e,t)=>_(e,t,i),passwordChanged:e=>C(e,i),magicLink:(e,t,r)=>S(e,t,r,i),accountLocked:(e,t,r)=>T(e,t,r,i),newLogin:(e,t,r)=>E(e,t,r,i),userInvite:(e,t,r)=>k(e,t,r,i),orderConfirmation:(e,t,r,s)=>v(e,t,r||"0.00",s,i),orderShipped:(e,t,r,s)=>A(e,t,r||"",s||"",i),orderDelivered:(e,t,r)=>P(e,t,r||"",i),orderRefunded:(e,t,r)=>R(e,t,r||"0.00",i),abandonedCart:(e,t)=>I(e,t||"",i)}}g$1();var $=false,b=class i{db;cache={};loaded=false;static SENSITIVE_KEYS=["storage.s3.secret_access_key","storage.r2.secret_access_key","storage.gcs.private_key","storage.backblaze.application_key","storage.wasabi.secret_access_key","storage.ftp.password","storage.bunny.api_key","storage.cloudinary.api_secret","storage.imgix.sign_key","email.smtp.pass","auth.jwt_secret","auth.github_secret","auth.google_secret","auth.app_secret","database.url","redis.url","auth.admin_password"];constructor(e){this.db=e;}async load(){if(!this.loaded){await this.ensureSettingsTable();try{if(typeof this.db?.select=="function"){let e=await this.db.select().from(a);this.cache=e.reduce((t,r)=>(t[r.key]=r.value,t),{});}await this.loadFromGlobals();}catch{console.warn("ConfigService: Could not load settings from database, using environment fallbacks.");}this.loaded=true;}}async ensureSettingsTable(){if(!$)try{if(typeof this.db?.execute=="function"){let{sql:e}=await import('./drizzle-orm-XRTSOQJS.js');await this.db.execute(e`
418
- CREATE TABLE IF NOT EXISTS "settings" (
419
- "key" VARCHAR(255) PRIMARY KEY,
420
- "value" TEXT NOT NULL,
421
- "description" TEXT,
422
- "updated_at" TIMESTAMP DEFAULT NOW()
423
- )
424
- `),$=!0;}else typeof this.db?.exec=="function"&&(this.db.exec(`
425
- CREATE TABLE IF NOT EXISTS settings (
426
- key TEXT PRIMARY KEY,
427
- value TEXT NOT NULL,
428
- description TEXT,
429
- updated_at TEXT
430
- )
431
- `),$=!0);}catch{}}async loadFromGlobals(){try{let e=null;if(typeof this.db?.findOne=="function")try{let s=await this.db.findOne({collection:"_globals_storage-settings",where:{},draft:!0});s&&(e=s);}catch{}if(!e&&typeof this.db?.execute=="function"){let{sql:s}=await import('./drizzle-orm-XRTSOQJS.js'),o=['"_globals_storage-settings"','"_globals_storage_settings"','"global_storage_settings"'];for(let n of o)try{let a=await this.db.execute(s`SELECT * FROM ${s.raw(n)} LIMIT 1`);if(e=Array.isArray(a)?a[0]:a?.rows?a.rows[0]:null,e)break}catch{}}else if(!e&&typeof this.db?.prepare=="function"){let s=['"_globals_storage-settings"','"_globals_storage_settings"','"global_storage_settings"'];for(let o of s)try{if(e=this.db.prepare(`SELECT * FROM ${o} LIMIT 1`).get(),e)break}catch{}}if(!e)return;let t=s=>{if(!s)return null;if(typeof s=="string")try{return JSON.parse(s)}catch{return null}return s},r=e.provider||"local";if(this.cache["storage.type"]=r,r==="local"){let s=t(e.local);this.cache["storage.local.dir"]=s?.uploadDir||"./public/uploads",this.cache["storage.local.url"]=s?.baseUrl||"/uploads";}if(r==="aws"){let s=t(e.aws);this.cache["storage.s3.bucket"]=s?.bucket||"",this.cache["storage.s3.region"]=s?.region||"us-east-1",this.cache["storage.s3.access_key_id"]=s?.accessKeyId||"",this.cache["storage.s3.secret_access_key"]=s?.secretAccessKey||"",this.cache["storage.s3.endpoint"]=s?.endpoint||"",this.cache["storage.s3.cdn_url"]=s?.cdnUrl||"",this.cache["storage.s3.prefix"]=s?.prefix||"";}if(r==="r2"){let s=t(e.r2);this.cache["storage.r2.account_id"]=s?.accountId||"",this.cache["storage.r2.access_key_id"]=s?.accessKeyId||"",this.cache["storage.r2.secret_access_key"]=s?.secretAccessKey||"",this.cache["storage.r2.bucket"]=s?.bucket||"",this.cache["storage.r2.cdn_url"]=s?.cdnUrl||"",this.cache["storage.r2.prefix"]=s?.prefix||"";}if(r==="cloudinary"){let s=t(e.cloudinary);this.cache["storage.cloudinary.cloud_name"]=s?.cloudName||"",this.cache["storage.cloudinary.api_key"]=s?.apiKey||"",this.cache["storage.cloudinary.api_secret"]=s?.apiSecret||"",this.cache["storage.cloudinary.folder"]=s?.folder||"";}if(r==="ftp"){let s=t(e.ftp);this.cache["storage.ftp.host"]=s?.host||"",this.cache["storage.ftp.port"]=String(s?.port||"21"),this.cache["storage.ftp.user"]=s?.user||"",this.cache["storage.ftp.password"]=s?.password||"",this.cache["storage.ftp.secure"]=s?.secure?"true":"false",this.cache["storage.ftp.base_url"]=s?.baseUrl||"",this.cache["storage.ftp.prefix"]=s?.prefix||"";}}catch(e){console.warn("ConfigService: Could not load storage settings from globals table:",e);}try{let e=null;if(typeof this.db?.findOne=="function")try{let t=await this.db.findOne({collection:"_globals_email-settings",where:{},draft:!0});t&&(e=t);}catch{}if(!e&&typeof this.db?.execute=="function"){let{sql:t}=await import('./drizzle-orm-XRTSOQJS.js'),r=['"_globals_email-settings"','"_globals_email_settings"','"global_email_settings"'];for(let s of r)try{let o=await this.db.execute(t`SELECT * FROM ${t.raw(s)} LIMIT 1`);if(e=Array.isArray(o)?o[0]:o?.rows?o.rows[0]:null,e)break}catch{}}else if(!e&&typeof this.db?.prepare=="function"){let t=['"_globals_email-settings"','"_globals_email_settings"','"global_email_settings"'];for(let r of t)try{if(e=this.db.prepare(`SELECT * FROM ${r} LIMIT 1`).get(),e)break}catch{}}if(e){let t=r=>{if(!r)return null;if(typeof r=="string")try{return JSON.parse(r)}catch{return null}return r};if(this.cache["email.provider"]=e.provider||"smtp",this.cache["email.smtp.from"]=e.fromEmail||"",this.cache["email.smtp.from_name"]=e.fromName||"",this.cache["email.smtp.reply_to"]=e.replyTo||"",e.provider==="smtp"){let r=t(e.smtp);this.cache["email.smtp.host"]=r?.host||"",this.cache["email.smtp.port"]=String(r?.port||"587"),this.cache["email.smtp.user"]=r?.username||"",this.cache["email.smtp.pass"]=r?.password||"",this.cache["email.smtp.secure"]=r?.secure?"true":"false";}else if(e.provider==="resend"){let r=t(e.resend);this.cache["email.smtp.pass"]=r?.apiKey||"";}else if(e.provider==="sendgrid"){let r=t(e.sendgrid);this.cache["email.smtp.pass"]=r?.apiKey||"";}else if(e.provider==="mailgun"){let r=t(e.mailgun);this.cache["email.smtp.pass"]=r?.apiKey||"";}else if(e.provider==="ses"){let r=t(e.ses);this.cache["email.smtp.user"]=r?.accessKeyId||"",this.cache["email.smtp.pass"]=r?.secretAccessKey||"";}}}catch(e){console.warn("ConfigService: Could not load email settings from globals table:",e);}}get(e,t,r){return this.cache[e]?this.cache[e]:t&&process.env[t]?process.env[t]:r}getStorageConfig(){let e="local";return typeof globalThis.STORAGE_BUCKET<"u"&&(e="cloudflare_r2"),{type:this.get("storage.type","STORAGE_TYPE",e),s3:{bucket:this.get("storage.s3.bucket","STORAGE_BUCKET"),region:this.get("storage.s3.region","STORAGE_REGION","us-east-1"),accessKeyId:this.get("storage.s3.access_key_id","STORAGE_ACCESS_KEY_ID"),secretAccessKey:this.get("storage.s3.secret_access_key","STORAGE_SECRET_ACCESS_KEY"),endpoint:this.get("storage.s3.endpoint","STORAGE_ENDPOINT"),cdnUrl:this.get("storage.s3.cdn_url","STORAGE_CDN_URL"),prefix:this.get("storage.s3.prefix","STORAGE_PREFIX")},r2:{accountId:this.get("storage.r2.account_id","R2_ACCOUNT_ID"),accessKeyId:this.get("storage.r2.access_key_id","R2_ACCESS_KEY_ID"),secretAccessKey:this.get("storage.r2.secret_access_key","R2_SECRET_ACCESS_KEY"),bucket:this.get("storage.r2.bucket","R2_BUCKET"),cdnUrl:this.get("storage.r2.cdn_url","R2_CDN_URL"),prefix:this.get("storage.r2.prefix","R2_PREFIX")},gcs:{bucket:this.get("storage.gcs.bucket","GCS_BUCKET"),projectId:this.get("storage.gcs.project_id","GCS_PROJECT_ID"),clientEmail:this.get("storage.gcs.client_email","GCS_CLIENT_EMAIL"),privateKey:this.get("storage.gcs.private_key","GCS_PRIVATE_KEY"),cdnUrl:this.get("storage.gcs.cdn_url","GCS_CDN_URL"),prefix:this.get("storage.gcs.prefix","GCS_PREFIX")},digitalocean:{bucket:this.get("storage.digitalocean.bucket","DO_BUCKET"),region:this.get("storage.digitalocean.region","DO_REGION","nyc3"),accessKeyId:this.get("storage.digitalocean.access_key_id","DO_ACCESS_KEY_ID"),secretAccessKey:this.get("storage.digitalocean.secret_access_key","DO_SECRET_ACCESS_KEY"),cdnUrl:this.get("storage.digitalocean.cdn_url","DO_CDN_URL"),prefix:this.get("storage.digitalocean.prefix","DO_PREFIX")},backblaze:{bucket:this.get("storage.backblaze.bucket","BB_BUCKET"),accountId:this.get("storage.backblaze.account_id","BB_ACCOUNT_ID"),applicationKeyId:this.get("storage.backblaze.application_key_id","BB_APPLICATION_KEY_ID"),applicationKey:this.get("storage.backblaze.application_key","BB_APPLICATION_KEY"),cdnUrl:this.get("storage.backblaze.cdn_url","BB_CDN_URL"),prefix:this.get("storage.backblaze.prefix","BB_PREFIX")},wasabi:{bucket:this.get("storage.wasabi.bucket","WASABI_BUCKET"),region:this.get("storage.wasabi.region","WASABI_REGION","us-east-1"),accessKeyId:this.get("storage.wasabi.access_key_id","WASABI_ACCESS_KEY_ID"),secretAccessKey:this.get("storage.wasabi.secret_access_key","WASABI_SECRET_ACCESS_KEY"),cdnUrl:this.get("storage.wasabi.cdn_url","WASABI_CDN_URL"),prefix:this.get("storage.wasabi.prefix","WASABI_PREFIX")},bunny:{storageZone:this.get("storage.bunny.storage_zone","BUNNY_STORAGE_ZONE"),apiKey:this.get("storage.bunny.api_key","BUNNY_API_KEY"),cdnUrl:this.get("storage.bunny.cdn_url","BUNNY_CDN_URL"),prefix:this.get("storage.bunny.prefix","BUNNY_PREFIX")},ftp:{host:this.get("storage.ftp.host","FTP_HOST"),port:parseInt(this.get("storage.ftp.port","FTP_PORT","21"),10),user:this.get("storage.ftp.user","FTP_USER"),password:this.get("storage.ftp.password","FTP_PASSWORD"),secure:this.get("storage.ftp.secure","FTP_SECURE")==="true",baseUrl:this.get("storage.ftp.base_url","FTP_BASE_URL"),prefix:this.get("storage.ftp.prefix","FTP_PREFIX")},cloudinary:{cloudName:this.get("storage.cloudinary.cloud_name","CLOUDINARY_CLOUD_NAME"),apiKey:this.get("storage.cloudinary.api_key","CLOUDINARY_API_KEY"),apiSecret:this.get("storage.cloudinary.api_secret","CLOUDINARY_API_SECRET"),folder:this.get("storage.cloudinary.folder","CLOUDINARY_FOLDER")},imgix:{domain:this.get("storage.imgix.domain","IMGIX_DOMAIN"),signKey:this.get("storage.imgix.sign_key","IMGIX_SIGN_KEY")},local:{uploadDir:this.get("storage.local.dir","STORAGE_LOCAL_DIR","./public/uploads"),baseUrl:this.get("storage.local.url","STORAGE_LOCAL_URL","/uploads")}}}getEmailConfig(){return {provider:this.get("email.provider","EMAIL_PROVIDER","smtp"),host:this.get("email.smtp.host","SMTP_HOST"),port:parseInt(this.get("email.smtp.port","SMTP_PORT","587"),10),secure:this.get("email.smtp.secure","SMTP_SECURE")==="true",user:this.get("email.smtp.user","SMTP_USER"),pass:this.get("email.smtp.pass","SMTP_PASS"),from:this.get("email.smtp.from","SMTP_FROM","noreply@example.com"),fromName:this.get("email.smtp.from_name","SMTP_FROM_NAME","Kyro CMS"),replyTo:this.get("email.smtp.reply_to","SMTP_REPLY_TO")}}maskSensitive(e,t){return t&&(i.SENSITIVE_KEYS.includes(e)?"********":t)}async set(e,t,r){await this.db.insert(a).values({key:e,value:t,description:r,updatedAt:new Date}).onConflictDoUpdate({target:[a.key],set:{value:t,description:r,updatedAt:new Date}}),this.cache[e]=t;}};g$1();var K=class i{transporter;config;templates;transporterInitialized=false;constructor(e,t){this.config=e,this.templates={...O(e.brand),...t};}async ensureTransporter(){if(this.transporterInitialized)return this.transporter;let{default:e}=await import('./nodemailer-NITB45SS.js');return this.config.provider==="smtp"&&this.config.smtp?this.transporter=e.createTransport({host:this.config.smtp.host,port:this.config.smtp.port,secure:this.config.smtp.secure,auth:this.config.smtp.auth}):this.config.provider==="ses"&&this.config.ses&&(this.transporter=e.createTransport({host:`email-smtp.${this.config.ses.region}.amazonaws.com`,port:587,secure:false,auth:{user:this.config.ses.accessKeyId,pass:this.config.ses.secretAccessKey}})),this.transporterInitialized=true,this.transporter}async send(e){let{provider:t,from:r,fromName:s,replyTo:o}=this.config,n=`"${s||"Kyro CMS"}" <${r}>`,a=e.replyTo||o;try{let l;switch(t){case "smtp":case "ses":{let p=await this.ensureTransporter();if(!p)throw new Error(`${t} transporter not initialized`);l=await p.sendMail({from:n,to:Array.isArray(e.to)?e.to.join(", "):e.to,subject:e.subject,html:e.html,text:e.text,replyTo:a});}break;case "resend":l=await this.sendViaResend(n,e,a);break;case "sendgrid":l=await this.sendViaSendGrid(n,e,a);break;case "mailgun":l=await this.sendViaMailgun(n,e,a);break;default:throw new Error(`Unsupported email provider: ${t}`)}return l}catch(l){throw console.error("[EmailTransport] FAILED to send email:",l.message),l.response&&console.error("[EmailTransport] Provider Error Detail:",JSON.stringify(l.response,null,2)),l}}async sendViaResend(e,t,r){let s=this.config.resend?.apiKey;if(!s)throw new Error("Resend API Key missing");let o={from:e,to:t.to,subject:t.subject,html:t.html,text:t.text,reply_to:r},n=await fetch("https://api.resend.com/emails",{method:"POST",headers:{Authorization:`Bearer ${s}`,"Content-Type":"application/json"},body:JSON.stringify(o)});if(!n.ok){let a=await n.json();throw new Error(`Resend Error: ${JSON.stringify(a)}`)}return n.json()}async sendViaSendGrid(e,t,r){let s=this.config.sendgrid?.apiKey;if(!s)throw new Error("SendGrid API Key missing");let o={personalizations:[{to:Array.isArray(t.to)?t.to.map(a=>({email:a})):[{email:t.to}]}],from:{email:e.match(/<(.+)>/)?.[1]||e,name:e.match(/"(.+)"/)?.[1]},subject:t.subject,content:[{type:"text/plain",value:t.text||""},{type:"text/html",value:t.html}],reply_to:r?{email:r}:void 0},n=await fetch("https://api.sendgrid.com/v3/mail/send",{method:"POST",headers:{Authorization:`Bearer ${s}`,"Content-Type":"application/json"},body:JSON.stringify(o)});if(!n.ok){let a=await n.json();throw new Error(`SendGrid Error: ${JSON.stringify(a)}`)}return {success:true}}async sendViaMailgun(e,t,r){let{apiKey:s,domain:o,region:n}=this.config.mailgun||{};if(!s||!o)throw new Error("Mailgun config missing");let a=n==="eu"?"api.eu.mailgun.net":"api.mailgun.net",l=btoa(`api:${s}`),p=new URLSearchParams;p.append("from",e);let u=Array.isArray(t.to)?t.to.join(", "):t.to;p.append("to",u),p.append("subject",t.subject),p.append("html",t.html),t.text&&p.append("text",t.text),r&&p.append("h:Reply-To",r);let f=await fetch(`https://${a}/v3/${o}/messages`,{method:"POST",headers:{Authorization:`Basic ${l}`,"Content-Type":"application/x-www-form-urlencoded"},body:p});if(!f.ok){let h=await f.json();throw new Error(`Mailgun Error: ${JSON.stringify(h)}`)}return f.json()}getTemplates(){return this.templates}async verifyConnection(){if(this.config.provider==="smtp"||this.config.provider==="ses")try{let e=await this.ensureTransporter();if(e)return await e.verify(),!0}catch{return false}return !!(this.config.resend?.apiKey||this.config.sendgrid?.apiKey||this.config.mailgun?.apiKey)}static async fetchBrandConfig(e){let t="Kyro CMS",r="https://kyro-cms.com/logo.svg",s="https://kyro-cms.com/logo-white.svg";try{let o=null,n=null;if(typeof e?.findOne=="function")o=await e.findOne({collection:"_globals_store-settings",where:{},draft:!0}),n=await e.findOne({collection:"_globals_brand-settings",where:{},draft:!0});else if(typeof e?.execute=="function"){let{sql:a}=await import('./drizzle-orm-XRTSOQJS.js');try{let l=await e.execute(a`SELECT * FROM "_globals_store-settings" LIMIT 1`);o=Array.isArray(l)?l[0]:l?.rows?l.rows[0]:null;}catch{}try{let l=await e.execute(a`SELECT * FROM "_globals_brand-settings" LIMIT 1`);n=Array.isArray(l)?l[0]:l?.rows?l.rows[0]:null;}catch{}}else if(typeof e?.prepare=="function"){try{o=e.prepare('SELECT * FROM "_globals_store-settings" LIMIT 1').get();}catch{}try{n=e.prepare('SELECT * FROM "_globals_brand-settings" LIMIT 1').get();}catch{}}if(o?.storeName&&(t=o.storeName),n?.identity){let a=typeof n.identity=="string"?JSON.parse(n.identity):n.identity,l=async p=>{if(typeof e?.findOne=="function")return (await e.findOne({collection:"media",where:{id:{equals:p}}}))?.url;if(typeof e?.execute=="function"){let{sql:u}=await import('./drizzle-orm-XRTSOQJS.js');try{let f=await e.execute(u`SELECT url FROM "media" WHERE id = ${p}`);return (Array.isArray(f)?f[0]:f?.rows?f.rows[0]:null)?.url}catch{}}else if(typeof e?.prepare=="function")try{return e.prepare('SELECT url FROM "media" WHERE id = ?').get(p)?.url}catch{}};if(a.primaryLogo){let p=await l(a.primaryLogo);p&&(r=p);}if(a.darkLogo){let p=await l(a.darkLogo);p&&(s=p);}}}catch{}return {siteName:t,logoUrl:r,logoDarkUrl:s,appUrl:process.env.PUBLIC_URL||"https://kyro-cms.com"}}static async fromConfig(e){let t=new b(e);await t.load();let r=t.getEmailConfig();if(!r.provider)return this.fromEnv();let o={brand:await this.fetchBrandConfig(e),provider:r.provider||"smtp",from:r.from||"noreply@example.com",fromName:r.fromName,replyTo:r.replyTo,smtp:r.provider==="smtp"?{host:r.host||"",port:r.port||587,secure:r.secure||false,auth:{user:r.user||"",pass:r.pass||""}}:void 0,resend:r.provider==="resend"?{apiKey:r.pass||""}:void 0,sendgrid:r.provider==="sendgrid"?{apiKey:r.pass||""}:void 0,mailgun:r.provider==="mailgun"?{apiKey:r.pass||"",domain:r.host||"",region:r.secure?"eu":"us"}:void 0,ses:r.provider==="ses"?{accessKeyId:r.user||"",secretAccessKey:r.pass||"",region:r.host||"us-east-1"}:void 0};return new i(o)}static fromEnv(){let e=process.env.EMAIL_PROVIDER||"smtp",t=process.env.SMTP_FROM||process.env.DEFAULT_FROM||"noreply@example.com",r=process.env.SMTP_FROM_NAME||"Kyro CMS",s=process.env.SMTP_REPLY_TO;if(e==="smtp"){let o=process.env.SMTP_HOST,n=process.env.SMTP_USER,a=process.env.SMTP_PASS;return !o||!n||!a?null:new i({provider:"smtp",from:t,fromName:r,replyTo:s,smtp:{host:o,port:parseInt(process.env.SMTP_PORT||"587",10),secure:process.env.SMTP_SECURE==="true",auth:{user:n,pass:a}}})}if(e==="resend"){let o=process.env.RESEND_API_KEY||process.env.SMTP_PASS;return o?new i({provider:"resend",from:t,fromName:r,replyTo:s,resend:{apiKey:o}}):null}if(e==="sendgrid"){let o=process.env.SENDGRID_API_KEY||process.env.SMTP_PASS;return o?new i({provider:"sendgrid",from:t,fromName:r,replyTo:s,sendgrid:{apiKey:o}}):null}if(e==="mailgun"){let o=process.env.MAILGUN_API_KEY||process.env.SMTP_PASS,n=process.env.MAILGUN_DOMAIN||process.env.SMTP_HOST;return !o||!n?null:new i({provider:"mailgun",from:t,fromName:r,replyTo:s,mailgun:{apiKey:o,domain:n,region:process.env.MAILGUN_REGION||(process.env.SMTP_SECURE==="true"?"eu":"us")}})}if(e==="ses"){let o=process.env.AWS_ACCESS_KEY_ID||process.env.SMTP_USER,n=process.env.AWS_SECRET_ACCESS_KEY||process.env.SMTP_PASS,a=process.env.AWS_REGION||process.env.SMTP_HOST||"us-east-1";return !o||!n?null:new i({provider:"ses",from:t,fromName:r,replyTo:s,ses:{accessKeyId:o,secretAccessKey:n,region:a}})}return null}};g$1();var U={minLength:12,requireUppercase:true,requireLowercase:true,requireNumbers:true,requireSpecialChars:true,preventReuse:5,maxLength:128},M=class{config;constructor(e={}){this.config={...U,...e};}validate(e){let t=[];return this.config.maxLength&&e.length>this.config.maxLength&&t.push(`Password must not exceed ${this.config.maxLength} characters`),e.length<this.config.minLength&&t.push(`Password must be at least ${this.config.minLength} characters`),this.config.requireUppercase&&!/[A-Z]/.test(e)&&t.push("Password must contain at least one uppercase letter"),this.config.requireLowercase&&!/[a-z]/.test(e)&&t.push("Password must contain at least one lowercase letter"),this.config.requireNumbers&&!/[0-9]/.test(e)&&t.push("Password must contain at least one number"),this.config.requireSpecialChars&&!/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(e)&&t.push("Password must contain at least one special character"),["password","123456","12345678","qwerty","abc123","monkey","1234567","letmein","trustno1","dragon","baseball","iloveyou","master","sunshine","ashley","football","password1","shadow","123123","654321"].includes(e.toLowerCase())&&t.push("This password is too common. Please choose a more secure password"),(/^[a-zA-Z]+$/.test(e)||/^[0-9]+$/.test(e))&&t.push("Password must contain a mix of letters, numbers, and/or special characters"),/(.)\1{2,}/.test(e)&&t.push("Password must not contain more than 2 consecutive identical characters"),/^(012|123|234|345|456|567|678|789|890|098|987|876|765|654|543|432|321|210)+$/i.test(e)&&t.push("Password must not contain sequential numbers or letters"),{valid:t.length===0,errors:t}}async checkReuse(e,t,r){return {valid:true,errors:[]}}async isInHistory(e,t,r){for(let s of t)if(await r(e,s))return true;return false}generatePassword(e=16){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZ",r="abcdefghijklmnopqrstuvwxyz",s="0123456789",o="!@#$%^&*()_+-=[]{}|;:,.<>?",n="";n+=t[Math.floor(Math.random()*t.length)],n+=r[Math.floor(Math.random()*r.length)],n+=s[Math.floor(Math.random()*s.length)],n+=o[Math.floor(Math.random()*o.length)];let a=t+r+s+o;for(let l=n.length;l<e;l++)n+=a[Math.floor(Math.random()*a.length)];return n.split("").sort(()=>Math.random()-.5).join("")}getStrength(e){let t=0,r=[];e.length>=8&&(t+=1),e.length>=12&&(t+=1),e.length>=16&&(t+=1),/[a-z]/.test(e)&&(t+=1),/[A-Z]/.test(e)&&(t+=1),/[0-9]/.test(e)&&(t+=1),/[!@#$%^&*()_+\-=\[\]{}|;:,.<>?]/.test(e)&&(t+=1),e.length>8&&(t+=1),e.length>12&&(t+=1);let s=new Set(e).size;s>6&&(t+=1),s>10&&(t+=1);let o;return t<=3?(o="Weak",r.push("Add more characters"),r.push("Include uppercase and lowercase letters")):t<=5?(o="Fair",r.push("Add special characters"),r.push("Consider making it longer")):t<=7?(o="Good",r.push("Consider making it longer for extra security")):o="Strong",{score:t,label:o,feedback:r}}setConfig(e){this.config={...this.config,...e};}getConfig(){return {...this.config}}};
432
- export{g as a,x as b,w as c,_ as d,C as e,S as f,T as g,k as h,E as i,v as j,A as k,P as l,R as m,I as n,O as o,b as p,K as q,M as r};
@@ -1 +0,0 @@
1
- 'use strict';var chunkYLCEMVYY_cjs=require('./chunk-YLCEMVYY.cjs'),chunkFG3IFGJP_cjs=require('./chunk-FG3IFGJP.cjs'),chunk3U6MKWET_cjs=require('./chunk-3U6MKWET.cjs'),chunkOPTVCCQQ_cjs=require('./chunk-OPTVCCQQ.cjs'),chunkA35ZP72D_cjs=require('./chunk-A35ZP72D.cjs'),chunkXBQ6HV3T_cjs=require('./chunk-XBQ6HV3T.cjs'),chunk7DUKWHRN_cjs=require('./chunk-7DUKWHRN.cjs'),chunkBUNLC3II_cjs=require('./chunk-BUNLC3II.cjs'),w=require('kyro:config');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var w__default=/*#__PURE__*/_interopDefault(w);chunkBUNLC3II_cjs.h();exports.a=null;var l=null;async function b(){if(!exports.a){if(globalThis.__KYRO_INSTANCE__)try{await globalThis.__KYRO_INSTANCE__.shutdown();}catch{}try{let e=w__default.default.default||w__default.default,t=e.adapter,o=t&&!t.dialect&&typeof t.connect=="function";if(globalThis.DB&&(!t||o)){let s=globalThis.DB;e.adapter=new chunkA35ZP72D_cjs.c({type:"sqlite",client:s}),chunkYLCEMVYY_cjs.K.info("Hot-swapped to D1 DrizzleAdapter");}exports.a=chunkYLCEMVYY_cjs.H(e),await exports.a.init();let a=e.adapter,p=a&&a.dialect&&(a.dialect==="postgres"||a.dialect==="sqlite"),c=a&&a.dialect==="mongodb",n;if(p)a.dialect==="postgres"?n=new chunkXBQ6HV3T_cjs.a({db:a.client}):a.dialect==="sqlite"&&(n=new chunk3U6MKWET_cjs.hb({db:a.rawClient||a.client}));else if(o&&!globalThis.DB){let s=process.env.KYRO_AUTH_DB_PATH||"./data/auth.db";n=new chunkOPTVCCQQ_cjs.a({path:s});}else c&&(n=new chunk7DUKWHRN_cjs.a({adapter:a}));if(n?.connect)try{await n.connect();}catch(s){chunkYLCEMVYY_cjs.K.warn("Auth connect warning:",s);}try{await exports.a.loadSettings();}catch(s){chunkYLCEMVYY_cjs.K.warn("loadSettings warning:",s);}try{await chunkFG3IFGJP_cjs.e(n);}catch(s){chunkYLCEMVYY_cjs.K.warn("autoBootstrap warning:",s);}globalThis.__KYRO_INSTANCE__=exports.a;}catch(e){throw exports.a=null,l=null,chunkYLCEMVYY_cjs.K.error("Init failed, will retry:",e),e}}}async function E(e){let t=globalThis.DB?globalThis:null;try{let{env:o}=await import('cloudflare:workers');o&&(t=o);}catch{}if(e)try{t=e.locals?.cfContext?.env||e?.env||t;}catch{}if(!t)try{t=process.env;}catch{}t?.DB&&(globalThis.DB=t.DB),t?.STORAGE_BUCKET&&(globalThis.STORAGE_BUCKET=t.STORAGE_BUCKET),l||(l=b()),await l;}var _={graphqlEnabled:false,trpcEnabled:false,wsEnabled:false,requireAuth:false};function T(e){return exports.a?exports.a.settings?.access?.apiAccess?.[e]??_[e]??true:_[e]??true}var R=async e=>{if(!exports.a)try{await Promise.race([E(e),new Promise((t,o)=>setTimeout(()=>o(new Error("Initialization timeout")),3e4))]);}catch(t){return console.error("[Kyro API] Warm error:",t?.stack||t?.message||t),new Response(JSON.stringify({error:"Service Unavailable",message:"Kyro CMS is still starting up. Please try again in a moment."}),{status:503,headers:{"Content-Type":"application/json","Retry-After":"5"}})}try{let o=new URL(e.request.url).pathname,a=__KYRO_API_PATH__;if(o===`${a}/graphql`&&typeof exports.a.getGraphQL=="function"){if(!T("graphqlEnabled"))return new Response(JSON.stringify({error:"GraphQL is disabled"}),{status:503,headers:{"Content-Type":"application/json"}});let n=await exports.a.getGraphQL().fetch(e.request,e.locals);return new Response(n.body,n)}if(o.startsWith(`${a}/trpc/`)&&typeof exports.a.getTRPC=="function"){if(!T("trpcEnabled"))return new Response(JSON.stringify({error:"tRPC is disabled"}),{status:503,headers:{"Content-Type":"application/json"}});let n=await exports.a.getTRPC().fetch(e.request,e.locals);return new Response(n.body,n)}return await(await exports.a.getREST()).fetch(e.request,e.locals)}catch(t){return console.error("[Kyro API Execution Error]:",t?.stack||t?.message||t),new Response(JSON.stringify({error:"Internal Server Error",message:t?.message||String(t),stack:t?.stack}),{status:500,headers:{"Content-Type":"application/json"}})}},L=R;exports.b=E;exports.c=R;exports.d=L;