@versoly/plugins 0.0.6 → 0.0.8
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.
- package/dist/index.d.ts +600 -574
- package/dist/index.js +1063 -0
- package/package.json +13 -17
- package/dist/index.cjs +0 -1036
- package/dist/index.d.cts +0 -624
- package/dist/index.global.js +0 -1007
- package/dist/index.mjs +0 -1008
package/dist/index.global.js
DELETED
|
@@ -1,1007 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
(() => {
|
|
3
|
-
// src/config.ts
|
|
4
|
-
var defineConfig = (config) => {
|
|
5
|
-
return config;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
// src/plugins/calendly.ts
|
|
9
|
-
var calendly_default = defineConfig({
|
|
10
|
-
name: "calendly",
|
|
11
|
-
cdnUrls: [
|
|
12
|
-
{
|
|
13
|
-
url: "https://assets.calendly.com/assets/external/widget.js",
|
|
14
|
-
delay: true
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
url: "https://assets.calendly.com/assets/external/widget.css",
|
|
18
|
-
delay: true
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
js: `
|
|
22
|
-
document.querySelectorAll('[data-calendly-url]').forEach(elem => {
|
|
23
|
-
const url = elem.dataset.calendlyUrl;
|
|
24
|
-
|
|
25
|
-
if (!url) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
elem.addEventListener('click', e => {
|
|
30
|
-
e.preventDefault();
|
|
31
|
-
window.Calendly.initPopupWidget({ url, parentElement: elem });
|
|
32
|
-
})
|
|
33
|
-
});`,
|
|
34
|
-
checks: [{ plugin: "calendly" }, { html: "calendly" }],
|
|
35
|
-
options: {
|
|
36
|
-
name: "Calendly Options",
|
|
37
|
-
isShown: {
|
|
38
|
-
props: {
|
|
39
|
-
"data-calendly-url": true
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
fields: [
|
|
43
|
-
{
|
|
44
|
-
name: "Calendly Url",
|
|
45
|
-
propsName: "data-calendly-url",
|
|
46
|
-
type: "TextOption"
|
|
47
|
-
}
|
|
48
|
-
]
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
// src/plugins/swiper.ts
|
|
53
|
-
var js = `
|
|
54
|
-
window.vSwipers = [];
|
|
55
|
-
window.vGetElementsByToggle('swiper').forEach((elem) => {
|
|
56
|
-
let props = window.vGetElementOptions(elem);
|
|
57
|
-
|
|
58
|
-
if (props.pagination && props.pagination.renderBullet === 'number') {
|
|
59
|
-
props.pagination.renderBullet = function(index, className) {
|
|
60
|
-
const span = document.createElement('span');
|
|
61
|
-
span.className = className;
|
|
62
|
-
span.textContent = index + 1;
|
|
63
|
-
return span.outerHTML;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
window.vSwipers.push(new Swiper(elem, props));
|
|
68
|
-
});`;
|
|
69
|
-
var swiper_default = defineConfig({
|
|
70
|
-
name: "swiper",
|
|
71
|
-
cdnUrls: [
|
|
72
|
-
{
|
|
73
|
-
url: `https://cdnjs.cloudflare.com/ajax/libs/Swiper/9.3.2/swiper-bundle.min.js`,
|
|
74
|
-
inline: false,
|
|
75
|
-
defer: true
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
url: `https://cdnjs.cloudflare.com/ajax/libs/Swiper/9.3.2/swiper-bundle.min.css`
|
|
79
|
-
}
|
|
80
|
-
],
|
|
81
|
-
js,
|
|
82
|
-
checks: [{ plugin: "swiper" }]
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
// src/plugins/prism.ts
|
|
86
|
-
var prism_default = defineConfig({
|
|
87
|
-
name: "prism",
|
|
88
|
-
cdnUrls: [
|
|
89
|
-
{
|
|
90
|
-
url: "https://cdnjs.cloudflare.com/ajax/libs/prism/1.25.0/plugins/line-numbers/prism-line-numbers.min.css"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
url: "https://cdnjs.cloudflare.com/ajax/libs/prism/1.25.0/prism.min.js"
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
url: "https://cdnjs.cloudflare.com/ajax/libs/prism/1.25.0/plugins/autoloader/prism-autoloader.min.js"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
url: "https://cdnjs.cloudflare.com/ajax/libs/prism/1.25.0/plugins/line-numbers/prism-line-numbers.min.js"
|
|
100
|
-
}
|
|
101
|
-
],
|
|
102
|
-
js: `
|
|
103
|
-
document.querySelectorAll("pre > code[class^='language-']").forEach((elem) => {
|
|
104
|
-
elem.parentNode.innerHTML = elem.parentNode.innerHTML.trim();
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
let themeLink = window.vPrismTheme !== undefined ? window.vPrismTheme : 'default';
|
|
108
|
-
|
|
109
|
-
if (themeLink === 'default') {
|
|
110
|
-
themeLink = 'https://cdnjs.cloudflare.com/ajax/libs/prism/1.25.0/themes/prism.min.css';
|
|
111
|
-
} else if (themeLink && !themeLink.includes('https://')) {
|
|
112
|
-
themeLink = 'https://cdnjs.cloudflare.com/ajax/libs/prism-themes/1.9.0/prism-' + themeLink + '.min.css';
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
if (themeLink && themeLink.includes('https://')) {
|
|
116
|
-
const link = document.createElement('link');
|
|
117
|
-
link.rel = 'stylesheet';
|
|
118
|
-
link.href = themeLink;
|
|
119
|
-
document.head.appendChild(link);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
window.addEventListener('load', () => {
|
|
123
|
-
window.Prism && window.Prism.highlightAll();
|
|
124
|
-
});`,
|
|
125
|
-
checks: [{ html: "prism" }]
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
// src/plugins/tilt.ts
|
|
129
|
-
var js2 = `window.vTilts = [];
|
|
130
|
-
window.vGetElementsByToggle('tilt').forEach((elem) => {
|
|
131
|
-
VanillaTilt.init(elem, window.vGetElementOptions(elem));
|
|
132
|
-
window.vTilts.push(elem);
|
|
133
|
-
});`;
|
|
134
|
-
var tilt_default = defineConfig({
|
|
135
|
-
name: "tilt",
|
|
136
|
-
options: {
|
|
137
|
-
name: "Tilt",
|
|
138
|
-
previewInEditor: true,
|
|
139
|
-
isShown: {
|
|
140
|
-
props: {
|
|
141
|
-
"data-toggle": "tilt"
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
fields: [
|
|
145
|
-
{
|
|
146
|
-
name: "Speed",
|
|
147
|
-
type: "SliderPropOption",
|
|
148
|
-
propsName: "data-options.speed",
|
|
149
|
-
min: 0,
|
|
150
|
-
max: 3e3,
|
|
151
|
-
stepSize: 100,
|
|
152
|
-
defaultValue: 300
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
name: "Max Tilt",
|
|
156
|
-
type: "SliderPropOption",
|
|
157
|
-
propsName: "data-options.max",
|
|
158
|
-
min: 0,
|
|
159
|
-
max: 180,
|
|
160
|
-
stepSize: 1,
|
|
161
|
-
defaultValue: 35
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
name: "Reverse",
|
|
165
|
-
type: "BooleanPropOption",
|
|
166
|
-
propsName: "data-options.reverse",
|
|
167
|
-
defaultValue: false,
|
|
168
|
-
enabledValue: true,
|
|
169
|
-
inHeaderAction: true,
|
|
170
|
-
headerGroup: "Core"
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
name: "Transition",
|
|
174
|
-
type: "BooleanPropOption",
|
|
175
|
-
propsName: "data-options.transition",
|
|
176
|
-
defaultValue: true,
|
|
177
|
-
enabledValue: false,
|
|
178
|
-
inHeaderAction: true,
|
|
179
|
-
headerGroup: "Core"
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
label: "Easing",
|
|
183
|
-
name: "Easing",
|
|
184
|
-
propsName: "data-options.easing",
|
|
185
|
-
type: "TextOption",
|
|
186
|
-
defaultValue: "cubic-bezier(.03,.98,.52,.99)",
|
|
187
|
-
enabledValue: "cubic-bezier(.03,.98,.52,.99)",
|
|
188
|
-
inHeaderAction: true,
|
|
189
|
-
headerGroup: "Core"
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
name: "Full Page Listening",
|
|
193
|
-
type: "BooleanPropOption",
|
|
194
|
-
propsName: "data-options.full-page-listening",
|
|
195
|
-
defaultValue: false,
|
|
196
|
-
enabledValue: true,
|
|
197
|
-
inHeaderAction: true,
|
|
198
|
-
headerGroup: "Core"
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
name: "Start X",
|
|
202
|
-
type: "SliderPropOption",
|
|
203
|
-
propsName: "data-options.startX",
|
|
204
|
-
min: 0,
|
|
205
|
-
max: 180,
|
|
206
|
-
stepSize: 1,
|
|
207
|
-
defaultValue: 0,
|
|
208
|
-
enabledValue: 15,
|
|
209
|
-
inHeaderAction: true,
|
|
210
|
-
headerGroup: "Core"
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
name: "Start Y",
|
|
214
|
-
type: "SliderPropOption",
|
|
215
|
-
propsName: "data-options.startY",
|
|
216
|
-
min: 0,
|
|
217
|
-
max: 180,
|
|
218
|
-
stepSize: 1,
|
|
219
|
-
defaultValue: 0,
|
|
220
|
-
enabledValue: 15,
|
|
221
|
-
inHeaderAction: true,
|
|
222
|
-
headerGroup: "Core"
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
name: "Perspective",
|
|
226
|
-
type: "SliderPropOption",
|
|
227
|
-
propsName: "data-options.perspective",
|
|
228
|
-
min: 0,
|
|
229
|
-
max: 3e3,
|
|
230
|
-
stepSize: 1,
|
|
231
|
-
defaultValue: 1e3,
|
|
232
|
-
enabledValue: 1e3,
|
|
233
|
-
inHeaderAction: true,
|
|
234
|
-
headerGroup: "Core"
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
name: "Scale",
|
|
238
|
-
type: "SliderPropOption",
|
|
239
|
-
propsName: "data-options.scale",
|
|
240
|
-
min: 0.5,
|
|
241
|
-
max: 3,
|
|
242
|
-
stepSize: 0.1,
|
|
243
|
-
defaultValue: 1,
|
|
244
|
-
enabledValue: 1.5,
|
|
245
|
-
inHeaderAction: true,
|
|
246
|
-
headerGroup: "Core"
|
|
247
|
-
},
|
|
248
|
-
{
|
|
249
|
-
name: "Axis",
|
|
250
|
-
type: "IconButtonOption",
|
|
251
|
-
propsName: "data-options.axis",
|
|
252
|
-
options: ["x", "y"],
|
|
253
|
-
defaultValue: null,
|
|
254
|
-
enabledValue: "x",
|
|
255
|
-
inHeaderAction: true,
|
|
256
|
-
headerGroup: "Core"
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
name: "Glare",
|
|
260
|
-
type: "BooleanPropOption",
|
|
261
|
-
propsName: "data-options.glare",
|
|
262
|
-
defaultValue: false,
|
|
263
|
-
enabledValue: true,
|
|
264
|
-
inHeaderAction: true,
|
|
265
|
-
headerGroup: "Glare"
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
name: "Max Glare",
|
|
269
|
-
type: "SliderPropOption",
|
|
270
|
-
propsName: "data-options.max-glare",
|
|
271
|
-
min: 0.1,
|
|
272
|
-
max: 1,
|
|
273
|
-
stepSize: 0.1,
|
|
274
|
-
defaultValue: 1,
|
|
275
|
-
enabledValue: 0.5,
|
|
276
|
-
inHeaderAction: true,
|
|
277
|
-
headerGroup: "Glare"
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
name: "Reset",
|
|
281
|
-
type: "BooleanPropOption",
|
|
282
|
-
propsName: "data-options.reset",
|
|
283
|
-
defaultValue: true,
|
|
284
|
-
enabledValue: true,
|
|
285
|
-
inHeaderAction: true,
|
|
286
|
-
headerGroup: "Reset"
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
name: "Reset To Start",
|
|
290
|
-
type: "BooleanPropOption",
|
|
291
|
-
propsName: "data-options.reset-to-start",
|
|
292
|
-
defaultValue: true,
|
|
293
|
-
enabledValue: true,
|
|
294
|
-
inHeaderAction: true,
|
|
295
|
-
headerGroup: "Reset"
|
|
296
|
-
}
|
|
297
|
-
]
|
|
298
|
-
},
|
|
299
|
-
cdnUrls: [
|
|
300
|
-
{
|
|
301
|
-
url: "https://cdnjs.cloudflare.com/ajax/libs/vanilla-tilt/1.8.0/vanilla-tilt.js",
|
|
302
|
-
defer: true
|
|
303
|
-
}
|
|
304
|
-
],
|
|
305
|
-
js: js2,
|
|
306
|
-
checks: [{ plugin: "tilt" }],
|
|
307
|
-
components: [
|
|
308
|
-
{
|
|
309
|
-
name: "Tilt Image",
|
|
310
|
-
category: "Plugins",
|
|
311
|
-
html: `<img class="w-96" src="https://dummyimage.com/1000x600/edf2f7/0f1631&text=Placeholder" data-toggle="tilt" data-options="{'max':15,'reset':true}" />`
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
name: "Tilt Div",
|
|
315
|
-
category: "Plugins",
|
|
316
|
-
html: `<div class="w-full h-full" data-toggle="tilt" data-options="{'max':15,'reset':true}"></div>`
|
|
317
|
-
}
|
|
318
|
-
]
|
|
319
|
-
});
|
|
320
|
-
|
|
321
|
-
// src/plugins/typed.ts
|
|
322
|
-
var typed_default = defineConfig({
|
|
323
|
-
name: "typed",
|
|
324
|
-
options: {
|
|
325
|
-
name: "Typed Effect Options",
|
|
326
|
-
previewInEditor: true,
|
|
327
|
-
isShown: {
|
|
328
|
-
props: {
|
|
329
|
-
"data-toggle": "typed"
|
|
330
|
-
}
|
|
331
|
-
},
|
|
332
|
-
fields: [
|
|
333
|
-
{
|
|
334
|
-
type: "TextOption",
|
|
335
|
-
name: "Phrases",
|
|
336
|
-
tooltipProps: { content: "Use commas to add new words/phrases" },
|
|
337
|
-
placeholder: "second phrase., third phrase.",
|
|
338
|
-
propsName: "data-options.strings",
|
|
339
|
-
isArray: true
|
|
340
|
-
},
|
|
341
|
-
{
|
|
342
|
-
name: "Loop",
|
|
343
|
-
type: "BooleanPropOption",
|
|
344
|
-
propsName: "data-options.loop",
|
|
345
|
-
defaultValue: true,
|
|
346
|
-
enabledValue: true,
|
|
347
|
-
inHeaderAction: true,
|
|
348
|
-
headerGroup: "Core"
|
|
349
|
-
},
|
|
350
|
-
{
|
|
351
|
-
name: "Type Speed",
|
|
352
|
-
type: "SliderPropOption",
|
|
353
|
-
propsName: "data-options.typeSpeed",
|
|
354
|
-
min: 10,
|
|
355
|
-
max: 400,
|
|
356
|
-
stepSize: 10,
|
|
357
|
-
defaultValue: 100,
|
|
358
|
-
enabledValue: 100,
|
|
359
|
-
inHeaderAction: true,
|
|
360
|
-
headerGroup: "Core"
|
|
361
|
-
},
|
|
362
|
-
{
|
|
363
|
-
name: "Back Speed",
|
|
364
|
-
type: "SliderPropOption",
|
|
365
|
-
propsName: "data-options.backSpeed",
|
|
366
|
-
min: 10,
|
|
367
|
-
max: 400,
|
|
368
|
-
stepSize: 10,
|
|
369
|
-
defaultValue: 50,
|
|
370
|
-
enabledValue: 50,
|
|
371
|
-
inHeaderAction: true,
|
|
372
|
-
headerGroup: "Core"
|
|
373
|
-
},
|
|
374
|
-
{
|
|
375
|
-
name: "Start Delay",
|
|
376
|
-
type: "SliderPropOption",
|
|
377
|
-
propsName: "data-options.startDelay",
|
|
378
|
-
min: 50,
|
|
379
|
-
max: 3e3,
|
|
380
|
-
stepSize: 50,
|
|
381
|
-
defaultValue: 500,
|
|
382
|
-
enabledValue: 500,
|
|
383
|
-
inHeaderAction: true,
|
|
384
|
-
headerGroup: "Core"
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
name: "Back Delay",
|
|
388
|
-
type: "SliderPropOption",
|
|
389
|
-
propsName: "data-options.backDelay",
|
|
390
|
-
min: 50,
|
|
391
|
-
max: 3e3,
|
|
392
|
-
stepSize: 50,
|
|
393
|
-
defaultValue: 1e3,
|
|
394
|
-
enabledValue: 1e3,
|
|
395
|
-
inHeaderAction: true,
|
|
396
|
-
headerGroup: "Core"
|
|
397
|
-
}
|
|
398
|
-
]
|
|
399
|
-
},
|
|
400
|
-
cdnUrls: [
|
|
401
|
-
{
|
|
402
|
-
url: "https://cdnjs.cloudflare.com/ajax/libs/typed.js/2.0.11/typed.min.js",
|
|
403
|
-
defer: true
|
|
404
|
-
}
|
|
405
|
-
],
|
|
406
|
-
js: `
|
|
407
|
-
window.vGetElementsByToggle('typed').forEach((elem) => {
|
|
408
|
-
let options = window.vGetElementOptions(elem);
|
|
409
|
-
|
|
410
|
-
options.strings = [elem.innerHTML, ...options.strings];
|
|
411
|
-
elem.innerHTML = '';
|
|
412
|
-
|
|
413
|
-
new Typed(elem, {
|
|
414
|
-
typeSpeed: 100,
|
|
415
|
-
backSpeed: 50,
|
|
416
|
-
startDelay: 500,
|
|
417
|
-
backDelay: 1000,
|
|
418
|
-
loop: true,
|
|
419
|
-
...options
|
|
420
|
-
});
|
|
421
|
-
});`,
|
|
422
|
-
checks: [{ plugin: "typed" }],
|
|
423
|
-
components: [
|
|
424
|
-
// {
|
|
425
|
-
// name: 'Tilt Div',
|
|
426
|
-
// category: 'Plugins',
|
|
427
|
-
// html: `<div class="w-full h-full" data-toggle="tilt" data-options="{'max':15,'reset':true}"></div>`,
|
|
428
|
-
// },
|
|
429
|
-
],
|
|
430
|
-
displayNames: [
|
|
431
|
-
{
|
|
432
|
-
displayName: "Typed Effect",
|
|
433
|
-
property: "data-toggle",
|
|
434
|
-
value: "typed"
|
|
435
|
-
}
|
|
436
|
-
]
|
|
437
|
-
});
|
|
438
|
-
|
|
439
|
-
// src/plugins/countup.ts
|
|
440
|
-
var countup_default = defineConfig({
|
|
441
|
-
name: "countup",
|
|
442
|
-
cdnUrls: [
|
|
443
|
-
{
|
|
444
|
-
url: "https://cdnjs.cloudflare.com/ajax/libs/scrollReveal.js/3.4.0/scrollreveal.min.js"
|
|
445
|
-
},
|
|
446
|
-
{
|
|
447
|
-
url: "https://cdnjs.cloudflare.com/ajax/libs/countup.js/2.0.8/countUp.umd.min.js"
|
|
448
|
-
}
|
|
449
|
-
],
|
|
450
|
-
js: `window.scrollReveal = ScrollReveal();
|
|
451
|
-
|
|
452
|
-
window.countUpStart = (elem) => {
|
|
453
|
-
var startVal = elem.dataset.from ? +elem.dataset.from : 0
|
|
454
|
-
,endVal = elem.dataset.to ? +elem.dataset.to : 0
|
|
455
|
-
,duration = elem.dataset.duration ? +elem.dataset.duration : 2
|
|
456
|
-
,options = window.vGetElementOptions(elem);
|
|
457
|
-
const up = new countUp.CountUp(elem, endVal, {...options, startVal, duration});
|
|
458
|
-
up.start();
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
window.vGetElementsByToggle('countup').forEach(elem => {
|
|
462
|
-
scrollReveal.reveal(elem, {beforeReveal: window.countUpStart, duration: 0});
|
|
463
|
-
});`,
|
|
464
|
-
checks: [{ plugin: "countup" }],
|
|
465
|
-
options: {
|
|
466
|
-
name: "Countup Options",
|
|
467
|
-
isShown: {
|
|
468
|
-
props: {
|
|
469
|
-
"data-toggle": "countup"
|
|
470
|
-
}
|
|
471
|
-
},
|
|
472
|
-
fields: [
|
|
473
|
-
{
|
|
474
|
-
name: "Count From",
|
|
475
|
-
propsName: "data-from",
|
|
476
|
-
type: "NumberOption"
|
|
477
|
-
},
|
|
478
|
-
{
|
|
479
|
-
name: "Count To",
|
|
480
|
-
propsName: "data-to",
|
|
481
|
-
type: "NumberOption"
|
|
482
|
-
},
|
|
483
|
-
{
|
|
484
|
-
name: "Duration",
|
|
485
|
-
propsName: "data-duration",
|
|
486
|
-
type: "NumberOption",
|
|
487
|
-
placeholder: "2",
|
|
488
|
-
stepSize: 0.1
|
|
489
|
-
},
|
|
490
|
-
{
|
|
491
|
-
name: "Countup when Visible",
|
|
492
|
-
propsName: "data-aos",
|
|
493
|
-
options: [false, true],
|
|
494
|
-
type: "BooleanPropOption",
|
|
495
|
-
defaultValue: false
|
|
496
|
-
}
|
|
497
|
-
]
|
|
498
|
-
},
|
|
499
|
-
components: [
|
|
500
|
-
{
|
|
501
|
-
name: "Countup",
|
|
502
|
-
category: "Plugins",
|
|
503
|
-
html: `<h2 data-toggle="countup" data-aos data-aos-id="countup:in" data-from="100" data-to="800">100</h2>`
|
|
504
|
-
}
|
|
505
|
-
]
|
|
506
|
-
});
|
|
507
|
-
|
|
508
|
-
// src/plugins/countdown.ts
|
|
509
|
-
var js3 = `window.vGetElementsByToggle('countdown').forEach(elem => {
|
|
510
|
-
const deadline = new Date(elem.dataset.countdown).getTime();
|
|
511
|
-
|
|
512
|
-
let elementsByType = {};
|
|
513
|
-
elem.querySelectorAll('[data-countdown-type]').forEach(el => {
|
|
514
|
-
elementsByType[el.dataset.countdownType] = el;
|
|
515
|
-
});
|
|
516
|
-
|
|
517
|
-
const countdownFunc = () => {
|
|
518
|
-
let t = (deadline - new Date().getTime()) / 1000;
|
|
519
|
-
|
|
520
|
-
if (t < 0) {
|
|
521
|
-
clearInterval(x);
|
|
522
|
-
t = 0;
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
let valuesByType = {
|
|
526
|
-
seconds: t % 60,
|
|
527
|
-
minutes: (t / 60) % 60,
|
|
528
|
-
hours: (t / (60 * 60)) % 24,
|
|
529
|
-
days: t / (60 * 60 * 24),
|
|
530
|
-
};
|
|
531
|
-
|
|
532
|
-
Object.keys(valuesByType).forEach(type => {
|
|
533
|
-
if (elementsByType[type]) {
|
|
534
|
-
let value = Math.floor(valuesByType[type]);
|
|
535
|
-
if (value < 10) {
|
|
536
|
-
value = '0' + value;
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
elementsByType[type].innerHTML = value;
|
|
540
|
-
}
|
|
541
|
-
});
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
var x = setInterval(countdownFunc, 1000);
|
|
545
|
-
countdownFunc();
|
|
546
|
-
});
|
|
547
|
-
`;
|
|
548
|
-
var currentDate = /* @__PURE__ */ new Date();
|
|
549
|
-
var ISODateIn5Days = new Date(currentDate.getTime() + 5 * 24 * 60 * 60 * 1234).toISOString();
|
|
550
|
-
var countdown_default = defineConfig({
|
|
551
|
-
name: "countdown",
|
|
552
|
-
js: js3,
|
|
553
|
-
checks: [{ plugin: "countdown" }],
|
|
554
|
-
options: {
|
|
555
|
-
name: "Countdown",
|
|
556
|
-
isShown: {
|
|
557
|
-
props: {
|
|
558
|
-
"data-toggle": "countdown",
|
|
559
|
-
"data-countdown": true
|
|
560
|
-
}
|
|
561
|
-
},
|
|
562
|
-
fields: [
|
|
563
|
-
{
|
|
564
|
-
name: "Countdown Timer",
|
|
565
|
-
propsName: "data-countdown",
|
|
566
|
-
type: "DateTimePickerOption"
|
|
567
|
-
}
|
|
568
|
-
]
|
|
569
|
-
},
|
|
570
|
-
components: [
|
|
571
|
-
{
|
|
572
|
-
name: "Countdown",
|
|
573
|
-
category: "Plugins",
|
|
574
|
-
html: `<h2 class="font-semibold" data-toggle="countdown" data-countdown="${ISODateIn5Days}">
|
|
575
|
-
<span data-countdown-type="days">4</span>
|
|
576
|
-
<span class="opacity-20">:</span>
|
|
577
|
-
<span data-countdown-type="hours">1</span>
|
|
578
|
-
<span class="opacity-20">:</span>
|
|
579
|
-
<span data-countdown-type="minutes">0</span>
|
|
580
|
-
<span class="opacity-20">:</span>
|
|
581
|
-
<span data-countdown-type="seconds">0</span>
|
|
582
|
-
</h2>`
|
|
583
|
-
}
|
|
584
|
-
]
|
|
585
|
-
});
|
|
586
|
-
|
|
587
|
-
// src/plugins/finisher-header.ts
|
|
588
|
-
var finisher_header_default = defineConfig({
|
|
589
|
-
name: "finisher-header",
|
|
590
|
-
cdnUrls: [
|
|
591
|
-
{
|
|
592
|
-
url: "https://d1pnnwteuly8z3.cloudfront.net/js/finisher-header.es5.min.js",
|
|
593
|
-
defer: true
|
|
594
|
-
}
|
|
595
|
-
],
|
|
596
|
-
js: `document.querySelectorAll('.finisher-header').forEach(elem => {
|
|
597
|
-
let options = window.vGetElementOptions(elem);
|
|
598
|
-
new FinisherHeader(options);
|
|
599
|
-
});`,
|
|
600
|
-
checks: [{ html: "finisher-header" }],
|
|
601
|
-
components: [
|
|
602
|
-
{
|
|
603
|
-
name: "Finisher Header",
|
|
604
|
-
category: "Plugins",
|
|
605
|
-
html: `<div class="finisher-header" data-toggle="finisher-header" data-options="{'count':15,'size':{'min':2,'max':40,'pulse':0},'speed':{'x':{'min':0,'max':0.8},'y':{'min':0,'max':0.2}},'colors':{'background':'#fff','particles':['#ff926b','#87ddfe','#acaaff','#1bffc2','#f9a5fe']},'blending':'screen','opacity':{'center':1,'edge':1},'skew':-1,'shapes':['c','s','t']}"></div>`
|
|
606
|
-
}
|
|
607
|
-
]
|
|
608
|
-
});
|
|
609
|
-
|
|
610
|
-
// src/plugins/taos.ts
|
|
611
|
-
var js4 = `!function(){const e=(e,t)=>{let s=!1;return()=>{s||(e(),s=!0,setTimeout((()=>s=!1),t))}},t=e=>{e.className!==e.dataset.taosClass&&(e.className=e.dataset.taosClass)},s=e=>e.className=e.className.replaceAll("taos:",""),a=e=>(e.className.includes("taos-init")||(e.dataset.taosClass=e.className+" taos-init",t(e)),e.className+=" !duration-[0ms] !delay-[0ms]",s(e),{element:e,once:"1"===getComputedStyle(e)["animation-iteration-count"],offset:parseInt(e.dataset.taosOffset||0)});let n=[],i=window.innerWidth,o=window.scrollY;const l=e((()=>{n.forEach((e=>e.trigger=e.element.getBoundingClientRect().top-window.innerHeight+e.offset+o))}),250),r=()=>{n=[],document.querySelectorAll('[class*="taos"]').forEach((e=>n.push(a(e)))),l(),requestAnimationFrame(c)},c=()=>{o=window.scrollY,n.forEach((({element:e,trigger:a,once:n})=>{a<o?t(e):!n&&e.className.includes("taos:")&&s(e)})),l()};r(),addEventListener("scroll",e(c,32)),addEventListener("orientationchange",r),addEventListener("resize",((e,t)=>{let s=null;return()=>{clearTimeout(s),s=setTimeout(e,t)}})((()=>{i!==window.innerWidth&&(i=window.innerWidth,r())}),250)),new MutationObserver((e=>{e.forEach((({target:e})=>{e.className&&!e.className.includes("taos-init")&&e.className.includes("taos:")&&n.push(a(e))}))})).observe(document,{attributes:!0,childList:!0,subtree:!0})}();`;
|
|
612
|
-
var taos_default = defineConfig({
|
|
613
|
-
name: "taos",
|
|
614
|
-
css: `
|
|
615
|
-
html.js :where([class*="taos:"]:not(.taos-init)) {
|
|
616
|
-
visibility: hidden;
|
|
617
|
-
}`,
|
|
618
|
-
js: js4,
|
|
619
|
-
checks: [{ plugin: "taos" }, { html: "taos:" }],
|
|
620
|
-
safelist: ["!duration-[0ms]", "!delay-[0ms]"]
|
|
621
|
-
});
|
|
622
|
-
|
|
623
|
-
// src/plugins/tailtip.ts
|
|
624
|
-
var js5 = `window.vTailtips = [];
|
|
625
|
-
|
|
626
|
-
window.vGetElementsByToggle('tooltip').forEach((elem) => {
|
|
627
|
-
const tailtip = Tailtip(elem, window.vGetElementOptions(elem));
|
|
628
|
-
window.vTailtips.push(tailtip);
|
|
629
|
-
});`;
|
|
630
|
-
var tailtip_default = defineConfig({
|
|
631
|
-
name: "tailtip",
|
|
632
|
-
src: "https://d1pnnwteuly8z3.cloudfront.net/libs/tailtip/1.0.3/tailtip.js",
|
|
633
|
-
cdnUrls: [
|
|
634
|
-
{
|
|
635
|
-
url: "https://d1pnnwteuly8z3.cloudfront.net/libs/tailtip/1.0.3/tailtip.js",
|
|
636
|
-
defer: true
|
|
637
|
-
}
|
|
638
|
-
],
|
|
639
|
-
js: js5,
|
|
640
|
-
checks: [{ plugin: "tailtip" }],
|
|
641
|
-
components: [
|
|
642
|
-
{
|
|
643
|
-
name: "Info Tooltip",
|
|
644
|
-
category: "Plugins",
|
|
645
|
-
html: `<span class="flex w-4 h-4 bg-dark text-white items-center justify-center rounded-full text-xs font-medium" data-toggle="tooltip">i</span>
|
|
646
|
-
<div class="tooltip" role="tooltip">
|
|
647
|
-
<div class="tooltip-inner">
|
|
648
|
-
<span>This is a tooltip that is shown when hovered or clicked.</span>
|
|
649
|
-
</div>
|
|
650
|
-
<div class="tooltip-arrow"></div>
|
|
651
|
-
</div>`
|
|
652
|
-
}
|
|
653
|
-
],
|
|
654
|
-
options: {
|
|
655
|
-
name: "Tailtip Options",
|
|
656
|
-
// isShown: (element) => element['data-toggle'] === 'tooltip',
|
|
657
|
-
isShown: {
|
|
658
|
-
props: {
|
|
659
|
-
"data-toggle": "tooltip"
|
|
660
|
-
}
|
|
661
|
-
},
|
|
662
|
-
previewInEditor: true,
|
|
663
|
-
fields: [
|
|
664
|
-
{
|
|
665
|
-
name: "tailtip",
|
|
666
|
-
type: "TailtipOption"
|
|
667
|
-
},
|
|
668
|
-
{
|
|
669
|
-
name: "Placement",
|
|
670
|
-
propsName: "data-options.placement",
|
|
671
|
-
type: "DropdownPropOption",
|
|
672
|
-
inline: true,
|
|
673
|
-
noneDisplayValue: "Default",
|
|
674
|
-
options: [false, "top", "bottom", "left", "right"]
|
|
675
|
-
}
|
|
676
|
-
]
|
|
677
|
-
}
|
|
678
|
-
});
|
|
679
|
-
|
|
680
|
-
// src/plugins/versoly-marquee.ts
|
|
681
|
-
var src = "https://d1pnnwteuly8z3.cloudfront.net/libs/versoly-marquee/0.0.2/versoly-marquee.iife.js";
|
|
682
|
-
var js6 = `window.vMarquees = [];
|
|
683
|
-
window.vGetElementsByToggle('marquee').forEach((elem) => {
|
|
684
|
-
const marquee = new Marquee(elem, window.vGetElementOptions(elem));
|
|
685
|
-
window.vMarquees.push(marquee);
|
|
686
|
-
});`;
|
|
687
|
-
var versoly_marquee_default = defineConfig({
|
|
688
|
-
name: "versoly-marquee",
|
|
689
|
-
js: js6,
|
|
690
|
-
options: {
|
|
691
|
-
name: "Marquee",
|
|
692
|
-
previewInEditor: true,
|
|
693
|
-
isShown: {
|
|
694
|
-
props: {
|
|
695
|
-
"data-toggle": "marquee"
|
|
696
|
-
}
|
|
697
|
-
},
|
|
698
|
-
fields: [
|
|
699
|
-
{
|
|
700
|
-
name: "Loop",
|
|
701
|
-
type: "BooleanPropOption",
|
|
702
|
-
propsName: "data-options.loop",
|
|
703
|
-
defaultValue: true,
|
|
704
|
-
enabledValue: true,
|
|
705
|
-
inHeaderAction: true,
|
|
706
|
-
headerGroup: "Core"
|
|
707
|
-
},
|
|
708
|
-
{
|
|
709
|
-
name: "Duration",
|
|
710
|
-
type: "SliderPropOption",
|
|
711
|
-
propsName: "data-options.duration",
|
|
712
|
-
min: 1,
|
|
713
|
-
max: 20,
|
|
714
|
-
stepSize: 1,
|
|
715
|
-
defaultValue: 5
|
|
716
|
-
},
|
|
717
|
-
{
|
|
718
|
-
name: "Direction",
|
|
719
|
-
type: "IconButtonOption",
|
|
720
|
-
propsName: "data-options.direction",
|
|
721
|
-
options: ["ltr", "rtl", "ttb", "btt"],
|
|
722
|
-
defaultValue: "ltr"
|
|
723
|
-
},
|
|
724
|
-
{
|
|
725
|
-
name: "Pauseable",
|
|
726
|
-
type: "BooleanPropOption",
|
|
727
|
-
propsName: "data-options.pauseable",
|
|
728
|
-
defaultValue: true
|
|
729
|
-
},
|
|
730
|
-
{
|
|
731
|
-
name: "Iterations",
|
|
732
|
-
type: "SliderPropOption",
|
|
733
|
-
propsName: "data-options.iterations",
|
|
734
|
-
min: 1,
|
|
735
|
-
max: 5,
|
|
736
|
-
stepSize: 1,
|
|
737
|
-
defaultValue: 1,
|
|
738
|
-
enabledValue: 1,
|
|
739
|
-
inHeaderAction: true,
|
|
740
|
-
headerGroup: "Core"
|
|
741
|
-
}
|
|
742
|
-
]
|
|
743
|
-
},
|
|
744
|
-
checks: [{ plugin: "marquee" }],
|
|
745
|
-
src,
|
|
746
|
-
cdnUrls: [
|
|
747
|
-
{
|
|
748
|
-
url: src,
|
|
749
|
-
defer: true
|
|
750
|
-
}
|
|
751
|
-
],
|
|
752
|
-
displayNames: [
|
|
753
|
-
{
|
|
754
|
-
displayName: "Marquee",
|
|
755
|
-
property: "data-toggle",
|
|
756
|
-
value: "marquee"
|
|
757
|
-
}
|
|
758
|
-
]
|
|
759
|
-
});
|
|
760
|
-
|
|
761
|
-
// src/plugins/versoly-ui.ts
|
|
762
|
-
var versoly_ui_default = defineConfig({
|
|
763
|
-
name: "versoly-ui",
|
|
764
|
-
cdnUrls: [
|
|
765
|
-
{
|
|
766
|
-
url: "https://d1pnnwteuly8z3.cloudfront.net/libs/floating-ui/1.0.1/floating-ui.min.js",
|
|
767
|
-
defer: true
|
|
768
|
-
},
|
|
769
|
-
{
|
|
770
|
-
url: "https://d1pnnwteuly8z3.cloudfront.net/libs/versoly-ui/2.1.1/versoly-ui.js",
|
|
771
|
-
delay: true
|
|
772
|
-
}
|
|
773
|
-
]
|
|
774
|
-
});
|
|
775
|
-
|
|
776
|
-
// src/plugins/versoly-analytics.ts
|
|
777
|
-
var js7 = `!function(e){e.versoly.event=function(t){if(!("visibilityState"in document&&"prerender"===document.visibilityState||/bot|google|baidu|bing|msn|duckduckbot|teoma|slurp|yandex/i.test(navigator.userAgent)||e._phantom||e.__nightmare||e.navigator.webdriver||e.Cypress||""===e.location.host)){var n=new XMLHttpRequest;n.open("POST",e.versoly.url,!0),n.setRequestHeader("Content-Type","application/json; charset=UTF-8"),n.send(JSON.stringify({siteId:e.versoly.id,referrer:document.referrer,paramReferrer:"",hostname:e.location.hostname,pathname:e.location.pathname+e.location.search,width:e.innerWidth,height:e.innerHeight,tz:Intl.DateTimeFormat().resolvedOptions().timeZone,...t}))}}}(window),window.versoly.event({name: 'pageview'});`;
|
|
778
|
-
var versoly_analytics_default = defineConfig({
|
|
779
|
-
name: "versoly-analytics",
|
|
780
|
-
js: js7,
|
|
781
|
-
checks: [{ html: "/api/event" }]
|
|
782
|
-
});
|
|
783
|
-
|
|
784
|
-
// src/plugins/versoly-events.ts
|
|
785
|
-
var versoly_events_default = defineConfig({
|
|
786
|
-
name: "versoly-events",
|
|
787
|
-
js: `const eventElements = document.querySelectorAll('[data-eventid]');
|
|
788
|
-
for (const eventElement of eventElements) {
|
|
789
|
-
if (eventElement.tagName !== 'FORM') {
|
|
790
|
-
eventElement.addEventListener('click', function(e) {
|
|
791
|
-
const eventName = eventElement.getAttribute('data-eventid');
|
|
792
|
-
|
|
793
|
-
if (window.versoly) {
|
|
794
|
-
window.versoly.event({name: eventName})
|
|
795
|
-
}
|
|
796
|
-
if (window.gtag) {
|
|
797
|
-
window.gtag('event', eventName)
|
|
798
|
-
}
|
|
799
|
-
if (window.amplitude) {
|
|
800
|
-
window.amplitude.getInstance().logEvent(event);
|
|
801
|
-
}
|
|
802
|
-
})
|
|
803
|
-
}
|
|
804
|
-
}`,
|
|
805
|
-
checks: [{ html: "data-eventid" }]
|
|
806
|
-
});
|
|
807
|
-
|
|
808
|
-
// src/plugins/versoly-form.ts
|
|
809
|
-
var versoly_form_default = defineConfig({
|
|
810
|
-
name: "versoly-form",
|
|
811
|
-
checks: [{ plugin: "formid" }],
|
|
812
|
-
js: `window.vPageLoadedAt = Date.now();
|
|
813
|
-
window.vForms = window.vForms || {};
|
|
814
|
-
|
|
815
|
-
setTimeout(() => {
|
|
816
|
-
let inputs = [...document.getElementsByTagName("input")]
|
|
817
|
-
inputs.forEach(i => {
|
|
818
|
-
if (i.name === 'email_second' || i.name === 'name_second') {
|
|
819
|
-
i.setAttribute('aria-hidden', 'true')
|
|
820
|
-
i.setAttribute('tabindex', '-1')
|
|
821
|
-
i.setAttribute('autocomplete', 'false')
|
|
822
|
-
}
|
|
823
|
-
})
|
|
824
|
-
}, 3000)
|
|
825
|
-
|
|
826
|
-
const sendFormData = function (e, form) {
|
|
827
|
-
e.preventDefault();
|
|
828
|
-
const formId = form.dataset.formid;
|
|
829
|
-
let scriptsByForm = window.vForms[formId] || {}
|
|
830
|
-
|
|
831
|
-
if (window.vPageLoadedAt + 3000 > Date.now()) {
|
|
832
|
-
return null
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
let data = {
|
|
836
|
-
created: Date.now(),
|
|
837
|
-
url: location.pathname + location.search
|
|
838
|
-
}
|
|
839
|
-
|
|
840
|
-
const filteredForms = document.querySelectorAll('[data-formId="' + formId + '"]')
|
|
841
|
-
let formIndex = 0
|
|
842
|
-
filteredForms.forEach((f, index) => {
|
|
843
|
-
if (f === form) {
|
|
844
|
-
formIndex = index
|
|
845
|
-
}
|
|
846
|
-
})
|
|
847
|
-
|
|
848
|
-
const errorElement = document.querySelectorAll('[data-form-errorid="' + formId + '"]')[formIndex]
|
|
849
|
-
let inputs = [
|
|
850
|
-
...form.getElementsByTagName("input"),
|
|
851
|
-
...form.getElementsByTagName("textarea"),
|
|
852
|
-
...form.getElementsByTagName("select")
|
|
853
|
-
]
|
|
854
|
-
|
|
855
|
-
inputs.forEach(input => {
|
|
856
|
-
if (input.type === 'radio') {
|
|
857
|
-
if (input.checked) {
|
|
858
|
-
data[input.name] = input.value
|
|
859
|
-
}
|
|
860
|
-
return
|
|
861
|
-
}
|
|
862
|
-
if (input.tagName === 'SELECT') {
|
|
863
|
-
data[input.name] = input.options[input.selectedIndex].value
|
|
864
|
-
return
|
|
865
|
-
}
|
|
866
|
-
if (input.type === 'checkbox') {
|
|
867
|
-
data[input.name] = input.checked + ""
|
|
868
|
-
return
|
|
869
|
-
}
|
|
870
|
-
data[input.name] = input.value
|
|
871
|
-
})
|
|
872
|
-
|
|
873
|
-
if (!!data['email_second'] || !!data['name_second']) {
|
|
874
|
-
return null
|
|
875
|
-
}
|
|
876
|
-
delete data['email_second'];
|
|
877
|
-
delete data['name_second'];
|
|
878
|
-
|
|
879
|
-
if (scriptsByForm.pre) {
|
|
880
|
-
eval(scriptsByForm.pre)
|
|
881
|
-
}
|
|
882
|
-
|
|
883
|
-
const submitButton = form.querySelector(('button[type="submit"]'))
|
|
884
|
-
const buttonInnerHTML = submitButton.innerHTML
|
|
885
|
-
submitButton.disabled = true
|
|
886
|
-
|
|
887
|
-
let loadingButtonInnerHTML = '<i class="fa fa-spinner fa-spin"></i> Loading'
|
|
888
|
-
if (submitButton.getAttribute('data-loading-html')) {
|
|
889
|
-
loadingButtonInnerHTML = submitButton.getAttribute('data-loading-html')
|
|
890
|
-
}
|
|
891
|
-
submitButton.innerHTML = loadingButtonInnerHTML
|
|
892
|
-
|
|
893
|
-
data = JSON.stringify(data)
|
|
894
|
-
fetch('https://api.versoly.com/v1/form/submit', {
|
|
895
|
-
method: 'POST',
|
|
896
|
-
headers: {
|
|
897
|
-
'Content-Type': 'application/json'
|
|
898
|
-
},
|
|
899
|
-
body: JSON.stringify({formId: formId, data: data})
|
|
900
|
-
})
|
|
901
|
-
.then(function (response){
|
|
902
|
-
if (!response.ok) {
|
|
903
|
-
throw new Error('Bad response from server');
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
if (window.versoly && form.getAttribute('data-eventid')) {
|
|
907
|
-
window.versoly.event({name: form.getAttribute('data-eventid')})
|
|
908
|
-
}
|
|
909
|
-
|
|
910
|
-
if (scriptsByForm.post) {
|
|
911
|
-
eval(scriptsByForm.post)
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
if (form.dataset["successUrl"]) {
|
|
915
|
-
window.location.replace(form.dataset["successUrl"])
|
|
916
|
-
return
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
const successElement = document.querySelectorAll('[data-form-successid="' + formId + '"]')[formIndex]
|
|
920
|
-
|
|
921
|
-
if (successElement) {
|
|
922
|
-
successElement.classList.remove("d-js");
|
|
923
|
-
errorElement.classList.add("d-js");
|
|
924
|
-
form.classList.add("d-js");
|
|
925
|
-
|
|
926
|
-
successElement.classList.remove("d-none");
|
|
927
|
-
errorElement.classList.add("d-none");
|
|
928
|
-
form.classList.add("d-none");
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
submitButton.disabled = false
|
|
932
|
-
submitButton.innerHTML = buttonInnerHTML
|
|
933
|
-
})
|
|
934
|
-
.catch(function (error){
|
|
935
|
-
console.log(error)
|
|
936
|
-
if (errorElement) {
|
|
937
|
-
errorElement.classList.remove("d-js");
|
|
938
|
-
errorElement.classList.remove("d-none");
|
|
939
|
-
}
|
|
940
|
-
if (scriptsByForm.failed) {
|
|
941
|
-
eval(scriptsByForm.failed)
|
|
942
|
-
}
|
|
943
|
-
submitButton.disabled = false
|
|
944
|
-
submitButton.innerHTML = buttonInnerHTML
|
|
945
|
-
})
|
|
946
|
-
}
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
window.addFormListener = () => {
|
|
950
|
-
const forms = document.querySelectorAll('[data-formid]');
|
|
951
|
-
|
|
952
|
-
for (const form of forms) {
|
|
953
|
-
if (!form.getAttribute('data-has-form-eventlistener')) {
|
|
954
|
-
form.addEventListener("submit", function (e) {
|
|
955
|
-
sendFormData(e, form)
|
|
956
|
-
});
|
|
957
|
-
form.setAttribute('data-has-form-eventlistener', 'true')
|
|
958
|
-
}
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
window.addFormListener && window.addFormListener()
|
|
962
|
-
`
|
|
963
|
-
});
|
|
964
|
-
|
|
965
|
-
// src/plugins/versoly-modal.ts
|
|
966
|
-
var js8 = `window.vGetElementsByToggle('modal').forEach(elem => {
|
|
967
|
-
let options = window.vGetElementOptions(elem);
|
|
968
|
-
|
|
969
|
-
if (options.globalBlockId && window.vComponents[options.globalBlockId]) {
|
|
970
|
-
elem.dataset.html = window.vComponents[options.globalBlockId];
|
|
971
|
-
|
|
972
|
-
if (window.vComponents[options.globalBlockId].includes('data-formid')) {
|
|
973
|
-
options.beforeShown = 'addFormListener'
|
|
974
|
-
}
|
|
975
|
-
}
|
|
976
|
-
|
|
977
|
-
elem.dataset.options = JSON.stringify(options);
|
|
978
|
-
});`;
|
|
979
|
-
var versoly_modal_default = defineConfig({
|
|
980
|
-
name: "versoly-modal",
|
|
981
|
-
js: js8,
|
|
982
|
-
checks: [{ plugin: "modal" }]
|
|
983
|
-
});
|
|
984
|
-
|
|
985
|
-
// src/plugins/index.ts
|
|
986
|
-
var plugins = {
|
|
987
|
-
// external
|
|
988
|
-
calendly: calendly_default,
|
|
989
|
-
swiper: swiper_default,
|
|
990
|
-
prism: prism_default,
|
|
991
|
-
tilt: tilt_default,
|
|
992
|
-
typed: typed_default,
|
|
993
|
-
countup: countup_default,
|
|
994
|
-
countdown: countdown_default,
|
|
995
|
-
"finisher-header": finisher_header_default,
|
|
996
|
-
taos: taos_default,
|
|
997
|
-
tailtip: tailtip_default,
|
|
998
|
-
// versoly packages
|
|
999
|
-
"versoly-marquee": versoly_marquee_default,
|
|
1000
|
-
"versoly-ui": versoly_ui_default,
|
|
1001
|
-
// internal
|
|
1002
|
-
"versoly-analytics": versoly_analytics_default,
|
|
1003
|
-
"versoly-events": versoly_events_default,
|
|
1004
|
-
"versoly-form": versoly_form_default,
|
|
1005
|
-
"versoly-modal": versoly_modal_default
|
|
1006
|
-
};
|
|
1007
|
-
})();
|