@sonordev/site-kit 6.1.3 → 6.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (231) hide show
  1. package/agent-manifest.json +1 -1
  2. package/dist/{AnalyticsProvider-QK6XBDEJ.js → AnalyticsProvider-AT5XFQKT.js} +10 -10
  3. package/dist/{AnalyticsProvider-QK6XBDEJ.js.map → AnalyticsProvider-AT5XFQKT.js.map} +1 -1
  4. package/dist/{AnalyticsProvider-TIJWTISP.mjs → AnalyticsProvider-KPK3N52Q.mjs} +6 -6
  5. package/dist/{AnalyticsProvider-TIJWTISP.mjs.map → AnalyticsProvider-KPK3N52Q.mjs.map} +1 -1
  6. package/dist/{ArticleViewTracker-ALE672ZR.js → ArticleViewTracker-3PFASMTC.js} +6 -6
  7. package/dist/{ArticleViewTracker-ALE672ZR.js.map → ArticleViewTracker-3PFASMTC.js.map} +1 -1
  8. package/dist/{ArticleViewTracker-I66RBWDK.mjs → ArticleViewTracker-KIKKHBO6.mjs} +5 -5
  9. package/dist/{ArticleViewTracker-I66RBWDK.mjs.map → ArticleViewTracker-KIKKHBO6.mjs.map} +1 -1
  10. package/dist/ChatWidget-6PXV6RSI.mjs +17 -0
  11. package/dist/{ChatWidget-LNOY4TUZ.mjs.map → ChatWidget-6PXV6RSI.mjs.map} +1 -1
  12. package/dist/ChatWidget-D27PSWMO.js +34 -0
  13. package/dist/{ChatWidget-566CQUN6.js.map → ChatWidget-D27PSWMO.js.map} +1 -1
  14. package/dist/EngageWidget-SPZL3KPX.js +21 -0
  15. package/dist/{EngageWidget-DF47YUHQ.js.map → EngageWidget-SPZL3KPX.js.map} +1 -1
  16. package/dist/EngageWidget-YRTVPYAY.mjs +12 -0
  17. package/dist/{EngageWidget-IGF7SC3R.mjs.map → EngageWidget-YRTVPYAY.mjs.map} +1 -1
  18. package/dist/{FileField-IK6E5IOC.js → FileField-6RC33ORG.js} +6 -6
  19. package/dist/{FileField-IK6E5IOC.js.map → FileField-6RC33ORG.js.map} +1 -1
  20. package/dist/{FileField-AG63W2BC.mjs → FileField-GXNG2LH2.mjs} +5 -5
  21. package/dist/{FileField-AG63W2BC.mjs.map → FileField-GXNG2LH2.mjs.map} +1 -1
  22. package/dist/{FormSpotlight-6MUDJWW5.js → FormSpotlight-73E2CMV6.js} +9 -9
  23. package/dist/{FormSpotlight-6MUDJWW5.js.map → FormSpotlight-73E2CMV6.js.map} +1 -1
  24. package/dist/{FormSpotlight-H7V4GBXG.mjs → FormSpotlight-YDUF3TSC.mjs} +3 -3
  25. package/dist/{FormSpotlight-H7V4GBXG.mjs.map → FormSpotlight-YDUF3TSC.mjs.map} +1 -1
  26. package/dist/{FormStage-ZXZRZ2LS.js → FormStage-BL5FREFE.js} +9 -9
  27. package/dist/{FormStage-ZXZRZ2LS.js.map → FormStage-BL5FREFE.js.map} +1 -1
  28. package/dist/{FormStage-ACETL7SD.mjs → FormStage-VJZHYW6J.mjs} +3 -3
  29. package/dist/{FormStage-ACETL7SD.mjs.map → FormStage-VJZHYW6J.mjs.map} +1 -1
  30. package/dist/ManagedForm-FUIOTKSI.js +25 -0
  31. package/dist/{ManagedForm-4U54NPW2.js.map → ManagedForm-FUIOTKSI.js.map} +1 -1
  32. package/dist/ManagedForm-Z2S37RFX.mjs +16 -0
  33. package/dist/{ManagedForm-MOBWSG4D.mjs.map → ManagedForm-Z2S37RFX.mjs.map} +1 -1
  34. package/dist/{ManagedNewsletterForm-5LBGBE2F.js → ManagedNewsletterForm-3D3IW6JG.js} +8 -8
  35. package/dist/{ManagedNewsletterForm-5LBGBE2F.js.map → ManagedNewsletterForm-3D3IW6JG.js.map} +1 -1
  36. package/dist/{ManagedNewsletterForm-OV3OEMUP.mjs → ManagedNewsletterForm-ZXASCHZV.mjs} +7 -7
  37. package/dist/{ManagedNewsletterForm-OV3OEMUP.mjs.map → ManagedNewsletterForm-ZXASCHZV.mjs.map} +1 -1
  38. package/dist/{SignalCore-XM2MHEGR.mjs → SignalCore-LKSU7UYG.mjs} +5 -5
  39. package/dist/{SignalCore-XM2MHEGR.mjs.map → SignalCore-LKSU7UYG.mjs.map} +1 -1
  40. package/dist/{SignalCore-QCVR7TZV.js → SignalCore-RNMT4ZP4.js} +11 -11
  41. package/dist/{SignalCore-QCVR7TZV.js.map → SignalCore-RNMT4ZP4.js.map} +1 -1
  42. package/dist/SitemapSync-IDJ3PXER.js +18 -0
  43. package/dist/{SitemapSync-BQFZAE3X.js.map → SitemapSync-IDJ3PXER.js.map} +1 -1
  44. package/dist/SitemapSync-NTYKLAEH.mjs +9 -0
  45. package/dist/{SitemapSync-74EVNOFQ.mjs.map → SitemapSync-NTYKLAEH.mjs.map} +1 -1
  46. package/dist/analytics/index.js +9 -9
  47. package/dist/analytics/index.mjs +4 -4
  48. package/dist/articles/index.js +1 -1
  49. package/dist/articles/index.mjs +1 -1
  50. package/dist/articles/server-ui.js +1 -1
  51. package/dist/articles/server-ui.mjs +1 -1
  52. package/dist/{chunk-PTQHPWEK.mjs → chunk-22WIVF4O.mjs} +151 -165
  53. package/dist/chunk-22WIVF4O.mjs.map +1 -0
  54. package/dist/{chunk-IWHAJBYL.js → chunk-3NDDCSWR.js} +15 -15
  55. package/dist/{chunk-IWHAJBYL.js.map → chunk-3NDDCSWR.js.map} +1 -1
  56. package/dist/{chunk-RGXYE2ZI.mjs → chunk-3T74AR7S.mjs} +4 -4
  57. package/dist/{chunk-RGXYE2ZI.mjs.map → chunk-3T74AR7S.mjs.map} +1 -1
  58. package/dist/{chunk-ESPOINPT.mjs → chunk-4FWJ5K5O.mjs} +3 -3
  59. package/dist/{chunk-ESPOINPT.mjs.map → chunk-4FWJ5K5O.mjs.map} +1 -1
  60. package/dist/{chunk-YK7SEUFJ.mjs → chunk-53OU4TGU.mjs} +4 -4
  61. package/dist/{chunk-YK7SEUFJ.mjs.map → chunk-53OU4TGU.mjs.map} +1 -1
  62. package/dist/{chunk-JAA42HR7.js → chunk-5IOMLUQS.js} +7 -7
  63. package/dist/{chunk-JAA42HR7.js.map → chunk-5IOMLUQS.js.map} +1 -1
  64. package/dist/{chunk-MTHMOXZF.js → chunk-5L46GS7N.js} +5 -5
  65. package/dist/{chunk-MTHMOXZF.js.map → chunk-5L46GS7N.js.map} +1 -1
  66. package/dist/{chunk-EVKP4SOM.js → chunk-7JRFYQKN.js} +10 -10
  67. package/dist/{chunk-EVKP4SOM.js.map → chunk-7JRFYQKN.js.map} +1 -1
  68. package/dist/{chunk-P4J3WG6C.js → chunk-7JYLE3X6.js} +4 -4
  69. package/dist/{chunk-P4J3WG6C.js.map → chunk-7JYLE3X6.js.map} +1 -1
  70. package/dist/{chunk-EXVHO3CZ.mjs → chunk-7OOPIYLP.mjs} +3 -3
  71. package/dist/{chunk-EXVHO3CZ.mjs.map → chunk-7OOPIYLP.mjs.map} +1 -1
  72. package/dist/{chunk-2SLA2LOD.js → chunk-A4WTX36Y.js} +12 -12
  73. package/dist/{chunk-2SLA2LOD.js.map → chunk-A4WTX36Y.js.map} +1 -1
  74. package/dist/{chunk-AEW7EFYU.js → chunk-AEN7EL6N.js} +20 -6
  75. package/dist/chunk-AEN7EL6N.js.map +1 -0
  76. package/dist/{chunk-7VRK3DWU.js → chunk-BYVAXSH5.js} +6 -6
  77. package/dist/{chunk-7VRK3DWU.js.map → chunk-BYVAXSH5.js.map} +1 -1
  78. package/dist/{chunk-KEEZX6Q4.js → chunk-CRIZNSD2.js} +3 -3
  79. package/dist/{chunk-KEEZX6Q4.js.map → chunk-CRIZNSD2.js.map} +1 -1
  80. package/dist/{chunk-6FIIA6ME.mjs → chunk-EG3F5AHL.mjs} +4 -4
  81. package/dist/{chunk-6FIIA6ME.mjs.map → chunk-EG3F5AHL.mjs.map} +1 -1
  82. package/dist/{chunk-EVETX2XF.mjs → chunk-EJTRU275.mjs} +4 -4
  83. package/dist/{chunk-EVETX2XF.mjs.map → chunk-EJTRU275.mjs.map} +1 -1
  84. package/dist/{chunk-OUP6UL74.mjs → chunk-GSH4DBAD.mjs} +3 -3
  85. package/dist/{chunk-OUP6UL74.mjs.map → chunk-GSH4DBAD.mjs.map} +1 -1
  86. package/dist/chunk-IMWON7OV.mjs +27 -0
  87. package/dist/chunk-IMWON7OV.mjs.map +1 -0
  88. package/dist/{chunk-JSM4AYSZ.js → chunk-IPLOSM5F.js} +14 -14
  89. package/dist/{chunk-JSM4AYSZ.js.map → chunk-IPLOSM5F.js.map} +1 -1
  90. package/dist/{chunk-MQEVQ5YB.js → chunk-ITJ5ZF33.js} +3 -3
  91. package/dist/{chunk-MQEVQ5YB.js.map → chunk-ITJ5ZF33.js.map} +1 -1
  92. package/dist/{chunk-3RISRHOK.mjs → chunk-IXJ2H4MU.mjs} +8 -8
  93. package/dist/{chunk-3RISRHOK.mjs.map → chunk-IXJ2H4MU.mjs.map} +1 -1
  94. package/dist/{chunk-3MLVI5DH.mjs → chunk-JLVKZTYZ.mjs} +3 -3
  95. package/dist/{chunk-3MLVI5DH.mjs.map → chunk-JLVKZTYZ.mjs.map} +1 -1
  96. package/dist/{chunk-I4PUQYBI.mjs → chunk-JOSSKN4J.mjs} +3 -3
  97. package/dist/{chunk-I4PUQYBI.mjs.map → chunk-JOSSKN4J.mjs.map} +1 -1
  98. package/dist/chunk-LGFRHT34.js +8 -0
  99. package/dist/{chunk-OI3FCJSP.js.map → chunk-LGFRHT34.js.map} +1 -1
  100. package/dist/{chunk-OZTVJSFX.js → chunk-NJVU2DCX.js} +160 -172
  101. package/dist/chunk-NJVU2DCX.js.map +1 -0
  102. package/dist/{chunk-AGEE4CGH.js → chunk-OASA6M53.js} +5 -5
  103. package/dist/{chunk-AGEE4CGH.js.map → chunk-OASA6M53.js.map} +1 -1
  104. package/dist/{chunk-LXBPTKYT.mjs → chunk-P2UCNCQZ.mjs} +4 -4
  105. package/dist/{chunk-LXBPTKYT.mjs.map → chunk-P2UCNCQZ.mjs.map} +1 -1
  106. package/dist/{chunk-I7KIVKVW.js → chunk-RKRCWQBU.js} +3 -3
  107. package/dist/{chunk-I7KIVKVW.js.map → chunk-RKRCWQBU.js.map} +1 -1
  108. package/dist/{chunk-OWEJXMKY.mjs → chunk-RKWBC43M.mjs} +3 -3
  109. package/dist/{chunk-OWEJXMKY.mjs.map → chunk-RKWBC43M.mjs.map} +1 -1
  110. package/dist/{chunk-CTAYH725.js → chunk-RPDSNMVR.js} +11 -11
  111. package/dist/{chunk-CTAYH725.js.map → chunk-RPDSNMVR.js.map} +1 -1
  112. package/dist/{chunk-NRT7MOEO.mjs → chunk-RT7XKV6A.mjs} +3 -3
  113. package/dist/{chunk-NRT7MOEO.mjs.map → chunk-RT7XKV6A.mjs.map} +1 -1
  114. package/dist/{chunk-VDGCZVUF.js → chunk-RWJ3IJUP.js} +14 -14
  115. package/dist/{chunk-VDGCZVUF.js.map → chunk-RWJ3IJUP.js.map} +1 -1
  116. package/dist/{chunk-5IQOPL7T.mjs → chunk-S4LTYXPR.mjs} +3 -3
  117. package/dist/{chunk-5IQOPL7T.mjs.map → chunk-S4LTYXPR.mjs.map} +1 -1
  118. package/dist/chunk-SIHPFJ6C.mjs +6 -0
  119. package/dist/{chunk-5FBALULE.mjs.map → chunk-SIHPFJ6C.mjs.map} +1 -1
  120. package/dist/{chunk-BGBP4UN4.js → chunk-T742S2CY.js} +4 -4
  121. package/dist/{chunk-BGBP4UN4.js.map → chunk-T742S2CY.js.map} +1 -1
  122. package/dist/{chunk-GYKFHQSZ.mjs → chunk-TBAP7JNJ.mjs} +3 -3
  123. package/dist/{chunk-GYKFHQSZ.mjs.map → chunk-TBAP7JNJ.mjs.map} +1 -1
  124. package/dist/{chunk-MLXUMVBK.mjs → chunk-UCMMIGC6.mjs} +20 -6
  125. package/dist/chunk-UCMMIGC6.mjs.map +1 -0
  126. package/dist/{chunk-DVZ4BMXX.mjs → chunk-UPF6HX5C.mjs} +7 -7
  127. package/dist/{chunk-DVZ4BMXX.mjs.map → chunk-UPF6HX5C.mjs.map} +1 -1
  128. package/dist/{chunk-S6CMQTVZ.js → chunk-UTCZNQ4G.js} +5 -5
  129. package/dist/{chunk-S6CMQTVZ.js.map → chunk-UTCZNQ4G.js.map} +1 -1
  130. package/dist/{chunk-D5KKVWZK.mjs → chunk-UV3HJDMT.mjs} +3 -3
  131. package/dist/{chunk-D5KKVWZK.mjs.map → chunk-UV3HJDMT.mjs.map} +1 -1
  132. package/dist/{chunk-IZRVSIOK.js → chunk-W6GQNGIM.js} +4 -4
  133. package/dist/{chunk-IZRVSIOK.js.map → chunk-W6GQNGIM.js.map} +1 -1
  134. package/dist/{chunk-YEHC7VMW.mjs → chunk-W7D27SYJ.mjs} +3 -3
  135. package/dist/{chunk-YEHC7VMW.mjs.map → chunk-W7D27SYJ.mjs.map} +1 -1
  136. package/dist/{chunk-KDLN2MR5.js → chunk-WI6RV2U4.js} +18 -18
  137. package/dist/{chunk-KDLN2MR5.js.map → chunk-WI6RV2U4.js.map} +1 -1
  138. package/dist/{chunk-IUNFAKOS.mjs → chunk-XAPGVZNN.mjs} +3 -3
  139. package/dist/{chunk-IUNFAKOS.mjs.map → chunk-XAPGVZNN.mjs.map} +1 -1
  140. package/dist/{chunk-XCOMBHLF.js → chunk-Y63EG5CW.js} +8 -8
  141. package/dist/{chunk-XCOMBHLF.js.map → chunk-Y63EG5CW.js.map} +1 -1
  142. package/dist/{chunk-5OUOVPXC.js → chunk-YNI7WQJN.js} +8 -8
  143. package/dist/{chunk-5OUOVPXC.js.map → chunk-YNI7WQJN.js.map} +1 -1
  144. package/dist/chunk-YZJ22HUQ.js +29 -0
  145. package/dist/chunk-YZJ22HUQ.js.map +1 -0
  146. package/dist/{chunk-RQG7I6O4.js → chunk-ZRCA5YGZ.js} +4 -4
  147. package/dist/{chunk-RQG7I6O4.js.map → chunk-ZRCA5YGZ.js.map} +1 -1
  148. package/dist/{chunk-QSN2QST7.mjs → chunk-ZRD75SE5.mjs} +3 -3
  149. package/dist/{chunk-QSN2QST7.mjs.map → chunk-ZRD75SE5.mjs.map} +1 -1
  150. package/dist/{chunk-CI7T4ZRP.mjs → chunk-ZZ6P27A5.mjs} +4 -4
  151. package/dist/{chunk-CI7T4ZRP.mjs.map → chunk-ZZ6P27A5.mjs.map} +1 -1
  152. package/dist/cli/index.js +3 -3
  153. package/dist/cli/index.mjs +1 -1
  154. package/dist/client/index.js +4 -4
  155. package/dist/client/index.mjs +3 -3
  156. package/dist/commerce/index.js +57 -57
  157. package/dist/commerce/index.mjs +5 -5
  158. package/dist/engage/ChatWidget.d.ts +60 -1
  159. package/dist/engage/ChatWidget.d.ts.map +1 -1
  160. package/dist/engage/chat-messages.d.ts +86 -0
  161. package/dist/engage/chat-messages.d.ts.map +1 -0
  162. package/dist/engage/index.js +10 -10
  163. package/dist/engage/index.mjs +7 -7
  164. package/dist/fleet/index.js +8 -8
  165. package/dist/fleet/index.mjs +4 -4
  166. package/dist/forms/index.js +16 -16
  167. package/dist/forms/index.mjs +9 -9
  168. package/dist/forms/server.js +10 -10
  169. package/dist/forms/server.mjs +8 -8
  170. package/dist/forms/static.js +7 -7
  171. package/dist/forms/static.mjs +6 -6
  172. package/dist/images/index.js +11 -11
  173. package/dist/images/index.mjs +4 -4
  174. package/dist/index.js +63 -63
  175. package/dist/index.mjs +9 -9
  176. package/dist/layout/client.js +8 -8
  177. package/dist/layout/client.mjs +7 -7
  178. package/dist/layout/index.js +10 -10
  179. package/dist/layout/index.mjs +8 -8
  180. package/dist/maps/index.js +5 -5
  181. package/dist/maps/index.mjs +3 -3
  182. package/dist/motion/CountUp.d.ts +49 -0
  183. package/dist/motion/CountUp.d.ts.map +1 -0
  184. package/dist/motion/Parallax.d.ts +14 -0
  185. package/dist/motion/Parallax.d.ts.map +1 -1
  186. package/dist/motion/ScrollScene.d.ts +1 -1
  187. package/dist/motion/ScrollScene.d.ts.map +1 -1
  188. package/dist/motion/engine.d.ts +19 -0
  189. package/dist/motion/engine.d.ts.map +1 -1
  190. package/dist/motion/gsap.d.ts +55 -6
  191. package/dist/motion/gsap.d.ts.map +1 -1
  192. package/dist/motion/gsap.js +101 -4
  193. package/dist/motion/gsap.js.map +1 -1
  194. package/dist/motion/gsap.mjs +96 -3
  195. package/dist/motion/gsap.mjs.map +1 -1
  196. package/dist/motion/index.d.ts +1 -1
  197. package/dist/motion/index.d.ts.map +1 -1
  198. package/dist/motion/index.js +21 -40
  199. package/dist/motion/index.js.map +1 -1
  200. package/dist/motion/index.mjs +11 -32
  201. package/dist/motion/index.mjs.map +1 -1
  202. package/dist/motion/three.js +5 -5
  203. package/dist/motion/three.mjs +1 -1
  204. package/dist/search/index.js +4 -4
  205. package/dist/search/index.mjs +3 -3
  206. package/dist/seo/client.js +5 -5
  207. package/dist/seo/client.mjs +4 -4
  208. package/dist/seo/index.js +5 -5
  209. package/dist/seo/index.mjs +4 -4
  210. package/dist/server/index.js +3 -3
  211. package/dist/server/index.mjs +2 -2
  212. package/dist/shared/version.d.ts +1 -1
  213. package/dist/signal/index.js +11 -11
  214. package/dist/signal/index.mjs +2 -2
  215. package/dist/sync/index.js +17 -17
  216. package/dist/sync/index.mjs +4 -4
  217. package/package.json +1 -1
  218. package/dist/ChatWidget-566CQUN6.js +0 -26
  219. package/dist/ChatWidget-LNOY4TUZ.mjs +0 -17
  220. package/dist/EngageWidget-DF47YUHQ.js +0 -21
  221. package/dist/EngageWidget-IGF7SC3R.mjs +0 -12
  222. package/dist/ManagedForm-4U54NPW2.js +0 -25
  223. package/dist/ManagedForm-MOBWSG4D.mjs +0 -16
  224. package/dist/SitemapSync-74EVNOFQ.mjs +0 -9
  225. package/dist/SitemapSync-BQFZAE3X.js +0 -18
  226. package/dist/chunk-5FBALULE.mjs +0 -6
  227. package/dist/chunk-AEW7EFYU.js.map +0 -1
  228. package/dist/chunk-MLXUMVBK.mjs.map +0 -1
  229. package/dist/chunk-OI3FCJSP.js +0 -8
  230. package/dist/chunk-OZTVJSFX.js.map +0 -1
  231. package/dist/chunk-PTQHPWEK.mjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkIZRVSIOK_js = require('./chunk-IZRVSIOK.js');
3
+ var chunkW6GQNGIM_js = require('./chunk-W6GQNGIM.js');
4
4
  var jsxRuntime = require('react/jsx-runtime');
5
5
 
6
6
  function HoneypotField({ name, value, onChange }) {
@@ -46,7 +46,7 @@ function nativeEligible(config) {
46
46
  }
47
47
  function nativeFormProps(config) {
48
48
  if (!nativeEligible(config)) return {};
49
- const { apiUrl } = chunkIZRVSIOK_js.getApiConfig();
49
+ const { apiUrl } = chunkW6GQNGIM_js.getApiConfig();
50
50
  return { action: `${apiUrl}/api/public/forms/submit-native`, method: "post" };
51
51
  }
52
52
  function NativeFallbackFields({ config, returnTo }) {
@@ -60,5 +60,5 @@ function NativeFallbackFields({ config, returnTo }) {
60
60
  exports.HoneypotField = HoneypotField;
61
61
  exports.NativeFallbackFields = NativeFallbackFields;
62
62
  exports.nativeFormProps = nativeFormProps;
63
- //# sourceMappingURL=chunk-RQG7I6O4.js.map
64
- //# sourceMappingURL=chunk-RQG7I6O4.js.map
63
+ //# sourceMappingURL=chunk-ZRCA5YGZ.js.map
64
+ //# sourceMappingURL=chunk-ZRCA5YGZ.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/forms/HoneypotField.tsx","../src/forms/native-fallback.tsx"],"names":["jsx","getApiConfig","jsxs","Fragment"],"mappings":";;;;;AAqCO,SAAS,aAAA,CAAc,EAAE,IAAA,EAAM,KAAA,EAAO,UAAS,EAAuB;AAC3E,EAAA,MAAM,WAAA,GAAc,OAAO,QAAA,KAAa,UAAA;AACxC,EAAA,uBACEA,cAAA;AAAA,IAAC,OAAA;AAAA,IAAA;AAAA,MACC,IAAA,EAAK,MAAA;AAAA,MACL,IAAA;AAAA,MACA,QAAA,EAAU,EAAA;AAAA,MACV,YAAA,EAAa,cAAA;AAAA,MACb,aAAA,EAAY,MAAA;AAAA,MACZ,KAAA,EAAK,IAAA;AAAA,MACL,kBAAA,EAAiB,EAAA;AAAA,MAGjB,gBAAA,EAAe,EAAA;AAAA,MACf,eA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,EACE,QAAA,EAAA;AAAA,oBAAAH,cAAAA,CAAC,OAAA,EAAA,EAAM,IAAA,EAAK,QAAA,EAAS,IAAA,EAAK,aAAY,KAAA,EAAO,MAAA,CAAQ,YAAA,EAAc,QAAA,EAAQ,IAAA,EAAC,CAAA;AAAA,IAC3E,QAAA,mBAAWA,cAAAA,CAAC,OAAA,EAAA,EAAM,IAAA,EAAK,QAAA,EAAS,IAAA,EAAK,YAAA,EAAa,KAAA,EAAO,QAAA,EAAU,QAAA,EAAQ,IAAA,EAAC,CAAA,GAAK;AAAA,GAAA,EACpF,CAAA;AAEJ","file":"chunk-RQG7I6O4.js","sourcesContent":["/**\n * Single source of truth for the honeypot input — rendered by BOTH form\n * experiences (classic and stage) inside their <form>. The customRender path\n * deliberately gets none (documented limitation: custom renders lose the\n * honeypot, which is why alternate experiences must be render branches).\n *\n * Invariants (do not weaken any of these):\n * - `inert` blocks focus/interaction at the browser level, surviving hostile\n * site CSS that could defeat the inline styles.\n * - data-sk-honeypot gives site CSS a stable opt-OUT hook.\n * - Controlled input: bots filling via JS still fire React onChange, so the\n * value reaches submitForm's data payload.\n * - Name comes from config (`honeypot_field || DEFAULT_HONEYPOT_FIELD` from\n * the shared contract) — resolved by the caller, never forked here.\n * - The trap must be invisible to AUTOFILL as well as to people. A browser or\n * password manager filling a hidden input flags a real visitor as a bot, and\n * because the value is stripped server-side the mistake is undiagnosable\n * after the fact. `autocomplete=\"off\"` does not achieve this — it is the one\n * value Chrome deliberately ignores for contact/address autofill — so the\n * trap declares `new-password` (never offered saved contact data) plus the\n * documented per-manager opt-outs.\n */\n\nimport React from 'react'\n\nexport interface HoneypotFieldProps {\n name: string\n value?: string\n /**\n * Omit for STATIC mode — an uncontrolled trap a Server Component can render.\n * The trap's whole job is server-side (the value is read off the submission\n * and stripped), so it needs no client state to work; the controlled form is\n * only so the hydrated JSON path can read it back out of React state.\n */\n onChange?: (value: string) => void\n}\n\nexport function HoneypotField({ name, value, onChange }: HoneypotFieldProps) {\n const interactive = typeof onChange === 'function'\n return (\n <input\n type=\"text\"\n name={name}\n tabIndex={-1}\n autoComplete=\"new-password\"\n aria-hidden=\"true\"\n inert\n data-sk-honeypot=\"\"\n // Password-manager opt-outs: 1Password, LastPass, Dashlane, Bitwarden.\n // Each ignores its own attribute; none respects autocomplete alone.\n data-1p-ignore=\"\"\n data-lpignore=\"true\"\n data-form-type=\"other\"\n data-bwignore=\"\"\n style={{\n position: 'absolute',\n left: -9999,\n width: 1,\n height: 1,\n overflow: 'hidden',\n opacity: 0,\n visibility: 'hidden',\n pointerEvents: 'none',\n }}\n {...(interactive\n ? {\n value: value ?? '',\n onChange: (e: React.ChangeEvent<HTMLInputElement>) => {\n onChange!(e.target.value)\n if (e.target.value) {\n // Bot detected\n console.warn('[Forms] Honeypot triggered')\n }\n },\n }\n : { defaultValue: '' })}\n />\n )\n}\n","'use client'\n\n/**\n * No-JS native submission fallback — the floor under every managed form.\n *\n * The classic form is the SSR/no-JS surface (experiences are post-hydration\n * chunks), so it alone carries a real `action`/`method` pointing at\n * sonor-api's POST /api/public/forms/submit-native. With JS running, the\n * form's onSubmit preventDefault()s and the JSON path wins; without JS the\n * browser performs an ordinary form-encoded POST and the lead still lands.\n *\n * Auth rides in the hidden `_sk_token` field: a signed, single-purpose\n * credential minted by the api-key-authenticated forms/config endpoint\n * (`native_token` in the response). No token in the config (older API, or no\n * signing secret) means no fallback — the form keeps its historical behavior\n * rather than pointing at an endpoint that will reject it.\n *\n * Multi-step forms are excluded: step navigation is JS, and a native POST of\n * step-1 fields alone fails whole-form validation server-side. Single-step\n * forms are the overwhelming lead-capture case.\n *\n * Single source of truth for the gating — the form attrs and the hidden\n * fields must always agree, so both read the same predicate.\n */\n\nimport React from 'react'\nimport type { ManagedFormConfig } from './types'\nimport { getApiConfig } from './submitForm'\n\nfunction nativeEligible(config: ManagedFormConfig | null | undefined): boolean {\n return !!config?.native_token && !config.is_multi_step\n}\n\n/** `action`/`method` for the classic <form> — empty when ineligible. */\nexport function nativeFormProps(\n config: ManagedFormConfig | null | undefined,\n): { action?: string; method?: 'post' } {\n if (!nativeEligible(config)) return {}\n const { apiUrl } = getApiConfig()\n return { action: `${apiUrl}/api/public/forms/submit-native`, method: 'post' }\n}\n\nexport interface NativeFallbackFieldsProps {\n config: ManagedFormConfig | null | undefined\n /**\n * Absolute URL the native 303 should land on (usually the page hosting the\n * form). Optional — without it the server falls back to the Referer origin,\n * which loses the path but still returns the visitor to the right site.\n */\n returnTo?: string\n}\n\n/** Hidden control fields the native endpoint reads (`_sk_*` namespace). */\nexport function NativeFallbackFields({ config, returnTo }: NativeFallbackFieldsProps) {\n if (!nativeEligible(config)) return null\n return (\n <>\n <input type=\"hidden\" name=\"_sk_token\" value={config!.native_token} readOnly />\n {returnTo ? <input type=\"hidden\" name=\"_sk_return\" value={returnTo} readOnly /> : null}\n </>\n )\n}\n"]}
1
+ {"version":3,"sources":["../src/forms/HoneypotField.tsx","../src/forms/native-fallback.tsx"],"names":["jsx","getApiConfig","jsxs","Fragment"],"mappings":";;;;;AAqCO,SAAS,aAAA,CAAc,EAAE,IAAA,EAAM,KAAA,EAAO,UAAS,EAAuB;AAC3E,EAAA,MAAM,WAAA,GAAc,OAAO,QAAA,KAAa,UAAA;AACxC,EAAA,uBACEA,cAAA;AAAA,IAAC,OAAA;AAAA,IAAA;AAAA,MACC,IAAA,EAAK,MAAA;AAAA,MACL,IAAA;AAAA,MACA,QAAA,EAAU,EAAA;AAAA,MACV,YAAA,EAAa,cAAA;AAAA,MACb,aAAA,EAAY,MAAA;AAAA,MACZ,KAAA,EAAK,IAAA;AAAA,MACL,kBAAA,EAAiB,EAAA;AAAA,MAGjB,gBAAA,EAAe,EAAA;AAAA,MACf,eAAA,EAAc,MAAA;AAAA,MACd,gBAAA,EAAe,OAAA;AAAA,MACf,eAAA,EAAc,EAAA;AAAA,MACd,KAAA,EAAO;AAAA,QACL,QAAA,EAAU,UAAA;AAAA,QACV,IAAA,EAAM,KAAA;AAAA,QACN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AC,CAAA;AAAA,IAC3E,QAAA,mBAAWA,cAAAA,CAAC,OAAA,EAAA,EAAM,IAAA,EAAK,QAAA,EAAS,IAAA,EAAK,YAAA,EAAa,KAAA,EAAO,QAAA,EAAU,QAAA,EAAQ,IAAA,EAAC,CAAA,GAAK;AAAA,GAAA,EACpF,CAAA;AAEJ","file":"chunk-ZRCA5YGZ.js","sourcesContent":["/**\n * Single source of truth for the honeypot input — rendered by BOTH form\n * experiences (classic and stage) inside their <form>. The customRender path\n * deliberately gets none (documented limitation: custom renders lose the\n * honeypot, which is why alternate experiences must be render branches).\n *\n * Invariants (do not weaken any of these):\n * - `inert` blocks focus/interaction at the browser level, surviving hostile\n * site CSS that could defeat the inline styles.\n * - data-sk-honeypot gives site CSS a stable opt-OUT hook.\n * - Controlled input: bots filling via JS still fire React onChange, so the\n * value reaches submitForm's data payload.\n * - Name comes from config (`honeypot_field || DEFAULT_HONEYPOT_FIELD` from\n * the shared contract) — resolved by the caller, never forked here.\n * - The trap must be invisible to AUTOFILL as well as to people. A browser or\n * password manager filling a hidden input flags a real visitor as a bot, and\n * because the value is stripped server-side the mistake is undiagnosable\n * after the fact. `autocomplete=\"off\"` does not achieve this — it is the one\n * value Chrome deliberately ignores for contact/address autofill — so the\n * trap declares `new-password` (never offered saved contact data) plus the\n * documented per-manager opt-outs.\n */\n\nimport React from 'react'\n\nexport interface HoneypotFieldProps {\n name: string\n value?: string\n /**\n * Omit for STATIC mode — an uncontrolled trap a Server Component can render.\n * The trap's whole job is server-side (the value is read off the submission\n * and stripped), so it needs no client state to work; the controlled form is\n * only so the hydrated JSON path can read it back out of React state.\n */\n onChange?: (value: string) => void\n}\n\nexport function HoneypotField({ name, value, onChange }: HoneypotFieldProps) {\n const interactive = typeof onChange === 'function'\n return (\n <input\n type=\"text\"\n name={name}\n tabIndex={-1}\n autoComplete=\"new-password\"\n aria-hidden=\"true\"\n inert\n data-sk-honeypot=\"\"\n // Password-manager opt-outs: 1Password, LastPass, Dashlane, Bitwarden.\n // Each ignores its own attribute; none respects autocomplete alone.\n data-1p-ignore=\"\"\n data-lpignore=\"true\"\n data-form-type=\"other\"\n data-bwignore=\"\"\n style={{\n position: 'absolute',\n left: -9999,\n width: 1,\n height: 1,\n overflow: 'hidden',\n opacity: 0,\n visibility: 'hidden',\n pointerEvents: 'none',\n }}\n {...(interactive\n ? {\n value: value ?? '',\n onChange: (e: React.ChangeEvent<HTMLInputElement>) => {\n onChange!(e.target.value)\n if (e.target.value) {\n // Bot detected\n console.warn('[Forms] Honeypot triggered')\n }\n },\n }\n : { defaultValue: '' })}\n />\n )\n}\n","'use client'\n\n/**\n * No-JS native submission fallback — the floor under every managed form.\n *\n * The classic form is the SSR/no-JS surface (experiences are post-hydration\n * chunks), so it alone carries a real `action`/`method` pointing at\n * sonor-api's POST /api/public/forms/submit-native. With JS running, the\n * form's onSubmit preventDefault()s and the JSON path wins; without JS the\n * browser performs an ordinary form-encoded POST and the lead still lands.\n *\n * Auth rides in the hidden `_sk_token` field: a signed, single-purpose\n * credential minted by the api-key-authenticated forms/config endpoint\n * (`native_token` in the response). No token in the config (older API, or no\n * signing secret) means no fallback — the form keeps its historical behavior\n * rather than pointing at an endpoint that will reject it.\n *\n * Multi-step forms are excluded: step navigation is JS, and a native POST of\n * step-1 fields alone fails whole-form validation server-side. Single-step\n * forms are the overwhelming lead-capture case.\n *\n * Single source of truth for the gating — the form attrs and the hidden\n * fields must always agree, so both read the same predicate.\n */\n\nimport React from 'react'\nimport type { ManagedFormConfig } from './types'\nimport { getApiConfig } from './submitForm'\n\nfunction nativeEligible(config: ManagedFormConfig | null | undefined): boolean {\n return !!config?.native_token && !config.is_multi_step\n}\n\n/** `action`/`method` for the classic <form> — empty when ineligible. */\nexport function nativeFormProps(\n config: ManagedFormConfig | null | undefined,\n): { action?: string; method?: 'post' } {\n if (!nativeEligible(config)) return {}\n const { apiUrl } = getApiConfig()\n return { action: `${apiUrl}/api/public/forms/submit-native`, method: 'post' }\n}\n\nexport interface NativeFallbackFieldsProps {\n config: ManagedFormConfig | null | undefined\n /**\n * Absolute URL the native 303 should land on (usually the page hosting the\n * form). Optional — without it the server falls back to the Referer origin,\n * which loses the path but still returns the visitor to the right site.\n */\n returnTo?: string\n}\n\n/** Hidden control fields the native endpoint reads (`_sk_*` namespace). */\nexport function NativeFallbackFields({ config, returnTo }: NativeFallbackFieldsProps) {\n if (!nativeEligible(config)) return null\n return (\n <>\n <input type=\"hidden\" name=\"_sk_token\" value={config!.native_token} readOnly />\n {returnTo ? <input type=\"hidden\" name=\"_sk_return\" value={returnTo} readOnly /> : null}\n </>\n )\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { getApiConfig } from './chunk-OWEJXMKY.mjs';
1
+ import { getApiConfig } from './chunk-RKWBC43M.mjs';
2
2
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
3
 
4
4
  function HoneypotField({ name, value, onChange }) {
@@ -56,5 +56,5 @@ function NativeFallbackFields({ config, returnTo }) {
56
56
  }
57
57
 
58
58
  export { HoneypotField, NativeFallbackFields, nativeFormProps };
59
- //# sourceMappingURL=chunk-QSN2QST7.mjs.map
60
- //# sourceMappingURL=chunk-QSN2QST7.mjs.map
59
+ //# sourceMappingURL=chunk-ZRD75SE5.mjs.map
60
+ //# sourceMappingURL=chunk-ZRD75SE5.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/forms/HoneypotField.tsx","../src/forms/native-fallback.tsx"],"names":["jsx"],"mappings":";;;AAqCO,SAAS,aAAA,CAAc,EAAE,IAAA,EAAM,KAAA,EAAO,UAAS,EAAuB;AAC3E,EAAA,MAAM,WAAA,GAAc,OAAO,QAAA,KAAa,UAAA;AACxC,EAAA,uBACE,GAAA;AAAA,IAAC,OAAA;AAAA,IAAA;AAAA,MACC,IAAA,EAAK,MAAA;AAAA,MACL,IAAA;AAAA,MACA,QAAA,EAAU,EAAA;AAAA,MACV,YAAA,EAAa,cAAA;AAAA,MACb,aAAA,EAAY,MAAA;AAAA,MACZ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I,CAAC,cAAA,CAAe,MAAM,CAAA,EAAG,OAAO,IAAA;AACpC,EAAA,uBACE,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,oBAAAA,GAAAA,CAAC,OAAA,EAAA,EAAM,IAAA,EAAK,QAAA,EAAS,IAAA,EAAK,aAAY,KAAA,EAAO,MAAA,CAAQ,YAAA,EAAc,QAAA,EAAQ,IAAA,EAAC,CAAA;AAAA,IAC3E,QAAA,mBAAWA,GAAAA,CAAC,OAAA,EAAA,EAAM,IAAA,EAAK,QAAA,EAAS,IAAA,EAAK,YAAA,EAAa,KAAA,EAAO,QAAA,EAAU,QAAA,EAAQ,IAAA,EAAC,CAAA,GAAK;AAAA,GAAA,EACpF,CAAA;AAEJ","file":"chunk-QSN2QST7.mjs","sourcesContent":["/**\n * Single source of truth for the honeypot input — rendered by BOTH form\n * experiences (classic and stage) inside their <form>. The customRender path\n * deliberately gets none (documented limitation: custom renders lose the\n * honeypot, which is why alternate experiences must be render branches).\n *\n * Invariants (do not weaken any of these):\n * - `inert` blocks focus/interaction at the browser level, surviving hostile\n * site CSS that could defeat the inline styles.\n * - data-sk-honeypot gives site CSS a stable opt-OUT hook.\n * - Controlled input: bots filling via JS still fire React onChange, so the\n * value reaches submitForm's data payload.\n * - Name comes from config (`honeypot_field || DEFAULT_HONEYPOT_FIELD` from\n * the shared contract) — resolved by the caller, never forked here.\n * - The trap must be invisible to AUTOFILL as well as to people. A browser or\n * password manager filling a hidden input flags a real visitor as a bot, and\n * because the value is stripped server-side the mistake is undiagnosable\n * after the fact. `autocomplete=\"off\"` does not achieve this — it is the one\n * value Chrome deliberately ignores for contact/address autofill — so the\n * trap declares `new-password` (never offered saved contact data) plus the\n * documented per-manager opt-outs.\n */\n\nimport React from 'react'\n\nexport interface HoneypotFieldProps {\n name: string\n value?: string\n /**\n * Omit for STATIC mode — an uncontrolled trap a Server Component can render.\n * The trap's whole job is server-side (the value is read off the submission\n * and stripped), so it needs no client state to work; the controlled form is\n * only so the hydrated JSON path can read it back out of React state.\n */\n onChange?: (value: string) => void\n}\n\nexport function HoneypotField({ name, value, onChange }: HoneypotFieldProps) {\n const interactive = typeof onChange === 'function'\n return (\n <input\n type=\"text\"\n name={name}\n tabIndex={-1}\n autoComplete=\"new-password\"\n aria-hidden=\"true\"\n inert\n data-sk-honeypot=\"\"\n // Password-manager opt-outs: 1Password, LastPass, Dashlane, Bitwarden.\n // Each ignores its own attribute; none respects autocomplete alone.\n data-1p-ignore=\"\"\n data-lpignore=\"true\"\n data-form-type=\"other\"\n data-bwignore=\"\"\n style={{\n position: 'absolute',\n left: -9999,\n width: 1,\n height: 1,\n overflow: 'hidden',\n opacity: 0,\n visibility: 'hidden',\n pointerEvents: 'none',\n }}\n {...(interactive\n ? {\n value: value ?? '',\n onChange: (e: React.ChangeEvent<HTMLInputElement>) => {\n onChange!(e.target.value)\n if (e.target.value) {\n // Bot detected\n console.warn('[Forms] Honeypot triggered')\n }\n },\n }\n : { defaultValue: '' })}\n />\n )\n}\n","'use client'\n\n/**\n * No-JS native submission fallback — the floor under every managed form.\n *\n * The classic form is the SSR/no-JS surface (experiences are post-hydration\n * chunks), so it alone carries a real `action`/`method` pointing at\n * sonor-api's POST /api/public/forms/submit-native. With JS running, the\n * form's onSubmit preventDefault()s and the JSON path wins; without JS the\n * browser performs an ordinary form-encoded POST and the lead still lands.\n *\n * Auth rides in the hidden `_sk_token` field: a signed, single-purpose\n * credential minted by the api-key-authenticated forms/config endpoint\n * (`native_token` in the response). No token in the config (older API, or no\n * signing secret) means no fallback — the form keeps its historical behavior\n * rather than pointing at an endpoint that will reject it.\n *\n * Multi-step forms are excluded: step navigation is JS, and a native POST of\n * step-1 fields alone fails whole-form validation server-side. Single-step\n * forms are the overwhelming lead-capture case.\n *\n * Single source of truth for the gating — the form attrs and the hidden\n * fields must always agree, so both read the same predicate.\n */\n\nimport React from 'react'\nimport type { ManagedFormConfig } from './types'\nimport { getApiConfig } from './submitForm'\n\nfunction nativeEligible(config: ManagedFormConfig | null | undefined): boolean {\n return !!config?.native_token && !config.is_multi_step\n}\n\n/** `action`/`method` for the classic <form> — empty when ineligible. */\nexport function nativeFormProps(\n config: ManagedFormConfig | null | undefined,\n): { action?: string; method?: 'post' } {\n if (!nativeEligible(config)) return {}\n const { apiUrl } = getApiConfig()\n return { action: `${apiUrl}/api/public/forms/submit-native`, method: 'post' }\n}\n\nexport interface NativeFallbackFieldsProps {\n config: ManagedFormConfig | null | undefined\n /**\n * Absolute URL the native 303 should land on (usually the page hosting the\n * form). Optional — without it the server falls back to the Referer origin,\n * which loses the path but still returns the visitor to the right site.\n */\n returnTo?: string\n}\n\n/** Hidden control fields the native endpoint reads (`_sk_*` namespace). */\nexport function NativeFallbackFields({ config, returnTo }: NativeFallbackFieldsProps) {\n if (!nativeEligible(config)) return null\n return (\n <>\n <input type=\"hidden\" name=\"_sk_token\" value={config!.native_token} readOnly />\n {returnTo ? <input type=\"hidden\" name=\"_sk_return\" value={returnTo} readOnly /> : null}\n </>\n )\n}\n"]}
1
+ {"version":3,"sources":["../src/forms/HoneypotField.tsx","../src/forms/native-fallback.tsx"],"names":["jsx"],"mappings":";;;AAqCO,SAAS,aAAA,CAAc,EAAE,IAAA,EAAM,KAAA,EAAO,UAAS,EAAuB;AAC3E,EAAA,MAAM,WAAA,GAAc,OAAO,QAAA,KAAa,UAAA;AACxC,EAAA,uBACE,GAAA;AAAA,IAAC,OAAA;AAAA,IAAA;AAAA,MACC,IAAA,EAAK,MAAA;AAAA,MACL,IAAA;AAAA,MACA,QAAA,EAAU,EAAA;AAAA,MACV,YAAA,EAAa,cAAA;AAAA,MACb,aAAA,EAAY,MAAA;AAAA,MACZ,KAAA,EAAK,IAAA;AAAA,MACL,kBAAA,EAAiB,EAAA;AAAA,MAGjB,gBAAA,EAAe,EAAA;AAAA,MACf,eAAA,EAAc,MAAA;AAAA,MACd,gBAAA,EAAe,OAAA;AAAA,MACf,eAAA,EAAc,EAAA;AAAA,MACd,KAAA,EAAO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AY,KAAA,EAAO,MAAA,CAAQ,YAAA,EAAc,QAAA,EAAQ,IAAA,EAAC,CAAA;AAAA,IAC3E,QAAA,mBAAWA,GAAAA,CAAC,OAAA,EAAA,EAAM,IAAA,EAAK,QAAA,EAAS,IAAA,EAAK,YAAA,EAAa,KAAA,EAAO,QAAA,EAAU,QAAA,EAAQ,IAAA,EAAC,CAAA,GAAK;AAAA,GAAA,EACpF,CAAA;AAEJ","file":"chunk-ZRD75SE5.mjs","sourcesContent":["/**\n * Single source of truth for the honeypot input — rendered by BOTH form\n * experiences (classic and stage) inside their <form>. The customRender path\n * deliberately gets none (documented limitation: custom renders lose the\n * honeypot, which is why alternate experiences must be render branches).\n *\n * Invariants (do not weaken any of these):\n * - `inert` blocks focus/interaction at the browser level, surviving hostile\n * site CSS that could defeat the inline styles.\n * - data-sk-honeypot gives site CSS a stable opt-OUT hook.\n * - Controlled input: bots filling via JS still fire React onChange, so the\n * value reaches submitForm's data payload.\n * - Name comes from config (`honeypot_field || DEFAULT_HONEYPOT_FIELD` from\n * the shared contract) — resolved by the caller, never forked here.\n * - The trap must be invisible to AUTOFILL as well as to people. A browser or\n * password manager filling a hidden input flags a real visitor as a bot, and\n * because the value is stripped server-side the mistake is undiagnosable\n * after the fact. `autocomplete=\"off\"` does not achieve this — it is the one\n * value Chrome deliberately ignores for contact/address autofill — so the\n * trap declares `new-password` (never offered saved contact data) plus the\n * documented per-manager opt-outs.\n */\n\nimport React from 'react'\n\nexport interface HoneypotFieldProps {\n name: string\n value?: string\n /**\n * Omit for STATIC mode — an uncontrolled trap a Server Component can render.\n * The trap's whole job is server-side (the value is read off the submission\n * and stripped), so it needs no client state to work; the controlled form is\n * only so the hydrated JSON path can read it back out of React state.\n */\n onChange?: (value: string) => void\n}\n\nexport function HoneypotField({ name, value, onChange }: HoneypotFieldProps) {\n const interactive = typeof onChange === 'function'\n return (\n <input\n type=\"text\"\n name={name}\n tabIndex={-1}\n autoComplete=\"new-password\"\n aria-hidden=\"true\"\n inert\n data-sk-honeypot=\"\"\n // Password-manager opt-outs: 1Password, LastPass, Dashlane, Bitwarden.\n // Each ignores its own attribute; none respects autocomplete alone.\n data-1p-ignore=\"\"\n data-lpignore=\"true\"\n data-form-type=\"other\"\n data-bwignore=\"\"\n style={{\n position: 'absolute',\n left: -9999,\n width: 1,\n height: 1,\n overflow: 'hidden',\n opacity: 0,\n visibility: 'hidden',\n pointerEvents: 'none',\n }}\n {...(interactive\n ? {\n value: value ?? '',\n onChange: (e: React.ChangeEvent<HTMLInputElement>) => {\n onChange!(e.target.value)\n if (e.target.value) {\n // Bot detected\n console.warn('[Forms] Honeypot triggered')\n }\n },\n }\n : { defaultValue: '' })}\n />\n )\n}\n","'use client'\n\n/**\n * No-JS native submission fallback — the floor under every managed form.\n *\n * The classic form is the SSR/no-JS surface (experiences are post-hydration\n * chunks), so it alone carries a real `action`/`method` pointing at\n * sonor-api's POST /api/public/forms/submit-native. With JS running, the\n * form's onSubmit preventDefault()s and the JSON path wins; without JS the\n * browser performs an ordinary form-encoded POST and the lead still lands.\n *\n * Auth rides in the hidden `_sk_token` field: a signed, single-purpose\n * credential minted by the api-key-authenticated forms/config endpoint\n * (`native_token` in the response). No token in the config (older API, or no\n * signing secret) means no fallback — the form keeps its historical behavior\n * rather than pointing at an endpoint that will reject it.\n *\n * Multi-step forms are excluded: step navigation is JS, and a native POST of\n * step-1 fields alone fails whole-form validation server-side. Single-step\n * forms are the overwhelming lead-capture case.\n *\n * Single source of truth for the gating — the form attrs and the hidden\n * fields must always agree, so both read the same predicate.\n */\n\nimport React from 'react'\nimport type { ManagedFormConfig } from './types'\nimport { getApiConfig } from './submitForm'\n\nfunction nativeEligible(config: ManagedFormConfig | null | undefined): boolean {\n return !!config?.native_token && !config.is_multi_step\n}\n\n/** `action`/`method` for the classic <form> — empty when ineligible. */\nexport function nativeFormProps(\n config: ManagedFormConfig | null | undefined,\n): { action?: string; method?: 'post' } {\n if (!nativeEligible(config)) return {}\n const { apiUrl } = getApiConfig()\n return { action: `${apiUrl}/api/public/forms/submit-native`, method: 'post' }\n}\n\nexport interface NativeFallbackFieldsProps {\n config: ManagedFormConfig | null | undefined\n /**\n * Absolute URL the native 303 should land on (usually the page hosting the\n * form). Optional — without it the server falls back to the Referer origin,\n * which loses the path but still returns the visitor to the right site.\n */\n returnTo?: string\n}\n\n/** Hidden control fields the native endpoint reads (`_sk_*` namespace). */\nexport function NativeFallbackFields({ config, returnTo }: NativeFallbackFieldsProps) {\n if (!nativeEligible(config)) return null\n return (\n <>\n <input type=\"hidden\" name=\"_sk_token\" value={config!.native_token} readOnly />\n {returnTo ? <input type=\"hidden\" name=\"_sk_return\" value={returnTo} readOnly /> : null}\n </>\n )\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { isTokenMode, getFreshCredential, isSiteToken, refreshSiteToken, currentCredential, credentialBreakerId } from './chunk-GYKFHQSZ.mjs';
2
- import { SITE_KIT_VERSION } from './chunk-5FBALULE.mjs';
1
+ import { isTokenMode, getFreshCredential, isSiteToken, refreshSiteToken, currentCredential, credentialBreakerId } from './chunk-TBAP7JNJ.mjs';
2
+ import { SITE_KIT_VERSION } from './chunk-SIHPFJ6C.mjs';
3
3
 
4
4
  // src/shared/fetchWithRetry.ts
5
5
  function backoffDelay(attempt, response) {
@@ -127,5 +127,5 @@ function sonorBeacon(url, payload, apiKey) {
127
127
  }
128
128
 
129
129
  export { sonorBeacon, sonorFetch };
130
- //# sourceMappingURL=chunk-CI7T4ZRP.mjs.map
131
- //# sourceMappingURL=chunk-CI7T4ZRP.mjs.map
130
+ //# sourceMappingURL=chunk-ZZ6P27A5.mjs.map
131
+ //# sourceMappingURL=chunk-ZZ6P27A5.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/shared/fetchWithRetry.ts","../src/shared/sonorFetch.ts"],"names":[],"mappings":";;;;AAsBA,SAAS,YAAA,CAAa,SAAiB,QAAA,EAA6B;AAElE,EAAA,IAAI,QAAA,EAAU,WAAW,GAAA,EAAK;AA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EAAgB,kBAAA;AAAA,QAChB,mBAAA,EAAqB,gBAAA;AAAA,QACrB,GAAI,UAAA,GAAa,EAAE,WAAA,EAAa,UAAA,KAAe;AAAC,OAClD;AAAA,MACA;AAAA,KACD,CAAA,CAAE,KAAA,CAAM,MAAM;AAAA,IAEf,CAAC,CAAA;AAAA,EACH,CAAA,CAAA,MAAQ;AACN,IAAA,IAAI;AACF,MAAA,IAAI,OAAO,SAAA,KAAc,WAAA,IAAe,SAAA,CAAU,UAAA,EAAY;AAC5D,QAAA,SAAA,CAAU,UAAA,CAAW,GAAA,EAAK,IAAI,IAAA,CAAK,CAAC,IAAI,CAAA,EAAG,EAAE,IAAA,EAAM,kBAAA,EAAoB,CAAC,CAAA;AAAA,MAC1E;AAAA,IACF,CAAA,CAAA,MAAQ;AAAA,IAER;AAAA,EACF;AACF","file":"chunk-CI7T4ZRP.mjs","sourcesContent":["/**\n * @sonordev/site-kit shared - Resilient fetch\n *\n * Single source of truth for client-side resilient fetch (forms, SitemapSync).\n * Adds a per-attempt timeout and retries transient failures (network errors,\n * request timeouts, HTTP 429, and 5xx) with exponential backoff.\n *\n * A form submission must survive a brief API blip — a deploy, a cold start, a\n * dropped packet. A single un-retried fetch turning into \"Something went wrong\"\n * is how leads get lost. The explicit abort also matters on its own: a request\n * left to hang until the browser's own network timeout logs a console error\n * (net::ERR_TIMED_OUT) that fails Lighthouse best-practices; an aborted fetch\n * logs nothing.\n */\n\nexport interface FetchRetryOptions {\n /** Number of retries AFTER the first attempt (default 2 → up to 3 tries total). */\n retries?: number\n /** Per-attempt timeout in milliseconds (default 15000). */\n timeoutMs?: number\n}\n\nfunction backoffDelay(attempt: number, response?: Response): number {\n // Honor a Retry-After header on 429 responses when present.\n if (response?.status === 429) {\n const header = response.headers.get('retry-after')\n const seconds = header ? parseInt(header, 10) : NaN\n if (!Number.isNaN(seconds) && seconds > 0) return Math.min(seconds * 1000, 10000)\n }\n // Exponential backoff: 500ms, 1s, 2s, ... capped at 8s.\n return Math.min(8000, 500 * 2 ** attempt)\n}\n\n/**\n * fetch() with a timeout and automatic retries for transient failures.\n *\n * Non-transient responses (2xx, 3xx, and 4xx other than 429) are returned to\n * the caller as-is — only 429/5xx and thrown network/timeout errors are retried.\n * If every attempt fails with a thrown error, the last error is re-thrown.\n */\nexport async function fetchWithRetry(\n url: string,\n init: RequestInit,\n options: FetchRetryOptions = {},\n): Promise<Response> {\n const retries = options.retries ?? 2\n const timeoutMs = options.timeoutMs ?? 15000\n let lastError: unknown\n\n for (let attempt = 0; attempt <= retries; attempt++) {\n const controller = new AbortController()\n const timer = setTimeout(() => controller.abort(), timeoutMs)\n try {\n const response = await fetch(url, { ...init, signal: controller.signal })\n clearTimeout(timer)\n\n if ((response.status === 429 || response.status >= 500) && attempt < retries) {\n await new Promise((resolve) => setTimeout(resolve, backoffDelay(attempt, response)))\n continue\n }\n return response\n } catch (error) {\n clearTimeout(timer)\n lastError = error\n // Network failure or timeout (AbortController) — retry while attempts remain.\n if (attempt < retries) {\n await new Promise((resolve) => setTimeout(resolve, backoffDelay(attempt)))\n continue\n }\n }\n }\n\n throw lastError instanceof Error\n ? lastError\n : new Error('Network request failed after multiple attempts. Please try again.')\n}\n","/**\n * @sonordev/site-kit shared - Canonical client transport\n *\n * Single source of truth for how site-kit talks to Sonor from the browser.\n * Every client-side module (analytics, forms, commerce, engage, maps, images,\n * SitemapSync) routes through here instead of bare fetch(), which gives the\n * whole kit, in one place:\n *\n * - per-attempt timeout + retry with backoff (via fetchWithRetry) — a hung\n * request left to the browser's own network timeout logs a console error\n * (net::ERR_TIMED_OUT) that fails Lighthouse best-practices\n * - the x-sitekit-version header on every request, so the platform can see\n * which kit version each site actually runs from live traffic\n * - CREDENTIAL LIFECYCLE: sites on 3.2+ ship a short-lived minted token instead\n * of the raw key. This transport resolves the freshest token (refreshing a\n * stale seed transparently), and on a 401/403 for a token it refreshes once\n * and retries before giving up. A raw key (2.x kit, or the mint-failed\n * fallback) is a pure passthrough — legacy behavior is unchanged.\n * - an auth circuit breaker: after a 401/403 the credential is paused for a few\n * minutes and ONE friendly console.info is emitted — a site on a stale or\n * canceled key must not spam the API or the visitor's console. Keyed by the\n * project (from the token) so it survives token rotation.\n * - sonorBeacon for unload-time telemetry that keeps the credential in headers;\n * navigator.sendBeacon can't set headers and forced the key into the URL,\n * where server and CDN access logs capture it\n *\n * Non-idempotent endpoints (checkout, payment intents, uploads) must pass\n * { retries: 0 } — they still get the timeout, but never an automatic retry.\n */\nimport { fetchWithRetry, type FetchRetryOptions } from './fetchWithRetry'\nimport { SITE_KIT_VERSION } from './version'\nimport {\n credentialBreakerId,\n currentCredential,\n getFreshCredential,\n isSiteToken,\n isTokenMode,\n refreshSiteToken,\n} from './siteToken'\n\nexport interface SonorFetchOptions extends FetchRetryOptions {\n /** Project credential — the minted token (3.2+) or raw key. Sent as x-api-key. */\n apiKey?: string\n}\n\n/** How long a credential stays paused after an auth failure. */\nconst AUTH_BREAK_MS = 5 * 60_000\n\n// breaker id → epoch ms until which requests are paused. Shared on window for\n// the same reason as the token state (see siteToken.ts): duplicated module\n// copies must trip and observe ONE breaker, not one each. Never applies on the\n// server, so a per-module Map there is fine.\nconst BREAKER_STATE_KEY = '__SONOR_AUTH_BREAKER__'\nconst pausedKeys: Map<string, number> = (() => {\n if (typeof window === 'undefined') return new Map()\n const w = window as unknown as Record<string, Map<string, number> | undefined>\n return (w[BREAKER_STATE_KEY] ??= new Map())\n})()\nlet warnedThisPage = false\n\n/** True when a previous 401/403 has paused this credential (browser only). */\nexport function isAuthPaused(credential?: string): boolean {\n if (typeof window === 'undefined') return false\n const id = credentialBreakerId(credential)\n const until = pausedKeys.get(id)\n if (!until) return false\n if (Date.now() >= until) {\n pausedKeys.delete(id)\n return false\n }\n return true\n}\n\nfunction tripBreaker(credential?: string): void {\n pausedKeys.set(credentialBreakerId(credential), Date.now() + AUTH_BREAK_MS)\n if (!warnedThisPage) {\n warnedThisPage = true\n // info, not error: a visitor's console must stay clean (Lighthouse\n // errors-in-console), and copy never names env vars or key formats.\n console.info(\n \"[Sonor] This site couldn't authenticate with Sonor, so data features are paused for a few minutes. If this keeps happening, the site is likely running an outdated API key.\",\n )\n }\n}\n\nexport async function sonorFetch(\n url: string,\n init: RequestInit = {},\n options: SonorFetchOptions = {},\n): Promise<Response> {\n // Resolve the credential to send. In token mode this may transparently refresh\n // a stale seed before the first request; in raw-key mode it's a passthrough.\n let credential = options.apiKey\n if (credential !== undefined || isTokenMode()) {\n credential = await getFreshCredential(options.apiKey)\n }\n\n const headers = new Headers(init.headers || {})\n headers.set('x-sitekit-version', SITE_KIT_VERSION)\n if (credential) {\n if (isTokenMode()) {\n // Token mode: `credential` is the freshest token (refreshed just above if\n // the seed was stale). It MUST override any x-api-key a caller hand-set — a\n // stale build-time seed passed as a header would otherwise pin the request\n // and defeat refresh entirely. Also drop a caller-set Authorization:\n // extractApiKey() server-side prefers `Authorization: Bearer` over\n // x-api-key, so a stale Bearer seed would win even once we set a fresh\n // x-api-key. This is the single place the client credential is chosen — do\n // not re-attach it as a header at call sites.\n headers.set('x-api-key', credential)\n headers.delete('authorization')\n } else if (!headers.has('x-api-key')) {\n // Raw-key mode: legacy passthrough — respect a caller-supplied header.\n headers.set('x-api-key', credential)\n }\n }\n\n if (isAuthPaused(credential)) {\n // Synthetic response keeps every caller's !response.ok path working\n // without a network round trip while the breaker is open.\n return new Response(null, { status: 401, statusText: 'sonor-auth-paused' })\n }\n\n let response = await fetchWithRetry(url, { ...init, headers }, options)\n\n // A token can rotate or expire mid-session. On the first auth failure, try ONE\n // refresh + retry before tripping the breaker — only for token credentials\n // (raw keys have nothing to refresh).\n if (\n (response.status === 401 || response.status === 403) &&\n typeof window !== 'undefined' &&\n isSiteToken(credential)\n ) {\n const refreshed = await refreshSiteToken()\n if (refreshed && refreshed !== credential) {\n const retryHeaders = new Headers(init.headers || {})\n retryHeaders.set('x-sitekit-version', SITE_KIT_VERSION)\n retryHeaders.set('x-api-key', refreshed)\n // Same reason as the initial request: a caller-set stale Bearer would win\n // over our fresh x-api-key server-side, so strip it on the retry too.\n retryHeaders.delete('authorization')\n credential = refreshed\n response = await fetchWithRetry(url, { ...init, headers: retryHeaders }, options)\n }\n }\n\n if (\n (response.status === 401 || response.status === 403) &&\n typeof window !== 'undefined' &&\n credential\n ) {\n tripBreaker(credential)\n }\n\n return response\n}\n\n/**\n * Fire-and-forget telemetry that survives page unload.\n *\n * Uses fetch({ keepalive: true }) so auth travels in headers. Falls back to\n * navigator.sendBeacon (no auth headers possible — the server may reject it,\n * but we never put the key in the URL) only when keepalive fetch is missing.\n *\n * Cannot await a refresh at unload time, so it sends the freshest token already\n * held (currentCredential) rather than the possibly-stale seed the caller passed.\n */\nexport function sonorBeacon(url: string, payload: unknown, apiKey?: string): void {\n const credential = currentCredential(apiKey)\n const body = typeof payload === 'string' ? payload : JSON.stringify(payload)\n try {\n void fetch(url, {\n method: 'POST',\n keepalive: true,\n headers: {\n 'Content-Type': 'application/json',\n 'x-sitekit-version': SITE_KIT_VERSION,\n ...(credential ? { 'x-api-key': credential } : {}),\n },\n body,\n }).catch(() => {\n /* page is closing — best effort */\n })\n } catch {\n try {\n if (typeof navigator !== 'undefined' && navigator.sendBeacon) {\n navigator.sendBeacon(url, new Blob([body], { type: 'application/json' }))\n }\n } catch {\n /* nothing left to try */\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/shared/fetchWithRetry.ts","../src/shared/sonorFetch.ts"],"names":[],"mappings":";;;;AAsBA,SAAS,YAAA,CAAa,SAAiB,QAAA,EAA6B;AAElE,EAAA,IAAI,QAAA,EAAU,WAAW,GAAA,EAAK;AAC5B,IAAA,MAAM,MAAA,GAAS,QAAA,CAAS,OAAA,CAAQ,GAAA,CAAI,aAAa,CAAA;AACjD,IAAA,MAAM,OAAA,GAAU,MAAA,GAAS,QAAA,CAAS,MAAA,EAAQ,EAAE,CAAA,GAAI,GAAA;AAChD,IAAA,IAAI,CAAC,MAAA,CAAO,KAAA,CAAM,OAAO,CAAA,I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IAAA,IAAI;AACF,MAAA,IAAI,OAAO,SAAA,KAAc,WAAA,IAAe,SAAA,CAAU,UAAA,EAAY;AAC5D,QAAA,SAAA,CAAU,UAAA,CAAW,GAAA,EAAK,IAAI,IAAA,CAAK,CAAC,IAAI,CAAA,EAAG,EAAE,IAAA,EAAM,kBAAA,EAAoB,CAAC,CAAA;AAAA,MAC1E;AAAA,IACF,CAAA,CAAA,MAAQ;AAAA,IAER;AAAA,EACF;AACF","file":"chunk-ZZ6P27A5.mjs","sourcesContent":["/**\n * @sonordev/site-kit shared - Resilient fetch\n *\n * Single source of truth for client-side resilient fetch (forms, SitemapSync).\n * Adds a per-attempt timeout and retries transient failures (network errors,\n * request timeouts, HTTP 429, and 5xx) with exponential backoff.\n *\n * A form submission must survive a brief API blip — a deploy, a cold start, a\n * dropped packet. A single un-retried fetch turning into \"Something went wrong\"\n * is how leads get lost. The explicit abort also matters on its own: a request\n * left to hang until the browser's own network timeout logs a console error\n * (net::ERR_TIMED_OUT) that fails Lighthouse best-practices; an aborted fetch\n * logs nothing.\n */\n\nexport interface FetchRetryOptions {\n /** Number of retries AFTER the first attempt (default 2 → up to 3 tries total). */\n retries?: number\n /** Per-attempt timeout in milliseconds (default 15000). */\n timeoutMs?: number\n}\n\nfunction backoffDelay(attempt: number, response?: Response): number {\n // Honor a Retry-After header on 429 responses when present.\n if (response?.status === 429) {\n const header = response.headers.get('retry-after')\n const seconds = header ? parseInt(header, 10) : NaN\n if (!Number.isNaN(seconds) && seconds > 0) return Math.min(seconds * 1000, 10000)\n }\n // Exponential backoff: 500ms, 1s, 2s, ... capped at 8s.\n return Math.min(8000, 500 * 2 ** attempt)\n}\n\n/**\n * fetch() with a timeout and automatic retries for transient failures.\n *\n * Non-transient responses (2xx, 3xx, and 4xx other than 429) are returned to\n * the caller as-is — only 429/5xx and thrown network/timeout errors are retried.\n * If every attempt fails with a thrown error, the last error is re-thrown.\n */\nexport async function fetchWithRetry(\n url: string,\n init: RequestInit,\n options: FetchRetryOptions = {},\n): Promise<Response> {\n const retries = options.retries ?? 2\n const timeoutMs = options.timeoutMs ?? 15000\n let lastError: unknown\n\n for (let attempt = 0; attempt <= retries; attempt++) {\n const controller = new AbortController()\n const timer = setTimeout(() => controller.abort(), timeoutMs)\n try {\n const response = await fetch(url, { ...init, signal: controller.signal })\n clearTimeout(timer)\n\n if ((response.status === 429 || response.status >= 500) && attempt < retries) {\n await new Promise((resolve) => setTimeout(resolve, backoffDelay(attempt, response)))\n continue\n }\n return response\n } catch (error) {\n clearTimeout(timer)\n lastError = error\n // Network failure or timeout (AbortController) — retry while attempts remain.\n if (attempt < retries) {\n await new Promise((resolve) => setTimeout(resolve, backoffDelay(attempt)))\n continue\n }\n }\n }\n\n throw lastError instanceof Error\n ? lastError\n : new Error('Network request failed after multiple attempts. Please try again.')\n}\n","/**\n * @sonordev/site-kit shared - Canonical client transport\n *\n * Single source of truth for how site-kit talks to Sonor from the browser.\n * Every client-side module (analytics, forms, commerce, engage, maps, images,\n * SitemapSync) routes through here instead of bare fetch(), which gives the\n * whole kit, in one place:\n *\n * - per-attempt timeout + retry with backoff (via fetchWithRetry) — a hung\n * request left to the browser's own network timeout logs a console error\n * (net::ERR_TIMED_OUT) that fails Lighthouse best-practices\n * - the x-sitekit-version header on every request, so the platform can see\n * which kit version each site actually runs from live traffic\n * - CREDENTIAL LIFECYCLE: sites on 3.2+ ship a short-lived minted token instead\n * of the raw key. This transport resolves the freshest token (refreshing a\n * stale seed transparently), and on a 401/403 for a token it refreshes once\n * and retries before giving up. A raw key (2.x kit, or the mint-failed\n * fallback) is a pure passthrough — legacy behavior is unchanged.\n * - an auth circuit breaker: after a 401/403 the credential is paused for a few\n * minutes and ONE friendly console.info is emitted — a site on a stale or\n * canceled key must not spam the API or the visitor's console. Keyed by the\n * project (from the token) so it survives token rotation.\n * - sonorBeacon for unload-time telemetry that keeps the credential in headers;\n * navigator.sendBeacon can't set headers and forced the key into the URL,\n * where server and CDN access logs capture it\n *\n * Non-idempotent endpoints (checkout, payment intents, uploads) must pass\n * { retries: 0 } — they still get the timeout, but never an automatic retry.\n */\nimport { fetchWithRetry, type FetchRetryOptions } from './fetchWithRetry'\nimport { SITE_KIT_VERSION } from './version'\nimport {\n credentialBreakerId,\n currentCredential,\n getFreshCredential,\n isSiteToken,\n isTokenMode,\n refreshSiteToken,\n} from './siteToken'\n\nexport interface SonorFetchOptions extends FetchRetryOptions {\n /** Project credential — the minted token (3.2+) or raw key. Sent as x-api-key. */\n apiKey?: string\n}\n\n/** How long a credential stays paused after an auth failure. */\nconst AUTH_BREAK_MS = 5 * 60_000\n\n// breaker id → epoch ms until which requests are paused. Shared on window for\n// the same reason as the token state (see siteToken.ts): duplicated module\n// copies must trip and observe ONE breaker, not one each. Never applies on the\n// server, so a per-module Map there is fine.\nconst BREAKER_STATE_KEY = '__SONOR_AUTH_BREAKER__'\nconst pausedKeys: Map<string, number> = (() => {\n if (typeof window === 'undefined') return new Map()\n const w = window as unknown as Record<string, Map<string, number> | undefined>\n return (w[BREAKER_STATE_KEY] ??= new Map())\n})()\nlet warnedThisPage = false\n\n/** True when a previous 401/403 has paused this credential (browser only). */\nexport function isAuthPaused(credential?: string): boolean {\n if (typeof window === 'undefined') return false\n const id = credentialBreakerId(credential)\n const until = pausedKeys.get(id)\n if (!until) return false\n if (Date.now() >= until) {\n pausedKeys.delete(id)\n return false\n }\n return true\n}\n\nfunction tripBreaker(credential?: string): void {\n pausedKeys.set(credentialBreakerId(credential), Date.now() + AUTH_BREAK_MS)\n if (!warnedThisPage) {\n warnedThisPage = true\n // info, not error: a visitor's console must stay clean (Lighthouse\n // errors-in-console), and copy never names env vars or key formats.\n console.info(\n \"[Sonor] This site couldn't authenticate with Sonor, so data features are paused for a few minutes. If this keeps happening, the site is likely running an outdated API key.\",\n )\n }\n}\n\nexport async function sonorFetch(\n url: string,\n init: RequestInit = {},\n options: SonorFetchOptions = {},\n): Promise<Response> {\n // Resolve the credential to send. In token mode this may transparently refresh\n // a stale seed before the first request; in raw-key mode it's a passthrough.\n let credential = options.apiKey\n if (credential !== undefined || isTokenMode()) {\n credential = await getFreshCredential(options.apiKey)\n }\n\n const headers = new Headers(init.headers || {})\n headers.set('x-sitekit-version', SITE_KIT_VERSION)\n if (credential) {\n if (isTokenMode()) {\n // Token mode: `credential` is the freshest token (refreshed just above if\n // the seed was stale). It MUST override any x-api-key a caller hand-set — a\n // stale build-time seed passed as a header would otherwise pin the request\n // and defeat refresh entirely. Also drop a caller-set Authorization:\n // extractApiKey() server-side prefers `Authorization: Bearer` over\n // x-api-key, so a stale Bearer seed would win even once we set a fresh\n // x-api-key. This is the single place the client credential is chosen — do\n // not re-attach it as a header at call sites.\n headers.set('x-api-key', credential)\n headers.delete('authorization')\n } else if (!headers.has('x-api-key')) {\n // Raw-key mode: legacy passthrough — respect a caller-supplied header.\n headers.set('x-api-key', credential)\n }\n }\n\n if (isAuthPaused(credential)) {\n // Synthetic response keeps every caller's !response.ok path working\n // without a network round trip while the breaker is open.\n return new Response(null, { status: 401, statusText: 'sonor-auth-paused' })\n }\n\n let response = await fetchWithRetry(url, { ...init, headers }, options)\n\n // A token can rotate or expire mid-session. On the first auth failure, try ONE\n // refresh + retry before tripping the breaker — only for token credentials\n // (raw keys have nothing to refresh).\n if (\n (response.status === 401 || response.status === 403) &&\n typeof window !== 'undefined' &&\n isSiteToken(credential)\n ) {\n const refreshed = await refreshSiteToken()\n if (refreshed && refreshed !== credential) {\n const retryHeaders = new Headers(init.headers || {})\n retryHeaders.set('x-sitekit-version', SITE_KIT_VERSION)\n retryHeaders.set('x-api-key', refreshed)\n // Same reason as the initial request: a caller-set stale Bearer would win\n // over our fresh x-api-key server-side, so strip it on the retry too.\n retryHeaders.delete('authorization')\n credential = refreshed\n response = await fetchWithRetry(url, { ...init, headers: retryHeaders }, options)\n }\n }\n\n if (\n (response.status === 401 || response.status === 403) &&\n typeof window !== 'undefined' &&\n credential\n ) {\n tripBreaker(credential)\n }\n\n return response\n}\n\n/**\n * Fire-and-forget telemetry that survives page unload.\n *\n * Uses fetch({ keepalive: true }) so auth travels in headers. Falls back to\n * navigator.sendBeacon (no auth headers possible — the server may reject it,\n * but we never put the key in the URL) only when keepalive fetch is missing.\n *\n * Cannot await a refresh at unload time, so it sends the freshest token already\n * held (currentCredential) rather than the possibly-stale seed the caller passed.\n */\nexport function sonorBeacon(url: string, payload: unknown, apiKey?: string): void {\n const credential = currentCredential(apiKey)\n const body = typeof payload === 'string' ? payload : JSON.stringify(payload)\n try {\n void fetch(url, {\n method: 'POST',\n keepalive: true,\n headers: {\n 'Content-Type': 'application/json',\n 'x-sitekit-version': SITE_KIT_VERSION,\n ...(credential ? { 'x-api-key': credential } : {}),\n },\n body,\n }).catch(() => {\n /* page is closing — best effort */\n })\n } catch {\n try {\n if (typeof navigator !== 'undefined' && navigator.sendBeacon) {\n navigator.sendBeacon(url, new Blob([body], { type: 'application/json' }))\n }\n } catch {\n /* nothing left to try */\n }\n }\n}\n"]}
package/dist/cli/index.js CHANGED
@@ -8,7 +8,7 @@ var chunkCUNZAD46_js = require('../chunk-CUNZAD46.js');
8
8
  var chunkZUQSVCMD_js = require('../chunk-ZUQSVCMD.js');
9
9
  var chunkY2CP5J6Q_js = require('../chunk-Y2CP5J6Q.js');
10
10
  var chunkJONWE26J_js = require('../chunk-JONWE26J.js');
11
- var chunkOI3FCJSP_js = require('../chunk-OI3FCJSP.js');
11
+ var chunkLGFRHT34_js = require('../chunk-LGFRHT34.js');
12
12
  var chunkSNAQBZPT_js = require('../chunk-SNAQBZPT.js');
13
13
  var events = require('events');
14
14
  var childProcess = require('child_process');
@@ -13545,7 +13545,7 @@ function buildEnvelope(input, nowMs = Date.now()) {
13545
13545
  ok: exitCode === 0 /* OK */,
13546
13546
  command,
13547
13547
  schemaVersion: 1,
13548
- siteKitVersion: chunkOI3FCJSP_js.SITE_KIT_VERSION,
13548
+ siteKitVersion: chunkLGFRHT34_js.SITE_KIT_VERSION,
13549
13549
  exitCode,
13550
13550
  status: statusForCode(exitCode),
13551
13551
  summary,
@@ -32851,7 +32851,7 @@ async function geoCommand(options) {
32851
32851
  (0, import_dotenv2.config)({ path: ".env.local", quiet: true });
32852
32852
  (0, import_dotenv2.config)({ path: ".env", quiet: true });
32853
32853
  var program2 = new Command();
32854
- program2.name("sonor-setup").description("Setup + verification toolchain for @sonordev/site-kit").version(chunkOI3FCJSP_js.SITE_KIT_VERSION);
32854
+ program2.name("sonor-setup").description("Setup + verification toolchain for @sonordev/site-kit").version(chunkLGFRHT34_js.SITE_KIT_VERSION);
32855
32855
  withAgentFlags(
32856
32856
  program2.command("verify").description("Verify the integration actually works (health + key + SSR) \u2014 exit 0 = done").option("--url <url>", "Verify a running/deployed URL server-renders (recommended for agents)").option("--offline", "Skip the network key-validity ping").option("--strict", "Treat warnings as failures")
32857
32857
  ).action(verifyCommand);
@@ -6,7 +6,7 @@ import { TITLE_MAX_PX, OG_REPORT_ATTR } from '../chunk-YU7QZ3PP.mjs';
6
6
  import { require_main } from '../chunk-RH4XEXTK.mjs';
7
7
  import { findAppDirForDiscovery, NEXT_PROXY_FILES, NEXT_MIDDLEWARE_FILES, findConventionFile, NEXT_APP_DIRS, findSitemapRoute, findProxyFiles, findNextConfig, findRootLayout, discoverNextJsRoutes, hasPageFile, NEXT_SOURCE_EXTENSIONS } from '../chunk-UHYRVALN.mjs';
8
8
  import { applyTrailingSlash } from '../chunk-C2CTLLIO.mjs';
9
- import { SITE_KIT_VERSION } from '../chunk-5FBALULE.mjs';
9
+ import { SITE_KIT_VERSION } from '../chunk-SIHPFJ6C.mjs';
10
10
  import { __commonJS, __require, __toESM, __export, __privateAdd, __publicField, __privateGet, __privateMethod, __privateSet, __privateWrapper } from '../chunk-BEXTDHO4.mjs';
11
11
  import { EventEmitter } from 'events';
12
12
  import childProcess, { execFile as execFile$1, execSync, spawnSync, spawn } from 'child_process';
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  'use strict';
3
3
 
4
- var chunkAGEE4CGH_js = require('../chunk-AGEE4CGH.js');
4
+ var chunkOASA6M53_js = require('../chunk-OASA6M53.js');
5
5
  var chunkHGNSJXWT_js = require('../chunk-HGNSJXWT.js');
6
6
  require('../chunk-UZKXOZHR.js');
7
7
  require('../chunk-SWIKKSKL.js');
@@ -9,8 +9,8 @@ var chunk3DWIYCQX_js = require('../chunk-3DWIYCQX.js');
9
9
  var chunkG6WF4G3E_js = require('../chunk-G6WF4G3E.js');
10
10
  var chunkRC4WWQXR_js = require('../chunk-RC4WWQXR.js');
11
11
  require('../chunk-VJMPIRSD.js');
12
- require('../chunk-BGBP4UN4.js');
13
- require('../chunk-OI3FCJSP.js');
12
+ require('../chunk-T742S2CY.js');
13
+ require('../chunk-LGFRHT34.js');
14
14
  require('../chunk-SNAQBZPT.js');
15
15
 
16
16
  // src/client/SiteKitCredential.tsx
@@ -20,7 +20,7 @@ function SiteKitCredential({
20
20
  site,
21
21
  debug
22
22
  }) {
23
- chunkAGEE4CGH_js.publishSiteCredential({ apiKey, apiUrl, site, debug });
23
+ chunkOASA6M53_js.publishSiteCredential({ apiKey, apiUrl, site, debug });
24
24
  return null;
25
25
  }
26
26
 
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { publishSiteCredential } from '../chunk-I4PUQYBI.mjs';
2
+ import { publishSiteCredential } from '../chunk-JOSSKN4J.mjs';
3
3
  export { useDeferredActivation } from '../chunk-ZVBLXXNJ.mjs';
4
4
  import '../chunk-KZVSB5WE.mjs';
5
5
  import '../chunk-ZN4HBK5C.mjs';
@@ -7,8 +7,8 @@ export { trackConversion, trackEvent } from '../chunk-SHLWA6JY.mjs';
7
7
  export { VISUAL_VIEWPORT_GAP_PROPERTY, VisualViewportGap, useVisualViewportGap } from '../chunk-NSWO43XW.mjs';
8
8
  export { getOrCreateSessionId, getOrCreateVisitorId, useSiteKitIdentity } from '../chunk-ZZQAGCSI.mjs';
9
9
  import '../chunk-6EDVCUAG.mjs';
10
- import '../chunk-GYKFHQSZ.mjs';
11
- import '../chunk-5FBALULE.mjs';
10
+ import '../chunk-TBAP7JNJ.mjs';
11
+ import '../chunk-SIHPFJ6C.mjs';
12
12
  import '../chunk-BEXTDHO4.mjs';
13
13
 
14
14
  // src/client/SiteKitCredential.tsx
@@ -1,228 +1,228 @@
1
1
  'use client';
2
2
  'use strict';
3
3
 
4
- var chunkJSM4AYSZ_js = require('../chunk-JSM4AYSZ.js');
4
+ var chunkIPLOSM5F_js = require('../chunk-IPLOSM5F.js');
5
5
  require('../chunk-3SDMJMN2.js');
6
- require('../chunk-MTHMOXZF.js');
6
+ require('../chunk-5L46GS7N.js');
7
7
  require('../chunk-3DWIYCQX.js');
8
8
  require('../chunk-RC4WWQXR.js');
9
9
  require('../chunk-P4Y75QSU.js');
10
10
  require('../chunk-VJMPIRSD.js');
11
11
  require('../chunk-5RNAUYWE.js');
12
- require('../chunk-IWHAJBYL.js');
13
- require('../chunk-BGBP4UN4.js');
14
- require('../chunk-OI3FCJSP.js');
12
+ require('../chunk-3NDDCSWR.js');
13
+ require('../chunk-T742S2CY.js');
14
+ require('../chunk-LGFRHT34.js');
15
15
  require('../chunk-SNAQBZPT.js');
16
16
 
17
17
 
18
18
 
19
19
  Object.defineProperty(exports, "CalendarView", {
20
20
  enumerable: true,
21
- get: function () { return chunkJSM4AYSZ_js.CalendarView; }
21
+ get: function () { return chunkIPLOSM5F_js.CalendarView; }
22
22
  });
23
23
  Object.defineProperty(exports, "CapacityBadge", {
24
24
  enumerable: true,
25
- get: function () { return chunkJSM4AYSZ_js.CapacityBadge; }
25
+ get: function () { return chunkIPLOSM5F_js.CapacityBadge; }
26
26
  });
27
27
  Object.defineProperty(exports, "CheckoutForm", {
28
28
  enumerable: true,
29
- get: function () { return chunkJSM4AYSZ_js.CheckoutForm; }
29
+ get: function () { return chunkIPLOSM5F_js.CheckoutForm; }
30
30
  });
31
31
  Object.defineProperty(exports, "EventCalendar", {
32
32
  enumerable: true,
33
- get: function () { return chunkJSM4AYSZ_js.EventCalendar; }
33
+ get: function () { return chunkIPLOSM5F_js.EventCalendar; }
34
34
  });
35
35
  Object.defineProperty(exports, "EventCheckout", {
36
36
  enumerable: true,
37
- get: function () { return chunkJSM4AYSZ_js.EventCheckout; }
37
+ get: function () { return chunkIPLOSM5F_js.EventCheckout; }
38
38
  });
39
39
  Object.defineProperty(exports, "EventEmbed", {
40
40
  enumerable: true,
41
- get: function () { return chunkJSM4AYSZ_js.EventEmbed; }
41
+ get: function () { return chunkIPLOSM5F_js.EventEmbed; }
42
42
  });
43
43
  Object.defineProperty(exports, "EventJsonLd", {
44
44
  enumerable: true,
45
- get: function () { return chunkJSM4AYSZ_js.EventJsonLd; }
45
+ get: function () { return chunkIPLOSM5F_js.EventJsonLd; }
46
46
  });
47
47
  Object.defineProperty(exports, "EventModal", {
48
48
  enumerable: true,
49
- get: function () { return chunkJSM4AYSZ_js.EventModal; }
49
+ get: function () { return chunkIPLOSM5F_js.EventModal; }
50
50
  });
51
51
  Object.defineProperty(exports, "EventTile", {
52
52
  enumerable: true,
53
- get: function () { return chunkJSM4AYSZ_js.EventTile; }
53
+ get: function () { return chunkIPLOSM5F_js.EventTile; }
54
54
  });
55
55
  Object.defineProperty(exports, "EventsAgenda", {
56
56
  enumerable: true,
57
- get: function () { return chunkJSM4AYSZ_js.EventsAgenda; }
57
+ get: function () { return chunkIPLOSM5F_js.EventsAgenda; }
58
58
  });
59
59
  Object.defineProperty(exports, "EventsWidget", {
60
60
  enumerable: true,
61
- get: function () { return chunkJSM4AYSZ_js.EventsWidget; }
61
+ get: function () { return chunkIPLOSM5F_js.EventsWidget; }
62
62
  });
63
63
  Object.defineProperty(exports, "OfferingCard", {
64
64
  enumerable: true,
65
- get: function () { return chunkJSM4AYSZ_js.OfferingCard; }
65
+ get: function () { return chunkIPLOSM5F_js.OfferingCard; }
66
66
  });
67
67
  Object.defineProperty(exports, "OfferingList", {
68
68
  enumerable: true,
69
- get: function () { return chunkJSM4AYSZ_js.OfferingList; }
69
+ get: function () { return chunkIPLOSM5F_js.OfferingList; }
70
70
  });
71
71
  Object.defineProperty(exports, "ProductDetail", {
72
72
  enumerable: true,
73
- get: function () { return chunkJSM4AYSZ_js.ProductDetail; }
73
+ get: function () { return chunkIPLOSM5F_js.ProductDetail; }
74
74
  });
75
75
  Object.defineProperty(exports, "ProductEmbed", {
76
76
  enumerable: true,
77
- get: function () { return chunkJSM4AYSZ_js.ProductEmbed; }
77
+ get: function () { return chunkIPLOSM5F_js.ProductEmbed; }
78
78
  });
79
79
  Object.defineProperty(exports, "ProductGrid", {
80
80
  enumerable: true,
81
- get: function () { return chunkJSM4AYSZ_js.ProductGrid; }
81
+ get: function () { return chunkIPLOSM5F_js.ProductGrid; }
82
82
  });
83
83
  Object.defineProperty(exports, "ProductPage", {
84
84
  enumerable: true,
85
- get: function () { return chunkJSM4AYSZ_js.ProductPage; }
85
+ get: function () { return chunkIPLOSM5F_js.ProductPage; }
86
86
  });
87
87
  Object.defineProperty(exports, "RegistrationForm", {
88
88
  enumerable: true,
89
- get: function () { return chunkJSM4AYSZ_js.RegistrationForm; }
89
+ get: function () { return chunkIPLOSM5F_js.RegistrationForm; }
90
90
  });
91
91
  Object.defineProperty(exports, "SizeChart", {
92
92
  enumerable: true,
93
- get: function () { return chunkJSM4AYSZ_js.SizeChart; }
93
+ get: function () { return chunkIPLOSM5F_js.SizeChart; }
94
94
  });
95
95
  Object.defineProperty(exports, "UpcomingEvents", {
96
96
  enumerable: true,
97
- get: function () { return chunkJSM4AYSZ_js.UpcomingEvents; }
97
+ get: function () { return chunkIPLOSM5F_js.UpcomingEvents; }
98
98
  });
99
99
  Object.defineProperty(exports, "createCheckoutSession", {
100
100
  enumerable: true,
101
- get: function () { return chunkJSM4AYSZ_js.createCheckoutSession; }
101
+ get: function () { return chunkIPLOSM5F_js.createCheckoutSession; }
102
102
  });
103
103
  Object.defineProperty(exports, "createPaymentIntent", {
104
104
  enumerable: true,
105
- get: function () { return chunkJSM4AYSZ_js.createPaymentIntent; }
105
+ get: function () { return chunkIPLOSM5F_js.createPaymentIntent; }
106
106
  });
107
107
  Object.defineProperty(exports, "fetchActiveProcessor", {
108
108
  enumerable: true,
109
- get: function () { return chunkJSM4AYSZ_js.fetchActiveProcessor; }
109
+ get: function () { return chunkIPLOSM5F_js.fetchActiveProcessor; }
110
110
  });
111
111
  Object.defineProperty(exports, "fetchCategories", {
112
112
  enumerable: true,
113
- get: function () { return chunkJSM4AYSZ_js.fetchCategories; }
113
+ get: function () { return chunkIPLOSM5F_js.fetchCategories; }
114
114
  });
115
115
  Object.defineProperty(exports, "fetchLatestOffering", {
116
116
  enumerable: true,
117
- get: function () { return chunkJSM4AYSZ_js.fetchLatestOffering; }
117
+ get: function () { return chunkIPLOSM5F_js.fetchLatestOffering; }
118
118
  });
119
119
  Object.defineProperty(exports, "fetchNextEvent", {
120
120
  enumerable: true,
121
- get: function () { return chunkJSM4AYSZ_js.fetchNextEvent; }
121
+ get: function () { return chunkIPLOSM5F_js.fetchNextEvent; }
122
122
  });
123
123
  Object.defineProperty(exports, "fetchOffering", {
124
124
  enumerable: true,
125
- get: function () { return chunkJSM4AYSZ_js.fetchOffering; }
125
+ get: function () { return chunkIPLOSM5F_js.fetchOffering; }
126
126
  });
127
127
  Object.defineProperty(exports, "fetchOfferings", {
128
128
  enumerable: true,
129
- get: function () { return chunkJSM4AYSZ_js.fetchOfferings; }
129
+ get: function () { return chunkIPLOSM5F_js.fetchOfferings; }
130
130
  });
131
131
  Object.defineProperty(exports, "fetchProcessorConfig", {
132
132
  enumerable: true,
133
- get: function () { return chunkJSM4AYSZ_js.fetchProcessorConfig; }
133
+ get: function () { return chunkIPLOSM5F_js.fetchProcessorConfig; }
134
134
  });
135
135
  Object.defineProperty(exports, "fetchProductBySlug", {
136
136
  enumerable: true,
137
- get: function () { return chunkJSM4AYSZ_js.fetchProductBySlug; }
137
+ get: function () { return chunkIPLOSM5F_js.fetchProductBySlug; }
138
138
  });
139
139
  Object.defineProperty(exports, "fetchProducts", {
140
140
  enumerable: true,
141
- get: function () { return chunkJSM4AYSZ_js.fetchProducts; }
141
+ get: function () { return chunkIPLOSM5F_js.fetchProducts; }
142
142
  });
143
143
  Object.defineProperty(exports, "fetchProductsPublic", {
144
144
  enumerable: true,
145
- get: function () { return chunkJSM4AYSZ_js.fetchProductsPublic; }
145
+ get: function () { return chunkIPLOSM5F_js.fetchProductsPublic; }
146
146
  });
147
147
  Object.defineProperty(exports, "fetchServices", {
148
148
  enumerable: true,
149
- get: function () { return chunkJSM4AYSZ_js.fetchServices; }
149
+ get: function () { return chunkIPLOSM5F_js.fetchServices; }
150
150
  });
151
151
  Object.defineProperty(exports, "fetchShippingRates", {
152
152
  enumerable: true,
153
- get: function () { return chunkJSM4AYSZ_js.fetchShippingRates; }
153
+ get: function () { return chunkIPLOSM5F_js.fetchShippingRates; }
154
154
  });
155
155
  Object.defineProperty(exports, "fetchUpcomingEvents", {
156
156
  enumerable: true,
157
- get: function () { return chunkJSM4AYSZ_js.fetchUpcomingEvents; }
157
+ get: function () { return chunkIPLOSM5F_js.fetchUpcomingEvents; }
158
158
  });
159
159
  Object.defineProperty(exports, "formatDate", {
160
160
  enumerable: true,
161
- get: function () { return chunkJSM4AYSZ_js.formatDate; }
161
+ get: function () { return chunkIPLOSM5F_js.formatDate; }
162
162
  });
163
163
  Object.defineProperty(exports, "formatDateRange", {
164
164
  enumerable: true,
165
- get: function () { return chunkJSM4AYSZ_js.formatDateRange; }
165
+ get: function () { return chunkIPLOSM5F_js.formatDateRange; }
166
166
  });
167
167
  Object.defineProperty(exports, "formatDateTime", {
168
168
  enumerable: true,
169
- get: function () { return chunkJSM4AYSZ_js.formatDateTime; }
169
+ get: function () { return chunkIPLOSM5F_js.formatDateTime; }
170
170
  });
171
171
  Object.defineProperty(exports, "formatPrice", {
172
172
  enumerable: true,
173
- get: function () { return chunkJSM4AYSZ_js.formatPrice; }
173
+ get: function () { return chunkIPLOSM5F_js.formatPrice; }
174
174
  });
175
175
  Object.defineProperty(exports, "formatTime", {
176
176
  enumerable: true,
177
- get: function () { return chunkJSM4AYSZ_js.formatTime; }
177
+ get: function () { return chunkIPLOSM5F_js.formatTime; }
178
178
  });
179
179
  Object.defineProperty(exports, "getOfferingUrl", {
180
180
  enumerable: true,
181
- get: function () { return chunkJSM4AYSZ_js.getOfferingUrl; }
181
+ get: function () { return chunkIPLOSM5F_js.getOfferingUrl; }
182
182
  });
183
183
  Object.defineProperty(exports, "getRelativeTimeUntil", {
184
184
  enumerable: true,
185
- get: function () { return chunkJSM4AYSZ_js.getRelativeTimeUntil; }
185
+ get: function () { return chunkIPLOSM5F_js.getRelativeTimeUntil; }
186
186
  });
187
187
  Object.defineProperty(exports, "getSpotsRemaining", {
188
188
  enumerable: true,
189
- get: function () { return chunkJSM4AYSZ_js.getSpotsRemaining; }
189
+ get: function () { return chunkIPLOSM5F_js.getSpotsRemaining; }
190
190
  });
191
191
  Object.defineProperty(exports, "googleCalendarUrl", {
192
192
  enumerable: true,
193
- get: function () { return chunkJSM4AYSZ_js.googleCalendarUrl; }
193
+ get: function () { return chunkIPLOSM5F_js.googleCalendarUrl; }
194
194
  });
195
195
  Object.defineProperty(exports, "icsForEvent", {
196
196
  enumerable: true,
197
- get: function () { return chunkJSM4AYSZ_js.icsForEvent; }
197
+ get: function () { return chunkIPLOSM5F_js.icsForEvent; }
198
198
  });
199
199
  Object.defineProperty(exports, "icsResponse", {
200
200
  enumerable: true,
201
- get: function () { return chunkJSM4AYSZ_js.icsResponse; }
201
+ get: function () { return chunkIPLOSM5F_js.icsResponse; }
202
202
  });
203
203
  Object.defineProperty(exports, "isEventSoldOut", {
204
204
  enumerable: true,
205
- get: function () { return chunkJSM4AYSZ_js.isEventSoldOut; }
205
+ get: function () { return chunkIPLOSM5F_js.isEventSoldOut; }
206
206
  });
207
207
  Object.defineProperty(exports, "registerForEvent", {
208
208
  enumerable: true,
209
- get: function () { return chunkJSM4AYSZ_js.registerForEvent; }
209
+ get: function () { return chunkIPLOSM5F_js.registerForEvent; }
210
210
  });
211
211
  Object.defineProperty(exports, "shippingSelection", {
212
212
  enumerable: true,
213
- get: function () { return chunkJSM4AYSZ_js.shippingSelection; }
213
+ get: function () { return chunkIPLOSM5F_js.shippingSelection; }
214
214
  });
215
215
  Object.defineProperty(exports, "useEventModal", {
216
216
  enumerable: true,
217
- get: function () { return chunkJSM4AYSZ_js.useEventModal; }
217
+ get: function () { return chunkIPLOSM5F_js.useEventModal; }
218
218
  });
219
219
  Object.defineProperty(exports, "validateAddress", {
220
220
  enumerable: true,
221
- get: function () { return chunkJSM4AYSZ_js.validateAddress; }
221
+ get: function () { return chunkIPLOSM5F_js.validateAddress; }
222
222
  });
223
223
  Object.defineProperty(exports, "validateDiscountCode", {
224
224
  enumerable: true,
225
- get: function () { return chunkJSM4AYSZ_js.validateDiscountCode; }
225
+ get: function () { return chunkIPLOSM5F_js.validateDiscountCode; }
226
226
  });
227
227
  //# sourceMappingURL=index.js.map
228
228
  //# sourceMappingURL=index.js.map
@@ -1,15 +1,15 @@
1
1
  'use client';
2
- export { CalendarView, CapacityBadge, CheckoutForm, EventCalendar, EventCheckout, EventEmbed, EventJsonLd, EventModal, EventTile, EventsAgenda, EventsWidget, OfferingCard, OfferingList, ProductDetail, ProductEmbed, ProductGrid, ProductPage, RegistrationForm, SizeChart, UpcomingEvents, createCheckoutSession, createPaymentIntent, fetchActiveProcessor, fetchCategories, fetchLatestOffering, fetchNextEvent, fetchOffering, fetchOfferings, fetchProcessorConfig, fetchProductBySlug, fetchProducts, fetchProductsPublic, fetchServices, fetchShippingRates, fetchUpcomingEvents, formatDate, formatDateRange, formatDateTime, formatPrice, formatTime, getOfferingUrl, getRelativeTimeUntil, getSpotsRemaining, googleCalendarUrl, icsForEvent, icsResponse, isEventSoldOut, registerForEvent, shippingSelection, useEventModal, validateAddress, validateDiscountCode } from '../chunk-YK7SEUFJ.mjs';
2
+ export { CalendarView, CapacityBadge, CheckoutForm, EventCalendar, EventCheckout, EventEmbed, EventJsonLd, EventModal, EventTile, EventsAgenda, EventsWidget, OfferingCard, OfferingList, ProductDetail, ProductEmbed, ProductGrid, ProductPage, RegistrationForm, SizeChart, UpcomingEvents, createCheckoutSession, createPaymentIntent, fetchActiveProcessor, fetchCategories, fetchLatestOffering, fetchNextEvent, fetchOffering, fetchOfferings, fetchProcessorConfig, fetchProductBySlug, fetchProducts, fetchProductsPublic, fetchServices, fetchShippingRates, fetchUpcomingEvents, formatDate, formatDateRange, formatDateTime, formatPrice, formatTime, getOfferingUrl, getRelativeTimeUntil, getSpotsRemaining, googleCalendarUrl, icsForEvent, icsResponse, isEventSoldOut, registerForEvent, shippingSelection, useEventModal, validateAddress, validateDiscountCode } from '../chunk-53OU4TGU.mjs';
3
3
  import '../chunk-64BOVMXG.mjs';
4
- import '../chunk-NRT7MOEO.mjs';
4
+ import '../chunk-RT7XKV6A.mjs';
5
5
  import '../chunk-SHLWA6JY.mjs';
6
6
  import '../chunk-ZZQAGCSI.mjs';
7
7
  import '../chunk-5SANRSX3.mjs';
8
8
  import '../chunk-6EDVCUAG.mjs';
9
9
  import '../chunk-A6UYV475.mjs';
10
- import '../chunk-CI7T4ZRP.mjs';
11
- import '../chunk-GYKFHQSZ.mjs';
12
- import '../chunk-5FBALULE.mjs';
10
+ import '../chunk-ZZ6P27A5.mjs';
11
+ import '../chunk-TBAP7JNJ.mjs';
12
+ import '../chunk-SIHPFJ6C.mjs';
13
13
  import '../chunk-BEXTDHO4.mjs';
14
14
  //# sourceMappingURL=index.mjs.map
15
15
  //# sourceMappingURL=index.mjs.map