PageSourceSearch

https://voam.com.br/assets/js/controller/controller.min.js?v=1790899147

js voam.com.br collected 2026-10-01 23:59:27 UTC 22,895 bytes, 760 lines download raw bytes

1function Form(options) {
2	this.options = {
3		formElem: document.getElementsByClassName('js-Form')[0],
4		answerElem: document.getElementsByClassName('js-Form-answer')[0],
5		sendButton: document.getElementsByClassName('js-Form-sendButton')[0],
6		sendingText: 'Enviando...',
7		url: '',
8		fileuploadUrl: '',
9		method: '',
10		enctype: '',
11		dataTypeReturn: 'json',
12		hasUpload: true,
13		uploadButton: document.querySelectorAll('.js-Form-uploadButton'),
14		dropzone: [],
15		onAjaxDataSuccess: null,
16		onAjaxDataError: null,
17		onValidationSuccess: false
18	};
19
20	$.extend(true, this.options, options);
21
22	this.ajaxRequest = null;
23	this.sendButtonIsDisabled = false;
24
25}
26
27Form.prototype = {
28	constructor: Form,
29	init: function () {
30		var _this = this;
31		this.options.url = this.options.formElem.getAttribute('action');
32		this.options.fileuploadUrl = this.options.formElem.getAttribute('data-fileupload-url');
33		this.options.method = this.options.formElem.getAttribute('method');
34		this.options.enctype = this.options.formElem.getAttribute('enctype');
35
36		if (this.options.sendButton) {
37			this.options.sendButton.addEventListener('click', function (e) {
38				e.preventDefault();
39				_this._onClickSendButton();
40			});
41		}
42
43		var hasDropzone = document.querySelector('.js-Form-uploadButton');
44		if(hasDropzone) {
45			if (this.options.uploadButton && !this.options.uploadButton[0].dropzone) {
46				for (var i = 0; this.options.uploadButton.length > i; i++) {
47					this.options.uploadButton[i].addEventListener('click', function (e) {
48						e.preventDefault();
49					});
50				}
51				this._initFileUpload();
52			}
53		}
54
55
56		var inputIgnored = document.querySelectorAll('.js-Form-input--ignored');
57		for (var i = 0; i < inputIgnored.length; ++i) {
58			inputIgnored[i].addEventListener('keyup', function (e) {
59				_this._onKeyUpInputIgnored(e);
60			})
61		}
62
63		this._limitFieldsChecked();
64		this._initFormMaks();
65		this._helperDropdownChangeText();
66	},
67
68	_onKeyUpInputIgnored: function (e) {
69		e.currentTarget.previousElementSibling.value = e.currentTarget.value;
70	},
71
72	_helperDropdownChangeText: function () {
73		var _this = this;
74		var dropdownMenuElem = document.querySelectorAll('.js-Form-dropdownMenu');
75
76		for (var i = 0; i < dropdownMenuElem.length; ++i) {
77			var dropdownMenuLinkElem = dropdownMenuElem[i].querySelectorAll('a');
78			for (var j = 0; j < dropdownMenuLinkElem.length; ++j) {
79				dropdownMenuLinkElem[j].addEventListener('click', function (e) {
80					e.preventDefault();
81					_this._onClickDropdownMenuLink(this);
82				});
83			}
84		}
85	},
86
87	_onClickDropdownMenuLink: function (elem) {
88		var dropdownContainerElem = null;
89		for (var parentNode = elem.parentNode; parentNode;) {
90			if (parentNode.classList.contains('js-Form-dropdownMenu')) {
91				dropdownContainerElem = parentNode;
92				break;
93			}
94			parentNode = parentNode.parentNode;
95		}
96
97		try {
98			dropdownContainerElem.previousElementSibling.querySelector('.jsForm-dropdownButton').innerHTML = elem.innerHTML;
99		} catch (e) {
100			console.log(e);
101			return;
102		}
103	},
104
105	_initFileUpload: function () {
106		var _this = this;
107		var previewTemplate = '';
108		if (document.querySelector('.js-Form-uploadTemplate')) previewTemplate = document.querySelector('.js-Form-uploadTemplate').innerHTML;
109
110		for (var i = 0; document.querySelectorAll('.js-Form-uploadButton').length > i; i++) {
111			this.options.dropzone.push(new Dropzone(document.querySelectorAll('.js-Form-uploadButton')[i], {
112				url: this.options.fileuploadUrl,
113				paramName: "file", // The name that will be used to transfer the file
114				maxFilesize: 1000, // MB
115				uploadMultiple: false,
116				clickable: true,
117				maxFiles: 2,
118				createImageThumbnails: false,
119				headers: {
120					'X-CSRF-Token': document.querySelector('meta[name=_token]').getAttribute('content')
121				},
122				previewTemplate: previewTemplate,
123				previewsContainer: document.querySelector('.js-Form-uploadPreviewsContainer')
124			}));
125
126			this.options.dropzone[i].on('success', function (file, data) {
127				try {
128					var inputHidden = document.querySelectorAll('.js-Form-uploadID input');
129					for (var i = 0; i < inputHidden.length; ++i) {
130						inputHidden[i].value = data.id;
131					}
132				} catch (e) {
133					console.log(e);
134				}
135
136				try {
137					var inputHidden = document.querySelectorAll('.js-Form-uploadFileName input');
138					for (var i = 0; i < inputHidden.length; ++i) {
139						inputHidden[i].value = data.filename;
140					}
141				} catch (e) {
142					console.log(e);
143				}
144			});
145
146			this.options.dropzone[i].on('addedfile', function (file) {
147				try {
148					this.element.querySelector('.js-Form-uploadButtonText').innerHTML = file.name;
149				} catch (e) {
150					console.log(e);
151				}
152				_this._onDropzoneAddedFile(file);
153			});
154
155			this.options.dropzone[i].on("complete", function (file) {
156				_this._onDropzoneComplete(file, this.element);
157
158				for (var i = 0; i < _this.options.dropzone.length; ++i) {
159					_this.options.dropzone[i].removeAllFiles();
160				}
161			});
162
163			this.options.dropzone[i].on('uploadprogress', function (file, progress, bytesSent) {
164				_this._onDropzoneUploadProgress(file, progress, bytesSent, this.element);
165			});
166
167			this.options.dropzone[i].on('sending', function (file, xhr, formData) {
168			});
169
170			this.options.dropzone[i].on('maxfilesreached', function (file) {
171				"use strict";
172			});
173		}
174	},
175
176	_onDropzoneUploadProgress: function (file, progress, bytesSent, element) {
177		if (progress > 99) element.parentNode.parentNode.querySelector('.js-Form-answer').innerHTML = 'Arquivo enviado com sucesso.';
178		else element.parentNode.parentNode.querySelector('.js-Form-answer').innerHTML = 'Subindo o arquivo, aguarde. ' + parseInt(progress) + '%';
179	},
180
181	_onDropzoneAddedFile: function (file) {
182		try {
183			if (!this.options.sendButton.classList.contains('disabled')) {
184				this.options.sendButton.classList.add('disabled');
185				this.sendButtonIsDisabled = true;
186			}
187		} catch (e) {
188			console.log(e);
189		}
190	},
191
192	_onDropzoneComplete: function (file, element) {
193		var _this = this;
194		if (file.status == 'error') {
195
196		} else {
197			var response = JSON.parse(file.xhr.response);
198
199
200			try {
201				element.parentNode.parentNode.querySelector('.js-Form-answer').innerHTML = response.msg;
202				this.options.sendButton.classList.remove('disabled');
203			} catch (e) {
204				console.log(e);
205			}
206		}
207
208		this.sendButtonIsDisabled = false;
209	},
210
211	_initFormMaks: function () {
212		$('.js-Form-telephone').each(function () {
213			VMasker(this).maskPattern("(99) 9999-99999");
214		});
215
216		$('.js-Form-date').each(function () {
217			VMasker(this).maskPattern("99/99/9999");
218		});
219
220		$('.js-Form-cep').each(function () {
221			VMasker(this).maskPattern("99999-999");
222		});
223
224		$('.js-Form-cpf').each(function () {
225			VMasker(this).maskPattern("999.999.999-99");
226		});
227	},
228
229	_checkFieldsError: function () {
230		"use strict";
231
232		var error = '';
233		var textElements = this.options.formElem.querySelectorAll(".js-Form-necessary.js-Form-text input, .js-Form-necessary.js-Form-text textarea");
234		var radioElements = this.options.formElem.querySelectorAll(".js-Form-radio.js-Form-necessary");
235		var checkboxElements = this.options.formElem.querySelectorAll(".js-Form-necessary.js-Form-group--checkbox");
236		var selectElements = this.options.formElem.querySelectorAll(".js-Form-select.js-Form-necessary select");
237
238		for (var i = 0; i < textElements.length; ++i) {
239			var value = textElements[i].value;
240			var name = textElements[i].getAttribute('data-user-friendly-name');
241			if (value == '') {
242				error += '<p><strong>Necessário preencher o campo</strong> ' + name + '</p>';
243				textElements[i].classList.add('error');
244			} else {
245				textElements[i].classList.remove('error');
246			}
247		}
248
249		for (var i = 0; i < radioElements.length; ++i) {
250			var nameRadio = radioElements[i].querySelectorAll('input')[0].getAttribute('data-user-friendly-name');
251			if (radioElements[i].querySelectorAll('input:checked').length == 0) {
252				error += '<p><strong>Necessário preencher o campo</strong> ' + nameRadio + '</p>';
253				radioElements[i].classList.add('error');
254			} else {
255				radioElements[i].classList.remove('error');
256			}
257		}
258
259		for (var iCheckbox = 0; iCheckbox < checkboxElements.length; ++iCheckbox) {
260			var nameCheckbox = checkboxElements[iCheckbox].querySelectorAll('input')[0].getAttribute('data-user-friendly-name');
261			if (checkboxElements[iCheckbox].querySelectorAll('input:checked').length == 0) {
262				error += '<p><strong>Necessário preencher o campo</strong> ' + nameCheckbox + '</p>';
263				checkboxElements[iCheckbox].classList.add('error');
264			} else {
265				checkboxElements[iCheckbox].classList.remove('error');
266			}
267		}
268
269		for (var i = 0; i < selectElements.length; i++) {
270			var value = selectElements[i].value;
271			var name = selectElements[i].getAttribute('data-user-friendly-name');
272			if (value == 'nop' || value == '') {
273				error += '<p><strong>Necessário selecionar no campo</strong> ' + name + '</p>';
274				selectElements[i].classList.add('error');
275			} else {
276				selectElements[i].classList.remove('error');
277			}
278		}
279
280		return error;
281	},
282
283	_getData: function (data) {
284		var formData = new FormData();
285
286		this._getDataText(formData, data);
287		this._getDataRadioButton(formData, data);
288		this._getDataCheckboxButton(formData, data);
289		this._getDataSelect(formData, data);
290
291		try {
292			formData.append('attachment', document.querySelector('.js-Form-attachment').value);
293		} catch (e) {
294			console.log("Attachment error: " + e);
295		}
296
297		return formData;
298	},
299
300	_getDataCheckboxButton: function (formData, data) {
301		var elementsGroups = this.options.formElem.querySelectorAll('.js-Form-group--checkbox');
302		var values = [];
303		var name = '';
304
305		for (var i = 0; i < elementsGroups.length; ++i) {
306			var allCheckboxs = elementsGroups[i].querySelectorAll('input[type=checkbox]:checked');
307			if (allCheckboxs.length > 0) {
308				for (var j = 0; j < allCheckboxs.length; ++j) {
309					values.push(allCheckboxs[j].value);
310				}
311
312				name = allCheckboxs[0].getAttribute('name');
313				data[name] = values;
314				formData.append(name, values);
315				values = [];
316			}
317			values = [];
318		}
319	},
320
321	_getDataRadioButton: function (formData, data) {
322		var elements = this.options.formElem.querySelectorAll('input[type=radio]:checked');
323
324		for (var i = 0; i < elements.length; ++i) {
325			var value = elements[i].value;
326			var name = elements[i].getAttribute('name');
327			data[name] = value;
328			formData.append(name, value);
329		}
330	},
331
332	_getDataSelect: function (formData, data) {
333		var elements = this.options.formElem.querySelectorAll('select');
334		for (var i = 0; i < elements.length; ++i) {
335			for (var counter = 0; elements[i].children.length > counter; counter++) {
336				if (elements[i].children[counter].selected == true) {
337					var value = elements[i].children[counter].value;
338				}
339			}
340
341			var name = elements[i].getAttribute('name');
342
343			data[name] = value;
344			formData.append(name, value);
345		}
346	},
347
348	_getDataText: function (formData, data) {
349		var elements = this.options.formElem.querySelectorAll('input[type=text], input[type=hidden], input[type=email], input[type=tel], input[type=cel], textarea');
350		for (var i = 0; i < elements.length; ++i) {
351			if (elements[i].classList.contains('js-Form-input--ignored')) continue;
352			var value = elements[i].value;
353			var name = elements[i].getAttribute('name');
354
355			data[name] = value;
356			formData.append(name, value);
357		}
358	},
359
360	_onClickSendButton: function () {
361		if (this.sendButtonIsDisabled) return;
362
363		var _this = this;
364		var error = this._checkFieldsError();
365		if (error != '' && this.options.answerElem) {
366			this.options.answerElem.innerHTML = error;
367			this.options.answerElem.classList.add('Form-answerContainer--showMessage');
368			return;
369		}
370
371		try {
372			if (this.options.onValidationSuccess() == false) {
373				return;
374			}
375		} catch (e) {
376			console.log(e);
377		}
378
379		var data = {};
380		var formData = this._getData(data);
381
382		$.ajax({
383			url: this.options.url,
384			type: this.options.method,
385			dataType: 'json',
386			data: data,
387			headers: {
388				'X-CSRF-Token': document.querySelector('meta[name=_token]').getAttribute('content')
389			}
390		}).done(function (data) {
391			if (data.hasErro) {
392				if (_this.options.onAjaxDataError) _this.options.onAjaxDataError(data);
393			} else {
394				_this.options.formElem.reset();
395				$('.js-Form-uploadButtonText').html('Anexar currículo');
396				if (_this.options.onAjaxDataSuccess) _this.options.onAjaxDataSuccess(data);
397			}
398			_this.options.formElem.querySelector('.js-answerText').innerHTML = "<p>" + data.msg + "</p>";
399			_this.options.answerElem.classList.remove('Form-answerContainer--showMessage');
400			_this.options.answerElem.classList.add('Success');
401			// }).error(function (jqXHR, textStatus, errorThrown) {
402			// 	"use strict";
403			//
404			// 	try {
405			// 		if (jqXHR.status >= 400 && jqXHR.status < 500) {
406			// 			var errorObj = JSON.parse(jqXHR.responseText);
407			// 			var errorObjKeys = Object.keys(errorObj);
408			// 			var errors = '';
409			// 			for (var i = 0; i < errorObjKeys.length; ++i) {
410			// 				errors += errorObj[errorObjKeys[i]].join('<br />');
411			// 			}
412			// 			_this.options.answerElem.innerHTML = '<p>' + errors + '</p>';
413			// 			if (_this.options.onAjaxError) _this.options.onAjaxError(errors, jqXHR, textStatus, errorThrown);
414			// 		} else if (jqXHR.status >= 500 && jqXHR.status < 600) {
415			// 			_this.options.answerElem.innerHTML = 'Falha na conexão com o servidor. Erro ' + jqXHR.status;
416			// 		}
417			// 	} catch (e) {
418			// 		_this.options.answerElem.innerHTML = 'Falha na resposta do servidor.';
419			// 		console.log(e);
420			// 	}
421		});
422	},
423	_onLoadSendForm: function (response) {
424		try {
425			var answer = JSON.parse(response.response);
426			this.options.answerElem.innerHTML = answer.msg;
427		} catch (e) {
428			if (this.options.answerElem) this.options.answerElem.innerHTML = 'Houve um erro no servidor';
429		}
430
431		if (response.status >= 200 && response.status < 400) {
432			document.querySelector('.js-Form').reset();
433
434		} else {
435			console.log(e);
436		}
437	},
438	_onErrorSendForm: function (a, b, c, d) {
439		this.options.answerElem.innerHTML = 'Houve um erro na conexão';
440	},
441
442	_limitFieldsChecked: function () {
443
444	}
445};
446function FormAnimation() {
447}
448
449FormAnimation.prototype = {
450	constructor: FormAnimation,
451	init: function () {
452		"use strict";
453		var _this = this;
454		
455		var inputs = document.querySelectorAll('.js-onBlur');
456		for (var i = 0; i < inputs.length; ++i) {
457			inputs[i].addEventListener('blur', function () {
458				_this._onInputBlur(this);
459			});
460		}
461		
462		$('.Form-checkboxLabel').click(function () {
463			_this._onFormCheckboxLabelClick(this);
464		});
465		
466		this._textareaAutosize();
467	},
468	
469	_onFormCheckboxLabelClick: function (elem) {
470		var el = $(elem).children('.circle');
471		var newone = el.clone(true);
472		el.before(newone);
473		$("." + el.attr("class") + ":last").remove();
474	},
475	
476	_onInputBlur: function (elem) {
477		if (elem.value) elem.classList.add('used');
478		else elem.classList.remove('used');
479	},
480	
481	_textareaAutosize: function () {
482		autosize(document.querySelectorAll('textarea'));
483	}
484};
485function Header() {
486}
487
488Header.prototype = {
489	constructor: Header,
490	init: function () {
491		"use strict";
492		this._header();
493
494		this._initSqueezebox();
495
496	},
497
498	_header: function () {
499		var sliderMenu = new SliderMenu();
500		sliderMenu.init();
501	},
502
503	_initSqueezebox: function () {
504		"use strict";
505		var squeezebox = new Squeezebox({
506			closeOthers: true,
507			onOpen: function (wrapper, clickedHeader) {
508				clickedHeader.classList.add('accordion_open');
509				if (clickedHeader.children[1]) {
510					clickedHeader.children[1].innerHTML = 'keyboard_arrow_up';
511				}
512			},
513			onClose: function (wrapper, clickedHeader) {
514				if (clickedHeader.children[1]) {
515					clickedHeader.children[1].innerHTML = 'keyboard_arrow_down';
516				}
517			}
518		});
519		squeezebox.init();
520	}
521};
522function GoogleMaps() {
523	this.mapItem = document.querySelector('.js-map');
524	this.mapCoordinates = this.mapItem.getAttribute('data-coordinates');
525	this.addressCoordinates = {
526		latitude: eval(this.mapCoordinates.split(',')[0]),
527		longitude: eval(this.mapCoordinates.split(',')[1])
528	}
529}
530
531GoogleMaps.prototype = {
532	constructor: GoogleMaps,
533	init: function () {
534		"use strict";
535
536		if (this.mapItem) {
537			google.maps.event.addDomListener(window, 'load', this._initMap());
538		}
539	},
540
541	_initMap: function () {
542		"use strict";
543		var volvoIcon, voamIcon, locations, map, infowindow, marker, i;
544		voamIcon = this.mapItem.getAttribute('data-voam');
545		volvoIcon = this.mapItem.getAttribute('data-volvo');
546
547		locations = [
548			['<strong>Volvo</strong><br>\
549				Av Juscelino Kubitscheck de Oliveira 2600<br> Cidade Industrial, Curitiba - PR<br>', -25.4515072, -49.3642246, 4, volvoIcon],
550			['<strong>Voam Centro</strong><br>\
551				Av. Sete de Setembro, 4214<br> Centro, Curitiba - PR<br>', -25.4420394, -49.2816334, 5, voamIcon]
552		];
553
554		map = new google.maps.Map(document.querySelector('.js-map'), {
555			zoom: 13,
556			scrollwheel: false,
557			center: new google.maps.LatLng(this.addressCoordinates.latitude, this.addressCoordinates.longitude),
558			mapTypeId: google.maps.MapTypeId.ROADMAP
559		});
560
561		infowindow = new google.maps.InfoWindow();
562
563		for (i = 0; i < locations.length; i++) {
564			marker = new google.maps.Marker({
565				position: new google.maps.LatLng(locations[i][1], locations[i][2]),
566				icon: locations[i][4],
567				map: map
568			});
569
570			google.maps.event.addListener(marker, 'click', (function (marker, i) {
571				return function () {
572					infowindow.setContent(locations[i][0]);
573					infowindow.open(map, marker);
574				}
575			})(marker, i));
576		}
577	}
578};
579function SliderMenu() {
580
581}
582
583SliderMenu.prototype = {
584	constructor: SliderMenu,
585	init: function () {
586		"use strict";
587		var _this = this;
588		document.querySelector('.js-openMenuButton').addEventListener('click', function () {
589			_this._sliderMenu();
590		})
591	},
592
593	_sliderMenu: function () {
594		"use strict";
595		if (document.querySelector('body').classList.contains('menu--isOpen')) {
596			document.querySelector('body').classList.remove('menu--isOpen');
597			document.querySelector('.js-openMenuButton').innerHTML = 'menu';
598		} else {
599			document.querySelector('body').classList.add('menu--isOpen');
600			document.querySelector('.js-openMenuButton').innerHTML = 'close';
601		}
602	}
603}
604function Slideshow() {
605	this.slider = null;
606	this.secondSlider = null;
607}
608
609Slideshow.prototype = {
610	constructor: Slideshow,
611	init: function () {
612		"use strict";
613		this._initSlideshow();
614
615		if (window.innerWidth < 768) {
616			try {
617				this._initSecondSlideshow();
618			} catch (e) {
619				console.log(e);
620			}
621		}
622	},
623
624	_initSlideshow: function () {
625		"use strict";
626		this.slider = new MasterSlider();
627		this.slider.setup('masterslider', {
628			width: 1200,
629			height: 750,
630			space: 0,
631			autoplay: true,
632			loop: true,
633			overPause: false,
634			keyboard: true,
635			layout: 'fillwidth',
636			view: "basic"
637		});
638		this.slider.control('arrows');
639
640		var _this = this;
641		this.slider.api.addEventListener(MSSliderEvent.CHANGE_START, function () {
642			if (window.innerWidth < 768) {
643				if (_this.secondSlider && _this.secondSlider.api) {
644					_this.secondSlider.api.gotoSlide(_this.slider.api.view.index);
645				}
646			} else {
647				_this._getInfos();
648				_this._hideArrows();
649			}
650		});
651	},
652
653	_initSecondSlideshow: function () {
654		"use strict";
655		this.secondSlider = new MasterSlider();
656		this.secondSlider.setup('masterslider-text', {
657			width: 300,
658			height: 40,
659			space: 5,
660			layout: 'fullwidth',
661			autoHeight: true,
662			swipe: false,
663			mouse: false
664		});
665	},
666
667	_getInfos: function () {
668		"use strict";
669		var currentItemSlide = this.slider.api.view.index;
670
671		if (this.slider.api.view.slideList.length > (currentItemSlide + 1)) {
672			this._showPreviewNext(this.slider.api.view.slideList[currentItemSlide + 1]);
673		} else if (this.slider.api.view.index == 2) {
674			var nextArrow = document.querySelector('.ms-nav-next');
675			if (nextArrow) nextArrow.innerHTML = '';
676		}
677
678		if (currentItemSlide > 0) {
679			this._showPreviewPrev(this.slider.api.view.slideList[currentItemSlide - 1]);
680		} else if (currentItemSlide == 0) {
681			var prevArrow = document.querySelector('.ms-nav-prev');
682			if (prevArrow) prevArrow.innerHTML = '';
683		}
684	},
685
686	_showPreviewNext: function (thisSlide) {
687		"use strict";
688		var nextArrow = document.querySelector('.ms-nav-next');
689		if (!nextArrow || !thisSlide || !thisSlide.$element || !thisSlide.$element[0]) return;
690		var titleEl = thisSlide.$element[0].querySelector('.js-title');
691		var text = titleEl ? titleEl.innerText : (thisSlide.$element[0].children[0] ? thisSlide.$element[0].children[0].innerText : '');
692		var imgSrc = thisSlide.bg_src || '';
693		nextArrow.insertAdjacentHTML('beforeend', '<div class="Slideshow-preview"><div class="Slideshow-previewImage"><img src="' + imgSrc + '"></div><p>
693' + text + '</p></div>');
694	},
695
696	_showPreviewPrev: function (thisSlide) {
697		"use strict";
698		var prevArrow = document.querySelector('.ms-nav-prev');
699		if (!prevArrow || !thisSlide || !thisSlide.$element || !thisSlide.$element[0]) return;
700		var titleEl = thisSlide.$element[0].querySelector('.js-title');
701		var text = titleEl ? titleEl.innerText : (thisSlide.$element[0].children[0] ? thisSlide.$element[0].children[0].innerText : '');
702		var imgSrc = thisSlide.bg_src || '';
703		prevArrow.insertAdjacentHTML('beforeend', '<div class="Slideshow-preview"><div class="Slideshow-previewImage"><img src="' + imgSrc + '"></div><p>' + text + '</p></div>');
704	},
705
706	_hideArrows: function () {
707		"use strict";
708		document.querySelector('.ms-nav-next').classList.remove('hidden');
709		document.querySelector('.ms-nav-prev').classList.remove('hidden');
710
711		if (this.slider.api.count() == 1) {
712			document.querySelector('.ms-nav-prev').classList.add('hidden');
713			document.querySelector('.ms-nav-next').classList.add('hidden');
714		} else if (this.slider.api.view.currentSlide.index + 1 == this.slider.api.count()) {
715			document.querySelector('.ms-nav-next').classList.add('hidden');
716		} else if (this.slider.api.view.currentSlide.index == 0) {
717			document.querySelector('.ms-nav-prev').classList.add('hidden');
718		}
719	}
720}
721function Theme() {
722	this.buttons = document.querySelectorAll('.js-themeController');
723}
724
725Theme.prototype = {
726	constructor: Theme,
727	init: function () {
728		"use strict";
729		var _this = this;
730		this._verifyLocalStorage();
731		for(var i = 0; i < this.buttons.length; i++){
732			this.buttons[i].addEventListener('click', function () {
733				_this._changeTheme();
734			});
735		}
736	},
737
738	_verifyLocalStorage: function () {
739		"use strict";
740		if (!localStorage.getItem('theme')) {
741			document.body.classList.add('theme-light');
742			localStorage.setItem('theme', 'light');
743		} else {
744			document.body.classList.add('theme-' + localStorage.getItem('theme'));
745		}
746	},
747
748	_changeTheme: function () {
749		"use strict";
750		if (document.body.classList.contains('theme-light')) {
751			document.body.classList.remove('theme-light');
752			document.body.classList.add('theme-dark');
753			localStorage.setItem('theme', 'dark');
754		} else {
755			document.body.classList.remove('theme-dark');
756			document.body.classList.add('theme-light');
757			localStorage.setItem('theme', 'light');
758		}
759	}
760}

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.