@foxy.io/elements 1.38.0-beta.2 → 1.38.0-beta.4

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 (248) hide show
  1. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  2. package/dist/cdn/foxy-address-card.js +5 -5
  3. package/dist/cdn/foxy-address-form.js +1 -1
  4. package/dist/cdn/foxy-admin-subscription-card.js +1 -1
  5. package/dist/cdn/foxy-admin-subscription-form.js +1 -1
  6. package/dist/cdn/foxy-api-browser.js +1 -1
  7. package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
  8. package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
  9. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  10. package/dist/cdn/foxy-attribute-card.js +1 -1
  11. package/dist/cdn/foxy-attribute-form.js +1 -1
  12. package/dist/cdn/foxy-billing-address-card.js +1 -1
  13. package/dist/cdn/foxy-cancellation-form.js +1 -1
  14. package/dist/cdn/foxy-cart-card.js +1 -1
  15. package/dist/cdn/foxy-cart-form.js +2 -2
  16. package/dist/cdn/foxy-client-card.js +1 -1
  17. package/dist/cdn/foxy-client-form.js +1 -1
  18. package/dist/cdn/foxy-collection-page.js +1 -1
  19. package/dist/cdn/foxy-collection-pages.js +1 -1
  20. package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
  21. package/dist/cdn/foxy-coupon-card.js +1 -1
  22. package/dist/cdn/foxy-coupon-code-card.js +1 -1
  23. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  24. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  25. package/dist/cdn/foxy-coupon-detail-card.js +1 -1
  26. package/dist/cdn/foxy-coupon-form.js +1 -1
  27. package/dist/cdn/foxy-custom-field-card.js +1 -1
  28. package/dist/cdn/foxy-custom-field-form.js +1 -1
  29. package/dist/cdn/foxy-customer-api.js +1 -1
  30. package/dist/cdn/foxy-customer-card.js +1 -1
  31. package/dist/cdn/foxy-customer-form.js +1 -1
  32. package/dist/cdn/foxy-customer-portal-settings-form.js +1 -1
  33. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  34. package/dist/cdn/foxy-customer-portal.js +11 -11
  35. package/dist/cdn/foxy-customer.js +1 -1
  36. package/dist/cdn/foxy-customers-table.js +1 -1
  37. package/dist/cdn/foxy-discount-builder.js +1 -1
  38. package/dist/cdn/foxy-discount-card.js +1 -1
  39. package/dist/cdn/foxy-discount-detail-card.js +1 -1
  40. package/dist/cdn/foxy-donation.js +1 -1
  41. package/dist/cdn/foxy-downloadable-card.js +1 -1
  42. package/dist/cdn/foxy-downloadable-form.js +1 -1
  43. package/dist/cdn/foxy-email-template-card.js +1 -1
  44. package/dist/cdn/foxy-email-template-form.js +1 -1
  45. package/dist/cdn/foxy-error-entry-card.js +1 -1
  46. package/dist/cdn/foxy-experimental-add-to-cart-builder.js +1 -1
  47. package/dist/cdn/foxy-filter-attribute-card.js +1 -1
  48. package/dist/cdn/foxy-filter-attribute-form.js +1 -1
  49. package/dist/cdn/foxy-form-dialog.js +1 -1
  50. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  51. package/dist/cdn/foxy-gift-card-card.js +1 -1
  52. package/dist/cdn/foxy-gift-card-code-card.js +1 -1
  53. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  54. package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
  55. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  56. package/dist/cdn/foxy-gift-card-form.js +1 -1
  57. package/dist/cdn/foxy-i18n-editor.js +1 -1
  58. package/dist/cdn/foxy-i18n.js +1 -1
  59. package/dist/cdn/foxy-integration-card.js +1 -1
  60. package/dist/cdn/foxy-integration-form.js +1 -1
  61. package/dist/cdn/foxy-item-card.js +1 -1
  62. package/dist/cdn/foxy-item-category-card.js +1 -1
  63. package/dist/cdn/foxy-item-category-form.js +1 -1
  64. package/dist/cdn/foxy-item-form.js +1 -1
  65. package/dist/cdn/foxy-item-option-card.js +1 -1
  66. package/dist/cdn/foxy-item-option-form.js +1 -1
  67. package/dist/cdn/foxy-items-form.js +1 -1
  68. package/dist/cdn/foxy-native-integration-card.js +1 -1
  69. package/dist/cdn/foxy-native-integration-form.js +1 -1
  70. package/dist/cdn/foxy-nucleon-element.js +1 -1
  71. package/dist/cdn/foxy-pagination.js +1 -1
  72. package/dist/cdn/foxy-passkey-card.js +1 -1
  73. package/dist/cdn/foxy-passkey-form.js +1 -1
  74. package/dist/cdn/foxy-payment-card-embed.js +1 -1
  75. package/dist/cdn/foxy-payment-card.js +1 -1
  76. package/dist/cdn/foxy-payment-method-card.js +1 -1
  77. package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
  78. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
  79. package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
  80. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
  81. package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
  82. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
  83. package/dist/cdn/foxy-payments-api.js +1 -1
  84. package/dist/cdn/foxy-query-builder.js +1 -1
  85. package/dist/cdn/foxy-report-form.js +2 -2
  86. package/dist/cdn/foxy-reports-table.js +1 -1
  87. package/dist/cdn/foxy-shipment-card.js +1 -1
  88. package/dist/cdn/foxy-shipping-container-card.js +1 -1
  89. package/dist/cdn/foxy-shipping-drop-type-card.js +1 -1
  90. package/dist/cdn/foxy-shipping-method-card.js +1 -1
  91. package/dist/cdn/foxy-shipping-service-card.js +1 -1
  92. package/dist/cdn/foxy-sign-in-form.js +1 -1
  93. package/dist/cdn/foxy-spinner.js +2 -2
  94. package/dist/cdn/foxy-store-card.js +1 -1
  95. package/dist/cdn/foxy-store-form.js +1 -1
  96. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  97. package/dist/cdn/foxy-subscription-card.js +1 -1
  98. package/dist/cdn/foxy-subscription-form.js +1 -1
  99. package/dist/cdn/foxy-subscription-settings-form.js +1 -1
  100. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  101. package/dist/cdn/foxy-table.js +1 -1
  102. package/dist/cdn/foxy-tax-card.js +1 -1
  103. package/dist/cdn/foxy-tax-form.js +1 -1
  104. package/dist/cdn/foxy-template-config-form.js +1 -1
  105. package/dist/cdn/foxy-template-form.js +1 -1
  106. package/dist/cdn/foxy-template-set-card.js +1 -1
  107. package/dist/cdn/foxy-template-set-form.js +1 -1
  108. package/dist/cdn/foxy-transaction-card.js +1 -1
  109. package/dist/cdn/foxy-transaction.js +1 -1
  110. package/dist/cdn/foxy-transactions-table.js +7 -7
  111. package/dist/cdn/foxy-update-payment-method-form.js +1 -1
  112. package/dist/cdn/foxy-user-card.js +1 -1
  113. package/dist/cdn/foxy-user-form.js +1 -1
  114. package/dist/cdn/foxy-user-invitation-card.js +1 -1
  115. package/dist/cdn/foxy-user-invitation-form.js +1 -1
  116. package/dist/cdn/foxy-users-table.js +1 -1
  117. package/dist/cdn/foxy-webhook-card.js +1 -1
  118. package/dist/cdn/foxy-webhook-form.js +1 -1
  119. package/dist/cdn/foxy-webhook-log-card.js +1 -1
  120. package/dist/cdn/foxy-webhook-status-card.js +1 -1
  121. package/dist/cdn/{shared-1ba78e12.js → shared-058c340a.js} +1 -1
  122. package/dist/cdn/{shared-41aa53e0.js → shared-08b895b0.js} +1 -1
  123. package/dist/cdn/shared-0aedd809.js +1 -0
  124. package/dist/cdn/{shared-2bcdd0c6.js → shared-0d412ab6.js} +1 -1
  125. package/dist/cdn/{shared-812c706e.js → shared-16aa673a.js} +1 -1
  126. package/dist/cdn/{shared-12a553c2.js → shared-196b992c.js} +1 -1
  127. package/dist/cdn/{shared-82e82908.js → shared-1d0839af.js} +1 -1
  128. package/dist/cdn/{shared-2762e106.js → shared-28a6781e.js} +5 -5
  129. package/dist/cdn/{shared-f438f0f4.js → shared-2a305cf4.js} +1 -1
  130. package/dist/cdn/{shared-17a61265.js → shared-2aa23b5f.js} +1 -1
  131. package/dist/cdn/{shared-d199f862.js → shared-2b7e9979.js} +2 -2
  132. package/dist/cdn/{shared-a2693527.js → shared-2fe8f409.js} +1 -1
  133. package/dist/cdn/{shared-6960ab99.js → shared-377dea9e.js} +1 -1
  134. package/dist/cdn/{shared-f3209496.js → shared-37d9634f.js} +1 -1
  135. package/dist/cdn/{shared-fcf6424c.js → shared-3c54cb67.js} +1 -1
  136. package/dist/cdn/{shared-3a446f14.js → shared-3ca920e6.js} +1 -1
  137. package/dist/cdn/{shared-f61e5463.js → shared-3e7f5663.js} +2 -2
  138. package/dist/cdn/{shared-25a19cbe.js → shared-3f0b1660.js} +1 -1
  139. package/dist/cdn/{shared-85323ced.js → shared-4854f37a.js} +1 -1
  140. package/dist/cdn/shared-4a38cb3e.js +1 -0
  141. package/dist/cdn/{shared-aa211938.js → shared-52943926.js} +1 -1
  142. package/dist/cdn/{shared-7e9fdf64.js → shared-5592ec6e.js} +1 -1
  143. package/dist/cdn/{shared-d4d11fb8.js → shared-559ce27e.js} +1 -1
  144. package/dist/cdn/{shared-3a3dc0d9.js → shared-562d6c10.js} +1 -1
  145. package/dist/cdn/shared-5a19b58c.js +1 -0
  146. package/dist/cdn/{shared-eeb2bd18.js → shared-5afb584d.js} +1 -1
  147. package/dist/cdn/{shared-9f07fab6.js → shared-5b1511bc.js} +1 -1
  148. package/dist/cdn/{shared-d8cab6ab.js → shared-5bed5454.js} +1 -1
  149. package/dist/cdn/{shared-f2c4875b.js → shared-5c747b54.js} +1 -1
  150. package/dist/cdn/shared-5e4a03d1.js +1 -0
  151. package/dist/cdn/{shared-fcdb896f.js → shared-5ef40e86.js} +1 -1
  152. package/dist/cdn/{shared-dc6eb904.js → shared-65b74c44.js} +1 -1
  153. package/dist/cdn/{shared-c2efc54e.js → shared-673d668a.js} +1 -1
  154. package/dist/cdn/{shared-322ae633.js → shared-69b4b6a7.js} +1 -1
  155. package/dist/cdn/{shared-674ba44d.js → shared-7303e512.js} +1 -1
  156. package/dist/cdn/{shared-aab278b5.js → shared-730dd58a.js} +1 -1
  157. package/dist/cdn/{shared-7d797451.js → shared-73c3155d.js} +1 -1
  158. package/dist/cdn/{shared-d54b3216.js → shared-740e3ab9.js} +1 -1
  159. package/dist/cdn/{shared-dea71762.js → shared-746ecb15.js} +1 -1
  160. package/dist/cdn/{shared-019348d7.js → shared-7594e563.js} +1 -1
  161. package/dist/cdn/{shared-7c863df2.js → shared-75cf59dc.js} +1 -1
  162. package/dist/cdn/{shared-e6cd721f.js → shared-75feef80.js} +1 -1
  163. package/dist/cdn/{shared-aa45d4ec.js → shared-7bbb91c2.js} +1 -1
  164. package/dist/cdn/{shared-4bcfe691.js → shared-7cac2ea3.js} +1 -1
  165. package/dist/cdn/{shared-8e36bcc1.js → shared-8154088a.js} +1 -1
  166. package/dist/cdn/{shared-efecf1ca.js → shared-8219cdf0.js} +1 -1
  167. package/dist/cdn/shared-918c8b20.js +1 -0
  168. package/dist/cdn/{shared-5a08dbb0.js → shared-94756d7c.js} +1 -1
  169. package/dist/cdn/{shared-ccc91a5f.js → shared-96998138.js} +1 -1
  170. package/dist/cdn/{shared-9ca85d1e.js → shared-99a8889a.js} +1 -1
  171. package/dist/cdn/{shared-34119bbf.js → shared-9acbf607.js} +1 -1
  172. package/dist/cdn/{shared-f6e9eda6.js → shared-a6776a1d.js} +1 -1
  173. package/dist/cdn/{shared-2db8d17c.js → shared-ad179ade.js} +1 -1
  174. package/dist/cdn/{shared-2550f6d9.js → shared-ad888fc4.js} +1 -1
  175. package/dist/cdn/{shared-c27ee44e.js → shared-b0c5a062.js} +1 -1
  176. package/dist/cdn/{shared-49e0541d.js → shared-b24b86a3.js} +4 -4
  177. package/dist/cdn/{shared-299543b6.js → shared-b7775f62.js} +1 -1
  178. package/dist/cdn/{shared-57c3f0e4.js → shared-ba38add2.js} +1 -1
  179. package/dist/cdn/{shared-498ce88a.js → shared-bd2ebe88.js} +1 -1
  180. package/dist/cdn/{shared-1137b243.js → shared-c023350f.js} +1 -1
  181. package/dist/cdn/{shared-166204e5.js → shared-c44770f9.js} +1 -1
  182. package/dist/cdn/{shared-d1195c27.js → shared-cb58dfcd.js} +1 -1
  183. package/dist/cdn/{shared-13d65f57.js → shared-cbe634e6.js} +1 -1
  184. package/dist/cdn/{shared-6ef0392a.js → shared-cc8237eb.js} +1 -1
  185. package/dist/cdn/{shared-3691a26f.js → shared-ce12007b.js} +1 -1
  186. package/dist/cdn/{shared-893ead61.js → shared-cfb804b4.js} +1 -1
  187. package/dist/cdn/{shared-a2a27012.js → shared-cfce3012.js} +1 -1
  188. package/dist/cdn/{shared-604261a0.js → shared-d2bc4d51.js} +1 -1
  189. package/dist/cdn/{shared-569db166.js → shared-d40308b2.js} +1 -1
  190. package/dist/cdn/{shared-6555fd71.js → shared-d66a4bdb.js} +1 -1
  191. package/dist/cdn/{shared-bd941702.js → shared-deb5cb67.js} +1 -1
  192. package/dist/cdn/{shared-cba2b787.js → shared-e08f4e45.js} +1 -1
  193. package/dist/cdn/{shared-e1a6c036.js → shared-e5e98873.js} +1 -1
  194. package/dist/cdn/{shared-1da49e3d.js → shared-e9682623.js} +1 -1
  195. package/dist/cdn/{shared-641786b2.js → shared-eb963ba3.js} +1 -1
  196. package/dist/cdn/{shared-56ba2d28.js → shared-ef4ad461.js} +1 -1
  197. package/dist/cdn/{shared-59e22bc6.js → shared-f69bc3a6.js} +1 -1
  198. package/dist/cdn/{shared-71f3226f.js → shared-f6c479b8.js} +1 -1
  199. package/dist/cdn/shared-f83207fb.js +1 -0
  200. package/dist/cdn/{shared-58e7f6b1.js → shared-fb0c426a.js} +1 -1
  201. package/dist/cdn/translations/admin-subscription-form/en.json +14 -4
  202. package/dist/cdn/translations/coupon-code-form/en.json +2 -0
  203. package/dist/cdn/translations/coupon-form/en.json +2 -0
  204. package/dist/cdn/translations/customer/en.json +2 -0
  205. package/dist/cdn/translations/customer-portal/de.json +2 -0
  206. package/dist/cdn/translations/customer-portal/en.json +2 -0
  207. package/dist/cdn/translations/customer-portal/es.json +2 -0
  208. package/dist/cdn/translations/customer-portal/fr.json +2 -0
  209. package/dist/cdn/translations/customer-portal/nl.json +2 -0
  210. package/dist/cdn/translations/customer-portal/pl.json +2 -0
  211. package/dist/cdn/translations/customer-portal/sv.json +2 -0
  212. package/dist/cdn/translations/customer-portal/zh-hk.json +2 -0
  213. package/dist/cdn/translations/subscription-form/en.json +2 -0
  214. package/dist/cdn/translations/transaction/en.json +8 -0
  215. package/dist/cdn/translations/transaction-card/en.json +3 -1
  216. package/dist/elements/internal/InternalForm/InternalForm.d.ts +4 -0
  217. package/dist/elements/internal/InternalForm/InternalForm.js +22 -7
  218. package/dist/elements/internal/InternalForm/InternalForm.js.map +1 -1
  219. package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.d.ts +1 -1
  220. package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.js +19 -13
  221. package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.js.map +1 -1
  222. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLinkControl/InternalAdminSubscriptionFormLinkControl.js +19 -40
  223. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLinkControl/InternalAdminSubscriptionFormLinkControl.js.map +1 -1
  224. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLinkControl/index.d.ts +0 -1
  225. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLinkControl/index.js +0 -1
  226. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLinkControl/index.js.map +1 -1
  227. package/dist/elements/public/StoreForm/StoreForm.js +2 -2
  228. package/dist/elements/public/StoreForm/StoreForm.js.map +1 -1
  229. package/dist/elements/public/Transaction/Transaction.d.ts +3 -0
  230. package/dist/elements/public/Transaction/Transaction.js +9 -0
  231. package/dist/elements/public/Transaction/Transaction.js.map +1 -1
  232. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.js +16 -0
  233. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.js.map +1 -1
  234. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.d.ts +2 -0
  235. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.js +2 -0
  236. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.js.map +1 -1
  237. package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/InternalTransactionSummaryControl.js +14 -10
  238. package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/InternalTransactionSummaryControl.js.map +1 -1
  239. package/dist/elements/public/TransactionCard/TransactionCard.js +25 -4
  240. package/dist/elements/public/TransactionCard/TransactionCard.js.map +1 -1
  241. package/dist/mixins/themeable.js +8 -12
  242. package/dist/mixins/themeable.js.map +1 -1
  243. package/package.json +1 -1
  244. package/dist/cdn/shared-1aff7995.js +0 -1
  245. package/dist/cdn/shared-882a0fda.js +0 -1
  246. package/dist/cdn/shared-9cf15285.js +0 -1
  247. package/dist/cdn/shared-a1f85307.js +0 -1
  248. package/dist/cdn/shared-d1dfac4d.js +0 -1
@@ -1,4 +1,4 @@
1
- import"./shared-25a19cbe.js";import"./shared-812c706e.js";import"./shared-58e7f6b1.js";import"./shared-a2a27012.js";import"./shared-71f3226f.js";import"./shared-f6e9eda6.js";import"./shared-569db166.js";import{I as e,b as t}from"./shared-6960ab99.js";import"./foxy-template-set-card.js";import"./foxy-copy-to-clipboard.js";import"./foxy-nucleon-element.js";import"./foxy-spinner.js";import"./shared-5a08dbb0.js";import"./shared-ccc91a5f.js";import"./shared-4bcfe691.js";import"./shared-7c863df2.js";import"./shared-e1a6c036.js";import"./foxy-item-category-card.js";import"./foxy-discount-builder.js";import"./shared-a1f85307.js";import{I as n}from"./shared-f438f0f4.js";import{h as r,d as i,N as o,i as a,s}from"./shared-ba5c42c7.js";import{_ as l,B as u}from"./shared-d1195c27.js";import{a as d,R as c,w as m}from"./shared-f61e5463.js";import{i as f}from"./shared-53e42a77.js";import{e as h,d as g}from"./shared-641786b2.js";import{c as p}from"./shared-4e709717.js";import"./shared-8e36bcc1.js";import"./shared-f2c4875b.js";import"./shared-efecf1ca.js";import"./foxy-form-dialog.js";import"./shared-9f07fab6.js";import"./shared-2550f6d9.js";import"./shared-7e9fdf64.js";import"./shared-343d1fd7.js";import"./shared-eeb2bd18.js";import"./shared-17a61265.js";import"./shared-cd96ff03.js";import"./shared-53e476fd.js";import"./shared-bab2ea2c.js";import"./shared-d1dfac4d.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-57c3f0e4.js";import"./shared-893ead61.js";import"./shared-674ba44d.js";import"./shared-5fd5805c.js";import"./shared-d0aed1c1.js";import"./shared-604261a0.js";import"./shared-1ba78e12.js";import"./shared-e6cd721f.js";import"./shared-d8cab6ab.js";import"./shared-3a446f14.js";import"./shared-d54b3216.js";import"./shared-651c44fa.js";import"./shared-13d65f57.js";import"./shared-a2693527.js";import"./shared-59e22bc6.js";import"./shared-166204e5.js";import"./shared-dea71762.js";import"./shared-5212ef4f.js";import"./shared-fcf6424c.js";import"./shared-dc6eb904.js";import"./shared-299543b6.js";import"./shared-aab278b5.js";import"./shared-1137b243.js";import"./shared-6ef0392a.js";import"./foxy-collection-page.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-2762e106.js";import"./shared-34119bbf.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./shared-63c32024.js";let y,_=e=>e;customElements.define("foxy-internal-experimental-add-to-cart-builder-custom-option-card",class extends n{renderBody(){var e,t;return r(y||(y=_` <div class="flex justify-between items-center h-xs"> <span class="font-medium">${0}&ZeroWidthSpace;</span> <span class="text-secondary">${0}&ZeroWidthSpace;</span> </div> `),null===(e=this.data)||void 0===e?void 0:e.name,null===(t=this.data)||void 0===t?void 0:t.value)}});let b,x=e=>e;const v=d(e,"internal-experimental-add-to-cart-builder-custom-option-form");customElements.define("foxy-internal-experimental-add-to-cart-builder-custom-option-form",class extends v{constructor(){super(...arguments),this.defaultWeightUnit=null,this.existingOptions=[],this.itemCategories=null,this.currencyCode=null}static get properties(){return l(l({},super.properties),{},{defaultWeightUnit:{attribute:"default-weight-unit"},existingOptions:{type:Array,attribute:"existing-options"},itemCategories:{attribute:"item-categories"},currencyCode:{attribute:"currency-code"}})}get readonlySelector(){const e=[super.readonlySelector.toString()];return this.href&&e.unshift("basics-group"),new u(e.join(" ").trim())}get disabledSelector(){const e=[super.disabledSelector.toString()];return!this.href&&this.existingOptions.some((e=>e.name===this.form.name))&&e.unshift("basics-group:value-configurable"),new u(e.join(" ").trim())}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return this.form.value_configurable&&e.unshift("price-group","weight-group","code-group","category-group"),new u(e.join(" ").trim())}renderBody(){var e,t,n,i;return r(b||(b=x` <foxy-internal-summary-control infer="basics-group"> <foxy-internal-text-control layout="summary-item" infer="name"></foxy-internal-text-control> <foxy-internal-text-control property="value" layout="summary-item" infer="${0}"> </foxy-internal-text-control> <foxy-internal-switch-control infer="value-configurable"></foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="price-group"> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="price"> </foxy-internal-number-control> <foxy-internal-switch-control infer="replace-price"></foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="weight-group"> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="weight"> </foxy-internal-number-control> <foxy-internal-switch-control infer="replace-weight"></foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="code-group"> <foxy-internal-text-control layout="summary-item" infer="code"> </foxy-internal-text-control> <foxy-internal-switch-control infer="replace-code"></foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="category-group"> <foxy-internal-resource-picker-control layout="summary-item" first="${0}" infer="item-category-uri" item="foxy-item-category-card"> </foxy-internal-resource-picker-control> </foxy-internal-summary-control> <foxy-nucleon infer="" class="hidden" href="${0}" id="itemCategoryLoader" @update="${0}"> </foxy-nucleon> `),this.form.value_configurable?"default-value":"value",f(null!==(e=this.currencyCode)&&void 0!==e?e:void 0),f(null!==(t=this.__resolvedDefaultWeightUnit)&&void 0!==t?t:void 0),f(null!==(n=this.itemCategories)&&void 0!==n?n:void 0),f(null!==(i=this.form.item_category_uri)&&void 0!==i?i:void 0),(()=>this.requestUpdate()))}async _sendPost(e){const t=this.existingOptions.filter((t=>t.name===e.name));if(t.some((e=>e.value_configurable)))throw["error:option_exists_configurable"];if(t.some((t=>t.value===e.value)))throw["error:option_exists"];return super._sendPost(e)}get __resolvedDefaultWeightUnit(){var e,t;const n=this.renderRoot.querySelector("#itemCategoryLoader");return null!==(t=null===(e=null==n?void 0:n.data)||void 0===e?void 0:e.default_weight_unit)&&void 0!==t?t:this.defaultWeightUnit}});let $,w,E,S,j,k,C,N,L,M,R,O,P,T,A,I,q=e=>e;customElements.define("foxy-internal-experimental-add-to-cart-builder-item-control",class extends t{constructor(){super(...arguments),this.defaultItemCategory=null,this.itemCategories=null,this.currencyCode=null,this.index=0}static get properties(){return l(l({},super.properties),{},{defaultItemCategory:{type:Object,attribute:"default-item-category"},itemCategories:{attribute:"item-categories"},currencyCode:{attribute:"currency-code"},index:{type:Number}})}renderControl(){var e,t,n,i,o,a,s,l,u;const d=this.__resolvedItemCategory,c=null==d?void 0:d.item_delivery_type,m=this.nucleon,h=this.index,g=null===(e=null==m?void 0:m.form.items)||void 0===e?void 0:e[h];return r($||($=q` <div class="space-y-m"> <foxy-internal-summary-control infer="basics-group"> <foxy-internal-text-control property="items.${0}.name" layout="summary-item" infer="name"> </foxy-internal-text-control> <foxy-internal-resource-picker-control property="items.${0}.item_category_uri" layout="summary-item" first="${0}" infer="item-category-uri" item="foxy-item-category-card"> </foxy-internal-resource-picker-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="price-group"> <foxy-internal-number-control property="items.${0}.price" layout="summary-item" suffix="${0}" infer="${0}"> </foxy-internal-number-control> <foxy-internal-switch-control property="items.${0}.price_configurable" layout="summary-item" infer="price-configurable"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="code-group"> <foxy-internal-text-control property="items.${0}.code" layout="summary-item" infer="code"> </foxy-internal-text-control> <foxy-internal-text-control property="items.${0}.parent_code" layout="summary-item" infer="parent-code"> </foxy-internal-text-control> </foxy-internal-summary-control> ${0} <foxy-internal-summary-control infer="subscriptions-group"> <foxy-internal-switch-control property="items.${0}.sub_enabled" layout="summary-item" infer="sub-enabled"> </foxy-internal-switch-control> ${0} </foxy-internal-summary-control> <foxy-internal-summary-control infer="quantity-group" layout="details"> <foxy-internal-number-control property="items.${0}.quantity" layout="summary-item" infer="quantity" step="1" min="1"> </foxy-internal-number-control> ${0} <foxy-internal-switch-control property="items.${0}.hide_quantity" infer="hide-quantity"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="advanced-group" layout="details"> <foxy-internal-text-control property="items.${0}.discount_name" layout="summary-item" infer="discount-name"> </foxy-internal-text-control> ${0} <foxy-internal-text-control property="items.${0}.image" layout="summary-item" infer="image"> </foxy-internal-text-control> ${0} <foxy-internal-select-control property="items.${0}.expires_format" layout="summary-item" infer="expires-format" .options="${0}"> </foxy-internal-select-control> ${0} ${0} </foxy-internal-summary-control> <foxy-internal-async-list-control layout="details" first="foxy://${0}/form/items/${0}/custom_options" infer="custom-options" form="foxy-internal-experimental-add-to-cart-builder-custom-option-form" item="foxy-internal-experimental-add-to-cart-builder-custom-option-card" alert .formProps="${0}"> </foxy-internal-async-list-control> ${0} <foxy-nucleon infer="" class="hidden" href="${0}" id="itemCategoryLoader" @update="${0}"> </foxy-nucleon> </div> `),h,h,f(null!==(t=this.itemCategories)&&void 0!==t?t:void 0),h,f(null!==(n=this.currencyCode)&&void 0!==n?n:void 0),(null==g?void 0:g.price_configurable)?"price-default":"price",h,h,h,"notshipped"===c||"downloaded"===c?"":r(w||(w=q` <foxy-internal-summary-control infer="appearance-group"> <foxy-internal-number-control placeholder="${0}" property="items.${0}.weight" layout="summary-item" suffix="${0}" infer="weight" min="0"> </foxy-internal-number-control> </foxy-internal-summary-control> `),f(null==d?void 0:d.default_weight),h,f(null==d?void 0:d.default_weight_unit)),h,(null==g?void 0:g.sub_enabled)?r(E||(E=q` <foxy-internal-frequency-control property="items.${0}.sub_frequency" layout="summary-item" infer="sub-frequency" allow-twice-a-month> </foxy-internal-frequency-control> <foxy-internal-select-control property="items.${0}.sub_startdate_format" layout="summary-item" infer="sub-startdate-format" .options="${0}"> </foxy-internal-select-control> ${0} <foxy-internal-select-control property="items.${0}.sub_enddate_format" layout="summary-item" infer="sub-enddate-format" .options="${0}"> </foxy-internal-select-control> ${0} `),h,h,[{label:"option_none",value:"none"},{label:"option_yyyymmdd",value:"yyyymmdd"},{label:"option_dd",value:"dd"},{label:"option_duration",value:"duration"}],"yyyymmdd"===g.sub_startdate_format?r(S||(S=q` <foxy-internal-date-control property="items.${0}.sub_startdate" layout="summary-item" infer="sub-startdate-yyyymmdd"> </foxy-internal-date-control> `),h):"duration"===g.sub_startdate_format?r(j||(j=q` <foxy-internal-frequency-control property="items.${0}.sub_startdate" layout="summary-item" infer="sub-startdate-duration"> </foxy-internal-frequency-control> `),h):"dd"===g.sub_startdate_format?r(k||(k=q` <foxy-internal-number-control property="items.${0}.sub_startdate" layout="summary-item" infer="sub-startdate-dd" step="1" min="1" max="31"> </foxy-internal-number-control> `),h):"",h,[{label:"option_none",value:"none"},{label:"option_yyyymmdd",value:"yyyymmdd"},{label:"option_duration",value:"duration"}],"yyyymmdd"===g.sub_enddate_format?r(C||(C=q` <foxy-internal-date-control property="items.${0}.sub_enddate" layout="summary-item" infer="sub-enddate-yyyymmdd"> </foxy-internal-date-control> `),h):"duration"===g.sub_enddate_format?r(N||(N=q` <foxy-internal-frequency-control property="items.${0}.sub_enddate" layout="summary-item" infer="sub-enddate-duration"> </foxy-internal-frequency-control> `),h):""):"",h,"minutes"===(null==g?void 0:g.expires_format)?"":r(L||(L=q` <foxy-internal-number-control property="items.${0}.quantity_min" layout="summary-item" infer="quantity-min" step="1" min="1"> </foxy-internal-number-control> <foxy-internal-number-control property="items.${0}.quantity_max" layout="summary-item" infer="quantity-max" step="1" min="1"> </foxy-internal-number-control> `),h,h),h,h,(null==g?void 0:g.discount_name)?r(M||(M=q` <foxy-discount-builder infer="discount-builder" .parsedValue="${0}" @change="${0}"> </foxy-discount-builder> `),{details:null!==(i=null==g?void 0:g.discount_details)&&void 0!==i?i:"",type:null!==(o=null==g?void 0:g.discount_type)&&void 0!==o?o:"amount_percentage",name:null!==(a=null==g?void 0:g.discount_name)&&void 0!==a?a:""},(e=>{this.__handleDiscountBuilderChange(e,g,h)})):"",h,(null==g?void 0:g.image)?r(R||(R=q` <foxy-internal-text-control property="items.${0}.url" layout="summary-item" infer="url"> </foxy-internal-text-control> `),h):"",h,[{label:"option_none",value:"none"},{label:"option_minutes",value:"minutes"},{label:"option_timestamp",value:"timestamp"}],"minutes"===(null==g?void 0:g.expires_format)?r(O||(O=q` <foxy-internal-number-control property="items.${0}.expires_value" layout="summary-item" suffix="min" infer="expires-value-minutes"> </foxy-internal-number-control> `),h):"timestamp"===(null==g?void 0:g.expires_format)?r(P||(P=q` <foxy-internal-date-control property="items.${0}.expires_value" layout="summary-item" format="unix" infer="expires-value-timestamp"> </foxy-internal-date-control> `),h):"","notshipped"===c||"downloaded"===c?"":r(T||(T=q` <foxy-internal-number-control property="items.${0}.length" layout="summary-item" suffix="${0}" infer="length" min="0"> </foxy-internal-number-control> <foxy-internal-number-control property="items.${0}.width" layout="summary-item" suffix="${0}" infer="width" min="0"> </foxy-internal-number-control> <foxy-internal-number-control property="items.${0}.height" layout="summary-item" suffix="${0}" infer="height" min="0"> </foxy-internal-number-control> `),h,f(null==d?void 0:d.default_length_unit),h,f(null==d?void 0:d.default_length_unit),h,f(null==d?void 0:d.default_length_unit)),null==m?void 0:m.virtualHost,h,{".defaultWeightUnit":null==d?void 0:d.default_weight_unit,".existingOptions":null!==(s=null==g?void 0:g.custom_options)&&void 0!==s?s:[],".itemCategories":this.itemCategories,".currencyCode":this.currencyCode},(null!==(u=null===(l=null==m?void 0:m.form.items)||void 0===l?void 0:l.length)&&void 0!==u?u:0)<=1?r(A||(A=q``)):r(I||(I=q` <vaadin-button theme="error" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="delete" key="caption"></foxy-i18n> </vaadin-button> `),this.disabled,(()=>this.dispatchEvent(new CustomEvent("remove")))),f(null==g?void 0:g.item_category_uri),(()=>this.requestUpdate()))}get __resolvedItemCategory(){var e,t;return null!==(t=null===(e=this.__itemCategoryLoader)||void 0===e?void 0:e.data)&&void 0!==t?t:this.defaultItemCategory}get __itemCategoryLoader(){return this.renderRoot.querySelector("#itemCategoryLoader")}__handleDiscountBuilderChange(e,t,n){var r;const i=e.currentTarget,o=this.nucleon;t.discount_details=i.parsedValue.details,t.discount_type=i.parsedValue.type,t.discount_name=i.parsedValue.name;const a=null!==(r=null==o?void 0:o.form.items)&&void 0!==r?r:[];a.splice(n,1,t),null==o||o.edit({items:[...a]})}});const D=new WeakMap,H=i((e=>t=>{if(!(t instanceof o))throw new Error("unsafeHTML can only be used in text bindings");const n=D.get(t);if(void 0!==n&&a(e)&&e===n.value&&t.value===n.fragment)return;const r=document.createElement("template");r.innerHTML=e;const i=document.importNode(r.content,!0);t.setValue(i),D.set(t,{value:e,fragment:i})}));
1
+ import"./shared-3f0b1660.js";import"./shared-16aa673a.js";import"./shared-fb0c426a.js";import"./shared-cfce3012.js";import"./shared-f6c479b8.js";import"./shared-a6776a1d.js";import"./shared-d40308b2.js";import{I as e,b as t}from"./shared-377dea9e.js";import"./foxy-template-set-card.js";import"./foxy-copy-to-clipboard.js";import"./foxy-nucleon-element.js";import"./foxy-spinner.js";import"./shared-94756d7c.js";import"./shared-96998138.js";import"./shared-7cac2ea3.js";import"./shared-75cf59dc.js";import"./shared-e5e98873.js";import"./foxy-item-category-card.js";import"./foxy-discount-builder.js";import"./shared-5a19b58c.js";import{I as n}from"./shared-2a305cf4.js";import{h as r,d as i,N as o,i as a,s}from"./shared-ba5c42c7.js";import{_ as l,B as u}from"./shared-cb58dfcd.js";import{a as d,R as c,w as m}from"./shared-3e7f5663.js";import{i as f}from"./shared-53e42a77.js";import{e as h,d as g}from"./shared-eb963ba3.js";import{c as p}from"./shared-4e709717.js";import"./shared-8154088a.js";import"./shared-5c747b54.js";import"./shared-8219cdf0.js";import"./foxy-form-dialog.js";import"./shared-5b1511bc.js";import"./shared-ad888fc4.js";import"./shared-5592ec6e.js";import"./shared-343d1fd7.js";import"./shared-5afb584d.js";import"./shared-2aa23b5f.js";import"./shared-cd96ff03.js";import"./shared-53e476fd.js";import"./shared-bab2ea2c.js";import"./shared-f83207fb.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-ba38add2.js";import"./shared-cfb804b4.js";import"./shared-7303e512.js";import"./shared-5fd5805c.js";import"./shared-d0aed1c1.js";import"./shared-d2bc4d51.js";import"./shared-058c340a.js";import"./shared-75feef80.js";import"./shared-5bed5454.js";import"./shared-3ca920e6.js";import"./shared-740e3ab9.js";import"./shared-651c44fa.js";import"./shared-cbe634e6.js";import"./shared-2fe8f409.js";import"./shared-f69bc3a6.js";import"./shared-c44770f9.js";import"./shared-746ecb15.js";import"./shared-5212ef4f.js";import"./shared-3c54cb67.js";import"./shared-65b74c44.js";import"./shared-b7775f62.js";import"./shared-730dd58a.js";import"./shared-c023350f.js";import"./shared-cc8237eb.js";import"./foxy-collection-page.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-28a6781e.js";import"./shared-9acbf607.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./shared-63c32024.js";let y,_=e=>e;customElements.define("foxy-internal-experimental-add-to-cart-builder-custom-option-card",class extends n{renderBody(){var e,t;return r(y||(y=_` <div class="flex justify-between items-center h-xs"> <span class="font-medium">${0}&ZeroWidthSpace;</span> <span class="text-secondary">${0}&ZeroWidthSpace;</span> </div> `),null===(e=this.data)||void 0===e?void 0:e.name,null===(t=this.data)||void 0===t?void 0:t.value)}});let b,x=e=>e;const v=d(e,"internal-experimental-add-to-cart-builder-custom-option-form");customElements.define("foxy-internal-experimental-add-to-cart-builder-custom-option-form",class extends v{constructor(){super(...arguments),this.defaultWeightUnit=null,this.existingOptions=[],this.itemCategories=null,this.currencyCode=null}static get properties(){return l(l({},super.properties),{},{defaultWeightUnit:{attribute:"default-weight-unit"},existingOptions:{type:Array,attribute:"existing-options"},itemCategories:{attribute:"item-categories"},currencyCode:{attribute:"currency-code"}})}get readonlySelector(){const e=[super.readonlySelector.toString()];return this.href&&e.unshift("basics-group"),new u(e.join(" ").trim())}get disabledSelector(){const e=[super.disabledSelector.toString()];return!this.href&&this.existingOptions.some((e=>e.name===this.form.name))&&e.unshift("basics-group:value-configurable"),new u(e.join(" ").trim())}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return this.form.value_configurable&&e.unshift("price-group","weight-group","code-group","category-group"),new u(e.join(" ").trim())}renderBody(){var e,t,n,i;return r(b||(b=x` <foxy-internal-summary-control infer="basics-group"> <foxy-internal-text-control layout="summary-item" infer="name"></foxy-internal-text-control> <foxy-internal-text-control property="value" layout="summary-item" infer="${0}"> </foxy-internal-text-control> <foxy-internal-switch-control infer="value-configurable"></foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="price-group"> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="price"> </foxy-internal-number-control> <foxy-internal-switch-control infer="replace-price"></foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="weight-group"> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="weight"> </foxy-internal-number-control> <foxy-internal-switch-control infer="replace-weight"></foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="code-group"> <foxy-internal-text-control layout="summary-item" infer="code"> </foxy-internal-text-control> <foxy-internal-switch-control infer="replace-code"></foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="category-group"> <foxy-internal-resource-picker-control layout="summary-item" first="${0}" infer="item-category-uri" item="foxy-item-category-card"> </foxy-internal-resource-picker-control> </foxy-internal-summary-control> <foxy-nucleon infer="" class="hidden" href="${0}" id="itemCategoryLoader" @update="${0}"> </foxy-nucleon> `),this.form.value_configurable?"default-value":"value",f(null!==(e=this.currencyCode)&&void 0!==e?e:void 0),f(null!==(t=this.__resolvedDefaultWeightUnit)&&void 0!==t?t:void 0),f(null!==(n=this.itemCategories)&&void 0!==n?n:void 0),f(null!==(i=this.form.item_category_uri)&&void 0!==i?i:void 0),(()=>this.requestUpdate()))}async _sendPost(e){const t=this.existingOptions.filter((t=>t.name===e.name));if(t.some((e=>e.value_configurable)))throw["error:option_exists_configurable"];if(t.some((t=>t.value===e.value)))throw["error:option_exists"];return super._sendPost(e)}get __resolvedDefaultWeightUnit(){var e,t;const n=this.renderRoot.querySelector("#itemCategoryLoader");return null!==(t=null===(e=null==n?void 0:n.data)||void 0===e?void 0:e.default_weight_unit)&&void 0!==t?t:this.defaultWeightUnit}});let $,w,E,S,j,k,C,N,L,M,R,O,P,T,A,I,q=e=>e;customElements.define("foxy-internal-experimental-add-to-cart-builder-item-control",class extends t{constructor(){super(...arguments),this.defaultItemCategory=null,this.itemCategories=null,this.currencyCode=null,this.index=0}static get properties(){return l(l({},super.properties),{},{defaultItemCategory:{type:Object,attribute:"default-item-category"},itemCategories:{attribute:"item-categories"},currencyCode:{attribute:"currency-code"},index:{type:Number}})}renderControl(){var e,t,n,i,o,a,s,l,u;const d=this.__resolvedItemCategory,c=null==d?void 0:d.item_delivery_type,m=this.nucleon,h=this.index,g=null===(e=null==m?void 0:m.form.items)||void 0===e?void 0:e[h];return r($||($=q` <div class="space-y-m"> <foxy-internal-summary-control infer="basics-group"> <foxy-internal-text-control property="items.${0}.name" layout="summary-item" infer="name"> </foxy-internal-text-control> <foxy-internal-resource-picker-control property="items.${0}.item_category_uri" layout="summary-item" first="${0}" infer="item-category-uri" item="foxy-item-category-card"> </foxy-internal-resource-picker-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="price-group"> <foxy-internal-number-control property="items.${0}.price" layout="summary-item" suffix="${0}" infer="${0}"> </foxy-internal-number-control> <foxy-internal-switch-control property="items.${0}.price_configurable" layout="summary-item" infer="price-configurable"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="code-group"> <foxy-internal-text-control property="items.${0}.code" layout="summary-item" infer="code"> </foxy-internal-text-control> <foxy-internal-text-control property="items.${0}.parent_code" layout="summary-item" infer="parent-code"> </foxy-internal-text-control> </foxy-internal-summary-control> ${0} <foxy-internal-summary-control infer="subscriptions-group"> <foxy-internal-switch-control property="items.${0}.sub_enabled" layout="summary-item" infer="sub-enabled"> </foxy-internal-switch-control> ${0} </foxy-internal-summary-control> <foxy-internal-summary-control infer="quantity-group" layout="details"> <foxy-internal-number-control property="items.${0}.quantity" layout="summary-item" infer="quantity" step="1" min="1"> </foxy-internal-number-control> ${0} <foxy-internal-switch-control property="items.${0}.hide_quantity" infer="hide-quantity"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="advanced-group" layout="details"> <foxy-internal-text-control property="items.${0}.discount_name" layout="summary-item" infer="discount-name"> </foxy-internal-text-control> ${0} <foxy-internal-text-control property="items.${0}.image" layout="summary-item" infer="image"> </foxy-internal-text-control> ${0} <foxy-internal-select-control property="items.${0}.expires_format" layout="summary-item" infer="expires-format" .options="${0}"> </foxy-internal-select-control> ${0} ${0} </foxy-internal-summary-control> <foxy-internal-async-list-control layout="details" first="foxy://${0}/form/items/${0}/custom_options" infer="custom-options" form="foxy-internal-experimental-add-to-cart-builder-custom-option-form" item="foxy-internal-experimental-add-to-cart-builder-custom-option-card" alert .formProps="${0}"> </foxy-internal-async-list-control> ${0} <foxy-nucleon infer="" class="hidden" href="${0}" id="itemCategoryLoader" @update="${0}"> </foxy-nucleon> </div> `),h,h,f(null!==(t=this.itemCategories)&&void 0!==t?t:void 0),h,f(null!==(n=this.currencyCode)&&void 0!==n?n:void 0),(null==g?void 0:g.price_configurable)?"price-default":"price",h,h,h,"notshipped"===c||"downloaded"===c?"":r(w||(w=q` <foxy-internal-summary-control infer="appearance-group"> <foxy-internal-number-control placeholder="${0}" property="items.${0}.weight" layout="summary-item" suffix="${0}" infer="weight" min="0"> </foxy-internal-number-control> </foxy-internal-summary-control> `),f(null==d?void 0:d.default_weight),h,f(null==d?void 0:d.default_weight_unit)),h,(null==g?void 0:g.sub_enabled)?r(E||(E=q` <foxy-internal-frequency-control property="items.${0}.sub_frequency" layout="summary-item" infer="sub-frequency" allow-twice-a-month> </foxy-internal-frequency-control> <foxy-internal-select-control property="items.${0}.sub_startdate_format" layout="summary-item" infer="sub-startdate-format" .options="${0}"> </foxy-internal-select-control> ${0} <foxy-internal-select-control property="items.${0}.sub_enddate_format" layout="summary-item" infer="sub-enddate-format" .options="${0}"> </foxy-internal-select-control> ${0} `),h,h,[{label:"option_none",value:"none"},{label:"option_yyyymmdd",value:"yyyymmdd"},{label:"option_dd",value:"dd"},{label:"option_duration",value:"duration"}],"yyyymmdd"===g.sub_startdate_format?r(S||(S=q` <foxy-internal-date-control property="items.${0}.sub_startdate" layout="summary-item" infer="sub-startdate-yyyymmdd"> </foxy-internal-date-control> `),h):"duration"===g.sub_startdate_format?r(j||(j=q` <foxy-internal-frequency-control property="items.${0}.sub_startdate" layout="summary-item" infer="sub-startdate-duration"> </foxy-internal-frequency-control> `),h):"dd"===g.sub_startdate_format?r(k||(k=q` <foxy-internal-number-control property="items.${0}.sub_startdate" layout="summary-item" infer="sub-startdate-dd" step="1" min="1" max="31"> </foxy-internal-number-control> `),h):"",h,[{label:"option_none",value:"none"},{label:"option_yyyymmdd",value:"yyyymmdd"},{label:"option_duration",value:"duration"}],"yyyymmdd"===g.sub_enddate_format?r(C||(C=q` <foxy-internal-date-control property="items.${0}.sub_enddate" layout="summary-item" infer="sub-enddate-yyyymmdd"> </foxy-internal-date-control> `),h):"duration"===g.sub_enddate_format?r(N||(N=q` <foxy-internal-frequency-control property="items.${0}.sub_enddate" layout="summary-item" infer="sub-enddate-duration"> </foxy-internal-frequency-control> `),h):""):"",h,"minutes"===(null==g?void 0:g.expires_format)?"":r(L||(L=q` <foxy-internal-number-control property="items.${0}.quantity_min" layout="summary-item" infer="quantity-min" step="1" min="1"> </foxy-internal-number-control> <foxy-internal-number-control property="items.${0}.quantity_max" layout="summary-item" infer="quantity-max" step="1" min="1"> </foxy-internal-number-control> `),h,h),h,h,(null==g?void 0:g.discount_name)?r(M||(M=q` <foxy-discount-builder infer="discount-builder" .parsedValue="${0}" @change="${0}"> </foxy-discount-builder> `),{details:null!==(i=null==g?void 0:g.discount_details)&&void 0!==i?i:"",type:null!==(o=null==g?void 0:g.discount_type)&&void 0!==o?o:"amount_percentage",name:null!==(a=null==g?void 0:g.discount_name)&&void 0!==a?a:""},(e=>{this.__handleDiscountBuilderChange(e,g,h)})):"",h,(null==g?void 0:g.image)?r(R||(R=q` <foxy-internal-text-control property="items.${0}.url" layout="summary-item" infer="url"> </foxy-internal-text-control> `),h):"",h,[{label:"option_none",value:"none"},{label:"option_minutes",value:"minutes"},{label:"option_timestamp",value:"timestamp"}],"minutes"===(null==g?void 0:g.expires_format)?r(O||(O=q` <foxy-internal-number-control property="items.${0}.expires_value" layout="summary-item" suffix="min" infer="expires-value-minutes"> </foxy-internal-number-control> `),h):"timestamp"===(null==g?void 0:g.expires_format)?r(P||(P=q` <foxy-internal-date-control property="items.${0}.expires_value" layout="summary-item" format="unix" infer="expires-value-timestamp"> </foxy-internal-date-control> `),h):"","notshipped"===c||"downloaded"===c?"":r(T||(T=q` <foxy-internal-number-control property="items.${0}.length" layout="summary-item" suffix="${0}" infer="length" min="0"> </foxy-internal-number-control> <foxy-internal-number-control property="items.${0}.width" layout="summary-item" suffix="${0}" infer="width" min="0"> </foxy-internal-number-control> <foxy-internal-number-control property="items.${0}.height" layout="summary-item" suffix="${0}" infer="height" min="0"> </foxy-internal-number-control> `),h,f(null==d?void 0:d.default_length_unit),h,f(null==d?void 0:d.default_length_unit),h,f(null==d?void 0:d.default_length_unit)),null==m?void 0:m.virtualHost,h,{".defaultWeightUnit":null==d?void 0:d.default_weight_unit,".existingOptions":null!==(s=null==g?void 0:g.custom_options)&&void 0!==s?s:[],".itemCategories":this.itemCategories,".currencyCode":this.currencyCode},(null!==(u=null===(l=null==m?void 0:m.form.items)||void 0===l?void 0:l.length)&&void 0!==u?u:0)<=1?r(A||(A=q``)):r(I||(I=q` <vaadin-button theme="error" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="delete" key="caption"></foxy-i18n> </vaadin-button> `),this.disabled,(()=>this.dispatchEvent(new CustomEvent("remove")))),f(null==g?void 0:g.item_category_uri),(()=>this.requestUpdate()))}get __resolvedItemCategory(){var e,t;return null!==(t=null===(e=this.__itemCategoryLoader)||void 0===e?void 0:e.data)&&void 0!==t?t:this.defaultItemCategory}get __itemCategoryLoader(){return this.renderRoot.querySelector("#itemCategoryLoader")}__handleDiscountBuilderChange(e,t,n){var r;const i=e.currentTarget,o=this.nucleon;t.discount_details=i.parsedValue.details,t.discount_type=i.parsedValue.type,t.discount_name=i.parsedValue.name;const a=null!==(r=null==o?void 0:o.form.items)&&void 0!==r?r:[];a.splice(n,1,t),null==o||o.edit({items:[...a]})}});const D=new WeakMap,H=i((e=>t=>{if(!(t instanceof o))throw new Error("unsafeHTML can only be used in text bindings");const n=D.get(t);if(void 0!==n&&a(e)&&e===n.value&&t.value===n.fragment)return;const r=document.createElement("template");r.innerHTML=e;const i=document.importNode(r.content,!0);t.setValue(i),D.set(t,{value:e,fragment:i})}));
2
2
  /**
3
3
  * @license
4
4
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -1 +1 @@
1
- import"./shared-a1f85307.js";import"./foxy-nucleon-element.js";import{_ as e}from"./shared-d1195c27.js";import{a as t}from"./shared-f61e5463.js";import{I as r}from"./shared-f438f0f4.js";import{i as s}from"./shared-53e42a77.js";import{c as a}from"./shared-4e709717.js";import{d as o}from"./shared-641786b2.js";import{h as i}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-893ead61.js";import"./shared-f2c4875b.js";import"./shared-dc6eb904.js";import"./shared-5a08dbb0.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-d1dfac4d.js";import"./shared-7e9fdf64.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";let d,n,u=e=>e;const f=t(r,"filter-attribute-card");class h extends f{constructor(){super(...arguments),this.getCountLoaderHref=null,this.__countLoaderId="countLoader",this.__refreshTimeout=null}static get properties(){return e(e({},super.properties),{},{countRefreshInterval:{attribute:"count-refresh-interval",type:Number},getCountLoaderHref:{attribute:!1}})}disconnectedCallback(){super.disconnectedCallback(),"number"==typeof this.__refreshTimeout&&clearTimeout(this.__refreshTimeout)}updated(e){if(super.updated(e),"number"!=typeof this.__refreshTimeout){const e=this.constructor.countRefreshInterval;this.__refreshTimeout=setTimeout((()=>{var e;return null===(e=this.__getCountLoader())||void 0===e?void 0:e.refresh()}),e)}}render(){var e,t;const r=this.constructor,f=null===(t=null===(e=this.__getCountLoader())||void 0===e?void 0:e.data)||void 0===t?void 0:t.total_items;let h;try{this.data&&this.getCountLoaderHref&&(h=new URL(this.getCountLoaderHref(o(this.data.value))),h.searchParams.set("limit","1"))}catch(e){h=void 0}return i(d||(d=u` <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <div class="${0}"> <span class="${0}"> ${0} </span> <span class="${0}"> ${0} </span> </div> `),s(null==h?void 0:h.toString()),this.__countLoaderId,(()=>this.requestUpdate()),a({"transition-colors flex gap-s font-medium text-m leading-xs rounded-s":!0,"bg-contrast-5":!this.in("fail")&&!this.data,"bg-error-10":this.in("fail")}),a({"transition-opacity truncate min-w-0":!0,"opacity-0":!this.data}),this.__getValueParam(r.filterNameKey)||i(n||(n=u`<foxy-i18n infer="" key="no_name"></foxy-i18n>`)),a({"transition-opacity bg-contrast-5 px-xs rounded-s":!0,"opacity-0":!this.data||"number"!=typeof f}),null!=f?f:0)}__getCountLoader(){return this.renderRoot.querySelector(`#${this.__countLoaderId}`)}__getValueParam(e){var t,r,s;try{return null!==(s=new URL(o(null!==(r=null===(t=this.data)||void 0===t?void 0:t.value)&&void 0!==r?r:""),"https://example.com").searchParams.get(e))&&void 0!==s?s:""}catch(e){return""}}}h.countRefreshInterval=6e5,h.filterQueryKey="filter_query",h.filterNameKey="filter_name",customElements.define("foxy-filter-attribute-card",h);export{h as FilterAttributeCard};
1
+ import"./shared-5a19b58c.js";import"./foxy-nucleon-element.js";import{_ as e}from"./shared-cb58dfcd.js";import{a as t}from"./shared-3e7f5663.js";import{I as r}from"./shared-2a305cf4.js";import{i as s}from"./shared-53e42a77.js";import{c as a}from"./shared-4e709717.js";import{d as o}from"./shared-eb963ba3.js";import{h as i}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-cfb804b4.js";import"./shared-5c747b54.js";import"./shared-65b74c44.js";import"./shared-94756d7c.js";import"./shared-343d1fd7.js";import"./shared-2aa23b5f.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";let n,d,u=e=>e;const c=t(r,"filter-attribute-card");class h extends c{constructor(){super(...arguments),this.getCountLoaderHref=null,this.__countLoaderId="countLoader",this.__refreshTimeout=null}static get properties(){return e(e({},super.properties),{},{countRefreshInterval:{attribute:"count-refresh-interval",type:Number},getCountLoaderHref:{attribute:!1}})}disconnectedCallback(){super.disconnectedCallback(),"number"==typeof this.__refreshTimeout&&clearTimeout(this.__refreshTimeout)}updated(e){if(super.updated(e),"number"!=typeof this.__refreshTimeout){const e=this.constructor.countRefreshInterval;this.__refreshTimeout=setTimeout((()=>{var e;return null===(e=this.__getCountLoader())||void 0===e?void 0:e.refresh()}),e)}}render(){var e,t;const r=this.constructor,c=null===(t=null===(e=this.__getCountLoader())||void 0===e?void 0:e.data)||void 0===t?void 0:t.total_items;let h;try{this.data&&this.getCountLoaderHref&&(h=new URL(this.getCountLoaderHref(o(this.data.value))),h.searchParams.set("limit","1"))}catch(e){h=void 0}return i(n||(n=u` <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <div class="${0}"> <span class="${0}"> ${0} </span> <span class="${0}"> ${0} </span> </div> `),s(null==h?void 0:h.toString()),this.__countLoaderId,(()=>this.requestUpdate()),a({"transition-colors flex gap-s font-medium text-m leading-xs rounded-s":!0,"bg-contrast-5":!this.in("fail")&&!this.data,"bg-error-10":this.in("fail")}),a({"transition-opacity truncate min-w-0":!0,"opacity-0":!this.data}),this.__getValueParam(r.filterNameKey)||i(d||(d=u`<foxy-i18n infer="" key="no_name"></foxy-i18n>`)),a({"transition-opacity bg-contrast-5 px-xs rounded-s":!0,"opacity-0":!this.data||"number"!=typeof c}),null!=c?c:0)}__getCountLoader(){return this.renderRoot.querySelector(`#${this.__countLoaderId}`)}__getValueParam(e){var t,r,s;try{return null!==(s=new URL(o(null!==(r=null===(t=this.data)||void 0===t?void 0:t.value)&&void 0!==r?r:""),"https://example.com").searchParams.get(e))&&void 0!==s?s:""}catch(e){return""}}}h.countRefreshInterval=6e5,h.filterQueryKey="filter_query",h.filterNameKey="filter_name",customElements.define("foxy-filter-attribute-card",h);export{h as FilterAttributeCard};
@@ -1 +1 @@
1
- import{b as e,I as t}from"./shared-6960ab99.js";import"./shared-25a19cbe.js";import"./shared-5a08dbb0.js";import{h as r}from"./shared-ba5c42c7.js";import"./shared-569db166.js";import"./shared-d199f862.js";import{_ as s,B as i}from"./shared-d1195c27.js";import{a}from"./shared-f61e5463.js";import{d as o,e as n}from"./shared-641786b2.js";import"./shared-1aff7995.js";import"./shared-019348d7.js";import"./shared-5212ef4f.js";import"./shared-eeb2bd18.js";import"./shared-53e42a77.js";import"./shared-17a61265.js";import"./shared-d1dfac4d.js";import"./shared-7e9fdf64.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-fcdb896f.js";import"./shared-9f07fab6.js";import"./shared-2550f6d9.js";import"./shared-4e709717.js";import"./foxy-copy-to-clipboard.js";import"./shared-57c3f0e4.js";import"./shared-f2c4875b.js";import"./shared-efecf1ca.js";import"./shared-8e36bcc1.js";import"./shared-893ead61.js";import"./shared-674ba44d.js";import"./shared-dc6eb904.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";import"./shared-a2693527.js";import"./shared-59e22bc6.js";import"./shared-d54b3216.js";import"./shared-13d65f57.js";import"./shared-d0aed1c1.js";import"./shared-8874ec69.js";import"./shared-63c32024.js";import"./shared-79d0699c.js";import"./shared-5fd5805c.js";let d,l,m=e=>e;customElements.define("foxy-internal-filter-attribute-form-action-control",class extends e{renderControl(){const e=this.nucleon,t=null==e?void 0:e.in({idle:{snapshot:"dirty"}}),s=!!(null==e?void 0:e.data);return r(d||(d=m` <div class="grid grid-cols-2 gap-m"> ${0} <vaadin-button theme="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="${0}"> </foxy-i18n> </vaadin-button> </div> `),s&&t?r(l||(l=m` <vaadin-button theme="contrast" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="reset"></foxy-i18n> </vaadin-button> `),this.disabled,(()=>null==e?void 0:e.undo())):"",s?t?"secondary":"error":"success",s&&t?"":"col-span-2",this.disabled,(()=>!s||t?null==e?void 0:e.submit():null==e?void 0:e.delete()),s?t?"update":"delete":"create")}});let h,u=e=>e;const c=a(t,"filter-attribute-form");class f extends c{constructor(){super(...arguments),this.pathname=null,this.options=[],this.__filterNameGetValue=()=>{const e=this.constructor;return this.__getValueParam(e.filterNameKey)},this.__filterNameSetValue=e=>{const t=this.constructor;this.__setValueParam(t.filterNameKey,e)}}static get properties(){return s(s({},super.properties),{},{pathname:{},options:{type:Array}})}get hiddenSelector(){const e=[],t=this.constructor,r=this.__getValueParam(t.filterQueryKey),s=!!this.data;return s||e.push("filter-name"),r||s||e.push("action"),new i(`${e.join(" ")} ${super.hiddenSelector}`.trim())}renderBody(){const e=this.constructor;return r(h||(h=u` <foxy-query-builder infer="filter-query" .options="${0}" .value="${0}" @change="${0}"> </foxy-query-builder> <foxy-internal-text-control infer="filter-name" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> <foxy-internal-filter-attribute-form-action-control infer="action"> </foxy-internal-filter-attribute-form-action-control> `),this.options,this.__getValueParam(e.filterQueryKey),this.__handleFilterQueryChange,this.__filterNameGetValue,this.__filterNameSetValue)}updated(e){var t;if(super.updated(e),"string"==typeof this.form.value){const e=new URL(o(this.form.value),"https://example.com");e.pathname=null!==(t=this.pathname)&&void 0!==t?t:"";const r=n(e.toString().substring(e.origin.length));r!==this.form.value&&this.edit({value:r})}}submit(){const e=this.constructor;this.edit({visibility:e.attributeVisibility,name:e.attributeName}),super.submit()}__getValueParam(e){var t,r;try{return null!==(r=new URL(o(null!==(t=this.form.value)&&void 0!==t?t:""),"https://example.com").searchParams.get(e))&&void 0!==r?r:""}catch(e){return""}}__setValueParam(e,t){var r;try{const s=new URL(o(null!==(r=this.form.value)&&void 0!==r?r:""),"https://example.com");s.searchParams.set(e,t),this.edit({value:n(s.toString().substring(s.origin.length))})}catch(e){}}__handleFilterQueryChange(e){var t;const r=this.constructor,s=e.currentTarget;this.__setValueParam(r.filterQueryKey,null!==(t=s.value)&&void 0!==t?t:"")}}f.attributeVisibility="restricted",f.filterQueryKey="filter_query",f.attributeName="foxy-admin-bookmark",f.filterNameKey="filter_name",customElements.define("foxy-filter-attribute-form",f);export{f as FilterAttributeForm};
1
+ import{b as e,I as t}from"./shared-377dea9e.js";import"./shared-3f0b1660.js";import"./shared-94756d7c.js";import{h as r}from"./shared-ba5c42c7.js";import"./shared-d40308b2.js";import"./shared-2b7e9979.js";import{_ as s,B as i}from"./shared-cb58dfcd.js";import{a}from"./shared-3e7f5663.js";import{d as o,e as n}from"./shared-eb963ba3.js";import"./shared-0aedd809.js";import"./shared-7594e563.js";import"./shared-5212ef4f.js";import"./shared-5afb584d.js";import"./shared-53e42a77.js";import"./shared-2aa23b5f.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-5ef40e86.js";import"./shared-5b1511bc.js";import"./shared-ad888fc4.js";import"./shared-4e709717.js";import"./foxy-copy-to-clipboard.js";import"./shared-ba38add2.js";import"./shared-5c747b54.js";import"./shared-8219cdf0.js";import"./shared-8154088a.js";import"./shared-cfb804b4.js";import"./shared-7303e512.js";import"./shared-65b74c44.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";import"./shared-2fe8f409.js";import"./shared-f69bc3a6.js";import"./shared-740e3ab9.js";import"./shared-cbe634e6.js";import"./shared-d0aed1c1.js";import"./shared-8874ec69.js";import"./shared-63c32024.js";import"./shared-79d0699c.js";import"./shared-5fd5805c.js";let d,l,m=e=>e;customElements.define("foxy-internal-filter-attribute-form-action-control",class extends e{renderControl(){const e=this.nucleon,t=null==e?void 0:e.in({idle:{snapshot:"dirty"}}),s=!!(null==e?void 0:e.data);return r(d||(d=m` <div class="grid grid-cols-2 gap-m"> ${0} <vaadin-button theme="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="${0}"> </foxy-i18n> </vaadin-button> </div> `),s&&t?r(l||(l=m` <vaadin-button theme="contrast" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="reset"></foxy-i18n> </vaadin-button> `),this.disabled,(()=>null==e?void 0:e.undo())):"",s?t?"secondary":"error":"success",s&&t?"":"col-span-2",this.disabled,(()=>!s||t?null==e?void 0:e.submit():null==e?void 0:e.delete()),s?t?"update":"delete":"create")}});let h,u=e=>e;const c=a(t,"filter-attribute-form");class f extends c{constructor(){super(...arguments),this.pathname=null,this.options=[],this.__filterNameGetValue=()=>{const e=this.constructor;return this.__getValueParam(e.filterNameKey)},this.__filterNameSetValue=e=>{const t=this.constructor;this.__setValueParam(t.filterNameKey,e)}}static get properties(){return s(s({},super.properties),{},{pathname:{},options:{type:Array}})}get hiddenSelector(){const e=[],t=this.constructor,r=this.__getValueParam(t.filterQueryKey),s=!!this.data;return s||e.push("filter-name"),r||s||e.push("action"),new i(`${e.join(" ")} ${super.hiddenSelector}`.trim())}renderBody(){const e=this.constructor;return r(h||(h=u` <foxy-query-builder infer="filter-query" .options="${0}" .value="${0}" @change="${0}"> </foxy-query-builder> <foxy-internal-text-control infer="filter-name" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> <foxy-internal-filter-attribute-form-action-control infer="action"> </foxy-internal-filter-attribute-form-action-control> `),this.options,this.__getValueParam(e.filterQueryKey),this.__handleFilterQueryChange,this.__filterNameGetValue,this.__filterNameSetValue)}updated(e){var t;if(super.updated(e),"string"==typeof this.form.value){const e=new URL(o(this.form.value),"https://example.com");e.pathname=null!==(t=this.pathname)&&void 0!==t?t:"";const r=n(e.toString().substring(e.origin.length));r!==this.form.value&&this.edit({value:r})}}submit(){const e=this.constructor;this.edit({visibility:e.attributeVisibility,name:e.attributeName}),super.submit()}__getValueParam(e){var t,r;try{return null!==(r=new URL(o(null!==(t=this.form.value)&&void 0!==t?t:""),"https://example.com").searchParams.get(e))&&void 0!==r?r:""}catch(e){return""}}__setValueParam(e,t){var r;try{const s=new URL(o(null!==(r=this.form.value)&&void 0!==r?r:""),"https://example.com");s.searchParams.set(e,t),this.edit({value:n(s.toString().substring(s.origin.length))})}catch(e){}}__handleFilterQueryChange(e){var t;const r=this.constructor,s=e.currentTarget;this.__setValueParam(r.filterQueryKey,null!==(t=s.value)&&void 0!==t?t:"")}}f.attributeVisibility="restricted",f.filterQueryKey="filter_query",f.attributeName="foxy-admin-bookmark",f.filterNameKey="filter_name",customElements.define("foxy-filter-attribute-form",f);export{f as FilterAttributeForm};
@@ -1 +1 @@
1
- import"./shared-5a08dbb0.js";import"./shared-9f07fab6.js";import{_ as e,B as t}from"./shared-d1195c27.js";import{h as r}from"./shared-ba5c42c7.js";import{A as o}from"./shared-7e9fdf64.js";import{D as s}from"./shared-2550f6d9.js";import{F as n}from"./shared-343d1fd7.js";import{U as i}from"./shared-cd96ff03.js";import{s as a}from"./shared-53e476fd.js";import"./shared-f61e5463.js";import"./shared-17a61265.js";import"./shared-25a19cbe.js";import"./shared-8e36bcc1.js";import"./shared-f2c4875b.js";import"./shared-efecf1ca.js";import"./shared-eeb2bd18.js";import"./shared-53e42a77.js";import"./shared-4e709717.js";let d,p,l=e=>e;class h extends s{constructor(){super(...arguments),this.closeOnPatch=!1,this.keepOpenOnDelete=!1,this.keepOpenOnPost=!1,this.related=[],this.parent="",this.props={},this.group="",this.href="",this.__form=null,this.__renderForm=null,this.__handleFetch=e=>{e instanceof n&&(e.stopImmediatePropagation(),e.preventDefault(),e.respondWith(new o(this).fetch(e.request)))},this.__handleUpdate=e=>{var t;if(!(e instanceof i))return;const r=null===(t=e.detail)||void 0===t?void 0:t.result,o=i.UpdateResult,s=e.currentTarget;(!this.keepOpenOnDelete&&r===o.ResourceDeleted||!this.keepOpenOnPost&&r===o.ResourceCreated||this.closeOnPatch&&r===o.ResourceUpdated&&0===s.errors.length)&&(this.open=!1),this.parent!==s.parent&&(this.parent=s.parent),this.href!==s.href&&(this.href=s.href),this.closable=!s.in("busy"),this.editable=s.in({idle:{template:{dirty:"valid"}}})||s.in({idle:{snapshot:{dirty:"valid"}}})}}static get properties(){return e(e({},super.properties),{},{href:{type:String},form:{type:String,noAccessor:!0},group:{type:String},props:{type:Object},parent:{type:String},related:{type:Array},closeOnPatch:{type:Boolean,attribute:"close-on-patch"},keepOpenOnPost:{type:Boolean,attribute:"keep-open-on-post"},keepOpenOnDelete:{type:Boolean,attribute:"keep-open-on-delete"}})}get hiddenSelector(){return new t(`submit undo ${super.hiddenSelector}`.trim())}get form(){return this.__form}set form(e){this.__form=e,this.__renderForm="string"==typeof e?new Function("options",`return options.html\`\n <${e}\n id="form"\n ns="\${options.dialog.ns} \${customElements.get('${e}')?.defaultNS ?? ''}"\n href=\${options.dialog.href}\n lang=\${options.dialog.lang}\n group=\${options.dialog.group}\n parent=\${options.dialog.parent}\n disabledcontrols=\${options.dialog.disabledSelector.toString()}\n readonlycontrols=\${options.dialog.readonlySelector.toString()}\n hiddencontrols=\${options.dialog.hiddenSelector.toString()}\n ?disabled=\${options.dialog.disabled}\n ?readonly=\${options.dialog.readonly}\n ?hidden=\${options.dialog.hidden}\n .templates=\${options.dialog.templates}\n .related=\${options.dialog.related}\n ...=\${options.spread(options.dialog.props)}\n @fetch=\${options.handleFetch}\n @update=\${options.handleUpdate}\n >\n </${e}>\``):e,this.requestUpdate()}render(){return r(d||(d=l` <foxy-internal-confirm-dialog message="undo_message" confirm="undo_confirm" cancel="undo_cancel" header="undo_header" theme="error" lang="${0}" ns="${0}" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> ${0} `),this.lang,this.ns,(e=>!e.detail.cancelled&&super.hide(!0)),super.render((()=>{var e;return r(p||(p=l`${0}`),null===(e=this.__renderForm)||void 0===e?void 0:e.call(this,{handleUpdate:this.__handleUpdate,handleFetch:this.__handleFetch,spread:a,dialog:this,html:r}))})))}async hide(e=!1){if(!e||!this.editable)return super.hide(e);this.renderRoot.querySelector("#confirm").show()}async save(){this.renderRoot.querySelector("#form").submit()}}customElements.define("foxy-form-dialog",h);export{h as FormDialog};
1
+ import"./shared-94756d7c.js";import"./shared-5b1511bc.js";import{_ as e,B as t}from"./shared-cb58dfcd.js";import{h as r}from"./shared-ba5c42c7.js";import{A as o}from"./shared-5592ec6e.js";import{D as s}from"./shared-ad888fc4.js";import{F as n}from"./shared-343d1fd7.js";import{U as i}from"./shared-cd96ff03.js";import{s as a}from"./shared-53e476fd.js";import"./shared-3e7f5663.js";import"./shared-2aa23b5f.js";import"./shared-3f0b1660.js";import"./shared-8154088a.js";import"./shared-5c747b54.js";import"./shared-8219cdf0.js";import"./shared-5afb584d.js";import"./shared-53e42a77.js";import"./shared-4e709717.js";let d,p,l=e=>e;class h extends s{constructor(){super(...arguments),this.closeOnPatch=!1,this.keepOpenOnDelete=!1,this.keepOpenOnPost=!1,this.related=[],this.parent="",this.props={},this.group="",this.href="",this.__form=null,this.__renderForm=null,this.__handleFetch=e=>{e instanceof n&&(e.stopImmediatePropagation(),e.preventDefault(),e.respondWith(new o(this).fetch(e.request)))},this.__handleUpdate=e=>{var t;if(!(e instanceof i))return;const r=null===(t=e.detail)||void 0===t?void 0:t.result,o=i.UpdateResult,s=e.currentTarget;(!this.keepOpenOnDelete&&r===o.ResourceDeleted||!this.keepOpenOnPost&&r===o.ResourceCreated||this.closeOnPatch&&r===o.ResourceUpdated&&0===s.errors.length)&&(this.open=!1),this.parent!==s.parent&&(this.parent=s.parent),this.href!==s.href&&(this.href=s.href),this.closable=!s.in("busy"),this.editable=s.in({idle:{template:{dirty:"valid"}}})||s.in({idle:{snapshot:{dirty:"valid"}}})}}static get properties(){return e(e({},super.properties),{},{href:{type:String},form:{type:String,noAccessor:!0},group:{type:String},props:{type:Object},parent:{type:String},related:{type:Array},closeOnPatch:{type:Boolean,attribute:"close-on-patch"},keepOpenOnPost:{type:Boolean,attribute:"keep-open-on-post"},keepOpenOnDelete:{type:Boolean,attribute:"keep-open-on-delete"}})}get hiddenSelector(){return new t(`submit undo ${super.hiddenSelector}`.trim())}get form(){return this.__form}set form(e){this.__form=e,this.__renderForm="string"==typeof e?new Function("options",`return options.html\`\n <${e}\n id="form"\n ns="\${options.dialog.ns} \${customElements.get('${e}')?.defaultNS ?? ''}"\n href=\${options.dialog.href}\n lang=\${options.dialog.lang}\n group=\${options.dialog.group}\n parent=\${options.dialog.parent}\n disabledcontrols=\${options.dialog.disabledSelector.toString()}\n readonlycontrols=\${options.dialog.readonlySelector.toString()}\n hiddencontrols=\${options.dialog.hiddenSelector.toString()}\n ?disabled=\${options.dialog.disabled}\n ?readonly=\${options.dialog.readonly}\n ?hidden=\${options.dialog.hidden}\n .templates=\${options.dialog.templates}\n .related=\${options.dialog.related}\n ...=\${options.spread(options.dialog.props)}\n @fetch=\${options.handleFetch}\n @update=\${options.handleUpdate}\n >\n </${e}>\``):e,this.requestUpdate()}render(){return r(d||(d=l` <foxy-internal-confirm-dialog message="undo_message" confirm="undo_confirm" cancel="undo_cancel" header="undo_header" theme="error" lang="${0}" ns="${0}" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> ${0} `),this.lang,this.ns,(e=>!e.detail.cancelled&&super.hide(!0)),super.render((()=>{var e;return r(p||(p=l`${0}`),null===(e=this.__renderForm)||void 0===e?void 0:e.call(this,{handleUpdate:this.__handleUpdate,handleFetch:this.__handleFetch,spread:a,dialog:this,html:r}))})))}async hide(e=!1){if(!e||!this.editable)return super.hide(e);this.renderRoot.querySelector("#confirm").show()}async save(){this.renderRoot.querySelector("#form").submit()}}customElements.define("foxy-form-dialog",h);export{h as FormDialog};
@@ -1 +1 @@
1
- import"./shared-299543b6.js";import"./shared-a2693527.js";import"./shared-aab278b5.js";import{a as e,I as r}from"./shared-6960ab99.js";import{_ as s,B as t}from"./shared-d1195c27.js";import{i}from"./shared-53e42a77.js";import{h as o}from"./shared-ba5c42c7.js";import"./shared-7c863df2.js";import"./shared-12a553c2.js";import"./shared-569db166.js";import{a}from"./shared-f61e5463.js";import"./shared-d54b3216.js";import"./shared-f2c4875b.js";import"./shared-8e36bcc1.js";import"./shared-13d65f57.js";import"./shared-59e22bc6.js";import"./shared-25a19cbe.js";import"./shared-efecf1ca.js";import"./shared-1aff7995.js";import"./shared-019348d7.js";import"./shared-5a08dbb0.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-5212ef4f.js";import"./shared-eeb2bd18.js";import"./shared-d1dfac4d.js";import"./shared-7e9fdf64.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-fcdb896f.js";import"./shared-9f07fab6.js";import"./shared-2550f6d9.js";import"./shared-4e709717.js";import"./foxy-copy-to-clipboard.js";import"./shared-57c3f0e4.js";import"./shared-893ead61.js";import"./shared-674ba44d.js";import"./shared-dc6eb904.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";import"./shared-5fd5805c.js";import"./shared-d0aed1c1.js";let n,d,l,h=e=>e;customElements.define("foxy-internal-integer-control",class extends e{constructor(){super(...arguments),this.showControls=!1,this.prefix=null,this.suffix=null,this.min=null,this.max=null}static get properties(){return s(s({},super.properties),{},{showControls:{type:Boolean,attribute:"show-controls"},prefix:{},suffix:{},min:{type:Number},max:{type:Number}})}renderControl(){var e,r;return o(n||(n=h` <vaadin-integer-field error-message="${0}" placeholder="${0}" helper-text="${0}" label="${0}" class="w-full" min="${0}" max="${0}" ?has-controls="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" clear-button-visible @keydown="${0}" @change="${0}"> ${0} ${0} </vaadin-integer-field> `),i(this._errorMessage),this.placeholder,this.helperText,this.label,i(null!==(e=this.min)&&void 0!==e?e:void 0),i(null!==(r=this.max)&&void 0!==r?r:void 0),this.showControls,this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var r;return"Enter"===e.key&&(null===(r=this.nucleon)||void 0===r?void 0:r.submit())}),(e=>{const r=e.currentTarget;this._value=parseInt(r.value)}),this.prefix?o(d||(d=h`<div slot="prefix">${0}</div>`),this.prefix):"",this.suffix?o(l||(l=h`<div class="pr-s font-medium" slot="suffix">${0}</div>`),this.suffix):"")}});let m,c=e=>e;const f=a(r,"generate-codes-form");class p extends f{constructor(){super(...arguments),this.__exampleGetValue=()=>{var e,r;const s=null!==(e=this.form.prefix)&&void 0!==e?e:"",t=(null!==(r=this.form.length)&&void 0!==r?r:6)-s.length;if(t>0)return["1V3BJ3USJKSS1BYANMNBT7AJ06R6QQ8RB0VPPL03ATQVY186X2","P4YNSW7NSSAY43PL4H7BKHDUVNAE9UR13FC0XAAJHDLZWW8AJC","7DGT4Q91FV4KK095WLX1ML1HFNU6ZCGVBVPMGR7D3P52A9UFTB"].map((e=>`${s}${e.slice(0,t)}`)).join("\n")}}static get v8n(){return[({prefix:e="",length:r=6})=>r-e.length>0&&r<=50&&!(null==e?void 0:e.includes(" "))||"error:invalid_form"]}get readonlySelector(){const e=["example",super.readonlySelector.toString()];return this.href&&e.push("length number-of-codes current-balance prefix"),new t(e.join(" ").trim())}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return e.unshift("delete timestamps"),this.href&&e.push("example"),this.errors.includes("error:invalid_form")&&e.push("example"),new t(e.join(" ").trim())}renderBody(){return o(m||(m=c` <foxy-internal-text-control infer="prefix"></foxy-internal-text-control> <div class="grid grid-cols-2 gap-m"> <foxy-internal-integer-control infer="length" min="1"></foxy-internal-integer-control> <foxy-internal-integer-control infer="number-of-codes" min="1"> </foxy-internal-integer-control> </div> <foxy-internal-number-control infer="current-balance" min="0"></foxy-internal-number-control> <foxy-internal-source-control infer="example" .getValue="${0}"> </foxy-internal-source-control> ${0} `),this.__exampleGetValue,super.renderBody())}async _sendPost(e){const r=JSON.stringify(e),s=await this._fetch(this.parent,{body:r,method:"POST"});return this.status={key:"success"},s}}customElements.define("foxy-generate-codes-form",p);export{p as GenerateCodesForm};
1
+ import"./shared-b7775f62.js";import"./shared-2fe8f409.js";import"./shared-730dd58a.js";import{a as e,I as r}from"./shared-377dea9e.js";import{_ as s,B as t}from"./shared-cb58dfcd.js";import{i}from"./shared-53e42a77.js";import{h as o}from"./shared-ba5c42c7.js";import"./shared-75cf59dc.js";import"./shared-196b992c.js";import"./shared-d40308b2.js";import{a as n}from"./shared-3e7f5663.js";import"./shared-740e3ab9.js";import"./shared-5c747b54.js";import"./shared-8154088a.js";import"./shared-cbe634e6.js";import"./shared-f69bc3a6.js";import"./shared-3f0b1660.js";import"./shared-8219cdf0.js";import"./shared-0aedd809.js";import"./shared-7594e563.js";import"./shared-94756d7c.js";import"./shared-343d1fd7.js";import"./shared-2aa23b5f.js";import"./shared-5212ef4f.js";import"./shared-5afb584d.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-5ef40e86.js";import"./shared-5b1511bc.js";import"./shared-ad888fc4.js";import"./shared-4e709717.js";import"./foxy-copy-to-clipboard.js";import"./shared-ba38add2.js";import"./shared-cfb804b4.js";import"./shared-7303e512.js";import"./shared-65b74c44.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";import"./shared-5fd5805c.js";import"./shared-d0aed1c1.js";let a,d,l,h=e=>e;customElements.define("foxy-internal-integer-control",class extends e{constructor(){super(...arguments),this.showControls=!1,this.prefix=null,this.suffix=null,this.min=null,this.max=null}static get properties(){return s(s({},super.properties),{},{showControls:{type:Boolean,attribute:"show-controls"},prefix:{},suffix:{},min:{type:Number},max:{type:Number}})}renderControl(){var e,r;return o(a||(a=h` <vaadin-integer-field error-message="${0}" placeholder="${0}" helper-text="${0}" label="${0}" class="w-full" min="${0}" max="${0}" ?has-controls="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" clear-button-visible @keydown="${0}" @change="${0}"> ${0} ${0} </vaadin-integer-field> `),i(this._errorMessage),this.placeholder,this.helperText,this.label,i(null!==(e=this.min)&&void 0!==e?e:void 0),i(null!==(r=this.max)&&void 0!==r?r:void 0),this.showControls,this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var r;return"Enter"===e.key&&(null===(r=this.nucleon)||void 0===r?void 0:r.submit())}),(e=>{const r=e.currentTarget;this._value=parseInt(r.value)}),this.prefix?o(d||(d=h`<div slot="prefix">${0}</div>`),this.prefix):"",this.suffix?o(l||(l=h`<div class="pr-s font-medium" slot="suffix">${0}</div>`),this.suffix):"")}});let m,c=e=>e;const p=n(r,"generate-codes-form");class f extends p{constructor(){super(...arguments),this.__exampleGetValue=()=>{var e,r;const s=null!==(e=this.form.prefix)&&void 0!==e?e:"",t=(null!==(r=this.form.length)&&void 0!==r?r:6)-s.length;if(t>0)return["1V3BJ3USJKSS1BYANMNBT7AJ06R6QQ8RB0VPPL03ATQVY186X2","P4YNSW7NSSAY43PL4H7BKHDUVNAE9UR13FC0XAAJHDLZWW8AJC","7DGT4Q91FV4KK095WLX1ML1HFNU6ZCGVBVPMGR7D3P52A9UFTB"].map((e=>`${s}${e.slice(0,t)}`)).join("\n")}}static get v8n(){return[({prefix:e="",length:r=6})=>r-e.length>0&&r<=50&&!(null==e?void 0:e.includes(" "))||"error:invalid_form"]}get readonlySelector(){const e=["example",super.readonlySelector.toString()];return this.href&&e.push("length number-of-codes current-balance prefix"),new t(e.join(" ").trim())}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return e.unshift("delete timestamps"),this.href&&e.push("example"),this.errors.includes("error:invalid_form")&&e.push("example"),new t(e.join(" ").trim())}renderBody(){return o(m||(m=c` <foxy-internal-text-control infer="prefix"></foxy-internal-text-control> <div class="grid grid-cols-2 gap-m"> <foxy-internal-integer-control infer="length" min="1"></foxy-internal-integer-control> <foxy-internal-integer-control infer="number-of-codes" min="1"> </foxy-internal-integer-control> </div> <foxy-internal-number-control infer="current-balance" min="0"></foxy-internal-number-control> <foxy-internal-source-control infer="example" .getValue="${0}"> </foxy-internal-source-control> ${0} `),this.__exampleGetValue,super.renderBody())}async _sendPost(e){const r=JSON.stringify(e),s=await this._fetch(this.parent,{body:r,method:"POST"});return this.status={key:"success"},s}}customElements.define("foxy-generate-codes-form",f);export{f as GenerateCodesForm};
@@ -1 +1 @@
1
- import"./shared-5212ef4f.js";import"./foxy-spinner.js";import"./shared-5a08dbb0.js";import{h as t}from"./shared-ba5c42c7.js";import{C as e}from"./shared-eeb2bd18.js";import{N as s}from"./shared-d1dfac4d.js";import{T as i,a as r}from"./shared-f61e5463.js";import{c as a}from"./shared-4e709717.js";import"./shared-893ead61.js";import"./shared-f2c4875b.js";import"./shared-dc6eb904.js";import"./shared-d1195c27.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-53e42a77.js";import"./shared-7e9fdf64.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";let d,o,n,l,c,p=t=>t;const h=i(e(r(s,"gift-card-card")));class f extends h{render(){var e,s;const i=this.hiddenSelector;return t(d||(d=p` <div aria-busy="${0}" aria-live="polite" class="relative leading-s font-lumo text-m"> <div class="${0}"> ${0} ${0} </div> <div class="${0}"> <foxy-spinner data-testid="spinner" state="${0}" class="m-auto" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.in("busy"),a({"transition-opacity":!0,"opacity-0":!this.data}),i.matches("title",!0)?"":this.__renderTitle(),i.matches("status",!0)?"":this.__renderStatus(),a({"pointer-events-none absolute inset-0 flex transition-opacity":!0,"opacity-0":!!this.data}),this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy",this.lang,this.ns,null!==(s=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==s?s:"")}__renderTitle(){var e,s,i,r;const a=null!==(s=null===(e=this.data)||void 0===e?void 0:e.name)&&void 0!==s?s:t(o||(o=p`&ZeroWidthSpace;`)),d=null!==(r=null===(i=this.data)||void 0===i?void 0:i.currency_code)&&void 0!==r?r:t(n||(n=p`&ZeroWidthSpace;`));return t(l||(l=p` <div data-testid="title"> ${0} <div class="flex items-center justify-between"> <div class="font-medium truncate">${0}</div> <div class="text-tertiary uppercase text-s flex-shrink-0">${0}</div> </div> ${0} </div> `),this.renderTemplateOrSlot("title:before"),a,d,this.renderTemplateOrSlot("title:after"))}__renderStatus(){var e;const s=null===(e=this.data)||void 0===e?void 0:e.expires_after;return t(c||(c=p` <div data-testid="status"> ${0} <foxy-i18n options="${0}" class="block truncate text-s text-secondary" lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("status:before"),JSON.stringify({value:s}),this.lang,s?"expires_after_value":"never_expires",this.ns,this.renderTemplateOrSlot("status:after"))}}customElements.define("foxy-gift-card-card",f);export{f as GiftCardCard};
1
+ import"./shared-5212ef4f.js";import"./foxy-spinner.js";import"./shared-94756d7c.js";import{h as e}from"./shared-ba5c42c7.js";import{C as t}from"./shared-5afb584d.js";import{N as s}from"./shared-f83207fb.js";import{T as i,a as r}from"./shared-3e7f5663.js";import{c as a}from"./shared-4e709717.js";import"./shared-cfb804b4.js";import"./shared-5c747b54.js";import"./shared-65b74c44.js";import"./shared-cb58dfcd.js";import"./shared-2aa23b5f.js";import"./shared-343d1fd7.js";import"./shared-53e42a77.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";let d,o,n,l,c,p=e=>e;const h=i(t(r(s,"gift-card-card")));class m extends h{render(){var t,s;const i=this.hiddenSelector;return e(d||(d=p` <div aria-busy="${0}" aria-live="polite" class="relative leading-s font-lumo text-m"> <div class="${0}"> ${0} ${0} </div> <div class="${0}"> <foxy-spinner data-testid="spinner" state="${0}" class="m-auto" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.in("busy"),a({"transition-opacity":!0,"opacity-0":!this.data}),i.matches("title",!0)?"":this.__renderTitle(),i.matches("status",!0)?"":this.__renderStatus(),a({"pointer-events-none absolute inset-0 flex transition-opacity":!0,"opacity-0":!!this.data}),this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy",this.lang,this.ns,null!==(s=null===(t=customElements.get("foxy-spinner"))||void 0===t?void 0:t.defaultNS)&&void 0!==s?s:"")}__renderTitle(){var t,s,i,r;const a=null!==(s=null===(t=this.data)||void 0===t?void 0:t.name)&&void 0!==s?s:e(o||(o=p`&ZeroWidthSpace;`)),d=null!==(r=null===(i=this.data)||void 0===i?void 0:i.currency_code)&&void 0!==r?r:e(n||(n=p`&ZeroWidthSpace;`));return e(l||(l=p` <div data-testid="title"> ${0} <div class="flex items-center justify-between"> <div class="font-medium truncate">${0}</div> <div class="text-tertiary uppercase text-s flex-shrink-0">${0}</div> </div> ${0} </div> `),this.renderTemplateOrSlot("title:before"),a,d,this.renderTemplateOrSlot("title:after"))}__renderStatus(){var t;const s=null===(t=this.data)||void 0===t?void 0:t.expires_after;return e(c||(c=p` <div data-testid="status"> ${0} <foxy-i18n options="${0}" class="block truncate text-s text-secondary" lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("status:before"),JSON.stringify({value:s}),this.lang,s?"expires_after_value":"never_expires",this.ns,this.renderTemplateOrSlot("status:after"))}}customElements.define("foxy-gift-card-card",m);export{m as GiftCardCard};
@@ -1 +1 @@
1
- import"./shared-a1f85307.js";import"./foxy-nucleon-element.js";import"./shared-5a08dbb0.js";import{a as e}from"./shared-f61e5463.js";import{I as r}from"./shared-f438f0f4.js";import{i as t}from"./shared-53e42a77.js";import{h as s}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-893ead61.js";import"./shared-f2c4875b.js";import"./shared-dc6eb904.js";import"./shared-d1195c27.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-d1dfac4d.js";import"./shared-7e9fdf64.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4e709717.js";let o,d=e=>e;const a=e(r,"gift-card-code-card");class i extends a{constructor(){super(...arguments),this.__giftCardLoaderId="giftCardLoader",this.__storeLoaderId="storeLoader"}get isBodyReady(){var e,r;return super.isBodyReady&&!!(null===(e=this.__giftCardLoader)||void 0===e?void 0:e.data)&&!!(null===(r=this.__storeLoader)||void 0===r?void 0:r.data)}renderBody(){var e,r,a,i,n;const f=null===(e=this.__giftCardLoader)||void 0===e?void 0:e.data,c=null===(r=this.__storeLoader)||void 0===r?void 0:r.data;return s(o||(o=d` <section class="h-s flex flex-col justify-center leading-xs"> <p class="flex items-center justify-between min-w-0"> <foxy-i18n infer="" class="block truncate text-m font-medium" key="line_1" .options="${0}"> </foxy-i18n> <foxy-i18n infer="" class="text-s text-tertiary" key="current_balance" .options="${0}"> </foxy-i18n> </p> <p class="text-s text-secondary min-w-0"> <foxy-i18n infer="" class="block truncate" key="line_2" .options="${0}"> </foxy-i18n> </p> </section> <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.data,{currencyDisplay:(null==c?void 0:c.use_international_currency_symbol)?"code":"symbol",value:`${null===(a=this.data)||void 0===a?void 0:a.current_balance} ${null==f?void 0:f.currency_code}`},this.data,t(null===(i=this.data)||void 0===i?void 0:i._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()),t(null===(n=this.data)||void 0===n?void 0:n._links["fx:gift_card"].href),this.__giftCardLoaderId,(()=>this.requestUpdate()))}get __giftCardLoader(){return this.renderRoot.querySelector(`#${this.__giftCardLoaderId}`)}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}}customElements.define("foxy-gift-card-code-card",i);export{i as GiftCardCodeCard};
1
+ import"./shared-5a19b58c.js";import"./foxy-nucleon-element.js";import"./shared-94756d7c.js";import{a as e}from"./shared-3e7f5663.js";import{I as r}from"./shared-2a305cf4.js";import{i as t}from"./shared-53e42a77.js";import{h as s}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-cfb804b4.js";import"./shared-5c747b54.js";import"./shared-65b74c44.js";import"./shared-cb58dfcd.js";import"./shared-2aa23b5f.js";import"./shared-343d1fd7.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-4e709717.js";let o,d=e=>e;const a=e(r,"gift-card-code-card");class i extends a{constructor(){super(...arguments),this.__giftCardLoaderId="giftCardLoader",this.__storeLoaderId="storeLoader"}get isBodyReady(){var e,r;return super.isBodyReady&&!!(null===(e=this.__giftCardLoader)||void 0===e?void 0:e.data)&&!!(null===(r=this.__storeLoader)||void 0===r?void 0:r.data)}renderBody(){var e,r,a,i,n;const c=null===(e=this.__giftCardLoader)||void 0===e?void 0:e.data,f=null===(r=this.__storeLoader)||void 0===r?void 0:r.data;return s(o||(o=d` <section class="h-s flex flex-col justify-center leading-xs"> <p class="flex items-center justify-between min-w-0"> <foxy-i18n infer="" class="block truncate text-m font-medium" key="line_1" .options="${0}"> </foxy-i18n> <foxy-i18n infer="" class="text-s text-tertiary" key="current_balance" .options="${0}"> </foxy-i18n> </p> <p class="text-s text-secondary min-w-0"> <foxy-i18n infer="" class="block truncate" key="line_2" .options="${0}"> </foxy-i18n> </p> </section> <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.data,{currencyDisplay:(null==f?void 0:f.use_international_currency_symbol)?"code":"symbol",value:`${null===(a=this.data)||void 0===a?void 0:a.current_balance} ${null==c?void 0:c.currency_code}`},this.data,t(null===(i=this.data)||void 0===i?void 0:i._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()),t(null===(n=this.data)||void 0===n?void 0:n._links["fx:gift_card"].href),this.__giftCardLoaderId,(()=>this.requestUpdate()))}get __giftCardLoader(){return this.renderRoot.querySelector(`#${this.__giftCardLoaderId}`)}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}}customElements.define("foxy-gift-card-code-card",i);export{i as GiftCardCodeCard};
@@ -1 +1 @@
1
- import"./shared-812c706e.js";import"./shared-4bcfe691.js";import"./shared-a2a27012.js";import"./shared-7c863df2.js";import"./shared-e1a6c036.js";import"./shared-569db166.js";import{I as e}from"./shared-6960ab99.js";import"./foxy-gift-card-code-log-card.js";import"./foxy-nucleon-element.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import{_ as r,B as t}from"./shared-d1195c27.js";import{g as o}from"./shared-bab2ea2c.js";import{a as s}from"./shared-f61e5463.js";import{T as a}from"./shared-8874ec69.js";import{i}from"./shared-53e42a77.js";import{h as d}from"./shared-ba5c42c7.js";import"./shared-25a19cbe.js";import"./shared-8e36bcc1.js";import"./shared-f2c4875b.js";import"./shared-efecf1ca.js";import"./foxy-copy-to-clipboard.js";import"./shared-57c3f0e4.js";import"./shared-893ead61.js";import"./shared-674ba44d.js";import"./shared-dc6eb904.js";import"./shared-5a08dbb0.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-eeb2bd18.js";import"./foxy-form-dialog.js";import"./shared-9f07fab6.js";import"./shared-2550f6d9.js";import"./shared-7e9fdf64.js";import"./shared-4e709717.js";import"./shared-cd96ff03.js";import"./shared-53e476fd.js";import"./shared-d1dfac4d.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-6ef0392a.js";import"./shared-1ba78e12.js";import"./shared-e6cd721f.js";import"./shared-d8cab6ab.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-5fd5805c.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-299543b6.js";import"./shared-d54b3216.js";import"./shared-13d65f57.js";import"./shared-a2693527.js";import"./shared-59e22bc6.js";import"./shared-2762e106.js";import"./shared-3a446f14.js";import"./shared-34119bbf.js";import"./shared-166204e5.js";import"./shared-dea71762.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./shared-d0aed1c1.js";import"./shared-5212ef4f.js";import"./shared-a1f85307.js";import"./shared-f438f0f4.js";import"./shared-882a0fda.js";import"./shared-641786b2.js";let n,l=e=>e;const m=s(e,"gift-card-code-form");class c extends m{constructor(){super(...arguments),this.getTransactionPageHref=null,this.getCustomerHref=e=>`https://api.foxycart.com/customers/${e}`,this.__cartItemGetItemUrl=(e,r)=>{var t;let o=null;try{const e=null==r?void 0:r._links["fx:transaction"].href;e&&(o=null===(t=this.getTransactionPageHref)||void 0===t?void 0:t.call(this,e))}catch(e){console.log(e)}return null!=o?o:null},this.__customerGetValue=()=>{var e,r,t;const o=null===(t=null===(r=null===(e=this.data)||void 0===e?void 0:e._links)||void 0===r?void 0:r["fx:customer"])||void 0===t?void 0:t.href,s=this.form.customer_id;return void 0===s?o:this.getCustomerHref(s)},this.__customerSetValue=e=>{const r=o(e);this.edit({customer_id:"number"==typeof r?r:""})},this.__customerFilters=[{type:a.String,path:"id",label:"filters.id"},{type:a.String,path:"tax_id",label:"filters.tax_id"},{type:a.String,path:"email",label:"filters.email"},{type:a.String,path:"first_name",label:"filters.first_name"},{type:a.String,path:"last_name",label:"filters.last_name"},{type:a.Boolean,path:"is_anonymous",label:"filters.is_anonymous",list:[{label:"filters.is_anonymous_true",value:"true"},{label:"filters.is_anonymous_false",value:"false"}]},{type:a.Date,path:"last_login_date",label:"filters.last_login_date"},{type:a.Date,path:"date_created",label:"filters.date_created"},{type:a.Date,path:"date_modified",label:"filters.date_modified"}],this.__storeLoaderId="storeLoader"}static get properties(){return r(r({},super.properties),{},{getTransactionPageHref:{attribute:!1},getCustomerHref:{attribute:!1}})}static get v8n(){return[({code:e})=>!!e||"code:v8n_required",({code:e})=>!e||e.length<=50||"code:v8n_too_long",({code:e})=>!(null==e?void 0:e.includes(" "))||"code:v8n_has_spaces",({current_balance:e})=>"number"==typeof e||"current-balance:v8n_required"]}get readonlySelector(){const e=[super.readonlySelector.toString(),"cart-item"];return new t(e.join(" ").trim())}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return this.href||e.push("customer","cart-item","logs"),new t(e.join(" ").trim())}renderBody(){var e,r,t,o,s,a,m,c;let f;try{const o=new URL(null!==(t=null===(r=null===(e=this.data)||void 0===e?void 0:e._links)||void 0===r?void 0:r["fx:provisioned_by_transaction_detail_id"].href)&&void 0!==t?t:"");o.searchParams.set("zoom","item_options"),f=o.toString()}catch(e){f=void 0}return d(n||(n=l` ${0} <foxy-internal-summary-control infer="settings"> <foxy-internal-text-control layout="summary-item" infer="code"></foxy-internal-text-control> <foxy-internal-number-control layout="summary-item" infer="current-balance"> </foxy-internal-number-control> <foxy-internal-date-control layout="summary-item" format="iso-long" infer="end-date"> </foxy-internal-date-control> </foxy-internal-summary-control> <foxy-internal-resource-picker-control infer="customer" first="${0}" item="foxy-customer-card" .getValue="${0}" .setValue="${0}" .filters="${0}"> </foxy-internal-resource-picker-control> <foxy-internal-resource-picker-control infer="cart-item" item="foxy-item-card" .getItemUrl="${0}" .getValue="${0}"> </foxy-internal-resource-picker-control> <foxy-internal-async-list-control infer="logs" first="${0}" limit="5" item="foxy-gift-card-code-log-card"> </foxy-internal-async-list-control> ${0} <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),i(null===(s=null===(o=this.__storeLoader)||void 0===o?void 0:o.data)||void 0===s?void 0:s._links["fx:customers"].href),this.__customerGetValue,this.__customerSetValue,this.__customerFilters,this.__cartItemGetItemUrl,(()=>f),i(null===(m=null===(a=this.data)||void 0===a?void 0:a._links)||void 0===m?void 0:m["fx:gift_card_code_logs"].href),super.renderBody(),i(null===(c=this.data)||void 0===c?void 0:c._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()))}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}}customElements.define("foxy-gift-card-code-form",c);export{c as GiftCardCodeForm};
1
+ import"./shared-16aa673a.js";import"./shared-7cac2ea3.js";import"./shared-cfce3012.js";import"./shared-75cf59dc.js";import"./shared-e5e98873.js";import"./shared-d40308b2.js";import{I as e}from"./shared-377dea9e.js";import"./foxy-gift-card-code-log-card.js";import"./foxy-nucleon-element.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import{_ as r,B as t}from"./shared-cb58dfcd.js";import{g as o}from"./shared-bab2ea2c.js";import{a as s}from"./shared-3e7f5663.js";import{T as a}from"./shared-8874ec69.js";import{i}from"./shared-53e42a77.js";import{h as d}from"./shared-ba5c42c7.js";import"./shared-3f0b1660.js";import"./shared-8154088a.js";import"./shared-5c747b54.js";import"./shared-8219cdf0.js";import"./foxy-copy-to-clipboard.js";import"./shared-ba38add2.js";import"./shared-cfb804b4.js";import"./shared-7303e512.js";import"./shared-65b74c44.js";import"./shared-94756d7c.js";import"./shared-343d1fd7.js";import"./shared-2aa23b5f.js";import"./shared-5afb584d.js";import"./foxy-form-dialog.js";import"./shared-5b1511bc.js";import"./shared-ad888fc4.js";import"./shared-5592ec6e.js";import"./shared-4e709717.js";import"./shared-cd96ff03.js";import"./shared-53e476fd.js";import"./shared-f83207fb.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-cc8237eb.js";import"./shared-058c340a.js";import"./shared-75feef80.js";import"./shared-5bed5454.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-5fd5805c.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-b7775f62.js";import"./shared-740e3ab9.js";import"./shared-cbe634e6.js";import"./shared-2fe8f409.js";import"./shared-f69bc3a6.js";import"./shared-28a6781e.js";import"./shared-3ca920e6.js";import"./shared-9acbf607.js";import"./shared-c44770f9.js";import"./shared-746ecb15.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./shared-d0aed1c1.js";import"./shared-5212ef4f.js";import"./shared-5a19b58c.js";import"./shared-2a305cf4.js";import"./shared-918c8b20.js";import"./shared-eb963ba3.js";let n,l=e=>e;const c=s(e,"gift-card-code-form");class m extends c{constructor(){super(...arguments),this.getTransactionPageHref=null,this.getCustomerHref=e=>`https://api.foxycart.com/customers/${e}`,this.__cartItemGetItemUrl=(e,r)=>{var t;let o=null;try{const e=null==r?void 0:r._links["fx:transaction"].href;e&&(o=null===(t=this.getTransactionPageHref)||void 0===t?void 0:t.call(this,e))}catch(e){console.log(e)}return null!=o?o:null},this.__customerGetValue=()=>{var e,r,t;const o=null===(t=null===(r=null===(e=this.data)||void 0===e?void 0:e._links)||void 0===r?void 0:r["fx:customer"])||void 0===t?void 0:t.href,s=this.form.customer_id;return void 0===s?o:this.getCustomerHref(s)},this.__customerSetValue=e=>{const r=o(e);this.edit({customer_id:"number"==typeof r?r:""})},this.__customerFilters=[{type:a.String,path:"id",label:"filters.id"},{type:a.String,path:"tax_id",label:"filters.tax_id"},{type:a.String,path:"email",label:"filters.email"},{type:a.String,path:"first_name",label:"filters.first_name"},{type:a.String,path:"last_name",label:"filters.last_name"},{type:a.Boolean,path:"is_anonymous",label:"filters.is_anonymous",list:[{label:"filters.is_anonymous_true",value:"true"},{label:"filters.is_anonymous_false",value:"false"}]},{type:a.Date,path:"last_login_date",label:"filters.last_login_date"},{type:a.Date,path:"date_created",label:"filters.date_created"},{type:a.Date,path:"date_modified",label:"filters.date_modified"}],this.__storeLoaderId="storeLoader"}static get properties(){return r(r({},super.properties),{},{getTransactionPageHref:{attribute:!1},getCustomerHref:{attribute:!1}})}static get v8n(){return[({code:e})=>!!e||"code:v8n_required",({code:e})=>!e||e.length<=50||"code:v8n_too_long",({code:e})=>!(null==e?void 0:e.includes(" "))||"code:v8n_has_spaces",({current_balance:e})=>"number"==typeof e||"current-balance:v8n_required"]}get readonlySelector(){const e=[super.readonlySelector.toString(),"cart-item"];return new t(e.join(" ").trim())}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return this.href||e.push("customer","cart-item","logs"),new t(e.join(" ").trim())}renderBody(){var e,r,t,o,s,a,c,m;let f;try{const o=new URL(null!==(t=null===(r=null===(e=this.data)||void 0===e?void 0:e._links)||void 0===r?void 0:r["fx:provisioned_by_transaction_detail_id"].href)&&void 0!==t?t:"");o.searchParams.set("zoom","item_options"),f=o.toString()}catch(e){f=void 0}return d(n||(n=l` ${0} <foxy-internal-summary-control infer="settings"> <foxy-internal-text-control layout="summary-item" infer="code"></foxy-internal-text-control> <foxy-internal-number-control layout="summary-item" infer="current-balance"> </foxy-internal-number-control> <foxy-internal-date-control layout="summary-item" format="iso-long" infer="end-date"> </foxy-internal-date-control> </foxy-internal-summary-control> <foxy-internal-resource-picker-control infer="customer" first="${0}" item="foxy-customer-card" .getValue="${0}" .setValue="${0}" .filters="${0}"> </foxy-internal-resource-picker-control> <foxy-internal-resource-picker-control infer="cart-item" item="foxy-item-card" .getItemUrl="${0}" .getValue="${0}"> </foxy-internal-resource-picker-control> <foxy-internal-async-list-control infer="logs" first="${0}" limit="5" item="foxy-gift-card-code-log-card"> </foxy-internal-async-list-control> ${0} <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),i(null===(s=null===(o=this.__storeLoader)||void 0===o?void 0:o.data)||void 0===s?void 0:s._links["fx:customers"].href),this.__customerGetValue,this.__customerSetValue,this.__customerFilters,this.__cartItemGetItemUrl,(()=>f),i(null===(c=null===(a=this.data)||void 0===a?void 0:a._links)||void 0===c?void 0:c["fx:gift_card_code_logs"].href),super.renderBody(),i(null===(m=this.data)||void 0===m?void 0:m._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()))}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}}customElements.define("foxy-gift-card-code-form",m);export{m as GiftCardCodeForm};
@@ -1 +1 @@
1
- import"./shared-a1f85307.js";import"./foxy-nucleon-element.js";import"./shared-5a08dbb0.js";import{a as e}from"./shared-f61e5463.js";import{I as t}from"./shared-f438f0f4.js";import{i as r}from"./shared-53e42a77.js";import{c as s}from"./shared-4e709717.js";import{h as o}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-893ead61.js";import"./shared-f2c4875b.js";import"./shared-dc6eb904.js";import"./shared-d1195c27.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-d1dfac4d.js";import"./shared-7e9fdf64.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";let d,i=e=>e;const a=e(t,"gift-card-code-log-card");class n extends a{constructor(){super(...arguments),this.__giftCardLoaderId="giftCardLoader",this.__storeLoaderId="storeLoader"}renderBody(){var e,t,a,n;const f=this.data,l=null!==(e=null==f?void 0:f.balance_adjustment)&&void 0!==e?e:0,c="number"==typeof(null==f?void 0:f.transaction_id),_=c?"title_used":"title_updated_via_api",u=c?"subtitle_transaction":"subtitle_no_transaction",p={transaction_id:null==f?void 0:f.transaction_id},h={date_created:null==f?void 0:f.date_created,month:"short"},m={currencyDisplay:(null===(t=this.__store)||void 0===t?void 0:t.use_international_currency_symbol)?"code":"symbol",signDisplay:"exceptZero",amount:`${l} ${null===(a=this.__giftCard)||void 0===a?void 0:a.currency_code}`};return o(d||(d=i` <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <div class="leading-s"> <div class="flex justify-between items-center"> <span class="text-body font-medium truncate"> <foxy-i18n infer="" key="${0}"></foxy-i18n> </span> <span class="text-s text-tertiary flex-shrink-0"> <foxy-i18n infer="" key="date" .options="${0}"></foxy-i18n> </span> </div> <div class="text-s text-secondary truncate"> <foxy-i18n infer="" key="${0}" .options="${0}"></foxy-i18n> <span class="text-tertiary">&bull;</span> <span class="${0}"> <foxy-i18n infer="" key="adjustment" .options="${0}"></foxy-i18n> </span> </div> </div> `),r(null===(n=null==f?void 0:f._links)||void 0===n?void 0:n["fx:gift_card"].href),this.__giftCardLoaderId,(()=>this.requestUpdate()),r(null==f?void 0:f._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()),_,h,u,p,s({"text-tertiary":0===l,"text-success":l>0,"text-error":l<0}),m)}get isBodyReady(){return super.isBodyReady&&!!this.__giftCard&&!!this.__store}get __giftCardLoader(){return this.renderRoot.querySelector(`#${this.__giftCardLoaderId}`)}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}get __giftCard(){var e;return null===(e=this.__giftCardLoader)||void 0===e?void 0:e.data}get __store(){var e;return null===(e=this.__storeLoader)||void 0===e?void 0:e.data}}customElements.define("foxy-gift-card-code-log-card",n);export{n as GiftCardCodeLogCard};
1
+ import"./shared-5a19b58c.js";import"./foxy-nucleon-element.js";import"./shared-94756d7c.js";import{a as e}from"./shared-3e7f5663.js";import{I as t}from"./shared-2a305cf4.js";import{i as r}from"./shared-53e42a77.js";import{c as s}from"./shared-4e709717.js";import{h as o}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-cfb804b4.js";import"./shared-5c747b54.js";import"./shared-65b74c44.js";import"./shared-cb58dfcd.js";import"./shared-2aa23b5f.js";import"./shared-343d1fd7.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";let i,a=e=>e;const d=e(t,"gift-card-code-log-card");class n extends d{constructor(){super(...arguments),this.__giftCardLoaderId="giftCardLoader",this.__storeLoaderId="storeLoader"}renderBody(){var e,t,d,n;const c=this.data,f=null!==(e=null==c?void 0:c.balance_adjustment)&&void 0!==e?e:0,l="number"==typeof(null==c?void 0:c.transaction_id),_=l?"title_used":"title_updated_via_api",u=l?"subtitle_transaction":"subtitle_no_transaction",p={transaction_id:null==c?void 0:c.transaction_id},h={date_created:null==c?void 0:c.date_created,month:"short"},m={currencyDisplay:(null===(t=this.__store)||void 0===t?void 0:t.use_international_currency_symbol)?"code":"symbol",signDisplay:"exceptZero",amount:`${f} ${null===(d=this.__giftCard)||void 0===d?void 0:d.currency_code}`};return o(i||(i=a` <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <div class="leading-s"> <div class="flex justify-between items-center"> <span class="text-body font-medium truncate"> <foxy-i18n infer="" key="${0}"></foxy-i18n> </span> <span class="text-s text-tertiary flex-shrink-0"> <foxy-i18n infer="" key="date" .options="${0}"></foxy-i18n> </span> </div> <div class="text-s text-secondary truncate"> <foxy-i18n infer="" key="${0}" .options="${0}"></foxy-i18n> <span class="text-tertiary">&bull;</span> <span class="${0}"> <foxy-i18n infer="" key="adjustment" .options="${0}"></foxy-i18n> </span> </div> </div> `),r(null===(n=null==c?void 0:c._links)||void 0===n?void 0:n["fx:gift_card"].href),this.__giftCardLoaderId,(()=>this.requestUpdate()),r(null==c?void 0:c._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()),_,h,u,p,s({"text-tertiary":0===f,"text-success":f>0,"text-error":f<0}),m)}get isBodyReady(){return super.isBodyReady&&!!this.__giftCard&&!!this.__store}get __giftCardLoader(){return this.renderRoot.querySelector(`#${this.__giftCardLoaderId}`)}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}get __giftCard(){var e;return null===(e=this.__giftCardLoader)||void 0===e?void 0:e.data}get __store(){var e;return null===(e=this.__storeLoader)||void 0===e?void 0:e.data}}customElements.define("foxy-gift-card-code-log-card",n);export{n as GiftCardCodeLogCard};
@@ -1 +1 @@
1
- import"./shared-58e7f6b1.js";import"./shared-7c863df2.js";import{I as r}from"./shared-6960ab99.js";import{a as e}from"./shared-f61e5463.js";import{B as s}from"./shared-d1195c27.js";import{h as t}from"./shared-ba5c42c7.js";import"./shared-57c3f0e4.js";import"./shared-f2c4875b.js";import"./shared-efecf1ca.js";import"./shared-8e36bcc1.js";import"./shared-893ead61.js";import"./shared-674ba44d.js";import"./shared-4e709717.js";import"./shared-5fd5805c.js";import"./shared-d0aed1c1.js";import"./shared-53e476fd.js";import"./shared-299543b6.js";import"./shared-d54b3216.js";import"./shared-13d65f57.js";import"./shared-a2693527.js";import"./shared-59e22bc6.js";import"./shared-25a19cbe.js";import"./shared-53e42a77.js";import"./shared-1aff7995.js";import"./shared-019348d7.js";import"./shared-5a08dbb0.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-5212ef4f.js";import"./shared-eeb2bd18.js";import"./shared-d1dfac4d.js";import"./shared-7e9fdf64.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-fcdb896f.js";import"./shared-9f07fab6.js";import"./shared-2550f6d9.js";import"./foxy-copy-to-clipboard.js";import"./shared-dc6eb904.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let d,a=r=>r;const o=e(r,"gift-card-codes-form");class i extends o{constructor(){super(...arguments),this.__giftCardCodesGetValue=()=>{var r,e;return null!==(e=null===(r=this.form.gift_card_codes)||void 0===r?void 0:r.map((r=>({value:r}))))&&void 0!==e?e:[]},this.__giftCardCodesSetValue=r=>{this.edit({gift_card_codes:r.map((({value:r})=>r.split(" ").map((r=>r.trim())))).flat().filter(((r,e,s)=>s.indexOf(r)===e))})}}static get v8n(){return[({gift_card_codes:r})=>r&&r.length>0||"gift-card-codes:v8n_required"]}get readonlySelector(){const r=[super.readonlySelector.toString()];return this.href&&r.push("gift-card-codes"),new s(r.join(" ").trim())}get hiddenSelector(){const r=["delete timestamps",super.hiddenSelector.toString()];return new s(r.join(" ").trim())}renderBody(){return t(d||(d=a` <foxy-internal-editable-list-control infer="gift-card-codes" .getValue="${0}" .setValue="${0}"> </foxy-internal-editable-list-control> <foxy-internal-number-control infer="current-balance" min="0"></foxy-internal-number-control> ${0} `),this.__giftCardCodesGetValue,this.__giftCardCodesSetValue,super.renderBody())}async _sendPost(r){const e=JSON.stringify(r),s=await this._fetch(this.parent,{body:e,method:"POST"});return this.status={key:"success"},s}}customElements.define("foxy-gift-card-codes-form",i);export{i as GiftCardCodesForm};
1
+ import"./shared-fb0c426a.js";import"./shared-75cf59dc.js";import{I as e}from"./shared-377dea9e.js";import{a as r}from"./shared-3e7f5663.js";import{B as s}from"./shared-cb58dfcd.js";import{h as t}from"./shared-ba5c42c7.js";import"./shared-ba38add2.js";import"./shared-5c747b54.js";import"./shared-8219cdf0.js";import"./shared-8154088a.js";import"./shared-cfb804b4.js";import"./shared-7303e512.js";import"./shared-4e709717.js";import"./shared-5fd5805c.js";import"./shared-d0aed1c1.js";import"./shared-53e476fd.js";import"./shared-b7775f62.js";import"./shared-740e3ab9.js";import"./shared-cbe634e6.js";import"./shared-2fe8f409.js";import"./shared-f69bc3a6.js";import"./shared-3f0b1660.js";import"./shared-53e42a77.js";import"./shared-0aedd809.js";import"./shared-7594e563.js";import"./shared-94756d7c.js";import"./shared-343d1fd7.js";import"./shared-2aa23b5f.js";import"./shared-5212ef4f.js";import"./shared-5afb584d.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-5ef40e86.js";import"./shared-5b1511bc.js";import"./shared-ad888fc4.js";import"./foxy-copy-to-clipboard.js";import"./shared-65b74c44.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let d,a=e=>e;const o=r(e,"gift-card-codes-form");class i extends o{constructor(){super(...arguments),this.__giftCardCodesGetValue=()=>{var e,r;return null!==(r=null===(e=this.form.gift_card_codes)||void 0===e?void 0:e.map((e=>({value:e}))))&&void 0!==r?r:[]},this.__giftCardCodesSetValue=e=>{this.edit({gift_card_codes:e.map((({value:e})=>e.split(" ").map((e=>e.trim())))).flat().filter(((e,r,s)=>s.indexOf(e)===r))})}}static get v8n(){return[({gift_card_codes:e})=>e&&e.length>0||"gift-card-codes:v8n_required"]}get readonlySelector(){const e=[super.readonlySelector.toString()];return this.href&&e.push("gift-card-codes"),new s(e.join(" ").trim())}get hiddenSelector(){const e=["delete timestamps",super.hiddenSelector.toString()];return new s(e.join(" ").trim())}renderBody(){return t(d||(d=a` <foxy-internal-editable-list-control infer="gift-card-codes" .getValue="${0}" .setValue="${0}"> </foxy-internal-editable-list-control> <foxy-internal-number-control infer="current-balance" min="0"></foxy-internal-number-control> ${0} `),this.__giftCardCodesGetValue,this.__giftCardCodesSetValue,super.renderBody())}async _sendPost(e){const r=JSON.stringify(e),s=await this._fetch(this.parent,{body:r,method:"POST"});return this.status={key:"success"},s}}customElements.define("foxy-gift-card-codes-form",i);export{i as GiftCardCodesForm};
@@ -1 +1 @@
1
- import"./shared-322ae633.js";import"./shared-85323ced.js";import"./shared-58e7f6b1.js";import"./shared-4bcfe691.js";import"./shared-ccc91a5f.js";import"./shared-a2a27012.js";import"./shared-f6e9eda6.js";import"./shared-71f3226f.js";import"./shared-7c863df2.js";import"./shared-569db166.js";import{I as e}from"./shared-6960ab99.js";import"./foxy-generate-codes-form.js";import"./foxy-gift-card-codes-form.js";import"./foxy-item-category-card.js";import"./foxy-gift-card-code-card.js";import"./foxy-gift-card-code-form.js";import"./foxy-nucleon-element.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import{_ as r,B as t}from"./shared-d1195c27.js";import{T as i}from"./shared-8874ec69.js";import{h as o}from"./shared-ba5c42c7.js";import{R as a,a as s}from"./shared-f61e5463.js";import{i as n}from"./shared-53e42a77.js";import"./shared-6ef0392a.js";import"./shared-8e36bcc1.js";import"./shared-f2c4875b.js";import"./shared-efecf1ca.js";import"./shared-25a19cbe.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-893ead61.js";import"./shared-dc6eb904.js";import"./shared-5a08dbb0.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-eeb2bd18.js";import"./shared-d1dfac4d.js";import"./shared-7e9fdf64.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-5fd5805c.js";import"./shared-53e476fd.js";import"./foxy-pagination.js";import"./shared-4e709717.js";import"./foxy-form-dialog.js";import"./shared-9f07fab6.js";import"./shared-2550f6d9.js";import"./shared-57c3f0e4.js";import"./shared-674ba44d.js";import"./shared-d0aed1c1.js";import"./shared-1ba78e12.js";import"./shared-e6cd721f.js";import"./shared-d8cab6ab.js";import"./foxy-swipe-actions.js";import"./shared-299543b6.js";import"./shared-d54b3216.js";import"./shared-13d65f57.js";import"./shared-a2693527.js";import"./shared-59e22bc6.js";import"./shared-aab278b5.js";import"./shared-1137b243.js";import"./shared-604261a0.js";import"./shared-3a446f14.js";import"./shared-651c44fa.js";import"./shared-166204e5.js";import"./shared-dea71762.js";import"./shared-5212ef4f.js";import"./foxy-copy-to-clipboard.js";import"./shared-bab2ea2c.js";import"./shared-12a553c2.js";import"./shared-fcf6424c.js";import"./shared-f438f0f4.js";import"./shared-a1f85307.js";import"./shared-812c706e.js";import"./shared-e1a6c036.js";import"./shared-2762e106.js";import"./shared-34119bbf.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./foxy-gift-card-code-log-card.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import"./shared-882a0fda.js";import"./shared-641786b2.js";import"./shared-c27ee44e.js";const d=["aed","afn","all","amd","ang","aoa","ars","aud","awg","azn","bam","bbd","bdt","bgn","bhd","bif","bmd","bnd","bob","brl","bsd","btc","btn","bwp","byn","bzd","cad","cdf","chf","clf","clp","cnh","cny","cop","crc","cuc","cup","cve","czk","djf","dkk","dop","dzd","egp","ern","etb","eur","fjd","fkp","gbp","gel","ggp","ghs","gip","gmd","gnf","gtq","gyd","hkd","hnl","hrk","htg","huf","idr","ils","imp","inr","iqd","irr","isk","jep","jmd","jod","jpy","kes","kgs","khr","kmf","kpw","krw","kwd","kyd","kzt","lak","lbp","lkr","lrd","lsl","lyd","mad","mdl","mga","mkd","mmk","mnt","mop","mru","mur","mvr","mwk","mxn","myr","mzn","nad","ngn","nio","nok","npr","nzd","omr","pab","pen","pgk","php","pkr","pln","pyg","qar","ron","rsd","rub","rwf","sar","sbd","scr","sdg","sek","sgd","shp","sll","sos","srd","ssp","std","stn","svc","syp","szl","thb","tjs","tmt","tnd","top","try","ttd","twd","tzs","uah","ugx","usd","uyu","uzs","vef","ves","vnd","vuv","wst","xaf","xag","xau","xcd","xdr","xof","xpd","xpf","xpt","yer","zar","zmw","zwl"];let l,c,f=e=>e;const m=a(s(e,"gift-card-form"));class p extends m{constructor(){var e;super(...arguments),e=this,this.getTransactionPageHref=null,this.getCustomerHref=e=>`https://api.foxycart.com/customers/${e}`,this.codesFilter=null,this.__provisioningMaxBalanceValueGetter=()=>{var e;return null===(e=this.form.provisioning_config)||void 0===e?void 0:e.initial_balance_max},this.__provisioningMaxBalanceValueSetter=e=>{var r,t;const i=null!==(t=null===(r=this.form.provisioning_config)||void 0===r?void 0:r.initial_balance_min)&&void 0!==t?t:e;this.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:i>e?e:i,initial_balance_max:e}})},this.__provisioningMinBalanceValueGetter=()=>{var e;return null===(e=this.form.provisioning_config)||void 0===e?void 0:e.initial_balance_min},this.__provisioningMinBalanceValueSetter=e=>{var r,t;const i=null!==(t=null===(r=this.form.provisioning_config)||void 0===r?void 0:r.initial_balance_max)&&void 0!==t?t:e;this.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:e,initial_balance_max:i<e?e:i}})},this.__provisioningToggleValueGetter=()=>{var e;return!!(null===(e=this.form.provisioning_config)||void 0===e?void 0:e.allow_autoprovisioning)},this.__provisioningToggleValueSetter=e=>{var r,t,i,o;e?this.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:null!==(t=null===(r=this.form.provisioning_config)||void 0===r?void 0:r.initial_balance_min)&&void 0!==t?t:0,initial_balance_max:null!==(o=null===(i=this.form.provisioning_config)||void 0===i?void 0:i.initial_balance_max)&&void 0!==o?o:0}}):this.edit({provisioning_config:null})},this.__productCodeRestrictionsGetValue=()=>{var e;return null===(e=this.form.product_code_restrictions)||void 0===e?void 0:e.split(",").filter((e=>!!e.trim())).map((e=>({value:e,label:e.startsWith("-")?this.t("product-code-restrictions.label_block",{value:e.substring(1)}):this.t("product-code-restrictions.label_allow",{value:e})})))},this.__productCodeRestrictionsSetValue=e=>{this.edit({product_code_restrictions:e.map((({value:e,unit:r})=>"block"===r?`-${e}`:e)).filter(((e,r,t)=>!!e&&t.indexOf(e)===r)).join(",")})},this.__currencyCodeGetValue=()=>{var e;return null===(e=this.form.currency_code)||void 0===e?void 0:e.toLowerCase()},this.__storeLoaderId="storeLoader",this.__codesFilters=[{label:"code",path:"code",type:i.String},{label:"current_balance",path:"current_balance",type:i.Number},{label:"end_date",path:"end_date",type:i.Date},{label:"date_created",path:"date_created",type:i.Date},{label:"date_modified",path:"date_modified",type:i.Date}],this.__codesActions=[{theme:"contrast",state:"idle",text:"copy_button_text",onClick:async function(r){e.__codesActions[0].state="busy",e.__codesActions=[...e.__codesActions];try{await navigator.clipboard.writeText(r.code),e.__codesActions[0].state="end"}catch(r){e.__codesActions[0].state="error"}finally{e.__codesActions=[...e.__codesActions],setTimeout((()=>{e.__codesActions[0].state="idle",e.__codesActions=[...e.__codesActions]}),1e3)}}}]}static get properties(){return r(r({},super.properties),{},{getTransactionPageHref:{attribute:!1},getCustomerHref:{attribute:!1},codesFilter:{attribute:"codes-filter"}})}static get v8n(){return[({name:e})=>!!e||"name:v8n_required",({name:e})=>!e||e.length<=50||"name:v8n_too_long",e=>{var r;if(null===(r=e.provisioning_config)||void 0===r?void 0:r.allow_autoprovisioning){if(!e.sku)return"sku:v8n_required";if(e.sku.length>200)return"sku:v8n_too_long"}return!0},e=>{var r;const t=null===(r=e.provisioning_config)||void 0===r?void 0:r.initial_balance_min;return!("number"==typeof t&&t<0)||"min-balance:v8n_negative"},e=>{var r;const t=null===(r=e.provisioning_config)||void 0===r?void 0:r.initial_balance_max;return!("number"==typeof t&&t<0)||"max-balance:v8n_negative"},({product_code_restrictions:e})=>!e||e.length<=5e3||"product-code-restrictions:v8n_too_long"]}get hiddenSelector(){var e;const r=[super.hiddenSelector.toString()];return this.data||r.push("codes","category-restrictions","attributes"),(null===(e=this.form.provisioning_config)||void 0===e?void 0:e.allow_autoprovisioning)||r.push("provisioning:sku","provisioning:min-balance","provisioning:max-balance"),new t(r.join(" ").trim())}get headerSubtitleOptions(){return{id:this.headerCopyIdValue}}renderHeaderActions(e){return o(l||(l=f` <foxy-internal-bulk-add-action-control parent="${0}" infer="generate" form="foxy-generate-codes-form" .related="${0}"> </foxy-internal-bulk-add-action-control> <foxy-internal-bulk-add-action-control parent="${0}" infer="import" form="foxy-gift-card-codes-form" .related="${0}"> </foxy-internal-bulk-add-action-control> ${0} `),e._links["fx:generate_codes"].href,[e._links["fx:gift_card_codes"].href],e._links["fx:gift_card_codes"].href,[e._links["fx:gift_card_codes"].href],super.renderHeaderActions(e))}renderBody(){var e,r,t,i,a,s,l,m,p,u,_;let h;try{const t=new URL(null!==(r=null===(e=this.data)||void 0===e?void 0:e._links["fx:gift_card_codes"].href)&&void 0!==r?r:"");t.searchParams.set("order","date_created desc"),h=t.toString()}catch(e){h=void 0}return o(c||(c=f` ${0} <foxy-internal-summary-control infer="general"> <foxy-internal-text-control layout="summary-item" infer="name"> </foxy-internal-text-control> <foxy-internal-select-control property="currency_code" layout="summary-item" infer="currency" .getValue="${0}" .options="${0}"> </foxy-internal-select-control> <foxy-internal-frequency-control property="expires_after" layout="summary-item" infer="expires"> </foxy-internal-frequency-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="provisioning"> <foxy-internal-switch-control infer="toggle" .getValue="${0}" .setValue="${0}"> </foxy-internal-switch-control> <foxy-internal-text-control layout="summary-item" infer="sku"></foxy-internal-text-control> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="min-balance" min="0" .getValue="${0}" .setValue="${0}"> </foxy-internal-number-control> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="max-balance" min="0" .getValue="${0}" .setValue="${0}"> </foxy-internal-number-control> </foxy-internal-summary-control> <foxy-internal-async-list-control filter="${0}" first="${0}" limit="5" infer="codes" item="foxy-gift-card-code-card" form="foxy-gift-card-code-form" alert .actions="${0}" .filters="${0}" .formProps="${0}"> </foxy-internal-async-list-control> <foxy-internal-editable-list-control infer="product-code-restrictions" .getValue="${0}" .setValue="${0}" .units="${0}"> </foxy-internal-editable-list-control> <foxy-internal-async-resource-link-list-control foreign-key-for-uri="item_category_uri" foreign-key-for-id="item_category_id" own-key-for-uri="gift_card_uri" options-href="${0}" links-href="${0}" embed-key="fx:gift_card_item_categories" own-uri="${0}" infer="category-restrictions" limit="5" item="foxy-item-category-card"> </foxy-internal-async-resource-link-list-control> <foxy-internal-async-list-control first="${0}" limit="5" infer="attributes" item="foxy-attribute-card" form="foxy-attribute-form" alert> </foxy-internal-async-list-control> ${0} <foxy-nucleon infer="" class="hidden" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),this.__currencyCodeGetValue,d.map((e=>({label:this.t(`general.currency.code_${e}`),value:e}))),this.__provisioningToggleValueGetter,this.__provisioningToggleValueSetter,n(null===(t=this.form.currency_code)||void 0===t?void 0:t.toUpperCase()),this.__provisioningMinBalanceValueGetter,this.__provisioningMinBalanceValueSetter,n(null===(i=this.form.currency_code)||void 0===i?void 0:i.toUpperCase()),this.__provisioningMaxBalanceValueGetter,this.__provisioningMaxBalanceValueSetter,n(null!==(a=this.codesFilter)&&void 0!==a?a:void 0),h,this.__codesActions,this.__codesFilters,{".getTransactionPageHref":this.getTransactionPageHref,".getCustomerHref":this.getCustomerHref},this.__productCodeRestrictionsGetValue,this.__productCodeRestrictionsSetValue,[{label:this.t("product-code-restrictions.unit_allow"),value:"allow"},{label:this.t("product-code-restrictions.unit_block"),value:"block"}],n(null===(l=null===(s=this.__storeLoader)||void 0===s?void 0:s.data)||void 0===l?void 0:l._links["fx:item_categories"].href),n(null===(m=this.data)||void 0===m?void 0:m._links["fx:gift_card_item_categories"].href),n(null===(p=this.data)||void 0===p?void 0:p._links.self.href),n(null===(u=this.data)||void 0===u?void 0:u._links["fx:attributes"].href),super.renderBody(),n(null===(_=this.data)||void 0===_?void 0:_._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()))}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}}customElements.define("foxy-gift-card-form",p);export{p as GiftCardForm};
1
+ import"./shared-69b4b6a7.js";import"./shared-4854f37a.js";import"./shared-fb0c426a.js";import"./shared-7cac2ea3.js";import"./shared-96998138.js";import"./shared-cfce3012.js";import"./shared-a6776a1d.js";import"./shared-f6c479b8.js";import"./shared-75cf59dc.js";import"./shared-d40308b2.js";import{I as e}from"./shared-377dea9e.js";import"./foxy-generate-codes-form.js";import"./foxy-gift-card-codes-form.js";import"./foxy-item-category-card.js";import"./foxy-gift-card-code-card.js";import"./foxy-gift-card-code-form.js";import"./foxy-nucleon-element.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import{_ as r,B as t}from"./shared-cb58dfcd.js";import{T as i}from"./shared-8874ec69.js";import{h as o}from"./shared-ba5c42c7.js";import{R as a,a as s}from"./shared-3e7f5663.js";import{i as n}from"./shared-53e42a77.js";import"./shared-cc8237eb.js";import"./shared-8154088a.js";import"./shared-5c747b54.js";import"./shared-8219cdf0.js";import"./shared-3f0b1660.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-cfb804b4.js";import"./shared-65b74c44.js";import"./shared-94756d7c.js";import"./shared-343d1fd7.js";import"./shared-2aa23b5f.js";import"./shared-5afb584d.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-5fd5805c.js";import"./shared-53e476fd.js";import"./foxy-pagination.js";import"./shared-4e709717.js";import"./foxy-form-dialog.js";import"./shared-5b1511bc.js";import"./shared-ad888fc4.js";import"./shared-ba38add2.js";import"./shared-7303e512.js";import"./shared-d0aed1c1.js";import"./shared-058c340a.js";import"./shared-75feef80.js";import"./shared-5bed5454.js";import"./foxy-swipe-actions.js";import"./shared-b7775f62.js";import"./shared-740e3ab9.js";import"./shared-cbe634e6.js";import"./shared-2fe8f409.js";import"./shared-f69bc3a6.js";import"./shared-730dd58a.js";import"./shared-c023350f.js";import"./shared-d2bc4d51.js";import"./shared-3ca920e6.js";import"./shared-651c44fa.js";import"./shared-c44770f9.js";import"./shared-746ecb15.js";import"./shared-5212ef4f.js";import"./foxy-copy-to-clipboard.js";import"./shared-bab2ea2c.js";import"./shared-196b992c.js";import"./shared-3c54cb67.js";import"./shared-2a305cf4.js";import"./shared-5a19b58c.js";import"./shared-16aa673a.js";import"./shared-e5e98873.js";import"./shared-28a6781e.js";import"./shared-9acbf607.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./foxy-gift-card-code-log-card.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import"./shared-918c8b20.js";import"./shared-eb963ba3.js";import"./shared-b0c5a062.js";const d=["aed","afn","all","amd","ang","aoa","ars","aud","awg","azn","bam","bbd","bdt","bgn","bhd","bif","bmd","bnd","bob","brl","bsd","btc","btn","bwp","byn","bzd","cad","cdf","chf","clf","clp","cnh","cny","cop","crc","cuc","cup","cve","czk","djf","dkk","dop","dzd","egp","ern","etb","eur","fjd","fkp","gbp","gel","ggp","ghs","gip","gmd","gnf","gtq","gyd","hkd","hnl","hrk","htg","huf","idr","ils","imp","inr","iqd","irr","isk","jep","jmd","jod","jpy","kes","kgs","khr","kmf","kpw","krw","kwd","kyd","kzt","lak","lbp","lkr","lrd","lsl","lyd","mad","mdl","mga","mkd","mmk","mnt","mop","mru","mur","mvr","mwk","mxn","myr","mzn","nad","ngn","nio","nok","npr","nzd","omr","pab","pen","pgk","php","pkr","pln","pyg","qar","ron","rsd","rub","rwf","sar","sbd","scr","sdg","sek","sgd","shp","sll","sos","srd","ssp","std","stn","svc","syp","szl","thb","tjs","tmt","tnd","top","try","ttd","twd","tzs","uah","ugx","usd","uyu","uzs","vef","ves","vnd","vuv","wst","xaf","xag","xau","xcd","xdr","xof","xpd","xpf","xpt","yer","zar","zmw","zwl"];let c,l,f=e=>e;const m=a(s(e,"gift-card-form"));class p extends m{constructor(){var e;super(...arguments),e=this,this.getTransactionPageHref=null,this.getCustomerHref=e=>`https://api.foxycart.com/customers/${e}`,this.codesFilter=null,this.__provisioningMaxBalanceValueGetter=()=>{var e;return null===(e=this.form.provisioning_config)||void 0===e?void 0:e.initial_balance_max},this.__provisioningMaxBalanceValueSetter=e=>{var r,t;const i=null!==(t=null===(r=this.form.provisioning_config)||void 0===r?void 0:r.initial_balance_min)&&void 0!==t?t:e;this.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:i>e?e:i,initial_balance_max:e}})},this.__provisioningMinBalanceValueGetter=()=>{var e;return null===(e=this.form.provisioning_config)||void 0===e?void 0:e.initial_balance_min},this.__provisioningMinBalanceValueSetter=e=>{var r,t;const i=null!==(t=null===(r=this.form.provisioning_config)||void 0===r?void 0:r.initial_balance_max)&&void 0!==t?t:e;this.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:e,initial_balance_max:i<e?e:i}})},this.__provisioningToggleValueGetter=()=>{var e;return!!(null===(e=this.form.provisioning_config)||void 0===e?void 0:e.allow_autoprovisioning)},this.__provisioningToggleValueSetter=e=>{var r,t,i,o;e?this.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:null!==(t=null===(r=this.form.provisioning_config)||void 0===r?void 0:r.initial_balance_min)&&void 0!==t?t:0,initial_balance_max:null!==(o=null===(i=this.form.provisioning_config)||void 0===i?void 0:i.initial_balance_max)&&void 0!==o?o:0}}):this.edit({provisioning_config:null})},this.__productCodeRestrictionsGetValue=()=>{var e;return null===(e=this.form.product_code_restrictions)||void 0===e?void 0:e.split(",").filter((e=>!!e.trim())).map((e=>({value:e,label:e.startsWith("-")?this.t("product-code-restrictions.label_block",{value:e.substring(1)}):this.t("product-code-restrictions.label_allow",{value:e})})))},this.__productCodeRestrictionsSetValue=e=>{this.edit({product_code_restrictions:e.map((({value:e,unit:r})=>"block"===r?`-${e}`:e)).filter(((e,r,t)=>!!e&&t.indexOf(e)===r)).join(",")})},this.__currencyCodeGetValue=()=>{var e;return null===(e=this.form.currency_code)||void 0===e?void 0:e.toLowerCase()},this.__storeLoaderId="storeLoader",this.__codesFilters=[{label:"code",path:"code",type:i.String},{label:"current_balance",path:"current_balance",type:i.Number},{label:"end_date",path:"end_date",type:i.Date},{label:"date_created",path:"date_created",type:i.Date},{label:"date_modified",path:"date_modified",type:i.Date}],this.__codesActions=[{theme:"contrast",state:"idle",text:"copy_button_text",onClick:async function(r){e.__codesActions[0].state="busy",e.__codesActions=[...e.__codesActions];try{await navigator.clipboard.writeText(r.code),e.__codesActions[0].state="end"}catch(r){e.__codesActions[0].state="error"}finally{e.__codesActions=[...e.__codesActions],setTimeout((()=>{e.__codesActions[0].state="idle",e.__codesActions=[...e.__codesActions]}),1e3)}}}]}static get properties(){return r(r({},super.properties),{},{getTransactionPageHref:{attribute:!1},getCustomerHref:{attribute:!1},codesFilter:{attribute:"codes-filter"}})}static get v8n(){return[({name:e})=>!!e||"name:v8n_required",({name:e})=>!e||e.length<=50||"name:v8n_too_long",e=>{var r;if(null===(r=e.provisioning_config)||void 0===r?void 0:r.allow_autoprovisioning){if(!e.sku)return"sku:v8n_required";if(e.sku.length>200)return"sku:v8n_too_long"}return!0},e=>{var r;const t=null===(r=e.provisioning_config)||void 0===r?void 0:r.initial_balance_min;return!("number"==typeof t&&t<0)||"min-balance:v8n_negative"},e=>{var r;const t=null===(r=e.provisioning_config)||void 0===r?void 0:r.initial_balance_max;return!("number"==typeof t&&t<0)||"max-balance:v8n_negative"},({product_code_restrictions:e})=>!e||e.length<=5e3||"product-code-restrictions:v8n_too_long"]}get hiddenSelector(){var e;const r=[super.hiddenSelector.toString()];return this.data||r.push("codes","category-restrictions","attributes"),(null===(e=this.form.provisioning_config)||void 0===e?void 0:e.allow_autoprovisioning)||r.push("provisioning:sku","provisioning:min-balance","provisioning:max-balance"),new t(r.join(" ").trim())}get headerSubtitleOptions(){return{id:this.headerCopyIdValue}}renderHeaderActions(e){return o(c||(c=f` <foxy-internal-bulk-add-action-control parent="${0}" infer="generate" form="foxy-generate-codes-form" .related="${0}"> </foxy-internal-bulk-add-action-control> <foxy-internal-bulk-add-action-control parent="${0}" infer="import" form="foxy-gift-card-codes-form" .related="${0}"> </foxy-internal-bulk-add-action-control> ${0} `),e._links["fx:generate_codes"].href,[e._links["fx:gift_card_codes"].href],e._links["fx:gift_card_codes"].href,[e._links["fx:gift_card_codes"].href],super.renderHeaderActions(e))}renderBody(){var e,r,t,i,a,s,c,m,p,u,_;let h;try{const t=new URL(null!==(r=null===(e=this.data)||void 0===e?void 0:e._links["fx:gift_card_codes"].href)&&void 0!==r?r:"");t.searchParams.set("order","date_created desc"),h=t.toString()}catch(e){h=void 0}return o(l||(l=f` ${0} <foxy-internal-summary-control infer="general"> <foxy-internal-text-control layout="summary-item" infer="name"> </foxy-internal-text-control> <foxy-internal-select-control property="currency_code" layout="summary-item" infer="currency" .getValue="${0}" .options="${0}"> </foxy-internal-select-control> <foxy-internal-frequency-control property="expires_after" layout="summary-item" infer="expires"> </foxy-internal-frequency-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="provisioning"> <foxy-internal-switch-control infer="toggle" .getValue="${0}" .setValue="${0}"> </foxy-internal-switch-control> <foxy-internal-text-control layout="summary-item" infer="sku"></foxy-internal-text-control> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="min-balance" min="0" .getValue="${0}" .setValue="${0}"> </foxy-internal-number-control> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="max-balance" min="0" .getValue="${0}" .setValue="${0}"> </foxy-internal-number-control> </foxy-internal-summary-control> <foxy-internal-async-list-control filter="${0}" first="${0}" limit="5" infer="codes" item="foxy-gift-card-code-card" form="foxy-gift-card-code-form" alert .actions="${0}" .filters="${0}" .formProps="${0}"> </foxy-internal-async-list-control> <foxy-internal-editable-list-control infer="product-code-restrictions" .getValue="${0}" .setValue="${0}" .units="${0}"> </foxy-internal-editable-list-control> <foxy-internal-async-resource-link-list-control foreign-key-for-uri="item_category_uri" foreign-key-for-id="item_category_id" own-key-for-uri="gift_card_uri" options-href="${0}" links-href="${0}" embed-key="fx:gift_card_item_categories" own-uri="${0}" infer="category-restrictions" limit="5" item="foxy-item-category-card"> </foxy-internal-async-resource-link-list-control> <foxy-internal-async-list-control first="${0}" limit="5" infer="attributes" item="foxy-attribute-card" form="foxy-attribute-form" alert> </foxy-internal-async-list-control> ${0} <foxy-nucleon infer="" class="hidden" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),this.__currencyCodeGetValue,d.map((e=>({label:this.t(`general.currency.code_${e}`),value:e}))),this.__provisioningToggleValueGetter,this.__provisioningToggleValueSetter,n(null===(t=this.form.currency_code)||void 0===t?void 0:t.toUpperCase()),this.__provisioningMinBalanceValueGetter,this.__provisioningMinBalanceValueSetter,n(null===(i=this.form.currency_code)||void 0===i?void 0:i.toUpperCase()),this.__provisioningMaxBalanceValueGetter,this.__provisioningMaxBalanceValueSetter,n(null!==(a=this.codesFilter)&&void 0!==a?a:void 0),h,this.__codesActions,this.__codesFilters,{".getTransactionPageHref":this.getTransactionPageHref,".getCustomerHref":this.getCustomerHref},this.__productCodeRestrictionsGetValue,this.__productCodeRestrictionsSetValue,[{label:this.t("product-code-restrictions.unit_allow"),value:"allow"},{label:this.t("product-code-restrictions.unit_block"),value:"block"}],n(null===(c=null===(s=this.__storeLoader)||void 0===s?void 0:s.data)||void 0===c?void 0:c._links["fx:item_categories"].href),n(null===(m=this.data)||void 0===m?void 0:m._links["fx:gift_card_item_categories"].href),n(null===(p=this.data)||void 0===p?void 0:p._links.self.href),n(null===(u=this.data)||void 0===u?void 0:u._links["fx:attributes"].href),super.renderBody(),n(null===(_=this.data)||void 0===_?void 0:_._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()))}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}}customElements.define("foxy-gift-card-form",p);export{p as GiftCardForm};
@@ -1,4 +1,4 @@
1
- import"./shared-8e36bcc1.js";import{h as t,P as e}from"./shared-f2c4875b.js";import{E as r,T as o}from"./shared-efecf1ca.js";import{I as a}from"./shared-651c44fa.js";import"./shared-d54b3216.js";import{L as i}from"./shared-2db8d17c.js";import{I as s}from"./shared-dea71762.js";import{a as n}from"./shared-d8cab6ab.js";import{a as l}from"./shared-893ead61.js";import"./foxy-nucleon-element.js";import"./foxy-spinner.js";import"./shared-5a08dbb0.js";import"./shared-25a19cbe.js";import"./shared-dc6eb904.js";import{_ as d}from"./shared-d1195c27.js";import{C as c}from"./shared-eeb2bd18.js";import{R as m,a as h,T as u}from"./shared-f61e5463.js";import{N as f}from"./shared-d1dfac4d.js";import{c as p,h as b}from"./shared-ba5c42c7.js";import{c as v}from"./shared-4e709717.js";import{i as g}from"./shared-53e42a77.js";import{r as y}from"./shared-5fd5805c.js";import"./shared-7e9fdf64.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-17a61265.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";const w=t`<dom-module id="lumo-tab" theme-for="vaadin-tab">
1
+ import"./shared-8154088a.js";import{h as t,P as e}from"./shared-5c747b54.js";import{E as r,T as o}from"./shared-8219cdf0.js";import{I as a}from"./shared-651c44fa.js";import"./shared-740e3ab9.js";import{L as i}from"./shared-ad179ade.js";import{I as s}from"./shared-746ecb15.js";import{a as n}from"./shared-5bed5454.js";import{a as l}from"./shared-cfb804b4.js";import"./foxy-nucleon-element.js";import"./foxy-spinner.js";import"./shared-94756d7c.js";import"./shared-3f0b1660.js";import"./shared-65b74c44.js";import{_ as d}from"./shared-cb58dfcd.js";import{C as c}from"./shared-5afb584d.js";import{R as m,a as h,T as u}from"./shared-3e7f5663.js";import{N as f}from"./shared-f83207fb.js";import{c as p,h as b}from"./shared-ba5c42c7.js";import{c as v}from"./shared-4e709717.js";import{i as g}from"./shared-53e42a77.js";import{r as y}from"./shared-5fd5805c.js";import"./shared-5592ec6e.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-2aa23b5f.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";const w=t`<dom-module id="lumo-tab" theme-for="vaadin-tab">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -1 +1 @@
1
- export{I as I18n}from"./shared-5a08dbb0.js";import"./shared-d1195c27.js";import"./shared-ba5c42c7.js";import"./shared-f61e5463.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";
1
+ export{I as I18n}from"./shared-94756d7c.js";import"./shared-cb58dfcd.js";import"./shared-ba5c42c7.js";import"./shared-3e7f5663.js";import"./shared-343d1fd7.js";import"./shared-2aa23b5f.js";
@@ -1 +1 @@
1
- import"./shared-a1f85307.js";import"./shared-5a08dbb0.js";import{a as s}from"./shared-f61e5463.js";import{I as e}from"./shared-f438f0f4.js";import{c as t}from"./shared-4e709717.js";import{h as a}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-893ead61.js";import"./shared-f2c4875b.js";import"./shared-dc6eb904.js";import"./shared-d1195c27.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-d1dfac4d.js";import"./shared-7e9fdf64.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";let d,r,i=s=>s;const o=s(e,"integration-card");class n extends o{renderBody(){var s;const e=this.data,o=new Date(1e3*(null!==(s=null==e?void 0:e.expires)&&void 0!==s?s:0)),n=o>new Date;return a(d||(d=i` <div class="flex flex-wrap gap-xs leading-s"> <div class="min-w-full"> <div class="flex justify-between gap-s"> <span class="font-medium truncate min-w-0"> ${0}&ZeroWidthSpace; </span> <foxy-i18n class="${0}" infer="" key="status_${0}" .options="${0}"> </foxy-i18n> </div> <div class="text-secondary text-s"> ${0} </div> </div> <div class="text-secondary text-xs bg-contrast-5 rounded overflow-hidden flex"> <span class="font-medium px-xs bg-contrast-5" lang="en">ID</span> <span class="px-xs"><code>${0}</code>&ZeroWidthSpace;</span> </div> <div class="text-secondary text-xs bg-contrast-5 rounded overflow-hidden flex"> <span class="font-medium px-xs bg-contrast-5" lang="en">Email</span> <span class="px-xs"><code>${0}</code>&ZeroWidthSpace;</span> </div> </div> `),null==e?void 0:e.project_name,t({"whitespace-nowrap font-tnum text-s":!0,"text-tertiary":n,"text-error":!n}),n?"active":"expired",{date:o,month:"short",day:"2-digit"},(null==e?void 0:e.project_description)?e.project_description:a(r||(r=i`<foxy-i18n infer="" key="no_description"></foxy-i18n>`)),null==e?void 0:e.client_id,null==e?void 0:e.added_by_email)}}customElements.define("foxy-integration-card",n);export{n as IntegrationCard};
1
+ import"./shared-5a19b58c.js";import"./shared-94756d7c.js";import{a as e}from"./shared-3e7f5663.js";import{I as s}from"./shared-2a305cf4.js";import{c as t}from"./shared-4e709717.js";import{h as a}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-cfb804b4.js";import"./shared-5c747b54.js";import"./shared-65b74c44.js";import"./shared-cb58dfcd.js";import"./shared-2aa23b5f.js";import"./shared-343d1fd7.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";let r,d,i=e=>e;const o=e(s,"integration-card");class n extends o{renderBody(){var e;const s=this.data,o=new Date(1e3*(null!==(e=null==s?void 0:s.expires)&&void 0!==e?e:0)),n=o>new Date;return a(r||(r=i` <div class="flex flex-wrap gap-xs leading-s"> <div class="min-w-full"> <div class="flex justify-between gap-s"> <span class="font-medium truncate min-w-0"> ${0}&ZeroWidthSpace; </span> <foxy-i18n class="${0}" infer="" key="status_${0}" .options="${0}"> </foxy-i18n> </div> <div class="text-secondary text-s"> ${0} </div> </div> <div class="text-secondary text-xs bg-contrast-5 rounded overflow-hidden flex"> <span class="font-medium px-xs bg-contrast-5" lang="en">ID</span> <span class="px-xs"><code>${0}</code>&ZeroWidthSpace;</span> </div> <div class="text-secondary text-xs bg-contrast-5 rounded overflow-hidden flex"> <span class="font-medium px-xs bg-contrast-5" lang="en">Email</span> <span class="px-xs"><code>${0}</code>&ZeroWidthSpace;</span> </div> </div> `),null==s?void 0:s.project_name,t({"whitespace-nowrap font-tnum text-s":!0,"text-tertiary":n,"text-error":!n}),n?"active":"expired",{date:o,month:"short",day:"2-digit"},(null==s?void 0:s.project_description)?s.project_description:a(d||(d=i`<foxy-i18n infer="" key="no_description"></foxy-i18n>`)),null==s?void 0:s.client_id,null==s?void 0:s.added_by_email)}}customElements.define("foxy-integration-card",n);export{n as IntegrationCard};
@@ -1 +1 @@
1
- import"./shared-25a19cbe.js";import"./shared-aa211938.js";import{I as e}from"./shared-6960ab99.js";import"./shared-569db166.js";import"./shared-5212ef4f.js";import"./foxy-copy-to-clipboard.js";import"./shared-5a08dbb0.js";import{_ as r,B as t}from"./shared-d1195c27.js";import{a as s}from"./shared-f61e5463.js";import{c as a}from"./shared-4e709717.js";import{h as o}from"./shared-ba5c42c7.js";import"./shared-8e36bcc1.js";import"./shared-f2c4875b.js";import"./shared-efecf1ca.js";import"./shared-2bcdd0c6.js";import"./shared-a2693527.js";import"./shared-59e22bc6.js";import"./shared-d54b3216.js";import"./shared-13d65f57.js";import"./shared-53e42a77.js";import"./shared-1aff7995.js";import"./shared-019348d7.js";import"./shared-eeb2bd18.js";import"./shared-17a61265.js";import"./shared-d1dfac4d.js";import"./shared-7e9fdf64.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-fcdb896f.js";import"./shared-9f07fab6.js";import"./shared-2550f6d9.js";import"./foxy-spinner.js";import"./shared-893ead61.js";import"./shared-dc6eb904.js";import"./shared-bab2ea2c.js";import"./shared-d0aed1c1.js";import"./shared-57c3f0e4.js";import"./shared-674ba44d.js";let i,n,d,l,c,h,p,_,m,b,f,u,y=e=>e;const x=s(e,"integration-form");class j extends x{constructor(){super(...arguments),this.__postResponse=null}static get properties(){return r(r({},super.properties),{},{__postResponse:{attribute:!1}})}static get v8n(){return[({project_name:e})=>!!e||"project-name:v8n_required"]}get hiddenSelector(){return new t(`header:copy-id ${super.hiddenSelector}`.trimEnd())}renderBody(){return this.data?this.__renderSnapshotBody():this.__renderTemplateBody()}async _fetch(...e){var r;const t=this.constructor,s=await new t.API(this).fetch(...e),a="string"==typeof e[0]?null===(r=e[1])||void 0===r?void 0:r.method:e[0].method,o="string"==typeof e[0]?e[0]:e[0].url;if(!s.ok)throw s;const i=await s.json();return"POST"===(null==a?void 0:a.toUpperCase())&&o===this.parent&&(this.__postResponse=i),i}__renderSnapshotBody(){const e=this.hiddenSelector,r=this.__postResponse;return o(i||(i=y` ${0} ${0} ${0} <foxy-internal-delete-control infer="delete"></foxy-internal-delete-control> `),this.renderHeader(),e.matches("message",!0)||!r?"":this.__renderMessage(),e.matches("table")?"":this.__renderTable())}__renderTemplateBody(){return o(n||(n=y` ${0} <foxy-internal-text-control infer="project-name"></foxy-internal-text-control> <foxy-internal-text-area-control infer="project-description"> </foxy-internal-text-area-control> <foxy-internal-submit-control infer="create"></foxy-internal-submit-control> `),this.renderHeader())}__renderMessage(){return o(d||(d=y` ${0} <div class="bg-success-10 text-success p-m pb-s space-y-xs leading-s rounded-t-l rounded-b-l"> <foxy-i18n infer="message" class="block" key="text"></foxy-i18n> <vaadin-button data-testid="message-action" theme="tertiary contrast" class="p-0" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="message" key="action"></foxy-i18n> </vaadin-button> </div> ${0} `),this.renderTemplateOrSlot("message:before"),this.disabledSelector.matches("message",!0),(()=>this.__postResponse=null),this.renderTemplateOrSlot("message:after"))}__renderTable(){var e;const r=this.data,t=new Date(1e3*(null!==(e=r.expires)&&void 0!==e?e:0)),s=this.__postResponse;return o(l||(l=y` ${0} <table class="font-lumo text-m leading-m w-full"> <tbody class="divide-y divide-contrast-10"> ${0} ${0} ${0} ${0} ${0} ${0} ${0} </tbody> </table> ${0} `),this.renderTemplateOrSlot("table:before"),this.__renderTableRow({label:this.__renderTableI18n("added_by"),value:this.__renderMailToLink(r.added_by_email,r.added_by_name)}),this.__renderTableRow({label:this.__renderTableI18n("contact"),value:this.__renderMailToLink(r.contact_email,r.contact_name)}),this.__renderTableRow({label:this.__renderTableI18n("company"),value:this.__renderLink(r.company_url,r.company_name)}),this.__renderTableRow({label:this.__renderTableI18n("expires"),value:this.__renderTableI18n("expires_date",{date:t})}),this.__renderTableRow({label:"Client ID",value:this.__renderCopiableText(r.client_id)}),s?o(c||(c=y` ${0} ${0} ${0} `),this.__renderTableRow({highlight:!0,label:"Client secret",value:this.__renderCopiableText(s.client_secret)}),this.__renderTableRow({highlight:!0,label:"Refresh token",value:this.__renderCopiableText(s.refresh_token)}),this.__renderTableRow({highlight:!0,label:"Access token",value:this.__renderCopiableText(s.access_token)})):"",this.__renderTableRow({label:"Scope",value:o(h||(h=y`<code>${0}</code>`),r.scope)}),this.renderTemplateOrSlot("table:after"))}__renderCopiableText(e){return o(p||(p=y` <div class="flex items-center gap-s"> <code class="truncate flex-1">${0}</code> <foxy-copy-to-clipboard infer="copy-to-clipboard" class="inline-block" text="${0}"> </foxy-copy-to-clipboard> </div> `),e,e)}__renderMailToLink(e,r){return e?this.__renderLink(`mailto:${e}`,r):o(_||(_=y`${0}`),r)}__renderLink(e,r){return e?o(b||(b=y` <a target="_blank" class="font-medium text-primary rounded hover-underline focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> ${0} </a> `),e,r):o(m||(m=y`${0}`),r)}__renderTableRow(e){const{label:r,value:t,highlight:s=!1}=e;return o(f||(f=y` <tr class="${0}"> <td class="max-w-0 truncate py-s text-secondary w-1-3 pr-m">${0}</td> <td class="max-w-0 truncate py-s text-body w-2-3">${0}</td> </tr> `),a({"font-medium text-success":s}),r,t)}__renderTableI18n(e,r){return o(u||(u=y`<foxy-i18n infer="table" key="${0}" .options="${0}"></foxy-i18n>`),e,r)}}customElements.define("foxy-integration-form",j);export{j as IntegrationForm};
1
+ import"./shared-3f0b1660.js";import"./shared-52943926.js";import{I as e}from"./shared-377dea9e.js";import"./shared-d40308b2.js";import"./shared-5212ef4f.js";import"./foxy-copy-to-clipboard.js";import"./shared-94756d7c.js";import{_ as r,B as t}from"./shared-cb58dfcd.js";import{a as s}from"./shared-3e7f5663.js";import{c as a}from"./shared-4e709717.js";import{h as o}from"./shared-ba5c42c7.js";import"./shared-8154088a.js";import"./shared-5c747b54.js";import"./shared-8219cdf0.js";import"./shared-0d412ab6.js";import"./shared-2fe8f409.js";import"./shared-f69bc3a6.js";import"./shared-740e3ab9.js";import"./shared-cbe634e6.js";import"./shared-53e42a77.js";import"./shared-0aedd809.js";import"./shared-7594e563.js";import"./shared-5afb584d.js";import"./shared-2aa23b5f.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-5ef40e86.js";import"./shared-5b1511bc.js";import"./shared-ad888fc4.js";import"./foxy-spinner.js";import"./shared-cfb804b4.js";import"./shared-65b74c44.js";import"./shared-bab2ea2c.js";import"./shared-d0aed1c1.js";import"./shared-ba38add2.js";import"./shared-7303e512.js";let i,n,d,l,c,h,p,_,m,b,f,u,y=e=>e;const x=s(e,"integration-form");class j extends x{constructor(){super(...arguments),this.__postResponse=null}static get properties(){return r(r({},super.properties),{},{__postResponse:{attribute:!1}})}static get v8n(){return[({project_name:e})=>!!e||"project-name:v8n_required"]}get hiddenSelector(){return new t(`header:copy-id ${super.hiddenSelector}`.trimEnd())}renderBody(){return this.data?this.__renderSnapshotBody():this.__renderTemplateBody()}async _fetch(...e){var r;const t=this.constructor,s=await new t.API(this).fetch(...e),a="string"==typeof e[0]?null===(r=e[1])||void 0===r?void 0:r.method:e[0].method,o="string"==typeof e[0]?e[0]:e[0].url;if(!s.ok)throw s;const i=await s.json();return"POST"===(null==a?void 0:a.toUpperCase())&&o===this.parent&&(this.__postResponse=i),i}__renderSnapshotBody(){const e=this.hiddenSelector,r=this.__postResponse;return o(i||(i=y` ${0} ${0} ${0} <foxy-internal-delete-control infer="delete"></foxy-internal-delete-control> `),this.renderHeader(),e.matches("message",!0)||!r?"":this.__renderMessage(),e.matches("table")?"":this.__renderTable())}__renderTemplateBody(){return o(n||(n=y` ${0} <foxy-internal-text-control infer="project-name"></foxy-internal-text-control> <foxy-internal-text-area-control infer="project-description"> </foxy-internal-text-area-control> <foxy-internal-submit-control infer="create"></foxy-internal-submit-control> `),this.renderHeader())}__renderMessage(){return o(d||(d=y` ${0} <div class="bg-success-10 text-success p-m pb-s space-y-xs leading-s rounded-t-l rounded-b-l"> <foxy-i18n infer="message" class="block" key="text"></foxy-i18n> <vaadin-button data-testid="message-action" theme="tertiary contrast" class="p-0" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="message" key="action"></foxy-i18n> </vaadin-button> </div> ${0} `),this.renderTemplateOrSlot("message:before"),this.disabledSelector.matches("message",!0),(()=>this.__postResponse=null),this.renderTemplateOrSlot("message:after"))}__renderTable(){var e;const r=this.data,t=new Date(1e3*(null!==(e=r.expires)&&void 0!==e?e:0)),s=this.__postResponse;return o(l||(l=y` ${0} <table class="font-lumo text-m leading-m w-full"> <tbody class="divide-y divide-contrast-10"> ${0} ${0} ${0} ${0} ${0} ${0} ${0} </tbody> </table> ${0} `),this.renderTemplateOrSlot("table:before"),this.__renderTableRow({label:this.__renderTableI18n("added_by"),value:this.__renderMailToLink(r.added_by_email,r.added_by_name)}),this.__renderTableRow({label:this.__renderTableI18n("contact"),value:this.__renderMailToLink(r.contact_email,r.contact_name)}),this.__renderTableRow({label:this.__renderTableI18n("company"),value:this.__renderLink(r.company_url,r.company_name)}),this.__renderTableRow({label:this.__renderTableI18n("expires"),value:this.__renderTableI18n("expires_date",{date:t})}),this.__renderTableRow({label:"Client ID",value:this.__renderCopiableText(r.client_id)}),s?o(c||(c=y` ${0} ${0} ${0} `),this.__renderTableRow({highlight:!0,label:"Client secret",value:this.__renderCopiableText(s.client_secret)}),this.__renderTableRow({highlight:!0,label:"Refresh token",value:this.__renderCopiableText(s.refresh_token)}),this.__renderTableRow({highlight:!0,label:"Access token",value:this.__renderCopiableText(s.access_token)})):"",this.__renderTableRow({label:"Scope",value:o(h||(h=y`<code>${0}</code>`),r.scope)}),this.renderTemplateOrSlot("table:after"))}__renderCopiableText(e){return o(p||(p=y` <div class="flex items-center gap-s"> <code class="truncate flex-1">${0}</code> <foxy-copy-to-clipboard infer="copy-to-clipboard" class="inline-block" text="${0}"> </foxy-copy-to-clipboard> </div> `),e,e)}__renderMailToLink(e,r){return e?this.__renderLink(`mailto:${e}`,r):o(_||(_=y`${0}`),r)}__renderLink(e,r){return e?o(b||(b=y` <a target="_blank" class="font-medium text-primary rounded hover-underline focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> ${0} </a> `),e,r):o(m||(m=y`${0}`),r)}__renderTableRow(e){const{label:r,value:t,highlight:s=!1}=e;return o(f||(f=y` <tr class="${0}"> <td class="max-w-0 truncate py-s text-secondary w-1-3 pr-m">${0}</td> <td class="max-w-0 truncate py-s text-body w-2-3">${0}</td> </tr> `),a({"font-medium text-success":s}),r,t)}__renderTableI18n(e,r){return o(u||(u=y`<foxy-i18n infer="table" key="${0}" .options="${0}"></foxy-i18n>`),e,r)}}customElements.define("foxy-integration-form",j);export{j as IntegrationForm};
@@ -1 +1 @@
1
- import"./shared-a1f85307.js";import"./foxy-nucleon-element.js";import"./shared-5a08dbb0.js";import{_ as e}from"./shared-d1195c27.js";import{a as t}from"./shared-f61e5463.js";import{C as i}from"./shared-eeb2bd18.js";import{p as r}from"./shared-882a0fda.js";import{I as o}from"./shared-f438f0f4.js";import{i as a}from"./shared-53e42a77.js";import{d as s}from"./shared-641786b2.js";import{h as d}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-893ead61.js";import"./shared-f2c4875b.js";import"./shared-dc6eb904.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-d1dfac4d.js";import"./shared-7e9fdf64.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4e709717.js";let l,n,c,u,_,h,f=e=>e;const v=i(t(o,"item-card"));class p extends v{constructor(){super(...arguments),this.localeCodes=null,this.__transactionTemplateLoaderId="transactionTemplateLoader",this.__defaultTemplateSetLoaderId="defaultTemplateSetLoader",this.__localeCodesHelperLoaderId="localeCodesLoader",this.__transactionLoaderId="transactionLoader",this.__templateSetLoaderId="templateSetLoader",this.__storeLoaderId="storeLoader",this.__cartLoaderId="cartLoader"}static get properties(){return e(e({},super.properties),{},{localeCodes:{type:String,attribute:"locale-codes"}})}renderBody(){var e,t,i,r,o,v,m,y,x,L;const $=null!==(t=null===(e=this.data)||void 0===e?void 0:e.quantity)&&void 0!==t?t:0,g=null===(r=null===(i=this.data)||void 0===i?void 0:i._embedded)||void 0===r?void 0:r["fx:item_options"],C=null!==(v=null===(o=this.data)||void 0===o?void 0:o.price)&&void 0!==v?v:0,H=this.__currencyDisplay,b=this.__currencyCode;return d(l||(l=f` <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <div class="flex items-start leading-xs" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <img class="relative h-s w-s object-cover rounded-s bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="" @error="${0}"> <div class="flex-1 min-w-0"> <div class="h-s flex items-center"> <div class="min-w-0 flex-1 leading-s"> <div class="flex items-center justify-between"> <div class="truncate text-m font-medium"> ${0} </div> <span class="text-s text-tertiary whitespace-nowrap"> ${0} &times; <foxy-i18n .options="${0}" key="price" infer=""> </foxy-i18n> </span> </div> <div class="truncate text-secondary text-s"> ${0} ${0} &ZeroWidthSpace; </div> </div> </div> ${0} </div> </div> `),a(this.__transactionTemplateHref),this.__transactionTemplateLoaderId,(()=>this.requestUpdate()),a(this.__defaultTemplateSetHref),this.__defaultTemplateSetLoaderId,(()=>this.requestUpdate()),a(this.__localeCodesHelperHref),this.__localeCodesHelperLoaderId,(()=>this.requestUpdate()),a(this.__transactionHref),this.__transactionLoaderId,(()=>this.requestUpdate()),a(this.__templateSetHref),this.__templateSetLoaderId,(()=>this.requestUpdate()),a(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),a(this.__cartHref),this.__cartLoaderId,(()=>this.requestUpdate()),a(null===(m=this.data)||void 0===m?void 0:m.image),(e=>{e.currentTarget.src=p.__placeholder}),s(null===(y=this.data)||void 0===y?void 0:y.name)||d(n||(n=f`<foxy-i18n infer="" key="no_code"></foxy-i18n>`)),$,{amount:`${C} ${b}`,currencyDisplay:H},(null===(x=this.data)||void 0===x?void 0:x.code)||void 0,(null===(L=this.data)||void 0===L?void 0:L.subscription_frequency)&&!this.hiddenSelector.matches("autorenew-icon",!0)?d(c||(c=f` <span> &bull; </span> <foxy-i18n infer="" key="${0}" .options="${0}"> </foxy-i18n> `),this.__subinfoKey,this.__subinfoOptions):"",g&&g.length>0?d(u||(u=f` <div class="mt-m"> ${0} </div> `),g.map((e=>d(_||(_=f` <div data-testclass="option" class="flex items-center gap-s text-s leading-s"> <div class="truncate text-secondary"> ${0}: <span class="font-medium text-body">${0}</span> </div> ${0} </div> `),e.name,e.value,e.price_mod?d(h||(h=f` <div class="border-t border-dashed border-contrast-10 flex-1"></div> <div class="whitespace-nowrap text-tertiary"> <foxy-i18n options="${0}" key="price" infer=""> </foxy-i18n> </div> `),JSON.stringify({amount:`${e.price_mod} ${b}`,signDisplay:"exceptZero",currencyDisplay:H})):"")))):"")}get isBodyReady(){const e=!!this.__currencyDisplay&&!!this.__currencyCode;return super.isBodyReady&&e}get __transactionTemplateHref(){var e,t,i;try{const r=null===(e=this.data)||void 0===e?void 0:e._links,o=new URL(null!==(i=null===(t=null==r?void 0:r["fx:subscription"])||void 0===t?void 0:t.href)&&void 0!==i?i:"");return o.searchParams.set("zoom","transaction_template"),o.toString()}catch(e){}}get __defaultTemplateSetHref(){var e,t,i,r;if(""===(null===(t=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate)||void 0===t?void 0:t.template_set_uri))try{const e=new URL(null!==(r=null===(i=this.__store)||void 0===i?void 0:i._links["fx:template_sets"].href)&&void 0!==r?r:"");return e.searchParams.set("code","DEFAULT"),e.toString()}catch(e){}}get __localeCodesHelperHref(){var e;if(this.__defaultTemplateSetHref||this.__templateSetHref)return null!==(e=this.localeCodes)&&void 0!==e?e:void 0}get __transactionHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:transaction"])||void 0===t?void 0:t.href}get __templateSetHref(){var e;const t=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate;if(!(null==t?void 0:t.currency_code))return(null==t?void 0:t.template_set_uri)||void 0}get __storeHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:store"])||void 0===t?void 0:t.href}get __cartHref(){var e,t;const i=null===(e=this.data)||void 0===e?void 0:e._links;return null===(t=null==i?void 0:i["fx:cart"])||void 0===t?void 0:t.href}get __transactionTemplate(){var e,t;const i=`#${this.__transactionTemplateLoaderId}`,r=this.renderRoot.querySelector(i);return null!==(t=null===(e=null==r?void 0:r.data)||void 0===e?void 0:e._embedded["fx:transaction_template"])&&void 0!==t?t:null}get __defaultTemplateSet(){var e,t;const i=`#${this.__defaultTemplateSetLoaderId}`,r=this.renderRoot.querySelector(i);return null!==(t=null===(e=null==r?void 0:r.data)||void 0===e?void 0:e._embedded["fx:template_sets"][0])&&void 0!==t?t:null}get __localeCodesHelper(){var e,t;const i=`#${this.__localeCodesHelperLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __transaction(){var e,t;const i=`#${this.__transactionLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __templateSet(){var e,t;const i=`#${this.__templateSetLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __store(){var e,t;const i=`#${this.__storeLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __cart(){var e,t;const i=`#${this.__cartLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __currencyDisplay(){var e;const t=null===(e=this.__store)||void 0===e?void 0:e.use_international_currency_symbol;return!0===t?"code":!1===t||this.data&&!this.data._links["fx:store"]?"symbol":void 0}get __currencyCode(){var e,t,i,r;const o=this.__transaction;if(o)return o.currency_code;{const o=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate;if(null==o?void 0:o.currency_code)return o.currency_code;{const e=this.__localeCodesHelper,o=null===(i=null!==(t=this.__templateSet)&&void 0!==t?t:this.__defaultTemplateSet)||void 0===i?void 0:i.locale_code,a=o?null==e?void 0:e.values[o]:void 0;if(a)return null===(r=/Currency: ([A-Z]{3})/g.exec(a))||void 0===r?void 0:r[1]}}}get __subinfoOptions(){var t,i,o;const a=this.__currencyDisplay;if(void 0===a)return;const s=this.__currencyCode;if(void 0===s)return;const d=null===(t=this.__transactionTemplate)||void 0===t?void 0:t.total_order;if(void 0===d)return;const l=null===(i=this.data)||void 0===i?void 0:i.subscription_frequency;if(void 0===l)return;const n=null===(o=this.data)||void 0===o?void 0:o.subscription_start_date;return void 0!==n?e(e({},r(l)),{},{amount:`${d} ${s}`,currencyDisplay:a,startDate:n}):void 0}get __subinfoKey(){var e;const t=null===(e=this.data)||void 0===e?void 0:e.subscription_frequency;if(t)return"subinfo_"+(".5m"===t?"twice_a_month":"recurring")}}p.__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',customElements.define("foxy-item-card",p);export{p as ItemCard};
1
+ import"./shared-5a19b58c.js";import"./foxy-nucleon-element.js";import"./shared-94756d7c.js";import{_ as e}from"./shared-cb58dfcd.js";import{a as t}from"./shared-3e7f5663.js";import{C as i}from"./shared-5afb584d.js";import{p as r}from"./shared-918c8b20.js";import{I as o}from"./shared-2a305cf4.js";import{i as a}from"./shared-53e42a77.js";import{d as s}from"./shared-eb963ba3.js";import{h as d}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-cfb804b4.js";import"./shared-5c747b54.js";import"./shared-65b74c44.js";import"./shared-2aa23b5f.js";import"./shared-343d1fd7.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-4e709717.js";let l,n,c,u,_,h,v=e=>e;const f=i(t(o,"item-card"));class p extends f{constructor(){super(...arguments),this.localeCodes=null,this.__transactionTemplateLoaderId="transactionTemplateLoader",this.__defaultTemplateSetLoaderId="defaultTemplateSetLoader",this.__localeCodesHelperLoaderId="localeCodesLoader",this.__transactionLoaderId="transactionLoader",this.__templateSetLoaderId="templateSetLoader",this.__storeLoaderId="storeLoader",this.__cartLoaderId="cartLoader"}static get properties(){return e(e({},super.properties),{},{localeCodes:{type:String,attribute:"locale-codes"}})}renderBody(){var e,t,i,r,o,f,m,y,x,L;const $=null!==(t=null===(e=this.data)||void 0===e?void 0:e.quantity)&&void 0!==t?t:0,g=null===(r=null===(i=this.data)||void 0===i?void 0:i._embedded)||void 0===r?void 0:r["fx:item_options"],C=null!==(f=null===(o=this.data)||void 0===o?void 0:o.price)&&void 0!==f?f:0,H=this.__currencyDisplay,b=this.__currencyCode;return d(l||(l=v` <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <div class="flex items-start leading-xs" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <img class="relative h-s w-s object-cover rounded-s bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="" @error="${0}"> <div class="flex-1 min-w-0"> <div class="h-s flex items-center"> <div class="min-w-0 flex-1 leading-s"> <div class="flex items-center justify-between"> <div class="truncate text-m font-medium"> ${0} </div> <span class="text-s text-tertiary whitespace-nowrap"> ${0} &times; <foxy-i18n .options="${0}" key="price" infer=""> </foxy-i18n> </span> </div> <div class="truncate text-secondary text-s"> ${0} ${0} &ZeroWidthSpace; </div> </div> </div> ${0} </div> </div> `),a(this.__transactionTemplateHref),this.__transactionTemplateLoaderId,(()=>this.requestUpdate()),a(this.__defaultTemplateSetHref),this.__defaultTemplateSetLoaderId,(()=>this.requestUpdate()),a(this.__localeCodesHelperHref),this.__localeCodesHelperLoaderId,(()=>this.requestUpdate()),a(this.__transactionHref),this.__transactionLoaderId,(()=>this.requestUpdate()),a(this.__templateSetHref),this.__templateSetLoaderId,(()=>this.requestUpdate()),a(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),a(this.__cartHref),this.__cartLoaderId,(()=>this.requestUpdate()),a(null===(m=this.data)||void 0===m?void 0:m.image),(e=>{e.currentTarget.src=p.__placeholder}),s(null===(y=this.data)||void 0===y?void 0:y.name)||d(n||(n=v`<foxy-i18n infer="" key="no_code"></foxy-i18n>`)),$,{amount:`${C} ${b}`,currencyDisplay:H},(null===(x=this.data)||void 0===x?void 0:x.code)||void 0,(null===(L=this.data)||void 0===L?void 0:L.subscription_frequency)&&!this.hiddenSelector.matches("autorenew-icon",!0)?d(c||(c=v` <span> &bull; </span> <foxy-i18n infer="" key="${0}" .options="${0}"> </foxy-i18n> `),this.__subinfoKey,this.__subinfoOptions):"",g&&g.length>0?d(u||(u=v` <div class="mt-m"> ${0} </div> `),g.map((e=>d(_||(_=v` <div data-testclass="option" class="flex items-center gap-s text-s leading-s"> <div class="truncate text-secondary"> ${0}: <span class="font-medium text-body">${0}</span> </div> ${0} </div> `),e.name,e.value,e.price_mod?d(h||(h=v` <div class="border-t border-dashed border-contrast-10 flex-1"></div> <div class="whitespace-nowrap text-tertiary"> <foxy-i18n options="${0}" key="price" infer=""> </foxy-i18n> </div> `),JSON.stringify({amount:`${e.price_mod} ${b}`,signDisplay:"exceptZero",currencyDisplay:H})):"")))):"")}get isBodyReady(){const e=!!this.__currencyDisplay&&!!this.__currencyCode;return super.isBodyReady&&e}get __transactionTemplateHref(){var e,t,i;try{const r=null===(e=this.data)||void 0===e?void 0:e._links,o=new URL(null!==(i=null===(t=null==r?void 0:r["fx:subscription"])||void 0===t?void 0:t.href)&&void 0!==i?i:"");return o.searchParams.set("zoom","transaction_template"),o.toString()}catch(e){}}get __defaultTemplateSetHref(){var e,t,i,r;if(""===(null===(t=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate)||void 0===t?void 0:t.template_set_uri))try{const e=new URL(null!==(r=null===(i=this.__store)||void 0===i?void 0:i._links["fx:template_sets"].href)&&void 0!==r?r:"");return e.searchParams.set("code","DEFAULT"),e.toString()}catch(e){}}get __localeCodesHelperHref(){var e;if(this.__defaultTemplateSetHref||this.__templateSetHref)return null!==(e=this.localeCodes)&&void 0!==e?e:void 0}get __transactionHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:transaction"])||void 0===t?void 0:t.href}get __templateSetHref(){var e;const t=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate;if(!(null==t?void 0:t.currency_code))return(null==t?void 0:t.template_set_uri)||void 0}get __storeHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:store"])||void 0===t?void 0:t.href}get __cartHref(){var e,t;const i=null===(e=this.data)||void 0===e?void 0:e._links;return null===(t=null==i?void 0:i["fx:cart"])||void 0===t?void 0:t.href}get __transactionTemplate(){var e,t;const i=`#${this.__transactionTemplateLoaderId}`,r=this.renderRoot.querySelector(i);return null!==(t=null===(e=null==r?void 0:r.data)||void 0===e?void 0:e._embedded["fx:transaction_template"])&&void 0!==t?t:null}get __defaultTemplateSet(){var e,t;const i=`#${this.__defaultTemplateSetLoaderId}`,r=this.renderRoot.querySelector(i);return null!==(t=null===(e=null==r?void 0:r.data)||void 0===e?void 0:e._embedded["fx:template_sets"][0])&&void 0!==t?t:null}get __localeCodesHelper(){var e,t;const i=`#${this.__localeCodesHelperLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __transaction(){var e,t;const i=`#${this.__transactionLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __templateSet(){var e,t;const i=`#${this.__templateSetLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __store(){var e,t;const i=`#${this.__storeLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __cart(){var e,t;const i=`#${this.__cartLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __currencyDisplay(){var e;const t=null===(e=this.__store)||void 0===e?void 0:e.use_international_currency_symbol;return!0===t?"code":!1===t||this.data&&!this.data._links["fx:store"]?"symbol":void 0}get __currencyCode(){var e,t,i,r;const o=this.__transaction;if(o)return o.currency_code;{const o=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate;if(null==o?void 0:o.currency_code)return o.currency_code;{const e=this.__localeCodesHelper,o=null===(i=null!==(t=this.__templateSet)&&void 0!==t?t:this.__defaultTemplateSet)||void 0===i?void 0:i.locale_code,a=o?null==e?void 0:e.values[o]:void 0;if(a)return null===(r=/Currency: ([A-Z]{3})/g.exec(a))||void 0===r?void 0:r[1]}}}get __subinfoOptions(){var t,i,o;const a=this.__currencyDisplay;if(void 0===a)return;const s=this.__currencyCode;if(void 0===s)return;const d=null===(t=this.__transactionTemplate)||void 0===t?void 0:t.total_order;if(void 0===d)return;const l=null===(i=this.data)||void 0===i?void 0:i.subscription_frequency;if(void 0===l)return;const n=null===(o=this.data)||void 0===o?void 0:o.subscription_start_date;return void 0!==n?e(e({},r(l)),{},{amount:`${d} ${s}`,currencyDisplay:a,startDate:n}):void 0}get __subinfoKey(){var e;const t=null===(e=this.data)||void 0===e?void 0:e.subscription_frequency;if(t)return"subinfo_"+(".5m"===t?"twice_a_month":"recurring")}}p.__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',customElements.define("foxy-item-card",p);export{p as ItemCard};
@@ -1 +1 @@
1
- import"./shared-5212ef4f.js";import"./foxy-spinner.js";import{a as r}from"./shared-f61e5463.js";import{T as s}from"./shared-fcf6424c.js";import{h as e}from"./shared-ba5c42c7.js";import"./shared-893ead61.js";import"./shared-f2c4875b.js";import"./shared-dc6eb904.js";import"./shared-5a08dbb0.js";import"./shared-d1195c27.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-eeb2bd18.js";import"./shared-53e42a77.js";import"./shared-f438f0f4.js";import"./shared-d1dfac4d.js";import"./shared-7e9fdf64.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4e709717.js";let d,a,t=r=>r;const o=r(s,"item-category-card");class m extends o{renderBody(){return super.renderBody({title:r=>e(d||(d=t`${0}`),r.name),subtitle:r=>e(a||(a=t`${0}`),r.code)})}}customElements.define("foxy-item-category-card",m);export{m as ItemCategoryCard};
1
+ import"./shared-5212ef4f.js";import"./foxy-spinner.js";import{a as r}from"./shared-3e7f5663.js";import{T as s}from"./shared-3c54cb67.js";import{h as e}from"./shared-ba5c42c7.js";import"./shared-cfb804b4.js";import"./shared-5c747b54.js";import"./shared-65b74c44.js";import"./shared-94756d7c.js";import"./shared-cb58dfcd.js";import"./shared-343d1fd7.js";import"./shared-2aa23b5f.js";import"./shared-5afb584d.js";import"./shared-53e42a77.js";import"./shared-2a305cf4.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-4e709717.js";let d,a,t=r=>r;const o=r(s,"item-category-card");class m extends o{renderBody(){return super.renderBody({title:r=>e(d||(d=t`${0}`),r.name),subtitle:r=>e(a||(a=t`${0}`),r.code)})}}customElements.define("foxy-item-category-card",m);export{m as ItemCategoryCard};