@automattic/newspack-blocks 4.4.0 → 4.5.0-alpha.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 (300) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/composer.lock +12 -12
  3. package/dist/blocks/checkout-button/block.json +1 -1
  4. package/dist/blocks/donate/block.json +1 -1
  5. package/dist/editor.asset.php +1 -1
  6. package/dist/editor.js +2 -2
  7. package/dist/modal-rtl.css +1 -1
  8. package/dist/modal.asset.php +1 -1
  9. package/dist/modal.css +1 -1
  10. package/dist/modal.js +1 -1
  11. package/dist/modalCheckout-rtl.css +1 -1
  12. package/dist/modalCheckout.asset.php +1 -1
  13. package/dist/modalCheckout.css +1 -1
  14. package/dist/modalCheckout.js +1 -1
  15. package/dist/tiersBased.asset.php +1 -1
  16. package/dist/tiersBased.js +1 -1
  17. package/includes/class-modal-checkout.php +1189 -465
  18. package/includes/class-newspack-blocks.php +30 -3
  19. package/includes/tracking/class-data-events.php +191 -0
  20. package/languages/newspack-blocks-de_DE-01a5b44b8bc8d20f62541de420aa61ab.json +1 -0
  21. package/languages/newspack-blocks-de_DE-0662222bf15e7a1a7b74db2dabb48d6c.json +1 -0
  22. package/languages/newspack-blocks-de_DE-0c8dad524e2a57cee4f8efb6e35387c1.json +1 -0
  23. package/languages/newspack-blocks-de_DE-10754bc02d28d4301c103f26dbf519ce.json +1 -1
  24. package/languages/newspack-blocks-de_DE-2d52b39fdbc5d6c94b3514803f3720b8.json +1 -1
  25. package/languages/newspack-blocks-de_DE-34e5c64f90b1444f3fc735376442eada.json +1 -1
  26. package/languages/newspack-blocks-de_DE-351fd022e077061b5796bf7042446bfc.json +1 -0
  27. package/languages/newspack-blocks-de_DE-37552bb09e2a9fceec1970e3c6d46557.json +1 -1
  28. package/languages/newspack-blocks-de_DE-4b2ccb4e4dc8b3491228b2feb54872f2.json +1 -0
  29. package/languages/newspack-blocks-de_DE-4cecf783e091d36284a3e0cdafcd0fd5.json +1 -0
  30. package/languages/newspack-blocks-de_DE-4f16e21047908d19937bc10ced63acd1.json +1 -0
  31. package/languages/newspack-blocks-de_DE-4fdea541976076f02d56139fb35e5b42.json +1 -1
  32. package/languages/newspack-blocks-de_DE-501b38ac90d35730a620fb0d483702fa.json +1 -0
  33. package/languages/newspack-blocks-de_DE-53e2a1d5945b8d2b1c35e81ae1e532f3.json +1 -1
  34. package/languages/newspack-blocks-de_DE-5d4055f484eeb00e3ea0f9d8aace0897.json +1 -0
  35. package/languages/newspack-blocks-de_DE-5f70538e0223bc8a05b922cba67da6fb.json +1 -0
  36. package/languages/newspack-blocks-de_DE-6c2e53bab28419c30e1eaee70ba599cf.json +1 -0
  37. package/languages/newspack-blocks-de_DE-6ed95fb4873e6e2b81351177a44995f6.json +1 -0
  38. package/languages/newspack-blocks-de_DE-73c6d3bde805172d1993f75397e9832d.json +1 -0
  39. package/languages/newspack-blocks-de_DE-78456b164809d080adecb4d2b3895802.json +1 -1
  40. package/languages/newspack-blocks-de_DE-7b1aa64ce2d962decc04666ab86c53de.json +1 -0
  41. package/languages/newspack-blocks-de_DE-7c29764d5ef91723f5ce454f66431b9e.json +1 -1
  42. package/languages/newspack-blocks-de_DE-912a2876091ef0dca9b26f3cfc01fc9c.json +1 -0
  43. package/languages/newspack-blocks-de_DE-91a7ac8017d6e2159be1c5a3c1e372e4.json +1 -0
  44. package/languages/newspack-blocks-de_DE-969286d51bb0afe10983b9aec317b5ee.json +1 -1
  45. package/languages/newspack-blocks-de_DE-9ef9b2c60c897ad79f92951e6e9949a1.json +1 -1
  46. package/languages/newspack-blocks-de_DE-a822c3d210c89af3cb7da28eaaef929c.json +1 -1
  47. package/languages/newspack-blocks-de_DE-aa9f9057c77a46b31d7e325a4322f2da.json +1 -1
  48. package/languages/newspack-blocks-de_DE-b6d3cfc30bb16d88d7bc5384bc775543.json +1 -0
  49. package/languages/newspack-blocks-de_DE-b712270cd4eb3cae7899b50b57bdd576.json +1 -1
  50. package/languages/newspack-blocks-de_DE-babcc0ca24e7f0145b1c8f647049f085.json +1 -1
  51. package/languages/newspack-blocks-de_DE-bb66d96d450663284550bed5a3e9113e.json +1 -0
  52. package/languages/newspack-blocks-de_DE-c810378e74f20906b8193ea76adb6bc0.json +1 -0
  53. package/languages/newspack-blocks-de_DE-d3a1c55a07efd1a65e227bf120840752.json +1 -1
  54. package/languages/newspack-blocks-de_DE-d5f23a52ecbfd492ebf819c14206a9e2.json +1 -1
  55. package/languages/newspack-blocks-de_DE-d684e5c5ac51934ba20811c2f588e1d5.json +1 -1
  56. package/languages/newspack-blocks-de_DE-dd56360b115d1b39c48033c1e0749a11.json +1 -0
  57. package/languages/newspack-blocks-de_DE-e0e4434aee4db01e71268ce3edf1dd97.json +1 -0
  58. package/languages/newspack-blocks-de_DE-e58126c278611ed6c17684ba8e7459b4.json +1 -0
  59. package/languages/newspack-blocks-de_DE-ea3e2a660753c7bfa13b5bbd8a46bdd0.json +1 -0
  60. package/languages/newspack-blocks-de_DE-eccbc51a43c04f59165364eda71e0be7.json +1 -1
  61. package/languages/newspack-blocks-de_DE-eeb28f99adedd5fad3081d2756d6f4a4.json +1 -1
  62. package/languages/newspack-blocks-de_DE-f32a4d8bd8f1f1e03b6523dfaa4c9f73.json +1 -0
  63. package/languages/newspack-blocks-de_DE-f8b1589c450689398f90b179f47e74ee.json +1 -1
  64. package/languages/newspack-blocks-de_DE-f9d0b05d4d6ddd3273f1f3fb2eb2ca50.json +1 -0
  65. package/languages/newspack-blocks-de_DE-fbe7f8c598cf05d4603ba49fec909ded.json +1 -1
  66. package/languages/newspack-blocks-de_DE.mo +0 -0
  67. package/languages/newspack-blocks-de_DE.po +1409 -1458
  68. package/languages/newspack-blocks-es_ES-01a5b44b8bc8d20f62541de420aa61ab.json +1 -0
  69. package/languages/newspack-blocks-es_ES-0662222bf15e7a1a7b74db2dabb48d6c.json +1 -0
  70. package/languages/newspack-blocks-es_ES-0c8dad524e2a57cee4f8efb6e35387c1.json +1 -0
  71. package/languages/newspack-blocks-es_ES-10754bc02d28d4301c103f26dbf519ce.json +1 -1
  72. package/languages/newspack-blocks-es_ES-2d52b39fdbc5d6c94b3514803f3720b8.json +1 -1
  73. package/languages/newspack-blocks-es_ES-34e5c64f90b1444f3fc735376442eada.json +1 -1
  74. package/languages/newspack-blocks-es_ES-351fd022e077061b5796bf7042446bfc.json +1 -0
  75. package/languages/newspack-blocks-es_ES-37552bb09e2a9fceec1970e3c6d46557.json +1 -1
  76. package/languages/newspack-blocks-es_ES-4b2ccb4e4dc8b3491228b2feb54872f2.json +1 -0
  77. package/languages/newspack-blocks-es_ES-4cecf783e091d36284a3e0cdafcd0fd5.json +1 -0
  78. package/languages/newspack-blocks-es_ES-4f16e21047908d19937bc10ced63acd1.json +1 -0
  79. package/languages/newspack-blocks-es_ES-4fdea541976076f02d56139fb35e5b42.json +1 -1
  80. package/languages/newspack-blocks-es_ES-501b38ac90d35730a620fb0d483702fa.json +1 -0
  81. package/languages/newspack-blocks-es_ES-53e2a1d5945b8d2b1c35e81ae1e532f3.json +1 -1
  82. package/languages/newspack-blocks-es_ES-5d4055f484eeb00e3ea0f9d8aace0897.json +1 -0
  83. package/languages/newspack-blocks-es_ES-5f70538e0223bc8a05b922cba67da6fb.json +1 -0
  84. package/languages/newspack-blocks-es_ES-6c2e53bab28419c30e1eaee70ba599cf.json +1 -0
  85. package/languages/newspack-blocks-es_ES-6ed95fb4873e6e2b81351177a44995f6.json +1 -0
  86. package/languages/newspack-blocks-es_ES-73c6d3bde805172d1993f75397e9832d.json +1 -0
  87. package/languages/newspack-blocks-es_ES-78456b164809d080adecb4d2b3895802.json +1 -1
  88. package/languages/newspack-blocks-es_ES-7b1aa64ce2d962decc04666ab86c53de.json +1 -0
  89. package/languages/newspack-blocks-es_ES-7c29764d5ef91723f5ce454f66431b9e.json +1 -1
  90. package/languages/newspack-blocks-es_ES-912a2876091ef0dca9b26f3cfc01fc9c.json +1 -0
  91. package/languages/newspack-blocks-es_ES-91a7ac8017d6e2159be1c5a3c1e372e4.json +1 -0
  92. package/languages/newspack-blocks-es_ES-969286d51bb0afe10983b9aec317b5ee.json +1 -1
  93. package/languages/newspack-blocks-es_ES-9ef9b2c60c897ad79f92951e6e9949a1.json +1 -1
  94. package/languages/newspack-blocks-es_ES-a822c3d210c89af3cb7da28eaaef929c.json +1 -1
  95. package/languages/newspack-blocks-es_ES-aa9f9057c77a46b31d7e325a4322f2da.json +1 -1
  96. package/languages/newspack-blocks-es_ES-b6d3cfc30bb16d88d7bc5384bc775543.json +1 -0
  97. package/languages/newspack-blocks-es_ES-b712270cd4eb3cae7899b50b57bdd576.json +1 -1
  98. package/languages/newspack-blocks-es_ES-babcc0ca24e7f0145b1c8f647049f085.json +1 -1
  99. package/languages/newspack-blocks-es_ES-bb66d96d450663284550bed5a3e9113e.json +1 -0
  100. package/languages/newspack-blocks-es_ES-c810378e74f20906b8193ea76adb6bc0.json +1 -0
  101. package/languages/newspack-blocks-es_ES-d3a1c55a07efd1a65e227bf120840752.json +1 -1
  102. package/languages/newspack-blocks-es_ES-d5f23a52ecbfd492ebf819c14206a9e2.json +1 -1
  103. package/languages/newspack-blocks-es_ES-d684e5c5ac51934ba20811c2f588e1d5.json +1 -1
  104. package/languages/newspack-blocks-es_ES-dd56360b115d1b39c48033c1e0749a11.json +1 -0
  105. package/languages/newspack-blocks-es_ES-e0e4434aee4db01e71268ce3edf1dd97.json +1 -0
  106. package/languages/newspack-blocks-es_ES-e58126c278611ed6c17684ba8e7459b4.json +1 -0
  107. package/languages/newspack-blocks-es_ES-ea3e2a660753c7bfa13b5bbd8a46bdd0.json +1 -0
  108. package/languages/newspack-blocks-es_ES-eccbc51a43c04f59165364eda71e0be7.json +1 -1
  109. package/languages/newspack-blocks-es_ES-eeb28f99adedd5fad3081d2756d6f4a4.json +1 -1
  110. package/languages/newspack-blocks-es_ES-f32a4d8bd8f1f1e03b6523dfaa4c9f73.json +1 -0
  111. package/languages/newspack-blocks-es_ES-f8b1589c450689398f90b179f47e74ee.json +1 -1
  112. package/languages/newspack-blocks-es_ES-f9d0b05d4d6ddd3273f1f3fb2eb2ca50.json +1 -0
  113. package/languages/newspack-blocks-es_ES-fbe7f8c598cf05d4603ba49fec909ded.json +1 -1
  114. package/languages/newspack-blocks-es_ES.mo +0 -0
  115. package/languages/newspack-blocks-es_ES.po +1353 -1401
  116. package/languages/newspack-blocks-fr_BE-01a5b44b8bc8d20f62541de420aa61ab.json +1 -0
  117. package/languages/newspack-blocks-fr_BE-0662222bf15e7a1a7b74db2dabb48d6c.json +1 -0
  118. package/languages/newspack-blocks-fr_BE-0c8dad524e2a57cee4f8efb6e35387c1.json +1 -0
  119. package/languages/newspack-blocks-fr_BE-10754bc02d28d4301c103f26dbf519ce.json +1 -1
  120. package/languages/newspack-blocks-fr_BE-2d52b39fdbc5d6c94b3514803f3720b8.json +1 -1
  121. package/languages/newspack-blocks-fr_BE-34e5c64f90b1444f3fc735376442eada.json +1 -1
  122. package/languages/newspack-blocks-fr_BE-351fd022e077061b5796bf7042446bfc.json +1 -0
  123. package/languages/newspack-blocks-fr_BE-37552bb09e2a9fceec1970e3c6d46557.json +1 -1
  124. package/languages/newspack-blocks-fr_BE-4b2ccb4e4dc8b3491228b2feb54872f2.json +1 -0
  125. package/languages/newspack-blocks-fr_BE-4cecf783e091d36284a3e0cdafcd0fd5.json +1 -0
  126. package/languages/newspack-blocks-fr_BE-4f16e21047908d19937bc10ced63acd1.json +1 -0
  127. package/languages/newspack-blocks-fr_BE-4fdea541976076f02d56139fb35e5b42.json +1 -1
  128. package/languages/newspack-blocks-fr_BE-501b38ac90d35730a620fb0d483702fa.json +1 -0
  129. package/languages/newspack-blocks-fr_BE-53e2a1d5945b8d2b1c35e81ae1e532f3.json +1 -1
  130. package/languages/newspack-blocks-fr_BE-5d4055f484eeb00e3ea0f9d8aace0897.json +1 -0
  131. package/languages/newspack-blocks-fr_BE-5f70538e0223bc8a05b922cba67da6fb.json +1 -0
  132. package/languages/newspack-blocks-fr_BE-6c2e53bab28419c30e1eaee70ba599cf.json +1 -0
  133. package/languages/newspack-blocks-fr_BE-6ed95fb4873e6e2b81351177a44995f6.json +1 -0
  134. package/languages/newspack-blocks-fr_BE-73c6d3bde805172d1993f75397e9832d.json +1 -0
  135. package/languages/newspack-blocks-fr_BE-78456b164809d080adecb4d2b3895802.json +1 -1
  136. package/languages/newspack-blocks-fr_BE-7b1aa64ce2d962decc04666ab86c53de.json +1 -0
  137. package/languages/newspack-blocks-fr_BE-7c29764d5ef91723f5ce454f66431b9e.json +1 -1
  138. package/languages/newspack-blocks-fr_BE-912a2876091ef0dca9b26f3cfc01fc9c.json +1 -0
  139. package/languages/newspack-blocks-fr_BE-91a7ac8017d6e2159be1c5a3c1e372e4.json +1 -0
  140. package/languages/newspack-blocks-fr_BE-969286d51bb0afe10983b9aec317b5ee.json +1 -1
  141. package/languages/newspack-blocks-fr_BE-9ef9b2c60c897ad79f92951e6e9949a1.json +1 -1
  142. package/languages/newspack-blocks-fr_BE-a822c3d210c89af3cb7da28eaaef929c.json +1 -1
  143. package/languages/newspack-blocks-fr_BE-aa9f9057c77a46b31d7e325a4322f2da.json +1 -1
  144. package/languages/newspack-blocks-fr_BE-b6d3cfc30bb16d88d7bc5384bc775543.json +1 -0
  145. package/languages/newspack-blocks-fr_BE-b712270cd4eb3cae7899b50b57bdd576.json +1 -1
  146. package/languages/newspack-blocks-fr_BE-babcc0ca24e7f0145b1c8f647049f085.json +1 -1
  147. package/languages/newspack-blocks-fr_BE-bb66d96d450663284550bed5a3e9113e.json +1 -0
  148. package/languages/newspack-blocks-fr_BE-c810378e74f20906b8193ea76adb6bc0.json +1 -0
  149. package/languages/newspack-blocks-fr_BE-d3a1c55a07efd1a65e227bf120840752.json +1 -1
  150. package/languages/newspack-blocks-fr_BE-d5f23a52ecbfd492ebf819c14206a9e2.json +1 -1
  151. package/languages/newspack-blocks-fr_BE-d684e5c5ac51934ba20811c2f588e1d5.json +1 -1
  152. package/languages/newspack-blocks-fr_BE-dd56360b115d1b39c48033c1e0749a11.json +1 -0
  153. package/languages/newspack-blocks-fr_BE-e0e4434aee4db01e71268ce3edf1dd97.json +1 -0
  154. package/languages/newspack-blocks-fr_BE-e58126c278611ed6c17684ba8e7459b4.json +1 -0
  155. package/languages/newspack-blocks-fr_BE-ea3e2a660753c7bfa13b5bbd8a46bdd0.json +1 -0
  156. package/languages/newspack-blocks-fr_BE-eccbc51a43c04f59165364eda71e0be7.json +1 -1
  157. package/languages/newspack-blocks-fr_BE-eeb28f99adedd5fad3081d2756d6f4a4.json +1 -1
  158. package/languages/newspack-blocks-fr_BE-f32a4d8bd8f1f1e03b6523dfaa4c9f73.json +1 -0
  159. package/languages/newspack-blocks-fr_BE-f8b1589c450689398f90b179f47e74ee.json +1 -1
  160. package/languages/newspack-blocks-fr_BE-f9d0b05d4d6ddd3273f1f3fb2eb2ca50.json +1 -0
  161. package/languages/newspack-blocks-fr_BE-fbe7f8c598cf05d4603ba49fec909ded.json +1 -1
  162. package/languages/newspack-blocks-fr_BE.mo +0 -0
  163. package/languages/newspack-blocks-fr_BE.po +1353 -1401
  164. package/languages/newspack-blocks-nb_NO-01a5b44b8bc8d20f62541de420aa61ab.json +1 -0
  165. package/languages/newspack-blocks-nb_NO-0662222bf15e7a1a7b74db2dabb48d6c.json +1 -0
  166. package/languages/newspack-blocks-nb_NO-0c8dad524e2a57cee4f8efb6e35387c1.json +1 -0
  167. package/languages/newspack-blocks-nb_NO-10754bc02d28d4301c103f26dbf519ce.json +1 -0
  168. package/languages/newspack-blocks-nb_NO-2d52b39fdbc5d6c94b3514803f3720b8.json +1 -0
  169. package/languages/newspack-blocks-nb_NO-34e5c64f90b1444f3fc735376442eada.json +1 -0
  170. package/languages/newspack-blocks-nb_NO-351fd022e077061b5796bf7042446bfc.json +1 -0
  171. package/languages/newspack-blocks-nb_NO-37552bb09e2a9fceec1970e3c6d46557.json +1 -0
  172. package/languages/newspack-blocks-nb_NO-4b2ccb4e4dc8b3491228b2feb54872f2.json +1 -0
  173. package/languages/newspack-blocks-nb_NO-4cecf783e091d36284a3e0cdafcd0fd5.json +1 -0
  174. package/languages/newspack-blocks-nb_NO-4f16e21047908d19937bc10ced63acd1.json +1 -0
  175. package/languages/newspack-blocks-nb_NO-4fdea541976076f02d56139fb35e5b42.json +1 -0
  176. package/languages/newspack-blocks-nb_NO-501b38ac90d35730a620fb0d483702fa.json +1 -0
  177. package/languages/newspack-blocks-nb_NO-53e2a1d5945b8d2b1c35e81ae1e532f3.json +1 -0
  178. package/languages/newspack-blocks-nb_NO-5d4055f484eeb00e3ea0f9d8aace0897.json +1 -0
  179. package/languages/newspack-blocks-nb_NO-5f70538e0223bc8a05b922cba67da6fb.json +1 -0
  180. package/languages/newspack-blocks-nb_NO-6c2e53bab28419c30e1eaee70ba599cf.json +1 -0
  181. package/languages/newspack-blocks-nb_NO-6ed95fb4873e6e2b81351177a44995f6.json +1 -0
  182. package/languages/newspack-blocks-nb_NO-73c6d3bde805172d1993f75397e9832d.json +1 -0
  183. package/languages/newspack-blocks-nb_NO-78456b164809d080adecb4d2b3895802.json +1 -0
  184. package/languages/newspack-blocks-nb_NO-7b1aa64ce2d962decc04666ab86c53de.json +1 -0
  185. package/languages/newspack-blocks-nb_NO-7c29764d5ef91723f5ce454f66431b9e.json +1 -0
  186. package/languages/newspack-blocks-nb_NO-912a2876091ef0dca9b26f3cfc01fc9c.json +1 -0
  187. package/languages/newspack-blocks-nb_NO-91a7ac8017d6e2159be1c5a3c1e372e4.json +1 -0
  188. package/languages/newspack-blocks-nb_NO-969286d51bb0afe10983b9aec317b5ee.json +1 -0
  189. package/languages/newspack-blocks-nb_NO-9ef9b2c60c897ad79f92951e6e9949a1.json +1 -0
  190. package/languages/newspack-blocks-nb_NO-a822c3d210c89af3cb7da28eaaef929c.json +1 -0
  191. package/languages/newspack-blocks-nb_NO-aa9f9057c77a46b31d7e325a4322f2da.json +1 -0
  192. package/languages/newspack-blocks-nb_NO-b6d3cfc30bb16d88d7bc5384bc775543.json +1 -0
  193. package/languages/newspack-blocks-nb_NO-b712270cd4eb3cae7899b50b57bdd576.json +1 -0
  194. package/languages/newspack-blocks-nb_NO-babcc0ca24e7f0145b1c8f647049f085.json +1 -0
  195. package/languages/newspack-blocks-nb_NO-bb66d96d450663284550bed5a3e9113e.json +1 -0
  196. package/languages/newspack-blocks-nb_NO-c810378e74f20906b8193ea76adb6bc0.json +1 -0
  197. package/languages/newspack-blocks-nb_NO-d3a1c55a07efd1a65e227bf120840752.json +1 -0
  198. package/languages/newspack-blocks-nb_NO-d5f23a52ecbfd492ebf819c14206a9e2.json +1 -0
  199. package/languages/newspack-blocks-nb_NO-d684e5c5ac51934ba20811c2f588e1d5.json +1 -0
  200. package/languages/newspack-blocks-nb_NO-dd56360b115d1b39c48033c1e0749a11.json +1 -0
  201. package/languages/newspack-blocks-nb_NO-e0e4434aee4db01e71268ce3edf1dd97.json +1 -0
  202. package/languages/newspack-blocks-nb_NO-e58126c278611ed6c17684ba8e7459b4.json +1 -0
  203. package/languages/newspack-blocks-nb_NO-ea3e2a660753c7bfa13b5bbd8a46bdd0.json +1 -0
  204. package/languages/newspack-blocks-nb_NO-eccbc51a43c04f59165364eda71e0be7.json +1 -0
  205. package/languages/newspack-blocks-nb_NO-eeb28f99adedd5fad3081d2756d6f4a4.json +1 -0
  206. package/languages/newspack-blocks-nb_NO-f32a4d8bd8f1f1e03b6523dfaa4c9f73.json +1 -0
  207. package/languages/newspack-blocks-nb_NO-f8b1589c450689398f90b179f47e74ee.json +1 -0
  208. package/languages/newspack-blocks-nb_NO-f9d0b05d4d6ddd3273f1f3fb2eb2ca50.json +1 -0
  209. package/languages/newspack-blocks-nb_NO-fbe7f8c598cf05d4603ba49fec909ded.json +1 -0
  210. package/languages/newspack-blocks-nb_NO.mo +0 -0
  211. package/languages/newspack-blocks-nb_NO.po +1372 -1414
  212. package/languages/newspack-blocks-pt_PT-01a5b44b8bc8d20f62541de420aa61ab.json +1 -0
  213. package/languages/newspack-blocks-pt_PT-0662222bf15e7a1a7b74db2dabb48d6c.json +1 -0
  214. package/languages/newspack-blocks-pt_PT-0c8dad524e2a57cee4f8efb6e35387c1.json +1 -0
  215. package/languages/newspack-blocks-pt_PT-10754bc02d28d4301c103f26dbf519ce.json +1 -1
  216. package/languages/newspack-blocks-pt_PT-2d52b39fdbc5d6c94b3514803f3720b8.json +1 -1
  217. package/languages/newspack-blocks-pt_PT-34e5c64f90b1444f3fc735376442eada.json +1 -1
  218. package/languages/newspack-blocks-pt_PT-351fd022e077061b5796bf7042446bfc.json +1 -0
  219. package/languages/newspack-blocks-pt_PT-37552bb09e2a9fceec1970e3c6d46557.json +1 -1
  220. package/languages/newspack-blocks-pt_PT-4b2ccb4e4dc8b3491228b2feb54872f2.json +1 -0
  221. package/languages/newspack-blocks-pt_PT-4cecf783e091d36284a3e0cdafcd0fd5.json +1 -0
  222. package/languages/newspack-blocks-pt_PT-4f16e21047908d19937bc10ced63acd1.json +1 -0
  223. package/languages/newspack-blocks-pt_PT-4fdea541976076f02d56139fb35e5b42.json +1 -1
  224. package/languages/newspack-blocks-pt_PT-501b38ac90d35730a620fb0d483702fa.json +1 -0
  225. package/languages/newspack-blocks-pt_PT-53e2a1d5945b8d2b1c35e81ae1e532f3.json +1 -1
  226. package/languages/newspack-blocks-pt_PT-5d4055f484eeb00e3ea0f9d8aace0897.json +1 -0
  227. package/languages/newspack-blocks-pt_PT-5f70538e0223bc8a05b922cba67da6fb.json +1 -0
  228. package/languages/newspack-blocks-pt_PT-6c2e53bab28419c30e1eaee70ba599cf.json +1 -0
  229. package/languages/newspack-blocks-pt_PT-6ed95fb4873e6e2b81351177a44995f6.json +1 -0
  230. package/languages/newspack-blocks-pt_PT-73c6d3bde805172d1993f75397e9832d.json +1 -0
  231. package/languages/newspack-blocks-pt_PT-78456b164809d080adecb4d2b3895802.json +1 -1
  232. package/languages/newspack-blocks-pt_PT-7b1aa64ce2d962decc04666ab86c53de.json +1 -0
  233. package/languages/newspack-blocks-pt_PT-7c29764d5ef91723f5ce454f66431b9e.json +1 -1
  234. package/languages/newspack-blocks-pt_PT-912a2876091ef0dca9b26f3cfc01fc9c.json +1 -0
  235. package/languages/newspack-blocks-pt_PT-91a7ac8017d6e2159be1c5a3c1e372e4.json +1 -0
  236. package/languages/newspack-blocks-pt_PT-969286d51bb0afe10983b9aec317b5ee.json +1 -1
  237. package/languages/newspack-blocks-pt_PT-9ef9b2c60c897ad79f92951e6e9949a1.json +1 -1
  238. package/languages/newspack-blocks-pt_PT-a822c3d210c89af3cb7da28eaaef929c.json +1 -1
  239. package/languages/newspack-blocks-pt_PT-aa9f9057c77a46b31d7e325a4322f2da.json +1 -1
  240. package/languages/newspack-blocks-pt_PT-b6d3cfc30bb16d88d7bc5384bc775543.json +1 -0
  241. package/languages/newspack-blocks-pt_PT-b712270cd4eb3cae7899b50b57bdd576.json +1 -1
  242. package/languages/newspack-blocks-pt_PT-babcc0ca24e7f0145b1c8f647049f085.json +1 -1
  243. package/languages/newspack-blocks-pt_PT-bb66d96d450663284550bed5a3e9113e.json +1 -0
  244. package/languages/newspack-blocks-pt_PT-c810378e74f20906b8193ea76adb6bc0.json +1 -0
  245. package/languages/newspack-blocks-pt_PT-d3a1c55a07efd1a65e227bf120840752.json +1 -1
  246. package/languages/newspack-blocks-pt_PT-d5f23a52ecbfd492ebf819c14206a9e2.json +1 -1
  247. package/languages/newspack-blocks-pt_PT-d684e5c5ac51934ba20811c2f588e1d5.json +1 -1
  248. package/languages/newspack-blocks-pt_PT-dd56360b115d1b39c48033c1e0749a11.json +1 -0
  249. package/languages/newspack-blocks-pt_PT-e0e4434aee4db01e71268ce3edf1dd97.json +1 -0
  250. package/languages/newspack-blocks-pt_PT-e58126c278611ed6c17684ba8e7459b4.json +1 -0
  251. package/languages/newspack-blocks-pt_PT-ea3e2a660753c7bfa13b5bbd8a46bdd0.json +1 -0
  252. package/languages/newspack-blocks-pt_PT-eccbc51a43c04f59165364eda71e0be7.json +1 -1
  253. package/languages/newspack-blocks-pt_PT-eeb28f99adedd5fad3081d2756d6f4a4.json +1 -1
  254. package/languages/newspack-blocks-pt_PT-f32a4d8bd8f1f1e03b6523dfaa4c9f73.json +1 -0
  255. package/languages/newspack-blocks-pt_PT-f8b1589c450689398f90b179f47e74ee.json +1 -1
  256. package/languages/newspack-blocks-pt_PT-f9d0b05d4d6ddd3273f1f3fb2eb2ca50.json +1 -0
  257. package/languages/newspack-blocks-pt_PT-fbe7f8c598cf05d4603ba49fec909ded.json +1 -1
  258. package/languages/newspack-blocks-pt_PT.mo +0 -0
  259. package/languages/newspack-blocks-pt_PT.po +1418 -1466
  260. package/languages/newspack-blocks.pot +1650 -1590
  261. package/newspack-blocks.php +4 -2
  262. package/package.json +3 -3
  263. package/src/blocks/author-profile/class-wp-rest-newspack-authors-controller.php +7 -1
  264. package/src/blocks/checkout-button/block.json +1 -1
  265. package/src/blocks/checkout-button/deprecated.js +106 -0
  266. package/src/blocks/checkout-button/edit.js +14 -3
  267. package/src/blocks/checkout-button/index.js +3 -3
  268. package/src/blocks/checkout-button/view.php +167 -5
  269. package/src/blocks/donate/block.json +1 -1
  270. package/src/blocks/donate/frontend/class-newspack-blocks-donate-renderer-base.php +11 -2
  271. package/src/blocks/donate/frontend/class-newspack-blocks-donate-renderer-frequency-based.php +38 -14
  272. package/src/blocks/donate/frontend/class-newspack-blocks-donate-renderer-tiers-based.php +22 -6
  273. package/src/blocks/donate/tiers-based/view.ts +23 -0
  274. package/src/modal-checkout/accessibility.js +84 -0
  275. package/src/modal-checkout/analytics/ga4/README.md +45 -0
  276. package/src/modal-checkout/analytics/ga4/checkout-attempt.js +33 -0
  277. package/src/modal-checkout/analytics/ga4/dismissed.js +38 -0
  278. package/src/modal-checkout/analytics/ga4/loaded.js +43 -0
  279. package/src/modal-checkout/analytics/ga4/opened.js +64 -0
  280. package/src/modal-checkout/analytics/ga4/pagination.js +33 -0
  281. package/src/modal-checkout/analytics/ga4/utils/index.js +40 -0
  282. package/src/modal-checkout/analytics/index.js +5 -0
  283. package/src/modal-checkout/checkout.scss +692 -218
  284. package/src/modal-checkout/index.js +777 -29
  285. package/src/modal-checkout/modal.js +782 -165
  286. package/src/modal-checkout/modal.scss +211 -131
  287. package/src/modal-checkout/templates/empty-html-add-recipient.php +15 -0
  288. package/src/modal-checkout/templates/form-checkout.php +52 -0
  289. package/src/modal-checkout/templates/form-coupon.php +22 -0
  290. package/src/modal-checkout/templates/form-gift-subscription.php +34 -0
  291. package/src/modal-checkout/templates/payment-method.php +11 -10
  292. package/src/modal-checkout/templates/thankyou.php +43 -69
  293. package/src/modal-checkout/utils.js +42 -0
  294. package/vendor/autoload.php +1 -1
  295. package/vendor/composer/autoload_real.php +4 -4
  296. package/vendor/composer/autoload_static.php +2 -2
  297. package/vendor/composer/installed.php +2 -2
  298. package/src/blocks/checkout-button/save.js +0 -91
  299. package/src/modal-checkout/templates/billing-form.php +0 -43
  300. package/src/modal-checkout/templates/checkout-form.php +0 -182
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [4.5.0-alpha.2](https://github.com/Automattic/newspack-blocks/compare/v4.5.0-alpha.1...v4.5.0-alpha.2) (2024-12-04)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * remove reCaptcha for WooCommere code from modal checkout ([#1984](https://github.com/Automattic/newspack-blocks/issues/1984)) ([8e250eb](https://github.com/Automattic/newspack-blocks/commit/8e250eb8ef95ca960509beba9dcd6e7526aa9dc6))
7
+
1
8
  # [4.4.0](https://github.com/Automattic/newspack-blocks/compare/v4.3.7...v4.4.0) (2024-11-25)
2
9
 
3
10
 
package/composer.lock CHANGED
@@ -2469,16 +2469,16 @@
2469
2469
  },
2470
2470
  {
2471
2471
  "name": "sirbrillig/phpcs-variable-analysis",
2472
- "version": "v2.11.19",
2472
+ "version": "v2.11.21",
2473
2473
  "source": {
2474
2474
  "type": "git",
2475
2475
  "url": "https://github.com/sirbrillig/phpcs-variable-analysis.git",
2476
- "reference": "bc8d7e30e2005bce5c59018b7cdb08e9fb45c0d1"
2476
+ "reference": "eb2b351927098c24860daa7484e290d3eed693be"
2477
2477
  },
2478
2478
  "dist": {
2479
2479
  "type": "zip",
2480
- "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/bc8d7e30e2005bce5c59018b7cdb08e9fb45c0d1",
2481
- "reference": "bc8d7e30e2005bce5c59018b7cdb08e9fb45c0d1",
2480
+ "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/eb2b351927098c24860daa7484e290d3eed693be",
2481
+ "reference": "eb2b351927098c24860daa7484e290d3eed693be",
2482
2482
  "shasum": ""
2483
2483
  },
2484
2484
  "require": {
@@ -2489,9 +2489,9 @@
2489
2489
  "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || ^1.0",
2490
2490
  "phpcsstandards/phpcsdevcs": "^1.1",
2491
2491
  "phpstan/phpstan": "^1.7",
2492
- "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.5 || ^7.0 || ^8.0 || ^9.0",
2492
+ "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.5 || ^7.0 || ^8.0 || ^9.0 || ^10.5.32 || ^11.3.3",
2493
2493
  "sirbrillig/phpcs-import-detection": "^1.1",
2494
- "vimeo/psalm": "^0.2 || ^0.3 || ^1.1 || ^4.24 || ^5.0@beta"
2494
+ "vimeo/psalm": "^0.2 || ^0.3 || ^1.1 || ^4.24 || ^5.0"
2495
2495
  },
2496
2496
  "type": "phpcodesniffer-standard",
2497
2497
  "autoload": {
@@ -2523,20 +2523,20 @@
2523
2523
  "source": "https://github.com/sirbrillig/phpcs-variable-analysis",
2524
2524
  "wiki": "https://github.com/sirbrillig/phpcs-variable-analysis/wiki"
2525
2525
  },
2526
- "time": "2024-06-26T20:08:34+00:00"
2526
+ "time": "2024-12-02T16:37:49+00:00"
2527
2527
  },
2528
2528
  {
2529
2529
  "name": "squizlabs/php_codesniffer",
2530
- "version": "3.10.1",
2530
+ "version": "3.11.1",
2531
2531
  "source": {
2532
2532
  "type": "git",
2533
2533
  "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
2534
- "reference": "8f90f7a53ce271935282967f53d0894f8f1ff877"
2534
+ "reference": "19473c30efe4f7b3cd42522d0b2e6e7f243c6f87"
2535
2535
  },
2536
2536
  "dist": {
2537
2537
  "type": "zip",
2538
- "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/8f90f7a53ce271935282967f53d0894f8f1ff877",
2539
- "reference": "8f90f7a53ce271935282967f53d0894f8f1ff877",
2538
+ "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/19473c30efe4f7b3cd42522d0b2e6e7f243c6f87",
2539
+ "reference": "19473c30efe4f7b3cd42522d0b2e6e7f243c6f87",
2540
2540
  "shasum": ""
2541
2541
  },
2542
2542
  "require": {
@@ -2603,7 +2603,7 @@
2603
2603
  "type": "open_collective"
2604
2604
  }
2605
2605
  ],
2606
- "time": "2024-05-22T21:24:41+00:00"
2606
+ "time": "2024-11-16T12:02:36+00:00"
2607
2607
  },
2608
2608
  {
2609
2609
  "name": "symfony/console",
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "afterSuccessButtonLabel": {
48
48
  "type": "string",
49
- "default": "Continue browsing"
49
+ "default": "Continue"
50
50
  },
51
51
  "afterSuccessURL": {
52
52
  "type": "string"
@@ -89,7 +89,7 @@
89
89
  },
90
90
  "afterSuccessButtonLabel": {
91
91
  "type": "string",
92
- "default": "Continue browsing"
92
+ "default": "Continue"
93
93
  },
94
94
  "afterSuccessURL": {
95
95
  "type": "string"
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-primitives', 'wp-url'), 'version' => '7cc7f9d28c7ee8ef12be');
1
+ <?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-primitives', 'wp-url'), 'version' => '9c4a1506a621ea65adf1');
package/dist/editor.js CHANGED
@@ -23,13 +23,13 @@
23
23
  (0,t.__)("%s only","newspack-blocks"),"guest-authors"===L?(0,t.__)("Guest authors","newspack-blocks"):(0,t.__)("WP users","newspack-blocks"))),selected:L||"all",options:[{label:(0,t.__)("All authors","newspack-blocks"),value:"all"},{label:(0,t.__)("Guest authors","newspack-blocks"),value:"guest-authors"},{label:(0,t.__)("WP users","newspack-blocks"),value:"users"}],onChange:e=>s({authorType:e})})}),W&&(0,a.jsx)(u.PanelRow,{children:(0,a.jsx)(u.RangeControl,{label:(0,t.__)("Columns","newspack-blocks"),value:D,onChange:e=>s({columns:e}),min:2,max:6,required:!0})}),"guest-authors"!==L&&(0,a.jsx)(u.PanelRow,{children:(0,a.jsx)(u.BaseControl,{id:"newspack-blocks__author-list-roles",label:(0,t.__)("WP User Roles","newspack-blocks"),children:A.map(((e,t)=>(0,a.jsx)(u.CheckboxControl,{checked:-1<O.indexOf(e),label:e,value:e,onChange:t=>{const n=t?[...O,e]:O.filter((t=>t!==e));s({authorRoles:n})}},t)))})}),(0,a.jsx)(u.PanelRow,{children:(0,a.jsx)(u.ToggleControl,{label:(0,t.__)("Display alphabetical separators","newspack-blocks"),help:(0,t.__)("Chunk authors alphabetically.","newspack-blocks"),checked:$,onChange:()=>s({showSeparators:!$})})}),W&&$&&(0,a.jsx)(u.PanelRow,{children:(0,a.jsx)(u.ToggleControl,{label:(0,t.__)("Group authors by alphabet","newspack-blocks"),help:(0,t.__)("Display each alphabetical chunk as a discrete section.","newspack-blocks"),checked:F,onChange:()=>s({separatorSections:!F})})})]}),(0,a.jsxs)(u.PanelBody,{title:(0,t.__)("Author List Exclusions","newspack-block"),children:[(0,a.jsx)(u.PanelRow,{children:(0,a.jsx)(u.ToggleControl,{label:(0,t.__)("Exclude authors with 0 posts","newspack-blocks"),help:(0,t.sprintf)(
24
24
  // Translators: Help message for "include empty authors" toggle.
25
25
  // Translators: Help message for "include empty authors" toggle.
26
- (0,t.__)("Authors with no published posts will be %s.","newspack-blocks"),N?(0,t.__)("hidden","newspack-blocks"):(0,t.__)("displayed","newspack-blocks")),checked:N,onChange:()=>s({excludeEmpty:!N})})}),(0,a.jsx)(u.PanelRow,{children:(0,a.jsx)(_.IW,{label:(0,t.__)("Search by author name","newspack-blocks"),help:(0,t.__)("Authors selected here will not be displayed.","newspack-blocks"),fetchSuggestions:async(e=null,n=0)=>{const r=await l()({parse:!1,path:(0,v.addQueryArgs)("/newspack-blocks/v1/authors",{search:e,offset:n,fields:"id,name"})}),s=parseInt(r.headers.get("x-wp-total")||0),a=await r.json();return T||e||M(s),a.map((e=>({value:e.id,label:(0,p.decodeEntities)(e.name)||(0,t.__)("(no name)","newspack-blocks"),isGuest:e.is_guest})))},maxItemsToSuggest:T,multiSelect:!0,onChange:e=>s({exclude:e}),postTypeLabel:(0,t.__)("author","newspack-blocks"),postTypeLabelPlural:(0,t.__)("authors","newspack-blocks"),selectedItems:z})})]}),(0,a.jsxs)(u.PanelBody,{title:(0,t.__)("Author Profile Settings","newspack-blocks"),children:[(0,a.jsx)(u.BaseControl,{label:(0,t.__)("Text Size","newspack-blocks"),id:"newspack-blocks__text-size-control",children:(0,a.jsx)(u.PanelRow,{children:(0,a.jsx)(u.ButtonGroup,{id:"newspack-blocks__text-size-control-buttons","aria-label":(0,t.__)("Text Size","newspack-blocks"),children:b.$A.map((e=>{const t=H===e.value;return(0,a.jsx)(u.Button,{isPrimary:t,"aria-pressed":t,"aria-label":e.label,onClick:()=>s({textSize:e.value}),children:e.shortName},e.value)}))})})}),(0,a.jsx)(y.P,{attributes:e,setAttributes:s})]}),(0,a.jsxs)(u.PanelBody,{title:(0,t.__)("Avatar Settings","newspack-blocks"),children:[(0,a.jsx)(u.PanelRow,{children:(0,a.jsx)(u.ToggleControl,{label:(0,t.__)("Display avatar","newspack-blocks"),checked:B,onChange:()=>s({showAvatar:!B})})}),B&&(0,a.jsx)(u.PanelRow,{children:(0,a.jsx)(u.ToggleControl,{label:(0,t.__)("Hide default avatar","newspack-blocks"),checked:G,onChange:()=>s({avatarHideDefault:!G})})}),B&&(0,a.jsx)(u.BaseControl,{label:(0,t.__)("Avatar Size","newspack-blocks"),id:"newspack-blocks__avatar-size-control",children:(0,a.jsx)(u.PanelRow,{children:(0,a.jsx)(u.ButtonGroup,{id:"newspack-blocks__avatar-size-control-buttons","aria-label":(0,t.__)("Avatar Size","newspack-blocks"),children:b.dM.map((e=>{const t=U===e.value;return(0,a.jsx)(u.Button,{isPrimary:t,"aria-pressed":t,"aria-label":e.label,onClick:()=>s({avatarSize:e.value}),children:e.shortName},e.value)}))})})}),B&&(0,a.jsx)(u.PanelRow,{children:(0,a.jsx)(u.__experimentalUnitControl,{label:(0,t.__)("Avatar border radius","newspack-blocks"),labelPosition:"edge",__unstableInputWidth:"80px",units:b.MD,value:V,onChange:e=>s({avatarBorderRadius:0>parseFloat(e)?"0":e})})})]})]}),o&&!j&&(0,a.jsxs)(c.BlockControls,{children:[(0,a.jsx)(u.Toolbar,{controls:[{icon:(0,a.jsx)(r.A,{icon:i}),title:(0,t.__)("List","newspack-blocks"),isActive:"list"===R,onClick:()=>{s({layout:"list"})}},{icon:(0,a.jsx)(r.A,{icon:h}),title:(0,t.__)("Columns","newspack-blocks"),isActive:W,onClick:()=>{s({layout:"columns"})}}]}),B&&"is-style-center"!==e.className&&(0,a.jsx)(u.Toolbar,{controls:[{icon:(0,a.jsx)(r.A,{icon:f.A}),title:(0,t.__)("Show avatar on left","newspack-blocks"),isActive:"left"===q,onClick:()=>s({avatarAlignment:"left"})},{icon:(0,a.jsx)(r.A,{icon:m.A}),title:(0,t.__)("Show avatar on right","newspack-blocks"),isActive:"right"===q,onClick:()=>s({avatarAlignment:"right"})}]}),(0,a.jsx)(u.Toolbar,{controls:[{icon:(0,a.jsx)(r.A,{icon:g.A}),title:(0,t.__)("Edit selection","newspack-blocks"),onClick:()=>{s({authorId:0})}}]})]}),(0,a.jsxs)("div",{className:k()(e.className,"wp-block-newspack-blocks-author-list"),children:[!j&&!S&&o&&Array.isArray(o)&&(0,a.jsx)(a.Fragment,{children:W&&$&&F?Object.keys(X).map(((t,r)=>(0,a.jsxs)(d.Fragment,{children:[(0,a.jsx)("h2",{className:"newspack-blocks__author-list-separator",id:`newspack-blocks__author-list-separator__${n}__${t}`,children:t}),(0,a.jsx)("ul",{className:k()("newspack-blocks__author-list-container",{"is-columns":W,[`columns-${D}`]:W}),children:X[t].map(((t,n)=>(0,a.jsx)("li",{className:"newspack-blocks__author-list-item",children:(0,a.jsx)(w.S,{author:t,attributes:e})},n)))})]},r))):(0,a.jsx)("ul",{className:k()("newspack-blocks__author-list-container",{"is-columns":W,[`columns-${D}`]:W}),children:o.map(((t,r)=>{const{last_name:s}=t,i=s.charAt(0).toUpperCase(),o=0>I.indexOf(i);return o&&I.push(i),(0,a.jsxs)(d.Fragment,{children:[$&&o&&(0,a.jsx)("li",{className:"newspack-blocks__author-list-item",children:(0,a.jsx)("h2",{className:"newspack-blocks__author-list-separator",id:`newspack-blocks__author-list-separator__${n}__${i}`,children:i})}),(0,a.jsx)("li",{className:"newspack-blocks__author-list-item",children:(0,a.jsx)(w.S,{author:t,attributes:e})})]},r)}))})}),(!o||j)&&(0,a.jsxs)(u.Placeholder,{icon:(0,a.jsx)(r.A,{icon:i}),label:(0,t.__)("Author List","newspack-blocks"),children:[S&&(0,a.jsx)(u.Notice,{status:"error",isDismissible:!1,children:S}),j&&(0,a.jsxs)("div",{className:"is-loading",children:[(0,t.__)("Fetching authors…","newspack-blocks"),(0,a.jsx)(u.Spinner,{})]})]})]})]})},save:()=>null};(0,e.registerBlockType)(`newspack-blocks/${E}`,M)})(),(()=>{"use strict";var e=n(4997),t=n(7723),r=n(7677),s=n(4161),a=n(3019);const i=JSON.parse('{"UU":"author-profile","L1":"newspack","uK":{"className":{"type":"string","default":""},"authorId":{"type":"number","default":0},"isGuestAuthor":{"type":"boolean","default":true},"showBio":{"type":"boolean","default":true},"showSocial":{"type":"boolean","default":true},"showEmail":{"type":"boolean","default":true},"showArchiveLink":{"type":"boolean","default":true},"textSize":{"type":"string","default":"medium"},"showAvatar":{"type":"boolean","default":true},"avatarAlignment":{"type":"string","default":"left"},"avatarBorderRadius":{"type":"string","default":"50%"},"avatarSize":{"type":"number","default":128},"avatarHideDefault":{"type":"boolean","default":false}}}');var o=n(790);const{UU:l,uK:c,L1:u}=i,d=(0,t.__)("Author Profile","newspack-blocks");(window.newspack_blocks_data?.author_custom_fields||[]).forEach((e=>{c[`show${e.name}`]={type:"boolean",default:!0}}));const p={title:d,icon:{src:(0,o.jsx)(r.A,{icon:s.A}),foreground:"#36f"},keywords:[(0,t.__)("author","newspack-blocks"),(0,t.__)("profile","newspack-blocks")],description:(0,t.__)("Display an author profile card.","newspack-blocks"),styles:[{name:"default",label:(0,t._x)("Default","block style","newspack-blocks"),isDefault:!0},{name:"center",label:(0,t._x)("Centered","block style","newspack-blocks")}],attributes:c,category:u,supports:{html:!1,default:""},edit:a.Ay,save:()=>null};(0,e.registerBlockType)(`newspack-blocks/${l}`,p)})(),(()=>{"use strict";var e=n(4997),t=n(4993);(0,e.registerBlockType)(`newspack-blocks/${t.UU}`,t.W0)})(),(()=>{"use strict";var e=n(2619),t=n(4997),r=n(7677),s=n(5573),a=n(790);const i=(0,a.jsx)(s.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(s.Path,{d:"M8 12.5h8V11H8v1.5Z M19 6.5H5a2 2 0 0 0-2 2V15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a2 2 0 0 0-2-2ZM5 8h14a.5.5 0 0 1 .5.5V15a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V8.5A.5.5 0 0 1 5 8Z"})});var o=n(6942),l=n.n(o),c=n(8468),u=n(7723),d=n(4715),p=n(6427),h=n(6087),f=n(1455),m=n.n(f),g=n(8614);function v(e){const t=[];for(const n of e.attributes)t.push(n.name+": "+n.option);return t.join(", ")}function b(e){return{isNYP:newspack_blocks_data?.can_use_name_your_price&&e?.meta_data?.some((e=>"_nyp"===e.key&&"yes"===e.value)),suggestedPrice:e?.meta_data?.find((e=>"_suggested_price"===e.key))?.value,minPrice:e?.meta_data?.find((e=>"_min_price"===e.key))?.value,maxPrice:e?.meta_data?.find((e=>"_maximum_price"===e.key))?.value}}function w({selectedWidth:e,setAttributes:t}){return(0,a.jsx)(p.PanelBody,{title:(0,u.__)("Width settings","newspack-blocks"),children:(0,a.jsx)(p.ButtonGroup,{"aria-label":(0,u.__)("Button width","newspack-blocks"),children:[25,50,75,100].map((n=>(0,a.jsxs)(p.Button,{size:"small",variant:n===e?"primary":void 0,onClick:()=>{var r;t({width:e===(r=n)?void 0:r})},children:[n,"%"]},n)))})})}function y(e){const[t,n]=(0,h.useState)(!1),[r,s]=(0,h.useState)({}),[i,o]=(0,h.useState)(!1),[l,d]=(0,h.useState)(!1);(0,h.useEffect)((()=>{d(!1),e.value?(n(!0),m()({path:`/wc/v2/products/${e.value}`}).then((t=>{s({[t.id]:`${t.id}: ${t.name}`}),o(t),e.onProduct(t)})).finally((()=>n(!1)))):o(!1)}),[e.value]);const f=(0,c.debounce)((function(e){return n(!0),m()({path:`/wc/v2/products?search=${encodeURIComponent(e)}`}).then((e=>{const t={};e.forEach((e=>{t[e.id]=`${e.id}: ${e.name}`})),s(t)})).finally((()=>n(!1)))}),200);return e.value&&!i&&t?(0,a.jsx)(p.Spinner,{}):(0,a.jsx)("div",{className:"newspack-checkout-button__product-field",children:i&&!l?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.BaseControl,{className:"newspack-checkout-button__product-field__selected",help:(0,u.__)("Click to change the selected product","newspack-blocks"),children:(0,a.jsx)(p.Button,{isSecondary:!0,onClick:()=>d(!0),"aria-label":(0,u.__)("Change the selected product","newspack-blocks"),children:i.name})}),e.children]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"newspack-checkout-button__product-field__tokenfield",children:[(0,a.jsx)(p.FormTokenField,{placeholder:e.placeholder||(0,u.__)("Type to search for a product…","newspack-blocks"),label:(0,u.__)("Select a product","newspack-blocks"),maxLength:1,onChange:function(t){const n=t[0],s=(0,c.invert)(r)[n];d(!1),e.onChange(s)},onInputChange:e=>{e.length>2?(n(!0),f(e)):n(!1)},suggestions:Object.values(r)}),t&&(0,a.jsx)(p.Spinner,{})]}),i&&(0,a.jsx)(p.Button,{isSecondary:!0,onClick:()=>d(!1),children:(0,u.__)("Cancel","newspack-blocks")})]})})}const _=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"newspack-blocks/checkout-button","title":"Checkout Button","category":"newspack","description":"Modal checkout button for WooCommerce products.","keywords":["woocommerce","product","checkout","button"],"textdomain":"newspack-blocks","attributes":{"product":{"type":"string"},"variation":{"type":"string"},"is_variable":{"type":"boolean","default":false},"price":{"type":"string"},"text":{"type":"string"},"placeholder":{"type":"string"},"backgroundColor":{"type":"string"},"textColor":{"type":"string"},"gradient":{"type":"string"},"afterSuccessBehavior":{"type":"string"},"afterSuccessButtonLabel":{"type":"string","default":"Continue browsing"},"afterSuccessURL":{"type":"string"},"width":{"type":"number"}},"supports":{"anchor":true,"align":["center","wide"],"color":{"__experimentalSkipSerialization":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"shadow":true,"spacing":{"__experimentalSkipSerialization":true,"padding":["horizontal","vertical"],"__experimentalDefaultControls":{"padding":true}},"__experimentalBorder":{"radius":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"radius":true}}},"styles":[{"name":"fill","label":"Fill","isDefault":true},{"name":"outline","label":"Outline"}],"editorStyle":"newspack-checkout-button-editor","style":"newspack-checkout-block-button"}'),{name:x}=_,k={..._,icon:{src:(0,a.jsx)(r.A,{icon:i}),foreground:"#36f"},edit:function(e){const{attributes:t,setAttributes:n,className:r}=e,{placeholder:s,style:i,text:o,product:c,price:f,variation:_,width:x}=t,[k,S]=(0,h.useState)({}),[E,j]=(0,h.useState)([]),[C,T]=(0,h.useState)(!1);(0,h.useEffect)((()=>{_?m()({path:`/wc/v2/products/${c}/variations/${_}`}).then((e=>T(b(e)))).catch((()=>T({}))):T(b(k))}),[_]),(0,h.useEffect)((()=>{!f&&C?.suggestedPrice&&n({price:C.suggestedPrice})}),[C]);const M=(0,d.__experimentalUseBorderProps)(t),P=(0,d.__experimentalUseColorProps)(t),A=(0,d.__experimentalGetSpacingClassesAndStyles)(t),I=(0,d.useBlockProps)();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{...I,className:l()(I.className,{"wp-block-button":!0,"has-custom-font-size":I.style.fontSize,[`has-custom-width wp-block-button__width-${x}`]:x}),children:(0,a.jsx)(d.RichText,{"aria-label":(0,u.__)("Button text"),placeholder:s||(0,u.__)("Add text…"),value:o,onChange:e=>{n({text:e.replace(/<\/?a[^>]*>/g,"")})},withoutInteractiveFormatting:!0,className:l()(r,"wp-block-button__link","wp-block-newspack-blocks-checkout-button__button",P.className,M.className,{"no-border-radius":0===i?.border?.radius}),style:{...M.style,...P.style,...A.style},identifier:"text"})}),(0,a.jsxs)(d.InspectorControls,{children:[(0,a.jsx)(p.PanelBody,{title:(0,u.__)("Product","newspack-blocks"),children:(0,a.jsx)(y,{value:c,price:f,onChange:e=>n({product:e,variation:"",price:""}),onProduct:function(e){S(e),e?.variations?.length?(n({is_variable:!0}),m()({path:`/wc/v2/products/${e.id}/variations?per_page=100`}).then((e=>j(e))).catch((()=>j([])))):(n({is_variable:!1}),j([])),_||T(b(e))},children:k?.variations?.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.CheckboxControl,{label:(0,u.__)("Allow the reader to select the variation before checkout.","newspack-blocks"),checked:!_,onChange:e=>n({variation:e?"":E[0].id.toString(),price:""})}),E.length?(0,a.jsx)(p.SelectControl,{label:(0,u.__)("Variation","newspack-blocks"),help:(0,u.__)("Select the product variation to be added to cart.","newspack-blocks"),value:_,disabled:!_,options:[{label:"--",value:""},...E.map((e=>({label:v(e),value:e.id})))],onChange:e=>n({variation:e.toString(),price:""})}):(0,a.jsx)(p.Spinner,{})]})})}),(0,a.jsx)(p.PanelBody,{title:(0,u.__)("After purchase","newspack-blocks"),children:(0,a.jsx)(g.A,{setAttributes:n,attributes:t})}),C?.isNYP&&(0,a.jsxs)(p.PanelBody,{title:(0,u.__)("Name Your Price","newspack-blocks"),children:[(0,a.jsx)("p",{children:(0,u.__)('This product has "Name Your Price" toggled on. You can set the custom price for this checkout.',"newspack-blocks")}),(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{children:(0,u.__)("Suggested price:","newspack-blocks")})," ",C.suggestedPrice||0,C.minPrice&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("br",{}),(0,a.jsx)("strong",{children:(0,u.__)("Minimum price:","newspack-blocks")})," ",C.minPrice]}),C.maxPrice&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("br",{}),(0,a.jsx)("strong",{children:(0,u.__)("Maximum price:","newspack-blocks")})," ",C.maxPrice]})]}),(0,a.jsx)(p.TextControl,{type:"number",label:(0,u.__)("Custom Price","newspack-blocks"),placeholder:C.suggestedPrice,value:f,min:parseFloat(C.minPrice)||null,max:parseFloat(C.maxPrice)||null,onChange:e=>n({price:e})})]})]}),(0,a.jsx)(d.InspectorControls,{children:(0,a.jsx)(w,{selectedWidth:x,setAttributes:n})})]})},save:function({attributes:e,className:t}){const{textAlign:n,fontSize:r,style:s,text:i,product:o,price:c,variation:u,is_variable:p,width:h}=e;if(!i||!o)return null;const f=(0,d.__experimentalGetBorderClassesAndStyles)(e),m=(0,d.__experimentalGetColorClassesAndStyles)(e),g=(0,d.__experimentalGetSpacingClassesAndStyles)(e),v=l()("wp-block-button__link",m.className,f.className,{[`has-text-align-${n}`]:n,"no-border-radius":0===s?.border?.radius}),b={...f.style,...m.style,...g.style},w=l()(t,"wp-block-button",{"has-custom-font-size":r||s?.typography?.fontSize,[`has-custom-width wp-block-button__width-${h}`]:h});return(0,a.jsx)("div",{...d.useBlockProps.save({className:w}),children:(0,a.jsxs)("form",{children:[(0,a.jsx)(d.RichText.Content,{tagName:"button",className:v,style:b,value:i}),(0,a.jsx)("input",{type:"hidden",name:"product_id",value:o}),(0,a.jsx)("input",{type:"hidden",name:"newspack_checkout",value:"1"}),c&&(0,a.jsx)("input",{type:"hidden",name:"price",value:c}),u&&(0,a.jsx)("input",{type:"hidden",name:"variation_id",value:u}),p&&(0,a.jsx)("input",{type:"hidden",name:"is_variable",value:"1"}),e.afterSuccessBehavior&&(0,a.jsx)("input",{type:"hidden",name:"after_success_behavior",value:e.afterSuccessBehavior}),e.afterSuccessButtonLabel&&(0,a.jsx)("input",{type:"hidden",name:"after_success_button_label",value:e.afterSuccessButtonLabel}),e.afterSuccessBehavior&&(0,a.jsx)("input",{type:"hidden",name:"after_success_url",value:e.afterSuccessURL||""})]})})}};(0,t.registerBlockType)(x,k),(0,e.addFilter)("blockEditor.useSetting.before","newspack-blocks/add-border-radius-support",((e,t,n,r)=>"border.radius"===t&&"newspack-blocks/checkout-button"===r||e))})(),(()=>{"use strict";var e=n(4997),t=n(6427),r=n(7723),s=n(5573),a=n(790);const i=(0,a.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(s.Path,{fillRule:"evenodd",d:"M5.5 9.5v-2h13v2h-13zm0 3v4h13v-4h-13zM4 7a1 1 0 011-1h14a1 1 0 011 1v10a1 1 0 01-1 1H5a1 1 0 01-1-1V7z",clipRule:"evenodd"})});var o=n(6942),l=n.n(o),c=n(7736),u=n(1455),d=n.n(u),p=n(6087),h=n(4715),f=n(8468),m=n(7677),g=n(9223),v=n(1573);const b=e=>{const t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,((e,t,n,r)=>"#"+t+t+n+n+r+r)).substring(1).match(/.{2}/g);return null===t?[0,0,0]:t.map((e=>parseInt(e,16)))},w=e=>{const t="#000000";if(void 0===e)return t;const n=b(e),r=b(t),s=.2126*Math.pow(n[0]/255,2.2)+.7152*Math.pow(n[1]/255,2.2)+.0722*Math.pow(n[2]/255,2.2),a=.2126*Math.pow(r[0]/255,2.2)+.7152*Math.pow(r[1]/255,2.2)+.0722*Math.pow(r[2]/255,2.2);return(s>a?(s+.05)/(a+.05):(a+.05)/(s+.05))>5?t:"#ffffff"},y=(e,t,n)=>{const r="month"===e?1:12;return[t[0]*r,t[1]*r,t[2]*r,n*r]},_=(e,t=!1)=>"once"===e?t?"":(0,r.__)(" once","newspack-blocks"):(0,r.sprintf)(
26
+ (0,t.__)("Authors with no published posts will be %s.","newspack-blocks"),N?(0,t.__)("hidden","newspack-blocks"):(0,t.__)("displayed","newspack-blocks")),checked:N,onChange:()=>s({excludeEmpty:!N})})}),(0,a.jsx)(u.PanelRow,{children:(0,a.jsx)(_.IW,{label:(0,t.__)("Search by author name","newspack-blocks"),help:(0,t.__)("Authors selected here will not be displayed.","newspack-blocks"),fetchSuggestions:async(e=null,n=0)=>{const r=await l()({parse:!1,path:(0,v.addQueryArgs)("/newspack-blocks/v1/authors",{search:e,offset:n,fields:"id,name"})}),s=parseInt(r.headers.get("x-wp-total")||0),a=await r.json();return T||e||M(s),a.map((e=>({value:e.id,label:(0,p.decodeEntities)(e.name)||(0,t.__)("(no name)","newspack-blocks"),isGuest:e.is_guest})))},maxItemsToSuggest:T,multiSelect:!0,onChange:e=>s({exclude:e}),postTypeLabel:(0,t.__)("author","newspack-blocks"),postTypeLabelPlural:(0,t.__)("authors","newspack-blocks"),selectedItems:z})})]}),(0,a.jsxs)(u.PanelBody,{title:(0,t.__)("Author Profile Settings","newspack-blocks"),children:[(0,a.jsx)(u.BaseControl,{label:(0,t.__)("Text Size","newspack-blocks"),id:"newspack-blocks__text-size-control",children:(0,a.jsx)(u.PanelRow,{children:(0,a.jsx)(u.ButtonGroup,{id:"newspack-blocks__text-size-control-buttons","aria-label":(0,t.__)("Text Size","newspack-blocks"),children:b.$A.map((e=>{const t=H===e.value;return(0,a.jsx)(u.Button,{isPrimary:t,"aria-pressed":t,"aria-label":e.label,onClick:()=>s({textSize:e.value}),children:e.shortName},e.value)}))})})}),(0,a.jsx)(y.P,{attributes:e,setAttributes:s})]}),(0,a.jsxs)(u.PanelBody,{title:(0,t.__)("Avatar Settings","newspack-blocks"),children:[(0,a.jsx)(u.PanelRow,{children:(0,a.jsx)(u.ToggleControl,{label:(0,t.__)("Display avatar","newspack-blocks"),checked:B,onChange:()=>s({showAvatar:!B})})}),B&&(0,a.jsx)(u.PanelRow,{children:(0,a.jsx)(u.ToggleControl,{label:(0,t.__)("Hide default avatar","newspack-blocks"),checked:G,onChange:()=>s({avatarHideDefault:!G})})}),B&&(0,a.jsx)(u.BaseControl,{label:(0,t.__)("Avatar Size","newspack-blocks"),id:"newspack-blocks__avatar-size-control",children:(0,a.jsx)(u.PanelRow,{children:(0,a.jsx)(u.ButtonGroup,{id:"newspack-blocks__avatar-size-control-buttons","aria-label":(0,t.__)("Avatar Size","newspack-blocks"),children:b.dM.map((e=>{const t=U===e.value;return(0,a.jsx)(u.Button,{isPrimary:t,"aria-pressed":t,"aria-label":e.label,onClick:()=>s({avatarSize:e.value}),children:e.shortName},e.value)}))})})}),B&&(0,a.jsx)(u.PanelRow,{children:(0,a.jsx)(u.__experimentalUnitControl,{label:(0,t.__)("Avatar border radius","newspack-blocks"),labelPosition:"edge",__unstableInputWidth:"80px",units:b.MD,value:V,onChange:e=>s({avatarBorderRadius:0>parseFloat(e)?"0":e})})})]})]}),o&&!j&&(0,a.jsxs)(c.BlockControls,{children:[(0,a.jsx)(u.Toolbar,{controls:[{icon:(0,a.jsx)(r.A,{icon:i}),title:(0,t.__)("List","newspack-blocks"),isActive:"list"===R,onClick:()=>{s({layout:"list"})}},{icon:(0,a.jsx)(r.A,{icon:h}),title:(0,t.__)("Columns","newspack-blocks"),isActive:W,onClick:()=>{s({layout:"columns"})}}]}),B&&"is-style-center"!==e.className&&(0,a.jsx)(u.Toolbar,{controls:[{icon:(0,a.jsx)(r.A,{icon:f.A}),title:(0,t.__)("Show avatar on left","newspack-blocks"),isActive:"left"===q,onClick:()=>s({avatarAlignment:"left"})},{icon:(0,a.jsx)(r.A,{icon:m.A}),title:(0,t.__)("Show avatar on right","newspack-blocks"),isActive:"right"===q,onClick:()=>s({avatarAlignment:"right"})}]}),(0,a.jsx)(u.Toolbar,{controls:[{icon:(0,a.jsx)(r.A,{icon:g.A}),title:(0,t.__)("Edit selection","newspack-blocks"),onClick:()=>{s({authorId:0})}}]})]}),(0,a.jsxs)("div",{className:k()(e.className,"wp-block-newspack-blocks-author-list"),children:[!j&&!S&&o&&Array.isArray(o)&&(0,a.jsx)(a.Fragment,{children:W&&$&&F?Object.keys(X).map(((t,r)=>(0,a.jsxs)(d.Fragment,{children:[(0,a.jsx)("h2",{className:"newspack-blocks__author-list-separator",id:`newspack-blocks__author-list-separator__${n}__${t}`,children:t}),(0,a.jsx)("ul",{className:k()("newspack-blocks__author-list-container",{"is-columns":W,[`columns-${D}`]:W}),children:X[t].map(((t,n)=>(0,a.jsx)("li",{className:"newspack-blocks__author-list-item",children:(0,a.jsx)(w.S,{author:t,attributes:e})},n)))})]},r))):(0,a.jsx)("ul",{className:k()("newspack-blocks__author-list-container",{"is-columns":W,[`columns-${D}`]:W}),children:o.map(((t,r)=>{const{last_name:s}=t,i=s.charAt(0).toUpperCase(),o=0>I.indexOf(i);return o&&I.push(i),(0,a.jsxs)(d.Fragment,{children:[$&&o&&(0,a.jsx)("li",{className:"newspack-blocks__author-list-item",children:(0,a.jsx)("h2",{className:"newspack-blocks__author-list-separator",id:`newspack-blocks__author-list-separator__${n}__${i}`,children:i})}),(0,a.jsx)("li",{className:"newspack-blocks__author-list-item",children:(0,a.jsx)(w.S,{author:t,attributes:e})})]},r)}))})}),(!o||j)&&(0,a.jsxs)(u.Placeholder,{icon:(0,a.jsx)(r.A,{icon:i}),label:(0,t.__)("Author List","newspack-blocks"),children:[S&&(0,a.jsx)(u.Notice,{status:"error",isDismissible:!1,children:S}),j&&(0,a.jsxs)("div",{className:"is-loading",children:[(0,t.__)("Fetching authors…","newspack-blocks"),(0,a.jsx)(u.Spinner,{})]})]})]})]})},save:()=>null};(0,e.registerBlockType)(`newspack-blocks/${E}`,M)})(),(()=>{"use strict";var e=n(4997),t=n(7723),r=n(7677),s=n(4161),a=n(3019);const i=JSON.parse('{"UU":"author-profile","L1":"newspack","uK":{"className":{"type":"string","default":""},"authorId":{"type":"number","default":0},"isGuestAuthor":{"type":"boolean","default":true},"showBio":{"type":"boolean","default":true},"showSocial":{"type":"boolean","default":true},"showEmail":{"type":"boolean","default":true},"showArchiveLink":{"type":"boolean","default":true},"textSize":{"type":"string","default":"medium"},"showAvatar":{"type":"boolean","default":true},"avatarAlignment":{"type":"string","default":"left"},"avatarBorderRadius":{"type":"string","default":"50%"},"avatarSize":{"type":"number","default":128},"avatarHideDefault":{"type":"boolean","default":false}}}');var o=n(790);const{UU:l,uK:c,L1:u}=i,d=(0,t.__)("Author Profile","newspack-blocks");(window.newspack_blocks_data?.author_custom_fields||[]).forEach((e=>{c[`show${e.name}`]={type:"boolean",default:!0}}));const p={title:d,icon:{src:(0,o.jsx)(r.A,{icon:s.A}),foreground:"#36f"},keywords:[(0,t.__)("author","newspack-blocks"),(0,t.__)("profile","newspack-blocks")],description:(0,t.__)("Display an author profile card.","newspack-blocks"),styles:[{name:"default",label:(0,t._x)("Default","block style","newspack-blocks"),isDefault:!0},{name:"center",label:(0,t._x)("Centered","block style","newspack-blocks")}],attributes:c,category:u,supports:{html:!1,default:""},edit:a.Ay,save:()=>null};(0,e.registerBlockType)(`newspack-blocks/${l}`,p)})(),(()=>{"use strict";var e=n(4997),t=n(4993);(0,e.registerBlockType)(`newspack-blocks/${t.UU}`,t.W0)})(),(()=>{"use strict";var e=n(2619),t=n(4997),r=n(7677),s=n(5573),a=n(790);const i=(0,a.jsx)(s.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(s.Path,{d:"M8 12.5h8V11H8v1.5Z M19 6.5H5a2 2 0 0 0-2 2V15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a2 2 0 0 0-2-2ZM5 8h14a.5.5 0 0 1 .5.5V15a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V8.5A.5.5 0 0 1 5 8Z"})});var o=n(6942),l=n.n(o),c=n(8468),u=n(7723),d=n(4715),p=n(6427),h=n(6087),f=n(1455),m=n.n(f),g=n(8614);function v(e){const t=[];for(const n of e.attributes)t.push(n.name+": "+n.option);return t.join(", ")}function b(e){return{isNYP:newspack_blocks_data?.can_use_name_your_price&&e?.meta_data?.some((e=>"_nyp"===e.key&&"yes"===e.value)),suggestedPrice:e?.meta_data?.find((e=>"_suggested_price"===e.key))?.value,minPrice:e?.meta_data?.find((e=>"_min_price"===e.key))?.value,maxPrice:e?.meta_data?.find((e=>"_maximum_price"===e.key))?.value}}function w({selectedWidth:e,setAttributes:t}){return(0,a.jsx)(p.PanelBody,{title:(0,u.__)("Width settings","newspack-blocks"),children:(0,a.jsx)(p.ButtonGroup,{"aria-label":(0,u.__)("Button width","newspack-blocks"),children:[25,50,75,100].map((n=>(0,a.jsxs)(p.Button,{size:"small",variant:n===e?"primary":void 0,onClick:()=>{var r;t({width:e===(r=n)?void 0:r})},children:[n,"%"]},n)))})})}function y(e){const[t,n]=(0,h.useState)(!1),[r,s]=(0,h.useState)({}),[i,o]=(0,h.useState)(!1),[l,d]=(0,h.useState)(!1);(0,h.useEffect)((()=>{d(!1),e.value?(n(!0),m()({path:`/wc/v2/products/${e.value}`}).then((t=>{s({[t.id]:`${t.id}: ${t.name}`}),o(t),e.onProduct(t)})).finally((()=>n(!1)))):o(!1)}),[e.value]);const f=(0,c.debounce)((function(e){return n(!0),m()({path:`/wc/v2/products?search=${encodeURIComponent(e)}`}).then((e=>{const t={};e.forEach((e=>{(""!==e.price||b(e).isNYP)&&(t[e.id]=`${e.id}: ${e.name}`)})),s(t)})).finally((()=>n(!1)))}),200);return e.value&&!i&&t?(0,a.jsx)(p.Spinner,{}):(0,a.jsx)("div",{className:"newspack-checkout-button__product-field",children:i&&!l?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.BaseControl,{className:"newspack-checkout-button__product-field__selected",help:(0,u.__)("Click to change the selected product","newspack-blocks"),children:(0,a.jsx)(p.Button,{isSecondary:!0,onClick:()=>d(!0),"aria-label":(0,u.__)("Change the selected product","newspack-blocks"),children:i.name})}),e.children]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"newspack-checkout-button__product-field__tokenfield",children:[(0,a.jsx)(p.FormTokenField,{placeholder:e.placeholder||(0,u.__)("Type to search for a product…","newspack-blocks"),label:(0,u.__)("Select a product","newspack-blocks"),maxLength:1,onChange:function(t){const n=t[0],s=(0,c.invert)(r)[n];d(!1),e.onChange(s)},onInputChange:e=>{e.length>2?(n(!0),f(e)):n(!1)},suggestions:Object.values(r)}),t&&(0,a.jsx)(p.Spinner,{})]}),i&&(0,a.jsx)(p.Button,{isSecondary:!0,onClick:()=>d(!1),children:(0,u.__)("Cancel","newspack-blocks")})]})})}const _=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"newspack-blocks/checkout-button","title":"Checkout Button","category":"newspack","description":"Modal checkout button for WooCommerce products.","keywords":["woocommerce","product","checkout","button"],"textdomain":"newspack-blocks","attributes":{"product":{"type":"string"},"variation":{"type":"string"},"is_variable":{"type":"boolean","default":false},"price":{"type":"string"},"text":{"type":"string"},"placeholder":{"type":"string"},"backgroundColor":{"type":"string"},"textColor":{"type":"string"},"gradient":{"type":"string"},"afterSuccessBehavior":{"type":"string"},"afterSuccessButtonLabel":{"type":"string","default":"Continue"},"afterSuccessURL":{"type":"string"},"width":{"type":"number"}},"supports":{"anchor":true,"align":["center","wide"],"color":{"__experimentalSkipSerialization":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"shadow":true,"spacing":{"__experimentalSkipSerialization":true,"padding":["horizontal","vertical"],"__experimentalDefaultControls":{"padding":true}},"__experimentalBorder":{"radius":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"radius":true}}},"styles":[{"name":"fill","label":"Fill","isDefault":true},{"name":"outline","label":"Outline"}],"editorStyle":"newspack-checkout-button-editor","style":"newspack-checkout-block-button"}'),x=[{..._,attributes:{..._.attributes,afterSuccessButtonLabel:{type:"string",default:"Continue browsing"}},save({attributes:e,className:t}){const{textAlign:n,fontSize:r,style:s,text:i,product:o,price:c,variation:u,is_variable:p,width:h}=e;if(!i||!o)return null;const f=(0,d.__experimentalGetBorderClassesAndStyles)(e),m=(0,d.__experimentalGetColorClassesAndStyles)(e),g=(0,d.__experimentalGetSpacingClassesAndStyles)(e),v=l()("wp-block-button__link",m.className,f.className,{[`has-text-align-${n}`]:n,"no-border-radius":0===s?.border?.radius}),b={...f.style,...m.style,...g.style},w=l()(t,"wp-block-button",{"has-custom-font-size":r||s?.typography?.fontSize,[`has-custom-width wp-block-button__width-${h}`]:h});return(0,a.jsx)("div",{...d.useBlockProps.save({className:w}),children:(0,a.jsxs)("form",{children:[(0,a.jsx)(d.RichText.Content,{tagName:"button",className:v,style:b,value:i}),(0,a.jsx)("input",{type:"hidden",name:"product_id",value:o}),(0,a.jsx)("input",{type:"hidden",name:"newspack_checkout",value:"1"}),c&&(0,a.jsx)("input",{type:"hidden",name:"price",value:c}),u&&(0,a.jsx)("input",{type:"hidden",name:"variation_id",value:u}),p&&(0,a.jsx)("input",{type:"hidden",name:"is_variable",value:"1"}),e.afterSuccessBehavior&&(0,a.jsx)("input",{type:"hidden",name:"after_success_behavior",value:e.afterSuccessBehavior}),e.afterSuccessButtonLabel&&(0,a.jsx)("input",{type:"hidden",name:"after_success_button_label",value:e.afterSuccessButtonLabel}),e.afterSuccessBehavior&&(0,a.jsx)("input",{type:"hidden",name:"after_success_url",value:e.afterSuccessURL||""})]})})}}],{name:k}=_,S={..._,icon:{src:(0,a.jsx)(r.A,{icon:i}),foreground:"#36f"},edit:function(e){const{attributes:t,setAttributes:n,className:r}=e,{placeholder:s,style:i,text:o,product:c,price:f,variation:_,width:x}=t,[k,S]=(0,h.useState)({}),[E,j]=(0,h.useState)([]),[C,T]=(0,h.useState)(!1);(0,h.useEffect)((()=>{_?m()({path:`/wc/v2/products/${c}/variations/${_}`}).then((e=>T(b(e)))).catch((()=>T({}))):T(b(k))}),[_]),(0,h.useEffect)((()=>{!f&&C?.suggestedPrice&&n({price:C.suggestedPrice})}),[C]);const M=(0,d.__experimentalUseBorderProps)(t),P=(0,d.__experimentalUseColorProps)(t),A=(0,d.__experimentalGetSpacingClassesAndStyles)(t),I=(0,d.useBlockProps)();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{...I,className:l()(I.className,{"wp-block-button":!0,"has-custom-font-size":I.style.fontSize,[`has-custom-width wp-block-button__width-${x}`]:x}),children:(0,a.jsx)(d.RichText,{"aria-label":(0,u.__)("Button text"),placeholder:s||(0,u.__)("Add text…"),value:o,onChange:e=>{n({text:e.replace(/<\/?a[^>]*>/g,"")})},withoutInteractiveFormatting:!0,className:l()(r,"wp-block-button__link","wp-block-newspack-blocks-checkout-button__button",P.className,M.className,{"no-border-radius":0===i?.border?.radius}),style:{...M.style,...P.style,...A.style},identifier:"text"})}),(0,a.jsxs)(d.InspectorControls,{children:[(0,a.jsx)(p.PanelBody,{title:(0,u.__)("Product","newspack-blocks"),children:(0,a.jsx)(y,{value:c,price:f,onChange:e=>n({product:e,variation:"",price:""}),onProduct:function(e){S(e),e?.variations?.length?(n({is_variable:!0}),m()({path:`/wc/v2/products/${e.id}/variations?per_page=100`}).then((e=>{const t=[];e.forEach((e=>{(""!==e.price||b(e).isNYP)&&t.push(e)})),j(t)})).catch((()=>j([])))):(n({is_variable:!1}),j([])),_||T(b(e))},children:k?.variations?.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.CheckboxControl,{label:(0,u.__)("Allow the reader to select the variation before checkout.","newspack-blocks"),checked:!_,onChange:e=>n({variation:e?"":E[0].id.toString(),price:""})}),E.length?(0,a.jsx)(p.SelectControl,{label:(0,u.__)("Variation","newspack-blocks"),help:(0,u.__)("Select the product variation to be added to cart.","newspack-blocks"),value:_,disabled:!_,options:[{label:"--",value:""},...E.map((e=>({label:v(e),value:e.id})))],onChange:e=>n({variation:e.toString(),price:""})}):(0,a.jsx)(p.Spinner,{})]})})}),(0,a.jsx)(p.PanelBody,{title:(0,u.__)("After purchase","newspack-blocks"),children:(0,a.jsx)(g.A,{setAttributes:n,attributes:t})}),C?.isNYP&&(0,a.jsxs)(p.PanelBody,{title:(0,u.__)("Name Your Price","newspack-blocks"),children:[(0,a.jsx)("p",{children:(0,u.__)('This product has "Name Your Price" toggled on. You can set the custom price for this checkout.',"newspack-blocks")}),(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{children:(0,u.__)("Suggested price:","newspack-blocks")})," ",C.suggestedPrice||0,C.minPrice&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("br",{}),(0,a.jsx)("strong",{children:(0,u.__)("Minimum price:","newspack-blocks")})," ",C.minPrice]}),C.maxPrice&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("br",{}),(0,a.jsx)("strong",{children:(0,u.__)("Maximum price:","newspack-blocks")})," ",C.maxPrice]})]}),(0,a.jsx)(p.TextControl,{type:"number",label:(0,u.__)("Custom Price","newspack-blocks"),placeholder:C.suggestedPrice,value:f,min:parseFloat(C.minPrice)||null,max:parseFloat(C.maxPrice)||null,onChange:e=>n({price:e})})]})]}),(0,a.jsx)(d.InspectorControls,{children:(0,a.jsx)(w,{selectedWidth:x,setAttributes:n})})]})},deprecated:x,save:()=>null};(0,t.registerBlockType)(k,S),(0,e.addFilter)("blockEditor.useSetting.before","newspack-blocks/add-border-radius-support",((e,t,n,r)=>"border.radius"===t&&"newspack-blocks/checkout-button"===r||e))})(),(()=>{"use strict";var e=n(4997),t=n(6427),r=n(7723),s=n(5573),a=n(790);const i=(0,a.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(s.Path,{fillRule:"evenodd",d:"M5.5 9.5v-2h13v2h-13zm0 3v4h13v-4h-13zM4 7a1 1 0 011-1h14a1 1 0 011 1v10a1 1 0 01-1 1H5a1 1 0 01-1-1V7z",clipRule:"evenodd"})});var o=n(6942),l=n.n(o),c=n(7736),u=n(1455),d=n.n(u),p=n(6087),h=n(4715),f=n(8468),m=n(7677),g=n(9223),v=n(1573);const b=e=>{const t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,((e,t,n,r)=>"#"+t+t+n+n+r+r)).substring(1).match(/.{2}/g);return null===t?[0,0,0]:t.map((e=>parseInt(e,16)))},w=e=>{const t="#000000";if(void 0===e)return t;const n=b(e),r=b(t),s=.2126*Math.pow(n[0]/255,2.2)+.7152*Math.pow(n[1]/255,2.2)+.0722*Math.pow(n[2]/255,2.2),a=.2126*Math.pow(r[0]/255,2.2)+.7152*Math.pow(r[1]/255,2.2)+.0722*Math.pow(r[2]/255,2.2);return(s>a?(s+.05)/(a+.05):(a+.05)/(s+.05))>5?t:"#ffffff"},y=(e,t,n)=>{const r="month"===e?1:12;return[t[0]*r,t[1]*r,t[2]*r,n*r]},_=(e,t=!1)=>"once"===e?t?"":(0,r.__)(" once","newspack-blocks"):(0,r.sprintf)(
27
27
  // Translators: %s is the frequency (e.g. per month, per year).
28
28
  // Translators: %s is the frequency (e.g. per month, per year).
29
29
  (0,r._x)(" per %s","per `Frequency`","newspack-blocks"),e),x=(e,t,n=!1)=>{const s=window.newspack_blocks_data?.tier_amounts_template;if(!s)try{const n=new Intl.NumberFormat(navigator?.language||"en-US",{style:"currency",currency:"USD"}),s="once"===t?t:(0,r.sprintf)(
30
30
  // Translators: %s is the %s is the frequency.
31
31
  // Translators: %s is the %s is the frequency.
32
- (0,r.__)("per %s","newspack-blocks"),t);return('<span class="price-amount">'+n.format(e)+'</span> <span class="tier-frequency">'+s+"</span>").replace(".00","")}catch(t){return'<span class="price-amount">'+e+"</span>"}const a=(e||0).toFixed(2).replace(/\.?0*$/,""),i=_(t,n);return s.replace("AMOUNT_PLACEHOLDER",a).replace("FREQUENCY_PLACEHOLDER",i)},k={once:(0,r.__)("One-time","newspack-blocks"),month:(0,r.__)("Monthly","newspack-blocks"),year:(0,r.__)("Annually","newspack-blocks")},S=Object.keys(k),E=[{label:(0,r.__)("Frequency","newspack-blocks"),key:"frequency"},{label:(0,r.__)("Tiers","newspack-blocks"),key:"tiers"}],j=e=>{const{amounts:t,availableFrequencies:n,attributes:s}=e,[i,o]=(0,p.useState)(n[0]),c=t[i].slice(0,3);(0,p.useEffect)((()=>{o(n[0])}),[n.length]);const u=(t,n)=>r=>{const a=[...s.tiersBasedOptions];a[t]={...a[t],[n]:r},e.setAttributes({tiersBasedOptions:a})},d=s.tiersBasedOptions.some((e=>Boolean(e.recommendLabel)));return(0,a.jsxs)("form",{className:"wpbnbd__tiers",onSubmit:e=>e.preventDefault(),children:[n.length>1&&(0,a.jsx)("div",{className:"wpbnbd__tiers__selection",children:n.map((e=>{const t=i===e;return(0,a.jsx)("button",{className:l()("wpbnbd__button",{"wpbnbd__button--active":t}),onClick:()=>o(e),children:k[e]},e)}))}),(0,a.jsx)("div",{className:"wpbnbd__tiers__options",children:c.map(((e,t)=>{const n=s.tiersBasedOptions[t].recommendLabel||"";return(0,a.jsxs)("div",{className:l()("wpbnbd__tiers__tier",{"wpbnbd__tiers__tier--recommended":n.length}),children:[(0,a.jsxs)("div",{className:"wpbnbd__tiers__top",children:[(0,a.jsx)("h2",{className:"wpbnbd__tiers__heading",children:(0,a.jsx)(h.RichText,{onChange:u(t,"heading"),placeholder:(0,r.__)("Heading…","newspack-blocks"),value:s.tiersBasedOptions[t].heading,tagName:"span"})}),(0,a.jsx)("h3",{className:"wpbnbd__tiers__recommend-label",style:{opacity:n?1:.5},children:(0,a.jsx)(h.RichText,{onChange:u(t,"recommendLabel"),placeholder:(0,r.__)("…","newspack-blocks"),value:n,tagName:"span"})})]}),(0,a.jsx)("div",{className:"wpbnbd__tiers__amount",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:x(e,i)}})}),(0,a.jsx)("div",{className:"submit-button",style:{appearance:"button",borderColor:s.buttonColor,...d&&!n?{backgroundColor:"transparent",color:s.buttonColor}:{backgroundColor:s.buttonColor,color:w(s.buttonColor)}},children:(0,a.jsx)(h.RichText,{onChange:u(t,"buttonText"),placeholder:(0,r.__)("Button text…","newspack-blocks"),value:s.tiersBasedOptions[t].buttonText,tagName:"span"})}),(0,a.jsx)("div",{className:"wpbnbd__tiers__description",children:(0,a.jsx)(h.RichText,{onChange:u(t,"description"),placeholder:(0,r.__)("Description…","newspack-blocks"),value:s.tiersBasedOptions[t].description,tagName:"span"})})]},t)}))})]})},C=({frequencySlug:e,tierIndex:t,id:n,label:r,attributes:s,settings:i,amounts:o,setAttributes:l,setSettings:c,disabled:u,ignoreMinimumAmount:d})=>{const p=o[e][t],h=i.minimumDonation&&!d?Math.max(p,i.minimumDonation):p;return(0,a.jsxs)("span",{children:[r&&(0,a.jsx)("label",{htmlFor:n,children:r}),(0,a.jsx)("input",{type:"number",min:d?void 0:s.minimumDonation,onChange:n=>(({value:e,frequency:n})=>{const r=s.manual?s:i;r.amounts[n][t]=parseFloat(e);const a={amounts:{[n]:r.amounts[n],...r.amounts}};s.manual?l(a):c(a)})({value:n.target.value,frequency:e}),value:h,id:n,disabled:u})]},`${e}-${t}`)};var T=n(6588);const M=e=>{const t=(0,p.useMemo)((()=>Math.random().toString(16).slice(2)),[]),{attributes:n,settings:s,amounts:i,availableFrequencies:o,setAttributes:c}=e,u=(0,p.useRef)(null);(0,p.useEffect)((()=>{if(null!==u.current){const e=u.current.closest(".wpbnbd");e&&(0,T.C)(e,(0,T.t)(u.current)),u.current.addEventListener("change",(()=>{null!==u.current&&e&&(0,T.C)(e,(0,T.t)(u.current))}))}}),[]),(0,p.useEffect)((()=>{if(u.current&&!(0,T.t)(u.current).donation_frequency&&u.current.elements){const e=u.current.elements[0];e instanceof HTMLInputElement&&e.click()}-1===o.indexOf(n.defaultFrequency)&&c({defaultFrequency:o[0]})}),[n.disabledFrequencies]),(0,p.useEffect)((()=>{if(u.current){const e=u.current.querySelector(`[name="donation_frequency"][value="${n.defaultFrequency}"]`);e instanceof HTMLInputElement&&e.click()}}),[n.defaultFrequency]);const[d,f]=(0,p.useState)(n.defaultFrequency),m=window.newspack_blocks_data?.can_use_name_your_price,g=e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("input",{type:"radio",value:e,id:`newspack-donate-${e}-${t}`,name:"donation_frequency",checked:e===d,onChange:e=>f(e.target.value)}),(0,a.jsx)("label",{htmlFor:"newspack-donate-"+e+"-"+t,children:k[e]})]}),v=e=>(0,a.jsx)("button",{role:"tab",className:l()("wpbnbd__button freq-label",{"wpbnbd__button--active":e===d}),id:`tab-newspack-donate-${e}-${t}`,onClick:t=>{t.preventDefault(),f(e)},children:k[e]},e),b=()=>!y&&(0,a.jsx)("div",{className:"tab-container",children:o.map(v)}),y=1===o.length;return(0,a.jsxs)("form",{ref:u,children:[e.isTiered?(0,a.jsx)("div",{className:"wp-block-newspack-blocks-donate__options",children:(0,a.jsxs)("div",{className:"wp-block-newspack-blocks-donate__frequencies frequencies",children:[b(),o.map((e=>(0,a.jsxs)("div",{className:"wp-block-newspack-blocks-donate__frequency frequency",children:[g(e),(0,a.jsxs)("div",{className:"wp-block-newspack-blocks-donate__tiers tiers",children:[i[e].map(((n,i)=>{const o=3===i,c=`newspack-tier-${e}-${t}-${o?"other":i}`,u=o?(0,r.__)("Other","newspack-blocks"):`${s.currencySymbol}${d=n,d.toFixed(2).replace(/\.?0*$/,"")}`;var d;return(0,a.jsxs)("div",{className:l()("wp-block-newspack-blocks-donate__tier","wp-block-newspack-blocks-donate__tier--"+(o?"other":"frequency")),children:[(0,a.jsx)("input",{type:"radio",value:o?"other":n,className:o?"other-input":"frequency-input",id:c,name:`donation_value_${e}`,defaultChecked:1===i}),(0,a.jsx)("label",{className:"tier-select-label tier-label",htmlFor:c,children:u}),o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("label",{className:"odl",htmlFor:c+"-other-input",children:[(0,r.__)("Donation amount","newspack-blocks"),_(e,!0)]}),(0,a.jsxs)("div",{className:"wp-block-newspack-blocks-donate__money-input money-input",children:[(0,a.jsx)("span",{className:"currency",children:s.currencySymbol}),(0,a.jsx)("input",{type:"number",readOnly:!0})]})]}):null]},i)})),y?(0,a.jsx)("div",{className:"wp-block-newspack-blocks-donate__frequency-label",children:_(e,!0)}):null]})]},e)))]})}):(0,a.jsx)("div",{className:"wp-block-newspack-blocks-donate__options",children:(0,a.jsxs)("div",{className:"wp-block-newspack-blocks-donate__frequencies frequencies",children:[b(),o.map((n=>{const o=i[n][3];return(0,a.jsxs)("div",{className:"wp-block-newspack-blocks-donate__frequency frequency",children:[g(n),(0,a.jsx)("div",{className:"input-container",children:m?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("label",{className:"donate-label",htmlFor:"newspack-"+n+"-"+t+"-untiered-input",children:[(0,r.__)("Donation amount","newspack-blocks"),_(n,!0)]}),(0,a.jsxs)("div",{className:"wp-block-newspack-blocks-donate__money-input money-input",children:[(0,a.jsx)("span",{className:"currency",children:s.currencySymbol}),(0,a.jsx)(C,{...e,frequencySlug:n,tierIndex:3,id:`newspack-${n}-${t}-untiered-input`})]})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("input",{type:"radio",value:o,className:"frequency-input",id:`newspack-${n}-${t}-untiered-input`,name:`donation_value_${n}`,defaultChecked:!0}),(0,a.jsx)("label",{className:"tier-select-label tier-label",htmlFor:`newspack-${n}-${t}-untiered-input`,children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:x(o,n)}})})]})})]},n)}))]})}),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"wp-block-newspack-blocks-donate__thanks thanks",children:(0,a.jsx)(h.RichText,{onChange:e=>c({thanksText:e}),placeholder:(0,r.__)("Thank you text…","newspack-blocks"),value:n.thanksText,tagName:"span"})}),(0,a.jsx)("div",{className:"submit-button",style:{backgroundColor:n.buttonColor,color:w(n.buttonColor)},children:(0,a.jsx)(h.RichText,{onChange:e=>c({buttonText:e}),placeholder:(0,r.__)("Button text…","newspack-blocks"),value:n.buttonText,tagName:"span"})})]})]})};var P=n(8614),A=n(1609);const I=[(0,r.__)("Low-tier","newspack-blocks"),(0,r.__)("Mid-tier","newspack-blocks"),(0,r.__)("High-tier","newspack-blocks")],O=JSON.parse('{"UU":"donate","L1":"newspack","uK":{"className":{"type":"string"},"manual":{"type":"boolean"},"tiered":{"type":"boolean","default":true},"amounts":{"type":"object","default":{}},"disabledFrequencies":{"type":"object","default":{}},"thanksText":{"type":"string","default":"Your contribution is appreciated."},"buttonText":{"type":"string","default":"Donate Now"},"defaultFrequency":{"type":"string","default":"month"},"campaign":{"type":"string"},"buttonColor":{"type":"string","default":"#dd3333"},"suggestedAmounts":{"type":"array"},"suggestedAmountUntiered":{"type":"number"},"minimumDonation":{"type":"number"},"layoutOption":{"type":"string","default":"frequency"},"tierStyle":{"type":"string","default":"grid"},"useModalCheckout":{"type":"boolean","default":true},"tiersBasedOptions":{"type":"array","default":[{"heading":"Small","description":"","buttonText":"Select","recommendLabel":""},{"heading":"Medium","description":"","buttonText":"Select","recommendLabel":"BEST VALUE"},{"heading":"Large","description":"","buttonText":"Select","recommendLabel":""}]},"afterSuccessBehavior":{"type":"string"},"afterSuccessButtonLabel":{"type":"string","default":"Continue browsing"},"afterSuccessURL":{"type":"string"}},"xY":{"html":false,"align":false}}'),{UU:L,uK:D,L1:z,xY:N}=O,R={title:(0,r.__)("Donate","newspack-blocks"),icon:{src:i,foreground:"#36f"},category:z,keywords:[(0,r.__)("donate","newspack-blocks"),(0,r.__)("memberships","newspack-blocks"),(0,r.__)("subscriptions","newspack-blocks")],description:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{children:(0,r.__)("Manually place a donation block on any post or page on your site.","newspack-blocks")}),(0,a.jsx)(t.ExternalLink,{href:"https://help.newspack.com/publishing-and-appearance/blocks/donate-block/",children:(0,r.__)("Support reference","newspack-blocks")})]}),attributes:D,supports:N,edit:({attributes:e,setAttributes:n,className:s})=>{const[i,o]=(0,p.useState)(!0),[u,b]=(0,p.useState)(""),[w,_]=c.JL.useObjectState({amounts:{},currencySymbol:"$",tiered:!1,disabledFrequencies:{},minimumDonation:5,platform:""});if((0,p.useEffect)((()=>{d()({path:"/newspack/v1/wizard/newspack-reader-revenue-wizard/donations"}).then((t=>{if(_({amounts:t.amounts,currencySymbol:t.currencySymbol,tiered:t.tiered,disabledFrequencies:t.disabledFrequencies,minimumDonation:t.minimumDonation,platform:t.platform}),(0,f.isEmpty)(e.disabledFrequencies)&&n({disabledFrequencies:t.disabledFrequencies}),(0,f.isEmpty)(e.minimumDonation)&&n({minimumDonation:t.minimumDonation}),(0,f.isEmpty)(e.amounts)&&e.suggestedAmounts&&e.suggestedAmounts.length){const r=e.suggestedAmountUntiered||t.amounts.month[3];n({suggestedAmounts:void 0,suggestedAmountUntiered:void 0,amounts:{once:y("once",e.suggestedAmounts,r),month:y("month",e.suggestedAmounts,r),year:y("year",e.suggestedAmounts,r)}})}else n({amounts:{...t.amounts,...e.amounts}})})).catch(b).finally((()=>o(!1)))}),[]),u.length)return(0,a.jsx)(t.Placeholder,{icon:"warning",label:(0,r.__)("Error","newspack-blocks"),instructions:u,children:(0,a.jsx)(t.ExternalLink,{href:"/wp-admin/admin.php?page=newspack-reader-revenue-wizard#/donations",children:(0,r.__)("Go to donation settings to troubleshoot.","newspack-blocks")})});if("other"===w.platform)return(0,a.jsx)(t.Placeholder,{icon:"warning",label:(0,r.__)("The Donate block will not be rendered.","newspack-blocks"),instructions:(0,r.__)('The Reader Revenue platform is set to "other".',"newspack-blocks"),children:(0,a.jsx)(t.ExternalLink,{href:"/wp-admin/admin.php?page=newspack-reader-revenue-wizard#/donations",children:(0,r.__)("Go to donation settings to update the platform.","newspack-blocks")})});if(i)return(0,a.jsx)(t.Placeholder,{icon:(0,a.jsx)(t.Spinner,{}),className:"component-placeholder__align-center"});const x=window.newspack_blocks_data?.can_use_name_your_price,T=e.manual&&x,O=T?e.tiered:w.tiered,L=O&&"tiers"===e.layoutOption,D=e.tierStyle,z=T?e.amounts:w.amounts,N=S.filter((t=>T?!e.disabledFrequencies[t]:!w.disabledFrequencies[t]));-1===s.indexOf("is-style")&&(s+=" is-style-default"),x||(s+=" wpbnbd--nyp-disabled");const R=(e=[])=>l()(e,s,"wpbnbd","wpbnbd--"+(L?"tiers-based":"frequency-based"),`wpbnbd--platform-${w.platform}`,`wpbnbd-frequencies--${N.length}`,L&&`wpbnbd--tier-style-${D}`),B=[{icon:(0,a.jsx)(m.A,{icon:g.A}),title:(0,r.__)("Grid View","newspack-blocks"),onClick:()=>n({tierStyle:"grid"}),isActive:"grid"===e.tierStyle},{icon:(0,a.jsx)(m.A,{icon:v.A}),title:(0,r.__)("List View","newspack-blocks"),onClick:()=>n({tierStyle:"list"}),isActive:"list"===e.tierStyle}],$=T?e.minimumDonation:w.minimumDonation,F={...z};Object.keys(z).forEach((e=>{const t=z[e].map((e=>Math.max(e,$)));F[e]=t}));const H={attributes:e,amounts:z,availableFrequencies:N,settings:w,setAttributes:n,setSettings:_},q=()=>(0,a.jsx)("p",{className:"components-frequency-donations__error",children:(0,r.sprintf)(
32
+ (0,r.__)("per %s","newspack-blocks"),t);return('<span class="price-amount">'+n.format(e)+'</span> <span class="tier-frequency">'+s+"</span>").replace(".00","")}catch(t){return'<span class="price-amount">'+e+"</span>"}const a=(e||0).toFixed(2).replace(/\.?0*$/,""),i=_(t,n);return s.replace("AMOUNT_PLACEHOLDER",a).replace("FREQUENCY_PLACEHOLDER",i)},k={once:(0,r.__)("One-time","newspack-blocks"),month:(0,r.__)("Monthly","newspack-blocks"),year:(0,r.__)("Annually","newspack-blocks")},S=Object.keys(k),E=[{label:(0,r.__)("Frequency","newspack-blocks"),key:"frequency"},{label:(0,r.__)("Tiers","newspack-blocks"),key:"tiers"}],j=e=>{const{amounts:t,availableFrequencies:n,attributes:s}=e,[i,o]=(0,p.useState)(n[0]),c=t[i].slice(0,3);(0,p.useEffect)((()=>{o(n[0])}),[n.length]);const u=(t,n)=>r=>{const a=[...s.tiersBasedOptions];a[t]={...a[t],[n]:r},e.setAttributes({tiersBasedOptions:a})},d=s.tiersBasedOptions.some((e=>Boolean(e.recommendLabel)));return(0,a.jsxs)("form",{className:"wpbnbd__tiers",onSubmit:e=>e.preventDefault(),children:[n.length>1&&(0,a.jsx)("div",{className:"wpbnbd__tiers__selection",children:n.map((e=>{const t=i===e;return(0,a.jsx)("button",{className:l()("wpbnbd__button",{"wpbnbd__button--active":t}),onClick:()=>o(e),children:k[e]},e)}))}),(0,a.jsx)("div",{className:"wpbnbd__tiers__options",children:c.map(((e,t)=>{const n=s.tiersBasedOptions[t].recommendLabel||"";return(0,a.jsxs)("div",{className:l()("wpbnbd__tiers__tier",{"wpbnbd__tiers__tier--recommended":n.length}),children:[(0,a.jsxs)("div",{className:"wpbnbd__tiers__top",children:[(0,a.jsx)("h2",{className:"wpbnbd__tiers__heading",children:(0,a.jsx)(h.RichText,{onChange:u(t,"heading"),placeholder:(0,r.__)("Heading…","newspack-blocks"),value:s.tiersBasedOptions[t].heading,tagName:"span"})}),(0,a.jsx)("h3",{className:"wpbnbd__tiers__recommend-label",style:{opacity:n?1:.5},children:(0,a.jsx)(h.RichText,{onChange:u(t,"recommendLabel"),placeholder:(0,r.__)("…","newspack-blocks"),value:n,tagName:"span"})})]}),(0,a.jsx)("div",{className:"wpbnbd__tiers__amount",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:x(e,i)}})}),(0,a.jsx)("div",{className:"submit-button",style:{appearance:"button",borderColor:s.buttonColor,...d&&!n?{backgroundColor:"transparent",color:s.buttonColor}:{backgroundColor:s.buttonColor,color:w(s.buttonColor)}},children:(0,a.jsx)(h.RichText,{onChange:u(t,"buttonText"),placeholder:(0,r.__)("Button text…","newspack-blocks"),value:s.tiersBasedOptions[t].buttonText,tagName:"span"})}),(0,a.jsx)("div",{className:"wpbnbd__tiers__description",children:(0,a.jsx)(h.RichText,{onChange:u(t,"description"),placeholder:(0,r.__)("Description…","newspack-blocks"),value:s.tiersBasedOptions[t].description,tagName:"span"})})]},t)}))})]})},C=({frequencySlug:e,tierIndex:t,id:n,label:r,attributes:s,settings:i,amounts:o,setAttributes:l,setSettings:c,disabled:u,ignoreMinimumAmount:d})=>{const p=o[e][t],h=i.minimumDonation&&!d?Math.max(p,i.minimumDonation):p;return(0,a.jsxs)("span",{children:[r&&(0,a.jsx)("label",{htmlFor:n,children:r}),(0,a.jsx)("input",{type:"number",min:d?void 0:s.minimumDonation,onChange:n=>(({value:e,frequency:n})=>{const r=s.manual?s:i;r.amounts[n][t]=parseFloat(e);const a={amounts:{[n]:r.amounts[n],...r.amounts}};s.manual?l(a):c(a)})({value:n.target.value,frequency:e}),value:h,id:n,disabled:u})]},`${e}-${t}`)};var T=n(6588);const M=e=>{const t=(0,p.useMemo)((()=>Math.random().toString(16).slice(2)),[]),{attributes:n,settings:s,amounts:i,availableFrequencies:o,setAttributes:c}=e,u=(0,p.useRef)(null);(0,p.useEffect)((()=>{if(null!==u.current){const e=u.current.closest(".wpbnbd");e&&(0,T.C)(e,(0,T.t)(u.current)),u.current.addEventListener("change",(()=>{null!==u.current&&e&&(0,T.C)(e,(0,T.t)(u.current))}))}}),[]),(0,p.useEffect)((()=>{if(u.current&&!(0,T.t)(u.current).donation_frequency&&u.current.elements){const e=u.current.elements[0];e instanceof HTMLInputElement&&e.click()}-1===o.indexOf(n.defaultFrequency)&&c({defaultFrequency:o[0]})}),[n.disabledFrequencies]),(0,p.useEffect)((()=>{if(u.current){const e=u.current.querySelector(`[name="donation_frequency"][value="${n.defaultFrequency}"]`);e instanceof HTMLInputElement&&e.click()}}),[n.defaultFrequency]);const[d,f]=(0,p.useState)(n.defaultFrequency),m=window.newspack_blocks_data?.can_use_name_your_price,g=e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("input",{type:"radio",value:e,id:`newspack-donate-${e}-${t}`,name:"donation_frequency",checked:e===d,onChange:e=>f(e.target.value)}),(0,a.jsx)("label",{htmlFor:"newspack-donate-"+e+"-"+t,children:k[e]})]}),v=e=>(0,a.jsx)("button",{role:"tab",className:l()("wpbnbd__button freq-label",{"wpbnbd__button--active":e===d}),id:`tab-newspack-donate-${e}-${t}`,onClick:t=>{t.preventDefault(),f(e)},children:k[e]},e),b=()=>!y&&(0,a.jsx)("div",{className:"tab-container",children:o.map(v)}),y=1===o.length;return(0,a.jsxs)("form",{ref:u,children:[e.isTiered?(0,a.jsx)("div",{className:"wp-block-newspack-blocks-donate__options",children:(0,a.jsxs)("div",{className:"wp-block-newspack-blocks-donate__frequencies frequencies",children:[b(),o.map((e=>(0,a.jsxs)("div",{className:"wp-block-newspack-blocks-donate__frequency frequency",children:[g(e),(0,a.jsxs)("div",{className:"wp-block-newspack-blocks-donate__tiers tiers",children:[i[e].map(((n,i)=>{const o=3===i,c=`newspack-tier-${e}-${t}-${o?"other":i}`,u=o?(0,r.__)("Other","newspack-blocks"):`${s.currencySymbol}${d=n,d.toFixed(2).replace(/\.?0*$/,"")}`;var d;return(0,a.jsxs)("div",{className:l()("wp-block-newspack-blocks-donate__tier","wp-block-newspack-blocks-donate__tier--"+(o?"other":"frequency")),children:[(0,a.jsx)("input",{type:"radio",value:o?"other":n,className:o?"other-input":"frequency-input",id:c,name:`donation_value_${e}`,defaultChecked:1===i}),(0,a.jsx)("label",{className:"tier-select-label tier-label",htmlFor:c,children:u}),o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("label",{className:"odl",htmlFor:c+"-other-input",children:[(0,r.__)("Donation amount","newspack-blocks"),_(e,!0)]}),(0,a.jsxs)("div",{className:"wp-block-newspack-blocks-donate__money-input money-input",children:[(0,a.jsx)("span",{className:"currency",children:s.currencySymbol}),(0,a.jsx)("input",{type:"number",readOnly:!0})]})]}):null]},i)})),y?(0,a.jsx)("div",{className:"wp-block-newspack-blocks-donate__frequency-label",children:_(e,!0)}):null]})]},e)))]})}):(0,a.jsx)("div",{className:"wp-block-newspack-blocks-donate__options",children:(0,a.jsxs)("div",{className:"wp-block-newspack-blocks-donate__frequencies frequencies",children:[b(),o.map((n=>{const o=i[n][3];return(0,a.jsxs)("div",{className:"wp-block-newspack-blocks-donate__frequency frequency",children:[g(n),(0,a.jsx)("div",{className:"input-container",children:m?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("label",{className:"donate-label",htmlFor:"newspack-"+n+"-"+t+"-untiered-input",children:[(0,r.__)("Donation amount","newspack-blocks"),_(n,!0)]}),(0,a.jsxs)("div",{className:"wp-block-newspack-blocks-donate__money-input money-input",children:[(0,a.jsx)("span",{className:"currency",children:s.currencySymbol}),(0,a.jsx)(C,{...e,frequencySlug:n,tierIndex:3,id:`newspack-${n}-${t}-untiered-input`})]})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("input",{type:"radio",value:o,className:"frequency-input",id:`newspack-${n}-${t}-untiered-input`,name:`donation_value_${n}`,defaultChecked:!0}),(0,a.jsx)("label",{className:"tier-select-label tier-label",htmlFor:`newspack-${n}-${t}-untiered-input`,children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:x(o,n)}})})]})})]},n)}))]})}),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"wp-block-newspack-blocks-donate__thanks thanks",children:(0,a.jsx)(h.RichText,{onChange:e=>c({thanksText:e}),placeholder:(0,r.__)("Thank you text…","newspack-blocks"),value:n.thanksText,tagName:"span"})}),(0,a.jsx)("div",{className:"submit-button",style:{backgroundColor:n.buttonColor,color:w(n.buttonColor)},children:(0,a.jsx)(h.RichText,{onChange:e=>c({buttonText:e}),placeholder:(0,r.__)("Button text…","newspack-blocks"),value:n.buttonText,tagName:"span"})})]})]})};var P=n(8614),A=n(1609);const I=[(0,r.__)("Low-tier","newspack-blocks"),(0,r.__)("Mid-tier","newspack-blocks"),(0,r.__)("High-tier","newspack-blocks")],O=JSON.parse('{"UU":"donate","L1":"newspack","uK":{"className":{"type":"string"},"manual":{"type":"boolean"},"tiered":{"type":"boolean","default":true},"amounts":{"type":"object","default":{}},"disabledFrequencies":{"type":"object","default":{}},"thanksText":{"type":"string","default":"Your contribution is appreciated."},"buttonText":{"type":"string","default":"Donate Now"},"defaultFrequency":{"type":"string","default":"month"},"campaign":{"type":"string"},"buttonColor":{"type":"string","default":"#dd3333"},"suggestedAmounts":{"type":"array"},"suggestedAmountUntiered":{"type":"number"},"minimumDonation":{"type":"number"},"layoutOption":{"type":"string","default":"frequency"},"tierStyle":{"type":"string","default":"grid"},"useModalCheckout":{"type":"boolean","default":true},"tiersBasedOptions":{"type":"array","default":[{"heading":"Small","description":"","buttonText":"Select","recommendLabel":""},{"heading":"Medium","description":"","buttonText":"Select","recommendLabel":"BEST VALUE"},{"heading":"Large","description":"","buttonText":"Select","recommendLabel":""}]},"afterSuccessBehavior":{"type":"string"},"afterSuccessButtonLabel":{"type":"string","default":"Continue"},"afterSuccessURL":{"type":"string"}},"xY":{"html":false,"align":false}}'),{UU:L,uK:D,L1:z,xY:N}=O,R={title:(0,r.__)("Donate","newspack-blocks"),icon:{src:i,foreground:"#36f"},category:z,keywords:[(0,r.__)("donate","newspack-blocks"),(0,r.__)("memberships","newspack-blocks"),(0,r.__)("subscriptions","newspack-blocks")],description:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{children:(0,r.__)("Manually place a donation block on any post or page on your site.","newspack-blocks")}),(0,a.jsx)(t.ExternalLink,{href:"https://help.newspack.com/publishing-and-appearance/blocks/donate-block/",children:(0,r.__)("Support reference","newspack-blocks")})]}),attributes:D,supports:N,edit:({attributes:e,setAttributes:n,className:s})=>{const[i,o]=(0,p.useState)(!0),[u,b]=(0,p.useState)(""),[w,_]=c.JL.useObjectState({amounts:{},currencySymbol:"$",tiered:!1,disabledFrequencies:{},minimumDonation:5,platform:""});if((0,p.useEffect)((()=>{d()({path:"/newspack/v1/wizard/newspack-reader-revenue-wizard/donations"}).then((t=>{if(_({amounts:t.amounts,currencySymbol:t.currencySymbol,tiered:t.tiered,disabledFrequencies:t.disabledFrequencies,minimumDonation:t.minimumDonation,platform:t.platform}),(0,f.isEmpty)(e.disabledFrequencies)&&n({disabledFrequencies:t.disabledFrequencies}),(0,f.isEmpty)(e.minimumDonation)&&n({minimumDonation:t.minimumDonation}),(0,f.isEmpty)(e.amounts)&&e.suggestedAmounts&&e.suggestedAmounts.length){const r=e.suggestedAmountUntiered||t.amounts.month[3];n({suggestedAmounts:void 0,suggestedAmountUntiered:void 0,amounts:{once:y("once",e.suggestedAmounts,r),month:y("month",e.suggestedAmounts,r),year:y("year",e.suggestedAmounts,r)}})}else n({amounts:{...t.amounts,...e.amounts}})})).catch(b).finally((()=>o(!1)))}),[]),u.length)return(0,a.jsx)(t.Placeholder,{icon:"warning",label:(0,r.__)("Error","newspack-blocks"),instructions:u,children:(0,a.jsx)(t.ExternalLink,{href:"/wp-admin/admin.php?page=newspack-reader-revenue-wizard#/donations",children:(0,r.__)("Go to donation settings to troubleshoot.","newspack-blocks")})});if("other"===w.platform)return(0,a.jsx)(t.Placeholder,{icon:"warning",label:(0,r.__)("The Donate block will not be rendered.","newspack-blocks"),instructions:(0,r.__)('The Reader Revenue platform is set to "other".',"newspack-blocks"),children:(0,a.jsx)(t.ExternalLink,{href:"/wp-admin/admin.php?page=newspack-reader-revenue-wizard#/donations",children:(0,r.__)("Go to donation settings to update the platform.","newspack-blocks")})});if(i)return(0,a.jsx)(t.Placeholder,{icon:(0,a.jsx)(t.Spinner,{}),className:"component-placeholder__align-center"});const x=window.newspack_blocks_data?.can_use_name_your_price,T=e.manual&&x,O=T?e.tiered:w.tiered,L=O&&"tiers"===e.layoutOption,D=e.tierStyle,z=T?e.amounts:w.amounts,N=S.filter((t=>T?!e.disabledFrequencies[t]:!w.disabledFrequencies[t]));-1===s.indexOf("is-style")&&(s+=" is-style-default"),x||(s+=" wpbnbd--nyp-disabled");const R=(e=[])=>l()(e,s,"wpbnbd","wpbnbd--"+(L?"tiers-based":"frequency-based"),`wpbnbd--platform-${w.platform}`,`wpbnbd-frequencies--${N.length}`,L&&`wpbnbd--tier-style-${D}`),B=[{icon:(0,a.jsx)(m.A,{icon:g.A}),title:(0,r.__)("Grid View","newspack-blocks"),onClick:()=>n({tierStyle:"grid"}),isActive:"grid"===e.tierStyle},{icon:(0,a.jsx)(m.A,{icon:v.A}),title:(0,r.__)("List View","newspack-blocks"),onClick:()=>n({tierStyle:"list"}),isActive:"list"===e.tierStyle}],$=T?e.minimumDonation:w.minimumDonation,F={...z};Object.keys(z).forEach((e=>{const t=z[e].map((e=>Math.max(e,$)));F[e]=t}));const H={attributes:e,amounts:z,availableFrequencies:N,settings:w,setAttributes:n,setSettings:_},q=()=>(0,a.jsx)("p",{className:"components-frequency-donations__error",children:(0,r.sprintf)(
33
33
  // Translators: %s is the currency symbol, %d is the minimum donation amount.
34
34
  // Translators: %s is the currency symbol, %d is the minimum donation amount.
35
35
  (0,r.__)("Warning: suggested donations should be at least the minimum donation amount (%1$s%2$d).","newspack-blocks"),w.currencySymbol,$)});return(0,a.jsxs)(a.Fragment,{children:[L?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:R(),children:(0,a.jsx)(j,{...H,amounts:F})}),(0,a.jsx)(h.BlockControls,{children:(0,a.jsx)(t.Toolbar,{controls:B})})]}):(0,a.jsx)("div",{className:R([O?"tiered":"untiered"]),children:(0,a.jsx)(M,{isTiered:O,...H,amounts:F})}),(0,a.jsxs)(h.InspectorControls,{children:[(0,a.jsxs)(t.PanelBody,{title:(0,r.__)("Layout","newspack-blocks"),children:[x&&(0,a.jsx)("div",{className:"newspack-blocks-donate__layout-selector",children:E.map((({label:e,key:r})=>{const s="tiers"===r?L:!L;return(0,a.jsx)(t.Button,{variant:s?"primary":"secondary",isPressed:s,onClick:()=>n({layoutOption:r}),"aria-current":s,disabled:"tiers"===r&&!O,children:e},r)}))}),x&&!O&&(0,a.jsx)(t.Notice,{isDismissible:!1,className:"newspack-blocks-donate__notice",children:(0,r.__)("Tiers layout is disabled if the block is set to render untiered.","newspack-blocks")}),!L&&(0,a.jsx)(t.SelectControl,{label:(0,r.__)("Default Tab","newspack-blocks"),value:e.defaultFrequency,options:N.map((e=>({label:k[e],value:e}))),onChange:e=>n({defaultFrequency:e})})]}),x&&(0,a.jsxs)(t.PanelBody,{title:(0,r.__)("Suggested Donations","newspack-blocks"),children:[(0,a.jsx)(t.ToggleControl,{checked:Boolean(T),onChange:()=>n({manual:!e.manual}),label:(0,r.__)("Configure manually","newspack-blocks")}),T?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.ToggleControl,{checked:Boolean(O),onChange:()=>n({tiered:!e.tiered}),label:(0,r.__)("Tiered","newspack-blocks")}),O?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"components-frequency-donations",children:S.map((r=>{const s=e.disabledFrequencies[r],i=Object.values((0,f.pick)(e.disabledFrequencies,S)).filter(Boolean).length,o=S.length-i==1;return(0,a.jsxs)(p.Fragment,{children:[(0,a.jsx)(t.CheckboxControl,{label:k[r],checked:!s,disabled:!s&&o,onChange:()=>{n({disabledFrequencies:{...e.disabledFrequencies,[r]:!s}})}}),!s&&(0,a.jsxs)("div",{className:"wp-block-newspack-blocks-donate__panel-inputs",children:[z[r].reduce(((e,t)=>!t||t<$||e),!1)&&q(),z[r].map(((e,t)=>3===t?null:(0,A.createElement)(C,{ignoreMinimumAmount:!0,...H,key:`amount-${r}-${t}`,frequencySlug:r,tierIndex:t,label:I[t],id:`${r}-${t}-amount`,disabled:L&&3===t})))]})]},r)}))})}):(0,a.jsx)("div",{className:"components-frequency-donations",children:(0,a.jsxs)("div",{className:"wp-block-newspack-blocks-donate__panel-inputs",children:[S.reduce(((t,n)=>!z[n][3]||z[n][3]<e.minimumDonation||t),!1)&&q(),S.map((e=>(0,A.createElement)(C,{ignoreMinimumAmount:!0,...H,key:e,frequencySlug:e,tierIndex:3,label:k[e],id:`${e}-3-amount`})))]})}),(0,a.jsx)(t.TextControl,{className:"components-frequency-donations__minimum-donation",type:"number",label:(0,r.__)("Minimum donation","newspack-blocks"),min:1,onChange:e=>n({minimumDonation:e}),value:e.minimumDonation})]}):(0,a.jsxs)("p",{children:[(0,r.__)("The Donate Block allows you to collect donations from readers. The fields are automatically defined based on your donation settings.","newspack-blocks"),(0,a.jsx)("br",{}),(0,a.jsx)("br",{}),(0,a.jsx)(t.ExternalLink,{href:"/wp-admin/admin.php?page=newspack-reader-revenue-wizard#/donations",children:(0,r.__)("Edit donation settings","newspack-blocks")})]})]}),(0,a.jsx)(t.PanelBody,{title:(0,r.__)("Styling","newspack-blocks"),initialOpen:!1,children:(0,a.jsx)(h.ColorPaletteControl,{value:e.buttonColor,onChange:e=>n({buttonColor:e}),label:(0,r.__)("Button Color","newspack-blocks")})}),(0,a.jsx)(t.PanelBody,{title:(0,r.__)("Campaign","newspack-blocks"),initialOpen:!1,children:(0,a.jsx)(t.TextControl,{label:(0,r.__)("Campaign ID","newspack-blocks"),value:e.campaign||"",onChange:e=>n({campaign:e})})}),window.newspack_blocks_data.supports_recaptcha&&(0,a.jsxs)(t.PanelBody,{title:(0,r.__)("Spam protection","newspack"),children:[(0,a.jsx)("p",{children:(0,r.sprintf)(
@@ -1 +1 @@
1
- @keyframes spin{0%{transform:rotate(0deg)}50%{transform:rotate(-180deg)}to{transform:rotate(-1turn)}}.newspack-blocks-modal{background:rgba(0,0,0,.75);height:100%;right:0;position:fixed;top:0;width:100%;z-index:99999}.newspack-blocks-modal__content{background:#fff;border-radius:5px;right:50%;max-height:calc(100vh - 32px);max-width:580px;min-height:200px;position:absolute;top:50%;transform:translate(50%,-50%);width:calc(100vw - 32px)}.newspack-blocks-modal__content>:not(.newspack-blocks-modal__close){border:0;border-radius:5px;height:100%;width:100%}.newspack-blocks-modal__spinner{align-items:center;background:#fff;border-radius:5px;display:flex;height:100%;justify-content:center;right:50%;opacity:.5;position:absolute;top:50%;transform:translate(50%,-50%);width:100%}.newspack-blocks-modal__spinner>span{animation:spin 1s linear infinite;border:2px solid #fff;border-radius:50%;border-top-color:#767676;height:25px;width:25px}.newspack-blocks-modal__close{background:transparent;border:0;color:#111;cursor:pointer;padding:8px;position:absolute;left:0;top:0}.newspack-blocks-modal__close:focus,.newspack-blocks-modal__close:hover{color:#767676}.newspack-blocks-modal__close svg{display:block}.newspack-blocks-variation-modal .newspack-blocks-modal__content{border-radius:5px;overflow:auto;padding:32px}.newspack-blocks-variation-modal .newspack-blocks-modal__content h3{margin:0 0 1em}.newspack-blocks-variation-modal .newspack-blocks-modal__content p{font-size:.8em}.newspack-blocks-variation-modal .newspack-blocks-modal__content form{margin:0 0 .5em}.newspack-blocks-variation-modal .newspack-blocks-modal__content form:last-child{margin:0}.newspack-blocks-variation-modal .newspack-blocks-modal__content form button{background:transparent;border:1px solid #ccc;color:#111;display:block;font-weight:inherit;margin:0;padding:16px;text-align:inherit;width:100%}.newspack-blocks-variation-modal .newspack-blocks-modal__content form button>span{display:block}.newspack-blocks-variation-modal .newspack-blocks-modal__content form button .summary{align-items:flex-end;display:flex;justify-content:space-between;width:100%}.newspack-blocks-variation-modal .newspack-blocks-modal__content form button .summary .subscription-details bdi{font-size:inherit}.newspack-blocks-variation-modal .newspack-blocks-modal__content form button .price{max-width:65%}.newspack-blocks-variation-modal .newspack-blocks-modal__content form button .variation_name{font-size:.9em;font-weight:600;margin-right:.5em}.newspack-blocks-variation-modal .newspack-blocks-modal__content form button .description{border-top:1px solid #ccc;font-size:.9em;margin-top:1em;padding-top:1em}.newspack-blocks-variation-modal .newspack-blocks-modal__content form button bdi{font-size:1.8em;font-weight:600}@media(max-width:600px){.newspack-blocks-modal__content{border-radius:0;bottom:0;right:0;max-width:100%;top:auto;transform:none;width:100%}.newspack-blocks-modal__content>:not(.newspack-blocks-modal__close){border-radius:0}}
1
+ .newspack-ui iframe[name=newspack_modal_checkout_iframe]{border:none;height:calc(100% + var(--newspack-ui-spacer-8, 48px));margin:calc(var(--newspack-ui-spacer-5, 24px)*-1);max-width:unset;width:calc(100% + var(--newspack-ui-spacer-8, 48px))}.newspack-blocks__modal-container{align-items:center;display:flex;inset:0;justify-content:center;overflow:hidden;pointer-events:none;position:fixed;visibility:hidden;z-index:-1}.newspack-blocks__modal-container__overlay{background:rgba(0,0,0,.5);inset:0;opacity:0;position:absolute;transition:opacity .1s linear;z-index:1}.newspack-blocks__modal-container[data-state=open]{pointer-events:auto;visibility:visible;z-index:99999}.newspack-blocks__modal-container[data-state=open] .newspack-blocks__modal-container__overlay{opacity:1}.newspack-blocks__modal-container[data-state=open] .newspack-blocks__modal{opacity:1;transform:translateY(0)}.newspack-blocks__modal-container .newspack-blocks__modal{background:#fff;border-radius:6px;display:flex;flex-direction:column;justify-content:space-between;max-height:90%;max-width:600px;min-height:300px;opacity:0;overflow:auto;position:relative;transform:translateY(50px);transition:transform .1s linear,opacity .1s linear;width:100%;z-index:2}.newspack-blocks__modal-container .newspack-blocks__modal__header{align-items:center;border-bottom:1px solid #ddd;box-sizing:border-box;display:flex;height:64px;justify-content:space-between;padding:24px}.newspack-blocks__modal-container .newspack-blocks__modal__header h2{font-size:16px}.newspack-blocks__modal-container .newspack-blocks__modal__content{flex-grow:1;position:relative}.newspack-blocks__modal-container .newspack-blocks__modal__content>*{border:0;border-radius:6px;height:100%;width:100%}.newspack-blocks__modal-container .newspack-blocks__modal__close{background:transparent;border:0;color:#111;cursor:pointer;padding:8px}.newspack-blocks__modal-container .newspack-blocks__modal__close:focus,.newspack-blocks__modal-container .newspack-blocks__modal__close:hover{color:#767676}.newspack-blocks__modal-container .newspack-blocks__modal__close svg{display:block}.newspack-blocks__modal-container .newspack-blocks__spinner{align-items:center;background:#fff;border-radius:5px;bottom:0;display:flex;justify-content:center;position:absolute;top:0;width:calc(100% - 24px)}.newspack-blocks__modal-container .newspack-blocks__spinner>span{animation:spin 1s linear infinite;border:2px solid #fff;border-radius:50%;border-top-color:#767676;height:25px;margin-right:-12.5px;margin-top:-12.5px;width:25px}.newspack-blocks__modal-variation .newspack-blocks__selection>:first-child{margin-top:0}.newspack-blocks__modal-variation .newspack-blocks__selection h3{margin:0}.newspack-blocks__modal-variation .newspack-blocks__selection h3+p{margin-top:calc(var(--newspack-ui-spacer-base, 8px)/2)}.newspack-blocks__modal-variation .newspack-blocks__options{display:flex;flex-wrap:wrap;gap:var(--newspack-ui-spacer-2,12px);list-style:none;margin:var(--newspack-ui-spacer-5,24px) 0 0;padding:0}.newspack-blocks__modal-variation .newspack-blocks__options__item{border:1px solid var(--newspack-ui-color-border,#ddd);border-radius:var(--newspack-ui-border-radius-m,6px);display:flex;flex:1 1 100%;flex-direction:column;text-align:center}@media(min-width:600px){.newspack-blocks__modal-variation .newspack-blocks__options__item{flex:1 1 30%;max-width:calc(33.3333% - 10px)}.newspack-blocks__modal-variation .newspack-blocks__options__item:first-child:nth-last-child(2),.newspack-blocks__modal-variation .newspack-blocks__options__item:first-child:nth-last-child(2)~li{flex:1 1 40%;max-width:calc(50% - 10px)}}.newspack-blocks__modal-variation .newspack-blocks__options__item .summary{font-size:var(--newspack-ui-font-size-xs,14px);height:100%;line-height:var(--newspack-ui-line-height-xs,1.4286);padding:var(--newspack-ui-spacer-5,24px) var(--newspack-ui-spacer-2,12px);position:relative}.newspack-blocks__modal-variation .newspack-blocks__options__item .summary .price .suggested-prefix,.newspack-blocks__modal-variation .newspack-blocks__options__item .summary .price del{color:var(--newspack-ui-color-neutral-60,#6c6c6c);right:0;position:absolute;top:calc(var(--newspack-ui-spacer-base, 8px)*.75);width:100%}.newspack-blocks__modal-variation .newspack-blocks__options__item .summary .price>.amount>bdi,.newspack-blocks__modal-variation .newspack-blocks__options__item .summary .price>.suggested-text>.amount>bdi,.newspack-blocks__modal-variation .newspack-blocks__options__item .summary .price>ins>.amount>bdi{color:initial;display:block;font-size:var(--newspack-ui-font-size-xl,clamp(1.375rem,.394rem + 2.008vw,2rem));font-weight:600;line-height:var(--newspack-ui-line-height-xl,1.375)}.newspack-blocks__modal-variation .newspack-blocks__options__item .variation{border-top:1px solid var(--newspack-ui-color-border,#ddd);font-size:var(--newspack-ui-font-size-xs,14px);font-weight:600;line-height:var(--newspack-ui-line-height-xs,1.4286);margin-top:auto;padding:var(--newspack-ui-spacer-2,12px)}.newspack-blocks__modal-variation .newspack-blocks__options__item form{border-top:1px solid var(--newspack-ui-color-border,#ddd);padding:var(--newspack-ui-spacer-2,12px) var(--newspack-ui-spacer-2,12px) 0}.newspack-blocks__modal-variation .newspack-blocks__options__item form button{display:block;margin-top:0!important;width:100%}@keyframes spin{0%{transform:rotate(0deg)}50%{transform:rotate(-180deg)}to{transform:rotate(-1turn)}}.modal-processing{opacity:.5}
@@ -1 +1 @@
1
- <?php return array('dependencies' => array(), 'version' => '81e297b547a0a62f775a');
1
+ <?php return array('dependencies' => array(), 'version' => '1617fc14e1743f76d27c');
package/dist/modal.css CHANGED
@@ -1 +1 @@
1
- @keyframes spin{0%{transform:rotate(0deg)}50%{transform:rotate(180deg)}to{transform:rotate(1turn)}}.newspack-blocks-modal{background:rgba(0,0,0,.75);height:100%;left:0;position:fixed;top:0;width:100%;z-index:99999}.newspack-blocks-modal__content{background:#fff;border-radius:5px;left:50%;max-height:calc(100vh - 32px);max-width:580px;min-height:200px;position:absolute;top:50%;transform:translate(-50%,-50%);width:calc(100vw - 32px)}.newspack-blocks-modal__content>:not(.newspack-blocks-modal__close){border:0;border-radius:5px;height:100%;width:100%}.newspack-blocks-modal__spinner{align-items:center;background:#fff;border-radius:5px;display:flex;height:100%;justify-content:center;left:50%;opacity:.5;position:absolute;top:50%;transform:translate(-50%,-50%);width:100%}.newspack-blocks-modal__spinner>span{animation:spin 1s linear infinite;border:2px solid #fff;border-radius:50%;border-top-color:#767676;height:25px;width:25px}.newspack-blocks-modal__close{background:transparent;border:0;color:#111;cursor:pointer;padding:8px;position:absolute;right:0;top:0}.newspack-blocks-modal__close:focus,.newspack-blocks-modal__close:hover{color:#767676}.newspack-blocks-modal__close svg{display:block}.newspack-blocks-variation-modal .newspack-blocks-modal__content{border-radius:5px;overflow:auto;padding:32px}.newspack-blocks-variation-modal .newspack-blocks-modal__content h3{margin:0 0 1em}.newspack-blocks-variation-modal .newspack-blocks-modal__content p{font-size:.8em}.newspack-blocks-variation-modal .newspack-blocks-modal__content form{margin:0 0 .5em}.newspack-blocks-variation-modal .newspack-blocks-modal__content form:last-child{margin:0}.newspack-blocks-variation-modal .newspack-blocks-modal__content form button{background:transparent;border:1px solid #ccc;color:#111;display:block;font-weight:inherit;margin:0;padding:16px;text-align:inherit;width:100%}.newspack-blocks-variation-modal .newspack-blocks-modal__content form button>span{display:block}.newspack-blocks-variation-modal .newspack-blocks-modal__content form button .summary{align-items:flex-end;display:flex;justify-content:space-between;width:100%}.newspack-blocks-variation-modal .newspack-blocks-modal__content form button .summary .subscription-details bdi{font-size:inherit}.newspack-blocks-variation-modal .newspack-blocks-modal__content form button .price{max-width:65%}.newspack-blocks-variation-modal .newspack-blocks-modal__content form button .variation_name{font-size:.9em;font-weight:600;margin-left:.5em}.newspack-blocks-variation-modal .newspack-blocks-modal__content form button .description{border-top:1px solid #ccc;font-size:.9em;margin-top:1em;padding-top:1em}.newspack-blocks-variation-modal .newspack-blocks-modal__content form button bdi{font-size:1.8em;font-weight:600}@media(max-width:600px){.newspack-blocks-modal__content{border-radius:0;bottom:0;left:0;max-width:100%;top:auto;transform:none;width:100%}.newspack-blocks-modal__content>:not(.newspack-blocks-modal__close){border-radius:0}}
1
+ .newspack-ui iframe[name=newspack_modal_checkout_iframe]{border:none;height:calc(100% + var(--newspack-ui-spacer-8, 48px));margin:calc(var(--newspack-ui-spacer-5, 24px)*-1);max-width:unset;width:calc(100% + var(--newspack-ui-spacer-8, 48px))}.newspack-blocks__modal-container{align-items:center;display:flex;inset:0;justify-content:center;overflow:hidden;pointer-events:none;position:fixed;visibility:hidden;z-index:-1}.newspack-blocks__modal-container__overlay{background:rgba(0,0,0,.5);inset:0;opacity:0;position:absolute;transition:opacity .1s linear;z-index:1}.newspack-blocks__modal-container[data-state=open]{pointer-events:auto;visibility:visible;z-index:99999}.newspack-blocks__modal-container[data-state=open] .newspack-blocks__modal-container__overlay{opacity:1}.newspack-blocks__modal-container[data-state=open] .newspack-blocks__modal{opacity:1;transform:translateY(0)}.newspack-blocks__modal-container .newspack-blocks__modal{background:#fff;border-radius:6px;display:flex;flex-direction:column;justify-content:space-between;max-height:90%;max-width:600px;min-height:300px;opacity:0;overflow:auto;position:relative;transform:translateY(50px);transition:transform .1s linear,opacity .1s linear;width:100%;z-index:2}.newspack-blocks__modal-container .newspack-blocks__modal__header{align-items:center;border-bottom:1px solid #ddd;box-sizing:border-box;display:flex;height:64px;justify-content:space-between;padding:24px}.newspack-blocks__modal-container .newspack-blocks__modal__header h2{font-size:16px}.newspack-blocks__modal-container .newspack-blocks__modal__content{flex-grow:1;position:relative}.newspack-blocks__modal-container .newspack-blocks__modal__content>*{border:0;border-radius:6px;height:100%;width:100%}.newspack-blocks__modal-container .newspack-blocks__modal__close{background:transparent;border:0;color:#111;cursor:pointer;padding:8px}.newspack-blocks__modal-container .newspack-blocks__modal__close:focus,.newspack-blocks__modal-container .newspack-blocks__modal__close:hover{color:#767676}.newspack-blocks__modal-container .newspack-blocks__modal__close svg{display:block}.newspack-blocks__modal-container .newspack-blocks__spinner{align-items:center;background:#fff;border-radius:5px;bottom:0;display:flex;justify-content:center;position:absolute;top:0;width:calc(100% - 24px)}.newspack-blocks__modal-container .newspack-blocks__spinner>span{animation:spin 1s linear infinite;border:2px solid #fff;border-radius:50%;border-top-color:#767676;height:25px;margin-left:-12.5px;margin-top:-12.5px;width:25px}.newspack-blocks__modal-variation .newspack-blocks__selection>:first-child{margin-top:0}.newspack-blocks__modal-variation .newspack-blocks__selection h3{margin:0}.newspack-blocks__modal-variation .newspack-blocks__selection h3+p{margin-top:calc(var(--newspack-ui-spacer-base, 8px)/2)}.newspack-blocks__modal-variation .newspack-blocks__options{display:flex;flex-wrap:wrap;gap:var(--newspack-ui-spacer-2,12px);list-style:none;margin:var(--newspack-ui-spacer-5,24px) 0 0;padding:0}.newspack-blocks__modal-variation .newspack-blocks__options__item{border:1px solid var(--newspack-ui-color-border,#ddd);border-radius:var(--newspack-ui-border-radius-m,6px);display:flex;flex:1 1 100%;flex-direction:column;text-align:center}@media(min-width:600px){.newspack-blocks__modal-variation .newspack-blocks__options__item{flex:1 1 30%;max-width:calc(33.3333% - 10px)}.newspack-blocks__modal-variation .newspack-blocks__options__item:first-child:nth-last-child(2),.newspack-blocks__modal-variation .newspack-blocks__options__item:first-child:nth-last-child(2)~li{flex:1 1 40%;max-width:calc(50% - 10px)}}.newspack-blocks__modal-variation .newspack-blocks__options__item .summary{font-size:var(--newspack-ui-font-size-xs,14px);height:100%;line-height:var(--newspack-ui-line-height-xs,1.4286);padding:var(--newspack-ui-spacer-5,24px) var(--newspack-ui-spacer-2,12px);position:relative}.newspack-blocks__modal-variation .newspack-blocks__options__item .summary .price .suggested-prefix,.newspack-blocks__modal-variation .newspack-blocks__options__item .summary .price del{color:var(--newspack-ui-color-neutral-60,#6c6c6c);left:0;position:absolute;top:calc(var(--newspack-ui-spacer-base, 8px)*.75);width:100%}.newspack-blocks__modal-variation .newspack-blocks__options__item .summary .price>.amount>bdi,.newspack-blocks__modal-variation .newspack-blocks__options__item .summary .price>.suggested-text>.amount>bdi,.newspack-blocks__modal-variation .newspack-blocks__options__item .summary .price>ins>.amount>bdi{color:initial;display:block;font-size:var(--newspack-ui-font-size-xl,clamp(1.375rem,.394rem + 2.008vw,2rem));font-weight:600;line-height:var(--newspack-ui-line-height-xl,1.375)}.newspack-blocks__modal-variation .newspack-blocks__options__item .variation{border-top:1px solid var(--newspack-ui-color-border,#ddd);font-size:var(--newspack-ui-font-size-xs,14px);font-weight:600;line-height:var(--newspack-ui-line-height-xs,1.4286);margin-top:auto;padding:var(--newspack-ui-spacer-2,12px)}.newspack-blocks__modal-variation .newspack-blocks__options__item form{border-top:1px solid var(--newspack-ui-color-border,#ddd);padding:var(--newspack-ui-spacer-2,12px) var(--newspack-ui-spacer-2,12px) 0}.newspack-blocks__modal-variation .newspack-blocks__options__item form button{display:block;margin-top:0!important;width:100%}@keyframes spin{0%{transform:rotate(0deg)}50%{transform:rotate(180deg)}to{transform:rotate(1turn)}}.modal-processing{opacity:.5}
package/dist/modal.js CHANGED
@@ -1 +1 @@
1
- (()=>{"use strict";let e;function t(){const t=document.querySelector('iframe[name="newspack_modal_checkout"]');t&&(t.src="about:blank"),document.body.classList.remove("newspack-modal-checkout-open"),e&&e.disconnect(),Array.from(document.querySelectorAll(".newspack-blocks-modal")).forEach((e=>{e.style.display="none",e.overlayId&&window.newspackReaderActivation?.overlays&&window.newspackReaderActivation?.overlays.remove(e.overlayId)}))}window.newspackCloseModalCheckout=t;const o=".newspack-blocks-modal";var c;c=()=>{const c=document.querySelector(".newspack-blocks-checkout-modal");if(!c)return;const n=document.querySelector(`${o}__spinner`),a="newspack_modal_checkout",r=document.createElement("input");r.type="hidden",r.name="modal_checkout",r.value="1";const l=c.querySelector(`${o}__content`),d=l.clientHeight+"px",s=document.createElement("iframe");s.name=a,l.appendChild(s),c.addEventListener("click",(e=>{e.target===c&&t()})),c.querySelectorAll(`${o}__close`).forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),l.style.height=d,n.style.display="flex",t()}))}));const i=document.querySelectorAll(".newspack-blocks-variation-modal");i.forEach((e=>{e.addEventListener("click",(o=>{o.target===e&&t()})),e.querySelectorAll(".newspack-blocks-modal__close").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),t()}))}))})),document.querySelectorAll(".wpbnbd.wpbnbd--platform-wc,.wp-block-newspack-blocks-checkout-button,.newspack-blocks-variation-modal").forEach((t=>{t.querySelectorAll("form").forEach((t=>{t.appendChild(r.cloneNode()),t.target=a;const o=t.querySelector('input[name="after_success_url"]'),d=t.querySelector('input[name="after_success_behavior"]');d&&o&&"referrer"===d.getAttribute("value")&&o.setAttribute("value",document.referrer||window.location.href),t.addEventListener("submit",(o=>{const a=new FormData(t);if(i.forEach((e=>e.style.display="none")),a.get("is_variable")&&!a.get("variation_id")){const e=[...i].find((e=>e.dataset.productId===a.get("product_id")));if(e)return e.querySelectorAll('form[target="newspack_modal_checkout"]').forEach((e=>{["after_success_behavior","after_success_url","after_success_button_label"].forEach((t=>{const o=document.createElement("input");o.type="hidden",o.name=t,o.value=a.get(t),e.appendChild(o)}))})),o.preventDefault(),document.body.classList.add("newspack-modal-checkout-open"),void(e.style.display="block")}n.style.display="flex",c.style.display="block",document.body.classList.add("newspack-modal-checkout-open"),window.newspackReaderActivation?.overlays&&(c.overlayId=window.newspackReaderActivation?.overlays.add()),e=new ResizeObserver((e=>{if(!e||!e.length)return;const t=e[0].contentRect;t&&(l.style.height=t.top+t.bottom+"px",n.style.display="none")})),s.addEventListener("load",(()=>{const t=s.contentWindow.location;if(window.newspackReaderActivation&&t.href.indexOf("order-received")>-1){const e=window.newspackReaderActivation,o=new Proxy(new URLSearchParams(t.search),{get:(e,t)=>e.get(t)});o.email&&(e.setReaderEmail(o.email),e.setAuthenticated(!0))}const o=s.contentDocument.querySelector("#newspack_modal_checkout");o&&e.observe(o),[...s.contentDocument.querySelectorAll(".modal-continue, .edit-billing-link")].forEach((e=>{e.addEventListener("click",(()=>n.style.display="flex"))}));const c=s.contentDocument.querySelector("form.checkout");c&&[...c.querySelectorAll(".woocommerce-billing-fields input")].forEach((e=>{e.addEventListener("keyup",(e=>{"Enter"===e.key&&(n.style.display="flex",c.submit())}))}))}))}))}))}))},"undefined"!=typeof document&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",c):c())})();
1
+ (()=>{"use strict";function e(e,t=!1){const n=e.querySelectorAll('button, [href], input:not([type="hidden"]), select, textarea, [tabindex]:not([tabindex="-1"])');if(0===n.length)return!1;const o=n?.[0];let c;o.focus(),t?(document.addEventListener("keydown",(function(e){if(("Tab"===e.key||9===e.keyCode)&&e.shiftKey&&document.activeElement===o){const n=t.contentWindow.document,o=n.getElementById("customer_details"),a=n.getElementById("after_customer_details"),r=n.getElementById("checkout-after-success");null!==r?c=r:null!==o.offsetParent?c=n.getElementById("checkout_continue"):null!==a.offsetParent&&(c=n.getElementById("checkout_back")),c.focus(),e.preventDefault()}})),document.getElementById("newspack-a11y-last-element").addEventListener("focus",(()=>{o.focus()}))):(c=n[n.length-1],document.addEventListener("keydown",(function(e){("Tab"===e.key||9===e.keyCode)&&(e.shiftKey?document.activeElement===o&&(c.focus(),e.preventDefault()):document.activeElement===c&&(o.focus(),e.preventDefault()))})))}const t=(e,t={})=>({...t,action:e}),n=(e,t="np_modal_checkout_interaction")=>{"function"==typeof window.gtag&&e&&window.gtag("event",t,e)},o=e=>{if("function"!=typeof window.gtag)return;let o="opened";const{action_type:c,amount:a="",currency:r,is_variable:i="",price:s="",product_id:d,product_type:l,recurrence:u,referrer:p,variation_id:_=""}=e,m={action_type:c,currency:r,product_id:d,product_type:l,referrer:p};(a||s)&&(m.amount=a||s),i&&(m.is_variable=i),_&&(m.variation_id=_),u&&(m.recurrence=u),i&&!_&&(o="opened_variations");const y=t(o,m);n(y)},c=e=>{if("function"!=typeof window.gtag)return;e=e||(e=>{const t=document.getElementById("newspack_modal_checkout"),n=!!t&&t.getAttribute("data-order-details");return!!n&&JSON.parse(n)||{}})();const{action_type:o,amount:c="",currency:a,price:r="",product_id:i,product_type:s,recurrence:d,referrer:l,variation_id:u=""}=e,p={action_type:o,currency:a,product_id:i,product_type:s,recurrence:d,referrer:l};(c||r)&&(p.amount=c||r),u&&(p.variation_id=u);const _=t("dismissed",p);n(_)};function a(e,t=null){const n=document.createElement("input");return n.type="hidden",n.name=e,t&&(n.value=t),n}const r=newspackBlocksModal.newspack_class_prefix,i="newspack_modal_checkout_iframe",s="newspack_modal_checkout_container",d=`${r}__modal`,l="newspack-blocks__modal-variation";let u={},p=!1;var _;_=()=>{const t=document.querySelector("#newspack_modal_checkout");if(!t)return;const n=t.querySelector(`.${d}__content`),_=a("modal_checkout","1"),m=n.querySelector(`.${r}__spinner`);let y=document.querySelector(".newspack-reader__account-link")?.[0];const f="600px",h=document.createElement("iframe");function k(){const n=h.contentWindow.location;if(window.newspackReaderActivation&&n.href.indexOf("order-received")>-1){const e=window.newspackReaderActivation,t=new Proxy(new URLSearchParams(n.search),{get:(e,t)=>e.get(t)});t.email&&(e.setReaderEmail(t.email),e.setAuthenticated(!0))}const o=h?.contentDocument?.querySelector(`#${s}`),c=()=>{g.observe(o),"none"!==m.style.display&&(m.style.display="none"),"visible"!==h.style.visibility&&(h.style.visibility="visible"),h._ready=!0};o&&(o.checkoutComplete?($("small"),A(newspackBlocksModal.labels.thankyou_modal_title),c(),e(t.querySelector(`.${d}`))):($(),A(newspackBlocksModal.labels.checkout_modal_title)),o.checkoutReady?c():o.addEventListener("checkout-ready",c))}h.name=i,h.style.height=f,h.style.visibility="hidden",h.addEventListener("load",k);const w=t=>{const n=t.target;n.classList.add("modal-processing");const s=n.dataset.product;if(s){const e=JSON.parse(s);Object.keys(e).forEach((t=>{0===n.querySelectorAll('input[name="'+t+'"]').length&&n.appendChild(a(t,e[t]))}))}const d=new FormData(n);d.get("variation_id")||(y=t.submitter);const _=document.querySelectorAll(`.${l}`);if(_.forEach((e=>{E(e)})),d.get("is_variable")&&!d.get("variation_id")){const c=[..._].find((e=>e.dataset.productId===d.get("product_id")));if(c){c.querySelectorAll(`form[target="${i}"]`).forEach((e=>{["after_success_behavior","after_success_url","after_success_button_label"].forEach((t=>{0===e.querySelectorAll('input[name="'+t+'"]').length&&e.appendChild(a(t,d.get(t)))}));const t=e.dataset.product;if(t){const n=JSON.parse(t);Object.keys(n).forEach((t=>{0===e.querySelectorAll('input[name="'+t+'"]').length&&e.appendChild(a(t,n[t]))}))}})),t.preventDefault(),n.classList.remove("modal-processing"),q(c),e(c,!1);const r=n.getAttribute("data-product");return u=r?JSON.parse(r):{},p||o(u),void document.getElementById("newspack_modal_checkout").setAttribute("data-order-details",JSON.stringify(u))}}n.classList.remove("modal-processing");const m=d.get("newspack_donate"),f=d.get("newspack_checkout");if(f){const e=n.getAttribute("data-product");u=e?JSON.parse(e):{}}else if(m){const e=d.get("donation_frequency");let t="",n="";for(const n of d.keys())n.indexOf("donation_value_"+e)>=0&&"other"!==d.get(n)&&""!==d.get(n)&&(t=d.get(n));const o=JSON.parse(d.get("frequency_ids"));for(const t in o)t===e&&(n=o[t].toString());u={amount:t,action_type:"donation",currency:d.get("donation_currency"),product_id:n,product_type:"donation",recurrence:e,referrer:d.get("_wp_http_referer")}}if(p||o(u),p=!0,"undefined"!=typeof newspack_ras_config&&!newspack_ras_config?.is_logged_in&&!window?.newspackReaderActivation?.getReader?.()?.authenticated&&newspackBlocksModal?.is_registration_required&&window?.newspackReaderActivation?.openAuthModal){t.preventDefault();let e="",o="0",a="";if(m){const e=d.get("donation_frequency"),t=n.querySelectorAll(`.donation-tier__${e}, .donation-frequency__${e}`);if(t?.length){const c=d.get("donation_tier_index");if(c){const n=JSON.parse(t?.[c].dataset.product);n.hasOwnProperty(`donation_price_summary_${e}`)&&(a=n[`donation_price_summary_${e}`])}else{const c=n.querySelectorAll(`input[name="donation_value_${e}"], input[name="donation_value_${e}_untiered"]`);c?.length&&(c.forEach((e=>{e.checked&&"other"!==e.value&&(o=e.value)})),t.forEach((t=>{const n=JSON.parse(t.dataset.product);if(n.hasOwnProperty(`donation_price_summary_${e}`)){const t=n[`donation_price_summary_${e}`];new RegExp(`(?<=\\D)${o}(?=\\D)`).test(t)&&(a=t)}if("0"===o&&a){let t=d.get(`donation_value_${e}_other`);t||(t=d.get(`donation_value_${e}_untiered`)),t&&(a=a.replace("0",t))}})))}}}else if(f){const e=n.querySelector('input[name="product_price_summary"]');e&&(a=e.value)}a&&(e=`<div class="order-details-summary ${r}__box ${r}__box--text-center"><p><strong>${a}</strong></p></div>`);const i=(e=>new Promise(((t,n)=>{const o=new URLSearchParams(e);o.append("action","modal_checkout_request"),fetch(newspackBlocksModal.ajax_url+"?"+o.toString()).then((e=>{e.ok||n(e),e.json().then((e=>{t(e.url)})).catch(n)})).catch(n)})))(d);i.then((e=>{window.newspackReaderActivation?.setPendingCheckout?.(e)})),window.newspackReaderActivation.openAuthModal({title:newspackBlocksModal.labels.auth_modal_title,onSuccess:(e,t)=>{i.then((e=>{t?.registered&&(e+=`&${newspackBlocksModal.checkout_registration_flag}=1`);const n=v(e);L(n)})).catch((e=>{console.warn("Unable to generate cart:",e),b()}))},onError:()=>{b()},onDismiss:()=>{c(u),p=!1,document.getElementById("newspack_modal_checkout").removeAttribute("data-order-details")},skipSuccess:!0,skipNewslettersSignup:!0,labels:{signin:{title:newspackBlocksModal.labels.signin_modal_title},register:{title:newspackBlocksModal.labels.register_modal_title}},content:e,trigger:t.submitter})}else S(),document.getElementById("newspack_modal_checkout").setAttribute("data-order-details",JSON.stringify(u))},v=e=>{const t=document.createElement("form");t.method="POST",t.action=e,t.target=i,t.style.display="none";const n=document.createElement("button");return n.setAttribute("type","submit"),t.appendChild(n),document.body.appendChild(t),t.addEventListener("submit",w),t},g=new ResizeObserver((e=>{if(!e||!e.length)return;const t=e[0].contentRect;if(t){const e=t.top+t.bottom;if(0===e)return void(h.style.visibility="hidden");n.style.height=e+"px",h.style.height=e+"px"}})),b=()=>{const e=h?.contentDocument?.querySelector(`#${s}`),t=e?.querySelector('input[name="after_success_url"]'),o=e?.querySelector('input[name="after_success_behavior"]'),a=document?.querySelector(".newspack-newsletters-signup-modal");!e?.checkoutComplete&&h?.contentWindow?.newspackBlocksModalCheckout&&(()=>{const e=new FormData;e.append("modal_checkout","1"),e.append("action","abandon_modal_checkout"),e.append("_wpnonce",h?.contentWindow?.newspackBlocksModalCheckout?.checkout_nonce),fetch(newspackBlocksModal.ajax_url,{method:"POST",body:e})})();const r=!t||!o||!e?.checkoutComplete;if((r||a)&&(m.style.display="flex",h&&n.contains(h)&&(h._ready=!1,h.src="about:blank",h.style.height=f,h.style.visibility="hidden",n.style.height=f,n.removeChild(h)),g&&g.disconnect(),document.querySelectorAll(`.${d}-container`).forEach((e=>E(e))),y&&y.focus()),e?.checkoutComplete){const e=()=>{if(t&&o){const e=t.getAttribute("value"),n=o.getAttribute("value");"custom"===n?window.location.href=e:"referrer"===n&&window.history.back()}window?.newspackReaderActivation?.setPendingCheckout?.(),p=!1};window?.newspackReaderActivation?.openNewslettersSignupModal?window.newspackReaderActivation.openNewslettersSignupModal({onSuccess:e,onError:e,closeOnSuccess:r}):e(),r&&($(),A(newspackBlocksModal.labels.checkout_modal_title))}else window?.newspackReaderActivation?.setPendingCheckout?.(),c(),p=!1,document.getElementById("newspack_modal_checkout").removeAttribute("data-order-details")},S=()=>{m.style.display="flex",q(t),n.appendChild(h),t.addEventListener("click",(e=>{e.target===t&&b()})),e(t,h),function(e){h._readyTimer&&clearTimeout(h._readyTimer);let t=!1;function n(){t||(t=!0,clearTimeout(h._readyTimer),e.call(this))}function o(){"complete"===this.readyState&&n.call(this)}!function e(){if(h._ready)return void clearTimeout(h._readyTimer);const t=h.contentDocument||h.contentWindow?.document;t&&0!==t.URL.indexOf("about:")?"complete"===t?.readyState?n.call(t):(t.addEventListener("DOMContentLoaded",n),t.addEventListener("readystatechange",o)):h._readyTimer=setTimeout(e,10)}()}(k)},E=e=>{e.overlayId&&window.newspackReaderActivation?.overlays&&window.newspackReaderActivation?.overlays.remove(e.overlayId),e.setAttribute("data-state","closed"),document.body.style.overflow="auto"},q=e=>{window.newspackReaderActivation?.overlays&&(t.overlayId=window.newspackReaderActivation?.overlays.add()),e.setAttribute("data-state","open"),document.body.style.overflow="hidden"},A=e=>{const n=t.querySelector(`.${d}__header h2`);n&&(n.innerText=e)},$=(e="default")=>{const n=t.querySelector(`.${d}`);n&&("small"===e?n.classList.add(`${d}--small`):n.classList.remove(`${d}--small`))};window.newspackCloseModalCheckout=b,t.querySelectorAll(`.${d}__close`).forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),b()}))})),document.querySelectorAll(".newspack-blocks__modal-variation").forEach((e=>{e.addEventListener("click",(t=>{t.target===e&&b()})),e.querySelectorAll(`.${d}__close`).forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),b()}))}))})),document.addEventListener("keydown",(function(e){"Escape"===e.key&&b()})),document.querySelectorAll(".wpbnbd.wpbnbd--platform-wc, .wp-block-newspack-blocks-checkout-button, .newspack-blocks__modal-variation").forEach((e=>{e.querySelectorAll("form").forEach((e=>{e.appendChild(_.cloneNode()),e.target=i,e.addEventListener("submit",w)}))}));const L=e=>{e.requestSubmit(e.querySelector('button[type="submit"]'))};(()=>{const e=new URLSearchParams(window.location.search);if(!e.has("checkout"))return;const t=e.get("type");if("donate"===t){const t=e.get("layout"),n=e.get("frequency"),o=e.get("amount"),c=e.get("other");t&&n&&o&&((e,t,n,o=null)=>{let c;document.querySelectorAll(".wpbnbd.wpbnbd--platform-wc form").forEach((a=>{const r=a.querySelector(`input[name="donation_frequency"][value="${t}"]`);if(r)if("tiered"===e){const e=document.querySelector(`button[data-frequency-slug="${t}"]`);if(!e)return;e.click();const o=a.querySelector(`button[type="submit"][name="donation_value_${t}"][value="${n}"]`);if(!o)return;o.click()}else{const i="untiered"===e?a.querySelector(`input[name="donation_value_${t}_untiered"]`):a.querySelector(`input[name="donation_value_${t}"][value="${n}"]`);if(r&&i){if(r.checked=!0,"untiered"===e)i.value=n;else if("other"===n){i.click();const e=a.querySelector(`input[name="donation_value_${t}_other"]`);e&&o&&(e.value=o)}else i.checked=!0;c=a}}})),c&&L(c)})(t,n,o,c)}else if("checkout_button"===t){const t=e.get("product_id"),n=e.get("variation_id");t&&((e,t=null)=>{let n;if(t&&t!==e){const o=[...document.querySelectorAll(`.${l}`)].find((t=>t.dataset.productId===e));o&&o.querySelectorAll(`form[target="${i}"]`).forEach((e=>{const o=JSON.parse(e.dataset.product);o?.variation_id===Number(t)&&(n=e)}))}else document.querySelectorAll(".wp-block-newspack-blocks-checkout-button").forEach((t=>{const o=t.querySelector("form");if(!o)return;const c=JSON.parse(o.dataset.product);c?.product_id===e&&(n=o)}));n&&L(n)})(t,n)}else{const e=window.newspackReaderActivation?.getPendingCheckout?.();if(e){const t=v(e);L(t)}}window.history.replaceState(null,null,window.location.pathname)})()},"undefined"!=typeof document&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",_):_())})();
@@ -1 +1 @@
1
- .newspack-modal-checkout{font-size:1rem;padding:32px}.newspack-modal-checkout.cart .button-container{text-align:center}.newspack-modal-checkout.cart .woocommerce-error{background:none;color:#d63638;padding:0}.newspack-modal-checkout .order-details-summary{border:2px solid;border-radius:3px;padding:16px}.newspack-modal-checkout .order-details-summary h4{font-size:1rem;margin:0}.newspack-modal-checkout .order-details-summary h4>span{color:inherit;font-size:clamp(1.75rem,1.75rem + (1vw - .48rem)*.962,2.25rem);font-weight:700;line-height:1.434}.newspack-modal-checkout .order-details-summary h4 .subscription-details{font-size:1rem;font-weight:400}.newspack-modal-checkout #order-details-wrapper.hidden{display:none}.newspack-modal-checkout .woocommerce-NoticeGroup,.newspack-modal-checkout .woocommerce-checkout-review-order-table{margin-top:16px}.newspack-modal-checkout .woocommerce-checkout-review-order-table td,.newspack-modal-checkout .woocommerce-checkout-review-order-table th{font-size:.8rem}.newspack-modal-checkout .woocommerce-checkout-review-order-table.empty{display:none;margin:0;padding:0}.newspack-modal-checkout .woocommerce-billing-fields{margin-bottom:16px}.newspack-modal-checkout .checkout-billing-summary{border-bottom:1px solid #ccc;padding-bottom:32px}.newspack-modal-checkout .checkout-billing-summary__grid{align-items:baseline;display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between}.newspack-modal-checkout .checkout-billing-summary p{font-size:clamp(.75rem,.75rem + (1vw - .48rem)*.481,1rem);margin:16px 0 0}.newspack-modal-checkout .checkout-billing-summary .edit-billing-link{color:#767676;display:inline-block;font-size:clamp(.75rem,.75rem + (1vw - .48rem)*.481,1rem);text-decoration:underline}.newspack-modal-checkout .checkout-billing-summary .edit-billing-link:focus,.newspack-modal-checkout .checkout-billing-summary .edit-billing-link:hover{color:inherit}.newspack-modal-checkout .woocommerce-account-fields .create-account{border-bottom:1px solid #ccc;padding-bottom:32px}.newspack-modal-checkout .woocommerce-account-fields .create-account .woocommerce-password-hint,.newspack-modal-checkout .woocommerce-account-fields .create-account .woocommerce-password-strength{color:#d63638;margin-top:16px}.newspack-modal-checkout form{margin:0}.newspack-modal-checkout form .woocommerce-terms-and-conditions-wrapper{margin:16px 0}.newspack-modal-checkout form h3{font-size:1.37rem;margin:32px 0 0}.newspack-modal-checkout form p{margin:16px 0}.newspack-modal-checkout form .select2-container .select2-selection--single{margin:0}.newspack-modal-checkout form #payment button#place_order{margin-bottom:0}.newspack-modal-checkout form .checkout-billing button[type=submit],.newspack-modal-checkout form button.modal-continue,.newspack-modal-checkout form button[name=woocommerce_checkout_place_order]{display:block;width:100%}.newspack-modal-checkout .form-row-first,.newspack-modal-checkout .form-row-last{width:calc(50% - 8px)}.newspack-modal-checkout .form-row-last+.form-row-first,.newspack-modal-checkout .form-row-wide+.form-row-first,.newspack-modal-checkout .form-row-wide+.form-row-first+.form-row-last{margin-top:0}.newspack-modal-checkout .select2-container--default .select2-selection--single{border-color:#ccc;border-radius:0;height:44px}.newspack-modal-checkout .select2-container--default .select2-selection--single .select2-selection__rendered{color:inherit;line-height:44px}.newspack-modal-checkout .select2-container--default .select2-selection--single .select2-selection__arrow{height:42px}.newspack-modal-checkout .wc_payment_method .payment_box{background:#f0f0f0;border-radius:3px;padding:16px}.newspack-modal-checkout .wc_payment_method .payment_box p{margin-top:0}.newspack-modal-checkout .wc_payment_method .payment_box p.newspack-cover-fees,.newspack-modal-checkout .wc_payment_method .payment_box p.woocommerce-SavedPaymentMethods-saveNew{align-items:flex-start;display:flex;margin:8px 0}.newspack-modal-checkout .wc_payment_method .payment_box p.newspack-cover-fees input[type=checkbox],.newspack-modal-checkout .wc_payment_method .payment_box p.woocommerce-SavedPaymentMethods-saveNew input[type=checkbox]{margin-left:8px}.newspack-modal-checkout .wc-saved-payment-methods{padding:0}.newspack-modal-checkout .woocommerce-error{border-radius:3px;margin:0}.newspack-modal-checkout .woocommerce-notices-wrapper:not(:empty){margin-bottom:32px}.newspack-modal-checkout .woocommerce-privacy-policy-text{color:#767676}.newspack-modal-checkout .woocommerce-privacy-policy-text p{font-size:clamp(.75rem,.75rem + (1vw - .48rem)*.481,1rem);margin:0}.newspack-modal-checkout .woocommerce-thankyou-order-received{align-items:center;border-bottom:1px solid #ccc;display:flex;flex-direction:column;justify-content:center;margin:0 0 32px;padding:0 0 32px}.newspack-modal-checkout .woocommerce-thankyou-order-received:before{animation:bounce .25s ease-in;animation-delay:1s;animation-fill-mode:forwards;background-color:#008a20;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27%3E%3Cpath fill=%27%23fff%27 d=%27m16.7 7.1-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z%27/%3E%3C/svg%3E");background-position:50% 50%;background-repeat:no-repeat;background-size:24px;border-radius:50%;content:"";display:block;height:40px;margin-bottom:16px;padding:8px;transform:scale(0);width:40px}.newspack-modal-checkout .woocommerce-form-login-toggle,.newspack-modal-checkout .woocommerce-thankyou-order-received+.woocommerce-info{display:none}.newspack-modal-checkout .woocommerce-order-overview{color:#767676;list-style:none;margin:16px 0 0;padding:0}.newspack-modal-checkout .blockOverlay{align-items:center;display:flex;inset:0;justify-content:center;position:fixed!important}.newspack-modal-checkout .blockOverlay:after{animation:spin 1s linear infinite;border:2px solid #fff;border-radius:50%;border-top-color:#767676;content:"";display:block;height:25px;width:25px}.newspack-modal-newsletters{border-top:1px solid #ccc;margin-top:20px;padding-top:22px}.newspack-modal-newsletters__info{margin-bottom:35px}.newspack-modal-newsletters__info span{color:#767676}.newspack-modal-newsletters__list-item{border:1px solid #ccc;border-radius:6px;display:flex;margin-bottom:18px}.newspack-modal-newsletters__list-item b{display:block;margin-bottom:2px}.newspack-modal-newsletters label{cursor:pointer;flex:1;padding:12px}.newspack-modal-newsletters input[type=checkbox]{border-radius:5px;margin-right:20px;margin-left:19px;margin-top:18px;padding:10px}.newspack-modal-newsletters input[type=submit],.newspack-modal-newsletters__button{font-size:1em!important;margin-top:25px;padding:22px!important;width:100%}@keyframes bounce{0%{transform:scale(0)}90%{transform:scale(1.4)}to{transform:scale(1)}}
1
+ #newspack_modal_checkout_container{background:var(--newspack-ui-color-neutral-0,#fff);padding:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container form p{margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container form p.form-row-first:has(+.form-row-last:last-child),#newspack_modal_checkout_container form p:last-child{margin-bottom:0}#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table tfoot>tr.order-total>th,#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table tfoot>tr.recurring-totals>th,#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table thead>tr>th{font-weight:var(--newspack-ui-font-weight-strong,600)}#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table td.product-name{padding-left:1em}#newspack_modal_checkout_container .order-review-wrapper.hidden,#newspack_modal_checkout_container .woocommerce-form-login-toggle{display:none}#newspack_modal_checkout_container .woocommerce form .form-row .required{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce form .form-row-first:not(:has(+.form-row-last)),#newspack_modal_checkout_container .woocommerce form .form-row-last+.form-row-last,#newspack_modal_checkout_container .woocommerce form .form-row-wide+.form-row-last{clear:both;float:none;width:100%}#newspack_modal_checkout_container .woocommerce-checkout h3{font-size:var(--newspack-ui-font-size-s,16px);line-height:var(--newspack-ui-line-height-s,1.5);margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields h3{margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-checkout #after_customer_details h3{margin-bottom:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-account-fields label,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields label,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields label,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-shipping-fields label{font-size:var(--newspack-ui-font-size-s,16px);line-height:var(--newspack-ui-line-height-s,1.5)}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-account-fields:not(:has(>*)),#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields:not(:has(>*)),#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields:not(:has(>*)),#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-shipping-fields:not(:has(>*)){display:none}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields__field-wrapper~.form-row{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields h3{display:none}#newspack_modal_checkout_container #checkout_details{margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container #checkout_details h3{margin:0 0 var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .billing-details:not(:last-child),#newspack_modal_checkout_container .gift-details:not(:last-child),#newspack_modal_checkout_container .shipping-details:not(:last-child){margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .billing-details p,#newspack_modal_checkout_container .gift-details p,#newspack_modal_checkout_container .shipping-details p{margin:0}#newspack_modal_checkout_container #billing_country_field:has(input[readonly][autocomplete=country]) .required,#newspack_modal_checkout_container #shipping_country_field:has(input[readonly][autocomplete=country]) .required{display:none}#newspack_modal_checkout_container #billing_country_field:has(input[readonly][autocomplete=country]) strong,#newspack_modal_checkout_container #shipping_country_field:has(input[readonly][autocomplete=country]) strong{font-weight:400}#newspack_modal_checkout_container #ship-to-different-address{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container #ship-to-different-address label{display:flex;font-weight:600;margin:0}#newspack_modal_checkout_container #ship-to-different-address label input[type=checkbox]{display:grid}#newspack_modal_checkout_container #ship-to-different-address span{font-weight:unset}#newspack_modal_checkout_container #ship-to-different-address span:after,#newspack_modal_checkout_container #ship-to-different-address span:before{display:none}#newspack_modal_checkout_container .shipping_address{margin-top:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .newspack-wcsg--wrapper{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .newspack-wcsg--gift-toggle{align-items:center;display:flex;font-weight:700;margin-bottom:0}#newspack_modal_checkout_container .newspack-wcsg--gift-toggle label{display:flex!important;margin-bottom:0}#newspack_modal_checkout_container .newspack-wcsg--gift-toggle .woocommerce-input-wrapper{line-height:.5;margin-left:.25rem}#newspack_modal_checkout_container .newspack-wcsg--gift-email{max-height:0;overflow:hidden;transition:max-height .25s ease-in-out;visibility:hidden}#newspack_modal_checkout_container .newspack-wcsg--gift-email.visible{margin:var(--newspack-ui-spacer-5,24px) 0 0;max-height:none;visibility:visible}#newspack_modal_checkout_container .woocommerce-account-fields{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .woocommerce-account-fields h3:has(+.create-account){display:none}#newspack_modal_checkout_container .woocommerce-account-fields .create-account label:has(input[type=checkbox]){display:grid;gap:0 var(--newspack-ui-spacer-base,8px);grid-template-columns:var(--newspack-ui-spacer-4,20px) 1fr;margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin:var(--newspack-ui-spacer-base,8px) 0 0}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.bad,#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.short{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.good{color:var(--newspack-ui-color-warning-40,#bd8600)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.strong{color:var(--newspack-ui-color-success-50,#008a20)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-hint{color:var(--newspack-ui-color-neutral-60,#6c6c6c);font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account>p.form-row:last-of-type{margin-bottom:0}#newspack_modal_checkout_container .name-your-price{margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .modal_checkout_nyp h3{color:var(--newspack-ui-label-color,inherit);margin-bottom:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .modal_checkout_nyp .input-price{align-items:center;display:flex;flex-wrap:nowrap;gap:.5em;margin:0 0 8px}#newspack_modal_checkout_container .modal_checkout_nyp .input-price label{align-items:center;display:flex;margin:0;position:relative;width:100%}#newspack_modal_checkout_container .modal_checkout_nyp .input-price label span.currency{right:0;padding-right:16px;position:absolute}#newspack_modal_checkout_container .modal_checkout_nyp .input-price label input{padding-right:32px}#newspack_modal_checkout_container .modal_checkout_nyp .input-price button{margin-top:0}#newspack_modal_checkout_container .woocommerce-form-coupon{margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-form-coupon h3{color:var(--newspack-ui-label-color,inherit);margin-bottom:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type{align-items:center;display:flex;gap:var(--newspack-ui-spacer-base,#1e1e1e)}#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type button,#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type input{margin:0!important}#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type+.newspack-ui__helper-text{margin-top:calc(var(--newspack-ui-spacer-3, 16px)*-1)}#newspack_modal_checkout_container .modal_checkout_coupon.modal-processing,#newspack_modal_checkout_container .modal_checkout_nyp.modal-processing{opacity:.5}#newspack_modal_checkout_container .woocommerce .order-details-summary h2{margin-top:0}#newspack_modal_checkout_container .wc_payment_methods{margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .wc_payment_methods label[for=payment_method_stripe].newspack-ui__input-card{padding:var(--newspack-ui-spacer-3,16px)!important}#newspack_modal_checkout_container .wc_payment_method+.wc_payment_method{margin-top:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .wc_payment_method span{font-weight:var(--newspack-ui-font-weight-strong,600)}#newspack_modal_checkout_container .wc_payment_method>label:first-of-type{margin:unset}#newspack_modal_checkout_container .wc_payment_method>label:first-of-type img{float:left}#newspack_modal_checkout_container .wc_payment_method .payment_box{background:transparent;font-weight:400;padding:0}#newspack_modal_checkout_container .wc_payment_method .payment_box p{color:var(--newspack-ui-color-neutral-60,#6c6c6c);font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin:0}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods{margin:var(--newspack-ui-spacer-3,16px) 0 0;padding:0}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods li{display:flex}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods li:not(:last-child){margin-bottom:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods li label{font-size:var(--newspack-ui-font-size-xs,14px);font-weight:400;line-height:inherit;margin:0}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods li input{margin-left:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset{margin:var(--newspack-ui-spacer-3,16px) 0 0;padding:0!important}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset.wc-payment-form{margin-top:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset p{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin-bottom:0}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset p.form-row{align-items:flex-start;display:flex;gap:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset p.form-row input{margin:0}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset p.form-row label{font-weight:400;margin-bottom:0}#newspack_modal_checkout_container .wc_payment_method .payment_box .newspack-cover-fees label,#newspack_modal_checkout_container .wc_payment_method .payment_box .woocommerce-SavedPaymentMethods-saveNew label{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286)}#newspack_modal_checkout_container .wc_payment_method .payment_box .newspack-cover-fees:before,#newspack_modal_checkout_container .wc_payment_method .payment_box .woocommerce-SavedPaymentMethods-saveNew:before{display:none}#newspack_modal_checkout_container .wc_payment_method input.input-radio[name=payment_method]{display:inherit}#newspack_modal_checkout_container .wc_payment_method:first-child:last-child .newspack-ui__input-card{gap:0;grid-template-columns:0}#newspack_modal_checkout_container .wc_payment_method:first-child:last-child .newspack-ui__input-card input.input-radio[name=payment_method]{display:none}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments .testmode-info{margin-bottom:0}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments #wc-woocommerce_payments-upe-form{margin-top:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label){align-items:unset}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label) .woopayments-rich-payment-method-label img{margin:0}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label) .woopayments-rich-payment-method-label .payment-method-title{margin-right:-.25em;vertical-align:unset}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label) span>img{display:none}#newspack_modal_checkout_container .wc-credit-card-form .form-row-wide{margin-bottom:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .wc-credit-card-form .wc-stripe-elements-field,#newspack_modal_checkout_container .wc-credit-card-form .wc-stripe-iban-element-field{border:1px solid var(--newspack-ui-color-input-border,#ddd);border-radius:var(--newspack-ui-border-radius-m,6px);display:block;font-family:var(--newspack-ui-font-family,system-ui);font-size:var(--newspack-ui-font-size-s,16px);line-height:var(--newspack-ui-line-height-s,1.5);padding:calc(var(--newspack-ui-spacer-2, 12px) - 1px) calc(var(--newspack-ui-spacer-3, 16px) - 1px)}#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) .wc-stripe-elements-field,#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) .wc-stripe-iban-element-field{border-color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) label{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) .woocommerce_error{background:transparent;color:var(--newspack-ui-color-error-50,#d63638);font-family:var(--newspack-ui-font-family,system-ui);font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);padding:0}@media(max-width:440px){#newspack_modal_checkout_container .wc-credit-card-form#wc-stripe-cc-form .form-row-first,#newspack_modal_checkout_container .wc-credit-card-form#wc-stripe-cc-form .form-row-last{float:none;width:100%}}#newspack_modal_checkout_container #stripe-payment-data~fieldset{margin:var(--newspack-ui-spacer-3,16px) 0 0}#newspack_modal_checkout_container fieldset:has(.woocommerce-SavedPaymentMethods-saveNew[style*="display: none"]){display:none}#newspack_modal_checkout_container #wcpay-upe-element,#newspack_modal_checkout_container .wcpay-upe-element{margin:0;padding:0}#newspack_modal_checkout_container #wcpay-upe-element+div:has(.woocommerce-SavedPaymentMethods-saveNew),#newspack_modal_checkout_container .wcpay-upe-element+div:has(.woocommerce-SavedPaymentMethods-saveNew){margin-top:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number{font-size:inherit;font-style:inherit;font-weight:400;line-height:var(--newspack-ui-line-height-xs,1.4286);padding:0;vertical-align:unset}#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number:focus,#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number:hover{color:inherit;filter:none}#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number i{height:1em;width:1em}#newspack_modal_checkout_container .payment_method_woocommerce_payments .testmode-info a{text-decoration:underline}#newspack_modal_checkout_container .woocommerce-input-wrapper:has(.stripe-gateway-stripelink-modal-trigger){display:block;position:relative}#newspack_modal_checkout_container .woocommerce-input-wrapper:has(.stripe-gateway-stripelink-modal-trigger) .stripe-gateway-stripelink-modal-trigger{inset:calc(50% - 24px) 20px auto auto!important}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table label,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table small,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table td,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table th{font-size:var(--newspack-ui-font-size-xs,14px)!important;line-height:var(--newspack-ui-line-height-xs,1.4286)!important}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table .recurring-totals th,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table thead th{background:transparent}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table .woocommerce-shipping-totals #shipping_method label,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table .woocommerce-shipping-totals #shipping_method li{margin:0}#newspack_modal_checkout_container .woocommerce .first-payment-date{font-family:var(--newspack-ui-font-family,system-ui)}#newspack_modal_checkout_container .woocommerce-invalid .select2-container--default .select2-selection--single,#newspack_modal_checkout_container .woocommerce-invalid input,#newspack_modal_checkout_container .woocommerce-invalid textarea{border-color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-invalid .select2-container--default .select2-selection--single:focus,#newspack_modal_checkout_container .woocommerce-invalid input:focus,#newspack_modal_checkout_container .woocommerce-invalid textarea:focus{outline-color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-invalid label{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper{margin-bottom:0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper .woocommerce-privacy-policy-text{color:var(--newspack-ui-color-neutral-60,#6c6c6c)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions{margin-top:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions :first-child{margin-top:0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper p.form-row{background:var(--newspack-ui-color-neutral-5,#f7f7f7);border-color:var(--newspack-ui-color-border,#ddd);box-shadow:none;font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin-top:var(--newspack-ui-spacer-5,24px);padding:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper p.form-row label{align-items:center;display:flex!important;gap:0;height:20px;justify-content:flex-start;margin:0;padding:0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper p.form-row label input{margin:0 0 0 var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper p.form-row label .woocommerce-terms-and-conditions-checkbox-text{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin-bottom:0}#newspack_modal_checkout_container form .automatewoo-optin{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container #place-order{margin-bottom:0}#newspack_modal_checkout_container #wc-stripe-payment-request-button-separator,#newspack_modal_checkout_container #wcpay-express-checkout-button-separator{display:none!important}#newspack_modal_checkout_container #wc-stripe-payment-request-button-separator[style*="display:none"]+.newspack-ui__word-divider,#newspack_modal_checkout_container #wcpay-express-checkout-button-separator[style*="display:none"]+.newspack-ui__word-divider{display:none}#newspack_modal_checkout_container #checkout_back{margin-top:0}#newspack_modal_checkout_container #checkout_error_back{margin-bottom:0}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup{scroll-margin-top:var(--newspack-ui-spacer-10,64px)}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper li div,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup li div{display:block}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-error,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-info,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-message,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-error,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-info,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-message{background:none;color:inherit;font-family:var(--newspack-ui-font-family,system-ui);font-size:var(--newspack-ui-font-size-xs,14px);list-style-type:none;margin:0;padding:0}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-error li,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-info li,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-message li,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-error li,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-info li,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-message li{width:100%}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper{margin-bottom:var(--newspack-ui-spacer-5,24px);margin-top:0}#newspack_modal_checkout_container .modal-processing{opacity:.5}
@@ -1 +1 @@
1
- <?php return array('dependencies' => array(), 'version' => '53f5dc9a5eb380ec88c4');
1
+ <?php return array('dependencies' => array(), 'version' => '5923a0db82cf5e8cd2fd');
@@ -1 +1 @@
1
- .newspack-modal-checkout{font-size:1rem;padding:32px}.newspack-modal-checkout.cart .button-container{text-align:center}.newspack-modal-checkout.cart .woocommerce-error{background:none;color:#d63638;padding:0}.newspack-modal-checkout .order-details-summary{border:2px solid;border-radius:3px;padding:16px}.newspack-modal-checkout .order-details-summary h4{font-size:1rem;margin:0}.newspack-modal-checkout .order-details-summary h4>span{color:inherit;font-size:clamp(1.75rem,1.75rem + (1vw - .48rem)*.962,2.25rem);font-weight:700;line-height:1.434}.newspack-modal-checkout .order-details-summary h4 .subscription-details{font-size:1rem;font-weight:400}.newspack-modal-checkout #order-details-wrapper.hidden{display:none}.newspack-modal-checkout .woocommerce-NoticeGroup,.newspack-modal-checkout .woocommerce-checkout-review-order-table{margin-top:16px}.newspack-modal-checkout .woocommerce-checkout-review-order-table td,.newspack-modal-checkout .woocommerce-checkout-review-order-table th{font-size:.8rem}.newspack-modal-checkout .woocommerce-checkout-review-order-table.empty{display:none;margin:0;padding:0}.newspack-modal-checkout .woocommerce-billing-fields{margin-bottom:16px}.newspack-modal-checkout .checkout-billing-summary{border-bottom:1px solid #ccc;padding-bottom:32px}.newspack-modal-checkout .checkout-billing-summary__grid{align-items:baseline;display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between}.newspack-modal-checkout .checkout-billing-summary p{font-size:clamp(.75rem,.75rem + (1vw - .48rem)*.481,1rem);margin:16px 0 0}.newspack-modal-checkout .checkout-billing-summary .edit-billing-link{color:#767676;display:inline-block;font-size:clamp(.75rem,.75rem + (1vw - .48rem)*.481,1rem);text-decoration:underline}.newspack-modal-checkout .checkout-billing-summary .edit-billing-link:focus,.newspack-modal-checkout .checkout-billing-summary .edit-billing-link:hover{color:inherit}.newspack-modal-checkout .woocommerce-account-fields .create-account{border-bottom:1px solid #ccc;padding-bottom:32px}.newspack-modal-checkout .woocommerce-account-fields .create-account .woocommerce-password-hint,.newspack-modal-checkout .woocommerce-account-fields .create-account .woocommerce-password-strength{color:#d63638;margin-top:16px}.newspack-modal-checkout form{margin:0}.newspack-modal-checkout form .woocommerce-terms-and-conditions-wrapper{margin:16px 0}.newspack-modal-checkout form h3{font-size:1.37rem;margin:32px 0 0}.newspack-modal-checkout form p{margin:16px 0}.newspack-modal-checkout form .select2-container .select2-selection--single{margin:0}.newspack-modal-checkout form #payment button#place_order{margin-bottom:0}.newspack-modal-checkout form .checkout-billing button[type=submit],.newspack-modal-checkout form button.modal-continue,.newspack-modal-checkout form button[name=woocommerce_checkout_place_order]{display:block;width:100%}.newspack-modal-checkout .form-row-first,.newspack-modal-checkout .form-row-last{width:calc(50% - 8px)}.newspack-modal-checkout .form-row-last+.form-row-first,.newspack-modal-checkout .form-row-wide+.form-row-first,.newspack-modal-checkout .form-row-wide+.form-row-first+.form-row-last{margin-top:0}.newspack-modal-checkout .select2-container--default .select2-selection--single{border-color:#ccc;border-radius:0;height:44px}.newspack-modal-checkout .select2-container--default .select2-selection--single .select2-selection__rendered{color:inherit;line-height:44px}.newspack-modal-checkout .select2-container--default .select2-selection--single .select2-selection__arrow{height:42px}.newspack-modal-checkout .wc_payment_method .payment_box{background:#f0f0f0;border-radius:3px;padding:16px}.newspack-modal-checkout .wc_payment_method .payment_box p{margin-top:0}.newspack-modal-checkout .wc_payment_method .payment_box p.newspack-cover-fees,.newspack-modal-checkout .wc_payment_method .payment_box p.woocommerce-SavedPaymentMethods-saveNew{align-items:flex-start;display:flex;margin:8px 0}.newspack-modal-checkout .wc_payment_method .payment_box p.newspack-cover-fees input[type=checkbox],.newspack-modal-checkout .wc_payment_method .payment_box p.woocommerce-SavedPaymentMethods-saveNew input[type=checkbox]{margin-right:8px}.newspack-modal-checkout .wc-saved-payment-methods{padding:0}.newspack-modal-checkout .woocommerce-error{border-radius:3px;margin:0}.newspack-modal-checkout .woocommerce-notices-wrapper:not(:empty){margin-bottom:32px}.newspack-modal-checkout .woocommerce-privacy-policy-text{color:#767676}.newspack-modal-checkout .woocommerce-privacy-policy-text p{font-size:clamp(.75rem,.75rem + (1vw - .48rem)*.481,1rem);margin:0}.newspack-modal-checkout .woocommerce-thankyou-order-received{align-items:center;border-bottom:1px solid #ccc;display:flex;flex-direction:column;justify-content:center;margin:0 0 32px;padding:0 0 32px}.newspack-modal-checkout .woocommerce-thankyou-order-received:before{animation:bounce .25s ease-in;animation-delay:1s;animation-fill-mode:forwards;background-color:#008a20;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27%3E%3Cpath fill=%27%23fff%27 d=%27m16.7 7.1-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z%27/%3E%3C/svg%3E");background-position:50% 50%;background-repeat:no-repeat;background-size:24px;border-radius:50%;content:"";display:block;height:40px;margin-bottom:16px;padding:8px;transform:scale(0);width:40px}.newspack-modal-checkout .woocommerce-form-login-toggle,.newspack-modal-checkout .woocommerce-thankyou-order-received+.woocommerce-info{display:none}.newspack-modal-checkout .woocommerce-order-overview{color:#767676;list-style:none;margin:16px 0 0;padding:0}.newspack-modal-checkout .blockOverlay{align-items:center;display:flex;inset:0;justify-content:center;position:fixed!important}.newspack-modal-checkout .blockOverlay:after{animation:spin 1s linear infinite;border:2px solid #fff;border-radius:50%;border-top-color:#767676;content:"";display:block;height:25px;width:25px}.newspack-modal-newsletters{border-top:1px solid #ccc;margin-top:20px;padding-top:22px}.newspack-modal-newsletters__info{margin-bottom:35px}.newspack-modal-newsletters__info span{color:#767676}.newspack-modal-newsletters__list-item{border:1px solid #ccc;border-radius:6px;display:flex;margin-bottom:18px}.newspack-modal-newsletters__list-item b{display:block;margin-bottom:2px}.newspack-modal-newsletters label{cursor:pointer;flex:1;padding:12px}.newspack-modal-newsletters input[type=checkbox]{border-radius:5px;margin-left:20px;margin-right:19px;margin-top:18px;padding:10px}.newspack-modal-newsletters input[type=submit],.newspack-modal-newsletters__button{font-size:1em!important;margin-top:25px;padding:22px!important;width:100%}@keyframes bounce{0%{transform:scale(0)}90%{transform:scale(1.4)}to{transform:scale(1)}}
1
+ #newspack_modal_checkout_container{background:var(--newspack-ui-color-neutral-0,#fff);padding:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container form p{margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container form p.form-row-first:has(+.form-row-last:last-child),#newspack_modal_checkout_container form p:last-child{margin-bottom:0}#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table tfoot>tr.order-total>th,#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table tfoot>tr.recurring-totals>th,#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table thead>tr>th{font-weight:var(--newspack-ui-font-weight-strong,600)}#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table td.product-name{padding-right:1em}#newspack_modal_checkout_container .order-review-wrapper.hidden,#newspack_modal_checkout_container .woocommerce-form-login-toggle{display:none}#newspack_modal_checkout_container .woocommerce form .form-row .required{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce form .form-row-first:not(:has(+.form-row-last)),#newspack_modal_checkout_container .woocommerce form .form-row-last+.form-row-last,#newspack_modal_checkout_container .woocommerce form .form-row-wide+.form-row-last{clear:both;float:none;width:100%}#newspack_modal_checkout_container .woocommerce-checkout h3{font-size:var(--newspack-ui-font-size-s,16px);line-height:var(--newspack-ui-line-height-s,1.5);margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields h3{margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-checkout #after_customer_details h3{margin-bottom:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-account-fields label,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields label,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields label,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-shipping-fields label{font-size:var(--newspack-ui-font-size-s,16px);line-height:var(--newspack-ui-line-height-s,1.5)}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-account-fields:not(:has(>*)),#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields:not(:has(>*)),#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields:not(:has(>*)),#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-shipping-fields:not(:has(>*)){display:none}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields__field-wrapper~.form-row{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields h3{display:none}#newspack_modal_checkout_container #checkout_details{margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container #checkout_details h3{margin:0 0 var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .billing-details:not(:last-child),#newspack_modal_checkout_container .gift-details:not(:last-child),#newspack_modal_checkout_container .shipping-details:not(:last-child){margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .billing-details p,#newspack_modal_checkout_container .gift-details p,#newspack_modal_checkout_container .shipping-details p{margin:0}#newspack_modal_checkout_container #billing_country_field:has(input[readonly][autocomplete=country]) .required,#newspack_modal_checkout_container #shipping_country_field:has(input[readonly][autocomplete=country]) .required{display:none}#newspack_modal_checkout_container #billing_country_field:has(input[readonly][autocomplete=country]) strong,#newspack_modal_checkout_container #shipping_country_field:has(input[readonly][autocomplete=country]) strong{font-weight:400}#newspack_modal_checkout_container #ship-to-different-address{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container #ship-to-different-address label{display:flex;font-weight:600;margin:0}#newspack_modal_checkout_container #ship-to-different-address label input[type=checkbox]{display:grid}#newspack_modal_checkout_container #ship-to-different-address span{font-weight:unset}#newspack_modal_checkout_container #ship-to-different-address span:after,#newspack_modal_checkout_container #ship-to-different-address span:before{display:none}#newspack_modal_checkout_container .shipping_address{margin-top:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .newspack-wcsg--wrapper{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .newspack-wcsg--gift-toggle{align-items:center;display:flex;font-weight:700;margin-bottom:0}#newspack_modal_checkout_container .newspack-wcsg--gift-toggle label{display:flex!important;margin-bottom:0}#newspack_modal_checkout_container .newspack-wcsg--gift-toggle .woocommerce-input-wrapper{line-height:.5;margin-right:.25rem}#newspack_modal_checkout_container .newspack-wcsg--gift-email{max-height:0;overflow:hidden;transition:max-height .25s ease-in-out;visibility:hidden}#newspack_modal_checkout_container .newspack-wcsg--gift-email.visible{margin:var(--newspack-ui-spacer-5,24px) 0 0;max-height:none;visibility:visible}#newspack_modal_checkout_container .woocommerce-account-fields{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .woocommerce-account-fields h3:has(+.create-account){display:none}#newspack_modal_checkout_container .woocommerce-account-fields .create-account label:has(input[type=checkbox]){display:grid;gap:0 var(--newspack-ui-spacer-base,8px);grid-template-columns:var(--newspack-ui-spacer-4,20px) 1fr;margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin:var(--newspack-ui-spacer-base,8px) 0 0}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.bad,#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.short{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.good{color:var(--newspack-ui-color-warning-40,#bd8600)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.strong{color:var(--newspack-ui-color-success-50,#008a20)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-hint{color:var(--newspack-ui-color-neutral-60,#6c6c6c);font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account>p.form-row:last-of-type{margin-bottom:0}#newspack_modal_checkout_container .name-your-price{margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .modal_checkout_nyp h3{color:var(--newspack-ui-label-color,inherit);margin-bottom:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .modal_checkout_nyp .input-price{align-items:center;display:flex;flex-wrap:nowrap;gap:.5em;margin:0 0 8px}#newspack_modal_checkout_container .modal_checkout_nyp .input-price label{align-items:center;display:flex;margin:0;position:relative;width:100%}#newspack_modal_checkout_container .modal_checkout_nyp .input-price label span.currency{left:0;padding-left:16px;position:absolute}#newspack_modal_checkout_container .modal_checkout_nyp .input-price label input{padding-left:32px}#newspack_modal_checkout_container .modal_checkout_nyp .input-price button{margin-top:0}#newspack_modal_checkout_container .woocommerce-form-coupon{margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-form-coupon h3{color:var(--newspack-ui-label-color,inherit);margin-bottom:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type{align-items:center;display:flex;gap:var(--newspack-ui-spacer-base,#1e1e1e)}#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type button,#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type input{margin:0!important}#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type+.newspack-ui__helper-text{margin-top:calc(var(--newspack-ui-spacer-3, 16px)*-1)}#newspack_modal_checkout_container .modal_checkout_coupon.modal-processing,#newspack_modal_checkout_container .modal_checkout_nyp.modal-processing{opacity:.5}#newspack_modal_checkout_container .woocommerce .order-details-summary h2{margin-top:0}#newspack_modal_checkout_container .wc_payment_methods{margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .wc_payment_methods label[for=payment_method_stripe].newspack-ui__input-card{padding:var(--newspack-ui-spacer-3,16px)!important}#newspack_modal_checkout_container .wc_payment_method+.wc_payment_method{margin-top:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .wc_payment_method span{font-weight:var(--newspack-ui-font-weight-strong,600)}#newspack_modal_checkout_container .wc_payment_method>label:first-of-type{margin:unset}#newspack_modal_checkout_container .wc_payment_method>label:first-of-type img{float:right}#newspack_modal_checkout_container .wc_payment_method .payment_box{background:transparent;font-weight:400;padding:0}#newspack_modal_checkout_container .wc_payment_method .payment_box p{color:var(--newspack-ui-color-neutral-60,#6c6c6c);font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin:0}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods{margin:var(--newspack-ui-spacer-3,16px) 0 0;padding:0}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods li{display:flex}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods li:not(:last-child){margin-bottom:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods li label{font-size:var(--newspack-ui-font-size-xs,14px);font-weight:400;line-height:inherit;margin:0}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods li input{margin-right:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset{margin:var(--newspack-ui-spacer-3,16px) 0 0;padding:0!important}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset.wc-payment-form{margin-top:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset p{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin-bottom:0}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset p.form-row{align-items:flex-start;display:flex;gap:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset p.form-row input{margin:0}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset p.form-row label{font-weight:400;margin-bottom:0}#newspack_modal_checkout_container .wc_payment_method .payment_box .newspack-cover-fees label,#newspack_modal_checkout_container .wc_payment_method .payment_box .woocommerce-SavedPaymentMethods-saveNew label{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286)}#newspack_modal_checkout_container .wc_payment_method .payment_box .newspack-cover-fees:before,#newspack_modal_checkout_container .wc_payment_method .payment_box .woocommerce-SavedPaymentMethods-saveNew:before{display:none}#newspack_modal_checkout_container .wc_payment_method input.input-radio[name=payment_method]{display:inherit}#newspack_modal_checkout_container .wc_payment_method:first-child:last-child .newspack-ui__input-card{gap:0;grid-template-columns:0}#newspack_modal_checkout_container .wc_payment_method:first-child:last-child .newspack-ui__input-card input.input-radio[name=payment_method]{display:none}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments .testmode-info{margin-bottom:0}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments #wc-woocommerce_payments-upe-form{margin-top:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label){align-items:unset}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label) .woopayments-rich-payment-method-label img{margin:0}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label) .woopayments-rich-payment-method-label .payment-method-title{margin-left:-.25em;vertical-align:unset}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label) span>img{display:none}#newspack_modal_checkout_container .wc-credit-card-form .form-row-wide{margin-bottom:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .wc-credit-card-form .wc-stripe-elements-field,#newspack_modal_checkout_container .wc-credit-card-form .wc-stripe-iban-element-field{border:1px solid var(--newspack-ui-color-input-border,#ddd);border-radius:var(--newspack-ui-border-radius-m,6px);display:block;font-family:var(--newspack-ui-font-family,system-ui);font-size:var(--newspack-ui-font-size-s,16px);line-height:var(--newspack-ui-line-height-s,1.5);padding:calc(var(--newspack-ui-spacer-2, 12px) - 1px) calc(var(--newspack-ui-spacer-3, 16px) - 1px)}#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) .wc-stripe-elements-field,#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) .wc-stripe-iban-element-field{border-color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) label{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) .woocommerce_error{background:transparent;color:var(--newspack-ui-color-error-50,#d63638);font-family:var(--newspack-ui-font-family,system-ui);font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);padding:0}@media(max-width:440px){#newspack_modal_checkout_container .wc-credit-card-form#wc-stripe-cc-form .form-row-first,#newspack_modal_checkout_container .wc-credit-card-form#wc-stripe-cc-form .form-row-last{float:none;width:100%}}#newspack_modal_checkout_container #stripe-payment-data~fieldset{margin:var(--newspack-ui-spacer-3,16px) 0 0}#newspack_modal_checkout_container fieldset:has(.woocommerce-SavedPaymentMethods-saveNew[style*="display: none"]){display:none}#newspack_modal_checkout_container #wcpay-upe-element,#newspack_modal_checkout_container .wcpay-upe-element{margin:0;padding:0}#newspack_modal_checkout_container #wcpay-upe-element+div:has(.woocommerce-SavedPaymentMethods-saveNew),#newspack_modal_checkout_container .wcpay-upe-element+div:has(.woocommerce-SavedPaymentMethods-saveNew){margin-top:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number{font-size:inherit;font-style:inherit;font-weight:400;line-height:var(--newspack-ui-line-height-xs,1.4286);padding:0;vertical-align:unset}#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number:focus,#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number:hover{color:inherit;filter:none}#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number i{height:1em;width:1em}#newspack_modal_checkout_container .payment_method_woocommerce_payments .testmode-info a{text-decoration:underline}#newspack_modal_checkout_container .woocommerce-input-wrapper:has(.stripe-gateway-stripelink-modal-trigger){display:block;position:relative}#newspack_modal_checkout_container .woocommerce-input-wrapper:has(.stripe-gateway-stripelink-modal-trigger) .stripe-gateway-stripelink-modal-trigger{inset:calc(50% - 24px) 20px auto auto!important}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table label,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table small,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table td,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table th{font-size:var(--newspack-ui-font-size-xs,14px)!important;line-height:var(--newspack-ui-line-height-xs,1.4286)!important}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table .recurring-totals th,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table thead th{background:transparent}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table .woocommerce-shipping-totals #shipping_method label,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table .woocommerce-shipping-totals #shipping_method li{margin:0}#newspack_modal_checkout_container .woocommerce .first-payment-date{font-family:var(--newspack-ui-font-family,system-ui)}#newspack_modal_checkout_container .woocommerce-invalid .select2-container--default .select2-selection--single,#newspack_modal_checkout_container .woocommerce-invalid input,#newspack_modal_checkout_container .woocommerce-invalid textarea{border-color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-invalid .select2-container--default .select2-selection--single:focus,#newspack_modal_checkout_container .woocommerce-invalid input:focus,#newspack_modal_checkout_container .woocommerce-invalid textarea:focus{outline-color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-invalid label{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper{margin-bottom:0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper .woocommerce-privacy-policy-text{color:var(--newspack-ui-color-neutral-60,#6c6c6c)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions{margin-top:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions :first-child{margin-top:0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper p.form-row{background:var(--newspack-ui-color-neutral-5,#f7f7f7);border-color:var(--newspack-ui-color-border,#ddd);box-shadow:none;font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin-top:var(--newspack-ui-spacer-5,24px);padding:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper p.form-row label{align-items:center;display:flex!important;gap:0;height:20px;justify-content:flex-start;margin:0;padding:0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper p.form-row label input{margin:0 var(--newspack-ui-spacer-2,12px) 0 0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper p.form-row label .woocommerce-terms-and-conditions-checkbox-text{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin-bottom:0}#newspack_modal_checkout_container form .automatewoo-optin{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container #place-order{margin-bottom:0}#newspack_modal_checkout_container #wc-stripe-payment-request-button-separator,#newspack_modal_checkout_container #wcpay-express-checkout-button-separator{display:none!important}#newspack_modal_checkout_container #wc-stripe-payment-request-button-separator[style*="display:none"]+.newspack-ui__word-divider,#newspack_modal_checkout_container #wcpay-express-checkout-button-separator[style*="display:none"]+.newspack-ui__word-divider{display:none}#newspack_modal_checkout_container #checkout_back{margin-top:0}#newspack_modal_checkout_container #checkout_error_back{margin-bottom:0}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup{scroll-margin-top:var(--newspack-ui-spacer-10,64px)}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper li div,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup li div{display:block}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-error,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-info,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-message,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-error,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-info,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-message{background:none;color:inherit;font-family:var(--newspack-ui-font-family,system-ui);font-size:var(--newspack-ui-font-size-xs,14px);list-style-type:none;margin:0;padding:0}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-error li,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-info li,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-message li,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-error li,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-info li,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-message li{width:100%}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper{margin-bottom:var(--newspack-ui-spacer-5,24px);margin-top:0}#newspack_modal_checkout_container .modal-processing{opacity:.5}