@velastack/patterns 0.13.0 → 0.13.2

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 (228) hide show
  1. package/dist/chunks/{_layout-DQhSAhfF.js → _layout-xBzFhszN.js} +36 -20
  2. package/dist/chunks/_layout-xBzFhszN.js.map +1 -0
  3. package/dist/chunks/{_page-C7kGoW7_.js → _page-44USwLXO.js} +2 -3
  4. package/dist/chunks/{_page-C7kGoW7_.js.map → _page-44USwLXO.js.map} +1 -1
  5. package/dist/chunks/{_page-DoPdZgZv.js → _page-Bt37d4uo.js} +2 -3
  6. package/dist/chunks/_page-Bt37d4uo.js.map +1 -0
  7. package/dist/chunks/{_page-B6yd6_Vl.js → _page-DcbEFpyw.js} +2 -3
  8. package/dist/chunks/_page-DcbEFpyw.js.map +1 -0
  9. package/dist/chunks/{auth-pages-jsyDV1GR.js → auth-pages-BW3_yluN.js} +6 -9
  10. package/dist/chunks/{auth-pages-jsyDV1GR.js.map → auth-pages-BW3_yluN.js.map} +1 -1
  11. package/dist/chunks/{collections-DZOuRpvS.js → collections-CFW9ZqUE.js} +5 -7
  12. package/dist/chunks/{collections-DZOuRpvS.js.map → collections-CFW9ZqUE.js.map} +1 -1
  13. package/dist/chunks/{collections-zEoRuILr.js → collections-D-xbHi4M.js} +39 -45
  14. package/dist/chunks/{collections-zEoRuILr.js.map → collections-D-xbHi4M.js.map} +1 -1
  15. package/dist/chunks/{compose-handle-BBlamPfx.js → compose-handle-Da7m6lV_.js} +3 -4
  16. package/dist/chunks/{compose-handle-BBlamPfx.js.map → compose-handle-Da7m6lV_.js.map} +1 -1
  17. package/dist/chunks/{config-target-BgyFkbFL.js → config-target-DJbVHwHl.js} +3 -4
  18. package/dist/chunks/{config-target-BgyFkbFL.js.map → config-target-DJbVHwHl.js.map} +1 -1
  19. package/dist/chunks/{constants-CUv536Rj.js → constants-DpK-r_m5.js} +2 -4
  20. package/dist/chunks/{constants-CUv536Rj.js.map → constants-DpK-r_m5.js.map} +1 -1
  21. package/dist/chunks/{currency.server-DygAf6a1.js → currency.server-BwuXG0a9.js} +9 -11
  22. package/dist/chunks/{currency.server-DygAf6a1.js.map → currency.server-BwuXG0a9.js.map} +1 -1
  23. package/dist/chunks/{dedent-Gq6Krl4n.js → dedent-CCUOcPFW.js} +2 -3
  24. package/dist/chunks/{dedent-Gq6Krl4n.js.map → dedent-CCUOcPFW.js.map} +1 -1
  25. package/dist/chunks/{dispatch-BIvOwbKN.js → dispatch-BxlKS_5v.js} +2 -3
  26. package/dist/chunks/{dispatch-BIvOwbKN.js.map → dispatch-BxlKS_5v.js.map} +1 -1
  27. package/dist/chunks/{env-BugddEjd.js → env-AxyRWcC_.js} +2 -3
  28. package/dist/chunks/{env-BugddEjd.js.map → env-AxyRWcC_.js.map} +1 -1
  29. package/dist/chunks/{env-vars-mnRA0hOe.js → env-vars-CUh4mLM_.js} +2 -3
  30. package/dist/chunks/{env-vars-mnRA0hOe.js.map → env-vars-CUh4mLM_.js.map} +1 -1
  31. package/dist/chunks/{env-vars-XvAeH6u5.js → env-vars-CVn2076k.js} +58 -59
  32. package/dist/chunks/{env-vars-XvAeH6u5.js.map → env-vars-CVn2076k.js.map} +1 -1
  33. package/dist/chunks/{env-vars-Cr4lbMD_.js → env-vars-T3_7JNSg.js} +3 -4
  34. package/dist/chunks/{env-vars-Cr4lbMD_.js.map → env-vars-T3_7JNSg.js.map} +1 -1
  35. package/dist/chunks/{env-vars-file-B_6esJW3.js → env-vars-file-B2zHQZqO.js} +2 -3
  36. package/dist/chunks/{env-vars-file-B_6esJW3.js.map → env-vars-file-B2zHQZqO.js.map} +1 -1
  37. package/dist/chunks/{env.preview-uMRKT5Pc.js → env.preview-C676UTOP.js} +2 -3
  38. package/dist/chunks/{env.preview-uMRKT5Pc.js.map → env.preview-C676UTOP.js.map} +1 -1
  39. package/dist/chunks/{errors-DR3gF_7a.js → errors-DdSUZI8f.js} +2 -3
  40. package/dist/chunks/{errors-DR3gF_7a.js.map → errors-DdSUZI8f.js.map} +1 -1
  41. package/dist/chunks/{format-result-BVoLVknk.js → format-result-CojavkIZ.js} +2 -3
  42. package/dist/chunks/{format-result-BVoLVknk.js.map → format-result-CojavkIZ.js.map} +1 -1
  43. package/dist/chunks/{generate-Cbg-Z3sA.js → generate-BCYvhyF9.js} +62 -63
  44. package/dist/chunks/{generate-Cbg-Z3sA.js.map → generate-BCYvhyF9.js.map} +1 -1
  45. package/dist/chunks/{generate-DyV5R8NP.js → generate-CKuUg3p-.js} +3 -4
  46. package/dist/chunks/{generate-DyV5R8NP.js.map → generate-CKuUg3p-.js.map} +1 -1
  47. package/dist/chunks/{generate-DjuhSibA.js → generate-CY_Ii_bz.js} +61 -64
  48. package/dist/chunks/{generate-DjuhSibA.js.map → generate-CY_Ii_bz.js.map} +1 -1
  49. package/dist/chunks/generate-CuOm66dn.js +57 -0
  50. package/dist/chunks/{generate-BtWZCvuO.js.map → generate-CuOm66dn.js.map} +1 -1
  51. package/dist/chunks/{generate-BrOPb9tW.js → generate-DYq5Oj58.js} +3 -4
  52. package/dist/chunks/{generate-BrOPb9tW.js.map → generate-DYq5Oj58.js.map} +1 -1
  53. package/dist/chunks/{generate-Crdzw45a.js → generate-F4FDWvFo.js} +13 -14
  54. package/dist/chunks/{generate-Crdzw45a.js.map → generate-F4FDWvFo.js.map} +1 -1
  55. package/dist/chunks/{generate-DgZhFNjO.js → generate-oZ1QeqPr.js} +17 -19
  56. package/dist/chunks/{generate-DgZhFNjO.js.map → generate-oZ1QeqPr.js.map} +1 -1
  57. package/dist/chunks/{generate.runtime-ByC9kOl2.js → generate.runtime-22jW8aVT.js} +37 -41
  58. package/dist/chunks/{generate.runtime-ByC9kOl2.js.map → generate.runtime-22jW8aVT.js.map} +1 -1
  59. package/dist/chunks/{generate.runtime-BfQlxsWK.js → generate.runtime-B06rPt_j.js} +103 -108
  60. package/dist/chunks/{generate.runtime-BfQlxsWK.js.map → generate.runtime-B06rPt_j.js.map} +1 -1
  61. package/dist/chunks/{generate.runtime-s9ai7PxV.js → generate.runtime-B6FeCL5I.js} +85 -90
  62. package/dist/chunks/{generate.runtime-s9ai7PxV.js.map → generate.runtime-B6FeCL5I.js.map} +1 -1
  63. package/dist/chunks/{generate.runtime-DzCVGruq.js → generate.runtime-BgGeOqYG.js} +19 -21
  64. package/dist/chunks/{generate.runtime-DzCVGruq.js.map → generate.runtime-BgGeOqYG.js.map} +1 -1
  65. package/dist/chunks/{generate.runtime-USnFqTbU.js → generate.runtime-Bv_16lWi.js} +94 -99
  66. package/dist/chunks/{generate.runtime-USnFqTbU.js.map → generate.runtime-Bv_16lWi.js.map} +1 -1
  67. package/dist/chunks/generate.runtime-Bz9z0VPR.js +108 -0
  68. package/dist/chunks/{generate.runtime-DVUj1LJK.js.map → generate.runtime-Bz9z0VPR.js.map} +1 -1
  69. package/dist/chunks/{generate.runtime-CHaE6Mm9.js → generate.runtime-C37djibw.js} +25 -27
  70. package/dist/chunks/{generate.runtime-CHaE6Mm9.js.map → generate.runtime-C37djibw.js.map} +1 -1
  71. package/dist/chunks/{generate.runtime-BsjcGBme.js → generate.runtime-CM3bj0nP.js} +12 -14
  72. package/dist/chunks/{generate.runtime-BsjcGBme.js.map → generate.runtime-CM3bj0nP.js.map} +1 -1
  73. package/dist/chunks/generate.runtime-CMuxVUIY.js +46 -0
  74. package/dist/chunks/{generate.runtime-BfM3dX_R.js.map → generate.runtime-CMuxVUIY.js.map} +1 -1
  75. package/dist/chunks/{generate.runtime-DRZDjZqw.js → generate.runtime-CVqPHddZ.js} +44 -46
  76. package/dist/chunks/generate.runtime-CVqPHddZ.js.map +1 -0
  77. package/dist/chunks/{generate.runtime-CEd3qCtW.js → generate.runtime-C_SdcnRs.js} +44 -47
  78. package/dist/chunks/generate.runtime-C_SdcnRs.js.map +1 -0
  79. package/dist/chunks/generate.runtime-Cco2mFW2.js +63 -0
  80. package/dist/chunks/{generate.runtime-taYl9Tg5.js.map → generate.runtime-Cco2mFW2.js.map} +1 -1
  81. package/dist/chunks/generate.runtime-Cg-dfN9B.js +48 -0
  82. package/dist/chunks/{generate.runtime-TKR-qAJM.js.map → generate.runtime-Cg-dfN9B.js.map} +1 -1
  83. package/dist/chunks/{generate.runtime-DqYYJXAz.js → generate.runtime-CjqX4tDg.js} +5 -6
  84. package/dist/chunks/{generate.runtime-DqYYJXAz.js.map → generate.runtime-CjqX4tDg.js.map} +1 -1
  85. package/dist/chunks/generate.runtime-Cry-DBNl.js +111 -0
  86. package/dist/chunks/{generate.runtime-2GD2E1NK.js.map → generate.runtime-Cry-DBNl.js.map} +1 -1
  87. package/dist/chunks/{generate.runtime-DGmpjkRe.js → generate.runtime-Ct7cG8va.js} +76 -79
  88. package/dist/chunks/generate.runtime-Ct7cG8va.js.map +1 -0
  89. package/dist/chunks/generate.runtime-Cxg1b_BK.js +63 -0
  90. package/dist/chunks/{generate.runtime-CXGiQWDK.js.map → generate.runtime-Cxg1b_BK.js.map} +1 -1
  91. package/dist/chunks/{generate.runtime-4TxcYKld.js → generate.runtime-CyWuhV6m.js} +16 -18
  92. package/dist/chunks/{generate.runtime-4TxcYKld.js.map → generate.runtime-CyWuhV6m.js.map} +1 -1
  93. package/dist/chunks/generate.runtime-CzYArKUA.js +42 -0
  94. package/dist/chunks/{generate.runtime-g6qaIY3k.js.map → generate.runtime-CzYArKUA.js.map} +1 -1
  95. package/dist/chunks/{generate.runtime-C_5Ghjri.js → generate.runtime-D769VJFt.js} +3 -4
  96. package/dist/chunks/{generate.runtime-C_5Ghjri.js.map → generate.runtime-D769VJFt.js.map} +1 -1
  97. package/dist/chunks/{generate.runtime-C9yduilW.js → generate.runtime-DICcLOts.js} +19 -22
  98. package/dist/chunks/{generate.runtime-C9yduilW.js.map → generate.runtime-DICcLOts.js.map} +1 -1
  99. package/dist/chunks/generate.runtime-DLg2CKxQ.js +341 -0
  100. package/dist/chunks/generate.runtime-DLg2CKxQ.js.map +1 -0
  101. package/dist/chunks/{generate.runtime-C2pIioyZ.js → generate.runtime-DaPA2NNL.js} +47 -50
  102. package/dist/chunks/{generate.runtime-C2pIioyZ.js.map → generate.runtime-DaPA2NNL.js.map} +1 -1
  103. package/dist/chunks/{generate.runtime-B2DI0x05.js → generate.runtime-DfHFd8xs.js} +36 -44
  104. package/dist/chunks/{generate.runtime-B2DI0x05.js.map → generate.runtime-DfHFd8xs.js.map} +1 -1
  105. package/dist/chunks/generate.runtime-Dfl-07VS.js +428 -0
  106. package/dist/chunks/generate.runtime-Dfl-07VS.js.map +1 -0
  107. package/dist/chunks/{generate.runtime-BO1KyRcJ.js → generate.runtime-DhNspd-h.js} +64 -76
  108. package/dist/chunks/generate.runtime-DhNspd-h.js.map +1 -0
  109. package/dist/chunks/{generate.runtime-BPVZsAL0.js → generate.runtime-DkS7CBmK.js} +8 -10
  110. package/dist/chunks/{generate.runtime-BPVZsAL0.js.map → generate.runtime-DkS7CBmK.js.map} +1 -1
  111. package/dist/chunks/generate.runtime-Dtae524O.js +34 -0
  112. package/dist/chunks/{generate.runtime-Du8puIJQ.js.map → generate.runtime-Dtae524O.js.map} +1 -1
  113. package/dist/chunks/{generate.runtime-CvtSK0E1.js → generate.runtime-EB8vpc7D.js} +57 -66
  114. package/dist/chunks/{generate.runtime-CvtSK0E1.js.map → generate.runtime-EB8vpc7D.js.map} +1 -1
  115. package/dist/chunks/{generate.runtime-UrLaWKvN.js → generate.runtime-TCVlsBbJ.js} +7 -8
  116. package/dist/chunks/{generate.runtime-UrLaWKvN.js.map → generate.runtime-TCVlsBbJ.js.map} +1 -1
  117. package/dist/chunks/{generate.runtime-B8y_l-6N.js → generate.runtime-YFyuyFhh.js} +108 -132
  118. package/dist/chunks/generate.runtime-YFyuyFhh.js.map +1 -0
  119. package/dist/chunks/{generate.runtime-bWGwyz2U.js → generate.runtime-cYh0CQ5d.js} +36 -41
  120. package/dist/chunks/{generate.runtime-bWGwyz2U.js.map → generate.runtime-cYh0CQ5d.js.map} +1 -1
  121. package/dist/chunks/generate.runtime-erWI6j7m.js +64 -0
  122. package/dist/chunks/{generate.runtime-B-WOQsda.js.map → generate.runtime-erWI6j7m.js.map} +1 -1
  123. package/dist/chunks/{generate.runtime-DI73x08q.js → generate.runtime-hq8xt0m_.js} +21 -23
  124. package/dist/chunks/generate.runtime-hq8xt0m_.js.map +1 -0
  125. package/dist/chunks/{generate.runtime-C4hyve9h.js → generate.runtime-i3tMIA1A.js} +85 -108
  126. package/dist/chunks/{generate.runtime-C4hyve9h.js.map → generate.runtime-i3tMIA1A.js.map} +1 -1
  127. package/dist/chunks/generate.runtime-j_5K3Uue.js +120 -0
  128. package/dist/chunks/generate.runtime-j_5K3Uue.js.map +1 -0
  129. package/dist/chunks/{generate.runtime-BEvi6bml.js → generate.runtime-mE0knt2T.js} +34 -38
  130. package/dist/chunks/{generate.runtime-BEvi6bml.js.map → generate.runtime-mE0knt2T.js.map} +1 -1
  131. package/dist/chunks/{layout.svelte-Cb12mxua.js → layout.svelte-B6wOQ7SM.js} +10 -11
  132. package/dist/chunks/{layout.svelte-Cb12mxua.js.map → layout.svelte-B6wOQ7SM.js.map} +1 -1
  133. package/dist/chunks/{lib-specifier-Cngo1zF_.js → lib-specifier-C3M0WTev.js} +2 -3
  134. package/dist/chunks/{lib-specifier-Cngo1zF_.js.map → lib-specifier-C3M0WTev.js.map} +1 -1
  135. package/dist/chunks/{load-function-Dmkhg1pQ.js → load-function-BFvIVsh7.js} +3 -4
  136. package/dist/chunks/{load-function-Dmkhg1pQ.js.map → load-function-BFvIVsh7.js.map} +1 -1
  137. package/dist/chunks/{logger-CQONztPm.js → logger-t1HxmpG2.js} +2 -3
  138. package/dist/chunks/{logger-CQONztPm.js.map → logger-t1HxmpG2.js.map} +1 -1
  139. package/dist/chunks/{modify-file-D9U2LXEa.js → modify-file-CRZ_gMg0.js} +7 -10
  140. package/dist/chunks/{modify-file-D9U2LXEa.js.map → modify-file-CRZ_gMg0.js.map} +1 -1
  141. package/dist/chunks/{modify-nav-user-CJ1LevSU.js → modify-nav-user--7OwY9fI.js} +7 -16
  142. package/dist/chunks/{modify-nav-user-CJ1LevSU.js.map → modify-nav-user--7OwY9fI.js.map} +1 -1
  143. package/dist/chunks/{modify-nav-user-iUpv2lm-.js → modify-nav-user-D42kWyU6.js} +8 -14
  144. package/dist/chunks/{modify-nav-user-iUpv2lm-.js.map → modify-nav-user-D42kWyU6.js.map} +1 -1
  145. package/dist/chunks/modify-svelte-config-remote-wE5K2bU_.js +20 -0
  146. package/dist/chunks/{modify-svelte-config-remote-CEyYydL7.js.map → modify-svelte-config-remote-wE5K2bU_.js.map} +1 -1
  147. package/dist/chunks/{modify-user-signup-DLtopazD.js → modify-user-signup-ENhadGKH.js} +5 -6
  148. package/dist/chunks/{modify-user-signup-DLtopazD.js.map → modify-user-signup-ENhadGKH.js.map} +1 -1
  149. package/dist/chunks/{modify-utils-Cw-on_cL.js → modify-utils--zro3IGe.js} +3 -4
  150. package/dist/chunks/{modify-utils-Cw-on_cL.js.map → modify-utils--zro3IGe.js.map} +1 -1
  151. package/dist/chunks/{package-imports-B9Asv3ZH.js → package-imports-CcIIHbp5.js} +3 -4
  152. package/dist/chunks/{package-imports-B9Asv3ZH.js.map → package-imports-CcIIHbp5.js.map} +1 -1
  153. package/dist/chunks/{pocketbase-C5GS-Dh5.js → pocketbase-CvsJYXj-.js} +2 -3
  154. package/dist/chunks/{pocketbase-C5GS-Dh5.js.map → pocketbase-CvsJYXj-.js.map} +1 -1
  155. package/dist/chunks/{pocketbase-DpudAAmd.js → pocketbase-YG9yht8R.js} +2 -3
  156. package/dist/chunks/{pocketbase-DpudAAmd.js.map → pocketbase-YG9yht8R.js.map} +1 -1
  157. package/dist/chunks/{pocketbase-BTR3gI8o.js → pocketbase-gUn2UrDd.js} +6 -14
  158. package/dist/chunks/{pocketbase-BTR3gI8o.js.map → pocketbase-gUn2UrDd.js.map} +1 -1
  159. package/dist/chunks/{providers-CpRRQdMg.js → providers-BB3Z2TrN.js} +4 -5
  160. package/dist/chunks/{providers-CpRRQdMg.js.map → providers-BB3Z2TrN.js.map} +1 -1
  161. package/dist/chunks/{providers-CL9kQ4hp.js → providers-tjlFH5di.js} +4 -5
  162. package/dist/chunks/{providers-CL9kQ4hp.js.map → providers-tjlFH5di.js.map} +1 -1
  163. package/dist/chunks/{rolldown-runtime-5HNE8Q1r.js → rolldown-runtime-CwxnZyOB.js} +1 -2
  164. package/dist/chunks/{root-layout.svelte-CUVbnlX-.js → root-layout.svelte-DE0c_y-T.js} +12 -16
  165. package/dist/chunks/{root-layout.svelte-CUVbnlX-.js.map → root-layout.svelte-DE0c_y-T.js.map} +1 -1
  166. package/dist/chunks/{shared-CAjLx_8Z.js → shared-DE-J_b1j.js} +4 -5
  167. package/dist/chunks/{shared-CAjLx_8Z.js.map → shared-DE-J_b1j.js.map} +1 -1
  168. package/dist/chunks/{site-D0IuWkAR.js → site-B9hDxucR.js} +11 -12
  169. package/dist/chunks/{site-D0IuWkAR.js.map → site-B9hDxucR.js.map} +1 -1
  170. package/dist/chunks/{stripe-customer-B3tP8gtD.js → stripe-customer-5S-nOXP1.js} +2 -3
  171. package/dist/chunks/stripe-customer-5S-nOXP1.js.map +1 -0
  172. package/dist/chunks/{svelte-file-Dv5-bl79.js → svelte-file-DfplF3BU.js} +2 -3
  173. package/dist/chunks/{svelte-file-Dv5-bl79.js.map → svelte-file-DfplF3BU.js.map} +1 -1
  174. package/dist/chunks/{table-core-BKBoEStB.js → table-core-BXmnfjln.js} +26 -33
  175. package/dist/chunks/{table-core-BKBoEStB.js.map → table-core-BXmnfjln.js.map} +1 -1
  176. package/dist/chunks/{taggedTemplateLiteral-KSUnuvOk.js → taggedTemplateLiteral-CLenToGE.js} +1 -2
  177. package/dist/chunks/test-setup-cZj1tqaf.js +176 -0
  178. package/dist/chunks/test-setup-cZj1tqaf.js.map +1 -0
  179. package/dist/chunks/{ts-morph-helpers-CHI9wAil.js → ts-morph-helpers-B4KZXP44.js} +2 -3
  180. package/dist/chunks/{ts-morph-helpers-CHI9wAil.js.map → ts-morph-helpers-B4KZXP44.js.map} +1 -1
  181. package/dist/chunks/{ui-DD4NltyN.js → ui-D5xgIDR_.js} +3 -4
  182. package/dist/chunks/{ui-DD4NltyN.js.map → ui-D5xgIDR_.js.map} +1 -1
  183. package/dist/chunks/{ui-B3Db8cQg.js → ui-IkdkLwmB.js} +53 -55
  184. package/dist/chunks/{ui-B3Db8cQg.js.map → ui-IkdkLwmB.js.map} +1 -1
  185. package/dist/chunks/{unmodify-load-Buak-r1f.js → unmodify-load-CdWXJ_Ac.js} +3 -4
  186. package/dist/chunks/{unmodify-load-Buak-r1f.js.map → unmodify-load-CdWXJ_Ac.js.map} +1 -1
  187. package/dist/chunks/{util-BLYliuUK.js → util-ILWdjRAd.js} +2 -3
  188. package/dist/chunks/{util-BLYliuUK.js.map → util-ILWdjRAd.js.map} +1 -1
  189. package/dist/chunks/{whatsapp-Pya8Zi07.js → whatsapp-Bt4o4_q2.js} +3 -4
  190. package/dist/chunks/{whatsapp-Pya8Zi07.js.map → whatsapp-Bt4o4_q2.js.map} +1 -1
  191. package/dist/chunks/write-result-C1GYInL8.js +499 -0
  192. package/dist/chunks/write-result-C1GYInL8.js.map +1 -0
  193. package/dist/chunks/{wuchale-config-c3Q4JVSF.js → wuchale-config-CNXoq4rc.js} +2 -3
  194. package/dist/chunks/{wuchale-config-c3Q4JVSF.js.map → wuchale-config-CNXoq4rc.js.map} +1 -1
  195. package/dist/index.js +1497 -1581
  196. package/dist/index.js.map +1 -1
  197. package/package.json +1 -1
  198. package/dist/chunks/_layout-DQhSAhfF.js.map +0 -1
  199. package/dist/chunks/_page-B6yd6_Vl.js.map +0 -1
  200. package/dist/chunks/_page-DoPdZgZv.js.map +0 -1
  201. package/dist/chunks/generate-BtWZCvuO.js +0 -58
  202. package/dist/chunks/generate.runtime-2GD2E1NK.js +0 -114
  203. package/dist/chunks/generate.runtime-7sU7RzIA.js +0 -483
  204. package/dist/chunks/generate.runtime-7sU7RzIA.js.map +0 -1
  205. package/dist/chunks/generate.runtime-B-WOQsda.js +0 -67
  206. package/dist/chunks/generate.runtime-B8y_l-6N.js.map +0 -1
  207. package/dist/chunks/generate.runtime-BO1KyRcJ.js.map +0 -1
  208. package/dist/chunks/generate.runtime-BfM3dX_R.js +0 -48
  209. package/dist/chunks/generate.runtime-CEd3qCtW.js.map +0 -1
  210. package/dist/chunks/generate.runtime-CXGiQWDK.js +0 -64
  211. package/dist/chunks/generate.runtime-DGmpjkRe.js.map +0 -1
  212. package/dist/chunks/generate.runtime-DI73x08q.js.map +0 -1
  213. package/dist/chunks/generate.runtime-DIkM5xIB.js +0 -326
  214. package/dist/chunks/generate.runtime-DIkM5xIB.js.map +0 -1
  215. package/dist/chunks/generate.runtime-DRZDjZqw.js.map +0 -1
  216. package/dist/chunks/generate.runtime-DVUj1LJK.js +0 -112
  217. package/dist/chunks/generate.runtime-Deg1Tz9u.js +0 -124
  218. package/dist/chunks/generate.runtime-Deg1Tz9u.js.map +0 -1
  219. package/dist/chunks/generate.runtime-Du8puIJQ.js +0 -35
  220. package/dist/chunks/generate.runtime-TKR-qAJM.js +0 -50
  221. package/dist/chunks/generate.runtime-g6qaIY3k.js +0 -43
  222. package/dist/chunks/generate.runtime-taYl9Tg5.js +0 -65
  223. package/dist/chunks/modify-svelte-config-remote-CEyYydL7.js +0 -42
  224. package/dist/chunks/stripe-customer-B3tP8gtD.js.map +0 -1
  225. package/dist/chunks/test-setup-CbCXmPkE.js +0 -179
  226. package/dist/chunks/test-setup-CbCXmPkE.js.map +0 -1
  227. package/dist/chunks/write-result-BWXq9RRn.js +0 -499
  228. package/dist/chunks/write-result-BWXq9RRn.js.map +0 -1
@@ -1,7 +1,7 @@
1
- import { t as e } from "./errors-DR3gF_7a.js";
1
+ import { t as e } from "./errors-DdSUZI8f.js";
2
2
  import t from "node:fs";
3
3
  import n from "node:path";
4
- //#region src/patterns/generate/shop/generate.runtime.ts
4
+ // src/patterns/generate/shop/generate.runtime.ts
5
5
  function r(r, i) {
6
6
  let a = i.map((e) => e.path).filter((e) => t.existsSync(n.join(r, e)));
7
7
  if (a.length !== 0) throw new e([
@@ -11,7 +11,6 @@ function r(r, i) {
11
11
  "Nothing was changed. Run `vela destroy shop` to remove a shop generated before, or move the files aside."
12
12
  ].join("\n"));
13
13
  }
14
- //#endregion
15
14
  export { r as assertNoneExist };
16
15
 
17
- //# sourceMappingURL=generate.runtime-C_5Ghjri.js.map
16
+ //# sourceMappingURL=generate.runtime-D769VJFt.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate.runtime-C_5Ghjri.js","names":["InvalidArgumentError","fs","path","assertNoneExist","existing","creates","file","root"],"sources":["../../src/patterns/generate/shop/generate.runtime.ts"],"sourcesContent":["import fs from \"node:fs\";\nimport path from \"node:path\";\nimport type { File, Options } from \"../../../core/types\";\nimport { InvalidArgumentError } from \"../../../core/errors\";\n\n/**\n * A generator writes files the developer then owns, so it never writes over\n * one that exists: the shop pages are refused while any of them is there.\n * `vela destroy shop` takes them out; a project that still has the demo page\n * an older `vela enable ecommerce` wrote removes that by hand.\n */\nexport function assertNoneExist(root: string, creates: File[]): void {\n const existing = creates\n .map((file) => file.path)\n .filter((file) => fs.existsSync(path.join(root, file)));\n if (existing.length === 0) return;\n throw new InvalidArgumentError(\n [\n \"These files already exist, and generating the shop would write over them:\",\n ...existing.map((file) => ` ${file}`),\n \"\",\n \"Nothing was changed. Run `vela destroy shop` to remove a shop generated before, or move the files aside.\",\n ].join(\"\\n\"),\n );\n}\n\nexport async function generate(_options: Options) {\n // Everything the shop needs is in the base creates; this module exists so\n // the refusal above can look at the disk, which the base generator can't.\n return null;\n}\n"],"mappings":";;;;AAWA,SAAgBG,EAAgB,GAAc,GAAuB;CACnE,IAAMC,IAAWC,EACd,KAAK,MAASC,EAAK,IAAI,CAAC,CACxB,QAAQ,MAASL,EAAG,WAAWC,EAAK,KAAKK,GAAMD,CAAI,CAAC,CAAC;CACxD,IAAIF,EAAS,WAAW,GACxB,MAAM,IAAIJ,EACR;EACE;EACA,GAAGI,EAAS,KAAK,MAAS,KAAKE,GAAM;EACrC;EACA;CACF,CAAC,CAAC,KAAK,IAAI,CACb;AACF"}
1
+ {"version":3,"file":"generate.runtime-D769VJFt.js","names":["InvalidArgumentError","fs","path","assertNoneExist","existing","creates","file","root"],"sources":["../../src/patterns/generate/shop/generate.runtime.ts"],"sourcesContent":["import fs from \"node:fs\";\nimport path from \"node:path\";\nimport type { File, Options } from \"../../../core/types\";\nimport { InvalidArgumentError } from \"../../../core/errors\";\n\n/**\n * A generator writes files the developer then owns, so it never writes over\n * one that exists: the shop pages are refused while any of them is there.\n * `vela destroy shop` takes them out; a project that still has the demo page\n * an older `vela enable ecommerce` wrote removes that by hand.\n */\nexport function assertNoneExist(root: string, creates: File[]): void {\n const existing = creates\n .map((file) => file.path)\n .filter((file) => fs.existsSync(path.join(root, file)));\n if (existing.length === 0) return;\n throw new InvalidArgumentError(\n [\n \"These files already exist, and generating the shop would write over them:\",\n ...existing.map((file) => ` ${file}`),\n \"\",\n \"Nothing was changed. Run `vela destroy shop` to remove a shop generated before, or move the files aside.\",\n ].join(\"\\n\"),\n );\n}\n\nexport async function generate(_options: Options) {\n // Everything the shop needs is in the base creates; this module exists so\n // the refusal above can look at the disk, which the base generator can't.\n return null;\n}\n"],"mappings":";;;;AAWA,SAAgBG,EAAgB,GAAc,GAAuB;CACnE,IAAMC,IAAWC,EACd,KAAK,MAASC,EAAK,IAAI,CAAC,CACxB,QAAQ,MAASL,EAAG,WAAWC,EAAK,KAAKK,GAAMD,CAAI,CAAC,CAAC;CACxD,IAAIF,EAAS,WAAW,GACxB,MAAM,IAAIJ,EACR;EACE;EACA,GAAGI,EAAS,KAAK,MAAS,KAAKE,GAAM;EACrC;EACA;CACF,CAAC,CAAC,KAAK,IAAI,CACb;AACF"}
@@ -1,12 +1,12 @@
1
- import { n as e } from "./logger-CQONztPm.js";
2
- import { t } from "./shared-CAjLx_8Z.js";
3
- import { f as n, o as r } from "./ts-morph-helpers-CHI9wAil.js";
4
- import { r as i } from "./modify-file-D9U2LXEa.js";
5
- import { t as a } from "./svelte-file-Dv5-bl79.js";
1
+ import { n as e } from "./logger-t1HxmpG2.js";
2
+ import { r as t } from "./modify-file-CRZ_gMg0.js";
3
+ import { f as n, o as r } from "./ts-morph-helpers-B4KZXP44.js";
4
+ import { t as i } from "./svelte-file-DfplF3BU.js";
5
+ import { t as a } from "./shared-DE-J_b1j.js";
6
6
  import o from "node:fs";
7
7
  import s from "node:path";
8
8
  import { Project as c, SyntaxKind as l } from "ts-morph";
9
- //#region src/patterns/disable/api-keys/modifies/hooks.server.ts
9
+ // src/patterns/disable/api-keys/modifies/hooks.server.ts
10
10
  function u(e) {
11
11
  if (!o.existsSync(e)) return {
12
12
  status: "success",
@@ -41,8 +41,7 @@ function u(e) {
41
41
  changed: !1
42
42
  };
43
43
  }
44
- //#endregion
45
- //#region src/patterns/disable/api-keys/modifies/nav-user.svelte.ts
44
+ // src/patterns/disable/api-keys/modifies/nav-user.svelte.ts
46
45
  function d(e) {
47
46
  if (!o.existsSync(e)) return {
48
47
  status: "success",
@@ -53,13 +52,13 @@ function d(e) {
53
52
  status: "success",
54
53
  changed: !1
55
54
  };
56
- let r = new a(t), i = !1, s = (e) => {
57
- i || e((e) => {
55
+ let r = new i(t), a = !1, s = (e) => {
56
+ a || e((e) => {
58
57
  let t = n(e, "API Keys", "@lucide/svelte/icons/key-round");
59
- return t.wasRemoved && (i = !0), t.source;
58
+ return t.wasRemoved && (a = !0), t.source;
60
59
  });
61
60
  };
62
- return s((e) => r.modifyModuleScript(e)), i || s((e) => r.modifyScript(e)), i ? (o.writeFileSync(e, r.toString(), "utf8"), {
61
+ return s((e) => r.modifyModuleScript(e)), a || s((e) => r.modifyScript(e)), a ? (o.writeFileSync(e, r.toString(), "utf8"), {
63
62
  status: "success",
64
63
  changed: !0
65
64
  }) : {
@@ -67,28 +66,26 @@ function d(e) {
67
66
  changed: !1
68
67
  };
69
68
  }
70
- //#endregion
71
- //#region src/patterns/disable/api-keys/generate.runtime.ts
69
+ // src/patterns/disable/api-keys/generate.runtime.ts
72
70
  async function f(n) {
73
- let r = e(n), a = [], o = (e) => {
74
- e && a.push(e);
71
+ let r = e(n), i = [], o = (e) => {
72
+ e && i.push(e);
75
73
  };
76
74
  r.info("Reverting hooks.server.ts");
77
75
  let c = s.join(n.root, "src", "hooks.server.ts");
78
- o(i(c, u(c))), r.info("Reverting nav-user.svelte");
76
+ o(t(c, u(c))), r.info("Reverting nav-user.svelte");
79
77
  let l = s.join(n.root, "src", "lib", "components", "nav-user.svelte");
80
- return o(i(l, d(l))), {
78
+ return o(t(l, d(l))), {
81
79
  creates: [],
82
- modifies: a,
80
+ modifies: i,
83
81
  deletes: [],
84
82
  components: [],
85
83
  packages: [],
86
84
  collections: [],
87
85
  collectionPatches: [],
88
- collectionDrops: await t(["api_keys"], n)
86
+ collectionDrops: await a(["api_keys"], n)
89
87
  };
90
88
  }
91
- //#endregion
92
89
  export { f as generate };
93
90
 
94
- //# sourceMappingURL=generate.runtime-C9yduilW.js.map
91
+ //# sourceMappingURL=generate.runtime-DICcLOts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate.runtime-C9yduilW.js","names":["apiObj","getLogger","removeNavItemFromScript","formatLikeSource","modifyOutcomeToFile","SvelteFile","fs","path","unmodifyHooksServer","hooksServerPath","originalSource","sourceFile","Project","callExpr","SyntaxKind","ce","firstArg","apiProp","apiInit","apiKeysProp","unmodifyNavUser","navUserPath","source","file","wasRemoved","tryRemove","run","result","src","fn","generate","logger","options","modifies","pushResult","planDropsForCollections"],"sources":["../../src/patterns/disable/api-keys/modifies/hooks.server.ts","../../src/patterns/disable/api-keys/modifies/nav-user.svelte.ts","../../src/patterns/disable/api-keys/generate.runtime.ts"],"sourcesContent":["import fs from \"node:fs\";\nimport { Project, SyntaxKind } from \"ts-morph\";\nimport type { ModifyOutcome } from \"../../../../core/types\";\nimport { formatLikeSource } from \"../../../../runtime/ts-morph-helpers\";\n\nexport function unmodifyHooksServer(hooksServerPath: string): ModifyOutcome {\n if (!fs.existsSync(hooksServerPath)) {\n return { status: \"success\", changed: false };\n }\n\n const originalSource = fs.readFileSync(hooksServerPath, \"utf8\");\n const project = new Project();\n const sourceFile = project.addSourceFileAtPath(hooksServerPath);\n\n const callExpr = sourceFile\n .getDescendantsOfKind(SyntaxKind.CallExpression)\n .find((ce) => ce.getExpression().getText() === \"handlePocketbase\");\n if (!callExpr) return { status: \"success\", changed: false };\n\n const [firstArg] = callExpr.getArguments();\n if (!firstArg || firstArg.getKind() !== SyntaxKind.ObjectLiteralExpression) {\n return { status: \"success\", changed: false };\n }\n\n const optionsObj = firstArg.asKindOrThrow(SyntaxKind.ObjectLiteralExpression);\n const apiProp = optionsObj.getProperty(\"api\");\n if (!apiProp || apiProp.getKind() !== SyntaxKind.PropertyAssignment) {\n return { status: \"success\", changed: false };\n }\n\n const apiInit = (\n apiProp as import(\"ts-morph\").PropertyAssignment\n ).getInitializer();\n if (!apiInit || apiInit.getKind() !== SyntaxKind.ObjectLiteralExpression) {\n return { status: \"success\", changed: false };\n }\n\n const apiObj = apiInit as import(\"ts-morph\").ObjectLiteralExpression;\n const apiKeysProp = apiObj.getProperty(\"apiKeys\");\n if (!apiKeysProp) {\n return { status: \"success\", changed: false };\n }\n\n apiKeysProp.remove();\n\n formatLikeSource(sourceFile);\n sourceFile.saveSync();\n\n return {\n status: \"success\",\n changed: sourceFile.getFullText() !== originalSource,\n };\n}\n","import fs from \"node:fs\";\nimport { SvelteFile } from \"../../../../runtime/svelte-file\";\nimport { removeNavItemFromScript } from \"../../../../runtime/ts-morph-helpers\";\nimport type { ModifyOutcome } from \"../../../../core/types\";\n\nexport function unmodifyNavUser(navUserPath: string): ModifyOutcome {\n if (!fs.existsSync(navUserPath)) {\n return { status: \"success\", changed: false };\n }\n\n const source = fs.readFileSync(navUserPath, \"utf8\");\n if (!source.includes(\"/api-keys\")) {\n return { status: \"success\", changed: false };\n }\n\n const file = new SvelteFile(source);\n let wasRemoved = false;\n\n const tryRemove = (run: (fn: (s: string) => string) => boolean) => {\n if (wasRemoved) return;\n run((src) => {\n const result = removeNavItemFromScript(\n src,\n \"API Keys\",\n \"@lucide/svelte/icons/key-round\",\n );\n if (result.wasRemoved) wasRemoved = true;\n return result.source;\n });\n };\n\n tryRemove((fn) => file.modifyModuleScript(fn));\n if (!wasRemoved) tryRemove((fn) => file.modifyScript(fn));\n\n if (!wasRemoved) {\n return { status: \"success\", changed: false };\n }\n\n fs.writeFileSync(navUserPath, file.toString(), \"utf8\");\n return { status: \"success\", changed: true };\n}\n","import path from \"node:path\";\nimport type { File, Options, Result } from \"../../../core/types\";\nimport { getLogger } from \"../../../core/logger\";\nimport { modifyOutcomeToFile } from \"../../../runtime/modify-file\";\nimport { unmodifyHooksServer } from \"./modifies/hooks.server\";\nimport { unmodifyNavUser } from \"./modifies/nav-user.svelte\";\nimport { planDropsForCollections } from \"../../destroy/shared\";\n\nexport async function generate(options: Options) {\n const logger = getLogger(options);\n const modifies: File[] = [];\n const pushResult = (file: File | null) => {\n if (file) modifies.push(file);\n };\n\n logger.info(\"Reverting hooks.server.ts\");\n const hooksServerPath = path.join(options.root, \"src\", \"hooks.server.ts\");\n pushResult(\n modifyOutcomeToFile(hooksServerPath, unmodifyHooksServer(hooksServerPath)),\n );\n\n logger.info(\"Reverting nav-user.svelte\");\n const navUserPath = path.join(\n options.root,\n \"src\",\n \"lib\",\n \"components\",\n \"nav-user.svelte\",\n );\n pushResult(modifyOutcomeToFile(navUserPath, unmodifyNavUser(navUserPath)));\n\n const collectionDrops = await planDropsForCollections([\"api_keys\"], options);\n\n return {\n creates: [],\n modifies,\n deletes: [],\n components: [],\n packages: [],\n collections: [],\n collectionPatches: [],\n collectionDrops,\n } satisfies Result;\n}\n"],"mappings":";;;;;;;;;AAKA,SAAgBQ,EAAoB,GAAwC;CAC1E,IAAI,CAACF,EAAG,WAAWG,CAAe,GAChC,OAAO;EAAE,QAAQ;EAAW,SAAS;CAAM;CA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XC,KAAa,MAAgD;EACjE,AAAID,KACJE,GAAK,MAAQ;GACX,IAAMC,IAASzB,EACb0B,GACA,YACA,gCACF;GAEA,OADID,EAAO,eAAY,IAAa,KAC7BA,EAAO;EAChB,CAAC;CACH;CAUA,OARAF,GAAW,MAAOF,EAAK,mBAAmBM,CAAE,CAAC,GACxCL,KAAYC,GAAW,MAAOF,EAAK,aAAaM,CAAE,CAAC,GAEnDL,KAILlB,EAAG,cAAce,GAAaE,EAAK,SAAS,GAAG,MAAM,GAC9C;EAAE,QAAQ;EAAW,SAAS;CAAK,KAJjC;EAAE,QAAQ;EAAW,SAAS;CAAM;AAK/C;;;AChCA,eAAsBO,EAAS,GAAkB;CAC/C,IAAMC,IAAS9B,EAAU+B,CAAO,GAC1BC,IAAmB,CAAC,GACpBC,KAAc,MAAsB;EACxC,AAAIX,KAAMU,EAAS,KAAKV,CAAI;CAC9B;CAEA,EAAO,KAAK,2BAA2B;CACvC,IAAMd,IAAkBF,EAAK,KAAKyB,EAAQ,MAAM,OAAO,iBAAiB;CAKxE,AAJAE,EACE9B,EAAoBK,GAAiBD,EAAoBC,CAAe,CAAC,CAC3E,GAEAsB,EAAO,KAAK,2BAA2B;CACvC,IAAMV,IAAcd,EAAK,KACvByB,EAAQ,MACR,OACA,OACA,cACA,iBACF;CAKA,OAJAE,EAAW9B,EAAoBiB,GAAaD,EAAgBC,CAAW,CAAC,CAAC,GAIlE;EACL,SAAS,CAAC;EACV;EACA,SAAS,CAAC;EACV,YAAY,CAAC;EACb,UAAU,CAAC;EACX,aAAa,CAAC;EACd,mBAAmB,CAAC;EACpB,iBAAA,MAV4Bc,EAAwB,CAAC,UAAU,GAAGH,CAAO;CAW3E;AACF"}
1
+ {"version":3,"file":"generate.runtime-DICcLOts.js","names":["apiObj","getLogger","modifyOutcomeToFile","removeNavItemFromScript","formatLikeSource","SvelteFile","planDropsForCollections","fs","path","unmodifyHooksServer","hooksServerPath","originalSource","sourceFile","Project","callExpr","SyntaxKind","ce","firstArg","apiProp","apiInit","apiKeysProp","unmodifyNavUser","navUserPath","source","file","wasRemoved","tryRemove","run","result","src","fn","generate","logger","options","modifies","pushResult"],"sources":["../../src/patterns/disable/api-keys/modifies/hooks.server.ts","../../src/patterns/disable/api-keys/modifies/nav-user.svelte.ts","../../src/patterns/disable/api-keys/generate.runtime.ts"],"sourcesContent":["import fs from \"node:fs\";\nimport { Project, SyntaxKind } from \"ts-morph\";\nimport type { ModifyOutcome } from \"../../../../core/types\";\nimport { formatLikeSource } from \"../../../../runtime/ts-morph-helpers\";\n\nexport function unmodifyHooksServer(hooksServerPath: string): ModifyOutcome {\n if (!fs.existsSync(hooksServerPath)) {\n return { status: \"success\", changed: false };\n }\n\n const originalSource = fs.readFileSync(hooksServerPath, \"utf8\");\n const project = new Project();\n const sourceFile = project.addSourceFileAtPath(hooksServerPath);\n\n const callExpr = sourceFile\n .getDescendantsOfKind(SyntaxKind.CallExpression)\n .find((ce) => ce.getExpression().getText() === \"handlePocketbase\");\n if (!callExpr) return { status: \"success\", changed: false };\n\n const [firstArg] = callExpr.getArguments();\n if (!firstArg || firstArg.getKind() !== SyntaxKind.ObjectLiteralExpression) {\n return { status: \"success\", changed: false };\n }\n\n const optionsObj = firstArg.asKindOrThrow(SyntaxKind.ObjectLiteralExpression);\n const apiProp = optionsObj.getProperty(\"api\");\n if (!apiProp || apiProp.getKind() !== SyntaxKind.PropertyAssignment) {\n return { status: \"success\", changed: false };\n }\n\n const apiInit = (\n apiProp as import(\"ts-morph\").PropertyAssignment\n ).getInitializer();\n if (!apiInit || apiInit.getKind() !== SyntaxKind.ObjectLiteralExpression) {\n return { status: \"success\", changed: false };\n }\n\n const apiObj = apiInit as import(\"ts-morph\").ObjectLiteralExpression;\n const apiKeysProp = apiObj.getProperty(\"apiKeys\");\n if (!apiKeysProp) {\n return { status: \"success\", changed: false };\n }\n\n apiKeysProp.remove();\n\n formatLikeSource(sourceFile);\n sourceFile.saveSync();\n\n return {\n status: \"success\",\n changed: sourceFile.getFullText() !== originalSource,\n };\n}\n","import fs from \"node:fs\";\nimport { SvelteFile } from \"../../../../runtime/svelte-file\";\nimport { removeNavItemFromScript } from \"../../../../runtime/ts-morph-helpers\";\nimport type { ModifyOutcome } from \"../../../../core/types\";\n\nexport function unmodifyNavUser(navUserPath: string): ModifyOutcome {\n if (!fs.existsSync(navUserPath)) {\n return { status: \"success\", changed: false };\n }\n\n const source = fs.readFileSync(navUserPath, \"utf8\");\n if (!source.includes(\"/api-keys\")) {\n return { status: \"success\", changed: false };\n }\n\n const file = new SvelteFile(source);\n let wasRemoved = false;\n\n const tryRemove = (run: (fn: (s: string) => string) => boolean) => {\n if (wasRemoved) return;\n run((src) => {\n const result = removeNavItemFromScript(\n src,\n \"API Keys\",\n \"@lucide/svelte/icons/key-round\",\n );\n if (result.wasRemoved) wasRemoved = true;\n return result.source;\n });\n };\n\n tryRemove((fn) => file.modifyModuleScript(fn));\n if (!wasRemoved) tryRemove((fn) => file.modifyScript(fn));\n\n if (!wasRemoved) {\n return { status: \"success\", changed: false };\n }\n\n fs.writeFileSync(navUserPath, file.toString(), \"utf8\");\n return { status: \"success\", changed: true };\n}\n","import path from \"node:path\";\nimport type { File, Options, Result } from \"../../../core/types\";\nimport { getLogger } from \"../../../core/logger\";\nimport { modifyOutcomeToFile } from \"../../../runtime/modify-file\";\nimport { unmodifyHooksServer } from \"./modifies/hooks.server\";\nimport { unmodifyNavUser } from \"./modifies/nav-user.svelte\";\nimport { planDropsForCollections } from \"../../destroy/shared\";\n\nexport async function generate(options: Options) {\n const logger = getLogger(options);\n const modifies: File[] = [];\n const pushResult = (file: File | null) => {\n if (file) modifies.push(file);\n };\n\n logger.info(\"Reverting hooks.server.ts\");\n const hooksServerPath = path.join(options.root, \"src\", \"hooks.server.ts\");\n pushResult(\n modifyOutcomeToFile(hooksServerPath, unmodifyHooksServer(hooksServerPath)),\n );\n\n logger.info(\"Reverting nav-user.svelte\");\n const navUserPath = path.join(\n options.root,\n \"src\",\n \"lib\",\n \"components\",\n \"nav-user.svelte\",\n );\n pushResult(modifyOutcomeToFile(navUserPath, unmodifyNavUser(navUserPath)));\n\n const collectionDrops = await planDropsForCollections([\"api_keys\"], options);\n\n return {\n creates: [],\n modifies,\n deletes: [],\n components: [],\n packages: [],\n collections: [],\n collectionPatches: [],\n collectionDrops,\n } satisfies Result;\n}\n"],"mappings":";;;;;;;;;AAKA,SAAgBS,EAAoB,GAAwC;CAC1E,IAAI,CAACF,EAAG,WAAWG,CAAe,GAChC,OAAO;EAAE,QAAQ;EAAW,SAAS;CAAM;CAG7C,IAAMC,IAAiBJ,EAAG,aAAaG,GAAiB,MAAM,GAExDE,IAAa,IADCC,EACD,CAAA,CAAQ,oBAAoBH,CAAe,GAExDI,IAAWF,EACd,qBAAqBG,EAAW,cAAc,CAAC,CAC/C,MAAM,MAAOC,EAAG,cAAc,CAAC,CAAC,QAAQ,MAAM,kBAAkB;CACnE,IAAI,CAACF,GAAU,OAAO;EAAE,QAAQ;EAAW,SAAS;CAAM;CAE1D,IAAM,CAACG,KAAYH,EAAS,aAAa;CACzC,IAAI,CAACG,KAAYA,EAAS,QAAQ,MAAMF,EAAW,yBACjD,OAAO;EAAE,QAAQ;EAAW,SAAS;CAAM;CAI7C,IAAMG,IADaD,EAAS,cAAcF,EAAW,uBACrC,CAAA,CAAW,YAAY,KAAK;CAC5C,IAAI,CAACG,KAAWA,EAAQ,QAAQ,MAAMH,EAAW,oBAC/C,OAAO;EAAE,QAAQ;EAAW,SAAS;CAAM;CAG7C,IAAMI,IACJD,EACA,eAAe;CACjB,IAAI,CAACC,KAAWA,EAAQ,QAAQ,MAAMJ,EAAW,yBAC/C,OAAO;EAAE,QAAQ;EAAW,SAAS;CAAM;CAI7C,IAAMK,IAAcpB,EAAO,YAAY,SAAS;CAUhD,OATKoB,KAILA,EAAY,OAAO,GAEnBhB,EAAiBQ,CAAU,GAC3BA,EAAW,SAAS,GAEb;EACL,QAAQ;EACR,SAASA,EAAW,YAAY,MAAMD;C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,SAAS,CAAC;EACV;EACA,SAAS,CAAC;EACV,YAAY,CAAC;EACb,UAAU,CAAC;EACX,aAAa,CAAC;EACd,mBAAmB,CAAC;EACpB,iBAAA,MAV4BhB,EAAwB,CAAC,UAAU,GAAG2B,CAAO;CAW3E;AACF"}
@@ -0,0 +1,341 @@
1
+ import { n as e } from "./logger-t1HxmpG2.js";
2
+ import { a as t, r as n } from "./modify-file-CRZ_gMg0.js";
3
+ import { a as r, o as i, s as a, t as o } from "./config-target-DJbVHwHl.js";
4
+ import { r as s, t as c } from "./_layout-xBzFhszN.js";
5
+ import { _ as l, c as u, d, h as f, m as p, n as m, o as h, s as g, u as _ } from "./ts-morph-helpers-B4KZXP44.js";
6
+ import { r as v } from "./package-imports-CcIIHbp5.js";
7
+ import { t as y } from "./dedent-CCUOcPFW.js";
8
+ import { n as b } from "./compose-handle-Da7m6lV_.js";
9
+ import { t as x } from "./svelte-file-DfplF3BU.js";
10
+ import { r as S } from "./lib-specifier-C3M0WTev.js";
11
+ import C from "node:fs";
12
+ import w from "node:path";
13
+ import { Project as T, QuoteKind as E, SyntaxKind as D } from "ts-morph";
14
+ // src/patterns/disable/i18n/modifies/gitignore.ts
15
+ function O(e) {
16
+ if (!C.existsSync(e)) return {
17
+ status: "success",
18
+ changed: !1
19
+ };
20
+ let t = C.readFileSync(e, "utf8");
21
+ if (!t.includes("src/locales/.wuchale")) return {
22
+ status: "success",
23
+ changed: !1
24
+ };
25
+ let n = t.split("\n"), r = [];
26
+ for (let e = 0; e < n.length; e++) {
27
+ let t = n[e];
28
+ if (t === "# Wuchale") {
29
+ let t = e + 1, r = !1;
30
+ for (; t < n.length && n[t].trim() !== "";) n[t] === "src/locales/.wuchale" && (r = !0), t++;
31
+ if (r) {
32
+ e = t;
33
+ continue;
34
+ }
35
+ }
36
+ t !== "src/locales/.wuchale" && r.push(t);
37
+ }
38
+ let i = r.join("\n");
39
+ return i = i.replace(/\n{3,}/g, "\n\n"), i === t ? {
40
+ status: "success",
41
+ changed: !1
42
+ } : (C.writeFileSync(e, i), {
43
+ status: "success",
44
+ changed: !0
45
+ });
46
+ }
47
+ // src/patterns/disable/i18n/modifies/prettierignore.ts
48
+ function k(e) {
49
+ if (!C.existsSync(e)) return {
50
+ status: "success",
51
+ changed: !1
52
+ };
53
+ let t = C.readFileSync(e, "utf8").split("\n"), n = t.findIndex((e, n) => e === "# Wuchale" && t[n + 1] === "src/locales/");
54
+ return n === -1 ? {
55
+ status: "success",
56
+ changed: !1
57
+ } : (t.splice(n, 2), n > 0 && t[n - 1] === "" && (t[n] ?? "") === "" && t.splice(n - 1, 1), C.writeFileSync(e, t.join("\n")), {
58
+ status: "success",
59
+ changed: !0
60
+ });
61
+ }
62
+ // src/patterns/disable/i18n/modifies/vite-config.ts
63
+ function A(e) {
64
+ if (!C.existsSync(e)) return {
65
+ status: "success",
66
+ changed: !1
67
+ };
68
+ let t = C.readFileSync(e, "utf8");
69
+ if (!t.includes("wuchale")) return {
70
+ status: "success",
71
+ changed: !1
72
+ };
73
+ let n = new T({
74
+ compilerOptions: { allowJs: !0 },
75
+ manipulationSettings: { quoteKind: E.Single }
76
+ }).addSourceFileAtPath(e);
77
+ for (;;) {
78
+ let e = !1;
79
+ for (let t of n.getDescendantsOfKind(D.ArrayLiteralExpression)) {
80
+ let n = t.getElements().findIndex((e) => e.getText().replace(/\s/g, "") === "wuchale()");
81
+ if (n >= 0) {
82
+ t.removeElement(n), e = !0;
83
+ break;
84
+ }
85
+ }
86
+ if (!e) break;
87
+ }
88
+ return _(n, "wuchale/vite"), h(n), n.saveSync(), {
89
+ status: "success",
90
+ changed: n.getFullText() !== t
91
+ };
92
+ }
93
+ // src/patterns/disable/i18n/modifies/locales-alias.ts
94
+ var j = {
95
+ notFound: "No SvelteKit config to revert.",
96
+ failed: "Remove the $locales alias from the sveltekit() arg in vite.config by hand."
97
+ };
98
+ function M(e) {
99
+ let t = i(e, j);
100
+ if (t.status === "not-found") return {
101
+ filePath: t.filePath,
102
+ outcome: {
103
+ status: "success",
104
+ changed: !1
105
+ }
106
+ };
107
+ if (t.status === "failed") return {
108
+ filePath: t.filePath,
109
+ outcome: {
110
+ status: "failed",
111
+ message: t.message
112
+ }
113
+ };
114
+ let { target: n } = t, r = n.configObject.getProperty("alias")?.asKind(D.PropertyAssignment), o = r?.getInitializer()?.asKind(D.ObjectLiteralExpression), s = o?.getProperties().find((e) => e.getText().replace(/['"]/g, "").startsWith("$locales"));
115
+ return r && o && s && (s.remove(), o.getProperties().length === 0 && r.remove()), {
116
+ filePath: n.filePath,
117
+ outcome: a(n)
118
+ };
119
+ }
120
+ // src/patterns/disable/i18n/modifies/locales-module.ts
121
+ function N(e) {
122
+ let t = e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), n = RegExp(`^[$#]locales/${t}(\\.js)?$`);
123
+ return (e) => n.test(e);
124
+ }
125
+ // src/patterns/disable/i18n/modifies/hooks.server.ts
126
+ var P = "handleWuchale", F = y`
127
+ Take handleWuchale out of the exported handle in src/hooks.server.ts, then
128
+ remove its declaration, the loadLocales(...) calls and the wuchale and
129
+ #locales imports.
130
+ `, I = [
131
+ "wuchale/load-utils/server",
132
+ N("main.url"),
133
+ N("data"),
134
+ N("main.loader.server.svelte"),
135
+ N("js.loader.server")
136
+ ];
137
+ function L(e) {
138
+ if (!C.existsSync(e)) return {
139
+ status: "success",
140
+ changed: !1
141
+ };
142
+ let t = C.readFileSync(e, "utf8");
143
+ if (!t.includes(P) && !t.includes("loadLocales(")) return {
144
+ status: "success",
145
+ changed: !1
146
+ };
147
+ let n = new T({
148
+ compilerOptions: { allowJs: !0 },
149
+ manipulationSettings: { quoteKind: E.Single }
150
+ }).addSourceFileAtPath(e);
151
+ for (;;) {
152
+ let e = n.getStatements().find((e) => e.getKind() === D.ExpressionStatement && /^loadLocales\s*\(/.test(e.getText()));
153
+ if (!e) break;
154
+ e.remove();
155
+ }
156
+ if (b(n, P).status === "unsupported") return {
157
+ status: "failed",
158
+ message: F
159
+ };
160
+ f(n, P);
161
+ for (let e of I) _(n, e);
162
+ return d(n, "@sveltejs/kit/hooks", "sequence"), d(n, "@sveltejs/kit/hooks", "Handle"), d(n, "@sveltejs/kit", "Handle"), h(n), m(n), n.saveSync(), {
163
+ status: "success",
164
+ changed: n.getFullText() !== t
165
+ };
166
+ }
167
+ // src/patterns/disable/i18n/modifies/hooks.ts
168
+ var R = "rerouteDeLocalize", z = y`
169
+ Take rerouteDeLocalize out of the exported reroute in src/hooks.ts, then
170
+ remove its declaration and the wuchale and #locales imports.
171
+ `, B = [
172
+ "wuchale/url",
173
+ N("main.url"),
174
+ N("data")
175
+ ], V = /^\(\s*\{\s*url\s*\}\s*\)\s*=>\s*rerouteDeLocalize\(\s*url\.pathname\s*\)$/, H = /^\(\s*\{\s*url\s*\}\s*\)\s*=>\s*rerouteDeLocalize\(\s*negotiateReroute\(\s*url\.pathname\s*\)\s*\)$/;
176
+ function U(e) {
177
+ if (!C.existsSync(e)) return {
178
+ status: "success",
179
+ changed: !1
180
+ };
181
+ let t = C.readFileSync(e, "utf8");
182
+ if (!t.includes(R)) return {
183
+ status: "success",
184
+ changed: !1
185
+ };
186
+ let n = new T({
187
+ compilerOptions: { allowJs: !0 },
188
+ manipulationSettings: { quoteKind: E.Single }
189
+ }).addSourceFileAtPath(e), r = n.getVariableDeclaration(R)?.getFirstAncestorByKind(D.VariableStatement), i = n.getVariableDeclaration("reroute"), a = i?.getInitializer()?.getText() ?? "", o = H.test(a), s = o || V.test(a) ? i?.getFirstAncestorByKind(D.VariableStatement) : void 0;
190
+ return n.getStatements().filter((e) => e !== r && e !== s && e.getText().includes(R)).length > 0 ? {
191
+ status: "failed",
192
+ message: z
193
+ } : (o ? i?.setInitializer("({ url }) => negotiateReroute(url.pathname)") : s && f(n, "reroute"), f(n, R), u(n, B), g(n) ? (C.writeFileSync(e, "", "utf8"), {
194
+ status: "success",
195
+ changed: !0
196
+ }) : (h(n), m(n), n.saveSync(), {
197
+ status: "success",
198
+ changed: n.getFullText() !== t
199
+ }));
200
+ }
201
+ // src/patterns/disable/i18n/modifies/app-html.ts
202
+ function W(e) {
203
+ if (!C.existsSync(e)) return {
204
+ status: "success",
205
+ changed: !1
206
+ };
207
+ let t = C.readFileSync(e, "utf8"), n = t.replace(/lang\s*=\s*(?:"%sveltekit\.lang%"|'%sveltekit\.lang%')/g, "lang=\"en\"");
208
+ return n === t ? {
209
+ status: "success",
210
+ changed: !1
211
+ } : (C.writeFileSync(e, n, "utf8"), {
212
+ status: "success",
213
+ changed: !0
214
+ });
215
+ }
216
+ // src/patterns/disable/i18n/modifies/+layout.ts
217
+ var G = y`
218
+ src/routes/+layout.ts still loads wuchale locales. Remove these from it:
219
+
220
+ import { browser } from '$app/env';
221
+ import { loadLocale } from 'wuchale/load-utils';
222
+ import { getLocale } from '#locales/main.url.js';
223
+ import '#locales/main.loader.svelte.js';
224
+ import '#locales/js.loader.js';
225
+
226
+ and the loadLocale(...) call inside load().
227
+ `, K = [N("main.loader.svelte"), N("js.loader")], q = [
228
+ (e) => /^\$app\/env(ironment)?$/.test(e),
229
+ "wuchale/load-utils",
230
+ N("main.url")
231
+ ];
232
+ function J(e) {
233
+ return e.replace(/["']/g, "'").replace(/\s+/g, "");
234
+ }
235
+ function Y(e) {
236
+ if (!C.existsSync(e)) return {
237
+ status: "success",
238
+ changed: !1
239
+ };
240
+ let t = C.readFileSync(e, "utf8");
241
+ if (!t.includes("loadLocale") && !/[$#]locales\//.test(t)) return {
242
+ status: "success",
243
+ changed: !1
244
+ };
245
+ let n = new T({
246
+ compilerOptions: { allowJs: !0 },
247
+ manipulationSettings: { quoteKind: E.Single }
248
+ }).addSourceFileAtPath(e), r = n.getVariableStatements().find((e) => e.getDeclarations().some((e) => e.getName() === "load")) ?? n.getFunction("load");
249
+ if (r) {
250
+ if (J(r.getText()) !== J(c)) return {
251
+ status: "failed",
252
+ message: G
253
+ };
254
+ p(n, r);
255
+ }
256
+ for (let e of K) _(n, e);
257
+ return u(n, q), g(n) ? (C.writeFileSync(e, "", "utf8"), {
258
+ status: "success",
259
+ changed: !0
260
+ }) : (h(n), m(n), n.saveSync(), {
261
+ status: "success",
262
+ changed: n.getFullText() !== t
263
+ });
264
+ }
265
+ // src/patterns/disable/i18n/modifies/root-layout.svelte.ts
266
+ function X(e) {
267
+ if (!C.existsSync(e)) return {
268
+ status: "success",
269
+ changed: !1
270
+ };
271
+ let t = C.readFileSync(e, "utf8");
272
+ if (!t.includes("LanguageSelect")) return {
273
+ status: "success",
274
+ changed: !1
275
+ };
276
+ let n = x.fromPath(e);
277
+ n.modifyScript((e) => {
278
+ let { source: t } = l(e, (e) => {
279
+ _(e, S("components/language-select.svelte")), m(e);
280
+ });
281
+ return t;
282
+ });
283
+ let r = n.toString();
284
+ return r = r.replace(/[ \t]*<Navbar\.Item>\s*<LanguageSelect\s*\/>\s*<\/Navbar\.Item>[ \t]*\r?\n?/g, ""), r = r.replace(/[ \t]*<LanguageSelect\s*\/>[ \t]*\r?\n?/g, ""), C.writeFileSync(e, r, "utf8"), {
285
+ status: "success",
286
+ changed: r !== t
287
+ };
288
+ }
289
+ // src/patterns/disable/i18n/generate.runtime.ts
290
+ async function Z(i) {
291
+ let a = e(i), c = [], l = [], u = (e) => {
292
+ e && c.push(e);
293
+ };
294
+ a.info("Reverting vite.config");
295
+ let d = r(i.root, o) ?? w.join(i.root, o[0]);
296
+ u(n(d, A(d))), a.info("Removing #locales from package.json imports");
297
+ let f = v(i.root, Object.keys(s), s);
298
+ u(n(f.filePath, f.outcome)), a.info("Reverting the legacy $locales alias");
299
+ let p = M(i.root);
300
+ u(n(p.filePath, p.outcome)), a.info("Reverting hooks.server.ts");
301
+ let m = w.join(i.root, "src", "hooks.server.ts"), h = t(m, L(m));
302
+ u(h.modify), h.delete && l.push(h.delete), a.info("Reverting hooks.ts");
303
+ let g = w.join(i.root, "src", "hooks.ts"), _ = t(g, U(g));
304
+ u(_.modify), _.delete && l.push(_.delete), a.info("Reverting app.html");
305
+ let y = w.join(i.root, "src", "app.html");
306
+ u(n(y, W(y))), a.info("Reverting root +layout.ts");
307
+ let b = w.join(i.root, "src", "routes", "+layout.ts"), x = t(b, Y(b));
308
+ u(x.modify), x.delete && l.push(x.delete), a.info("Reverting root layout language select");
309
+ let S = [
310
+ w.join(i.root, "src", "routes", "(public)", "root-layout.svelte"),
311
+ w.join(i.root, "src", "routes", "root-layout.svelte"),
312
+ w.join(i.root, "src", "routes", "(public)", "+layout.svelte"),
313
+ w.join(i.root, "src", "routes", "+layout.svelte")
314
+ ];
315
+ for (let e of S) C.existsSync(e) && u(n(e, X(e)));
316
+ a.info("Reverting .gitignore");
317
+ let T = w.join(i.root, ".gitignore");
318
+ u(n(T, O(T))), a.info("Reverting .prettierignore");
319
+ let E = w.join(i.root, ".prettierignore");
320
+ u(n(E, k(E))), a.info("Removing wuchale's loaders from src/locales");
321
+ let D = w.join(i.root, "src", "locales");
322
+ if (C.existsSync(D)) for (let e of C.readdirSync(D, { withFileTypes: !0 })) e.isFile() && e.name.endsWith(".js") && l.push({
323
+ path: w.join(D, e.name),
324
+ language: "js",
325
+ content: "",
326
+ status: "success"
327
+ });
328
+ return {
329
+ creates: [],
330
+ modifies: c,
331
+ deletes: l,
332
+ components: [],
333
+ packages: [],
334
+ collections: [],
335
+ collectionPatches: [],
336
+ collectionDrops: []
337
+ };
338
+ }
339
+ export { Z as generate };
340
+
341
+ //# sourceMappingURL=generate.runtime-DLg2CKxQ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate.runtime-DLg2CKxQ.js","names":["FAILURE_HINT","I18N_MODULES","FAILURE_HINT","getLogger","revertOutcomeToFile","modifyOutcomeToFile","probeFirstExisting","resolveConfigTarget","saveTarget","VITE_CONFIG_CANDIDATES","LOCALES_IMPORTS","LOAD_STATEMENT","withInMemoryScript","pruneUnusedImports","removeTopLevelStatementByIdentifier","removeStatementWithComments","ensureBlankLineAfterImports","formatLikeSource","isEffectivelyEmpty","removeImportByModuleSpecifier","removePackageImports","dedent","removeHandle","SvelteFile","libModule","fs","path","unmodifyGitignore","gitignorePath","original","lines","out","i","line","j","hasWuchale","updated","unmodifyPrettierignore","filePath","at","index","unmodifyViteConfig","viteConfigPath","sourceFile","Project","QuoteKind","removed","arr","SyntaxKind","el","HINTS","unmodifyLocalesAlias","res","root","aliasProp","target","aliasObj","locales","p","localesModule","escaped","name","pattern","specifier","I18N_HANDLE","FAILURE_HINT$2","I18N_MODULES$1","unmodifyHooksServerI18n","hooksServerPath","stmt","s","moduleSpecifier","removeNamedImportIfUnused","DELOCALIZE_HELPER","FAILURE_HINT$1","I18N_MODULES","I18N_ONLY_REROUTE","COMPOSED_REROUTE","unmodifyHooksI18n","hooksPath","helperStatement","rerouteDecl","initText","composed","rerouteStatement","unmodifyAppHtml","appHtmlPath","FAILURE_HINT","SIDE_EFFECT_MODULES","BINDING_MODULES","normalize","source","unmodifyRootLayoutI18n","layoutPath","loadStatement","d","unmodifyRootLayoutLanguageSelect","file","sf","generate","logger","options","modifies","deletes","pushResult","imports","alias","hooksServerRevert","hooksRevert","layoutRevert","rootLayoutCandidates","candidate","prettierignorePath","localesDir","entry"],"sources":["../../src/patterns/disable/i18n/modifies/gitignore.ts","../../src/patterns/disable/i18n/modifies/prettierignore.ts","../../src/patterns/disable/i18n/modifies/vite-config.ts","../../src/patterns/disable/i18n/modifies/locales-alias.ts","../../src/patterns/disable/i18n/modifies/locales-module.ts","../../src/patterns/disable/i18n/modifies/hooks.server.ts","../../src/patterns/disable/i18n/modifies/hooks.ts","../../src/patterns/disable/i18n/modifies/app-html.ts","../../src/patterns/disable/i18n/modifies/+layout.ts","../../src/patterns/disable/i18n/modifies/root-layout.svelte.ts","../../src/patterns/disable/i18n/generate.runtime.ts"],"sourcesContent":["import fs from \"node:fs\";\nimport type { ModifyOutcome } from \"../../../../core/types\";\n\nexport function unmodifyGitignore(gitignorePath: string): ModifyOutcome {\n if (!fs.existsSync(gitignorePath)) {\n return { status: \"success\", changed: false };\n }\n\n const original = fs.readFileSync(gitignorePath, \"utf8\");\n if (!original.includes(\"src/locales/.wuchale\")) {\n return { status: \"success\", changed: false };\n }\n\n const lines = original.split(\"\\n\");\n const out: string[] = [];\n for (let i = 0; i < lines.length; i++) {\n const line = lines[i];\n if (line === \"# Wuchale\") {\n let j = i + 1;\n let hasWuchale = false;\n while (j < lines.length && lines[j].trim() !== \"\") {\n if (lines[j] === \"src/locales/.wuchale\") {\n hasWuchale = true;\n }\n j++;\n }\n if (hasWuchale) {\n i = j;\n continue;\n }\n }\n if (line === \"src/locales/.wuchale\") continue;\n out.push(line);\n }\n\n let updated = out.join(\"\\n\");\n updated = updated.replace(/\\n{3,}/g, \"\\n\\n\");\n\n if (updated === original) {\n return { status: \"success\", changed: false };\n }\n\n fs.writeFileSync(gitignorePath, updated);\n return { status: \"success\", changed: true };\n}\n","import fs from \"node:fs\";\nimport type { ModifyOutcome } from \"../../../../core/types\";\nimport {\n LOCALES_ENTRY,\n PRETTIERIGNORE_HEADER,\n} from \"../../../enable/i18n/modifies/prettierignore\";\n\n/** Removes the block enable-i18n appended; an entry the project wrote itself stays. */\nexport function unmodifyPrettierignore(filePath: string): ModifyOutcome {\n if (!fs.existsSync(filePath)) {\n return { status: \"success\", changed: false };\n }\n\n const original = fs.readFileSync(filePath, \"utf8\");\n const lines = original.split(\"\\n\");\n const at = lines.findIndex(\n (line, index) =>\n line === PRETTIERIGNORE_HEADER && lines[index + 1] === LOCALES_ENTRY,\n );\n if (at === -1) {\n return { status: \"success\", changed: false };\n }\n\n lines.splice(at, 2);\n // The blank line that set the block apart goes with it.\n if (at > 0 && lines[at - 1] === \"\" && (lines[at] ?? \"\") === \"\") {\n lines.splice(at - 1, 1);\n }\n fs.writeFileSync(filePath, lines.join(\"\\n\"));\n return { status: \"success\", changed: true };\n}\n","import fs from \"node:fs\";\nimport { Project, QuoteKind, SyntaxKind } from \"ts-morph\";\nimport type { ModifyOutcome } from \"../../../../core/types\";\nimport {\n removeImportByModuleSpecifier,\n formatLikeSource,\n} from \"../../../../runtime/ts-morph-helpers\";\n\n/** Remove `wuchale()` from the Vite plugins and its import. */\nexport function unmodifyViteConfig(viteConfigPath: string): ModifyOutcome {\n if (!fs.existsSync(viteConfigPath)) {\n return { status: \"success\", changed: false };\n }\n\n const original = fs.readFileSync(viteConfigPath, \"utf8\");\n if (!original.includes(\"wuchale\")) {\n return { status: \"success\", changed: false };\n }\n\n const project = new Project({\n compilerOptions: { allowJs: true },\n manipulationSettings: { quoteKind: QuoteKind.Single },\n });\n const sourceFile = project.addSourceFileAtPath(viteConfigPath);\n\n // One removal at a time: manipulating the tree invalidates sibling nodes.\n for (;;) {\n let removed = false;\n for (const arr of sourceFile.getDescendantsOfKind(\n SyntaxKind.ArrayLiteralExpression,\n )) {\n const index = arr\n .getElements()\n .findIndex((el) => el.getText().replace(/\\s/g, \"\") === \"wuchale()\");\n if (index >= 0) {\n arr.removeElement(index);\n removed = true;\n break;\n }\n }\n if (!removed) break;\n }\n\n removeImportByModuleSpecifier(sourceFile, \"wuchale/vite\");\n\n formatLikeSource(sourceFile);\n sourceFile.saveSync();\n return {\n status: \"success\",\n changed: sourceFile.getFullText() !== original,\n };\n}\n","import { SyntaxKind } from \"ts-morph\";\nimport {\n resolveConfigTarget,\n saveTarget,\n type ConfigModifyResult,\n} from \"../../../../runtime/config-target\";\n\nconst HINTS = {\n notFound: \"No SvelteKit config to revert.\",\n failed:\n \"Remove the $locales alias from the sveltekit() arg in vite.config by hand.\",\n};\n\n/**\n * Remove the `$locales` alias enable-i18n wrote before SvelteKit 3, which\n * `sv migrate sveltekit-3` moves into the inline `sveltekit({...})` arg;\n * `alias` goes too once it is empty. Projects enabled since then map\n * `#locales/*` in package.json `imports` instead.\n */\nexport function unmodifyLocalesAlias(root: string): ConfigModifyResult {\n const res = resolveConfigTarget(root, HINTS);\n // Nothing to revert in a project without a config.\n if (res.status === \"not-found\") {\n return {\n filePath: res.filePath,\n outcome: { status: \"success\", changed: false },\n };\n }\n if (res.status === \"failed\") {\n return {\n filePath: res.filePath,\n outcome: { status: \"failed\", message: res.message },\n };\n }\n\n const { target } = res;\n const aliasProp = target.configObject\n .getProperty(\"alias\")\n ?.asKind(SyntaxKind.PropertyAssignment);\n const aliasObj = aliasProp\n ?.getInitializer()\n ?.asKind(SyntaxKind.ObjectLiteralExpression);\n const locales = aliasObj\n ?.getProperties()\n .find((p) => p.getText().replace(/['\"]/g, \"\").startsWith(\"$locales\"));\n if (aliasProp && aliasObj && locales) {\n locales.remove();\n if (aliasObj.getProperties().length === 0) aliasProp.remove();\n }\n return { filePath: target.filePath, outcome: saveTarget(target) };\n}\n","/**\n * Matches an import of wuchale's `src/locales/<name>.js` the way enable-i18n\n * writes it (`#locales/main.url.js`), and the `$locales/main.url` alias form\n * it wrote before SvelteKit 3, so disabling works on either.\n */\nexport function localesModule(name: string): (specifier: string) => boolean {\n const escaped = name.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n const pattern = new RegExp(`^[$#]locales/${escaped}(\\\\.js)?$`);\n return (specifier) => pattern.test(specifier);\n}\n","import fs from \"node:fs\";\nimport dedent from \"dedent\";\nimport { Project, QuoteKind, SyntaxKind } from \"ts-morph\";\nimport type { ModifyOutcome } from \"../../../../core/types\";\nimport { removeHandle } from \"../../../../runtime/compose-handle\";\nimport {\n ensureBlankLineAfterImports,\n removeImportByModuleSpecifier,\n removeNamedImportIfUnused,\n removeTopLevelStatementByIdentifier,\n formatLikeSource,\n} from \"../../../../runtime/ts-morph-helpers\";\nimport { localesModule } from \"./locales-module\";\n\nconst I18N_HANDLE = \"handleWuchale\";\nconst FAILURE_HINT = dedent`\n Take handleWuchale out of the exported handle in src/hooks.server.ts, then\n remove its declaration, the loadLocales(...) calls and the wuchale and\n #locales imports.\n`;\n\nconst I18N_MODULES = [\n \"wuchale/load-utils/server\",\n localesModule(\"main.url\"),\n localesModule(\"data\"),\n localesModule(\"main.loader.server.svelte\"),\n localesModule(\"js.loader.server\"),\n];\n\n/**\n * Undo `modifyHooksServerI18n`: drop the locale bootstrap, the wuchale handle\n * and its imports, and unwrap `sequence(handleWuchale, ...)`. A file that\n * enable-i18n created comes out empty, for the caller to delete.\n */\nexport function unmodifyHooksServerI18n(\n hooksServerPath: string,\n): ModifyOutcome {\n if (!fs.existsSync(hooksServerPath)) {\n return { status: \"success\", changed: false };\n }\n\n const original = fs.readFileSync(hooksServerPath, \"utf8\");\n if (!original.includes(I18N_HANDLE) && !original.includes(\"loadLocales(\")) {\n return { status: \"success\", changed: false };\n }\n\n const project = new Project({\n compilerOptions: { allowJs: true },\n manipulationSettings: { quoteKind: QuoteKind.Single },\n });\n const sourceFile = project.addSourceFileAtPath(hooksServerPath);\n\n // loadLocales(...) bootstrap calls, one at a time (removal invalidates siblings).\n for (;;) {\n const stmt = sourceFile\n .getStatements()\n .find(\n (s) =>\n s.getKind() === SyntaxKind.ExpressionStatement &&\n /^loadLocales\\s*\\(/.test(s.getText()),\n );\n if (!stmt) break;\n stmt.remove();\n }\n\n // `export const handle = handleWuchale` goes altogether; a sequence loses\n // the argument, or unwraps to the handle it composed with.\n const removed = removeHandle(sourceFile, I18N_HANDLE);\n if (removed.status === \"unsupported\") {\n return { status: \"failed\", message: FAILURE_HINT };\n }\n\n removeTopLevelStatementByIdentifier(sourceFile, I18N_HANDLE);\n for (const moduleSpecifier of I18N_MODULES) {\n removeImportByModuleSpecifier(sourceFile, moduleSpecifier);\n }\n removeNamedImportIfUnused(sourceFile, \"@sveltejs/kit/hooks\", \"sequence\");\n removeNamedImportIfUnused(sourceFile, \"@sveltejs/kit/hooks\", \"Handle\");\n // A project from before SvelteKit 3 imports it from the package root.\n removeNamedImportIfUnused(sourceFile, \"@sveltejs/kit\", \"Handle\");\n\n formatLikeSource(sourceFile);\n ensureBlankLineAfterImports(sourceFile);\n sourceFile.saveSync();\n return {\n status: \"success\",\n changed: sourceFile.getFullText() !== original,\n };\n}\n","import fs from \"node:fs\";\nimport dedent from \"dedent\";\nimport { Project, QuoteKind, SyntaxKind } from \"ts-morph\";\nimport type { ModifyOutcome } from \"../../../../core/types\";\nimport {\n ensureBlankLineAfterImports,\n isEffectivelyEmpty,\n pruneUnusedImports,\n removeTopLevelStatementByIdentifier,\n formatLikeSource,\n} from \"../../../../runtime/ts-morph-helpers\";\nimport { localesModule } from \"./locales-module\";\n\nconst DELOCALIZE_HELPER = \"rerouteDeLocalize\";\n\nconst FAILURE_HINT = dedent`\n Take rerouteDeLocalize out of the exported reroute in src/hooks.ts, then\n remove its declaration and the wuchale and #locales imports.\n`;\n\nconst I18N_MODULES = [\n \"wuchale/url\",\n localesModule(\"main.url\"),\n localesModule(\"data\"),\n];\n\n/** The two reroutes `modifyHooksI18n` writes: on its own, and composed. */\nconst I18N_ONLY_REROUTE =\n /^\\(\\s*\\{\\s*url\\s*\\}\\s*\\)\\s*=>\\s*rerouteDeLocalize\\(\\s*url\\.pathname\\s*\\)$/;\nconst COMPOSED_REROUTE =\n /^\\(\\s*\\{\\s*url\\s*\\}\\s*\\)\\s*=>\\s*rerouteDeLocalize\\(\\s*negotiateReroute\\(\\s*url\\.pathname\\s*\\)\\s*\\)$/;\n\n/**\n * Undo `modifyHooksI18n`: drop the de-localizer and its imports, leaving the\n * negotiation reroute it may have been composed with. A file that enable-i18n\n * created comes out empty, for the caller to delete.\n */\nexport function unmodifyHooksI18n(hooksPath: string): ModifyOutcome {\n if (!fs.existsSync(hooksPath)) {\n return { status: \"success\", changed: false };\n }\n\n const original = fs.readFileSync(hooksPath, \"utf8\");\n if (!original.includes(DELOCALIZE_HELPER)) {\n return { status: \"success\", changed: false };\n }\n\n const project = new Project({\n compilerOptions: { allowJs: true },\n manipulationSettings: { quoteKind: QuoteKind.Single },\n });\n const sourceFile = project.addSourceFileAtPath(hooksPath);\n\n const helperStatement = sourceFile\n .getVariableDeclaration(DELOCALIZE_HELPER)\n ?.getFirstAncestorByKind(SyntaxKind.VariableStatement);\n\n const rerouteDecl = sourceFile.getVariableDeclaration(\"reroute\");\n const initText = rerouteDecl?.getInitializer()?.getText() ?? \"\";\n const composed = COMPOSED_REROUTE.test(initText);\n const rerouteStatement =\n composed || I18N_ONLY_REROUTE.test(initText)\n ? rerouteDecl?.getFirstAncestorByKind(SyntaxKind.VariableStatement)\n : undefined;\n\n // Anything else reading the de-localizer is code enable-i18n did not write,\n // so undoing it is the developer's call.\n const otherReaders = sourceFile\n .getStatements()\n .filter(\n (s) =>\n s !== helperStatement &&\n s !== rerouteStatement &&\n s.getText().includes(DELOCALIZE_HELPER),\n );\n if (otherReaders.length > 0) {\n return { status: \"failed\", message: FAILURE_HINT };\n }\n\n if (composed) {\n // content-negotiation's reroute is underneath; it stays.\n rerouteDecl?.setInitializer(\"({ url }) => negotiateReroute(url.pathname)\");\n } else if (rerouteStatement) {\n removeTopLevelStatementByIdentifier(sourceFile, \"reroute\");\n }\n\n removeTopLevelStatementByIdentifier(sourceFile, DELOCALIZE_HELPER);\n pruneUnusedImports(sourceFile, I18N_MODULES);\n\n if (isEffectivelyEmpty(sourceFile)) {\n // Emptied rather than removed: the runtime turns an empty hooks.ts into a\n // delete entry, so the removal is written and reported like any other.\n fs.writeFileSync(hooksPath, \"\", \"utf8\");\n return { status: \"success\", changed: true };\n }\n\n formatLikeSource(sourceFile);\n ensureBlankLineAfterImports(sourceFile);\n sourceFile.saveSync();\n return {\n status: \"success\",\n changed: sourceFile.getFullText() !== original,\n };\n}\n","import fs from \"node:fs\";\nimport type { ModifyOutcome } from \"../../../../core/types\";\n\n/**\n * Put a real language back. `%sveltekit.lang%` is not a SvelteKit\n * placeholder; only the wuchale hook replaced it, so without that hook it\n * would be served literally.\n */\nexport function unmodifyAppHtml(appHtmlPath: string): ModifyOutcome {\n if (!fs.existsSync(appHtmlPath)) {\n return { status: \"success\", changed: false };\n }\n\n const original = fs.readFileSync(appHtmlPath, \"utf8\");\n const updated = original.replace(\n /lang\\s*=\\s*(?:\"%sveltekit\\.lang%\"|'%sveltekit\\.lang%')/g,\n 'lang=\"en\"',\n );\n if (updated === original) {\n return { status: \"success\", changed: false };\n }\n\n fs.writeFileSync(appHtmlPath, updated, \"utf8\");\n return { status: \"success\", changed: true };\n}\n","import fs from \"node:fs\";\nimport dedent from \"dedent\";\nimport { Project, QuoteKind, type Statement } from \"ts-morph\";\nimport type { ModifyOutcome } from \"../../../../core/types\";\nimport { LOAD_STATEMENT } from \"../../../enable/i18n/modifies/+layout\";\nimport {\n ensureBlankLineAfterImports,\n isEffectivelyEmpty,\n pruneUnusedImports,\n removeImportByModuleSpecifier,\n removeStatementWithComments,\n formatLikeSource,\n type ModuleMatch,\n} from \"../../../../runtime/ts-morph-helpers\";\nimport { localesModule } from \"./locales-module\";\n\nconst FAILURE_HINT = dedent`\n src/routes/+layout.ts still loads wuchale locales. Remove these from it:\n\n import { browser } from '$app/env';\n import { loadLocale } from 'wuchale/load-utils';\n import { getLocale } from '#locales/main.url.js';\n import '#locales/main.loader.svelte.js';\n import '#locales/js.loader.js';\n\n and the loadLocale(...) call inside load().\n`;\n\nconst SIDE_EFFECT_MODULES = [\n localesModule(\"main.loader.svelte\"),\n localesModule(\"js.loader\"),\n];\nconst BINDING_MODULES: ModuleMatch[] = [\n // `$app/env`, or the module it replaced before SvelteKit 3.\n (specifier) => /^\\$app\\/env(ironment)?$/.test(specifier),\n \"wuchale/load-utils\",\n localesModule(\"main.url\"),\n];\n\nfunction normalize(source: string): string {\n return source.replace(/[\"']/g, \"'\").replace(/\\s+/g, \"\");\n}\n\n/**\n * Undo `ensureRootLayoutI18n`: drop the wuchale load and its imports, leaving\n * whatever else the file holds. A file enable-i18n wrote whole comes out\n * empty, for the caller to delete.\n */\nexport function unmodifyRootLayoutI18n(layoutPath: string): ModifyOutcome {\n if (!fs.existsSync(layoutPath)) {\n return { status: \"success\", changed: false };\n }\n\n const original = fs.readFileSync(layoutPath, \"utf8\");\n if (!original.includes(\"loadLocale\") && !/[$#]locales\\//.test(original)) {\n return { status: \"success\", changed: false };\n }\n\n const project = new Project({\n compilerOptions: { allowJs: true },\n manipulationSettings: { quoteKind: QuoteKind.Single },\n });\n const sourceFile = project.addSourceFileAtPath(layoutPath);\n\n const loadStatement: Statement | undefined =\n sourceFile\n .getVariableStatements()\n .find((s) => s.getDeclarations().some((d) => d.getName() === \"load\")) ??\n sourceFile.getFunction(\"load\");\n\n if (loadStatement) {\n // A load that grew code of its own needs a hand; only the one enable-i18n\n // wrote is safe to take out wholesale.\n if (normalize(loadStatement.getText()) !== normalize(LOAD_STATEMENT)) {\n return { status: \"failed\", message: FAILURE_HINT };\n }\n removeStatementWithComments(sourceFile, loadStatement);\n }\n\n for (const moduleSpecifier of SIDE_EFFECT_MODULES) {\n removeImportByModuleSpecifier(sourceFile, moduleSpecifier);\n }\n pruneUnusedImports(sourceFile, BINDING_MODULES);\n\n if (isEffectivelyEmpty(sourceFile)) {\n // Emptied rather than removed: the runtime turns an empty +layout.ts into\n // a delete entry, so the removal is written and reported like any other.\n fs.writeFileSync(layoutPath, \"\", \"utf8\");\n return { status: \"success\", changed: true };\n }\n\n formatLikeSource(sourceFile);\n ensureBlankLineAfterImports(sourceFile);\n sourceFile.saveSync();\n return {\n status: \"success\",\n changed: sourceFile.getFullText() !== original,\n };\n}\n","import fs from \"node:fs\";\nimport { SvelteFile } from \"../../../../runtime/svelte-file\";\nimport {\n ensureBlankLineAfterImports,\n removeImportByModuleSpecifier,\n withInMemoryScript,\n} from \"../../../../runtime/ts-morph-helpers\";\nimport type { ModifyOutcome } from \"../../../../core/types\";\nimport { libModule } from \"../../../../runtime/lib-specifier\";\n\n/** Take the language select (and the nav item enable-i18n wrapped it in) back out. */\nexport function unmodifyRootLayoutLanguageSelect(\n layoutPath: string,\n): ModifyOutcome {\n if (!fs.existsSync(layoutPath)) {\n return { status: \"success\", changed: false };\n }\n\n const original = fs.readFileSync(layoutPath, \"utf8\");\n if (!original.includes(\"LanguageSelect\")) {\n return { status: \"success\", changed: false };\n }\n\n const file = SvelteFile.fromPath(layoutPath);\n file.modifyScript((source) => {\n const { source: out } = withInMemoryScript(source, (sf) => {\n removeImportByModuleSpecifier(\n sf,\n libModule(\"components/language-select.svelte\"),\n );\n ensureBlankLineAfterImports(sf);\n });\n return out;\n });\n\n let updated = file.toString();\n updated = updated.replace(\n /[ \\t]*<Navbar\\.Item>\\s*<LanguageSelect\\s*\\/>\\s*<\\/Navbar\\.Item>[ \\t]*\\r?\\n?/g,\n \"\",\n );\n updated = updated.replace(/[ \\t]*<LanguageSelect\\s*\\/>[ \\t]*\\r?\\n?/g, \"\");\n\n fs.writeFileSync(layoutPath, updated, \"utf8\");\n return { status: \"success\", changed: updated !== original };\n}\n","import fs from \"node:fs\";\nimport path from \"node:path\";\nimport type { File, Options, Result } from \"../../../core/types\";\nimport { getLogger } from \"../../../core/logger\";\nimport {\n modifyOutcomeToFile,\n revertOutcomeToFile,\n} from \"../../../runtime/modify-file\";\nimport {\n probeFirstExisting,\n VITE_CONFIG_CANDIDATES,\n} from \"../../../runtime/config-target\";\nimport { unmodifyGitignore } from \"./modifies/gitignore\";\nimport { unmodifyPrettierignore } from \"./modifies/prettierignore\";\nimport { unmodifyViteConfig } from \"./modifies/vite-config\";\nimport { unmodifyLocalesAlias } from \"./modifies/locales-alias\";\nimport { removePackageImports } from \"../../../runtime/package-imports\";\nimport { LOCALES_IMPORTS } from \"../../enable/i18n/modifies/package-imports\";\nimport { unmodifyHooksServerI18n } from \"./modifies/hooks.server\";\nimport { unmodifyHooksI18n } from \"./modifies/hooks\";\nimport { unmodifyAppHtml } from \"./modifies/app-html\";\nimport { unmodifyRootLayoutI18n } from \"./modifies/+layout\";\nimport { unmodifyRootLayoutLanguageSelect } from \"./modifies/root-layout.svelte\";\n\nexport async function generate(options: Options) {\n const logger = getLogger(options);\n const modifies: File[] = [];\n const deletes: File[] = [];\n const pushResult = (file: File | null) => {\n if (file) modifies.push(file);\n };\n\n logger.info(\"Reverting vite.config\");\n const viteConfigPath =\n probeFirstExisting(options.root, VITE_CONFIG_CANDIDATES) ??\n path.join(options.root, VITE_CONFIG_CANDIDATES[0]);\n pushResult(\n modifyOutcomeToFile(viteConfigPath, unmodifyViteConfig(viteConfigPath)),\n );\n\n logger.info(\"Removing #locales from package.json imports\");\n // Only while it still maps where enable-i18n pointed it.\n const imports = removePackageImports(\n options.root,\n Object.keys(LOCALES_IMPORTS),\n LOCALES_IMPORTS,\n );\n pushResult(modifyOutcomeToFile(imports.filePath, imports.outcome));\n\n // A project enabled before SvelteKit 3 has the `$locales` alias instead,\n // moved into the sveltekit() arg by `vela migrate sveltekit-3`.\n logger.info(\"Reverting the legacy $locales alias\");\n const alias = unmodifyLocalesAlias(options.root);\n pushResult(modifyOutcomeToFile(alias.filePath, alias.outcome));\n\n logger.info(\"Reverting hooks.server.ts\");\n const hooksServerPath = path.join(options.root, \"src\", \"hooks.server.ts\");\n // enable-i18n may have created it; emptied, it goes.\n const hooksServerRevert = revertOutcomeToFile(\n hooksServerPath,\n unmodifyHooksServerI18n(hooksServerPath),\n );\n pushResult(hooksServerRevert.modify);\n if (hooksServerRevert.delete) deletes.push(hooksServerRevert.delete);\n\n logger.info(\"Reverting hooks.ts\");\n const hooksPath = path.join(options.root, \"src\", \"hooks.ts\");\n // The de-localizing reroute may be all it holds; emptied, it goes.\n const hooksRevert = revertOutcomeToFile(\n hooksPath,\n unmodifyHooksI18n(hooksPath),\n );\n pushResult(hooksRevert.modify);\n if (hooksRevert.delete) deletes.push(hooksRevert.delete);\n\n logger.info(\"Reverting app.html\");\n const appHtmlPath = path.join(options.root, \"src\", \"app.html\");\n pushResult(modifyOutcomeToFile(appHtmlPath, unmodifyAppHtml(appHtmlPath)));\n\n logger.info(\"Reverting root +layout.ts\");\n const layoutPath = path.join(options.root, \"src\", \"routes\", \"+layout.ts\");\n // enable-i18n may have written the whole file; emptied, it goes.\n const layoutRevert = revertOutcomeToFile(\n layoutPath,\n unmodifyRootLayoutI18n(layoutPath),\n );\n pushResult(layoutRevert.modify);\n if (layoutRevert.delete) deletes.push(layoutRevert.delete);\n\n logger.info(\"Reverting root layout language select\");\n const rootLayoutCandidates = [\n path.join(options.root, \"src\", \"routes\", \"(public)\", \"root-layout.svelte\"),\n path.join(options.root, \"src\", \"routes\", \"root-layout.svelte\"),\n path.join(options.root, \"src\", \"routes\", \"(public)\", \"+layout.svelte\"),\n path.join(options.root, \"src\", \"routes\", \"+layout.svelte\"),\n ];\n for (const candidate of rootLayoutCandidates) {\n if (!fs.existsSync(candidate)) continue;\n pushResult(\n modifyOutcomeToFile(\n candidate,\n unmodifyRootLayoutLanguageSelect(candidate),\n ),\n );\n }\n\n logger.info(\"Reverting .gitignore\");\n const gitignorePath = path.join(options.root, \".gitignore\");\n pushResult(\n modifyOutcomeToFile(gitignorePath, unmodifyGitignore(gitignorePath)),\n );\n\n logger.info(\"Reverting .prettierignore\");\n const prettierignorePath = path.join(options.root, \".prettierignore\");\n pushResult(\n modifyOutcomeToFile(\n prettierignorePath,\n unmodifyPrettierignore(prettierignorePath),\n ),\n );\n\n // wuchale's loaders import the packages this uninstalls, and without the\n // .prettierignore block they would fail the project's lint. The catalogs\n // (.po) beside them are the translations, and stay.\n logger.info(\"Removing wuchale's loaders from src/locales\");\n const localesDir = path.join(options.root, \"src\", \"locales\");\n if (fs.existsSync(localesDir)) {\n for (const entry of fs.readdirSync(localesDir, { withFileTypes: true })) {\n if (!entry.isFile() || !entry.name.endsWith(\".js\")) continue;\n deletes.push({\n path: path.join(localesDir, entry.name),\n language: \"js\",\n content: \"\",\n status: \"success\",\n });\n }\n }\n\n return {\n creates: [],\n modifies,\n deletes,\n components: [],\n packages: [],\n collections: [],\n collectionPatches: [],\n collectionDrops: [],\n } satisfies Result;\n}\n"],"mappings":";;;;;;;;;;;;;;AAGA,SAAgB2B,EAAkB,GAAsC;CACtE,IAAI,CAACF,EAAG,WAAWG,CAAa,GAC9B,OAAO;EAAE,QAAQ;EAAW,SAAS;CAAM;CAG7C,IAAMC,IAAWJ,EAAG,aAAaG,GAAe,MAAM;CACtD,IAAI,CAACC,EAAS,SAAS,sBAAsB,GAC3C,OAAO;EAAE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