PageSourceSearch

https://magic-tulip.com/admin/js/doznut.js?1765355390

js magic-tulip.com collected 2026-10-09 00:54:05 UTC 23,055 bytes, 822 lines download raw bytes

1(function($) {
2	"use strict";
3	var App = function() {
4		var o = this;
5		$(document).ready(function() {
6			o.initialize();
7		});
8	};
9	var p = App.prototype;
10	App.SCREEN_XS = 480;
11	App.SCREEN_SM = 768;
12	App.SCREEN_MD = 992;
13	App.SCREEN_LG = 1200;
14	p._callFunctions = null;
15	p._resizeTimer = null;
16	p.initialize = function() {
17		this._enableEvents();
18		this._initBreakpoints();
19		this._initInk();
20		this._initAccordion();
21	};
22	p._enableEvents = function() {
23		var o = this;
24		$(window).on('resize', function(e) {
25			clearTimeout(o._resizeTimer);
26			o._resizeTimer = setTimeout(function() {
27				o._handleFunctionCalls(e);
28			}, 300);
29		});
30	};
31	p.getKnobStyle = function(knob) {
32		var holder = knob.closest('.knob');
33		var options = {
34			width: Math.floor(holder.outerWidth()),
35			height: Math.floor(holder.outerHeight()),
36			fgColor: holder.css('color'),
37			bgColor: holder.css('border-top-color'),
38			draw: function() {
39				if (knob.data('percentage')) {
40					$(this.i).val(this.cv + '%');
41				}
42			}
43		};
44		return options;
45	};
46	p._initAccordion = function() {
47		$('.panel-group .card .in').each(function() {
48			var card = $(this).parent();
49			card.addClass('expanded');
50		});
51		$('.panel-group').on('hide.bs.collapse', function(e) {
52			var content = $(e.target);
53			var card = content.parent();
54			card.removeClass('expanded');
55		});
56		$('.panel-group').on('show.bs.collapse', function(e) {
57			var content = $(e.target);
58			var card = content.parent();
59			var group = card.closest('.panel-group');
60			group.find('.card.expanded').removeClass('expanded');
61			card.addClass('expanded');
62		});
63	};
64	p._initInk = function() {
65		var o = this;
66		$('.ink-reaction').on('click', function(e) {
67			var bound = $(this).get(0).getBoundingClientRect();
68			var x = e.clientX - bound.left;
69			var y = e.clientY - bound.top;
70			var color = o.getBackground($(this));
71			var inverse = (o.getLuma(color) > 183) ? ' inverse' : '';
72			var ink = $('<div class="ink' + inverse + '"></div>');
73			var btnOffset = $(this).offset();
74			var xPos = e.pageX - btnOffset.left;
75			var yPos = e.pageY - btnOffset.top;
76			ink.css({
77				top: yPos,
78				left: xPos
79			}).appendTo($(this));
80			window.setTimeout(function() {
81				ink.remove();
82			}, 1500);
83		});
84	};
85	p.getBackground = function(item) {
86		var color = item.css("background-color");
87		var alpha = parseFloat(color.split(',')[3], 10);
88		if ((isNaN(alpha) || alpha > 0.8) && color !== 'transparent') {
89			return color;
90		}
91		if (item.is("body")) {
92			return false;
93		} else {
94			return this.getBackground(item.parent());
95		}
96	};
97	p.getLuma = function(color) {
98		var rgba = color.substring(4, color.length - 1).split(',');
99		var r = rgba[0];
100		var g = rgba[1];
101		var b = rgba[2];
102		var luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;
103		return luma;
104	};
105	p._initBreakpoints = function(alias) {
106		var html = '';
107		html += '<div id="device-breakpoints">';
108		html += '<div class="device-xs visible-xs" data-breakpoint="xs"></div>';
109		html += '<div class="device-sm visible-sm" data-breakpoint="sm"></div>';
110		html += '<div class="device-md visible-md" data-breakpoint="md"></div>';
111		html += '<div class="device-lg visible-lg" data-breakpoint="lg"></div>';
112		html += '</div>';
113		$('body').append(html);
114	};
115	p.isBreakpoint = function(alias) {
116		return $('.device-' + alias).is(':visible');
117	};
118	p.minBreakpoint = function(alias) {
119		var breakpoints = ['xs', 'sm', 'md', 'lg'];
120		var breakpoint = $('#device-breakpoints div:visible').data('breakpoint');
121		return $.inArray(alias, breakpoints) < $.inArray(breakpoint, breakpoints);
122	};
123	p.callOnResize = function(func) {
124		if (this._callFunctions === null) {
125			this._callFunctions = [];
126		}
127		this._callFunctions.push(func);
128		func.call();
129	};
130	p._handleFunctionCalls = function(e) {
131		if (this._callFunctions === null) {
132			return;
133		}
134		for (var i = 0; i < this._callFunctions.length; i++) {
135			this._callFunctions[i].call();
136		}
137	};
138	window.doznutadmin = window.doznutadmin || {};
139	window.doznutadmin.App = new App;
140}(jQuery));
141(function(namespace, $) {
142	"use strict";
143	var AppNavigation = function() {
144		var o = this;
145		$(document).ready(function() {
146			o.initialize();
147		});
148	};
149	var p = AppNavigation.prototype;
150	AppNavigation.MENU_MAXIMIZED = 1;
151	AppNavigation.MENU_COLLAPSED = 2;
152	AppNavigation.MENU_HIDDEN = 3;
153	p._lastOpened = null;
154	p.initialize = function() {
155		this._enableEvents();
156		this._invalidateMenu();
157		this._evalMenuScrollbar();
158	};
159	p._enableEvents = function() {
160		var o = this;
161		$(window).on('resize', function(e) {
162			o._handleScreenSize(e);
163		});
164		$('[data-toggle="menubar"]').on('click', function(e) {
165			o._handleMenuToggleClick(e);
166			window.dispatchEvent(new CustomEvent('open-gnb-mobile'));
167		});
168		$('[data-dismiss="menubar"]').on('click', function(e) {
169			o._handleMenubarLeave();
170		});
171		$('#main-menu').on('click', 'li', function(e) {
172			const isPreventClickEvent = Boolean($(this).data('prevent-menu-click'));
173
174			if (isPreventClickEvent) {
175				return false;
176			}
177
178			o._handleMenuItemClick(e);
179		});
180		$('#main-menu').on('click', 'a', function(e) {
181			o._handleMenuLinkClick(e);
182		});
183	};
184	p._handleScreenSize = function(e) {
185		this._invalidateMenu();
186		this._evalMenuScrollbar(e);
187	};
188	p._handleMenuToggleClick = function(e) {
189		var state = this.getMenuState();
190		if (state === AppNavigation.MENU_COLLAPSED) {
191			this._handleMenubarEnter();
192		} else if (state === AppNavigation.MENU_MAXIMIZED) {
193			this._handleMenubarLeave();
194		} else if (state === AppNavigation.MENU_HIDDEN) {
195			this._handleMenubarEnter();
196		}
197	};
198	p._handleMenuItemClick = function(e) {
199		e.stopPropagation();
200		var item = $(e.currentTarget);
201		var submenu = item.find('> ul');
202		var parentmenu = item.closest('ul');
203		this._handleMenubarEnter(item);
204		if (submenu.children().length !== 0) {
205			this._closeSubMenu(parentmenu);
206			var menuIsCollapsed = this.getMenuState() === AppNavigation.MENU_COLLAPSED;
207			if (menuIsCollapsed || item.hasClass('expanded') === false) {
208				this._openSubMenu(item);
209			}
210		}
211	};
212	p._handleMenubarEnter = function(menuItem) {
213		window.dispatchEvent(new CustomEvent('open-gnb-mobile'));
214
215		var o = this;
216		var offcanvasVisible = $('body').hasClass('offcanvas-left-expanded');
217		var menubarExpanded = $('#menubar').data('expanded');
218		var menuItemClicked = (menuItem !== undefined);
219		if ((menuItemClicked === true || offcanvasVisible === false) && menubarExpanded !== true) {
220			$('#content').one('mouseover', function(e) {
221				o._handleMenubarLeave();
222			});
223			$('body').addClass('menubar-visible');
224			$('#menubar').data('expanded', true);
225			$('#menubar').triggerHandler('enter');
226			if (menuItemClicked === false) {
227				if (this._lastOpened) {
228					var o = this;
229					this._openSubMenu(this._lastOpened, 0);
230					this._lastOpened.parents('.gui-folder').each(function() {
231						o._openSubMenu($(this), 0);
232					});
233				} else {
234					var item = $('#main-menu > li.active');
235					this._openSubMenu(item, 0);
236				}
237			}
238		}
239	};
240	p._handleMenubarLeave = function() {
241		$('body').removeClass('menubar-visible');
242		if (doznutadmin.App.minBreakpoint('md')) {
243			if ($('body').hasClass('menubar-pin')) {
244				return;
245			}
246		}
247		$('#menubar').data('expanded', false);
248		if (doznutadmin.App.isBreakpoint('xs') === false) {
249			this._closeSubMenu($('#main-menu'));
250		}
251	};
252	p._handleMenuLinkClick = function(e) {
253		if (this.getMenuState() !== AppNavigation.MENU_MAXIMIZED) {
254			e.preventDefault();
255		}
256	};
257	p._closeSubMenu = function(menu) {
258		var o = this;
259		menu.find('> li > ul').stop().slideUp(170, function() {
260			$(this).closest('li').removeClass('expanded');
261			o._evalMenuScrollbar();
262		});
263	};
264	p._openSubMenu = function(item, duration) {
265		var o = this;
266		if (typeof(duration) === 'undefined') {
267			duration = 170;
268		}
269		this._lastOpened = item;
270		item.addClass('expanding');
271		item.find('> ul').stop().slideDown(duration, function() {
272			item.addClass('expanded');
273			item.removeClass('expanding');
274			o._evalMenuScrollbar();
275			$('#main-menu ul').removeAttr('style');
276		});
277	};
278	p._invalidateMenu = function() {
279		var selectedLink = $('#main-menu a.active');
280		selectedLink.parentsUntil($('#main-menu')).each(function() {
281			if ($(this).is('li')) {
282				$(this).addClass('active');
283				$(this).addClass('expanded');
284			}
285		});
286		if (this.getMenuState() === AppNavigation.MENU_COLLAPSED) {
287			$('#main-menu').find('> li').removeClass('expanded');
288		}
289		if ($('body').hasClass('menubar-visible')) {
290			this._handleMenubarEnter();
291		}
292		$('#main-menu').triggerHandler('ready');
293		$('#menubar').addClass('animate');
294	};
295	p.getMenuState = function() {
296		var matrix = $('#menubar').css("transform");
297		var values = (matrix) ? matrix.match(/-?[\d\.]+/g) : null;
298		var menuState = AppNavigation.MENU_MAXIMIZED;
299		if (values === null) {
300			if ($('#menubar').width() <= 100) {
301				menuState = AppNavigation.MENU_COLLAPSED;
302			} else {
303				menuState = AppNavigation.MENU_MAXIMIZED;
304			}
305		} else {
306			if (values[4] === '0') {
307				menuState = AppNavigation.MENU_MAXIMIZED;
308			} else {
309				menuState = AppNavigation.MENU_HIDDEN;
310			}
311		}
312		return menuState;
313	};
314	p._evalMenuScrollbar = function() {
315		if (!$.isFunction($.fn.nanoScroller)) {
316			return;
317		}
318		var footerHeight = $('#menubar .menubar-foot-panel').outerHeight();
319		footerHeight = Math.max(footerHeight, 1);
320		$('.menubar-scroll-panel').css({
321			'padding-bottom': footerHeight
322		});
323		var menu = $('#menubar');
324		if (menu.length === 0)
325			return;
326		var menuScroller = $('.menubar-scroll-panel');
327		var parent = menuScroller.parent();
328		if (parent.hasClass('nano-content') === false) {
329			menuScroller.wrap('<div class="nano"><div class="nano-content"></div></div>');
330		}
331		var height = $(window).height() - menu.position().top - menu.find('.nano').position().top;
332		var scroller = menuScroller.closest('.nano');
333		scroller.css({
334			height: height
335		});
336		scroller.nanoScroller({
337			preventPageScrolling: true,
338			iOSNativeScrolling: true
339		});
340	};
341	window.doznutadmin.AppNavigation = new AppNavigation;
342}(this.doznutadmin, jQuery));
343(function(namespace, $) {
344	"use strict";
345	var AppOffcanvas = function() {
346		var o = this;
347		$(document).ready(function() {
348			o.initialize();
349		});
350	};
351	var p = AppOffcanvas.prototype;
352	p._timer = null;
353	p._useBackdrop = null;
354	p.initialize = function() {
355		this._enableEvents();
356	};
357	p._enableEvents = function() {
358		var o = this;
359		$(window).on('resize', function(e) {
360			o._handleScreenSize(e);
361		});
362		$('.offcanvas').on('refresh', function(e) {
363			o.evalScrollbar(e);
364		});
365		$('[data-toggle="offcanvas"]').on('click', function(e) {
366			e.preventDefault();
367			o._handleOffcanvasOpen($(e.currentTarget));
368		});
369		$('[data-dismiss="offcanvas"]').on('click', function(e) {
370			o._handleOffcanvasClose();
371		});
372		$('#base').on('click', '> .backdrop', function(e) {
373			o._handleOffcanvasClose();
374		});
375		$('[data-toggle="offcanvas-left"].active').each(function() {
376			o._handleOffcanvasOpen($(this));
377		});
378		$('[data-toggle="offcanvas-right"].active').each(function() {
379			o._handleOffcanvasOpen($(this));
380		});
381	};
382	p._handleScreenSize = function(e) {
383		this.evalScrollbar(e);
384	};
385	p._handleOffcanvasOpen = function(btn) {
386		if (btn.hasClass('active')) {
387			this._handleOffcanvasClose();
388			return;
389		}
390		var id = btn.attr('href');
391		this._useBackdrop = (btn.data('backdrop') === undefined) ? true : btn.data('backdrop');
392		this.openOffcanvas(id);
393		this.invalidate();
394	};
395	p._handleOffcanvasClose = function(e) {
396		this.closeOffcanvas();
397		this.invalidate();
398	};
399	p.openOffcanvas = function(id) {
400		this.closeOffcanvas();
401		$(id).addClass('active');
402		var leftOffcanvas = ($(id).closest('.offcanvas:first').length > 0);
403		if (this._useBackdrop)
404			$('body').addClass('offcanvas-expanded');
405		var width = $(id).width();
406		if (width > $(document).width()) {
407			width = $(document).width() - 8;
408			$(id + '.active').css({
409				'width': width
410			});
411		}
412		width = (leftOffcanvas) ? width : '-' + width;
413		var translate = 'translate(' + width + 'px, 0)';
414		$(id + '.active').css({
415			'-webkit-transform': translate,
416			'-ms-transform': translate,
417			'-o-transform': translate,
418			'transform': translate
419		});
420	};
421	p.closeOffcanvas = function() {
422		$('[data-toggle="offcanvas"]').removeClass('expanded');
423		$('.offcanvas-pane').removeClass('active');
424		$('.offcanvas-pane').css({
425			'-webkit-transform': '',
426			'-ms-transform': '',
427			'-o-transform': '',
428			'transform': ''
429		});
430	};
431	p.toggleButtonState = function() {
432		var id = $('.offcanvas-pane.active').attr('id');
433		$('[data-toggle="offcanvas"]').removeClass('active');
434		$('[href="#' + id + '"]').addClass('active');
435	};
436	p.toggleBackdropState = function() {
437		if ($('.offcanvas-pane.active').length > 0 && this._useBackdrop) {
438			this._addBackdrop();
439		} else {
440			this._removeBackdrop();
441		}
442	};
443	p._addBackdrop = function() {
444		if ($('#base > .backdrop').length === 0 && $('#base').data('backdrop') !== 'hidden') {
445			$('<div class="backdrop"></div>').hide().appendTo('#base').fadeIn();
446		}
447	};
448	p._removeBackdrop = function() {
449		$('#base > .backdrop').fadeOut(function() {
450			$(this).remove();
451		});
452	};
453	p.toggleBodyScrolling = function() {
454		clearTimeout(this._timer);
455		if ($('.offcanvas-pane.active').length > 0 && this._useBackdrop) {
456			var scrollbarWidth = this.measureScrollbar();
457			var bodyPad = parseInt(($('body').css('padding-right') || 0), 0);
458			if (scrollbarWidth !== bodyPad) {
459				$('body').css('padding-right', bodyPad + scrollbarWidth);
460				$('.headerbar').css('padding-right', bodyPad + scrollbarWidth);
461			}
462		} else {
463			this._timer = setTimeout(function() {
464				$('body').removeClass('offcanvas-expanded');
465				$('body').css('padding-right', '');
466				$('.headerbar').removeClass('offcanvas-expanded');
467				$('.headerbar').css('padding-right', '');
468			}, 330);
469		}
470	};
471	p.invalidate = function() {
472		this.toggleButtonState();
473		this.toggleBackdropState();
474		this.toggleBodyScrolling();
475		this.evalScrollbar();
476	};
477	p.evalScrollbar = function() {
478		if (!$.isFunction($.fn.nanoScroller)) {
479			return;
480		}
481		var menu = $('.offcanvas-pane.active');
482		if (menu.length === 0)
483			return;
484		var menuScroller = $('.offcanvas-pane.active .offcanvas-body');
485		var parent = menuScroller.parent();
486		if (parent.hasClass('nano-content') === false) {
487			menuScroller.wrap('<div class="nano"><div class="nano-content"></div></div>');
488		}
489		var height = $(window).height() - menu.find('.nano').position().top;
490		var scroller = menuScroller.closest('.nano');
491		scroller.css({
492			height: height
493		});
494		scroller.nanoScroller({
495			preventPageScrolling: true
496		});
497	};
498	p.measureScrollbar = function() {
499		var scrollDiv = document.createElement('div');
500		scrollDiv.className = 'modal-scrollbar-measure';
501		$('body').append(scrollDiv);
502		var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
503		$('body')[0].removeChild(scrollDiv);
504		return scrollbarWidth;
505	};
506	window.doznutadmin.AppOffcanvas = new AppOffcanvas;
507}(this.doznutadmin, jQuery));
508(function(namespace, $) {
509	"use strict";
510	var AppCard = function() {
511		var o = this;
512		$(document).ready(function() {
513			o.initialize();
514		});
515	};
516	var p = AppCard.prototype;
517	p.initialize = function() {};
518	p.addCardLoader = function(card) {
519		var container = $('<div class="card-loader"></div>').appendTo(card);
520		container.hide().fadeIn();
521		var opts = {
522			lines: 17,
523			length: 0,
524			width: 3,
525			radius: 6,
526			corners: 1,
527			rotate: 13,
528			direction: 1,
529			color: '#000',
530			speed: 2,
531			trail: 76,
532			shadow: false,
533			hwaccel: false,
534			className: 'spinner',
535			zIndex: 2e9
536		};
537		var spinner = new Spinner(opts).spin(container.get(0));
538		card.data('card-spinner', spinner);
539	};
540	p.removeCardLoader = function(card) {
541		var spinner = card.data('card-spinner');
542		var loader = card.find('.card-loader');
543		loader.fadeOut(function() {
544			spinner.stop();
545			loader.remove();
546		});
547	};
548	p.toggleCardCollapse = function(card, duration) {
549		duration = typeof duration !== 'undefined' ? duration : 400;
550		var dispatched = false;
551		card.find('.nano').slideToggle(duration);
552		card.find('.card-body').slideToggle(duration, function() {
553			if (dispatched === false) {
554				$('#COLLAPSER').triggerHandler('card.bb.collapse', [!$(this).is(":visible")]);
555				dispatched = true;
556			}
557		});
558		card.toggleClass('card-collapsed');
559	};
560	p.removeCard = function(card) {
561		card.fadeOut(function() {
562			card.remove();
563		});
564	};
565	window.doznutadmin.AppCard = new AppCard;
566}(this.doznutadmin, jQuery));
567(function(namespace, $) {
568	"use strict";
569	var AppForm = function() {
570		var o = this;
571		$(document).ready(function() {
572			o.initialize();
573		});
574	};
575	var p = AppForm.prototype;
576	p.initialize = function() {
577		this._enableEvents();
578		this._initRadioAndCheckbox();
579		this._initFloatingLabels();
580		this._initValidation();
581	};
582	p._enableEvents = function() {
583		var o = this;
584		$('[data-submit="form"]').on('click', function(e) {
585			e.preventDefault();
586			var formId = $(e.currentTarget).attr('href');
587			$(formId).submit();
588		});
589		$('textarea.autosize').on('focus', function() {
590			$(this).autosize({
591				append: ''
592			});
593		});
594	};
595	p._initRadioAndCheckbox = function() {
596		$('.checkbox-styled input, .radio-styled input').each(function() {
597			if ($(this).next('span').length === 0) {
598				$(this).after('<span></span>');
599			}
600		});
601	};
602	p._initFloatingLabels = function() {
603		var o = this;
604		$('.floating-label .form-control').on('keyup change', function(e) {
605			var input = $(e.currentTarget);
606			if ($.trim(input.val()) !== '') {
607				input.addClass('dirty').removeClass('static');
608			} else {
609				input.removeClass('dirty').removeClass('static');
610			}
611		});
612		$('.floating-label .form-control').each(function() {
613			var input = $(this);
614			if ($.trim(input.val()) !== '') {
615				input.addClass('static').addClass('dirty');
616			}
617		});
618		$('.form-horizontal .form-control').each(function() {
619			$(this).after('<div class="form-control-line"></div>');
620		});
621	};
622	p._initValidation = function() {
623		if (!$.isFunction($.fn.validate)) {
624			return;
625		}
626		$.validator.setDefaults({
627			highlight: function(element) {
628				$(element).closest('.form-group').addClass('has-error');
629			},
630			unhighlight: function(element) {
631				$(element).closest('.form-group').removeClass('has-error');
632			},
633			errorElement: 'span',
634			errorClass: 'help-block',
635			errorPlacement: function(error, element) {
636				if (element.parent('.input-group').length) {
637					error.insertAfter(element.parent());
638				} else if (element.parent('label').length) {
639					error.insertAfter(element.parent());
640				} else {
641					error.insertAfter(element);
642				}
643			}
644		});
645		$('.form-validate').each(function() {
646			var validator = $(this).validate();
647			$(this).data('validator', validator);
648		});
649	};
650	window.doznutadmin.AppForm = new AppForm;
651}(this.doznutadmin, jQuery));
652(function(namespace, $) {
653	"use strict";
654	var AppNavSearch = function() {
655		var o = this;
656		$(document).ready(function() {
657			o.initialize();
658		});
659	};
660	var p = AppNavSearch.prototype;
661	p._clearSearchTimer = null;
662	p.initialize = function() {
663		this._enableEvents();
664	};
665	p._enableEvents = function() {
666		var o = this;
667		$('.navbar-search .btn').on('click', function(e) {
668			o._handleButtonClick(e);
669		});
670		$('.navbar-search input').on('blur', function(e) {
671			o._handleFieldBlur(e);
672		});
673	};
674	p._handleButtonClick = function(e) {
675		e.preventDefault();
676		var form = $(e.currentTarget).closest('form');
677		var input = form.find('input');
678		var keyword = input.val();
679		if ($.trim(keyword) === '') {
680			form.addClass('expanded');
681			input.focus();
682		} else {
683			form.addClass('expanded');
684			form.submit();
685			clearTimeout(this._clearSearchTimer);
686		}
687	};
688	p._handleFieldBlur = function(e) {
689		var input = $(e.currentTarget);
690		var form = input.closest('form');
691		form.removeClass('expanded');
692		clearTimeout(this._clearSearchTimer);
693		this._clearSearchTimer = setTimeout(function() {
694			input.val('');
695		}, 300);
696	};
697	window.doznutadmin.AppNavSearch = new AppNavSearch;
698}(this.doznutadmin, jQuery));
699(function(namespace, $) {
700	"use strict";
701	var AppVendor = function() {
702		var o = this;
703		$(document).ready(function() {
704			o.initialize();
705		});
706	};
707	var p = AppVendor.prototype;
708	p.initialize = function() {
709		this._initScroller();
710		this._initTabs();
711		this._initTooltips();
712		this._initPopover();
713		this._initSortables();
714	};
715	p._initScroller = function() {
716		if (!$.isFunction($.fn.nanoScroller)) {
717			return;
718		}
719		$.each($('.scroll'), function(e) {
720			var holder = $(this);
721			doznutadmin.AppVendor.addScroller(holder);
722		});
723		doznutadmin.App.callOnResize(function() {
724			$.each($('.scroll-xs'), function(e) {
725				var holder = $(this);
726				if (!holder.is(":visible")) return;
727				if (doznutadmin.App.minBreakpoint('xs')) {
728					doznutadmin.AppVendor.removeScroller(holder);
729				} else {
730					doznutadmin.AppVendor.addScroller(holder);
731				}
732			});
733			$.each($('.scroll-sm'), function(e) {
734				var holder = $(this);
735				if (!holder.is(":visible")) return;
736				if (doznutadmin.App.minBreakpoint('sm')) {
737					doznutadmin.AppVendor.removeScroller(holder);
738				} else {
739					doznutadmin.AppVendor.addScroller(holder);
740				}
741			});
742			$.each($('.scroll-md'), function(e) {
743				var holder = $(this);
744				if (!holder.is(":visible")) return;
745				if (doznutadmin.App.minBreakpoint('md')) {
746					doznutadmin.AppVendor.removeScroller(holder);
747				} else {
748					doznutadmin.AppVendor.addScroller(holder);
749				}
750			});
751			$.each($('.scroll-lg'), function(e) {
752				var holder = $(this);
753				if (!holder.is(":visible")) return;
754				if (doznutadmin.App.minBreakpoint('lg')) {
755					doznutadmin.AppVendor.removeScroller(holder);
756				} else {
757					doznutadmin.AppVendor.addScroller(holder);
758				}
759			});
760		});
761	};
762	p.addScroller = function(holder) {
763		holder.wrap('<div class="nano"><div class="nano-content"></div></div>');
764		var scroller = holder.closest('.nano');
765		scroller.css({
766			height: holder.outerHeight()
767		});
768		scroller.nanoScroller();
769		holder.css({
770			height: 'auto'
771		});
772	};
773	p.removeScroller = function(holder) {
774		if (holder.parent().parent().hasClass('nano') === false) {
775			return;
776		}
777		holder.parent().parent().nanoScroller({
778			destroy: true
779		});
780		holder.parent('.nano-content').replaceWith(holder);
781		holder.parent('.nano').replaceWith(holder);
782		holder.attr('style', '');
783	};
784	p._initSortables = function() {
785		if (!$.isFunction($.fn.sortable)) {
786			return;
787		}
788		$('[data-sortable="true"]').sortable({
789			placeholder: "ui-state-highlight",
790			delay: 100,
791			start: function(e, ui) {
792				ui.placeholder.height(ui.item.outerHeight() - 1);
793			}
794		});
795	};
796	p._initTabs = function() {
797		if (!$.isFunction($.fn.tab)) {
798			return;
799		}
800		$('[data-toggle="tabs"] a').click(function(e) {
801			e.preventDefault();
802			$(this).tab('show');
803		});
804	};
805	p._initTooltips = function() {
806		if (!$.isFunction($.fn.tooltip)) {
807			return;
808		}
809		$('[data-toggle="tooltip"]').tooltip({
810			container: 'body'
811		});
812	};
813	p._initPopover = function() {
814		if (!$.isFunction($.fn.popover)) {
815			return;
816		}
817		$('[data-toggle="popover"]').popover({
818			container: 'body'
819		});
820	};
821	window.doznutadmin.AppVendor = new AppVendor;
822}(this.doznutadmin, jQuery));

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.