packages
1 month ago
012778ff5828d0d1739f.bundle.js
1 month ago
02ab54a3328c55e115ea.bundle.min.js
1 month ago
0352e30f394e8e1dd4dc.bundle.js
2 months ago
06dbd869189450c5db6c.bundle.js
1 month ago
0982f37bec0944fbcb10.bundle.js
5 months ago
0bc41c4656ca54cf2aca.bundle.min.js
5 months ago
14bcbc91620c14a7112c.bundle.min.js
1 month ago
1564d2bfa4591bf857f3.bundle.min.js
5 months ago
197583acd246fea0e25d.bundle.js
6 months ago
20866d9d9e34bf3cb0a7.bundle.min.js
1 month ago
2140afa714e988f1069e.bundle.js
2 months ago
220e9c3d1caa01726b1a.bundle.js
1 month ago
29c342e9c10e3f13f498.bundle.js
1 month ago
2bac2875cdf51a1f8140.bundle.min.js
1 month ago
32f7c5e8db4c8976b254.bundle.js
2 months ago
35423d812dc1d52fdb27.bundle.min.js
5 months ago
397f2d183c19202777d6.bundle.min.js
3 months ago
397f2d183c19202777d6.bundle.min.js.LICENSE.txt
3 months ago
3c838288a9b7ddd2aea4.bundle.min.js
5 months ago
3d410a099008411bb011.bundle.js
6 months ago
3df4dbb5d612dbdab477.bundle.min.js
2 months ago
40d841f4b4ce7b1928f5.bundle.js
5 months ago
435080452e81c388e779.bundle.min.js
2 months ago
4927500be197e062162e.bundle.min.js
2 months ago
4c96eab5a48ee097dcb2.bundle.js
1 month ago
59845ab5a628d2b79f57.bundle.js
1 month ago
5b575dffd21b0cec15a5.bundle.js
1 month ago
6117d083decd13b6ed73.bundle.js
2 months ago
6844b6c0a66040e3ca12.bundle.js
2 months ago
687979ffbcfd58352c29.bundle.min.js
1 month ago
6936b079b4e7c28cd901.bundle.min.js
1 month ago
6a19e86dd8c1f9165dbe.bundle.js
6 months ago
6caa76d2f6eec6c4e665.bundle.js
3 months ago
6d09ff0398a56a60654b.bundle.min.js
3 months ago
6f779545aaa23e951088.bundle.min.js
2 months ago
73f63f9507c306870586.bundle.min.js
1 month ago
7698e0d50a8ad7ecc822.bundle.js
1 month ago
77b60be7dc925a32f560.bundle.min.js
1 month ago
78dd4dee6173d40eb75a.bundle.min.js
2 months ago
7dae73b622bebe8a5d94.bundle.js
5 months ago
8277989eebcfba278cb0.bundle.min.js
8 months ago
831aea236b1ddda24f0c.bundle.js
1 month ago
845418a5488e9937fc99.bundle.min.js
1 month ago
8ad22e7ba800b096313c.bundle.min.js
1 month ago
8c20eb5e96967d3016b2.bundle.js
1 month ago
8e5b42844d27eada9b53.bundle.min.js
2 months ago
8e80438d29fc79b648e5.bundle.js
2 months ago
8e8b47ad5b4e4d038c80.bundle.js
5 months ago
8ecfd8495b7ec419862a.bundle.js
5 months ago
979a9c03fe10da23400d.bundle.js
2 months ago
9b0cc3aa93cf287cd0a2.bundle.min.js
1 month ago
9b97a73ee8fdc5fb7dc3.bundle.js
3 months ago
9bd390911e34b349d8cb.bundle.min.js
2 months ago
9dcd9e88237da6496816.bundle.min.js
5 months ago
9e7e356552c03a622b0f.bundle.js
2 months ago
9ffe53753902b9aca176.bundle.js
1 month ago
a0f667abb781daab8e48.bundle.js
1 month ago
a9c3d5b02d26399aebfb.bundle.js
1 month ago
accordion.8b0db5058afeb74622f5.bundle.min.js
8 months ago
accordion.b9a0ab19c7c872c405d7.bundle.js
6 months ago
admin-feedback.js
8 months ago
admin-feedback.min.js
8 months ago
admin-feedback.strings.js
1 month ago
admin-modules.js
6 months ago
admin-modules.min.js
6 months ago
admin-modules.min.js.LICENSE.txt
10 months ago
admin-modules.strings.js
2 months ago
admin-notifications.js
8 months ago
admin-notifications.min.js
8 months ago
admin-notifications.strings.js
6 months ago
admin-top-bar.js
3 months ago
admin-top-bar.min.js
3 months ago
admin-top-bar.strings.js
6 months ago
admin.js
1 month ago
admin.min.js
1 month ago
admin.min.js.LICENSE.txt
10 months ago
admin.strings.js
6 months ago
aee13673e923469c3275.bundle.min.js
5 months ago
af05aac2eb23e7438265.bundle.js
1 month ago
ai-admin.js
6 months ago
ai-admin.min.js
6 months ago
ai-admin.min.js.LICENSE.txt
10 months ago
ai-admin.strings.js
6 months ago
ai-gutenberg.js
6 months ago
ai-gutenberg.min.js
6 months ago
ai-gutenberg.min.js.LICENSE.txt
10 months ago
ai-gutenberg.strings.js
6 months ago
ai-layout.js
3 months ago
ai-layout.min.js
3 months ago
ai-layout.min.js.LICENSE.txt
10 months ago
ai-layout.strings.js
1 month ago
ai-media-library.js
6 months ago
ai-media-library.min.js
6 months ago
ai-media-library.min.js.LICENSE.txt
10 months ago
ai-media-library.strings.js
6 months ago
ai-unify-product-images.js
6 months ago
ai-unify-product-images.min.js
6 months ago
ai-unify-product-images.min.js.LICENSE.txt
10 months ago
ai-unify-product-images.strings.js
6 months ago
ai.js
6 months ago
ai.min.js
6 months ago
ai.min.js.LICENSE.txt
10 months ago
ai.strings.js
1 month ago
alert.b4336601ffdb6086d1b5.bundle.min.js
1 month ago
alert.fd509aa768e7b35a8e32.bundle.js
6 months ago
announcements-app.js
1 month ago
announcements-app.min.js
1 month ago
announcements-app.min.js.LICENSE.txt
10 months ago
announcements-app.strings.js
6 months ago
app-loader.js
6 months ago
app-loader.min.js
8 months ago
app-loader.strings.js
1 month ago
app-packages.js
5 months ago
app-packages.min.js
5 months ago
app-packages.min.js.LICENSE.txt
10 months ago
app-packages.strings.js
1 month ago
app.js
1 month ago
app.min.js
1 month ago
app.min.js.LICENSE.txt
10 months ago
app.strings.js
1 month ago
atomic-widgets-action-link-handler.js
1 month ago
atomic-widgets-action-link-handler.min.js
1 month ago
atomic-widgets-editor.js
1 month ago
atomic-widgets-editor.min.js
1 month ago
atomic-widgets-editor.min.js.LICENSE.txt
4 months ago
atomic-widgets-editor.strings.js
3 months ago
atomic-widgets-form-handler.js
1 month ago
atomic-widgets-form-handler.min.js
1 month ago
atomic-widgets-form-handler.min.js.LICENSE.txt
1 month ago
b4d39e5186d768f79598.bundle.js
1 month ago
b96d70044d0d67c2df19.bundle.min.js
8 months ago
bcb5135af6b817bc9708.bundle.min.js
2 months ago
beta-tester.js
8 months ago
beta-tester.min.js
8 months ago
beta-tester.strings.js
6 months ago
bf2fa9f81b3d78f5858f.bundle.min.js
1 month ago
c13d205fa26f8af1ce7c.bundle.js
6 months ago
c73a7d15e48e3305780a.bundle.min.js
1 month ago
cf6ec600fcf4e08ba6d3.bundle.js
5 months ago
checklist.js
6 months ago
checklist.min.js
6 months ago
checklist.min.js.LICENSE.txt
10 months ago
checklist.strings.js
6 months ago
cloud-library-screenshot.js
6 months ago
cloud-library-screenshot.min.js
6 months ago
cloud-library-screenshot.min.js.LICENSE.txt
8 months ago
cloud-library-screenshot.strings.js
6 months ago
common-modules.js
3 months ago
common-modules.min.js
3 months ago
common-modules.strings.js
6 months ago
common.js
1 month ago
common.min.js
1 month ago
common.min.js.LICENSE.txt
10 months ago
common.strings.js
6 months ago
contact-buttons.086261d3e9c4d8037686.bundle.js
6 months ago
contact-buttons.e98d0220ce8c38404e7e.bundle.min.js
8 months ago
container-converter.js
8 months ago
container-converter.min.js
8 months ago
container-converter.strings.js
6 months ago
container-editor-handlers.a2e8e48d28c5544fb183.bundle.min.js
4 months ago
container-editor-handlers.e7e069c4e656425c51f8.bundle.js
4 months ago
counter.12335f45aaa79d244f24.bundle.min.js
8 months ago
counter.7310c276bc7865a3d438.bundle.js
6 months ago
d39cd4cb3d5b09b11c14.bundle.min.js
1 month ago
d42de03ef4a0f50e39ca.bundle.min.js
5 months ago
d4c67aa71d8173f6201f.bundle.js
2 months ago
d52aa05c75af56327744.bundle.js
6 months ago
d67ddd6f08b08392c42f.bundle.js
6 months ago
d8a330693f9211e2166e.bundle.min.js
1 month ago
daedc6797eaad5c82711.bundle.min.js
8 months ago
de7511b88f9ec0968921.bundle.js
1 month ago
design-system-sync.js
2 months ago
design-system-sync.min.js
2 months ago
design-system-sync.strings.js
3 months ago
dev-tools.js
8 months ago
dev-tools.min.js
8 months ago
dev-tools.strings.js
6 months ago
df2f2a2ae20e0181ec2d.bundle.js
2 months ago
df4ff09f2b412abf0cd3.bundle.js
1 month ago
dff865a4d52c12bcf996.bundle.min.js
1 month ago
e-home-screen.js
1 month ago
e-home-screen.min.js
1 month ago
e-home-screen.min.js.LICENSE.txt
1 month ago
e-home-screen.strings.js
1 month ago
e-react-promotions.js
2 months ago
e-react-promotions.min.js
2 months ago
e-react-promotions.min.js.LICENSE.txt
2 months ago
e-react-promotions.strings.js
6 months ago
e-wc-product-editor.js
6 months ago
e-wc-product-editor.min.js
8 months ago
e-wc-product-editor.min.js.LICENSE.txt
1 year ago
e-wc-product-editor.strings.js
6 months ago
e1cb4d726bb59646c677.bundle.min.js
8 months ago
e459c6c89c0c0899c850.bundle.js
6 months ago
e9a764dcd37c06162942.bundle.js
1 month ago
eb5018119ee87fd6a7fc.bundle.min.js
2 months ago
ec1ee92b2a471389c7b9.bundle.min.js
1 month ago
editor-document.js
6 months ago
editor-document.min.js
8 months ago
editor-document.strings.js
1 month ago
editor-environment-v2.js
8 months ago
editor-environment-v2.min.js
8 months ago
editor-environment-v2.strings.js
6 months ago
editor-interactions.js
1 month ago
editor-interactions.min.js
1 month ago
editor-interactions.strings.js
6 months ago
editor-loader-v1.js
8 months ago
editor-loader-v1.min.js
8 months ago
editor-loader-v1.strings.js
6 months ago
editor-loader-v2.js
8 months ago
editor-loader-v2.min.js
8 months ago
editor-loader-v2.strings.js
6 months ago
editor-modules.js
3 months ago
editor-modules.min.js
3 months ago
editor-modules.min.js.LICENSE.txt
10 months ago
editor-modules.strings.js
1 month ago
editor-notifications.js
8 months ago
editor-notifications.min.js
8 months ago
editor-notifications.strings.js
6 months ago
editor-one-admin.js
6 months ago
editor-one-admin.min.js
6 months ago
editor-one-admin.strings.js
6 months ago
editor-one-menu.js
5 months ago
editor-one-menu.min.js
5 months ago
editor-one-menu.strings.js
6 months ago
editor-one-sidebar-navigation.js
3 months ago
editor-one-sidebar-navigation.min.js
3 months ago
editor-one-sidebar-navigation.min.js.LICENSE.txt
6 months ago
editor-one-sidebar-navigation.strings.js
6 months ago
editor-one-top-bar.js
1 month ago
editor-one-top-bar.min.js
1 month ago
editor-one-top-bar.min.js.LICENSE.txt
5 months ago
editor-one-top-bar.strings.js
5 months ago
editor-v4-opt-in-alphachip.js
3 months ago
editor-v4-opt-in-alphachip.min.js
3 months ago
editor-v4-opt-in-alphachip.strings.js
3 months ago
editor-v4-opt-in.js
3 months ago
editor-v4-opt-in.min.js
3 months ago
editor-v4-opt-in.min.js.LICENSE.txt
6 months ago
editor-v4-opt-in.strings.js
3 months ago
editor.js
1 month ago
editor.min.js
1 month ago
editor.min.js.LICENSE.txt
6 months ago
editor.strings.js
1 month ago
ef2100ac3eda1a957819.bundle.min.js
8 months ago
ef35c83e4628f0a5c328.bundle.js
5 months ago
element-manager-admin.js
3 months ago
element-manager-admin.min.js
3 months ago
element-manager-admin.min.js.LICENSE.txt
10 months ago
element-manager-admin.strings.js
3 months ago
elementor-admin-bar.js
8 months ago
elementor-admin-bar.min.js
8 months ago
elementor-admin-bar.strings.js
6 months ago
f3b4453f66034a6655a7.bundle.min.js
1 month ago
f56b0d1257a5346afe64.bundle.min.js
2 months ago
fdda4547e887fbda71b3.bundle.js
2 months ago
fdf69f4e1f300fb27472.bundle.min.js
2 months ago
floating-bars.740d06d17cea5cebdb61.bundle.min.js
8 months ago
floating-bars.a6e6a043444b62f64f82.bundle.js
6 months ago
floating-elements-modal.js
3 months ago
floating-elements-modal.min.js
3 months ago
floating-elements-modal.strings.js
6 months ago
frontend-modules.js
3 months ago
frontend-modules.min.js
3 months ago
frontend.js
1 month ago
frontend.min.js
1 month ago
gutenberg.js
8 months ago
gutenberg.min.js
8 months ago
gutenberg.strings.js
3 months ago
image-carousel.6167d20b95b33386757b.bundle.min.js
8 months ago
image-carousel.8b25f3674c29b829a867.bundle.js
6 months ago
import-export-admin.js
6 months ago
import-export-admin.min.js
6 months ago
import-export-admin.strings.js
1 month ago
import-export-customization-admin.js
1 month ago
import-export-customization-admin.min.js
1 month ago
import-export-customization-admin.min.js.LICENSE.txt
8 months ago
import-export-customization-admin.strings.js
1 month ago
interactions-shared-utils.js
1 month ago
interactions-shared-utils.min.js
1 month ago
interactions-shared-utils.strings.js
3 months ago
interactions.js
1 month ago
interactions.min.js
1 month ago
interactions.strings.js
6 months ago
kit-elements-defaults-editor.js
6 months ago
kit-elements-defaults-editor.min.js
6 months ago
kit-elements-defaults-editor.min.js.LICENSE.txt
10 months ago
kit-elements-defaults-editor.strings.js
6 months ago
kit-library.a394510096bc447f636d.bundle.min.js
3 months ago
kit-library.b768952e1d4177aa68d8.bundle.js
3 months ago
lightbox.570c05c5a283cfb6b223.bundle.min.js
3 months ago
lightbox.d9ea72d232a14f514ee2.bundle.js
3 months ago
media-hints.js
8 months ago
media-hints.min.js
8 months ago
media-hints.strings.js
6 months ago
nested-accordion.294d40984397351fd0f5.bundle.min.js
4 months ago
nested-accordion.4340b64226322f36bcc0.bundle.js
4 months ago
nested-accordion.js
6 months ago
nested-accordion.min.js
6 months ago
nested-accordion.min.js.LICENSE.txt
10 months ago
nested-accordion.strings.js
6 months ago
nested-elements.js
3 months ago
nested-elements.min.js
3 months ago
nested-elements.strings.js
6 months ago
nested-tabs.7a338e6d7e060c473993.bundle.js
6 months ago
nested-tabs.a2401356d329f179475e.bundle.min.js
6 months ago
nested-tabs.js
6 months ago
nested-tabs.min.js
6 months ago
nested-tabs.min.js.LICENSE.txt
10 months ago
nested-tabs.strings.js
6 months ago
nested-title-keyboard-handler.0c2b498e3e0695a1dc19.bundle.js
6 months ago
nested-title-keyboard-handler.2a67d3cc630e11815acc.bundle.min.js
6 months ago
new-template.js
5 months ago
new-template.min.js
5 months ago
new-template.strings.js
6 months ago
notes.js
8 months ago
notes.min.js
8 months ago
notes.strings.js
6 months ago
pro-free-trial-popup.js
8 months ago
pro-free-trial-popup.min.js
8 months ago
pro-free-trial-popup.strings.js
6 months ago
pro-install-events.js
8 months ago
pro-install-events.min.js
8 months ago
pro-install-events.strings.js
6 months ago
progress.0ea083b809812c0e3aa1.bundle.min.js
8 months ago
progress.b1057ba870016558bce1.bundle.js
6 months ago
responsive-bar.js
8 months ago
responsive-bar.min.js
8 months ago
responsive-bar.strings.js
6 months ago
section-editor-handlers.53ffedef32043348b99b.bundle.min.js
8 months ago
section-editor-handlers.d65899d232b5339510d7.bundle.js
6 months ago
section-frontend-handlers.c3950c6b190ca134bc8d.bundle.js
6 months ago
section-frontend-handlers.d85ab872da118940910d.bundle.min.js
8 months ago
shared-editor-handlers.3023894100138e442ab0.bundle.js
4 months ago
shared-editor-handlers.cacdcbed391abf4b48b0.bundle.min.js
4 months ago
shared-frontend-handlers.03caa53373b56d3bab67.bundle.min.js
8 months ago
shared-frontend-handlers.3b079824c37a5fe2bdaa.bundle.js
6 months ago
styleguide-app-initiator.js
6 months ago
styleguide-app-initiator.min.js
6 months ago
styleguide-app-initiator.min.js.LICENSE.txt
10 months ago
styleguide-app-initiator.strings.js
6 months ago
styleguide-app.04340244193733d78622.bundle.min.js
8 months ago
styleguide-app.36ecabae74d9b87fc5a8.bundle.js
6 months ago
styleguide.js
8 months ago
styleguide.min.js
8 months ago
styleguide.strings.js
4 months ago
tabs-handler.js
1 month ago
tabs-handler.min.js
1 month ago
tabs-preview-handler.js
1 month ago
tabs-preview-handler.min.js
1 month ago
tabs.18344b05d8d1ea0702bc.bundle.min.js
8 months ago
tabs.40498fa771d612162c53.bundle.js
6 months ago
text-editor.0c9960167105139d27c9.bundle.js
6 months ago
text-editor.45609661e409413f1cef.bundle.min.js
8 months ago
text-path.6db73cc0a10a70f128eb.bundle.js
3 months ago
text-path.a67c1f3a78d208bc7e1b.bundle.min.js
3 months ago
toggle.2a177a3ef4785d3dfbc5.bundle.min.js
8 months ago
toggle.b75e66d2aca6f6ee742e.bundle.js
6 months ago
video.6e96510afa701d1f2ebc.bundle.js
6 months ago
video.86d44e46e43d0807e708.bundle.min.js
8 months ago
web-cli.js
6 months ago
web-cli.min.js
6 months ago
web-cli.min.js.LICENSE.txt
10 months ago
web-cli.strings.js
6 months ago
webpack.runtime.js
1 month ago
webpack.runtime.min.js
1 month ago
wp-audio.0ba9114964acf4c37ca2.bundle.js
6 months ago
wp-audio.c9624cb6e5dc9de86abd.bundle.min.js
8 months ago
youtube-handler.js
6 months ago
youtube-handler.min.js
6 months ago
shared-frontend-handlers.3b079824c37a5fe2bdaa.bundle.js
447 lines
| 1 | "use strict"; |
| 2 | (self["webpackChunkelementorFrontend"] = self["webpackChunkelementorFrontend"] || []).push([["shared-frontend-handlers"],{ |
| 3 | |
| 4 | /***/ "../assets/dev/js/frontend/handlers/background-slideshow.js": |
| 5 | /*!******************************************************************!*\ |
| 6 | !*** ../assets/dev/js/frontend/handlers/background-slideshow.js ***! |
| 7 | \******************************************************************/ |
| 8 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 9 | |
| 10 | |
| 11 | |
| 12 | Object.defineProperty(exports, "__esModule", ({ |
| 13 | value: true |
| 14 | })); |
| 15 | exports["default"] = void 0; |
| 16 | __webpack_require__(/*! core-js/modules/esnext.iterator.constructor.js */ "../node_modules/core-js/modules/esnext.iterator.constructor.js"); |
| 17 | __webpack_require__(/*! core-js/modules/esnext.iterator.for-each.js */ "../node_modules/core-js/modules/esnext.iterator.for-each.js"); |
| 18 | class BackgroundSlideshow extends elementorModules.frontend.handlers.SwiperBase { |
| 19 | getDefaultSettings() { |
| 20 | return { |
| 21 | classes: { |
| 22 | swiperContainer: 'elementor-background-slideshow swiper', |
| 23 | swiperWrapper: 'swiper-wrapper', |
| 24 | swiperSlide: 'elementor-background-slideshow__slide swiper-slide', |
| 25 | swiperPreloader: 'swiper-lazy-preloader', |
| 26 | slideBackground: 'elementor-background-slideshow__slide__image', |
| 27 | kenBurns: 'elementor-ken-burns', |
| 28 | kenBurnsActive: 'elementor-ken-burns--active', |
| 29 | kenBurnsIn: 'elementor-ken-burns--in', |
| 30 | kenBurnsOut: 'elementor-ken-burns--out' |
| 31 | } |
| 32 | }; |
| 33 | } |
| 34 | getSwiperOptions() { |
| 35 | const elementSettings = this.getElementSettings(), |
| 36 | swiperOptions = { |
| 37 | grabCursor: false, |
| 38 | slidesPerView: 1, |
| 39 | slidesPerGroup: 1, |
| 40 | loop: 'yes' === elementSettings.background_slideshow_loop, |
| 41 | speed: elementSettings.background_slideshow_transition_duration, |
| 42 | autoplay: { |
| 43 | delay: elementSettings.background_slideshow_slide_duration, |
| 44 | stopOnLastSlide: !elementSettings.background_slideshow_loop |
| 45 | }, |
| 46 | handleElementorBreakpoints: true, |
| 47 | on: { |
| 48 | slideChange: () => { |
| 49 | if (elementSettings.background_slideshow_ken_burns) { |
| 50 | this.handleKenBurns(); |
| 51 | } |
| 52 | } |
| 53 | } |
| 54 | }; |
| 55 | if ('yes' === elementSettings.background_slideshow_loop) { |
| 56 | swiperOptions.loopedSlides = this.getSlidesCount(); |
| 57 | } |
| 58 | switch (elementSettings.background_slideshow_slide_transition) { |
| 59 | case 'fade': |
| 60 | swiperOptions.effect = 'fade'; |
| 61 | swiperOptions.fadeEffect = { |
| 62 | crossFade: true |
| 63 | }; |
| 64 | break; |
| 65 | case 'slide_down': |
| 66 | swiperOptions.autoplay.reverseDirection = true; |
| 67 | swiperOptions.direction = 'vertical'; |
| 68 | break; |
| 69 | case 'slide_up': |
| 70 | swiperOptions.direction = 'vertical'; |
| 71 | break; |
| 72 | } |
| 73 | if ('yes' === elementSettings.background_slideshow_lazyload) { |
| 74 | swiperOptions.lazy = { |
| 75 | loadPrevNext: true, |
| 76 | loadPrevNextAmount: 1 |
| 77 | }; |
| 78 | } |
| 79 | return swiperOptions; |
| 80 | } |
| 81 | buildSwiperElements() { |
| 82 | const classes = this.getSettings('classes'), |
| 83 | elementSettings = this.getElementSettings(), |
| 84 | direction = 'slide_left' === elementSettings.background_slideshow_slide_transition ? 'ltr' : 'rtl', |
| 85 | $container = jQuery('<div>', { |
| 86 | class: classes.swiperContainer, |
| 87 | dir: direction |
| 88 | }), |
| 89 | $wrapper = jQuery('<div>', { |
| 90 | class: classes.swiperWrapper |
| 91 | }), |
| 92 | kenBurnsActive = elementSettings.background_slideshow_ken_burns, |
| 93 | lazyload = 'yes' === elementSettings.background_slideshow_lazyload; |
| 94 | let slideInnerClass = classes.slideBackground; |
| 95 | if (kenBurnsActive) { |
| 96 | slideInnerClass += ' ' + classes.kenBurns; |
| 97 | const kenBurnsDirection = 'in' === elementSettings.background_slideshow_ken_burns_zoom_direction ? 'kenBurnsIn' : 'kenBurnsOut'; |
| 98 | slideInnerClass += ' ' + classes[kenBurnsDirection]; |
| 99 | } |
| 100 | if (lazyload) { |
| 101 | slideInnerClass += ' swiper-lazy'; |
| 102 | } |
| 103 | this.elements.$slides = jQuery(); |
| 104 | elementSettings.background_slideshow_gallery.forEach(slide => { |
| 105 | const $slide = jQuery('<div>', { |
| 106 | class: classes.swiperSlide |
| 107 | }); |
| 108 | let $slidebg; |
| 109 | if (lazyload) { |
| 110 | const $slideloader = jQuery('<div>', { |
| 111 | class: classes.swiperPreloader |
| 112 | }); |
| 113 | $slidebg = jQuery('<div>', { |
| 114 | class: slideInnerClass, |
| 115 | 'data-background': slide.url |
| 116 | }); |
| 117 | $slidebg.append($slideloader); |
| 118 | } else { |
| 119 | $slidebg = jQuery('<div>', { |
| 120 | class: slideInnerClass, |
| 121 | style: 'background-image: url("' + slide.url + '");' |
| 122 | }); |
| 123 | } |
| 124 | $slide.append($slidebg); |
| 125 | $wrapper.append($slide); |
| 126 | this.elements.$slides = this.elements.$slides.add($slide); |
| 127 | }); |
| 128 | $container.append($wrapper); |
| 129 | this.$element.prepend($container); |
| 130 | this.elements.$backgroundSlideShowContainer = $container; |
| 131 | } |
| 132 | async initSlider() { |
| 133 | if (1 >= this.getSlidesCount()) { |
| 134 | return; |
| 135 | } |
| 136 | const elementSettings = this.getElementSettings(); |
| 137 | const Swiper = elementorFrontend.utils.swiper; |
| 138 | this.swiper = await new Swiper(this.elements.$backgroundSlideShowContainer, this.getSwiperOptions()); |
| 139 | |
| 140 | // Expose the swiper instance in the frontend |
| 141 | this.elements.$backgroundSlideShowContainer.data('swiper', this.swiper); |
| 142 | if (elementSettings.background_slideshow_ken_burns) { |
| 143 | this.handleKenBurns(); |
| 144 | } |
| 145 | } |
| 146 | activate() { |
| 147 | this.buildSwiperElements(); |
| 148 | this.initSlider(); |
| 149 | } |
| 150 | deactivate() { |
| 151 | if (this.swiper) { |
| 152 | this.swiper.destroy(); |
| 153 | this.elements.$backgroundSlideShowContainer.remove(); |
| 154 | } |
| 155 | } |
| 156 | run() { |
| 157 | if ('slideshow' === this.getElementSettings('background_background')) { |
| 158 | this.activate(); |
| 159 | } else { |
| 160 | this.deactivate(); |
| 161 | } |
| 162 | } |
| 163 | onInit() { |
| 164 | super.onInit(); |
| 165 | if (this.getElementSettings('background_slideshow_gallery')) { |
| 166 | this.run(); |
| 167 | } |
| 168 | } |
| 169 | onDestroy() { |
| 170 | super.onDestroy(); |
| 171 | this.deactivate(); |
| 172 | } |
| 173 | onElementChange(propertyName) { |
| 174 | if ('background_background' === propertyName) { |
| 175 | this.run(); |
| 176 | } |
| 177 | } |
| 178 | } |
| 179 | exports["default"] = BackgroundSlideshow; |
| 180 | |
| 181 | /***/ }), |
| 182 | |
| 183 | /***/ "../assets/dev/js/frontend/handlers/background-video.js": |
| 184 | /*!**************************************************************!*\ |
| 185 | !*** ../assets/dev/js/frontend/handlers/background-video.js ***! |
| 186 | \**************************************************************/ |
| 187 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 188 | |
| 189 | |
| 190 | |
| 191 | Object.defineProperty(exports, "__esModule", ({ |
| 192 | value: true |
| 193 | })); |
| 194 | exports["default"] = void 0; |
| 195 | __webpack_require__(/*! core-js/modules/esnext.iterator.constructor.js */ "../node_modules/core-js/modules/esnext.iterator.constructor.js"); |
| 196 | __webpack_require__(/*! core-js/modules/esnext.iterator.find.js */ "../node_modules/core-js/modules/esnext.iterator.find.js"); |
| 197 | class BackgroundVideo extends elementorModules.frontend.handlers.Base { |
| 198 | getDefaultSettings() { |
| 199 | return { |
| 200 | selectors: { |
| 201 | backgroundVideoContainer: '.elementor-background-video-container', |
| 202 | backgroundVideoEmbed: '.elementor-background-video-embed', |
| 203 | backgroundVideoHosted: '.elementor-background-video-hosted' |
| 204 | } |
| 205 | }; |
| 206 | } |
| 207 | getDefaultElements() { |
| 208 | const selectors = this.getSettings('selectors'), |
| 209 | elements = { |
| 210 | $backgroundVideoContainer: this.$element.find(selectors.backgroundVideoContainer) |
| 211 | }; |
| 212 | elements.$backgroundVideoEmbed = elements.$backgroundVideoContainer.children(selectors.backgroundVideoEmbed); |
| 213 | elements.$backgroundVideoHosted = elements.$backgroundVideoContainer.children(selectors.backgroundVideoHosted); |
| 214 | return elements; |
| 215 | } |
| 216 | calcVideosSize($video) { |
| 217 | let aspectRatioSetting = '16:9'; |
| 218 | if ('vimeo' === this.videoType) { |
| 219 | aspectRatioSetting = $video[0].width + ':' + $video[0].height; |
| 220 | } |
| 221 | const containerWidth = this.elements.$backgroundVideoContainer.outerWidth(), |
| 222 | containerHeight = this.elements.$backgroundVideoContainer.outerHeight(), |
| 223 | aspectRatioArray = aspectRatioSetting.split(':'), |
| 224 | aspectRatio = aspectRatioArray[0] / aspectRatioArray[1], |
| 225 | ratioWidth = containerWidth / aspectRatio, |
| 226 | ratioHeight = containerHeight * aspectRatio, |
| 227 | isWidthFixed = containerWidth / containerHeight > aspectRatio; |
| 228 | return { |
| 229 | width: isWidthFixed ? containerWidth : ratioHeight, |
| 230 | height: isWidthFixed ? ratioWidth : containerHeight |
| 231 | }; |
| 232 | } |
| 233 | changeVideoSize() { |
| 234 | if (!('hosted' === this.videoType) && !this.player) { |
| 235 | return; |
| 236 | } |
| 237 | let $video; |
| 238 | if ('youtube' === this.videoType) { |
| 239 | $video = jQuery(this.player.getIframe()); |
| 240 | } else if ('vimeo' === this.videoType) { |
| 241 | $video = jQuery(this.player.element); |
| 242 | } else if ('hosted' === this.videoType) { |
| 243 | $video = this.elements.$backgroundVideoHosted; |
| 244 | } |
| 245 | if (!$video) { |
| 246 | return; |
| 247 | } |
| 248 | const size = this.calcVideosSize($video); |
| 249 | $video.width(size.width).height(size.height); |
| 250 | } |
| 251 | startVideoLoop(firstTime) { |
| 252 | // If the section has been removed |
| 253 | if (!this.player.getIframe().contentWindow) { |
| 254 | return; |
| 255 | } |
| 256 | const elementSettings = this.getElementSettings(), |
| 257 | startPoint = elementSettings.background_video_start || 0, |
| 258 | endPoint = elementSettings.background_video_end; |
| 259 | if (elementSettings.background_play_once && !firstTime) { |
| 260 | this.player.stopVideo(); |
| 261 | return; |
| 262 | } |
| 263 | this.player.seekTo(startPoint); |
| 264 | if (endPoint) { |
| 265 | const durationToEnd = endPoint - startPoint + 1; |
| 266 | setTimeout(() => { |
| 267 | this.startVideoLoop(false); |
| 268 | }, durationToEnd * 1000); |
| 269 | } |
| 270 | } |
| 271 | prepareVimeoVideo(Vimeo, videoLink) { |
| 272 | const elementSettings = this.getElementSettings(), |
| 273 | videoSize = this.elements.$backgroundVideoContainer.outerWidth(), |
| 274 | vimeoOptions = { |
| 275 | url: videoLink, |
| 276 | width: videoSize.width, |
| 277 | autoplay: true, |
| 278 | loop: !elementSettings.background_play_once, |
| 279 | transparent: true, |
| 280 | background: true, |
| 281 | muted: true |
| 282 | }; |
| 283 | if (elementSettings.background_privacy_mode) { |
| 284 | vimeoOptions.dnt = true; |
| 285 | } |
| 286 | this.player = new Vimeo.Player(this.elements.$backgroundVideoContainer, vimeoOptions); |
| 287 | |
| 288 | // Handle user-defined start/end times |
| 289 | this.handleVimeoStartEndTimes(elementSettings); |
| 290 | this.player.ready().then(() => { |
| 291 | jQuery(this.player.element).addClass('elementor-background-video-embed'); |
| 292 | this.changeVideoSize(); |
| 293 | }); |
| 294 | } |
| 295 | handleVimeoStartEndTimes(elementSettings) { |
| 296 | // If a start time is defined, set the start time |
| 297 | if (elementSettings.background_video_start) { |
| 298 | this.player.on('play', data => { |
| 299 | if (0 === data.seconds) { |
| 300 | this.player.setCurrentTime(elementSettings.background_video_start); |
| 301 | } |
| 302 | }); |
| 303 | } |
| 304 | this.player.on('timeupdate', data => { |
| 305 | // If an end time is defined, handle ending the video |
| 306 | if (elementSettings.background_video_end && elementSettings.background_video_end < data.seconds) { |
| 307 | if (elementSettings.background_play_once) { |
| 308 | // Stop at user-defined end time if not loop |
| 309 | this.player.pause(); |
| 310 | } else { |
| 311 | // Go to start time if loop |
| 312 | this.player.setCurrentTime(elementSettings.background_video_start); |
| 313 | } |
| 314 | } |
| 315 | |
| 316 | // If start time is defined but an end time is not, go to user-defined start time at video end. |
| 317 | // Vimeo JS API has an 'ended' event, but it never fires when infinite loop is defined, so we |
| 318 | // get the video duration (returns a promise) then use duration-0.5s as end time |
| 319 | this.player.getDuration().then(duration => { |
| 320 | if (elementSettings.background_video_start && !elementSettings.background_video_end && data.seconds > duration - 0.5) { |
| 321 | this.player.setCurrentTime(elementSettings.background_video_start); |
| 322 | } |
| 323 | }); |
| 324 | }); |
| 325 | } |
| 326 | prepareYTVideo(YT, videoID) { |
| 327 | const $backgroundVideoContainer = this.elements.$backgroundVideoContainer, |
| 328 | elementSettings = this.getElementSettings(); |
| 329 | let startStateCode = YT.PlayerState.PLAYING; |
| 330 | |
| 331 | // Since version 67, Chrome doesn't fire the `PLAYING` state at start time |
| 332 | if (window.chrome) { |
| 333 | startStateCode = YT.PlayerState.UNSTARTED; |
| 334 | } |
| 335 | const playerOptions = { |
| 336 | videoId: videoID, |
| 337 | events: { |
| 338 | onReady: () => { |
| 339 | this.player.mute(); |
| 340 | this.changeVideoSize(); |
| 341 | this.startVideoLoop(true); |
| 342 | this.player.playVideo(); |
| 343 | }, |
| 344 | onStateChange: event => { |
| 345 | switch (event.data) { |
| 346 | case startStateCode: |
| 347 | $backgroundVideoContainer.removeClass('elementor-invisible elementor-loading'); |
| 348 | break; |
| 349 | case YT.PlayerState.ENDED: |
| 350 | if ('function' === typeof this.player.seekTo) { |
| 351 | this.player.seekTo(elementSettings.background_video_start || 0); |
| 352 | } |
| 353 | if (elementSettings.background_play_once) { |
| 354 | this.player.destroy(); |
| 355 | } |
| 356 | } |
| 357 | } |
| 358 | }, |
| 359 | playerVars: { |
| 360 | controls: 0, |
| 361 | rel: 0, |
| 362 | playsinline: 1, |
| 363 | cc_load_policy: 0 |
| 364 | } |
| 365 | }; |
| 366 | |
| 367 | // To handle CORS issues, when the default host is changed, the origin parameter has to be set. |
| 368 | if (elementSettings.background_privacy_mode) { |
| 369 | playerOptions.host = 'https://www.youtube-nocookie.com'; |
| 370 | playerOptions.origin = window.location.hostname; |
| 371 | } |
| 372 | $backgroundVideoContainer.addClass('elementor-loading elementor-invisible'); |
| 373 | this.player = new YT.Player(this.elements.$backgroundVideoEmbed[0], playerOptions); |
| 374 | } |
| 375 | activate() { |
| 376 | let videoLink = this.getElementSettings('background_video_link'), |
| 377 | videoID; |
| 378 | const playOnce = this.getElementSettings('background_play_once'); |
| 379 | if (-1 !== videoLink.indexOf('vimeo.com')) { |
| 380 | this.videoType = 'vimeo'; |
| 381 | this.apiProvider = elementorFrontend.utils.vimeo; |
| 382 | } else if (videoLink.match(/^(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtu\.be\/|youtube\.com)/)) { |
| 383 | this.videoType = 'youtube'; |
| 384 | this.apiProvider = elementorFrontend.utils.youtube; |
| 385 | } |
| 386 | if (this.apiProvider) { |
| 387 | videoID = this.apiProvider.getVideoIDFromURL(videoLink); |
| 388 | this.apiProvider.onApiReady(apiObject => { |
| 389 | if ('youtube' === this.videoType) { |
| 390 | this.prepareYTVideo(apiObject, videoID); |
| 391 | } |
| 392 | if ('vimeo' === this.videoType) { |
| 393 | this.prepareVimeoVideo(apiObject, videoLink); |
| 394 | } |
| 395 | }); |
| 396 | } else { |
| 397 | this.videoType = 'hosted'; |
| 398 | const startTime = this.getElementSettings('background_video_start'), |
| 399 | endTime = this.getElementSettings('background_video_end'); |
| 400 | if (startTime || endTime) { |
| 401 | videoLink += '#t=' + (startTime || 0) + (endTime ? ',' + endTime : ''); |
| 402 | } |
| 403 | this.elements.$backgroundVideoHosted.attr('src', videoLink).one('canplay', this.changeVideoSize.bind(this)); |
| 404 | if (playOnce) { |
| 405 | this.elements.$backgroundVideoHosted.on('ended', () => { |
| 406 | this.elements.$backgroundVideoHosted.hide(); |
| 407 | }); |
| 408 | } |
| 409 | } |
| 410 | elementorFrontend.elements.$window.on('resize elementor/bg-video/recalc', this.changeVideoSize); |
| 411 | } |
| 412 | deactivate() { |
| 413 | if ('youtube' === this.videoType && this.player.getIframe() || 'vimeo' === this.videoType) { |
| 414 | this.player.destroy(); |
| 415 | } else { |
| 416 | this.elements.$backgroundVideoHosted.removeAttr('src').off('ended'); |
| 417 | } |
| 418 | elementorFrontend.elements.$window.off('resize', this.changeVideoSize); |
| 419 | } |
| 420 | run() { |
| 421 | const elementSettings = this.getElementSettings(); |
| 422 | if (!elementSettings.background_play_on_mobile && 'mobile' === elementorFrontend.getCurrentDeviceMode()) { |
| 423 | return; |
| 424 | } |
| 425 | if ('video' === elementSettings.background_background && elementSettings.background_video_link) { |
| 426 | this.activate(); |
| 427 | } else { |
| 428 | this.deactivate(); |
| 429 | } |
| 430 | } |
| 431 | onInit(...args) { |
| 432 | super.onInit(...args); |
| 433 | this.changeVideoSize = this.changeVideoSize.bind(this); |
| 434 | this.run(); |
| 435 | } |
| 436 | onElementChange(propertyName) { |
| 437 | if ('background_background' === propertyName) { |
| 438 | this.run(); |
| 439 | } |
| 440 | } |
| 441 | } |
| 442 | exports["default"] = BackgroundVideo; |
| 443 | |
| 444 | /***/ }) |
| 445 | |
| 446 | }]); |
| 447 | //# sourceMappingURL=shared-frontend-handlers.3b079824c37a5fe2bdaa.bundle.js.map |