How to use execFn method in Cypress

Best JavaScript code snippet using cypress

functions.js

Source:functions.js Github

copy

Full Screen

1! function(e, i, n) {2 "object" == typeof module && module && "object" == typeof module.exports ? module.exports = n : (e[i] = n, "function" == typeof define && define.amd && define(i, [], function() {3 return n4 }))5}(this, "jRespond", function(e, i, n) {6 "use strict";7 return function(e) {8 var i = [],9 t = [],10 s = e,11 a = "",12 l = "",13 o = 0,14 r = 500,15 d = function(e) {16 var s = e.breakpoint,17 o = e.enter || n;18 i.push(e), t.push(!1), c(s) && (o !== n && o.call(null, {19 entering: a,20 exiting: l21 }), t[i.length - 1] = !0)22 },23 u = function() {24 for (var e = [], s = [], o = 0; o < i.length; o++) {25 var r = i[o].breakpoint,26 d = i[o].enter || n,27 u = i[o].exit || n;28 "*" === r ? (d !== n && e.push(d), u !== n && s.push(u)) : c(r) ? (d === n || t[o] || e.push(d), t[o] = !0) : (u !== n && t[o] && s.push(u), t[o] = !1)29 }30 for (var g = {31 entering: a,32 exiting: l33 }, f = 0; f < s.length; f++) s[f].call(null, g);34 for (var p = 0; p < e.length; p++) e[p].call(null, g)35 },36 c = function(e) {37 if ("object" == typeof e) {38 if (e.join().indexOf(a) >= 0) return !039 } else {40 if ("*" === e) return !0;41 if ("string" == typeof e && a === e) return !042 }43 },44 g = function() {45 var e = "number" != typeof window.innerWidth ? 0 !== document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth : window.innerWidth;46 e !== o ? (r = 100, function(e) {47 for (var i = !1, n = 0; n < s.length; n++)48 if (e >= s[n].enter && e <= s[n].exit) {49 i = !0;50 break51 } i && a !== s[n].label ? (l = a, a = s[n].label, u()) : i || "" === a || (a = "", u())52 }(e)) : r = 500, o = e, setTimeout(g, r)53 };54 return g(), {55 addFunc: function(e) {56 ! function(e) {57 if (e.length === n) d(e);58 else59 for (var i = 0; i < e.length; i++) d(e[i])60 }(e)61 },62 getBreakpoint: function() {63 return a64 }65 }66 }67}(0, this.document));68var $ = jQuery.noConflict();69function debounce(e, i, n) {70 let t, s, a, l, o;71 return function() {72 a = this, s = arguments, l = new Date;73 let r = function() {74 let d = new Date - l;75 d < i ? t = setTimeout(r, i - d) : (t = null, n || (o = e.apply(a, s)))76 },77 d = n && !t;78 return t || (t = setTimeout(r, i)), d && (o = e.apply(a, s)), o79 }80}81function onScrollSliderParallax() {82 SEMICOLON.slider.sliderParallax(), SEMICOLON.slider.sliderElementsFade()83}84$.fn.scrollEnd = function(e, i) {85 $(this).scroll(function() {86 let n = $(this);87 n.data("scrollTimeout") && clearTimeout(n.data("scrollTimeout")), n.data("scrollTimeout", setTimeout(e, i))88 })89 },90 function() {91 let e = 0,92 i = ["ms", "moz", "webkit", "o"];93 for (let e = 0; e < i.length && !window.requestAnimationFrame; ++e) window.requestAnimationFrame = window[i[e] + "RequestAnimationFrame"], window.cancelAnimationFrame = window[i[e] + "CancelAnimationFrame"] || window[i[e] + "CancelRequestAnimationFrame"];94 window.requestAnimationFrame || (window.requestAnimationFrame = function(i, n) {95 let t = (new Date).getTime(),96 s = Math.max(0, 16 - (t - e)),97 a = window.setTimeout(function() {98 i(t + s)99 }, s);100 return e = t + s, a101 }), window.cancelAnimationFrame || (window.cancelAnimationFrame = function(e) {102 clearTimeout(e)103 })104 }();105var SEMICOLON = SEMICOLON || {};106! function(e) {107 "use strict";108 SEMICOLON.initialize = {109 init: function() {110 SEMICOLON.initialize.defaults(), SEMICOLON.initialize.pageTransition(), SEMICOLON.initialize.goToTop(), SEMICOLON.initialize.lazyLoad(), SEMICOLON.initialize.lightbox(), SEMICOLON.initialize.resizeVideos(), SEMICOLON.initialize.dataResponsiveClasses(), SEMICOLON.initialize.dataResponsiveHeights(), SEMICOLON.initialize.stickFooterOnSmall()111 },112 execFunc: function(e, i) {113 let n = Array.prototype.slice.call(arguments, 2),114 t = e.split("."),115 s = t.pop();116 for (let e = 0; e < t.length; e++) i = i[t[e]];117 if (void 0 !== i[s]) return i[s].apply(i, n);118 console.log(e + " Function does not exist")119 },120 execPlugin: function(e, i, n) {121 window.scwEvents = window.scwEvents || {};122 let t, s = !1;123 n ? (i.trigger && !scwEvents[i.trigger] && (l.trigger(i.trigger), scwEvents[i.trigger] = !0), i.execfn && SEMICOLON.initialize.execFunc(i.execfn, window, e), i.class && o.addClass(i.class)) : (i.trigger && !scwEvents[i.trigger] ? t = setInterval(function e() {124 return Function("return " + i.pluginfn)() && (l.trigger(i.trigger), scwEvents[i.trigger] = !0, clearInterval(t)), e125 }(), 1e3) : s = !0, i.execfn && (i.trigger && !s ? l.on(i.trigger, function() {126 SEMICOLON.initialize.execFunc(i.execfn, window, e)127 }) : SEMICOLON.initialize.execFunc(i.execfn, window, e)), i.class && o.addClass(i.class))128 },129 jsLinking: function(i, n) {130 if (i.length < 1) return !1;131 if (n.hiddendisable && i.filter(":hidden").length == i.length) return !1;132 let t, s = Function("return " + n.pluginfn)(),133 a = "js/",134 l = !1;135 "undefined" != typeof scwJsPath && (a = scwJsPath + "/"), "undefined" != typeof scwDisableJsAJAX && !0 === scwDisableJsAJAX && (l = !0), t = /^(f|ht)tps?:\/\//i.test(window.decodeURIComponent(n.file)) ? n.file : a + n.file, s ? SEMICOLON.initialize.execPlugin(i, n, !0) : l ? console.log(n.error) : e.ajax({136 url: t,137 dataType: "script",138 cache: !0,139 crossDomain: !0,140 timeout: 5e3141 }).done(function() {142 SEMICOLON.initialize.execPlugin(i, n, !1)143 }).fail(function() {144 console.log(n.error)145 })146 },147 functions: function(i) {148 let n, t, s;149 "object" == typeof i.element && null !== i.element && ("undefined" !== i.element.parent && (t = i.element.parent), "undefined" !== i.element.el && (i.element = i.element.el)), s = i.element ? i.element : i.default, n = "object" === t ? t.find(s) : e(s), this.jsLinking(n, i)150 },151 defaults: function() {152 if (jRespond([{153 label: "smallest",154 enter: 0,155 exit: 575156 }, {157 label: "handheld",158 enter: 576,159 exit: 767160 }, {161 label: "tablet",162 enter: 768,163 exit: 991164 }, {165 label: "laptop",166 enter: 992,167 exit: 1199168 }, {169 label: "desktop",170 enter: 1200,171 exit: 1e4172 }]).addFunc([{173 breakpoint: "desktop",174 enter: function() {175 o.addClass("device-xl")176 },177 exit: function() {178 o.removeClass("device-xl")179 }180 }, {181 breakpoint: "laptop",182 enter: function() {183 o.addClass("device-lg")184 },185 exit: function() {186 o.removeClass("device-lg")187 }188 }, {189 breakpoint: "tablet",190 enter: function() {191 o.addClass("device-md")192 },193 exit: function() {194 o.removeClass("device-md")195 }196 }, {197 breakpoint: "handheld",198 enter: function() {199 o.addClass("device-sm")200 },201 exit: function() {202 o.removeClass("device-sm")203 }204 }, {205 breakpoint: "smallest",206 enter: function() {207 o.addClass("device-xs")208 },209 exit: function() {210 o.removeClass("device-xs")211 }212 }]), SEMICOLON.initialize.functions({213 default: "body",214 file: "plugins.easing.js",215 error: "plugins.easing.js: Plugin could not be loaded",216 pluginfn: 'typeof jQuery.easing["easeOutQuad"] !== "undefined"',217 trigger: "pluginEasingReady",218 class: "has-plugin-easing"219 }), SEMICOLON.initialize.functions({220 default: "body",221 file: "plugins.bootstrap.js",222 error: "plugins.bootstrap.js: Plugin could not be loaded",223 pluginfn: 'typeof bootstrap !== "undefined"',224 trigger: "pluginBootstrapReady",225 class: "has-plugin-bootstrap"226 }), !1 in window) {227 let e = {228 default: "body",229 file: "intersection-observer.js",230 error: "intersection-observer.js: Plugin could not be loaded",231 pluginfn: 'typeof window.IntersectionObserver !== "undefined"',232 trigger: "intersectObservePolyfill",233 class: "has-polyfill-intersection-observer"234 };235 SEMICOLON.initialize.functions(e)236 }237 },238 goToTop: function() {239 let i = X.attr("data-speed"),240 n = X.attr("data-easing");241 i || (i = 700), n || (n = "easeOutQuad"), X.off("click").on("click", function() {242 return e("body,html").stop(!0).animate({243 scrollTop: 0244 }, Number(i), n), !1245 })246 },247 goToTopScroll: function() {248 let e = X.attr("data-mobile"),249 i = X.attr("data-offset");250 if (i || (i = 450), "true" != e && (o.hasClass("device-sm") || o.hasClass("device-xs"))) return !0;251 l.scrollTop() > Number(i) ? (X.fadeIn(), o.addClass("gototop-active")) : (X.fadeOut(), o.removeClass("gototop-active"))252 },253 lightbox: function(e) {254 let i = {255 element: e,256 default: "[data-lightbox]",257 file: "plugins.lightbox.js",258 error: "plugins.lightbox.js: Plugin could not be loaded",259 execfn: "SEMICOLON_lightboxInit",260 pluginfn: "$().magnificPopup",261 trigger: "pluginLightboxReady",262 class: "has-plugin-lightbox"263 };264 SEMICOLON.initialize.functions(i)265 },266 modal: function(e) {267 let i = {268 element: e,269 default: ".modal-on-load",270 file: "plugins.lightbox.js",271 error: "plugins.lightbox.js: Plugin could not be loaded",272 execfn: "SEMICOLON_modalInit",273 pluginfn: "$().magnificPopup",274 trigger: "pluginLightboxReady",275 class: "has-plugin-lightbox"276 };277 SEMICOLON.initialize.functions(i)278 },279 resizeVideos: function() {280 SEMICOLON.initialize.functions({281 default: 'iframe[src*="youtube"],iframe[src*="vimeo"],iframe[src*="dailymotion"],iframe[src*="maps.google.com"],iframe[src*="google.com/maps"]',282 file: "plugins.fitvids.js",283 error: "plugins.fitvids.js: Plugin could not be loaded",284 execfn: "SEMICOLON_resizeVideosInit",285 pluginfn: "$().fitVids",286 trigger: "pluginfitVidsReady",287 class: "has-plugin-fitvids"288 })289 },290 pageTransition: function() {291 SEMICOLON.initialize.functions({292 default: ".page-transition",293 file: "plugins.pagetransition.js",294 error: "plugins.pagetransition.js: Plugin could not be loaded",295 execfn: "SEMICOLON_pageTransitionInit",296 pluginfn: "$().animsition",297 trigger: "pluginPageTransitionReady",298 class: "has-plugin-animsition"299 })300 },301 lazyLoad: function(e) {302 let i = {303 element: e,304 default: ".lazy",305 file: "plugins.lazyload.js",306 error: "plugins.lazyload.js: Plugin could not be loaded",307 execfn: "SEMICOLON_lazyLoadInit",308 pluginfn: 'typeof LazyLoad !== "undefined"',309 trigger: "pluginlazyLoadReady",310 class: "has-plugin-lazyload"311 };312 SEMICOLON.initialize.functions(i)313 },314 topScrollOffset: function() {315 let e = 0;316 return !o.hasClass("device-xl") && !o.hasClass("device-lg") || SEMICOLON.isMobile.any() ? e = 40 : (e = d.hasClass("sticky-header") ? $.hasClass("dots-menu") ? 100 : 144 : $.hasClass("dots-menu") ? 140 : 184, $.length || (e = d.hasClass("sticky-header") ? 100 : 140)), e317 },318 dataResponsiveClasses: function() {319 SEMICOLON.initialize.functions({320 default: "[data-class-xl],[data-class-lg],[data-class-md],[data-class-sm],[data-class-xs]",321 file: "plugins.dataclasses.js",322 error: "plugins.dataclasses.js: Plugin could not be loaded",323 execfn: "SEMICOLON_dataClassesInit",324 pluginfn: 'typeof scwDataClassesPlugin !== "undefined"',325 trigger: "pluginDataClassesReady",326 class: "has-plugin-dataclasses"327 })328 },329 dataResponsiveHeights: function() {330 SEMICOLON.initialize.functions({331 default: "[data-height-xl],[data-height-lg],[data-height-md],[data-height-sm],[data-height-xs]",332 file: "plugins.dataheights.js",333 error: "plugins.dataheights.js: Plugin could not be loaded",334 execfn: "SEMICOLON_dataHeightsInit",335 pluginfn: 'typeof scwDataHeightsPlugin !== "undefined"',336 trigger: "pluginDataHeightsReady",337 class: "has-plugin-dataheights"338 })339 },340 stickFooterOnSmall: function() {341 E.css({342 "margin-top": ""343 });344 let e = l.height(),345 i = r.height();346 !o.hasClass("sticky-footer") && E.length > 0 && r.has("#footer") && e > i && E.css({347 "margin-top": e - i348 })349 }350 }, SEMICOLON.header = {351 init: function() {352 SEMICOLON.header.initialize(), SEMICOLON.header.menufunctions(), SEMICOLON.header.fullWidthMenu(), SEMICOLON.header.stickyMenu(), SEMICOLON.header.stickyPageMenu(), SEMICOLON.header.sideHeader(), SEMICOLON.header.sidePanel(), SEMICOLON.header.onePageScroll(), SEMICOLON.header.logo(), SEMICOLON.header.topsearch(), SEMICOLON.header.topcart(), SEMICOLON.header.miscFunctions()353 },354 initialize: function() {355 u.length > 0 && (e(".header-wrap-clone").length < 1 && u.after('<div class="header-wrap-clone"></div>'), y = e(".header-wrap-clone")), $.length > 0 && ($.find("#page-menu-wrap").after('<div class="page-menu-wrap-clone"></div>'), q = e(".page-menu-wrap-clone")), e(".menu-item:has(.sub-menu-container)").addClass("sub-menu"), e(".top-links-item:has(.top-links-sub-menu,.top-links-section) > a:not(:has(.icon-angle-down)), .menu-item:not(.mega-menu-title):has(.sub-menu-container) > .menu-link > div:not(:has(.icon-angle-down)), .page-menu-item:has(.page-menu-sub-menu) > a > div:not(:has(.icon-angle-down))").append('<i class="icon-angle-down"></i>'), e(".menu-item:not(.mega-menu-title):has(.sub-menu-container):not(:has(.sub-menu-trigger))").append('<button class="sub-menu-trigger icon-chevron-right"></button>'), SEMICOLON.header.menuInvert()356 },357 menuInvert: function(i) {358 let n = i || e(".mega-menu-content, .sub-menu-container, .top-links-section");359 n.children().css({360 display: "block"361 }), n.css({362 display: "block"363 }), n.each(function(i, n) {364 let t = e(n),365 s = t.offset(),366 a = t.width();367 N - (a + s.left) < 0 && t.addClass("menu-pos-invert")368 }), n.children().css({369 display: ""370 }), n.css({371 display: ""372 })373 },374 includeOffset: function() {375 if (c.length < 1) return !0;376 let e = d.outerHeight();377 (d.hasClass("floating-header") || c.hasClass("include-topbar")) && (e += d.offset().top), c.css({378 "margin-top": -e379 }), SEMICOLON.slider.sliderParallax()380 },381 menufunctions: function() {382 let i, n = e(".menu-item:has(.sub-menu-container)"),383 t = n.children(".menu-link"),384 s = ".mega-menu-content, .sub-menu-container",385 a = e(s),386 l = M.attr("data-trigger-speed") || 200;387 l = Number(l), i = n.children(".sub-menu-trigger"), o.hasClass("device-xl") || o.hasClass("device-lg") ? (setTimeout(function() {388 y.length > 0 && y.css({389 height: u.outerHeight()390 }), SEMICOLON.header.includeOffset()391 }, 1e3), M.find(a).css({392 display: ""393 })) : c.css({394 "margin-top": ""395 }), o.hasClass("overlay-menu") && M.hasClass("on-click") && (o.hasClass("device-xl") || o.hasClass("device-lg")) ? t.off("click").on("click", function(i) {396 let n = e(this);397 n.parents(".sub-menu").siblings().find(a).stop(!0, !0).slideUp(l), n.parent(".menu-item").children(s).stop(!0, !0).slideToggle(l), i.preventDefault()398 }) : o.hasClass("side-header") && M.hasClass("on-click") || o.hasClass("device-md") || o.hasClass("device-sm") || o.hasClass("device-xs") ? (i.removeClass("icon-rotate-90"), e(".menu-item").find(a).filter(":not(:animated)").stop(!0, !0).slideUp(l, function() {399 o.toggleClass("primary-menu-open", !1)400 }), (i = i.add(t.filter('[href^="#"]'))).off("click").on("click", function(i) {401 let n = e(this);402 n.parents(".sub-menu").siblings().find(".sub-menu-trigger").removeClass("icon-rotate-90"), n.parents(".sub-menu").siblings().find(a).filter(":not(:animated)").stop(!0, !0).slideUp(l), n.parent(".menu-item").children(s).filter(":not(:animated)").stop(!0, !0).slideToggle(l);403 let t = n.parent(".menu-item").children(".sub-menu-trigger");404 t.hasClass("icon-rotate-90") ? t.removeClass("icon-rotate-90") : t.addClass("icon-rotate-90"), i.preventDefault()405 })) : (o.hasClass("overlay-menu") || o.hasClass("side-header")) && (o.hasClass("device-xl") || o.hasClass("device-lg")) ? (M.find(a).stop(!0, !0).slideUp(l), e(".menu-item").hover(function(i) {406 e(this).children(s).stop(!0, !0).slideDown(l)407 }, function() {408 e(this).children(s).stop(!0, !0).slideUp(l)409 })) : M.hasClass("on-click") && t.off("click").on("click", function(i) {410 let n = e(this);411 n.parents(".sub-menu").siblings().find(a).removeClass("d-block"), n.parent(".menu-item").children(s).toggleClass("d-block"), i.preventDefault()412 }), (e(".top-links").hasClass("on-click") || o.hasClass("device-md") || o.hasClass("device-sm") || o.hasClass("device-xs")) && e(".top-links-item:has(.top-links-sub-menu,.top-links-section) > a").on("click", function(i) {413 e(this).parents("li").siblings().find(".top-links-sub-menu,.top-links-section").removeClass("d-block"), e(this).parent("li").children(".top-links-sub-menu,.top-links-section").toggleClass("d-block"), i.preventDefault()414 }), SEMICOLON.header.menuInvert(e(".top-links-section")), e("#primary-menu-trigger").off("click").on("click", function() {415 return (o.hasClass("device-md") || o.hasClass("device-sm") || o.hasClass("device-xs")) && (M.find(".mobile-primary-menu").length > 0 ? (e(".primary-menu:not(.mobile-menu-off-canvas) .mobile-primary-menu").stop(!0, !0).slideToggle(l), e(".primary-menu.mobile-menu-off-canvas .mobile-primary-menu").toggleClass("d-block")) : (e(".primary-menu:not(.mobile-menu-off-canvas) .menu-container").stop(!0, !0).slideToggle(l), e(".primary-menu.mobile-menu-off-canvas .menu-container").toggleClass("d-block"))), o.toggleClass("primary-menu-open"), !1416 }), e(".menu-container:not(.mobile-primary-menu)").css({417 display: ""418 }), (o.hasClass("device-xl") || o.hasClass("device-lg")) && M.find(".mobile-primary-menu").removeClass("d-block")419 },420 fullWidthMenu: function() {421 if (o.hasClass("device-md") || o.hasClass("device-sm") || o.hasClass("device-xs")) return e(".mega-menu-content, .top-search-form").css({422 width: ""423 }), !0;424 let i = e(".mega-menu:not(.mega-menu-full):not(.mega-menu-small) .mega-menu-content").parents(".header-row").width();425 if (d.find(".container-fullwidth").length > 0 && e(".mega-menu:not(.mega-menu-full):not(.mega-menu-small) .mega-menu-content").css({426 width: i427 }), o.hasClass("stretched") ? d.hasClass("floating-header") ? e(".mega-menu:not(.mega-menu-full):not(.mega-menu-small) .mega-menu-content, .top-search-form").css({428 width: i + 80429 }) : e(".mega-menu:not(.mega-menu-full):not(.mega-menu-small) .mega-menu-content, .top-search-form").css({430 width: i431 }) : d.hasClass("full-header") && e(".mega-menu:not(.mega-menu-full):not(.mega-menu-small) .mega-menu-content").css({432 width: i - 80433 }), d.find(".header-row").length > 1) {434 let i = e(".menu-container > .mega-menu:not(.mega-menu-small) .mega-menu-content").eq(0),435 n = ".menu-container > .mega-menu:not(.mega-menu-small) .mega-menu-content { top: calc( 100% - " + (u.outerHeight() - i.parents(".header-row").outerHeight()) + "px ); }",436 t = document.head || document.getElementsByTagName("head")[0],437 s = document.createElement("style");438 t.appendChild(s), s.type = "text/css", s.appendChild(document.createTextNode(n))439 }440 },441 stickyMenu: function(e) {442 i = l.scrollTop(), (o.hasClass("device-xl") || o.hasClass("device-lg")) && (i > e ? o.hasClass("side-header") || (d.filter(":not(.no-sticky)").addClass("sticky-header"), SEMICOLON.header.stickyMenuClass(), "true" != S || d.hasClass("no-sticky") || (i - e > Number(I) ? (d.addClass("sticky-header-shrink"), C && (x.find("img").css({443 height: Number(f)444 }), SEMICOLON.header.menuItemsSpacing(O))) : (d.removeClass("sticky-header-shrink"), C && (x.find("img").css({445 height: Number(g)446 }), SEMICOLON.header.menuItemsSpacing(h))))) : (SEMICOLON.header.removeStickyness(), C && (x.find("img").css({447 height: Number(g)448 }), SEMICOLON.header.menuItemsSpacing(h)))), (o.hasClass("device-xs") || o.hasClass("device-sm") || o.hasClass("device-md")) && ("true" == p ? i > e ? (d.filter(":not(.no-sticky)").addClass("sticky-header"), SEMICOLON.header.stickyMenuClass()) : (SEMICOLON.header.removeStickyness(), SEMICOLON.header.responsiveMenuClass()) : SEMICOLON.header.removeStickyness(), C && (x.find("img").css({449 height: Number(m)450 }), SEMICOLON.header.menuItemsSpacing("")))451 },452 menuItemsSpacing: function(e) {453 let i = b;454 o.hasClass("side-header") || o.hasClass("overlay-menu") || (M.hasClass("menu-spacing-margin") ? "" == e ? i.css({455 "margin-top": "",456 "margin-bottom": ""457 }) : i.css({458 "margin-top": Number(e),459 "margin-bottom": Number(e)460 }) : "" == e ? i.css({461 "padding-top": "",462 "padding-bottom": ""463 }) : i.css({464 "padding-top": Number(e),465 "padding-bottom": Number(e)466 }))467 },468 stickyPageMenu: function(e) {469 if (l.scrollTop() > e)470 if (o.hasClass("device-xl") || o.hasClass("device-lg")) {471 $.filter(":not(.dots-menu,.no-sticky)").addClass("sticky-page-menu");472 let e = u.outerHeight();473 d.length > 0 && !d.hasClass("no-sticky") && $.filter(".sticky-page-menu:not(.dots-menu,.no-sticky)").find(B).css({474 top: e + "px"475 })476 } else(o.hasClass("device-sm") || o.hasClass("device-xs") || o.hasClass("device-md")) && "true" == $.attr("data-mobile-sticky") && $.filter(":not(.dots-menu,.no-sticky)").addClass("sticky-page-menu");477 else $.removeClass("sticky-page-menu"), $.find(B).css({478 top: ""479 })480 },481 removeStickyness: function() {482 d.hasClass("sticky-header") && (d.removeClass("sticky-header"), d.removeClass().addClass(L), u.removeClass().addClass(v), u.hasClass("force-not-dark") || u.removeClass("not-dark"), SEMICOLON.slider.swiperSliderMenu(), SEMICOLON.slider.revolutionSliderMenu(), y.length > 0 && u.outerHeight() > y.outerHeight() && y.css({483 height: u.outerHeight()484 })), (o.hasClass("device-sm") || o.hasClass("device-xs") || o.hasClass("device-md")) && void 0 === w && (d.removeClass().addClass(L), u.removeClass().addClass(v), u.hasClass("force-not-dark") || u.removeClass("not-dark"))485 },486 sideHeader: function() {487 e("#header-trigger").off("click").on("click", function() {488 return e("body.open-header").toggleClass("side-header-open"), !1489 })490 },491 sidePanel: function() {492 e(".side-panel-trigger").off("click").on("click", function() {493 return o.toggleClass("side-panel-open"), o.hasClass("device-touch") && o.hasClass("side-push-panel") && o.toggleClass("ohidden"), !1494 })495 },496 onePageScroll: function(e) {497 let i = {498 element: e,499 default: ".one-page-menu",500 file: "plugins.onepage.js",501 error: "plugins.onepage.js: Plugin could not be loaded",502 execfn: "SEMICOLON_onePageModule",503 pluginfn: 'typeof scwOnePageModulePlugin !== "undefined"',504 trigger: "pluginOnePageModuleReady",505 class: "has-plugin-onepagemodule"506 };507 SEMICOLON.initialize.functions(i)508 },509 logo: function() {510 let e = j.find("img"),511 i = P.find("img");512 !d.hasClass("dark") && !o.hasClass("dark") || u.hasClass("not-dark") ? (z && e.attr("src") != z && e.attr("src", z), R && i.attr("src") != R && i.attr("src", R)) : (T && e.attr("src") != T && e.attr("src", T), F && i.attr("src") != F && i.attr("src", F)), d.hasClass("sticky-header") && (_ && e.attr("src") != _ && e.attr("src", _), A && i.attr("src") != A && i.attr("src", A)), (o.hasClass("device-md") || o.hasClass("device-sm") || o.hasClass("device-xs")) && (H && e.attr("src") != H && e.attr("src", H), D && i.attr("src") != D && i.attr("src", D))513 },514 stickyMenuClass: function() {515 let e = "";516 k && (e = k.split(/ +/));517 let i = e.length;518 if (i > 0) {519 let n = 0;520 for (n = 0; n < i; n++) "not-dark" == e[n] ? (d.removeClass("dark"), u.filter(":not(.not-dark)").addClass("not-dark")) : "dark" == e[n] ? (u.removeClass("not-dark force-not-dark"), d.hasClass(e[n]) || d.addClass(e[n])) : d.hasClass(e[n]) || d.addClass(e[n])521 }522 },523 responsiveMenuClass: function() {524 if (o.hasClass("device-xl") || o.hasClass("device-lg")) return !0;525 let e = "";526 w && (e = w.split(/ +/));527 let i = e.length;528 if (i > 0) {529 let n = 0;530 for (n = 0; n < i; n++) "not-dark" == e[n] ? (d.removeClass("dark"), u.addClass("not-dark")) : "dark" == e[n] ? (u.removeClass("not-dark force-not-dark"), d.hasClass(e[n]) || d.addClass(e[n])) : d.hasClass(e[n]) || d.addClass(e[n])531 }532 SEMICOLON.header.logo()533 },534 topsearch: function() {535 Y.parents(".header-row").addClass("top-search-parent");536 let i = d.find(".top-search-parent");537 e("#top-search-trigger").off("click").on("click", function(e) {538 clearTimeout(n), o.toggleClass("top-search-open"), G.toggleClass("top-cart-open", !1), (o.hasClass("device-md") || o.hasClass("device-sm") || o.hasClass("device-xs")) && (M.filter(":not(.mobile-menu-off-canvas)").find(".menu-container").slideUp(200), M.filter(".mobile-menu-off-canvas").find(".menu-container").toggleClass("d-block", !1)), o.hasClass("top-search-open") ? i.toggleClass("position-relative", !0) : n = setTimeout(function() {539 i.toggleClass("position-relative", !1)540 }, 750), o.toggleClass("primary-menu-open", !1), $.toggleClass("page-menu-open", !1), o.hasClass("top-search-open") && Y.find("input").focus(), e.stopPropagation(), e.preventDefault()541 })542 },543 topcart: function() {544 if (G.length < 1) return !0;545 e("#top-cart-trigger").off("click").on("click", function(e) {546 $.toggleClass("page-menu-open", !1), G.toggleClass("top-cart-open"), e.stopPropagation(), e.preventDefault()547 })548 },549 miscFunctions: function() {550 let i = d.find(".top-search-parent");551 e(document).on("click", function(t) {552 e(t.target).closest(".top-search-form").length || (o.toggleClass("top-search-open", !1), n = setTimeout(function() {553 i.toggleClass("position-relative", !1)554 }, 750)), e(t.target).closest("#top-cart").length || G.toggleClass("top-cart-open", !1), e(t.target).closest("#page-menu").length || $.toggleClass("page-menu-open", !1), e(t.target).closest("#side-panel").length || o.toggleClass("side-panel-open", !1), e(t.target).closest(".primary-menu.on-click").length || M.filter(".on-click").find(".menu-container").find(".d-block").removeClass("d-block"), M.hasClass("mobile-menu-off-canvas") && (e(t.target).closest(".primary-menu.mobile-menu-off-canvas .menu-container").length || (M.filter(".mobile-menu-off-canvas").find(".menu-container").toggleClass("d-block", !1), o.toggleClass("primary-menu-open", !1))), e(t.target).closest(".top-links.on-click").length || e(".top-links.on-click").find(".top-links-sub-menu,.top-links-section").removeClass("d-block")555 })556 }557 }, SEMICOLON.slider = {558 init: function() {559 SEMICOLON.slider.sliderDimensions(), SEMICOLON.slider.sliderRun(), SEMICOLON.slider.sliderParallax(), SEMICOLON.slider.sliderElementsFade()560 },561 sliderDimensions: function() {562 let e = Q.outerHeight(),563 i = Q.outerWidth(),564 n = Q.find(".slider-inner"),565 t = W.find(".swiper-wrapper"),566 s = W.find(".swiper-slide").first(),567 a = W.hasClass("h-auto") || W.hasClass("min-vh-0");568 if (o.hasClass("device-xl") || o.hasClass("device-lg")) {569 if (setTimeout(function() {570 n.height(e), a && (e = Q.find(".slider-inner").children().first().outerHeight(), Q.height(e), n.height(e))571 }, 500), a) {572 let e = s.children().first();573 (e.hasClass("container") || e.hasClass("container-fluid")) && (e = e.children().first()), e.outerHeight() > t.outerHeight() && t.css({574 height: "auto"575 })576 }577 o.hasClass("side-header") && n.width(i), o.hasClass("stretched") || (i = r.outerWidth(), n.width(i))578 } else t.css({579 height: ""580 }), Q.css({581 height: ""582 }), n.css({583 width: "",584 height: ""585 })586 },587 sliderRun: function(e) {588 let i = {589 element: e,590 default: ".swiper_wrapper",591 file: "plugins.swiper.js",592 error: "plugins.swiper.js: Plugin could not be loaded",593 execfn: "SEMICOLON_swiperInit",594 pluginfn: 'typeof Swiper !== "undefined"',595 trigger: "pluginSwiperReady",596 class: "has-plugin-swiper"597 };598 SEMICOLON.initialize.functions(i)599 },600 sliderParallaxOffset: function() {601 let e = 0,602 i = d.outerHeight();603 return (o.hasClass("side-header") || d.next(".include-header").length > 0) && (i = 0), e = J.length > 0 ? J.outerHeight() + i : i, W.next("#header").length > 0 && (e = 0), e604 },605 sliderParallaxSet: function(e, i, n) {606 n && (n.style.transform = "translate3d(" + e + ", " + i + "px, 0)")607 },608 sliderParallax: function() {609 if (Q.length < 1) return !0;610 let e, i, n = SEMICOLON.slider.sliderParallaxOffset(),611 a = Q.outerHeight();612 t = window.pageXOffset, s = window.pageYOffset, !o.hasClass("device-xl") && !o.hasClass("device-lg") || SEMICOLON.isMobile.any() ? (Q.find(".slider-inner").length > 0 ? (SEMICOLON.slider.sliderParallaxSet(0, 0, ie), SEMICOLON.slider.sliderParallaxSet(0, 0, ee)) : (SEMICOLON.slider.sliderParallaxSet(0, 0, Z), SEMICOLON.slider.sliderParallaxSet(0, 0, ee)), Q.addClass("slider-parallax-visible").removeClass("slider-parallax-invisible")) : (a + n + 50 > s ? (Q.addClass("slider-parallax-visible").removeClass("slider-parallax-invisible"), s > n ? Q.find(".slider-inner").length > 0 ? (e = -.4 * (s - n), i = -.15 * (s - n), SEMICOLON.slider.sliderParallaxSet(0, e, ie), SEMICOLON.slider.sliderParallaxSet(0, i, ee)) : (e = (s - n) / 1.5, i = (s - n) / 7, SEMICOLON.slider.sliderParallaxSet(0, e, Z), SEMICOLON.slider.sliderParallaxSet(0, i, ee)) : Q.find(".slider-inner").length > 0 ? (SEMICOLON.slider.sliderParallaxSet(0, 0, ie), SEMICOLON.slider.sliderParallaxSet(0, 0, ee)) : (SEMICOLON.slider.sliderParallaxSet(0, 0, Z), SEMICOLON.slider.sliderParallaxSet(0, 0, ee))) : Q.addClass("slider-parallax-invisible").removeClass("slider-parallax-visible"), requestAnimationFrame(function() {613 SEMICOLON.slider.sliderParallax(), SEMICOLON.slider.sliderElementsFade()614 }))615 },616 sliderElementsFade: function() {617 if (Q.length < 1) return !0;618 if (!o.hasClass("device-xl") && !o.hasClass("device-lg") || SEMICOLON.isMobile.any()) Q.find(".slider-arrow-left,.slider-arrow-right,.slider-caption,.slider-element-fade").css({619 opacity: 1620 });621 else {622 SEMICOLON.slider.sliderParallaxOffset();623 let e, i = Q.outerHeight();624 e = d.hasClass("transparent-header") || o.hasClass("side-header") ? 100 : 0, Q.filter(".slider-parallax-visible").find(".slider-arrow-left,.slider-arrow-right,.slider-caption,.slider-element-fade").css({625 opacity: 1 - 1.85 * (s - e) / i626 })627 }628 },629 swiperSliderMenu: function(e) {630 if (e = void 0 !== e && e, o.hasClass("device-xl") || o.hasClass("device-lg") || d.hasClass("transparent-header-responsive") && !o.hasClass("primary-menu-open")) {631 let i = W.find(".swiper-slide.swiper-slide-active");632 SEMICOLON.slider.headerSchemeChanger(i, e)633 }634 },635 revolutionSliderMenu: function(e) {636 if (e = void 0 !== e && e, o.hasClass("device-xl") || o.hasClass("device-lg") || d.hasClass("transparent-header-responsive") && !o.hasClass("primary-menu-open")) {637 let i = W.find(".active-revslide");638 SEMICOLON.slider.headerSchemeChanger(i, e)639 }640 },641 headerSchemeChanger: function(i, n) {642 if (i.length > 0) {643 let t, s, a = !1;644 if (i.hasClass("dark")) {645 if ((s = (t = L ? L.split(/ +/) : "").length) > 0) {646 let e = 0;647 for (e = 0; e < s; e++)648 if ("dark" == t[e] && 1 == n) {649 a = !0;650 break651 }652 }653 e("#header.transparent-header:not(.sticky-header,.semi-transparent,.floating-header)").addClass("dark"), a || e("#header.transparent-header.sticky-header,#header.transparent-header.semi-transparent.sticky-header,#header.transparent-header.floating-header.sticky-header").removeClass("dark"), u.removeClass("not-dark")654 } else o.hasClass("dark") ? (i.addClass("not-dark"), e("#header.transparent-header:not(.semi-transparent,.floating-header)").removeClass("dark"), e("#header.transparent-header:not(.sticky-header,.semi-transparent,.floating-header)").find("#header-wrap").addClass("not-dark")) : (e("#header.transparent-header:not(.semi-transparent,.floating-header)").removeClass("dark"), u.removeClass("not-dark"));655 d.hasClass("sticky-header") && SEMICOLON.header.stickyMenuClass(), SEMICOLON.header.logo()656 }657 }658 }, SEMICOLON.portfolio = {659 init: function() {660 SEMICOLON.portfolio.revealDesc(), SEMICOLON.portfolio.ajaxload()661 },662 revealDesc: function() {663 let i = e(".portfolio-reveal");664 if (i < 1) return !0;665 i.each(function() {666 e(this).find(".portfolio-item").each(function() {667 let i = e(this).find(".portfolio-desc"),668 n = i.outerHeight();669 i.css({670 "margin-top": "-" + n + "px"671 })672 })673 })674 },675 ajaxload: function() {676 SEMICOLON.initialize.functions({677 default: ".portfolio-ajax",678 file: "plugins.ajaxportfolio.js",679 error: "plugins.ajaxportfolio.js: Plugin could not be loaded",680 execfn: "SEMICOLON_portfolioAjaxloadInit",681 pluginfn: 'typeof scwAjaxPortfolioPlugin !== "undefined"',682 trigger: "pluginAjaxPortfolioReady",683 class: "has-plugin-ajaxportfolio"684 })685 }686 }, SEMICOLON.widget = {687 init: function() {688 SEMICOLON.widget.animations(), SEMICOLON.widget.hoverAnimation(), SEMICOLON.widget.youtubeBgVideo(), SEMICOLON.widget.tabs(), SEMICOLON.widget.toggles(), SEMICOLON.widget.accordions(), SEMICOLON.widget.counter(), SEMICOLON.widget.countdown(), SEMICOLON.widget.gmap(), SEMICOLON.widget.roundedSkill(), SEMICOLON.widget.progress(), SEMICOLON.widget.twitterFeed(), SEMICOLON.widget.flickrFeed(), SEMICOLON.widget.instagramPhotos(), SEMICOLON.widget.dribbbleShots(), SEMICOLON.widget.navTree(), SEMICOLON.widget.textRotator(), SEMICOLON.widget.carousel(), SEMICOLON.widget.linkScroll(), SEMICOLON.widget.ajaxForm(), SEMICOLON.widget.subscription(), SEMICOLON.widget.shapeDivider(), SEMICOLON.widget.stickySidebar(), SEMICOLON.widget.cookieNotify(), SEMICOLON.widget.cartQuantity(), SEMICOLON.widget.readmore(), SEMICOLON.widget.pricingSwitcher(), SEMICOLON.widget.extras()689 },690 parallax: function(e) {691 let i = {692 element: e,693 default: ".parallax,.page-title-parallax,.portfolio-parallax .portfolio-image",694 file: "plugins.parallax.js",695 error: "plugins.parallax.js: Plugin could not be loaded",696 execfn: "SEMICOLON_parallaxInit",697 pluginfn: 'typeof skrollr !== "undefined"',698 trigger: "pluginParallaxReady",699 class: "has-plugin-parallax"700 };701 SEMICOLON.initialize.functions(i)702 },703 animations: function(e) {704 let i = {705 element: e,706 default: "[data-animate]",707 file: "plugins.animations.js",708 error: "plugins.animations.js: Plugin could not be loaded",709 execfn: "SEMICOLON_animationsInit",710 pluginfn: 'typeof scwAnimationsPlugin !== "undefined"',711 trigger: "pluginAnimationsReady",712 class: "has-plugin-animations"713 };714 SEMICOLON.initialize.functions(i)715 },716 hoverAnimation: function(e) {717 let i = {718 element: e,719 default: "[data-hover-animate]",720 file: "plugins.hoveranimation.js",721 error: "plugins.hoveranimation.js: Plugin could not be loaded",722 execfn: "SEMICOLON_hoverAnimationInit",723 pluginfn: 'typeof scwHoverAnimationPlugin !== "undefined"',724 trigger: "pluginHoverAnimationReady",725 class: "has-plugin-hoveranimation"726 };727 SEMICOLON.initialize.functions(i)728 },729 gridInit: function(e) {730 let i = {731 element: e,732 default: ".grid-container",733 file: "plugins.isotope.js",734 error: "plugins.isotope.js: Plugin could not be loaded",735 execfn: "SEMICOLON_gridContainerInit",736 pluginfn: "$().isotope",737 trigger: "pluginIsotopeReady",738 class: "has-plugin-isotope"739 };740 SEMICOLON.initialize.functions(i)741 },742 filterInit: function(e) {743 let i = {744 element: e,745 default: ".grid-filter,.custom-filter",746 file: "plugins.gridfilter.js",747 error: "plugins.gridfilter.js: Plugin could not be loaded",748 execfn: "SEMICOLON_gridFilterInit",749 pluginfn: '$().isotope && typeof scwGridFilterPlugin !== "undefined"',750 trigger: "pluginGridFilterReady",751 class: "has-plugin-isotope-filter"752 };753 SEMICOLON.initialize.functions(i)754 },755 loadFlexSlider: function(e) {756 let i = {757 element: e,758 default: ".fslider",759 file: "plugins.flexslider.js",760 error: "plugins.flexslider.js: Plugin could not be loaded",761 execfn: "SEMICOLON_flexSliderInit",762 pluginfn: "$().flexslider",763 trigger: "pluginFlexSliderReady",764 class: "has-plugin-flexslider"765 };766 SEMICOLON.initialize.functions(i)767 },768 html5Video: function(e) {769 let i = {770 element: e,771 default: ".video-wrap:has(video)",772 file: "plugins.html5video.js",773 error: "plugins.html5video.js: Plugin could not be loaded",774 execfn: "SEMICOLON_html5VideoInit",775 pluginfn: 'typeof scwHtml5VideoPlugin !== "undefined"',776 trigger: "pluginHtml5VideoReady",777 class: "has-plugin-html5video"778 };779 SEMICOLON.initialize.functions(i)780 },781 youtubeBgVideo: function(e) {782 let i = {783 element: e,784 default: ".yt-bg-player",785 file: "plugins.youtube.js",786 error: "plugins.youtube.js: Plugin could not be loaded",787 execfn: "SEMICOLON_youtubeBgVideoInit",788 pluginfn: "$().YTPlayer",789 trigger: "pluginYoutubeBgVideoReady",790 class: "has-plugin-youtubebg"791 };792 SEMICOLON.initialize.functions(i)793 },794 tabs: function(e) {795 let i = {796 element: e,797 default: '.tabs,[data-plugin="tabs"]',798 file: "plugins.tabs.js",799 error: "plugins.tabs.js: Plugin could not be loaded",800 execfn: "SEMICOLON_tabsInit",801 pluginfn: "$().tabs",802 trigger: "pluginTabsReady",803 class: "has-plugin-tabs"804 };805 SEMICOLON.initialize.functions(i)806 },807 toggles: function(e) {808 let i = {809 element: e,810 default: ".toggle",811 file: "plugins.toggles.js",812 error: "plugins.toggles.js: Plugin could not be loaded",813 execfn: "SEMICOLON_togglesInit",814 pluginfn: 'typeof scwTogglesPlugin !== "undefined"',815 trigger: "pluginTogglesReady",816 class: "has-plugin-toggles"817 };818 SEMICOLON.initialize.functions(i)819 },820 accordions: function(e) {821 let i = {822 element: e,823 default: ".accordion",824 file: "plugins.accordions.js",825 error: "plugins.accordions.js: Plugin could not be loaded",826 execfn: "SEMICOLON_accordionsInit",827 pluginfn: 'typeof scwAccordionsPlugin !== "undefined"',828 trigger: "pluginAccordionsReady",829 class: "has-plugin-accordions"830 };831 SEMICOLON.initialize.functions(i)832 },833 counter: function(e) {834 let i = {835 element: e,836 default: ".counter",837 file: "plugins.counter.js",838 error: "plugins.counter.js: Plugin could not be loaded",839 execfn: "SEMICOLON_counterInit",840 pluginfn: "$().countTo",841 trigger: "pluginCounterReady",842 class: "has-plugin-counter"843 };844 SEMICOLON.initialize.functions(i)845 },846 countdown: function(e) {847 let i = {848 element: e,849 default: ".countdown",850 file: "components/moment.js",851 error: "components/moment.js: Plugin could not be loaded",852 execfn: !1,853 pluginfn: 'typeof moment !== "undefined"',854 trigger: "pluginMomentReady",855 class: "has-plugin-moment"856 },857 n = {858 element: e,859 default: ".countdown",860 file: "plugins.countdown.js",861 error: "plugins.countdown.js: Plugin could not be loaded",862 execfn: "SEMICOLON_countdownInit",863 pluginfn: "$().countdown",864 trigger: "pluginCountdownReady",865 class: "has-plugin-countdown"866 };867 SEMICOLON.initialize.functions(i), SEMICOLON.initialize.functions(n)868 },869 gmap: function(e) {870 let i = {871 element: e,872 default: ".gmap",873 file: "https://maps.google.com/maps/api/js?key=" + K,874 error: "Google Maps API could not be loaded",875 execfn: !1,876 pluginfn: 'typeof google !== "undefined"',877 hiddendisable: !0,878 class: "has-plugin-gmapapi"879 },880 n = {881 element: e,882 default: ".gmap",883 file: "plugins.gmap.js",884 error: "plugins.gmap.js: Plugin could not be loaded",885 execfn: "SEMICOLON_gmapInit",886 pluginfn: 'typeof google !== "undefined" && $().gMap',887 hiddendisable: !0,888 trigger: "pluginGmapReady",889 class: "has-plugin-gmap"890 };891 SEMICOLON.initialize.functions(i), SEMICOLON.initialize.functions(n)892 },893 roundedSkill: function(e) {894 let i = {895 element: e,896 default: ".rounded-skill",897 file: "plugins.piechart.js",898 error: "plugins.piechart.js: Plugin could not be loaded",899 execfn: "SEMICOLON_roundedSkillInit",900 pluginfn: "$().easyPieChart",901 trigger: "pluginRoundedSkillReady",902 class: "has-plugin-piechart"903 };904 SEMICOLON.initialize.functions(i)905 },906 progress: function(e) {907 let i = {908 element: e,909 default: ".progress",910 file: "plugins.progress.js",911 error: "plugins.progress.js: Plugin could not be loaded",912 execfn: "SEMICOLON_progressInit",913 pluginfn: 'typeof scwProgressPlugin !== "undefined"',914 trigger: "pluginProgressReady",915 class: "has-plugin-progress"916 };917 SEMICOLON.initialize.functions(i)918 },919 twitterFeed: function(e) {920 let i = {921 element: e,922 default: ".twitter-feed",923 file: "plugins.twitter.js",924 error: "plugins.twitter.js: Plugin could not be loaded",925 execfn: "SEMICOLON_twitterFeedInit",926 pluginfn: 'typeof sm_format_twitter !== "undefined" && typeof sm_format_twitter3 !== "undefined"',927 trigger: "pluginTwitterFeedReady",928 class: "has-plugin-twitter"929 };930 SEMICOLON.initialize.functions(i)931 },932 flickrFeed: function(e) {933 let i = {934 element: e,935 default: ".flickr-feed",936 file: "plugins.flickrfeed.js",937 error: "plugins.flickrfeed.js: Plugin could not be loaded",938 execfn: "SEMICOLON_flickrFeedInit",939 pluginfn: "$().jflickrfeed",940 trigger: "pluginFlickrFeedReady",941 class: "has-plugin-flickr"942 };943 SEMICOLON.initialize.functions(i)944 },945 instagramPhotos: function(e) {946 let i = {947 element: e,948 default: ".instagram-photos",949 file: "plugins.instagram.js",950 error: "plugins.instagram.js: Plugin could not be loaded",951 execfn: "SEMICOLON_instagramPhotosInit",952 pluginfn: 'typeof scwInstagramPlugin !== "undefined"',953 trigger: "pluginInstagramReady",954 class: "has-plugin-instagram"955 };956 SEMICOLON.initialize.functions(i)957 },958 dribbbleShots: function(e) {959 let i = {960 element: e,961 default: ".dribbble-shots",962 file: "plugins.dribbble.js",963 error: "plugins.dribbble.js: Plugin could not be loaded",964 execfn: "SEMICOLON_dribbbleShotsInit",965 pluginfn: "$.jribbble",966 trigger: "pluginDribbbleReady",967 class: "has-plugin-dribbble"968 },969 n = {970 element: e,971 default: ".dribbble-shots",972 file: "plugins.imagesloaded.js",973 error: "plugins.imagesloaded.js: Plugin could not be loaded",974 pluginfn: "$().imagesLoaded",975 trigger: "pluginImagesLoadedReady",976 class: "has-plugin-imagesloaded"977 };978 SEMICOLON.initialize.functions(i), SEMICOLON.initialize.functions(n)979 },980 navTree: function(e) {981 let i = {982 element: e,983 default: ".nav-tree",984 file: "plugins.navtree.js",985 error: "plugins.navtree.js: Plugin could not be loaded",986 execfn: "SEMICOLON_navtreeInit",987 pluginfn: 'typeof scwNavTreePlugin !== "undefined"',988 trigger: "pluginNavTreeReady",989 class: "has-plugin-navtree"990 };991 SEMICOLON.initialize.functions(i)992 },993 carousel: function(e) {994 let i = {995 element: e,996 default: ".carousel-widget",997 file: "plugins.carousel.js",998 error: "plugins.carousel.js: Plugin could not be loaded",999 execfn: "SEMICOLON_carouselInit",1000 pluginfn: "$().owlCarousel",1001 trigger: "pluginCarouselReady",1002 class: "has-plugin-carousel"1003 };1004 SEMICOLON.initialize.functions(i)1005 },1006 masonryThumbs: function(e) {1007 let i = {1008 element: e,1009 default: ".masonry-thumbs",1010 file: "plugins.masonrythumbs.js",1011 error: "plugins.masonrythumbs.js: Plugin could not be loaded",1012 execfn: "SEMICOLON_masonryThumbsInit",1013 pluginfn: '$().isotope && typeof scwMasonryThumbsPlugin !== "undefined"',1014 trigger: "pluginMasonryThumbsReady",1015 class: "has-plugin-masonrythumbs"1016 };1017 SEMICOLON.initialize.functions(i)1018 },1019 notifications: function(e) {1020 let i = {1021 element: e,1022 default: !1,1023 file: "plugins.notify.js",1024 error: "plugins.notify.js: Plugin could not be loaded",1025 execfn: "SEMICOLON_notificationInit",1026 pluginfn: 'typeof scwNotificationPlugin !== "undefined"',1027 trigger: "pluginNotifyReady",1028 class: "has-plugin-toast"1029 };1030 SEMICOLON.initialize.functions(i)1031 },1032 textRotator: function(e) {1033 let i = {1034 element: e,1035 default: ".text-rotater",1036 file: "plugins.textrotator.js",1037 error: "plugins.textrotator.js: Plugin could not be loaded",1038 execfn: "SEMICOLON_textRotatorInit",1039 pluginfn: "$().Morphext",1040 trigger: "pluginTextRotatorReady",1041 class: "has-plugin-textrotator"1042 };1043 SEMICOLON.initialize.functions(i)1044 },1045 linkScroll: function(e) {1046 let i = {1047 element: e,1048 default: "a[data-scrollto]",1049 file: "plugins.linkscroll.js",1050 error: "plugins.linkscroll.js: Plugin could not be loaded",1051 execfn: "SEMICOLON_linkScrollInit",1052 pluginfn: 'typeof scwLinkScrollPlugin !== "undefined"',1053 trigger: "pluginLinkScrollReady",1054 class: "has-plugin-linkscroll"1055 };1056 SEMICOLON.initialize.functions(i)1057 },1058 ajaxForm: function(e) {1059 let i = {1060 element: e,1061 default: ".form-widget",1062 file: "plugins.form.js",1063 error: "plugins.form.js: Plugin could not be loaded",1064 execfn: !1,1065 pluginfn: "$().validate && $().ajaxSubmit",1066 class: "has-plugin-form"1067 },1068 n = {1069 element: e,1070 default: ".form-widget",1071 file: "plugins.ajaxform.js",1072 error: "plugins.ajaxform.js: Plugin could not be loaded",1073 execfn: "SEMICOLON_ajaxFormInit",1074 pluginfn: 'typeof scwAjaxFormPlugin !== "undefined"',1075 trigger: "pluginAjaxFormReady",1076 class: "has-plugin-ajaxform"1077 };1078 SEMICOLON.initialize.functions(i), SEMICOLON.initialize.functions(n)1079 },1080 subscription: function(e) {1081 let i = {1082 element: e,1083 default: ".subscribe-widget",1084 file: "plugins.form.js",1085 error: "plugins.form.js: Plugin could not be loaded",1086 execfn: !1,1087 pluginfn: "$().validate && $().ajaxSubmit",1088 class: "has-plugin-form"1089 },1090 n = {1091 element: e,1092 default: ".subscribe-widget",1093 file: "plugins.subscribe.js",1094 error: "plugins.subscribe.js: Plugin could not be loaded",1095 execfn: "SEMICOLON_subscribeFormInit",1096 pluginfn: 'typeof scwSubscribeFormPlugin !== "undefined"',1097 trigger: "pluginSubscribeFormReady",1098 class: "has-plugin-subscribeform"1099 };1100 SEMICOLON.initialize.functions(i), SEMICOLON.initialize.functions(n)1101 },1102 shapeDivider: function(e) {1103 let i = {1104 element: e,1105 default: ".shape-divider",1106 file: "plugins.shapedivider.js",1107 error: "plugins.shapedivider.js: Plugin could not be loaded",1108 execfn: "SEMICOLON_shapeDividerInit",1109 pluginfn: 'typeof scwShapeDividerPlugin !== "undefined"',1110 trigger: "pluginShapeDividerReady",1111 class: "has-plugin-shapedivider"1112 };1113 SEMICOLON.initialize.functions(i)1114 },1115 ticker: function(e) {1116 let i = {1117 element: e,1118 default: ".scw-ticker",1119 file: "plugins.ticker.js",1120 error: "plugins.ticker.js: Plugin could not be loaded",1121 execfn: "SEMICOLON_tickerInit",1122 pluginfn: 'typeof scwTickerPlugin !== "undefined"',1123 trigger: "pluginTickerReady",1124 class: "has-plugin-ticker"1125 };1126 SEMICOLON.initialize.functions(i)1127 },1128 stickySidebar: function(e) {1129 let i = {1130 element: e,1131 default: ".sticky-sidebar-wrap",1132 file: "plugins.stickysidebar.js",1133 error: "plugins.stickysidebar.js: Plugin could not be loaded",1134 execfn: "SEMICOLON_stickySidebarInit",1135 pluginfn: "$().scwStickySidebar",1136 trigger: "pluginStickySidebarReady",1137 class: "has-plugin-stickysidebar"1138 };1139 SEMICOLON.initialize.functions(i)1140 },1141 cookieNotify: function(e) {1142 let i = {1143 element: e,1144 default: ".gdpr-settings,[data-cookies]",1145 file: "plugins.cookie.js",1146 error: "plugins.cookie.js: Plugin could not be loaded",1147 execfn: "SEMICOLON_cookieInit",1148 pluginfn: 'typeof Cookies !== "undefined"',1149 trigger: "pluginCookieReady",1150 class: "has-plugin-cookie"1151 };1152 SEMICOLON.initialize.functions(i)1153 },1154 cartQuantity: function() {1155 SEMICOLON.initialize.functions({1156 default: ".qty",1157 file: "plugins.quantity.js",1158 error: "plugins.quantity.js: Plugin could not be loaded",1159 execfn: "SEMICOLON_quantityInit",1160 pluginfn: 'typeof scwQuantityPlugin !== "undefined"',1161 trigger: "pluginQuantityReady",1162 class: "has-plugin-quantity"1163 })1164 },1165 readmore: function() {1166 SEMICOLON.initialize.functions({1167 default: "[data-readmore]",1168 file: "plugins.readmore.js",1169 error: "plugins.readmore.js: Plugin could not be loaded",1170 execfn: "SEMICOLON_readmoreInit",1171 pluginfn: 'typeof scwReadMorePlugin !== "undefined"',1172 trigger: "pluginReadMoreReady",1173 class: "has-plugin-readmore"1174 })1175 },1176 pricingSwitcher: function() {1177 SEMICOLON.initialize.functions({1178 default: ".pts-switcher",1179 file: "plugins.pricingswitcher.js",1180 error: "plugins.pricingswitcher.js: Plugin could not be loaded",1181 execfn: "SEMICOLON_pricingSwitcherInit",1182 pluginfn: 'typeof scwPricingSwitcherPlugin !== "undefined"',1183 trigger: "pluginPricingSwitcherReady",1184 class: "has-plugin-pricing-switcher"1185 })1186 },1187 extras: function() {1188 let i = setInterval(function() {1189 "pluginBootstrapReady" in scwEvents && (e().tooltip ? e('[data-bs-toggle="tooltip"]').tooltip({1190 container: "body"1191 }) : console.log("extras: Bootstrap Tooltip not defined."), e().popover ? e('[data-bs-toggle="popover"]').popover({1192 container: "body"1193 }) : console.log("extras: Bootstrap Popover not defined."), clearInterval(i))1194 }, 1e3);1195 if (e(".style-msg").on("click", ".close", function(i) {1196 e(this).parents(".style-msg").slideUp(), i.preventDefault()1197 }), e("#page-menu-trigger").off("click").on("click", function() {1198 return o.toggleClass("top-search-open", !1), $.toggleClass("page-menu-open"), !11199 }), $.find("nav").off("click").on("click", function(e) {1200 o.toggleClass("top-search-open", !1), G.toggleClass("top-cart-open", !1)1201 }), SEMICOLON.isMobile.any() && o.addClass("device-touch"), o.hasClass("adaptive-color-scheme")) {1202 let i = e("[data-adaptive-light-class], [data-adaptive-dark-class]"),1203 n = i.attr("data-adaptive-light-class"),1204 t = i.attr("data-adaptive-dark-class"),1205 s = function(e) {1206 e ? (o.toggleClass("dark", !0), i.removeClass(n).addClass(t)) : (o.toggleClass("dark", !1), i.removeClass(t).addClass(n)), SEMICOLON.header.logo()1207 };1208 window.matchMedia && (s(window.matchMedia("(prefers-color-scheme: dark)").matches), window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", function(e) {1209 s(e.matches)1210 }))1211 }1212 o.off("click").on("click", 'a[href*="#"]', function() {1213 l.on("beforeunload", function() {1214 l.scrollTop(0)1215 })1216 });1217 let n = location.hash;1218 e(n).length > 0 && e(".one-page-menu").find('[data-href="' + n + '"]').length > 0 && l.scrollTop(0)1219 }1220 }, SEMICOLON.isMobile = {1221 Android: function() {1222 return navigator.userAgent.match(/Android/i)1223 },1224 BlackBerry: function() {1225 return navigator.userAgent.match(/BlackBerry/i)1226 },1227 iOS: function() {1228 return navigator.userAgent.match(/iPhone|iPad|iPod/i)1229 },1230 Opera: function() {1231 return navigator.userAgent.match(/Opera Mini/i)1232 },1233 Windows: function() {1234 return navigator.userAgent.match(/IEMobile/i)1235 },1236 any: function() {1237 return SEMICOLON.isMobile.Android() || SEMICOLON.isMobile.BlackBerry() || SEMICOLON.isMobile.iOS() || SEMICOLON.isMobile.Opera() || SEMICOLON.isMobile.Windows()1238 }1239 }, SEMICOLON.customization = {1240 onReady: function() {},1241 onLoad: function() {},1242 onResize: function() {}1243 }, SEMICOLON.documentOnResize = {1244 init: function() {1245 SEMICOLON.header.menufunctions(), SEMICOLON.header.fullWidthMenu(), SEMICOLON.header.stickyMenu(), SEMICOLON.initialize.dataResponsiveHeights(), SEMICOLON.initialize.stickFooterOnSmall(), SEMICOLON.slider.sliderDimensions(), SEMICOLON.slider.sliderParallax(), SEMICOLON.widget.html5Video(), SEMICOLON.widget.masonryThumbs(), SEMICOLON.initialize.dataResponsiveClasses(), SEMICOLON.customization.onResize(), N = l.width(), e(window).trigger("scwWindowResize")1246 }1247 }, SEMICOLON.documentOnReady = {1248 init: function() {1249 SEMICOLON.initialize.init(), SEMICOLON.header.init(), (W.length > 0 || U.length > 0) && SEMICOLON.slider.init(), V.length > 0 && SEMICOLON.portfolio.init(), SEMICOLON.widget.init(), SEMICOLON.documentOnReady.windowscroll(), SEMICOLON.customization.onReady()1250 },1251 windowscroll: function() {1252 d.length > 0 && (ne = d.offset().top, u.addClass("position-absolute"), te = u.offset().top, u.removeClass("position-absolute"));1253 let i = d.attr("data-sticky-offset");1254 if (void 0 !== i)1255 if ("full" == i) {1256 te = l.height();1257 let e = d.attr("data-sticky-offset-negative");1258 void 0 !== e && (te = te - e - 1)1259 } else te = Number(i);1260 else "undefined" === te && (te = ne);1261 $.find("#page-menu-wrap");1262 let n, t = u.outerHeight(),1263 s = document.head || document.getElementsByTagName("head")[0],1264 a = document.createElement("style");1265 $.length > 0 && (q.css({1266 height: $.find("#page-menu-wrap").outerHeight()1267 }), setTimeout(function() {1268 d.length > 0 && !d.hasClass("no-sticky") && (o.hasClass("device-xl") || o.hasClass("device-lg") || "true" == p) ? (se = $.offset().top - u.outerHeight(), s.appendChild(a), n = "#page-menu.sticky-page-menu:not(.dots-menu) #page-menu-wrap { top: " + t + "px; }", a.type = "text/css", a.appendChild(document.createTextNode(n))) : se = $.offset().top1269 }, 1e3)), SEMICOLON.header.stickyMenu(te), SEMICOLON.header.stickyPageMenu(se), window.addEventListener("scroll", function() {1270 SEMICOLON.initialize.goToTopScroll(), e("body.open-header.close-header-on-scroll").removeClass("side-header-open"), SEMICOLON.header.stickyMenu(te), SEMICOLON.header.stickyPageMenu(se), SEMICOLON.header.logo()1271 }), window.addEventListener("DOMContentLoaded", onScrollSliderParallax, !1), l.scrollEnd(function() {1272 let e = u.outerHeight();1273 y.length > 0 && e > y.outerHeight() && (y.css({1274 height: e1275 }), (o.hasClass("device-xl") || o.hasClass("device-lg")) && SEMICOLON.header.includeOffset()), $.length > 0 && d.length > 0 && !d.hasClass("no-sticky") && (o.hasClass("device-xl") || o.hasClass("device-lg")) && $.filter(".sticky-page-menu:not(.dots-menu,.no-sticky)").find(B).css({1276 top: e + "px"1277 })1278 }, 500), window.onfocus = function() {1279 let e = u.outerHeight();1280 y.length > 0 && e > y.outerHeight() && y.css({1281 height: e1282 })1283 }1284 }1285 }, SEMICOLON.documentOnLoad = {1286 init: function() {1287 SEMICOLON.slider.swiperSliderMenu(!0), SEMICOLON.slider.revolutionSliderMenu(!0), SEMICOLON.initialize.stickFooterOnSmall(), SEMICOLON.widget.gridInit();1288 let e = setInterval(function() {1289 "pluginIsotopeReady" in scwEvents && (SEMICOLON.widget.filterInit(), SEMICOLON.widget.masonryThumbs(), clearInterval(e))1290 }, 1e3);1291 SEMICOLON.widget.parallax(), SEMICOLON.widget.loadFlexSlider(), SEMICOLON.widget.html5Video(), SEMICOLON.widget.ticker(), SEMICOLON.header.responsiveMenuClass(), SEMICOLON.initialize.modal(), SEMICOLON.customization.onLoad()1292 }1293 };1294 let i, n, t, s, a, l = e(window),1295 o = e("body"),1296 r = e("#wrapper"),1297 d = e("#header"),1298 u = e("#header-wrap"),1299 c = e(".include-header"),1300 g = d.attr("data-logo-height") || 100,1301 f = d.attr("data-sticky-logo-height") || 60,1302 p = d.attr("data-mobile-sticky") || "false",1303 m = d.attr("data-mobile-logo-height") || Number(g),1304 h = (d.attr("data-mobile-sticky-logo-height") || Number(f), d.attr("data-menu-padding") || 39),1305 O = d.attr("data-sticky-menu-padding") || 19,1306 C = !(d.hasClass("header-size-lg") || d.hasClass("header-size-md") || d.hasClass("header-size-sm") || d.hasClass("header-size-custom")),1307 S = d.attr("data-sticky-shrink") || "true",1308 I = d.attr("data-sticky-shrink-offset") || 300,1309 M = e(".primary-menu"),1310 b = M.find(".menu-container:not(mobile-primary-menu):not(.custom-spacing)").children(".menu-item").children(".menu-link"),1311 y = "",1312 E = (u.outerHeight(), u.find(".header-row:eq(0)"), e("#content"), e("#footer")),1313 N = l.width(),1314 L = d.attr("class"),1315 v = u.attr("class"),1316 k = d.attr("data-sticky-class"),1317 w = d.attr("data-responsive-class"),1318 x = e("#logo"),1319 j = x.find(".standard-logo"),1320 P = (j.find("img").outerWidth(), x.find(".retina-logo")),1321 z = j.find("img").attr("src"),1322 R = P.find("img").attr("src"),1323 T = j.attr("data-dark-logo"),1324 F = P.attr("data-dark-logo"),1325 _ = j.attr("data-sticky-logo"),1326 A = P.attr("data-sticky-logo"),1327 H = j.attr("data-mobile-logo"),1328 D = P.attr("data-mobile-logo"),1329 $ = e("#page-menu"),1330 q = "",1331 B = $.find("#page-menu-wrap"),1332 V = (e(".one-page-menu"), e(".portfolio")),1333 W = (e(".shop"), e("#slider")),1334 Q = e(".slider-parallax"),1335 U = e(".slider-element"),1336 J = e("#page-title"),1337 Y = e(".top-search-form"),1338 G = e("#top-cart"),1339 X = (e("#top-social").find("li"), e("#gotoTop")),1340 K = "YOUR-API-KEY",1341 Z = document.querySelector(".slider-parallax"),1342 ee = document.querySelector(".slider-parallax .slider-caption"),1343 ie = document.querySelector(".slider-inner"),1344 ne = 0,1345 te = 0,1346 se = 0;1347 e(document).ready(SEMICOLON.documentOnReady.init), l.on("load", SEMICOLON.documentOnLoad.init), l.on("resize", function() {1348 let i = e(this);1349 clearTimeout(a), a = setTimeout(function() {1350 i.width() !== N && SEMICOLON.documentOnResize.init()1351 }, 250)1352 })1353}(jQuery), jQuery(document).ready(function() {1354 jQuery(".disable-pagetransition").on("click", function() {1355 return jQuery("body").addClass("no-transition"), jQuery(".page-transition-wrap").fadeOut(400, function() {1356 jQuery(this).remove()1357 }), !11358 })1359});1360jQuery(document).one("ajaxComplete", function() {1361 jQuery(".preloader-demo").on("click", function(s) {1362 var i = jQuery(this),1363 d = jQuery(".preloader-demo"),1364 v = i.attr("data-loader");1365 d.prop("disabled", !0), "1" == v ? css3Loader = '<div class="css3-spinner-bounce1"></div><div class="css3-spinner-bounce2"></div><div class="css3-spinner-bounce3"></div>' : "2" == v ? css3Loader = '<div class="css3-spinner-flipper"></div>' : "3" == v ? css3Loader = '<div class="css3-spinner-double-bounce1"></div><div class="css3-spinner-double-bounce2"></div>' : "4" == v ? css3Loader = '<div class="css3-spinner-rect1"></div><div class="css3-spinner-rect2"></div><div class="css3-spinner-rect3"></div><div class="css3-spinner-rect4"></div><div class="css3-spinner-rect5"></div>' : "5" == v ? css3Loader = '<div class="css3-spinner-cube1"></div><div class="css3-spinner-cube2"></div>' : "6" == v ? css3Loader = '<div class="css3-spinner-scaler"></div>' : "7" == v ? css3Loader = '<div class="css3-spinner-grid-pulse"><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div>' : "8" == v ? css3Loader = '<div class="css3-spinner-clip-rotate"><div></div></div>' : "9" == v ? css3Loader = '<div class="css3-spinner-ball-rotate"><div></div><div></div><div></div></div>' : "10" == v ? css3Loader = '<div class="css3-spinner-zig-zag"><div></div><div></div></div>' : "11" == v ? css3Loader = '<div class="css3-spinner-triangle-path"><div></div><div></div><div></div></div>' : "12" == v ? css3Loader = '<div class="css3-spinner-ball-scale-multiple"><div></div><div></div><div></div></div>' : "13" == v ? css3Loader = '<div class="css3-spinner-ball-pulse-sync"><div></div><div></div><div></div></div>' : "14" == v && (css3Loader = '<div class="css3-spinner-scale-ripple"><div></div><div></div><div></div></div>'), jQuery("body").append('<div class="page-transition-wrap"><div class="css3-spinner"></div></div>'), jQuery(".css3-spinner").html(css3Loader), setTimeout(function() {1366 jQuery(".page-transition-wrap").fadeOut("400", function() {1367 jQuery(this).remove(), d.prop("disabled", !1)1368 })1369 }, 2e3), s.preventDefault()1370 })1371});1372jQuery('[href="media-embeds.html"],[href="gdpr.html"]').parent('.menu-item').addClass('menu-item-important');1373jQuery('.menu-link[href="intro.html#section-niche"]').parent('.menu-item').after('<li class="menu-item"><a href="blocks.html" target="_blank" class="menu-link"><div>Blocks</div></a></li>');1374function semicolonweb_loadScriptAsync(a, o) {1375 if ("function" != typeof o) throw new Error("Not a valid callback for async script load");1376 var n = document.createElement("script");1377 n.onload = o, n.src = a, document.head.appendChild(n)1378}1379semicolonweb_loadScriptAsync("https://www.googletagmanager.com/gtag/js?id=G-H74KY38NCR", function() {1380 function a() {1381 dataLayer.push(arguments)1382 }1383 window.dataLayer = window.dataLayer || [], a("js", new Date), a("config", "G-H74KY38NCR")...

Full Screen

Full Screen

functionsold.js

Source:functionsold.js Github

copy

Full Screen

1! function(e, i, n) {2 "object" == typeof module && module && "object" == typeof module.exports ? module.exports = n : (e[i] = n, "function" == typeof define && define.amd && define(i, [], function() {3 return n4 }))5}(this, "jRespond", function(e, i, n) {6 "use strict";7 return function(e) {8 var i = [],9 t = [],10 s = e,11 a = "",12 l = "",13 o = 0,14 r = 500,15 d = function(e) {16 var s = e.breakpoint,17 o = e.enter || n;18 i.push(e), t.push(!1), c(s) && (o !== n && o.call(null, {19 entering: a,20 exiting: l21 }), t[i.length - 1] = !0)22 },23 u = function() {24 for (var e = [], s = [], o = 0; o < i.length; o++) {25 var r = i[o].breakpoint,26 d = i[o].enter || n,27 u = i[o].exit || n;28 "*" === r ? (d !== n && e.push(d), u !== n && s.push(u)) : c(r) ? (d === n || t[o] || e.push(d), t[o] = !0) : (u !== n && t[o] && s.push(u), t[o] = !1)29 }30 for (var g = {31 entering: a,32 exiting: l33 }, f = 0; f < s.length; f++) s[f].call(null, g);34 for (var p = 0; p < e.length; p++) e[p].call(null, g)35 },36 c = function(e) {37 if ("object" == typeof e) {38 if (e.join().indexOf(a) >= 0) return !039 } else {40 if ("*" === e) return !0;41 if ("string" == typeof e && a === e) return !042 }43 },44 g = function() {45 var e = "number" != typeof window.innerWidth ? 0 !== document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth : window.innerWidth;46 e !== o ? (r = 100, function(e) {47 for (var i = !1, n = 0; n < s.length; n++)48 if (e >= s[n].enter && e <= s[n].exit) {49 i = !0;50 break51 } i && a !== s[n].label ? (l = a, a = s[n].label, u()) : i || "" === a || (a = "", u())52 }(e)) : r = 500, o = e, setTimeout(g, r)53 };54 return g(), {55 addFunc: function(e) {56 ! function(e) {57 if (e.length === n) d(e);58 else59 for (var i = 0; i < e.length; i++) d(e[i])60 }(e)61 },62 getBreakpoint: function() {63 return a64 }65 }66 }67}(0, this.document));68var $ = jQuery.noConflict();69function debounce(e, i, n) {70 let t, s, a, l, o;71 return function() {72 a = this, s = arguments, l = new Date;73 let r = function() {74 let d = new Date - l;75 d < i ? t = setTimeout(r, i - d) : (t = null, n || (o = e.apply(a, s)))76 },77 d = n && !t;78 return t || (t = setTimeout(r, i)), d && (o = e.apply(a, s)), o79 }80}81function onScrollSliderParallax() {82 SEMICOLON.slider.sliderParallax(), SEMICOLON.slider.sliderElementsFade()83}84$.fn.scrollEnd = function(e, i) {85 $(this).scroll(function() {86 let n = $(this);87 n.data("scrollTimeout") && clearTimeout(n.data("scrollTimeout")), n.data("scrollTimeout", setTimeout(e, i))88 })89 },90 function() {91 let e = 0,92 i = ["ms", "moz", "webkit", "o"];93 for (let e = 0; e < i.length && !window.requestAnimationFrame; ++e) window.requestAnimationFrame = window[i[e] + "RequestAnimationFrame"], window.cancelAnimationFrame = window[i[e] + "CancelAnimationFrame"] || window[i[e] + "CancelRequestAnimationFrame"];94 window.requestAnimationFrame || (window.requestAnimationFrame = function(i, n) {95 let t = (new Date).getTime(),96 s = Math.max(0, 16 - (t - e)),97 a = window.setTimeout(function() {98 i(t + s)99 }, s);100 return e = t + s, a101 }), window.cancelAnimationFrame || (window.cancelAnimationFrame = function(e) {102 clearTimeout(e)103 })104 }();105var SEMICOLON = SEMICOLON || {};106! function(e) {107 "use strict";108 SEMICOLON.initialize = {109 init: function() {110 SEMICOLON.initialize.defaults(), SEMICOLON.initialize.pageTransition(), SEMICOLON.initialize.goToTop(), SEMICOLON.initialize.lazyLoad(), SEMICOLON.initialize.lightbox(), SEMICOLON.initialize.resizeVideos(), SEMICOLON.initialize.dataResponsiveClasses(), SEMICOLON.initialize.dataResponsiveHeights(), SEMICOLON.initialize.stickFooterOnSmall()111 },112 execFunc: function(e, i) {113 let n = Array.prototype.slice.call(arguments, 2),114 t = e.split("."),115 s = t.pop();116 for (let e = 0; e < t.length; e++) i = i[t[e]];117 if (void 0 !== i[s]) return i[s].apply(i, n);118 console.log(e + " Function does not exist")119 },120 execPlugin: function(e, i, n) {121 window.scwEvents = window.scwEvents || {};122 let t, s = !1;123 n ? (i.trigger && !scwEvents[i.trigger] && (l.trigger(i.trigger), scwEvents[i.trigger] = !0), i.execfn && SEMICOLON.initialize.execFunc(i.execfn, window, e), i.class && o.addClass(i.class)) : (i.trigger && !scwEvents[i.trigger] ? t = setInterval(function e() {124 return Function("return " + i.pluginfn)() && (l.trigger(i.trigger), scwEvents[i.trigger] = !0, clearInterval(t)), e125 }(), 1e3) : s = !0, i.execfn && (i.trigger && !s ? l.on(i.trigger, function() {126 SEMICOLON.initialize.execFunc(i.execfn, window, e)127 }) : SEMICOLON.initialize.execFunc(i.execfn, window, e)), i.class && o.addClass(i.class))128 },129 jsLinking: function(i, n) {130 if (i.length < 1) return !1;131 if (n.hiddendisable && i.filter(":hidden").length == i.length) return !1;132 let t, s = Function("return " + n.pluginfn)(),133 a = "js/",134 l = !1;135 "undefined" != typeof scwJsPath && (a = scwJsPath + "/"), "undefined" != typeof scwDisableJsAJAX && !0 === scwDisableJsAJAX && (l = !0), t = /^(f|ht)tps?:\/\//i.test(window.decodeURIComponent(n.file)) ? n.file : a + n.file, s ? SEMICOLON.initialize.execPlugin(i, n, !0) : l ? console.log(n.error) : e.ajax({136 url: t,137 dataType: "script",138 cache: !0,139 crossDomain: !0,140 timeout: 5e3141 }).done(function() {142 SEMICOLON.initialize.execPlugin(i, n, !1)143 }).fail(function() {144 console.log(n.error)145 })146 },147 functions: function(i) {148 let n, t, s;149 "object" == typeof i.element && null !== i.element && ("undefined" !== i.element.parent && (t = i.element.parent), "undefined" !== i.element.el && (i.element = i.element.el)), s = i.element ? i.element : i.default, n = "object" === t ? t.find(s) : e(s), this.jsLinking(n, i)150 },151 defaults: function() {152 if (jRespond([{153 label: "smallest",154 enter: 0,155 exit: 575156 }, {157 label: "handheld",158 enter: 576,159 exit: 767160 }, {161 label: "tablet",162 enter: 768,163 exit: 991164 }, {165 label: "laptop",166 enter: 992,167 exit: 1199168 }, {169 label: "desktop",170 enter: 1200,171 exit: 1e4172 }]).addFunc([{173 breakpoint: "desktop",174 enter: function() {175 o.addClass("device-xl")176 },177 exit: function() {178 o.removeClass("device-xl")179 }180 }, {181 breakpoint: "laptop",182 enter: function() {183 o.addClass("device-lg")184 },185 exit: function() {186 o.removeClass("device-lg")187 }188 }, {189 breakpoint: "tablet",190 enter: function() {191 o.addClass("device-md")192 },193 exit: function() {194 o.removeClass("device-md")195 }196 }, {197 breakpoint: "handheld",198 enter: function() {199 o.addClass("device-sm")200 },201 exit: function() {202 o.removeClass("device-sm")203 }204 }, {205 breakpoint: "smallest",206 enter: function() {207 o.addClass("device-xs")208 },209 exit: function() {210 o.removeClass("device-xs")211 }212 }]), SEMICOLON.initialize.functions({213 default: "body",214 file: "plugins.easing.js",215 error: "plugins.easing.js: Plugin could not be loaded",216 pluginfn: 'typeof jQuery.easing["easeOutQuad"] !== "undefined"',217 trigger: "pluginEasingReady",218 class: "has-plugin-easing"219 }), SEMICOLON.initialize.functions({220 default: "body",221 file: "plugins.bootstrap.js",222 error: "plugins.bootstrap.js: Plugin could not be loaded",223 pluginfn: 'typeof bootstrap !== "undefined"',224 trigger: "pluginBootstrapReady",225 class: "has-plugin-bootstrap"226 }), !1 in window) {227 let e = {228 default: "body",229 file: "intersection-observer.js",230 error: "intersection-observer.js: Plugin could not be loaded",231 pluginfn: 'typeof window.IntersectionObserver !== "undefined"',232 trigger: "intersectObservePolyfill",233 class: "has-polyfill-intersection-observer"234 };235 SEMICOLON.initialize.functions(e)236 }237 },238 goToTop: function() {239 let i = X.attr("data-speed"),240 n = X.attr("data-easing");241 i || (i = 700), n || (n = "easeOutQuad"), X.off("click").on("click", function() {242 return e("body,html").stop(!0).animate({243 scrollTop: 0244 }, Number(i), n), !1245 })246 },247 goToTopScroll: function() {248 let e = X.attr("data-mobile"),249 i = X.attr("data-offset");250 if (i || (i = 450), "true" != e && (o.hasClass("device-sm") || o.hasClass("device-xs"))) return !0;251 l.scrollTop() > Number(i) ? (X.fadeIn(), o.addClass("gototop-active")) : (X.fadeOut(), o.removeClass("gototop-active"))252 },253 lightbox: function(e) {254 let i = {255 element: e,256 default: "[data-lightbox]",257 file: "plugins.lightbox.js",258 error: "plugins.lightbox.js: Plugin could not be loaded",259 execfn: "SEMICOLON_lightboxInit",260 pluginfn: "$().magnificPopup",261 trigger: "pluginLightboxReady",262 class: "has-plugin-lightbox"263 };264 SEMICOLON.initialize.functions(i)265 },266 modal: function(e) {267 let i = {268 element: e,269 default: ".modal-on-load",270 file: "plugins.lightbox.js",271 error: "plugins.lightbox.js: Plugin could not be loaded",272 execfn: "SEMICOLON_modalInit",273 pluginfn: "$().magnificPopup",274 trigger: "pluginLightboxReady",275 class: "has-plugin-lightbox"276 };277 SEMICOLON.initialize.functions(i)278 },279 resizeVideos: function() {280 SEMICOLON.initialize.functions({281 default: 'iframe[src*="youtube"],iframe[src*="vimeo"],iframe[src*="dailymotion"],iframe[src*="maps.google.com"],iframe[src*="google.com/maps"]',282 file: "plugins.fitvids.js",283 error: "plugins.fitvids.js: Plugin could not be loaded",284 execfn: "SEMICOLON_resizeVideosInit",285 pluginfn: "$().fitVids",286 trigger: "pluginfitVidsReady",287 class: "has-plugin-fitvids"288 })289 },290 pageTransition: function() {291 SEMICOLON.initialize.functions({292 default: ".page-transition",293 file: "plugins.pagetransition.js",294 error: "plugins.pagetransition.js: Plugin could not be loaded",295 execfn: "SEMICOLON_pageTransitionInit",296 pluginfn: "$().animsition",297 trigger: "pluginPageTransitionReady",298 class: "has-plugin-animsition"299 })300 },301 lazyLoad: function(e) {302 let i = {303 element: e,304 default: ".lazy",305 file: "plugins.lazyload.js",306 error: "plugins.lazyload.js: Plugin could not be loaded",307 execfn: "SEMICOLON_lazyLoadInit",308 pluginfn: 'typeof LazyLoad !== "undefined"',309 trigger: "pluginlazyLoadReady",310 class: "has-plugin-lazyload"311 };312 SEMICOLON.initialize.functions(i)313 },314 topScrollOffset: function() {315 let e = 0;316 return !o.hasClass("device-xl") && !o.hasClass("device-lg") || SEMICOLON.isMobile.any() ? e = 40 : (e = d.hasClass("sticky-header") ? $.hasClass("dots-menu") ? 100 : 144 : $.hasClass("dots-menu") ? 140 : 184, $.length || (e = d.hasClass("sticky-header") ? 100 : 140)), e317 },318 dataResponsiveClasses: function() {319 SEMICOLON.initialize.functions({320 default: "[data-class-xl],[data-class-lg],[data-class-md],[data-class-sm],[data-class-xs]",321 file: "plugins.dataclasses.js",322 error: "plugins.dataclasses.js: Plugin could not be loaded",323 execfn: "SEMICOLON_dataClassesInit",324 pluginfn: 'typeof scwDataClassesPlugin !== "undefined"',325 trigger: "pluginDataClassesReady",326 class: "has-plugin-dataclasses"327 })328 },329 dataResponsiveHeights: function() {330 SEMICOLON.initialize.functions({331 default: "[data-height-xl],[data-height-lg],[data-height-md],[data-height-sm],[data-height-xs]",332 file: "plugins.dataheights.js",333 error: "plugins.dataheights.js: Plugin could not be loaded",334 execfn: "SEMICOLON_dataHeightsInit",335 pluginfn: 'typeof scwDataHeightsPlugin !== "undefined"',336 trigger: "pluginDataHeightsReady",337 class: "has-plugin-dataheights"338 })339 },340 stickFooterOnSmall: function() {341 E.css({342 "margin-top": ""343 });344 let e = l.height(),345 i = r.height();346 !o.hasClass("sticky-footer") && E.length > 0 && r.has("#footer") && e > i && E.css({347 "margin-top": e - i348 })349 }350 }, SEMICOLON.header = {351 init: function() {352 SEMICOLON.header.initialize(), SEMICOLON.header.menufunctions(), SEMICOLON.header.fullWidthMenu(), SEMICOLON.header.stickyMenu(), SEMICOLON.header.stickyPageMenu(), SEMICOLON.header.sideHeader(), SEMICOLON.header.sidePanel(), SEMICOLON.header.onePageScroll(), SEMICOLON.header.logo(), SEMICOLON.header.topsearch(), SEMICOLON.header.topcart(), SEMICOLON.header.miscFunctions()353 },354 initialize: function() {355 u.length > 0 && (e(".header-wrap-clone").length < 1 && u.after('<div class="header-wrap-clone"></div>'), y = e(".header-wrap-clone")), $.length > 0 && ($.find("#page-menu-wrap").after('<div class="page-menu-wrap-clone"></div>'), q = e(".page-menu-wrap-clone")), e(".menu-item:has(.sub-menu-container)").addClass("sub-menu"), e(".top-links-item:has(.top-links-sub-menu,.top-links-section) > a:not(:has(.icon-angle-down)), .menu-item:not(.mega-menu-title):has(.sub-menu-container) > .menu-link > div:not(:has(.icon-angle-down)), .page-menu-item:has(.page-menu-sub-menu) > a > div:not(:has(.icon-angle-down))").append('<i class="icon-angle-down"></i>'), e(".menu-item:not(.mega-menu-title):has(.sub-menu-container):not(:has(.sub-menu-trigger))").append('<button class="sub-menu-trigger icon-chevron-right"></button>'), SEMICOLON.header.menuInvert()356 },357 menuInvert: function(i) {358 let n = i || e(".mega-menu-content, .sub-menu-container, .top-links-section");359 n.children().css({360 display: "block"361 }), n.css({362 display: "block"363 }), n.each(function(i, n) {364 let t = e(n),365 s = t.offset(),366 a = t.width();367 N - (a + s.left) < 0 && t.addClass("menu-pos-invert")368 }), n.children().css({369 display: ""370 }), n.css({371 display: ""372 })373 },374 includeOffset: function() {375 if (c.length < 1) return !0;376 let e = d.outerHeight();377 (d.hasClass("floating-header") || c.hasClass("include-topbar")) && (e += d.offset().top), c.css({378 "margin-top": -e379 }), SEMICOLON.slider.sliderParallax()380 },381 menufunctions: function() {382 let i, n = e(".menu-item:has(.sub-menu-container)"),383 t = n.children(".menu-link"),384 s = ".mega-menu-content, .sub-menu-container",385 a = e(s),386 l = M.attr("data-trigger-speed") || 200;387 l = Number(l), i = n.children(".sub-menu-trigger"), o.hasClass("device-xl") || o.hasClass("device-lg") ? (setTimeout(function() {388 y.length > 0 && y.css({389 height: u.outerHeight()390 }), SEMICOLON.header.includeOffset()391 }, 1e3), M.find(a).css({392 display: ""393 })) : c.css({394 "margin-top": ""395 }), o.hasClass("overlay-menu") && M.hasClass("on-click") && (o.hasClass("device-xl") || o.hasClass("device-lg")) ? t.off("click").on("click", function(i) {396 let n = e(this);397 n.parents(".sub-menu").siblings().find(a).stop(!0, !0).slideUp(l), n.parent(".menu-item").children(s).stop(!0, !0).slideToggle(l), i.preventDefault()398 }) : o.hasClass("side-header") && M.hasClass("on-click") || o.hasClass("device-md") || o.hasClass("device-sm") || o.hasClass("device-xs") ? (i.removeClass("icon-rotate-90"), e(".menu-item").find(a).filter(":not(:animated)").stop(!0, !0).slideUp(l, function() {399 o.toggleClass("primary-menu-open", !1)400 }), (i = i.add(t.filter('[href^="#"]'))).off("click").on("click", function(i) {401 let n = e(this);402 n.parents(".sub-menu").siblings().find(".sub-menu-trigger").removeClass("icon-rotate-90"), n.parents(".sub-menu").siblings().find(a).filter(":not(:animated)").stop(!0, !0).slideUp(l), n.parent(".menu-item").children(s).filter(":not(:animated)").stop(!0, !0).slideToggle(l);403 let t = n.parent(".menu-item").children(".sub-menu-trigger");404 t.hasClass("icon-rotate-90") ? t.removeClass("icon-rotate-90") : t.addClass("icon-rotate-90"), i.preventDefault()405 })) : (o.hasClass("overlay-menu") || o.hasClass("side-header")) && (o.hasClass("device-xl") || o.hasClass("device-lg")) ? (M.find(a).stop(!0, !0).slideUp(l), e(".menu-item").hover(function(i) {406 e(this).children(s).stop(!0, !0).slideDown(l)407 }, function() {408 e(this).children(s).stop(!0, !0).slideUp(l)409 })) : M.hasClass("on-click") && t.off("click").on("click", function(i) {410 let n = e(this);411 n.parents(".sub-menu").siblings().find(a).removeClass("d-block"), n.parent(".menu-item").children(s).toggleClass("d-block"), i.preventDefault()412 }), (e(".top-links").hasClass("on-click") || o.hasClass("device-md") || o.hasClass("device-sm") || o.hasClass("device-xs")) && e(".top-links-item:has(.top-links-sub-menu,.top-links-section) > a").on("click", function(i) {413 e(this).parents("li").siblings().find(".top-links-sub-menu,.top-links-section").removeClass("d-block"), e(this).parent("li").children(".top-links-sub-menu,.top-links-section").toggleClass("d-block"), i.preventDefault()414 }), SEMICOLON.header.menuInvert(e(".top-links-section")), e("#primary-menu-trigger").off("click").on("click", function() {415 return (o.hasClass("device-md") || o.hasClass("device-sm") || o.hasClass("device-xs")) && (M.find(".mobile-primary-menu").length > 0 ? (e(".primary-menu:not(.mobile-menu-off-canvas) .mobile-primary-menu").stop(!0, !0).slideToggle(l), e(".primary-menu.mobile-menu-off-canvas .mobile-primary-menu").toggleClass("d-block")) : (e(".primary-menu:not(.mobile-menu-off-canvas) .menu-container").stop(!0, !0).slideToggle(l), e(".primary-menu.mobile-menu-off-canvas .menu-container").toggleClass("d-block"))), o.toggleClass("primary-menu-open"), !1416 }), e(".menu-container:not(.mobile-primary-menu)").css({417 display: ""418 }), (o.hasClass("device-xl") || o.hasClass("device-lg")) && M.find(".mobile-primary-menu").removeClass("d-block")419 },420 fullWidthMenu: function() {421 if (o.hasClass("device-md") || o.hasClass("device-sm") || o.hasClass("device-xs")) return e(".mega-menu-content, .top-search-form").css({422 width: ""423 }), !0;424 let i = e(".mega-menu:not(.mega-menu-full):not(.mega-menu-small) .mega-menu-content").parents(".header-row").width();425 if (d.find(".container-fullwidth").length > 0 && e(".mega-menu:not(.mega-menu-full):not(.mega-menu-small) .mega-menu-content").css({426 width: i427 }), o.hasClass("stretched") ? d.hasClass("floating-header") ? e(".mega-menu:not(.mega-menu-full):not(.mega-menu-small) .mega-menu-content, .top-search-form").css({428 width: i + 80429 }) : e(".mega-menu:not(.mega-menu-full):not(.mega-menu-small) .mega-menu-content, .top-search-form").css({430 width: i431 }) : d.hasClass("full-header") && e(".mega-menu:not(.mega-menu-full):not(.mega-menu-small) .mega-menu-content").css({432 width: i - 80433 }), d.find(".header-row").length > 1) {434 let i = e(".menu-container > .mega-menu:not(.mega-menu-small) .mega-menu-content").eq(0),435 n = ".menu-container > .mega-menu:not(.mega-menu-small) .mega-menu-content { top: calc( 100% - " + (u.outerHeight() - i.parents(".header-row").outerHeight()) + "px ); }",436 t = document.head || document.getElementsByTagName("head")[0],437 s = document.createElement("style");438 t.appendChild(s), s.type = "text/css", s.appendChild(document.createTextNode(n))439 }440 },441 stickyMenu: function(e) {442 i = l.scrollTop(), (o.hasClass("device-xl") || o.hasClass("device-lg")) && (i > e ? o.hasClass("side-header") || (d.filter(":not(.no-sticky)").addClass("sticky-header"), SEMICOLON.header.stickyMenuClass(), "true" != S || d.hasClass("no-sticky") || (i - e > Number(I) ? (d.addClass("sticky-header-shrink"), C && (x.find("img").css({443 height: Number(f)444 }), SEMICOLON.header.menuItemsSpacing(O))) : (d.removeClass("sticky-header-shrink"), C && (x.find("img").css({445 height: Number(g)446 }), SEMICOLON.header.menuItemsSpacing(h))))) : (SEMICOLON.header.removeStickyness(), C && (x.find("img").css({447 height: Number(g)448 }), SEMICOLON.header.menuItemsSpacing(h)))), (o.hasClass("device-xs") || o.hasClass("device-sm") || o.hasClass("device-md")) && ("true" == p ? i > e ? (d.filter(":not(.no-sticky)").addClass("sticky-header"), SEMICOLON.header.stickyMenuClass()) : (SEMICOLON.header.removeStickyness(), SEMICOLON.header.responsiveMenuClass()) : SEMICOLON.header.removeStickyness(), C && (x.find("img").css({449 height: Number(m)450 }), SEMICOLON.header.menuItemsSpacing("")))451 },452 menuItemsSpacing: function(e) {453 let i = b;454 o.hasClass("side-header") || o.hasClass("overlay-menu") || (M.hasClass("menu-spacing-margin") ? "" == e ? i.css({455 "margin-top": "",456 "margin-bottom": ""457 }) : i.css({458 "margin-top": Number(e),459 "margin-bottom": Number(e)460 }) : "" == e ? i.css({461 "padding-top": "",462 "padding-bottom": ""463 }) : i.css({464 "padding-top": Number(e),465 "padding-bottom": Number(e)466 }))467 },468 stickyPageMenu: function(e) {469 if (l.scrollTop() > e)470 if (o.hasClass("device-xl") || o.hasClass("device-lg")) {471 $.filter(":not(.dots-menu,.no-sticky)").addClass("sticky-page-menu");472 let e = u.outerHeight();473 d.length > 0 && !d.hasClass("no-sticky") && $.filter(".sticky-page-menu:not(.dots-menu,.no-sticky)").find(B).css({474 top: e + "px"475 })476 } else(o.hasClass("device-sm") || o.hasClass("device-xs") || o.hasClass("device-md")) && "true" == $.attr("data-mobile-sticky") && $.filter(":not(.dots-menu,.no-sticky)").addClass("sticky-page-menu");477 else $.removeClass("sticky-page-menu"), $.find(B).css({478 top: ""479 })480 },481 removeStickyness: function() {482 d.hasClass("sticky-header") && (d.removeClass("sticky-header"), d.removeClass().addClass(L), u.removeClass().addClass(v), u.hasClass("force-not-dark") || u.removeClass("not-dark"), SEMICOLON.slider.swiperSliderMenu(), SEMICOLON.slider.revolutionSliderMenu(), y.length > 0 && u.outerHeight() > y.outerHeight() && y.css({483 height: u.outerHeight()484 })), (o.hasClass("device-sm") || o.hasClass("device-xs") || o.hasClass("device-md")) && void 0 === k && (d.removeClass().addClass(L), u.removeClass().addClass(v), u.hasClass("force-not-dark") || u.removeClass("not-dark"))485 },486 sideHeader: function() {487 e("#header-trigger").off("click").on("click", function() {488 return e("body.open-header").toggleClass("side-header-open"), !1489 })490 },491 sidePanel: function() {492 e(".side-panel-trigger").off("click").on("click", function() {493 return o.toggleClass("side-panel-open"), o.hasClass("device-touch") && o.hasClass("side-push-panel") && o.toggleClass("ohidden"), !1494 })495 },496 onePageScroll: function(e) {497 let i = {498 element: e,499 default: ".one-page-menu",500 file: "plugins.onepage.js",501 error: "plugins.onepage.js: Plugin could not be loaded",502 execfn: "SEMICOLON_onePageModule",503 pluginfn: 'typeof scwOnePageModulePlugin !== "undefined"',504 trigger: "pluginOnePageModuleReady",505 class: "has-plugin-onepagemodule"506 };507 SEMICOLON.initialize.functions(i)508 },509 logo: function() {510 let e = j.find("img"),511 i = P.find("img");512 !d.hasClass("dark") && !o.hasClass("dark") || u.hasClass("not-dark") ? (z && e.attr("src") != z && e.attr("src", z), R && i.attr("src") != R && i.attr("src", R)) : (T && e.attr("src") != T && e.attr("src", T), F && i.attr("src") != F && i.attr("src", F)), d.hasClass("sticky-header") && (_ && e.attr("src") != _ && e.attr("src", _), A && i.attr("src") != A && i.attr("src", A)), (o.hasClass("device-md") || o.hasClass("device-sm") || o.hasClass("device-xs")) && (H && e.attr("src") != H && e.attr("src", H), D && i.attr("src") != D && i.attr("src", D))513 },514 stickyMenuClass: function() {515 let e = "";516 w && (e = w.split(/ +/));517 let i = e.length;518 if (i > 0) {519 let n = 0;520 for (n = 0; n < i; n++) "not-dark" == e[n] ? (d.removeClass("dark"), u.filter(":not(.not-dark)").addClass("not-dark")) : "dark" == e[n] ? (u.removeClass("not-dark force-not-dark"), d.hasClass(e[n]) || d.addClass(e[n])) : d.hasClass(e[n]) || d.addClass(e[n])521 }522 },523 responsiveMenuClass: function() {524 if (o.hasClass("device-xl") || o.hasClass("device-lg")) return !0;525 let e = "";526 k && (e = k.split(/ +/));527 let i = e.length;528 if (i > 0) {529 let n = 0;530 for (n = 0; n < i; n++) "not-dark" == e[n] ? (d.removeClass("dark"), u.addClass("not-dark")) : "dark" == e[n] ? (u.removeClass("not-dark force-not-dark"), d.hasClass(e[n]) || d.addClass(e[n])) : d.hasClass(e[n]) || d.addClass(e[n])531 }532 SEMICOLON.header.logo()533 },534 topsearch: function() {535 Y.parents(".header-row").addClass("top-search-parent");536 let i = d.find(".top-search-parent");537 e("#top-search-trigger").off("click").on("click", function(e) {538 clearTimeout(n), o.toggleClass("top-search-open"), G.toggleClass("top-cart-open", !1), (o.hasClass("device-md") || o.hasClass("device-sm") || o.hasClass("device-xs")) && (M.filter(":not(.mobile-menu-off-canvas)").find(".menu-container").slideUp(200), M.filter(".mobile-menu-off-canvas").find(".menu-container").toggleClass("d-block", !1)), o.hasClass("top-search-open") ? i.toggleClass("position-relative", !0) : n = setTimeout(function() {539 i.toggleClass("position-relative", !1)540 }, 750), o.toggleClass("primary-menu-open", !1), $.toggleClass("page-menu-open", !1), o.hasClass("top-search-open") && Y.find("input").focus(), e.stopPropagation(), e.preventDefault()541 })542 },543 topcart: function() {544 if (G.length < 1) return !0;545 e("#top-cart-trigger").off("click").on("click", function(e) {546 $.toggleClass("page-menu-open", !1), G.toggleClass("top-cart-open"), e.stopPropagation(), e.preventDefault()547 })548 },549 miscFunctions: function() {550 let i = d.find(".top-search-parent");551 e(document).on("click", function(t) {552 e(t.target).closest(".top-search-form").length || (o.toggleClass("top-search-open", !1), n = setTimeout(function() {553 i.toggleClass("position-relative", !1)554 }, 750)), e(t.target).closest("#top-cart").length || G.toggleClass("top-cart-open", !1), e(t.target).closest("#page-menu").length || $.toggleClass("page-menu-open", !1), e(t.target).closest("#side-panel").length || o.toggleClass("side-panel-open", !1), e(t.target).closest(".primary-menu.on-click").length || M.filter(".on-click").find(".menu-container").find(".d-block").removeClass("d-block"), M.hasClass("mobile-menu-off-canvas") && (e(t.target).closest(".primary-menu.mobile-menu-off-canvas .menu-container").length || (M.filter(".mobile-menu-off-canvas").find(".menu-container").toggleClass("d-block", !1), o.toggleClass("primary-menu-open", !1))), e(t.target).closest(".top-links.on-click").length || e(".top-links.on-click").find(".top-links-sub-menu,.top-links-section").removeClass("d-block")555 })556 }557 }, SEMICOLON.slider = {558 init: function() {559 SEMICOLON.slider.sliderDimensions(), SEMICOLON.slider.sliderRun(), SEMICOLON.slider.sliderParallax(), SEMICOLON.slider.sliderElementsFade()560 },561 sliderDimensions: function() {562 let e = Q.outerHeight(),563 i = Q.outerWidth(),564 n = Q.find(".slider-inner"),565 t = W.find(".swiper-wrapper"),566 s = W.find(".swiper-slide").first(),567 a = W.hasClass("h-auto") || W.hasClass("min-vh-0");568 if (o.hasClass("device-xl") || o.hasClass("device-lg")) {569 if (setTimeout(function() {570 n.height(e), a && (e = Q.find(".slider-inner").children().first().outerHeight(), Q.height(e), n.height(e))571 }, 500), a) {572 let e = s.children().first();573 (e.hasClass("container") || e.hasClass("container-fluid")) && (e = e.children().first()), e.outerHeight() > t.outerHeight() && t.css({574 height: "auto"575 })576 }577 o.hasClass("side-header") && n.width(i), o.hasClass("stretched") || (i = r.outerWidth(), n.width(i))578 } else t.css({579 height: ""580 }), Q.css({581 height: ""582 }), n.css({583 width: "",584 height: ""585 })586 },587 sliderRun: function(e) {588 let i = {589 element: e,590 default: ".swiper_wrapper",591 file: "plugins.swiper.js",592 error: "plugins.swiper.js: Plugin could not be loaded",593 execfn: "SEMICOLON_swiperInit",594 pluginfn: 'typeof Swiper !== "undefined"',595 trigger: "pluginSwiperReady",596 class: "has-plugin-swiper"597 };598 SEMICOLON.initialize.functions(i)599 },600 sliderParallaxOffset: function() {601 let e = 0,602 i = d.outerHeight();603 return (o.hasClass("side-header") || d.next(".include-header").length > 0) && (i = 0), e = J.length > 0 ? J.outerHeight() + i : i, W.next("#header").length > 0 && (e = 0), e604 },605 sliderParallaxSet: function(e, i, n) {606 n && (n.style.transform = "translate3d(" + e + ", " + i + "px, 0)")607 },608 sliderParallax: function() {609 if (Q.length < 1) return !0;610 let e, i, n = SEMICOLON.slider.sliderParallaxOffset(),611 a = Q.outerHeight();612 t = window.pageXOffset, s = window.pageYOffset, !o.hasClass("device-xl") && !o.hasClass("device-lg") || SEMICOLON.isMobile.any() ? (Q.find(".slider-inner").length > 0 ? (SEMICOLON.slider.sliderParallaxSet(0, 0, ie), SEMICOLON.slider.sliderParallaxSet(0, 0, ee)) : (SEMICOLON.slider.sliderParallaxSet(0, 0, Z), SEMICOLON.slider.sliderParallaxSet(0, 0, ee)), Q.addClass("slider-parallax-visible").removeClass("slider-parallax-invisible")) : (a + n + 50 > s ? (Q.addClass("slider-parallax-visible").removeClass("slider-parallax-invisible"), s > n ? Q.find(".slider-inner").length > 0 ? (e = -.4 * (s - n), i = -.15 * (s - n), SEMICOLON.slider.sliderParallaxSet(0, e, ie), SEMICOLON.slider.sliderParallaxSet(0, i, ee)) : (e = (s - n) / 1.5, i = (s - n) / 7, SEMICOLON.slider.sliderParallaxSet(0, e, Z), SEMICOLON.slider.sliderParallaxSet(0, i, ee)) : Q.find(".slider-inner").length > 0 ? (SEMICOLON.slider.sliderParallaxSet(0, 0, ie), SEMICOLON.slider.sliderParallaxSet(0, 0, ee)) : (SEMICOLON.slider.sliderParallaxSet(0, 0, Z), SEMICOLON.slider.sliderParallaxSet(0, 0, ee))) : Q.addClass("slider-parallax-invisible").removeClass("slider-parallax-visible"), requestAnimationFrame(function() {613 SEMICOLON.slider.sliderParallax(), SEMICOLON.slider.sliderElementsFade()614 }))615 },616 sliderElementsFade: function() {617 if (Q.length < 1) return !0;618 if (!o.hasClass("device-xl") && !o.hasClass("device-lg") || SEMICOLON.isMobile.any()) Q.find(".slider-arrow-left,.slider-arrow-right,.slider-caption,.slider-element-fade").css({619 opacity: 1620 });621 else {622 SEMICOLON.slider.sliderParallaxOffset();623 let e, i = Q.outerHeight();624 e = d.hasClass("transparent-header") || o.hasClass("side-header") ? 100 : 0, Q.filter(".slider-parallax-visible").find(".slider-arrow-left,.slider-arrow-right,.slider-caption,.slider-element-fade").css({625 opacity: 1 - 1.85 * (s - e) / i626 })627 }628 },629 swiperSliderMenu: function(e) {630 if (e = void 0 !== e && e, o.hasClass("device-xl") || o.hasClass("device-lg") || d.hasClass("transparent-header-responsive") && !o.hasClass("primary-menu-open")) {631 let i = W.find(".swiper-slide.swiper-slide-active");632 SEMICOLON.slider.headerSchemeChanger(i, e)633 }634 },635 revolutionSliderMenu: function(e) {636 if (e = void 0 !== e && e, o.hasClass("device-xl") || o.hasClass("device-lg") || d.hasClass("transparent-header-responsive") && !o.hasClass("primary-menu-open")) {637 let i = W.find(".active-revslide");638 SEMICOLON.slider.headerSchemeChanger(i, e)639 }640 },641 headerSchemeChanger: function(i, n) {642 if (i.length > 0) {643 let t, s, a = !1;644 if (i.hasClass("dark")) {645 if ((s = (t = L ? L.split(/ +/) : "").length) > 0) {646 let e = 0;647 for (e = 0; e < s; e++)648 if ("dark" == t[e] && 1 == n) {649 a = !0;650 break651 }652 }653 e("#header.transparent-header:not(.sticky-header,.semi-transparent,.floating-header)").addClass("dark"), a || e("#header.transparent-header.sticky-header,#header.transparent-header.semi-transparent.sticky-header,#header.transparent-header.floating-header.sticky-header").removeClass("dark"), u.removeClass("not-dark")654 } else o.hasClass("dark") ? (i.addClass("not-dark"), e("#header.transparent-header:not(.semi-transparent,.floating-header)").removeClass("dark"), e("#header.transparent-header:not(.sticky-header,.semi-transparent,.floating-header)").find("#header-wrap").addClass("not-dark")) : (e("#header.transparent-header:not(.semi-transparent,.floating-header)").removeClass("dark"), u.removeClass("not-dark"));655 d.hasClass("sticky-header") && SEMICOLON.header.stickyMenuClass(), SEMICOLON.header.logo()656 }657 }658 }, SEMICOLON.portfolio = {659 init: function() {660 SEMICOLON.portfolio.revealDesc(), SEMICOLON.portfolio.ajaxload()661 },662 revealDesc: function() {663 let i = e(".portfolio-reveal");664 if (i < 1) return !0;665 i.each(function() {666 e(this).find(".portfolio-item").each(function() {667 let i = e(this).find(".portfolio-desc"),668 n = i.outerHeight();669 i.css({670 "margin-top": "-" + n + "px"671 })672 })673 })674 },675 ajaxload: function() {676 SEMICOLON.initialize.functions({677 default: ".portfolio-ajax",678 file: "plugins.ajaxportfolio.js",679 error: "plugins.ajaxportfolio.js: Plugin could not be loaded",680 execfn: "SEMICOLON_portfolioAjaxloadInit",681 pluginfn: 'typeof scwAjaxPortfolioPlugin !== "undefined"',682 trigger: "pluginAjaxPortfolioReady",683 class: "has-plugin-ajaxportfolio"684 })685 }686 }, SEMICOLON.widget = {687 init: function() {688 SEMICOLON.widget.animations(), SEMICOLON.widget.hoverAnimation(), SEMICOLON.widget.youtubeBgVideo(), SEMICOLON.widget.tabs(), SEMICOLON.widget.toggles(), SEMICOLON.widget.accordions(), SEMICOLON.widget.counter(), SEMICOLON.widget.countdown(), SEMICOLON.widget.gmap(), SEMICOLON.widget.roundedSkill(), SEMICOLON.widget.progress(), SEMICOLON.widget.twitterFeed(), SEMICOLON.widget.flickrFeed(), SEMICOLON.widget.instagramPhotos(), SEMICOLON.widget.dribbbleShots(), SEMICOLON.widget.navTree(), SEMICOLON.widget.textRotator(), SEMICOLON.widget.carousel(), SEMICOLON.widget.linkScroll(), SEMICOLON.widget.ajaxForm(), SEMICOLON.widget.subscription(), SEMICOLON.widget.shapeDivider(), SEMICOLON.widget.stickySidebar(), SEMICOLON.widget.cookieNotify(), SEMICOLON.widget.cartQuantity(), SEMICOLON.widget.readmore(), SEMICOLON.widget.pricingSwitcher(), SEMICOLON.widget.extras()689 },690 parallax: function(e) {691 let i = {692 element: e,693 default: ".parallax,.page-title-parallax,.portfolio-parallax .portfolio-image",694 file: "plugins.parallax.js",695 error: "plugins.parallax.js: Plugin could not be loaded",696 execfn: "SEMICOLON_parallaxInit",697 pluginfn: 'typeof skrollr !== "undefined"',698 trigger: "pluginParallaxReady",699 class: "has-plugin-parallax"700 };701 SEMICOLON.initialize.functions(i)702 },703 animations: function(e) {704 let i = {705 element: e,706 default: "[data-animate]",707 file: "plugins.animations.js",708 error: "plugins.animations.js: Plugin could not be loaded",709 execfn: "SEMICOLON_animationsInit",710 pluginfn: 'typeof scwAnimationsPlugin !== "undefined"',711 trigger: "pluginAnimationsReady",712 class: "has-plugin-animations"713 };714 SEMICOLON.initialize.functions(i)715 },716 hoverAnimation: function(e) {717 let i = {718 element: e,719 default: "[data-hover-animate]",720 file: "plugins.hoveranimation.js",721 error: "plugins.hoveranimation.js: Plugin could not be loaded",722 execfn: "SEMICOLON_hoverAnimationInit",723 pluginfn: 'typeof scwHoverAnimationPlugin !== "undefined"',724 trigger: "pluginHoverAnimationReady",725 class: "has-plugin-hoveranimation"726 };727 SEMICOLON.initialize.functions(i)728 },729 gridInit: function(e) {730 let i = {731 element: e,732 default: ".grid-container",733 file: "plugins.isotope.js",734 error: "plugins.isotope.js: Plugin could not be loaded",735 execfn: "SEMICOLON_gridContainerInit",736 pluginfn: "$().isotope",737 trigger: "pluginIsotopeReady",738 class: "has-plugin-isotope"739 };740 SEMICOLON.initialize.functions(i)741 },742 filterInit: function(e) {743 let i = {744 element: e,745 default: ".grid-filter,.custom-filter",746 file: "plugins.gridfilter.js",747 error: "plugins.gridfilter.js: Plugin could not be loaded",748 execfn: "SEMICOLON_gridFilterInit",749 pluginfn: '$().isotope && typeof scwGridFilterPlugin !== "undefined"',750 trigger: "pluginGridFilterReady",751 class: "has-plugin-isotope-filter"752 };753 SEMICOLON.initialize.functions(i)754 },755 loadFlexSlider: function(e) {756 let i = {757 element: e,758 default: ".fslider",759 file: "plugins.flexslider.js",760 error: "plugins.flexslider.js: Plugin could not be loaded",761 execfn: "SEMICOLON_flexSliderInit",762 pluginfn: "$().flexslider",763 trigger: "pluginFlexSliderReady",764 class: "has-plugin-flexslider"765 };766 SEMICOLON.initialize.functions(i)767 },768 html5Video: function(e) {769 let i = {770 element: e,771 default: ".video-wrap:has(video)",772 file: "plugins.html5video.js",773 error: "plugins.html5video.js: Plugin could not be loaded",774 execfn: "SEMICOLON_html5VideoInit",775 pluginfn: 'typeof scwHtml5VideoPlugin !== "undefined"',776 trigger: "pluginHtml5VideoReady",777 class: "has-plugin-html5video"778 };779 SEMICOLON.initialize.functions(i)780 },781 youtubeBgVideo: function(e) {782 let i = {783 element: e,784 default: ".yt-bg-player",785 file: "plugins.youtube.js",786 error: "plugins.youtube.js: Plugin could not be loaded",787 execfn: "SEMICOLON_youtubeBgVideoInit",788 pluginfn: "$().YTPlayer",789 trigger: "pluginYoutubeBgVideoReady",790 class: "has-plugin-youtubebg"791 };792 SEMICOLON.initialize.functions(i)793 },794 tabs: function(e) {795 let i = {796 element: e,797 default: '.tabs,[data-plugin="tabs"]',798 file: "plugins.tabs.js",799 error: "plugins.tabs.js: Plugin could not be loaded",800 execfn: "SEMICOLON_tabsInit",801 pluginfn: "$().tabs",802 trigger: "pluginTabsReady",803 class: "has-plugin-tabs"804 };805 SEMICOLON.initialize.functions(i)806 },807 toggles: function(e) {808 let i = {809 element: e,810 default: ".toggle",811 file: "plugins.toggles.js",812 error: "plugins.toggles.js: Plugin could not be loaded",813 execfn: "SEMICOLON_togglesInit",814 pluginfn: 'typeof scwTogglesPlugin !== "undefined"',815 trigger: "pluginTogglesReady",816 class: "has-plugin-toggles"817 };818 SEMICOLON.initialize.functions(i)819 },820 accordions: function(e) {821 let i = {822 element: e,823 default: ".accordion",824 file: "plugins.accordions.js",825 error: "plugins.accordions.js: Plugin could not be loaded",826 execfn: "SEMICOLON_accordionsInit",827 pluginfn: 'typeof scwAccordionsPlugin !== "undefined"',828 trigger: "pluginAccordionsReady",829 class: "has-plugin-accordions"830 };831 SEMICOLON.initialize.functions(i)832 },833 counter: function(e) {834 let i = {835 element: e,836 default: ".counter",837 file: "plugins.counter.js",838 error: "plugins.counter.js: Plugin could not be loaded",839 execfn: "SEMICOLON_counterInit",840 pluginfn: "$().countTo",841 trigger: "pluginCounterReady",842 class: "has-plugin-counter"843 };844 SEMICOLON.initialize.functions(i)845 },846 countdown: function(e) {847 let i = {848 element: e,849 default: ".countdown",850 file: "components/moment.js",851 error: "components/moment.js: Plugin could not be loaded",852 execfn: !1,853 pluginfn: 'typeof moment !== "undefined"',854 trigger: "pluginMomentReady",855 class: "has-plugin-moment"856 },857 n = {858 element: e,859 default: ".countdown",860 file: "plugins.countdown.js",861 error: "plugins.countdown.js: Plugin could not be loaded",862 execfn: "SEMICOLON_countdownInit",863 pluginfn: "$().countdown",864 trigger: "pluginCountdownReady",865 class: "has-plugin-countdown"866 };867 SEMICOLON.initialize.functions(i), SEMICOLON.initialize.functions(n)868 },869 gmap: function(e) {870 let i = {871 element: e,872 default: ".gmap",873 file: "https://maps.google.com/maps/api/js?key=" + K,874 error: "Google Maps API could not be loaded",875 execfn: !1,876 pluginfn: 'typeof google !== "undefined"',877 hiddendisable: !0,878 class: "has-plugin-gmapapi"879 },880 n = {881 element: e,882 default: ".gmap",883 file: "plugins.gmap.js",884 error: "plugins.gmap.js: Plugin could not be loaded",885 execfn: "SEMICOLON_gmapInit",886 pluginfn: 'typeof google !== "undefined" && $().gMap',887 hiddendisable: !0,888 trigger: "pluginGmapReady",889 class: "has-plugin-gmap"890 };891 SEMICOLON.initialize.functions(i), SEMICOLON.initialize.functions(n)892 },893 roundedSkill: function(e) {894 let i = {895 element: e,896 default: ".rounded-skill",897 file: "plugins.piechart.js",898 error: "plugins.piechart.js: Plugin could not be loaded",899 execfn: "SEMICOLON_roundedSkillInit",900 pluginfn: "$().easyPieChart",901 trigger: "pluginRoundedSkillReady",902 class: "has-plugin-piechart"903 };904 SEMICOLON.initialize.functions(i)905 },906 progress: function(e) {907 let i = {908 element: e,909 default: ".progress",910 file: "plugins.progress.js",911 error: "plugins.progress.js: Plugin could not be loaded",912 execfn: "SEMICOLON_progressInit",913 pluginfn: 'typeof scwProgressPlugin !== "undefined"',914 trigger: "pluginProgressReady",915 class: "has-plugin-progress"916 };917 SEMICOLON.initialize.functions(i)918 },919 twitterFeed: function(e) {920 let i = {921 element: e,922 default: ".twitter-feed",923 file: "plugins.twitter.js",924 error: "plugins.twitter.js: Plugin could not be loaded",925 execfn: "SEMICOLON_twitterFeedInit",926 pluginfn: 'typeof sm_format_twitter !== "undefined" && typeof sm_format_twitter3 !== "undefined"',927 trigger: "pluginTwitterFeedReady",928 class: "has-plugin-twitter"929 };930 SEMICOLON.initialize.functions(i)931 },932 flickrFeed: function(e) {933 let i = {934 element: e,935 default: ".flickr-feed",936 file: "plugins.flickrfeed.js",937 error: "plugins.flickrfeed.js: Plugin could not be loaded",938 execfn: "SEMICOLON_flickrFeedInit",939 pluginfn: "$().jflickrfeed",940 trigger: "pluginFlickrFeedReady",941 class: "has-plugin-flickr"942 };943 SEMICOLON.initialize.functions(i)944 },945 instagramPhotos: function(e) {946 let i = {947 element: e,948 default: ".instagram-photos",949 file: "plugins.instagram.js",950 error: "plugins.instagram.js: Plugin could not be loaded",951 execfn: "SEMICOLON_instagramPhotosInit",952 pluginfn: 'typeof scwInstagramPlugin !== "undefined"',953 trigger: "pluginInstagramReady",954 class: "has-plugin-instagram"955 };956 SEMICOLON.initialize.functions(i)957 },958 dribbbleShots: function(e) {959 let i = {960 element: e,961 default: ".dribbble-shots",962 file: "plugins.dribbble.js",963 error: "plugins.dribbble.js: Plugin could not be loaded",964 execfn: "SEMICOLON_dribbbleShotsInit",965 pluginfn: "$.jribbble",966 trigger: "pluginDribbbleReady",967 class: "has-plugin-dribbble"968 },969 n = {970 element: e,971 default: ".dribbble-shots",972 file: "plugins.imagesloaded.js",973 error: "plugins.imagesloaded.js: Plugin could not be loaded",974 pluginfn: "$().imagesLoaded",975 trigger: "pluginImagesLoadedReady",976 class: "has-plugin-imagesloaded"977 };978 SEMICOLON.initialize.functions(i), SEMICOLON.initialize.functions(n)979 },980 navTree: function(e) {981 let i = {982 element: e,983 default: ".nav-tree",984 file: "plugins.navtree.js",985 error: "plugins.navtree.js: Plugin could not be loaded",986 execfn: "SEMICOLON_navtreeInit",987 pluginfn: 'typeof scwNavTreePlugin !== "undefined"',988 trigger: "pluginNavTreeReady",989 class: "has-plugin-navtree"990 };991 SEMICOLON.initialize.functions(i)992 },993 carousel: function(e) {994 let i = {995 element: e,996 default: ".carousel-widget",997 file: "plugins.carousel.js",998 error: "plugins.carousel.js: Plugin could not be loaded",999 execfn: "SEMICOLON_carouselInit",1000 pluginfn: "$().owlCarousel",1001 trigger: "pluginCarouselReady",1002 class: "has-plugin-carousel"1003 };1004 SEMICOLON.initialize.functions(i)1005 },1006 /*masonryThumbs: function(e) {1007 let i = {1008 element: e,1009 default: ".masonry-thumbs",1010 file: "plugins.masonrythumbs.js",1011 error: "plugins.masonrythumbs.js: Plugin could not be loaded",1012 execfn: "SEMICOLON_masonryThumbsInit",1013 pluginfn: '$().isotope && typeof scwMasonryThumbsPlugin !== "undefined"',1014 trigger: "pluginMasonryThumbsReady",1015 class: "has-plugin-masonrythumbs"1016 };1017 SEMICOLON.initialize.functions(i)1018 },*/1019 notifications: function(e) {1020 let i = {1021 element: e,1022 default: !1,1023 file: "plugins.notify.js",1024 error: "plugins.notify.js: Plugin could not be loaded",1025 execfn: "SEMICOLON_notificationInit",1026 pluginfn: 'typeof scwNotificationPlugin !== "undefined"',1027 trigger: "pluginNotifyReady",1028 class: "has-plugin-toast"1029 };1030 SEMICOLON.initialize.functions(i)1031 },1032 textRotator: function(e) {1033 let i = {1034 element: e,1035 default: ".text-rotater",1036 file: "plugins.textrotator.js",1037 error: "plugins.textrotator.js: Plugin could not be loaded",1038 execfn: "SEMICOLON_textRotatorInit",1039 pluginfn: "$().Morphext",1040 trigger: "pluginTextRotatorReady",1041 class: "has-plugin-textrotator"1042 };1043 SEMICOLON.initialize.functions(i)1044 },1045 linkScroll: function(e) {1046 let i = {1047 element: e,1048 default: "a[data-scrollto]",1049 file: "plugins.linkscroll.js",1050 error: "plugins.linkscroll.js: Plugin could not be loaded",1051 execfn: "SEMICOLON_linkScrollInit",1052 pluginfn: 'typeof scwLinkScrollPlugin !== "undefined"',1053 trigger: "pluginLinkScrollReady",1054 class: "has-plugin-linkscroll"1055 };1056 SEMICOLON.initialize.functions(i)1057 },1058 ajaxForm: function(e) {1059 let i = {1060 element: e,1061 default: ".form-widget",1062 file: "plugins.form.js",1063 error: "plugins.form.js: Plugin could not be loaded",1064 execfn: !1,1065 pluginfn: "$().validate && $().ajaxSubmit",1066 class: "has-plugin-form"1067 },1068 n = {1069 element: e,1070 default: ".form-widget",1071 file: "plugins.ajaxform.js",1072 error: "plugins.ajaxform.js: Plugin could not be loaded",1073 execfn: "SEMICOLON_ajaxFormInit",1074 pluginfn: 'typeof scwAjaxFormPlugin !== "undefined"',1075 trigger: "pluginAjaxFormReady",1076 class: "has-plugin-ajaxform"1077 };1078 SEMICOLON.initialize.functions(i), SEMICOLON.initialize.functions(n)1079 },1080 subscription: function(e) {1081 let i = {1082 element: e,1083 default: ".subscribe-widget",1084 file: "plugins.form.js",1085 error: "plugins.form.js: Plugin could not be loaded",1086 execfn: !1,1087 pluginfn: "$().validate && $().ajaxSubmit",1088 class: "has-plugin-form"1089 },1090 n = {1091 element: e,1092 default: ".subscribe-widget",1093 file: "plugins.subscribe.js",1094 error: "plugins.subscribe.js: Plugin could not be loaded",1095 execfn: "SEMICOLON_subscribeFormInit",1096 pluginfn: 'typeof scwSubscribeFormPlugin !== "undefined"',1097 trigger: "pluginSubscribeFormReady",1098 class: "has-plugin-subscribeform"1099 };1100 SEMICOLON.initialize.functions(i), SEMICOLON.initialize.functions(n)1101 },1102 shapeDivider: function(e) {1103 let i = {1104 element: e,1105 default: ".shape-divider",1106 file: "plugins.shapedivider.js",1107 error: "plugins.shapedivider.js: Plugin could not be loaded",1108 execfn: "SEMICOLON_shapeDividerInit",1109 pluginfn: 'typeof scwShapeDividerPlugin !== "undefined"',1110 trigger: "pluginShapeDividerReady",1111 class: "has-plugin-shapedivider"1112 };1113 SEMICOLON.initialize.functions(i)1114 },1115 ticker: function(e) {1116 let i = {1117 element: e,1118 default: ".scw-ticker",1119 file: "plugins.ticker.js",1120 error: "plugins.ticker.js: Plugin could not be loaded",1121 execfn: "SEMICOLON_tickerInit",1122 pluginfn: 'typeof scwTickerPlugin !== "undefined"',1123 trigger: "pluginTickerReady",1124 class: "has-plugin-ticker"1125 };1126 SEMICOLON.initialize.functions(i)1127 },1128 stickySidebar: function(e) {1129 let i = {1130 element: e,1131 default: ".sticky-sidebar-wrap",1132 file: "plugins.stickysidebar.js",1133 error: "plugins.stickysidebar.js: Plugin could not be loaded",1134 execfn: "SEMICOLON_stickySidebarInit",1135 pluginfn: "$().scwStickySidebar",1136 trigger: "pluginStickySidebarReady",1137 class: "has-plugin-stickysidebar"1138 };1139 SEMICOLON.initialize.functions(i)1140 },1141 cookieNotify: function(e) {1142 let i = {1143 element: e,1144 default: ".gdpr-settings,[data-cookies]",1145 file: "plugins.cookie.js",1146 error: "plugins.cookie.js: Plugin could not be loaded",1147 execfn: "SEMICOLON_cookieInit",1148 pluginfn: 'typeof Cookies !== "undefined"',1149 trigger: "pluginCookieReady",1150 class: "has-plugin-cookie"1151 };1152 SEMICOLON.initialize.functions(i)1153 },1154 cartQuantity: function() {1155 SEMICOLON.initialize.functions({1156 default: ".qty",1157 file: "plugins.quantity.js",1158 error: "plugins.quantity.js: Plugin could not be loaded",1159 execfn: "SEMICOLON_quantityInit",1160 pluginfn: 'typeof scwQuantityPlugin !== "undefined"',1161 trigger: "pluginQuantityReady",1162 class: "has-plugin-quantity"1163 })1164 },1165 readmore: function() {1166 SEMICOLON.initialize.functions({1167 default: "[data-readmore]",1168 file: "plugins.readmore.js",1169 error: "plugins.readmore.js: Plugin could not be loaded",1170 execfn: "SEMICOLON_readmoreInit",1171 pluginfn: 'typeof scwReadMorePlugin !== "undefined"',1172 trigger: "pluginReadMoreReady",1173 class: "has-plugin-readmore"1174 })1175 },1176 pricingSwitcher: function() {1177 SEMICOLON.initialize.functions({1178 default: ".pts-switcher",1179 file: "plugins.pricingswitcher.js",1180 error: "plugins.pricingswitcher.js: Plugin could not be loaded",1181 execfn: "SEMICOLON_pricingSwitcherInit",1182 pluginfn: 'typeof scwPricingSwitcherPlugin !== "undefined"',1183 trigger: "pluginPricingSwitcherReady",1184 class: "has-plugin-pricing-switcher"1185 })1186 },1187 extras: function() {1188 let i = setInterval(function() {1189 "pluginBootstrapReady" in scwEvents && (e().tooltip ? e('[data-bs-toggle="tooltip"]').tooltip({1190 container: "body"1191 }) : console.log("extras: Bootstrap Tooltip not defined."), e().popover ? e('[data-bs-toggle="popover"]').popover({1192 container: "body"1193 }) : console.log("extras: Bootstrap Popover not defined."), clearInterval(i))1194 }, 1e3);1195 e(".style-msg").on("click", ".close", function(i) {1196 e(this).parents(".style-msg").slideUp(), i.preventDefault()1197 }), e("#page-menu-trigger").off("click").on("click", function() {1198 return o.toggleClass("top-search-open", !1), $.toggleClass("page-menu-open"), !11199 }), $.find("nav").off("click").on("click", function(e) {1200 o.toggleClass("top-search-open", !1), G.toggleClass("top-cart-open", !1)1201 }), SEMICOLON.isMobile.any() && o.addClass("device-touch")1202 }1203 }, SEMICOLON.isMobile = {1204 Android: function() {1205 return navigator.userAgent.match(/Android/i)1206 },1207 BlackBerry: function() {1208 return navigator.userAgent.match(/BlackBerry/i)1209 },1210 iOS: function() {1211 return navigator.userAgent.match(/iPhone|iPad|iPod/i)1212 },1213 Opera: function() {1214 return navigator.userAgent.match(/Opera Mini/i)1215 },1216 Windows: function() {1217 return navigator.userAgent.match(/IEMobile/i)1218 },1219 any: function() {1220 return SEMICOLON.isMobile.Android() || SEMICOLON.isMobile.BlackBerry() || SEMICOLON.isMobile.iOS() || SEMICOLON.isMobile.Opera() || SEMICOLON.isMobile.Windows()1221 }1222 }, SEMICOLON.customization = {1223 onReady: function() {},1224 onLoad: function() {},1225 onResize: function() {}1226 }, SEMICOLON.documentOnResize = {1227 init: function() {1228 SEMICOLON.header.menufunctions(), SEMICOLON.header.fullWidthMenu(), SEMICOLON.header.stickyMenu(), SEMICOLON.initialize.dataResponsiveHeights(), SEMICOLON.initialize.stickFooterOnSmall(), SEMICOLON.slider.sliderDimensions(), SEMICOLON.slider.sliderParallax(), SEMICOLON.widget.html5Video(), SEMICOLON.widget.masonryThumbs(), SEMICOLON.initialize.dataResponsiveClasses(), SEMICOLON.customization.onResize(), N = l.width(), e(window).trigger("scwWindowResize")1229 }1230 }, SEMICOLON.documentOnReady = {1231 init: function() {1232 SEMICOLON.initialize.init(), SEMICOLON.header.init(), (W.length > 0 || U.length > 0) && SEMICOLON.slider.init(), V.length > 0 && SEMICOLON.portfolio.init(), SEMICOLON.widget.init(), SEMICOLON.documentOnReady.windowscroll(), SEMICOLON.customization.onReady(), o.hasClass("adaptive-color-scheme") && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches && o.toggleClass("dark", !0), window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", function(e) {1233 e.matches ? o.toggleClass("dark", !0) : o.toggleClass("dark", !1)1234 })), o.off("click").on("click", 'a[href*="#"]', function() {1235 l.on("beforeunload", function() {1236 l.scrollTop(0)1237 })1238 });1239 let i = location.hash;1240 e(i).length > 0 && e(".one-page-menu").find('[data-href="' + i + '"]').length > 0 && l.scrollTop(0)1241 },1242 windowscroll: function() {1243 d.length > 0 && (ne = d.offset().top, u.addClass("position-absolute"), te = u.offset().top, u.removeClass("position-absolute"));1244 let i = d.attr("data-sticky-offset");1245 if (void 0 !== i)1246 if ("full" == i) {1247 te = l.height();1248 let e = d.attr("data-sticky-offset-negative");1249 void 0 !== e && (te = te - e - 1)1250 } else te = Number(i);1251 else "undefined" === te && (te = ne);1252 $.find("#page-menu-wrap");1253 let n, t = u.outerHeight(),1254 s = document.head || document.getElementsByTagName("head")[0],1255 a = document.createElement("style");1256 $.length > 0 && (q.css({1257 height: $.find("#page-menu-wrap").outerHeight()1258 }), setTimeout(function() {1259 d.length > 0 && !d.hasClass("no-sticky") && (o.hasClass("device-xl") || o.hasClass("device-lg") || "true" == p) ? (se = $.offset().top - u.outerHeight(), s.appendChild(a), n = "#page-menu.sticky-page-menu:not(.dots-menu) #page-menu-wrap { top: " + t + "px; }", a.type = "text/css", a.appendChild(document.createTextNode(n))) : se = $.offset().top1260 }, 1e3)), SEMICOLON.header.stickyMenu(te), SEMICOLON.header.stickyPageMenu(se), window.addEventListener("scroll", function() {1261 SEMICOLON.initialize.goToTopScroll(), e("body.open-header.close-header-on-scroll").removeClass("side-header-open"), SEMICOLON.header.stickyMenu(te), SEMICOLON.header.stickyPageMenu(se), SEMICOLON.header.logo()1262 }), window.addEventListener("DOMContentLoaded", onScrollSliderParallax, !1), l.scrollEnd(function() {1263 let e = u.outerHeight();1264 y.length > 0 && e > y.outerHeight() && (y.css({1265 height: e1266 }), (o.hasClass("device-xl") || o.hasClass("device-lg")) && SEMICOLON.header.includeOffset()), $.length > 0 && d.length > 0 && !d.hasClass("no-sticky") && (o.hasClass("device-xl") || o.hasClass("device-lg")) && $.filter(".sticky-page-menu:not(.dots-menu,.no-sticky)").find(B).css({1267 top: e + "px"1268 })1269 }, 500), window.onfocus = function() {1270 let e = u.outerHeight();1271 y.length > 0 && e > y.outerHeight() && y.css({1272 height: e1273 })1274 }1275 }1276 }, SEMICOLON.documentOnLoad = {1277 init: function() {1278 SEMICOLON.slider.swiperSliderMenu(!0), SEMICOLON.slider.revolutionSliderMenu(!0), SEMICOLON.initialize.stickFooterOnSmall(), SEMICOLON.widget.gridInit();1279 let e = setInterval(function() {1280 "pluginIsotopeReady" in scwEvents && (SEMICOLON.widget.filterInit(), SEMICOLON.widget.masonryThumbs(), clearInterval(e))1281 }, 1e3);1282 SEMICOLON.widget.parallax(), SEMICOLON.widget.loadFlexSlider(), SEMICOLON.widget.html5Video(), SEMICOLON.widget.ticker(), SEMICOLON.header.responsiveMenuClass(), SEMICOLON.initialize.modal(), SEMICOLON.customization.onLoad()1283 }1284 };1285 let i, n, t, s, a, l = e(window),1286 o = e("body"),1287 r = e("#wrapper"),1288 d = e("#header"),1289 u = e("#header-wrap"),1290 c = e(".include-header"),1291 g = d.attr("data-logo-height") || 100,1292 f = d.attr("data-sticky-logo-height") || 60,1293 p = d.attr("data-mobile-sticky") || "false",1294 m = d.attr("data-mobile-logo-height") || Number(g),1295 h = (d.attr("data-mobile-sticky-logo-height") || Number(f), d.attr("data-menu-padding") || 39),1296 O = d.attr("data-sticky-menu-padding") || 19,1297 C = !(d.hasClass("header-size-lg") || d.hasClass("header-size-md") || d.hasClass("header-size-sm") || d.hasClass("header-size-custom")),1298 S = d.attr("data-sticky-shrink") || "true",1299 I = d.attr("data-sticky-shrink-offset") || 300,1300 M = e(".primary-menu"),1301 b = M.find(".menu-container:not(mobile-primary-menu):not(.custom-spacing)").children(".menu-item").children(".menu-link"),1302 y = "",1303 E = (u.outerHeight(), u.find(".header-row:eq(0)"), e("#content"), e("#footer")),1304 N = l.width(),1305 L = d.attr("class"),1306 v = u.attr("class"),1307 w = d.attr("data-sticky-class"),1308 k = d.attr("data-responsive-class"),1309 x = e("#logo"),1310 j = x.find(".standard-logo"),1311 P = (j.find("img").outerWidth(), x.find(".retina-logo")),1312 z = j.find("img").attr("src"),1313 R = P.find("img").attr("src"),1314 T = j.attr("data-dark-logo"),1315 F = P.attr("data-dark-logo"),1316 _ = j.attr("data-sticky-logo"),1317 A = P.attr("data-sticky-logo"),1318 H = j.attr("data-mobile-logo"),1319 D = P.attr("data-mobile-logo"),1320 $ = e("#page-menu"),1321 q = "",1322 B = $.find("#page-menu-wrap"),1323 V = (e(".one-page-menu"), e(".portfolio")),1324 W = (e(".shop"), e("#slider")),1325 Q = e(".slider-parallax"),1326 U = e(".slider-element"),1327 J = e("#page-title"),1328 Y = e(".top-search-form"),1329 G = e("#top-cart"),1330 X = (e("#top-social").find("li"), e("#gotoTop")),1331 K = "YOUR-API-KEY",1332 Z = document.querySelector(".slider-parallax"),1333 ee = document.querySelector(".slider-parallax .slider-caption"),1334 ie = document.querySelector(".slider-inner"),1335 ne = 0,1336 te = 0,1337 se = 0;1338 e(document).ready(SEMICOLON.documentOnReady.init), l.on("load", SEMICOLON.documentOnLoad.init), l.on("resize", function() {1339 let i = e(this);1340 clearTimeout(a), a = setTimeout(function() {1341 i.width() !== N && SEMICOLON.documentOnResize.init()1342 }, 250)1343 })1344}(jQuery), jQuery(document).ready(function() {1345 jQuery(".disable-pagetransition").on("click", function() {1346 return jQuery("body").addClass("no-transition"), jQuery(".page-transition-wrap").fadeOut(400, function() {1347 jQuery(this).remove()1348 }), !11349 })1350}), jQuery.get("switcher-html.html", function(e) {1351 jQuery("#gotoTop").after(e), jQuery(".scw-trigger").on("click", function() {1352 jQuery(".scw-switcher-wrap").toggleClass("scw-switcher-open")1353 }), jQuery(document).on("click", function(e) {1354 jQuery(e.target).closest(".scw-switcher-wrap").length || jQuery(".scw-switcher-wrap").toggleClass("scw-switcher-open", !1)1355 })1356});1357jQuery(document).one("ajaxComplete", function() {1358 jQuery(".preloader-demo").on("click", function(s) {1359 var i = jQuery(this),1360 d = jQuery(".preloader-demo"),1361 v = i.attr("data-loader");1362 d.prop("disabled", !0), "1" == v ? css3Loader = '<div class="css3-spinner-bounce1"></div><div class="css3-spinner-bounce2"></div><div class="css3-spinner-bounce3"></div>' : "2" == v ? css3Loader = '<div class="css3-spinner-flipper"></div>' : "3" == v ? css3Loader = '<div class="css3-spinner-double-bounce1"></div><div class="css3-spinner-double-bounce2"></div>' : "4" == v ? css3Loader = '<div class="css3-spinner-rect1"></div><div class="css3-spinner-rect2"></div><div class="css3-spinner-rect3"></div><div class="css3-spinner-rect4"></div><div class="css3-spinner-rect5"></div>' : "5" == v ? css3Loader = '<div class="css3-spinner-cube1"></div><div class="css3-spinner-cube2"></div>' : "6" == v ? css3Loader = '<div class="css3-spinner-scaler"></div>' : "7" == v ? css3Loader = '<div class="css3-spinner-grid-pulse"><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div>' : "8" == v ? css3Loader = '<div class="css3-spinner-clip-rotate"><div></div></div>' : "9" == v ? css3Loader = '<div class="css3-spinner-ball-rotate"><div></div><div></div><div></div></div>' : "10" == v ? css3Loader = '<div class="css3-spinner-zig-zag"><div></div><div></div></div>' : "11" == v ? css3Loader = '<div class="css3-spinner-triangle-path"><div></div><div></div><div></div></div>' : "12" == v ? css3Loader = '<div class="css3-spinner-ball-scale-multiple"><div></div><div></div><div></div></div>' : "13" == v ? css3Loader = '<div class="css3-spinner-ball-pulse-sync"><div></div><div></div><div></div></div>' : "14" == v && (css3Loader = '<div class="css3-spinner-scale-ripple"><div></div><div></div><div></div></div>'), jQuery("body").append('<div class="page-transition-wrap"><div class="css3-spinner"></div></div>'), jQuery(".css3-spinner").html(css3Loader), setTimeout(function() {1363 jQuery(".page-transition-wrap").fadeOut("400", function() {1364 jQuery(this).remove(), d.prop("disabled", !1)1365 })1366 }, 2e3), s.preventDefault()1367 })1368});1369jQuery('[href="media-embeds.html"],[href="gdpr.html"]').parent('.menu-item').addClass('menu-item-important');1370jQuery('.menu-link[href="intro.html#section-niche"]').parent('.menu-item').after('<li class="menu-item"><a href="blocks.html" target="_blank" class="menu-link"><div>Blocks</div></a></li>');1371function semicolonweb_loadScriptAsync(a, o) {1372 if ("function" != typeof o) throw new Error("Not a valid callback for async script load");1373 var n = document.createElement("script");1374 n.onload = o, n.src = a, document.head.appendChild(n)1375}1376semicolonweb_loadScriptAsync("https://www.googletagmanager.com/gtag/js?id=G-H74KY38NCR", function() {1377 function a() {1378 dataLayer.push(arguments)1379 }1380 window.dataLayer = window.dataLayer || [], a("js", new Date), a("config", "G-H74KY38NCR")...

Full Screen

Full Screen

main.js

Source:main.js Github

copy

Full Screen

1const easymidi = require('easymidi');2const _ = require('lodash');3const {dbKeys, spFaderAndKnobsKeys} = require('./init-db');4const func = require('./functions');5const DEFAULT_IN_PREFIX = 'APC40 mkII';6const DEFAULT_OUT_PREFIX = 'MA Dot2';7const inputs = easymidi.getInputs();8const outputs = easymidi.getOutputs();9console.log('---------------------------------------------------');10console.log('Show Inputs Midi', inputs);11console.log('Show Inputs Ouputs', outputs);12console.log('---------------------------------------------------');13function findPrefix(prefix, list) {14 return list.find(item => {15 if (item.indexOf(prefix) === 0) {16 return item;17 }18 })19}20function main() {21 const tInput = findPrefix(DEFAULT_IN_PREFIX, inputs);22 const tOutput1 = findPrefix(DEFAULT_IN_PREFIX, outputs);23 const tOutput2 = findPrefix(DEFAULT_OUT_PREFIX, outputs);24 console.log('Connecting to: ' + tInput, 'Output1: ' + tOutput1, 'Output2: ' + tOutput2);25 console.log('---------------------------------------------------');26 if (inputs.length <= 0) {27 console.error('---------------------------------------------------');28 console.error("No midi device found");29 console.error('---------------------------------------------------');30 process.exit(1);31 }32 if (!tInput && !tOutput1) {33 console.error('---------------------------------------------------');34 console.error('Dont exist default MIDI conections');35 console.error('---------------------------------------------------');36 process.exit(1);37 }38 if (!tOutput2) {39 console.error('---------------------------------------------------');40 console.error('Dont exist default MIDI external - MA DOT2');41 console.error('---------------------------------------------------');42 process.exit(1);43 }44 if (!dbKeys.get('keys')) {45 console.error('---------------------------------------------------');46 console.error('Dont exist definition of DB Keys');47 console.error('---------------------------------------------------');48 process.exit(1);49 }50 const input = new easymidi.Input(tInput);51 const outputRelay = new easymidi.Output(tOutput1);52 const outputEmitter = new easymidi.Output(tOutput2);53 const execFn = new func(outputRelay, outputEmitter);54 console.log('--- Init program reception MIDI Signal ---');55 const dataKeys = dbKeys.get('keys');56 execFn.initAll(dataKeys);57 // input.on('noteon', function (params) {58 // execFn.print('Note On', params);59 // });60 input.on('noteoff', function (params) {61 const note = params.note;62 let channel = params.channel;63 // params = {note: ..., velocity: ..., channel: ...}64 execFn.print('Note Off:', params, note, channel);65 execFn.onStateSection(params, dataKeys);66 execFn.onStateScene(params, dataKeys);67 execFn.onStateClipButton(params, dataKeys);68 execFn.onStateButtonPad(params, dataKeys);69 execFn.onStateButtonSecondaryPad(params, dataKeys);70 execFn.onStateButtonLateral(params, dataKeys);71 });72 input.on('cc', function (params) {73 //params = {channel: ..., controller: ..., value:...};74 const vCC = _.find(spFaderAndKnobsKeys, {'current': params.controller, 'channel': params.channel});75 // execFn.print('ControlChanger:', params, vCC);76 if (vCC) {77 execFn.sendEmitter('noteon', {note: vCC.new, velocity: params.value, channel: params.channel});78 }79 });80}...

Full Screen

Full Screen

plugin.js

Source:plugin.js Github

copy

Full Screen

1/**2 * Created with JetBrains PhpStorm.3 * User: campaign4 * Date: 10/8/135 * Time: 6:15 PM6 * To change this template use File | Settings | File Templates.7 */8UE.plugin = function(){9 var _plugins = {};10 return {11 register : function(pluginName,fn,oldOptionName,afterDisabled){12 if(oldOptionName && utils.isFunction(oldOptionName)){13 afterDisabled = oldOptionName;14 oldOptionName = null15 }16 _plugins[pluginName] = {17 optionName : oldOptionName || pluginName,18 execFn : fn,19 //当插件被禁用时执行20 afterDisabled : afterDisabled21 }22 },23 load : function(editor){24 utils.each(_plugins,function(plugin){25 var _export = plugin.execFn.call(editor);26 if(editor.options[plugin.optionName] !== false){27 if(_export){28 //后边需要再做扩展29 utils.each(_export,function(v,k){30 switch(k.toLowerCase()){31 case 'shortcutkey':32 editor.addshortcutkey(v);33 break;34 case 'bindevents':35 utils.each(v,function(fn,eventName){36 editor.addListener(eventName,fn);37 });38 break;39 case 'bindmultievents':40 utils.each(utils.isArray(v) ? v:[v],function(event){41 var types = utils.trim(event.type).split(/\s+/);42 utils.each(types,function(eventName){43 editor.addListener(eventName, event.handler);44 });45 });46 break;47 case 'commands':48 utils.each(v,function(execFn,execName){49 editor.commands[execName] = execFn50 });51 break;52 case 'outputrule':53 editor.addOutputRule(v);54 break;55 case 'inputrule':56 editor.addInputRule(v);57 break;58 case 'defaultoptions':59 editor.setOpt(v)60 }61 })62 }63 }else if(plugin.afterDisabled){64 plugin.afterDisabled.call(editor)65 }66 });67 //向下兼容68 utils.each(UE.plugins,function(plugin){69 plugin.call(editor);70 });71 },72 run : function(pluginName,editor){73 var plugin = _plugins[pluginName];74 if(plugin){75 plugin.exeFn.call(editor)76 }77 }78 }...

Full Screen

Full Screen

kubectl.js

Source:kubectl.js Github

copy

Full Screen

2/**3 * @returns {Promise<string[]>}4 */5const getDeployments = async () => {6 const stdout = await execFn(['get', 'deployments', '-o', 'json']);7 // Parse output to array of contexts8 return JSON.parse(stdout).items.map(i => ({9 name: i.metadata.name,10 value: {11 name: i.metadata.name,12 container: i.spec.template.spec.containers[0].name,13 image: i.spec.template.spec.containers[0].image14 }15 }));16};17/**18 * @returns {Promise<string[]>}19 */20const getNamespaces = async () => {21 const stdout = await execFn(['get', 'namespaces', '-o', 'json']);22 // Parse output to array of contexts23 return JSON.parse(stdout).items.map(i => i.metadata.name);24};25/**26 * @returns {Promise<string>}27 */28const getCurrentContext = () => {29 return execFn(['config', 'current-context']);30};31/**32 * @typedef ClusterInfo33 * @prop {string[]} names34 * @prop {string[]} cluster35 * @prop {string[]} namespace36 * @prop {string?} current37*/38/**39 * @returns {Promise<ClusterInfo>}40 */41const getContexts = () => {42 return new Promise(async resolve => {43 const stdout = await execFn(['config', 'get-contexts']);44 // Parse output to array of contexts45 const contextInfo = {46 names: [],47 cluster: [],48 namespace: [],49 current: null50 };51 stdout.split('\n').filter(empty).forEach((line, idx) => {52 // [current, name, cluster, authInfo, namespace]53 const values = line.trim().replace(/(\*?\s)+/g, ',').split(',').filter(empty);54 // [name, cluster, authInfo, namespace]55 if (idx > 0) {56 contextInfo.names.push(values[0]);57 contextInfo.cluster.push(values[1]);58 contextInfo.namespace.push(values[3]);59 if (/^\*/.test(line)) { // Current ctx line starts with '*'60 contextInfo.current = values[0];61 }62 }63 });64 resolve(contextInfo);65 });66};67const setImage = async (deployment, container, image, tag) => {68 const result = await execFn(69 ['set', 'image', `deployment/${deployment}`, `${container}=${image}:${tag}`]70 );71 console.log(result);72};73const setContext = async context => {74 const result = await execFn(['config', 'use-context', context]);75 console.log(result);76};77const setNamespace = async (context, namespace) => {78 const result = await execFn(['config', 'set-context', context, `--namespace=${namespace}`]);79 console.log(result);80};81function execFn(args) {82 return execa.stdout('kubectl', args);83}84function empty(str) {85 return Boolean(str.length);86}87module.exports = {88 getCurrentContext,89 getDeployments,90 getNamespaces,91 getContexts,92 setNamespace,93 setContext,94 setImage95};

Full Screen

Full Screen

nodes.test.js

Source:nodes.test.js Github

copy

Full Screen

...72 const execFn = jest.fn();73 const f1 = get('foo');74 const f2 = exec(async (args) => {75 await wait(1000);76 execFn(args);77 return true;78 });79 s.add(f1);80 f1.add(f2);81 s.feed('123', {82 name: 'foo',83 args: ['test'],84 });85 return b.getPromise()86 .then(() => {87 expect(execFn).toHaveBeenCalledTimes(0);88 return b.getPromise();89 })90 .then(() => {...

Full Screen

Full Screen

git.js

Source:git.js Github

copy

Full Screen

1import * as fs from 'fs';2import * as path from 'path';3import deasync from 'deasync';4import * as childProcess from 'child_process';5const execSync = deasync(childProcess.exec); // exported for tests6/**7 * Checks whether Git repository exists in the current working directory.8 */9export function exists(cwd = null, statFn = null) {10 const stat = statFn || fs.statSync;11 try {12 return !!stat(path.join(cwd || process.cwd(), '.git'));13 } catch (err) {14 return false;15 }16}17/**18 * Creates GitHub URL from given details.19 */20export function createUrl(organization, repo) {21 return 'git@github.com:' + organization + '/' + repo + '.git';22}23/**24 * Parses GitHub URL to object with details.25 */26export function parseUrl(url) {27 const match = url.match(/(\w+)\/(\w+)/);28 return {organization: match[1], repo: match[2], handle: match[0]};29}30/**31 * Retrieves Git remote origin URL of the repository in current working32 * directory.33 */34export function getOrigin(execFn = null) {35 const exec = execFn || execSync;36 const stdout = exec('git remote -v');37 if (!stdout) {38 return null;39 }40 const match = stdout.match(/origin\s+(\S+@\S+)/);41 return match ? match[1] : null;42}43/**44 * Sets Git remote origin URL to the repository in current working directory.45 */46export function setOrigin(url, execFn = null) {47 const exec = execFn || execSync;48 return exec(`git remote add origin ${url}`);49}50/**51 * Gets user's e-mail effective for current repository.52 */53export function getEmail(execFn = null) {54 const exec = execFn || execSync;55 try {56 return exec('git config user.email');57 } catch (err) {58 return null;59 }60}61/**62 * Sets given e-mail as user's e-mail for current repository.63 */64export function setEmail(email, execFn = null) {65 const exec = execFn || execSync;66 return exec(`git config user.email '${email}'`);67}68/**69 * Initializes Git repository in current working directory.70 */71export function init(execFn = null) {72 const exec = execFn || execSync;73 return exec('git init');...

Full Screen

Full Screen

orderExec.0.1.js

Source:orderExec.0.1.js Github

copy

Full Screen

1//orderExec.0.1.js2;(function(win){3 var orderExec = function() {4 return new orderExec.fn.init();5 };6 orderExec.fn = orderExec.prototype = {7 constructor: orderExec,8 init: function() {9 this.orderExecfuns = [];10 this.orderExecSto = undefined;11 this.len = 0;12 this.orderExecfnNum = 0;13 this.time = 400;14 return this;15 },16 _add: function(callback) {17 callback = callback ? callback : function() {};18 this.orderExecfuns.push(function(fn) {19 callback();20 fn();21 });22 this.len += 1;23 return this;24 },25 add: function() {26 return this._add.apply(this,arguments);27 },28 sto: function(callback, time) {29 clearTimeout(this.orderExecSto);30 this.orderExecSto = setTimeout(callback, time);31 },32 defer: function(callback, time) {33 if (_$().isFunction(callback)) {34 time = time ? time : 600;35 }36 if (callback == undefined || _$().isNumeric(callback)) {37 time = callback ? callback : 600;38 }39 this.orderExecfuns.splice(this.len, 0, function() {40 var self = this;41 if (_$().isFunction(callback)) {42 callback();43 }44 self.sto(function() {45 self.goto((self.orderExecfnNum + 1 > self.len ? 0 : self.orderExecfnNum + 1), self.orderExecfnNext);46 }, time);47 });48 this.len += 1;49 return this;50 },51 orderExecfnNext: function(i) {52 if (i + 1 < this.len) {53 this.goto(i + 1, this.orderExecfnNext);54 }else{55 this.clear();56 }57 },58 fire: function() {59 if (this.len > 0) {60 this.goto(0, this.orderExecfnNext);61 }62 return this;63 },64 goto: function(i, callback) {65 var self = this;66 self.orderExecfnNum = i;67 self.sto(function() {68 if (self.len > 0) {69 if (self.orderExecfuns[i]) {70 self.orderExecfuns[i].call(self, function() {71 callback.call(self, i);72 });73 }74 }75 }, i==0 ? 0 : self.time);76 },77 clear: function() {78 this.orderExecfuns = [];79 this.len = 0;80 return this;81 }82 };83 orderExec.fn.init.prototype = orderExec.fn;84 win.orderExec = orderExec;...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1Cypress.Commands.add('execFn', { prevSubject: 'optional' }, (subject, fn) => {2 return cy.window().then(win => {3 return new Promise(resolve => {4 win.postMessage({ fn }, '*')5 window.addEventListener('message', function handler(e) {6 if (e.data.result) {7 window.removeEventListener('message', handler)8 resolve(e.data.result)9 }10 })11 })12 })13})14it('should execute a function in the browser context', () => {15 cy.get('.home-list > :nth-child(1) > a').then($el => {16 cy.execFn($el, el => {17 }).then(href => {18 })19 })20})21Cypress.on('window:before:load', win => {22 win.addEventListener('message', function handler(e) {23 if (e.data.fn) {24 const result = e.data.fn()25 win.postMessage({ result }, '*')26 }27 })28})

Full Screen

Using AI Code Generation

copy

Full Screen

1describe('My First Test', function() {2 it('Does not do much!', function() {3 cy.execFn('ls -la')4 })5})6Cypress.Commands.add('execFn', (command) => {7 cy.task('exec', command)8})9module.exports = (on, config) => {10 on('task', {11 exec(command) {12 return new Promise((resolve, reject) => {13 const exec = require('child_process').exec14 exec(command, (error, stdout, stderr) => {15 if (error) {16 reject(error)17 }18 resolve(stdout)19 })20 })21 }22 })23}24Cypress.Commands.add('execFn', (command) => {25 cy.task('exec', command)26})27return new Promise((resolve, reject) => {28 const exec = require('child_process').exec29 exec(command, (error, stdout, stderr) => {30 if (error) {31 reject(error)32 }33 resolve(stdout)34 })35 })36cy.execFn('ls -la')

Full Screen

Using AI Code Generation

copy

Full Screen

1Cypress.Commands.add('execFn', { prevSubject: 'optional' }, (subject, fn) => {2 if (subject) {3 return cy.wrap(subject).then(fn)4 } else {5 return cy.window().then(fn)6 }7})8Cypress.Commands.add('execFn', { prevSubject: 'optional' }, (subject, fn) => {9 if (subject) {10 return cy.wrap(subject).then(fn)11 } else {12 return cy.window().then(fn)13 }14})15Cypress.Commands.add('execFn', { prevSubject: 'optional' }, (subject, fn) => {16 if (subject) {17 return cy.wrap(subject).then(fn)18 } else {19 return cy.window().then(fn)20 }21})22Cypress.Commands.add('execFn', { prevSubject: 'optional' }, (subject, fn) => {23 if (subject) {24 return cy.wrap(subject).then(fn)25 } else {26 return cy.window().then(fn)27 }28})29Cypress.Commands.add('execFn', { prevSubject: 'optional' }, (subject, fn) => {30 if (subject) {31 return cy.wrap(subject).then(fn)32 } else {33 return cy.window().then(fn)34 }35})36Cypress.Commands.add('execFn', { prevSubject: 'optional' }, (subject, fn)

Full Screen

Using AI Code Generation

copy

Full Screen

1execFn('someFunction', 'someArgument');2Cypress.Commands.add('execFn', (fn, ...args) => {3 return cy.window().then(win => win[fn](...args));4});5module.exports = (on, config) => {6 on('task', {7 someFunction(arg) {8 return arg;9 },10 });11};12describe('Cypress', () => {13 it('should work', () => {14 cy.execFn('someFunction', 'someArgument').should('equal', 'someArgument');15 });16});17execFn('someFunction').should('equal', 'someArgument');18Cypress.Commands.add('execFn', (fn, ...args) => {19 return cy.window().then(win => win[fn](...args));20});21module.exports = (on, config) => {22 on('task', {23 someFunction(arg) {24 return arg;25 },26 });27};28describe('Cypress', () => {29 it('should work', () => {30 cy.execFn('someFunction').should('equal', 'someArgument');31 });32});33execFn('someFunction').should('equal', 'someArgument');

Full Screen

Using AI Code Generation

copy

Full Screen

1describe('Test', () => {2 it('Test', () => {3 cy.execFn(() => {4 console.log('Hello World');5 });6 });7});

Full Screen

Using AI Code Generation

copy

Full Screen

1cy.execFn(() => {2});3cy.execFn(() => {4}).then(result => {5});6const result = await cy.execFn(() => {7});8cy.execFn(() => {9}).then(result => {10}).catch(err => {11});12const result = await cy.execFn(() => {13}).catch(err => {14});15cy.execFn((a, b) => {16 return a + b;17}, {args: [10, 20]}).then(result => {18});19const result = await cy.execFn((a, b) => {20 return a + b;21}, {args: [10, 20]});22cy.execFn(() => {23}, {options: {timeout: 3000}}).then(result => {

Full Screen

Cypress Tutorial

Cypress is a renowned Javascript-based open-source, easy-to-use end-to-end testing framework primarily used for testing web applications. Cypress is a relatively new player in the automation testing space and has been gaining much traction lately, as evidenced by the number of Forks (2.7K) and Stars (42.1K) for the project. LambdaTest’s Cypress Tutorial covers step-by-step guides that will help you learn from the basics till you run automation tests on LambdaTest.

Chapters:

  1. What is Cypress? -
  2. Why Cypress? - Learn why Cypress might be a good choice for testing your web applications.
  3. Features of Cypress Testing - Learn about features that make Cypress a powerful and flexible tool for testing web applications.
  4. Cypress Drawbacks - Although Cypress has many strengths, it has a few limitations that you should be aware of.
  5. Cypress Architecture - Learn more about Cypress architecture and how it is designed to be run directly in the browser, i.e., it does not have any additional servers.
  6. Browsers Supported by Cypress - Cypress is built on top of the Electron browser, supporting all modern web browsers. Learn browsers that support Cypress.
  7. Selenium vs Cypress: A Detailed Comparison - Compare and explore some key differences in terms of their design and features.
  8. Cypress Learning: Best Practices - Take a deep dive into some of the best practices you should use to avoid anti-patterns in your automation tests.
  9. How To Run Cypress Tests on LambdaTest? - Set up a LambdaTest account, and now you are all set to learn how to run Cypress tests.

Certification

You can elevate your expertise with end-to-end testing using the Cypress automation framework and stay one step ahead in your career by earning a Cypress certification. Check out our Cypress 101 Certification.

YouTube

Watch this 3 hours of complete tutorial to learn the basics of Cypress and various Cypress commands with the Cypress testing at LambdaTest.

Run Cypress automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful