@foxy.io/elements 1.17.0 → 1.18.0-beta.10

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 (507) hide show
  1. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  2. package/dist/cdn/foxy-address-card.js +3 -85
  3. package/dist/cdn/foxy-address-form.js +1 -1
  4. package/dist/cdn/foxy-api-browser.js +1 -1
  5. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  6. package/dist/cdn/foxy-attribute-card.js +1 -1
  7. package/dist/cdn/foxy-attribute-form.js +1 -1
  8. package/dist/cdn/foxy-cancellation-form.js +1 -1
  9. package/dist/cdn/foxy-collection-page.js +1 -1
  10. package/dist/cdn/foxy-collection-pages.js +1 -1
  11. package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
  12. package/dist/cdn/foxy-coupon-card.js +1 -1
  13. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  14. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  15. package/dist/cdn/foxy-coupon-detail-card.js +1 -1
  16. package/dist/cdn/foxy-coupon-form.js +1 -1
  17. package/dist/cdn/foxy-custom-field-card.js +1 -1
  18. package/dist/cdn/foxy-custom-field-form.js +1 -1
  19. package/dist/cdn/foxy-customer-api.js +1 -1
  20. package/dist/cdn/foxy-customer-card.js +1 -1
  21. package/dist/cdn/foxy-customer-form.js +1 -1
  22. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  23. package/dist/cdn/foxy-customer-portal.js +15 -15
  24. package/dist/cdn/foxy-customer.js +5 -86
  25. package/dist/cdn/foxy-customers-table.js +1 -1
  26. package/dist/cdn/foxy-discount-builder.js +1 -1
  27. package/dist/cdn/foxy-discount-card.js +1 -1
  28. package/dist/cdn/foxy-discount-detail-card.js +1 -1
  29. package/dist/cdn/foxy-donation.js +1 -1
  30. package/dist/cdn/foxy-email-template-card.js +1 -0
  31. package/dist/cdn/foxy-email-template-form.js +1 -1
  32. package/dist/cdn/foxy-error-entry-card.js +1 -1
  33. package/dist/cdn/foxy-form-dialog.js +1 -1
  34. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  35. package/dist/cdn/foxy-gift-card-card.js +1 -1
  36. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  37. package/dist/cdn/foxy-gift-card-code-log-card.js +1 -0
  38. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  39. package/dist/cdn/foxy-gift-card-form.js +1 -1
  40. package/dist/cdn/foxy-i18n.js +1 -1
  41. package/dist/cdn/foxy-item-card.js +1 -1
  42. package/dist/cdn/foxy-item-category-card.js +1 -0
  43. package/dist/cdn/foxy-item-category-form.js +1 -0
  44. package/dist/cdn/foxy-item-form.js +1 -1
  45. package/dist/cdn/foxy-item-option-card.js +1 -1
  46. package/dist/cdn/foxy-item-option-form.js +1 -1
  47. package/dist/cdn/foxy-items-form.js +1 -1
  48. package/dist/cdn/foxy-nucleon-element.js +1 -1
  49. package/dist/cdn/foxy-pagination.js +1 -1
  50. package/dist/cdn/foxy-payment-card.js +1 -1
  51. package/dist/cdn/foxy-payment-method-card.js +1 -1
  52. package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -0
  53. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -0
  54. package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -0
  55. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -0
  56. package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -0
  57. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -0
  58. package/dist/cdn/foxy-payments-api.js +1 -0
  59. package/dist/cdn/foxy-query-builder.js +1 -1
  60. package/dist/cdn/foxy-report-form.js +4 -4
  61. package/dist/cdn/foxy-reports-table.js +1 -1
  62. package/dist/cdn/foxy-shipment-card.js +1 -1
  63. package/dist/cdn/foxy-sign-in-form.js +1 -1
  64. package/dist/cdn/foxy-spinner.js +2 -2
  65. package/dist/cdn/foxy-store-shipping-method-form.js +1 -0
  66. package/dist/cdn/foxy-subscription-card.js +1 -1
  67. package/dist/cdn/foxy-subscription-form.js +6 -6
  68. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  69. package/dist/cdn/foxy-swipe-actions.js +1 -1
  70. package/dist/cdn/foxy-table.js +1 -1
  71. package/dist/cdn/foxy-tax-card.js +1 -1
  72. package/dist/cdn/foxy-tax-form.js +1 -1
  73. package/dist/cdn/foxy-template-config-form.js +1 -1
  74. package/dist/cdn/foxy-template-form.js +1 -1
  75. package/dist/cdn/foxy-transaction-card.js +1 -1
  76. package/dist/cdn/foxy-transaction.js +1 -1
  77. package/dist/cdn/foxy-transactions-table.js +1 -1
  78. package/dist/cdn/foxy-user-form.js +1 -1
  79. package/dist/cdn/foxy-users-table.js +1 -1
  80. package/dist/cdn/foxy-webhook-card.js +1 -1
  81. package/dist/cdn/foxy-webhook-form.js +1 -318
  82. package/dist/cdn/foxy-webhook-log-card.js +1 -1
  83. package/dist/cdn/foxy-webhook-status-card.js +1 -1
  84. package/dist/cdn/shared-02c6c308.js +169 -0
  85. package/dist/cdn/{shared-e1c1e8e2.js → shared-0479553e.js} +1 -1
  86. package/dist/cdn/{shared-ae415a98.js → shared-0ca312eb.js} +1 -1
  87. package/dist/cdn/{shared-2188d5f7.js → shared-0ffa1afb.js} +1 -1
  88. package/dist/cdn/{shared-99940888.js → shared-11c2efc8.js} +1 -1
  89. package/dist/cdn/shared-164a791e.js +1 -0
  90. package/dist/cdn/{shared-5c3a88d2.js → shared-17e9778d.js} +1 -1
  91. package/dist/cdn/{shared-f1317609.js → shared-19bdb896.js} +1 -1
  92. package/dist/cdn/{shared-62169210.js → shared-1c9fd2b1.js} +3 -3
  93. package/dist/cdn/{shared-98497473.js → shared-24d650cd.js} +1 -1
  94. package/dist/cdn/shared-3214ee1b.js +11 -0
  95. package/dist/cdn/{shared-6d104622.js → shared-3c7489d6.js} +1 -1
  96. package/dist/cdn/shared-3d245899.js +134 -0
  97. package/dist/cdn/shared-3e3ba16e.js +1 -0
  98. package/dist/cdn/{shared-dc23b751.js → shared-3fd94d2f.js} +1 -1
  99. package/dist/cdn/shared-4029be54.js +1 -0
  100. package/dist/cdn/shared-40ff320f.js +150 -0
  101. package/dist/cdn/{shared-195fd5af.js → shared-4a2e1638.js} +1 -1
  102. package/dist/cdn/shared-4cd53ea2.js +1 -0
  103. package/dist/cdn/{shared-bf6fb415.js → shared-4e2e233c.js} +1 -1
  104. package/dist/cdn/shared-4f037e43.js +1 -0
  105. package/dist/cdn/{shared-4e201e09.js → shared-5f751bfc.js} +1 -1
  106. package/dist/cdn/shared-60425d2e.js +1 -0
  107. package/dist/cdn/{shared-2bdd4f74.js → shared-61174bec.js} +12 -22
  108. package/dist/cdn/shared-649c195a.js +318 -0
  109. package/dist/cdn/{shared-c5c60417.js → shared-66a0263f.js} +1 -1
  110. package/dist/cdn/{shared-39f2c345.js → shared-6d175df8.js} +1 -1
  111. package/dist/cdn/shared-74e79000.js +553 -0
  112. package/dist/cdn/{shared-1bbd9b73.js → shared-75e78c70.js} +1 -1
  113. package/dist/cdn/shared-7c8b3ce0.js +15 -0
  114. package/dist/cdn/{shared-dc73b9a5.js → shared-7f33a83a.js} +1 -1
  115. package/dist/cdn/{shared-baf79b0b.js → shared-8116ab4c.js} +1 -1
  116. package/dist/cdn/{shared-a052131e.js → shared-8dd640bf.js} +2 -2
  117. package/dist/cdn/{shared-8d937ae4.js → shared-96695c93.js} +3 -3
  118. package/dist/cdn/{shared-0eb966c5.js → shared-99065f2a.js} +1 -1
  119. package/dist/cdn/shared-9aab51c0.js +1 -0
  120. package/dist/cdn/shared-9e6fc72e.js +1 -0
  121. package/dist/cdn/shared-9fce92c9.js +1 -0
  122. package/dist/cdn/shared-a03d948d.js +1 -0
  123. package/dist/cdn/{shared-dd6d3c18.js → shared-a6263179.js} +1 -1
  124. package/dist/cdn/shared-a694a204.js +1 -0
  125. package/dist/cdn/shared-a8ced8bf.js +1 -0
  126. package/dist/cdn/{shared-7c612495.js → shared-acb90deb.js} +1 -1
  127. package/dist/cdn/shared-ad70817d.js +82 -0
  128. package/dist/cdn/{shared-7c8bb60c.js → shared-b0ba62ff.js} +1 -1
  129. package/dist/cdn/{shared-8e9a3bbb.js → shared-b1304f5b.js} +1 -1
  130. package/dist/cdn/shared-b52e1d97.js +1 -0
  131. package/dist/cdn/shared-b7787aae.js +64 -0
  132. package/dist/cdn/{shared-c89ba319.js → shared-ba4053b3.js} +1 -1
  133. package/dist/cdn/shared-bc7f58ef.js +1 -0
  134. package/dist/cdn/shared-beb9cddd.js +1 -0
  135. package/dist/cdn/{shared-7474af47.js → shared-c5091857.js} +1 -1
  136. package/dist/cdn/{shared-a0836fa5.js → shared-c566fe52.js} +1 -1
  137. package/dist/cdn/shared-c677ca5a.js +1 -0
  138. package/dist/cdn/{shared-d28ac9dc.js → shared-c99a75d8.js} +1 -1
  139. package/dist/cdn/{shared-322e7efb.js → shared-c9a9077a.js} +1 -1
  140. package/dist/cdn/shared-cb26f86e.js +1 -0
  141. package/dist/cdn/{shared-31c43743.js → shared-ccb96675.js} +1 -1
  142. package/dist/cdn/{shared-f84686a8.js → shared-cfe61b3f.js} +1 -1
  143. package/dist/cdn/{shared-9803aa7c.js → shared-d3bf9ac0.js} +2 -2
  144. package/dist/cdn/{shared-a0c6a159.js → shared-d519a301.js} +2 -2
  145. package/dist/cdn/{shared-26ce8d23.js → shared-d8faafc7.js} +1 -1
  146. package/dist/cdn/shared-d9c5e26e.js +1 -0
  147. package/dist/cdn/{shared-3b2dedf9.js → shared-dc891fc4.js} +1 -1
  148. package/dist/cdn/shared-de5fc645.js +82 -0
  149. package/dist/cdn/{shared-f9f9ed5b.js → shared-e6f3e9f0.js} +1 -1
  150. package/dist/cdn/shared-e7736e8d.js +1 -0
  151. package/dist/cdn/{shared-bb686fc6.js → shared-f00d31e0.js} +1 -1
  152. package/dist/cdn/{shared-d699348f.js → shared-f0591b3e.js} +2 -2
  153. package/dist/cdn/{shared-22ba9566.js → shared-f3b35364.js} +1 -1
  154. package/dist/cdn/shared-ff31023c.js +1 -0
  155. package/dist/cdn/translations/email-template-card/en.json +8 -0
  156. package/dist/cdn/translations/email-template-form/en.json +5 -0
  157. package/dist/cdn/translations/gift-card-code-form/en.json +32 -0
  158. package/dist/cdn/translations/gift-card-code-log-card/en.json +10 -0
  159. package/dist/cdn/translations/gift-card-form/en.json +58 -1
  160. package/dist/cdn/translations/item-category-form/en.json +196 -0
  161. package/dist/cdn/translations/payments-api-fraud-protection-card/en.json +10 -0
  162. package/dist/cdn/translations/payments-api-fraud-protection-form/en.json +34 -0
  163. package/dist/cdn/translations/payments-api-payment-method-card/en.json +10 -0
  164. package/dist/cdn/translations/payments-api-payment-method-form/en.json +61 -0
  165. package/dist/cdn/translations/payments-api-payment-preset-card/en.json +11 -0
  166. package/dist/cdn/translations/payments-api-payment-preset-form/en.json +84 -0
  167. package/dist/cdn/translations/store-shipping-method-form/en.json +90 -0
  168. package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.d.ts +3 -0
  169. package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js +23 -0
  170. package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js.map +1 -1
  171. package/dist/elements/internal/InternalAsyncDetailsControl/InternalAsyncDetailsControl.js +3 -1
  172. package/dist/elements/internal/InternalAsyncDetailsControl/InternalAsyncDetailsControl.js.map +1 -1
  173. package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.d.ts +23 -0
  174. package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js +167 -0
  175. package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js.map +1 -0
  176. package/dist/elements/internal/InternalAsyncListControl/index.d.ts +12 -0
  177. package/dist/elements/internal/InternalAsyncListControl/index.js +14 -0
  178. package/dist/elements/internal/InternalAsyncListControl/index.js.map +1 -0
  179. package/dist/elements/internal/InternalCheckboxGroupControl/InternalCheckboxGroupControl.d.ts +17 -0
  180. package/dist/elements/internal/InternalCheckboxGroupControl/InternalCheckboxGroupControl.js +57 -0
  181. package/dist/elements/internal/InternalCheckboxGroupControl/InternalCheckboxGroupControl.js.map +1 -0
  182. package/dist/elements/internal/InternalCheckboxGroupControl/index.d.ts +6 -0
  183. package/dist/elements/internal/InternalCheckboxGroupControl/index.js +8 -0
  184. package/dist/elements/internal/InternalCheckboxGroupControl/index.js.map +1 -0
  185. package/dist/elements/internal/InternalCheckboxGroupControl/types.d.ts +6 -0
  186. package/dist/elements/internal/InternalCheckboxGroupControl/types.js +2 -0
  187. package/dist/elements/internal/InternalCheckboxGroupControl/types.js.map +1 -0
  188. package/dist/elements/internal/InternalControl/InternalControl.js +3 -2
  189. package/dist/elements/internal/InternalControl/InternalControl.js.map +1 -1
  190. package/dist/elements/internal/InternalEditableControl/InternalEditableControl.d.ts +2 -0
  191. package/dist/elements/internal/InternalEditableControl/InternalEditableControl.js +6 -4
  192. package/dist/elements/internal/InternalEditableControl/InternalEditableControl.js.map +1 -1
  193. package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.js +1 -1
  194. package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.js.map +1 -1
  195. package/dist/elements/internal/InternalNumberControl/InternalNumberControl.js +1 -1
  196. package/dist/elements/internal/InternalNumberControl/InternalNumberControl.js.map +1 -1
  197. package/dist/elements/internal/InternalSelectControl/InternalSelectControl.d.ts +17 -0
  198. package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js +57 -0
  199. package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js.map +1 -0
  200. package/dist/elements/internal/InternalSelectControl/index.d.ts +5 -0
  201. package/dist/elements/internal/InternalSelectControl/index.js +7 -0
  202. package/dist/elements/internal/InternalSelectControl/index.js.map +1 -0
  203. package/dist/elements/internal/InternalSelectControl/types.d.ts +6 -0
  204. package/dist/elements/internal/InternalSelectControl/types.js +2 -0
  205. package/dist/elements/internal/InternalSelectControl/types.js.map +1 -0
  206. package/dist/elements/internal/InternalTextAreaControl/InternalTextAreaControl.d.ts +13 -0
  207. package/dist/elements/internal/InternalTextAreaControl/InternalTextAreaControl.js +40 -0
  208. package/dist/elements/internal/InternalTextAreaControl/InternalTextAreaControl.js.map +1 -0
  209. package/dist/elements/internal/InternalTextAreaControl/index.d.ts +4 -0
  210. package/dist/elements/internal/InternalTextAreaControl/index.js +6 -0
  211. package/dist/elements/internal/InternalTextAreaControl/index.js.map +1 -0
  212. package/dist/elements/internal/InternalTextControl/InternalTextControl.js +1 -0
  213. package/dist/elements/internal/InternalTextControl/InternalTextControl.js.map +1 -1
  214. package/dist/elements/private/I18N/I18N.js +3 -0
  215. package/dist/elements/private/I18N/I18N.js.map +1 -1
  216. package/dist/elements/private/Switch/Switch.js +1 -1
  217. package/dist/elements/private/Switch/Switch.js.map +1 -1
  218. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.js +10 -23
  219. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.js.map +1 -1
  220. package/dist/elements/public/EmailTemplateCard/EmailTemplateCard.d.ts +10 -0
  221. package/dist/elements/public/EmailTemplateCard/EmailTemplateCard.js +24 -0
  222. package/dist/elements/public/EmailTemplateCard/EmailTemplateCard.js.map +1 -0
  223. package/dist/elements/public/EmailTemplateCard/index.d.ts +6 -0
  224. package/dist/elements/public/EmailTemplateCard/index.js +8 -0
  225. package/dist/elements/public/EmailTemplateCard/index.js.map +1 -0
  226. package/dist/elements/public/EmailTemplateCard/types.d.ts +3 -0
  227. package/dist/elements/public/EmailTemplateCard/types.js +2 -0
  228. package/dist/elements/public/EmailTemplateCard/types.js.map +1 -0
  229. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.d.ts +3 -0
  230. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js +17 -0
  231. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js.map +1 -1
  232. package/dist/elements/public/EmailTemplateForm/index.d.ts +1 -0
  233. package/dist/elements/public/EmailTemplateForm/index.js +1 -0
  234. package/dist/elements/public/EmailTemplateForm/index.js.map +1 -1
  235. package/dist/elements/public/FormDialog/FormDialog.js +1 -1
  236. package/dist/elements/public/FormDialog/FormDialog.js.map +1 -1
  237. package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.d.ts +4 -0
  238. package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js +32 -0
  239. package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js.map +1 -1
  240. package/dist/elements/public/GiftCardCodeForm/index.d.ts +7 -4
  241. package/dist/elements/public/GiftCardCodeForm/index.js +7 -4
  242. package/dist/elements/public/GiftCardCodeForm/index.js.map +1 -1
  243. package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/InternalGiftCardCodeFormItemControl.d.ts +5 -0
  244. package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/InternalGiftCardCodeFormItemControl.js +23 -0
  245. package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/InternalGiftCardCodeFormItemControl.js.map +1 -0
  246. package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/index.d.ts +6 -0
  247. package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/index.js +8 -0
  248. package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/index.js.map +1 -0
  249. package/dist/elements/public/GiftCardCodeLogCard/GiftCardCodeLogCard.d.ts +12 -0
  250. package/dist/elements/public/GiftCardCodeLogCard/GiftCardCodeLogCard.js +108 -0
  251. package/dist/elements/public/GiftCardCodeLogCard/GiftCardCodeLogCard.js.map +1 -0
  252. package/dist/elements/public/GiftCardCodeLogCard/index.d.ts +6 -0
  253. package/dist/elements/public/GiftCardCodeLogCard/index.js +8 -0
  254. package/dist/elements/public/GiftCardCodeLogCard/index.js.map +1 -0
  255. package/dist/elements/public/GiftCardCodeLogCard/types.d.ts +3 -0
  256. package/dist/elements/public/GiftCardCodeLogCard/types.js +2 -0
  257. package/dist/elements/public/GiftCardCodeLogCard/types.js.map +1 -0
  258. package/dist/elements/public/GiftCardForm/GiftCardForm.js +25 -0
  259. package/dist/elements/public/GiftCardForm/GiftCardForm.js.map +1 -1
  260. package/dist/elements/public/GiftCardForm/index.d.ts +1 -2
  261. package/dist/elements/public/GiftCardForm/index.js +1 -2
  262. package/dist/elements/public/GiftCardForm/index.js.map +1 -1
  263. package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/InternalGiftCardFormProvisioningControl.d.ts +14 -0
  264. package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/InternalGiftCardFormProvisioningControl.js +93 -0
  265. package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/InternalGiftCardFormProvisioningControl.js.map +1 -0
  266. package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/index.d.ts +6 -0
  267. package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/index.js +8 -0
  268. package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/index.js.map +1 -0
  269. package/dist/elements/public/ItemCard/ItemCard.js +8 -6
  270. package/dist/elements/public/ItemCard/ItemCard.js.map +1 -1
  271. package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.d.ts +6 -0
  272. package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.js +16 -0
  273. package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.js.map +1 -0
  274. package/dist/elements/public/ItemCategoryCard/index.d.ts +3 -0
  275. package/dist/elements/public/ItemCategoryCard/index.js +5 -0
  276. package/dist/elements/public/ItemCategoryCard/index.js.map +1 -0
  277. package/dist/elements/public/ItemCategoryCard/types.d.ts +3 -0
  278. package/dist/elements/public/ItemCategoryCard/types.js +2 -0
  279. package/dist/elements/public/ItemCategoryCard/types.js.map +1 -0
  280. package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.d.ts +31 -0
  281. package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.js +309 -0
  282. package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.js.map +1 -0
  283. package/dist/elements/public/ItemCategoryForm/index.d.ts +10 -0
  284. package/dist/elements/public/ItemCategoryForm/index.js +12 -0
  285. package/dist/elements/public/ItemCategoryForm/index.js.map +1 -0
  286. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/InternalItemCategoryFormTaxesControl.d.ts +8 -0
  287. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/InternalItemCategoryFormTaxesControl.js +52 -0
  288. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/InternalItemCategoryFormTaxesControl.js.map +1 -0
  289. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/index.d.ts +6 -0
  290. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/index.js +8 -0
  291. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/index.js.map +1 -0
  292. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/InternalItemCategoryFormTaxesControlItem.d.ts +11 -0
  293. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/InternalItemCategoryFormTaxesControlItem.js +85 -0
  294. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/InternalItemCategoryFormTaxesControlItem.js.map +1 -0
  295. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/index.d.ts +5 -0
  296. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/index.js +7 -0
  297. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/index.js.map +1 -0
  298. package/dist/elements/public/ItemCategoryForm/types.d.ts +3 -0
  299. package/dist/elements/public/ItemCategoryForm/types.js +2 -0
  300. package/dist/elements/public/ItemCategoryForm/types.js.map +1 -0
  301. package/dist/elements/public/NucleonElement/API.js +1 -1
  302. package/dist/elements/public/NucleonElement/API.js.map +1 -1
  303. package/dist/elements/public/NucleonElement/NucleonElement.d.ts +5 -3
  304. package/dist/elements/public/NucleonElement/NucleonElement.js +57 -33
  305. package/dist/elements/public/NucleonElement/NucleonElement.js.map +1 -1
  306. package/dist/elements/public/PaymentMethodCard/PaymentMethodCard.d.ts +1 -1
  307. package/dist/elements/public/PaymentMethodCard/PaymentMethodCard.js +2 -2
  308. package/dist/elements/public/PaymentMethodCard/PaymentMethodCard.js.map +1 -1
  309. package/dist/elements/public/PaymentsApi/PaymentsApi.d.ts +18 -0
  310. package/dist/elements/public/PaymentsApi/PaymentsApi.js +92 -0
  311. package/dist/elements/public/PaymentsApi/PaymentsApi.js.map +1 -0
  312. package/dist/elements/public/PaymentsApi/api/composers/available_fraud_protections.d.ts +6 -0
  313. package/dist/elements/public/PaymentsApi/api/composers/available_fraud_protections.js +95 -0
  314. package/dist/elements/public/PaymentsApi/api/composers/available_fraud_protections.js.map +1 -0
  315. package/dist/elements/public/PaymentsApi/api/composers/available_payment_methods.d.ts +11 -0
  316. package/dist/elements/public/PaymentsApi/api/composers/available_payment_methods.js +15 -0
  317. package/dist/elements/public/PaymentsApi/api/composers/available_payment_methods.js.map +1 -0
  318. package/dist/elements/public/PaymentsApi/api/composers/fraud_protection.d.ts +10 -0
  319. package/dist/elements/public/PaymentsApi/api/composers/fraud_protection.js +20 -0
  320. package/dist/elements/public/PaymentsApi/api/composers/fraud_protection.js.map +1 -0
  321. package/dist/elements/public/PaymentsApi/api/composers/fraud_protections.d.ts +10 -0
  322. package/dist/elements/public/PaymentsApi/api/composers/fraud_protections.js +39 -0
  323. package/dist/elements/public/PaymentsApi/api/composers/fraud_protections.js.map +1 -0
  324. package/dist/elements/public/PaymentsApi/api/composers/payment_method.d.ts +18 -0
  325. package/dist/elements/public/PaymentsApi/api/composers/payment_method.js +25 -0
  326. package/dist/elements/public/PaymentsApi/api/composers/payment_method.js.map +1 -0
  327. package/dist/elements/public/PaymentsApi/api/composers/payment_methods.d.ts +14 -0
  328. package/dist/elements/public/PaymentsApi/api/composers/payment_methods.js +59 -0
  329. package/dist/elements/public/PaymentsApi/api/composers/payment_methods.js.map +1 -0
  330. package/dist/elements/public/PaymentsApi/api/composers/payment_preset.d.ts +8 -0
  331. package/dist/elements/public/PaymentsApi/api/composers/payment_preset.js +22 -0
  332. package/dist/elements/public/PaymentsApi/api/composers/payment_preset.js.map +1 -0
  333. package/dist/elements/public/PaymentsApi/api/composers/payment_presets.d.ts +8 -0
  334. package/dist/elements/public/PaymentsApi/api/composers/payment_presets.js +36 -0
  335. package/dist/elements/public/PaymentsApi/api/composers/payment_presets.js.map +1 -0
  336. package/dist/elements/public/PaymentsApi/api/handlers/available_fraud_protections.d.ts +12 -0
  337. package/dist/elements/public/PaymentsApi/api/handlers/available_fraud_protections.js +34 -0
  338. package/dist/elements/public/PaymentsApi/api/handlers/available_fraud_protections.js.map +1 -0
  339. package/dist/elements/public/PaymentsApi/api/handlers/available_payment_methods.d.ts +16 -0
  340. package/dist/elements/public/PaymentsApi/api/handlers/available_payment_methods.js +44 -0
  341. package/dist/elements/public/PaymentsApi/api/handlers/available_payment_methods.js.map +1 -0
  342. package/dist/elements/public/PaymentsApi/api/handlers/fraud_protection.d.ts +17 -0
  343. package/dist/elements/public/PaymentsApi/api/handlers/fraud_protection.js +68 -0
  344. package/dist/elements/public/PaymentsApi/api/handlers/fraud_protection.js.map +1 -0
  345. package/dist/elements/public/PaymentsApi/api/handlers/fraud_protections.d.ts +17 -0
  346. package/dist/elements/public/PaymentsApi/api/handlers/fraud_protections.js +77 -0
  347. package/dist/elements/public/PaymentsApi/api/handlers/fraud_protections.js.map +1 -0
  348. package/dist/elements/public/PaymentsApi/api/handlers/payment_method.d.ts +22 -0
  349. package/dist/elements/public/PaymentsApi/api/handlers/payment_method.js +97 -0
  350. package/dist/elements/public/PaymentsApi/api/handlers/payment_method.js.map +1 -0
  351. package/dist/elements/public/PaymentsApi/api/handlers/payment_methods.d.ts +21 -0
  352. package/dist/elements/public/PaymentsApi/api/handlers/payment_methods.js +113 -0
  353. package/dist/elements/public/PaymentsApi/api/handlers/payment_methods.js.map +1 -0
  354. package/dist/elements/public/PaymentsApi/api/handlers/payment_preset.d.ts +14 -0
  355. package/dist/elements/public/PaymentsApi/api/handlers/payment_preset.js +42 -0
  356. package/dist/elements/public/PaymentsApi/api/handlers/payment_preset.js.map +1 -0
  357. package/dist/elements/public/PaymentsApi/api/handlers/payment_presets.d.ts +14 -0
  358. package/dist/elements/public/PaymentsApi/api/handlers/payment_presets.js +47 -0
  359. package/dist/elements/public/PaymentsApi/api/handlers/payment_presets.js.map +1 -0
  360. package/dist/elements/public/PaymentsApi/api/index.d.ts +11 -0
  361. package/dist/elements/public/PaymentsApi/api/index.js +35 -0
  362. package/dist/elements/public/PaymentsApi/api/index.js.map +1 -0
  363. package/dist/elements/public/PaymentsApi/api/types.d.ts +154 -0
  364. package/dist/elements/public/PaymentsApi/api/types.js +2 -0
  365. package/dist/elements/public/PaymentsApi/api/types.js.map +1 -0
  366. package/dist/elements/public/PaymentsApi/api/utils.d.ts +1 -0
  367. package/dist/elements/public/PaymentsApi/api/utils.js +7 -0
  368. package/dist/elements/public/PaymentsApi/api/utils.js.map +1 -0
  369. package/dist/elements/public/PaymentsApi/index.d.ts +2 -0
  370. package/dist/elements/public/PaymentsApi/index.js +4 -0
  371. package/dist/elements/public/PaymentsApi/index.js.map +1 -0
  372. package/dist/elements/public/PaymentsApiFraudProtectionCard/PaymentsApiFraudProtectionCard.d.ts +14 -0
  373. package/dist/elements/public/PaymentsApiFraudProtectionCard/PaymentsApiFraudProtectionCard.js +52 -0
  374. package/dist/elements/public/PaymentsApiFraudProtectionCard/PaymentsApiFraudProtectionCard.js.map +1 -0
  375. package/dist/elements/public/PaymentsApiFraudProtectionCard/index.d.ts +4 -0
  376. package/dist/elements/public/PaymentsApiFraudProtectionCard/index.js +6 -0
  377. package/dist/elements/public/PaymentsApiFraudProtectionCard/index.js.map +1 -0
  378. package/dist/elements/public/PaymentsApiFraudProtectionCard/types.d.ts +1 -0
  379. package/dist/elements/public/PaymentsApiFraudProtectionCard/types.js +2 -0
  380. package/dist/elements/public/PaymentsApiFraudProtectionCard/types.js.map +1 -0
  381. package/dist/elements/public/PaymentsApiFraudProtectionForm/PaymentsApiFraudProtectionForm.d.ts +17 -0
  382. package/dist/elements/public/PaymentsApiFraudProtectionForm/PaymentsApiFraudProtectionForm.js +217 -0
  383. package/dist/elements/public/PaymentsApiFraudProtectionForm/PaymentsApiFraudProtectionForm.js.map +1 -0
  384. package/dist/elements/public/PaymentsApiFraudProtectionForm/index.d.ts +11 -0
  385. package/dist/elements/public/PaymentsApiFraudProtectionForm/index.js +13 -0
  386. package/dist/elements/public/PaymentsApiFraudProtectionForm/index.js.map +1 -0
  387. package/dist/elements/public/PaymentsApiFraudProtectionForm/types.d.ts +3 -0
  388. package/dist/elements/public/PaymentsApiFraudProtectionForm/types.js +2 -0
  389. package/dist/elements/public/PaymentsApiFraudProtectionForm/types.js.map +1 -0
  390. package/dist/elements/public/PaymentsApiPaymentMethodCard/PaymentsApiPaymentMethodCard.d.ts +15 -0
  391. package/dist/elements/public/PaymentsApiPaymentMethodCard/PaymentsApiPaymentMethodCard.js +54 -0
  392. package/dist/elements/public/PaymentsApiPaymentMethodCard/PaymentsApiPaymentMethodCard.js.map +1 -0
  393. package/dist/elements/public/PaymentsApiPaymentMethodCard/index.d.ts +4 -0
  394. package/dist/elements/public/PaymentsApiPaymentMethodCard/index.js +6 -0
  395. package/dist/elements/public/PaymentsApiPaymentMethodCard/index.js.map +1 -0
  396. package/dist/elements/public/PaymentsApiPaymentMethodCard/types.d.ts +1 -0
  397. package/dist/elements/public/PaymentsApiPaymentMethodCard/types.js +2 -0
  398. package/dist/elements/public/PaymentsApiPaymentMethodCard/types.js.map +1 -0
  399. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.d.ts +20 -0
  400. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js +428 -0
  401. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js.map +1 -0
  402. package/dist/elements/public/PaymentsApiPaymentMethodForm/index.d.ts +10 -0
  403. package/dist/elements/public/PaymentsApiPaymentMethodForm/index.js +12 -0
  404. package/dist/elements/public/PaymentsApiPaymentMethodForm/index.js.map +1 -0
  405. package/dist/elements/public/PaymentsApiPaymentMethodForm/types.d.ts +3 -0
  406. package/dist/elements/public/PaymentsApiPaymentMethodForm/types.js +2 -0
  407. package/dist/elements/public/PaymentsApiPaymentMethodForm/types.js.map +1 -0
  408. package/dist/elements/public/PaymentsApiPaymentPresetCard/PaymentsApiPaymentPresetCard.d.ts +10 -0
  409. package/dist/elements/public/PaymentsApiPaymentPresetCard/PaymentsApiPaymentPresetCard.js +31 -0
  410. package/dist/elements/public/PaymentsApiPaymentPresetCard/PaymentsApiPaymentPresetCard.js.map +1 -0
  411. package/dist/elements/public/PaymentsApiPaymentPresetCard/index.d.ts +4 -0
  412. package/dist/elements/public/PaymentsApiPaymentPresetCard/index.js +6 -0
  413. package/dist/elements/public/PaymentsApiPaymentPresetCard/index.js.map +1 -0
  414. package/dist/elements/public/PaymentsApiPaymentPresetCard/types.d.ts +1 -0
  415. package/dist/elements/public/PaymentsApiPaymentPresetCard/types.js +2 -0
  416. package/dist/elements/public/PaymentsApiPaymentPresetCard/types.js.map +1 -0
  417. package/dist/elements/public/PaymentsApiPaymentPresetForm/PaymentsApiPaymentPresetForm.d.ts +22 -0
  418. package/dist/elements/public/PaymentsApiPaymentPresetForm/PaymentsApiPaymentPresetForm.js +145 -0
  419. package/dist/elements/public/PaymentsApiPaymentPresetForm/PaymentsApiPaymentPresetForm.js.map +1 -0
  420. package/dist/elements/public/PaymentsApiPaymentPresetForm/index.d.ts +10 -0
  421. package/dist/elements/public/PaymentsApiPaymentPresetForm/index.js +12 -0
  422. package/dist/elements/public/PaymentsApiPaymentPresetForm/index.js.map +1 -0
  423. package/dist/elements/public/PaymentsApiPaymentPresetForm/types.d.ts +1 -0
  424. package/dist/elements/public/PaymentsApiPaymentPresetForm/types.js +2 -0
  425. package/dist/elements/public/PaymentsApiPaymentPresetForm/types.js.map +1 -0
  426. package/dist/elements/public/QueryBuilder/components/Input.js +10 -8
  427. package/dist/elements/public/QueryBuilder/components/Input.js.map +1 -1
  428. package/dist/elements/public/QueryBuilder/components/RangeValue.js +7 -5
  429. package/dist/elements/public/QueryBuilder/components/RangeValue.js.map +1 -1
  430. package/dist/elements/public/QueryBuilder/components/Select.js +3 -1
  431. package/dist/elements/public/QueryBuilder/components/Select.js.map +1 -1
  432. package/dist/elements/public/ShipmentCard/ShipmentCard.js +1 -1
  433. package/dist/elements/public/ShipmentCard/ShipmentCard.js.map +1 -1
  434. package/dist/elements/public/ShipmentCard/types.d.ts +2 -16
  435. package/dist/elements/public/ShipmentCard/types.js.map +1 -1
  436. package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.d.ts +25 -0
  437. package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js +197 -0
  438. package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js.map +1 -0
  439. package/dist/elements/public/StoreShippingMethodForm/index.d.ts +11 -0
  440. package/dist/elements/public/StoreShippingMethodForm/index.js +13 -0
  441. package/dist/elements/public/StoreShippingMethodForm/index.js.map +1 -0
  442. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/InternalStoreShippingMethodFormServicesControl.d.ts +5 -0
  443. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/InternalStoreShippingMethodFormServicesControl.js +33 -0
  444. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/InternalStoreShippingMethodFormServicesControl.js.map +1 -0
  445. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/index.d.ts +6 -0
  446. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/index.js +8 -0
  447. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/index.js.map +1 -0
  448. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/InternalStoreShippingMethodFormServicesPage.d.ts +19 -0
  449. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/InternalStoreShippingMethodFormServicesPage.js +96 -0
  450. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/InternalStoreShippingMethodFormServicesPage.js.map +1 -0
  451. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/index.d.ts +5 -0
  452. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/index.js +7 -0
  453. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/index.js.map +1 -0
  454. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/InternalStoreShippingMethodFormServicesPageItem.d.ts +17 -0
  455. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/InternalStoreShippingMethodFormServicesPageItem.js +45 -0
  456. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/InternalStoreShippingMethodFormServicesPageItem.js.map +1 -0
  457. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/index.d.ts +3 -0
  458. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/index.js +5 -0
  459. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/index.js.map +1 -0
  460. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/InternalStoreShippingMethodFormServicesPageItemContent.d.ts +16 -0
  461. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/InternalStoreShippingMethodFormServicesPageItemContent.js +49 -0
  462. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/InternalStoreShippingMethodFormServicesPageItemContent.js.map +1 -0
  463. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/index.d.ts +3 -0
  464. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/index.js +5 -0
  465. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/index.js.map +1 -0
  466. package/dist/elements/public/StoreShippingMethodForm/types.d.ts +5 -0
  467. package/dist/elements/public/StoreShippingMethodForm/types.js +2 -0
  468. package/dist/elements/public/StoreShippingMethodForm/types.js.map +1 -0
  469. package/dist/elements/public/SubscriptionForm/SubscriptionForm.js +1 -2
  470. package/dist/elements/public/SubscriptionForm/SubscriptionForm.js.map +1 -1
  471. package/dist/elements/public/TaxCard/TaxCard.d.ts +4 -4
  472. package/dist/elements/public/TaxCard/TaxCard.js +12 -8
  473. package/dist/elements/public/TaxCard/TaxCard.js.map +1 -1
  474. package/dist/elements/public/TaxCard/index.d.ts +1 -3
  475. package/dist/elements/public/TaxCard/index.js +1 -3
  476. package/dist/elements/public/TaxCard/index.js.map +1 -1
  477. package/dist/elements/public/index.d.ts +12 -0
  478. package/dist/elements/public/index.defined.d.ts +12 -0
  479. package/dist/elements/public/index.defined.js +12 -0
  480. package/dist/elements/public/index.defined.js.map +1 -1
  481. package/dist/elements/public/index.js +12 -0
  482. package/dist/elements/public/index.js.map +1 -1
  483. package/dist/mixins/configurable.js +16 -8
  484. package/dist/mixins/configurable.js.map +1 -1
  485. package/dist/mixins/inferrable.js +25 -23
  486. package/dist/mixins/inferrable.js.map +1 -1
  487. package/dist/mixins/themeable.js +84 -0
  488. package/dist/mixins/themeable.js.map +1 -1
  489. package/dist/utils/serialize-date.d.ts +1 -0
  490. package/dist/utils/serialize-date.js +7 -0
  491. package/dist/utils/serialize-date.js.map +1 -1
  492. package/package.json +2 -2
  493. package/dist/cdn/shared-2061be9a.js +0 -1
  494. package/dist/cdn/shared-45feee83.js +0 -1
  495. package/dist/cdn/shared-63685d2e.js +0 -302
  496. package/dist/cdn/shared-8d4fef94.js +0 -1
  497. package/dist/cdn/shared-92327224.js +0 -15
  498. package/dist/cdn/shared-a5e52b8f.js +0 -64
  499. package/dist/cdn/shared-ac44429d.js +0 -1
  500. package/dist/cdn/shared-b3df4f38.js +0 -1
  501. package/dist/cdn/shared-c309e0ef.js +0 -1
  502. package/dist/cdn/shared-c8677ba3.js +0 -1
  503. package/dist/cdn/shared-dc1c6edd.js +0 -1
  504. package/dist/cdn/shared-dc3ffd38.js +0 -1
  505. package/dist/cdn/shared-dda2a74d.js +0 -1
  506. package/dist/cdn/shared-e9a4a204.js +0 -1
  507. package/dist/cdn/shared-fadcb2e1.js +0 -1
@@ -1 +1 @@
1
- import{_ as t}from"./shared-fadcb2e1.js";import"./shared-c5c60417.js";import{L as e,c as i,h as s}from"./shared-dc73b9a5.js";import{p as r}from"./shared-c309e0ef.js";import"./shared-2188d5f7.js";import"./shared-195fd5af.js";import"./shared-31c43743.js";import{w as a,S as n,y as o}from"./shared-62169210.js";import"./shared-63685d2e.js";import"./shared-c8677ba3.js";import{I as l,D as c}from"./shared-2bdd4f74.js";import{E as h}from"./shared-a0836fa5.js";import"./shared-4e201e09.js";import"./shared-d28ac9dc.js";import"./shared-dc23b751.js";import"./shared-a052131e.js";import"./shared-8e9a3bbb.js";import{s as d}from"./shared-99940888.js";class u extends CustomEvent{constructor(t){super("change",{detail:t})}}class m extends CustomEvent{constructor(t){super("submit",{detail:t,cancelable:!0})}}let _,p,g=t=>t;var y;!function(t){t[t.Excluded=0]="Excluded",t[t.BeforeEnter=1]="BeforeEnter",t[t.Default=2]="Default",t[t.Previous=3]="Previous",t[t.BeforeExit=4]="BeforeExit"}(y||(y={}));class f extends e{constructor(){super(...arguments),this.quantity=0,this.image=""}static get properties(){return t(t({},super.properties),{},{quantity:{attribute:!1},image:{attribute:!1}})}static get styles(){return[a.styles,i(_||(_=g`.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.blur-1{filter:blur(1px)}.blur-2{filter:blur(2px)}.grayscale{filter:grayscale()}.rotate-12{--tw-rotate:12deg}.-rotate-12{--tw-rotate:-12deg}.-rotate-24{--tw-rotate:-24deg}.translate-y-half{--tw-translate-y:50%}`))]}set empty(t){this.updateComplete.then((()=>{if(t){const[,...t]=this.__stack;t.forEach((t=>t.remove()))}else this.quantity>1&&this.__stack.length<2&&this.__insertImage(y.Previous,this.__stack[0])}))}set data({quantity:t,image:e}){this.quantity=t,this.image=e}render(){return s(p||(p=g`<div id="image" class="w-full h-full relative"></div>`))}firstUpdated(){const t=this.__insertImage(y.Default);this.quantity>1&&this.__insertImage(y.Previous,t)}updated(t){if(t.has("quantity")){const e=t.get("quantity");void 0!==e&&(this.quantity>e?this.__add():this.__remove())}t.has("image")&&this.__stack.forEach((t=>t.src=this.image))}get __container(){return this.shadowRoot.getElementById("image")}get __stack(){var t,e;return[...null!==(e=null===(t=this.__container)||void 0===t?void 0:t.querySelectorAll(":not(.opacity-0)"))&&void 0!==e?e:[]].reverse()}__add(){const[t,e]=this.__stack;this.quantity>1?(t&&this.__setImageState(t,y.Previous),e&&(this.__setImageState(e,y.BeforeExit),e.ontransitionend=()=>e.remove()),this.__setImageState(this.__insertImage(y.BeforeEnter),y.Default)):t&&this.__setImageState(t,y.Default)}__remove(){const[t,e]=this.__stack;let i;if(this.quantity>0?(e&&this.__setImageState(e,y.Default),i=t):(t&&this.__setImageState(t,y.Excluded),i=e),i&&(this.__setImageState(i,y.BeforeEnter),i.ontransitionend=()=>i.remove()),this.quantity>1){const t=this.__insertImage(y.BeforeExit,this.__container.firstElementChild);this.__setImageState(t,y.Previous)}}__insertImage(t,e=null){const i=new Image;return i.src=this.image,i.setAttribute("part","picture"),i.addEventListener("error",(()=>i.src=f.placeholder)),this.__setImageState(i,t),this.__container.insertBefore(i,e),i}__setImageState(t,e){t.offsetHeight,t.className=["absolute inset-0 w-full h-full object-cover rounded transform transition duration-700 ease-out-back",["grayscale","shadow-m translate-y-half scale-110 rotate-12 opacity-0","shadow-m","blur-1 -rotate-12 opacity-25","blur-2 -rotate-24 opacity-0"][e]].join(" ")}}f.placeholder='data:image/svg+xml,%3Csvg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Crect width="40" height="40" fill="%23E8E8E8"/%3E%3Cpath d="M31.5143 0H24.5476L0 24.5476V31.5143L11.7046 19.8097L11.9841 17.0782C12.0983 15.9624 13.0131 15.1154 14.1038 15.1154H15.7373V12.1923C15.7373 10.9815 16.6915 10 17.8687 10H21.5143L31.5143 0Z" fill="white"/%3E%3Cpath d="M11.5434 21.3852L0 32.9285V39.8953L11.5822 28.3131C11.172 27.8663 10.9438 27.2444 11.012 26.5782L11.5434 21.3852Z" fill="white"/%3E%3Cpath d="M12.4305 28.879L1.30951 40H8.27631L19.2763 29H13.1316C12.8853 29 12.6495 28.9573 12.4305 28.879Z" fill="white"/%3E%3Cpath d="M28.3113 19.965L28.0159 17.0782C27.9116 16.0591 27.1395 15.2642 26.1754 15.1341L40 1.3095V8.27627L28.3113 19.965Z" fill="white"/%3E%3Cpath d="M20.6905 29L9.69049 40H16.6572L27.9755 28.6817C27.6541 28.8832 27.2756 29 26.8684 29H20.6905Z" fill="white"/%3E%3Cpath d="M28.6572 28C28.9128 27.5952 29.0415 27.1003 28.988 26.5782L28.4426 21.2479L40 9.69053V16.6572L28.6572 28Z" fill="white"/%3E%3Cpath d="M25.0381 40H18.0715L40 18.0715V25.0381L25.0381 40Z" fill="white"/%3E%3Cpath d="M26.4524 40H33.4191L40 33.4191V26.4524L26.4524 40Z" fill="white"/%3E%3Cpath d="M40 40H34.8333L40 34.8333V40Z" fill="white"/%3E%3Cpath d="M16.1666 0H23.1334L0 23.1334V16.1666L16.1666 0Z" fill="white"/%3E%3Cpath d="M14.7524 0H7.78571L0 7.78573V14.7524L14.7524 0Z" fill="white"/%3E%3Cpath d="M0 0H6.37152L0 6.37151V0Z" fill="white"/%3E%3Cpath d="M21.467 11.4615H17.8687C17.4763 11.4615 17.1582 11.7887 17.1582 12.1923V15.1154H22.8418V12.1923C22.8418 11.7887 22.5237 11.4615 22.1313 11.4615H21.467Z" fill="white"/%3E%3Cpath d="M24.7798 15.1154H24.2627V12.1923C24.2627 11.227 23.6562 10.4075 22.8138 10.1148L32.9286 0H39.89L24.7798 15.1154Z" fill="white"/%3E%3C/svg%3E';let v,b,w,x,q,I,E,$,C=t=>t;class S extends(n(e)){constructor(){super(...arguments),this.empty=!1,this.data=[]}static get properties(){return t(t({},super.properties),{},{empty:{attribute:!1},data:{attribute:!1}})}static get styles(){return[a.styles,i(v||(v=C`.w-preview{width:5.5rem}.h-preview{height:5.5rem}.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.grayscale{filter:grayscale()}.grid-2>:nth-child(1),.grid-3>:nth-child(1),.grid-4-plus>:nth-child(1),.grid-4>:nth-child(1){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(2){opacity:0;--tw-translate-x:100%;--tw-translate-y:var(--tw-translate-x)}.grid-2>:nth-child(2),.grid-3>:nth-child(2),.grid-4-plus>:nth-child(2),.grid-4>:nth-child(2){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-3>:nth-child(2),.grid-4-plus>:nth-child(2),.grid-4>:nth-child(2){transform-origin:top right}.grid-1>:nth-child(3),.grid-2>:nth-child(3),.grid-3>:nth-child(3),.grid-4-plus>:nth-child(3),.grid-4>:nth-child(3){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(3),.grid-2>:nth-child(3){opacity:0;--tw-translate-y:100%}.grid-3>:nth-child(3){transform-origin:bottom right}.grid-4-plus>:nth-child(3),.grid-4>:nth-child(3){transform-origin:bottom left}.grid-1>:nth-child(4),.grid-2>:nth-child(4),.grid-3>:nth-child(4),.grid-4-plus>:nth-child(4),.grid-4>:nth-child(4){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(4),.grid-2>:nth-child(4),.grid-3>:nth-child(4){opacity:0;transform-origin:bottom left;--tw-translate-x:100%}.grid-1>:nth-child(4)>:first-child,.grid-2>:nth-child(4)>:first-child,.grid-3>:nth-child(4)>:first-child,.grid-4>:nth-child(4)>:first-child{transform:perspective(250px) rotateX(-90deg)}.grid-4-plus>:nth-child(4)>:first-child,.grid-4>:nth-child(4)>:last-child{transition-delay:.15s;transition-timing-function:ease-out}.grid-4-plus>:nth-child(4)>:last-child,.grid-4>:nth-child(4)>:first-child{transition-timing-function:ease-in}.grid-4-plus>:nth-child(4)>:last-child{transform:perspective(250px) rotateX(90deg)}.grid-1>:nth-child(5),.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){opacity:0}.grid-1>:nth-child(5){--tw-translate-x:100%}.grid-2>:nth-child(5),.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){--tw-translate-y:-100%}.grid-1>:nth-child(6),.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){opacity:0}.grid-1>:nth-child(6){--tw-translate-y:100%}.grid-2>:nth-child(6),.grid-3>:nth-child(6),.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){--tw-translate-x:-100%}`))]}render(){const t=this.data.length,e="rounded bg-contrast-10",i="transition-all duration-700 ease-out-back transform absolute inset-0",r=this.empty?"grayscale":"",a=t>4?"grid-4-plus":`grid-${Math.max(1,t)}`,n=d({exportparts:"picture",class:"w-full h-full",".empty":this.empty}),[o,l,c,h]=this.data;return s(b||(b=C` <div class="${0} w-preview h-preview relative font-lumo"> <div class="${0} ${0} origin-top-left"> ${0} </div> <div class="${0} ${0} origin-bottom-right"> ${0} </div> <div class="${0} ${0} origin-top-right"> ${0} </div> <div class="${0} ${0} origin-bottom-right"> <div class="${0} flex text-body transition duration-150 absolute inset-0"> ${0} </div> <div class="transition duration-150 absolute inset-0"> ${0} </div> </div> <div class="${0} ${0} origin-top-right"></div> <div class="${0} ${0} origin-bottom-left"></div> </div> `),a,i,r,o?s(w||(w=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,o):"",i,r,l?s(x||(x=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,l):"",i,r,c?s(q||(q=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,c):"",i,r,e,t>102?s(I||(I=C`<iron-icon icon="icons:more-horiz" class="m-auto w-xl h-xl"></iron-icon>`)):s(E||(E=C`<div class="m-auto text-xxxl">+${0}</div>`),t-3),h?s($||($=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,h):"",i,e,i,e)}}let D,k,L=t=>t;class A extends S{static get scopedElements(){return{"x-pic":f}}}class N extends S{static get scopedElements(){return{"x-pic":A}}}class P extends(n(e)){constructor(){super(...arguments),this.quantity=0,this.items=[]}static get scopedElements(){return{"x-picture":f,"x-bundle-grid":N}}static get properties(){return{quantity:{attribute:!1},image:{attribute:!1},items:{attribute:!1}}}static get styles(){return a.styles}render(){const{quantity:t,image:e=""}=this,i=0===t,r=d({class:"w-full h-full",exportparts:"picture"});if(0===this.items.length)return s(D||(D=L`<x-picture ...="${0}" .data="${0}"></x-picture>`),r,{quantity:t,image:e});{const e=new Array(Math.max(1,t)).fill(this.items);return s(k||(k=L`<x-bundle-grid ...="${0}" .empty="${0}" .data="${0}"></x-bundle-grid>`),r,i,e)}}}class j extends o{static get properties(){return t(t({},super.properties),{},{open:{type:Object},signatures:{type:Object,converter:t=>{const e=JSON.parse(t);for(const t of Object.keys(e))64!=e[t].length&&console.error("There is something wrong with the signature. It should have 64 characters.");return e}}})}signedName(t){return this.signatures&&this.signatures[t]?`${t}||${this.signatures[t]}${this.isOpen(t)?"||open":""}`:t}isOpen(t){return!(!this.open||!this.open[t])}}let F,T,O,V,M,H,B,Z=t=>t;class R extends j{constructor(){super("items-form"),this.rel="product_item",this.readonly=!1,this.quantity=0,this.total=this.__computeTotalPrice(),this.currency="",this.isItem=!0,this.isChildItem=!1,this.pid=R.__newId(),this.__modified=!1,this.__childPrices=[],this.__images=[],this.__childrenCount=0,this.__itemDescription="",this.__handleQuantity={handleEvent:t=>{const e=Number(t.target.value);this.quantity=e,this.__modified=!0,this.__images=[this.getImageDescription()].concat(this.__images.slice(1,this.__images.length))}},this.__childItemsObserver=new MutationObserver(this.__observeItems.bind(this)),this.__childItemsObserver.observe(this,{childList:!0,attributes:!1,subtree:!0}),this.updateComplete.then((()=>{this.__setCode(),this.__acknowledgeChildItems(),this.__changedChildItem(),this.__isValid()||console.error("Invalid item",this.value)}))}static get styles(){return[super.styles,i(F||(F=Z`:host{--quantity-width:6.5rem;--preview-size:5.5rem;--threshold:20rem}.min-w-description::before{content:'';width:var(--threshold);display:block;overflow:hidden}.ml-description{--min-width:calc(var(--threshold) + var(--preview-size) + var(--lumo-space-l));--free-space:calc(100% - var(--min-width));--max-margin-left:calc(var(--preview-size) + var(--lumo-space-l));--final-margin-left:clamp(0rem, var(--free-space) * 999999999, var(--max-margin-left));margin-left:var(--final-margin-left)}.mr-quantity{--min-width:var(--threshold);--free-space:calc(100% - var(--min-width));--max-margin-right:calc(var(--quantity-width) + var(--lumo-space-l));--final-margin-right:clamp(0rem, var(--free-space) * 999999999, var(--max-margin-right));margin-right:var(--final-margin-right)}:host([data-bundled]:not(:last-of-type)) .separator::after{content:' ';display:block;position:absolute;width:100vw;border-bottom:solid thin var(--lumo-shade-10pct);left:0;bottom:0}.w-quantity{width:var(--quantity-width)}.w-preview{width:var(--preview-size)}.h-preview{height:var(--preview-size)}`))]}static get scopedElements(){return{"vaadin-integer-field":customElements.get("vaadin-integer-field"),"x-error-screen":h,"x-preview":P,"x-i18n":l}}static get properties(){return t(t({},super.properties),{},{__modified:{},readonly:{type:Boolean,reflect:!0},currency:{type:String},category:{type:String},code:{type:String,reflect:!0},expires:{type:String},height:{type:Number},image:{type:String},length:{type:Number},name:{type:String},parent_code:{type:String},price:{type:Number},quantity:{type:Number,reflect:!0},quantity_max:{type:Number},quantity_min:{type:String},shipto:{type:String},total:{type:Number,reflect:!0,attribute:"total"},url:{type:String},value:{type:Object},weight:{type:Number},width:{type:Number},__childPrices:{},__childrenCount:{},__images:{},alt:{type:String},isChildItem:{type:Boolean,reflect:!0,attribute:"data-bundled"},isItem:{type:Boolean,reflect:!0,attribute:"data-item"},open:{type:Object},pid:{type:Number,reflect:!0},items:{type:Array}})}get items(){const t=[];return this.__onEachChildItem([e=>t.push(e.value)]),t}set items(t){this.__createItems(t)}get value(){const t={};for(let e=0;e<this.attributes.length;e++)t[this.attributes[e].name]=this.attributes[e].value;return t.items=this.items,t}set value(t){this.__itemDescription="";for(const e in t){let i="";if("description"!=e){if("object"==typeof t[e])i=JSON.stringify(t[e]);else{const s=e;(t[s]&&"undefined"!==t[s]||0===t[s])&&(i=t[e].toString())}this.setAttribute(e,t[e]?i:"")}else this.__itemDescription=t[e]}}updated(t){t.forEach(((t,e)=>{"__itemDescription"!=e&&"isChildItem"!=e||this.__updateDescriptionEl()})),this.__setTotalPrice(),this.dispatchEvent(new Event("change"))}render(){var t;if(!this.__isValid())return s(T||(T=Z`<x-error-screen type="setup_needed" class="relative"></x-error-screen>`));const e=`font-lumo text-body text-s leading-m transition duration-100 ${this.quantity?"":"removed opacity-50"}`;if(this.isChildItem)return s(O||(O=Z` <article part="item" class="py-s w-full relative separator item-summary flex justify-between ${0}"> <div class="description flex-1"> <h1 class="text-header font-medium">${0}</h1> <section class="description text-secondary"> <slot></slot> </section> </div> ${0} </article> `),e,this.name,this.quantity<2?"":s(V||(V=Z` <section class="quantity font-medium text-tertiary whitespace-nowrap"> ${0} </section> `),this._t("item.items",{quantity:this.quantity})));{const i=(null!==(t=this.price)&&void 0!==t?t:0)+this.__childPrices.reduce(((t,e)=>t+e),0),r=this.__translateAmount(i*this.quantity),a=this.__translateAmount(i);return s(M||(M=Z` <article part="item" class="p-l relative item ${0} ${0}"> <x-preview class="preview float-left w-preview h-preview mr-l mb-l" exportparts="picture" .image="${0}" .quantity="${0}" .items="${0}"> </x-preview> <section class="description min-w-description ml-description"> <h1 class="text-header font-medium text-l leading-none mr-quantity mb-s"> ${0} </h1> <div class="item-description text-secondary mr-quantity mb-s"> <slot></slot> </div> <div class="child-items mb-s"> <slot name="items"></slot> </div> ${0} </section> <section class="quantity w-quantity absolute top-0 right-0 m-l"> <vaadin-integer-field class="w-full p-0" name="quantity" @change="${0}" value="${0}" min="0" has-controls ?readonly="${0}"> </vaadin-integer-field> ${0} </section> </article> `),e,this.__modified?"modified":"",this.image,this.quantity,[...this.querySelectorAll("[data-bundled]")].map((t=>{var e;return{quantity:t.quantity,image:null!==(e=t.image)&&void 0!==e?e:""}})),this.name,a?s(H||(H=Z`<div class="font-medium price text-l">${0}</div>`),a):"",this.__handleQuantity,this.quantity,this.readonly,this.quantity>1?s(B||(B=Z` <x-i18n .ns="${0}" .lang="${0}" .opts="${0}" class="price-total text-secondary text-xs text-center block mt-xs" key="price.total"> </x-i18n> `),this.ns,this.lang,{amount:r}):"")}}getImageDescription(){return{src:this.image,alt:this.alt,quantity:this.quantity}}signedName(t){const e=super.signedName(t);return`${this.pid.toString()}:${e}`}static __newId(){const t=R.__existingIds.reduce(((t,e)=>e>t?e:t),0)+1;return R.__existingIds.push(t),t}__updateDescriptionEl(){if(this.__itemDescription){let t=this.shadowRoot.querySelector("data-item-description");t||(t=document.createElement("p"),t.dataset.itemDescription="true",this.__addSlottedEl(t)),t.innerText=this.__itemDescription}else{const t=this.shadowRoot.querySelector("data-item-description");t&&t.remove()}}__addSlottedEl(t){const e=this.shadowRoot.querySelector("article");e&&e.appendChild(t)}__setCode(){this.code||(this.code=`RAND${Math.random()}`)}__createItems(t){t.forEach((t=>{const e=document.createElement(this.tagName);e.value=t,e.currency=this.currency,e.__computeTotalPrice(),this.__acknowledgeItem(e),this.appendChild(e)}))}__setTotalPrice(){this.total=this.__computeTotalPrice()}__computeTotalPrice(){if(!this.__childPrices)return this.price?this.price*this.quantity:0;let t=0;return this.__childPrices.forEach((e=>{t+=e})),t+=this.price,t*=this.quantity,t}__isValid(){const t=[];return this.name&&this.name.length||t.push("The name attribute of an item is required."),this.price||0===this.price||t.push("The price attribute of an item is required."),this.price&&this.price<0&&t.push("Item added with negative price."),this.quantity_min&&this.quantity&&this.quantity<this.quantity_min&&t.push("Quantity amount is less than minimum quantity."),this.quantity_max&&this.quantity&&this.quantity>this.quantity_max&&t.push("Quantity amount is more than maximum quantity."),console.error(...t),!t.length}__translateAmount(t){return this.currency?t.toLocaleString(this.lang,{minimumFractionDigits:2,currency:this.currency,style:"currency"}):""}__observeItems(t){t.forEach((t=>{"childList"==t.type&&t.addedNodes.forEach((t=>{t.nodeType===Node.DOCUMENT_NODE&&this.__acknowledgeItem(t)}))})),this.__setTotalPrice()}__acknowledgeChildItems(){var t;null===(t=this.shadowRoot)||void 0===t||t.querySelectorAll("[data-item]").forEach((t=>this.__acknowledgeItem(t))),this.querySelectorAll("[data-item]").forEach((t=>this.__acknowledgeItem(t)))}__acknowledgeItem(t){t.addEventListener("change",this.__changedChildItem.bind(this)),t.currency=this.currency,t.isItem=!1,t.isChildItem=!0,this.code&&(t.parent_code=this.code)}__changedChildItem(){const t=[],e=[];let i=0;this.__onEachChildItem([e=>{void 0!==e.total&&t.push(e.total)},t=>{e.push(t.getImageDescription())},()=>i+=1]),this.image&&0===e.length&&e.push(this.getImageDescription()),this.__childPrices=t,this.__images=e,this.__childrenCount=i,this.__setTotalPrice()}__onEachChildItem(t){const e=this.querySelectorAll("[data-bundled]");for(const i of e)for(const e of t)e(i)}}R.__existingIds=[];let z,Q,W,J,U,X,G=t=>t;class K extends j{constructor(){super("items-form"),this.readonly=!1,this.target="_top",this.cart="checkout",this.sub_modify="replace",this.sub_restart="auto",this.frequencies=[],this.handleSubmit={handleEvent:()=>{null!==this.__data&&this.dispatchEvent(new m(this.__data))&&this.shadowRoot.querySelector("form").submit()}},this.__hasValidItems=!1,this.__total=0,this.__handleFrequency={handleEvent:t=>{const e=t.detail.replace(/([wydm])\w*/,"$1").replace(/ /g,"").replace(/^0/,"");K.__validFrequency(e)?this.sub_frequency=e:this.sub_frequency="",this.__updateData()}},this.__data=new FormData,this.__childItemsObserver=new MutationObserver(this.__observeChildren.bind(this)),this.__childItemsObserver.observe(this,{childList:!0,attributes:!1,subtree:!0}),this.updateComplete.then((()=>{this.__acknowledgeItemElements(),this.__computeTotalPrice(),this.__updateData()}))}static get scopedElements(){return{"x-error-screen":h,"vaadin-button":customElements.get("vaadin-button"),"x-dropdown":c,"x-item":R}}static get properties(){return t(t({},super.properties),{},{currency:{type:String},readonly:{type:Boolean},cart:{type:String,converter:t=>t&&!["checkout","add"].includes(t)?null:t},target:{type:String},store:{type:String,attribute:"store"},sub_frequency:{type:String},sub_startdate:{type:String,converter:t=>K.__validDate(t)?t:(console.error("Invalid start date",t),"")},sub_enddate:{type:String,converter:t=>K.__validDateFuture(t)?t:(console.error("Invalid end date",t),"")},sub_token:{type:String},sub_modify:{type:String,converter:t=>""===t||"append"===t?"":"replace"},sub_restart:{type:String,converter:t=>"true"===t?t:"auto"},frequencies:{converter:t=>{if(!t)return[];const e=JSON.parse(t);if(!Array.isArray(e))return console.error("Invalid frequency","Frequency options must be an array."),[];for(const t of e)if(!K.__validFrequency(t))return console.error("Invalid frequency","Invalid frequency option.\n Please, check https://wiki.foxycart.com/v/2.0/products#subscription_product_options for possible values.\n Each frequency must be a in the format:\n - 1d (a number followed by d, for day)\n - 1w (a number followed by w, for week)\n - 1m (a number followed by m, for month)\n - 1y (a number followed by y, for year)\n or .5m (no other decimals are allowed, and this is only for months)\n ",t),[];return e.filter(K.__validFrequency)}},items:{type:Array},__hasValidItems:{attribute:!1},__total:{attribute:!1},__data:{attribute:!1}})}get items(){const t=[];return this.__itemElements.forEach((e=>{const i=new Proxy(e,{set:function(t,e,i){const s=Object.keys(t.value);return!("string"!=typeof e||!s.includes(e))&&(t[e]=i,!0)},get:function(t,e){return t.value[e]}});t.push(i)})),t}set items(t){this.__removeItems(),this.__createItemsFromItemArray(t)}get total(){return this.__total}render(){var t;return this.store&&this.currency?s(Q||(Q=G` <div> <form class="overflow-hidden" method="POST" target="${0}" action="https://${0}/cart" data-testid="form" class="hidden" hidden> ${0} </form> <section class="items"> <slot></slot> </section> ${0} </div> `),this.target,this.store,this.__data?s(W||(W=G` ${0}`),[...this.__data.entries()].map((([t,e])=>s(J||(J=G`<input type="hidden" name="${0}" value="${0}">`),t,e)))):"",this.readonly?"":s(U||(U=G` <section class="actions flex flex-wrap justify-end m-m"> ${0} <vaadin-button class="m-s w-full sm-w-auto" theme="primary" data-testid="submit" ?disabled="${0}" @click="${0}"> <span class="total"> ${0} </span> </vaadin-button> </section> `),this.frequencies&&this.frequencies.length?s(X||(X=G` <x-dropdown type="text" name="frequency" class="subscription m-s w-full sm-w-auto" lang="${0}" .value="${0}" .items="${0}" .getText="${0}" @change="${0}"> </x-dropdown> `),this.lang,null!==(t=this.sub_frequency)&&void 0!==t?t:"0",this.frequencies.concat(["0"]),this.__translateFrequency.bind(this),this.__handleFrequency):"",!this.__hasValidItems,this.handleSubmit,this.__submitBtnText(this.__translateAmount(this.total)))):s(z||(z=G`<x-error-screen type="setup_needed" class="relative"></x-error-screen>`))}addItems(t){for(const e of t){const t=this.createItem(e);this.appendChild(t),this.__acknowledgeItemElement(t)}}removeItems(t){this.__removeItems((e=>t.includes(e.pid)))}updated(){this.dispatchEvent(new u(this.__data))}createItem(t){const e=this.constructor.getScopedTagName("x-item"),i=document.createElement(e);return i.value=t,i.currency=this.currency,i.readonly=this.readonly,i}__submitBtnText(t){if(this.sub_frequency&&"0"!=this.sub_frequency){const e=r(this.sub_frequency);return 1===e.count?this._t("checkout.subscribe_single_unit",{value:t,period:this._t(e.units).toLowerCase()}):this._t("checkout.subscribe_muiltiple_units",{value:t,period:this.__translateFrequency(this.sub_frequency).toLowerCase()})}return this._t("checkout.buy",{value:t})}get __itemElements(){return this.querySelectorAll("[data-item]")}__createItemsFromItemArray(t){this.addItems(t)}__removeItems(t=(()=>!0)){this.__itemElements.forEach((e=>{t(e)&&e.remove()}))}__addSignature(t,e,i){return`${t}||${e}${i?"||open":""}`}__formDataFill(t){let e=0;return this.__itemElements.forEach((i=>{e+=this.__formDataAddItem(t,i)})),this.__formDataAddCartWideSubscriptionFields(t),e}__formDataCustomInputs(t){this.querySelectorAll("[name]").forEach((e=>{const i=e;"INPUT"==i.tagName&&["checkbox","radio"].includes(i.type)&&!i.checked||"OPTION"!=i.tagName&&i.value&&["number","string"].includes(typeof i.value)&&t.set(i.name,i.value)}))}__isAttributeReserved(t){return["alt","currency","description","isChildren","isItem","items","open","pid","signatures","slot","total"].includes(t)}__formDataAddItem(t,e,i=null){let s=0;if(this.__validItem(e)){if(!e.value.pid)throw new Error("Attempt to convert a item without a propper ID");i&&i.getAttribute("code")&&e.setAttribute("parent_code",i.getAttribute("code"));for(let s=0;s<e.attributes.length;s++){const r=e.attributes[s];if(!this.__isAttributeReserved(r.name)&&!r.name.startsWith("data-")){let s=e[r.name];e.code&&["string","number"].includes(typeof s)&&(i&&"quantity"==r.name&&(s=Number(r.value)*i.quantity),t.set(e.signedName(r.name),s.toString()))}}s+=1,this.__formDataAddSubscriptionFields(t,e)}const r=e.querySelectorAll("[data-bundled]");if(r&&e.quantity>0)for(const i of r)s+=this.__formDataAddItem(t,i,e);return s}__formDataAddSubscriptionFields(t,e){if(this.sub_frequency)for(const i of["sub_frequency","sub_startdate","sub_enddate"])this[i]&&t.set(e.signedName(i),this[i])}__formDataAddCartWideSubscriptionFields(t){this.sub_frequency&&(this.sub_token&&t.set(this.signedName("sub_token"),this.sub_token),t.set(this.signedName("sub_modify"),this.sub_modify),t.set(this.signedName("sub_restart"),this.sub_restart))}__formDataAddCartFields(t){this.cart?t.set("cart",this.cart):t.delete("cart")}static __validDate(t){return null!=t&&(t.match(/^(\d{1,2}|\d{8})$/)?!(t.match(/^\d{2}$/)&&Number(t)>31):!(t.match(/^\.5m/)||!K.__validFrequency(t)))}static __validDateFuture(t){let e=!1;if(K.__validDate(t))if(t.match(/^\d{8}/)){e=(new Date).toISOString().replace(/(-|T.*)/g,"")<=t}else e=!0;return e}static __validFrequency(t){return!!t&&!!t.match(/^(\.5m|\d+[dwmy])$/)}__observeChildren(t){t.forEach((t=>{"childList"==t.type&&t.addedNodes.forEach((t=>{t.addEventListener("change",this.__itemChange.bind(this))}))})),this.__acknowledgeItemElements(),this.__computeTotalPrice(),this.__updateData()}__itemChange(){this.__computeTotalPrice(),this.__updateData()}__computeTotalPrice(){let t=0;this.__itemElements.forEach((e=>{const i=e;i.total&&(t+=Number(i.total))})),this.__total=Number(t.toFixed(2))}__acknowledgeItemElements(){this.__itemElements.forEach((t=>{const e=t;this.__acknowledgeItemElement(e)}))}__acknowledgeItemElement(t){t.addEventListener("change",this.__itemChange.bind(this)),t.currency=this.currency}__validItem(t){const e=t.getAttribute("pid"),i=Number(t.getAttribute("quantity")),s=Number(t.getAttribute("price"));return!!(e&&i>0&&s>=0)}__translateFrequency(t){if(t.startsWith("0"))return this._t("frequency_once");if(".5m"===t)return this._t("frequency_0_5m");const{count:e,units:i}=r(t);return this._t("frequency",{units:this._t(i,{count:e}),count:e})}__translateAmount(t){return t.toLocaleString(this.lang,{minimumFractionDigits:2,currency:this.currency,style:"currency"})}__updateData(){this.__data=null;if(!this.shadowRoot.querySelector("form"))return;const t=new FormData,e=this.__formDataFill(t);this.__hasValidItems=!!e,this.__formDataAddCartFields(t),this.__formDataCustomInputs(t),this.__data=t}}customElements.define("foxy-items-form",K),customElements.define("foxy-item",R);export{K as I,P,R as a};
1
+ import{_ as t}from"./shared-a8ced8bf.js";import"./shared-66a0263f.js";import{L as e,c as i,h as s}from"./shared-7f33a83a.js";import{p as r}from"./shared-d9c5e26e.js";import"./shared-0ffa1afb.js";import"./shared-4a2e1638.js";import"./shared-ccb96675.js";import{w as a,S as n,y as o}from"./shared-1c9fd2b1.js";import"./shared-02c6c308.js";import"./shared-164a791e.js";import{I as l,D as c}from"./shared-3214ee1b.js";import{E as h}from"./shared-c566fe52.js";import"./shared-5f751bfc.js";import"./shared-c99a75d8.js";import"./shared-3fd94d2f.js";import"./shared-8dd640bf.js";import"./shared-b1304f5b.js";import{s as d}from"./shared-11c2efc8.js";class u extends CustomEvent{constructor(t){super("change",{detail:t})}}class m extends CustomEvent{constructor(t){super("submit",{detail:t,cancelable:!0})}}let _,p,g=t=>t;var y;!function(t){t[t.Excluded=0]="Excluded",t[t.BeforeEnter=1]="BeforeEnter",t[t.Default=2]="Default",t[t.Previous=3]="Previous",t[t.BeforeExit=4]="BeforeExit"}(y||(y={}));class f extends e{constructor(){super(...arguments),this.quantity=0,this.image=""}static get properties(){return t(t({},super.properties),{},{quantity:{attribute:!1},image:{attribute:!1}})}static get styles(){return[a.styles,i(_||(_=g`.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.blur-1{filter:blur(1px)}.blur-2{filter:blur(2px)}.grayscale{filter:grayscale()}.rotate-12{--tw-rotate:12deg}.-rotate-12{--tw-rotate:-12deg}.-rotate-24{--tw-rotate:-24deg}.translate-y-half{--tw-translate-y:50%}`))]}set empty(t){this.updateComplete.then((()=>{if(t){const[,...t]=this.__stack;t.forEach((t=>t.remove()))}else this.quantity>1&&this.__stack.length<2&&this.__insertImage(y.Previous,this.__stack[0])}))}set data({quantity:t,image:e}){this.quantity=t,this.image=e}render(){return s(p||(p=g`<div id="image" class="w-full h-full relative"></div>`))}firstUpdated(){const t=this.__insertImage(y.Default);this.quantity>1&&this.__insertImage(y.Previous,t)}updated(t){if(t.has("quantity")){const e=t.get("quantity");void 0!==e&&(this.quantity>e?this.__add():this.__remove())}t.has("image")&&this.__stack.forEach((t=>t.src=this.image))}get __container(){return this.shadowRoot.getElementById("image")}get __stack(){var t,e;return[...null!==(e=null===(t=this.__container)||void 0===t?void 0:t.querySelectorAll(":not(.opacity-0)"))&&void 0!==e?e:[]].reverse()}__add(){const[t,e]=this.__stack;this.quantity>1?(t&&this.__setImageState(t,y.Previous),e&&(this.__setImageState(e,y.BeforeExit),e.ontransitionend=()=>e.remove()),this.__setImageState(this.__insertImage(y.BeforeEnter),y.Default)):t&&this.__setImageState(t,y.Default)}__remove(){const[t,e]=this.__stack;let i;if(this.quantity>0?(e&&this.__setImageState(e,y.Default),i=t):(t&&this.__setImageState(t,y.Excluded),i=e),i&&(this.__setImageState(i,y.BeforeEnter),i.ontransitionend=()=>i.remove()),this.quantity>1){const t=this.__insertImage(y.BeforeExit,this.__container.firstElementChild);this.__setImageState(t,y.Previous)}}__insertImage(t,e=null){const i=new Image;return i.src=this.image,i.setAttribute("part","picture"),i.addEventListener("error",(()=>i.src=f.placeholder)),this.__setImageState(i,t),this.__container.insertBefore(i,e),i}__setImageState(t,e){t.offsetHeight,t.className=["absolute inset-0 w-full h-full object-cover rounded transform transition duration-700 ease-out-back",["grayscale","shadow-m translate-y-half scale-110 rotate-12 opacity-0","shadow-m","blur-1 -rotate-12 opacity-25","blur-2 -rotate-24 opacity-0"][e]].join(" ")}}f.placeholder='data:image/svg+xml,%3Csvg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Crect width="40" height="40" fill="%23E8E8E8"/%3E%3Cpath d="M31.5143 0H24.5476L0 24.5476V31.5143L11.7046 19.8097L11.9841 17.0782C12.0983 15.9624 13.0131 15.1154 14.1038 15.1154H15.7373V12.1923C15.7373 10.9815 16.6915 10 17.8687 10H21.5143L31.5143 0Z" fill="white"/%3E%3Cpath d="M11.5434 21.3852L0 32.9285V39.8953L11.5822 28.3131C11.172 27.8663 10.9438 27.2444 11.012 26.5782L11.5434 21.3852Z" fill="white"/%3E%3Cpath d="M12.4305 28.879L1.30951 40H8.27631L19.2763 29H13.1316C12.8853 29 12.6495 28.9573 12.4305 28.879Z" fill="white"/%3E%3Cpath d="M28.3113 19.965L28.0159 17.0782C27.9116 16.0591 27.1395 15.2642 26.1754 15.1341L40 1.3095V8.27627L28.3113 19.965Z" fill="white"/%3E%3Cpath d="M20.6905 29L9.69049 40H16.6572L27.9755 28.6817C27.6541 28.8832 27.2756 29 26.8684 29H20.6905Z" fill="white"/%3E%3Cpath d="M28.6572 28C28.9128 27.5952 29.0415 27.1003 28.988 26.5782L28.4426 21.2479L40 9.69053V16.6572L28.6572 28Z" fill="white"/%3E%3Cpath d="M25.0381 40H18.0715L40 18.0715V25.0381L25.0381 40Z" fill="white"/%3E%3Cpath d="M26.4524 40H33.4191L40 33.4191V26.4524L26.4524 40Z" fill="white"/%3E%3Cpath d="M40 40H34.8333L40 34.8333V40Z" fill="white"/%3E%3Cpath d="M16.1666 0H23.1334L0 23.1334V16.1666L16.1666 0Z" fill="white"/%3E%3Cpath d="M14.7524 0H7.78571L0 7.78573V14.7524L14.7524 0Z" fill="white"/%3E%3Cpath d="M0 0H6.37152L0 6.37151V0Z" fill="white"/%3E%3Cpath d="M21.467 11.4615H17.8687C17.4763 11.4615 17.1582 11.7887 17.1582 12.1923V15.1154H22.8418V12.1923C22.8418 11.7887 22.5237 11.4615 22.1313 11.4615H21.467Z" fill="white"/%3E%3Cpath d="M24.7798 15.1154H24.2627V12.1923C24.2627 11.227 23.6562 10.4075 22.8138 10.1148L32.9286 0H39.89L24.7798 15.1154Z" fill="white"/%3E%3C/svg%3E';let v,b,w,x,q,I,E,$,C=t=>t;class S extends(n(e)){constructor(){super(...arguments),this.empty=!1,this.data=[]}static get properties(){return t(t({},super.properties),{},{empty:{attribute:!1},data:{attribute:!1}})}static get styles(){return[a.styles,i(v||(v=C`.w-preview{width:5.5rem}.h-preview{height:5.5rem}.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.grayscale{filter:grayscale()}.grid-2>:nth-child(1),.grid-3>:nth-child(1),.grid-4-plus>:nth-child(1),.grid-4>:nth-child(1){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(2){opacity:0;--tw-translate-x:100%;--tw-translate-y:var(--tw-translate-x)}.grid-2>:nth-child(2),.grid-3>:nth-child(2),.grid-4-plus>:nth-child(2),.grid-4>:nth-child(2){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-3>:nth-child(2),.grid-4-plus>:nth-child(2),.grid-4>:nth-child(2){transform-origin:top right}.grid-1>:nth-child(3),.grid-2>:nth-child(3),.grid-3>:nth-child(3),.grid-4-plus>:nth-child(3),.grid-4>:nth-child(3){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(3),.grid-2>:nth-child(3){opacity:0;--tw-translate-y:100%}.grid-3>:nth-child(3){transform-origin:bottom right}.grid-4-plus>:nth-child(3),.grid-4>:nth-child(3){transform-origin:bottom left}.grid-1>:nth-child(4),.grid-2>:nth-child(4),.grid-3>:nth-child(4),.grid-4-plus>:nth-child(4),.grid-4>:nth-child(4){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(4),.grid-2>:nth-child(4),.grid-3>:nth-child(4){opacity:0;transform-origin:bottom left;--tw-translate-x:100%}.grid-1>:nth-child(4)>:first-child,.grid-2>:nth-child(4)>:first-child,.grid-3>:nth-child(4)>:first-child,.grid-4>:nth-child(4)>:first-child{transform:perspective(250px) rotateX(-90deg)}.grid-4-plus>:nth-child(4)>:first-child,.grid-4>:nth-child(4)>:last-child{transition-delay:.15s;transition-timing-function:ease-out}.grid-4-plus>:nth-child(4)>:last-child,.grid-4>:nth-child(4)>:first-child{transition-timing-function:ease-in}.grid-4-plus>:nth-child(4)>:last-child{transform:perspective(250px) rotateX(90deg)}.grid-1>:nth-child(5),.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){opacity:0}.grid-1>:nth-child(5){--tw-translate-x:100%}.grid-2>:nth-child(5),.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){--tw-translate-y:-100%}.grid-1>:nth-child(6),.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){opacity:0}.grid-1>:nth-child(6){--tw-translate-y:100%}.grid-2>:nth-child(6),.grid-3>:nth-child(6),.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){--tw-translate-x:-100%}`))]}render(){const t=this.data.length,e="rounded bg-contrast-10",i="transition-all duration-700 ease-out-back transform absolute inset-0",r=this.empty?"grayscale":"",a=t>4?"grid-4-plus":`grid-${Math.max(1,t)}`,n=d({exportparts:"picture",class:"w-full h-full",".empty":this.empty}),[o,l,c,h]=this.data;return s(b||(b=C` <div class="${0} w-preview h-preview relative font-lumo"> <div class="${0} ${0} origin-top-left"> ${0} </div> <div class="${0} ${0} origin-bottom-right"> ${0} </div> <div class="${0} ${0} origin-top-right"> ${0} </div> <div class="${0} ${0} origin-bottom-right"> <div class="${0} flex text-body transition duration-150 absolute inset-0"> ${0} </div> <div class="transition duration-150 absolute inset-0"> ${0} </div> </div> <div class="${0} ${0} origin-top-right"></div> <div class="${0} ${0} origin-bottom-left"></div> </div> `),a,i,r,o?s(w||(w=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,o):"",i,r,l?s(x||(x=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,l):"",i,r,c?s(q||(q=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,c):"",i,r,e,t>102?s(I||(I=C`<iron-icon icon="icons:more-horiz" class="m-auto w-xl h-xl"></iron-icon>`)):s(E||(E=C`<div class="m-auto text-xxxl">+${0}</div>`),t-3),h?s($||($=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,h):"",i,e,i,e)}}let D,k,L=t=>t;class A extends S{static get scopedElements(){return{"x-pic":f}}}class N extends S{static get scopedElements(){return{"x-pic":A}}}class P extends(n(e)){constructor(){super(...arguments),this.quantity=0,this.items=[]}static get scopedElements(){return{"x-picture":f,"x-bundle-grid":N}}static get properties(){return{quantity:{attribute:!1},image:{attribute:!1},items:{attribute:!1}}}static get styles(){return a.styles}render(){const{quantity:t,image:e=""}=this,i=0===t,r=d({class:"w-full h-full",exportparts:"picture"});if(0===this.items.length)return s(D||(D=L`<x-picture ...="${0}" .data="${0}"></x-picture>`),r,{quantity:t,image:e});{const e=new Array(Math.max(1,t)).fill(this.items);return s(k||(k=L`<x-bundle-grid ...="${0}" .empty="${0}" .data="${0}"></x-bundle-grid>`),r,i,e)}}}class j extends o{static get properties(){return t(t({},super.properties),{},{open:{type:Object},signatures:{type:Object,converter:t=>{const e=JSON.parse(t);for(const t of Object.keys(e))64!=e[t].length&&console.error("There is something wrong with the signature. It should have 64 characters.");return e}}})}signedName(t){return this.signatures&&this.signatures[t]?`${t}||${this.signatures[t]}${this.isOpen(t)?"||open":""}`:t}isOpen(t){return!(!this.open||!this.open[t])}}let F,T,O,V,M,H,B,Z=t=>t;class R extends j{constructor(){super("items-form"),this.rel="product_item",this.readonly=!1,this.quantity=0,this.total=this.__computeTotalPrice(),this.currency="",this.isItem=!0,this.isChildItem=!1,this.pid=R.__newId(),this.__modified=!1,this.__childPrices=[],this.__images=[],this.__childrenCount=0,this.__itemDescription="",this.__handleQuantity={handleEvent:t=>{const e=Number(t.target.value);this.quantity=e,this.__modified=!0,this.__images=[this.getImageDescription()].concat(this.__images.slice(1,this.__images.length))}},this.__childItemsObserver=new MutationObserver(this.__observeItems.bind(this)),this.__childItemsObserver.observe(this,{childList:!0,attributes:!1,subtree:!0}),this.updateComplete.then((()=>{this.__setCode(),this.__acknowledgeChildItems(),this.__changedChildItem(),this.__isValid()||console.error("Invalid item",this.value)}))}static get styles(){return[super.styles,i(F||(F=Z`:host{--quantity-width:6.5rem;--preview-size:5.5rem;--threshold:20rem}.min-w-description::before{content:'';width:var(--threshold);display:block;overflow:hidden}.ml-description{--min-width:calc(var(--threshold) + var(--preview-size) + var(--lumo-space-l));--free-space:calc(100% - var(--min-width));--max-margin-left:calc(var(--preview-size) + var(--lumo-space-l));--final-margin-left:clamp(0rem, var(--free-space) * 999999999, var(--max-margin-left));margin-left:var(--final-margin-left)}.mr-quantity{--min-width:var(--threshold);--free-space:calc(100% - var(--min-width));--max-margin-right:calc(var(--quantity-width) + var(--lumo-space-l));--final-margin-right:clamp(0rem, var(--free-space) * 999999999, var(--max-margin-right));margin-right:var(--final-margin-right)}:host([data-bundled]:not(:last-of-type)) .separator::after{content:' ';display:block;position:absolute;width:100vw;border-bottom:solid thin var(--lumo-shade-10pct);left:0;bottom:0}.w-quantity{width:var(--quantity-width)}.w-preview{width:var(--preview-size)}.h-preview{height:var(--preview-size)}`))]}static get scopedElements(){return{"vaadin-integer-field":customElements.get("vaadin-integer-field"),"x-error-screen":h,"x-preview":P,"x-i18n":l}}static get properties(){return t(t({},super.properties),{},{__modified:{},readonly:{type:Boolean,reflect:!0},currency:{type:String},category:{type:String},code:{type:String,reflect:!0},expires:{type:String},height:{type:Number},image:{type:String},length:{type:Number},name:{type:String},parent_code:{type:String},price:{type:Number},quantity:{type:Number,reflect:!0},quantity_max:{type:Number},quantity_min:{type:String},shipto:{type:String},total:{type:Number,reflect:!0,attribute:"total"},url:{type:String},value:{type:Object},weight:{type:Number},width:{type:Number},__childPrices:{},__childrenCount:{},__images:{},alt:{type:String},isChildItem:{type:Boolean,reflect:!0,attribute:"data-bundled"},isItem:{type:Boolean,reflect:!0,attribute:"data-item"},open:{type:Object},pid:{type:Number,reflect:!0},items:{type:Array}})}get items(){const t=[];return this.__onEachChildItem([e=>t.push(e.value)]),t}set items(t){this.__createItems(t)}get value(){const t={};for(let e=0;e<this.attributes.length;e++)t[this.attributes[e].name]=this.attributes[e].value;return t.items=this.items,t}set value(t){this.__itemDescription="";for(const e in t){let i="";if("description"!=e){if("object"==typeof t[e])i=JSON.stringify(t[e]);else{const s=e;(t[s]&&"undefined"!==t[s]||0===t[s])&&(i=t[e].toString())}this.setAttribute(e,t[e]?i:"")}else this.__itemDescription=t[e]}}updated(t){t.forEach(((t,e)=>{"__itemDescription"!=e&&"isChildItem"!=e||this.__updateDescriptionEl()})),this.__setTotalPrice(),this.dispatchEvent(new Event("change"))}render(){var t;if(!this.__isValid())return s(T||(T=Z`<x-error-screen type="setup_needed" class="relative"></x-error-screen>`));const e=`font-lumo text-body text-s leading-m transition duration-100 ${this.quantity?"":"removed opacity-50"}`;if(this.isChildItem)return s(O||(O=Z` <article part="item" class="py-s w-full relative separator item-summary flex justify-between ${0}"> <div class="description flex-1"> <h1 class="text-header font-medium">${0}</h1> <section class="description text-secondary"> <slot></slot> </section> </div> ${0} </article> `),e,this.name,this.quantity<2?"":s(V||(V=Z` <section class="quantity font-medium text-tertiary whitespace-nowrap"> ${0} </section> `),this._t("item.items",{quantity:this.quantity})));{const i=(null!==(t=this.price)&&void 0!==t?t:0)+this.__childPrices.reduce(((t,e)=>t+e),0),r=this.__translateAmount(i*this.quantity),a=this.__translateAmount(i);return s(M||(M=Z` <article part="item" class="p-l relative item ${0} ${0}"> <x-preview class="preview float-left w-preview h-preview mr-l mb-l" exportparts="picture" .image="${0}" .quantity="${0}" .items="${0}"> </x-preview> <section class="description min-w-description ml-description"> <h1 class="text-header font-medium text-l leading-none mr-quantity mb-s"> ${0} </h1> <div class="item-description text-secondary mr-quantity mb-s"> <slot></slot> </div> <div class="child-items mb-s"> <slot name="items"></slot> </div> ${0} </section> <section class="quantity w-quantity absolute top-0 right-0 m-l"> <vaadin-integer-field class="w-full p-0" name="quantity" @change="${0}" value="${0}" min="0" has-controls ?readonly="${0}"> </vaadin-integer-field> ${0} </section> </article> `),e,this.__modified?"modified":"",this.image,this.quantity,[...this.querySelectorAll("[data-bundled]")].map((t=>{var e;return{quantity:t.quantity,image:null!==(e=t.image)&&void 0!==e?e:""}})),this.name,a?s(H||(H=Z`<div class="font-medium price text-l">${0}</div>`),a):"",this.__handleQuantity,this.quantity,this.readonly,this.quantity>1?s(B||(B=Z` <x-i18n .ns="${0}" .lang="${0}" .opts="${0}" class="price-total text-secondary text-xs text-center block mt-xs" key="price.total"> </x-i18n> `),this.ns,this.lang,{amount:r}):"")}}getImageDescription(){return{src:this.image,alt:this.alt,quantity:this.quantity}}signedName(t){const e=super.signedName(t);return`${this.pid.toString()}:${e}`}static __newId(){const t=R.__existingIds.reduce(((t,e)=>e>t?e:t),0)+1;return R.__existingIds.push(t),t}__updateDescriptionEl(){if(this.__itemDescription){let t=this.shadowRoot.querySelector("data-item-description");t||(t=document.createElement("p"),t.dataset.itemDescription="true",this.__addSlottedEl(t)),t.innerText=this.__itemDescription}else{const t=this.shadowRoot.querySelector("data-item-description");t&&t.remove()}}__addSlottedEl(t){const e=this.shadowRoot.querySelector("article");e&&e.appendChild(t)}__setCode(){this.code||(this.code=`RAND${Math.random()}`)}__createItems(t){t.forEach((t=>{const e=document.createElement(this.tagName);e.value=t,e.currency=this.currency,e.__computeTotalPrice(),this.__acknowledgeItem(e),this.appendChild(e)}))}__setTotalPrice(){this.total=this.__computeTotalPrice()}__computeTotalPrice(){if(!this.__childPrices)return this.price?this.price*this.quantity:0;let t=0;return this.__childPrices.forEach((e=>{t+=e})),t+=this.price,t*=this.quantity,t}__isValid(){const t=[];return this.name&&this.name.length||t.push("The name attribute of an item is required."),this.price||0===this.price||t.push("The price attribute of an item is required."),this.price&&this.price<0&&t.push("Item added with negative price."),this.quantity_min&&this.quantity&&this.quantity<this.quantity_min&&t.push("Quantity amount is less than minimum quantity."),this.quantity_max&&this.quantity&&this.quantity>this.quantity_max&&t.push("Quantity amount is more than maximum quantity."),console.error(...t),!t.length}__translateAmount(t){return this.currency?t.toLocaleString(this.lang,{minimumFractionDigits:2,currency:this.currency,style:"currency"}):""}__observeItems(t){t.forEach((t=>{"childList"==t.type&&t.addedNodes.forEach((t=>{t.nodeType===Node.DOCUMENT_NODE&&this.__acknowledgeItem(t)}))})),this.__setTotalPrice()}__acknowledgeChildItems(){var t;null===(t=this.shadowRoot)||void 0===t||t.querySelectorAll("[data-item]").forEach((t=>this.__acknowledgeItem(t))),this.querySelectorAll("[data-item]").forEach((t=>this.__acknowledgeItem(t)))}__acknowledgeItem(t){t.addEventListener("change",this.__changedChildItem.bind(this)),t.currency=this.currency,t.isItem=!1,t.isChildItem=!0,this.code&&(t.parent_code=this.code)}__changedChildItem(){const t=[],e=[];let i=0;this.__onEachChildItem([e=>{void 0!==e.total&&t.push(e.total)},t=>{e.push(t.getImageDescription())},()=>i+=1]),this.image&&0===e.length&&e.push(this.getImageDescription()),this.__childPrices=t,this.__images=e,this.__childrenCount=i,this.__setTotalPrice()}__onEachChildItem(t){const e=this.querySelectorAll("[data-bundled]");for(const i of e)for(const e of t)e(i)}}R.__existingIds=[];let z,Q,W,J,U,X,G=t=>t;class K extends j{constructor(){super("items-form"),this.readonly=!1,this.target="_top",this.cart="checkout",this.sub_modify="replace",this.sub_restart="auto",this.frequencies=[],this.handleSubmit={handleEvent:()=>{null!==this.__data&&this.dispatchEvent(new m(this.__data))&&this.shadowRoot.querySelector("form").submit()}},this.__hasValidItems=!1,this.__total=0,this.__handleFrequency={handleEvent:t=>{const e=t.detail.replace(/([wydm])\w*/,"$1").replace(/ /g,"").replace(/^0/,"");K.__validFrequency(e)?this.sub_frequency=e:this.sub_frequency="",this.__updateData()}},this.__data=new FormData,this.__childItemsObserver=new MutationObserver(this.__observeChildren.bind(this)),this.__childItemsObserver.observe(this,{childList:!0,attributes:!1,subtree:!0}),this.updateComplete.then((()=>{this.__acknowledgeItemElements(),this.__computeTotalPrice(),this.__updateData()}))}static get scopedElements(){return{"x-error-screen":h,"vaadin-button":customElements.get("vaadin-button"),"x-dropdown":c,"x-item":R}}static get properties(){return t(t({},super.properties),{},{currency:{type:String},readonly:{type:Boolean},cart:{type:String,converter:t=>t&&!["checkout","add"].includes(t)?null:t},target:{type:String},store:{type:String,attribute:"store"},sub_frequency:{type:String},sub_startdate:{type:String,converter:t=>K.__validDate(t)?t:(console.error("Invalid start date",t),"")},sub_enddate:{type:String,converter:t=>K.__validDateFuture(t)?t:(console.error("Invalid end date",t),"")},sub_token:{type:String},sub_modify:{type:String,converter:t=>""===t||"append"===t?"":"replace"},sub_restart:{type:String,converter:t=>"true"===t?t:"auto"},frequencies:{converter:t=>{if(!t)return[];const e=JSON.parse(t);if(!Array.isArray(e))return console.error("Invalid frequency","Frequency options must be an array."),[];for(const t of e)if(!K.__validFrequency(t))return console.error("Invalid frequency","Invalid frequency option.\n Please, check https://wiki.foxycart.com/v/2.0/products#subscription_product_options for possible values.\n Each frequency must be a in the format:\n - 1d (a number followed by d, for day)\n - 1w (a number followed by w, for week)\n - 1m (a number followed by m, for month)\n - 1y (a number followed by y, for year)\n or .5m (no other decimals are allowed, and this is only for months)\n ",t),[];return e.filter(K.__validFrequency)}},items:{type:Array},__hasValidItems:{attribute:!1},__total:{attribute:!1},__data:{attribute:!1}})}get items(){const t=[];return this.__itemElements.forEach((e=>{const i=new Proxy(e,{set:function(t,e,i){const s=Object.keys(t.value);return!("string"!=typeof e||!s.includes(e))&&(t[e]=i,!0)},get:function(t,e){return t.value[e]}});t.push(i)})),t}set items(t){this.__removeItems(),this.__createItemsFromItemArray(t)}get total(){return this.__total}render(){var t;return this.store&&this.currency?s(Q||(Q=G` <div> <form class="overflow-hidden" method="POST" target="${0}" action="https://${0}/cart" data-testid="form" class="hidden" hidden> ${0} </form> <section class="items"> <slot></slot> </section> ${0} </div> `),this.target,this.store,this.__data?s(W||(W=G` ${0}`),[...this.__data.entries()].map((([t,e])=>s(J||(J=G`<input type="hidden" name="${0}" value="${0}">`),t,e)))):"",this.readonly?"":s(U||(U=G` <section class="actions flex flex-wrap justify-end m-m"> ${0} <vaadin-button class="m-s w-full sm-w-auto" theme="primary" data-testid="submit" ?disabled="${0}" @click="${0}"> <span class="total"> ${0} </span> </vaadin-button> </section> `),this.frequencies&&this.frequencies.length?s(X||(X=G` <x-dropdown type="text" name="frequency" class="subscription m-s w-full sm-w-auto" lang="${0}" .value="${0}" .items="${0}" .getText="${0}" @change="${0}"> </x-dropdown> `),this.lang,null!==(t=this.sub_frequency)&&void 0!==t?t:"0",this.frequencies.concat(["0"]),this.__translateFrequency.bind(this),this.__handleFrequency):"",!this.__hasValidItems,this.handleSubmit,this.__submitBtnText(this.__translateAmount(this.total)))):s(z||(z=G`<x-error-screen type="setup_needed" class="relative"></x-error-screen>`))}addItems(t){for(const e of t){const t=this.createItem(e);this.appendChild(t),this.__acknowledgeItemElement(t)}}removeItems(t){this.__removeItems((e=>t.includes(e.pid)))}updated(){this.dispatchEvent(new u(this.__data))}createItem(t){const e=this.constructor.getScopedTagName("x-item"),i=document.createElement(e);return i.value=t,i.currency=this.currency,i.readonly=this.readonly,i}__submitBtnText(t){if(this.sub_frequency&&"0"!=this.sub_frequency){const e=r(this.sub_frequency);return 1===e.count?this._t("checkout.subscribe_single_unit",{value:t,period:this._t(e.units).toLowerCase()}):this._t("checkout.subscribe_muiltiple_units",{value:t,period:this.__translateFrequency(this.sub_frequency).toLowerCase()})}return this._t("checkout.buy",{value:t})}get __itemElements(){return this.querySelectorAll("[data-item]")}__createItemsFromItemArray(t){this.addItems(t)}__removeItems(t=(()=>!0)){this.__itemElements.forEach((e=>{t(e)&&e.remove()}))}__addSignature(t,e,i){return`${t}||${e}${i?"||open":""}`}__formDataFill(t){let e=0;return this.__itemElements.forEach((i=>{e+=this.__formDataAddItem(t,i)})),this.__formDataAddCartWideSubscriptionFields(t),e}__formDataCustomInputs(t){this.querySelectorAll("[name]").forEach((e=>{const i=e;"INPUT"==i.tagName&&["checkbox","radio"].includes(i.type)&&!i.checked||"OPTION"!=i.tagName&&i.value&&["number","string"].includes(typeof i.value)&&t.set(i.name,i.value)}))}__isAttributeReserved(t){return["alt","currency","description","isChildren","isItem","items","open","pid","signatures","slot","total"].includes(t)}__formDataAddItem(t,e,i=null){let s=0;if(this.__validItem(e)){if(!e.value.pid)throw new Error("Attempt to convert a item without a propper ID");i&&i.getAttribute("code")&&e.setAttribute("parent_code",i.getAttribute("code"));for(let s=0;s<e.attributes.length;s++){const r=e.attributes[s];if(!this.__isAttributeReserved(r.name)&&!r.name.startsWith("data-")){let s=e[r.name];e.code&&["string","number"].includes(typeof s)&&(i&&"quantity"==r.name&&(s=Number(r.value)*i.quantity),t.set(e.signedName(r.name),s.toString()))}}s+=1,this.__formDataAddSubscriptionFields(t,e)}const r=e.querySelectorAll("[data-bundled]");if(r&&e.quantity>0)for(const i of r)s+=this.__formDataAddItem(t,i,e);return s}__formDataAddSubscriptionFields(t,e){if(this.sub_frequency)for(const i of["sub_frequency","sub_startdate","sub_enddate"])this[i]&&t.set(e.signedName(i),this[i])}__formDataAddCartWideSubscriptionFields(t){this.sub_frequency&&(this.sub_token&&t.set(this.signedName("sub_token"),this.sub_token),t.set(this.signedName("sub_modify"),this.sub_modify),t.set(this.signedName("sub_restart"),this.sub_restart))}__formDataAddCartFields(t){this.cart?t.set("cart",this.cart):t.delete("cart")}static __validDate(t){return null!=t&&(t.match(/^(\d{1,2}|\d{8})$/)?!(t.match(/^\d{2}$/)&&Number(t)>31):!(t.match(/^\.5m/)||!K.__validFrequency(t)))}static __validDateFuture(t){let e=!1;if(K.__validDate(t))if(t.match(/^\d{8}/)){e=(new Date).toISOString().replace(/(-|T.*)/g,"")<=t}else e=!0;return e}static __validFrequency(t){return!!t&&!!t.match(/^(\.5m|\d+[dwmy])$/)}__observeChildren(t){t.forEach((t=>{"childList"==t.type&&t.addedNodes.forEach((t=>{t.addEventListener("change",this.__itemChange.bind(this))}))})),this.__acknowledgeItemElements(),this.__computeTotalPrice(),this.__updateData()}__itemChange(){this.__computeTotalPrice(),this.__updateData()}__computeTotalPrice(){let t=0;this.__itemElements.forEach((e=>{const i=e;i.total&&(t+=Number(i.total))})),this.__total=Number(t.toFixed(2))}__acknowledgeItemElements(){this.__itemElements.forEach((t=>{const e=t;this.__acknowledgeItemElement(e)}))}__acknowledgeItemElement(t){t.addEventListener("change",this.__itemChange.bind(this)),t.currency=this.currency}__validItem(t){const e=t.getAttribute("pid"),i=Number(t.getAttribute("quantity")),s=Number(t.getAttribute("price"));return!!(e&&i>0&&s>=0)}__translateFrequency(t){if(t.startsWith("0"))return this._t("frequency_once");if(".5m"===t)return this._t("frequency_0_5m");const{count:e,units:i}=r(t);return this._t("frequency",{units:this._t(i,{count:e}),count:e})}__translateAmount(t){return t.toLocaleString(this.lang,{minimumFractionDigits:2,currency:this.currency,style:"currency"})}__updateData(){this.__data=null;if(!this.shadowRoot.querySelector("form"))return;const t=new FormData,e=this.__formDataFill(t);this.__hasValidItems=!!e,this.__formDataAddCartFields(t),this.__formDataCustomInputs(t),this.__data=t}}customElements.define("foxy-items-form",K),customElements.define("foxy-item",R);export{K as I,P,R as a};