@foxy.io/elements 1.31.1 → 1.32.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (270) hide show
  1. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  2. package/dist/cdn/foxy-address-card.js +1 -1
  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 +1 -1
  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-filter-attribute-card.js +1 -1
  47. package/dist/cdn/foxy-filter-attribute-form.js +1 -1
  48. package/dist/cdn/foxy-form-dialog.js +1 -1
  49. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  50. package/dist/cdn/foxy-gift-card-card.js +1 -1
  51. package/dist/cdn/foxy-gift-card-code-card.js +1 -1
  52. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  53. package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
  54. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  55. package/dist/cdn/foxy-gift-card-form.js +1 -1
  56. package/dist/cdn/foxy-i18n-editor.js +1 -1
  57. package/dist/cdn/foxy-i18n.js +1 -1
  58. package/dist/cdn/foxy-integration-card.js +1 -1
  59. package/dist/cdn/foxy-integration-form.js +1 -1
  60. package/dist/cdn/foxy-item-card.js +1 -1
  61. package/dist/cdn/foxy-item-category-card.js +1 -1
  62. package/dist/cdn/foxy-item-category-form.js +1 -1
  63. package/dist/cdn/foxy-item-form.js +1 -1
  64. package/dist/cdn/foxy-item-option-card.js +1 -1
  65. package/dist/cdn/foxy-item-option-form.js +1 -1
  66. package/dist/cdn/foxy-items-form.js +1 -1
  67. package/dist/cdn/foxy-native-integration-card.js +1 -1
  68. package/dist/cdn/foxy-native-integration-form.js +1 -1
  69. package/dist/cdn/foxy-nucleon-element.js +1 -1
  70. package/dist/cdn/foxy-pagination.js +1 -1
  71. package/dist/cdn/foxy-passkey-card.js +1 -1
  72. package/dist/cdn/foxy-passkey-form.js +1 -1
  73. package/dist/cdn/foxy-payment-card-embed.js +1 -1
  74. package/dist/cdn/foxy-payment-card.js +1 -1
  75. package/dist/cdn/foxy-payment-method-card.js +1 -1
  76. package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
  77. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
  78. package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
  79. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
  80. package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
  81. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
  82. package/dist/cdn/foxy-payments-api.js +1 -1
  83. package/dist/cdn/foxy-query-builder.js +2 -2
  84. package/dist/cdn/foxy-report-form.js +2 -2
  85. package/dist/cdn/foxy-reports-table.js +1 -1
  86. package/dist/cdn/foxy-shipment-card.js +1 -1
  87. package/dist/cdn/foxy-shipping-container-card.js +1 -1
  88. package/dist/cdn/foxy-shipping-drop-type-card.js +1 -1
  89. package/dist/cdn/foxy-shipping-method-card.js +1 -1
  90. package/dist/cdn/foxy-shipping-service-card.js +1 -1
  91. package/dist/cdn/foxy-sign-in-form.js +1 -1
  92. package/dist/cdn/foxy-spinner.js +2 -2
  93. package/dist/cdn/foxy-store-card.js +1 -1
  94. package/dist/cdn/foxy-store-form.js +1 -1
  95. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  96. package/dist/cdn/foxy-subscription-card.js +1 -1
  97. package/dist/cdn/foxy-subscription-form.js +1 -1
  98. package/dist/cdn/foxy-subscription-settings-form.js +1 -1
  99. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  100. package/dist/cdn/foxy-table.js +1 -1
  101. package/dist/cdn/foxy-tax-card.js +1 -1
  102. package/dist/cdn/foxy-tax-form.js +1 -1
  103. package/dist/cdn/foxy-template-config-form.js +1 -1
  104. package/dist/cdn/foxy-template-form.js +1 -1
  105. package/dist/cdn/foxy-template-set-card.js +1 -1
  106. package/dist/cdn/foxy-template-set-form.js +1 -1
  107. package/dist/cdn/foxy-transaction-card.js +1 -1
  108. package/dist/cdn/foxy-transaction.js +1 -1
  109. package/dist/cdn/foxy-transactions-table.js +1 -1
  110. package/dist/cdn/foxy-update-payment-method-form.js +1 -1
  111. package/dist/cdn/foxy-user-card.js +1 -1
  112. package/dist/cdn/foxy-user-form.js +1 -1
  113. package/dist/cdn/foxy-user-invitation-card.js +1 -0
  114. package/dist/cdn/foxy-user-invitation-form.js +1 -0
  115. package/dist/cdn/foxy-users-table.js +1 -1
  116. package/dist/cdn/foxy-webhook-card.js +1 -1
  117. package/dist/cdn/foxy-webhook-form.js +1 -1
  118. package/dist/cdn/foxy-webhook-log-card.js +1 -1
  119. package/dist/cdn/foxy-webhook-status-card.js +1 -1
  120. package/dist/cdn/{shared-4b346553.js → shared-011d6240.js} +1 -1
  121. package/dist/cdn/{shared-12a7a15d.js → shared-019348d7.js} +1 -1
  122. package/dist/cdn/{shared-d132bd37.js → shared-045bd59c.js} +1 -1
  123. package/dist/cdn/{shared-536a2d53.js → shared-08c637a9.js} +1 -1
  124. package/dist/cdn/{shared-f2968508.js → shared-08e42e78.js} +2 -2
  125. package/dist/cdn/{shared-61b6ef6e.js → shared-0a24f318.js} +1 -1
  126. package/dist/cdn/{shared-01b2cad8.js → shared-0e156ee7.js} +1 -1
  127. package/dist/cdn/{shared-0cc5420d.js → shared-0e44bfff.js} +1 -1
  128. package/dist/cdn/{shared-fb0ca5e2.js → shared-0f261023.js} +1 -1
  129. package/dist/cdn/{shared-f7a1193f.js → shared-17a61265.js} +1 -1
  130. package/dist/cdn/shared-1aff7995.js +1 -0
  131. package/dist/cdn/{shared-ef78d7d9.js → shared-1c169878.js} +1 -1
  132. package/dist/cdn/{shared-2a5c89a4.js → shared-1cd2db2d.js} +1 -1
  133. package/dist/cdn/{shared-b08ca8d0.js → shared-1cfea4b6.js} +1 -1
  134. package/dist/cdn/{shared-9b2d6d62.js → shared-24c7c37f.js} +1 -1
  135. package/dist/cdn/{shared-8cd578ee.js → shared-25324930.js} +1 -1
  136. package/dist/cdn/{shared-ce172224.js → shared-26425c01.js} +1 -1
  137. package/dist/cdn/{shared-24d71d01.js → shared-2ad18636.js} +1 -1
  138. package/dist/cdn/{shared-0f67d020.js → shared-30b4c05b.js} +1 -1
  139. package/dist/cdn/{shared-f407c2cb.js → shared-3491d10e.js} +1 -1
  140. package/dist/cdn/{shared-280f868d.js → shared-34c84b9f.js} +1 -1
  141. package/dist/cdn/{shared-1f0b8b7e.js → shared-37cf92bd.js} +1 -1
  142. package/dist/cdn/{shared-388e9240.js → shared-3a066450.js} +1 -1
  143. package/dist/cdn/{shared-55e95bd2.js → shared-45bef1ac.js} +1 -1
  144. package/dist/cdn/{shared-5be5874d.js → shared-45ecb912.js} +1 -1
  145. package/dist/cdn/{shared-da9e048f.js → shared-4a86d1ca.js} +1 -1
  146. package/dist/cdn/{shared-44ce656d.js → shared-4d543043.js} +1 -1
  147. package/dist/cdn/{shared-029d623b.js → shared-4e1b5fa3.js} +1 -1
  148. package/dist/cdn/{shared-fb34e84c.js → shared-4efc6bb8.js} +2 -2
  149. package/dist/cdn/{shared-37efab30.js → shared-51bb937b.js} +1 -1
  150. package/dist/cdn/{shared-0700fd80.js → shared-537d2efe.js} +1 -1
  151. package/dist/cdn/{shared-7d38cb8a.js → shared-55bc51c8.js} +1 -1
  152. package/dist/cdn/shared-56ba2d28.js +1 -0
  153. package/dist/cdn/{shared-3c3497d6.js → shared-56d1eae5.js} +1 -1
  154. package/dist/cdn/{shared-60d586ba.js → shared-57cc81b4.js} +1 -1
  155. package/dist/cdn/{shared-199e3870.js → shared-5ff1affd.js} +1 -1
  156. package/dist/cdn/shared-620dccaa.js +1 -0
  157. package/dist/cdn/{shared-6ac0d05e.js → shared-641786b2.js} +1 -1
  158. package/dist/cdn/{shared-56bf05ef.js → shared-64d9ac2a.js} +1 -1
  159. package/dist/cdn/shared-73c1d31e.js +1 -0
  160. package/dist/cdn/{shared-fc1dfa64.js → shared-783f6e58.js} +1 -1
  161. package/dist/cdn/{shared-7c411b0a.js → shared-787e52c4.js} +1 -1
  162. package/dist/cdn/{shared-08e0a194.js → shared-838cc86b.js} +1 -1
  163. package/dist/cdn/{shared-5a2f398c.js → shared-85989cf3.js} +1 -1
  164. package/dist/cdn/{shared-91f5e0b3.js → shared-87b5a6aa.js} +1 -1
  165. package/dist/cdn/{shared-09b4185a.js → shared-8a8bfd72.js} +1 -1
  166. package/dist/cdn/{shared-d1c10d58.js → shared-8b9ae780.js} +1 -1
  167. package/dist/cdn/{shared-c8a6496c.js → shared-8f3fdf8b.js} +1 -1
  168. package/dist/cdn/{shared-19884cf4.js → shared-906fe068.js} +1 -1
  169. package/dist/cdn/{shared-21bc5d5e.js → shared-91560256.js} +1 -1
  170. package/dist/cdn/{shared-ac0368ec.js → shared-9411a937.js} +1 -1
  171. package/dist/cdn/{shared-245f8836.js → shared-978aaaf2.js} +1 -1
  172. package/dist/cdn/shared-97e1f413.js +1 -0
  173. package/dist/cdn/{shared-522a172d.js → shared-9cf15285.js} +1 -1
  174. package/dist/cdn/{shared-d8c3067b.js → shared-9de0a899.js} +1 -1
  175. package/dist/cdn/{shared-b8198665.js → shared-9e94c56d.js} +1 -1
  176. package/dist/cdn/{shared-f3773d62.js → shared-9ef03974.js} +1 -1
  177. package/dist/cdn/{shared-0e055562.js → shared-a4b0ccf4.js} +1 -1
  178. package/dist/cdn/{shared-c388e926.js → shared-ac6e1790.js} +1 -1
  179. package/dist/cdn/{shared-453d8f75.js → shared-b6ab5711.js} +1 -1
  180. package/dist/cdn/{shared-937b497c.js → shared-b74187e9.js} +1 -1
  181. package/dist/cdn/{shared-16c17e32.js → shared-be093279.js} +1 -1
  182. package/dist/cdn/{shared-6d645dc5.js → shared-c2efc54e.js} +1 -1
  183. package/dist/cdn/{shared-ce75e928.js → shared-c40a4b0c.js} +1 -1
  184. package/dist/cdn/{shared-c286c5ad.js → shared-c518ece2.js} +1 -1
  185. package/dist/cdn/{shared-56a559fd.js → shared-c6b69d4e.js} +1 -1
  186. package/dist/cdn/{shared-e24da82e.js → shared-c7ffb9f2.js} +1 -1
  187. package/dist/cdn/{shared-6918312e.js → shared-c89f7ad5.js} +1 -1
  188. package/dist/cdn/{shared-6e859df6.js → shared-c9f3f8d3.js} +1 -1
  189. package/dist/cdn/shared-d1195c27.js +15 -0
  190. package/dist/cdn/{shared-0b01f721.js → shared-d1cb97c6.js} +1 -1
  191. package/dist/cdn/{shared-f11b2116.js → shared-d713c00f.js} +1 -1
  192. package/dist/cdn/shared-d8bffb38.js +14 -0
  193. package/dist/cdn/{shared-8f3398dc.js → shared-d8cd61ed.js} +1 -1
  194. package/dist/cdn/{shared-a207423c.js → shared-de45ad84.js} +1 -1
  195. package/dist/cdn/{shared-90a47948.js → shared-e1850e5f.js} +1 -1
  196. package/dist/cdn/{shared-a49a2300.js → shared-e3647540.js} +1 -1
  197. package/dist/cdn/{shared-28f74114.js → shared-ed9c9bab.js} +1 -1
  198. package/dist/cdn/{shared-edbf7378.js → shared-eff5dcb0.js} +1 -1
  199. package/dist/cdn/{shared-0a6a28ce.js → shared-f0d70be1.js} +1 -1
  200. package/dist/cdn/{shared-c2776a33.js → shared-f97ed2ff.js} +1 -1
  201. package/dist/cdn/{shared-ee36b83f.js → shared-fcdb896f.js} +1 -1
  202. package/dist/cdn/translations/cart-form/en.json +79 -68
  203. package/dist/cdn/translations/user-invitation-card/en.json +17 -0
  204. package/dist/cdn/translations/user-invitation-form/en.json +94 -0
  205. package/dist/elements/internal/InternalResourcePickerControl/InternalResourcePickerControl.d.ts +3 -0
  206. package/dist/elements/internal/InternalResourcePickerControl/InternalResourcePickerControl.js +51 -16
  207. package/dist/elements/internal/InternalResourcePickerControl/InternalResourcePickerControl.js.map +1 -1
  208. package/dist/elements/internal/InternalResourcePickerControl/index.d.ts +2 -0
  209. package/dist/elements/internal/InternalResourcePickerControl/index.js +2 -0
  210. package/dist/elements/internal/InternalResourcePickerControl/index.js.map +1 -1
  211. package/dist/elements/public/CartForm/CartForm.d.ts +2 -0
  212. package/dist/elements/public/CartForm/CartForm.js +15 -11
  213. package/dist/elements/public/CartForm/CartForm.js.map +1 -1
  214. package/dist/elements/public/CopyToClipboard/CopyToClipboard.d.ts +7 -1
  215. package/dist/elements/public/CopyToClipboard/CopyToClipboard.js +60 -30
  216. package/dist/elements/public/CopyToClipboard/CopyToClipboard.js.map +1 -1
  217. package/dist/elements/public/UserCard/UserCard.d.ts +7 -0
  218. package/dist/elements/public/UserCard/UserCard.js +81 -2
  219. package/dist/elements/public/UserCard/UserCard.js.map +1 -1
  220. package/dist/elements/public/UserCard/index.d.ts +1 -0
  221. package/dist/elements/public/UserCard/index.js +1 -0
  222. package/dist/elements/public/UserCard/index.js.map +1 -1
  223. package/dist/elements/public/UserInvitationCard/UserInvitationCard.d.ts +16 -0
  224. package/dist/elements/public/UserInvitationCard/UserInvitationCard.js +110 -0
  225. package/dist/elements/public/UserInvitationCard/UserInvitationCard.js.map +1 -0
  226. package/dist/elements/public/UserInvitationCard/index.d.ts +4 -0
  227. package/dist/elements/public/UserInvitationCard/index.js +6 -0
  228. package/dist/elements/public/UserInvitationCard/index.js.map +1 -0
  229. package/dist/elements/public/UserInvitationCard/types.d.ts +1 -0
  230. package/dist/elements/public/UserInvitationCard/types.js +2 -0
  231. package/dist/elements/public/UserInvitationCard/types.js.map +1 -0
  232. package/dist/elements/public/UserInvitationForm/UserInvitationForm.d.ts +29 -0
  233. package/dist/elements/public/UserInvitationForm/UserInvitationForm.js +313 -0
  234. package/dist/elements/public/UserInvitationForm/UserInvitationForm.js.map +1 -0
  235. package/dist/elements/public/UserInvitationForm/index.d.ts +7 -0
  236. package/dist/elements/public/UserInvitationForm/index.js +9 -0
  237. package/dist/elements/public/UserInvitationForm/index.js.map +1 -0
  238. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/InternalUserInvitationFormAsyncAction.d.ts +10 -0
  239. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/InternalUserInvitationFormAsyncAction.js +51 -0
  240. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/InternalUserInvitationFormAsyncAction.js.map +1 -0
  241. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/index.d.ts +5 -0
  242. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/index.js +7 -0
  243. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/index.js.map +1 -0
  244. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormSyncAction/InternalUserInvitationFormSyncAction.d.ts +9 -0
  245. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormSyncAction/InternalUserInvitationFormSyncAction.js +32 -0
  246. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormSyncAction/InternalUserInvitationFormSyncAction.js.map +1 -0
  247. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormSyncAction/index.d.ts +5 -0
  248. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormSyncAction/index.js +7 -0
  249. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormSyncAction/index.js.map +1 -0
  250. package/dist/elements/public/UserInvitationForm/types.d.ts +33 -0
  251. package/dist/elements/public/UserInvitationForm/types.js +2 -0
  252. package/dist/elements/public/UserInvitationForm/types.js.map +1 -0
  253. package/dist/elements/public/index.d.ts +2 -0
  254. package/dist/elements/public/index.defined.d.ts +2 -0
  255. package/dist/elements/public/index.defined.js +2 -0
  256. package/dist/elements/public/index.defined.js.map +1 -1
  257. package/dist/elements/public/index.js +2 -0
  258. package/dist/elements/public/index.js.map +1 -1
  259. package/dist/mixins/themeable.js +8 -0
  260. package/dist/mixins/themeable.js.map +1 -1
  261. package/dist/utils/get-gravatar-url.d.ts +1 -0
  262. package/dist/utils/get-gravatar-url.js +8 -0
  263. package/dist/utils/get-gravatar-url.js.map +1 -0
  264. package/package.json +1 -1
  265. package/dist/cdn/shared-0f6e4584.js +0 -15
  266. package/dist/cdn/shared-3ee151ce.js +0 -1
  267. package/dist/cdn/shared-6474675f.js +0 -1
  268. package/dist/cdn/shared-9db46672.js +0 -1
  269. package/dist/cdn/shared-e778071b.js +0 -1
  270. package/dist/cdn/shared-f34aeb6c.js +0 -1
@@ -1,4 +1,4 @@
1
- import"./shared-90a47948.js";import{h}from"./shared-44ce656d.js";
1
+ import"./shared-e1850e5f.js";import{h}from"./shared-4d543043.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
@@ -0,0 +1 @@
1
+ import{_ as r}from"./shared-d1195c27.js";import{p as s}from"./shared-51bb937b.js";function t(t){var n;const o=s(t),a=null!==(n={y:"yearly",m:"monthly",w:"weekly",d:"daily"}[o.units])&&void 0!==n?n:o.units;return r(r({},o),{},{units:a})}export{t as p};
@@ -1 +1 @@
1
- import{_ as e}from"./shared-0f6e4584.js";import{c as t,L as s,h as i}from"./shared-dc73b9a5.js";import{A as o}from"./shared-c286c5ad.js";import{C as a}from"./shared-0b01f721.js";import{T as n,R as l,a as d}from"./shared-fb34e84c.js";import{I as r}from"./shared-f7a1193f.js";import{F as h}from"./shared-343d1fd7.js";import{c}from"./shared-4e709717.js";class u extends CustomEvent{constructor(e=!1){super("hide",{detail:{cancelled:e}})}}class p extends CustomEvent{constructor(){super("show")}}let m,v=e=>e;class b extends(a(n(l(d(r(s)))))){constructor(){super(...arguments),this.group=""}static get properties(){return e(e({},super.properties),{},{group:{}})}static get styles(){return[super.styles,t(m||(m=v`:host{position:relative;z-index:200}`))]}}let _,g,y,f,w,x,$,C=e=>e;const D=d(a(n(r(s))));class k extends D{constructor(){super(...arguments),this.closable=!1,this.editable=!1,this.header="",this.group="",this.alert=!1,this.wide=!1,this.__handleKeyDown=e=>{"Escape"===e.key&&k.openDialogs[0]===this&&this.closable&&this.hide(this.editable)},this.__connected=!1,this.__visible=!1}static get properties(){return e(e({},super.properties),{},{__connected:{attribute:!1},__visible:{attribute:!1},centered:{type:Boolean},closable:{type:Boolean},editable:{type:Boolean},header:{type:String},group:{},alert:{type:Boolean},wide:{type:Boolean},open:{type:Boolean,noAccessor:!0}})}static get styles(){return[super.styles,t(_||(_=C`.grid-cols-header{grid-template-columns:1fr auto 1fr}.scale-85{--tw-scale-x:0.85;--tw-scale-y:0.85}.max-h-alert{max-height:calc(100dvh - var(--lumo-size-l) - var(--lumo-space-m) * 2)}`))]}get open(){return this.__visible&&this.__connected}set open(e){e===this.open||(e?this.show():this.hide(this.editable))}connectedCallback(){super.connectedCallback(),addEventListener("keydown",this.__handleKeyDown)}disconnectedCallback(){var e;super.disconnectedCallback(),removeEventListener("keydown",this.__handleKeyDown),null===(e=k.dialogWindows.get(this))||void 0===e||e.remove(),k.dialogWindows.delete(this)}createRenderRoot(){const e=new b,t=document.querySelectorAll(k.dialogWindowsHost),s=Array.from(t).pop();return e.addEventListener("fetch",(e=>{e instanceof h&&(e.stopImmediatePropagation(),e.preventDefault(),e.respondWith(new o(this).fetch(e.request)))})),null==s||s.appendChild(e),k.dialogWindows.set(this,e),e.shadowRoot}render(e){if(!this.__connected)return i(g||(g=C``));const t=k.openDialogs[0]===this,s=k.openDialogs[1]===this,o=k.openDialogs[2]===this,a=!t&&!s&&!o;return i(y||(y=C` <div class="${0}"> <div id="backdrop" class="${0}" tabindex="-1" @click="${0}"></div> <div tabindex="0" role="dialog" aria-labelledby="dialog-title" class="${0}"> <div class="${0}"> <div class="h-l grid grid-cols-header text-m font-lumo font-medium border-b border-contrast-10"> ${0} <h1 id="dialog-title" class="truncate self-center text-center"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </h1> ${0} </div> <div class="${0}"> <div class="p-m relative">${0}</div> </div> </div> </div> </div> `),c({"z-50 fixed inset-0":!0,"pointer-events-none":!this.__visible}),c({"select-none ease-in-out transition duration-500 absolute inset-0 bg-shade-50 focus-outline-none":!0,"opacity-100":this.__visible,"opacity-0":!this.__visible}),(()=>this.closable&&this.hide(this.editable)),c({"transform ease-in-out transition duration-500 relative h-full ml-auto":!0,"origin-bottom sm-origin-center":!0,"focus-outline-none":!0,"sm-max-w-modal":!this.wide,"sm-max-w-modal-wide":this.wide,"flex justify-center items-end sm-items-center mr-auto":this.alert,"translate-y-full sm-translate-y-0":!this.__visible,"sm-translate-x-full":!this.alert&&!this.__visible,"sm-opacity-0 sm-scale-110":this.alert&&!this.__visible,"translate-y-0 translate-x-0":t&&this.__visible,"scale-95 -translate-y-s sm-translate-y-0":s&&this.__visible,"scale-90 -translate-y-m sm-translate-y-0":o&&this.__visible,"opacity-0 scale-85 -translate-y-l sm-translate-y-0":a&&this.__visible}),c({"overflow-hidden flex flex-col bg-base rounded-t-l sm-rounded-b-l":!0,"absolute inset-0 mt-xl sm-m-xl":!this.alert,"shadow-xxl":this.__visible,"flex-1":this.alert}),this.closable&&!this.hiddenSelector.matches("close-button",!0)?i(f||(f=C` <vaadin-button id="close-button" theme="tertiary-inline" class="mr-auto m-s px-s" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> </vaadin-button> `),this.disabledSelector.matches("close-button",!0),(()=>this.hide(this.editable)),this.lang,this.editable?"cancel":"close",this.ns):i(w||(w=C`<div></div>`)),this.ns,this.lang,this.header,this.editable&&!this.hiddenSelector.matches("save-button",!0)?i(x||(x=C` <vaadin-button data-testid="save-button" ?disabled="${0}" theme="primary" class="ml-auto h-auto min-h-0 min-w-0 m-xs px-m" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="save"></foxy-i18n> </vaadin-button> `),this.disabledSelector.matches("save-button",!0),this.save,this.ns,this.lang):i($||($=C`<div></div>`)),c({"flex-1 overflow-y-auto overflow-x-hidden overscroll-contain":!0,"max-h-alert":this.alert}),null==e?void 0:e())}updated(e){super.updated(e);const t=k.dialogWindows.get(this);t&&(t.disabledControls=this.disabledControls,t.disabled=this.disabled,t.readonlyControls=this.readonlyControls,t.readonly=this.readonly,t.hiddenControls=this.hiddenControls,t.hidden=this.hidden,t.group=this.group,t.lang=this.lang,t.ns=this.ns)}async hide(e=!1){var t;null===(t=this.__returnFocusTo)||void 0===t||t.focus(),await this.__setOpenDialogs(k.openDialogs.filter((e=>e!==this))),await this.__setConnected(!1),this.dispatchEvent(new k.HideEvent(!!e))}async show(e){var t;this.__returnFocusTo=e,await this.__setConnected(!0),await this.__setOpenDialogs([this,...k.openDialogs]),null===(t=this.renderRoot.querySelector('[role="dialog"]'))||void 0===t||t.focus(),this.dispatchEvent(new k.ShowEvent)}async save(){await this.hide(!1)}async __setOpenDialogs(e){k.openDialogs.length=0,k.openDialogs.push(...e),await Promise.all([Promise.all(k.openDialogs.map((e=>e.requestUpdate()))),new Promise((e=>{const t=this.renderRoot.querySelector("#backdrop");t?(t.addEventListener("transitionend",(()=>e()),{once:!0}),setTimeout((()=>e()),2e3)):e(),this.__visible=k.openDialogs.includes(this)}))])}async __setConnected(e){this.__connected=e,await this.updateComplete.then((()=>this.getBoundingClientRect()))}}k.dialogWindowsHost="#foxy-dialog-windows-host, body",k.dialogWindows=new WeakMap,k.openDialogs=[],k.ShowEvent=p,k.HideEvent=u,customElements.define("foxy-dialog-window",b);export{k as D};
1
+ import{_ as e}from"./shared-d1195c27.js";import{c as t,L as s,h as i}from"./shared-dc73b9a5.js";import{A as o}from"./shared-c518ece2.js";import{C as a}from"./shared-d1cb97c6.js";import{T as n,R as l,a as d}from"./shared-4efc6bb8.js";import{I as r}from"./shared-17a61265.js";import{F as h}from"./shared-343d1fd7.js";import{c}from"./shared-4e709717.js";class u extends CustomEvent{constructor(e=!1){super("hide",{detail:{cancelled:e}})}}class p extends CustomEvent{constructor(){super("show")}}let m,v=e=>e;class b extends(a(n(l(d(r(s)))))){constructor(){super(...arguments),this.group=""}static get properties(){return e(e({},super.properties),{},{group:{}})}static get styles(){return[super.styles,t(m||(m=v`:host{position:relative;z-index:200}`))]}}let _,g,y,f,w,x,$,C=e=>e;const D=d(a(n(r(s))));class k extends D{constructor(){super(...arguments),this.closable=!1,this.editable=!1,this.header="",this.group="",this.alert=!1,this.wide=!1,this.__handleKeyDown=e=>{"Escape"===e.key&&k.openDialogs[0]===this&&this.closable&&this.hide(this.editable)},this.__connected=!1,this.__visible=!1}static get properties(){return e(e({},super.properties),{},{__connected:{attribute:!1},__visible:{attribute:!1},centered:{type:Boolean},closable:{type:Boolean},editable:{type:Boolean},header:{type:String},group:{},alert:{type:Boolean},wide:{type:Boolean},open:{type:Boolean,noAccessor:!0}})}static get styles(){return[super.styles,t(_||(_=C`.grid-cols-header{grid-template-columns:1fr auto 1fr}.scale-85{--tw-scale-x:0.85;--tw-scale-y:0.85}.max-h-alert{max-height:calc(100dvh - var(--lumo-size-l) - var(--lumo-space-m) * 2)}`))]}get open(){return this.__visible&&this.__connected}set open(e){e===this.open||(e?this.show():this.hide(this.editable))}connectedCallback(){super.connectedCallback(),addEventListener("keydown",this.__handleKeyDown)}disconnectedCallback(){var e;super.disconnectedCallback(),removeEventListener("keydown",this.__handleKeyDown),null===(e=k.dialogWindows.get(this))||void 0===e||e.remove(),k.dialogWindows.delete(this)}createRenderRoot(){const e=new b,t=document.querySelectorAll(k.dialogWindowsHost),s=Array.from(t).pop();return e.addEventListener("fetch",(e=>{e instanceof h&&(e.stopImmediatePropagation(),e.preventDefault(),e.respondWith(new o(this).fetch(e.request)))})),null==s||s.appendChild(e),k.dialogWindows.set(this,e),e.shadowRoot}render(e){if(!this.__connected)return i(g||(g=C``));const t=k.openDialogs[0]===this,s=k.openDialogs[1]===this,o=k.openDialogs[2]===this,a=!t&&!s&&!o;return i(y||(y=C` <div class="${0}"> <div id="backdrop" class="${0}" tabindex="-1" @click="${0}"></div> <div tabindex="0" role="dialog" aria-labelledby="dialog-title" class="${0}"> <div class="${0}"> <div class="h-l grid grid-cols-header text-m font-lumo font-medium border-b border-contrast-10"> ${0} <h1 id="dialog-title" class="truncate self-center text-center"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </h1> ${0} </div> <div class="${0}"> <div class="p-m relative">${0}</div> </div> </div> </div> </div> `),c({"z-50 fixed inset-0":!0,"pointer-events-none":!this.__visible}),c({"select-none ease-in-out transition duration-500 absolute inset-0 bg-shade-50 focus-outline-none":!0,"opacity-100":this.__visible,"opacity-0":!this.__visible}),(()=>this.closable&&this.hide(this.editable)),c({"transform ease-in-out transition duration-500 relative h-full ml-auto":!0,"origin-bottom sm-origin-center":!0,"focus-outline-none":!0,"sm-max-w-modal":!this.wide,"sm-max-w-modal-wide":this.wide,"flex justify-center items-end sm-items-center mr-auto":this.alert,"translate-y-full sm-translate-y-0":!this.__visible,"sm-translate-x-full":!this.alert&&!this.__visible,"sm-opacity-0 sm-scale-110":this.alert&&!this.__visible,"translate-y-0 translate-x-0":t&&this.__visible,"scale-95 -translate-y-s sm-translate-y-0":s&&this.__visible,"scale-90 -translate-y-m sm-translate-y-0":o&&this.__visible,"opacity-0 scale-85 -translate-y-l sm-translate-y-0":a&&this.__visible}),c({"overflow-hidden flex flex-col bg-base rounded-t-l sm-rounded-b-l":!0,"absolute inset-0 mt-xl sm-m-xl":!this.alert,"shadow-xxl":this.__visible,"flex-1":this.alert}),this.closable&&!this.hiddenSelector.matches("close-button",!0)?i(f||(f=C` <vaadin-button id="close-button" theme="tertiary-inline" class="mr-auto m-s px-s" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> </vaadin-button> `),this.disabledSelector.matches("close-button",!0),(()=>this.hide(this.editable)),this.lang,this.editable?"cancel":"close",this.ns):i(w||(w=C`<div></div>`)),this.ns,this.lang,this.header,this.editable&&!this.hiddenSelector.matches("save-button",!0)?i(x||(x=C` <vaadin-button data-testid="save-button" ?disabled="${0}" theme="primary" class="ml-auto h-auto min-h-0 min-w-0 m-xs px-m" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="save"></foxy-i18n> </vaadin-button> `),this.disabledSelector.matches("save-button",!0),this.save,this.ns,this.lang):i($||($=C`<div></div>`)),c({"flex-1 overflow-y-auto overflow-x-hidden overscroll-contain":!0,"max-h-alert":this.alert}),null==e?void 0:e())}updated(e){super.updated(e);const t=k.dialogWindows.get(this);t&&(t.disabledControls=this.disabledControls,t.disabled=this.disabled,t.readonlyControls=this.readonlyControls,t.readonly=this.readonly,t.hiddenControls=this.hiddenControls,t.hidden=this.hidden,t.group=this.group,t.lang=this.lang,t.ns=this.ns)}async hide(e=!1){var t;null===(t=this.__returnFocusTo)||void 0===t||t.focus(),await this.__setOpenDialogs(k.openDialogs.filter((e=>e!==this))),await this.__setConnected(!1),this.dispatchEvent(new k.HideEvent(!!e))}async show(e){var t;this.__returnFocusTo=e,await this.__setConnected(!0),await this.__setOpenDialogs([this,...k.openDialogs]),null===(t=this.renderRoot.querySelector('[role="dialog"]'))||void 0===t||t.focus(),this.dispatchEvent(new k.ShowEvent)}async save(){await this.hide(!1)}async __setOpenDialogs(e){k.openDialogs.length=0,k.openDialogs.push(...e),await Promise.all([Promise.all(k.openDialogs.map((e=>e.requestUpdate()))),new Promise((e=>{const t=this.renderRoot.querySelector("#backdrop");t?(t.addEventListener("transitionend",(()=>e()),{once:!0}),setTimeout((()=>e()),2e3)):e(),this.__visible=k.openDialogs.includes(this)}))])}async __setConnected(e){this.__connected=e,await this.updateComplete.then((()=>this.getBoundingClientRect()))}}k.dialogWindowsHost="#foxy-dialog-windows-host, body",k.dialogWindows=new WeakMap,k.openDialogs=[],k.ShowEvent=p,k.HideEvent=u,customElements.define("foxy-dialog-window",b);export{k as D};
@@ -1 +1 @@
1
- import"./shared-2a5c89a4.js";import"./shared-b8198665.js";import{I as e}from"./shared-7d38cb8a.js";import{w as t}from"./shared-fb34e84c.js";import{c as r,h as a,s as o}from"./shared-dc73b9a5.js";import{_ as l}from"./shared-0f6e4584.js";import{i as s}from"./shared-9803aa7c.js";import{c as i}from"./shared-4e709717.js";let n;function m(e){var t,r,a;const o=null!==(t=null==e?void 0:e.separator)&&void 0!==t?t:"-",l=null!==(r=null==e?void 0:e.charset)&&void 0!==r?r:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",s=null!==(a=null==e?void 0:e.length)&&void 0!==a?a:18;let i="";for(let e=0;e<s;e++)o&&e>0&&e%6==0&&(i+=o),i+=l[Math.floor(Math.random()*l.length)];return i}t("vaadin-password-field",r(n||(n=(e=>e)`:host([theme~=summary-item])::before{display:none}:host([theme~=summary-item]) .vaadin-text-field-container{display:grid;grid-template-columns:auto auto;grid-template-rows:repeat(3,min-content);gap:0 var(--lumo-space-m)}:host([theme~=summary-item]) [part=label]{font:normal var(--lumo-font-size-m) var(--lumo-font-family);color:var(--lumo-body-text-color)!important;grid-row:1;-webkit-text-fill-color:var(--lumo-body-text-color)!important}:host([theme~=summary-item]) [part=helper-text]{font:normal var(--lumo-font-size-s) var(--lumo-font-family);color:var(--lumo-secondary-text-color)!important;grid-row:2}:host([theme~=summary-item]) [part=helper-text]::before{display:none}:host([theme~=summary-item]) [part=error-message]{font:normal var(--lumo-font-size-s) var(--lumo-font-family);color:var(--lumo-error-text-color);grid-row:3}:host([theme~=summary-item]) [part=error-message],:host([theme~=summary-item]) [part=helper-text],:host([theme~=summary-item]) [part=label]{line-height:var(--lumo-line-height-xs);grid-column:1;padding:0}:host([theme~=summary-item]) [part=input-field]{grid-column:2;grid-row:1;padding:0;background:0 0;align-self:start;height:1em;--lumo-icon-size-m:1rem}:host([theme~=summary-item]) [part=input-field]::after,:host([theme~=summary-item][readonly]) [part=input-field] slot[name=suffix]{display:none}:host([theme~=summary-item]) [part=value]{line-height:var(--lumo-line-height-xs);text-align:right;min-height:auto;padding:0;margin-right:var(--lumo-space-xs);-webkit-mask-image:none}:host([theme~=summary-item][readonly]) [part=value]{margin-right:0}`)));let d,h,u,p=e=>e;customElements.define("foxy-internal-password-control",class extends e{constructor(){super(...arguments),this.generatorOptions=null,this.showGenerator=!1,this.layout=null}static get properties(){return l(l({},super.properties),{},{generatorOptions:{type:Object,attribute:"generator-options"},showGenerator:{type:Boolean,attribute:"show-generator"},layout:{}})}renderControl(){var e;return a(d||(d=p` <vaadin-password-field error-message="${0}" helper-text="${0}" placeholder="${0}" label="${0}" theme="${0}" class="w-full" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @input="${0}"> ${0} </vaadin-password-field> `),s(this._errorMessage),this.helperText,this.placeholder,this.label,s(null!==(e=this.layout)&&void 0!==e?e:void 0),this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{const t=e.currentTarget;this._value=t.value}),this.showGenerator?this.__renderGenerator():"")}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}__renderGenerator(){return a(h||(h=p` <div data-testid="generator" class="${0}" slot="suffix" @click="${0}"> ${0} </div> `),i({"w-s h-s flex items-center justify-center cursor-default transition-colors":!0,"text-contrast-60 hover-text-contrast-80":!this.disabled&&!this.readonly,"text-contrast-20":this.disabled||this.readonly}),(()=>{var e,t,r,a;let o,l=!1,s=0;do{o=m(null!==(e=this.generatorOptions)&&void 0!==e?e:void 0),l=null===(a=null===(r=null===(t=this.generatorOptions)||void 0===t?void 0:t.checkStrength)||void 0===r?void 0:r.call(t,o))||void 0===a||a,s++}while(!l&&s<100);if(!l)throw new Error("Failed to generate a strong password.");this._value=o;const i=this.renderRoot.querySelector("vaadin-password-field");null==i||i._setPasswordVisible(!0)}),o(u||(u=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.15em; height: 1.15em"><path d="M15.98 1.804a1 1 0 00-1.96 0l-.24 1.192a1 1 0 01-.784.785l-1.192.238a1 1 0 000 1.962l1.192.238a1 1 0 01.785.785l.238 1.192a1 1 0 001.962 0l.238-1.192a1 1 0 01.785-.785l1.192-.238a1 1 0 000-1.962l-1.192-.238a1 1 0 01-.785-.785l-.238-1.192zM6.949 5.684a1 1 0 00-1.898 0l-.683 2.051a1 1 0 01-.633.633l-2.051.683a1 1 0 000 1.898l2.051.684a1 1 0 01.633.632l.683 2.051a1 1 0 001.898 0l.683-2.051a1 1 0 01.633-.633l2.051-.683a1 1 0 000-1.898l-2.051-.683a1 1 0 01-.633-.633L6.95 5.684zM13.949 13.684a1 1 0 00-1.898 0l-.184.551a1 1 0 01-.632.633l-.551.183a1 1 0 000 1.898l.551.183a1 1 0 01.633.633l.183.551a1 1 0 001.898 0l.184-.551a1 1 0 01.632-.633l.551-.183a1 1 0 000-1.898l-.551-.184a1 1 0 01-.633-.632l-.183-.551z" /></svg>`)))}});
1
+ import"./shared-1cd2db2d.js";import"./shared-9e94c56d.js";import{I as e}from"./shared-55bc51c8.js";import{w as t}from"./shared-4efc6bb8.js";import{c as r,h as a,s as o}from"./shared-dc73b9a5.js";import{_ as l}from"./shared-d1195c27.js";import{i as s}from"./shared-9803aa7c.js";import{c as i}from"./shared-4e709717.js";let n;function m(e){var t,r,a;const o=null!==(t=null==e?void 0:e.separator)&&void 0!==t?t:"-",l=null!==(r=null==e?void 0:e.charset)&&void 0!==r?r:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",s=null!==(a=null==e?void 0:e.length)&&void 0!==a?a:18;let i="";for(let e=0;e<s;e++)o&&e>0&&e%6==0&&(i+=o),i+=l[Math.floor(Math.random()*l.length)];return i}t("vaadin-password-field",r(n||(n=(e=>e)`:host([theme~=summary-item])::before{display:none}:host([theme~=summary-item]) .vaadin-text-field-container{display:grid;grid-template-columns:auto auto;grid-template-rows:repeat(3,min-content);gap:0 var(--lumo-space-m)}:host([theme~=summary-item]) [part=label]{font:normal var(--lumo-font-size-m) var(--lumo-font-family);color:var(--lumo-body-text-color)!important;grid-row:1;-webkit-text-fill-color:var(--lumo-body-text-color)!important}:host([theme~=summary-item]) [part=helper-text]{font:normal var(--lumo-font-size-s) var(--lumo-font-family);color:var(--lumo-secondary-text-color)!important;grid-row:2}:host([theme~=summary-item]) [part=helper-text]::before{display:none}:host([theme~=summary-item]) [part=error-message]{font:normal var(--lumo-font-size-s) var(--lumo-font-family);color:var(--lumo-error-text-color);grid-row:3}:host([theme~=summary-item]) [part=error-message],:host([theme~=summary-item]) [part=helper-text],:host([theme~=summary-item]) [part=label]{line-height:var(--lumo-line-height-xs);grid-column:1;padding:0}:host([theme~=summary-item]) [part=input-field]{grid-column:2;grid-row:1;padding:0;background:0 0;align-self:start;height:1em;--lumo-icon-size-m:1rem}:host([theme~=summary-item]) [part=input-field]::after,:host([theme~=summary-item][readonly]) [part=input-field] slot[name=suffix]{display:none}:host([theme~=summary-item]) [part=value]{line-height:var(--lumo-line-height-xs);text-align:right;min-height:auto;padding:0;margin-right:var(--lumo-space-xs);-webkit-mask-image:none}:host([theme~=summary-item][readonly]) [part=value]{margin-right:0}`)));let d,h,u,p=e=>e;customElements.define("foxy-internal-password-control",class extends e{constructor(){super(...arguments),this.generatorOptions=null,this.showGenerator=!1,this.layout=null}static get properties(){return l(l({},super.properties),{},{generatorOptions:{type:Object,attribute:"generator-options"},showGenerator:{type:Boolean,attribute:"show-generator"},layout:{}})}renderControl(){var e;return a(d||(d=p` <vaadin-password-field error-message="${0}" helper-text="${0}" placeholder="${0}" label="${0}" theme="${0}" class="w-full" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @input="${0}"> ${0} </vaadin-password-field> `),s(this._errorMessage),this.helperText,this.placeholder,this.label,s(null!==(e=this.layout)&&void 0!==e?e:void 0),this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{const t=e.currentTarget;this._value=t.value}),this.showGenerator?this.__renderGenerator():"")}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}__renderGenerator(){return a(h||(h=p` <div data-testid="generator" class="${0}" slot="suffix" @click="${0}"> ${0} </div> `),i({"w-s h-s flex items-center justify-center cursor-default transition-colors":!0,"text-contrast-60 hover-text-contrast-80":!this.disabled&&!this.readonly,"text-contrast-20":this.disabled||this.readonly}),(()=>{var e,t,r,a;let o,l=!1,s=0;do{o=m(null!==(e=this.generatorOptions)&&void 0!==e?e:void 0),l=null===(a=null===(r=null===(t=this.generatorOptions)||void 0===t?void 0:t.checkStrength)||void 0===r?void 0:r.call(t,o))||void 0===a||a,s++}while(!l&&s<100);if(!l)throw new Error("Failed to generate a strong password.");this._value=o;const i=this.renderRoot.querySelector("vaadin-password-field");null==i||i._setPasswordVisible(!0)}),o(u||(u=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.15em; height: 1.15em"><path d="M15.98 1.804a1 1 0 00-1.96 0l-.24 1.192a1 1 0 01-.784.785l-1.192.238a1 1 0 000 1.962l1.192.238a1 1 0 01.785.785l.238 1.192a1 1 0 001.962 0l.238-1.192a1 1 0 01.785-.785l1.192-.238a1 1 0 000-1.962l-1.192-.238a1 1 0 01-.785-.785l-.238-1.192zM6.949 5.684a1 1 0 00-1.898 0l-.683 2.051a1 1 0 01-.633.633l-2.051.683a1 1 0 000 1.898l2.051.684a1 1 0 01.633.632l.683 2.051a1 1 0 001.898 0l.683-2.051a1 1 0 01.633-.633l2.051-.683a1 1 0 000-1.898l-2.051-.683a1 1 0 01-.633-.633L6.95 5.684zM13.949 13.684a1 1 0 00-1.898 0l-.184.551a1 1 0 01-.632.633l-.551.183a1 1 0 000 1.898l.551.183a1 1 0 01.633.633l.183.551a1 1 0 001.898 0l.184-.551a1 1 0 01.632-.633l.551-.183a1 1 0 000-1.898l-.551-.184a1 1 0 01-.633-.632l-.183-.551z" /></svg>`)))}});
@@ -1 +1 @@
1
- import"./shared-b8198665.js";import{I as e}from"./shared-7d38cb8a.js";import{_ as t}from"./shared-0f6e4584.js";import{c as s,h as i,s as r}from"./shared-dc73b9a5.js";import{i as l}from"./shared-9803aa7c.js";import{c as a}from"./shared-4e709717.js";import{l as o}from"./shared-22ba9566.js";let d,n,u,h,p,c,f,m,v=e=>e;customElements.define("foxy-internal-text-control",class extends e{constructor(){super(...arguments),this.layout=null,this.prefix=null,this.suffix=null,this.__isErrorVisible=!1}static get properties(){return t(t({},super.properties),{},{layout:{},prefix:{},suffix:{},__isErrorVisible:{attribute:!1}})}static get styles(){return[super.styles,s(d||(d=v`input::-webkit-contacts-auto-fill-button{visibility:hidden;display:none!important;pointer-events:none;position:absolute;right:0}`))]}reportValidity(){this.__isErrorVisible=!0,super.reportValidity()}renderControl(){return"summary-item"===this.layout?this.__renderSummaryItemLayout():i(n||(n=v` <vaadin-text-field error-message="${0}" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" ?clear-button-visible="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @input="${0}"> ${0} ${0} </vaadin-text-field> `),l(this._errorMessage),this.helperText,this.placeholder,this.label,!this.suffix,this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{const t=e.currentTarget;this._value=t.value}),this.prefix?i(u||(u=v`<div slot="prefix">${0}</div>`),this.prefix):"",this.suffix?i(h||(h=v`<div class="pr-s font-medium" slot="suffix">${0}</div>`),this.suffix):"")}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}__renderSummaryItemLayout(){return i(p||(p=v` <div class="flex items-start gap-m leading-xs"> <div> <label class="text-m text-body" for="input">${0}</label> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> <div class="flex-1 flex items-center gap-xs" style="min-width:30%"> ${0} <input placeholder="${0}" class="${0}" type="text" id="input" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @blur="${0}" @input="${0}"> ${0} <button aria-label="${0}" class="${0}" style="width:1em;height:1em" ?disabled="${0}" ?hidden="${0}" @click="${0}"> ${0} </button> </div> </div> `),this.label,this.helperText,!this.__isErrorVisible||this.disabled||this.readonly,this._errorMessage,this.prefix?i(c||(c=v`<div>${0}</div>`),this.prefix):"",this.placeholder,a({"w-full appearance-none text-right bg-transparent transition-colors":!0,"text-m rounded-s focus-outline-none":!0,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),o(this._value),this.disabled,this.readonly,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(()=>this.__isErrorVisible=!0),(e=>{e.stopPropagation(),this._value=e.target.value}),this.suffix?i(f||(f=v`<div class="font-medium text-secondary">${0}</div>`),this.suffix):"",this.t("clear"),a({"rounded-full transition-colors":!0,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"cursor-pointer text-tertiary hover-text-body":!this.disabled,"cursor-default text-disabled":this.disabled}),this.disabled,this.readonly||!this._value,(()=>{this._value="",this.dispatchEvent(new CustomEvent("clear"))}),r(m||(m=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em; transform: scale(1.25); margin-right: -0.16em"><path d="M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" /></svg>`)))}});
1
+ import"./shared-9e94c56d.js";import{I as e}from"./shared-55bc51c8.js";import{_ as t}from"./shared-d1195c27.js";import{c as s,h as i,s as r}from"./shared-dc73b9a5.js";import{i as l}from"./shared-9803aa7c.js";import{c as a}from"./shared-4e709717.js";import{l as o}from"./shared-22ba9566.js";let d,n,u,h,p,c,f,m,v=e=>e;customElements.define("foxy-internal-text-control",class extends e{constructor(){super(...arguments),this.layout=null,this.prefix=null,this.suffix=null,this.__isErrorVisible=!1}static get properties(){return t(t({},super.properties),{},{layout:{},prefix:{},suffix:{},__isErrorVisible:{attribute:!1}})}static get styles(){return[super.styles,s(d||(d=v`input::-webkit-contacts-auto-fill-button{visibility:hidden;display:none!important;pointer-events:none;position:absolute;right:0}`))]}reportValidity(){this.__isErrorVisible=!0,super.reportValidity()}renderControl(){return"summary-item"===this.layout?this.__renderSummaryItemLayout():i(n||(n=v` <vaadin-text-field error-message="${0}" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" ?clear-button-visible="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @input="${0}"> ${0} ${0} </vaadin-text-field> `),l(this._errorMessage),this.helperText,this.placeholder,this.label,!this.suffix,this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{const t=e.currentTarget;this._value=t.value}),this.prefix?i(u||(u=v`<div slot="prefix">${0}</div>`),this.prefix):"",this.suffix?i(h||(h=v`<div class="pr-s font-medium" slot="suffix">${0}</div>`),this.suffix):"")}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}__renderSummaryItemLayout(){return i(p||(p=v` <div class="flex items-start gap-m leading-xs"> <div> <label class="text-m text-body" for="input">${0}</label> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> <div class="flex-1 flex items-center gap-xs" style="min-width:30%"> ${0} <input placeholder="${0}" class="${0}" type="text" id="input" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @blur="${0}" @input="${0}"> ${0} <button aria-label="${0}" class="${0}" style="width:1em;height:1em" ?disabled="${0}" ?hidden="${0}" @click="${0}"> ${0} </button> </div> </div> `),this.label,this.helperText,!this.__isErrorVisible||this.disabled||this.readonly,this._errorMessage,this.prefix?i(c||(c=v`<div>${0}</div>`),this.prefix):"",this.placeholder,a({"w-full appearance-none text-right bg-transparent transition-colors":!0,"text-m rounded-s focus-outline-none":!0,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),o(this._value),this.disabled,this.readonly,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(()=>this.__isErrorVisible=!0),(e=>{e.stopPropagation(),this._value=e.target.value}),this.suffix?i(f||(f=v`<div class="font-medium text-secondary">${0}</div>`),this.suffix):"",this.t("clear"),a({"rounded-full transition-colors":!0,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"cursor-pointer text-tertiary hover-text-body":!this.disabled,"cursor-default text-disabled":this.disabled}),this.disabled,this.readonly||!this._value,(()=>{this._value="",this.dispatchEvent(new CustomEvent("clear"))}),r(m||(m=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em; transform: scale(1.25); margin-right: -0.16em"><path d="M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" /></svg>`)))}});
@@ -1 +1 @@
1
- import"./shared-d132bd37.js";import"./shared-b8198665.js";import"./shared-ac0368ec.js";import"./shared-16c17e32.js";import"./shared-0a6a28ce.js";import{I as e}from"./shared-7d38cb8a.js";import{_ as t}from"./shared-0f6e4584.js";import{c as i,h as a,s}from"./shared-dc73b9a5.js";import{i as l}from"./shared-9803aa7c.js";import{c as o}from"./shared-4e709717.js";let n,r,d,h,u,c,p=e=>e;customElements.define("foxy-internal-frequency-control",class extends e{constructor(){super(...arguments),this.allowTwiceAMonth=!1,this.options=[{value:"d",label:"day"},{value:"w",label:"week"},{value:"m",label:"month"},{value:"y",label:"year"}],this.layout=null,this.max=999,this.__i18n={formatValue:e=>e.join(""),parseValue:e=>{var t;const i=e.startsWith(".")?`0${e}`:e,a=parseFloat(e.substring(0,Math.max(i.length-1,0))),s=null!==(t=i[i.length-1])&&void 0!==t?t:"";return isNaN(a)?["0",""]:[a.toString(),s]}}}static get properties(){return t(t({},super.properties),{},{allowTwiceAMonth:{type:Boolean,attribute:"allow-twice-a-month"},options:{attribute:!1},layout:{},max:{type:Number}})}static get styles(){return[super.styles,i(n||(n=p`:host{display:block}vaadin-custom-field{width:100%;font-size:0;line-height:0;padding-top:0!important}vaadin-custom-field::part(label){padding-bottom:var(--lumo-space-s)}vaadin-custom-field::part(error-message)[aria-hidden=false]{padding-top:var(--lumo-space-xs)}vaadin-combo-box,vaadin-integer-field{width:calc(50% - (var(--lumo-space-s)/ 2))}vaadin-integer-field{margin-right:var(--lumo-space-s);padding:0}vaadin-combo-box::part(text-field){padding:0}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input{-moz-appearance:textfield}`))]}renderControl(){var e,t;if("summary-item"===this.layout)return this.__renderSummaryItemLayout();const i=null!==(e=this._value)&&void 0!==e?e:"",s=parseFloat(this.__i18n.parseValue(i)[0]),o=this.options.map((({value:e,label:t})=>({label:this.t(t,{count:s}),value:e})));return a(r||(r=p` <vaadin-custom-field ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .errorMessage="${0}" .helperText="${0}" .label="${0}" .value="${0}" .i18n="${0}" @change="${0}"> <vaadin-integer-field max="${0}" min="1" prevent-invalid-input has-controls ?disabled="${0}" ?readonly="${0}" ?invalid="${0}" @keydown="${0}"> </vaadin-integer-field> <vaadin-combo-box item-value-path="value" item-label-path="label" ?disabled="${0}" ?readonly="${0}" ?invalid="${0}" .items="${0}" @keydown="${0}"> </vaadin-combo-box> </vaadin-custom-field> `),this.disabled,this.readonly,this._checkValidity,null!==(t=this._errorMessage)&&void 0!==t?t:"",this.helperText,this.label,i,this.__i18n,(e=>{const t=e.currentTarget;this._value=t.value}),l(this.max||void 0),this.disabled,this.readonly,!this._checkValidity(),(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),this.disabled,this.readonly,!this._checkValidity(),o,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}))}updated(e){var t;super.updated(e);const i=this.renderRoot.querySelector("vaadin-custom-field");i&&i.value!==this._value&&(i.value=null!==(t=this._value)&&void 0!==t?t:"")}__renderSummaryItemLayout(){var e,t;const i=null!==(e=this._value)&&void 0!==e?e:"",[n,r]=this.__i18n.parseValue(i),m=parseFloat(n),v=".5m"!==this._value||this.allowTwiceAMonth?this.options.find((e=>e.value===r)):void 0;return a(d||(d=p` <div class="flex items-start gap-m leading-xs"> <div> <label class="text-m text-body" for="input">${0}</label> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> <div class="flex-1 flex items-center gap-xs"> <input placeholder="${0}" inputmode="numeric" style="min-width:10ch" class="${0}" type="number" step="1" min="1" max="${0}" id="input" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @input="${0}"> <div class="${0}"> <div class="flex items-center gap-xs"> <div class="whitespace-nowrap"> ${0} </div> ${0} </div> <select class="${0}" id="select" ?disabled="${0}" ?hidden="${0}" @change="${0}"> <option value="" ?selected="${0}" disabled="disabled" hidden>${0}</option> ${0} ${0} </select> </div> </div> </div> `),this.label,this.helperText,this.disabled||this.readonly,this._errorMessage,this.placeholder,o({"w-full appearance-none text-right bg-transparent transition-colors":!0,"text-m rounded-s focus-outline-none":!0,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),l(null!==(t=this.max)&&void 0!==t?t:void 0),".5m"===i?this.allowTwiceAMonth?2:"":m,this.disabled,this.readonly,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{e.stopPropagation();const t=e.currentTarget;this._value=this.__i18n.formatValue([t.value,r])}),o({"relative rounded-s transition-colors transition-opacity":!0,"focus-within-ring-2 focus-within-ring-primary-50":!this.disabled&&!this.readonly,"text-body hover-opacity-80 cursor-pointer":!this.disabled&&!this.readonly,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),".5m"===i?this.t("times_a_month"):v?this.t(v.label,{count:m}):this.t("select"),this.readonly?"":s(h||(h=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em; transform: scale(1.25)"><path fill-rule="evenodd" d="M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z" clip-rule="evenodd" /></svg>`)),o({"absolute inset-0 opacity-0":!0,"cursor-pointer":!this.disabled&&!this.readonly}),this.disabled,this.readonly,(e=>{e.stopPropagation();const t=e.currentTarget.value;this._value="times_a_month"===t?".5m":this.__i18n.formatValue([m,t])}),!v,this.t("select"),!this.allowTwiceAMonth||2!==m&&".5m"!==i?"":a(u||(u=p` <option value="times_a_month" ?selected="${0}"> ${0} </option> `),".5m"===i,this.t("times_a_month")),this.options.map((e=>a(c||(c=p` <option value="${0}" ?selected="${0}"> ${0} </option> `),e.value,".5m"!==i&&e.value===(null==v?void 0:v.value),this.t(e.label,{count:m})))))}});
1
+ import"./shared-045bd59c.js";import"./shared-9e94c56d.js";import"./shared-9411a937.js";import"./shared-be093279.js";import"./shared-f0d70be1.js";import{I as e}from"./shared-55bc51c8.js";import{_ as t}from"./shared-d1195c27.js";import{c as i,h as a,s}from"./shared-dc73b9a5.js";import{i as l}from"./shared-9803aa7c.js";import{c as o}from"./shared-4e709717.js";let n,r,d,h,u,c,p=e=>e;customElements.define("foxy-internal-frequency-control",class extends e{constructor(){super(...arguments),this.allowTwiceAMonth=!1,this.options=[{value:"d",label:"day"},{value:"w",label:"week"},{value:"m",label:"month"},{value:"y",label:"year"}],this.layout=null,this.max=999,this.__i18n={formatValue:e=>e.join(""),parseValue:e=>{var t;const i=e.startsWith(".")?`0${e}`:e,a=parseFloat(e.substring(0,Math.max(i.length-1,0))),s=null!==(t=i[i.length-1])&&void 0!==t?t:"";return isNaN(a)?["0",""]:[a.toString(),s]}}}static get properties(){return t(t({},super.properties),{},{allowTwiceAMonth:{type:Boolean,attribute:"allow-twice-a-month"},options:{attribute:!1},layout:{},max:{type:Number}})}static get styles(){return[super.styles,i(n||(n=p`:host{display:block}vaadin-custom-field{width:100%;font-size:0;line-height:0;padding-top:0!important}vaadin-custom-field::part(label){padding-bottom:var(--lumo-space-s)}vaadin-custom-field::part(error-message)[aria-hidden=false]{padding-top:var(--lumo-space-xs)}vaadin-combo-box,vaadin-integer-field{width:calc(50% - (var(--lumo-space-s)/ 2))}vaadin-integer-field{margin-right:var(--lumo-space-s);padding:0}vaadin-combo-box::part(text-field){padding:0}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input{-moz-appearance:textfield}`))]}renderControl(){var e,t;if("summary-item"===this.layout)return this.__renderSummaryItemLayout();const i=null!==(e=this._value)&&void 0!==e?e:"",s=parseFloat(this.__i18n.parseValue(i)[0]),o=this.options.map((({value:e,label:t})=>({label:this.t(t,{count:s}),value:e})));return a(r||(r=p` <vaadin-custom-field ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .errorMessage="${0}" .helperText="${0}" .label="${0}" .value="${0}" .i18n="${0}" @change="${0}"> <vaadin-integer-field max="${0}" min="1" prevent-invalid-input has-controls ?disabled="${0}" ?readonly="${0}" ?invalid="${0}" @keydown="${0}"> </vaadin-integer-field> <vaadin-combo-box item-value-path="value" item-label-path="label" ?disabled="${0}" ?readonly="${0}" ?invalid="${0}" .items="${0}" @keydown="${0}"> </vaadin-combo-box> </vaadin-custom-field> `),this.disabled,this.readonly,this._checkValidity,null!==(t=this._errorMessage)&&void 0!==t?t:"",this.helperText,this.label,i,this.__i18n,(e=>{const t=e.currentTarget;this._value=t.value}),l(this.max||void 0),this.disabled,this.readonly,!this._checkValidity(),(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),this.disabled,this.readonly,!this._checkValidity(),o,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}))}updated(e){var t;super.updated(e);const i=this.renderRoot.querySelector("vaadin-custom-field");i&&i.value!==this._value&&(i.value=null!==(t=this._value)&&void 0!==t?t:"")}__renderSummaryItemLayout(){var e,t;const i=null!==(e=this._value)&&void 0!==e?e:"",[n,r]=this.__i18n.parseValue(i),m=parseFloat(n),v=".5m"!==this._value||this.allowTwiceAMonth?this.options.find((e=>e.value===r)):void 0;return a(d||(d=p` <div class="flex items-start gap-m leading-xs"> <div> <label class="text-m text-body" for="input">${0}</label> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> <div class="flex-1 flex items-center gap-xs"> <input placeholder="${0}" inputmode="numeric" style="min-width:10ch" class="${0}" type="number" step="1" min="1" max="${0}" id="input" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @input="${0}"> <div class="${0}"> <div class="flex items-center gap-xs"> <div class="whitespace-nowrap"> ${0} </div> ${0} </div> <select class="${0}" id="select" ?disabled="${0}" ?hidden="${0}" @change="${0}"> <option value="" ?selected="${0}" disabled="disabled" hidden>${0}</option> ${0} ${0} </select> </div> </div> </div> `),this.label,this.helperText,this.disabled||this.readonly,this._errorMessage,this.placeholder,o({"w-full appearance-none text-right bg-transparent transition-colors":!0,"text-m rounded-s focus-outline-none":!0,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),l(null!==(t=this.max)&&void 0!==t?t:void 0),".5m"===i?this.allowTwiceAMonth?2:"":m,this.disabled,this.readonly,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{e.stopPropagation();const t=e.currentTarget;this._value=this.__i18n.formatValue([t.value,r])}),o({"relative rounded-s transition-colors transition-opacity":!0,"focus-within-ring-2 focus-within-ring-primary-50":!this.disabled&&!this.readonly,"text-body hover-opacity-80 cursor-pointer":!this.disabled&&!this.readonly,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),".5m"===i?this.t("times_a_month"):v?this.t(v.label,{count:m}):this.t("select"),this.readonly?"":s(h||(h=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em; transform: scale(1.25)"><path fill-rule="evenodd" d="M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z" clip-rule="evenodd" /></svg>`)),o({"absolute inset-0 opacity-0":!0,"cursor-pointer":!this.disabled&&!this.readonly}),this.disabled,this.readonly,(e=>{e.stopPropagation();const t=e.currentTarget.value;this._value="times_a_month"===t?".5m":this.__i18n.formatValue([m,t])}),!v,this.t("select"),!this.allowTwiceAMonth||2!==m&&".5m"!==i?"":a(u||(u=p` <option value="times_a_month" ?selected="${0}"> ${0} </option> `),".5m"===i,this.t("times_a_month")),this.options.map((e=>a(c||(c=p` <option value="${0}" ?selected="${0}"> ${0} </option> `),e.value,".5m"!==i&&e.value===(null==v?void 0:v.value),this.t(e.label,{count:m})))))}});
@@ -1 +1 @@
1
- import{c as e,aI as t,_ as n}from"./shared-0f6e4584.js";import{h as r,L as s}from"./shared-dc73b9a5.js";import{A as o}from"./shared-01b2cad8.js";import"./shared-6d645dc5.js";import{C as i}from"./shared-0b01f721.js";import{F as a}from"./shared-343d1fd7.js";import{I as u}from"./shared-f7a1193f.js";var l=e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatCookie=void 0;var n=function(e){var t=e.path,n=e.domain,r=e.expires,s=e.secure,o=function(e){var t=e.sameSite;return void 0===t?null:["none","lax","strict"].indexOf(t.toLowerCase())>=0?t:null}(e);return[null==t?"":";path="+t,null==n?"":";domain="+n,null==r?"":";expires="+r.toUTCString(),void 0===s||!1===s?"":";secure",null===o?"":";SameSite="+o].join("")};t.formatCookie=function(e,t,r){return[encodeURIComponent(e),"=",encodeURIComponent(t),n(r)].join("")}})),c=e((function(e,t){function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,s=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){s=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(s)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Object.defineProperty(t,"__esModule",{value:!0}),t.parseCookies=void 0;t.parseCookies=function(e){if(0===e.length)return{};var t={},r=new RegExp("\\s*;\\s*");return e.split(r).forEach((function(e){var r=n(e.split("="),2),s=r[0],o=r[1],i=decodeURIComponent(s),a=decodeURIComponent(o);t[i]=a})),t}})),h=e((function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.CookieStorage=void 0;var r=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._defaultOptions=Object.assign({domain:null,expires:null,path:null,secure:!1},t),"undefined"!=typeof Proxy)return new Proxy(this,s)}var t,r,o;return t=e,(r=[{key:"clear",value:function(){var e=this,t=c.parseCookies(this._getCookie());Object.keys(t).forEach((function(t){return e.removeItem(t)}))}},{key:"getItem",value:function(e){var t=c.parseCookies(this._getCookie());return Object.prototype.hasOwnProperty.call(t,e)?t[e]:null}},{key:"key",value:function(e){var t=c.parseCookies(this._getCookie()),n=Object.keys(t).sort();return e<n.length?n[e]:null}},{key:"removeItem",value:function(e,t){var n=Object.assign(Object.assign(Object.assign({},this._defaultOptions),t),{expires:new Date(0)}),r=l.formatCookie(e,"",n);this._setCookie(r)}},{key:"setItem",value:function(e,t,n){var r=Object.assign(Object.assign({},this._defaultOptions),n),s=l.formatCookie(e,t,r);this._setCookie(s)}},{key:"_getCookie",value:function(){return"undefined"==typeof document||void 0===document.cookie?"":document.cookie}},{key:"_setCookie",value:function(e){document.cookie=e}},{key:"length",get:function(){var e=c.parseCookies(this._getCookie());return Object.keys(e).length}}])&&n(t.prototype,r),o&&n(t,o),e}();t.CookieStorage=r;var s={defineProperty:function(e,t,n){return e.setItem(t.toString(),String(n.value)),!0},deleteProperty:function(e,t){return e.removeItem(t.toString()),!0},get:function(e,t,n){if("string"==typeof t&&t in e)return e[t];var r=e.getItem(t.toString());return null!==r?r:void 0},getOwnPropertyDescriptor:function(e,t){if(!(t in e))return{configurable:!0,enumerable:!0,value:e.getItem(t.toString()),writable:!0}},has:function(e,t){return"string"==typeof t&&t in e||null!==e.getItem(t.toString())},ownKeys:function(e){for(var t=[],n=0;n<e.length;n++){var r=e.key(n);null!==r&&t.push(r)}return t},preventExtensions:function(e){throw new TypeError("can't prevent extensions on this proxy object")},set:function(e,t,n,r){return e.setItem(t.toString(),String(n)),!0}}})),p=t(e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"CookieStorage",{enumerable:!0,get:function(){return h.CookieStorage}}),Object.defineProperty(t,"formatCookie",{enumerable:!0,get:function(){return l.formatCookie}}),Object.defineProperty(t,"parseCookies",{enumerable:!0,get:function(){return c.parseCookies}})})));class f extends p.CookieStorage{constructor(){super({sameSite:"Strict",expires:new Date,secure:!0,domain:location.hostname,path:"/"})}getItem(e){if(e===o.SESSION){const e=super.getItem("fx.customer"),t=super.getItem("fx.customer.duration"),n=super.getItem("fx.customer.start"),r=super.getItem("fx.customer.jwt");if(null===e||null===t||null===n||null===r)return null;const s={session_token:e,date_created:n,expires_in:parseInt(t),jwt:r},o=super.getItem("fx.customer.sso");return null!==o&&(s.sso=o),JSON.stringify(s)}return super.getItem(e)}setItem(e,t,n){if(e!==o.SESSION)return super.setItem(e,t,n);{const e=JSON.parse(t),n=1e3*e.expires_in,r=new Date(new Date(e.date_created).getTime()+n);super.setItem("fx.customer",e.session_token,{expires:r}),super.setItem("fx.customer.jwt",e.jwt,{expires:r}),super.setItem("fx.customer.start",e.date_created,{expires:r}),super.setItem("fx.customer.duration",String(e.expires_in),{expires:r}),e.sso&&super.setItem("fx.customer.sso",e.sso,{expires:r})}}clear(){for(let e=0;e<this.length;){const t=super.key(e);t.startsWith("fx.customer")?super.removeItem(t):e++}}}const d=new f;let g,m=e=>e;class _ extends(i(u(s))){constructor(){var e;super(...arguments),e=this,this.__storage="local",this.__level=0,this.__base=location.origin,this.__api=this.__createAPIInstance(),this.__handleFetch=async function(t){if(!(t instanceof a))return;if(t.defaultPrevented)return;if(t.composedPath()[0]===e)return;t.preventDefault();const n=new a("fetch",{cancelable:!0,composed:!0,request:t.request,bubbles:!0,reject:e=>t.respondWith(Promise.reject(e)),resolve:r=>{"foxy://customer-api/session"===n.request.url&&e.requestUpdate(),401===r.status&&e.requestUpdate(),t.respondWith(Promise.resolve(r))}});e.dispatchEvent(n)&&n.respondWith(e.__handleRequest(n.request))}}static get properties(){return n(n({},super.properties),{},{storage:{type:String,noAccessor:!0},level:{type:Number,noAccessor:!0},base:{type:String,noAccessor:!0}})}get isLoggedIn(){return!!this.api.storage.getItem(o.SESSION)}get api(){return this.__api}get base(){return this.__base}set base(e){this.__base=e,this.__api=this.__createAPIInstance()}get level(){return this.__level}set level(e){this.__level=e,this.__api=this.__createAPIInstance()}get storage(){return this.__storage}set storage(e){this.__storage=e,this.__api=this.__createAPIInstance()}connectedCallback(){super.connectedCallback(),this.addEventListener("fetch",this.__handleFetch)}render(){return r(g||(g=m` ${0} <slot></slot> `),this.renderTemplateOrSlot(this.isLoggedIn?"logged-in":"logged-out"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("fetch",this.__handleFetch)}__createAPIInstance(){const e={session:sessionStorage,cookie:d,local:localStorage};return new o({storage:e[this.storage],level:this.level,base:new URL(this.base)})}async __handleVirtualAuthSessionDelete(){return await this.api.signOut(),this.dispatchEvent(new _.SignOutEvent("signout")),this.requestUpdate(),new Response}async __handleVirtualAuthSessionPost(e){const t=await e.clone().json();if("password"!==t.type)throw new Error(`Unknown payload type ${t.type}`);let r,s;try{await this.api.signIn(t.credential),this.dispatchEvent(new _.SignInEvent("signin")),this.requestUpdate(),r=200,s=n({_links:{self:{href:e.url}}},t)}catch(e){if(!(e instanceof o.AuthError))throw e;if("UNAUTHORIZED"!==e.code)throw e;r=401,s={total:1,_embedded:{"fx:errors":[{message:e.message,logref:"unavailable",code:"invalid_credential_error"}]}}}return new Response(JSON.stringify(s),{status:r})}async __handleVirtualAuthSessionAny(e){return new Response(JSON.stringify({_links:{self:{href:e.url}},message:"POST to this endpoint to sign in"}))}async __handleVirtualAuthRecoverPost(e){const t=await e.clone().json();if("email"===t.type)return await this.api.sendPasswordResetEmail(t.detail),new Response(JSON.stringify({_links:{self:{href:e.url}},email:t.email}));throw new Error(`Unknown payload type ${t.type}`)}async __handleVirtualAuthRecoverAny(e){return new Response(JSON.stringify({_links:{self:{href:e.url}},message:"POST to this endpoint to request a password reset"}))}async __handleVirtualAuthSignUpPost(e){const t=await e.clone().json();try{await this.api.signUp(t)}catch(e){if(!(e instanceof o.AuthError))throw e;let t,n;if("UNAUTHORIZED"===e.code)t="Customer registration is disabled for this store.",n=401;else if("UNAVAILABLE"===e.code)t="This email address is already in use by an existing customer of this store.",n=403;else{if("INVALID_FORM"!==e.code)throw e;t="Client verification failed.",n=400}const r=JSON.stringify({total:1,_embedded:{"fx:errors":[{message:t}]}});return new Response(r,{status:n})}return t.password&&await this.api.signIn(t),this.requestUpdate(),this.dispatchEvent(new _.SignUpEvent("signup")),new Response(JSON.stringify({_links:{self:{href:e.url}},message:"Account created"}))}async __handleVirtualAuthSignUpAny(e){return new Response(JSON.stringify({_links:{self:{href:e.url}},message:"POST to this endpoint to create an account"}))}async __handleRequest(e){const t=e.url,n=e.method;try{if(t.startsWith("foxy://customer-api/session"))return"DELETE"===n?this.__handleVirtualAuthSessionDelete():"POST"===n?this.__handleVirtualAuthSessionPost(e):this.__handleVirtualAuthSessionAny(e);if(t.startsWith("foxy://customer-api/recover"))return"POST"===n?this.__handleVirtualAuthRecoverPost(e):this.__handleVirtualAuthRecoverAny(e);if(t.startsWith("foxy://customer-api/signup"))return"POST"===n?this.__handleVirtualAuthSignUpPost(e):this.__handleVirtualAuthSignUpAny(e);const r=await this.api.fetch(e);return 401===r.status&&(this.api.storage.clear(),this.dispatchEvent(new _.SignOutEvent("signout")),this.requestUpdate()),r}catch(e){return new Response(null,{status:500})}}}_.SignOutEvent=class extends CustomEvent{},_.SignInEvent=class extends CustomEvent{},_.SignUpEvent=class extends CustomEvent{};export{_ as C};
1
+ import{c as e,aI as t,_ as n}from"./shared-d1195c27.js";import{h as r,L as s}from"./shared-dc73b9a5.js";import{A as o}from"./shared-0e156ee7.js";import"./shared-c2efc54e.js";import{C as i}from"./shared-d1cb97c6.js";import{F as a}from"./shared-343d1fd7.js";import{I as u}from"./shared-17a61265.js";var l=e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatCookie=void 0;var n=function(e){var t=e.path,n=e.domain,r=e.expires,s=e.secure,o=function(e){var t=e.sameSite;return void 0===t?null:["none","lax","strict"].indexOf(t.toLowerCase())>=0?t:null}(e);return[null==t?"":";path="+t,null==n?"":";domain="+n,null==r?"":";expires="+r.toUTCString(),void 0===s||!1===s?"":";secure",null===o?"":";SameSite="+o].join("")};t.formatCookie=function(e,t,r){return[encodeURIComponent(e),"=",encodeURIComponent(t),n(r)].join("")}})),c=e((function(e,t){function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,s=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){s=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(s)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Object.defineProperty(t,"__esModule",{value:!0}),t.parseCookies=void 0;t.parseCookies=function(e){if(0===e.length)return{};var t={},r=new RegExp("\\s*;\\s*");return e.split(r).forEach((function(e){var r=n(e.split("="),2),s=r[0],o=r[1],i=decodeURIComponent(s),a=decodeURIComponent(o);t[i]=a})),t}})),h=e((function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.CookieStorage=void 0;var r=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._defaultOptions=Object.assign({domain:null,expires:null,path:null,secure:!1},t),"undefined"!=typeof Proxy)return new Proxy(this,s)}var t,r,o;return t=e,(r=[{key:"clear",value:function(){var e=this,t=c.parseCookies(this._getCookie());Object.keys(t).forEach((function(t){return e.removeItem(t)}))}},{key:"getItem",value:function(e){var t=c.parseCookies(this._getCookie());return Object.prototype.hasOwnProperty.call(t,e)?t[e]:null}},{key:"key",value:function(e){var t=c.parseCookies(this._getCookie()),n=Object.keys(t).sort();return e<n.length?n[e]:null}},{key:"removeItem",value:function(e,t){var n=Object.assign(Object.assign(Object.assign({},this._defaultOptions),t),{expires:new Date(0)}),r=l.formatCookie(e,"",n);this._setCookie(r)}},{key:"setItem",value:function(e,t,n){var r=Object.assign(Object.assign({},this._defaultOptions),n),s=l.formatCookie(e,t,r);this._setCookie(s)}},{key:"_getCookie",value:function(){return"undefined"==typeof document||void 0===document.cookie?"":document.cookie}},{key:"_setCookie",value:function(e){document.cookie=e}},{key:"length",get:function(){var e=c.parseCookies(this._getCookie());return Object.keys(e).length}}])&&n(t.prototype,r),o&&n(t,o),e}();t.CookieStorage=r;var s={defineProperty:function(e,t,n){return e.setItem(t.toString(),String(n.value)),!0},deleteProperty:function(e,t){return e.removeItem(t.toString()),!0},get:function(e,t,n){if("string"==typeof t&&t in e)return e[t];var r=e.getItem(t.toString());return null!==r?r:void 0},getOwnPropertyDescriptor:function(e,t){if(!(t in e))return{configurable:!0,enumerable:!0,value:e.getItem(t.toString()),writable:!0}},has:function(e,t){return"string"==typeof t&&t in e||null!==e.getItem(t.toString())},ownKeys:function(e){for(var t=[],n=0;n<e.length;n++){var r=e.key(n);null!==r&&t.push(r)}return t},preventExtensions:function(e){throw new TypeError("can't prevent extensions on this proxy object")},set:function(e,t,n,r){return e.setItem(t.toString(),String(n)),!0}}})),p=t(e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"CookieStorage",{enumerable:!0,get:function(){return h.CookieStorage}}),Object.defineProperty(t,"formatCookie",{enumerable:!0,get:function(){return l.formatCookie}}),Object.defineProperty(t,"parseCookies",{enumerable:!0,get:function(){return c.parseCookies}})})));class f extends p.CookieStorage{constructor(){super({sameSite:"Strict",expires:new Date,secure:!0,domain:location.hostname,path:"/"})}getItem(e){if(e===o.SESSION){const e=super.getItem("fx.customer"),t=super.getItem("fx.customer.duration"),n=super.getItem("fx.customer.start"),r=super.getItem("fx.customer.jwt");if(null===e||null===t||null===n||null===r)return null;const s={session_token:e,date_created:n,expires_in:parseInt(t),jwt:r},o=super.getItem("fx.customer.sso");return null!==o&&(s.sso=o),JSON.stringify(s)}return super.getItem(e)}setItem(e,t,n){if(e!==o.SESSION)return super.setItem(e,t,n);{const e=JSON.parse(t),n=1e3*e.expires_in,r=new Date(new Date(e.date_created).getTime()+n);super.setItem("fx.customer",e.session_token,{expires:r}),super.setItem("fx.customer.jwt",e.jwt,{expires:r}),super.setItem("fx.customer.start",e.date_created,{expires:r}),super.setItem("fx.customer.duration",String(e.expires_in),{expires:r}),e.sso&&super.setItem("fx.customer.sso",e.sso,{expires:r})}}clear(){for(let e=0;e<this.length;){const t=super.key(e);t.startsWith("fx.customer")?super.removeItem(t):e++}}}const d=new f;let g,m=e=>e;class _ extends(i(u(s))){constructor(){var e;super(...arguments),e=this,this.__storage="local",this.__level=0,this.__base=location.origin,this.__api=this.__createAPIInstance(),this.__handleFetch=async function(t){if(!(t instanceof a))return;if(t.defaultPrevented)return;if(t.composedPath()[0]===e)return;t.preventDefault();const n=new a("fetch",{cancelable:!0,composed:!0,request:t.request,bubbles:!0,reject:e=>t.respondWith(Promise.reject(e)),resolve:r=>{"foxy://customer-api/session"===n.request.url&&e.requestUpdate(),401===r.status&&e.requestUpdate(),t.respondWith(Promise.resolve(r))}});e.dispatchEvent(n)&&n.respondWith(e.__handleRequest(n.request))}}static get properties(){return n(n({},super.properties),{},{storage:{type:String,noAccessor:!0},level:{type:Number,noAccessor:!0},base:{type:String,noAccessor:!0}})}get isLoggedIn(){return!!this.api.storage.getItem(o.SESSION)}get api(){return this.__api}get base(){return this.__base}set base(e){this.__base=e,this.__api=this.__createAPIInstance()}get level(){return this.__level}set level(e){this.__level=e,this.__api=this.__createAPIInstance()}get storage(){return this.__storage}set storage(e){this.__storage=e,this.__api=this.__createAPIInstance()}connectedCallback(){super.connectedCallback(),this.addEventListener("fetch",this.__handleFetch)}render(){return r(g||(g=m` ${0} <slot></slot> `),this.renderTemplateOrSlot(this.isLoggedIn?"logged-in":"logged-out"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("fetch",this.__handleFetch)}__createAPIInstance(){const e={session:sessionStorage,cookie:d,local:localStorage};return new o({storage:e[this.storage],level:this.level,base:new URL(this.base)})}async __handleVirtualAuthSessionDelete(){return await this.api.signOut(),this.dispatchEvent(new _.SignOutEvent("signout")),this.requestUpdate(),new Response}async __handleVirtualAuthSessionPost(e){const t=await e.clone().json();if("password"!==t.type)throw new Error(`Unknown payload type ${t.type}`);let r,s;try{await this.api.signIn(t.credential),this.dispatchEvent(new _.SignInEvent("signin")),this.requestUpdate(),r=200,s=n({_links:{self:{href:e.url}}},t)}catch(e){if(!(e instanceof o.AuthError))throw e;if("UNAUTHORIZED"!==e.code)throw e;r=401,s={total:1,_embedded:{"fx:errors":[{message:e.message,logref:"unavailable",code:"invalid_credential_error"}]}}}return new Response(JSON.stringify(s),{status:r})}async __handleVirtualAuthSessionAny(e){return new Response(JSON.stringify({_links:{self:{href:e.url}},message:"POST to this endpoint to sign in"}))}async __handleVirtualAuthRecoverPost(e){const t=await e.clone().json();if("email"===t.type)return await this.api.sendPasswordResetEmail(t.detail),new Response(JSON.stringify({_links:{self:{href:e.url}},email:t.email}));throw new Error(`Unknown payload type ${t.type}`)}async __handleVirtualAuthRecoverAny(e){return new Response(JSON.stringify({_links:{self:{href:e.url}},message:"POST to this endpoint to request a password reset"}))}async __handleVirtualAuthSignUpPost(e){const t=await e.clone().json();try{await this.api.signUp(t)}catch(e){if(!(e instanceof o.AuthError))throw e;let t,n;if("UNAUTHORIZED"===e.code)t="Customer registration is disabled for this store.",n=401;else if("UNAVAILABLE"===e.code)t="This email address is already in use by an existing customer of this store.",n=403;else{if("INVALID_FORM"!==e.code)throw e;t="Client verification failed.",n=400}const r=JSON.stringify({total:1,_embedded:{"fx:errors":[{message:t}]}});return new Response(r,{status:n})}return t.password&&await this.api.signIn(t),this.requestUpdate(),this.dispatchEvent(new _.SignUpEvent("signup")),new Response(JSON.stringify({_links:{self:{href:e.url}},message:"Account created"}))}async __handleVirtualAuthSignUpAny(e){return new Response(JSON.stringify({_links:{self:{href:e.url}},message:"POST to this endpoint to create an account"}))}async __handleRequest(e){const t=e.url,n=e.method;try{if(t.startsWith("foxy://customer-api/session"))return"DELETE"===n?this.__handleVirtualAuthSessionDelete():"POST"===n?this.__handleVirtualAuthSessionPost(e):this.__handleVirtualAuthSessionAny(e);if(t.startsWith("foxy://customer-api/recover"))return"POST"===n?this.__handleVirtualAuthRecoverPost(e):this.__handleVirtualAuthRecoverAny(e);if(t.startsWith("foxy://customer-api/signup"))return"POST"===n?this.__handleVirtualAuthSignUpPost(e):this.__handleVirtualAuthSignUpAny(e);const r=await this.api.fetch(e);return 401===r.status&&(this.api.storage.clear(),this.dispatchEvent(new _.SignOutEvent("signout")),this.requestUpdate()),r}catch(e){return new Response(null,{status:500})}}}_.SignOutEvent=class extends CustomEvent{},_.SignInEvent=class extends CustomEvent{},_.SignUpEvent=class extends CustomEvent{};export{_ as C};
@@ -1,4 +1,4 @@
1
- import{D as e}from"./shared-fb34e84c.js";import{D as t,A as i,y as n}from"./shared-44ce656d.js";const s=e=>class extends e{static get properties(){return{theme:{type:String,readOnly:!0}}}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),"theme"===e&&this._setTheme(i)}},a=t=>class extends(s(t)){static finalize(){super.finalize();const e=this.prototype._template,t=this.template&&this.template.parentElement&&this.template.parentElement.id===this.is,i=Object.getPrototypeOf(this.prototype)._template;i&&!t&&Array.from(i.content.querySelectorAll("style[include]")).forEach((t=>{this._includeStyle(t.getAttribute("include"),e)})),this._includeMatchingThemes(e)}static _includeMatchingThemes(t){const i=e.prototype.modules;let n=!1;const s=this.is+"-default-theme";Object.keys(i).sort(((e,t)=>{const i=0===e.indexOf("vaadin-"),n=0===t.indexOf("vaadin-"),s=["lumo-","material-"],a=s.filter((t=>0===e.indexOf(t))).length>0,o=s.filter((e=>0===t.indexOf(e))).length>0;return i!==n?i?-1:1:a!==o?a?-1:1:0})).forEach((e=>{if(e!==s){const s=i[e].getAttribute("theme-for");s&&s.split(" ").forEach((i=>{new RegExp("^"+i.split("*").join(".*")+"$").test(this.is)&&(n=!0,this._includeStyle(e,t))}))}})),!n&&i[s]&&this._includeStyle(s,t)}static _includeStyle(e,t){if(t&&!t.content.querySelector(`style[include="${e}"]`)){const i=document.createElement("style");i.setAttribute("include",e),t.content.appendChild(i)}}}
1
+ import{D as e}from"./shared-4efc6bb8.js";import{D as t,A as i,y as n}from"./shared-4d543043.js";const s=e=>class extends e{static get properties(){return{theme:{type:String,readOnly:!0}}}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),"theme"===e&&this._setTheme(i)}},a=t=>class extends(s(t)){static finalize(){super.finalize();const e=this.prototype._template,t=this.template&&this.template.parentElement&&this.template.parentElement.id===this.is,i=Object.getPrototypeOf(this.prototype)._template;i&&!t&&Array.from(i.content.querySelectorAll("style[include]")).forEach((t=>{this._includeStyle(t.getAttribute("include"),e)})),this._includeMatchingThemes(e)}static _includeMatchingThemes(t){const i=e.prototype.modules;let n=!1;const s=this.is+"-default-theme";Object.keys(i).sort(((e,t)=>{const i=0===e.indexOf("vaadin-"),n=0===t.indexOf("vaadin-"),s=["lumo-","material-"],a=s.filter((t=>0===e.indexOf(t))).length>0,o=s.filter((e=>0===t.indexOf(e))).length>0;return i!==n?i?-1:1:a!==o?a?-1:1:0})).forEach((e=>{if(e!==s){const s=i[e].getAttribute("theme-for");s&&s.split(" ").forEach((i=>{new RegExp("^"+i.split("*").join(".*")+"$").test(this.is)&&(n=!0,this._includeStyle(e,t))}))}})),!n&&i[s]&&this._includeStyle(s,t)}static _includeStyle(e,t){if(t&&!t.content.querySelector(`style[include="${e}"]`)){const i=document.createElement("style");i.setAttribute("include",e),t.content.appendChild(i)}}}
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2020 Vaadin Ltd.
@@ -1,4 +1,4 @@
1
- import{_ as e}from"./shared-0f6e4584.js";import"./shared-b08ca8d0.js";import"./shared-4b346553.js";import"./shared-19884cf4.js";import"./shared-8f3398dc.js";import{T as t}from"./shared-b8198665.js";import"./shared-0a6a28ce.js";import{h as s,P as i}from"./shared-44ce656d.js";import{E as n,T as l}from"./shared-09b4185a.js";import{L as a}from"./shared-da9e048f.js";import{C as r}from"./shared-61ade33e.js";import{I as o}from"./shared-d8c3067b.js";import"./shared-56a559fd.js";import{w as A,y as d,x as h}from"./shared-fb34e84c.js";import{O as u}from"./shared-280f868d.js";import{a as m,F as c}from"./shared-90a47948.js";import{c as p,L as v,h as g}from"./shared-dc73b9a5.js";import{D as _}from"./shared-f11b2116.js";class y extends CustomEvent{constructor(e){super("change",{detail:e})}}class f extends y{}const b=s`<dom-module id="lumo-list-box" theme-for="vaadin-list-box">
1
+ import{_ as e}from"./shared-d1195c27.js";import"./shared-1cfea4b6.js";import"./shared-011d6240.js";import"./shared-906fe068.js";import"./shared-d8cd61ed.js";import{T as t}from"./shared-9e94c56d.js";import"./shared-f0d70be1.js";import{h as s,P as i}from"./shared-4d543043.js";import{E as n,T as l}from"./shared-8a8bfd72.js";import{L as a}from"./shared-4a86d1ca.js";import{C as r}from"./shared-61ade33e.js";import{I as o}from"./shared-9de0a899.js";import"./shared-c6b69d4e.js";import{w as A,y as d,x as h}from"./shared-4efc6bb8.js";import{O as u}from"./shared-34c84b9f.js";import{a as m,F as c}from"./shared-e1850e5f.js";import{c as p,L as v,h as g}from"./shared-dc73b9a5.js";import{D as _}from"./shared-d713c00f.js";class y extends CustomEvent{constructor(e){super("change",{detail:e})}}class f extends y{}const b=s`<dom-module id="lumo-list-box" theme-for="vaadin-list-box">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -1,4 +1,4 @@
1
- import{_ as e}from"./shared-0f6e4584.js";import{T as t}from"./shared-199e3870.js";import{a as s}from"./shared-fb34e84c.js";import{p as n}from"./shared-f34aeb6c.js";let a,o,i,r,l=e=>e;class c extends(s(t,"subscriptions-table")){constructor(){super(...arguments),this.columns=[c.priceColumn,c.summaryColumn,c.statusColumn,c.subTokenURLColumn]}}c.priceColumn={cell:t=>{const s=t.data._embedded["fx:transaction_template"],o=`${s.total_order} ${s.currency_code}`;return t.html(a||(a=l`
1
+ import{_ as e}from"./shared-d1195c27.js";import{T as t}from"./shared-5ff1affd.js";import{a as s}from"./shared-4efc6bb8.js";import{p as n}from"./shared-73c1d31e.js";let a,o,i,r,l=e=>e;class c extends(s(t,"subscriptions-table")){constructor(){super(...arguments),this.columns=[c.priceColumn,c.summaryColumn,c.statusColumn,c.subTokenURLColumn]}}c.priceColumn={cell:t=>{const s=t.data._embedded["fx:transaction_template"],o=`${s.total_order} ${s.currency_code}`;return t.html(a||(a=l`
2
2
  <foxy-i18n
3
3
  data-testclass="i18n frequencies"
4
4
  class="font-medium text-m font-tnum"
@@ -1 +1 @@
1
- import"./shared-b08ca8d0.js";import"./shared-c2776a33.js";const n=document.createElement("template");n.innerHTML='<dom-module id="lumo-menu-overlay-core">\n <template>\n <style>\n :host([opening]),\n :host([closing]) {\n animation: 0.14s lumo-overlay-dummy-animation;\n }\n\n [part="overlay"] {\n will-change: opacity, transform;\n }\n\n :host([opening]) [part="overlay"] {\n animation: 0.1s lumo-menu-overlay-enter ease-out both;\n }\n\n @keyframes lumo-menu-overlay-enter {\n 0% {\n opacity: 0;\n transform: translateY(-4px);\n }\n }\n\n :host([closing]) [part="overlay"] {\n animation: 0.1s lumo-menu-overlay-exit both;\n }\n\n @keyframes lumo-menu-overlay-exit {\n 100% {\n opacity: 0;\n }\n }\n </style>\n </template>\n</dom-module><dom-module id="lumo-menu-overlay">\n <template>\n <style include="lumo-overlay lumo-menu-overlay-core">\n /* Small viewport (bottom sheet) styles */\n /* Use direct media queries instead of the state attributes (`[phone]` and `[fullscreen]`) provided by the elements */\n @media (max-width: 420px), (max-height: 420px) {\n :host {\n top: 0 !important;\n right: 0 !important;\n bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;\n left: 0 !important;\n align-items: stretch !important;\n justify-content: flex-end !important;\n }\n\n [part="overlay"] {\n max-height: 50vh;\n width: 100vw;\n border-radius: 0;\n box-shadow: var(--lumo-box-shadow-xl);\n }\n\n /* The content part scrolls instead of the overlay part, because of the gradient fade-out */\n [part="content"] {\n padding: 30px var(--lumo-space-m);\n max-height: inherit;\n box-sizing: border-box;\n -webkit-overflow-scrolling: touch;\n overflow: auto;\n -webkit-mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);\n mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);\n }\n\n [part="backdrop"] {\n display: block;\n }\n\n /* Animations */\n\n :host([opening]) [part="overlay"] {\n animation: 0.2s lumo-mobile-menu-overlay-enter cubic-bezier(.215, .61, .355, 1) both;\n }\n\n :host([closing]),\n :host([closing]) [part="backdrop"] {\n animation-delay: 0.14s;\n }\n\n :host([closing]) [part="overlay"] {\n animation: 0.14s 0.14s lumo-mobile-menu-overlay-exit cubic-bezier(.55, .055, .675, .19) both;\n }\n }\n\n @keyframes lumo-mobile-menu-overlay-enter {\n 0% {\n transform: translateY(150%);\n }\n }\n\n @keyframes lumo-mobile-menu-overlay-exit {\n 100% {\n transform: translateY(150%);\n }\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(n.content);
1
+ import"./shared-1cfea4b6.js";import"./shared-f97ed2ff.js";const n=document.createElement("template");n.innerHTML='<dom-module id="lumo-menu-overlay-core">\n <template>\n <style>\n :host([opening]),\n :host([closing]) {\n animation: 0.14s lumo-overlay-dummy-animation;\n }\n\n [part="overlay"] {\n will-change: opacity, transform;\n }\n\n :host([opening]) [part="overlay"] {\n animation: 0.1s lumo-menu-overlay-enter ease-out both;\n }\n\n @keyframes lumo-menu-overlay-enter {\n 0% {\n opacity: 0;\n transform: translateY(-4px);\n }\n }\n\n :host([closing]) [part="overlay"] {\n animation: 0.1s lumo-menu-overlay-exit both;\n }\n\n @keyframes lumo-menu-overlay-exit {\n 100% {\n opacity: 0;\n }\n }\n </style>\n </template>\n</dom-module><dom-module id="lumo-menu-overlay">\n <template>\n <style include="lumo-overlay lumo-menu-overlay-core">\n /* Small viewport (bottom sheet) styles */\n /* Use direct media queries instead of the state attributes (`[phone]` and `[fullscreen]`) provided by the elements */\n @media (max-width: 420px), (max-height: 420px) {\n :host {\n top: 0 !important;\n right: 0 !important;\n bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;\n left: 0 !important;\n align-items: stretch !important;\n justify-content: flex-end !important;\n }\n\n [part="overlay"] {\n max-height: 50vh;\n width: 100vw;\n border-radius: 0;\n box-shadow: var(--lumo-box-shadow-xl);\n }\n\n /* The content part scrolls instead of the overlay part, because of the gradient fade-out */\n [part="content"] {\n padding: 30px var(--lumo-space-m);\n max-height: inherit;\n box-sizing: border-box;\n -webkit-overflow-scrolling: touch;\n overflow: auto;\n -webkit-mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);\n mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);\n }\n\n [part="backdrop"] {\n display: block;\n }\n\n /* Animations */\n\n :host([opening]) [part="overlay"] {\n animation: 0.2s lumo-mobile-menu-overlay-enter cubic-bezier(.215, .61, .355, 1) both;\n }\n\n :host([closing]),\n :host([closing]) [part="backdrop"] {\n animation-delay: 0.14s;\n }\n\n :host([closing]) [part="overlay"] {\n animation: 0.14s 0.14s lumo-mobile-menu-overlay-exit cubic-bezier(.55, .055, .675, .19) both;\n }\n }\n\n @keyframes lumo-mobile-menu-overlay-enter {\n 0% {\n transform: translateY(150%);\n }\n }\n\n @keyframes lumo-mobile-menu-overlay-exit {\n 100% {\n transform: translateY(150%);\n }\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(n.content);
@@ -1,2 +1,2 @@
1
- import{I as e}from"./shared-7d38cb8a.js";import{_ as t}from"./shared-0f6e4584.js";import{c as r,h as s}from"./shared-dc73b9a5.js";import{r as a}from"./shared-a0c6a159.js";let o,i,d,l,n,c=e=>e;customElements.define("foxy-internal-source-control",class extends e{constructor(){super(...arguments),this.__isErrorVisible=!1,this.__hovered=!1,this.__focused=!1}static get properties(){return t(t({},super.properties),{},{__isErrorVisible:{attribute:!1},__hovered:{attribute:!1},__focused:{attribute:!1}})}static get styles(){return[...super.styles,r(o||(o=c`.monospace{font-family:monospace}.resize-none{resize:none}.max-h-16em{max-height:16em}textarea::selection{background:var(--lumo-contrast-10pct)}`))]}renderControl(){var e;let t,r,o,h,b;return this.disabled?(t="bg-contrast-5 text-disabled",r="text-disabled",h="text-disabled",b="text-disabled",this.readonly?(t+=" border-dashed border-contrast-20",o="border-dashed border-contrast-30"):(t+=" border-transparent",o="border-contrast-10")):this.readonly?(t="border-dashed border-contrast-30 bg-transparent text-secondary",r="text-secondary",o="border-dashed border-contrast-30",h="text-secondary",b="text-secondary",this.__focused&&(o+=" ring-2 ring-primary-50")):this.__focused?(t="border-transparent bg-contrast-10 text-tertiary",r="text-secondary",o="border-primary-50 ring-1 ring-primary-50",h="text-body",b="text-primary"):this.__hovered?(t="border-transparent bg-contrast-20 text-tertiary",r="text-body",o="border-contrast-20",h="text-body",b="text-body"):(t="border-transparent bg-contrast-10 text-tertiary",r="text-secondary",o="border-contrast-10",h="text-body",b="text-secondary"),s(i||(i=c` <label class="block h-full" @mouseenter="${0}" @mouseleave="${0}"> <div class="mb-xs transition-colors leading-none text-s font-medium ${0}" part="label"> ${0} </div> <div class="max-h-16em h-full transition-colors flex-1 flex bg-base rounded overflow-auto border ${0}" part="editor"> <div class="h-full transition-colors monospace leading-s text-s text-right border-r ${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} </div> <textarea placeholder="${0}" class="bg-base whitespace-pre leading-s text-s focus-outline-none monospace resize-none block w-full select-text transition-colors ${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" rows="1" .value="${0}" ?disabled="${0}" ?readonly="${0}" @focus="${0}" @blur="${0}" @input="${0}">
1
+ import{I as e}from"./shared-55bc51c8.js";import{_ as t}from"./shared-d1195c27.js";import{c as r,h as s}from"./shared-dc73b9a5.js";import{r as a}from"./shared-a0c6a159.js";let o,i,d,l,n,c=e=>e;customElements.define("foxy-internal-source-control",class extends e{constructor(){super(...arguments),this.__isErrorVisible=!1,this.__hovered=!1,this.__focused=!1}static get properties(){return t(t({},super.properties),{},{__isErrorVisible:{attribute:!1},__hovered:{attribute:!1},__focused:{attribute:!1}})}static get styles(){return[...super.styles,r(o||(o=c`.monospace{font-family:monospace}.resize-none{resize:none}.max-h-16em{max-height:16em}textarea::selection{background:var(--lumo-contrast-10pct)}`))]}renderControl(){var e;let t,r,o,h,b;return this.disabled?(t="bg-contrast-5 text-disabled",r="text-disabled",h="text-disabled",b="text-disabled",this.readonly?(t+=" border-dashed border-contrast-20",o="border-dashed border-contrast-30"):(t+=" border-transparent",o="border-contrast-10")):this.readonly?(t="border-dashed border-contrast-30 bg-transparent text-secondary",r="text-secondary",o="border-dashed border-contrast-30",h="text-secondary",b="text-secondary",this.__focused&&(o+=" ring-2 ring-primary-50")):this.__focused?(t="border-transparent bg-contrast-10 text-tertiary",r="text-secondary",o="border-primary-50 ring-1 ring-primary-50",h="text-body",b="text-primary"):this.__hovered?(t="border-transparent bg-contrast-20 text-tertiary",r="text-body",o="border-contrast-20",h="text-body",b="text-body"):(t="border-transparent bg-contrast-10 text-tertiary",r="text-secondary",o="border-contrast-10",h="text-body",b="text-secondary"),s(i||(i=c` <label class="block h-full" @mouseenter="${0}" @mouseleave="${0}"> <div class="mb-xs transition-colors leading-none text-s font-medium ${0}" part="label"> ${0} </div> <div class="max-h-16em h-full transition-colors flex-1 flex bg-base rounded overflow-auto border ${0}" part="editor"> <div class="h-full transition-colors monospace leading-s text-s text-right border-r ${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} </div> <textarea placeholder="${0}" class="bg-base whitespace-pre leading-s text-s focus-outline-none monospace resize-none block w-full select-text transition-colors ${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" rows="1" .value="${0}" ?disabled="${0}" ?readonly="${0}" @focus="${0}" @blur="${0}" @input="${0}">
2
2
  </textarea> </div> <div class="mt-xs transition-colors leading-xs text-xs ${0}" part="helper-text" ?hidden="${0}"> ${0} </div> <div class="mt-xs text-xs leading-xs text-error" ?hidden="${0}"> ${0} </div> </label> `),(()=>this.__hovered=!0),(()=>this.__hovered=!1),b,this.label,o,t,a(null!==(e=this._value.split("\n"))&&void 0!==e?e:[],((e,t)=>String(t)),((e,t)=>s(d||(d=c`<div>${0}${0}<span>${0}<span></span></span></div>`),t<9?s(l||(l=c`<span class="opacity-0">0</span>`)):"",t<99?s(n||(n=c`<span class="opacity-0">0</span>`)):"",t+1))),this.placeholder,h,this._value,this.disabled,this.readonly,(()=>this.__focused=!0),(()=>{this.__focused=!1,this.__isErrorVisible=!0}),(e=>{const t=e.currentTarget;this._value=t.value}),r,!this.helperText,this.helperText,!this.__isErrorVisible||!this._errorMessage||this.disabled||this.readonly,this._errorMessage)}updated(e){super.updated(e),this.renderRoot.querySelectorAll("textarea").forEach((e=>{e.style.height="auto",e.style.height=`${e.scrollHeight}px`,e.style.overflowY="hidden"}))}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}});
@@ -1,4 +1,4 @@
1
- import{h as e}from"./shared-44ce656d.js";import{N as t}from"./shared-d132bd37.js";
1
+ import{h as e}from"./shared-4d543043.js";import{N as t}from"./shared-045bd59c.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2019 Vaadin Ltd.
@@ -1,4 +1,4 @@
1
- import"./shared-b08ca8d0.js";import{h as e,P as t}from"./shared-44ce656d.js";import{a}from"./shared-b8198665.js";import{C as i}from"./shared-61ade33e.js";import{E as r,T as l}from"./shared-09b4185a.js";const o=e`<dom-module id="lumo-text-area" theme-for="vaadin-text-area">
1
+ import"./shared-1cfea4b6.js";import{h as e,P as t}from"./shared-4d543043.js";import{a}from"./shared-9e94c56d.js";import{C as i}from"./shared-61ade33e.js";import{E as r,T as l}from"./shared-8a8bfd72.js";const o=e`<dom-module id="lumo-text-area" theme-for="vaadin-text-area">
2
2
  <template>
3
3
  <style include="lumo-text-field">
4
4
  [part="input-field"],
@@ -0,0 +1 @@
1
+ import"./foxy-spinner.js";import{I as e}from"./shared-9ef03974.js";customElements.define("foxy-internal-card",e);
@@ -1 +1 @@
1
- import{a as t,a4 as r,a5 as e,a6 as n,a7 as o,a8 as a,r as c,a9 as u,aa as s,ab as i,ac as f,ad as b,ae as j,af as y,ag as v,ah as p,h as l,ai as d,aj as A,ak as w,al as h}from"./shared-0f6e4584.js";import{b as g,a as m}from"./shared-12a7a15d.js";function O(t){return t}var x=Object.create,S=function(){function r(){}return function(e){if(!t(e))return{};if(x)return x(e);r.prototype=e;var n=new r;return r.prototype=void 0,n}}();function U(t,r){var e=-1,n=t.length;for(r||(r=Array(n));++e<n;)r[e]=t[e];return r}function I(t,r,e,n){var o=!e;e||(e={});for(var a=-1,c=r.length;++a<c;){var u=r[a],s=n?n(e[u],t[u],u,e,t):void 0;void 0===s&&(s=t[u]),o?g(e,u,s):m(e,u,s)}return e}var F=Object.prototype.hasOwnProperty;function B(e){if(!t(e))return function(t){var r=[];if(null!=t)for(var e in Object(t))r.push(e);return r}(e);var n=r(e),o=[];for(var a in e)("constructor"!=a||!n&&F.call(e,a))&&o.push(a);return o}function E(t){return e(t)?n(t,!0):B(t)}var M=o(Object.getPrototypeOf,Object);var D="object"==typeof exports&&exports&&!exports.nodeType&&exports,P=D&&"object"==typeof module&&module&&!module.nodeType&&module,k=P&&P.exports===D?c.Buffer:void 0,C=k?k.allocUnsafe:void 0;var L=Object.getOwnPropertySymbols?function(t){for(var r=[];t;)i(r,u(t)),t=M(t);return r}:s;function N(t){return f(t,E,L)}var R=Object.prototype.hasOwnProperty;function T(t){var r=new t.constructor(t.byteLength);return new b(r).set(new b(t)),r}var V=/\w*$/;var G=j?j.prototype:void 0,W=G?G.valueOf:void 0;var $="[object Boolean]",q="[object Date]",z="[object Map]",H="[object Number]",J="[object RegExp]",K="[object Set]",Q="[object String]",X="[object Symbol]",Y="[object ArrayBuffer]",Z="[object DataView]",_="[object Float32Array]",tt="[object Float64Array]",rt="[object Int8Array]",et="[object Int16Array]",nt="[object Int32Array]",ot="[object Uint8Array]",at="[object Uint8ClampedArray]",ct="[object Uint16Array]",ut="[object Uint32Array]";function st(t,r,e){var n,o,a,c=t.constructor;switch(r){case Y:return T(t);case $:case q:return new c(+t);case Z:return function(t,r){var e=r?T(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}(t,e);case _:case tt:case rt:case et:case nt:case ot:case at:case ct:case ut:return function(t,r){var e=r?T(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}(t,e);case z:return new c;case H:case Q:return new c(t);case J:return(a=new(o=t).constructor(o.source,V.exec(o))).lastIndex=o.lastIndex,a;case K:return new c;case X:return n=t,W?Object(W.call(n)):{}}}var it=p&&p.isMap,ft=it?l(it):function(t){return y(t)&&"[object Map]"==v(t)};var bt=p&&p.isSet,jt=bt?l(bt):function(t){return y(t)&&"[object Set]"==v(t)},yt=1,vt=2,pt=4,lt="[object Arguments]",dt="[object Function]",At="[object GeneratorFunction]",wt="[object Object]",ht={};function gt(e,n,o,c,s,i){var f,b=n&yt,j=n&vt,y=n&pt;if(o&&(f=s?o(e,c,s,i):o(e)),void 0!==f)return f;if(!t(e))return e;var p=d(e);if(p){if(f=function(t){var r=t.length,e=new t.constructor(r);return r&&"string"==typeof t[0]&&R.call(t,"index")&&(e.index=t.index,e.input=t.input),e}(e),!b)return U(e,f)}else{var l=v(e),g=l==dt||l==At;if(A(e))return function(t,r){if(r)return t.slice();var e=t.length,n=C?C(e):new t.constructor(e);return t.copy(n),n}(e,b);if(l==wt||l==lt||g&&!s){if(f=j||g?{}:function(t){return"function"!=typeof t.constructor||r(t)?{}:S(M(t))}(e),!b)return j?function(t,r){return I(t,L(t),r)}(e,function(t,r){return t&&I(r,E(r),t)}(f,e)):function(t,r){return I(t,u(t),r)}(e,function(t,r){return t&&I(r,a(r),t)}(f,e))}else{if(!ht[l])return s?e:{};f=st(e,l,b)}}i||(i=new w);var O=i.get(e);if(O)return O;i.set(e,f),jt(e)?e.forEach((function(t){f.add(gt(t,n,o,t,e,i))})):ft(e)&&e.forEach((function(t,r){f.set(r,gt(t,n,o,r,e,i))}));var x=p?void 0:(y?j?N:h:j?E:a)(e);return function(t,r){for(var e=-1,n=null==t?0:t.length;++e<n&&!1!==r(t[e],e,t););}(x||e,(function(t,r){x&&(t=e[r=t]),m(f,r,gt(t,n,o,r,e,i))})),f}ht[lt]=ht["[object Array]"]=ht["[object ArrayBuffer]"]=ht["[object DataView]"]=ht["[object Boolean]"]=ht["[object Date]"]=ht["[object Float32Array]"]=ht["[object Float64Array]"]=ht["[object Int8Array]"]=ht["[object Int16Array]"]=ht["[object Int32Array]"]=ht["[object Map]"]=ht["[object Number]"]=ht[wt]=ht["[object RegExp]"]=ht["[object Set]"]=ht["[object String]"]=ht["[object Symbol]"]=ht["[object Uint8Array]"]=ht["[object Uint8ClampedArray]"]=ht["[object Uint16Array]"]=ht["[object Uint32Array]"]=!0,ht["[object Error]"]=ht[dt]=ht["[object WeakMap]"]=!1;function mt(t){return gt(t,5)}export{mt as a,U as c,O as i};
1
+ import{a as t,a4 as r,a5 as e,a6 as n,a7 as o,a8 as a,r as c,a9 as u,aa as s,ab as i,ac as f,ad as b,ae as j,af as y,ag as v,ah as p,h as l,ai as d,aj as A,ak as w,al as h}from"./shared-d1195c27.js";import{b as g,a as m}from"./shared-019348d7.js";function O(t){return t}var x=Object.create,S=function(){function r(){}return function(e){if(!t(e))return{};if(x)return x(e);r.prototype=e;var n=new r;return r.prototype=void 0,n}}();function U(t,r){var e=-1,n=t.length;for(r||(r=Array(n));++e<n;)r[e]=t[e];return r}function I(t,r,e,n){var o=!e;e||(e={});for(var a=-1,c=r.length;++a<c;){var u=r[a],s=n?n(e[u],t[u],u,e,t):void 0;void 0===s&&(s=t[u]),o?g(e,u,s):m(e,u,s)}return e}var F=Object.prototype.hasOwnProperty;function B(e){if(!t(e))return function(t){var r=[];if(null!=t)for(var e in Object(t))r.push(e);return r}(e);var n=r(e),o=[];for(var a in e)("constructor"!=a||!n&&F.call(e,a))&&o.push(a);return o}function E(t){return e(t)?n(t,!0):B(t)}var M=o(Object.getPrototypeOf,Object);var D="object"==typeof exports&&exports&&!exports.nodeType&&exports,P=D&&"object"==typeof module&&module&&!module.nodeType&&module,k=P&&P.exports===D?c.Buffer:void 0,C=k?k.allocUnsafe:void 0;var L=Object.getOwnPropertySymbols?function(t){for(var r=[];t;)i(r,u(t)),t=M(t);return r}:s;function N(t){return f(t,E,L)}var R=Object.prototype.hasOwnProperty;function T(t){var r=new t.constructor(t.byteLength);return new b(r).set(new b(t)),r}var V=/\w*$/;var G=j?j.prototype:void 0,W=G?G.valueOf:void 0;var $="[object Boolean]",q="[object Date]",z="[object Map]",H="[object Number]",J="[object RegExp]",K="[object Set]",Q="[object String]",X="[object Symbol]",Y="[object ArrayBuffer]",Z="[object DataView]",_="[object Float32Array]",tt="[object Float64Array]",rt="[object Int8Array]",et="[object Int16Array]",nt="[object Int32Array]",ot="[object Uint8Array]",at="[object Uint8ClampedArray]",ct="[object Uint16Array]",ut="[object Uint32Array]";function st(t,r,e){var n,o,a,c=t.constructor;switch(r){case Y:return T(t);case $:case q:return new c(+t);case Z:return function(t,r){var e=r?T(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}(t,e);case _:case tt:case rt:case et:case nt:case ot:case at:case ct:case ut:return function(t,r){var e=r?T(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}(t,e);case z:return new c;case H:case Q:return new c(t);case J:return(a=new(o=t).constructor(o.source,V.exec(o))).lastIndex=o.lastIndex,a;case K:return new c;case X:return n=t,W?Object(W.call(n)):{}}}var it=p&&p.isMap,ft=it?l(it):function(t){return y(t)&&"[object Map]"==v(t)};var bt=p&&p.isSet,jt=bt?l(bt):function(t){return y(t)&&"[object Set]"==v(t)},yt=1,vt=2,pt=4,lt="[object Arguments]",dt="[object Function]",At="[object GeneratorFunction]",wt="[object Object]",ht={};function gt(e,n,o,c,s,i){var f,b=n&yt,j=n&vt,y=n&pt;if(o&&(f=s?o(e,c,s,i):o(e)),void 0!==f)return f;if(!t(e))return e;var p=d(e);if(p){if(f=function(t){var r=t.length,e=new t.constructor(r);return r&&"string"==typeof t[0]&&R.call(t,"index")&&(e.index=t.index,e.input=t.input),e}(e),!b)return U(e,f)}else{var l=v(e),g=l==dt||l==At;if(A(e))return function(t,r){if(r)return t.slice();var e=t.length,n=C?C(e):new t.constructor(e);return t.copy(n),n}(e,b);if(l==wt||l==lt||g&&!s){if(f=j||g?{}:function(t){return"function"!=typeof t.constructor||r(t)?{}:S(M(t))}(e),!b)return j?function(t,r){return I(t,L(t),r)}(e,function(t,r){return t&&I(r,E(r),t)}(f,e)):function(t,r){return I(t,u(t),r)}(e,function(t,r){return t&&I(r,a(r),t)}(f,e))}else{if(!ht[l])return s?e:{};f=st(e,l,b)}}i||(i=new w);var O=i.get(e);if(O)return O;i.set(e,f),jt(e)?e.forEach((function(t){f.add(gt(t,n,o,t,e,i))})):ft(e)&&e.forEach((function(t,r){f.set(r,gt(t,n,o,r,e,i))}));var x=p?void 0:(y?j?N:h:j?E:a)(e);return function(t,r){for(var e=-1,n=null==t?0:t.length;++e<n&&!1!==r(t[e],e,t););}(x||e,(function(t,r){x&&(t=e[r=t]),m(f,r,gt(t,n,o,r,e,i))})),f}ht[lt]=ht["[object Array]"]=ht["[object ArrayBuffer]"]=ht["[object DataView]"]=ht["[object Boolean]"]=ht["[object Date]"]=ht["[object Float32Array]"]=ht["[object Float64Array]"]=ht["[object Int8Array]"]=ht["[object Int16Array]"]=ht["[object Int32Array]"]=ht["[object Map]"]=ht["[object Number]"]=ht[wt]=ht["[object RegExp]"]=ht["[object Set]"]=ht["[object String]"]=ht["[object Symbol]"]=ht["[object Uint8Array]"]=ht["[object Uint8ClampedArray]"]=ht["[object Uint16Array]"]=ht["[object Uint32Array]"]=!0,ht["[object Error]"]=ht[dt]=ht["[object WeakMap]"]=!1;function mt(t){return gt(t,5)}export{mt as a,U as c,O as i};
@@ -1,4 +1,4 @@
1
- import{d as e}from"./shared-90a47948.js";import{u as i}from"./shared-fb34e84c.js";
1
+ import{d as e}from"./shared-e1850e5f.js";import{u as i}from"./shared-4efc6bb8.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
@@ -1,4 +1,4 @@
1
- import"./shared-b08ca8d0.js";import"./shared-a207423c.js";import"./shared-4b346553.js";import"./shared-8f3398dc.js";import{h as e,D as t,t as i,a,P as r}from"./shared-44ce656d.js";import{C as o}from"./shared-61ade33e.js";import{E as n,T as s}from"./shared-09b4185a.js";const l=e`<dom-module id="lumo-text-field" theme-for="vaadin-text-field">
1
+ import"./shared-1cfea4b6.js";import"./shared-de45ad84.js";import"./shared-011d6240.js";import"./shared-d8cd61ed.js";import{h as e,D as t,t as i,a,P as r}from"./shared-4d543043.js";import{C as o}from"./shared-61ade33e.js";import{E as n,T as s}from"./shared-8a8bfd72.js";const l=e`<dom-module id="lumo-text-field" theme-for="vaadin-text-field">
2
2
  <template>
3
3
  <style include="lumo-required-field lumo-field-button">
4
4
  :host {
@@ -1 +1 @@
1
- import{T as e}from"./shared-fb34e84c.js";import{N as t}from"./shared-24d71d01.js";import{c as i}from"./shared-4e709717.js";import{h as s}from"./shared-dc73b9a5.js";let r,n,a=e=>e;class o extends(e(t)){renderBody(){return s(r||(r=a``))}render(){const e=this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy";return s(n||(n=a` <div aria-busy="${0}" aria-live="polite" class="relative leading-m text-body text-m font-lumo"> <div class="${0}"> ${0} </div> <div class="${0}"> <foxy-spinner layout="${0}" state="${0}" infer="spinner"> </foxy-spinner> </div> </div> `),this.in("busy"),i({"transition duration-500 ease-in-out":!0,"opacity-0 pointer-events-none":!this.isBodyReady}),this.renderBody(),i({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"items-center justify-center":!0,"opacity-0 pointer-events-none":this.isBodyReady}),"busy"===e?"no-label":"horizontal",e)}get isBodyReady(){return!!this.data}}export{o as I};
1
+ import{T as e}from"./shared-4efc6bb8.js";import{N as t}from"./shared-2ad18636.js";import{c as i}from"./shared-4e709717.js";import{h as s}from"./shared-dc73b9a5.js";let r,a,n=e=>e;class o extends(e(t)){renderBody(){return s(r||(r=n``))}render(){const e=this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy";return s(a||(a=n` <div aria-busy="${0}" aria-live="polite" class="relative leading-m text-body text-m font-lumo"> <div class="${0}"> ${0} </div> <div class="${0}"> <foxy-spinner layout="${0}" state="${0}" infer="spinner"> </foxy-spinner> </div> </div> `),this.in("busy"),i({"transition duration-500 ease-in-out":!0,"opacity-0 pointer-events-none":!this.isBodyReady}),this.renderBody(),i({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"items-center justify-center":!0,"opacity-0 pointer-events-none":this.isBodyReady}),"busy"===e?"no-label":"horizontal",e)}get isBodyReady(){return!!this.data}}export{o as I};
@@ -1 +1 @@
1
- import"./shared-6e859df6.js";import"./shared-37efab30.js";import{a as e}from"./shared-7d38cb8a.js";import{h as t}from"./shared-dc73b9a5.js";import{l as r,_ as i,B as n}from"./shared-0f6e4584.js";import"./shared-6918312e.js";import"./foxy-copy-to-clipboard.js";import"./foxy-spinner.js";import{g as s}from"./shared-bab2ea2c.js";import{C as o}from"./shared-0b01f721.js";import{T as a}from"./shared-fb34e84c.js";import{N as d}from"./shared-24d71d01.js";import{c as l}from"./shared-4e709717.js";let c,f=e=>e;customElements.define("foxy-internal-timestamps-control",class extends e{renderControl(){return t(c||(c=f` <p class="font-lumo text-xs leading-s text-secondary"> <foxy-i18n infer="" key="date_created"></foxy-i18n> <foxy-i18n .options="${0}" infer="" key="date"> </foxy-i18n> <span>&bull;<span> <foxy-i18n infer="" key="date_modified"></foxy-i18n> <foxy-i18n .options="${0}" infer="" key="date"> </foxy-i18n> </span></span></p> `),{value:r(this,"nucleon.data.date_created")},{value:r(this,"nucleon.data.date_modified")})}});let h,u=e=>e;customElements.define("foxy-internal-submit-control",class extends e{constructor(){super(...arguments),this.theme="primary"}static get properties(){return i(i({},super.properties),{},{theme:{type:String}})}renderControl(){return t(h||(h=u` <vaadin-button theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="caption"></foxy-i18n> </vaadin-button> `),this.theme,this.disabled,(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.submit()}))}});let p,y=e=>e;customElements.define("foxy-internal-delete-control",class extends e{constructor(){super(...arguments),this.theme="error"}static get properties(){return i(i({},super.properties),{},{theme:{type:String}})}renderControl(){return t(p||(p=y` <foxy-internal-confirm-dialog message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" infer="" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button data-testid="delete" theme="${0}" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="delete"></foxy-i18n> </vaadin-button> `),(e=>{var t;return!e.detail.cancelled&&(null===(t=this.nucleon)||void 0===t?void 0:t.delete())}),this.theme,this.disabled||this.readonly,(e=>{this.renderRoot.querySelector("#confirm").show(e.currentTarget)}))}});let m,x=e=>e;customElements.define("foxy-internal-undo-control",class extends e{constructor(){super(...arguments),this.theme="secondary"}static get properties(){return i(i({},super.properties),{},{theme:{type:String}})}renderControl(){return t(m||(m=x` <vaadin-button theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="caption"></foxy-i18n> </vaadin-button> `),this.theme,this.disabled,(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.undo()}))}});let b,v,g,$,k,S,_,j,E,O,T,C,w=e=>e;const K=o(a(d));class B extends K{constructor(){super(...arguments),this.status=null}static get properties(){return i(i({},super.properties),{},{status:{type:Object}})}renderHeaderActions(e){return null}get headerTitleKey(){return"title"}get headerTitleOptions(){return i(i({},this.data),{},{context:this.data?"existing":"new",id:this.data?s(this.data._links.self.href):null})}get headerSubtitleKey(){return"subtitle"}get headerSubtitleOptions(){var e;return null!==(e=this.data)&&void 0!==e?e:{}}get headerCopyIdValue(){var e;return this.data&&null!==(e=s(this.data._links.self.href))&&void 0!==e?e:""}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return this.href&&e.unshift("create"),this.href||e.unshift("delete","timestamps","submit"),this.in({idle:{snapshot:"dirty"}})||e.unshift("undo","submit"),new n(e.join(" ").trim())}renderHeader(){if(this.hiddenSelector.matches("header",!0))return t(b||(b=w``));const e=this.data,r=e?this.renderHeaderActions(e):null;return t(v||(v=w` <div> ${0} <h2> <span class="flex items-center gap-s leading-xs text-xl font-medium break-all"> <foxy-i18n options="${0}" infer="header" key="${0}"> </foxy-i18n> ${0} </span> ${0} </h2> ${0} </div> `),this.renderTemplateOrSlot("header:before"),JSON.stringify(this.headerTitleOptions),this.headerTitleKey,e?t(g||(g=w` ${0} ${0} `),this.hiddenSelector.matches("header:copy-id",!0)?"":t($||($=w` <foxy-copy-to-clipboard infer="header copy-id" class="text-m" text="${0}"> </foxy-copy-to-clipboard> `),this.headerCopyIdValue),this.hiddenSelector.matches("header:copy-json",!0)?"":t(k||(k=w` <foxy-copy-to-clipboard infer="header copy-json" class="text-m" icon="icons:code" text="${0}"> </foxy-copy-to-clipboard> `),JSON.stringify(e,null,2))):"",e?t(S||(S=w` <foxy-i18n infer="header" class="text-m text-secondary" key="${0}" .options="${0}"> </foxy-i18n> ${0} `),this.headerSubtitleKey,this.headerSubtitleOptions,r?t(_||(_=w`<div class="mt-xs flex gap-m">${0}</div>`),r):""):"",this.renderTemplateOrSlot("header:after"))}renderBody(){return t(j||(j=w` <foxy-internal-timestamps-control infer="timestamps"></foxy-internal-timestamps-control> <div class="flex gap-m" ?hidden="${0}"> <foxy-internal-delete-control infer="delete"></foxy-internal-delete-control> <div class="w-full"></div> <foxy-internal-undo-control infer="undo"> </foxy-internal-undo-control> <foxy-internal-submit-control infer="submit"> </foxy-internal-submit-control> <foxy-internal-submit-control infer="create" theme="primary success"> </foxy-internal-submit-control> </div> `),["delete","undo","submit","create"].every((e=>this.hiddenSelector.matches(e,!0))))}render(){const e=!(this.in("idle")||this.in({busy:"fetching"})&&this.data);return t(E||(E=w` <div aria-busy="${0}" aria-live="polite" class="relative"> <div class="${0}"> ${0} ${0} ${0} </div> <div data-testid="spinner" class="${0}"> <foxy-spinner layout="${0}" state="${0}" infer="spinner"> </foxy-spinner> ${0} </div> </div> `),this.in("busy"),l({"space-y-m":!0,"transition-opacity":!0,"opacity-0 pointer-events-none":e}),this.__generalErrors.map((e=>this.__renderGeneralError(e))),this.status?this.__renderStatus(this.status):"",this.renderBody(),l({"flex flex-col items-center justify-center gap-m":!0,"transition-opacity absolute inset-0":!0,"opacity-0 pointer-events-none":!e}),this.in("fail")?"vertical":"no-label",this.in("fail")?"error":"busy",this.href&&this.in("fail")?t(O||(O=w` <vaadin-button theme="small contrast" @click="${0}"> <foxy-i18n infer="spinner" key="refresh"></foxy-i18n> </vaadin-button> `),(()=>this.refresh())):"")}get __generalErrors(){const e=this.constructor.generalErrorPrefix;return this.errors.filter((t=>t.startsWith(e)))}__renderGeneralError(e){return t(T||(T=w` <foxy-i18n class="leading-xs text-body rounded bg-error-10 block" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" infer="error" key="${0}"> </foxy-i18n> `),e.replace("error:",""))}__renderStatus({key:e,options:r}){if(!this.hiddenSelector.matches("status",!0))return t(C||(C=w` <p data-testid="status" class="leading-xs text-body rounded bg-success-10 flex items-start gap-m" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <foxy-i18n class="flex-1" infer="status" key="${0}" .options="${0}"></foxy-i18n> <vaadin-button class="flex-shrink-0" theme="success tertiary-inline" @click="${0}"> <foxy-i18n class="flex-1" infer="status" key="close"></foxy-i18n> </vaadin-button> </p> `),e,r,(()=>this.status=null))}}B.generalErrorPrefix="error:",customElements.define("foxy-internal-form",B);export{B as I};
1
+ import"./shared-c9f3f8d3.js";import"./shared-51bb937b.js";import{a as e}from"./shared-55bc51c8.js";import{h as t}from"./shared-dc73b9a5.js";import{l as r,_ as i,B as n}from"./shared-d1195c27.js";import"./shared-c89f7ad5.js";import"./foxy-copy-to-clipboard.js";import"./foxy-spinner.js";import{g as s}from"./shared-bab2ea2c.js";import{C as o}from"./shared-d1cb97c6.js";import{T as a}from"./shared-4efc6bb8.js";import{N as d}from"./shared-2ad18636.js";import{c as l}from"./shared-4e709717.js";let c,h=e=>e;customElements.define("foxy-internal-timestamps-control",class extends e{renderControl(){return t(c||(c=h` <p class="font-lumo text-xs leading-s text-secondary"> <foxy-i18n infer="" key="date_created"></foxy-i18n> <foxy-i18n .options="${0}" infer="" key="date"> </foxy-i18n> <span>&bull;<span> <foxy-i18n infer="" key="date_modified"></foxy-i18n> <foxy-i18n .options="${0}" infer="" key="date"> </foxy-i18n> </span></span></p> `),{value:r(this,"nucleon.data.date_created")},{value:r(this,"nucleon.data.date_modified")})}});let f,u=e=>e;customElements.define("foxy-internal-submit-control",class extends e{constructor(){super(...arguments),this.theme="primary"}static get properties(){return i(i({},super.properties),{},{theme:{type:String}})}renderControl(){return t(f||(f=u` <vaadin-button theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="caption"></foxy-i18n> </vaadin-button> `),this.theme,this.disabled,(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.submit()}))}});let p,y=e=>e;customElements.define("foxy-internal-delete-control",class extends e{constructor(){super(...arguments),this.theme="error"}static get properties(){return i(i({},super.properties),{},{theme:{type:String}})}renderControl(){return t(p||(p=y` <foxy-internal-confirm-dialog message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" infer="" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button data-testid="delete" theme="${0}" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="delete"></foxy-i18n> </vaadin-button> `),(e=>{var t;return!e.detail.cancelled&&(null===(t=this.nucleon)||void 0===t?void 0:t.delete())}),this.theme,this.disabled||this.readonly,(e=>{this.renderRoot.querySelector("#confirm").show(e.currentTarget)}))}});let m,x=e=>e;customElements.define("foxy-internal-undo-control",class extends e{constructor(){super(...arguments),this.theme="secondary"}static get properties(){return i(i({},super.properties),{},{theme:{type:String}})}renderControl(){return t(m||(m=x` <vaadin-button theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="caption"></foxy-i18n> </vaadin-button> `),this.theme,this.disabled,(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.undo()}))}});let b,v,g,$,k,S,_,j,E,O,T,C,w=e=>e;const K=o(a(d));class B extends K{constructor(){super(...arguments),this.status=null}static get properties(){return i(i({},super.properties),{},{status:{type:Object}})}renderHeaderActions(e){return null}get headerTitleKey(){return"title"}get headerTitleOptions(){return i(i({},this.data),{},{context:this.data?"existing":"new",id:this.data?s(this.data._links.self.href):null})}get headerSubtitleKey(){return"subtitle"}get headerSubtitleOptions(){var e;return null!==(e=this.data)&&void 0!==e?e:{}}get headerCopyIdValue(){var e;return this.data&&null!==(e=s(this.data._links.self.href))&&void 0!==e?e:""}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return this.href&&e.unshift("create"),this.href||e.unshift("delete","timestamps","submit"),this.in({idle:{snapshot:"dirty"}})||e.unshift("undo","submit"),new n(e.join(" ").trim())}renderHeader(){if(this.hiddenSelector.matches("header",!0))return t(b||(b=w``));const e=this.data,r=e?this.renderHeaderActions(e):null;return t(v||(v=w` <div> ${0} <h2> <span class="flex items-center gap-s leading-xs text-xl font-medium break-all"> <foxy-i18n options="${0}" infer="header" key="${0}"> </foxy-i18n> ${0} </span> ${0} </h2> ${0} </div> `),this.renderTemplateOrSlot("header:before"),JSON.stringify(this.headerTitleOptions),this.headerTitleKey,e?t(g||(g=w` ${0} ${0} `),this.hiddenSelector.matches("header:copy-id",!0)?"":t($||($=w` <foxy-copy-to-clipboard infer="header copy-id" class="text-m" text="${0}"> </foxy-copy-to-clipboard> `),this.headerCopyIdValue),this.hiddenSelector.matches("header:copy-json",!0)?"":t(k||(k=w` <foxy-copy-to-clipboard infer="header copy-json" class="text-m" icon="icons:code" text="${0}"> </foxy-copy-to-clipboard> `),JSON.stringify(e,null,2))):"",e?t(S||(S=w` <foxy-i18n infer="header" class="text-m text-secondary" key="${0}" .options="${0}"> </foxy-i18n> ${0} `),this.headerSubtitleKey,this.headerSubtitleOptions,r?t(_||(_=w`<div class="mt-xs flex gap-m">${0}</div>`),r):""):"",this.renderTemplateOrSlot("header:after"))}renderBody(){return t(j||(j=w` <foxy-internal-timestamps-control infer="timestamps"></foxy-internal-timestamps-control> <div class="flex gap-m" ?hidden="${0}"> <foxy-internal-delete-control infer="delete"></foxy-internal-delete-control> <div class="w-full"></div> <foxy-internal-undo-control infer="undo"> </foxy-internal-undo-control> <foxy-internal-submit-control infer="submit"> </foxy-internal-submit-control> <foxy-internal-submit-control infer="create" theme="primary success"> </foxy-internal-submit-control> </div> `),["delete","undo","submit","create"].every((e=>this.hiddenSelector.matches(e,!0))))}render(){const e=!(this.in("idle")||this.in({busy:"fetching"})&&this.data);return t(E||(E=w` <div aria-busy="${0}" aria-live="polite" class="relative"> <div class="${0}"> ${0} ${0} ${0} </div> <div data-testid="spinner" class="${0}"> <foxy-spinner layout="${0}" state="${0}" infer="spinner"> </foxy-spinner> ${0} </div> </div> `),this.in("busy"),l({"space-y-m":!0,"transition-opacity":!0,"opacity-0 pointer-events-none":e}),this.__generalErrors.map((e=>this.__renderGeneralError(e))),this.status?this.__renderStatus(this.status):"",this.renderBody(),l({"flex flex-col items-center justify-center gap-m":!0,"transition-opacity absolute inset-0":!0,"opacity-0 pointer-events-none":!e}),this.in("fail")?"vertical":"no-label",this.in("fail")?"error":"busy",this.href&&this.in("fail")?t(O||(O=w` <vaadin-button theme="small contrast" @click="${0}"> <foxy-i18n infer="spinner" key="refresh"></foxy-i18n> </vaadin-button> `),(()=>this.refresh())):"")}get __generalErrors(){const e=this.constructor.generalErrorPrefix;return this.errors.filter((t=>t.startsWith(e)))}__renderGeneralError(e){return t(T||(T=w` <foxy-i18n class="leading-xs text-body rounded bg-error-10 block" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" infer="error" key="${0}"> </foxy-i18n> `),e.replace("error:",""))}__renderStatus({key:e,options:r}){if(!this.hiddenSelector.matches("status",!0))return t(C||(C=w` <p data-testid="status" class="leading-xs text-body rounded bg-success-10 flex items-start gap-m" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <foxy-i18n class="flex-1" infer="status" key="${0}" .options="${0}"></foxy-i18n> <vaadin-button class="flex-shrink-0" theme="success tertiary-inline" @click="${0}"> <foxy-i18n class="flex-1" infer="status" key="close"></foxy-i18n> </vaadin-button> </p> `),e,r,(()=>this.status=null))}}B.generalErrorPrefix="error:",customElements.define("foxy-internal-form",B);export{B as I};
@@ -1 +1 @@
1
- import"./shared-d132bd37.js";import"./shared-b8198665.js";import{I as t}from"./shared-7d38cb8a.js";import{_ as e}from"./shared-0f6e4584.js";import{c as i,h as s,s as r}from"./shared-dc73b9a5.js";import{i as a}from"./shared-9803aa7c.js";import{c as l}from"./shared-4e709717.js";let n,o,d,u,h,p,m=t=>t;customElements.define("foxy-internal-number-control",class extends t{constructor(){super(...arguments),this.layout=null,this.prefix=null,this.suffix=null,this.step=null,this.min=null,this.max=null,this.__isErrorVisible=!1}static get properties(){return e(e({},super.properties),{},{layout:{},prefix:{},suffix:{},step:{type:Number},min:{type:Number},max:{type:Number},__isErrorVisible:{attribute:!1}})}static get styles(){return[...super.styles,i(n||(n=m`input::-webkit-contacts-auto-fill-button{visibility:hidden;display:none!important;pointer-events:none;position:absolute;right:0}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input{-moz-appearance:textfield}`))]}reportValidity(){this.__isErrorVisible=!0,super.reportValidity()}renderControl(){var t,e,i;return"summary-item"===this.layout?this.__renderSummaryItemLayout():s(o||(o=m` <vaadin-number-field error-message="${0}" placeholder="${0}" helper-text="${0}" label="${0}" class="w-full" step="${0}" min="${0}" max="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" clear-button-visible @keydown="${0}" @change="${0}"> ${0} ${0} </vaadin-number-field> `),a(this._errorMessage),this.placeholder,this.helperText,this.label,a(null!==(t=this.step)&&void 0!==t?t:void 0),a(null!==(e=this.min)&&void 0!==e?e:void 0),a(null!==(i=this.max)&&void 0!==i?i:void 0),this.disabled,this.readonly,this._checkValidity,this._value,(t=>{var e;return"Enter"===t.key&&(null===(e=this.nucleon)||void 0===e?void 0:e.submit())}),(t=>{const e=t.currentTarget;this._value=parseFloat(e.value)}),this.prefix?s(d||(d=m`<div slot="prefix">${0}</div>`),this.prefix):"",this.suffix?s(u||(u=m`<div class="pr-s font-medium" slot="suffix">${0}</div>`),this.suffix):"")}__renderSummaryItemLayout(){var t,i,n;const o={"text-disabled":this.disabled,"text-tertiary":!this.readonly&&!this.disabled,"font-medium":!this.readonly};return s(h||(h=m` <div class="flex items-start gap-m leading-xs"> <div> <label class="text-m text-body" for="input">${0}</label> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> <div class="flex-1 flex items-center gap-xs"> <span class="${0}"> ${0} </span> <input placeholder="${0}" style="min-width:10ch" class="${0}" type="number" step="${0}" min="${0}" max="${0}" id="input" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @blur="${0}" @input="${0}"> <span class="${0}"> ${0} </span> <button aria-label="${0}" class="${0}" style="width:1em;height:1em" ?disabled="${0}" ?hidden="${0}" @click="${0}"> ${0} </button> </div> </div> `),this.label,this.helperText,!this.__isErrorVisible||this.disabled||this.readonly,this._errorMessage,l(e({"text-secondary":this.readonly},o)),this.prefix,this.placeholder,l({"w-full appearance-none text-right bg-transparent transition-colors":!0,"text-m rounded-s focus-outline-none":!0,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),a(null!==(t=this.step)&&void 0!==t?t:void 0),a(null!==(i=this.min)&&void 0!==i?i:void 0),a(null!==(n=this.max)&&void 0!==n?n:void 0),0===this._value?"":this._value,this.disabled,this.readonly,(t=>{var e;return"Enter"===t.key&&(null===(e=this.nucleon)||void 0===e?void 0:e.submit())}),(()=>this.__isErrorVisible=!0),(t=>{t.stopPropagation();const e=parseFloat(t.target.value);this._value=isNaN(e)?0:e}),l(e({"text-secondary":this.readonly},o)),this.suffix,this.t("clear"),l({"flex-shrink-0 rounded-full transition-colors":!0,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"cursor-pointer text-tertiary hover-text-body":!this.disabled,"cursor-default text-disabled":this.disabled}),this.disabled,this.readonly||!this._value,(()=>{this._value=0,this.dispatchEvent(new CustomEvent("clear"))}),r(p||(p=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em; transform: scale(1.25); margin-right: -0.16em"><path d="M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" /></svg>`)))}});
1
+ import"./shared-045bd59c.js";import"./shared-9e94c56d.js";import{I as t}from"./shared-55bc51c8.js";import{_ as e}from"./shared-d1195c27.js";import{c as i,h as s,s as r}from"./shared-dc73b9a5.js";import{i as a}from"./shared-9803aa7c.js";import{c as l}from"./shared-4e709717.js";let n,o,d,u,h,p,m=t=>t;customElements.define("foxy-internal-number-control",class extends t{constructor(){super(...arguments),this.layout=null,this.prefix=null,this.suffix=null,this.step=null,this.min=null,this.max=null,this.__isErrorVisible=!1}static get properties(){return e(e({},super.properties),{},{layout:{},prefix:{},suffix:{},step:{type:Number},min:{type:Number},max:{type:Number},__isErrorVisible:{attribute:!1}})}static get styles(){return[...super.styles,i(n||(n=m`input::-webkit-contacts-auto-fill-button{visibility:hidden;display:none!important;pointer-events:none;position:absolute;right:0}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input{-moz-appearance:textfield}`))]}reportValidity(){this.__isErrorVisible=!0,super.reportValidity()}renderControl(){var t,e,i;return"summary-item"===this.layout?this.__renderSummaryItemLayout():s(o||(o=m` <vaadin-number-field error-message="${0}" placeholder="${0}" helper-text="${0}" label="${0}" class="w-full" step="${0}" min="${0}" max="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" clear-button-visible @keydown="${0}" @change="${0}"> ${0} ${0} </vaadin-number-field> `),a(this._errorMessage),this.placeholder,this.helperText,this.label,a(null!==(t=this.step)&&void 0!==t?t:void 0),a(null!==(e=this.min)&&void 0!==e?e:void 0),a(null!==(i=this.max)&&void 0!==i?i:void 0),this.disabled,this.readonly,this._checkValidity,this._value,(t=>{var e;return"Enter"===t.key&&(null===(e=this.nucleon)||void 0===e?void 0:e.submit())}),(t=>{const e=t.currentTarget;this._value=parseFloat(e.value)}),this.prefix?s(d||(d=m`<div slot="prefix">${0}</div>`),this.prefix):"",this.suffix?s(u||(u=m`<div class="pr-s font-medium" slot="suffix">${0}</div>`),this.suffix):"")}__renderSummaryItemLayout(){var t,i,n;const o={"text-disabled":this.disabled,"text-tertiary":!this.readonly&&!this.disabled,"font-medium":!this.readonly};return s(h||(h=m` <div class="flex items-start gap-m leading-xs"> <div> <label class="text-m text-body" for="input">${0}</label> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> <div class="flex-1 flex items-center gap-xs"> <span class="${0}"> ${0} </span> <input placeholder="${0}" style="min-width:10ch" class="${0}" type="number" step="${0}" min="${0}" max="${0}" id="input" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @blur="${0}" @input="${0}"> <span class="${0}"> ${0} </span> <button aria-label="${0}" class="${0}" style="width:1em;height:1em" ?disabled="${0}" ?hidden="${0}" @click="${0}"> ${0} </button> </div> </div> `),this.label,this.helperText,!this.__isErrorVisible||this.disabled||this.readonly,this._errorMessage,l(e({"text-secondary":this.readonly},o)),this.prefix,this.placeholder,l({"w-full appearance-none text-right bg-transparent transition-colors":!0,"text-m rounded-s focus-outline-none":!0,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),a(null!==(t=this.step)&&void 0!==t?t:void 0),a(null!==(i=this.min)&&void 0!==i?i:void 0),a(null!==(n=this.max)&&void 0!==n?n:void 0),0===this._value?"":this._value,this.disabled,this.readonly,(t=>{var e;return"Enter"===t.key&&(null===(e=this.nucleon)||void 0===e?void 0:e.submit())}),(()=>this.__isErrorVisible=!0),(t=>{t.stopPropagation();const e=parseFloat(t.target.value);this._value=isNaN(e)?0:e}),l(e({"text-secondary":this.readonly},o)),this.suffix,this.t("clear"),l({"flex-shrink-0 rounded-full transition-colors":!0,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"cursor-pointer text-tertiary hover-text-body":!this.disabled,"cursor-default text-disabled":this.disabled}),this.disabled,this.readonly||!this._value,(()=>{this._value=0,this.dispatchEvent(new CustomEvent("clear"))}),r(p||(p=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em; transform: scale(1.25); margin-right: -0.16em"><path d="M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" /></svg>`)))}});
@@ -1 +1 @@
1
- import"./shared-b08ca8d0.js";const n=document.createElement("template");n.innerHTML='<dom-module id="lumo-badge">\n <template>\n <style>\n [theme~="badge"] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n padding: 0.4em calc(0.5em + var(--lumo-border-radius-s) / 4);\n color: var(--lumo-primary-text-color);\n background-color: var(--lumo-primary-color-10pct);\n border-radius: var(--lumo-border-radius-s);\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size-s);\n line-height: 1;\n font-weight: 500;\n text-transform: initial;\n letter-spacing: initial;\n min-width: calc(var(--lumo-line-height-xs) * 1em + 0.45em);\n }\n\n /* Ensure proper vertical alignment */\n [theme~="badge"]::before {\n display: inline-block;\n content: "\\2003";\n width: 0;\n }\n\n [theme~="badge"][theme~="small"] {\n font-size: var(--lumo-font-size-xxs);\n line-height: 1;\n }\n\n /* Colors */\n\n [theme~="badge"][theme~="success"] {\n color: var(--lumo-success-text-color);\n background-color: var(--lumo-success-color-10pct);\n }\n\n [theme~="badge"][theme~="error"] {\n color: var(--lumo-error-text-color);\n background-color: var(--lumo-error-color-10pct);\n }\n\n [theme~="badge"][theme~="contrast"] {\n color: var(--lumo-contrast-80pct);\n background-color: var(--lumo-contrast-5pct);\n }\n\n /* Primary */\n\n [theme~="badge"][theme~="primary"] {\n color: var(--lumo-primary-contrast-color);\n background-color: var(--lumo-primary-color);\n }\n\n [theme~="badge"][theme~="success"][theme~="primary"] {\n color: var(--lumo-success-contrast-color);\n background-color: var(--lumo-success-color);\n }\n\n [theme~="badge"][theme~="error"][theme~="primary"] {\n color: var(--lumo-error-contrast-color);\n background-color: var(--lumo-error-color);\n }\n\n [theme~="badge"][theme~="contrast"][theme~="primary"] {\n color: var(--lumo-base-color);\n background-color: var(--lumo-contrast);\n }\n\n /* Links */\n\n [theme~="badge"][href]:hover {\n text-decoration: none;\n }\n\n /* Icon */\n\n [theme~="badge"] iron-icon {\n margin: -0.25em 0;\n --iron-icon-width: 1.5em;\n --iron-icon-height: 1.5em;\n }\n\n [theme~="badge"] iron-icon:first-child {\n margin-left: -0.375em;\n }\n\n [theme~="badge"] iron-icon:last-child {\n margin-right: -0.375em;\n }\n\n [theme~="badge"][icon] {\n min-width: 0;\n padding: 0;\n font-size: 1rem;\n --iron-icon-width: var(--lumo-icon-size-m);\n --iron-icon-height: var(--lumo-icon-size-m);\n }\n\n [theme~="badge"][icon][theme~="small"] {\n --iron-icon-width: var(--lumo-icon-size-s);\n --iron-icon-height: var(--lumo-icon-size-s);\n }\n\n /* Empty */\n\n [theme~="badge"]:not([icon]):empty {\n min-width: 0;\n width: 1em;\n height: 1em;\n padding: 0;\n border-radius: 50%;\n background-color: var(--lumo-primary-color);\n }\n\n [theme~="badge"][theme~="small"]:not([icon]):empty {\n width: 0.75em;\n height: 0.75em;\n }\n\n [theme~="badge"][theme~="contrast"]:not([icon]):empty {\n background-color: var(--lumo-contrast);\n }\n\n [theme~="badge"][theme~="success"]:not([icon]):empty {\n background-color: var(--lumo-success-color);\n }\n\n [theme~="badge"][theme~="error"]:not([icon]):empty {\n background-color: var(--lumo-error-color);\n }\n\n /* Pill */\n\n [theme~="badge"][theme~="pill"] {\n --lumo-border-radius-s: 1em;\n }\n\n /* RTL specific styles */\n\n [dir="rtl"][theme~="badge"] iron-icon:first-child {\n margin-right: -0.375em;\n margin-left: 0;\n }\n\n [dir="rtl"][theme~="badge"] iron-icon:last-child {\n margin-left: -0.375em;\n margin-right: 0;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(n.content);
1
+ import"./shared-1cfea4b6.js";const n=document.createElement("template");n.innerHTML='<dom-module id="lumo-badge">\n <template>\n <style>\n [theme~="badge"] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n padding: 0.4em calc(0.5em + var(--lumo-border-radius-s) / 4);\n color: var(--lumo-primary-text-color);\n background-color: var(--lumo-primary-color-10pct);\n border-radius: var(--lumo-border-radius-s);\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size-s);\n line-height: 1;\n font-weight: 500;\n text-transform: initial;\n letter-spacing: initial;\n min-width: calc(var(--lumo-line-height-xs) * 1em + 0.45em);\n }\n\n /* Ensure proper vertical alignment */\n [theme~="badge"]::before {\n display: inline-block;\n content: "\\2003";\n width: 0;\n }\n\n [theme~="badge"][theme~="small"] {\n font-size: var(--lumo-font-size-xxs);\n line-height: 1;\n }\n\n /* Colors */\n\n [theme~="badge"][theme~="success"] {\n color: var(--lumo-success-text-color);\n background-color: var(--lumo-success-color-10pct);\n }\n\n [theme~="badge"][theme~="error"] {\n color: var(--lumo-error-text-color);\n background-color: var(--lumo-error-color-10pct);\n }\n\n [theme~="badge"][theme~="contrast"] {\n color: var(--lumo-contrast-80pct);\n background-color: var(--lumo-contrast-5pct);\n }\n\n /* Primary */\n\n [theme~="badge"][theme~="primary"] {\n color: var(--lumo-primary-contrast-color);\n background-color: var(--lumo-primary-color);\n }\n\n [theme~="badge"][theme~="success"][theme~="primary"] {\n color: var(--lumo-success-contrast-color);\n background-color: var(--lumo-success-color);\n }\n\n [theme~="badge"][theme~="error"][theme~="primary"] {\n color: var(--lumo-error-contrast-color);\n background-color: var(--lumo-error-color);\n }\n\n [theme~="badge"][theme~="contrast"][theme~="primary"] {\n color: var(--lumo-base-color);\n background-color: var(--lumo-contrast);\n }\n\n /* Links */\n\n [theme~="badge"][href]:hover {\n text-decoration: none;\n }\n\n /* Icon */\n\n [theme~="badge"] iron-icon {\n margin: -0.25em 0;\n --iron-icon-width: 1.5em;\n --iron-icon-height: 1.5em;\n }\n\n [theme~="badge"] iron-icon:first-child {\n margin-left: -0.375em;\n }\n\n [theme~="badge"] iron-icon:last-child {\n margin-right: -0.375em;\n }\n\n [theme~="badge"][icon] {\n min-width: 0;\n padding: 0;\n font-size: 1rem;\n --iron-icon-width: var(--lumo-icon-size-m);\n --iron-icon-height: var(--lumo-icon-size-m);\n }\n\n [theme~="badge"][icon][theme~="small"] {\n --iron-icon-width: var(--lumo-icon-size-s);\n --iron-icon-height: var(--lumo-icon-size-s);\n }\n\n /* Empty */\n\n [theme~="badge"]:not([icon]):empty {\n min-width: 0;\n width: 1em;\n height: 1em;\n padding: 0;\n border-radius: 50%;\n background-color: var(--lumo-primary-color);\n }\n\n [theme~="badge"][theme~="small"]:not([icon]):empty {\n width: 0.75em;\n height: 0.75em;\n }\n\n [theme~="badge"][theme~="contrast"]:not([icon]):empty {\n background-color: var(--lumo-contrast);\n }\n\n [theme~="badge"][theme~="success"]:not([icon]):empty {\n background-color: var(--lumo-success-color);\n }\n\n [theme~="badge"][theme~="error"]:not([icon]):empty {\n background-color: var(--lumo-error-color);\n }\n\n /* Pill */\n\n [theme~="badge"][theme~="pill"] {\n --lumo-border-radius-s: 1em;\n }\n\n /* RTL specific styles */\n\n [dir="rtl"][theme~="badge"] iron-icon:first-child {\n margin-right: -0.375em;\n margin-left: 0;\n }\n\n [dir="rtl"][theme~="badge"] iron-icon:last-child {\n margin-left: -0.375em;\n margin-right: 0;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(n.content);
@@ -1 +1 @@
1
- import"./shared-9b2d6d62.js";import{I as e}from"./shared-7d38cb8a.js";import"./shared-37efab30.js";import{_ as t}from"./shared-0f6e4584.js";import{h as s,s as i}from"./shared-dc73b9a5.js";import{c as r}from"./shared-4e709717.js";let l,o,a,h,c,n,d=e=>e;customElements.define("foxy-internal-switch-control",class extends e{constructor(){super(...arguments),this.helperTextAsToolip=!1,this.invert=!1}static get properties(){return t(t({},super.properties),{},{helperTextAsToolip:{type:Boolean,attribute:"helper-text-as-tooltip"},invert:{type:Boolean}})}renderControl(){const e=this.invert?!this._value:!!this._value;return s(l||(l=d` <div class="flex items-start gap-s leading-xs text-m"> <div class="flex-1"> <label class="text-m text-body" for="input">${0}</label> ${0} <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> ${0} ${0} </div> `),this.label,this.helperTextAsToolip?"":s(o||(o=d`<p class="text-xs text-secondary">${0}</p>`),this.helperText),this.disabled||this.readonly,this._errorMessage,this.readonly?s(a||(a=d`<p class="text-secondary">${0}</p>`),e?this.t("checked"):this.t("unchecked")):s(h||(h=d` <div style="height:calc(1em * var(--lumo-line-height-xs))" class="flex items-center"> <div style="border-radius:var(--lumo-size-xl);width:calc((1em * var(--lumo-line-height-xs)) - 3px + var(--lumo-space-m))" class="${0}" @click="${0}"> <div style="margin:1.5px;width:calc((1em * var(--lumo-line-height-xs)) - 6px);height:calc((1em * var(--lumo-line-height-xs)) - 6px)" class="${0}"></div> <input class="opacity-0 absolute inset-0 focus-outline-none" type="checkbox" id="input" switch ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> </div> </div> `),r({"cursor-pointer group transition-colors relative":!0,"flex flex-shrink-0 items-center":!0,"bg-success":!this.disabled&&e,"bg-contrast-20 hover-bg-contrast-30":!this.disabled&&!e,"bg-contrast-10":this.disabled,"focus-within-ring-2 focus-within-ring-primary-50":!0}),(()=>this._value=!this._value),r({"transition-all transform block rounded-full":!0,"translate-x-m":e,"translate-x-0":!e,"bg-base":this.disabled,"bg-tint":!this.disabled}),this.disabled,this.readonly,e,(e=>{const t=e.currentTarget;this._value=this.invert?!t.checked:t.checked})),this.helperTextAsToolip&&this.helperText?s(c||(c=d` <div class="transition-colors text-tertiary flex-shrink-0 cursor-pointer hover-text-body" id="trigger"> ${0} </div> <vcf-tooltip for="trigger" style="--lumo-base-color:black;max-width:30rem" class="mt-s" theme="light" position="bottom"> <span class="text-s" style="color:#fff">${0}</span> </vcf-tooltip> `),i(n||(n=d`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: calc(1em * var(--lumo-line-height-xs)); height: calc(1em * var(--lumo-line-height-xs)); margin-right: -0.12em"><path stroke-linecap="round" stroke-linejoin="round" d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z" /></svg>`)),this.helperText):"")}});
1
+ import"./shared-24c7c37f.js";import{I as e}from"./shared-55bc51c8.js";import"./shared-51bb937b.js";import{_ as t}from"./shared-d1195c27.js";import{h as s,s as i}from"./shared-dc73b9a5.js";import{c as r}from"./shared-4e709717.js";let l,o,a,h,c,n,d=e=>e;customElements.define("foxy-internal-switch-control",class extends e{constructor(){super(...arguments),this.helperTextAsToolip=!1,this.invert=!1}static get properties(){return t(t({},super.properties),{},{helperTextAsToolip:{type:Boolean,attribute:"helper-text-as-tooltip"},invert:{type:Boolean}})}renderControl(){const e=this.invert?!this._value:!!this._value;return s(l||(l=d` <div class="flex items-start gap-s leading-xs text-m"> <div class="flex-1"> <label class="text-m text-body" for="input">${0}</label> ${0} <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> ${0} ${0} </div> `),this.label,this.helperTextAsToolip?"":s(o||(o=d`<p class="text-xs text-secondary">${0}</p>`),this.helperText),this.disabled||this.readonly,this._errorMessage,this.readonly?s(a||(a=d`<p class="text-secondary">${0}</p>`),e?this.t("checked"):this.t("unchecked")):s(h||(h=d` <div style="height:calc(1em * var(--lumo-line-height-xs))" class="flex items-center"> <div style="border-radius:var(--lumo-size-xl);width:calc((1em * var(--lumo-line-height-xs)) - 3px + var(--lumo-space-m))" class="${0}" @click="${0}"> <div style="margin:1.5px;width:calc((1em * var(--lumo-line-height-xs)) - 6px);height:calc((1em * var(--lumo-line-height-xs)) - 6px)" class="${0}"></div> <input class="opacity-0 absolute inset-0 focus-outline-none" type="checkbox" id="input" switch ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> </div> </div> `),r({"cursor-pointer group transition-colors relative":!0,"flex flex-shrink-0 items-center":!0,"bg-success":!this.disabled&&e,"bg-contrast-20 hover-bg-contrast-30":!this.disabled&&!e,"bg-contrast-10":this.disabled,"focus-within-ring-2 focus-within-ring-primary-50":!0}),(()=>this._value=!this._value),r({"transition-all transform block rounded-full":!0,"translate-x-m":e,"translate-x-0":!e,"bg-base":this.disabled,"bg-tint":!this.disabled}),this.disabled,this.readonly,e,(e=>{const t=e.currentTarget;this._value=this.invert?!t.checked:t.checked})),this.helperTextAsToolip&&this.helperText?s(c||(c=d` <div class="transition-colors text-tertiary flex-shrink-0 cursor-pointer hover-text-body" id="trigger"> ${0} </div> <vcf-tooltip for="trigger" style="--lumo-base-color:black;max-width:30rem" class="mt-s" theme="light" position="bottom"> <span class="text-s" style="color:#fff">${0}</span> </vcf-tooltip> `),i(n||(n=d`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: calc(1em * var(--lumo-line-height-xs)); height: calc(1em * var(--lumo-line-height-xs)); margin-right: -0.12em"><path stroke-linecap="round" stroke-linejoin="round" d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z" /></svg>`)),this.helperText):"")}});
@@ -1,4 +1,4 @@
1
- import"./shared-b08ca8d0.js";import"./shared-a207423c.js";import{h as e,P as t}from"./shared-44ce656d.js";import{E as s,T as r}from"./shared-09b4185a.js";import{F as l}from"./shared-90a47948.js";const i=e`<dom-module id="lumo-custom-field" theme-for="vaadin-custom-field">
1
+ import"./shared-1cfea4b6.js";import"./shared-de45ad84.js";import{h as e,P as t}from"./shared-4d543043.js";import{E as s,T as r}from"./shared-8a8bfd72.js";import{F as l}from"./shared-e1850e5f.js";const i=e`<dom-module id="lumo-custom-field" theme-for="vaadin-custom-field">
2
2
  <template>
3
3
  <style include="lumo-required-field">
4
4
  :host {