@everymatrix/cashier-video-modal 0.5.0 → 1.53.10

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.
@@ -0,0 +1,630 @@
1
+ function g() {
2
+ }
3
+ function F(e) {
4
+ return e();
5
+ }
6
+ function D() {
7
+ return /* @__PURE__ */ Object.create(null);
8
+ }
9
+ function j(e) {
10
+ e.forEach(F);
11
+ }
12
+ function J(e) {
13
+ return typeof e == "function";
14
+ }
15
+ function tt(e, t) {
16
+ return e != e ? t == t : e !== t || e && typeof e == "object" || typeof e == "function";
17
+ }
18
+ let V;
19
+ function z(e, t) {
20
+ return e === t ? !0 : (V || (V = document.createElement("a")), V.href = t, e === V.href);
21
+ }
22
+ function et(e) {
23
+ return Object.keys(e).length === 0;
24
+ }
25
+ function $(e, t) {
26
+ e.appendChild(t);
27
+ }
28
+ function nt(e, t, n) {
29
+ const s = it(e);
30
+ if (!s.getElementById(t)) {
31
+ const i = _("style");
32
+ i.id = t, i.textContent = n, st(s, i);
33
+ }
34
+ }
35
+ function it(e) {
36
+ if (!e) return document;
37
+ const t = e.getRootNode ? e.getRootNode() : e.ownerDocument;
38
+ return t && /** @type {ShadowRoot} */
39
+ t.host ? (
40
+ /** @type {ShadowRoot} */
41
+ t
42
+ ) : e.ownerDocument;
43
+ }
44
+ function st(e, t) {
45
+ return $(
46
+ /** @type {Document} */
47
+ e.head || e,
48
+ t
49
+ ), t.sheet;
50
+ }
51
+ function L(e, t, n) {
52
+ e.insertBefore(t, n || null);
53
+ }
54
+ function y(e) {
55
+ e.parentNode && e.parentNode.removeChild(e);
56
+ }
57
+ function _(e) {
58
+ return document.createElement(e);
59
+ }
60
+ function M(e) {
61
+ return document.createElementNS("http://www.w3.org/2000/svg", e);
62
+ }
63
+ function Z(e) {
64
+ return document.createTextNode(e);
65
+ }
66
+ function R() {
67
+ return Z(" ");
68
+ }
69
+ function rt() {
70
+ return Z("");
71
+ }
72
+ function G(e, t, n, s) {
73
+ return e.addEventListener(t, n, s), () => e.removeEventListener(t, n, s);
74
+ }
75
+ function f(e, t, n) {
76
+ n == null ? e.removeAttribute(t) : e.getAttribute(t) !== n && e.setAttribute(t, n);
77
+ }
78
+ function ot(e) {
79
+ return Array.from(e.childNodes);
80
+ }
81
+ function T(e, t, n) {
82
+ e.classList.toggle(t, !!n);
83
+ }
84
+ function lt(e) {
85
+ const t = {};
86
+ return e.childNodes.forEach(
87
+ /** @param {Element} node */
88
+ (n) => {
89
+ t[n.slot || "default"] = !0;
90
+ }
91
+ ), t;
92
+ }
93
+ let v;
94
+ function C(e) {
95
+ v = e;
96
+ }
97
+ function ct() {
98
+ if (!v) throw new Error("Function called outside component initialization");
99
+ return v;
100
+ }
101
+ function ut(e) {
102
+ ct().$$.on_mount.push(e);
103
+ }
104
+ const m = [], A = [];
105
+ let b = [];
106
+ const W = [], ft = /* @__PURE__ */ Promise.resolve();
107
+ let H = !1;
108
+ function dt() {
109
+ H || (H = !0, ft.then(w));
110
+ }
111
+ function B(e) {
112
+ b.push(e);
113
+ }
114
+ const O = /* @__PURE__ */ new Set();
115
+ let p = 0;
116
+ function w() {
117
+ if (p !== 0)
118
+ return;
119
+ const e = v;
120
+ do {
121
+ try {
122
+ for (; p < m.length; ) {
123
+ const t = m[p];
124
+ p++, C(t), at(t.$$);
125
+ }
126
+ } catch (t) {
127
+ throw m.length = 0, p = 0, t;
128
+ }
129
+ for (C(null), m.length = 0, p = 0; A.length; ) A.pop()();
130
+ for (let t = 0; t < b.length; t += 1) {
131
+ const n = b[t];
132
+ O.has(n) || (O.add(n), n());
133
+ }
134
+ b.length = 0;
135
+ } while (m.length);
136
+ for (; W.length; )
137
+ W.pop()();
138
+ H = !1, O.clear(), C(e);
139
+ }
140
+ function at(e) {
141
+ if (e.fragment !== null) {
142
+ e.update(), j(e.before_update);
143
+ const t = e.dirty;
144
+ e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(B);
145
+ }
146
+ }
147
+ function ht(e) {
148
+ const t = [], n = [];
149
+ b.forEach((s) => e.indexOf(s) === -1 ? t.push(s) : n.push(s)), n.forEach((s) => s()), b = t;
150
+ }
151
+ const $t = /* @__PURE__ */ new Set();
152
+ function _t(e, t) {
153
+ e && e.i && ($t.delete(e), e.i(t));
154
+ }
155
+ function gt(e, t, n) {
156
+ const { fragment: s, after_update: i } = e.$$;
157
+ s && s.m(t, n), B(() => {
158
+ const o = e.$$.on_mount.map(F).filter(J);
159
+ e.$$.on_destroy ? e.$$.on_destroy.push(...o) : j(o), e.$$.on_mount = [];
160
+ }), i.forEach(B);
161
+ }
162
+ function pt(e, t) {
163
+ const n = e.$$;
164
+ n.fragment !== null && (ht(n.after_update), j(n.on_destroy), n.fragment && n.fragment.d(t), n.on_destroy = n.fragment = null, n.ctx = []);
165
+ }
166
+ function mt(e, t) {
167
+ e.$$.dirty[0] === -1 && (m.push(e), dt(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31;
168
+ }
169
+ function wt(e, t, n, s, i, o, u = null, c = [-1]) {
170
+ const l = v;
171
+ C(e);
172
+ const r = e.$$ = {
173
+ fragment: null,
174
+ ctx: [],
175
+ // state
176
+ props: o,
177
+ update: g,
178
+ not_equal: i,
179
+ bound: D(),
180
+ // lifecycle
181
+ on_mount: [],
182
+ on_destroy: [],
183
+ on_disconnect: [],
184
+ before_update: [],
185
+ after_update: [],
186
+ context: new Map(t.context || (l ? l.$$.context : [])),
187
+ // everything else
188
+ callbacks: D(),
189
+ dirty: c,
190
+ skip_bound: !1,
191
+ root: t.target || l.$$.root
192
+ };
193
+ u && u(r.root);
194
+ let d = !1;
195
+ if (r.ctx = n(e, t.props || {}, (h, k, ...x) => {
196
+ const E = x.length ? x[0] : k;
197
+ return r.ctx && i(r.ctx[h], r.ctx[h] = E) && (!r.skip_bound && r.bound[h] && r.bound[h](E), d && mt(e, h)), k;
198
+ }), r.update(), d = !0, j(r.before_update), r.fragment = s(r.ctx), t.target) {
199
+ if (t.hydrate) {
200
+ const h = ot(t.target);
201
+ r.fragment && r.fragment.l(h), h.forEach(y);
202
+ } else
203
+ r.fragment && r.fragment.c();
204
+ t.intro && _t(e.$$.fragment), gt(e, t.target, t.anchor), w();
205
+ }
206
+ C(l);
207
+ }
208
+ let K;
209
+ typeof HTMLElement == "function" && (K = class extends HTMLElement {
210
+ /** The Svelte component constructor */
211
+ $$ctor;
212
+ /** Slots */
213
+ $$s;
214
+ /** The Svelte component instance */
215
+ $$c;
216
+ /** Whether or not the custom element is connected */
217
+ $$cn = !1;
218
+ /** Component props data */
219
+ $$d = {};
220
+ /** `true` if currently in the process of reflecting component props back to attributes */
221
+ $$r = !1;
222
+ /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
223
+ $$p_d = {};
224
+ /** @type {Record<string, Function[]>} Event listeners */
225
+ $$l = {};
226
+ /** @type {Map<Function, Function>} Event listener unsubscribe functions */
227
+ $$l_u = /* @__PURE__ */ new Map();
228
+ constructor(e, t, n) {
229
+ super(), this.$$ctor = e, this.$$s = t, n && this.attachShadow({ mode: "open" });
230
+ }
231
+ addEventListener(e, t, n) {
232
+ if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(t), this.$$c) {
233
+ const s = this.$$c.$on(e, t);
234
+ this.$$l_u.set(t, s);
235
+ }
236
+ super.addEventListener(e, t, n);
237
+ }
238
+ removeEventListener(e, t, n) {
239
+ if (super.removeEventListener(e, t, n), this.$$c) {
240
+ const s = this.$$l_u.get(t);
241
+ s && (s(), this.$$l_u.delete(t));
242
+ }
243
+ }
244
+ async connectedCallback() {
245
+ if (this.$$cn = !0, !this.$$c) {
246
+ let e = function(i) {
247
+ return () => {
248
+ let o;
249
+ return {
250
+ c: function() {
251
+ o = _("slot"), i !== "default" && f(o, "name", i);
252
+ },
253
+ /**
254
+ * @param {HTMLElement} target
255
+ * @param {HTMLElement} [anchor]
256
+ */
257
+ m: function(l, r) {
258
+ L(l, o, r);
259
+ },
260
+ d: function(l) {
261
+ l && y(o);
262
+ }
263
+ };
264
+ };
265
+ };
266
+ if (await Promise.resolve(), !this.$$cn || this.$$c)
267
+ return;
268
+ const t = {}, n = lt(this);
269
+ for (const i of this.$$s)
270
+ i in n && (t[i] = [e(i)]);
271
+ for (const i of this.attributes) {
272
+ const o = this.$$g_p(i.name);
273
+ o in this.$$d || (this.$$d[o] = S(o, i.value, this.$$p_d, "toProp"));
274
+ }
275
+ for (const i in this.$$p_d)
276
+ !(i in this.$$d) && this[i] !== void 0 && (this.$$d[i] = this[i], delete this[i]);
277
+ this.$$c = new this.$$ctor({
278
+ target: this.shadowRoot || this,
279
+ props: {
280
+ ...this.$$d,
281
+ $$slots: t,
282
+ $$scope: {
283
+ ctx: []
284
+ }
285
+ }
286
+ });
287
+ const s = () => {
288
+ this.$$r = !0;
289
+ for (const i in this.$$p_d)
290
+ if (this.$$d[i] = this.$$c.$$.ctx[this.$$c.$$.props[i]], this.$$p_d[i].reflect) {
291
+ const o = S(
292
+ i,
293
+ this.$$d[i],
294
+ this.$$p_d,
295
+ "toAttribute"
296
+ );
297
+ o == null ? this.removeAttribute(this.$$p_d[i].attribute || i) : this.setAttribute(this.$$p_d[i].attribute || i, o);
298
+ }
299
+ this.$$r = !1;
300
+ };
301
+ this.$$c.$$.after_update.push(s), s();
302
+ for (const i in this.$$l)
303
+ for (const o of this.$$l[i]) {
304
+ const u = this.$$c.$on(i, o);
305
+ this.$$l_u.set(o, u);
306
+ }
307
+ this.$$l = {};
308
+ }
309
+ }
310
+ // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
311
+ // and setting attributes through setAttribute etc, this is helpful
312
+ attributeChangedCallback(e, t, n) {
313
+ this.$$r || (e = this.$$g_p(e), this.$$d[e] = S(e, n, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
314
+ }
315
+ disconnectedCallback() {
316
+ this.$$cn = !1, Promise.resolve().then(() => {
317
+ !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$c = void 0);
318
+ });
319
+ }
320
+ $$g_p(e) {
321
+ return Object.keys(this.$$p_d).find(
322
+ (t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e
323
+ ) || e;
324
+ }
325
+ });
326
+ function S(e, t, n, s) {
327
+ const i = n[e]?.type;
328
+ if (t = i === "Boolean" && typeof t != "boolean" ? t != null : t, !s || !n[e])
329
+ return t;
330
+ if (s === "toAttribute")
331
+ switch (i) {
332
+ case "Object":
333
+ case "Array":
334
+ return t == null ? null : JSON.stringify(t);
335
+ case "Boolean":
336
+ return t ? "" : null;
337
+ case "Number":
338
+ return t ?? null;
339
+ default:
340
+ return t;
341
+ }
342
+ else
343
+ switch (i) {
344
+ case "Object":
345
+ case "Array":
346
+ return t && JSON.parse(t);
347
+ case "Boolean":
348
+ return t;
349
+ case "Number":
350
+ return t != null ? +t : t;
351
+ default:
352
+ return t;
353
+ }
354
+ }
355
+ function bt(e, t, n, s, i, o) {
356
+ let u = class extends K {
357
+ constructor() {
358
+ super(e, n, i), this.$$p_d = t;
359
+ }
360
+ static get observedAttributes() {
361
+ return Object.keys(t).map(
362
+ (c) => (t[c].attribute || c).toLowerCase()
363
+ );
364
+ }
365
+ };
366
+ return Object.keys(t).forEach((c) => {
367
+ Object.defineProperty(u.prototype, c, {
368
+ get() {
369
+ return this.$$c && c in this.$$c ? this.$$c[c] : this.$$d[c];
370
+ },
371
+ set(l) {
372
+ l = S(c, l, t), this.$$d[c] = l, this.$$c?.$set({ [c]: l });
373
+ }
374
+ });
375
+ }), s.forEach((c) => {
376
+ Object.defineProperty(u.prototype, c, {
377
+ get() {
378
+ return this.$$c?.[c];
379
+ }
380
+ });
381
+ }), e.element = /** @type {any} */
382
+ u, u;
383
+ }
384
+ class yt {
385
+ /**
386
+ * ### PRIVATE API
387
+ *
388
+ * Do not use, may change at any time
389
+ *
390
+ * @type {any}
391
+ */
392
+ $$ = void 0;
393
+ /**
394
+ * ### PRIVATE API
395
+ *
396
+ * Do not use, may change at any time
397
+ *
398
+ * @type {any}
399
+ */
400
+ $$set = void 0;
401
+ /** @returns {void} */
402
+ $destroy() {
403
+ pt(this, 1), this.$destroy = g;
404
+ }
405
+ /**
406
+ * @template {Extract<keyof Events, string>} K
407
+ * @param {K} type
408
+ * @param {((e: Events[K]) => void) | null | undefined} callback
409
+ * @returns {() => void}
410
+ */
411
+ $on(t, n) {
412
+ if (!J(n))
413
+ return g;
414
+ const s = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
415
+ return s.push(n), () => {
416
+ const i = s.indexOf(n);
417
+ i !== -1 && s.splice(i, 1);
418
+ };
419
+ }
420
+ /**
421
+ * @param {Partial<Props>} props
422
+ * @returns {void}
423
+ */
424
+ $set(t) {
425
+ this.$$set && !et(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
426
+ }
427
+ }
428
+ const Ct = "4";
429
+ typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Ct);
430
+ function vt(e) {
431
+ nt(e, "svelte-1oqw41v", ".CashierVideoWrapper{position:absolute;width:100%;height:500px;left:0;top:10px;z-index:5;background-color:var(--mmw--color-grey-light, #f3f6f9)}.CashierVideoWrapperDesktop{height:700px;top:20px}.CashierVideoHeader{width:100%;height:29px;position:relative;text-transform:uppercase;text-align:right;background-color:var(--mmw--color-grey-light, #f3f6f9);font-size:var(--emw--font-size-medium, 16px);z-index:6}.CashierVideoHeader svg{padding:8px 8px 8px 15px}.CashierVideo video{object-fit:contain;width:100%;height:100%;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.CashierVideo svg{cursor:pointer;margin-left:auto;position:absolute;right:0;z-index:6;padding:5px 13px}");
432
+ }
433
+ function q(e) {
434
+ let t, n, s, i, o, u, c, l = !/*desktopView*/
435
+ e[2] && I(e), r = (
436
+ /*desktopView*/
437
+ e[2] && U(e)
438
+ );
439
+ return {
440
+ c() {
441
+ t = _("div"), l && l.c(), n = R(), s = _("div"), r && r.c(), i = R(), o = _("video"), u = _("source"), z(u.src, c = /*videosrc*/
442
+ e[0]) || f(u, "src", c), o.autoplay = !0, o.controls = !0, f(o, "controlslist", "nodownload"), f(o, "disablepictureinpicture", ""), f(s, "class", "CashierVideo"), f(t, "class", "CashierVideoWrapper"), f(t, "part", "CustomStylingContainer"), T(
443
+ t,
444
+ "CashierVideoWrapperDesktop",
445
+ /*desktopView*/
446
+ e[2]
447
+ );
448
+ },
449
+ m(d, h) {
450
+ L(d, t, h), l && l.m(t, null), $(t, n), $(t, s), r && r.m(s, null), $(s, i), $(s, o), $(o, u), e[10](t);
451
+ },
452
+ p(d, h) {
453
+ /*desktopView*/
454
+ d[2] ? l && (l.d(1), l = null) : l ? l.p(d, h) : (l = I(d), l.c(), l.m(t, n)), /*desktopView*/
455
+ d[2] ? r ? r.p(d, h) : (r = U(d), r.c(), r.m(s, i)) : r && (r.d(1), r = null), h & /*videosrc*/
456
+ 1 && !z(u.src, c = /*videosrc*/
457
+ d[0]) && f(u, "src", c), h & /*desktopView*/
458
+ 4 && T(
459
+ t,
460
+ "CashierVideoWrapperDesktop",
461
+ /*desktopView*/
462
+ d[2]
463
+ );
464
+ },
465
+ d(d) {
466
+ d && y(t), l && l.d(), r && r.d(), e[10](null);
467
+ }
468
+ };
469
+ }
470
+ function I(e) {
471
+ let t, n, s, i, o;
472
+ return {
473
+ c() {
474
+ t = _("div"), n = M("svg"), s = M("path"), f(s, "d", "M12.7711 0.229435C13.0582 0.517619 13.0755 0.973729 12.8215 1.28141L12.7711 1.33721L7.60685 6.50068L12.7711 11.6641C12.9128 11.8066 12.9944 11.998 12.999 12.1988C13.0035 12.3997 12.9308 12.5946 12.7957 12.7433C12.6606 12.892 12.4735 12.9832 12.2731 12.9979C12.0728 13.0126 11.8744 12.9497 11.7191 12.8223L11.6633 12.7719L6.49958 7.60791L1.3359 12.7719C1.19349 12.9136 1.00207 12.9952 0.801203 12.9998C0.60034 13.0044 0.405398 12.9316 0.256676 12.7965C0.107955 12.6614 0.0168256 12.4744 0.00212786 12.274C-0.0125699 12.0736 0.0502877 11.8753 0.177706 11.7199L0.228086 11.6641L5.3923 6.50068L0.228086 1.33721C0.0863637 1.1948 0.00478102 1.00338 0.000203544 0.802529C-0.00437393 0.601674 0.0684038 0.40674 0.203491 0.258024C0.338579 0.109308 0.525647 0.0181829 0.726024 0.00348576C0.9264 -0.0112114 1.12476 0.0516437 1.28011 0.179057L1.3359 0.229435L6.49958 5.39345L11.6633 0.229435C11.736 0.156695 11.8223 0.0989949 11.9174 0.0596283C12.0124 0.0202617 12.1143 0 12.2172 0C12.32 0 12.4219 0.0202617 12.5169 0.0596283C12.612 0.0989949 12.6983 0.156695 12.7711 0.229435Z"), f(s, "fill", "#111111"), f(n, "xmlns", "http://www.w3.org/2000/svg"), f(n, "width", "13"), f(n, "height", "13"), f(n, "viewBox", "0 0 13 13"), f(n, "fill", "none"), f(t, "class", "CashierVideoHeader");
475
+ },
476
+ m(u, c) {
477
+ L(u, t, c), $(t, n), $(n, s), i || (o = G(
478
+ n,
479
+ "click",
480
+ /*click_handler*/
481
+ e[8]
482
+ ), i = !0);
483
+ },
484
+ p: g,
485
+ d(u) {
486
+ u && y(t), i = !1, o();
487
+ }
488
+ };
489
+ }
490
+ function U(e) {
491
+ let t, n, s, i;
492
+ return {
493
+ c() {
494
+ t = M("svg"), n = M("path"), f(n, "d", "M12.7711 0.229435C13.0582 0.517619 13.0755 0.973729 12.8215 1.28141L12.7711 1.33721L7.60685 6.50068L12.7711 11.6641C12.9128 11.8066 12.9944 11.998 12.999 12.1988C13.0035 12.3997 12.9308 12.5946 12.7957 12.7433C12.6606 12.892 12.4735 12.9832 12.2731 12.9979C12.0728 13.0126 11.8744 12.9497 11.7191 12.8223L11.6633 12.7719L6.49958 7.60791L1.3359 12.7719C1.19349 12.9136 1.00207 12.9952 0.801203 12.9998C0.60034 13.0044 0.405398 12.9316 0.256676 12.7965C0.107955 12.6614 0.0168256 12.4744 0.00212786 12.274C-0.0125699 12.0736 0.0502877 11.8753 0.177706 11.7199L0.228086 11.6641L5.3923 6.50068L0.228086 1.33721C0.0863637 1.1948 0.00478102 1.00338 0.000203544 0.802529C-0.00437393 0.601674 0.0684038 0.40674 0.203491 0.258024C0.338579 0.109308 0.525647 0.0181829 0.726024 0.00348576C0.9264 -0.0112114 1.12476 0.0516437 1.28011 0.179057L1.3359 0.229435L6.49958 5.39345L11.6633 0.229435C11.736 0.156695 11.8223 0.0989949 11.9174 0.0596283C12.0124 0.0202617 12.1143 0 12.2172 0C12.32 0 12.4219 0.0202617 12.5169 0.0596283C12.612 0.0989949 12.6983 0.156695 12.7711 0.229435Z"), f(n, "fill", "#111111"), f(t, "xmlns", "http://www.w3.org/2000/svg"), f(t, "width", "13"), f(t, "height", "13"), f(t, "viewBox", "0 0 13 13"), f(t, "fill", "none");
495
+ },
496
+ m(o, u) {
497
+ L(o, t, u), $(t, n), s || (i = G(
498
+ t,
499
+ "click",
500
+ /*click_handler_1*/
501
+ e[9]
502
+ ), s = !0);
503
+ },
504
+ p: g,
505
+ d(o) {
506
+ o && y(t), s = !1, i();
507
+ }
508
+ };
509
+ }
510
+ function Lt(e) {
511
+ let t, n = (
512
+ /*show*/
513
+ e[3] && q(e)
514
+ );
515
+ return {
516
+ c() {
517
+ n && n.c(), t = rt();
518
+ },
519
+ m(s, i) {
520
+ n && n.m(s, i), L(s, t, i);
521
+ },
522
+ p(s, [i]) {
523
+ /*show*/
524
+ s[3] ? n ? n.p(s, i) : (n = q(s), n.c(), n.m(t.parentNode, t)) : n && (n.d(1), n = null);
525
+ },
526
+ i: g,
527
+ o: g,
528
+ d(s) {
529
+ s && y(t), n && n.d(s);
530
+ }
531
+ };
532
+ }
533
+ function kt(e, t, n) {
534
+ let { clientstyling: s = "" } = t, { clientstylingurl: i = "" } = t, { ismobileview: o } = t, { videosrc: u } = t, c = !0, l = !1, r;
535
+ const d = () => {
536
+ n(3, l = !1), window.postMessage({ type: "ClosedCashierVideoModal" }, window.location.href), window.postMessage({ type: "EnableScroll" }, window.location.href);
537
+ }, h = (a) => {
538
+ a.data.type == "ShowCashierVideoModal" && (n(3, l = !0), window.postMessage({ type: "DisableScroll" }, window.location.href)), a.data.type == "HideCashierVideoModal" && d();
539
+ }, k = () => {
540
+ n(2, c = o === "false");
541
+ }, x = () => {
542
+ let a = document.createElement("style");
543
+ a.innerHTML = s, r.appendChild(a);
544
+ }, E = () => {
545
+ let a = new URL(i), P = document.createElement("style");
546
+ fetch(a.href).then((N) => N.text()).then((N) => {
547
+ P.innerHTML = N, setTimeout(
548
+ () => {
549
+ r.appendChild(P);
550
+ },
551
+ 1
552
+ );
553
+ });
554
+ };
555
+ ut(() => (window.addEventListener("message", h, !1), () => {
556
+ window.removeEventListener("message", h);
557
+ }));
558
+ const Q = () => d(), X = () => d();
559
+ function Y(a) {
560
+ A[a ? "unshift" : "push"](() => {
561
+ r = a, n(1, r);
562
+ });
563
+ }
564
+ return e.$$set = (a) => {
565
+ "clientstyling" in a && n(5, s = a.clientstyling), "clientstylingurl" in a && n(6, i = a.clientstylingurl), "ismobileview" in a && n(7, o = a.ismobileview), "videosrc" in a && n(0, u = a.videosrc);
566
+ }, e.$$.update = () => {
567
+ e.$$.dirty & /*ismobileview*/
568
+ 128 && o && k(), e.$$.dirty & /*clientstyling, customStylingContainer*/
569
+ 34 && s && r && x(), e.$$.dirty & /*clientstylingurl, customStylingContainer*/
570
+ 66 && i && r && E();
571
+ }, [
572
+ u,
573
+ r,
574
+ c,
575
+ l,
576
+ d,
577
+ s,
578
+ i,
579
+ o,
580
+ Q,
581
+ X,
582
+ Y
583
+ ];
584
+ }
585
+ class xt extends yt {
586
+ constructor(t) {
587
+ super(), wt(
588
+ this,
589
+ t,
590
+ kt,
591
+ Lt,
592
+ tt,
593
+ {
594
+ clientstyling: 5,
595
+ clientstylingurl: 6,
596
+ ismobileview: 7,
597
+ videosrc: 0
598
+ },
599
+ vt
600
+ );
601
+ }
602
+ get clientstyling() {
603
+ return this.$$.ctx[5];
604
+ }
605
+ set clientstyling(t) {
606
+ this.$$set({ clientstyling: t }), w();
607
+ }
608
+ get clientstylingurl() {
609
+ return this.$$.ctx[6];
610
+ }
611
+ set clientstylingurl(t) {
612
+ this.$$set({ clientstylingurl: t }), w();
613
+ }
614
+ get ismobileview() {
615
+ return this.$$.ctx[7];
616
+ }
617
+ set ismobileview(t) {
618
+ this.$$set({ ismobileview: t }), w();
619
+ }
620
+ get videosrc() {
621
+ return this.$$.ctx[0];
622
+ }
623
+ set videosrc(t) {
624
+ this.$$set({ videosrc: t }), w();
625
+ }
626
+ }
627
+ bt(xt, { clientstyling: {}, clientstylingurl: {}, ismobileview: {}, videosrc: {} }, [], [], !0);
628
+ export {
629
+ xt as C
630
+ };
@@ -0,0 +1,14 @@
1
+ import { C as n } from "../components/CashierVideoModal-CNnBMRn-.js";
2
+ function i(t) {
3
+ return function(...s) {
4
+ try {
5
+ return t.apply(this, s);
6
+ } catch (e) {
7
+ if (e instanceof DOMException && e.message.includes("has already been used with this registry") || e.message.includes("Cannot define multiple custom elements with the same tag name"))
8
+ return !1;
9
+ throw e;
10
+ }
11
+ };
12
+ }
13
+ customElements.define = i(customElements.define);
14
+ !customElements.get("cashier-video-modal") && customElements.define("cashier-video-modal", n.element);
package/package.json CHANGED
@@ -1,16 +1,12 @@
1
+
1
2
  {
2
3
  "name": "@everymatrix/cashier-video-modal",
3
- "version": "0.5.0",
4
+ "version": "1.53.10",
4
5
  "type": "module",
5
- "main": "es2015/cashier-video-modal.cjs",
6
- "module": "es2015/cashier-video-modal.js",
6
+ "main": "esnext/cashier-video-modal.js",
7
+ "module": "esnext/cashier-video-modal.js",
7
8
  "exports": {
8
- ".": {
9
- "import": "./es2015/cashier-video-modal.js",
10
- "require": "./es2015/cashier-video-modal.cjs"
11
- },
12
- "./es2015/cashier-video-modal.cjs": "./es2015/cashier-video-modal.cjs",
13
- "./esnext/cashier-video-modal.cjs": "./esnext/cashier-video-modal.cjs"
9
+ "./es2015/cashier-video-modal.cjs": "./es2015/cashier-video-modal.cjs"
14
10
  },
15
11
  "files": [
16
12
  "components/",
@@ -1 +0,0 @@
1
- "use strict";var lt=Object.defineProperty,ct=Object.defineProperties;var ut=Object.getOwnPropertyDescriptors;var z=Object.getOwnPropertySymbols;var ft=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable;var A=(e,t,n)=>t in e?lt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,R=(e,t)=>{for(var n in t||(t={}))ft.call(t,n)&&A(e,n,t[n]);if(z)for(var n of z(t))dt.call(t,n)&&A(e,n,t[n]);return e},W=(e,t)=>ct(e,ut(t));var $=(e,t,n)=>A(e,typeof t!="symbol"?t+"":t,n);var I=(e,t,n)=>new Promise((i,r)=>{var s=l=>{try{u(n.next(l))}catch(o){r(o)}},c=l=>{try{u(n.throw(l))}catch(o){r(o)}},u=l=>l.done?i(l.value):Promise.resolve(l.value).then(s,c);u((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function p(){}function X(e){return e()}function U(){return Object.create(null)}function O(e){e.forEach(X)}function Y(e){return typeof e=="function"}function at(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let V;function q(e,t){return e===t?!0:(V||(V=document.createElement("a")),V.href=t,e===V.href)}function ht(e){return Object.keys(e).length===0}function g(e,t){e.appendChild(t)}function $t(e,t,n){const i=gt(e);if(!i.getElementById(t)){const r=_("style");r.id=t,r.textContent=n,_t(i,r)}}function gt(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function _t(e,t){return g(e.head||e,t),t.sheet}function k(e,t,n){e.insertBefore(t,n||null)}function C(e){e.parentNode&&e.parentNode.removeChild(e)}function _(e){return document.createElement(e)}function j(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function tt(e){return document.createTextNode(e)}function F(){return tt(" ")}function pt(){return tt("")}function et(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function f(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function mt(e){return Array.from(e.childNodes)}function J(e,t,n){e.classList.toggle(t,!!n)}function wt(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}let L;function v(e){L=e}function bt(){if(!L)throw new Error("Function called outside component initialization");return L}function yt(e){bt().$$.on_mount.push(e)}const w=[],P=[];let y=[];const Z=[],Ct=Promise.resolve();let B=!1;function vt(){B||(B=!0,Ct.then(b))}function D(e){y.push(e)}const H=new Set;let m=0;function b(){if(m!==0)return;const e=L;do{try{for(;m<w.length;){const t=w[m];m++,v(t),Lt(t.$$)}}catch(t){throw w.length=0,m=0,t}for(v(null),w.length=0,m=0;P.length;)P.pop()();for(let t=0;t<y.length;t+=1){const n=y[t];H.has(n)||(H.add(n),n())}y.length=0}while(w.length);for(;Z.length;)Z.pop()();B=!1,H.clear(),v(e)}function Lt(e){if(e.fragment!==null){e.update(),O(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(D)}}function kt(e){const t=[],n=[];y.forEach(i=>e.indexOf(i)===-1?t.push(i):n.push(i)),n.forEach(i=>i()),y=t}const xt=new Set;function Et(e,t){e&&e.i&&(xt.delete(e),e.i(t))}function St(e,t,n){const{fragment:i,after_update:r}=e.$$;i&&i.m(t,n),D(()=>{const s=e.$$.on_mount.map(X).filter(Y);e.$$.on_destroy?e.$$.on_destroy.push(...s):O(s),e.$$.on_mount=[]}),r.forEach(D)}function Vt(e,t){const n=e.$$;n.fragment!==null&&(kt(n.after_update),O(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Mt(e,t){e.$$.dirty[0]===-1&&(w.push(e),vt(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function jt(e,t,n,i,r,s,c=null,u=[-1]){const l=L;v(e);const o=e.$$={fragment:null,ctx:[],props:s,update:p,not_equal:r,bound:U(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:U(),dirty:u,skip_bound:!1,root:t.target||l.$$.root};c&&c(o.root);let d=!1;if(o.ctx=n?n(e,t.props||{},(h,x,...E)=>{const S=E.length?E[0]:x;return o.ctx&&r(o.ctx[h],o.ctx[h]=S)&&(!o.skip_bound&&o.bound[h]&&o.bound[h](S),d&&Mt(e,h)),x}):[],o.update(),d=!0,O(o.before_update),o.fragment=i?i(o.ctx):!1,t.target){if(t.hydrate){const h=mt(t.target);o.fragment&&o.fragment.l(h),h.forEach(C)}else o.fragment&&o.fragment.c();t.intro&&Et(e.$$.fragment),St(e,t.target,t.anchor),b()}v(l)}let nt;typeof HTMLElement=="function"&&(nt=class extends HTMLElement{constructor(t,n,i){super();$(this,"$$ctor");$(this,"$$s");$(this,"$$c");$(this,"$$cn",!1);$(this,"$$d",{});$(this,"$$r",!1);$(this,"$$p_d",{});$(this,"$$l",{});$(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=n,i&&this.attachShadow({mode:"open"})}addEventListener(t,n,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const r=this.$$c.$on(t,n);this.$$l_u.set(n,r)}super.addEventListener(t,n,i)}removeEventListener(t,n,i){if(super.removeEventListener(t,n,i),this.$$c){const r=this.$$l_u.get(n);r&&(r(),this.$$l_u.delete(n))}}connectedCallback(){return I(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(s){return()=>{let c;return{c:function(){c=_("slot"),s!=="default"&&f(c,"name",s)},m:function(o,d){k(o,c,d)},d:function(o){o&&C(c)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const n={},i=wt(this);for(const s of this.$$s)s in i&&(n[s]=[t(s)]);for(const s of this.attributes){const c=this.$$g_p(s.name);c in this.$$d||(this.$$d[c]=M(c,s.value,this.$$p_d,"toProp"))}for(const s in this.$$p_d)!(s in this.$$d)&&this[s]!==void 0&&(this.$$d[s]=this[s],delete this[s]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:W(R({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});const r=()=>{this.$$r=!0;for(const s in this.$$p_d)if(this.$$d[s]=this.$$c.$$.ctx[this.$$c.$$.props[s]],this.$$p_d[s].reflect){const c=M(s,this.$$d[s],this.$$p_d,"toAttribute");c==null?this.removeAttribute(this.$$p_d[s].attribute||s):this.setAttribute(this.$$p_d[s].attribute||s,c)}this.$$r=!1};this.$$c.$$.after_update.push(r),r();for(const s in this.$$l)for(const c of this.$$l[s]){const u=this.$$c.$on(s,c);this.$$l_u.set(c,u)}this.$$l={}}})}attributeChangedCallback(t,n,i){var r;this.$$r||(t=this.$$g_p(t),this.$$d[t]=M(t,i,this.$$p_d,"toProp"),(r=this.$$c)==null||r.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(n=>this.$$p_d[n].attribute===t||!this.$$p_d[n].attribute&&n.toLowerCase()===t)||t}});function M(e,t,n,i){var s;const r=(s=n[e])==null?void 0:s.type;if(t=r==="Boolean"&&typeof t!="boolean"?t!=null:t,!i||!n[e])return t;if(i==="toAttribute")switch(r){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t==null?null:t;default:return t}else switch(r){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Ot(e,t,n,i,r,s){let c=class extends nt{constructor(){super(e,n,r),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(u=>(t[u].attribute||u).toLowerCase())}};return Object.keys(t).forEach(u=>{Object.defineProperty(c.prototype,u,{get(){return this.$$c&&u in this.$$c?this.$$c[u]:this.$$d[u]},set(l){var o;l=M(u,l,t),this.$$d[u]=l,(o=this.$$c)==null||o.$set({[u]:l})}})}),i.forEach(u=>{Object.defineProperty(c.prototype,u,{get(){var l;return(l=this.$$c)==null?void 0:l[u]}})}),e.element=c,c}class Nt{constructor(){$(this,"$$");$(this,"$$set")}$destroy(){Vt(this,1),this.$destroy=p}$on(t,n){if(!Y(n))return p;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const r=i.indexOf(n);r!==-1&&i.splice(r,1)}}$set(t){this.$$set&&!ht(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const At="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(At);function Ht(e){$t(e,"svelte-1nj5tcr",".CashierVideoWrapper{position:fixed;width:100%;height:calc(100% - 55px);left:0;top:55px;z-index:5;background-color:var(--mmw--color-grey-light, #f3f6f9)}.CashierVideoWrapperDesktop{height:calc(100% - 110px);top:110px}.CashierVideoHeader{width:100%;height:29px;position:relative;text-transform:uppercase;text-align:right;background-color:var(--mmw--color-grey-light, #f3f6f9);font-size:var(--emw--font-size-medium, 16px);z-index:6}.CashierVideoHeader svg{padding:8px 8px 8px 15px}.CashierVideo video{object-fit:contain;width:100%;height:100%;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.CashierVideo svg{cursor:pointer;margin-left:auto;position:absolute;right:0;z-index:6;padding:5px 13px}")}function G(e){let t,n,i,r,s,c,u,l=!e[2]&&K(e),o=e[2]&&Q(e);return{c(){t=_("div"),l&&l.c(),n=F(),i=_("div"),o&&o.c(),r=F(),s=_("video"),c=_("source"),q(c.src,u=e[0])||f(c,"src",u),s.autoplay=!0,s.controls=!0,f(s,"controlslist","nodownload"),f(s,"disablepictureinpicture",""),f(i,"class","CashierVideo"),f(t,"class","CashierVideoWrapper"),f(t,"part","CustomStylingContainer"),J(t,"CashierVideoWrapperDesktop",e[2])},m(d,h){k(d,t,h),l&&l.m(t,null),g(t,n),g(t,i),o&&o.m(i,null),g(i,r),g(i,s),g(s,c),e[10](t)},p(d,h){d[2]?l&&(l.d(1),l=null):l?l.p(d,h):(l=K(d),l.c(),l.m(t,n)),d[2]?o?o.p(d,h):(o=Q(d),o.c(),o.m(i,r)):o&&(o.d(1),o=null),h&1&&!q(c.src,u=d[0])&&f(c,"src",u),h&4&&J(t,"CashierVideoWrapperDesktop",d[2])},d(d){d&&C(t),l&&l.d(),o&&o.d(),e[10](null)}}}function K(e){let t,n,i,r,s;return{c(){t=_("div"),n=j("svg"),i=j("path"),f(i,"d","M12.7711 0.229435C13.0582 0.517619 13.0755 0.973729 12.8215 1.28141L12.7711 1.33721L7.60685 6.50068L12.7711 11.6641C12.9128 11.8066 12.9944 11.998 12.999 12.1988C13.0035 12.3997 12.9308 12.5946 12.7957 12.7433C12.6606 12.892 12.4735 12.9832 12.2731 12.9979C12.0728 13.0126 11.8744 12.9497 11.7191 12.8223L11.6633 12.7719L6.49958 7.60791L1.3359 12.7719C1.19349 12.9136 1.00207 12.9952 0.801203 12.9998C0.60034 13.0044 0.405398 12.9316 0.256676 12.7965C0.107955 12.6614 0.0168256 12.4744 0.00212786 12.274C-0.0125699 12.0736 0.0502877 11.8753 0.177706 11.7199L0.228086 11.6641L5.3923 6.50068L0.228086 1.33721C0.0863637 1.1948 0.00478102 1.00338 0.000203544 0.802529C-0.00437393 0.601674 0.0684038 0.40674 0.203491 0.258024C0.338579 0.109308 0.525647 0.0181829 0.726024 0.00348576C0.9264 -0.0112114 1.12476 0.0516437 1.28011 0.179057L1.3359 0.229435L6.49958 5.39345L11.6633 0.229435C11.736 0.156695 11.8223 0.0989949 11.9174 0.0596283C12.0124 0.0202617 12.1143 0 12.2172 0C12.32 0 12.4219 0.0202617 12.5169 0.0596283C12.612 0.0989949 12.6983 0.156695 12.7711 0.229435Z"),f(i,"fill","#111111"),f(n,"xmlns","http://www.w3.org/2000/svg"),f(n,"width","13"),f(n,"height","13"),f(n,"viewBox","0 0 13 13"),f(n,"fill","none"),f(t,"class","CashierVideoHeader")},m(c,u){k(c,t,u),g(t,n),g(n,i),r||(s=et(n,"click",e[8]),r=!0)},p,d(c){c&&C(t),r=!1,s()}}}function Q(e){let t,n,i,r;return{c(){t=j("svg"),n=j("path"),f(n,"d","M12.7711 0.229435C13.0582 0.517619 13.0755 0.973729 12.8215 1.28141L12.7711 1.33721L7.60685 6.50068L12.7711 11.6641C12.9128 11.8066 12.9944 11.998 12.999 12.1988C13.0035 12.3997 12.9308 12.5946 12.7957 12.7433C12.6606 12.892 12.4735 12.9832 12.2731 12.9979C12.0728 13.0126 11.8744 12.9497 11.7191 12.8223L11.6633 12.7719L6.49958 7.60791L1.3359 12.7719C1.19349 12.9136 1.00207 12.9952 0.801203 12.9998C0.60034 13.0044 0.405398 12.9316 0.256676 12.7965C0.107955 12.6614 0.0168256 12.4744 0.00212786 12.274C-0.0125699 12.0736 0.0502877 11.8753 0.177706 11.7199L0.228086 11.6641L5.3923 6.50068L0.228086 1.33721C0.0863637 1.1948 0.00478102 1.00338 0.000203544 0.802529C-0.00437393 0.601674 0.0684038 0.40674 0.203491 0.258024C0.338579 0.109308 0.525647 0.0181829 0.726024 0.00348576C0.9264 -0.0112114 1.12476 0.0516437 1.28011 0.179057L1.3359 0.229435L6.49958 5.39345L11.6633 0.229435C11.736 0.156695 11.8223 0.0989949 11.9174 0.0596283C12.0124 0.0202617 12.1143 0 12.2172 0C12.32 0 12.4219 0.0202617 12.5169 0.0596283C12.612 0.0989949 12.6983 0.156695 12.7711 0.229435Z"),f(n,"fill","#111111"),f(t,"xmlns","http://www.w3.org/2000/svg"),f(t,"width","13"),f(t,"height","13"),f(t,"viewBox","0 0 13 13"),f(t,"fill","none")},m(s,c){k(s,t,c),g(t,n),i||(r=et(t,"click",e[9]),i=!0)},p,d(s){s&&C(t),i=!1,r()}}}function Pt(e){let t,n=e[3]&&G(e);return{c(){n&&n.c(),t=pt()},m(i,r){n&&n.m(i,r),k(i,t,r)},p(i,[r]){i[3]?n?n.p(i,r):(n=G(i),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},i:p,o:p,d(i){i&&C(t),n&&n.d(i)}}}function Bt(e,t,n){let{clientstyling:i=""}=t,{clientstylingurl:r=""}=t,{ismobileview:s}=t,{videosrc:c}=t,u=!0,l=!1,o;const d=()=>{n(3,l=!1),window.postMessage({type:"ClosedCashierVideoModal"},window.location.href),window.postMessage({type:"EnableScroll"},window.location.href)},h=a=>{a.data.type=="ShowCashierVideoModal"&&(n(3,l=!0),window.postMessage({type:"DisableScroll"},window.location.href)),a.data.type=="HideCashierVideoModal"&&d()},x=()=>{n(2,u=s==="false")},E=()=>{let a=document.createElement("style");a.innerHTML=i,o.appendChild(a)},S=()=>{let a=new URL(r),T=document.createElement("style");fetch(a.href).then(N=>N.text()).then(N=>{T.innerHTML=N,setTimeout(()=>{o.appendChild(T)},1)})};yt(()=>(window.addEventListener("message",h,!1),()=>{window.removeEventListener("message",h)}));const st=()=>d(),rt=()=>d();function ot(a){P[a?"unshift":"push"](()=>{o=a,n(1,o)})}return e.$$set=a=>{"clientstyling"in a&&n(5,i=a.clientstyling),"clientstylingurl"in a&&n(6,r=a.clientstylingurl),"ismobileview"in a&&n(7,s=a.ismobileview),"videosrc"in a&&n(0,c=a.videosrc)},e.$$.update=()=>{e.$$.dirty&128&&s&&x(),e.$$.dirty&34&&i&&o&&E(),e.$$.dirty&66&&r&&o&&S()},[c,o,u,l,d,i,r,s,st,rt,ot]}class it extends Nt{constructor(t){super(),jt(this,t,Bt,Pt,at,{clientstyling:5,clientstylingurl:6,ismobileview:7,videosrc:0},Ht)}get clientstyling(){return this.$$.ctx[5]}set clientstyling(t){this.$$set({clientstyling:t}),b()}get clientstylingurl(){return this.$$.ctx[6]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),b()}get ismobileview(){return this.$$.ctx[7]}set ismobileview(t){this.$$set({ismobileview:t}),b()}get videosrc(){return this.$$.ctx[0]}set videosrc(t){this.$$set({videosrc:t}),b()}}Ot(it,{clientstyling:{},clientstylingurl:{},ismobileview:{},videosrc:{}},[],[],!0);exports.default=it;
@@ -1,667 +0,0 @@
1
- var ot = Object.defineProperty, lt = Object.defineProperties;
2
- var ct = Object.getOwnPropertyDescriptors;
3
- var R = Object.getOwnPropertySymbols;
4
- var ut = Object.prototype.hasOwnProperty, ft = Object.prototype.propertyIsEnumerable;
5
- var A = (e, t, n) => t in e ? ot(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, T = (e, t) => {
6
- for (var n in t || (t = {}))
7
- ut.call(t, n) && A(e, n, t[n]);
8
- if (R)
9
- for (var n of R(t))
10
- ft.call(t, n) && A(e, n, t[n]);
11
- return e;
12
- }, W = (e, t) => lt(e, ct(t));
13
- var $ = (e, t, n) => A(e, typeof t != "symbol" ? t + "" : t, n);
14
- var I = (e, t, n) => new Promise((i, r) => {
15
- var s = (l) => {
16
- try {
17
- u(n.next(l));
18
- } catch (o) {
19
- r(o);
20
- }
21
- }, c = (l) => {
22
- try {
23
- u(n.throw(l));
24
- } catch (o) {
25
- r(o);
26
- }
27
- }, u = (l) => l.done ? i(l.value) : Promise.resolve(l.value).then(s, c);
28
- u((n = n.apply(e, t)).next());
29
- });
30
- function p() {
31
- }
32
- function X(e) {
33
- return e();
34
- }
35
- function U() {
36
- return /* @__PURE__ */ Object.create(null);
37
- }
38
- function N(e) {
39
- e.forEach(X);
40
- }
41
- function Y(e) {
42
- return typeof e == "function";
43
- }
44
- function dt(e, t) {
45
- return e != e ? t == t : e !== t || e && typeof e == "object" || typeof e == "function";
46
- }
47
- let S;
48
- function q(e, t) {
49
- return e === t ? !0 : (S || (S = document.createElement("a")), S.href = t, e === S.href);
50
- }
51
- function at(e) {
52
- return Object.keys(e).length === 0;
53
- }
54
- function _(e, t) {
55
- e.appendChild(t);
56
- }
57
- function ht(e, t, n) {
58
- const i = $t(e);
59
- if (!i.getElementById(t)) {
60
- const r = g("style");
61
- r.id = t, r.textContent = n, _t(i, r);
62
- }
63
- }
64
- function $t(e) {
65
- if (!e) return document;
66
- const t = e.getRootNode ? e.getRootNode() : e.ownerDocument;
67
- return t && /** @type {ShadowRoot} */
68
- t.host ? (
69
- /** @type {ShadowRoot} */
70
- t
71
- ) : e.ownerDocument;
72
- }
73
- function _t(e, t) {
74
- return _(
75
- /** @type {Document} */
76
- e.head || e,
77
- t
78
- ), t.sheet;
79
- }
80
- function x(e, t, n) {
81
- e.insertBefore(t, n || null);
82
- }
83
- function C(e) {
84
- e.parentNode && e.parentNode.removeChild(e);
85
- }
86
- function g(e) {
87
- return document.createElement(e);
88
- }
89
- function j(e) {
90
- return document.createElementNS("http://www.w3.org/2000/svg", e);
91
- }
92
- function tt(e) {
93
- return document.createTextNode(e);
94
- }
95
- function F() {
96
- return tt(" ");
97
- }
98
- function gt() {
99
- return tt("");
100
- }
101
- function et(e, t, n, i) {
102
- return e.addEventListener(t, n, i), () => e.removeEventListener(t, n, i);
103
- }
104
- function f(e, t, n) {
105
- n == null ? e.removeAttribute(t) : e.getAttribute(t) !== n && e.setAttribute(t, n);
106
- }
107
- function pt(e) {
108
- return Array.from(e.childNodes);
109
- }
110
- function J(e, t, n) {
111
- e.classList.toggle(t, !!n);
112
- }
113
- function mt(e) {
114
- const t = {};
115
- return e.childNodes.forEach(
116
- /** @param {Element} node */
117
- (n) => {
118
- t[n.slot || "default"] = !0;
119
- }
120
- ), t;
121
- }
122
- let L;
123
- function v(e) {
124
- L = e;
125
- }
126
- function wt() {
127
- if (!L) throw new Error("Function called outside component initialization");
128
- return L;
129
- }
130
- function bt(e) {
131
- wt().$$.on_mount.push(e);
132
- }
133
- const w = [], B = [];
134
- let y = [];
135
- const Z = [], yt = /* @__PURE__ */ Promise.resolve();
136
- let P = !1;
137
- function Ct() {
138
- P || (P = !0, yt.then(b));
139
- }
140
- function D(e) {
141
- y.push(e);
142
- }
143
- const H = /* @__PURE__ */ new Set();
144
- let m = 0;
145
- function b() {
146
- if (m !== 0)
147
- return;
148
- const e = L;
149
- do {
150
- try {
151
- for (; m < w.length; ) {
152
- const t = w[m];
153
- m++, v(t), vt(t.$$);
154
- }
155
- } catch (t) {
156
- throw w.length = 0, m = 0, t;
157
- }
158
- for (v(null), w.length = 0, m = 0; B.length; ) B.pop()();
159
- for (let t = 0; t < y.length; t += 1) {
160
- const n = y[t];
161
- H.has(n) || (H.add(n), n());
162
- }
163
- y.length = 0;
164
- } while (w.length);
165
- for (; Z.length; )
166
- Z.pop()();
167
- P = !1, H.clear(), v(e);
168
- }
169
- function vt(e) {
170
- if (e.fragment !== null) {
171
- e.update(), N(e.before_update);
172
- const t = e.dirty;
173
- e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(D);
174
- }
175
- }
176
- function Lt(e) {
177
- const t = [], n = [];
178
- y.forEach((i) => e.indexOf(i) === -1 ? t.push(i) : n.push(i)), n.forEach((i) => i()), y = t;
179
- }
180
- const xt = /* @__PURE__ */ new Set();
181
- function kt(e, t) {
182
- e && e.i && (xt.delete(e), e.i(t));
183
- }
184
- function Et(e, t, n) {
185
- const { fragment: i, after_update: r } = e.$$;
186
- i && i.m(t, n), D(() => {
187
- const s = e.$$.on_mount.map(X).filter(Y);
188
- e.$$.on_destroy ? e.$$.on_destroy.push(...s) : N(s), e.$$.on_mount = [];
189
- }), r.forEach(D);
190
- }
191
- function Vt(e, t) {
192
- const n = e.$$;
193
- n.fragment !== null && (Lt(n.after_update), N(n.on_destroy), n.fragment && n.fragment.d(t), n.on_destroy = n.fragment = null, n.ctx = []);
194
- }
195
- function St(e, t) {
196
- e.$$.dirty[0] === -1 && (w.push(e), Ct(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31;
197
- }
198
- function Mt(e, t, n, i, r, s, c = null, u = [-1]) {
199
- const l = L;
200
- v(e);
201
- const o = e.$$ = {
202
- fragment: null,
203
- ctx: [],
204
- // state
205
- props: s,
206
- update: p,
207
- not_equal: r,
208
- bound: U(),
209
- // lifecycle
210
- on_mount: [],
211
- on_destroy: [],
212
- on_disconnect: [],
213
- before_update: [],
214
- after_update: [],
215
- context: new Map(t.context || (l ? l.$$.context : [])),
216
- // everything else
217
- callbacks: U(),
218
- dirty: u,
219
- skip_bound: !1,
220
- root: t.target || l.$$.root
221
- };
222
- c && c(o.root);
223
- let d = !1;
224
- if (o.ctx = n ? n(e, t.props || {}, (h, k, ...E) => {
225
- const V = E.length ? E[0] : k;
226
- return o.ctx && r(o.ctx[h], o.ctx[h] = V) && (!o.skip_bound && o.bound[h] && o.bound[h](V), d && St(e, h)), k;
227
- }) : [], o.update(), d = !0, N(o.before_update), o.fragment = i ? i(o.ctx) : !1, t.target) {
228
- if (t.hydrate) {
229
- const h = pt(t.target);
230
- o.fragment && o.fragment.l(h), h.forEach(C);
231
- } else
232
- o.fragment && o.fragment.c();
233
- t.intro && kt(e.$$.fragment), Et(e, t.target, t.anchor), b();
234
- }
235
- v(l);
236
- }
237
- let nt;
238
- typeof HTMLElement == "function" && (nt = class extends HTMLElement {
239
- constructor(t, n, i) {
240
- super();
241
- /** The Svelte component constructor */
242
- $(this, "$$ctor");
243
- /** Slots */
244
- $(this, "$$s");
245
- /** The Svelte component instance */
246
- $(this, "$$c");
247
- /** Whether or not the custom element is connected */
248
- $(this, "$$cn", !1);
249
- /** Component props data */
250
- $(this, "$$d", {});
251
- /** `true` if currently in the process of reflecting component props back to attributes */
252
- $(this, "$$r", !1);
253
- /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
254
- $(this, "$$p_d", {});
255
- /** @type {Record<string, Function[]>} Event listeners */
256
- $(this, "$$l", {});
257
- /** @type {Map<Function, Function>} Event listener unsubscribe functions */
258
- $(this, "$$l_u", /* @__PURE__ */ new Map());
259
- this.$$ctor = t, this.$$s = n, i && this.attachShadow({ mode: "open" });
260
- }
261
- addEventListener(t, n, i) {
262
- if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(n), this.$$c) {
263
- const r = this.$$c.$on(t, n);
264
- this.$$l_u.set(n, r);
265
- }
266
- super.addEventListener(t, n, i);
267
- }
268
- removeEventListener(t, n, i) {
269
- if (super.removeEventListener(t, n, i), this.$$c) {
270
- const r = this.$$l_u.get(n);
271
- r && (r(), this.$$l_u.delete(n));
272
- }
273
- }
274
- connectedCallback() {
275
- return I(this, null, function* () {
276
- if (this.$$cn = !0, !this.$$c) {
277
- let t = function(s) {
278
- return () => {
279
- let c;
280
- return {
281
- c: function() {
282
- c = g("slot"), s !== "default" && f(c, "name", s);
283
- },
284
- /**
285
- * @param {HTMLElement} target
286
- * @param {HTMLElement} [anchor]
287
- */
288
- m: function(o, d) {
289
- x(o, c, d);
290
- },
291
- d: function(o) {
292
- o && C(c);
293
- }
294
- };
295
- };
296
- };
297
- if (yield Promise.resolve(), !this.$$cn || this.$$c)
298
- return;
299
- const n = {}, i = mt(this);
300
- for (const s of this.$$s)
301
- s in i && (n[s] = [t(s)]);
302
- for (const s of this.attributes) {
303
- const c = this.$$g_p(s.name);
304
- c in this.$$d || (this.$$d[c] = M(c, s.value, this.$$p_d, "toProp"));
305
- }
306
- for (const s in this.$$p_d)
307
- !(s in this.$$d) && this[s] !== void 0 && (this.$$d[s] = this[s], delete this[s]);
308
- this.$$c = new this.$$ctor({
309
- target: this.shadowRoot || this,
310
- props: W(T({}, this.$$d), {
311
- $$slots: n,
312
- $$scope: {
313
- ctx: []
314
- }
315
- })
316
- });
317
- const r = () => {
318
- this.$$r = !0;
319
- for (const s in this.$$p_d)
320
- if (this.$$d[s] = this.$$c.$$.ctx[this.$$c.$$.props[s]], this.$$p_d[s].reflect) {
321
- const c = M(
322
- s,
323
- this.$$d[s],
324
- this.$$p_d,
325
- "toAttribute"
326
- );
327
- c == null ? this.removeAttribute(this.$$p_d[s].attribute || s) : this.setAttribute(this.$$p_d[s].attribute || s, c);
328
- }
329
- this.$$r = !1;
330
- };
331
- this.$$c.$$.after_update.push(r), r();
332
- for (const s in this.$$l)
333
- for (const c of this.$$l[s]) {
334
- const u = this.$$c.$on(s, c);
335
- this.$$l_u.set(c, u);
336
- }
337
- this.$$l = {};
338
- }
339
- });
340
- }
341
- // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
342
- // and setting attributes through setAttribute etc, this is helpful
343
- attributeChangedCallback(t, n, i) {
344
- var r;
345
- this.$$r || (t = this.$$g_p(t), this.$$d[t] = M(t, i, this.$$p_d, "toProp"), (r = this.$$c) == null || r.$set({ [t]: this.$$d[t] }));
346
- }
347
- disconnectedCallback() {
348
- this.$$cn = !1, Promise.resolve().then(() => {
349
- !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$c = void 0);
350
- });
351
- }
352
- $$g_p(t) {
353
- return Object.keys(this.$$p_d).find(
354
- (n) => this.$$p_d[n].attribute === t || !this.$$p_d[n].attribute && n.toLowerCase() === t
355
- ) || t;
356
- }
357
- });
358
- function M(e, t, n, i) {
359
- var s;
360
- const r = (s = n[e]) == null ? void 0 : s.type;
361
- if (t = r === "Boolean" && typeof t != "boolean" ? t != null : t, !i || !n[e])
362
- return t;
363
- if (i === "toAttribute")
364
- switch (r) {
365
- case "Object":
366
- case "Array":
367
- return t == null ? null : JSON.stringify(t);
368
- case "Boolean":
369
- return t ? "" : null;
370
- case "Number":
371
- return t == null ? null : t;
372
- default:
373
- return t;
374
- }
375
- else
376
- switch (r) {
377
- case "Object":
378
- case "Array":
379
- return t && JSON.parse(t);
380
- case "Boolean":
381
- return t;
382
- case "Number":
383
- return t != null ? +t : t;
384
- default:
385
- return t;
386
- }
387
- }
388
- function jt(e, t, n, i, r, s) {
389
- let c = class extends nt {
390
- constructor() {
391
- super(e, n, r), this.$$p_d = t;
392
- }
393
- static get observedAttributes() {
394
- return Object.keys(t).map(
395
- (u) => (t[u].attribute || u).toLowerCase()
396
- );
397
- }
398
- };
399
- return Object.keys(t).forEach((u) => {
400
- Object.defineProperty(c.prototype, u, {
401
- get() {
402
- return this.$$c && u in this.$$c ? this.$$c[u] : this.$$d[u];
403
- },
404
- set(l) {
405
- var o;
406
- l = M(u, l, t), this.$$d[u] = l, (o = this.$$c) == null || o.$set({ [u]: l });
407
- }
408
- });
409
- }), i.forEach((u) => {
410
- Object.defineProperty(c.prototype, u, {
411
- get() {
412
- var l;
413
- return (l = this.$$c) == null ? void 0 : l[u];
414
- }
415
- });
416
- }), e.element = /** @type {any} */
417
- c, c;
418
- }
419
- class Nt {
420
- constructor() {
421
- /**
422
- * ### PRIVATE API
423
- *
424
- * Do not use, may change at any time
425
- *
426
- * @type {any}
427
- */
428
- $(this, "$$");
429
- /**
430
- * ### PRIVATE API
431
- *
432
- * Do not use, may change at any time
433
- *
434
- * @type {any}
435
- */
436
- $(this, "$$set");
437
- }
438
- /** @returns {void} */
439
- $destroy() {
440
- Vt(this, 1), this.$destroy = p;
441
- }
442
- /**
443
- * @template {Extract<keyof Events, string>} K
444
- * @param {K} type
445
- * @param {((e: Events[K]) => void) | null | undefined} callback
446
- * @returns {() => void}
447
- */
448
- $on(t, n) {
449
- if (!Y(n))
450
- return p;
451
- const i = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
452
- return i.push(n), () => {
453
- const r = i.indexOf(n);
454
- r !== -1 && i.splice(r, 1);
455
- };
456
- }
457
- /**
458
- * @param {Partial<Props>} props
459
- * @returns {void}
460
- */
461
- $set(t) {
462
- this.$$set && !at(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
463
- }
464
- }
465
- const Ot = "4";
466
- typeof window != "undefined" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Ot);
467
- function At(e) {
468
- ht(e, "svelte-1nj5tcr", ".CashierVideoWrapper{position:fixed;width:100%;height:calc(100% - 55px);left:0;top:55px;z-index:5;background-color:var(--mmw--color-grey-light, #f3f6f9)}.CashierVideoWrapperDesktop{height:calc(100% - 110px);top:110px}.CashierVideoHeader{width:100%;height:29px;position:relative;text-transform:uppercase;text-align:right;background-color:var(--mmw--color-grey-light, #f3f6f9);font-size:var(--emw--font-size-medium, 16px);z-index:6}.CashierVideoHeader svg{padding:8px 8px 8px 15px}.CashierVideo video{object-fit:contain;width:100%;height:100%;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.CashierVideo svg{cursor:pointer;margin-left:auto;position:absolute;right:0;z-index:6;padding:5px 13px}");
469
- }
470
- function G(e) {
471
- let t, n, i, r, s, c, u, l = !/*desktopView*/
472
- e[2] && K(e), o = (
473
- /*desktopView*/
474
- e[2] && Q(e)
475
- );
476
- return {
477
- c() {
478
- t = g("div"), l && l.c(), n = F(), i = g("div"), o && o.c(), r = F(), s = g("video"), c = g("source"), q(c.src, u = /*videosrc*/
479
- e[0]) || f(c, "src", u), s.autoplay = !0, s.controls = !0, f(s, "controlslist", "nodownload"), f(s, "disablepictureinpicture", ""), f(i, "class", "CashierVideo"), f(t, "class", "CashierVideoWrapper"), f(t, "part", "CustomStylingContainer"), J(
480
- t,
481
- "CashierVideoWrapperDesktop",
482
- /*desktopView*/
483
- e[2]
484
- );
485
- },
486
- m(d, h) {
487
- x(d, t, h), l && l.m(t, null), _(t, n), _(t, i), o && o.m(i, null), _(i, r), _(i, s), _(s, c), e[10](t);
488
- },
489
- p(d, h) {
490
- /*desktopView*/
491
- d[2] ? l && (l.d(1), l = null) : l ? l.p(d, h) : (l = K(d), l.c(), l.m(t, n)), /*desktopView*/
492
- d[2] ? o ? o.p(d, h) : (o = Q(d), o.c(), o.m(i, r)) : o && (o.d(1), o = null), h & /*videosrc*/
493
- 1 && !q(c.src, u = /*videosrc*/
494
- d[0]) && f(c, "src", u), h & /*desktopView*/
495
- 4 && J(
496
- t,
497
- "CashierVideoWrapperDesktop",
498
- /*desktopView*/
499
- d[2]
500
- );
501
- },
502
- d(d) {
503
- d && C(t), l && l.d(), o && o.d(), e[10](null);
504
- }
505
- };
506
- }
507
- function K(e) {
508
- let t, n, i, r, s;
509
- return {
510
- c() {
511
- t = g("div"), n = j("svg"), i = j("path"), f(i, "d", "M12.7711 0.229435C13.0582 0.517619 13.0755 0.973729 12.8215 1.28141L12.7711 1.33721L7.60685 6.50068L12.7711 11.6641C12.9128 11.8066 12.9944 11.998 12.999 12.1988C13.0035 12.3997 12.9308 12.5946 12.7957 12.7433C12.6606 12.892 12.4735 12.9832 12.2731 12.9979C12.0728 13.0126 11.8744 12.9497 11.7191 12.8223L11.6633 12.7719L6.49958 7.60791L1.3359 12.7719C1.19349 12.9136 1.00207 12.9952 0.801203 12.9998C0.60034 13.0044 0.405398 12.9316 0.256676 12.7965C0.107955 12.6614 0.0168256 12.4744 0.00212786 12.274C-0.0125699 12.0736 0.0502877 11.8753 0.177706 11.7199L0.228086 11.6641L5.3923 6.50068L0.228086 1.33721C0.0863637 1.1948 0.00478102 1.00338 0.000203544 0.802529C-0.00437393 0.601674 0.0684038 0.40674 0.203491 0.258024C0.338579 0.109308 0.525647 0.0181829 0.726024 0.00348576C0.9264 -0.0112114 1.12476 0.0516437 1.28011 0.179057L1.3359 0.229435L6.49958 5.39345L11.6633 0.229435C11.736 0.156695 11.8223 0.0989949 11.9174 0.0596283C12.0124 0.0202617 12.1143 0 12.2172 0C12.32 0 12.4219 0.0202617 12.5169 0.0596283C12.612 0.0989949 12.6983 0.156695 12.7711 0.229435Z"), f(i, "fill", "#111111"), f(n, "xmlns", "http://www.w3.org/2000/svg"), f(n, "width", "13"), f(n, "height", "13"), f(n, "viewBox", "0 0 13 13"), f(n, "fill", "none"), f(t, "class", "CashierVideoHeader");
512
- },
513
- m(c, u) {
514
- x(c, t, u), _(t, n), _(n, i), r || (s = et(
515
- n,
516
- "click",
517
- /*click_handler*/
518
- e[8]
519
- ), r = !0);
520
- },
521
- p,
522
- d(c) {
523
- c && C(t), r = !1, s();
524
- }
525
- };
526
- }
527
- function Q(e) {
528
- let t, n, i, r;
529
- return {
530
- c() {
531
- t = j("svg"), n = j("path"), f(n, "d", "M12.7711 0.229435C13.0582 0.517619 13.0755 0.973729 12.8215 1.28141L12.7711 1.33721L7.60685 6.50068L12.7711 11.6641C12.9128 11.8066 12.9944 11.998 12.999 12.1988C13.0035 12.3997 12.9308 12.5946 12.7957 12.7433C12.6606 12.892 12.4735 12.9832 12.2731 12.9979C12.0728 13.0126 11.8744 12.9497 11.7191 12.8223L11.6633 12.7719L6.49958 7.60791L1.3359 12.7719C1.19349 12.9136 1.00207 12.9952 0.801203 12.9998C0.60034 13.0044 0.405398 12.9316 0.256676 12.7965C0.107955 12.6614 0.0168256 12.4744 0.00212786 12.274C-0.0125699 12.0736 0.0502877 11.8753 0.177706 11.7199L0.228086 11.6641L5.3923 6.50068L0.228086 1.33721C0.0863637 1.1948 0.00478102 1.00338 0.000203544 0.802529C-0.00437393 0.601674 0.0684038 0.40674 0.203491 0.258024C0.338579 0.109308 0.525647 0.0181829 0.726024 0.00348576C0.9264 -0.0112114 1.12476 0.0516437 1.28011 0.179057L1.3359 0.229435L6.49958 5.39345L11.6633 0.229435C11.736 0.156695 11.8223 0.0989949 11.9174 0.0596283C12.0124 0.0202617 12.1143 0 12.2172 0C12.32 0 12.4219 0.0202617 12.5169 0.0596283C12.612 0.0989949 12.6983 0.156695 12.7711 0.229435Z"), f(n, "fill", "#111111"), f(t, "xmlns", "http://www.w3.org/2000/svg"), f(t, "width", "13"), f(t, "height", "13"), f(t, "viewBox", "0 0 13 13"), f(t, "fill", "none");
532
- },
533
- m(s, c) {
534
- x(s, t, c), _(t, n), i || (r = et(
535
- t,
536
- "click",
537
- /*click_handler_1*/
538
- e[9]
539
- ), i = !0);
540
- },
541
- p,
542
- d(s) {
543
- s && C(t), i = !1, r();
544
- }
545
- };
546
- }
547
- function Ht(e) {
548
- let t, n = (
549
- /*show*/
550
- e[3] && G(e)
551
- );
552
- return {
553
- c() {
554
- n && n.c(), t = gt();
555
- },
556
- m(i, r) {
557
- n && n.m(i, r), x(i, t, r);
558
- },
559
- p(i, [r]) {
560
- /*show*/
561
- i[3] ? n ? n.p(i, r) : (n = G(i), n.c(), n.m(t.parentNode, t)) : n && (n.d(1), n = null);
562
- },
563
- i: p,
564
- o: p,
565
- d(i) {
566
- i && C(t), n && n.d(i);
567
- }
568
- };
569
- }
570
- function Bt(e, t, n) {
571
- let { clientstyling: i = "" } = t, { clientstylingurl: r = "" } = t, { ismobileview: s } = t, { videosrc: c } = t, u = !0, l = !1, o;
572
- const d = () => {
573
- n(3, l = !1), window.postMessage({ type: "ClosedCashierVideoModal" }, window.location.href), window.postMessage({ type: "EnableScroll" }, window.location.href);
574
- }, h = (a) => {
575
- a.data.type == "ShowCashierVideoModal" && (n(3, l = !0), window.postMessage({ type: "DisableScroll" }, window.location.href)), a.data.type == "HideCashierVideoModal" && d();
576
- }, k = () => {
577
- n(2, u = s === "false");
578
- }, E = () => {
579
- let a = document.createElement("style");
580
- a.innerHTML = i, o.appendChild(a);
581
- }, V = () => {
582
- let a = new URL(r), z = document.createElement("style");
583
- fetch(a.href).then((O) => O.text()).then((O) => {
584
- z.innerHTML = O, setTimeout(
585
- () => {
586
- o.appendChild(z);
587
- },
588
- 1
589
- );
590
- });
591
- };
592
- bt(() => (window.addEventListener("message", h, !1), () => {
593
- window.removeEventListener("message", h);
594
- }));
595
- const it = () => d(), st = () => d();
596
- function rt(a) {
597
- B[a ? "unshift" : "push"](() => {
598
- o = a, n(1, o);
599
- });
600
- }
601
- return e.$$set = (a) => {
602
- "clientstyling" in a && n(5, i = a.clientstyling), "clientstylingurl" in a && n(6, r = a.clientstylingurl), "ismobileview" in a && n(7, s = a.ismobileview), "videosrc" in a && n(0, c = a.videosrc);
603
- }, e.$$.update = () => {
604
- e.$$.dirty & /*ismobileview*/
605
- 128 && s && k(), e.$$.dirty & /*clientstyling, customStylingContainer*/
606
- 34 && i && o && E(), e.$$.dirty & /*clientstylingurl, customStylingContainer*/
607
- 66 && r && o && V();
608
- }, [
609
- c,
610
- o,
611
- u,
612
- l,
613
- d,
614
- i,
615
- r,
616
- s,
617
- it,
618
- st,
619
- rt
620
- ];
621
- }
622
- class Pt extends Nt {
623
- constructor(t) {
624
- super(), Mt(
625
- this,
626
- t,
627
- Bt,
628
- Ht,
629
- dt,
630
- {
631
- clientstyling: 5,
632
- clientstylingurl: 6,
633
- ismobileview: 7,
634
- videosrc: 0
635
- },
636
- At
637
- );
638
- }
639
- get clientstyling() {
640
- return this.$$.ctx[5];
641
- }
642
- set clientstyling(t) {
643
- this.$$set({ clientstyling: t }), b();
644
- }
645
- get clientstylingurl() {
646
- return this.$$.ctx[6];
647
- }
648
- set clientstylingurl(t) {
649
- this.$$set({ clientstylingurl: t }), b();
650
- }
651
- get ismobileview() {
652
- return this.$$.ctx[7];
653
- }
654
- set ismobileview(t) {
655
- this.$$set({ ismobileview: t }), b();
656
- }
657
- get videosrc() {
658
- return this.$$.ctx[0];
659
- }
660
- set videosrc(t) {
661
- this.$$set({ videosrc: t }), b();
662
- }
663
- }
664
- jt(Pt, { clientstyling: {}, clientstylingurl: {}, ismobileview: {}, videosrc: {} }, [], [], !0);
665
- export {
666
- Pt as default
667
- };
@@ -1 +0,0 @@
1
- "use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/CashierVideoModal-CriB4Qhl.cjs")).then(({default:t})=>{!customElements.get("cashier-video-modal")&&customElements.define("cashier-video-modal",t.element)})}
@@ -1,16 +0,0 @@
1
- if (typeof window != "undefined") {
2
- let n = function(t) {
3
- return function(...s) {
4
- try {
5
- return t.apply(this, s);
6
- } catch (e) {
7
- if (e instanceof DOMException && e.message.includes("has already been used with this registry") || e.message.includes("Cannot define multiple custom elements with the same tag name"))
8
- return !1;
9
- throw e;
10
- }
11
- };
12
- };
13
- customElements.define = n(customElements.define), import("../components/CashierVideoModal-DzdA_jCG.js").then(({ default: t }) => {
14
- !customElements.get("cashier-video-modal") && customElements.define("cashier-video-modal", t.element);
15
- });
16
- }