@konnectio/core 4.0.6 → 4.0.9

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