@foxy.io/elements 1.18.0-beta.13 → 1.18.0-beta.14

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 (203) hide show
  1. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  2. package/dist/cdn/foxy-address-card.js +2 -2
  3. package/dist/cdn/foxy-address-form.js +1 -1
  4. package/dist/cdn/foxy-api-browser.js +1 -1
  5. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  6. package/dist/cdn/foxy-attribute-card.js +1 -1
  7. package/dist/cdn/foxy-attribute-form.js +1 -1
  8. package/dist/cdn/foxy-cancellation-form.js +1 -1
  9. package/dist/cdn/foxy-collection-page.js +1 -1
  10. package/dist/cdn/foxy-collection-pages.js +1 -1
  11. package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
  12. package/dist/cdn/foxy-coupon-card.js +1 -1
  13. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  14. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  15. package/dist/cdn/foxy-coupon-detail-card.js +1 -1
  16. package/dist/cdn/foxy-coupon-form.js +1 -1
  17. package/dist/cdn/foxy-custom-field-card.js +1 -1
  18. package/dist/cdn/foxy-custom-field-form.js +1 -1
  19. package/dist/cdn/foxy-customer-api.js +1 -1
  20. package/dist/cdn/foxy-customer-card.js +1 -1
  21. package/dist/cdn/foxy-customer-form.js +1 -1
  22. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  23. package/dist/cdn/foxy-customer-portal.js +2 -2
  24. package/dist/cdn/foxy-customer.js +2 -2
  25. package/dist/cdn/foxy-customers-table.js +1 -1
  26. package/dist/cdn/foxy-discount-builder.js +1 -1
  27. package/dist/cdn/foxy-discount-card.js +1 -1
  28. package/dist/cdn/foxy-discount-detail-card.js +1 -1
  29. package/dist/cdn/foxy-donation.js +1 -1
  30. package/dist/cdn/foxy-email-template-card.js +1 -1
  31. package/dist/cdn/foxy-email-template-form.js +1 -1
  32. package/dist/cdn/foxy-error-entry-card.js +1 -1
  33. package/dist/cdn/foxy-form-dialog.js +1 -1
  34. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  35. package/dist/cdn/foxy-gift-card-card.js +1 -1
  36. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  37. package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
  38. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  39. package/dist/cdn/foxy-gift-card-form.js +1 -1
  40. package/dist/cdn/foxy-i18n.js +1 -1
  41. package/dist/cdn/foxy-item-card.js +1 -1
  42. package/dist/cdn/foxy-item-category-card.js +1 -1
  43. package/dist/cdn/foxy-item-category-form.js +1 -1
  44. package/dist/cdn/foxy-item-form.js +1 -1
  45. package/dist/cdn/foxy-item-option-card.js +1 -1
  46. package/dist/cdn/foxy-item-option-form.js +1 -1
  47. package/dist/cdn/foxy-items-form.js +1 -1
  48. package/dist/cdn/foxy-nucleon-element.js +1 -1
  49. package/dist/cdn/foxy-pagination.js +1 -1
  50. package/dist/cdn/foxy-payment-card.js +1 -1
  51. package/dist/cdn/foxy-payment-method-card.js +1 -1
  52. package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
  53. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
  54. package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
  55. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
  56. package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
  57. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
  58. package/dist/cdn/foxy-payments-api.js +1 -1
  59. package/dist/cdn/foxy-query-builder.js +1 -1
  60. package/dist/cdn/foxy-report-form.js +12 -12
  61. package/dist/cdn/foxy-reports-table.js +5 -5
  62. package/dist/cdn/foxy-shipment-card.js +2 -2
  63. package/dist/cdn/foxy-sign-in-form.js +1 -1
  64. package/dist/cdn/foxy-spinner.js +2 -2
  65. package/dist/cdn/foxy-store-form.js +1 -0
  66. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  67. package/dist/cdn/foxy-subscription-card.js +1 -1
  68. package/dist/cdn/foxy-subscription-form.js +4 -4
  69. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  70. package/dist/cdn/foxy-table.js +1 -1
  71. package/dist/cdn/foxy-tax-card.js +1 -1
  72. package/dist/cdn/foxy-tax-form.js +1 -1
  73. package/dist/cdn/foxy-template-card.js +1 -1
  74. package/dist/cdn/foxy-template-config-form.js +1 -1
  75. package/dist/cdn/foxy-template-form.js +1 -1
  76. package/dist/cdn/foxy-template-set-form.js +1 -1
  77. package/dist/cdn/foxy-transaction-card.js +1 -1
  78. package/dist/cdn/foxy-transaction.js +1 -1
  79. package/dist/cdn/foxy-transactions-table.js +1 -1
  80. package/dist/cdn/foxy-user-form.js +1 -1
  81. package/dist/cdn/foxy-users-table.js +1 -1
  82. package/dist/cdn/foxy-webhook-card.js +1 -1
  83. package/dist/cdn/foxy-webhook-form.js +1 -1
  84. package/dist/cdn/foxy-webhook-log-card.js +1 -1
  85. package/dist/cdn/foxy-webhook-status-card.js +1 -1
  86. package/dist/cdn/{shared-68600caf.js → shared-04046e0e.js} +1 -1
  87. package/dist/cdn/{shared-45cc4f44.js → shared-0bbbc87f.js} +1 -1
  88. package/dist/cdn/{shared-0093ee59.js → shared-0cc4beec.js} +1 -1
  89. package/dist/cdn/{shared-57412bac.js → shared-0ecc7d2c.js} +1 -1
  90. package/dist/cdn/{shared-0f137ff8.js → shared-119efeaa.js} +1 -1
  91. package/dist/cdn/{shared-26adbd9b.js → shared-11be3c89.js} +1 -1
  92. package/dist/cdn/{shared-d863e06b.js → shared-14dc506c.js} +1 -1
  93. package/dist/cdn/{shared-9f0606f2.js → shared-15278fe0.js} +1 -1
  94. package/dist/cdn/{shared-6a2cf3b9.js → shared-19044260.js} +2 -2
  95. package/dist/cdn/{shared-fce199fa.js → shared-19440ca2.js} +1 -1
  96. package/dist/cdn/shared-1eb24528.js +1 -0
  97. package/dist/cdn/shared-214c34b5.js +1 -0
  98. package/dist/cdn/{shared-10e7ddf5.js → shared-23e0d67e.js} +1 -1
  99. package/dist/cdn/{shared-20b2223a.js → shared-290769ea.js} +1 -1
  100. package/dist/cdn/{shared-7c8b3ce0.js → shared-2af327d0.js} +1 -1
  101. package/dist/cdn/{shared-34db34b2.js → shared-35a7a4d6.js} +1 -1
  102. package/dist/cdn/{shared-7e690245.js → shared-36aaf815.js} +5 -5
  103. package/dist/cdn/{shared-2e33702b.js → shared-3a84611d.js} +1 -1
  104. package/dist/cdn/{shared-aecb20d0.js → shared-3e781cc9.js} +1 -1
  105. package/dist/cdn/{shared-27aeabd9.js → shared-418e88da.js} +1 -1
  106. package/dist/cdn/{shared-35e929aa.js → shared-435ab348.js} +1 -1
  107. package/dist/cdn/{shared-f49ee631.js → shared-4a519a4a.js} +1 -1
  108. package/dist/cdn/{shared-b0ba62ff.js → shared-4a796610.js} +1 -1
  109. package/dist/cdn/{shared-cbff5e58.js → shared-4c61787a.js} +1 -1
  110. package/dist/cdn/{shared-0b67dae4.js → shared-4ebfd7ef.js} +1 -1
  111. package/dist/cdn/{shared-ef792142.js → shared-4fa44231.js} +1 -1
  112. package/dist/cdn/{shared-58445db9.js → shared-553e6472.js} +1 -1
  113. package/dist/cdn/{shared-5bf3f8f1.js → shared-5cb39f03.js} +1 -1
  114. package/dist/cdn/{shared-da126678.js → shared-67f1821b.js} +1 -1
  115. package/dist/cdn/shared-682dbe0a.js +1 -0
  116. package/dist/cdn/{shared-f38a79cc.js → shared-73a8b603.js} +1 -1
  117. package/dist/cdn/{shared-53cdff0b.js → shared-7415fa7e.js} +1 -1
  118. package/dist/cdn/shared-779795c5.js +1 -0
  119. package/dist/cdn/{shared-008ffb33.js → shared-81d3ff30.js} +1 -1
  120. package/dist/cdn/{shared-cd1bc9f5.js → shared-8d9c0007.js} +1 -1
  121. package/dist/cdn/{shared-09a14740.js → shared-915fb0e4.js} +1 -1
  122. package/dist/cdn/{shared-d8faafc7.js → shared-9195959e.js} +1 -1
  123. package/dist/cdn/{shared-015e5cb9.js → shared-93548d58.js} +1 -1
  124. package/dist/cdn/{shared-4382f0cd.js → shared-93a1be98.js} +1 -1
  125. package/dist/cdn/{shared-ba78987f.js → shared-96ebc59f.js} +1 -1
  126. package/dist/cdn/shared-9a0f97e5.js +1 -0
  127. package/dist/cdn/{shared-8a34457d.js → shared-9afb80a6.js} +1 -1
  128. package/dist/cdn/{shared-c7fad58c.js → shared-a0e71609.js} +1 -1
  129. package/dist/cdn/shared-a420358e.js +1 -0
  130. package/dist/cdn/{shared-415c86b6.js → shared-a42a63aa.js} +1 -1
  131. package/dist/cdn/{shared-2ec256d5.js → shared-a8966936.js} +1 -1
  132. package/dist/cdn/{shared-68fad60e.js → shared-aa4bf9ab.js} +1 -1
  133. package/dist/cdn/shared-b1201c2e.js +1 -0
  134. package/dist/cdn/{shared-a0f6e39c.js → shared-b20753b8.js} +1 -1
  135. package/dist/cdn/shared-b2850d64.js +1 -0
  136. package/dist/cdn/{shared-465cdd03.js → shared-c3a3d9f6.js} +2 -2
  137. package/dist/cdn/{shared-be043b54.js → shared-c7ab6598.js} +1 -1
  138. package/dist/cdn/{shared-e46eb641.js → shared-c7cae9e6.js} +1 -1
  139. package/dist/cdn/{shared-8911c2e0.js → shared-d24c3729.js} +1 -1
  140. package/dist/cdn/{shared-fff1815b.js → shared-d75c6072.js} +1 -1
  141. package/dist/cdn/shared-d82f3ba0.js +1 -0
  142. package/dist/cdn/{shared-c6f5602e.js → shared-d8bf2eac.js} +1 -1
  143. package/dist/cdn/{shared-5382ccfa.js → shared-d9a3104e.js} +1 -1
  144. package/dist/cdn/shared-da285807.js +169 -0
  145. package/dist/cdn/shared-e1069291.js +1 -0
  146. package/dist/cdn/{shared-b54eb879.js → shared-e32be255.js} +4 -4
  147. package/dist/cdn/{shared-8c8853ab.js → shared-e4383064.js} +1 -1
  148. package/dist/cdn/shared-e4e93604.js +1 -0
  149. package/dist/cdn/shared-eab81bf4.js +1 -0
  150. package/dist/cdn/{shared-3fb5f380.js → shared-effdf59d.js} +1 -1
  151. package/dist/cdn/translations/store-form/en.json +311 -0
  152. package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.d.ts +11 -0
  153. package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.js +143 -0
  154. package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.js.map +1 -0
  155. package/dist/elements/internal/InternalEditableListControl/index.d.ts +3 -0
  156. package/dist/elements/internal/InternalEditableListControl/index.js +5 -0
  157. package/dist/elements/internal/InternalEditableListControl/index.js.map +1 -0
  158. package/dist/elements/internal/InternalEditableListControl/types.d.ts +9 -0
  159. package/dist/elements/internal/InternalEditableListControl/types.js +2 -0
  160. package/dist/elements/internal/InternalEditableListControl/types.js.map +1 -0
  161. package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.d.ts +6 -1
  162. package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.js +25 -12
  163. package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.js.map +1 -1
  164. package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.d.ts +4 -1
  165. package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.js +15 -0
  166. package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.js.map +1 -1
  167. package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.d.ts +13 -0
  168. package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.js +40 -0
  169. package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.js.map +1 -0
  170. package/dist/elements/internal/InternalPasswordControl/index.d.ts +4 -0
  171. package/dist/elements/internal/InternalPasswordControl/index.js +6 -0
  172. package/dist/elements/internal/InternalPasswordControl/index.js.map +1 -0
  173. package/dist/elements/internal/InternalTextControl/InternalTextControl.d.ts +4 -1
  174. package/dist/elements/internal/InternalTextControl/InternalTextControl.js +15 -1
  175. package/dist/elements/internal/InternalTextControl/InternalTextControl.js.map +1 -1
  176. package/dist/elements/public/StoreForm/StoreForm.d.ts +55 -0
  177. package/dist/elements/public/StoreForm/StoreForm.js +1023 -0
  178. package/dist/elements/public/StoreForm/StoreForm.js.map +1 -0
  179. package/dist/elements/public/StoreForm/index.d.ts +15 -0
  180. package/dist/elements/public/StoreForm/index.js +17 -0
  181. package/dist/elements/public/StoreForm/index.js.map +1 -0
  182. package/dist/elements/public/StoreForm/types.d.ts +3 -0
  183. package/dist/elements/public/StoreForm/types.js +2 -0
  184. package/dist/elements/public/StoreForm/types.js.map +1 -0
  185. package/dist/elements/public/index.d.ts +1 -0
  186. package/dist/elements/public/index.defined.d.ts +1 -0
  187. package/dist/elements/public/index.defined.js +1 -0
  188. package/dist/elements/public/index.defined.js.map +1 -1
  189. package/dist/elements/public/index.js +1 -0
  190. package/dist/elements/public/index.js.map +1 -1
  191. package/dist/mixins/themeable.js +248 -0
  192. package/dist/mixins/themeable.js.map +1 -1
  193. package/package.json +1 -1
  194. package/dist/cdn/shared-156144ab.js +0 -1
  195. package/dist/cdn/shared-2a20ac6b.js +0 -1
  196. package/dist/cdn/shared-3909c1e5.js +0 -1
  197. package/dist/cdn/shared-4cd53ea2.js +0 -1
  198. package/dist/cdn/shared-8c91f512.js +0 -169
  199. package/dist/cdn/shared-9eff0743.js +0 -1
  200. package/dist/cdn/shared-a03d948d.js +0 -1
  201. package/dist/cdn/shared-c00bff9d.js +0 -1
  202. package/dist/cdn/shared-c47571a6.js +0 -1
  203. package/dist/cdn/shared-c60b6e1a.js +0 -1
@@ -0,0 +1,169 @@
1
+ import{E as e,T as t}from"./shared-0bbbc87f.js";import"./shared-aa4bf9ab.js";import{h as s,P as r}from"./shared-35a7a4d6.js";import{F as l}from"./shared-93a1be98.js";const a=s`<dom-module id="lumo-custom-field" theme-for="vaadin-custom-field">
2
+ <template>
3
+ <style include="lumo-required-field">
4
+ :host {
5
+ --lumo-text-field-size: var(--lumo-size-m);
6
+ color: var(--lumo-body-text-color);
7
+ font-size: var(--lumo-font-size-m);
8
+ /* align with text-field height + vertical paddings */
9
+ line-height: calc(var(--lumo-text-field-size) + 2 * var(--lumo-space-xs));
10
+ font-family: var(--lumo-font-family);
11
+ -webkit-font-smoothing: antialiased;
12
+ -moz-osx-font-smoothing: grayscale;
13
+ -webkit-tap-highlight-color: transparent;
14
+ padding: 0;
15
+ }
16
+
17
+ :host::before {
18
+ margin-top: var(--lumo-space-xs);
19
+ height: var(--lumo-text-field-size);
20
+ box-sizing: border-box;
21
+ display: inline-flex;
22
+ align-items: center;
23
+ }
24
+
25
+ /* align with text-field label */
26
+ :host([has-label]) [part="label"] {
27
+ padding-bottom: calc(0.5em - var(--lumo-space-xs));
28
+ }
29
+
30
+ :host(:not([has-label])) [part="label"],
31
+ :host(:not([has-label]))::before {
32
+ display: none;
33
+ }
34
+
35
+ /* align with text-field error message */
36
+ :host([invalid]) [part="error-message"]:not(:empty)::before {
37
+ height: calc(0.4em - var(--lumo-space-xs));
38
+ }
39
+
40
+ :host([focused]:not([readonly]):not([disabled])) [part="label"] {
41
+ color: var(--lumo-primary-text-color);
42
+ }
43
+
44
+ :host(:hover:not([readonly]):not([disabled]):not([focused])) [part="label"],
45
+ :host(:hover:not([readonly]):not([disabled]):not([focused])) [part="helper-text"],
46
+ :host(:hover:not([readonly]):not([disabled]):not([focused])) [part="helper-text"] ::slotted(*) {
47
+ color: var(--lumo-body-text-color);
48
+ }
49
+
50
+ :host([has-helper]) [part="helper-text"]::before {
51
+ content: "";
52
+ display: block;
53
+ height: 0.4em;
54
+ }
55
+
56
+ [part="helper-text"],
57
+ [part="helper-text"] ::slotted(*) {
58
+ display: block;
59
+ color: var(--lumo-secondary-text-color);
60
+ font-size: var(--lumo-font-size-xs);
61
+ line-height: var(--lumo-line-height-xs);
62
+ margin-left: calc(var(--lumo-border-radius-m) / 4);
63
+ transition: color 0.2s;
64
+ }
65
+
66
+ /* helper-text position */
67
+
68
+ :host([has-helper][theme~="helper-above-field"]) [part="helper-text"]::before {
69
+ display: none;
70
+ }
71
+
72
+ :host([has-helper][theme~="helper-above-field"]) [part="helper-text"]::after {
73
+ content: "";
74
+ display: block;
75
+ height: 0.4em;
76
+ }
77
+
78
+ :host([has-helper][theme~="helper-above-field"]) [part="label"] {
79
+ order: 0;
80
+ padding-bottom: 0.4em;
81
+ }
82
+
83
+ :host([has-helper][theme~="helper-above-field"]) [part="helper-text"] {
84
+ order: 1;
85
+ }
86
+
87
+ :host([has-helper][theme~="helper-above-field"]) .inputs-wrapper {
88
+ order: 2;
89
+ }
90
+
91
+ :host([has-helper][theme~="helper-above-field"]) [part="error-message"] {
92
+ order: 3;
93
+ }
94
+
95
+ /* Touch device adjustment */
96
+ @media (pointer: coarse) {
97
+ :host(:hover:not([readonly]):not([disabled]):not([focused])) [part="label"] {
98
+ color: var(--lumo-secondary-text-color);
99
+ }
100
+ }
101
+
102
+ /* Disabled style */
103
+
104
+ :host([disabled]) [part="label"] {
105
+ color: var(--lumo-disabled-text-color);
106
+ -webkit-text-fill-color: var(--lumo-disabled-text-color);
107
+ }
108
+
109
+ /* Small theme */
110
+
111
+ :host([theme~="small"]) {
112
+ font-size: var(--lumo-font-size-s);
113
+ --lumo-text-field-size: var(--lumo-size-s);
114
+ }
115
+
116
+ :host([theme~="small"][has-label]) [part="label"] {
117
+ font-size: var(--lumo-font-size-xs);
118
+ }
119
+
120
+ :host([theme~="small"][has-label]) [part="error-message"] {
121
+ font-size: var(--lumo-font-size-xxs);
122
+ }
123
+ </style>
124
+ </template>
125
+ </dom-module>`;document.head.appendChild(a.content);const i=e=>class extends e{static get properties(){return{inputs:{type:Array,readOnly:!0},i18n:{type:Object,value:()=>({parseValue:function(e){return e.split("\t")},formatValue:function(e){return e.join("\t")}})},__errorId:String,__labelId:String,__helperTextId:String,__hasSlottedHelper:Boolean}}connectedCallback(){super.connectedCallback(),this.__observer&&this.__observer.connect()}disconnectedCallback(){super.disconnectedCallback(),this.__observer&&this.__observer.disconnect()}ready(){super.ready(),this.__setInputsFromSlot(),this.__observer=new l(this.$.slot,(()=>{this.__setInputsFromSlot()})),this.$.helperSlot.addEventListener("slotchange",this.__onHelperSlotChange.bind(this)),this.__onHelperSlotChange();const e=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor);this.addEventListener("keydown",(t=>{if(9===t.keyCode){if("slot"===t.target.parentElement.localName&&!t.defaultPrevented&&e){const e=t.target.parentElement;e.setAttribute("tabindex",-1),setTimeout((()=>e.removeAttribute("tabindex")))}this.inputs.indexOf(t.target)<this.inputs.length-1&&!t.shiftKey||this.inputs.indexOf(t.target)>0&&t.shiftKey?this.dispatchEvent(new CustomEvent("internal-tab")):this.__setValue()}})),this.addEventListener("focusin",(()=>this.setAttribute("focused",""))),this.addEventListener("focusout",(e=>{const t=this.getRootNode().activeElement;this.inputs.some((e=>t===e||e.shadowRoot&&e.shadowRoot.contains(t)))||this.removeAttribute("focused")}));var t=i._uniqueId=1+i._uniqueId||1;this.__errorId=`${this.constructor.is}-error-${t}`,this.__labelId=`${this.constructor.is}-label-${t}`,this.__helperTextId=`${this.constructor.is}-helper-${t}`}focus(){this.inputs&&this.inputs[0]&&this.inputs[0].focus()}__updateValue(e){e&&e.stopPropagation(),this.__setValue(),this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!1,detail:{value:this.value}}))}__setValue(){this.__settingValue=!0,this.value=this.i18n.formatValue.apply(this,[this.inputs.map((e=>e.value))]),this.__settingValue=!1}__queryAllAssignedElements(e){const t=[];let s;return"SLOT"===e.tagName?s=e.assignedNodes({flatten:!0}).filter((e=>e.nodeType===Node.ELEMENT_NODE)):(t.push(e),s=Array.from(e.children)),s.forEach((e=>t.push(...this.__queryAllAssignedElements(e)))),t}__getInputsFromSlot(){return this.__queryAllAssignedElements(this.$.slot).filter((e=>e.validate||e.checkValidity))}__setInputsFromSlot(){this._setInputs(this.__getInputsFromSlot()),this.__setValue()}__valueChanged(e,t){if(this.__settingValue||!this.inputs)return;const s=this.i18n.parseValue(e);s&&0!=s.length?(this.inputs.forEach(((e,t)=>e.value=s[t])),void 0!==t&&this.validate()):console.warn("Value parser has not provided values array")}__onHelperSlotChange(){const e=this.$.helperSlot.assignedNodes({flatten:!0});this.__hasSlottedHelper=e.filter((e=>3!==e.nodeType)).length>0,this.__hasSlottedHelper?this.setAttribute("has-helper","slotted"):""!==this.helperText&&null!==this.helperText||this.removeAttribute("has-helper")}}
126
+ /**
127
+ @license
128
+ Copyright (c) 2018 Vaadin Ltd.
129
+ This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
130
+ */;class o extends(e(i(t(r)))){static get template(){return s`
131
+ <style>
132
+ :host {
133
+ display: inline-flex;
134
+ }
135
+
136
+ :host::before {
137
+ content: "\\2003";
138
+ width: 0;
139
+ display: inline-block;
140
+ /* Size and position this element on the same vertical position as the input-field element
141
+ to make vertical align for the host element work as expected */
142
+ }
143
+
144
+ :host([hidden]) {
145
+ display: none !important;
146
+ }
147
+
148
+ .container {
149
+ width: 100%;
150
+ display: flex;
151
+ flex-direction: column;
152
+ }
153
+
154
+ .inputs-wrapper {
155
+ flex: none;
156
+ }
157
+ </style>
158
+
159
+ <div class="container">
160
+ <label part="label" on-click="focus" id="[[__labelId]]">[[label]]</label>
161
+ <div class="inputs-wrapper" on-change="__updateValue">
162
+ <slot id="slot"></slot>
163
+ </div>
164
+ <div part="helper-text" id="[[__helperTextId]]">
165
+ <slot name="helper" id="helperSlot">[[helperText]]</slot>
166
+ </div>
167
+ <div part="error-message" id="[[__errorId]]" aria-live="assertive" aria-hidden\$="[[__getErrorMessageAriaHidden(invalid, errorMessage, __errorId)]]">[[errorMessage]]</div>
168
+ </div>
169
+ `}static get is(){return"vaadin-custom-field"}static get version(){return"1.3.0"}static get properties(){return{label:{type:String,value:"",observer:"_labelChanged"},name:String,required:{type:Boolean,reflectToAttribute:!0},value:{type:String,observer:"__valueChanged",notify:!0},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1,observer:"__invalidChanged"},errorMessage:{type:String,value:"",observer:"__errorMessageChanged"},helperText:{type:String,value:"",observer:"__helperTextChanged"}}}static get observers(){return["__getActiveErrorId(invalid, errorMessage, __errorId, helperText, __helperTextId, __hasSlottedHelper)","__getActiveLabelId(label, __labelId)","__toggleHasValue(value)"]}__invalidChanged(e){this.__setOrToggleAttribute("aria-invalid",e,this)}__errorMessageChanged(e){this.__setOrToggleAttribute("has-error-message",!!e,this)}__helperTextChanged(e){this.__setOrToggleAttribute("has-helper",!!e,this)}__toggleHasValue(e){null!==e&&""!==e.trim()?this.setAttribute("has-value",""):this.removeAttribute("has-value")}_labelChanged(e){""!==e&&null!=e?this.setAttribute("has-label",""):this.removeAttribute("has-label")}validate(){return!(this.invalid=!this.checkValidity())}checkValidity(){return!(this.inputs.filter((e=>!(e.validate||e.checkValidity).call(e))).length||this.required&&!this.value.trim())}__setOrToggleAttribute(e,t,s){e&&s&&s.hasAttribute(e)===!t&&(t?s.setAttribute(e,"boolean"==typeof t?"":t):s.removeAttribute(e))}__getActiveErrorId(e,t,s,r,l,a){const i=[];(r||a)&&i.push(l),t&&e&&i.push(s),i.length>0?this.setAttribute("aria-describedby",i.join(" ")):this.removeAttribute("aria-describedby")}__getActiveLabelId(e,t){this.__setOrToggleAttribute("aria-labelledby",e?t:void 0,this)}__getErrorMessageAriaHidden(e,t,s){return(!(t&&e?s:void 0)).toString()}}customElements.define(o.is,o);export{o as C};
@@ -0,0 +1 @@
1
+ import"./shared-435ab348.js";import"./shared-aa4bf9ab.js";import{I as e}from"./shared-9afb80a6.js";import{i as a}from"./shared-d3bf9ac0.js";import{h as r}from"./shared-7f33a83a.js";let l,s=e=>e;customElements.define("foxy-internal-number-control",class extends e{renderControl(){return r(l||(l=s` <vaadin-number-field error-message="${0}" placeholder="${0}" helper-text="${0}" label="${0}" class="w-full" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" clear-button-visible @keydown="${0}" @change="${0}"> </vaadin-number-field> `),a(this._errorMessage),this.placeholder,this.helperText,this.label,this.disabled,this.readonly,this._checkValidity,String(this._value),(e=>{var a;return"Enter"===e.key&&(null===(a=this.nucleon)||void 0===a?void 0:a.submit())}),(e=>{const a=e.currentTarget;this._value=parseFloat(a.value)}))}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:0}set _value(e){super._value=e}});
@@ -1,4 +1,4 @@
1
- import{h as t}from"./shared-34db34b2.js";import{T as e}from"./shared-68fad60e.js";import{D as l}from"./shared-6a2cf3b9.js";const r=t`<dom-module id="lumo-email-field" theme-for="vaadin-email-field">
1
+ import{h as t}from"./shared-35a7a4d6.js";import{T as e}from"./shared-aa4bf9ab.js";import{D as l}from"./shared-19044260.js";const a=t`<dom-module id="lumo-email-field" theme-for="vaadin-email-field">
2
2
  <template>
3
3
  <style>
4
4
  :not(*):placeholder-shown, /* to prevent broken styles on IE */
@@ -13,13 +13,13 @@ import{h as t}from"./shared-34db34b2.js";import{T as e}from"./shared-68fad60e.js
13
13
  }
14
14
  </style>
15
15
  </template>
16
- </dom-module>`;document.head.appendChild(r.content);
16
+ </dom-module>`;document.head.appendChild(a.content);
17
17
  /**
18
18
  @license
19
19
  Copyright (c) 2018 Vaadin Ltd.
20
20
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
21
21
  */
22
- const i=t`<dom-module id="vaadin-email-field-template">
22
+ const r=t`<dom-module id="vaadin-email-field-template">
23
23
  <template>
24
24
  <style>
25
25
  :host([dir="rtl"]) [part="input-field"] {
@@ -44,4 +44,4 @@ const i=t`<dom-module id="vaadin-email-field-template">
44
44
  </style>
45
45
  </template>
46
46
 
47
- </dom-module>`;let a;document.head.appendChild(i.content);class o extends e{static get is(){return"vaadin-email-field"}static get version(){return"2.9.2"}static get template(){if(!a){a=super.template.cloneNode(!0);const t=l.import(this.is+"-template","template").content.querySelector("style");a.content.appendChild(t)}return a}ready(){super.ready(),this.inputElement.type="email",this.inputElement.autocapitalize="off"}_createConstraintsObserver(){this.pattern=this.pattern||"^([a-zA-Z0-9_\\.\\-+])+@[a-zA-Z0-9-.]+\\.[a-zA-Z0-9-]{2,}$",super._createConstraintsObserver()}}customElements.define(o.is,o);
47
+ </dom-module>`;let i;document.head.appendChild(r.content);class o extends e{static get is(){return"vaadin-email-field"}static get version(){return"2.9.2"}static get template(){if(!i){i=super.template.cloneNode(!0);const t=l.import(this.is+"-template","template").content.querySelector("style");i.content.appendChild(t)}return i}ready(){super.ready(),this.inputElement.type="email",this.inputElement.autocapitalize="off"}_createConstraintsObserver(){this.pattern=this.pattern||"^([a-zA-Z0-9_\\.\\-+])+@[a-zA-Z0-9-.]+\\.[a-zA-Z0-9-]{2,}$",super._createConstraintsObserver()}}customElements.define(o.is,o);
@@ -1,4 +1,4 @@
1
- import{E as e,C as t,T as o}from"./shared-45cc4f44.js";import{h as i,G as r,P as a}from"./shared-34db34b2.js";const s=i`<dom-module id="lumo-checkbox" theme-for="vaadin-checkbox">
1
+ import{E as e,C as t,T as o}from"./shared-0bbbc87f.js";import{h as i,G as r,P as a}from"./shared-35a7a4d6.js";const s=i`<dom-module id="lumo-checkbox" theme-for="vaadin-checkbox">
2
2
  <template>
3
3
  <style include="lumo-checkbox-style lumo-checkbox-effects">
4
4
  /* IE11 only */
@@ -0,0 +1 @@
1
+ import"./shared-aa4bf9ab.js";import"./shared-d9a3104e.js";import"./shared-3a84611d.js";import"./foxy-spinner.js";import"./shared-d8bf2eac.js";import{C as e}from"./shared-73a8b603.js";import"./shared-9a0f97e5.js";import"./shared-b1201c2e.js";import"./shared-290769ea.js";import{s,h as t}from"./shared-7f33a83a.js";import{S as i,T as a,a as r}from"./shared-19044260.js";import"./shared-435ab348.js";import"./shared-a0e71609.js";import"./shared-da285807.js";import"./shared-8d9c0007.js";import{m as n}from"./shared-2af327d0.js";import{G as l}from"./shared-a42a63aa.js";import"./shared-0bbbc87f.js";import"./shared-93a1be98.js";import"./shared-4c61787a.js";import{c as o}from"./shared-4e709717.js";import{C as d}from"./shared-a8966936.js";import{N as h}from"./shared-15278fe0.js";import{i as m}from"./shared-d3bf9ac0.js";import{v as c}from"./shared-b738ee96.js";let C,f,p,g,u=e=>e;const v=[{property:"is_merchant",icon:s(C||(C=u`<svg class="fill-current h-full w-full" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M22.8961 8.89L21.7932 4.52C21.5622 3.62 20.7429 3 19.7871 3H5.1979C4.25259 3 3.42283 3.63 3.20225 4.52L2.0994 8.89C1.84732 9.91 2.07839 10.95 2.75061 11.77C2.83464 11.88 2.95017 11.96 3.0447 12.06V19C3.0447 20.1 3.99001 21 5.14538 21H19.8501C21.0055 21 21.9508 20.1 21.9508 19V12.06C22.0453 11.97 22.1609 11.88 22.2449 11.78C22.9171 10.96 23.1587 9.91 22.8961 8.89ZM19.7556 4.99L20.8584 9.36C20.9635 9.78 20.8689 10.2 20.5958 10.53C20.4488 10.71 20.1337 11 19.6085 11C18.9678 11 18.4111 10.51 18.3376 9.86L17.7284 5L19.7556 4.99ZM13.5481 5H15.6067L16.1739 9.52C16.2264 9.91 16.1004 10.3 15.8273 10.59C15.5962 10.85 15.2601 11 14.8295 11C14.1258 11 13.5481 10.41 13.5481 9.69V5ZM8.81106 9.52L9.38874 5H11.4474V9.69C11.4474 10.41 10.8697 11 10.0925 11C9.73536 11 9.40975 10.85 9.15767 10.59C8.89509 10.3 8.76905 9.91 8.81106 9.52ZM4.13705 9.36L5.1979 5H7.26706L6.65787 9.86C6.57384 10.51 6.02766 11 5.38696 11C4.87229 11 4.54669 10.71 4.41014 10.53C4.12655 10.21 4.03202 9.78 4.13705 9.36ZM5.14538 19V12.97C5.22941 12.98 5.30293 13 5.38696 13C6.30075 13 7.13052 12.64 7.73971 12.05C8.36992 12.65 9.21019 13 10.166 13C11.0798 13 11.8991 12.64 12.5082 12.07C13.1279 12.64 13.9682 13 14.9135 13C15.7958 13 16.6361 12.65 17.2663 12.05C17.8755 12.64 18.7052 13 19.619 13C19.7031 13 19.7766 12.98 19.8606 12.97V19H5.14538Z" /></svg>`)),key:"merchant"},{property:"is_programmer",icon:s(f||(f=u`<svg class="fill-current h-full w-full" viewBox="0 0 20 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 3C0 1.34315 1.34315 0 3 0H17C18.6569 0 20 1.34315 20 3V15C20 16.6569 18.6569 18 17 18H3C1.34315 18 0 16.6569 0 15V3ZM3 2C2.44772 2 2 2.44772 2 3V15C2 15.5523 2.44772 16 3 16H17C17.5523 16 18 15.5523 18 15V3C18 2.44772 17.5523 2 17 2H3ZM4.29289 4.29289C4.68342 3.90237 5.31658 3.90237 5.70711 4.29289L9.70711 8.29289C9.89464 8.48043 10 8.73478 10 9C10 9.26522 9.89464 9.51957 9.70711 9.70711L5.70711 13.7071C5.31658 14.0976 4.68342 14.0976 4.29289 13.7071C3.90237 13.3166 3.90237 12.6834 4.29289 12.2929L7.58579 9L4.29289 5.70711C3.90237 5.31658 3.90237 4.68342 4.29289 4.29289ZM9 13C9 12.4477 9.44771 12 10 12H15C15.5523 12 16 12.4477 16 13C16 13.5523 15.5523 14 15 14H10C9.44771 14 9 13.5523 9 13Z"/></svg>`)),key:"backend_developer"},{property:"is_front_end_developer",icon:s(p||(p=u`<svg class="fill-current h-full w-full" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.2747 4.03847C14.8058 4.1902 15.1132 4.74368 14.9615 5.27472L10.9615 19.2747C10.8098 19.8058 10.2563 20.1132 9.72528 19.9615C9.19424 19.8098 8.88675 19.2563 9.03848 18.7253L13.0385 4.72528C13.1902 4.19424 13.7437 3.88675 14.2747 4.03847ZM6.70711 7.29289C7.09763 7.68342 7.09763 8.31658 6.70711 8.7071L3.41421 12L6.70711 15.2929C7.09763 15.6834 7.09763 16.3166 6.70711 16.7071C6.31658 17.0976 5.68342 17.0976 5.29289 16.7071L1.29289 12.7071C0.902369 12.3166 0.902369 11.6834 1.29289 11.2929L5.29289 7.29289C5.68342 6.90237 6.31658 6.90237 6.70711 7.29289ZM17.2929 7.29289C17.6834 6.90237 18.3166 6.90237 18.7071 7.29289L22.7071 11.2929C22.8946 11.4804 23 11.7348 23 12C23 12.2652 22.8946 12.5196 22.7071 12.7071L18.7071 16.7071C18.3166 17.0976 17.6834 17.0976 17.2929 16.7071C16.9024 16.3166 16.9024 15.6834 17.2929 15.2929L20.5858 12L17.2929 8.70711C16.9024 8.31658 16.9024 7.68342 17.2929 7.29289Z" /></svg>`)),key:"frontend_developer"},{property:"is_designer",icon:s(g||(g=u`<svg class="fill-current h-full w-full" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 20C4.49 20 0 15.51 0 10C0 4.49 4.49 0 10 0C15.51 0 20 4.04 20 9C20 12.31 17.31 15 14 15H12.23C11.95 15 11.73 15.22 11.73 15.5C11.73 15.62 11.78 15.73 11.86 15.83C12.27 16.3 12.5 16.89 12.5 17.5C12.5 18.88 11.38 20 10 20ZM10 2C5.59 2 2 5.59 2 10C2 14.41 5.59 18 10 18C10.28 18 10.5 17.78 10.5 17.5C10.5 17.34 10.42 17.22 10.36 17.15C9.95 16.69 9.73 16.1 9.73 15.5C9.73 14.12 10.85 13 12.23 13H14C16.21 13 18 11.21 18 9C18 5.14 14.41 2 10 2Z" /><path d="M4.5 11C5.32843 11 6 10.3284 6 9.5C6 8.67157 5.32843 8 4.5 8C3.67157 8 3 8.67157 3 9.5C3 10.3284 3.67157 11 4.5 11Z" /><path d="M7.5 7C8.32843 7 9 6.32843 9 5.5C9 4.67157 8.32843 4 7.5 4C6.67157 4 6 4.67157 6 5.5C6 6.32843 6.67157 7 7.5 7Z" /><path d="M12.5 7C13.3284 7 14 6.32843 14 5.5C14 4.67157 13.3284 4 12.5 4C11.6716 4 11 4.67157 11 5.5C11 6.32843 11.6716 7 12.5 7Z" /><path d="M15.5 11C16.3284 11 17 10.3284 17 9.5C17 8.67157 16.3284 8 15.5 8C14.6716 8 14 8.67157 14 9.5C14 10.3284 14.6716 11 15.5 11Z" /></svg>`)),key:"designer"}];let y,x,_,b=e=>e;const $=i(a(d(r(h,"user-form"))));class w extends ${constructor(){super(...arguments),this.__getValidator=n((e=>()=>!this.errors.some((s=>s.startsWith(e))))),this.__bindField=n((e=>s=>{const t=s.target;this.edit({[e]:t.value})}))}static get scopedElements(){return{"foxy-internal-confirm-dialog":customElements.get("foxy-internal-confirm-dialog"),"vaadin-text-field":customElements.get("vaadin-text-field"),"vaadin-button":customElements.get("vaadin-button"),"foxy-spinner":customElements.get("foxy-spinner"),"x-checkbox":e,"foxy-i18n":customElements.get("foxy-i18n"),"x-group":l}}static get v8n(){return[({first_name:e})=>!e||e.length<=50||"first_name_too_long",({last_name:e})=>!e||e.length<=50||"last_name_too_long",({email:e})=>e&&e.length>0||"email_required",({email:e})=>e&&e.length<=100||"email_too_long",({email:e})=>e&&c(e)||"email_invalid_email",({phone:e})=>!e||e.length<=50||"phone_too_long"]}render(){var e,s;const i=this.in({idle:{template:{dirty:"valid"}}}),a=this.in({idle:{snapshot:{dirty:"valid"}}}),r=i||a,n=this.in("busy"),l=this.in("fail"),d=n||l||this.disabled;return t(y||(y=b` <foxy-internal-confirm-dialog data-testid="confirm" message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" lang="${0}" ns="${0}" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <div data-testid="wrapper" aria-busy="${0}" aria-live="polite" class="space-y-l relative"> <div class="grid grid-cols-1 sm-grid-cols-2 gap-m"> ${0} </div> <x-group frame> ${0} </x-group> <vaadin-button data-testid="action" theme="${0}" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> </vaadin-button> <div data-testid="spinner" class="${0}"> <foxy-spinner layout="vertical" class="m-auto p-m bg-base shadow-xs rounded-t-l rounded-b-l" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.lang,this.ns,this.__handleConfirmHide,this.in("busy"),["first_name","last_name","email","phone"].map((e=>t(x||(x=b` <vaadin-text-field error-message="${0}" data-testid="${0}" ?disabled="${0}" ?readonly="${0}" class="w-full" label="${0}" value="${0}" .checkValidity="${0}" @input="${0}" @keydown="${0}"> </vaadin-text-field> `),this.__getErrorMessage(e),e,d,this.readonly,this.t(e),m(this.form[e]),this.__getValidator(e),this.__bindField(e),this.__handleKeyDown))),v.map(((e,s)=>t(_||(_=b` <hr class="${0}" style="margin-left:calc((var(--lumo-space-m) * 2) + 1.125rem)"> <x-checkbox class="w-full p-m" ?readonly="${0}" ?disabled="${0}" ?checked="${0}" @change="${0}"> <div class="flex items-start leading-s"> <div class="flex-1 flex flex-col"> <foxy-i18n key="${0}" lang="${0}" ns="${0}"></foxy-i18n> <foxy-i18n class="text-s text-secondary" lang="${0}" key="${0}_explainer" ns="${0}"> </foxy-i18n> </div> <div class="mt-xs" style="width:1.125rem;height:1.125rem">${0}</div> </div> </x-checkbox> `),s>0?"border-contrast-10":"hidden",this.readonly,d,this.form[e.property],(s=>{const t=s.target;this.edit({[e.property]:t.checked})}),e.key,this.lang,this.ns,this.lang,e.key,this.ns,e.icon))),this.in("idle")?"primary "+(this.href?"error":"success"):"",this.in({idle:"template"})&&!r||d,this.__handleActionClick,this.lang,this.href?"delete":"create",this.ns,o({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!n&&!l}),l?"error":n?"busy":"empty",this.lang,this.ns,null!==(s=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==s?s:"")}__getErrorMessage(e){const s=this.errors.find((s=>s.startsWith(e)));return s?this.t(s.replace(e,"v8n")):""}__handleActionClick(e){if(this.in({idle:"snapshot"})){this.renderRoot.querySelector("#confirm").show(e.currentTarget)}else this.submit()}__handleConfirmHide(e){e.detail.cancelled||this.delete()}__handleKeyDown(e){"Enter"===e.key&&this.submit()}}customElements.define("foxy-user-form",w);export{w as U,v as r};
@@ -0,0 +1 @@
1
+ import{_ as t}from"./shared-a8ced8bf.js";import"./shared-d9a3104e.js";import{L as e,c as i,h as s}from"./shared-7f33a83a.js";import{p as r}from"./shared-d8bf2eac.js";import"./shared-93a1be98.js";import"./shared-0bbbc87f.js";import"./shared-4c61787a.js";import{w as a,S as n,y as o}from"./shared-19044260.js";import"./shared-9a0f97e5.js";import"./shared-b1201c2e.js";import{I as l,D as c}from"./shared-290769ea.js";import{E as h}from"./shared-93548d58.js";import"./shared-435ab348.js";import"./shared-aa4bf9ab.js";import"./shared-a0e71609.js";import"./shared-da285807.js";import"./shared-8d9c0007.js";import"./shared-7415fa7e.js";import{s as d}from"./shared-11c2efc8.js";class u extends CustomEvent{constructor(t){super("change",{detail:t})}}class m extends CustomEvent{constructor(t){super("submit",{detail:t,cancelable:!0})}}let _,p,g=t=>t;var y;!function(t){t[t.Excluded=0]="Excluded",t[t.BeforeEnter=1]="BeforeEnter",t[t.Default=2]="Default",t[t.Previous=3]="Previous",t[t.BeforeExit=4]="BeforeExit"}(y||(y={}));class f extends e{constructor(){super(...arguments),this.quantity=0,this.image=""}static get properties(){return t(t({},super.properties),{},{quantity:{attribute:!1},image:{attribute:!1}})}static get styles(){return[a.styles,i(_||(_=g`.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.blur-1{filter:blur(1px)}.blur-2{filter:blur(2px)}.grayscale{filter:grayscale()}.rotate-12{--tw-rotate:12deg}.-rotate-12{--tw-rotate:-12deg}.-rotate-24{--tw-rotate:-24deg}.translate-y-half{--tw-translate-y:50%}`))]}set empty(t){this.updateComplete.then((()=>{if(t){const[,...t]=this.__stack;t.forEach((t=>t.remove()))}else this.quantity>1&&this.__stack.length<2&&this.__insertImage(y.Previous,this.__stack[0])}))}set data({quantity:t,image:e}){this.quantity=t,this.image=e}render(){return s(p||(p=g`<div id="image" class="w-full h-full relative"></div>`))}firstUpdated(){const t=this.__insertImage(y.Default);this.quantity>1&&this.__insertImage(y.Previous,t)}updated(t){if(t.has("quantity")){const e=t.get("quantity");void 0!==e&&(this.quantity>e?this.__add():this.__remove())}t.has("image")&&this.__stack.forEach((t=>t.src=this.image))}get __container(){return this.shadowRoot.getElementById("image")}get __stack(){var t,e;return[...null!==(e=null===(t=this.__container)||void 0===t?void 0:t.querySelectorAll(":not(.opacity-0)"))&&void 0!==e?e:[]].reverse()}__add(){const[t,e]=this.__stack;this.quantity>1?(t&&this.__setImageState(t,y.Previous),e&&(this.__setImageState(e,y.BeforeExit),e.ontransitionend=()=>e.remove()),this.__setImageState(this.__insertImage(y.BeforeEnter),y.Default)):t&&this.__setImageState(t,y.Default)}__remove(){const[t,e]=this.__stack;let i;if(this.quantity>0?(e&&this.__setImageState(e,y.Default),i=t):(t&&this.__setImageState(t,y.Excluded),i=e),i&&(this.__setImageState(i,y.BeforeEnter),i.ontransitionend=()=>i.remove()),this.quantity>1){const t=this.__insertImage(y.BeforeExit,this.__container.firstElementChild);this.__setImageState(t,y.Previous)}}__insertImage(t,e=null){const i=new Image;return i.src=this.image,i.setAttribute("part","picture"),i.addEventListener("error",(()=>i.src=f.placeholder)),this.__setImageState(i,t),this.__container.insertBefore(i,e),i}__setImageState(t,e){t.offsetHeight,t.className=["absolute inset-0 w-full h-full object-cover rounded transform transition duration-700 ease-out-back",["grayscale","shadow-m translate-y-half scale-110 rotate-12 opacity-0","shadow-m","blur-1 -rotate-12 opacity-25","blur-2 -rotate-24 opacity-0"][e]].join(" ")}}f.placeholder='data:image/svg+xml,%3Csvg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Crect width="40" height="40" fill="%23E8E8E8"/%3E%3Cpath d="M31.5143 0H24.5476L0 24.5476V31.5143L11.7046 19.8097L11.9841 17.0782C12.0983 15.9624 13.0131 15.1154 14.1038 15.1154H15.7373V12.1923C15.7373 10.9815 16.6915 10 17.8687 10H21.5143L31.5143 0Z" fill="white"/%3E%3Cpath d="M11.5434 21.3852L0 32.9285V39.8953L11.5822 28.3131C11.172 27.8663 10.9438 27.2444 11.012 26.5782L11.5434 21.3852Z" fill="white"/%3E%3Cpath d="M12.4305 28.879L1.30951 40H8.27631L19.2763 29H13.1316C12.8853 29 12.6495 28.9573 12.4305 28.879Z" fill="white"/%3E%3Cpath d="M28.3113 19.965L28.0159 17.0782C27.9116 16.0591 27.1395 15.2642 26.1754 15.1341L40 1.3095V8.27627L28.3113 19.965Z" fill="white"/%3E%3Cpath d="M20.6905 29L9.69049 40H16.6572L27.9755 28.6817C27.6541 28.8832 27.2756 29 26.8684 29H20.6905Z" fill="white"/%3E%3Cpath d="M28.6572 28C28.9128 27.5952 29.0415 27.1003 28.988 26.5782L28.4426 21.2479L40 9.69053V16.6572L28.6572 28Z" fill="white"/%3E%3Cpath d="M25.0381 40H18.0715L40 18.0715V25.0381L25.0381 40Z" fill="white"/%3E%3Cpath d="M26.4524 40H33.4191L40 33.4191V26.4524L26.4524 40Z" fill="white"/%3E%3Cpath d="M40 40H34.8333L40 34.8333V40Z" fill="white"/%3E%3Cpath d="M16.1666 0H23.1334L0 23.1334V16.1666L16.1666 0Z" fill="white"/%3E%3Cpath d="M14.7524 0H7.78571L0 7.78573V14.7524L14.7524 0Z" fill="white"/%3E%3Cpath d="M0 0H6.37152L0 6.37151V0Z" fill="white"/%3E%3Cpath d="M21.467 11.4615H17.8687C17.4763 11.4615 17.1582 11.7887 17.1582 12.1923V15.1154H22.8418V12.1923C22.8418 11.7887 22.5237 11.4615 22.1313 11.4615H21.467Z" fill="white"/%3E%3Cpath d="M24.7798 15.1154H24.2627V12.1923C24.2627 11.227 23.6562 10.4075 22.8138 10.1148L32.9286 0H39.89L24.7798 15.1154Z" fill="white"/%3E%3C/svg%3E';let v,b,w,x,q,I,E,$,C=t=>t;class S extends(n(e)){constructor(){super(...arguments),this.empty=!1,this.data=[]}static get properties(){return t(t({},super.properties),{},{empty:{attribute:!1},data:{attribute:!1}})}static get styles(){return[a.styles,i(v||(v=C`.w-preview{width:5.5rem}.h-preview{height:5.5rem}.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.grayscale{filter:grayscale()}.grid-2>:nth-child(1),.grid-3>:nth-child(1),.grid-4-plus>:nth-child(1),.grid-4>:nth-child(1){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(2){opacity:0;--tw-translate-x:100%;--tw-translate-y:var(--tw-translate-x)}.grid-2>:nth-child(2),.grid-3>:nth-child(2),.grid-4-plus>:nth-child(2),.grid-4>:nth-child(2){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-3>:nth-child(2),.grid-4-plus>:nth-child(2),.grid-4>:nth-child(2){transform-origin:top right}.grid-1>:nth-child(3),.grid-2>:nth-child(3),.grid-3>:nth-child(3),.grid-4-plus>:nth-child(3),.grid-4>:nth-child(3){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(3),.grid-2>:nth-child(3){opacity:0;--tw-translate-y:100%}.grid-3>:nth-child(3){transform-origin:bottom right}.grid-4-plus>:nth-child(3),.grid-4>:nth-child(3){transform-origin:bottom left}.grid-1>:nth-child(4),.grid-2>:nth-child(4),.grid-3>:nth-child(4),.grid-4-plus>:nth-child(4),.grid-4>:nth-child(4){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(4),.grid-2>:nth-child(4),.grid-3>:nth-child(4){opacity:0;transform-origin:bottom left;--tw-translate-x:100%}.grid-1>:nth-child(4)>:first-child,.grid-2>:nth-child(4)>:first-child,.grid-3>:nth-child(4)>:first-child,.grid-4>:nth-child(4)>:first-child{transform:perspective(250px) rotateX(-90deg)}.grid-4-plus>:nth-child(4)>:first-child,.grid-4>:nth-child(4)>:last-child{transition-delay:.15s;transition-timing-function:ease-out}.grid-4-plus>:nth-child(4)>:last-child,.grid-4>:nth-child(4)>:first-child{transition-timing-function:ease-in}.grid-4-plus>:nth-child(4)>:last-child{transform:perspective(250px) rotateX(90deg)}.grid-1>:nth-child(5),.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){opacity:0}.grid-1>:nth-child(5){--tw-translate-x:100%}.grid-2>:nth-child(5),.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){--tw-translate-y:-100%}.grid-1>:nth-child(6),.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){opacity:0}.grid-1>:nth-child(6){--tw-translate-y:100%}.grid-2>:nth-child(6),.grid-3>:nth-child(6),.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){--tw-translate-x:-100%}`))]}render(){const t=this.data.length,e="rounded bg-contrast-10",i="transition-all duration-700 ease-out-back transform absolute inset-0",r=this.empty?"grayscale":"",a=t>4?"grid-4-plus":`grid-${Math.max(1,t)}`,n=d({exportparts:"picture",class:"w-full h-full",".empty":this.empty}),[o,l,c,h]=this.data;return s(b||(b=C` <div class="${0} w-preview h-preview relative font-lumo"> <div class="${0} ${0} origin-top-left"> ${0} </div> <div class="${0} ${0} origin-bottom-right"> ${0} </div> <div class="${0} ${0} origin-top-right"> ${0} </div> <div class="${0} ${0} origin-bottom-right"> <div class="${0} flex text-body transition duration-150 absolute inset-0"> ${0} </div> <div class="transition duration-150 absolute inset-0"> ${0} </div> </div> <div class="${0} ${0} origin-top-right"></div> <div class="${0} ${0} origin-bottom-left"></div> </div> `),a,i,r,o?s(w||(w=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,o):"",i,r,l?s(x||(x=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,l):"",i,r,c?s(q||(q=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,c):"",i,r,e,t>102?s(I||(I=C`<iron-icon icon="icons:more-horiz" class="m-auto w-xl h-xl"></iron-icon>`)):s(E||(E=C`<div class="m-auto text-xxxl">+${0}</div>`),t-3),h?s($||($=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,h):"",i,e,i,e)}}let D,k,L=t=>t;class A extends S{static get scopedElements(){return{"x-pic":f}}}class N extends S{static get scopedElements(){return{"x-pic":A}}}class j extends(n(e)){constructor(){super(...arguments),this.quantity=0,this.items=[]}static get scopedElements(){return{"x-picture":f,"x-bundle-grid":N}}static get properties(){return{quantity:{attribute:!1},image:{attribute:!1},items:{attribute:!1}}}static get styles(){return a.styles}render(){const{quantity:t,image:e=""}=this,i=0===t,r=d({class:"w-full h-full",exportparts:"picture"});if(0===this.items.length)return s(D||(D=L`<x-picture ...="${0}" .data="${0}"></x-picture>`),r,{quantity:t,image:e});{const e=new Array(Math.max(1,t)).fill(this.items);return s(k||(k=L`<x-bundle-grid ...="${0}" .empty="${0}" .data="${0}"></x-bundle-grid>`),r,i,e)}}}class P extends o{static get properties(){return t(t({},super.properties),{},{open:{type:Object},signatures:{type:Object,converter:t=>{const e=JSON.parse(t);for(const t of Object.keys(e))64!=e[t].length&&console.error("There is something wrong with the signature. It should have 64 characters.");return e}}})}signedName(t){return this.signatures&&this.signatures[t]?`${t}||${this.signatures[t]}${this.isOpen(t)?"||open":""}`:t}isOpen(t){return!(!this.open||!this.open[t])}}let F,T,O,V,M,H,B,Z=t=>t;class R extends P{constructor(){super("items-form"),this.rel="product_item",this.readonly=!1,this.quantity=0,this.total=this.__computeTotalPrice(),this.currency="",this.isItem=!0,this.isChildItem=!1,this.pid=R.__newId(),this.__modified=!1,this.__childPrices=[],this.__images=[],this.__childrenCount=0,this.__itemDescription="",this.__handleQuantity={handleEvent:t=>{const e=Number(t.target.value);this.quantity=e,this.__modified=!0,this.__images=[this.getImageDescription()].concat(this.__images.slice(1,this.__images.length))}},this.__childItemsObserver=new MutationObserver(this.__observeItems.bind(this)),this.__childItemsObserver.observe(this,{childList:!0,attributes:!1,subtree:!0}),this.updateComplete.then((()=>{this.__setCode(),this.__acknowledgeChildItems(),this.__changedChildItem(),this.__isValid()||console.error("Invalid item",this.value)}))}static get styles(){return[super.styles,i(F||(F=Z`:host{--quantity-width:6.5rem;--preview-size:5.5rem;--threshold:20rem}.min-w-description::before{content:'';width:var(--threshold);display:block;overflow:hidden}.ml-description{--min-width:calc(var(--threshold) + var(--preview-size) + var(--lumo-space-l));--free-space:calc(100% - var(--min-width));--max-margin-left:calc(var(--preview-size) + var(--lumo-space-l));--final-margin-left:clamp(0rem, var(--free-space) * 999999999, var(--max-margin-left));margin-left:var(--final-margin-left)}.mr-quantity{--min-width:var(--threshold);--free-space:calc(100% - var(--min-width));--max-margin-right:calc(var(--quantity-width) + var(--lumo-space-l));--final-margin-right:clamp(0rem, var(--free-space) * 999999999, var(--max-margin-right));margin-right:var(--final-margin-right)}:host([data-bundled]:not(:last-of-type)) .separator::after{content:' ';display:block;position:absolute;width:100vw;border-bottom:solid thin var(--lumo-shade-10pct);left:0;bottom:0}.w-quantity{width:var(--quantity-width)}.w-preview{width:var(--preview-size)}.h-preview{height:var(--preview-size)}`))]}static get scopedElements(){return{"vaadin-integer-field":customElements.get("vaadin-integer-field"),"x-error-screen":h,"x-preview":j,"x-i18n":l}}static get properties(){return t(t({},super.properties),{},{__modified:{},readonly:{type:Boolean,reflect:!0},currency:{type:String},category:{type:String},code:{type:String,reflect:!0},expires:{type:String},height:{type:Number},image:{type:String},length:{type:Number},name:{type:String},parent_code:{type:String},price:{type:Number},quantity:{type:Number,reflect:!0},quantity_max:{type:Number},quantity_min:{type:String},shipto:{type:String},total:{type:Number,reflect:!0,attribute:"total"},url:{type:String},value:{type:Object},weight:{type:Number},width:{type:Number},__childPrices:{},__childrenCount:{},__images:{},alt:{type:String},isChildItem:{type:Boolean,reflect:!0,attribute:"data-bundled"},isItem:{type:Boolean,reflect:!0,attribute:"data-item"},open:{type:Object},pid:{type:Number,reflect:!0},items:{type:Array}})}get items(){const t=[];return this.__onEachChildItem([e=>t.push(e.value)]),t}set items(t){this.__createItems(t)}get value(){const t={};for(let e=0;e<this.attributes.length;e++)t[this.attributes[e].name]=this.attributes[e].value;return t.items=this.items,t}set value(t){this.__itemDescription="";for(const e in t){let i="";if("description"!=e){if("object"==typeof t[e])i=JSON.stringify(t[e]);else{const s=e;(t[s]&&"undefined"!==t[s]||0===t[s])&&(i=t[e].toString())}this.setAttribute(e,t[e]?i:"")}else this.__itemDescription=t[e]}}updated(t){t.forEach(((t,e)=>{"__itemDescription"!=e&&"isChildItem"!=e||this.__updateDescriptionEl()})),this.__setTotalPrice(),this.dispatchEvent(new Event("change"))}render(){var t;if(!this.__isValid())return s(T||(T=Z`<x-error-screen type="setup_needed" class="relative"></x-error-screen>`));const e=`font-lumo text-body text-s leading-m transition duration-100 ${this.quantity?"":"removed opacity-50"}`;if(this.isChildItem)return s(O||(O=Z` <article part="item" class="py-s w-full relative separator item-summary flex justify-between ${0}"> <div class="description flex-1"> <h1 class="text-header font-medium">${0}</h1> <section class="description text-secondary"> <slot></slot> </section> </div> ${0} </article> `),e,this.name,this.quantity<2?"":s(V||(V=Z` <section class="quantity font-medium text-tertiary whitespace-nowrap"> ${0} </section> `),this._t("item.items",{quantity:this.quantity})));{const i=(null!==(t=this.price)&&void 0!==t?t:0)+this.__childPrices.reduce(((t,e)=>t+e),0),r=this.__translateAmount(i*this.quantity),a=this.__translateAmount(i);return s(M||(M=Z` <article part="item" class="p-l relative item ${0} ${0}"> <x-preview class="preview float-left w-preview h-preview mr-l mb-l" exportparts="picture" .image="${0}" .quantity="${0}" .items="${0}"> </x-preview> <section class="description min-w-description ml-description"> <h1 class="text-header font-medium text-l leading-none mr-quantity mb-s"> ${0} </h1> <div class="item-description text-secondary mr-quantity mb-s"> <slot></slot> </div> <div class="child-items mb-s"> <slot name="items"></slot> </div> ${0} </section> <section class="quantity w-quantity absolute top-0 right-0 m-l"> <vaadin-integer-field class="w-full p-0" name="quantity" @change="${0}" value="${0}" min="0" has-controls ?readonly="${0}"> </vaadin-integer-field> ${0} </section> </article> `),e,this.__modified?"modified":"",this.image,this.quantity,[...this.querySelectorAll("[data-bundled]")].map((t=>{var e;return{quantity:t.quantity,image:null!==(e=t.image)&&void 0!==e?e:""}})),this.name,a?s(H||(H=Z`<div class="font-medium price text-l">${0}</div>`),a):"",this.__handleQuantity,this.quantity,this.readonly,this.quantity>1?s(B||(B=Z` <x-i18n .ns="${0}" .lang="${0}" .opts="${0}" class="price-total text-secondary text-xs text-center block mt-xs" key="price.total"> </x-i18n> `),this.ns,this.lang,{amount:r}):"")}}getImageDescription(){return{src:this.image,alt:this.alt,quantity:this.quantity}}signedName(t){const e=super.signedName(t);return`${this.pid.toString()}:${e}`}static __newId(){const t=R.__existingIds.reduce(((t,e)=>e>t?e:t),0)+1;return R.__existingIds.push(t),t}__updateDescriptionEl(){if(this.__itemDescription){let t=this.shadowRoot.querySelector("data-item-description");t||(t=document.createElement("p"),t.dataset.itemDescription="true",this.__addSlottedEl(t)),t.innerText=this.__itemDescription}else{const t=this.shadowRoot.querySelector("data-item-description");t&&t.remove()}}__addSlottedEl(t){const e=this.shadowRoot.querySelector("article");e&&e.appendChild(t)}__setCode(){this.code||(this.code=`RAND${Math.random()}`)}__createItems(t){t.forEach((t=>{const e=document.createElement(this.tagName);e.value=t,e.currency=this.currency,e.__computeTotalPrice(),this.__acknowledgeItem(e),this.appendChild(e)}))}__setTotalPrice(){this.total=this.__computeTotalPrice()}__computeTotalPrice(){if(!this.__childPrices)return this.price?this.price*this.quantity:0;let t=0;return this.__childPrices.forEach((e=>{t+=e})),t+=this.price,t*=this.quantity,t}__isValid(){const t=[];return this.name&&this.name.length||t.push("The name attribute of an item is required."),this.price||0===this.price||t.push("The price attribute of an item is required."),this.price&&this.price<0&&t.push("Item added with negative price."),this.quantity_min&&this.quantity&&this.quantity<this.quantity_min&&t.push("Quantity amount is less than minimum quantity."),this.quantity_max&&this.quantity&&this.quantity>this.quantity_max&&t.push("Quantity amount is more than maximum quantity."),console.error(...t),!t.length}__translateAmount(t){return this.currency?t.toLocaleString(this.lang,{minimumFractionDigits:2,currency:this.currency,style:"currency"}):""}__observeItems(t){t.forEach((t=>{"childList"==t.type&&t.addedNodes.forEach((t=>{t.nodeType===Node.DOCUMENT_NODE&&this.__acknowledgeItem(t)}))})),this.__setTotalPrice()}__acknowledgeChildItems(){var t;null===(t=this.shadowRoot)||void 0===t||t.querySelectorAll("[data-item]").forEach((t=>this.__acknowledgeItem(t))),this.querySelectorAll("[data-item]").forEach((t=>this.__acknowledgeItem(t)))}__acknowledgeItem(t){t.addEventListener("change",this.__changedChildItem.bind(this)),t.currency=this.currency,t.isItem=!1,t.isChildItem=!0,this.code&&(t.parent_code=this.code)}__changedChildItem(){const t=[],e=[];let i=0;this.__onEachChildItem([e=>{void 0!==e.total&&t.push(e.total)},t=>{e.push(t.getImageDescription())},()=>i+=1]),this.image&&0===e.length&&e.push(this.getImageDescription()),this.__childPrices=t,this.__images=e,this.__childrenCount=i,this.__setTotalPrice()}__onEachChildItem(t){const e=this.querySelectorAll("[data-bundled]");for(const i of e)for(const e of t)e(i)}}R.__existingIds=[];let z,Q,W,J,U,X,G=t=>t;class K extends P{constructor(){super("items-form"),this.readonly=!1,this.target="_top",this.cart="checkout",this.sub_modify="replace",this.sub_restart="auto",this.frequencies=[],this.handleSubmit={handleEvent:()=>{null!==this.__data&&this.dispatchEvent(new m(this.__data))&&this.shadowRoot.querySelector("form").submit()}},this.__hasValidItems=!1,this.__total=0,this.__handleFrequency={handleEvent:t=>{const e=t.detail.replace(/([wydm])\w*/,"$1").replace(/ /g,"").replace(/^0/,"");K.__validFrequency(e)?this.sub_frequency=e:this.sub_frequency="",this.__updateData()}},this.__data=new FormData,this.__childItemsObserver=new MutationObserver(this.__observeChildren.bind(this)),this.__childItemsObserver.observe(this,{childList:!0,attributes:!1,subtree:!0}),this.updateComplete.then((()=>{this.__acknowledgeItemElements(),this.__computeTotalPrice(),this.__updateData()}))}static get scopedElements(){return{"x-error-screen":h,"vaadin-button":customElements.get("vaadin-button"),"x-dropdown":c,"x-item":R}}static get properties(){return t(t({},super.properties),{},{currency:{type:String},readonly:{type:Boolean},cart:{type:String,converter:t=>t&&!["checkout","add"].includes(t)?null:t},target:{type:String},store:{type:String,attribute:"store"},sub_frequency:{type:String},sub_startdate:{type:String,converter:t=>K.__validDate(t)?t:(console.error("Invalid start date",t),"")},sub_enddate:{type:String,converter:t=>K.__validDateFuture(t)?t:(console.error("Invalid end date",t),"")},sub_token:{type:String},sub_modify:{type:String,converter:t=>""===t||"append"===t?"":"replace"},sub_restart:{type:String,converter:t=>"true"===t?t:"auto"},frequencies:{converter:t=>{if(!t)return[];const e=JSON.parse(t);if(!Array.isArray(e))return console.error("Invalid frequency","Frequency options must be an array."),[];for(const t of e)if(!K.__validFrequency(t))return console.error("Invalid frequency","Invalid frequency option.\n Please, check https://wiki.foxycart.com/v/2.0/products#subscription_product_options for possible values.\n Each frequency must be a in the format:\n - 1d (a number followed by d, for day)\n - 1w (a number followed by w, for week)\n - 1m (a number followed by m, for month)\n - 1y (a number followed by y, for year)\n or .5m (no other decimals are allowed, and this is only for months)\n ",t),[];return e.filter(K.__validFrequency)}},items:{type:Array},__hasValidItems:{attribute:!1},__total:{attribute:!1},__data:{attribute:!1}})}get items(){const t=[];return this.__itemElements.forEach((e=>{const i=new Proxy(e,{set:function(t,e,i){const s=Object.keys(t.value);return!("string"!=typeof e||!s.includes(e))&&(t[e]=i,!0)},get:function(t,e){return t.value[e]}});t.push(i)})),t}set items(t){this.__removeItems(),this.__createItemsFromItemArray(t)}get total(){return this.__total}render(){var t;return this.store&&this.currency?s(Q||(Q=G` <div> <form class="overflow-hidden" method="POST" target="${0}" action="https://${0}/cart" data-testid="form" class="hidden" hidden> ${0} </form> <section class="items"> <slot></slot> </section> ${0} </div> `),this.target,this.store,this.__data?s(W||(W=G` ${0}`),[...this.__data.entries()].map((([t,e])=>s(J||(J=G`<input type="hidden" name="${0}" value="${0}">`),t,e)))):"",this.readonly?"":s(U||(U=G` <section class="actions flex flex-wrap justify-end m-m"> ${0} <vaadin-button class="m-s w-full sm-w-auto" theme="primary" data-testid="submit" ?disabled="${0}" @click="${0}"> <span class="total"> ${0} </span> </vaadin-button> </section> `),this.frequencies&&this.frequencies.length?s(X||(X=G` <x-dropdown type="text" name="frequency" class="subscription m-s w-full sm-w-auto" lang="${0}" .value="${0}" .items="${0}" .getText="${0}" @change="${0}"> </x-dropdown> `),this.lang,null!==(t=this.sub_frequency)&&void 0!==t?t:"0",this.frequencies.concat(["0"]),this.__translateFrequency.bind(this),this.__handleFrequency):"",!this.__hasValidItems,this.handleSubmit,this.__submitBtnText(this.__translateAmount(this.total)))):s(z||(z=G`<x-error-screen type="setup_needed" class="relative"></x-error-screen>`))}addItems(t){for(const e of t){const t=this.createItem(e);this.appendChild(t),this.__acknowledgeItemElement(t)}}removeItems(t){this.__removeItems((e=>t.includes(e.pid)))}updated(){this.dispatchEvent(new u(this.__data))}createItem(t){const e=this.constructor.getScopedTagName("x-item"),i=document.createElement(e);return i.value=t,i.currency=this.currency,i.readonly=this.readonly,i}__submitBtnText(t){if(this.sub_frequency&&"0"!=this.sub_frequency){const e=r(this.sub_frequency);return 1===e.count?this._t("checkout.subscribe_single_unit",{value:t,period:this._t(e.units).toLowerCase()}):this._t("checkout.subscribe_muiltiple_units",{value:t,period:this.__translateFrequency(this.sub_frequency).toLowerCase()})}return this._t("checkout.buy",{value:t})}get __itemElements(){return this.querySelectorAll("[data-item]")}__createItemsFromItemArray(t){this.addItems(t)}__removeItems(t=(()=>!0)){this.__itemElements.forEach((e=>{t(e)&&e.remove()}))}__addSignature(t,e,i){return`${t}||${e}${i?"||open":""}`}__formDataFill(t){let e=0;return this.__itemElements.forEach((i=>{e+=this.__formDataAddItem(t,i)})),this.__formDataAddCartWideSubscriptionFields(t),e}__formDataCustomInputs(t){this.querySelectorAll("[name]").forEach((e=>{const i=e;"INPUT"==i.tagName&&["checkbox","radio"].includes(i.type)&&!i.checked||"OPTION"!=i.tagName&&i.value&&["number","string"].includes(typeof i.value)&&t.set(i.name,i.value)}))}__isAttributeReserved(t){return["alt","currency","description","isChildren","isItem","items","open","pid","signatures","slot","total"].includes(t)}__formDataAddItem(t,e,i=null){let s=0;if(this.__validItem(e)){if(!e.value.pid)throw new Error("Attempt to convert a item without a propper ID");i&&i.getAttribute("code")&&e.setAttribute("parent_code",i.getAttribute("code"));for(let s=0;s<e.attributes.length;s++){const r=e.attributes[s];if(!this.__isAttributeReserved(r.name)&&!r.name.startsWith("data-")){let s=e[r.name];e.code&&["string","number"].includes(typeof s)&&(i&&"quantity"==r.name&&(s=Number(r.value)*i.quantity),t.set(e.signedName(r.name),s.toString()))}}s+=1,this.__formDataAddSubscriptionFields(t,e)}const r=e.querySelectorAll("[data-bundled]");if(r&&e.quantity>0)for(const i of r)s+=this.__formDataAddItem(t,i,e);return s}__formDataAddSubscriptionFields(t,e){if(this.sub_frequency)for(const i of["sub_frequency","sub_startdate","sub_enddate"])this[i]&&t.set(e.signedName(i),this[i])}__formDataAddCartWideSubscriptionFields(t){this.sub_frequency&&(this.sub_token&&t.set(this.signedName("sub_token"),this.sub_token),t.set(this.signedName("sub_modify"),this.sub_modify),t.set(this.signedName("sub_restart"),this.sub_restart))}__formDataAddCartFields(t){this.cart?t.set("cart",this.cart):t.delete("cart")}static __validDate(t){return null!=t&&(t.match(/^(\d{1,2}|\d{8})$/)?!(t.match(/^\d{2}$/)&&Number(t)>31):!(t.match(/^\.5m/)||!K.__validFrequency(t)))}static __validDateFuture(t){let e=!1;if(K.__validDate(t))if(t.match(/^\d{8}/)){e=(new Date).toISOString().replace(/(-|T.*)/g,"")<=t}else e=!0;return e}static __validFrequency(t){return!!t&&!!t.match(/^(\.5m|\d+[dwmy])$/)}__observeChildren(t){t.forEach((t=>{"childList"==t.type&&t.addedNodes.forEach((t=>{t.addEventListener("change",this.__itemChange.bind(this))}))})),this.__acknowledgeItemElements(),this.__computeTotalPrice(),this.__updateData()}__itemChange(){this.__computeTotalPrice(),this.__updateData()}__computeTotalPrice(){let t=0;this.__itemElements.forEach((e=>{const i=e;i.total&&(t+=Number(i.total))})),this.__total=Number(t.toFixed(2))}__acknowledgeItemElements(){this.__itemElements.forEach((t=>{const e=t;this.__acknowledgeItemElement(e)}))}__acknowledgeItemElement(t){t.addEventListener("change",this.__itemChange.bind(this)),t.currency=this.currency}__validItem(t){const e=t.getAttribute("pid"),i=Number(t.getAttribute("quantity")),s=Number(t.getAttribute("price"));return!!(e&&i>0&&s>=0)}__translateFrequency(t){if(t.startsWith("0"))return this._t("frequency_once");if(".5m"===t)return this._t("frequency_0_5m");const{count:e,units:i}=r(t);return this._t("frequency",{units:this._t(i,{count:e}),count:e})}__translateAmount(t){return t.toLocaleString(this.lang,{minimumFractionDigits:2,currency:this.currency,style:"currency"})}__updateData(){this.__data=null;if(!this.shadowRoot.querySelector("form"))return;const t=new FormData,e=this.__formDataFill(t);this.__hasValidItems=!!e,this.__formDataAddCartFields(t),this.__formDataCustomInputs(t),this.__data=t}}customElements.define("foxy-items-form",K),customElements.define("foxy-item",R);export{K as I,j as P,R as a};
@@ -1 +1 @@
1
- import{_ as r}from"./shared-a8ced8bf.js";import{p as s}from"./shared-c6f5602e.js";function t(t){var a;const e=s(t),n=null!==(a={y:"yearly",m:"monthly",w:"weekly",d:"daily"}[e.units])&&void 0!==a?a:e.units;return r(r({},e),{},{units:n})}export{t as p};
1
+ import{_ as r}from"./shared-a8ced8bf.js";import{p as s}from"./shared-d8bf2eac.js";function a(a){var t;const e=s(a),n=null!==(t={y:"yearly",m:"monthly",w:"weekly",d:"daily"}[e.units])&&void 0!==t?t:e.units;return r(r({},e),{},{units:n})}export{a as p};
@@ -0,0 +1,311 @@
1
+ {
2
+ "maintenance_mode_title": "Maintenance mode",
3
+ "maintenance_mode_on_explainer": "Maintenance mode is on. Your customers can't make purchases or use the checkout page in any way. Once you're done making changes, disable this mode to continue getting orders.",
4
+ "maintenance_mode_off_explainer": "If you're about to make changes that may disrupt the checkout process, we recommend enabling the maintenance mode first. In this mode the checkout page will be completely non-functioning and the customers will see a message asking them to come back later.",
5
+ "enable_maintenance_mode": "Enable maintenance mode",
6
+ "disable_maintenance_mode": "Disable maintenance mode",
7
+ "general_title": "General",
8
+ "emails_title": "Email settings",
9
+ "shipping_title": "Shipping",
10
+ "language_and_format_title": "Language & format",
11
+ "cart_and_checkout_title": "Cart & checkout",
12
+ "customer_login_title": "Customer login",
13
+ "legacy_title": "Legacy",
14
+ "store-name": {
15
+ "label": "Name",
16
+ "placeholder": "My Store",
17
+ "helper_text": "The name of your store as you'd like it displayed to your customers and our system.",
18
+ "v8n_required": "Please enter the name of your store",
19
+ "v8n_too_long": "Please reduce the name of your store to 50 characters or less"
20
+ },
21
+ "store-email": {
22
+ "label": "Emails",
23
+ "placeholder": "Enter an email and press Enter",
24
+ "helper_text": "Email addresses used for billing and communication with Foxy.",
25
+ "submit": "Submit",
26
+ "delete": "Delete",
27
+ "v8n_required": "Please enter at least one email",
28
+ "v8n_too_long": "All emails for this store must fit within 300 characters when comma-separated"
29
+ },
30
+ "store-url": {
31
+ "label": "Website",
32
+ "placeholder": "https://my.store.example.com",
33
+ "helper_text": "The URL of your online store.",
34
+ "v8n_required": "Please enter the URL of your online store",
35
+ "v8n_too_long": "Please use a URL that is 300 characters or less"
36
+ },
37
+ "store-domain": {
38
+ "label": "Domain",
39
+ "placeholder": "my-store.foxycart.com",
40
+ "helper_text": "Unique Foxy subdomain or a custom domain for your cart, checkout, and receipt.",
41
+ "custom_domain_note": "IMPORTANT: to use a custom domain, you must purchase an SSL certificate through Foxy. This option is only for developers who have full control of their domain settings and may take a few days to fully process.",
42
+ "v8n_required": "Please enter the domain of your store",
43
+ "v8n_too_long": "Please use a domain that is 50 characters or less"
44
+ },
45
+ "logo-url": {
46
+ "label": "Logo",
47
+ "placeholder": "https://example.com/logo.png",
48
+ "helper_text": "URL to your store's logo that may be used in your store's templates.",
49
+ "v8n_too_long": "Please shorten this link to 100 characters of less"
50
+ },
51
+ "timezone": {
52
+ "label": "Timezone",
53
+ "placeholder": "(GMT-08:00) Pacific Time (US and Canada)",
54
+ "helper_text": "The timezone of your store. This will impact how dates are shown to customers and within the admin."
55
+ },
56
+ "from-email": {
57
+ "label": "FROM email",
58
+ "placeholder": "Defaults to the first store email",
59
+ "helper_text": "If you'd like us to send messages from an address other than the first one of your store emails, list it here.",
60
+ "v8n_too_long": "Please use an email that is 100 characters or less"
61
+ },
62
+ "bcc-on-receipt-email": {
63
+ "label": "",
64
+ "helper_text": "",
65
+ "option_checked": "Send a copy of each receipt to the store email"
66
+ },
67
+ "use-email-dns": {
68
+ "label": "",
69
+ "helper_text": "",
70
+ "option_checked": "Improve email deliverability with DNS"
71
+ },
72
+ "use_email_dns_helper_text": "Before saving your changes, make sure the DNS records for your domain list our servers. To learn more, see our Wiki:",
73
+ "use-smtp-config": {
74
+ "label": "",
75
+ "helper_text": "",
76
+ "option_checked": "Use custom mail server",
77
+ "v8n_too_long": "This configuration must fit within 1000 characters when JSON-encoded"
78
+ },
79
+ "smtp-config-host": {
80
+ "label": "Host",
81
+ "helper_text": "",
82
+ "placeholder": "smtp.example.com"
83
+ },
84
+ "smtp-config-port": {
85
+ "label": "Port",
86
+ "helper_text": "",
87
+ "placeholder": "465"
88
+ },
89
+ "smtp-config-username": {
90
+ "label": "Username",
91
+ "helper_text": "",
92
+ "placeholder": "sender@example.com"
93
+ },
94
+ "smtp-config-password": {
95
+ "label": "Password",
96
+ "helper_text": "",
97
+ "placeholder": "Required"
98
+ },
99
+ "smtp-config-security": {
100
+ "label": "",
101
+ "helper_text": "",
102
+ "option_ssl": "Use SSL",
103
+ "option_tls": "Use TLS",
104
+ "option_none": "Don't encrypt"
105
+ },
106
+ "country": {
107
+ "label": "Country",
108
+ "placeholder": "Select country...",
109
+ "helper_text": "The country your store is located in. We'll use this information to calculate shipping costs if you sell shippable items.",
110
+ "v8n_required": "Please select the country of your store"
111
+ },
112
+ "region": {
113
+ "label": "Region",
114
+ "placeholder": "Select region...",
115
+ "helper_text": "The region, province or state your store is located in. We'll use this information to calculate shipping costs if you sell shippable items.",
116
+ "v8n_required": "Please select the region of your store",
117
+ "v8n_too_long": "Please shorten the region name to 50 characters of less"
118
+ },
119
+ "postal-code": {
120
+ "label": "Postal code",
121
+ "placeholder": "012345",
122
+ "helper_text": "The postal code (or zip code) of the area your store is located in. We'll use this information to calculate shipping costs if you sell shippable items.",
123
+ "v8n_required": "Please enter the postal code of your store",
124
+ "v8n_too_long": "Postal code can't exceed 50 characters"
125
+ },
126
+ "shipping-address-type": {
127
+ "label": "Rate calculation",
128
+ "placeholder": "Rate based on Company field",
129
+ "helper_text": "Used for determining the type of the customer address used when calculating shipping costs."
130
+ },
131
+ "require-signed-shipping-rates": {
132
+ "label": "",
133
+ "helper_text": "",
134
+ "option_checked": "Prevent shipping rate tampering"
135
+ },
136
+ "require_signed_shipping_rates_helper_text": "Enabling shipping rate signing for your store ensures that the rate the customer selects is carried through and not altered in any way. If you're intending to make use of javascript snippets on your store to alter the price or label of shipping rates or add custom rates dynamically, disable this setting as it will block those rates from being applied.",
137
+ "features-multiship": {
138
+ "label": "",
139
+ "helper_text": "",
140
+ "option_checked": "Allow multiple destinations per order"
141
+ },
142
+ "language": {
143
+ "label": "Language",
144
+ "placeholder": "English",
145
+ "helper_text": "The default language for your store's cart, checkout, and receipt strings."
146
+ },
147
+ "locale-code": {
148
+ "label": "Locale code",
149
+ "placeholder": "en_US",
150
+ "helper_text": "The locale code for your store's locale. This will be used to format strings for your store."
151
+ },
152
+ "currency_style_label": "Currency display",
153
+ "currency_style_helper_text": "Choose how you'd like all prices and totals to appear across your store's cart, checkout, receipt and admin.",
154
+ "receipt-continue-url": {
155
+ "label": "Return URL",
156
+ "placeholder": "https://example.com/thank-you",
157
+ "helper_text": "By default, we send customers back to the page referrer after completing a purchase. Instead, you can set a specific URL here.",
158
+ "v8n_too_long": "Please use a URL that is 300 characters or less"
159
+ },
160
+ "app-session-time": {
161
+ "label": "Clear cart after",
162
+ "helper_text": "If your store sells products which collect personal or sensitive information as product attributes, you may want to consider lowering your cart session lifespan.",
163
+ "second": "Second",
164
+ "second_plural": "Seconds",
165
+ "minute": "Minute",
166
+ "minute_plural": "Minutes",
167
+ "hour": "Hour",
168
+ "hour_plural": "Hours",
169
+ "day": "Day",
170
+ "day_plural": "Days"
171
+ },
172
+ "products-require-expires-property": {
173
+ "label": "",
174
+ "helper_text": "",
175
+ "option_checked": "My products have limited availability"
176
+ },
177
+ "products_require_expires_property_helper_text": "All products added to the cart for your store will need to contain the expires property to ensure stale products can't be purchased.",
178
+ "use-cart-validation": {
179
+ "label": "",
180
+ "helper_text": "",
181
+ "option_checked": "Prevent product link and form tampering"
182
+ },
183
+ "use_cart_validation_helper_text": "Enabling this option will require all cart links and forms to pass HMAC-based verification before products can be added to the cart. You will need to sign your HTML to use this feature. See our docs for more info:",
184
+ "custom-display-id-config-enabled": {
185
+ "label": "",
186
+ "helper_text": "",
187
+ "option_checked": "Customize Transaction ID",
188
+ "v8n_too_long": "This configuration must fit within 100 characters when JSON-encoded"
189
+ },
190
+ "custom-display-id-config-transaction-journal-entries-enabled": {
191
+ "label": "",
192
+ "helper_text": "",
193
+ "option_checked": "Customize Transaction Journal entry ID"
194
+ },
195
+ "custom-display-id-config-length": {
196
+ "label": "Length",
197
+ "placeholder": "",
198
+ "helper_text": ""
199
+ },
200
+ "custom-display-id-config-start": {
201
+ "label": "Start",
202
+ "placeholder": "",
203
+ "helper_text": ""
204
+ },
205
+ "custom-display-id-config-prefix": {
206
+ "label": "Prefix",
207
+ "placeholder": "",
208
+ "helper_text": ""
209
+ },
210
+ "custom-display-id-config-suffix": {
211
+ "label": "Suffix",
212
+ "placeholder": "",
213
+ "helper_text": ""
214
+ },
215
+ "custom-display-id-config-first-example": "First:",
216
+ "custom-display-id-config-random-example": "Random:",
217
+ "custom-display-id-config-transaction-journal-entries-transaction-separator": {
218
+ "label": "Separator",
219
+ "placeholder": "",
220
+ "helper_text": ""
221
+ },
222
+ "custom-display-id-config-transaction-journal-entries-log-detail-request-types-transaction-authcapture-prefix": {
223
+ "label": "Authorization prefix",
224
+ "placeholder": "",
225
+ "helper_text": ""
226
+ },
227
+ "custom-display-id-config-transaction-journal-entries-log-detail-request-types-transaction-capture-prefix": {
228
+ "label": "Capture prefix",
229
+ "placeholder": "",
230
+ "helper_text": ""
231
+ },
232
+ "custom-display-id-config-transaction-journal-entries-log-detail-request-types-transaction-void-prefix": {
233
+ "label": "Void prefix",
234
+ "placeholder": "",
235
+ "helper_text": ""
236
+ },
237
+ "custom-display-id-config-transaction-journal-entries-log-detail-request-types-transaction-refund-prefix": {
238
+ "label": "Refund prefix",
239
+ "placeholder": "",
240
+ "helper_text": ""
241
+ },
242
+ "custom-display-id-config-transaction-journal-entries-authcapture-example": "When authorized:",
243
+ "custom-display-id-config-transaction-journal-entries-capture-example": "When captured:",
244
+ "custom-display-id-config-transaction-journal-entries-void-example": "When voided:",
245
+ "custom-display-id-config-transaction-journal-entries-refund-example": "When refunded:",
246
+ "webhook-url": {
247
+ "label": "XML webhook endpoint",
248
+ "placeholder": "https://example.com/xml-webhook",
249
+ "helper_text": "Foxy will encrypt order info and POST it to this URL on each purchase as XML. When using this webhook, make sure to configure the encryption key for your store.",
250
+ "v8n_required": "Please enter the XML webhook endpoint",
251
+ "v8n_too_long": "Please shorten this URL to 300 characters or less"
252
+ },
253
+ "webhook-key": {
254
+ "label": "Encryption key",
255
+ "placeholder": "",
256
+ "helper_text": "We'll use this key to encrypt webhook payloads as well as to sign cart links and product forms.",
257
+ "v8n_required": "Encryption key is required when cart validation or legacy webhook is on",
258
+ "v8n_too_long": "Please reduce your encryption key to 200 characters or less"
259
+ },
260
+ "single-sign-on-url": {
261
+ "label": "SSO endpoint",
262
+ "placeholder": "https://example.com/sso",
263
+ "helper_text": "When configured, Foxy will redirect customers to this URL prior to hitting the checkout page. You can use this to validate items or to log customers in via your own auth provider.",
264
+ "v8n_required": "Please enter your SSO endpoint URL",
265
+ "v8n_too_long": "Please shorten this URL to 300 characters or less"
266
+ },
267
+ "unified-order-entry-password": {
268
+ "label": "Unified order entry password",
269
+ "placeholder": "",
270
+ "helper_text": "Set a master password here if you would like to be able to check out as your customers without having to know their password.",
271
+ "v8n_required": "Please reduce your UOE password to 100 characters"
272
+ },
273
+ "store-version-uri": {
274
+ "label": "Version",
275
+ "placeholder": "Defaults to latest",
276
+ "helper_text": "Store version including templates, libraries, payment options and more. It's recommended to upgrade your integration to the newest version as soon as it becomes available."
277
+ },
278
+ "checkout-type": {
279
+ "label": "New accounts",
280
+ "placeholder": "",
281
+ "helper_text": "The preferred configuration of your customer checkout experience, such as defaulting to guest checkout or requiring account creation with each checkout."
282
+ },
283
+ "customer-password-hash-type": {
284
+ "label": "Password hashing method (advanced)",
285
+ "placeholder": "",
286
+ "helper_text": "When saving a customer to Foxy, this is the password hashing method that will be used."
287
+ },
288
+ "customer-password-hash-config": {
289
+ "label": "Password hashing configuration (advanced)",
290
+ "placeholder": "",
291
+ "helper_text": "Configuration settings for the selected hashing method.",
292
+ "v8n_too_long": "Please reduce your configuration settings to 100 characters or less"
293
+ },
294
+ "timestamps": {
295
+ "date_created": "Created on",
296
+ "date_modified": "Last updated",
297
+ "date": "{{value, date}}"
298
+ },
299
+ "spinner": {
300
+ "loading_busy": "Loading",
301
+ "loading_error": "Failed to load"
302
+ },
303
+ "delete": {
304
+ "delete": "Delete",
305
+ "cancel": "Cancel",
306
+ "delete_prompt": "Are you sure you'd like to remove this store? You won't be able to bring it back."
307
+ },
308
+ "create": {
309
+ "create": "Create"
310
+ }
311
+ }