PageSourceSearch

https://visapourlimage.com/wp-content/themes/uncode/library/js/lib/lg-video.js?ver=1151487057

js visapourlimage.com collected 2026-09-24 20:00:09 UTC 45,332 bytes, 646 lines download raw bytes

1/*!
2 * lightgallery | 2.5.0 | June 13th 2022
3 * http://www.lightgalleryjs.com/
4 * Copyright (c) 2020 Sachin Neravath;
5 * @license GPLv3
6 */
7
8(function (global, factory) {
9	typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
10	typeof define === 'function' && define.amd ? define(factory) :
11	(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgVideo = factory());
12}(this, (function () { 'use strict';
13
14	/*! *****************************************************************************
15	Copyright (c) Microsoft Corporation.
16
17	Permission to use, copy, modify, and/or distribute this software for any
18	purpose with or without fee is hereby granted.
19
20	THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
21	REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
22	AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
23	INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
24	LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
25	OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
26	PERFORMANCE OF THIS SOFTWARE.
27	***************************************************************************** */
28
29	var __assign = function() {
30		__assign = Object.assign || function __assign(t) {
31			for (var s, i = 1, n = arguments.length; i < n; i++) {
32				s = arguments[i];
33				for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
34			}
35			return t;
36		};
37		return __assign.apply(this, arguments);
38	};
39
40	var videoSettings = {
41		autoplayFirstVideo: true,
42		youTubePlayerParams: false,
43		vimeoPlayerParams: false,
44		wistiaPlayerParams: false,
45		gotoNextSlideOnVideoEnd: true,
46		autoplayVideoOnSlide: false,
47		videojs: false,
48		videojsTheme: '',
49		videojsOptions: {},
50	};
51
52	/**
53	 * List of lightGallery events
54	 * All events should be documented here
55	 * Below interfaces are used to build the website documentations
56	 * */
57	var lGEvents = {
58		afterAppendSlide: 'lgAfterAppendSlide',
59		init: 'lgInit',
60		hasVideo: 'lgHasVideo',
61		containerResize: 'lgContainerResize',
62		updateSlides: 'lgUpdateSlides',
63		afterAppendSubHtml: 'lgAfterAppendSubHtml',
64		beforeOpen: 'lgBeforeOpen',
65		afterOpen: 'lgAfterOpen',
66		slideItemLoad: 'lgSlideItemLoad',
67		beforeSlide: 'lgBeforeSlide',
68		afterSlide: 'lgAfterSlide',
69		posterClick: 'lgPosterClick',
70		dragStart: 'lgDragStart',
71		dragMove: 'lgDragMove',
72		dragEnd: 'lgDragEnd',
73		beforeNextSlide: 'lgBeforeNextSlide',
74		beforePrevSlide: 'lgBeforePrevSlide',
75		beforeClose: 'lgBeforeClose',
76		afterClose: 'lgAfterClose',
77		rotateLeft: 'lgRotateLeft',
78		rotateRight: 'lgRotateRight',
79		flipHorizontal: 'lgFlipHorizontal',
80		flipVertical: 'lgFlipVertical',
81		autoplay: 'lgAutoplay',
82		autoplayStart: 'lgAutoplayStart',
83		autoplayStop: 'lgAutoplayStop',
84	};
85
86	var param = function (obj) {
87		return Object.keys(obj)
88			.map(function (k) {
89			return encodeURIComponent(k) + '=' + encodeURIComponent(obj[k]);
90		})
91			.join('&');
92	};
93	var getVimeoURLParams = function (defaultParams, videoInfo) {
94		if (!videoInfo || !videoInfo.vimeo)
95			return '';
96		var urlParams = videoInfo.vimeo[2] || '';
97		var defaultPlayerParams = defaultParams && Object.keys(defaultParams).length !== 0
98			? '&' + param(defaultParams)
99			: '';
100		// Support private video
101		var urlWithHash = videoInfo.vimeo[0].split('/').pop() || '';
102		var urlWithHashWithParams = urlWithHash.split('?')[0] || '';
103		var hash = urlWithHashWithParams.split('#')[0];
104		var isPrivate = videoInfo.vimeo[1] !== hash;
105		if (isPrivate) {
106			urlParams = urlParams.replace("/" + hash, '');
107		}
108		urlParams =
109			urlParams[0] == '?' ? '&' + urlParams.slice(1) : urlParams || '';
110		// For vimeo last params gets priority if duplicates found
111		// Uncode edit ##START##
112		var vimeoPlayerParams = '?autoplay=0';
113		if ( videoInfo.autoplay !== '' ) {
114			vimeoPlayerParams = vimeoPlayerParams.replace(new RegExp('([?&])autoplay=(.*?)(&|$)'), '$1$3' );
115			vimeoPlayerParams = vimeoPlayerParams.replace(new RegExp('([?&])autoplay(&|$)'), '$1$2' );
116		} else {
117			if ( typeof SiteParameters !== 'undefined' && typeof SiteParameters.vimeoPlayerParams !== 'undefined' && SiteParameters.vimeoPlayerParams !== '' ) {
118				vimeoPlayerParams = SiteParameters.vimeoPlayerParams;
119			}
120		}
121		if ( videoInfo.muted !== '' ) {
122			vimeoPlayerParams += '&muted=' + (videoInfo.muted === 'yes');
123		} else {
124			if ( urlParams.indexOf('muted=') < 0 && vimeoPlayerParams.indexOf('muted=') < 0 ) {
125				vimeoPlayerParams += '&muted=1';
126			}
127		}
128		// var vimeoPlayerParams = "?autoplay=0&muted=1" + (isPrivate ? "&h=" + hash : '') + defaultPlayerParams + urlParams;
129		vimeoPlayerParams += (isPrivate ? "&h=" + hash : '') + defaultPlayerParams + urlParams;
130		// Uncode edit ##END##
131		return vimeoPlayerParams;
132	};
133
134	/**
135	 * Video module for lightGallery
136	 * Supports HTML5, YouTube, Vimeo, wistia videos
137	 *
138	 *
139	 * @ref Wistia
140	 * https://wistia.com/support/integrations/wordpress(How to get url)
141	 * https://wistia.com/support/developers/embed-options#using-embed-options
142	 * https://wistia.com/support/developers/player-api
143	 * https://wistia.com/support/developers/construct-an-embed-code
144	 * http://jsfiddle.net/xvnm7xLm/
145	 * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video
146	 * https://wistia.com/support/embed-and-share/sharing-videos
147	 * https://private-sharing.wistia.com/medias/mwhrulrucj
148	 *
149	 * @ref Youtube
150	 * https://developers.google.com/youtube/player_parameters#enablejsapi
151	 * https://developers.google.com/youtube/iframe_api_reference
152	 * https://developer.chrome.com/blog/autoplay/#iframe-delegation
153	 *
154	 * @ref Vimeo
155	 * https://stackoverflow.com/questions/10488943/easy-way-to-get-vimeo-id-from-a-vimeo-url
156	 * https://vimeo.zendesk.com/hc/en-us/articles/360000121668-Starting-playback-at-a-specific-timecode
157	 * https://vimeo.zendesk.com/hc/en-us/articles/360001494447-Using-Player-Parameters
158	 */
159	var Video = /** @class */ (function () {
160		function Video(instance) {
161			// get lightGallery core plugin instance
162			this.core = instance;
163			this.settings = __assign(__assign({}, videoSettings), this.core.settings);
164			return this;
165		}
166		Video.prototype.init = function () {
167			var _this = this;
168			/**
169			 * Event triggered when video url found without poster
170			 * Append video HTML
171			 * Play if autoplayFirstVideo is true
172			 */
173			this.core.LGel.on(lGEvents.hasVideo + ".video", this.onHasVideo.bind(this));
174			this.core.LGel.on(lGEvents.posterClick + ".video", function () {
175				var $el = _this.core.getSlideItem(_this.core.index);
176				_this.loadVideoOnPosterClick($el);
177			});
178			this.core.LGel.on(lGEvents.slideItemLoad + ".video", this.onSlideItemLoad.bind(this));
179			// @desc fired immediately before each slide transition.
180			this.core.LGel.on(lGEvents.beforeSlide + ".video", this.onBeforeSlide.bind(this));
181			// @desc fired immediately after each slide transition.
182			this.core.LGel.on(lGEvents.afterSlide + ".video", this.onAfterSlide.bind(this));
183		};
184		/**
185		 * @desc Event triggered when a slide is completely loaded
186		 *
187		 * @param {Event} event - lightGalley custom event
188		 */
189		Video.prototype.onSlideItemLoad = function (event) {
190			var _this = this;
191			var _a = event.detail, isFirstSlide = _a.isFirstSlide, index = _a.index;
192			// Should check the active slide as well as user may have moved to different slide before the first slide is loaded
193			if (this.settings.autoplayFirstVideo &&
194				isFirstSlide &&
195				index === this.core.index) {
196				// Delay is just for the transition effect on video load
197				setTimeout(function () {
198					_this.loadAndPlayVideo(index);
199				}, 200);
200			}
201			// Should not call on first slide. should check only if the slide is active
202			if (!isFirstSlide &&
203				this.settings.autoplayVideoOnSlide &&
204				index === this.core.index) {
205					setTimeout(function () {
206						_this.loadAndPlayVideo(index);
207					}, 500);
208				}
209		};
210		/**
211		 * @desc Event triggered when video url or poster found
212		 * Append video HTML is poster is not given
213		 * Play if autoplayFirstVideo is true
214		 *
215		 * @param {Event} event - Javascript Event object.
216		 */
217		Video.prototype.onHasVideo = function (event) {
218			var _a = event.detail, index = _a.index, src = _a.src, html5Video = _a.html5Video, hasPoster = _a.hasPoster;
219			if (!hasPoster) {
220				// All functions are called separately if poster exist in loadVideoOnPosterClick function
221				this.appendVideos(this.core.getSlideItem(index), {
222					src: src,
223					addClass: 'lg-object',
224					index: index,
225					html5Video: html5Video,
226					// Uncode edit ##START##
227					autoplay: event.target.getAttribute('data-lb-autoplay'),
228					muted: event.target.getAttribute('data-lb-muted'),
229					// Uncode edit ##END##
230				});
231				// Automatically navigate to next slide once video reaches the end.
232				this.gotoNextSlideOnVideoEnd(src, index);
233			}
234		};
235		/**
236		 * @desc fired immediately before each slide transition.
237		 * Pause the previous video
238		 * Hide the download button if the slide contains YouTube, Vimeo, or Wistia videos.
239		 *
240		 * @param {Event} event - Javascript Event object.
241		 * @param {number} prevIndex - Previous index of the slide.
242		 * @param {number} index - Current index of the slide
243		 */
244		Video.prototype.onBeforeSlide = function (event) {
245			if (this.core.lGalleryOn) {
246				var prevIndex = event.detail.prevIndex;
247				this.pauseVideo(prevIndex);
248			}
249			// Uncode edit ##START##
250			var _a = event.detail, index = _a.index;
251			var $slide = this.core.getSlideItem(index);
252			
253			var iframe = $slide.selector.querySelector('iframe');
254			if ( iframe != null ) {
255
256				var data_play = iframe.getAttribute('data-autoplay');
257				if ( typeof data_play !== 'undefined' && data_play === '1' ) {
258					this.loadAndPlayVideo(index);
259
260					var videoInfo = this.core.galleryItems[index].__slideVideoInfo || {},
261						$videoElement = this.core.getSlideItem(index).find('.lg-video-object').first();
262					if (videoInfo.vimeo) {
263						var vimeoPlayer = new Vimeo.Player($videoElement.get());
264						vimeoPlayer.on('play', function () {
265							vimeoPlayer.setCurrentTime(0);
266						});
267					} else if ( videoInfo.youtube ) {
268						try {
269							$videoElement.get().contentWindow.postMessage("{\"event\":\"command\",\"func\":\"seekTo\",\"args\":[0, true]}", '*');
270						}
271						catch (e) {
272							console.warn(e);
273						}
274					}
275				}
276			}
277			// Uncode edit ##END##
278		};
279		/**
280		 * @desc fired immediately after each slide transition.
281		 * Play video if autoplayVideoOnSlide option is enabled.
282		 *
283		 * @param {Event} event - Javascript Event object.
284		 * @param {number} prevIndex - Previous index of the slide.
285		 * @param {number} index - Current index of the slide
286		 * @todo should check on onSlideLoad as well if video is not loaded on after slide
287		 */
288		Video.prototype.onAfterSlide = function (event) {
289			var _this = this;
290			var _a = event.detail, index = _a.index, prevIndex = _a.prevIndex;
291			// Do not call on first slide
292			var $slide = this.core.getSlideItem(index);
293			if (this.settings.autoplayVideoOnSlide && index !== prevIndex) {
294				if ($slide.hasClass('lg-complete')) {
295					setTimeout(function () {
296						_this.loadAndPlayVideo(index);
297					}, 100);
298				}
299			}
300		};
301		Video.prototype.loadAndPlayVideo = function (index) {
302			var $slide = this.core.getSlideItem(index);
303			var currentGalleryItem = this.core.galleryItems[index];
304			if (currentGalleryItem.poster) {
305				this.loadVideoOnPosterClick($slide, true);
306			}
307			else {
308				//Uncode edit ##START##
309				// this.playVideo(index);
310				var iframe = $slide.selector.querySelector('iframe');
311				if ( iframe != null ) {
312					var data_play = iframe.getAttribute('data-autoplay');
313					if ( typeof data_play !== 'undefined' ) {
314						if ( data_play === '1' && this.core.index == index ) {
315							this.playVideo(index);
316						} else {
317							this.pauseVideo(index);
318						}
319					}
320				}
321				//Uncode edit ##END##
322			}
323		};
324		/**
325		 * Play HTML5, Youtube, Vimeo or Wistia videos in a particular slide.
326		 * @param {number} index - Index of the slide
327		 */
328		Video.prototype.playVideo = function (index) {
329			this.controlVideo(index, 'play');
330		};
331		/**
332		 * Pause HTML5, Youtube, Vimeo or Wistia videos in a particular slide.
333		 * @param {number} index - Index of the slide
334		 */
335		Video.prototype.pauseVideo = function (index) {
336			this.controlVideo(index, 'pause');
337		};
338		// Uncode edit ##START##
339		//Video.prototype.getVideoHtml = function (src, addClass, index, html5Video) {
340		Video.prototype.getVideoHtml = function (src, addClass, index, html5Video, autoplay, muted) {
341		// Uncode edit ##END##
342			var video = '';
343			var videoInfo = this.core.galleryItems[index]
344				.__slideVideoInfo || {};
345			var currentGalleryItem = this.core.galleryItems[index];
346			var videoTitle = currentGalleryItem.title || currentGalleryItem.alt;
347			videoTitle = videoTitle ? 'title="' + videoTitle + '"' : '';
348			var commonIframeProps = "allowtransparency=\"true\"\n            frameborder=\"0\"\n            scrolling=\"no\"\n            allowfullscreen\n            mozallowfullscreen\n            webkitallowfullscreen\n            oallowfullscreen\n            msallowfullscreen";
349			if (videoInfo.youtube) {
350				var videoId = 'lg-youtube' + index;
351				var slideUrlParams = videoInfo.youtube[2]
352					? videoInfo.youtube[2] + '&'
353					: '';
354				// For youtube first parms gets priority if duplicates found
355				// Uncode edit ##START##
356				// var youTubePlayerParams = "?" + slideUrlParams + "wmode=opaque&autoplay=0&mute=1&enablejsapi=1";
357				var youTubePlayerParams = "?" + slideUrlParams + "wmode=opaque&enablejsapi=1";
358				if ( ( slideUrlParams.indexOf('autoplay=') < 0 && youTubePlayerParams.indexOf('autoplay=') < 0 ) ) {
359					youTubePlayerParams += '&autoplay=0';
360				}
361				if ( slideUrlParams.indexOf('mute=') < 0 && youTubePlayerParams.indexOf('mute=') < 0 ) {
362					youTubePlayerParams += '&mute=1';
363				}
364				var data_video = '';
365				if ( autoplay !== '' ) {
366					//youTubePlayerParams = youTubePlayerParams.replace(new RegExp('([?&])autoplay=(.*?)(&|$)'), '$1autoplay=' + (autoplay === 'yes' ? 1 : 0) + '$3' );
367					youTubePlayerParams = youTubePlayerParams.replace(new RegExp('([?&])autoplay=(.*?)(&|$)'), '$1$3' );
368					youTubePlayerParams = youTubePlayerParams.replace(new RegExp('([?&])autoplay'), '$1' );
369					data_video = ' data-autoplay="' + (autoplay === 'yes' ? 1 : 0) + '"';
370				}
371				// if ( muted !== '' ) {
372				// 	youTubePlayerParams = youTubePlayerParams.replace(new RegExp('([?&])mute=(.*?)(&|$)'), '$1mute=' + (muted === 'yes' ? 1 : 0) + '$3' );
373				// }
374				youTubePlayerParams = youTubePlayerParams.replace(new RegExp('([?&])mute=(.*?)(&|$)'), '$1$3' );
375
376				youTubePlayerParams = youTubePlayerParams.replace('??', '?');
377				// Uncode edit ##END##
378				var playerParams = youTubePlayerParams +
379					(this.settings.youTubePlayerParams
380						? '&' + param(this.settings.youTubePlayerParams)
381						: '');
382				// Uncode edit ##START##
383				// video = "<iframe allow=\"autoplay\" id=" + videoId + " class=\"lg-video-object lg-youtube " + addClass + "\" " + videoTitle + " src=\"//www.youtube.com/embed/" + (videoInfo.youtube[1] + playerParams) + "\" " + commonIframeProps + "></iframe>";
384				var nocookie = typeof SiteParameters.uncode_nocookie !== 'undefined' ? SiteParameters.uncode_nocookie : '';
385				video = "<iframe allow=\"autoplay\"" + data_video + " id=" + videoId + " class=\"lg-video-object lg-youtube " + addClass + "\" " + videoTitle + " src=\"//www.youtube" + nocookie + ".com/embed/" + (videoInfo.youtube[1] + playerParams) + "\" " + commonIframeProps + "></iframe>";
386				var tag = document.createElement('script');
387				tag.src = "//www.youtube.com/player_api";
388				var firstScriptTag = document.getElementsByTagName('script')[0];
389				firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
390
391				// Replace the 'ytplayer' element with an <iframe> and
392				// YouTube player after the API code downloads.
393				var ytIframeplayer,
394					setMute = muted === 'yes' ? 0 : 100;
395				window.onYouTubePlayerAPIReady = function() {
396					ytIframeplayer = new YT.Player(videoId, {
397						videoId: videoInfo.youtube[1],
398						events: {
399							'onReady': function (event) {
400								event.target.setVolume(setMute);
401							}
402						}
403					});
404				}
405				// Uncode edit ##END##
406			}
407			else if (videoInfo.vimeo) {
408				var videoId = 'lg-vimeo' + index;
409				// Uncode edit ##START##
410				videoInfo.autoplay = autoplay;
411				videoInfo.muted = muted;
412				// Uncode edit ##END##
413				var playerParams = getVimeoURLParams(this.settings.vimeoPlayerParams, videoInfo);
414				// Uncode edit ##START##
415				// video = "<iframe allow=\"autoplay\" id=" + videoId + " class=\"lg-video-object lg-vimeo " + addClass + "\" " + videoTitle + " src=\"//player.vimeo.com/video/" + (videoInfo.vimeo[1] + playerParams) + "\" " + commonIframeProps + "></iframe>";
416				var data_video = '';
417				if ( autoplay !== '' ) {
418					data_video = ' data-autoplay="' + (autoplay === 'yes' ? 1 : 0) + '"';
419				}
420				video = "<iframe allow=\"autoplay\"" + data_video + " id=" + videoId + " class=\"lg-video-object lg-vimeo " + addClass + "\" " + videoTitle + " src=\"//player.vimeo.com/video/" + (videoInfo.vimeo[1] + playerParams) + "\" " + commonIframeProps + "></iframe>";
421				// Uncode edit ##END##
422			}
423			else if (videoInfo.wistia) {
424				var wistiaId = 'lg-wistia' + index;
425				var playerParams = param(this.settings.wistiaPlayerParams);
426				playerParams = playerParams ? '?' + playerParams : '';
427				video = "<iframe allow=\"autoplay\" id=\"" + wistiaId + "\" src=\"//fast.wistia.net/embed/iframe/" + (videoInfo.wistia[4] + playerParams) + "\" " + videoTitle + " class=\"wistia_embed lg-video-object lg-wistia " + addClass + "\" name=\"wistia_embed\" " + commonIframeProps + "></iframe>";
428			}
429			else if (videoInfo.html5) {
430				var html5VideoMarkup = '';
431				for (var i = 0; i < html5Video.source.length; i++) {
432					html5VideoMarkup += "<source src=\"" + html5Video.source[i].src + "\" type=\"" + html5Video.source[i].type + "\">";
433				}
434				if (html5Video.tracks) {
435					var _loop_1 = function (i) {
436						var trackAttributes = '';
437						var track = html5Video.tracks[i];
438						Object.keys(track || {}
438).forEach(function (key) {
439							trackAttributes += key + "=\"" + track[key] + "\" ";
440						});
441						html5VideoMarkup += "<track " + trackAttributes + ">";
442					};
443					for (var i = 0; i < html5Video.tracks.length; i++) {
444						_loop_1(i);
445					}
446				}
447				var html5VideoAttrs_1 = '';
448				var videoAttributes_1 = html5Video.attributes || {};
449				Object.keys(videoAttributes_1 || {}).forEach(function (key) {
450					html5VideoAttrs_1 += key + "=\"" + videoAttributes_1[key] + "\" ";
451				});
452				video = "<video class=\"lg-video-object lg-html5 " + (this.settings.videojs && this.settings.videojsTheme
453					? this.settings.videojsTheme + ' '
454					: '') + " " + (this.settings.videojs ? ' video-js' : '') + "\" " + html5VideoAttrs_1 + ">\n                " + html5VideoMarkup + "\n                Your browser does not support HTML5 video.\n            </video>";
455			}
456			return video;
457		};
458		/**
459		 * @desc - Append videos to the slide
460		 *
461		 * @param {HTMLElement} el - slide element
462		 * @param {Object} videoParams - Video parameters, Contains src, class, index, htmlVideo
463		 */
464		Video.prototype.appendVideos = function (el, videoParams) {
465			var _a;
466			// Uncode edit ##START##
467			// var videoHtml = this.getVideoHtml(videoParams.src, videoParams.addClass, videoParams.index, videoParams.html5Video);
468			var videoHtml = this.getVideoHtml(videoParams.src, videoParams.addClass, videoParams.index, videoParams.html5Video, videoParams.autoplay, videoParams.muted);
469			// Uncode edit ##END##
470			el.find('.lg-video-cont').append(videoHtml);
471			var $videoElement = el.find('.lg-video-object').first();
472			if (videoParams.html5Video) {
473				$videoElement.on('mousedown.lg.video', function (e) {
474					e.stopPropagation();
475				});
476			}
477			if (this.settings.videojs && ((_a = this.core.galleryItems[videoParams.index].__slideVideoInfo) === null || _a === void 0 ? void 0 : _a.html5)) {
478				try {
479					return videojs($videoElement.get(), this.settings.videojsOptions);
480				}
481				catch (e) {
482					console.warn('lightGallery:- Make sure you have included videojs');
483				}
484			}
485		};
486		Video.prototype.gotoNextSlideOnVideoEnd = function (src, index) {
487			var _this = this;
488			var $videoElement = this.core
489				.getSlideItem(index)
490				.find('.lg-video-object')
491				.first();
492			var videoInfo = this.core.galleryItems[index].__slideVideoInfo || {};
493			if (this.settings.gotoNextSlideOnVideoEnd) {
494				if (videoInfo.html5) {
495					$videoElement.on('ended', function () {
496						_this.core.goToNextSlide();
497					});
498				}
499				else if (videoInfo.vimeo) {
500					try {
501						// https://github.com/vimeo/player.js/#ended
502						new Vimeo.Player($videoElement.get()).on('ended', function () {
503							_this.core.goToNextSlide();
504						});
505					}
506					catch (e) {
507						console.warn('lightGallery:- Make sure you have included //github.com/vimeo/player.js');
508					}
509				}
510				else if (videoInfo.wistia) {
511					try {
512						window._wq = window._wq || [];
513						// @todo Event is gettign triggered multiple times
514						window._wq.push({
515							id: $videoElement.attr('id'),
516							onReady: function (video) {
517								video.bind('end', function () {
518									_this.core.goToNextSlide();
519								});
520							},
521						});
522					}
523					catch (e) {
524						console.warn('lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js');
525					}
526				}
527			}
528		};
529		Video.prototype.controlVideo = function (index, action) {
530			var $videoElement = this.core
531				.getSlideItem(index)
532				.find('.lg-video-object')
533				.first();
534			var videoInfo = this.core.galleryItems[index].__slideVideoInfo || {};
535			if (!$videoElement.get())
536				return;
537			if (videoInfo.youtube) {
538				try {
539					$videoElement.get().contentWindow.postMessage("{\"event\":\"command\",\"func\":\"" + action + "Video\",\"args\":\"\"}", '*');
540				}
541				catch (e) {
542					console.warn("lightGallery:- " + e);
543				}
544			}
545			else if (videoInfo.vimeo) {
546				try {
547					new Vimeo.Player($videoElement.get())[action]();
548				}
549				catch (e) {
550					console.warn('lightGallery:- Make sure you have included //github.com/vimeo/player.js');
551				}
552			}
553			else if (videoInfo.html5) {
554				if (this.settings.videojs) {
555					try {
556						videojs($videoElement.get())[action]();
557					}
558					catch (e) {
559						console.warn('lightGallery:- Make sure you have included videojs');
560					}
561				}
562				else {
563					$videoElement.get()[action]();
564				}
565			}
566			else if (videoInfo.wistia) {
567				try {
568					window._wq = window._wq || [];
569					// @todo Find a way to destroy wistia player instance
570					window._wq.push({
571						id: $videoElement.attr('id'),
572						onReady: function (video) {
573							video[action]();
574						},
575					});
576				}
577				catch (e) {
578					console.warn('lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js');
579				}
580			}
581		};
582		Video.prototype.loadVideoOnPosterClick = function ($el, forcePlay) {
583			var _this = this;
584			// check slide has poster
585			if (!$el.hasClass('lg-video-loaded')) {
586				// check already video element present
587				if (!$el.hasClass('lg-has-video')) {
588					$el.addClass('lg-has-video');
589					var _html = void 0;
590					var _src = this.core.galleryItems[this.core.index].src;
591					var video = this.core.galleryItems[this.core.index].video;
592					if (video) {
593						_html =
594							typeof video === 'string' ? JSON.parse(video) : video;
595					}
596					var videoJsPlayer_1 = this.appendVideos($el, {
597						src: _src,
598						addClass: '',
599						index: this.core.index,
600						html5Video: _html,
601					});
602					this.gotoNextSlideOnVideoEnd(_src, this.core.index);
603					var $tempImg = $el.find('.lg-object').first().get();
604					// @todo make sure it is working
605					$el.find('.lg-video-cont').first().append($tempImg);
606					$el.addClass('lg-video-loading');
607					videoJsPlayer_1 &&
608						videoJsPlayer_1.ready(function () {
609							videoJsPlayer_1.on('loadedmetadata', function () {
610								_this.onVideoLoadAfterPosterClick($el, _this.core.index);
611							});
612						});
613					$el.find('.lg-video-object')
614						.first()
615						.on('load.lg error.lg loadedmetadata.lg', function () {
616						setTimeout(function () {
617							_this.onVideoLoadAfterPosterClick($el, _this.core.index);
618						}, 50);
619					});
620				}
621				else {
622					this.playVideo(this.core.index);
623				}
624			}
625			else if (forcePlay) {
626				this.playVideo(this.core.index);
627			}
628		};
629		Video.prototype.onVideoLoadAfterPosterClick = function ($el, index) {
630			$el.addClass('lg-video-loaded');
631			this.playVideo(index);
632		};
633		Video.prototype.destroy = function () {
634			this.core.LGel.off('.lg.video');
635			this.core.LGel.off('.video');
636		};
637		return Video;
638	}());
639
640	return Video;
641
642})));
643
644
645/*! @vimeo/player v2.17.1 | (c) 2022 Vimeo | MIT License | https://github.com/vimeo/player.js */
646!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((e="undefined"!=typeof globalThis?globalThis:e||self).Vimeo=e.Vimeo||{},e.Vimeo.Player=t())}(this,function(){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var e="undefined"!=typeof global&&"[object global]"==={}.toString.call(global);function i(e,t){return 0===e.indexOf(t.toLowerCase())?e:"".concat(t.toLowerCase()).concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}function c(e){return/^(https?:)?\/\/((player|www)\.)?vimeo\.com(?=$|\/)/.test(e)}function s(e){var t,n=0<arguments.length&&void 0!==e?e:{},r=n.id,o=n.url,i=r||o;if(!i)throw new Error("An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.");if(t=i,!isNaN(parseFloat(t))&&isFinite(t)&&Math.floor(t)==t)return"https://vimeo.com/".concat(i);if(c(i))return i.replace("http:","https:");if(r)throw new TypeError("“".concat(r,"” is not a valid video id."));throw new TypeError("“".concat(i,"” is not a vimeo.com url."))}var t=void 0!==Array.prototype.indexOf,n="undefined"!=typeof window&&void 0!==window.postMessage;if(!(e||t&&n))throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var o,a,u,l,f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function d(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(l(this,"_id","_WeakMap_"+v()+"."+v()),0<arguments.length)throw new TypeError("WeakMap iterable is not supported")}function h(e,t){if(!m(e)||!a.call(e,"_id"))throw new TypeError(t+" method called on incompatible receiver "+typeof e)}function v(){return Math.random().toString().substring(2)}function m(e){return Object(e)===e}(o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:f).WeakMap||(a=Object.prototype.hasOwnProperty,u=Object.defineProperty&&function(){try{return 1===Object.defineProperty({},"x",{value:1}).x}catch(e){}}(),l=function(e,t,n){u?Object.defineProperty(e,t,{configurable:!0,writable:!0,value:n}):e[t]=n},o.WeakMap=(l(d.prototype,"delete",function(e){if(h(this,"delete"),!m(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)&&(delete e[this._id],!0)}),l(d.prototype,"get",function(e){if(h(this,"get"),m(e)){var t=e[this._id];return t&&t[0]===e?t[1]:void 0}}),l(d.prototype,"has",function(e){if(h(this,"has"),!m(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)}),l(d.prototype,"set",function(e,t){if(h(this,"set"),!m(e))throw new TypeError("Invalid value used as weak map key");var n=e[this._id];return n&&n[0]===e?n[1]=t:l(e,this._id,[e,t]),this}),l(d,"_polyfill",!0),d));var p,y=(function(e){var t,n,r;r=function(){var t,n,r,o,i,a,e=Object.prototype.toString,u="undefined"!=typeof setImmediate?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(e,t,n,r){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!1!==r})}}catch(e){t=function(e,t,n){return e[t]=n,e}}function l(e,t){this.fn=e,this.self=t,this.next=void 0}function c(e,t){r.add(e,t),n=n||u(r.drain)}function s(e){var t,n=typeof e;return null==e||"object"!=n&&"function"!=n||(t=e.then),"function"==typeof t&&t}function f(){for(var e=0;e<this.chain.length;e++)!function(e,t,n){var r,o;try{!1===t?n.reject(e.msg):(r=!0===t?e.msg:t.call(void 0,e.msg))===n.promise?n.reject(TypeError("Promise-chain cycle")):(o=s(r))?o.call(r,n.resolve,n.reject):n.resolve(r)}catch(e){n.reject(e)}}(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function d(e){var n,r=this;if(!r.triggered){r.triggered=!0,r.def&&(r=r.def);try{(n=s(e))?c(function(){var t=new m(r);try{n.call(e,function(){d.apply(t,arguments)},function(){h.apply(t,arguments)})}catch(e){h.call(t,e)}}):(r.msg=e,r.state=1,0<r.chain.length&&c(f,r))}catch(e){h.call(new m(r),e)}}}function h(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,0<t.chain.length&&c(f,t))}function v(e,n,r,o){for(var t=0;t<n.length;t++)!function(t){e.resolve(n[t]).then(function(e){r(t,e)},o)}(t)}function m(e){this.def=e,this.triggered=!1}function p(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function y(e){if("function"!=typeof e)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var r=new p(this);this.then=function(e,t){var n={success:"function"!=typeof e||e,failure:"function"==typeof t&&t};return n.promise=new this.constructor(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");n.resolve=e,n.reject=t}),r.chain.push(n),0!==r.state&&c(f,r),n.promise},this.catch=function(e){return this.then(void 0,e)};try{e.call(void 0,function(e){d.call(r,e)},function(e){h.call(r,e)})}catch(e){h.call(r,e)}}var g=t({},"constructor",y,!(r={add:function(e,t){a=new l(e,t),i?i.next=a:o=a,i=a,a=void 0},drain:function(){var e=o;for(o=i=n=void 0;e;)e.fn.call(e.self),e=e.next}}));return t(y.prototype=g,"__NPO__",0,!1),t(y,"resolve",function(n){return n&&"object"==typeof n&&1===n.__NPO__?n:new this(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");e(n)})}),t(y,"reject",function(n){return new this(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");t(n)})}),t(y,"all",function(t){var a=this;return"[object Array]"!=e.call(t)?a.reject(TypeError("Not an array")):0===t.length?a.resolve([]):new a(function(n,e){if("function"!=typeof n||"function"!=typeof e)throw TypeError("Not a function");var r=t.length,o=Array(r),i=0;v(a,t,function(e,t){o[e]=t,++i===r&&n(o)},e)})}),t(y,"race",function(t){var r=this;return"[object Array]"!=e.call(t)?r.reject(TypeError("Not an array")):new r(function(n,e){if("function"!=typeof n||"function"!=typeof e)throw TypeError("Not a function");v(r,t,function(e,t){n(t)},e)})}),y},(n=f)[t="Promise"]=n[t]||r(),e.exports&&(e.exports=n[t])}(p={exports:{}}
646),p.exports),g=new WeakMap;function w(e,t,n){var r=g.get(e.element)||{};t in r||(r[t]=[]),r[t].push(n),g.set(e.element,r)}function b(e,t){return(g.get(e.element)||{})[t]||[]}function k(e,t,n){var r=g.get(e.element)||{};if(!r[t])return!0;if(!n)return r[t]=[],g.set(e.element,r),!0;var o=r[t].indexOf(n);return-1!==o&&r[t].splice(o,1),g.set(e.element,r),r[t]&&0===r[t].length}function E(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){return console.warn(e),{}}return e}function T(e,t,n){var r,o;e.element.contentWindow&&e.element.contentWindow.postMessage&&(r={method:t},void 0!==n&&(r.value=n),8<=(o=parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/,"$1")))&&o<10&&(r=JSON.stringify(r)),e.element.contentWindow.postMessage(r,e.origin))}function P(n,r){var t,e,o=[];(r=E(r)).event?("error"===r.event&&b(n,r.data.method).forEach(function(e){var t=new Error(r.data.message);t.name=r.data.name,e.reject(t),k(n,r.data.method,e)}),o=b(n,"event:".concat(r.event)),t=r.data):!r.method||(e=function(e,t){var n=b(e,t);if(n.length<1)return!1;var r=n.shift();return k(e,t,r),r}(n,r.method))&&(o.push(e),t=r.value),o.forEach(function(e){try{if("function"==typeof e)return void e.call(n,t);e.resolve(t)}catch(e){}})}var M=["autopause","autoplay","background","byline","color","controls","dnt","height","id","interactive_params","keyboard","loop","maxheight","maxwidth","muted","playsinline","portrait","responsive","speed","texttrack","title","transparent","url","width"];function _(r,e){var t=1<arguments.length&&void 0!==e?e:{};return M.reduce(function(e,t){var n=r.getAttribute("data-vimeo-".concat(t));return!n&&""!==n||(e[t]=""===n?1:n),e},t)}function N(e,t){var n=e.html;if(!t)throw new TypeError("An element must be provided");if(null!==t.getAttribute("data-vimeo-initialized"))return t.querySelector("iframe");var r=document.createElement("div");return r.innerHTML=n,t.appendChild(r.firstChild),t.setAttribute("data-vimeo-initialized","true"),t.querySelector("iframe")}function F(i,e,t){var a=1<arguments.length&&void 0!==e?e:{},u=2<arguments.length?t:void 0;return new Promise(function(t,n){if(!c(i))throw new TypeError("“".concat(i,"” is not a vimeo.com url."));var e="https://vimeo.com/api/oembed.json?url=".concat(encodeURIComponent(i));for(var r in a)a.hasOwnProperty(r)&&(e+="&".concat(r,"=").concat(encodeURIComponent(a[r])));var o=new("XDomainRequest"in window?XDomainRequest:XMLHttpRequest);o.open("GET",e,!0),o.onload=function(){if(404!==o.status)if(403!==o.status)try{var e=JSON.parse(o.responseText);if(403===e.domain_status_code)return N(e,u),void n(new Error("“".concat(i,"” is not embeddable.")));t(e)}catch(e){n(e)}else n(new Error("“".concat(i,"” is not embeddable.")));else n(new Error("“".concat(i,"” was not found.")))},o.onerror=function(){var e=o.status?" (".concat(o.status,")"):"";n(new Error("There was an error fetching the embed code from Vimeo".concat(e,".")))},o.send()})}var x,C,j,A=new WeakMap,S=new WeakMap,q={},Player=function(){function Player(u){var e,t,l=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Player),window.jQuery&&u instanceof jQuery&&(1<u.length&&window.console&&console.warn&&console.warn("A jQuery object with multiple elements was passed, using the first element."),u=u[0]),"undefined"!=typeof document&&"string"==typeof u&&(u=document.getElementById(u)),e=u,!Boolean(e&&1===e.nodeType&&"nodeName"in e&&e.ownerDocument&&e.ownerDocument.defaultView))throw new TypeError("You must pass either a valid element or a valid id.");if("IFRAME"===u.nodeName||(t=u.querySelector("iframe"))&&(u=t),"IFRAME"===u.nodeName&&!c(u.getAttribute("src")||""))throw new Error("The player element passed isn’t a Vimeo embed.");if(A.has(u))return A.get(u);this._window=u.ownerDocument.defaultView,this.element=u,this.origin="*";var r,o=new y(function(i,a){var e;l._onMessage=function(e){if(c(e.origin)&&l.element.contentWindow===e.source){"*"===l.origin&&(l.origin=e.origin);var t=E(e.data);if(t&&"error"===t.event&&t.data&&"ready"===t.data.method){var n=new Error(t.data.message);return n.name=t.data.name,void a(n)}
vendor: 9,972 bytes, line 646
646var r=t&&"ready"===t.event,o=t&&"ping"===t.method;if(r||o)return l.element.setAttribute("data-ready","true"),void i();P(l,t)}},l._window.addEventListener("message",l._onMessage),"IFRAME"!==l.element.nodeName&&F(s(e=_(u,n)),e,u).then(function(e){var t,n,r,o=N(e,u);return l.element=o,l._originalElement=u,t=u,n=o,r=g.get(t),g.set(n,r),g.delete(t),A.set(l.element,l),e}).catch(a)});return S.set(this,o),A.set(this.element,this),"IFRAME"===this.element.nodeName&&T(this,"ping"),q.isEnabled&&(r=function(){return q.exit()},this.fullscreenchangeHandler=function(){(q.isFullscreen?w:k)(l,"event:exitFullscreen",r),l.ready().then(function(){T(l,"fullscreenchange",q.isFullscreen)})},q.on("fullscreenchange",this.fullscreenchangeHandler)),this}var e,t,n;return e=Player,(t=[{key:"callMethod",value:function(n,e){var r=this,o=1<arguments.length&&void 0!==e?e:{};return new y(function(e,t){return r.ready().then(function(){w(r,n,{resolve:e,reject:t}),T(r,n,o)}).catch(t)})}},{key:"get",value:function(n){var r=this;return new y(function(e,t){return n=i(n,"get"),r.ready().then(function(){w(r,n,{resolve:e,reject:t}),T(r,n)}).catch(t)})}},{key:"set",value:function(n,r){var o=this;return new y(function(e,t){if(n=i(n,"set"),null==r)throw new TypeError("There must be a value to set.");return o.ready().then(function(){w(o,n,{resolve:e,reject:t}),T(o,n,r)}).catch(t)})}},{key:"on",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(!t)throw new TypeError("You must pass a callback function.");if("function"!=typeof t)throw new TypeError("The callback must be a function.");0===b(this,"event:".concat(e)).length&&this.callMethod("addEventListener",e).catch(function(){}),w(this,"event:".concat(e),t)}},{key:"off",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(t&&"function"!=typeof t)throw new TypeError("The callback must be a function.");k(this,"event:".concat(e),t)&&this.callMethod("removeEventListener",e).catch(function(e){})}},{key:"loadVideo",value:function(e){return this.callMethod("loadVideo",e)}},{key:"ready",value:function(){var e=S.get(this)||new y(function(e,t){t(new Error("Unknown player. Probably unloaded."))});return y.resolve(e)}},{key:"addCuePoint",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:{};return this.callMethod("addCuePoint",{time:e,data:n})}},{key:"removeCuePoint",value:function(e){return this.callMethod("removeCuePoint",e)}},{key:"enableTextTrack",value:function(e,t){if(!e)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:e,kind:t})}},{key:"disableTextTrack",value:function(){return this.callMethod("disableTextTrack")}},{key:"pause",value:function(){return this.callMethod("pause")}},{key:"play",value:function(){return this.callMethod("play")}},{key:"requestFullscreen",value:function(){return q.isEnabled?q.request(this.element):this.callMethod("requestFullscreen")}},{key:"exitFullscreen",value:function(){return q.isEnabled?q.exit():this.callMethod("exitFullscreen")}},{key:"getFullscreen",value:function(){return q.isEnabled?y.resolve(q.isFullscreen):this.get("fullscreen")}},{key:"requestPictureInPicture",value:function(){return this.callMethod("requestPictureInPicture")}},{key:"exitPictureInPicture",value:function(){return this.callMethod("exitPictureInPicture")}},{key:"getPictureInPicture",value:function(){return this.get("pictureInPicture")}},{key:"unload",value:function(){return this.callMethod("unload")}},{key:"destroy",value:function(){var n=this;return new y(function(e){var t;S.delete(n),A.delete(n.element),n._originalElement&&(A.delete(n._originalElement),n._originalElement.removeAttribute("data-vimeo-initialized")),n.element&&"IFRAME"===n.element.nodeName&&n.element.parentNode&&(n.element.parentNode.parentNode&&n._originalElement&&n._originalElement!==n.element.parentNode?n.element.parentNode.parentNode.removeChild(n.element.parentNode):n.element.parentNode.removeChild(n.element)),n.element&&"DIV"===n.element.nodeName&&n.element.parentNode&&(n.element.removeAttribute("data-vimeo-initialized"),(t=n.element.querySelector("iframe"))&&t.parentNode&&(t.parentNode.parentNode&&n._originalElement&&n._originalElement!==t.parentNode?t.parentNode.parentNode.removeChild(t.parentNode):t.parentNode.removeChild(t))),n._window.removeEventListener("message",n._onMessage),q.isEnabled&&q.off("fullscreenchange",n.fullscreenchangeHandler),e()})}},{key:"getAutopause",value:function(){return this.get("autopause")}},{key:"setAutopause",value:function(e){return this.set("autopause",e)}},{key:"getBuffered",value:function(){return this.get("buffered")}},{key:"getCameraProps",value:function(){return this.get("cameraProps")}},{key:"setCameraProps",value:function(e){return this.set("cameraProps",e)}},{key:"getChapters",value:function(){return this.get("chapters")}},{key:"getCurrentChapter",value:function(){return this.get("currentChapter")}},{key:"getColor",value:function(){return this.get("color")}},{key:"setColor",value:function(e){return this.set("color",e)}},{key:"getCuePoints",value:function(){return this.get("cuePoints")}},{key:"getCurrentTime",value:function(){return this.get("currentTime")}},{key:"setCurrentTime",value:function(e){return this.set("currentTime",e)}},{key:"getDuration",value:function(){return this.get("duration")}},{key:"getEnded",value:function(){return this.get("ended")}},{key:"getLoop",value:function(){return this.get("loop")}},{key:"setLoop",value:function(e){return this.set("loop",e)}},{key:"setMuted",value:function(e){return this.set("muted",e)}},{key:"getMuted",value:function(){return this.get("muted")}},{key:"getPaused",value:function(){return this.get("paused")}},{key:"getPlaybackRate",value:function(){return this.get("playbackRate")}},{key:"setPlaybackRate",value:function(e){return this.set("playbackRate",e)}},{key:"getPlayed",value:function(){return this.get("played")}},{key:"getQualities",value:function(){return this.get("qualities")}},{key:"getQuality",value:function(){return this.get("quality")}},{key:"setQuality",value:function(e){return this.set("quality",e)}},{key:"getSeekable",value:function(){return this.get("seekable")}},{key:"getSeeking",value:function(){return this.get("seeking")}},{key:"getTextTracks",value:function(){return this.get("textTracks")}},{key:"getVideoEmbedCode",value:function(){return this.get("videoEmbedCode")}},{key:"getVideoId",value:function(){return this.get("videoId")}},{key:"getVideoTitle",value:function(){return this.get("videoTitle")}},{key:"getVideoWidth",value:function(){return this.get("videoWidth")}},{key:"getVideoHeight",value:function(){return this.get("videoHeight")}},{key:"getVideoUrl",value:function(){return this.get("videoUrl")}},{key:"getVolume",value:function(){return this.get("volume")}},{key:"setVolume",value:function(e){return this.set("volume",e)}}])&&r(e.prototype,t),n&&r(e,n),Player}();return e||(x=function(){for(var e,t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],n=0,r=t.length,o={};n<r;n++)if((e=t[n])&&e[1]in document){for(n=0;n<e.length;n++)o[t[0][n]]=e[n];return o}return!1}(),C={fullscreenchange:x.fullscreenchange,fullscreenerror:x.fullscreenerror},j={request:function(o){return new Promise(function(e,t){function n(){j.off("fullscreenchange",n),e()}j.on("fullscreenchange",n);var r=(o=o||document.documentElement)[x.requestFullscreen]();r instanceof Promise&&r.then(n).catch(t)})},exit:function(){return new Promise(function(t,e){var n,r;j.isFullscreen?(n=function e(){j.off("fullscreenchange",e),t()},j.on("fullscreenchange",n),(r=document[x.exitFullscreen]())instanceof Promise&&r.then(n).catch(e)):t()})},on:function(e,t){var n=C[e];n&&document.addEventListener(n,t)},off:function(e,t){var n=C[e];n&&document.removeEventListener(n,t)}},Object.defineProperties(j,{isFullscreen:{get:function(){return Boolean(document[x.fullscreenElement])}},element:{enumerable:!0,get:function(){return document[x.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(document[x.fullscreenEnabled])}}}),q=j,function(e){function n(e){"console"in window&&console.error&&console.error("There was an error creating an embed: ".concat(e))}var t=0<arguments.length&&void 0!==e?e:document;[].slice.call(t.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")).forEach(function(t){try{if(null!==t.getAttribute("data-vimeo-defer"))return;var e=_(t);F(s(e),e,t).then(function(e){return N(e,t)}).catch(n)}catch(e){n(e)}})}(),function(e){var r=0<arguments.length&&void 0!==e?e:document;window.VimeoPlayerResizeEmbeds_||(window.VimeoPlayerResizeEmbeds_=!0,window.addEventListener("message",function(e){if(c(e.origin)&&e.data&&"spacechange"===e.data.event)for(var t=r.querySelectorAll("iframe"),n=0;n<t.length;n++)if(t[n].contentWindow===e.source){t[n].parentElement.style.paddingBottom="".concat(e.data.data[0].bottom,"px");break}}))}(),function(e){var u=0<arguments.length&&void 0!==e?e:document;window.VimeoSeoMetadataAppended||(window.VimeoSeoMetadataAppended=!0,window.addEventListener("message",function(e){if(c(e.origin)){var t=E(e.data);if(t&&"ready"===t.event)for(var n,r=u.querySelectorAll("iframe"),o=0;o<r.length;o++){var i=r[o],a=i.contentWindow===e.source;n=i.src,/^https:\/\/player\.vimeo\.com\/video\/\d+/.test(n)&&a&&new Player(i).callMethod("appendVideoMetadata",window.location.href)}}}))}()),Player});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.