"use strict";var debugit=!1,strongController={grids:{},iframes:{},defaults:{initializeOn:"windowLoad",method:"",universalTimer:500,observerTimer:500,containerId:"page",addedNodeId:"content",event:"",script:"",debug:!1},config:{},setup:function(a){a.universalTimer=parseInt(a.universalTimer),a.observerTimer=parseInt(a.observerTimer),a.debug=!!a.debug,debugit=a.debug,this.config=jQuery.extend({},this.defaults,a)},mutationObserver:window.MutationObserver||window.WebKitMutationObserver,eventListenerSupported:window.addEventListener,checkInit:function(){return jQuery('.strong-view[data-state="idle"]').length},initSliders:function(){var a=jQuery('.strong-view.slider-container[data-state="idle"]');debugit&&console.log("sliders found:",a.length),a.length&&a.each(function(){var a=jQuery(this),b=a.data("count");(void 0===b||1!==b)&&a.strongSlider()})},initPagers:function(){var a=jQuery('.strong-pager[data-state="idle"]');debugit&&console.log("pagers found:",a.length),a.length&&a.each(function(){jQuery(this).strongPager()})},initLayouts:function(){this.grids=jQuery('.strong-view[data-state="idle"] .strong-masonry'),debugit&&console.log("Masonry found:",this.grids.length),this.grids.length&&(this.grids.prepend('
'),this.grids.imagesLoaded(function(){strongController.grids.masonry({columnWidth:".grid-sizer",gutter:".gutter-sizer",itemSelector:".wpmtst-testimonial",percentPosition:!0}),strongController.grids.closest(".strong-view").attr("data-state","init")}))},initForm:function(){var a=jQuery('.strong-form[data-state="idle"]'),b=jQuery(".wpmtst-testimonial-success");debugit&&console.log("forms found:",a.length),debugit&&console.log("messages found:",b.length),(a.length||b.length)&&strongValidation.init()},initIframes:function(){this.iframes=jQuery("iframe")},customEvents:function(){addEventListener("toggleFullContent",function(a){strongController.grids.length&&strongController.grids.masonry()})},observer:function(a,b){if(this.mutationObserver){var c=new this.mutationObserver(function(a){for(var c=0;c checkInit",strongController.checkInit()),strongController.checkInit()&&strongController.start()},strongController.config.universalTimer)},newTimeout:function(){strongController.timeoutId=setTimeout(function(){debugit&&console.log("tick > checkInit",strongController.checkInit()),strongController.checkInit()&&strongController.start()},strongController.config.observerTimer)},init:function(){debugit&&console.log("strongController init");var a={};"undefined"!=typeof window.strongControllerParms?a=window.strongControllerParms:debugit&&console.log("settings not found"),this.setup(a),debugit&&console.log("config",this.config),"documentReady"===this.config.initializeOn?jQuery(document).ready(function(){debugit&&console.log("document ready"),strongController.start(),strongController.listen()}):jQuery(window).on("load",function(){debugit&&console.log("window load"),strongController.start(),strongController.listen()}),jQuery(window).on("load",function(){strongController.listenForIframeReady()}),jQuery("textarea.max-length, input.text.max-length").keyup(function(){var a=jQuery(this).attr("maxlength"),b=jQuery(this).val().length;null!==a&&jQuery(this).parent().find(".max-length-counter").html(b+" characters out of "+a)})},start:function(){debugit&&console.log("start"),strongController.initSliders(),strongController.initPagers(),strongController.initLayouts(),strongController.initForm(),strongController.initIframes(),strongController.customEvents()},listen:function(){switch(debugit&&console.log("listen"),this.config.method){case"universal":this.newInterval();break;case"observer":this.observer(document.getElementById(this.config.containerId),this.newTimeout);break;case"event":document.addEventListener(this.config.event,this.start);break;case"script":switch(this.config.script){case"barba":"object"==typeof Barba&&Barba.hasOwnProperty("Dispatcher")&&Barba.Dispatcher.on("transitionCompleted",this.start)}}},listenForIframeReady:function(){debugit&&console.log("listenForIframeReady"),strongController.iframes.length&&strongController.grids.length?strongController.iframes.ready(function(){setTimeout(function(){strongController.grids.masonry(),debugit&&console.log("listenForIframeReady","timeout 1")},1e3),setTimeout(function(){strongController.grids.masonry(),debugit&&console.log("listenForIframeReady","timeout 2")},2e3)}):debugit&&console.log("listenForIframeReady","no iframes or Masonry found")}};strongController.init();