japhy-custom-elements 1.0.16 → 1.0.18

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,336 @@
1
+ import { g as W, c as Y } from "./index-C-0y78a9.mjs";
2
+ import Z from "vue";
3
+ var R = { exports: {} };
4
+ (function(z, Q) {
5
+ /*!
6
+ * vue-awesome-swiper v4.1.1
7
+ * Copyright (c) Surmon. All rights reserved.
8
+ * Released under the MIT License.
9
+ * Surmon <https://github.com/surmon-china>
10
+ */
11
+ (function(w, p) {
12
+ z.exports = p(Z);
13
+ })(Y, function(w) {
14
+ w = w && Object.prototype.hasOwnProperty.call(w, "default") ? w.default : w;
15
+ var p;
16
+ (function(t) {
17
+ t.SwiperComponent = "Swiper", t.SwiperSlideComponent = "SwiperSlide", t.SwiperDirective = "swiper", t.SwiperInstance = "$swiper";
18
+ })(p || (p = {}));
19
+ var I = Object.freeze({
20
+ containerClass: "swiper-container",
21
+ wrapperClass: "swiper-wrapper",
22
+ slideClass: "swiper-slide"
23
+ }), b;
24
+ (function(t) {
25
+ t.Ready = "ready", t.ClickSlide = "clickSlide";
26
+ })(b || (b = {}));
27
+ var f;
28
+ (function(t) {
29
+ t.AutoUpdate = "autoUpdate", t.AutoDestroy = "autoDestroy", t.DeleteInstanceOnDestroy = "deleteInstanceOnDestroy", t.CleanupStylesOnDestroy = "cleanupStylesOnDestroy";
30
+ })(f || (f = {}));
31
+ var L = [
32
+ "init",
33
+ "beforeDestroy",
34
+ "slideChange",
35
+ "slideChangeTransitionStart",
36
+ "slideChangeTransitionEnd",
37
+ "slideNextTransitionStart",
38
+ "slideNextTransitionEnd",
39
+ "slidePrevTransitionStart",
40
+ "slidePrevTransitionEnd",
41
+ "transitionStart",
42
+ "transitionEnd",
43
+ "touchStart",
44
+ "touchMove",
45
+ "touchMoveOpposite",
46
+ "sliderMove",
47
+ "touchEnd",
48
+ "click",
49
+ "tap",
50
+ "doubleTap",
51
+ "imagesReady",
52
+ "progress",
53
+ "reachBeginning",
54
+ "reachEnd",
55
+ "fromEdge",
56
+ "setTranslate",
57
+ "setTransition",
58
+ "resize",
59
+ "observerUpdate",
60
+ "beforeLoopFix",
61
+ "loopFix"
62
+ ];
63
+ /*! *****************************************************************************
64
+ Copyright (c) Microsoft Corporation. All rights reserved.
65
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
66
+ this file except in compliance with the License. You may obtain a copy of the
67
+ License at http://www.apache.org/licenses/LICENSE-2.0
68
+
69
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
70
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
71
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
72
+ MERCHANTABLITY OR NON-INFRINGEMENT.
73
+
74
+ See the Apache Version 2.0 License for specific language governing permissions
75
+ and limitations under the License.
76
+ ***************************************************************************** */
77
+ function B() {
78
+ for (var t = 0, n = 0, e = arguments.length; n < e; n++) t += arguments[n].length;
79
+ for (var r = Array(t), a = 0, n = 0; n < e; n++)
80
+ for (var c = arguments[n], u = 0, _ = c.length; u < _; u++, a++)
81
+ r[a] = c[u];
82
+ return r;
83
+ }
84
+ var O = function(t) {
85
+ return t.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/\s+/g, "-").toLowerCase();
86
+ }, T = function(t, n, e) {
87
+ var r, a, c;
88
+ if (t && !t.destroyed) {
89
+ var u = ((r = n.composedPath) === null || r === void 0 ? void 0 : r.call(n)) || n.path;
90
+ if (n != null && n.target && u) {
91
+ var _ = Array.from(t.slides), i = Array.from(u);
92
+ if (_.includes(n.target) || i.some(function(v) {
93
+ return _.includes(v);
94
+ })) {
95
+ var l = t.clickedIndex, o = Number((c = (a = t.clickedSlide) === null || a === void 0 ? void 0 : a.dataset) === null || c === void 0 ? void 0 : c.swiperSlideIndex), s = Number.isInteger(o) ? o : null;
96
+ e(b.ClickSlide, l, s), e(O(b.ClickSlide), l, s);
97
+ }
98
+ }
99
+ }
100
+ }, k = function(t, n) {
101
+ L.forEach(function(e) {
102
+ t.on(e, function() {
103
+ for (var r = arguments, a = [], c = 0; c < arguments.length; c++)
104
+ a[c] = r[c];
105
+ n.apply(void 0, B([e], a));
106
+ var u = O(e);
107
+ u !== e && n.apply(void 0, B([u], a));
108
+ });
109
+ });
110
+ }, M = "instanceName";
111
+ function U(t, n) {
112
+ var e = function(i, l) {
113
+ var o, s, v, d, g = (s = (o = i.data) === null || o === void 0 ? void 0 : o.attrs) === null || s === void 0 ? void 0 : s[l];
114
+ return g !== void 0 ? g : (d = (v = i.data) === null || v === void 0 ? void 0 : v.attrs) === null || d === void 0 ? void 0 : d[O(l)];
115
+ }, r = function(i, l, o) {
116
+ return l.arg || e(o, M) || i.id || p.SwiperInstance;
117
+ }, a = function(i, l, o) {
118
+ var s = r(i, l, o);
119
+ return o.context[s] || null;
120
+ }, c = function(i) {
121
+ return i.value || n;
122
+ }, u = function(i) {
123
+ return [!0, void 0, null, ""].includes(i);
124
+ }, _ = function(i) {
125
+ var l, o, s = ((l = i.data) === null || l === void 0 ? void 0 : l.on) || ((o = i.componentOptions) === null || o === void 0 ? void 0 : o.listeners);
126
+ return function(v) {
127
+ for (var d = arguments, g = [], y = 1; y < arguments.length; y++)
128
+ g[y - 1] = d[y];
129
+ var h, C = (h = s) === null || h === void 0 ? void 0 : h[v];
130
+ C && C.fns.apply(C, g);
131
+ };
132
+ };
133
+ return {
134
+ // Init
135
+ bind: function(i, l, o) {
136
+ i.className.indexOf(I.containerClass) === -1 && (i.className += (i.className ? " " : "") + I.containerClass), i.addEventListener("click", function(s) {
137
+ var v = _(o), d = a(i, l, o);
138
+ T(d, s, v);
139
+ });
140
+ },
141
+ // DOM inserted
142
+ inserted: function(i, l, o) {
143
+ var s = o.context, v = c(l), d = r(i, l, o), g = _(o), y = s, h = y == null ? void 0 : y[d];
144
+ (!h || h.destroyed) && (h = new t(i, v), y[d] = h, k(h, g), g(b.Ready, h));
145
+ },
146
+ // On options changed or DOM updated
147
+ componentUpdated: function(i, l, o) {
148
+ var s, v, d, g, y, h, C, x, E, D, $, A, G = e(o, f.AutoUpdate);
149
+ if (u(G)) {
150
+ var S = a(i, l, o);
151
+ if (S) {
152
+ var K = c(l), j = K.loop;
153
+ j && ((v = (s = S) === null || s === void 0 ? void 0 : s.loopDestroy) === null || v === void 0 || v.call(s)), (d = S == null ? void 0 : S.update) === null || d === void 0 || d.call(S), (y = (g = S.navigation) === null || g === void 0 ? void 0 : g.update) === null || y === void 0 || y.call(g), (C = (h = S.pagination) === null || h === void 0 ? void 0 : h.render) === null || C === void 0 || C.call(h), (E = (x = S.pagination) === null || x === void 0 ? void 0 : x.update) === null || E === void 0 || E.call(x), j && (($ = (D = S) === null || D === void 0 ? void 0 : D.loopCreate) === null || $ === void 0 || $.call(D), (A = S == null ? void 0 : S.update) === null || A === void 0 || A.call(S));
154
+ }
155
+ }
156
+ },
157
+ // Destroy this directive
158
+ unbind: function(i, l, o) {
159
+ var s, v = e(o, f.AutoDestroy);
160
+ if (u(v)) {
161
+ var d = a(i, l, o);
162
+ d && d.initialized && ((s = d == null ? void 0 : d.destroy) === null || s === void 0 || s.call(d, u(e(o, f.DeleteInstanceOnDestroy)), u(e(o, f.CleanupStylesOnDestroy))));
163
+ }
164
+ }
165
+ };
166
+ }
167
+ var m;
168
+ (function(t) {
169
+ t.ParallaxBg = "parallax-bg", t.Pagination = "pagination", t.Scrollbar = "scrollbar", t.PrevButton = "button-prev", t.NextButton = "button-next";
170
+ })(m || (m = {}));
171
+ function P(t) {
172
+ var n;
173
+ return w.extend({
174
+ name: p.SwiperComponent,
175
+ props: (n = {
176
+ defaultOptions: {
177
+ type: Object,
178
+ required: !1,
179
+ default: function() {
180
+ return {};
181
+ }
182
+ },
183
+ // eslint-disable-next-line vue/require-default-prop
184
+ options: {
185
+ type: Object,
186
+ required: !1
187
+ }
188
+ }, n[f.AutoUpdate] = {
189
+ type: Boolean,
190
+ default: !0
191
+ }, // https://github.com/surmon-china/vue-awesome-swiper/pull/550/files
192
+ n[f.AutoDestroy] = {
193
+ type: Boolean,
194
+ default: !0
195
+ }, // https://github.com/surmon-china/vue-awesome-swiper/pull/388
196
+ n[f.DeleteInstanceOnDestroy] = {
197
+ type: Boolean,
198
+ required: !1,
199
+ default: !0
200
+ }, n[f.CleanupStylesOnDestroy] = {
201
+ type: Boolean,
202
+ required: !1,
203
+ default: !0
204
+ }, n),
205
+ data: function() {
206
+ var e;
207
+ return e = {}, e[p.SwiperInstance] = null, e;
208
+ },
209
+ computed: {
210
+ swiperInstance: {
211
+ cache: !1,
212
+ set: function(e) {
213
+ this[p.SwiperInstance] = e;
214
+ },
215
+ get: function() {
216
+ return this[p.SwiperInstance];
217
+ }
218
+ },
219
+ swiperOptions: function() {
220
+ return this.options || this.defaultOptions;
221
+ },
222
+ wrapperClass: function() {
223
+ return this.swiperOptions.wrapperClass || I.wrapperClass;
224
+ }
225
+ },
226
+ methods: {
227
+ // Feature: click event
228
+ handleSwiperClick: function(e) {
229
+ T(this.swiperInstance, e, this.$emit.bind(this));
230
+ },
231
+ autoReLoopSwiper: function() {
232
+ var e, r;
233
+ if (this.swiperInstance && this.swiperOptions.loop) {
234
+ var a = this.swiperInstance;
235
+ (e = a == null ? void 0 : a.loopDestroy) === null || e === void 0 || e.call(a), (r = a == null ? void 0 : a.loopCreate) === null || r === void 0 || r.call(a);
236
+ }
237
+ },
238
+ updateSwiper: function() {
239
+ var e, r, a, c, u, _, i, l;
240
+ this[f.AutoUpdate] && this.swiperInstance && (this.autoReLoopSwiper(), (r = (e = this.swiperInstance) === null || e === void 0 ? void 0 : e.update) === null || r === void 0 || r.call(e), (c = (a = this.swiperInstance.navigation) === null || a === void 0 ? void 0 : a.update) === null || c === void 0 || c.call(a), (_ = (u = this.swiperInstance.pagination) === null || u === void 0 ? void 0 : u.render) === null || _ === void 0 || _.call(u), (l = (i = this.swiperInstance.pagination) === null || i === void 0 ? void 0 : i.update) === null || l === void 0 || l.call(i));
241
+ },
242
+ destroySwiper: function() {
243
+ var e, r;
244
+ this[f.AutoDestroy] && this.swiperInstance && this.swiperInstance.initialized && ((r = (e = this.swiperInstance) === null || e === void 0 ? void 0 : e.destroy) === null || r === void 0 || r.call(e, this[f.DeleteInstanceOnDestroy], this[f.CleanupStylesOnDestroy]));
245
+ },
246
+ initSwiper: function() {
247
+ this.swiperInstance = new t(this.$el, this.swiperOptions), k(this.swiperInstance, this.$emit.bind(this)), this.$emit(b.Ready, this.swiperInstance);
248
+ }
249
+ },
250
+ mounted: function() {
251
+ this.swiperInstance || this.initSwiper();
252
+ },
253
+ // Update swiper when the parent component activated with `keep-alive`.
254
+ activated: function() {
255
+ this.updateSwiper();
256
+ },
257
+ updated: function() {
258
+ this.updateSwiper();
259
+ },
260
+ beforeDestroy: function() {
261
+ this.$nextTick(this.destroySwiper);
262
+ },
263
+ render: function(e) {
264
+ return e("div", {
265
+ staticClass: I.containerClass,
266
+ on: {
267
+ click: this.handleSwiperClick
268
+ }
269
+ }, [
270
+ this.$slots[m.ParallaxBg],
271
+ e("div", {
272
+ class: this.wrapperClass
273
+ }, this.$slots.default),
274
+ this.$slots[m.Pagination],
275
+ this.$slots[m.PrevButton],
276
+ this.$slots[m.NextButton],
277
+ this.$slots[m.Scrollbar]
278
+ ]);
279
+ }
280
+ });
281
+ }
282
+ var N = w.extend({
283
+ name: p.SwiperSlideComponent,
284
+ computed: {
285
+ slideClass: function() {
286
+ var t, n;
287
+ return ((n = (t = this.$parent) === null || t === void 0 ? void 0 : t.swiperOptions) === null || n === void 0 ? void 0 : n.slideClass) || I.slideClass;
288
+ }
289
+ },
290
+ methods: {
291
+ update: function() {
292
+ var t, n = this.$parent;
293
+ n[f.AutoUpdate] && ((t = n == null ? void 0 : n.swiperInstance) === null || t === void 0 || t.update());
294
+ }
295
+ },
296
+ mounted: function() {
297
+ this.update();
298
+ },
299
+ updated: function() {
300
+ this.update();
301
+ },
302
+ render: function(t) {
303
+ return t("div", {
304
+ class: this.slideClass
305
+ }, this.$slots.default);
306
+ }
307
+ }), q = function(t) {
308
+ var n = function(e, r) {
309
+ if (!n.installed) {
310
+ var a = P(t);
311
+ r && (a.options.props.defaultOptions.default = function() {
312
+ return r;
313
+ }), e.component(p.SwiperComponent, a), e.component(p.SwiperSlideComponent, N), e.directive(p.SwiperDirective, U(t, r)), n.installed = !0;
314
+ }
315
+ };
316
+ return n;
317
+ };
318
+ function F(t) {
319
+ var n;
320
+ return n = {
321
+ version: "4.1.1",
322
+ install: q(t),
323
+ directive: U(t)
324
+ }, n[p.SwiperComponent] = P(t), n[p.SwiperSlideComponent] = N, n;
325
+ }
326
+ return F;
327
+ });
328
+ })(R);
329
+ var H = R.exports;
330
+ const J = /* @__PURE__ */ W(H), tt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
331
+ __proto__: null,
332
+ default: J
333
+ }, Symbol.toStringTag, { value: "Module" }));
334
+ export {
335
+ tt as e
336
+ };