@revolugo/elements 7.11.2 → 7.12.0-alpha.0

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 (58) hide show
  1. package/dist/index.es.min.js +1 -1
  2. package/dist/index.es.min.js.map +1 -1
  3. package/dist/index.min.js +1 -1
  4. package/dist/index.min.js.map +1 -1
  5. package/dist/revolugo.min.js +65 -66
  6. package/package.json +5 -5
  7. package/dist/css/fonts.css +0 -1
  8. package/dist/css/revolugo.bookingpaymentform.CekI3oIR.css +0 -1
  9. package/dist/css/revolugo.creditcardstripeform.CmxpInfL.css +0 -1
  10. package/dist/css/revolugo.index.5WWmkTtd.css +0 -1
  11. package/dist/css/revolugo.preferencesmenu.DwotHb97.css +0 -1
  12. package/dist/css/revolugo.revolugoelements.D3jgSljg.css +0 -1
  13. package/dist/css/revolugo.storybooktoolbar.d_cxquq9.css +0 -1
  14. package/dist/css/revolugo.ui.sAxjrsi6.css +0 -1
  15. package/dist/css/revolugo.vtoolbar.BS4p23lZ.css +0 -1
  16. package/dist/css/revolugo.webcomponentwrapper.LxbCIx-k.css +0 -1
  17. package/dist/revolugo.banktransferdetails.ql5QYmUR.min.js +0 -24
  18. package/dist/revolugo.bookingdetailssidebar.CVi0BqUW.min.js +0 -25
  19. package/dist/revolugo.bookingmanager.DP-s7JZu.min.js +0 -24
  20. package/dist/revolugo.bookingpaymentform.BJCfZ_Kk.min.js +0 -5158
  21. package/dist/revolugo.cancellationpoliciesbadge.LvXxw6Uw.min.js +0 -24
  22. package/dist/revolugo.cancellationpolicieslist.Dac8qxMA.min.js +0 -24
  23. package/dist/revolugo.creditcardstripeform.Ba6BWtYz.min.js +0 -2787
  24. package/dist/revolugo.creditcardstripeform.DCLuK09J.min.js +0 -25
  25. package/dist/revolugo.creditcardstripeform.props.C4lAZ1a1.min.js +0 -35
  26. package/dist/revolugo.currencypickerbtn.D5at0qzh.min.js +0 -25
  27. package/dist/revolugo.dist.CLV0MHMA.min.js +0 -58
  28. package/dist/revolugo.fastbookingflow.BBcEUXA0.min.js +0 -34
  29. package/dist/revolugo.framework.k0uaz58D.min.js +0 -775
  30. package/dist/revolugo.fullbookingflow.CbcxEJ_p.min.js +0 -24
  31. package/dist/revolugo.hoteldescriptionview.BhOkhZrl.min.js +0 -24
  32. package/dist/revolugo.hotelofferlist.DwP_q7sh.min.js +0 -24
  33. package/dist/revolugo.hoteloffersearchmenu.D2nQIXps.min.js +0 -24
  34. package/dist/revolugo.hoteloffersmap.BzJXBIZu.min.js +0 -24
  35. package/dist/revolugo.hoteloffersview.DbkrpmcL.min.js +0 -18
  36. package/dist/revolugo.hotelroomofferlist.BDmMQUXg.min.js +0 -24
  37. package/dist/revolugo.hotelroomoffersbookingflow.BTX5vw3U.min.js +0 -24
  38. package/dist/revolugo.hotelroomoffersearchmenu.Byc3rzga.min.js +0 -24
  39. package/dist/revolugo.hotelroomoffersview.DpCNFUpm.min.js +0 -24
  40. package/dist/revolugo.langpickerbtn.BYYCD3xg.min.js +0 -25
  41. package/dist/revolugo.leaflet-src.CtLpIV-y.min.js +0 -4665
  42. package/dist/revolugo.leaflet-src.esm.DzYPfo81.min.js +0 -4782
  43. package/dist/revolugo.marker-icon-2x.BBE8dvJp.min.js +0 -8
  44. package/dist/revolugo.marker-icon.VORuIHX9.min.js +0 -8
  45. package/dist/revolugo.marker-shadow.BcaYGGj2.min.js +0 -8
  46. package/dist/revolugo.prebookform.Buadq4bi.min.js +0 -24
  47. package/dist/revolugo.preferencesmenu.HRS1NoUW.min.js +0 -958
  48. package/dist/revolugo.revolugo-config.BhnbJkHY.min.js +0 -6492
  49. package/dist/revolugo.revolugoelements.DqTSs2x-.min.js +0 -34409
  50. package/dist/revolugo.rolldown-runtime.C2H8viMH.min.js +0 -25
  51. package/dist/revolugo.roominglisteditor.C7NMBMQu.min.js +0 -24
  52. package/dist/revolugo.storybooktoolbar.DuOgD1zs.min.js +0 -996
  53. package/dist/revolugo.termsandconditions.Dhn9Gh19.min.js +0 -24
  54. package/dist/revolugo.theme.CWCtKizJ.min.js +0 -17277
  55. package/dist/revolugo.ui.CwfYE_fW.min.js +0 -57666
  56. package/dist/revolugo.vtoolbar.CrASDlFx.min.js +0 -145
  57. package/dist/revolugo.webcomponentwrapper.DYBPZW1v.min.js +0 -256
  58. package/dist/revolugo2.preferencesmenu.B_DB1N90.min.js +0 -24
@@ -1,996 +0,0 @@
1
- import { $n as ye, $t as Ee, Br as be, Dn as _e, Dr as $, It as ke, Kn as Se, Mn as ie, Mt as Ce, Nr as ae, Sr as U, Tr as r, Ur as I, br as ne, fi as C, fn as G, fr as q, mr as J, pi as we, pn as Q, pr as oe, qr as D, ri as u, vi as V, vr as F, wi as Ae, wr as S, yr as Le, zt as xe } from "./revolugo.theme.CWCtKizJ.min.js";
2
- import { n as Oe } from "./revolugo.revolugo-config.BhnbJkHY.min.js";
3
- import { $t as re, D as B, F as se, N as Ke, Rt as X, T as le, Wt as H, en as N, et as de, mt as Ve, nn as Y, ot as ue, q as x, rt as ce, tn as pe } from "./revolugo.ui.CwfYE_fW.min.js";
4
- import { t as Ie } from "./revolugo.webcomponentwrapper.DYBPZW1v.min.js";
5
- import { t as Me } from "./revolugo.dist.CLV0MHMA.min.js";
6
- function he(e) {
7
- try {
8
- if (typeof document < "u") {
9
- window.REVOLUGO_ELEMENTS_STYLES = window.REVOLUGO_ELEMENTS_STYLES || {
10
- sheets: [],
11
- components: []
12
- };
13
- const t = import.meta.url, s = t.slice(0, t.lastIndexOf("/") + 1) + e;
14
- window.REVOLUGO_ELEMENTS_STYLES.sheets.push(s);
15
- for (const n of REVOLUGO_ELEMENTS_STYLES.components)
16
- n(s);
17
- if (e.indexOf("fonts") >= 0) {
18
- const n = document.createElement("link");
19
- n.rel = "stylesheet", linK.href = s, document.head.appendChild(n);
20
- }
21
- }
22
- } catch (t) {
23
- console.error("[revolugo-elements] ", t);
24
- }
25
- }
26
- var _ = {}, Z;
27
- function Te() {
28
- if (Z) return _;
29
- Z = 1, Object.defineProperty(_, "__esModule", { value: !0 }), _.parseCookie = E, _.parse = E, _.stringifyCookie = c, _.stringifySetCookie = O, _.serialize = O, _.parseSetCookie = v, _.stringifySetCookie = O, _.serialize = O;
30
- const e = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/, t = /^[\u0021-\u003A\u003C-\u007E]*$/, s = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i, n = /^[\u0020-\u003A\u003D-\u007E]*$/, g = /^-?\d+$/, y = Object.prototype.toString, f = /* @__PURE__ */ (() => {
31
- const a = function() {
32
- };
33
- return a.prototype = /* @__PURE__ */ Object.create(null), a;
34
- })();
35
- function E(a, p) {
36
- const m = new f(), i = a.length;
37
- if (i < 2) return m;
38
- const o = p?.decode || A;
39
- let l = 0;
40
- do {
41
- const d = K(a, l, i);
42
- if (d === -1) break;
43
- const k = w(a, l, i);
44
- if (d > k) {
45
- l = a.lastIndexOf(";", d - 1) + 1;
46
- continue;
47
- }
48
- const L = h(a, l, d);
49
- m[L] === void 0 && (m[L] = o(h(a, d + 1, k))), l = k + 1;
50
- } while (l < i);
51
- return m;
52
- }
53
- function c(a, p) {
54
- const m = p?.encode || encodeURIComponent, i = [];
55
- for (const o of Object.keys(a)) {
56
- const l = a[o];
57
- if (l === void 0) continue;
58
- if (!e.test(o)) throw new TypeError(`cookie name is invalid: ${o}`);
59
- const d = m(l);
60
- if (!t.test(d)) throw new TypeError(`cookie val is invalid: ${l}`);
61
- i.push(`${o}=${d}`);
62
- }
63
- return i.join("; ");
64
- }
65
- function O(a, p, m) {
66
- const i = typeof a == "object" ? a : {
67
- ...m,
68
- name: a,
69
- value: String(p)
70
- }, o = (typeof p == "object" ? p : m)?.encode || encodeURIComponent;
71
- if (!e.test(i.name)) throw new TypeError(`argument name is invalid: ${i.name}`);
72
- const l = i.value ? o(i.value) : "";
73
- if (!t.test(l)) throw new TypeError(`argument val is invalid: ${i.value}`);
74
- let d = i.name + "=" + l;
75
- if (i.maxAge !== void 0) {
76
- if (!Number.isInteger(i.maxAge)) throw new TypeError(`option maxAge is invalid: ${i.maxAge}`);
77
- d += "; Max-Age=" + i.maxAge;
78
- }
79
- if (i.domain) {
80
- if (!s.test(i.domain)) throw new TypeError(`option domain is invalid: ${i.domain}`);
81
- d += "; Domain=" + i.domain;
82
- }
83
- if (i.path) {
84
- if (!n.test(i.path)) throw new TypeError(`option path is invalid: ${i.path}`);
85
- d += "; Path=" + i.path;
86
- }
87
- if (i.expires) {
88
- if (!j(i.expires) || !Number.isFinite(i.expires.valueOf())) throw new TypeError(`option expires is invalid: ${i.expires}`);
89
- d += "; Expires=" + i.expires.toUTCString();
90
- }
91
- if (i.httpOnly && (d += "; HttpOnly"), i.secure && (d += "; Secure"), i.partitioned && (d += "; Partitioned"), i.priority) switch (typeof i.priority == "string" ? i.priority.toLowerCase() : void 0) {
92
- case "low":
93
- d += "; Priority=Low";
94
- break;
95
- case "medium":
96
- d += "; Priority=Medium";
97
- break;
98
- case "high":
99
- d += "; Priority=High";
100
- break;
101
- default:
102
- throw new TypeError(`option priority is invalid: ${i.priority}`);
103
- }
104
- if (i.sameSite) switch (typeof i.sameSite == "string" ? i.sameSite.toLowerCase() : i.sameSite) {
105
- case !0:
106
- case "strict":
107
- d += "; SameSite=Strict";
108
- break;
109
- case "lax":
110
- d += "; SameSite=Lax";
111
- break;
112
- case "none":
113
- d += "; SameSite=None";
114
- break;
115
- default:
116
- throw new TypeError(`option sameSite is invalid: ${i.sameSite}`);
117
- }
118
- return d;
119
- }
120
- function v(a, p) {
121
- const m = p?.decode || A, i = a.length, o = w(a, 0, i), l = K(a, 0, o), d = l === -1 ? {
122
- name: "",
123
- value: m(h(a, 0, o))
124
- } : {
125
- name: h(a, 0, l),
126
- value: m(h(a, l + 1, o))
127
- };
128
- let k = o + 1;
129
- for (; k < i; ) {
130
- const L = w(a, k, i), M = K(a, k, L), ge = M === -1 ? h(a, k, L) : h(a, k, M), b = M === -1 ? void 0 : h(a, M + 1, L);
131
- switch (ge.toLowerCase()) {
132
- case "httponly":
133
- d.httpOnly = !0;
134
- break;
135
- case "secure":
136
- d.secure = !0;
137
- break;
138
- case "partitioned":
139
- d.partitioned = !0;
140
- break;
141
- case "domain":
142
- d.domain = b;
143
- break;
144
- case "path":
145
- d.path = b;
146
- break;
147
- case "max-age":
148
- b && g.test(b) && (d.maxAge = Number(b));
149
- break;
150
- case "expires":
151
- if (!b) break;
152
- const W = new Date(b);
153
- Number.isFinite(W.valueOf()) && (d.expires = W);
154
- break;
155
- case "priority":
156
- if (!b) break;
157
- const T = b.toLowerCase();
158
- (T === "low" || T === "medium" || T === "high") && (d.priority = T);
159
- break;
160
- case "samesite":
161
- if (!b) break;
162
- const R = b.toLowerCase();
163
- (R === "lax" || R === "strict" || R === "none") && (d.sameSite = R);
164
- break;
165
- }
166
- k = L + 1;
167
- }
168
- return d;
169
- }
170
- function w(a, p, m) {
171
- const i = a.indexOf(";", p);
172
- return i === -1 ? m : i;
173
- }
174
- function K(a, p, m) {
175
- const i = a.indexOf("=", p);
176
- return i < m ? i : -1;
177
- }
178
- function h(a, p, m) {
179
- let i = p, o = m;
180
- do {
181
- const l = a.charCodeAt(i);
182
- if (l !== 32 && l !== 9) break;
183
- } while (++i < o);
184
- for (; o > i; ) {
185
- const l = a.charCodeAt(o - 1);
186
- if (l !== 32 && l !== 9) break;
187
- o--;
188
- }
189
- return a.slice(i, o);
190
- }
191
- function A(a) {
192
- if (a.indexOf("%") === -1) return a;
193
- try {
194
- return decodeURIComponent(a);
195
- } catch {
196
- return a;
197
- }
198
- }
199
- function j(a) {
200
- return y.call(a) === "[object Date]";
201
- }
202
- return _;
203
- }
204
- var P = /* @__PURE__ */ Te();
205
- function Re() {
206
- const e = typeof globalThis > "u" ? void 0 : globalThis.TEST_HAS_DOCUMENT_COOKIE;
207
- return typeof e == "boolean" ? e : typeof document == "object" && typeof document.cookie == "string";
208
- }
209
- function Ue(e) {
210
- return typeof e == "string" ? P.parse(e) : typeof e == "object" && e !== null ? e : {};
211
- }
212
- function z(e, t = {}) {
213
- const s = Pe(e);
214
- if (!t.doNotParse) try {
215
- return JSON.parse(s);
216
- } catch {
217
- }
218
- return e;
219
- }
220
- function Pe(e) {
221
- return e && e[0] === "j" && e[1] === ":" ? e.substr(2) : e;
222
- }
223
- var De = class {
224
- constructor(e, t = {}) {
225
- this.changeListeners = [], this.HAS_DOCUMENT_COOKIE = !1, this.update = () => {
226
- if (!this.HAS_DOCUMENT_COOKIE) return;
227
- const n = this.cookies;
228
- this.cookies = P.parse(document.cookie), this._checkChanges(n);
229
- };
230
- const s = typeof document > "u" ? "" : document.cookie;
231
- this.cookies = Ue(e || s), this.defaultSetOptions = t, this.HAS_DOCUMENT_COOKIE = Re();
232
- }
233
- _emitChange(e) {
234
- for (let t = 0; t < this.changeListeners.length; ++t) this.changeListeners[t](e);
235
- }
236
- _checkChanges(e) {
237
- new Set(Object.keys(e).concat(Object.keys(this.cookies))).forEach((t) => {
238
- e[t] !== this.cookies[t] && this._emitChange({
239
- name: t,
240
- value: z(this.cookies[t])
241
- });
242
- });
243
- }
244
- _startPolling() {
245
- this.pollingInterval = setInterval(this.update, 300);
246
- }
247
- _stopPolling() {
248
- this.pollingInterval && clearInterval(this.pollingInterval);
249
- }
250
- get(e, t = {}) {
251
- return t.doNotUpdate || this.update(), z(this.cookies[e], t);
252
- }
253
- getAll(e = {}) {
254
- e.doNotUpdate || this.update();
255
- const t = {};
256
- for (let s in this.cookies) t[s] = z(this.cookies[s], e);
257
- return t;
258
- }
259
- set(e, t, s) {
260
- s ? s = Object.assign(Object.assign({}, this.defaultSetOptions), s) : s = this.defaultSetOptions;
261
- const n = typeof t == "string" ? t : JSON.stringify(t);
262
- this.cookies = Object.assign(Object.assign({}, this.cookies), { [e]: n }), this.HAS_DOCUMENT_COOKIE && (document.cookie = P.serialize(e, n, s)), this._emitChange({
263
- name: e,
264
- value: t,
265
- options: s
266
- });
267
- }
268
- remove(e, t) {
269
- const s = t = Object.assign(Object.assign(Object.assign({}, this.defaultSetOptions), t), {
270
- expires: new Date(1970, 1, 1, 0, 0, 1),
271
- maxAge: 0
272
- });
273
- this.cookies = Object.assign({}, this.cookies), delete this.cookies[e], this.HAS_DOCUMENT_COOKIE && (document.cookie = P.serialize(e, "", s)), this._emitChange({
274
- name: e,
275
- value: void 0,
276
- options: t
277
- });
278
- }
279
- addChangeListener(e) {
280
- this.changeListeners.push(e), this.HAS_DOCUMENT_COOKIE && this.changeListeners.length === 1 && (typeof window == "object" && "cookieStore" in window ? window.cookieStore.addEventListener("change", this.update) : this._startPolling());
281
- }
282
- removeChangeListener(e) {
283
- const t = this.changeListeners.indexOf(e);
284
- t >= 0 && this.changeListeners.splice(t, 1), this.HAS_DOCUMENT_COOKIE && this.changeListeners.length === 0 && (typeof window == "object" && "cookieStore" in window ? window.cookieStore.removeEventListener("change", this.update) : this._stopPolling());
285
- }
286
- removeAllChangeListeners() {
287
- for (; this.changeListeners.length > 0; ) this.removeChangeListener(this.changeListeners[0]);
288
- }
289
- };
290
- function fe(e, { doNotParse: t = !1, autoUpdateDependencies: s = !1 } = {}, n = new De()) {
291
- const g = s ? [...e || []] : e;
292
- let y = n.getAll({ doNotParse: !0 });
293
- const f = we(0), E = () => {
294
- const c = n.getAll({ doNotParse: !0 });
295
- Ne(g || null, c, y) && f.value++, y = c;
296
- };
297
- return n.addChangeListener(E), Me(() => {
298
- n.removeChangeListener(E);
299
- }), {
300
- get: (...c) => (s && g && !g.includes(c[0]) && g.push(c[0]), f.value, n.get(c[0], {
301
- doNotParse: t,
302
- ...c[1]
303
- })),
304
- getAll: (...c) => (f.value, n.getAll({
305
- doNotParse: t,
306
- ...c[0]
307
- })),
308
- set: (...c) => n.set(...c),
309
- remove: (...c) => n.remove(...c),
310
- addChangeListener: (...c) => n.addChangeListener(...c),
311
- removeChangeListener: (...c) => n.removeChangeListener(...c)
312
- };
313
- }
314
- function Ne(e, t, s) {
315
- if (!e) return !0;
316
- for (const n of e) if (t[n] !== s[n]) return !0;
317
- return !1;
318
- }
319
- var me = $({
320
- components: { BTag: Ve },
321
- methods: {
322
- closeDialog() {
323
- this.dialog = !1, this.apiKey = this.cookies.get("apiKey");
324
- },
325
- async isValidApiKey() {
326
- if (!this.apiKey) return !1;
327
- const e = new ye({
328
- apiEnvironment: window.RevolugoElements.config.apiEnvironment,
329
- apiKey: this.apiKey,
330
- apiVersion: Se.V1,
331
- optionalHeaders: window.RevolugoElements.config.optionalHeaders
332
- });
333
- try {
334
- return !!await e.hotels.retrieve({ id: "2yvb" });
335
- } catch (t) {
336
- return console.error(t), !1;
337
- }
338
- },
339
- async onSubmit() {
340
- this.validate(), await this.updateApiKey(), this.apiKey && this.closeDialog();
341
- },
342
- async updateApiKey() {
343
- try {
344
- if (this.isLoading = !0, await this.isValidApiKey())
345
- this.config.apiKey !== this.apiKey && this.updateConfig({
346
- ...this.config,
347
- apiKey: this.apiKey
348
- }), this.cookies.set("apiKey", this.apiKey, { expires: new Date(Date.now() + 1e3 * 60 * 60 * 24 * 365) });
349
- else throw new Error("Invalid API Key");
350
- } catch {
351
- console.error("Invalid API Key");
352
- } finally {
353
- this.isLoading = !1;
354
- }
355
- },
356
- validate() {
357
- this.$refs.apiKeyEditorForm.validate();
358
- }
359
- },
360
- mixins: [ke(["config.apiEnvironment"], "updateApiKey", {
361
- deep: !0,
362
- immediate: !0
363
- }), xe],
364
- name: "ApiKeyEditor",
365
- setup() {
366
- const e = fe(["apiKey"]), { t } = ie(), s = C(e.get("apiKey")), n = F(() => window.RevolugoElements.config.apiEnvironment);
367
- return {
368
- apiKey: s,
369
- apiKeyRules: F(() => [(g) => !!g || `A valid API Key is required. ${t("ApiKeyEditor.hint", { environment: n.value })}`]),
370
- cookies: e,
371
- dialog: C(!1),
372
- isFormValid: C(!1),
373
- isLoading: C(!1),
374
- t
375
- };
376
- }
377
- });
378
- function ee(e) {
379
- const t = e;
380
- t.__i18n = t.__i18n || [], t.__i18n.push({
381
- locale: "",
382
- resource: {
383
- "en-US": { ApiKeyEditor: {
384
- hint: {
385
- t: 0,
386
- b: {
387
- t: 2,
388
- i: [
389
- {
390
- t: 3,
391
- v: "Please, put your Publishable API Key for "
392
- },
393
- {
394
- t: 4,
395
- k: "environment"
396
- },
397
- {
398
- t: 3,
399
- v: " environment"
400
- }
401
- ]
402
- }
403
- },
404
- invalid: {
405
- t: 0,
406
- b: {
407
- t: 2,
408
- i: [{ t: 3 }],
409
- s: "Provided API Key credential is not valid"
410
- }
411
- }
412
- } },
413
- "fr-FR": { ApiKeyEditor: {
414
- hint: {
415
- t: 0,
416
- b: {
417
- t: 2,
418
- i: [{
419
- t: 3,
420
- v: "Indiquez votre clé API Publishable pour l'environnement "
421
- }, {
422
- t: 4,
423
- k: "environment"
424
- }]
425
- }
426
- },
427
- invalid: {
428
- t: 0,
429
- b: {
430
- t: 2,
431
- i: [{ t: 3 }],
432
- s: "La clé API renseignée est invalide."
433
- }
434
- }
435
- } },
436
- "de-DE": { ApiKeyEditor: {
437
- hint: {
438
- t: 0,
439
- b: {
440
- t: 2,
441
- i: [
442
- {
443
- t: 3,
444
- v: "Bitte gib deinen Veröffentlichen API-Schlüssel für die "
445
- },
446
- {
447
- t: 4,
448
- k: "environment"
449
- },
450
- {
451
- t: 3,
452
- v: " Umgebung an"
453
- }
454
- ]
455
- }
456
- },
457
- invalid: {
458
- t: 0,
459
- b: {
460
- t: 2,
461
- i: [{ t: 3 }],
462
- s: "Der angegebene API-Schlüssel ist ungültig"
463
- }
464
- }
465
- } },
466
- "es-ES": { ApiKeyEditor: {
467
- hint: {
468
- t: 0,
469
- b: {
470
- t: 2,
471
- i: [{
472
- t: 3,
473
- v: "Por favor, introduzca su clave API pública para el entorno "
474
- }, {
475
- t: 4,
476
- k: "environment"
477
- }]
478
- }
479
- },
480
- invalid: {
481
- t: 0,
482
- b: {
483
- t: 2,
484
- i: [{ t: 3 }],
485
- s: "La clave API proporcionada no es válida"
486
- }
487
- }
488
- } },
489
- "it-IT": { ApiKeyEditor: {
490
- hint: {
491
- t: 0,
492
- b: {
493
- t: 2,
494
- i: [{
495
- t: 3,
496
- v: "Inserisci la tua chiave API pubblica per l'ambiente "
497
- }, {
498
- t: 4,
499
- k: "environment"
500
- }]
501
- }
502
- },
503
- invalid: {
504
- t: 0,
505
- b: {
506
- t: 2,
507
- i: [{ t: 3 }],
508
- s: "La chiave API fornita non è valida"
509
- }
510
- }
511
- } },
512
- "nl-NL": { ApiKeyEditor: {
513
- hint: {
514
- t: 0,
515
- b: {
516
- t: 2,
517
- i: [
518
- {
519
- t: 3,
520
- v: "Vul hier uw Publishable API Key in voor de "
521
- },
522
- {
523
- t: 4,
524
- k: "environment"
525
- },
526
- {
527
- t: 3,
528
- v: " omgeving"
529
- }
530
- ]
531
- }
532
- },
533
- invalid: {
534
- t: 0,
535
- b: {
536
- t: 2,
537
- i: [{ t: 3 }],
538
- s: "De opgegeven API Key is ongeldig"
539
- }
540
- }
541
- } },
542
- "pt-PT": { ApiKeyEditor: {
543
- hint: {
544
- t: 0,
545
- b: {
546
- t: 2,
547
- i: [{
548
- t: 3,
549
- v: "Por favor, coloque a sua chave API Publicável para o ambiente "
550
- }, {
551
- t: 4,
552
- k: "environment"
553
- }]
554
- }
555
- },
556
- invalid: {
557
- t: 0,
558
- b: {
559
- t: 2,
560
- i: [{ t: 3 }],
561
- s: "A credencial da chave API fornecida não é válida"
562
- }
563
- }
564
- } }
565
- }
566
- });
567
- }
568
- function $e(e, t, s, n, g, y) {
569
- return I(), U("div", null, [r(se, {
570
- modelValue: e.dialog,
571
- "onUpdate:modelValue": t[2] || (t[2] = (f) => e.dialog = f),
572
- attach: e.$dialogAttach || void 0,
573
- "max-width": "600px"
574
- }, {
575
- activator: u(({ props: f }) => [r(x, ae(f, {
576
- color: e.cookies.get("apiKey") ? "success" : "warning",
577
- elevation: "0",
578
- size: "x-small"
579
- }), {
580
- default: u(() => [e.cookies.get("apiKey") ? (I(), U(J, { key: 1 }, [r(X, { class: "mr-2" }, {
581
- default: u(() => [...t[5] || (t[5] = [S("fas fa-check", -1)])]),
582
- _: 1
583
- }), t[6] || (t[6] = S(" Valid API key ", -1))], 64)) : (I(), U(J, { key: 0 }, [r(X, { class: "mr-2" }, {
584
- default: u(() => [...t[3] || (t[3] = [S("fas fa-exclamation", -1)])]),
585
- _: 1
586
- }), t[4] || (t[4] = S(" No API key provided ", -1))], 64))]),
587
- _: 1
588
- }, 16, ["color"])]),
589
- default: u(() => [r(de, null, {
590
- default: u(() => [r(ce, { class: "pa-4" }, {
591
- default: u(() => [r(Y, { class: "pa-0" }, {
592
- default: u(() => [r(N, { "no-gutters": "" }, {
593
- default: u(() => [r(pe, null, {
594
- default: u(() => [r(le, {
595
- ref: "apiKeyEditorForm",
596
- modelValue: e.isFormValid,
597
- "onUpdate:modelValue": t[1] || (t[1] = (f) => e.isFormValid = f),
598
- class: "m-0",
599
- onSubmit: oe(e.onSubmit, ["prevent"])
600
- }, {
601
- default: u(() => [r(B, {
602
- modelValue: e.apiKey,
603
- "onUpdate:modelValue": t[0] || (t[0] = (f) => e.apiKey = f),
604
- density: "compact",
605
- hint: e.t("ApiKeyEditor.hint", { environment: e.config.apiEnvironment }),
606
- label: "API Key",
607
- "persistent-hint": "",
608
- required: "",
609
- rules: e.apiKeyRules,
610
- variant: "outlined",
611
- onKeyup: q(e.onSubmit, ["enter"])
612
- }, null, 8, [
613
- "modelValue",
614
- "hint",
615
- "rules",
616
- "onKeyup"
617
- ])]),
618
- _: 1
619
- }, 8, ["modelValue", "onSubmit"])]),
620
- _: 1
621
- })]),
622
- _: 1
623
- })]),
624
- _: 1
625
- })]),
626
- _: 1
627
- }), r(ue, null, {
628
- default: u(() => [
629
- r(re),
630
- r(x, {
631
- color: "blue-darken-1",
632
- size: "small",
633
- variant: "text",
634
- onClick: e.closeDialog
635
- }, {
636
- default: u(() => [...t[7] || (t[7] = [S(" Close ", -1)])]),
637
- _: 1
638
- }, 8, ["onClick"]),
639
- r(x, {
640
- class: "text-right",
641
- color: "primary",
642
- disabled: e.isLoading,
643
- elevation: "0",
644
- loading: e.isLoading,
645
- size: "small",
646
- onClick: e.onSubmit
647
- }, {
648
- default: u(() => [...t[8] || (t[8] = [S(" Save ", -1)])]),
649
- _: 1
650
- }, 8, [
651
- "disabled",
652
- "loading",
653
- "onClick"
654
- ])
655
- ]),
656
- _: 1
657
- })]),
658
- _: 1
659
- })]),
660
- _: 1
661
- }, 8, ["modelValue", "attach"])]);
662
- }
663
- typeof ee == "function" && ee(me);
664
- var je = /* @__PURE__ */ H(me, [["render", $e]]), ve = /* @__PURE__ */ $({
665
- __name: "EventMetadataEditor",
666
- setup(e) {
667
- const { config: t, updateConfig: s } = Oe(), n = fe(["eventMetadata"]), { isFetching: g } = _e(Ee()), { t: y } = ie(), f = C(null), { $dialogAttach: E } = Ce(f), c = [(i) => {
668
- if (!i) return !0;
669
- try {
670
- return !!new URL(i) || y("EventMetadataEditor.validation.imageURL");
671
- } catch {
672
- return y("EventMetadataEditor.validation.imageURL");
673
- }
674
- }], O = [(i) => !!i || y("EventMetadataEditor.validation.name")], v = C(n.get("eventMetadata") || {
675
- dateEnd: (0, Q.default)().add(1, "day").format("YYYY-MM-DD").toString(),
676
- dateStart: (0, Q.default)().format("YYYY-MM-DD").toString(),
677
- name: ""
678
- }), w = C(!1), K = C(!1), h = F({
679
- get() {
680
- return !v.value.dateStart || !v.value.dateEnd ? [] : G(v.value.dateStart, v.value.dateEnd);
681
- },
682
- set(i) {
683
- [v.value.dateStart, v.value.dateEnd] = G(...i);
684
- }
685
- });
686
- function A() {
687
- w.value = !1;
688
- }
689
- function j() {
690
- return !(!v.value.name?.length || !h.value[0] || !h.value[1]);
691
- }
692
- function a() {
693
- j() && (s({
694
- ...t.value,
695
- eventMetadata: v.value
696
- }), n.set("eventMetadata", JSON.stringify(v)), A());
697
- }
698
- function p() {
699
- a(), A();
700
- }
701
- function m() {
702
- n.remove("eventMetadata"), v.value = {}, s({
703
- ...t.value,
704
- eventMetadata: {}
705
- }), A();
706
- }
707
- return be(() => {
708
- n.get("eventMetadata") && s({
709
- ...t.value,
710
- eventMetadata: n.get("eventMetadata")
711
- });
712
- }), (i, o) => (I(), U("div", {
713
- ref_key: "root",
714
- ref: f
715
- }, [r(se, {
716
- modelValue: w.value,
717
- "onUpdate:modelValue": o[4] || (o[4] = (l) => w.value = l),
718
- attach: V(E),
719
- height: "600px",
720
- "max-width": "600px"
721
- }, {
722
- activator: u(({ props: l }) => [r(x, ae(l, {
723
- color: V(n).get("eventMetadata") ? "success" : "warning",
724
- elevation: "0",
725
- size: "x-small"
726
- }), {
727
- default: u(() => [S(Ae(v.value?.name ? `EVENT : ${v.value?.name}` : "ADD EVENT METADATA"), 1)]),
728
- _: 1
729
- }, 16, ["color"])]),
730
- default: u(() => [r(de, null, {
731
- default: u(() => [r(ce, { class: "pa-4" }, {
732
- default: u(() => [r(Y, { class: "pa-0" }, {
733
- default: u(() => [r(N, { "no-gutters": "" }, {
734
- default: u(() => [r(pe, null, {
735
- default: u(() => [r(le, {
736
- ref: "eventMetadataEditorForm",
737
- modelValue: K.value,
738
- "onUpdate:modelValue": o[3] || (o[3] = (l) => K.value = l),
739
- class: "m-0",
740
- onSubmit: oe(p, ["prevent"])
741
- }, {
742
- default: u(() => [
743
- r(B, {
744
- modelValue: v.value.name,
745
- "onUpdate:modelValue": o[0] || (o[0] = (l) => v.value.name = l),
746
- density: "compact",
747
- label: "Name of the event",
748
- "persistent-hint": "",
749
- required: "",
750
- rules: O,
751
- variant: "outlined",
752
- onKeyup: q(p, ["enter"])
753
- }, null, 8, ["modelValue"]),
754
- r(B, {
755
- modelValue: v.value.imageUrl,
756
- "onUpdate:modelValue": o[1] || (o[1] = (l) => v.value.imageUrl = l),
757
- density: "compact",
758
- label: "Image URL",
759
- "persistent-hint": "",
760
- rules: c,
761
- variant: "outlined",
762
- onKeyup: q(p, ["enter"])
763
- }, null, 8, ["modelValue"]),
764
- r(N, null, {
765
- default: u(() => [r(Ke, {
766
- modelValue: h.value,
767
- "onUpdate:modelValue": o[2] || (o[2] = (l) => h.value = l)
768
- }, null, 8, ["modelValue"])]),
769
- _: 1
770
- })
771
- ]),
772
- _: 1
773
- }, 8, ["modelValue"])]),
774
- _: 1
775
- })]),
776
- _: 1
777
- })]),
778
- _: 1
779
- })]),
780
- _: 1
781
- }), r(ue, null, {
782
- default: u(() => [
783
- r(re),
784
- r(x, {
785
- color: "grey",
786
- size: "small",
787
- variant: "text",
788
- onClick: A
789
- }, {
790
- default: u(() => [...o[5] || (o[5] = [S(" Close ", -1)])]),
791
- _: 1
792
- }),
793
- r(x, {
794
- color: "error",
795
- disabled: V(g),
796
- loading: V(g),
797
- size: "small",
798
- variant: "text",
799
- onClick: m
800
- }, {
801
- default: u(() => [...o[6] || (o[6] = [S(" Reset ", -1)])]),
802
- _: 1
803
- }, 8, ["disabled", "loading"]),
804
- r(x, {
805
- color: "success",
806
- disabled: V(g),
807
- loading: V(g),
808
- size: "small",
809
- variant: "flat",
810
- onClick: p
811
- }, {
812
- default: u(() => [...o[7] || (o[7] = [S(" Save ", -1)])]),
813
- _: 1
814
- }, 8, ["disabled", "loading"])
815
- ]),
816
- _: 1
817
- })]),
818
- _: 1
819
- })]),
820
- _: 1
821
- }, 8, ["modelValue", "attach"])], 512));
822
- }
823
- });
824
- function te(e) {
825
- const t = e;
826
- t.__i18n = t.__i18n || [], t.__i18n.push({
827
- locale: "",
828
- resource: {
829
- "en-US": { EventMetadataEditor: { validation: {
830
- imageURL: {
831
- t: 0,
832
- b: {
833
- t: 2,
834
- i: [{ t: 3 }],
835
- s: "Please provide a valid URL"
836
- }
837
- },
838
- name: {
839
- t: 0,
840
- b: {
841
- t: 2,
842
- i: [{ t: 3 }],
843
- s: "Please provide a name"
844
- }
845
- }
846
- } } },
847
- "fr-FR": { EventMetadataEditor: { validation: {
848
- imageURL: {
849
- t: 0,
850
- b: {
851
- t: 2,
852
- i: [{ t: 3 }],
853
- s: "Veuillez fournir une URL valide d'image"
854
- }
855
- },
856
- name: {
857
- t: 0,
858
- b: {
859
- t: 2,
860
- i: [{ t: 3 }],
861
- s: "Veuillez entrer le nom de l'événement"
862
- }
863
- }
864
- } } },
865
- "de-DE": { EventMetadataEditor: { validation: {
866
- imageURL: {
867
- t: 0,
868
- b: {
869
- t: 2,
870
- i: [{ t: 3 }],
871
- s: "Bitte geben Sie eine gültige URL an"
872
- }
873
- },
874
- name: {
875
- t: 0,
876
- b: {
877
- t: 2,
878
- i: [{ t: 3 }],
879
- s: "Bitte geben Sie einen Namen an"
880
- }
881
- }
882
- } } },
883
- "es-ES": { EventMetadataEditor: { validation: {
884
- imageURL: {
885
- t: 0,
886
- b: {
887
- t: 2,
888
- i: [{ t: 3 }],
889
- s: "Por favor, introduce una URL válida"
890
- }
891
- },
892
- name: {
893
- t: 0,
894
- b: {
895
- t: 2,
896
- i: [{ t: 3 }],
897
- s: "Por favor, introduce un nombre"
898
- }
899
- }
900
- } } },
901
- "it-IT": { EventMetadataEditor: { validation: {
902
- imageURL: {
903
- t: 0,
904
- b: {
905
- t: 2,
906
- i: [{ t: 3 }],
907
- s: "Inserisci un URL valido"
908
- }
909
- },
910
- name: {
911
- t: 0,
912
- b: {
913
- t: 2,
914
- i: [{ t: 3 }],
915
- s: "Inserisci un nome"
916
- }
917
- }
918
- } } },
919
- "nl-NL": { EventMetadataEditor: { validation: {
920
- imageURL: {
921
- t: 0,
922
- b: {
923
- t: 2,
924
- i: [{ t: 3 }],
925
- s: "Geef een geldige URL op"
926
- }
927
- },
928
- name: {
929
- t: 0,
930
- b: {
931
- t: 2,
932
- i: [{ t: 3 }],
933
- s: "Geef een naam op"
934
- }
935
- }
936
- } } },
937
- "pt-PT": { EventMetadataEditor: { validation: {
938
- imageURL: {
939
- t: 0,
940
- b: {
941
- t: 2,
942
- i: [{ t: 3 }],
943
- s: "Por favor, introduza um URL válido"
944
- }
945
- },
946
- name: {
947
- t: 0,
948
- b: {
949
- t: 2,
950
- i: [{ t: 3 }],
951
- s: "Por favor, introduza um nome"
952
- }
953
- }
954
- } } }
955
- }
956
- });
957
- }
958
- typeof te == "function" && te(ve);
959
- var ze = ve, qe = $({
960
- components: {
961
- ApiKeyEditor: je,
962
- EventMetadataEditor: ze
963
- },
964
- name: "StorybookExtraToolbar"
965
- }), Fe = { class: "flex gap-1 px-3" };
966
- function Be(e, t, s, n, g, y) {
967
- const f = D("ApiKeyEditor"), E = D("EventMetadataEditor");
968
- return I(), ne(Y, {
969
- class: "pa-0 mb-3",
970
- fluid: ""
971
- }, {
972
- default: u(() => [r(N, { "no-gutters": "" }, {
973
- default: u(() => [Le("div", Fe, [r(f), r(E)])]),
974
- _: 1
975
- })]),
976
- _: 1
977
- });
978
- }
979
- var He = /* @__PURE__ */ H(qe, [["render", Be]]), Ye = $({ components: {
980
- StorybookExtraToolbar: He,
981
- WebComponentWrapper: Ie
982
- } });
983
- function We(e, t, s, n, g, y) {
984
- const f = D("StorybookExtraToolbar"), E = D("WebComponentWrapper");
985
- return I(), ne(E, { "error-overlay-disabled": "" }, {
986
- default: u(() => [r(f)]),
987
- _: 1
988
- });
989
- }
990
- var et = /* @__PURE__ */ H(Ye, [["render", We]]);
991
- he("css/revolugo.storybooktoolbar.d_cxquq9.css");
992
- export {
993
- et as default
994
- };
995
-
996
- //# sourceMappingURL=revolugo.storybooktoolbar.DuOgD1zs.min.js.map