@konnectio/core 4.0.1 → 4.0.3

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 (122) hide show
  1. package/dist/ActionField-1b4171c7.mjs +103 -0
  2. package/dist/ActionField-1b4171c7.mjs.br +0 -0
  3. package/dist/ActionField-97c0c682.js +2 -0
  4. package/dist/ActionField-97c0c682.js.br +0 -0
  5. package/dist/Clickable-eb931b15.mjs +13899 -0
  6. package/dist/Clickable-eb931b15.mjs.br +0 -0
  7. package/dist/Clickable-f57e16ad.js +785 -0
  8. package/dist/Clickable-f57e16ad.js.br +0 -0
  9. package/dist/HotelAvailabilityForm-5750665b.js +2 -0
  10. package/dist/HotelAvailabilityForm-5750665b.js.br +0 -0
  11. package/dist/HotelAvailabilityForm-bab6ef4d.mjs +99 -0
  12. package/dist/HotelAvailabilityForm-bab6ef4d.mjs.br +0 -0
  13. package/dist/NumberField.vue_vue_type_style_index_0_lang-737bf674.mjs +5917 -0
  14. package/dist/NumberField.vue_vue_type_style_index_0_lang-737bf674.mjs.br +0 -0
  15. package/dist/NumberField.vue_vue_type_style_index_0_lang-e642c7f3.js +56 -0
  16. package/dist/NumberField.vue_vue_type_style_index_0_lang-e642c7f3.js.br +0 -0
  17. package/dist/ReCaptchaVuePlugin-36454b0f.js +2 -0
  18. package/dist/ReCaptchaVuePlugin-36454b0f.js.br +0 -0
  19. package/dist/ReCaptchaVuePlugin-e4f378b2.mjs +377 -0
  20. package/dist/ReCaptchaVuePlugin-e4f378b2.mjs.br +0 -0
  21. package/dist/SelectField.vue_vue_type_style_index_0_lang-a3371159.js +57 -0
  22. package/dist/SelectField.vue_vue_type_style_index_0_lang-a3371159.js.br +0 -0
  23. package/dist/SelectField.vue_vue_type_style_index_0_lang-d7f0bf68.mjs +10109 -0
  24. package/dist/SelectField.vue_vue_type_style_index_0_lang-d7f0bf68.mjs.br +0 -0
  25. package/dist/ThankYou-23531d13.js +16 -0
  26. package/dist/ThankYou-23531d13.js.br +0 -0
  27. package/dist/ThankYou-4299d606.mjs +8519 -0
  28. package/dist/ThankYou-4299d606.mjs.br +0 -0
  29. package/dist/_commonjsHelpers-6763f629.js +2 -0
  30. package/dist/_commonjsHelpers-c5d32002.mjs +31 -0
  31. package/dist/applyGiftCard-9847fda1.js +2 -0
  32. package/dist/applyGiftCard-9847fda1.js.br +0 -0
  33. package/dist/applyGiftCard-eb7b85ee.mjs +118 -0
  34. package/dist/applyGiftCard-eb7b85ee.mjs.br +0 -0
  35. package/dist/availability.cjs.js +2 -0
  36. package/dist/availability.cjs.js.br +0 -0
  37. package/dist/availability.es.js +185 -0
  38. package/dist/availability.es.js.br +0 -0
  39. package/dist/event-1b888019.mjs +329 -0
  40. package/dist/event-1b888019.mjs.br +0 -0
  41. package/dist/event-e8e0c6a2.js +2 -0
  42. package/dist/event-e8e0c6a2.js.br +0 -0
  43. package/dist/event.cjs.js +2 -0
  44. package/dist/event.cjs.js.br +0 -0
  45. package/dist/event.es.js +647 -0
  46. package/dist/event.es.js.br +0 -0
  47. package/dist/gift-card-validation.cjs.js +2 -0
  48. package/dist/gift-card-validation.cjs.js.br +0 -0
  49. package/dist/gift-card-validation.es.js +172 -0
  50. package/dist/gift-card-validation.es.js.br +0 -0
  51. package/dist/gift-card.cjs.js +2 -0
  52. package/dist/gift-card.cjs.js.br +0 -0
  53. package/dist/gift-card.es.js +586 -0
  54. package/dist/gift-card.es.js.br +0 -0
  55. package/dist/hotel.cjs.js +20 -0
  56. package/dist/hotel.cjs.js.br +0 -0
  57. package/dist/hotel.es.js +2396 -0
  58. package/dist/hotel.es.js.br +0 -0
  59. package/dist/index-937554a9.mjs +654 -0
  60. package/dist/index-937554a9.mjs.br +0 -0
  61. package/dist/index-aa255eba.js +2 -0
  62. package/dist/index-aa255eba.js.br +0 -0
  63. package/dist/navigation.cjs.js +2 -0
  64. package/dist/navigation.cjs.js.br +0 -0
  65. package/dist/navigation.es.js +59 -0
  66. package/dist/navigation.es.js.br +0 -0
  67. package/dist/payment-3140b25e.js +3 -0
  68. package/dist/payment-3140b25e.js.br +0 -0
  69. package/dist/payment-b79997a8.mjs +8149 -0
  70. package/dist/payment-b79997a8.mjs.br +0 -0
  71. package/dist/polyfill.cjs.js +5 -0
  72. package/dist/polyfill.cjs.js.br +0 -0
  73. package/dist/polyfill.es.js +6766 -0
  74. package/dist/polyfill.es.js.br +0 -0
  75. package/dist/style.css +1 -0
  76. package/dist/style.css.br +0 -0
  77. package/package.json +3 -1
  78. package/dist/admin.js +0 -2
  79. package/dist/admin.js.br +0 -0
  80. package/dist/assets/ActionField-d1b315e3.js +0 -2
  81. package/dist/assets/ActionField-d1b315e3.js.br +0 -0
  82. package/dist/assets/Alert-2cd22061.js +0 -2
  83. package/dist/assets/Alert-2cd22061.js.br +0 -0
  84. package/dist/assets/Clickable-19c9ecdc.js +0 -2
  85. package/dist/assets/Clickable-19c9ecdc.js.br +0 -0
  86. package/dist/assets/GoogleNotice-83805aa2.js +0 -2
  87. package/dist/assets/GoogleNotice-83805aa2.js.br +0 -0
  88. package/dist/assets/HotelAvailabilityForm-53fa6ecb.js +0 -2
  89. package/dist/assets/HotelAvailabilityForm-53fa6ecb.js.br +0 -0
  90. package/dist/assets/Icon-6c933148.js +0 -2
  91. package/dist/assets/Icon-6c933148.js.br +0 -0
  92. package/dist/assets/NumberField.vue_vue_type_style_index_0_lang-9b1b90b2.js +0 -2
  93. package/dist/assets/NumberField.vue_vue_type_style_index_0_lang-9b1b90b2.js.br +0 -0
  94. package/dist/assets/SelectField.vue_vue_type_style_index_0_lang-c5d2bf7d.js +0 -2
  95. package/dist/assets/SelectField.vue_vue_type_style_index_0_lang-c5d2bf7d.js.br +0 -0
  96. package/dist/assets/ThankYou-29820212.js +0 -5
  97. package/dist/assets/ThankYou-29820212.js.br +0 -0
  98. package/dist/assets/applyGiftCard-39571f2e.js +0 -2
  99. package/dist/assets/applyGiftCard-39571f2e.js.br +0 -0
  100. package/dist/assets/event-79c562c0.js +0 -2
  101. package/dist/assets/event-79c562c0.js.br +0 -0
  102. package/dist/assets/payment-a3a9b5dd.js +0 -2
  103. package/dist/assets/payment-a3a9b5dd.js.br +0 -0
  104. package/dist/assets/style.css +0 -1
  105. package/dist/assets/style.css.br +0 -0
  106. package/dist/assets/vendor-65ee0d78.js +0 -889
  107. package/dist/assets/vendor-65ee0d78.js.br +0 -0
  108. package/dist/availability.js +0 -2
  109. package/dist/availability.js.br +0 -0
  110. package/dist/event.js +0 -2
  111. package/dist/event.js.br +0 -0
  112. package/dist/gift-card-validation.js +0 -2
  113. package/dist/gift-card-validation.js.br +0 -0
  114. package/dist/gift-card.js +0 -2
  115. package/dist/gift-card.js.br +0 -0
  116. package/dist/hotel.js +0 -2
  117. package/dist/hotel.js.br +0 -0
  118. package/dist/manifest.json +0 -231
  119. package/dist/manifest.json.br +0 -0
  120. package/dist/navigation.js +0 -2
  121. package/dist/navigation.js.br +0 -0
  122. package/dist/polyfill.js +0 -2
@@ -0,0 +1,586 @@
1
+ import { r as k, f as S, d as se, o as u, h as W, w as x, b as s, c as b, a as m, u as e, C as D, k as C, n as de, s as fe, g as ge, y as ve, t as ae, z as L, A as O, i as B, F as be, v as he, L as oe, B as le, S as ye, p as ke, l as Ce, _ as _e, m as Fe } from "./Clickable-eb931b15.mjs";
2
+ import { o as Ve, b as Z, s as X, k as ue, G as y, p as J, v as M, S as Q, r as ce, t as Be, w as Se, R as te, u as pe, I as Pe, _ as ze, d as Te, c as we, a as Re, i as $e } from "./NumberField.vue_vue_type_style_index_0_lang-737bf674.mjs";
3
+ import { P as Ee, C as ne, _ as Ue, S as Ie, i as qe } from "./index-937554a9.mjs";
4
+ import { u as Le } from "./ReCaptchaVuePlugin-e4f378b2.mjs";
5
+ import { T as j, _ as Me } from "./SelectField.vue_vue_type_style_index_0_lang-d7f0bf68.mjs";
6
+ import "./_commonjsHelpers-c5d32002.mjs";
7
+ const re = Ve("giftCard", () => {
8
+ const { display: f } = Z(), { bearerToken: o, metaData: a } = X(ue()), l = k(y.InitialState), P = J("freshBookingName", "", void 0, { serializer: Q.string }), p = J("freshBookingEmail", "", void 0, { serializer: Q.string }), g = J("freshBookingPhone", "", void 0, { serializer: Q.string }), _ = k(""), z = k(1), $ = k(!0), U = k(""), h = k({
9
+ base64: "",
10
+ type: "",
11
+ name: ""
12
+ }), n = k(void 0), d = k(0), v = k(!1), T = k(0), F = S(() => l.value === y.InitialState || l.value === y.WaitingForResponse), w = S(() => l.value === y.ReadyToPay), I = S(() => l.value === y.PaymentSuccess), V = S(() => {
13
+ const c = {
14
+ 1: {
15
+ label: M.t("giftCard.hotelType"),
16
+ data: []
17
+ },
18
+ 2: {
19
+ label: M.t("giftCard.restaurantType"),
20
+ data: []
21
+ }
22
+ }, r = a.value.places;
23
+ return r && r.forEach((t) => {
24
+ c[t.placeType].data.push(t);
25
+ }), Object.fromEntries(
26
+ Object.entries(c).filter(([, t]) => t.data.length > 0)
27
+ );
28
+ }), G = S(() => T.value !== 0), R = S(() => {
29
+ let c;
30
+ if (G.value)
31
+ c = V.value[T.value].data[0];
32
+ else if (d.value !== 0) {
33
+ const r = n.value, t = V.value[d.value].data;
34
+ t.length === 1 ? c = t[0] : r !== void 0 && t.forEach((q) => {
35
+ String(q.id) === String(r) && (c = q);
36
+ });
37
+ }
38
+ return c;
39
+ }), A = S(() => !(!P.value || !p.value || !(g.value.length >= 5) || !_.value || R.value === void 0)), N = S(() => !(l.value === y.InitialState && v.value)), K = S(() => !!(l.value === y.WaitingForResponse && v.value));
40
+ async function Y() {
41
+ l.value = y.WaitingForResponse, v.value = !0, await ce.post("http://localhost:91/api/gift-card/create", {
42
+ termsOfserviceURL: "https://freshbooking.dk",
43
+ checkoutUrl: "https://freshbooking.dk",
44
+ currencyID: a.value.currency.id,
45
+ language: Be(),
46
+ amount: _.value,
47
+ quantity: z.value,
48
+ freeText: U.value,
49
+ showPrice: $.value,
50
+ contactName: P.value,
51
+ contactEmail: p.value,
52
+ contactPhone: g.value,
53
+ imageBase64: Se(h.value.base64),
54
+ imageName: h.value.name,
55
+ imageFormat: h.value.type,
56
+ placeType: R.value ? R.value.placeType : void 0,
57
+ placeID: R.value ? R.value.id : void 0
58
+ }, {
59
+ headers: {
60
+ Authorization: o.value,
61
+ Accept: "application/json",
62
+ "Fresh-Booking-Ver": "4.0.3"
63
+ }
64
+ }).then((c) => {
65
+ if (v.value = !1, c.data.easyPayment) {
66
+ l.value = y.ReadyToPay;
67
+ const r = new Reepay.EmbeddedCheckout(
68
+ c.data.easyPayment.paymentID,
69
+ { html_element: "fresh-booking-gift-card-payment" }
70
+ );
71
+ r.addEventHandler(te.Accept, () => {
72
+ l.value = y.PaymentSuccess, f({
73
+ message: M.t("alert.success.giftCardOrdered"),
74
+ type: "success"
75
+ });
76
+ }), r.addEventHandler(te.Error, () => {
77
+ f({
78
+ message: M.t("booking.other.errorMessage"),
79
+ type: "warning"
80
+ });
81
+ });
82
+ } else
83
+ l.value = y.InitialState, f({
84
+ message: `${M.t("booking.other.errorMessage")} (HTTP: ${c.status})`,
85
+ type: "warning"
86
+ });
87
+ });
88
+ }
89
+ function H(c) {
90
+ T.value = c;
91
+ }
92
+ return {
93
+ moduleState: l,
94
+ name: P,
95
+ email: p,
96
+ phone: g,
97
+ value: _,
98
+ remark: U,
99
+ showValue: $,
100
+ quantity: z,
101
+ media: h,
102
+ placeId: n,
103
+ placeType: d,
104
+ showFormPage: F,
105
+ showPaymentPage: w,
106
+ showConfirmationPage: I,
107
+ places: V,
108
+ hasFilledForm: A,
109
+ hasForcedPlaceType: G,
110
+ isWaitingForResponse: K,
111
+ isMetaDataAvailable: N,
112
+ orderGiftCard: Y,
113
+ initialize: H
114
+ };
115
+ }), We = { class: "media-selector" }, De = ["accept"], Ge = { class: "media-selector-wrapper" }, Ae = { class: "media-selector-tools" }, Ne = { key: 0 }, He = { key: 1 }, Oe = { key: 2 }, je = ["src"], xe = /* @__PURE__ */ se({
116
+ __name: "MediaSelector",
117
+ props: {
118
+ modelValue: {},
119
+ validation: { default: "image/*" },
120
+ iconColor: { default: "#000" },
121
+ label: {},
122
+ required: { type: Boolean, default: !1 }
123
+ },
124
+ emits: ["update:modelValue"],
125
+ setup(f, { emit: o }) {
126
+ const a = f, { t: l } = pe(), { display: P } = Z(), p = k(), g = S(() => a.modelValue.base64 !== "");
127
+ function _(n) {
128
+ o("update:modelValue", n);
129
+ }
130
+ function z() {
131
+ _({
132
+ base64: "",
133
+ name: "",
134
+ type: ""
135
+ }), p.value && (p.value.value = "");
136
+ }
137
+ function $() {
138
+ p.value && p.value.click();
139
+ }
140
+ function U(n, d) {
141
+ const [v, T] = [n.name, n.type], F = new FileReader();
142
+ F.onload = function(w) {
143
+ if (w.target) {
144
+ const I = w.target.result;
145
+ d({ base64: I, name: v, type: T });
146
+ } else
147
+ P({
148
+ message: l("imageUploadError"),
149
+ type: "error"
150
+ });
151
+ }, F.readAsDataURL(n);
152
+ }
153
+ async function h() {
154
+ let n;
155
+ (n = p.value.files) instanceof FileList && U(n[0], _);
156
+ }
157
+ return (n, d) => (u(), W(Pe, {
158
+ label: n.label,
159
+ required: n.required,
160
+ type: "media"
161
+ }, {
162
+ default: x(() => [
163
+ s("div", We, [
164
+ s("input", {
165
+ ref_key: "fileInput",
166
+ ref: p,
167
+ type: "file",
168
+ class: "hidden",
169
+ accept: n.validation,
170
+ single: "",
171
+ onChange: d[0] || (d[0] = (v) => h())
172
+ }, null, 40, De),
173
+ s("div", Ge, [
174
+ s("ul", Ae, [
175
+ g.value ? C("", !0) : (u(), b("li", Ne, [
176
+ m(D, {
177
+ label: e(l)("uploadFile"),
178
+ type: "button",
179
+ icon: "upload",
180
+ "icon-color": n.iconColor,
181
+ onClickEvent: d[1] || (d[1] = (v) => $())
182
+ }, null, 8, ["label", "icon-color"])
183
+ ])),
184
+ g.value ? (u(), b("li", He, [
185
+ m(D, {
186
+ label: e(l)("replaceFile"),
187
+ type: "button",
188
+ icon: "repeat-alt",
189
+ "icon-color": n.iconColor,
190
+ onClickEvent: d[2] || (d[2] = (v) => $())
191
+ }, null, 8, ["label", "icon-color"])
192
+ ])) : C("", !0),
193
+ g.value ? (u(), b("li", Oe, [
194
+ m(D, {
195
+ label: e(l)("removeFile"),
196
+ type: "button",
197
+ icon: "trash-alt",
198
+ "icon-color": n.iconColor,
199
+ onClickEvent: d[3] || (d[3] = (v) => z())
200
+ }, null, 8, ["label", "icon-color"])
201
+ ])) : C("", !0)
202
+ ]),
203
+ s("div", {
204
+ class: de([
205
+ "media-selector-previewer",
206
+ { opened: g.value }
207
+ ])
208
+ }, [
209
+ n.modelValue ? (u(), b("img", {
210
+ key: 0,
211
+ src: n.modelValue.base64
212
+ }, null, 8, je)) : C("", !0)
213
+ ], 2)
214
+ ])
215
+ ])
216
+ ]),
217
+ _: 1
218
+ }, 8, ["label", "required"]));
219
+ }
220
+ });
221
+ function ie(f) {
222
+ const o = f;
223
+ o.__i18n = o.__i18n || [], o.__i18n.push({
224
+ locale: "",
225
+ resource: {
226
+ da: {
227
+ uploadFile: (a) => {
228
+ const { normalize: l } = a;
229
+ return l(["Upload billede"]);
230
+ },
231
+ removeFile: (a) => {
232
+ const { normalize: l } = a;
233
+ return l(["Fjern billede"]);
234
+ },
235
+ replaceFile: (a) => {
236
+ const { normalize: l } = a;
237
+ return l(["Ersat billede"]);
238
+ },
239
+ imageUploadError: (a) => {
240
+ const { normalize: l } = a;
241
+ return l(["Der skete en fejl under billede upload!"]);
242
+ }
243
+ },
244
+ en: {
245
+ uploadFile: (a) => {
246
+ const { normalize: l } = a;
247
+ return l(["Upload image"]);
248
+ },
249
+ removeFile: (a) => {
250
+ const { normalize: l } = a;
251
+ return l(["Remove image"]);
252
+ },
253
+ replaceFile: (a) => {
254
+ const { normalize: l } = a;
255
+ return l(["Replace image"]);
256
+ },
257
+ imageUploadError: (a) => {
258
+ const { normalize: l } = a;
259
+ return l(["An error occurred under image upload!"]);
260
+ }
261
+ }
262
+ }
263
+ });
264
+ }
265
+ typeof ie == "function" && ie(xe);
266
+ const Ke = (f) => (ke("data-v-10b51e8f"), f = f(), Ce(), f), Ye = {
267
+ key: 0,
268
+ id: "fresh-booking-gift-card-wrapper"
269
+ }, Je = { id: "fresh-booking-gift-card-title" }, Qe = { id: "fresh-booking-gift-card-content" }, Xe = { id: "fresh-booking-gift-card-payment" }, Ze = ["innerHTML"], ea = { key: 0 }, aa = {
270
+ key: 0,
271
+ id: "fresh-booking-select-place-type"
272
+ }, oa = {
273
+ class: /* @__PURE__ */ de(["fresh-booking-label", "required"])
274
+ }, la = { id: "fresh-booking-select-place-type-input" }, ta = ["innerHTML"], na = {
275
+ key: 0,
276
+ id: "fresh-booking-gift-card-order"
277
+ }, ra = { class: "fresh-booking-panel" }, ia = {
278
+ key: 1,
279
+ id: "fresh-booking-gift-card-remarks"
280
+ }, sa = {
281
+ key: 2,
282
+ id: "fresh-booking-gift-card-order-minimal",
283
+ "sticky-side": "bottom"
284
+ }, da = { id: "fresh-booking-gift-card-recaptcha" }, ua = /* @__PURE__ */ Ke(() => /* @__PURE__ */ s("span", null, "Loading...", -1)), ca = /* @__PURE__ */ se({
285
+ __name: "GiftCard",
286
+ props: {
287
+ accessToken: {},
288
+ accentColor: {},
289
+ buttonBackground: {},
290
+ buttonBorder: {},
291
+ buttonBorderRadius: {},
292
+ buttonColor: {},
293
+ buttonFontFamily: {},
294
+ buttonFontSize: {},
295
+ buttonTextTransform: {},
296
+ buttonFontWeight: {},
297
+ fontColor: {},
298
+ fontFamily: {},
299
+ fontSize: {},
300
+ fontWeight: {},
301
+ grayColor: {},
302
+ headerColor: {},
303
+ headerFontSize: {},
304
+ inputBackground: {},
305
+ inputBorder: {},
306
+ inputBorderRadius: {},
307
+ inputFontColor: {},
308
+ labelFontWeight: {},
309
+ labelPadding: {},
310
+ layout: {},
311
+ loadingColor: {},
312
+ panelBackground: {},
313
+ panelBorder: {},
314
+ panelBorderRadius: {},
315
+ panelPadding: {},
316
+ placeType: {},
317
+ successColor: {}
318
+ },
319
+ setup(f) {
320
+ const o = f, { t: a } = pe(), {
321
+ name: l,
322
+ email: P,
323
+ phone: p,
324
+ value: g,
325
+ remark: _,
326
+ showValue: z,
327
+ quantity: $,
328
+ media: U,
329
+ placeId: h,
330
+ placeType: n,
331
+ showFormPage: d,
332
+ showPaymentPage: v,
333
+ showConfirmationPage: T,
334
+ places: F,
335
+ hasFilledForm: w,
336
+ hasForcedPlaceType: I,
337
+ isWaitingForResponse: V,
338
+ isMetaDataAvailable: G
339
+ } = X(re()), { initialize: R, orderGiftCard: A } = re(), { isRecaptchaEnabled: N, currency: K } = X(ue()), { display: Y } = Z();
340
+ async function H() {
341
+ const r = Le();
342
+ if (N.value && r) {
343
+ await r.recaptchaLoaded();
344
+ const t = await r.executeRecaptcha("create_gift_card");
345
+ (await ce.get(`/?rest_route=/freshcase-octopus/v1/recaptcha/${t}`)).data.success ? await A() : Y({
346
+ message: a("alert.error.robot"),
347
+ type: "error"
348
+ });
349
+ } else
350
+ await A();
351
+ }
352
+ fe(n, () => {
353
+ h.value = void 0;
354
+ }), ge(() => {
355
+ R(parseInt(o.placeType));
356
+ });
357
+ const c = {
358
+ "--accentColor": o.accentColor,
359
+ "--buttonBackground": o.buttonBackground,
360
+ "--buttonBorder": o.buttonBorder,
361
+ "--buttonBorderRadius": o.buttonBorderRadius,
362
+ "--buttonFontFamily": o.buttonFontFamily,
363
+ "--buttonColor": o.buttonColor,
364
+ "--buttonFontSize": o.buttonFontSize,
365
+ "--buttonTextTransform": o.buttonTextTransform,
366
+ "--buttonFontWeight": o.buttonFontWeight,
367
+ "--fontColor": o.fontColor,
368
+ "--fontFamily": o.fontFamily,
369
+ "--fontSize": o.fontSize,
370
+ "--fontWeight": o.fontWeight,
371
+ "--grayColor": o.grayColor,
372
+ "--headerColor": o.headerColor,
373
+ "--headerFontSize": o.headerFontSize,
374
+ "--inputBackground": o.inputBackground,
375
+ "--inputBorder": o.inputBorder,
376
+ "--inputBorderRadius": o.inputBorderRadius,
377
+ "--inputFontColor": o.inputFontColor,
378
+ "--labelFontWeight": o.labelFontWeight,
379
+ "--labelPadding": o.labelPadding,
380
+ "--loadingColor": o.loadingColor,
381
+ "--panelBackground": o.panelBackground,
382
+ "--panelBorder": o.panelBorder,
383
+ "--panelBorderRadius": o.panelBorderRadius,
384
+ "--panelPadding": o.panelPadding,
385
+ "--successColor": o.successColor
386
+ };
387
+ return (r, t) => {
388
+ const q = ve("sticky");
389
+ return u(), W(ye, null, {
390
+ default: x(() => [
391
+ m(ze, {
392
+ id: "fresh-booking-gift-card-module",
393
+ class: "fresh-booking-app",
394
+ type: "gift-card",
395
+ "access-token": r.accessToken,
396
+ "data-layout": r.layout,
397
+ style: c,
398
+ "sticky-container": ""
399
+ }, {
400
+ default: x(() => [
401
+ e(G) ? (u(), b("div", Ye, [
402
+ s("h4", Je, [
403
+ s("span", null, ae(e(a)("giftCard.title")), 1)
404
+ ]),
405
+ s("div", Qe, [
406
+ L(s("div", Xe, null, 512), [
407
+ [O, e(v)]
408
+ ]),
409
+ L(s("div", null, [
410
+ s("p", {
411
+ id: "fresh-booking-gift-card-description",
412
+ innerHTML: e(a)("giftCard.description")
413
+ }, null, 8, Ze),
414
+ s("form", null, [
415
+ m(j, {
416
+ modelValue: e(l),
417
+ "onUpdate:modelValue": t[0] || (t[0] = (i) => B(l) ? l.value = i : null),
418
+ type: "text",
419
+ name: "name",
420
+ autocomplete: "name",
421
+ label: e(a)("giftCard.name"),
422
+ icon: "user-alt",
423
+ "icon-color": r.accentColor,
424
+ placeholder: e(a)("giftCard.namePlaceholder"),
425
+ required: ""
426
+ }, null, 8, ["modelValue", "label", "icon-color", "placeholder"]),
427
+ m(j, {
428
+ modelValue: e(P),
429
+ "onUpdate:modelValue": t[1] || (t[1] = (i) => B(P) ? P.value = i : null),
430
+ type: "email",
431
+ name: "email",
432
+ autocomplete: "email",
433
+ label: e(a)("giftCard.email"),
434
+ icon: "at",
435
+ "icon-color": r.accentColor,
436
+ placeholder: e(a)("giftCard.emailPlaceholder"),
437
+ required: ""
438
+ }, null, 8, ["modelValue", "label", "icon-color", "placeholder"]),
439
+ m(Ee, {
440
+ modelValue: e(p),
441
+ "onUpdate:modelValue": t[2] || (t[2] = (i) => B(p) ? p.value = i : null),
442
+ icon: "phone-office",
443
+ "icon-color": r.accentColor,
444
+ label: e(a)("giftCard.phone"),
445
+ placeholder: e(a)("giftCard.phonePlaceholder"),
446
+ required: ""
447
+ }, null, 8, ["modelValue", "icon-color", "label", "placeholder"]),
448
+ e(I) ? C("", !0) : (u(), b("div", ea, [
449
+ e(F) ? (u(), b("div", aa, [
450
+ s("label", oa, [
451
+ s("span", null, ae(e(a)("giftCard.selectType")), 1)
452
+ ]),
453
+ s("div", la, [
454
+ s("ul", null, [
455
+ (u(!0), b(be, null, he(e(F), (i, ee) => (u(), b("li", { key: ee }, [
456
+ m(ne, {
457
+ modelValue: e(n),
458
+ "onUpdate:modelValue": t[3] || (t[3] = (me) => B(n) ? n.value = me : null),
459
+ type: "radio",
460
+ name: "placeType",
461
+ val: ee,
462
+ label: i.label
463
+ }, null, 8, ["modelValue", "val", "label"])
464
+ ]))), 128))
465
+ ]),
466
+ e(F)[e(n)] && e(F)[e(n)].data.length > 1 ? (u(), W(Me, {
467
+ key: 0,
468
+ modelValue: e(h),
469
+ "onUpdate:modelValue": t[4] || (t[4] = (i) => B(h) ? h.value = i : null),
470
+ placeholder: e(a)("giftCard.selectPlacePlaceholder"),
471
+ options: e(F)[e(n)].data,
472
+ labelKey: "name",
473
+ valueKey: "id",
474
+ required: ""
475
+ }, null, 8, ["modelValue", "placeholder", "options"])) : C("", !0)
476
+ ])
477
+ ])) : (u(), W(oe, {
478
+ key: 1,
479
+ color: r.loadingColor
480
+ }, null, 8, ["color"]))
481
+ ])),
482
+ m(j, {
483
+ modelValue: e(g),
484
+ "onUpdate:modelValue": t[5] || (t[5] = (i) => B(g) ? g.value = i : null),
485
+ type: "number",
486
+ name: "value",
487
+ label: e(a)("giftCard.value"),
488
+ icon: "money-bill",
489
+ "icon-color": r.accentColor,
490
+ placeholder: e(a)("giftCard.valuePlaceholder"),
491
+ suffix: e(K),
492
+ required: ""
493
+ }, null, 8, ["modelValue", "label", "icon-color", "placeholder", "suffix"]),
494
+ m(ne, {
495
+ modelValue: e(z),
496
+ "onUpdate:modelValue": t[6] || (t[6] = (i) => B(z) ? z.value = i : null),
497
+ type: "checkbox",
498
+ name: "showValue",
499
+ label: e(a)("giftCard.showValue"),
500
+ checked: e(z)
501
+ }, null, 8, ["modelValue", "label", "checked"]),
502
+ C("", !0),
503
+ C("", !0)
504
+ ])
505
+ ], 512), [
506
+ [O, e(d)]
507
+ ]),
508
+ L(s("div", null, [
509
+ s("div", {
510
+ innerHTML: e(a)("giftCard.thankYou")
511
+ }, null, 8, ta)
512
+ ], 512), [
513
+ [O, e(T)]
514
+ ])
515
+ ]),
516
+ r.layout !== "minimal" && e(d) ? (u(), b("div", na, [
517
+ s("div", ra, [
518
+ m(D, {
519
+ label: e(a)("giftCard.orderGiftCard"),
520
+ style: le({
521
+ background: r.successColor
522
+ }),
523
+ "full-width": !0,
524
+ disabled: !e(w),
525
+ "is-loading": e(V),
526
+ "onUpdate:isLoading": t[9] || (t[9] = (i) => B(V) ? V.value = i : null),
527
+ onClickEvent: H
528
+ }, null, 8, ["label", "style", "disabled", "is-loading"])
529
+ ])
530
+ ])) : C("", !0),
531
+ e(d) ? (u(), b("div", ia, [
532
+ m(j, {
533
+ modelValue: e(_),
534
+ "onUpdate:modelValue": t[10] || (t[10] = (i) => B(_) ? _.value = i : null),
535
+ type: "textarea",
536
+ name: "remark",
537
+ label: e(a)("giftCard.remark"),
538
+ icon: "info-circle",
539
+ "icon-color": r.accentColor,
540
+ placeholder: e(a)("giftCard.remarkPlaceholder")
541
+ }, null, 8, ["modelValue", "label", "icon-color", "placeholder"])
542
+ ])) : C("", !0),
543
+ e(d) ? L((u(), b("div", sa, [
544
+ m(D, {
545
+ label: e(a)("giftCard.orderGiftCard"),
546
+ style: le({
547
+ background: r.successColor
548
+ }),
549
+ "full-width": !0,
550
+ disabled: !e(w),
551
+ "data-test": "orderGiftCard",
552
+ "is-loading": e(V),
553
+ "onUpdate:isLoading": t[11] || (t[11] = (i) => B(V) ? V.value = i : null),
554
+ onClickEvent: H
555
+ }, null, 8, ["label", "style", "disabled", "is-loading"]),
556
+ L(s("div", da, [
557
+ m(Ue)
558
+ ], 512), [
559
+ [O, e(N)]
560
+ ])
561
+ ])), [
562
+ [q]
563
+ ]) : C("", !0)
564
+ ])) : (u(), W(oe, { key: 1 }))
565
+ ]),
566
+ _: 1
567
+ }, 8, ["access-token", "data-layout"])
568
+ ]),
569
+ fallback: x(() => [
570
+ ua
571
+ ]),
572
+ _: 1
573
+ });
574
+ };
575
+ }
576
+ });
577
+ const pa = /* @__PURE__ */ _e(ca, [["__scopeId", "data-v-10b51e8f"]]);
578
+ process.env.NODE_ENV === "production" && Te.flare.light();
579
+ const ma = we(), E = Fe({ components: { GiftCard: pa } });
580
+ E.use(Re.flareVue);
581
+ E.use(ma);
582
+ E.use($e);
583
+ E.use(Ie);
584
+ E.use(qe, { bootstrap: !1 });
585
+ E.mount("#fresh-booking-gift-card-app");
586
+ //# sourceMappingURL=gift-card.es.js.map
Binary file