// source --> https://powerbank-personnalise.fr/wp-content/plugins/smart-slider-3/Public/SmartSlider3/Application/Frontend/Assets/dist/n2.min.js?ver=821e0c40
function N2Deferred(){this.state=0,this.args=null,this.callbacks=[]}function NextendThrottle(i,r){var s,o;return r||(r=250),function(){var t=this,e=+new Date,n=arguments;s&&e>6|192):(e+=String.fromCharCode(i>>12|224),e+=String.fromCharCode(i>>6&63|128)),e+=String.fromCharCode(63&i|128))}return e}(t);h>2,s=(3&e)<<4|(n=t.charCodeAt(h++))>>4,o=(15&n)<<2|(i=t.charCodeAt(h++))>>6,a=63&i,isNaN(n)?o=a=64:isNaN(i)&&(a=64),c=c+this._keyStr.charAt(r)+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(a);return c},decode:function(t){var e,n,i,r,s,o,a="",c=0;for(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");c>4,n=(15&r)<<4|(s=this._keyStr.indexOf(t.charAt(c++)))>>2,i=(3&s)<<6|(o=this._keyStr.indexOf(t.charAt(c++))),a+=String.fromCharCode(e),64!=s&&(a+=String.fromCharCode(n)),64!=o&&(a+=String.fromCharCode(i));return a=function(t){for(var e="",n=0,i=c1=c2=0;nn.clickTolerance||Math.abs(c.y)>n.clickTolerance)&&(l=!1),i===b&&2!==s&&(i=Math.abs(c.x)this._duration&&(this._duration=i),this.makeCache()},t.prototype.clear=function(){this.paused()||this.pause(),t.call(this,this.originalParams)},t.prototype.add=function(t,e){this.addTween(t,e)},t.prototype.set=function(t,e,n){this.addTween(NextendTween.to(t,.05,e),n)},t.prototype.to=function(t,e,n,i){n.paused=!0,this.addTween(NextendTween.to(t,e,n),i)},t.prototype.fromTo=function(t,e,n,i,r){i.paused=!0,this.addTween(NextendTween.fromTo(t,e,n,i),r)},t.prototype.from=function(t,e,n,i){n.paused=!0,this.addTween(NextendTween.from(t,e,n),i)},t.prototype._play=function(){if(0==this._progress)for(var t=0;t https://powerbank-personnalise.fr/wp-content/plugins/smart-slider-3/Public/SmartSlider3/Application/Admin/Assets/dist/smartslider-backend.min.js?ver=821e0c40
(function(){var t=this;t.N2_=t.N2_||{r:[],d:[]},t.N2R=t.N2R||function(){t.N2_.r.push(arguments)},t.N2D=t.N2D||function(){t.N2_.d.push(arguments)}}).call(window),N2R("$",function(s,t,n){window.nextend=window.nextend||{},s.extend(window.nextend,{animationManager:null,browse:null}),window.n2_=function(t){return nextend.localization[t]!==n?nextend.localization[t]:t},window.n2_sprintf=function(t){var e=arguments,i=1;return t.replace(/%s/g,function(){return e[i++]})},window.nextendtime=s.now(),window.nextend.roundTo=5,window.nextend.roundHelper=function(t){return window.nextend.roundTo<=1?t:Math.round(t/window.nextend.roundTo)*window.nextend.roundTo},s.fn.n2opener=function(){return this.each(function(){console.error("deprecated $.fn.n2opener");var e=s(this).on("click",function(t){e.toggleClass("n2-active")});e.siblings("span").on("click",function(t){e.toggleClass("n2-active")}),e.parent().on("mouseleave",function(){e.removeClass("n2-active")}),e.find(".n2-button-menu").on("click",function(t){t.stopPropagation(),e.removeClass("n2-active")})})},jQuery!==n&&jQuery(document).on("wp-collapse-menu",function(){s(window).trigger("resize")}),nextend.deepDiff={map:function(t,e){if(this.isValue(t))return t!==n&&t!=e?t:n;for(var i in e)this.isFunction(e[i])||(t[i]=this.map(t[i],e[i]),(t[i]===n||s.isPlainObject(t[i])&&s.isEmptyObject(t[i])||this.isArray(t[i])&&0==t[i].length)&&delete t[i]);return t},isFunction:function(t){return"[object Function]"==={}.toString.apply(t)},isArray:function(t){return"[object Array]"==={}.toString.apply(t)},isObject:function(t){return"[object Object]"==={}.toString.apply(t)},isValue:function(t){return!this.isObject(t)&&!this.isArray(t)}},nextend.UnicodeToHTMLEntity=function(e){try{var t,i=/(?:[\uD800-\uDBFF][\uDC00-\uDFFF])/g;function s(t){for(var e,i,s,n=[],o=0;owindow.innerHeight&&(s=this.getYAbove(t,e),n=3),this.$content.css({transform:"translate("+Math.round(i)+"px, "+Math.round(s)+"px)"}),this.$exit.css({order:String(n),height:t.height+5+"px"})},e.prototype.getXLeft=function(t,e){return t.x},e.prototype.getXRight=function(t,e){return t.x-e.width+t.width},e.prototype.getYAbove=function(t,e){return t.y-e.height-5},e.prototype.getYBelow=function(t,e){return t.y},e.prototype.show=function(t){t&&t.preventDefault(),this.lazyLoad(),this.options.relatedclass&&(this.$related=this.$container.closest("."+this.options.relatedclass),this.$related.addClass(this.options.relatedclass+"--popover-visible")),this.$content.addClass("n2_popover_content--visible").on("mouseleave",this.hide.bind(this)),this.position(),window.addEventListener("scroll",this.positionCallback,{capture:!0,passive:!0})},e.prototype.hide=function(t){this.$related&&(this.$related.removeClass(this.options.relatedclass+"--popover-visible"),delete this.$related),this.$content.off("mouseleave").removeClass("n2_popover_content--visible"),window.removeEventListener("scroll",this.positionCallback,{capture:!0,passive:!0})},e.prototype.setStates=function(i){this.$content.find("a[data-state]").each(function(){var t=s(this),e=t.data("state").match(/^(!)?(.*)$/);"!"===e[1]?t.toggleClass("n2_floating_menu__item--has-state",!i[e[2]]):t.toggleClass("n2_floating_menu__item--has-state",i[e[2]])})},s.fn.nextendPopover=function(){return this.each(function(){var t=s(this);t.data("popover",new e(t))})},e}),N2D("NextendHeadingPane",function(r,t){function e(t,e,i,s){this.$node=t.data("pane",this),this.headings=e,this.contents=i,this.tabNames=[],this.headings.each(function(t,e){this.tabNames.push(r(e).data("tab"))}.bind(this)),this.identifier=s,this._active=e.index(e.filter(".n2-active"));for(var n=0;n
').appendTo("body")});var o={startLoading:function(){s&&clearTimeout(s),n=e.now(),i.addClass("n2_loading_screen--visible")},stopLoading:function(){var t=e.now()-n;300<=t?i.removeClass("n2_loading_screen--visible"):s=setTimeout(function(){i.removeClass("n2_loading_screen--visible")},300-t)}};return o}),N2D("AjaxHelper",function(e,o){function r(){}r.query={};var i={};return r.addAdminUrl=function(t,e){i[t]=e},r.getAdminUrl=function(t){return i[t]},r.addAjaxArray=function(t){for(var e in t)r.query[e]=t[e]},r.makeAjaxUrl=function(t,e){var i=t.split("?");i.length<2&&(i[1]="");var s=N2Classes.N2QueryString.parse(i[1]);if(e!==o)for(var n in e)s[n]=e[n];for(var n in r.query)s[n]=r.query[n];return N2Classes.N2QueryString.add_query_arg(s,i[0])},r.ajax=function(t){return N2Classes.LoadingScreen.startLoading(),t.data=t.data||{},e.ajax(t).always(function(e,t){N2Classes.LoadingScreen.stopLoading();try{if("success"!==t?e=JSON.parse(e.responseText):"string"==typeof e&&(e=JSON.parse(e)),e.redirect!==o)return N2Classes.LoadingScreen.startLoading(),void(window.location.href=e.redirect);r.notification(e)}catch(t){var i=/]*>((.|[\n\r])*)<\/body>/im.exec(e.responseText);i?N2Classes.ModalSafeHTML(i[1]):console.error(e.responseText,e)}})},r.notification=function(t){if(t.notification!==o&&t.notification)for(var e in t.notification)for(var i=0;i'),this.timeout=null,this.$tipFor=null,e(window).ready(this.ready.bind(this))}function i(){this.isVisible=!1,this.$body=e("body"),this.$element=e('
').appendTo(this.$body)}return t.prototype.ready=function(){this.$element.appendTo("body"),this.add(e("body"))},t.prototype.add=function(t){t.find("[data-n2tip]").off(".n2hastip").on({"mouseenter.n2hastip":this.onEnter.bind(this)})},t.prototype.addElement=function(t,e,i,s){t.data({n2tip:e,n2tipv:s,n2tiph:i}).off(".n2hastip").on({"mouseenter.n2hastip":this.onEnter.bind(this)})},t.prototype.removeElement=function(t){t.off(".n2hastip")},t.prototype.hide=function(){this.onLeave()},t.prototype.onEnter=function(t){this.lastE=t,this.timeout&&clearTimeout(this.timeout),this.$tipFor=e(t.currentTarget).on({"mousemove.n2tip":this.onMove.bind(this),"mouseleave.n2tip":this.onLeave.bind(this)}),this.timeout=setTimeout(function(){var t=this.$tipFor.data("n2tipv"),e=this.$tipFor.data("n2tiph");t===s&&(t=10),e===s&&(e=10);var i=this.$tipFor.data("n2tip");"function"==typeof i&&(i=i.call()),this.$element.css({margin:t+"px "+e+"px"}).html(i).addClass("n2_tooltip--active"),this.onMove(this.lastE)}.bind(this),500)},t.prototype.onMove=function(t){this.lastE=t,this.$element.css({left:Math.min(t.clientX,window.innerWidth-this.$element.outerWidth()-30)+"px",top:Math.min(t.clientY,window.innerHeight-this.$element.height()-20)+"px"})},t.prototype.onLeave=function(){this.timeout&&clearTimeout(this.timeout),this.$tipFor&&(this.$tipFor.off(".n2tip"),this.$tipFor=null,this.$element.removeClass("n2_tooltip--active").css("margin",""))},i.prototype.show=function(t,e){this.isVisible?this.$element.html(t):(this.isVisible=!0,this.$body.on("mousemove.tooltipMouse",this.mouseMove.bind(this)),this.mouseMove(e),this.$element.html(t).addClass("n2_tooltip--active"))},i.prototype.mouseMove=function(t){this.$element.css({left:Math.min(t.clientX+10,window.innerWidth-this.$element.outerWidth()-32)+"px",top:Math.min(t.clientY+10,window.innerHeight-this.$element.height()-40)+"px"})},i.prototype.hide=function(){this.$body.off("mousemove.tooltipMouse"),this.$element.removeClass("n2_tooltip--active").html(""),this.isVisible=!1},nextend.tooltip=new t,e(window).ready(function(){nextend.tooltipMouse=new i}),nextend.tooltip}),N2D("FormTipManager",function(e,t){var i=1;function s(t){this.$el=t,this.id=i++,this.isVisible=!1,this.$tip=!1,this.ui="el",this.$el.on({"mouseenter.formTip":this.onMouseEnter.bind(this),"mouseleave.formTip":this.onMouseLeave.bind(this)})}s.prototype.onMouseEnter=function(){this.mouseLeaveTimeout&&clearTimeout(this.mouseLeaveTimeout),this.mouseEnterTimeout=setTimeout(this.onMouseEnterTimeout.bind(this),300)},s.prototype.onMouseEnterTimeout=function(){delete this.mouseEnterTimeout,this.isVisible||(this.ui="el",this.show(),this.isVisible=!0)},s.prototype.onMouseLeave=function(){this.mouseEnterTimeout&&clearTimeout(this.mouseEnterTimeout),this.mouseLeaveTimeout=setTimeout(this.onMouseLeaveTimeout.bind(this),300)},s.prototype.onMouseLeaveTimeout=function(){delete this.mouseLeaveTimeout,this.isVisible&&"el"===this.ui&&this.hide()},s.prototype.show=function(){!1===this.$tip&&this.buildTip(),this.$tip.addClass("n2_form_tip--visible"),e(window).on("scroll.formTip"+this.id,this.positionTip.bind(this)).on("resize.formTip"+this.id,this.positionTip.bind(this)),this.positionTip()},s.prototype.hide=function(){e(window).off(".formTip"+this.id),this.$tip.removeClass("n2_form_tip--visible"),this.isVisible=!1},s.prototype.stopPropagation=function(t){t.stopPropagation()},s.prototype.buildTip=function(){this.$tip=e('
').on({mouseenter:this.onTipMouseEnter.bind(this),mouseleave:this.onTipMouseLeave.bind(this),mousedown:this.stopPropagation.bind(this),mouseup:this.stopPropagation.bind(this),click:this.stopPropagation.bind(this)}).appendTo("body"),e('
').appendTo(this.$tip);var t=e('
').appendTo(this.$tip);this.$el.data("tip-label")&&e('
').text(this.$el.data("tip-label")).appendTo(t),this.$description=e('
').html(this.$el.data("tip-description")).appendTo(t),this.$el.data("tip-link")&&e(''+n2_("Open docs")+" ").appendTo(t)},s.prototype.setDescription=function(t){this.$description?this.$description.html(t):this.$el.data("tip-description",t)},s.prototype.onTipMouseEnter=function(){this.ui="tip"},s.prototype.onTipMouseLeave=function(){this.hide()},s.prototype.positionTip=function(){this.$tip.css({left:"0",top:"0"});var t,e,i,s=window.innerWidth,n=(window.innerHeight,this.$el[0].getBoundingClientRect()),o=this.$tip[0].getBoundingClientRect(),r={left:"0",top:"0"};i=n2const.rtl.isRtl?n.left>o.width:s-n.lefto.height?(e="bottom",r.top=n.top-o.height+"px"):(e="top",r.top=n.top+n.height+"px"),this.$tip.attr("data-position-horizontal",t).attr("data-position-vertical",e).css(r)};var n={add:function(t){t.find("[data-tip-description]").each(function(){var t=e(this);t.data("formTip")||t.data("formTip",new s(t))})}};return N2R("windowLoad",function(){n.add(e("body"))}),n}),window.N2Color={hex2rgba:function(t){6===t.length&&(t+="ff");var e=parseInt(t,16);return[e>>24&255,e>>16&255,e>>8&255,(255&e)/255]},hex2rgbaCSS:function(t){return"RGBA("+N2Color.hex2rgba(t).join(",")+")"},hexdec:function(t){return t=(t+"").replace(/[^a-f0-9]/gi,""),parseInt(t,16)},hex2alpha:function(t){return 8!==t.length?1:((255&parseInt(t,16))/255).toFixed(3)},colorizeSVG:function(t,e){var i=t.split("base64,");return 1===i.length?t:(i[1]=N2Classes.Base64.encode(N2Classes.Base64.decode(i[1]).replace('fill="#FFF"','fill="#'+e.substr(0,6)+'"').replace('opacity="1"','opacity="'+N2Color.hex2alpha(e)+'"')),i.join("base64,"))},colorToSVG:function(t){var e=parseInt(t,16);return[t.substr(0,6),(255&e)/255]}},N2D("N2QueryString",function(t,o){"use strict";return{parse:function(t){return"string"!=typeof t?{}:(t=t.trim().replace(/^(\?|#)/,""))?t.trim().split("&").reduce(function(t,e){var i=e.replace(/\+/g," ").split("="),s=i[0],n=i[1];return s=decodeURIComponent(s),n=n===o?null:decodeURIComponent(n),t.hasOwnProperty(s)?Array.isArray(t[s])?t[s].push(n):t[s]=[t[s],n]:t[s]=n,t},{}):{}},stringify:function(i){return i?Object.keys(i).map(function(e){var t=i[e];return Array.isArray(t)?t.map(function(t){return encodeURIComponent(e)+"[]="+encodeURIComponent(t)}).join("&"):encodeURIComponent(e)+"="+encodeURIComponent(t)}).join("&"):""},add_query_arg:function(t,e){var i=e.split("?");i.length<2&&(i[1]="");var s=this.parse(i[1]);for(var n in t)t.hasOwnProperty(n)&&(s[n]=t[n]);return i[0]+"?"+this.stringify(s)}}}),function(t){var n=[],o=[],r=[],a=[],l="0123456789abcdef".split(""),h=[],d=[],c=!1,p=0,u=0,f=[];if(t.Int32Array)o=new Int32Array(16),r=new Int32Array(16),a=new Int32Array(4),h=new Int32Array(4),d=new Int32Array(4),f=new Int32Array(4);else{var e;for(e=0;e<16;e++)o[e]=r[e]=0;for(e=0;e<4;e++)a[e]=h[e]=d[e]=f[e]=0}function g(t){for(var e=16;e--;){var i=e<<2;r[e]=t.charCodeAt(i)+(t.charCodeAt(1+i)<<8)+(t.charCodeAt(2+i)<<16)+(t.charCodeAt(3+i)<<24)}}function y(t,e,i,s,n,o,r){return((e+=t+s+r)<>>o)+i<<0}function m(t){i(0,0,0,0,t),d[0]=f[0]+1732584193<<0,d[1]=f[1]-271733879<<0,d[2]=f[2]-1732584194<<0,d[3]=f[3]+271733878<<0}function v(t){i(d[0],d[1],d[2],d[3],t),d[0]=f[0]+d[0]<<0,d[1]=f[1]+d[1]<<0,d[2]=f[2]+d[2]<<0,d[3]=f[3]+d[3]<<0}function i(t,e,i,s,n){var o,r;e=y((s=y((e=y((s=y((e=y((s=y((e=y((s=y((e=y((r=(s=y((o=(e=y((r=(s=y((o=(e=y((r=(s=y((o=(e=y((r=(s=y((o=(e=y(((i=y(((s=y(((t=y(((e=y(((i=y(((s=y(((t=y(((e=y(((i=y(((s=y(((t=y(((e=y(((i=y(((s=y(((t=y(((e=y(((s=y(((e=y(((s=y(((e=y(((s=y(((e=c?y(((s=y((e^i)&(t=y((i^s)&e^s,t,e,n[0],7,25,-680876936))^i,s,t,n[1],12,20,-389564586))^t)&(i=y((t^e)&s^e,i,s,n[2],17,15,606105819))^t,e,i,n[3],22,10,-1044525330):(t=((t=n[0]-680876937)<<7|t>>>25)-271733879<<0,s=((s=n[1]-117830708+(2004318071&t^-1732584194))<<12|s>>>20)+t<<0,i=((i=n[2]-1126478375+((-271733879^t)&s^-271733879))<<17|i>>>15)+s<<0,((e=n[3]-1316259209+((s^t)&i^t))<<22|e>>>10)+i<<0))^i)&(t=y((i^s)&e^s,t,e,n[4],7,25,-176418897))^i,s,t,n[5],12,20,1200080426))^t)&(i=y((t^e)&s^e,i,s,n[6],17,15,-1473231341))^t,e,i,n[7],22,10,-45705983))^i)&(t=y((i^s)&e^s,t,e,n[8],7,25,1770035416))^i,s,t,n[9],12,20,-1958414417))^t)&(i=y((t^e)&s^e,i,s,n[10],17,15,-42063))^t,e,i,n[11],22,10,-1990404162))^i)&(t=y((i^s)&e^s,t,e,n[12],7,25,1804603682))^i,s,t,n[13],12,20,-40341101))^t)&(i=y((t^e)&s^e,i,s,n[14],17,15,-1502002290))^t,e,i,n[15],22,10,1236535329))^i)&s^i,t,e,n[1],5,27,-165796510))^e)&i^e,s,t,n[6],9,23,-1069501632))^t)&e^t,i,s,n[11],14,18,643717713))^s)&t^s,e,i,n[0],20,12,-373897302))^i)&s^i,t,e,n[5],5,27,-701558691))^e)&i^e,s,t,n[10],9,23,38016083))^t)&e^t,i,s,n[15],14,18,-660478335))^s)&t^s,e,i,n[4],20,12,-405537848))^i)&s^i,t,e,n[9],5,27,568446438))^e)&i^e,s,t,n[14],9,23,-1019803690))^t)&e^t,i,s,n[3],14,18,-187363961))^s)&t^s,e,i,n[8],20,12,1163531501))^i)&s^i,t,e,n[13],5,27,-1444681467))^e)&i^e,s,t,n[2],9,23,-51403784))^t)&e^t,i,s,n[7],14,18,1735328473))^s)&t^s,e,i,n[12],20,12,-1926607734))^i)^(t=y(o^s,t,e,n[5],4,28,-378558)),s,t,n[8],11,21,-2022574463))^t)^(i=y(r^e,i,s,n[11],16,16,1839030562)),e,i,n[14],23,9,-35309556))^i)^(t=y(o^s,t,e,n[1],4,28,-1530992060)),s,t,n[4],11,21,1272893353))^t)^(i=y(r^e,i,s,n[7],16,16,-155497632)),e,i,n[10],23,9,-1094730640))^i)^(t=y(o^s,t,e,n[13],4,28,681279174)),s,t,n[0],11,21,-358537222))^t)^(i=y(r^e,i,s,n[3],16,16,-722521979)),e,i,n[6],23,9,76029189))^i)^(t=y(o^s,t,e,n[9],4,28,-640364487)),s,t,n[12],11,21,-421815835))^t)^(i=y(r^e,i,s,n[15],16,16,530742520)),e,i,n[2],23,9,-995338651))^((t=y(i^(e|~s),t,e,n[0],6,26,-198630844))|~i),s,t,n[7],10,22,1126891415))^((i=y(t^(s|~e),i,s,n[14],15,17,-1416354905))|~t),e,i,n[5],21,11,-57434055))^((t=y(i^(e|~s),t,e,n[12],6,26,1700485571))|~i),s,t,n[3],10,22,-1894986606))^((i=y(t^(s|~e),i,s,n[10],15,17,-1051523))|~t),e,i,n[1],21,11,-2054922799))^((t=y(i^(e|~s),t,e,n[8],6,26,1873313359))|~i),s,t,n[15],10,22,-30611744))^((i=y(t^(s|~e),i,s,n[6],15,17,-1560198380))|~t),e,i,n[13],21,11,1309151649))^((t=y(i^(e|~s),t,e,n[4],6,26,-145523070))|~i),s,t,n[11],10,22,-1120210379))^((i=y(t^(s|~e),i,s,n[2],15,17,718787259))|~t),e,i,n[9],21,11,-343485551),f[0]=t,f[1]=e,f[2]=i,f[3]=s}a[0]=128,a[1]=32768,a[2]=8388608,a[3]=-2147483648,h[0]=0,h[1]=8,h[2]=16,h[3]=24,t.md5=t.md5||function(t,e,i){!function(t){var e,i;if(c=!1,p=u=(t+="").length,63>2]=t.charCodeAt(e):o[e>>2]|=t.charCodeAt(e)<>2]|=a[e%4],55>6|192,63&o|128):String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128),end>i&&(e+=t.slice(i,end)),e+=enc,i=end=s+1)}return end>i&&(e+=t.slice(i,n)),e}(t));var s=d[0];return n[1]=l[15&s],n[0]=l[15&(s>>=4)],n[3]=l[15&(s>>=4)],n[2]=l[15&(s>>=4)],n[5]=l[15&(s>>=4)],n[4]=l[15&(s>>=4)],n[7]=l[15&(s>>=4)],n[6]=l[15&(s>>=4)],s=d[1],n[9]=l[15&s],n[8]=l[15&(s>>=4)],n[11]=l[15&(s>>=4)],n[10]=l[15&(s>>=4)],n[13]=l[15&(s>>=4)],n[12]=l[15&(s>>=4)],n[15]=l[15&(s>>=4)],n[14]=l[15&(s>>=4)],s=d[2],n[17]=l[15&s],n[16]=l[15&(s>>=4)],n[19]=l[15&(s>>=4)],n[18]=l[15&(s>>=4)],n[21]=l[15&(s>>=4)],n[20]=l[15&(s>>=4)],n[23]=l[15&(s>>=4)],n[22]=l[15&(s>>=4)],s=d[3],n[25]=l[15&s],n[24]=l[15&(s>>=4)],n[27]=l[15&(s>>=4)],n[26]=l[15&(s>>=4)],n[29]=l[15&(s>>=4)],n[28]=l[15&(s>>=4)],n[31]=l[15&(s>>=4)],n[30]=l[15&(s>>=4)],i?n:n.join("")}}(window),N2D("CssInjection",function(t,e){function i(t,e){this.baseClassName=t;var i=document.body;this.style=document.createElement("style"),this.style.setAttribute("data-base-class-name",t),this.style.setAttribute("type","text/css"),this.style.styleSheet?this.style.styleSheet.cssText=e:this.style.appendChild(document.createTextNode(e)),i.appendChild(this.style)}return i.prototype.getBaseClassName=function(){return this.baseClassName},i.prototype.destroy=function(){this.style.parentNode.removeChild(this.style)},i}),N2D("NextendCSS",function(t,e){function i(){this.style=""}return i.prototype.add=function(t,e){return new N2Classes.CssInjection(t,e)},i.prototype.deleteRule=function(t){for(var e=t.toLowerCase(),i=e.replace(".","\\."),s=document.styleSheets.length-1;0<=s;s--)for(var n=this._getRulesArray(s),o=0;n&&o').appendTo("body"),this.options.hasClose&&s('
').on("click",this.hide.bind(this)).appendTo(this.$modal),this.$modalWindow=s('
').appendTo(this.$modal),!1!==this.options.width&&this.$modalWindow.css("width",this.options.width+"px"),this.renderModal()}return i.counter=0,i.prototype.renderModal=function(){},i.prototype.show=function(){document.activeElement&&document.activeElement!==document.body&&document.activeElement.blur(),N2Classes.WindowManager.addWindow("modal"),this.options.hasClose&&N2Classes.Esc.add(function(){return this.hide("esc"),!0}.bind(this)),this.$modal.addClass("n2_modal--visible")},i.prototype.hide=function(t){N2Classes.WindowManager.removeWindow(),"esc"!==t&&(N2Classes.Esc.pop(),t&&t.preventDefault()),this.$modal.removeClass("n2_modal--visible"),this.options.destroyOnHide&&this.$modal.remove(),document.activeElement&&document.activeElement!==document.body&&document.activeElement.blur()},i.prototype.getBody=function(){return this.$modalBody},i.prototype.addContent=function(t){t.appendTo(this.$modalBody)},i.prototype.clearButtons=function(){for(var t in this.buttons)this.buttons[t].remove();this.buttons=[],this.$modalButtons.html("").attr("data-buttons",0)},i.prototype.addButton=function(t,e){e=e||!1;var i=s('
').append(t);return e?i.prependTo(this.$modalButtons):i.appendTo(this.$modalButtons),this.buttons.push(i),this.$modalButtons.attr("data-buttons",this.buttons.length),i},i}),N2D("ModalDeleteConfirm",function(s,t){function n(t,e){var i=new N2Classes.ModalSimple("delete",{destroyOnHide:!0});i.addContent(N2Classes.UI.modalIcon("ssi_48 ssi_48--delete","red")),i.addContent(N2Classes.UI.modalHeading(n2_("Are you sure?"))),i.addContent(N2Classes.UI.modalParagraphHTML(n2_sprintf("You're about to %s. ",t)+n2_sprintf("The deletion is irreversible, and it's not possible to recover %s.",t)).css("margin-bottom","19px"));var s=N2Classes.UI.modalButton(n2_("Cancel"),"grey").on("click",function(t){t.preventDefault(),i.hide()});i.addButton(s);var n=N2Classes.UI.modalButton(n2_("Delete"),"red").on("click",function(t){t.preventDefault(),e(),i.hide(t)});i.addButton(n),i.show()}return n.href=function(t,e,i){t.preventDefault(),n(i,function(){window.location.href=s(e).attr("href")})},n}),N2D("ModalIframe","AbstractModal",function(i,t){function e(t,e){N2Classes.AbstractModal.prototype.constructor.call(this,t,i.extend({},e))}return((e.prototype=Object.create(N2Classes.AbstractModal.prototype)).constructor=e).prototype.renderModal=function(){this.$modal.addClass("n2_modal--iframe"),this.$frame=i('').appendTo(this.$modalWindow)},e.prototype.setSrc=function(t){this.$frame.attr("src",t)},e.prototype.hide=function(t){N2Classes.AbstractModal.prototype.hide.call(this,t),this.$frame.attr("src","about:blank")},e}),N2D("ModalLightbox","AbstractModal",function(s,t){function e(t,e,i){this.title=t,N2Classes.AbstractModal.prototype.constructor.call(this,e,s.extend({},i))}return((e.prototype=Object.create(N2Classes.AbstractModal.prototype)).constructor=e).prototype.renderModal=function(){if(this.$modal.addClass("n2_modal--lightbox"),this.$modalTopBar=s('
').appendTo(this.$modalWindow),this.$title=s('
').text(this.title).appendTo(this.$modalTopBar),this.$modalButtons=s('
').appendTo(this.$modalTopBar),this.options.hasClose){var t=N2Classes.UI.modalButton(n2_("Close"),"grey-dark").on("click",this.hide.bind(this));this.addButton(t)}this.$modalBody=s('
').appendTo(this.$modalWindow)},e.prototype.setTitle=function(t){this.title=t,this.$title.text(t)},e}),N2D("ModalSimple","AbstractModal",function(i,t){function e(t,e){N2Classes.AbstractModal.prototype.constructor.call(this,t,i.extend({width:500},e))}return((e.prototype=Object.create(N2Classes.AbstractModal.prototype)).constructor=e).prototype.renderModal=function(){if(this.$modal.addClass("n2_modal--simple"),this.$modalBodyOuter=i('
').appendTo(this.$modalWindow),this.options.hasClose){var t=i('
').appendTo(this.$modalBodyOuter);i('
').on("click",this.hide.bind(this)).appendTo(t)}this.$modalBody=i('
').appendTo(this.$modalBodyOuter),this.$modalButtons=i('
').appendTo(this.$modalWindow)},e}),N2D("PreviewPopup",function(t,e){return function(t,e){var i=["height="+screen.availHeight,"width="+screen.availWidth,"toolbar=yes,scrollbars=yes,resizable=yes"].join(","),s=window.open(t,e,i);return s.moveTo(0,0),s.resizeTo(screen.availWidth,screen.availHeight),s}}),N2D("ModalGeneratorRecordViewer",function(r,t){return function(t,e){this.createRecordModal=new N2Classes.ModalSimple("generator-record-viewer",{width:1e3,destroyOnHide:!0}),this.createRecordModal.addContent(N2Classes.UI.modalIcon("ssi_48 ssi_48--data","blue")),this.createRecordModal.addContent(N2Classes.UI.modalHeading(n2_("Records"))),function(t,e,i){var s=r('
').css("grid-template-columns","40px repeat("+(e.length-1)+", auto)").appendTo(t),n=0;for(r('
').text(e[n]).appendTo(s),n=1;n').text(e[n]).appendTo(s);for(n=0;n').text(i[n][o]).appendTo(s),o=1;o').html(i[n][o]).appendTo(s)}}(this.createRecordModal.getBody(),t,e),this.createRecordModal.show()}}),N2D("ModalHotkey",function(g,t){function e(){var t=this.getHotkeys();this.modal=new N2Classes.ModalSimple("hotkey",{width:800}),this.modal.addContent(N2Classes.UI.modalIcon("ssi_48 ssi_48--keyboard","blue")),this.modal.addContent(N2Classes.UI.modalHeading(n2_("Keyboard shortcuts")));var e=g('
');this.modal.addContent(e);for(var i=0;i').appendTo(e),n=0;n').appendTo(s);g(''+o+"
").appendTo(a);for(var l=0;l').appendTo(a),d=r[l][0];g(''+d+"
").appendTo(h);for(var c=g('
').appendTo(h),p=r[l][1],u=0;u'+p[u]+"").appendTo(c)}}var f=N2Classes.UI.modalButton(n2_("Got it"),"blue");this.modal.addButton(f),f.on("click",function(t){this.modal.hide()}.bind(this))}e.prototype.getHotkeys=function(){var t="ctrl",e=[],i=[];this.isMac()&&(t="cmd");var s=[n2_("General"),[[n2_("Content tab"),["q"]],[n2_("Style tab"),["w"]]]];e.push(s),s[1].push([n2_("Add Layer"),["a"]],[n2_("Layer List"),["s"]]);var n=[n2_("View"),[[n2_("Preview"),[t,"1"]],[n2_("Desktop"),[t,"2"]],[n2_("Tablet"),[t,"3"]],[n2_("Mobile"),[t,"4"]]]];e.push(n);var o=[n2_("Adjust"),[[n2_("Move (Absolute)"),[n2_("Arrows")]],[n2_("Align (Absolute)"),[n2_("Numeric keys")]]]];e.push(o);var r=[n2_("Action"),[[n2_("Delete"),["del"]],[n2_("Duplicate"),[t,"d"]],[n2_("Copy"),[t,"c"]],[n2_("Paste"),[t,"v"]],[n2_("Undo"),[t,"z"]],[n2_("Redo"),[t,"shift","z"]],[n2_("Save"),[t,"s"]]]];i.push(r);var a=[n2_("Clear device specific settings"),[[n2_("Current layer, current device"),["shift","e"]],[n2_("Current layer, all devices"),["shift","alt","e"]],[n2_("All layers, current device"),["shift","r"]],[n2_("All layers, all devices"),["shift","alt","r"]]]];return i.push(a),[e,i]},e.prototype.isMac=function(){return 0<=navigator.platform.toUpperCase().indexOf("MAC")};var i=!(e.prototype.show=function(){this.modal.show()});function s(){}return s.show=function(){i||(i=new e),i.show()},s}),N2D("ModalSafeHTML",function(s,t){return function(t){var i=new N2Classes.ModalSimple("safe-html",{destroyOnHide:!1,width:440});i.addContent(N2Classes.UI.modalHeading(n2_("Unexpected response")));var e=s(t.replace(/document\.write/g,"n2Write"));window.n2Write=function(t){i.addContent(s(" ").html(t))},e.each(function(t,e){i.addContent(s(e))}),delete window.n2Write,i.show()}}),N2D("ModalUrlTabPro",function(i,t){function e(t,e){i(".n2_free_need_more").eq(0).clone().appendTo(t)}return e.prototype.show=function(t){},e}),N2D("ModalUrlTabUrl",function(e,i){function t(t,e){this.modalManager=e,this.cache={};var i=N2Classes.UI.modalFormRow(!0).appendTo(t);this.$url=N2Classes.UI.modalFieldText(i,"url",n2_("URL"),"");var s=N2Classes.UI.modalFormRow(!0).appendTo(t);this.$searchKeyword=N2Classes.UI.modalFieldText(s,"search-keyword",n2_("Search keyword"),"").on("keyup",this.search.bind(this)).trigger("focus");var n=N2Classes.UI.modalFormRow(!0).appendTo(t);this.$postSelector=N2Classes.UI.modalSelectList(n,"url-post",n2_("Posts"),function(t){this.$url.val(t.link)}.bind(this),{mode:"insert"})}return t.prototype.show=function(t){this.$url.val(t),this.$searchKeyword.val(""),this.search()},t.prototype.search=function(){this.searchString=this.$searchKeyword.val(),this.getAjaxSearchResult(this.searchString).done(function(t){if(this.$searchKeyword.val()===this.searchString){this.$postSelector.removeOptions();for(var e=t.data,i=0;i'+t+" ")},modalIcon:function(t,e){return f('
')},modalHeading:function(t){return f('
').text(t)},modalSubHeading:function(t){return f('
').text(t)},modalParagraph:function(t){return f('
').text(t)},modalParagraphHTML:function(t){return f('
').html(t)},modalInput:function(t,e,i,s){return f(' ")},modalFormTable:function(t){var e=f('
');return f('
').append(f('
').text(t)).appendTo(e),{$table:e,$content:f('
').appendTo(e)}},modalFormContainer:function(t,e){return f('
').appendTo(t)},modalHiddenContainer:function(t){return f('
').appendTo(t)},modalFormRow:function(t){return f('
').toggleClass("n2_modal__form_row--fullwidth",!0===t)},modalFormRowLarge:function(t){return f('
').toggleClass("n2_modal__form_row--fullwidth",!0===t)},modalFieldWrapper:function(t,e,i){var s=f('
').appendTo(t);return!1===i?s.addClass("n2_field--label-none"):""===i&&s.addClass("n2_field--label-placeholder"),i&&f(''+i+"
").appendTo(s),{$field:s,$element:f('
').appendTo(s)}},modalFieldText:function(t,e,i,s){var n=d.modalFieldWrapper(t,e,i),o=f('
').appendTo(n.$element),r=f(' ').val(s).appendTo(o);return new N2Classes.FormElementText("modal-field-"+e),r},modalOnOff:function(t,e,i,s,n){var o=d.modalFieldWrapper(t,e,i),r=f(''+n2_("Off")+'
'+n2_("On")+"
").appendTo(o.$element),a=f(' ').val(s).appendTo(r);return new N2Classes.FormElementOnoff("modal-field-"+e,n),a},modalSelect:function(t,e,i,s,n,o){o=f.extend({isMultiple:!1},o);var r=d.modalFieldWrapper(t,e,i),a=f(' ').appendTo(r.$element),l=f(' ');for(var h in o.isMultiple&&l.attr("multiple","multiple").attr("size","8"),s)l.append(''+s[h]+" ");return f('
').append(l).appendTo(r.$element),new N2Classes.FormElementList("modal-field-"+e).insideChange(n),a},modalNumber:function(t,e,i,s,n){var o=100;switch((n=f.extend({unit:!1,min:-Number.MAX_VALUE,max:Number.MAX_VALUE,wide:4,sublabel:""},n)).wide){case 2:o=20;break;case 3:o=26;break;case 4:o=32;break;case 5:o=44;break;case 6:o=60}var r=d.modalFieldWrapper(t,e,i),a=f('
').appendTo(r.$element);""!==n.sublabel&&f('
').text(n.sublabel).appendTo(a);var l=f(' ').css("width",o+"px").appendTo(a);return n.unit&&f('
').text(n.unit).appendTo(a),new N2Classes.FormElementNumber("modal-field-"+e,n.min,n.max),l},modalTextarea:function(t,e,i){var s=d.modalFieldWrapper(t,e,i),n=f('
').appendTo(s.$element);return f('').appendTo(n)},modalTable:function(t,e,i,s){var n=d.modalFieldWrapper(t,e,i);n.$field.addClass("n2_field_table");for(var o=f('
').css("grid-template-columns","repeat("+s[0].length+", auto)").appendTo(n.$element),r=0;r'+s[r][a]+"").appendTo(o);return o},modalSelectList:function(t,e,i,s,n){n=f.extend({mode:"select"},n);var o=d.modalFieldWrapper(t,e,i),r=f('
').appendTo(o.$element);return{getField:function(){return o.$field},addOption:function(t,e,i){f('
').on("click",function(t,e){"select"===n.mode&&(o.$field.find(".n2_field_select_list__option--selected").removeClass("n2_field_select_list__option--selected"),f(e.currentTarget).addClass("n2_field_select_list__option--selected")),s(t)}.bind(this,i)).append(f('
').text(t)).append(f('
').text(e)).appendTo(r)},removeOptions:function(){r.html("")}}},modalGeneratorVariableList:function(t,e,i,s,n,o){t.addContent(this.modalHeading(n2_(i)));var r=N2Classes.UI.modalFormRow(!0);t.addContent(r);var a,l=N2Classes.UI.modalFieldWrapper(r,s,n),h=f('
').appendTo(l.$element),d=[];if(Number.isInteger(e))for(var c=1;c<=e;c++)d[c]=c;else d=e;for(var p in d){var u=f('
');u.text(p).on("click",function(t){a.removeClass("n2_generator_variables__variable--selected"),this.addClass("n2_generator_variables__variable--selected"),o(t)}.bind(u,p)).appendTo(h)}(a=h.find(".n2_generator_variables__variable")).eq(0).addClass("n2_generator_variables__variable--selected")},modalTabs:function(t,e,i,s){var n=f('
').appendTo(t),o=f('
').appendTo(n),r=f('
').appendTo(n),a=!1,l={};function h(t){a&&a!==t&&(l[a].$button.removeClass("n2_modal_tab__tabs_button--active"),l[a].$content.removeClass("n2_modal_tab__tabs_content--active")),l[a=t].$button.addClass("n2_modal_tab__tabs_button--active"),l[a].$content.addClass("n2_modal_tab__tabs_content--active"),s(a)}for(var d in i)l[d]={$button:f(''+i[d]+"
").on("click",h.bind(this,d)).appendTo(o),$content:f('
').appendTo(r)};return{tabs:l,setActiveTab:h}},modalFieldSelectIcon:function(t,e,i,s,n,o){var r=d.modalFieldWrapper(t,e,i),a=f('
').appendTo(r.$element);for(var l in s)f('
').attr("data-value",l).toggleClass("n2_field_select_icon__option--selected",l===n).append('
').append(''+s[l].label+"
").append('
').appendTo(a);var h=f(' ').appendTo(r.$element);return new N2Classes.FormElementSelectIcon("modal-field-"+e,o),h},modalNotice:function(t,e,i){var s=d.modalFieldWrapper(t,"notice",n2_("Notice"));return f('
').html(n2_(e)).appendTo(s.$element)}};return d}),N2D("AutocompleteSimple",function(s,t){return function(t,e){var i=s("#"+t);new N2Classes.UIAutocomplete(i,{positionTo:".n2_autocomplete_position_to",y:-2,appendTo:function(){return i.closest(".n2_container_scrollable, body")},source:function(){return e},select:function(t,e){s(this).val(e.value).trigger("change")}})}}),N2D("Spectrum",function(mt,vt){var t,_t=null,bt={beforeShow:i,move:i,change:i,show:i,hide:i,color:!1,flat:!1,showInput:!1,showButtons:!0,clickoutFiresChange:!1,showInitial:!1,showPalette:!1,showPaletteOnly:!1,showSelectionPalette:!0,localStorageKey:!1,maxSelectionSize:7,cancelText:"cancel",chooseText:"choose",preferredFormat:!1,className:"",showAlpha:!1,theme:"n2-sp-light",palette:["fff","000"],selectionPalette:[],disabled:!1},Ct=[],xt=!!/msie/i.exec(window.navigator.userAgent),wt=((t=document.createElement("div").style).cssText="background-color:rgba(0,0,0,.5)",e(t.backgroundColor,"rgba")||e(t.backgroundColor,"hsla")),St=[""].join(""),Nt=function(){var t="";if(xt)for(var e=1;e<=6;e++)t+="
";return[""].join("")}();function e(t,e){return!!~(""+t).indexOf(e)}function kt(t,e,i){for(var s=[],n=0;n ')}return""+s.join("")+"
"}function o(t,e){var a=function(t,e){var i=mt.extend({},bt,t);return i.callbacks={move:Tt(i.move,e),change:Tt(i.change,e),show:Tt(i.show,e),hide:Tt(i.hide,e),beforeShow:Tt(i.beforeShow,e)},i}(e,t),s=a.flat,i=a.showSelectionPalette,n=a.localStorageKey,o=a.theme,r=a.callbacks,l=function(i,s,n){var o;return function(){var t=this,e=arguments;n&&clearTimeout(o),!n&&o||(o=setTimeout(function(){o=null,i.apply(t,e)},s))}}(ft,10),h=!1,d=0,c=0,p=0,u=0,f=0,g=0,y=0,m=0,v=0,_=0,b=1,C=a.palette.slice(0),x=Array.isArray(C[0])?C:[C],w=a.selectionPalette.slice(0),S="n2-sp-dragging",N=t.ownerDocument,k=N.body,P=mt(t),T=!1,I=mt(Nt,N).addClass(o),D=I.find(".n2-sp-color"),$=I.find(".n2-sp-dragger"),M=I.find(".n2-sp-hue"),E=I.find(".n2-sp-slider"),A=I.find(".n2-sp-alpha-inner"),F=I.find(".n2-sp-alpha"),L=I.find(".n2-sp-alpha-handle"),R=I.find(".n2-sp-input"),z=I.find(".n2-sp-palette"),O=I.find(".n2-sp-initial"),H=I.find(".n2-sp-cancel"),U=I.find(".n2-sp-choose"),j=P.is("input"),B=j&&!s,V=null,W=null,q=null,X=a.color||j&&P.val(),Y=!1,G=a.preferredFormat,K=G,J=!a.showButtons||a.clickoutFiresChange;function Z(t){I.toggleClass("n2-sp-flat",s),I.toggleClass("n2-sp-input-disabled",!a.showInput),I.toggleClass("n2-sp-alpha-enabled",a.showAlpha),I.toggleClass("n2-sp-buttons-disabled",!a.showButtons||s),I.toggleClass("n2-sp-palette-disabled",!a.showPalette),I.toggleClass("n2-sp-palette-only",a.showPaletteOnly),I.toggleClass("n2-sp-initial-disabled",!a.showInitial),I.addClass(a.className),t===vt&&ft()}function Q(t){if(i){var e=_t(t).toRgbString();if(-1===w.indexOf(e)&&w.push(e),n&&window.localStorage)try{window.localStorage[n]=w.join(";")}catch(t){}}}function tt(){var i=ht(),t=mt.map(x,function(t,e){return kt(t,i,"n2-sp-palette-row n2-sp-palette-row-"+e)});w&&t.push(kt(function(){var t,e=[],i=w,s={};if(a.showPalette){for(var n=0;na&&il&&s>1)+720)%360;--e;)s.h=(s.h+n)%360,o.push(_t(s));return o},_t.monochromatic=function(t,e){e=e||6;for(var i=_t(t).toHsv(),s=i.h,n=i.s,o=i.v,r=[],a=1/e;e--;)r.push(_t({h:s,s:n,v:o})),o=(o+a)%1;return r},_t.readable=function(t,e){var i=_t(t).toRgb(),s=_t(e).toRgb();return 10404<(s.r-i.r)*(s.r-i.r)+(s.g-i.g)*(s.g-i.g)+(s.b-i.b)*(s.b-i.b)};var v=_t.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},_=_t.hexNames=function(t){var e={};for(var i in t)t.hasOwnProperty(i)&&(e[t[i]]=i);return e}(v);function b(t,e){!function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}(t)||(t="100%");var i=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=u(e,f(0,parseFloat(t))),i&&(t*=e/100),p.abs(t-e)<1e-6?1:1<=t?t%e/parseFloat(e):t}function s(t){return u(1,f(0,t))}function C(t){return parseInt(t,16)}function x(t){return 1==t.length?"0"+t:""+t}var e,i,l,w=(i="[\\s|\\(]+("+(e="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?",l="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?",{rgb:new RegExp("rgb"+i),rgba:new RegExp("rgba"+l),hsl:new RegExp("hsl"+i),hsla:new RegExp("hsla"+l),hsv:new RegExp("hsv"+i),hex3:/^([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/})}(),mt.fn.n2spectrum}),N2D("Notification",function(r,t){function e(){this.deferred=r.Deferred(),N2R("documentReady",this.ready.bind(this))}return e.prototype.ready=function(){this.$container=r('
').appendTo("body"),this.deferred.resolve()},e.prototype.error=function(t,e){e=r.extend({wide:!1,heading:n2_("Oops, Something Went Wrong")},e);var i=new N2Classes.ModalSimple("notification error",{width:e.wide?1e3:440});i.addContent(N2Classes.UI.modalIcon("ssi_48 ssi_48--error","red")),i.addContent(N2Classes.UI.modalHeading(e.heading)),i.addContent(N2Classes.UI.modalParagraphHTML(t));var s=N2Classes.UI.modalButton(n2_("Got it"),"red");i.addButton(s),s.on("click",function(t){t.preventDefault(),i.hide(t)}),i.show()},e.prototype.success=function(t){this.message("success",n2_("Success"),t,{timeout:3})},e.prototype.notice=function(t){this.message("notice",n2_("Notice"),t)},e.prototype.message=function(t,e,i,s){s=r.extend({timeout:0},s);var n=r('
').scrollTop(0).prependTo(this.$container);r('
').appendTo(n);var o=r('
').appendTo(n);r(''+e+"
").appendTo(o),r(''+i+"
").appendTo(o),s.timeout?(n.one("mouseenter",function(){n.remove()}),setTimeout(function(){n.remove()},1e3*s.timeout)):r('
').text(n2_("Got it")).on("click",function(){n.remove()}).appendTo(n),setTimeout(function(t){t.addClass("n2_notification_center__message--animate")}.bind(this,n),100)},new e}),N2D("Form",function(e,t){function i(){this.skipChangeConfirm=!1,this.onChangeCallback=this.onChange.bind(this)}return i.prototype.setID=function(t){this.$form=e(t).data("form",this)},i.prototype.onReady=function(){this.window=e("#n2-admin")[0],this.initButtons(),this.resetChangeTracker(),this.registerBeforeUnload(),document.addEventListener("keydown",this.onKeyDown.bind(this),{capture:!0})},i.prototype.initButtons=function(){},i.prototype.resetChangeTracker=function(){this.hasChange=!1,this.window.addEventListener("nextendChange",this.onChangeCallback,{passive:!0,capture:!0}),this.window.addEventListener("change",this.onChangeCallback,{passive:!0,capture:!0}),this.$saveButton.addClass("n2_button--inactive")},i.prototype.onChange=function(){this.hasChange=!0,this.$saveButton.removeClass("n2_button--inactive"),this.window.removeEventListener("nextendChange",this.onChangeCallback,{passive:!0,capture:!0}),this.window.removeEventListener("change",this.onChangeCallback,{passive:!0,capture:!0})},i.prototype.onKeyDown=function(t){if(!t.defaultPrevented){var e=!1;t.ctrlKey||t.metaKey?83===t.keyCode&&(this.actionSave(),e=!0):27===t.keyCode&&("INPUT"!==t.target.tagName&&"textarea"!==t.target.tagName||(t.target.blur(),e=!0)),e&&t.preventDefault()}},i.prototype.isChanged=function(){return this.hasChange},i.prototype.registerBeforeUnload=function(){window.addEventListener("beforeunload",this.actionUnload.bind(this))},i.prototype.actionUnload=function(t){if(!this.skipChangeConfirm&&this.isChanged()){var e=n2_("The changes you made will be lost if you navigate away from this page.");return t.returnValue=e}},i.prototype.actionSave=function(){},i.prototype.afterSave=function(){this.resetChangeTracker()},i}),N2D("FormElement",function(t,e){function i(){this.connectedField=null,this.element.data("field",this)}return i.prototype.triggerOutsideChange=function(){this.element[0].dispatchEvent(new CustomEvent("outsideChange",{cancelable:!1,bubbles:!0,detail:{field:this}})),this.element[0].dispatchEvent(new CustomEvent("nextendChange",{cancelable:!1,bubbles:!0,detail:{field:this}}))},i.prototype.triggerInsideChange=function(){this.element[0].dispatchEvent(new CustomEvent("insideChange",{cancelable:!1,bubbles:!0,detail:{field:this}})),this.element[0].dispatchEvent(new CustomEvent("nextendChange",{cancelable:!1,bubbles:!0,detail:{field:this}}))},i.prototype.focus=function(t){this.connectedField&&this.connectedField.focus(t)},i}),N2D("FormElementAutocomplete","FormElementText",function(s,t){function e(t,e){this.tags=e,N2Classes.FormElementText.prototype.constructor.call(this,t),this.parent.find(".n2_field_text__clear").on("click",this.clear.bind(this)),new N2Classes.UIAutocomplete(this.element,{positionTo:".n2_field_autocomplete",y:-2,appendTo:function(){return this.element.closest(".n2_container_scrollable, body")}.bind(this),source:function(){return this.tags}.bind(this),select:function(t,e){var i=this.value.split(/,/);i.pop(),i.push(e.value),i.push(""),this.value=i.join(","),s(this).trigger("change")}})}return((e.prototype=Object.create(N2Classes.FormElementText.prototype)).constructor=e).prototype.clear=function(t){t.preventDefault(),this.element.val(""),this.change()},e}),N2D("BasicCSSFont",["BasicCSSSkeleton"],function(t,e){function i(){this._singular="font",this._prular="fonts",N2Classes.BasicCSSSkeleton.prototype.constructor.apply(this,arguments),this.form={afont:t("#layer-font-family"),color:t("#layer-font-color"),size:t("#layer-font-size"),weight:t("#layer-font-weight"),lineheight:t("#layer-font-lineheight"),align:t("#layer-font-textalign"),underline:t("#layer-font-decoration"),italic:t("#layer-font-decoration"),letterspacing:t("#layer-font-letterspacing"),wordspacing:t("#layer-font-wordspacing"),texttransform:t("#layer-font-texttransform"),tshadow:t("#layer-font-tshadow"),extra:t("#layer-font-extracss")},this.loaded()}return((i.prototype=Object.create(N2Classes.BasicCSSSkeleton.prototype)).constructor=i).prototype.activateVisual=function(t){this.activeVisual=t,this.setValue(N2Classes.CSSRendererFont.transformData(this.visuals[t].value,this.visuals[t].mode)),this.setStates(N2Classes.CSSRendererFont.rendererModes[this.visuals[t].mode].tabs),N2Classes.BasicCSSSkeleton.prototype.activateVisual.call(this,t)},i.prototype.setValue=function(t){this.value=N2Classes.CSSRendererFont.fixBold(t)},i.prototype._transformsize=function(t){return t.split("||").join("|*|")},i.prototype._setsize=function(t,e){t.size=e.replace("|*|","||")},i.prototype._transformweight=function(t){return parseInt(t)},i.prototype._setweight=function(t,e){t.weight=parseInt(e)},i.prototype._transformunderline=function(t){return[1==this.value[this.activeState].italic?"italic":"",1==t?"underline":""].join("||")},i.prototype._setunderline=function(t,e){var i=e.split("||");t.underline="underline"===i[1]?1:0},i.prototype._transformitalic=function(t){return[1==t?"italic":"",1==this.value[this.activeState].underline?"underline":""].join("||")},i.prototype._setitalic=function(t,e){var i=e.split("||");t.italic="italic"===i[0]?1:0},i}),N2D("BasicCSSSkeleton",function(o,n){function t(t){this.hasVisuals=!1,this.isInsideChange=!1,this.isReload=!1,this.manager=t,this.$container=t.$container.find('.n2_fields_layer_window[data-field="fieldset-layer-window-basiccss-'+this._singular+'"]'),this.$relatedContainers=t.$container.find('.n2_fields_layer_window[data-parent-design="fieldset-layer-window-basiccss-'+this._singular+'"]'),this.$containers=this.$container.add(this.$relatedContainers).attr("data-state","0"),this.elementField=o("#layerbasiccss-"+this._singular+"-element").data("field"),this.elementField.element.on("nextendChange",function(){this.activateVisual(this.elementField.element.val()),this.activateState(0)}.bind(this)),this.stateField=o("#layerbasiccss-"+this._singular+"-state").data("field"),this.stateField.element.on("nextendChange",function(){this.activateState(this.stateField.element.val())}.bind(this)),this.relatedElementFields=[],this.relatedStateFields=[],this.$relatedContainers.each(function(t,e){var i=o(e),s=i.find("#layerbasiccss-"+i.data("singular")+"-element").data("field"),n=i.find("#layerbasiccss-"+i.data("singular")+"-state").data("field");s.element.on("outsideChange",function(t){this.elementField.insideChange(t.val())}.bind(this,s.element)),n.element.on("outsideChange",function(t){this.stateField.insideChange(t.val())}.bind(this,n.element)),this.relatedElementFields.push(s),this.relatedStateFields.push(n)}.bind(this)),this.$containers.find('.n2_form__table_label_field[data-design-feature="reset-to-normal"] a').on("click",function(t){t.preventDefault(),this.value[this.activeState]={},this._lazySave(t),this.activateState(this.activeState)}.bind(this)),this.activeVisual=0,this.activeState=0}return t.prototype.loaded=function(){for(var t in this.form)this.form[t].on({nextendChange:this.changeValue.bind(this,t)})},t.prototype.changeValue=function(t,e){this.isReload||("function"==typeof this["_set"+t]?this["_set"+t](this.value[this.activeState],this.form[t].val()):this.value[this.activeState][t]=this.form[t].val(),this._lazySave(e))},t.prototype._lazySave=NextendDeBounce(function(t){this.isInsideChange=!0;var e=this.getData();this.visuals[this.activeVisual].field.save(t,e),this.visuals[this.activeVisual].value=e,this.isInsideChange=!1},50),t.prototype.save=function(t){for(var e in this.isInsideChange=!0,t)this.visualsByName[e].field.save({},t[e]),this.visualsByName[e].value=t[e];this.isInsideChange=!1},t.prototype.getData=function(){return JSON.stringify({data:this.value})},t.prototype.load=function(t,e){if(this.hasVisuals=0').prependTo(this.$container),this.$notice=o('Note
'+n2_("Layer design options affect every device. If you need to make responsive adjustments, look for the options with the device icon.")+"
").prependTo(this.$container);var i=o('
').appendTo(this.$preset),s=o('
').appendTo(i);o(' ').on("click",function(t){t.preventDefault(),this.exitPresetList(this.defs,t)}.bind(this)).appendTo(s),o(' ').on("click",function(t){t.preventDefault(),this.saveAsNew()}.bind(this)).appendTo(s),this.$presets=o('
').insertAfter(this.$preset),o(' ').on("click",function(t){t.preventDefault(),this.showList()}.bind(this)).appendTo(i),o(' ').on("click",function(t){t.preventDefault(),this.exitPresetList(!1,t)}.bind(this)).appendTo(i),nextend.basicCSS=this}return t.prototype.showList=function(){this.inPresetList=!0,this.lastState=this.serialize(),this.$presets.on("mouseleave",function(){this.throttledUnSerialize(this.lastState)}.bind(this)),o.when(this.loadType()).done(function(t){0===this.storage[this.type].data("presets")?(N2Classes.Notification.notice(n2_("You have not created any presets for this layer yet.")),this.deActivate()):(this.$presets.append(this.storage[this.type]),o(".n2_ss_layer_window").addClass("n2_ss_layer_window--show-presets"),o(".n2_ss_layer_window__tab_container").scrollTop(0))}.bind(this))},t.prototype.activate=function(t,e,i){this.inPresetList&&this.exitPresetList(!1),this.type&&this.type!==t&&this.storage[this.type]!==r&&this.storage[this.type].detach();var s=!1;for(var n in this.defs={font:[],style:[]},this.type=t,this.assets){for(var o=0;o').data("presets",0);for(var e=0;e'+i.name+" ").on({mouseenter:function(t,e){this.throttledUnSerialize(t.data)}.bind(this,i),click:function(t,e){e.preventDefault(),this.exitPresetList(t,e)}.bind(this,i.data)}).appendTo(this.storage[this.type]);if(this.storage[this.type].data("presets",this.storage[this.type].data("presets")+1),1e4').appendTo(s);o('
').on("click",function(t,e,i){i.stopPropagation(),N2Classes.AjaxHelper.ajax({type:"POST",url:N2Classes.AjaxHelper.makeAjaxUrl(this.options.ajaxUrl,{nextendaction:"changeVisual"}),data:{visualId:t,value:N2Classes.Base64.encode(JSON.stringify({name:e,data:this.lastState})),type:this.type},dataType:"json"}).done(function(t){s.replaceWith(this.addVisual(t.data.visual)),this.storage[this.type].data("presets",this.storage[this.type].data("presets")-1),N2Classes.Notification.success(n2_("Preset saved."))}.bind(this))}.bind(this,t.id,i.name)).appendTo(n),o('
').on("click",function(t,e){e.preventDefault(),e.stopPropagation(),N2Classes.AjaxHelper.ajax({type:"POST",url:N2Classes.AjaxHelper.makeAjaxUrl(this.options.ajaxUrl,{nextendaction:"deleteVisual"}),data:{visualId:t,type:this.type},dataType:"json"}).done(function(t){s.remove(),this.storage[this.type].data("presets",this.storage[this.type].data("presets")-1),N2Classes.Notification.success(n2_("Preset deleted."))}.bind(this))}.bind(this,t.id)).appendTo(n),nextend.tooltip.add(n)}return s},t.prototype.exitPresetList=function(t,e){this.throttleSetTimeout&&clearTimeout(this.throttleSetTimeout),this.$presets.off("mouseleave"),t?(this.inPresetList=!1,this.unSerialize(t)):this.unSerialize(this.lastState),o(".n2_ss_layer_window").removeClass("n2_ss_layer_window--show-presets"),o(".n2_ss_layer_window__tab_container").scrollTop(0),this.inPresetList=!1},t.prototype._addThrottledRenderTimeout=function(t){this.throttleSetTimeout&&clearTimeout(this.throttleSetTimeout),this.throttleSetTimeout=setTimeout(t,100)},t.prototype._addThrottledExitTimeout=function(t){this.throttleExitTimeout&&clearTimeout(this.throttleExitTimeout),this.throttleExitTimeout=setTimeout(t,100)},t}),N2D("FormElementBreakpoint",function(r,a){function t(t,e){this.$container=r("#"+t).find(".n2_field_breakpoint__breakpoint_container"),this.options=r.extend({orientation:"",devices:[],fields:{},enables:!1,global:!1},e),this.hasEnables=!!this.options.enables,this.useGlobal=!1,this.$container.toggleClass("n2_field_breakpoint--with-enables",this.hasEnables),this.$orientationField=r("#"+this.options.orientation).on("nextendChange",this.onOrientationChanged.bind(this)),this.breakpoints={},r('').prependTo(this.$container),this.$devices=this.$container.find(".n2_field_breakpoint__device"),this.options.global&&(this.$useGlobalField=r("#"+this.options.global.field).on("nextendChange",this.syncUseGlobal.bind(this)),this.useGlobal="1"===this.$useGlobalField.val(),this.syncUseGlobal());for(var i=!1,s=!1,n=0;n').appendTo(this.$container)}function s(t,e,i,s){this.parentField=t,(this.prev=s)&&s.setNext(this),this.next=!1,this.disableEdit=!1,this.orientation="portrait",this.device=e,this.$device=i,this.$breakpoint=r(''),this.$fieldPortrait=r("#"+t.options.fields[e+"-portrait"]),this.$fieldLandscape=r("#"+t.options.fields[e+"-landscape"]),this.$labelContainer=r('
').appendTo(this.$breakpoint),r('
').on("click",this.edit.bind(this)).appendTo(this.$labelContainer),this.$labelPortrait=r('
').text(this.$fieldPortrait.val()).appendTo(this.$labelContainer),this.$labelLandscape=r('
').text(this.$fieldLandscape.val()).appendTo(this.$labelContainer),t.hasEnables&&t.options.enables[e]&&(this.$enableField=r("#"+t.options.enables[e]),this.enableField=this.$enableField.data("field"),this.isEnabled=1===parseInt(this.$enableField.val()),this.syncEnabledClass(),this.$device.append('
'),this.$device.on("click",this.toggleEnable.bind(this)))}return t.prototype.syncUseGlobal=function(){for(var t in this.useGlobal="1"===this.$useGlobalField.val(),this.breakpoints)this.breakpoints[t].syncUseGlobal(this.useGlobal)},t.prototype.createBreakpoint=function(t,e){var i=t.data("id");return"desktopportrait"!==i?(this.breakpoints[i]=new s(this,i,t,e),this.breakpoints[i]):a},t.prototype.onOrientationChanged=function(){var t=this.$orientationField.val();for(var e in this.breakpoints)this.breakpoints[e].setOrientation(t);this.$container.attr("data-orientation",t)},s.prototype.setOrientation=function(t){this.orientation=t},s.prototype.setNext=function(t){this.next=t},s.prototype.getValue=function(){return parseInt(this.$fieldPortrait.val())},s.prototype.syncUseGlobal=function(t){t?(this.disableEdit=!0,this.$labelPortrait.text(this.parentField.options.global.values[this.device+"-portrait"]),this.$labelLandscape.text(this.parentField.options.global.values[this.device+"-landscape"])):(this.disableEdit=!1,this.$labelPortrait.text(this.$fieldPortrait.val()),this.$labelLandscape.text(this.$fieldLandscape.val())),this.$labelContainer.toggleClass("n2_field_breakpoint__breakpoint_label_container--disable-edit",this.disableEdit)},s.prototype.toggleEnable=function(t){t.preventDefault(),this.isEnabled=!this.isEnabled,this.enableField.insideChange(this.isEnabled?1:0),this.syncEnabledClass()},s.prototype.syncEnabledClass=function(){this.$device.toggleClass("n2_field_breakpoint__device--enabled",this.isEnabled),this.$breakpoint.toggleClass("n2_field_breakpoint__breakpoint--enabled",this.isEnabled),r("body").attr("data-"+this.device,this.isEnabled?1:0)},s.prototype.edit=function(t){var e="portrait"===this.orientation?this.$labelPortrait:this.$labelLandscape,i="portrait"===this.orientation?this.$fieldPortrait:this.$fieldLandscape;this.disableEdit||"true"===e[0].contentEditable||(t.preventDefault(),new N2Classes.InlineTextEditor(e[0],{filter:this.onFilter.bind(this),onSave:this.onSave.bind(this,i,e),onCancel:this.onCancel.bind(this,i,e)}))},s.prototype.onFilter=function(t){return t.replace(/[^0-9]/gi,"").replace(/^[0]+/gi,"").substr(0,4)},s.prototype.onSave=function(t,e,i){(i=parseInt(i))?(i=Math.max(100,Math.min(99999,parseInt(i))),t.val(i).trigger("change"),e.text(i)):this.onCancel(t,e)},s.prototype.onCancel=function(t,e){e.text(parseInt(t.val()))},t}),N2D("FormElementButtonMoreLess",function(s,n){function t(t,e){if(this.$button=s("#"+t).on("click",this.switchState.bind(this)),this.options=s.extend({labelMore:"",labelLess:"",relatedFields:[]},e),this.shownMore=!1,this.relatedFields=s(""),e.relatedFields!==n&&e.relatedFields.length)for(var i=0;i'+e.ligature+" "):this.$preview.html("")},i.prototype.focus=function(t){t&&this.openModal()},i}),N2D("FormElementImageList",["FormElement"],function(n,o){function t(t,e,i){if(this.id=t,this.element=n("#"+t),this.$parent=this.element.parent(),this.$preview=this.$parent.find(".n2_field_image_list__preview"),this.$fields=this.$parent.find(".n2_field_image_list__fields"),this.$fields.length&&(this.field=this.$fields.find('input[type="text"]').data("field"),this.field.element.on("outsideChange",function(){var t=this.element.val();this.markSelected(t),this.renderPreview(t)}.bind(this))),this.$popover=!1,this.parameters=n.extend({width:120,column:3,hasDisabled:!1,options:[]},e),this.realItemWidth=this.parameters.width+10,this.relatedFields=!1,i!==o&&i.length){this.relatedFields=n("");for(var s=0;s').on("click",this.stopPropagation.bind(this));var t=n('
').css("width",(this.realItemWidth+20)*this.parameters.column+"px").appendTo(this.$popover);for(var e in this.parameters.options){this.items[e]=n('
').css("width",this.realItemWidth+"px").on("click",this.selectOption.bind(this,e)).appendTo(t);var i=n('
').appendTo(this.items[e]);this.loadImage(this.parameters.options[e].url,i),this.parameters.options[e].label!==o&&n('
').text(this.parameters.options[e].label).appendTo(this.items[e])}this.parameters.hasDisabled&&(this.parameters.options[-1]={url:""},this.items[-1]=n('
').on("click",this.selectOption.bind(this,"-1")).append(n('
').text(n2_("Disabled"))).appendTo(t)),this.$fields.appendTo(this.$popover),this.$parent.append(this.$popover),this.$items=this.$popover.find(".n2_field_image_list__popover_item")}},t.prototype.selectOption=function(t,e){this.setValue(t),this.markSelected(t),this.renderPreview(t),this.triggerOutsideChange(),this.blur(e)},t.prototype.setValue=function(t){this.element.val(t),this.relatedFields&&this.relatedFields.toggleClass("n2_form_element--hidden",this.isOff(t))},t.prototype.markSelected=function(t){this.$items.removeClass("n2_field_image_list__popover_item--selected"),this.field&&""!==this.field.element.val()||this.items[t].addClass("n2_field_image_list__popover_item--selected")},t.prototype.renderPreview=function(t){var e,i;this.$preview.html(""),this.field&&""!==this.field.element.val()?e=nextend.imageHelper.fixed(this.field.element.val()):"-1"!==t&&this.parameters.options[t]!==o&&(e=this.parameters.options[t].url,i=this.parameters.options[t].label),e!==o?(this.loadImage(e,this.$preview),i&&n('
').text(i).appendTo(this.$preview)):n('
').text(n2_("Disabled")).appendTo(this.$preview)},t.prototype.insideChange=function(t){this.parameters.options[t]!==o&&(this.setValue(t),this.markSelected(t),this.renderPreview(t),this.triggerInsideChange())},t.prototype.loadImage=function(t,e){this.getImage(t,"94b2c1").done(function(t){n(' ').prependTo(e)})},t.prototype.getCurrentImage=function(t){return this.getImage(this.parameters.options[this.element.val()].url,t)},t.prototype.getImage=function(t,i){var s=n.Deferred();return"svg"===t.split("?")[0].split(".").pop()?n.ajax({url:t,method:"GET",dataType:"text",data:{},success:function(t){var e=t.replace(/fill="#FFF"/gi,'fill="#'+i.substr(0,6)+'"').replace('opacity="1"','opacity="'+N2Color.hex2alpha(i)+'"');s.resolve("data:image/svg+xml;base64,"+btoa(e))}.bind(this)}):s.resolve(t),s},t}),N2D("FormElementImage",["FormElementText"],function(i,t){function e(t,e){N2Classes.FormElementText.prototype.constructor.call(this,t),this.parameters=i.extend({alt:!1},e),this.preview=this.parent.find(".n2_field_text_image__preview").on("click",this.open.bind(this)),this.element.on("nextendChange",this.makePreview.bind(this)),this.parent.find(".n2_field_text__choose").on("click",this.open.bind(this)),this.parent.find(".n2_field_text__clear").on("click",this.clear.bind(this)),this.$sizeLabel=i('
').appendTo(this.parent),this.refreshSizeLabel()}return((e.prototype=Object.create(N2Classes.FormElementText.prototype)).constructor=e).prototype.clear=function(t){t.preventDefault(),this.val("")},e.prototype.val=function(t,e){(e=i.extend({alt:!1},e)).alt&&""!==e.alt&&this.parameters.alt&&""!==this.parameters.alt&&i("#"+this.parameters.alt).val(e.alt).trigger("change"),this.element.val(t),this.change()},e.prototype.makePreview=function(){var t=this.element.val();"{"===t.substr(0,1)?this.preview.css("background-image",""):this.preview.css("background-image","url("+nextend.imageHelper.fixed(t)+")"),this.refreshSizeLabel()},e.prototype.open=function(t){t&&t.preventDefault(),nextend.imageHelper.openLightbox(this.val.bind(this))},e.prototype.focus=function(t){t&&this.open()},e.prototype.refreshSizeLabel=function(){this.$sizeLabel.removeClass("n2_field_text_image__size_label--visible");var t=this.element.val();if(""!==t&&"{"!==t.substr(0,1)){var e=new Image;e.addEventListener("load",function(){e.naturalWidth&&e.naturalHeight&&this.$sizeLabel.text(e.naturalWidth+"x"+e.naturalHeight).addClass("n2_field_text_image__size_label--visible")}.bind(this)),e.src=nextend.imageHelper.fixed(t)}},e}),N2D("FormElementLayerWindowFocus",["UIDragTooltip"],function(i,t){var n=new N2Classes.UIDragTooltip("Focus");function e(t,e){this.$field=i("#"+t).on("mousedown",this.onMouseDown.bind(this)),this.onMouseMoveCallback=this.onMouseMove.bind(this),this.onMouseUpCallback=this.onMouseUp.bind(this),this.$image=this.$field.find(".n2_field_layer_window_focus__image").on({error:function(){this.$image.attr("src",nextend.imageHelper.fixed("$system$/images/placeholder/image.png"))}.bind(this)}),this.$dot=i('
').on("mouseenter",this.onMouseEnter.bind(this)).appendTo(this.$field),this.options=i.extend({image:"",focusX:"",focusY:""},e),this.$imageField=i("#"+this.options.image).on("nextendChange",this.onImageChange.bind(this)),this.imageField=this.$imageField.data("field"),this.$focusXField=i("#"+this.options.focusX).on("nextendChange",this.onFocusXChange.bind(this)),this.focusXField=this.$focusXField.data("field"),this.$focusYField=i("#"+this.options.focusY).on("nextendChange",this.onFocusYChange.bind(this)),this.focusYField=this.$focusYField.data("field")}return e.prototype.onImageChange=function(){var t=nextend.imageHelper.fixed(nextend.currentEditor.generator.fill(this.$imageField.val()));this.image!==t&&(this.image=t,this.$image.attr("src",this.image))},e.prototype.onFocusXChange=function(){var t=this.$focusXField.val();t!==this.focusX&&(this.focusX=t,this.$dot.css("left",this.focusX+"%"))},e.prototype.onFocusYChange=function(){var t=this.$focusYField.val();t!==this.focusY&&(this.focusY=t,this.$dot.css("top",this.focusY+"%"))},e.prototype.onMouseDown=function(t){this.context={originalFocusX:this.$focusXField.val(),originalFocusY:this.$focusYField.val()},N2Classes.History.get().off(),n.dragShow(),this.onMouseMove(t),document.addEventListener("mousemove",this.onMouseMoveCallback),document.addEventListener("mouseup",this.onMouseUpCallback)},e.prototype.onMouseMove=function(t){t.preventDefault();var e=this.$field[0].getBoundingClientRect(),i=Math.max(Math.min(Math.round((t.clientX-e.left)/e.width*100),100),0),s=Math.max(Math.min(Math.round((t.clientY-e.top)/e.height*100),100),0);this.$focusXField.val(i).trigger("change"),this.$focusYField.val(s).trigger("change"),n.dragUpdate(t,"X: "+i+"% Y: "+s+"%")},e.prototype.onMouseUp=function(t){this.$focusXField.val(this.context.originalFocusX).trigger("change"),this.$focusYField.val(this.context.originalFocusY).trigger("change"),N2Classes.History.get().on(),n.dragHide(),document.removeEventListener("mousemove",this.onMouseMoveCallback),document.removeEventListener("mouseup",this.onMouseUpCallback),this.onMouseMove(t),delete this.context},e.prototype.onMouseEnter=function(t){n.hoverShow(t,function(){return"X: "+this.$focusXField.val()+"% Y: "+this.$focusYField.val()+"%"}.bind(this)),this.$dot.on({"mousemove.tooltip":function(t){n.hoverUpdatePosition(t)},"mouseleave.tooltip":function(){this.timeout&&(clearTimeout(this.timeout),delete this.timeout),this.$dot.off(".tooltip"),n.hoverHide()}.bind(this)})},e}),N2D("FormElementList",["FormElement"],function(a,t){function e(t,e){if(this.separator="||",this.options=a.extend({relatedFields:[],relatedValueFields:[],relatedAttribute:""},e),this.element=a("#"+t).on("change",this.onHiddenChange.bind(this)),this.select=a("#"+t+"_select").on("change",this.onChange.bind(this)),this.relatedFields=!1,this.options.relatedFields.length){this.relatedFields=a("");for(var i=0;i').text(t[e]).appendTo(this.select)},e}),N2D("FormElementMarginPadding",["FormElementMixed"],function(t,e){function i(t,e,i){this.linkedValues=!1,N2Classes.FormElementMixed.prototype.constructor.apply(this,arguments),this.$field=this.element.parent(),this.$field.find(".n2_field_margin_padding__pre_label").on("click",function(t){t.preventDefault(),this.linkedValues=!this.linkedValues,this.$field.toggleClass("n2_field_margin_padding--linked-values",this.linkedValues),this.linkedValues&&this.elements[0].trigger("change")}.bind(this)),this.refresh()}return((i.prototype=Object.create(N2Classes.FormElementMixed.prototype)).constructor=i).prototype.onFieldChange=function(){if(this.linkedValues)for(var t=this.elements[0].val(),e=1;e<4;e++)this.elements[e].data("field").insideChange(t);this.element.val(this.getValue()),this.triggerOutsideChange()},i.prototype.insideChange=function(t){N2Classes.FormElementMixed.prototype.insideChange.apply(this,arguments),this.refresh()},i.prototype.refresh=function(){this.linkedValues=!0;for(var t=this.elements[0].val(),e=1;e<4;e++)if(t!==this.elements[e].val()){this.linkedValues=!1;break}this.$field.toggleClass("n2_field_margin_padding--linked-values",this.linkedValues)},i.prototype.relatedFieldsOff=function(){return"0|*|0|*|0|*|0"===this.element.val()},i.prototype.isEmpty=function(t){return"|*||*||*|"===t||"0|*|0|*|0|*|0"===t},i}),N2D("FormElementMixed",["FormElement"],function(n,t){function e(t,e,i){this.element=n("#"+t),this.elements=[];for(var s=0;s input");if(e.units&&i.length){var s=e.units;i.on("nextendChange",function(){e.min=s[i.val()+"Min"],e.max=s[i.val()+"SliderMax"],this.slider&&(this.uiSlider.setOption("min",e.min),this.uiSlider.setOption("max",e.max))}.bind(this))}}return t.prototype.startSlider=function(t,e){if(this.element.parent().off(".n2slider"),!this.slider){var i=n('
').appendTo(this.$parent),s=n('
').appendTo(i);this.slider=n("
").appendTo(s).removeAttr("slide").prop("slide",!1),this.uiSlider=new N2Classes.UISlider(this.slider,n.extend({start:function(){this.element.parent().addClass("n2-active")}.bind(this),stop:function(){this.element.parent().removeClass("n2-active")}.bind(this),sliding:function(t,e){this.localChange=!0,this.element.val(e.value).trigger("change"),this.localChange=!1}.bind(this)},t)),this.slider[0].slide!==o&&(this.slider[0].slide=null),this.element.on("nextendChange",function(){if(!this.localChange){var t=parseFloat(this.element.val());isFinite(t)&&this.uiSlider.setOption("value",t)}}.bind(this))}this.uiSlider.setOption("value",parseFloat(this.element.val()))},t}),N2D("FormElementNumber",["FormElement"],function(o,i){function t(t,e,i,s){this.min=e,this.max=i,this.element=o("#"+t).on({focus:this._focus.bind(this),blur:this.blur.bind(this),change:this.change.bind(this)}),this.parent=this.element.parent();var n=this.parent.siblings(".n2-form-element-units").find("> input");s&&n.length&&n.on("nextendChange",function(){this.min=s[n.val()+"Min"],this.max=s[n.val()+"Max"]}.bind(this)),N2Classes.FormElement.prototype.constructor.call(this)}return((t.prototype=Object.create(N2Classes.FormElement.prototype)).constructor=t).prototype._focus=function(){this.parent.addClass("n2_field_text--focus"),this.element.on("keypress.n2-text",function(t){13===t.which&&(this.element.off("keypress.n2-text"),this.element.trigger("blur"))}.bind(this))},t.prototype.blur=function(){this.parent.removeClass("n2_field_text--focus")},t.prototype.change=function(){var t=this.validate(this.element.val());!0===t?this.triggerOutsideChange():this.element.val(t).trigger("change")},t.prototype.insideChange=function(t){var e=this.validate(t);!0===e?this.element.val(t):this.element.val(e),this.triggerInsideChange()},t.prototype.validate=function(t){if(t!==i&&0'+e+"").insertAfter(this.options.last()).on("click",this.click.bind(this));return this.options=this.options.add(s),i},t.prototype.removeTabOption=function(t){var e=this.values.indexOf(t),i=this.options.eq(e);this.options=this.options.not(i),i.remove(),this.values.splice(e,1)},t.prototype.moveTab=function(t,e){},t.prototype.setValue=function(t){this.element.val(t),this.relatedFields&&this.relatedFields.toggleClass("n2_form_element--hidden",this.isOff(t))},t.prototype.isOff=function(t){return""===t||"0"===t||0===t||"off"===t},t}),N2D("FormRelatedFields",function(s,n){function t(t,e){this.$field=s("#"+t),this.options=s.extend({relatedFieldsOn:[],relatedFieldsOff:[]},e),this.field=this.$field.data("field"),this.field&&this.field.relatedFieldsOff!==n?this.fieldChanged=this.fieldChangedCallback:this.fieldChanged=this.fieldChangedSimple,this.$field.on("nextendChange",this.fieldChanged.bind(this)),this.relatedFieldsOn=s("");for(var i=0;i","")},i.prototype.italic=function(){this.wrapText(""," ")},i.prototype.link=function(){this.wrapText(''," ")},i.prototype.wrapText=function(t,e){var i=this.element,s=i.val().length,n=i[0].selectionStart,o=i[0].selectionEnd,r=t+i.val().substring(n,o)+e;i.val(i.val().substring(0,n)+r+i.val().substring(o,s)),this.triggerOutsideChange(),this.element.focus(),i[0].selectionEnd=o+t.length+e.length},i}),N2D("FormElementSelectIcon",["FormElement"],function(r,t){function e(t,e){if(this.options=r.extend({relatedFields:[],relatedValueFields:[]},e),this.element=r("#"+t),this.$parent=this.element.parent(),this.$options=this.$parent.find(".n2_field_select_icon__option").on("click",this.onSelect.bind(this)),this.relatedFields=!1,this.options.relatedFields.length){this.relatedFields=r("");for(var i=0;i'+t[n]+"");i===n&&o.addClass("n2_field_tab__option--selected"),e.append(o),new a(e.attr("id").replace("_tab",""),s)}},a}),N2D("FormElementText",["FormElement"],function(e,t){function i(t){this.element=e("#"+t).on({focus:this._focus.bind(this),blur:this._blur.bind(this),change:this.change.bind(this)}),this.tagName=this.element.prop("tagName"),this.parent=this.element.parent(),N2Classes.FormElement.prototype.constructor.call(this),this.updateIsEmpty()}return((i.prototype=Object.create(N2Classes.FormElement.prototype)).constructor=i).prototype._focus=function(){this.parent.addClass("n2_field_text--focus"),"TEXTAREA"!==this.tagName&&this.element.on("keypress.n2-text",function(t){13===t.which&&(this.element.off("keypress.n2-text"),this.element.trigger("blur"))}.bind(this))},i.prototype._blur=function(){this.parent.removeClass("n2_field_text--focus")},i.prototype.change=function(){this.updateIsEmpty(),this.triggerOutsideChange()},i.prototype.insideChange=function(t){this.element.val(t),this.updateIsEmpty(),this.triggerInsideChange()},i.prototype.updateIsEmpty=function(){this.parent.toggleClass("n2_field_text--empty",this.isEmpty(this.element.val()))},i.prototype.isEmpty=function(t){return""===t},i.prototype.focus=function(t){this.connectedField?this.connectedField.focus(t):t&&this.element.focus().select()},i}),N2D("FormElementUnits",["FormElement"],function(s,t){function e(t,e){this.element=s("#"+t),this.$parent=this.element.parent(),this.options=this.$parent.find(".n2_field_unit__unit"),this.currentUnit=this.$parent.find(".n2_field_unit__current_unit"),this.values=e;for(var i=0;i').attr({unselectable:"on"}).on({wheel:function(t){t.stopPropagation()}});for(var t=this.options.source.call(this,this.ui()),e=0;e'+t[e]+"").on({mousedown:function(t){t.preventDefault()},click:function(t,e){this._trigger("select",e,{value:t}),this.hide()}.bind(this,t[e])}).appendTo(this.$list);this.isRendered=!0}return this.$list},e.prototype.ui=function(){return{}},e}),N2D("UIDraggableBar",["UIMouse"],function(i,t){"use strict";function e(t,e){this.element=t,this.widgetName=this.widgetName||"UIDraggable",this.widgetEventPrefix="drag",this.options=i.extend({drag:null,start:null,stop:null},this.options,e),N2Classes.UIMouse.prototype.constructor.apply(this,arguments),this._mouseInit()}return((e.prototype=Object.create(N2Classes.UIMouse.prototype)).constructor=e).prototype._mouseStart=function(t){return this.currentData=this.originalData={margin:parseInt(this.element.css("marginLeft"))},this.originalMousePosition={left:t.pageX},this.element.addClass("nui-draggable-dragging"),this._trigger("start",t,this.ui()),this._mouseDrag(t),!0},e.prototype._mouseDrag=function(t){var e=t.pageX-this.originalMousePosition.left||0;return this.currentData={},this.currentData.margin=Math.max(0,this.originalData.margin+e),this._trigger("drag",t,this.ui()),this.element.css("marginLeft",this.currentData.margin+"px"),!0},e.prototype._mouseStop=function(t){return this._trigger("stop",t,this.ui()),!0},e.prototype.ui=function(){return{currentData:this.currentData}},e}),N2D("UIDraggableDelay",["UIMouse"],function(i,t){"use strict";function e(t,e){this.element=t,this.widgetName=this.widgetName||"UIDraggable",this.widgetEventPrefix="drag",this.options=i.extend({drag:null,start:null,stop:null},this.options,e),N2Classes.UIMouse.prototype.constructor.apply(this,arguments),this._mouseInit()}return((e.prototype=Object.create(N2Classes.UIMouse.prototype)).constructor=e).prototype._mouseStart=function(t){return this.currentData=this.originalData={width:parseInt(this.element.width())},this.originalMousePosition={left:t.pageX},this.element.addClass("nui-draggable-dragging"),this._trigger("start",t,this.ui()),this._mouseDrag(t),!0},e.prototype._mouseDrag=function(t){var e=t.pageX-this.originalMousePosition.left||0;return this.currentData={},this.currentData.width=Math.max(0,this.originalData.width+e),this._trigger("drag",t,this.ui()),this.element.width(this.currentData.width+"px"),!0},e.prototype._mouseStop=function(t){return this._trigger("stop",t,this.ui()),!0},e.prototype.ui=function(){return{currentData:this.currentData}},e}),N2D("UIDraggable",["UIMouse"],function(o,t){"use strict";function e(t,e){this.element=t,this.widgetName=this.widgetName||"UIDraggable",this.widgetEventPrefix="drag",this.options=o.extend(!0,{addClasses:!0,appendTo:"parent",axis:!1,containment:!1,cursor:"auto",cursorAt:!1,handle:!1,helper:"original",scroll:!0,scrollSensitivity:20,scrollSpeed:20,min:{top:!1,left:!1},drag:null,start:null,stop:null},this.options,e),N2Classes.UIMouse.prototype.constructor.apply(this,arguments),this.create()}((e.prototype=Object.create(N2Classes.UIMouse.prototype)).constructor=e).prototype.create=function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this.element.addClass("nui-draggable"),this._setHandleClassName(),this._mouseInit()},e.prototype._setPositionRelative=function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},e.prototype._getHandle=function(t){return!this.options.handle||!!o(t.target).closest(this.element.find(this.options.handle)).length},e.prototype._setHandleClassName=function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("nui-draggable-handle")},e.prototype._mouseCapture=function(t){var e=this.options;return!(this.helper||e.disabled||0i[2]&&(r=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(a=i[3]+this.offset.click.top)),"y"===n.axis&&(r=this.originalPageX),"x"===n.axis&&(a=this.originalPageY)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:o?0:this.offset.scroll.top),left:r-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:o?0:this.offset.scroll.left)}},e.prototype._clear=function(){this.helper.removeClass("nui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()};return e.prototype._blurActiveElement=function(t){var e=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return i||(i=e.body),i.nodeName||(i=e.body),i}(this.document[0]);o(t.target).closest(e).length||function(t){t&&"body"!==t.nodeName.toLowerCase()&&o(t).trigger("blur")}(e)},e}),N2D("UIFileUpload",["UIWidgetBase"],function(m,v){"use strict";function t(i){var s="dragover"===i;return function(t){t.dataTransfer=t.originalEvent&&t.originalEvent.dataTransfer;var e=t.dataTransfer;e&&-1!==e.types.indexOf("Files")&&!1!==this._trigger(i,m.Event(i,{delegatedEvent:t}))&&(t.preventDefault(),s&&(e.dropEffect="copy"))}}function e(t,e){this.element=t,this.widgetName=this.widgetName||"UIFileUpload",this.options=m.extend({dropZone:m(document),pasteZone:v,fileInput:v,replaceFileInput:!0,paramName:v,singleFileUploads:!0,limitMultiFileUploads:v,limitMultiFileUploadSize:v,limitMultiFileUploadSizeOverhead:512,sequentialUploads:!1,limitConcurrentUploads:v,forceIframeTransport:!1,redirect:v,redirectParamName:v,postMessage:v,multipart:!0,maxChunkSize:v,uploadedBytes:v,recalculateProgress:!0,progressInterval:100,bitrateInterval:500,autoUpload:!0,messages:{uploadedBytes:"Uploaded bytes exceed file size"},i18n:function(i,t){return i=this.messages[i]||i.toString(),t&&m.each(t,function(t,e){i=i.replace("{"+t+"}",e)}),i},formData:function(t){return t.serializeArray()},add:function(t,e){if(t.isDefaultPrevented())return!1;(e.autoUpload||!1!==e.autoUpload&&m(this).UIFileUpload("option","autoUpload"))&&e.process().done(function(){e.submit()})},processData:!1,contentType:!1,cache:!1},this.options,e),N2Classes.UIWidgetBase.prototype.constructor.apply(this,arguments),this._specialOptions=["fileInput","dropZone","pasteZone","multipart","forceIframeTransport"],this.create()}return m.support.fileInput=!(new RegExp("(Android (1\\.[0156]|2\\.[01]))|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)|(w(eb)?OSBrowser)|(webOS)|(Kindle/(1\\.0|2\\.[05]|3\\.0))").test(window.navigator.userAgent)||m(' ').prop("disabled")),m.support.xhrFileUpload=!(!window.ProgressEvent||!window.FileReader),m.support.xhrFormDataFileUpload=!!window.FormData,m.support.blobSlice=window.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice),((e.prototype=Object.create(N2Classes.UIWidgetBase.prototype)).constructor=e).prototype._blobSlice=m.support.blobSlice&&function(){return(this.slice||this.webkitSlice||this.mozSlice).apply(this,arguments)},e.prototype._BitrateTimer=function(){this.timestamp=Date.now?Date.now():(new Date).getTime(),this.loaded=0,this.bitrate=0,this.getBitrate=function(t,e,i){var s=t-this.timestamp;return this.bitrate&&i&&!(i ").prop("href",t.url).prop("host");t.dataType="iframe "+(t.dataType||""),t.formData=this._getFormData(t),t.redirect&&e&&e!==location.host&&t.formData.push({name:t.redirectParamName||"redirect",value:t.redirect})},e.prototype._initDataSettings=function(t){this._isXHRUpload(t)?(this._chunkedUpload(t,!0)||(t.data||this._initXHRData(t),this._initProgressListener(t)),t.postMessage&&(t.dataType="postmessage "+(t.dataType||""))):this._initIframeSettings(t)},e.prototype._getParamName=function(t){var e=m(t.fileInput),s=t.paramName;return s?Array.isArray(s)||(s=[s]):(s=[],e.each(function(){for(var t=m(this),e=t.prop("name")||"files[]",i=(t.prop("files")||[1]).length;i;)s.push(e),i-=1}),s.length||(s=[e.prop("name")||"files[]"])),s},e.prototype._initFormSettings=function(t){t.form&&t.form.length||(t.form=m(t.fileInput.prop("form")),t.form.length||(t.form=m(this.options.fileInput.prop("form")))),t.paramName=this._getParamName(t),t.url||(t.url=t.form.prop("action")||location.href),t.type=(t.type||"string"==typeof t.form.prop("method")&&t.form.prop("method")||"").toUpperCase(),"POST"!==t.type&&"PUT"!==t.type&&"PATCH"!==t.type&&(t.type="POST"),t.formAcceptCharset||(t.formAcceptCharset=t.form.attr("accept-charset"))},e.prototype._getAJAXSettings=function(t){var e=m.extend({},this.options,t);return this._initFormSettings(e),this._initDataSettings(e),e},e.prototype._getDeferredState=function(t){return t.state?t.state():t.isResolved()?"resolved":t.isRejected()?"rejected":"pending"},e.prototype._enhancePromise=function(t){return t},e.prototype._getXHRPromise=function(t,e,i){var s=m.Deferred(),n=s.promise();return e=e||this.options.context||n,!0===t?s.resolveWith(e,i):!1===t&&s.rejectWith(e,i),n.abort=s.promise,this._enhancePromise(n)},e.prototype._addConvenienceMethods=function(t,i){function s(t){return m.Deferred().resolveWith(n,t).promise()}var n=this;i.process=function(t,e){return(t||e)&&(i._processQueue=this._processQueue=(this._processQueue||s([this])).then(function(){return i.errorThrown?m.Deferred().rejectWith(n,[i]).promise():s(arguments)}).then(t,e)),this._processQueue||s([this])},i.submit=function(){return"pending"!==this.state()&&(i.jqXHR=this.jqXHR=!1!==n._trigger("submit",m.Event("submit",{delegatedEvent:t}),this)&&n._onSend(t,this)),this.jqXHR||n._getXHRPromise()},i.abort=function(){return this.jqXHR?this.jqXHR.abort():(this.errorThrown="abort",n._trigger("fail",null,this),n._getXHRPromise(!1))},i.state=function(){return this.jqXHR?n._getDeferredState(this.jqXHR):this._processQueue?n._getDeferredState(this._processQueue):void 0},i.processing=function(){return!this.jqXHR&&this._processQueue&&"pending"===n._getDeferredState(this._processQueue)},i.progress=function(){return this._progress},i.response=function(){return this._response}},e.prototype._getUploadedBytes=function(t){var e=t.getResponseHeader("Range"),i=e&&e.split("-"),s=i&&1a._sending)for(var s=a._slots.shift();s;){if("pending"===a._getDeferredState(s)){s.resolve();break}s=a._slots.shift()}0===a._active&&a._trigger("stop")})}var s,n,o,r,a=this,l=a._getAJAXSettings(e);return this._beforeSend(t,l),this.options.sequentialUploads||this.options.limitConcurrentUploads&&this.options.limitConcurrentUploads<=this._sending?((r=1p||c&&c<=e+1-y)&&(r.push(h.slice(y,e+1)),(t=g.slice(y,e+1)).length||(t=g),o.push(t),y=e+1,f=0);else o=g;else for(r=[],o=[],e=0;e").append(s)[0].reset(),i.after(s).detach(),m.cleanData(i.off("remove")),this.options.fileInput=this.options.fileInput.map(function(t,e){return e===i[0]?s[0]:e}),i[0]===this.element[0]&&(this.element=s)},e.prototype._handleFileTreeEntry=function(e,i){function s(t){t&&!t.entry&&(t.entry=e),o.resolve([t])}var t,n=this,o=m.Deferred(),r=function(){t.readEntries(function(t){t.length?(a=a.concat(t),r()):function(t){n._handleFileTreeEntries(t,i+e.name+"/").done(function(t){o.resolve(t)}).fail(s)}(a)},s)},a=[];return i=i||"",e.isFile?e._file?(e._file.relativePath=i,o.resolve(e._file)):e.file(function(t){t.relativePath=i,o.resolve(t)},s):e.isDirectory?(t=e.createReader(),r()):o.resolve([]),o.promise()},e.prototype._handleFileTreeEntries=function(t,e){var i=this;return m.when.apply(m,m.map(t,function(t){return i._handleFileTreeEntry(t,e)})).then(function(){return Array.prototype.concat.apply([],arguments)})},e.prototype._getDroppedFiles=function(t){var e=(t=t||{}).items;return e&&e.length&&(e[0].webkitGetAsEntry||e[0].getAsEntry)?this._handleFileTreeEntries(m.map(e,function(t){var e;return t.webkitGetAsEntry?((e=t.webkitGetAsEntry())&&(e._file=t.getAsFile()),e):t.getAsEntry()})):m.Deferred().resolve(m.makeArray(t.files)).promise()},e.prototype._getSingleFileInputFiles=function(t){var e,i,s=(t=m(t)).prop("webkitEntries")||t.prop("entries");if(s&&s.length)return this._handleFileTreeEntries(s);if((e=m.makeArray(t.prop("files"))).length)e[0].name===v&&e[0].fileName&&m.each(e,function(t,e){e.name=e.fileName,e.size=e.fileSize});else{if(!(i=t.prop("value")))return m.Deferred().resolve([]).promise();e=[{name:i.replace(/^.*\\/,"")}]}return m.Deferred().resolve(e).promise()},e.prototype._getFileInputFiles=function(t){return t instanceof m&&1!==t.length?m.when.apply(m,m.map(t,this._getSingleFileInputFiles)).then(function(){return Array.prototype.concat.apply([],arguments)}):this._getSingleFileInputFiles(t)},e.prototype._onChange=function(e){var i=this,s={fileInput:m(e.target),form:m(e.target.form)};this._getFileInputFiles(s.fileInput).always(function(t){s.files=t,i.options.replaceFileInput&&i._replaceFileInput(s),!1!==i._trigger("change",m.Event("change",{delegatedEvent:e}),s)&&i._onAdd(e,s)})},e.prototype._onPaste=function(t){var e=t.originalEvent&&t.originalEvent.clipboardData&&t.originalEvent.clipboardData.items,s={files:[]};e&&e.length&&(m.each(e,function(t,e){var i=e.getAsFile&&e.getAsFile();i&&s.files.push(i)}),!1!==this._trigger("paste",m.Event("paste",{delegatedEvent:t}),s)&&this._onAdd(t,s))},e.prototype._onDrop=function(e){e.dataTransfer=e.originalEvent&&e.originalEvent.dataTransfer;var i=this,t=e.dataTransfer,s={};t&&t.files&&t.files.length&&(e.preventDefault(),e.stopPropagation(),this._getDroppedFiles(t).always(function(t){s.files=t,!1!==i._trigger("drop",m.Event("drop",{delegatedEvent:e}),s)&&i._onAdd(e,s)}))},e.prototype._onDragOver=t("dragover"),e.prototype._onDragEnter=t("dragenter"),e.prototype._onDragLeave=t("dragleave"),e.prototype._initEventHandlers=function(){this._isXHRUpload(this.options)&&(m(this.options.dropZone).on({dragover:this._onDragOver.bind(this),drop:this._onDrop.bind(this),dragenter:this._onDragEnter.bind(this),dragleave:this._onDragLeave.bind(this)}),m(this.options.pasteZone).on({paste:this._onPaste.bind(this)})),m.support.fileInput&&m(this.options.fileInput).on({change:this._onChange.bind(this)})},e.prototype._destroyEventHandlers=function(){m(this.options.dropZone).off("dragenter dragleave dragover drop"),m(this.options.pasteZone).off("paste"),m(this.options.fileInput).off("change")},e.prototype.setOption=function(t,e){var i=-1!==this._specialOptions.indexOf(t);i&&this._destroyEventHandlers(),N2Classes.UIWidgetBase.prototype.setOption.apply(this,arguments),i&&(this._initSpecialOptions(),this._initEventHandlers())},e.prototype._initSpecialOptions=function(){var t=this.options;t.fileInput===v?t.fileInput=this.element.is('input[type="file"]')?this.element:this.element.find('input[type="file"]'):t.fileInput instanceof m||(t.fileInput=m(t.fileInput)),t.dropZone instanceof m||(t.dropZone=m(t.dropZone)),t.pasteZone instanceof m||(t.pasteZone=m(t.pasteZone))},e.prototype._getRegExp=function(t){var e=t.split("/"),i=e.pop();return e.shift(),new RegExp(e.join("/"),i)},e.prototype._isRegExpOption=function(t,e){return"url"!==t&&"string"==typeof e&&/^\/.*\/[igm]{0,3}$/.test(e)},e.prototype._initDataAttributes=function(){var n=this,o=this.options,r=this.element.data();m.each(this.element[0].attributes,function(t,e){var i,s=e.name.toLowerCase();/^data-/.test(s)&&(s=s.slice(5).replace(/-[a-z]/g,function(t){return t.charAt(1).toUpperCase()}),i=r[s],n._isRegExpOption(s,i)&&(i=n._getRegExp(i)),o[s]=i)})},e.prototype.create=function(){this._initDataAttributes(),this._initSpecialOptions(),this._slots=[],this._sequence=this._getXHRPromise(!0),this._sending=this._active=0,this._initProgressObject(this),this._initEventHandlers()},e.prototype.active=function(){return this._active},e.prototype.progress=function(){return this._progress},e.prototype.add=function(e){var i=this;e&&!this.options.disabled&&(e.fileInput&&!e.files?this._getFileInputFiles(e.fileInput).always(function(t){e.files=t,i._onAdd(null,e)}):(e.files=m.makeArray(e.files),this._onAdd(null,e)))},e.prototype.send=function(e){if(e&&!this.options.disabled){if(e.fileInput&&!e.files){var i,s,n=this,o=m.Deferred(),t=o.promise();return t.abort=function(){return s=!0,i?i.abort():(o.reject(null,"abort","abort"),t)},this._getFileInputFiles(e.fileInput).always(function(t){s||(t.length?(e.files=t,(i=n._onSend(null,e)).then(function(t,e,i){o.resolve(t,e,i)},function(t,e,i){o.reject(t,e,i)})):o.reject())}),this._enhancePromise(t)}if(e.files=m.makeArray(e.files),e.files.length)return this._onSend(null,e)}return this._getXHRPromise(!1,e&&e.context)},e}),N2D("ajaxTransportIframe",function(l,h){"use strict";var s=0;l.ajaxTransport("iframe",function(n){if(n.async){var o,r,e,a=n.initialIframeSrc||"javascript:false;";return{send:function(t,i){(o=l('')).attr("accept-charset",n.formAcceptCharset),e=/\?/.test(n.url)?"&":"?","DELETE"===n.type?(n.url=n.url+e+"_method=DELETE",n.type="POST"):"PUT"===n.type?(n.url=n.url+e+"_method=PUT",n.type="POST"):"PATCH"===n.type&&(n.url=n.url+e+"_method=PATCH",n.type="POST"),r=l('').on("load",function(){var s,e=Array.isArray(n.paramName)?n.paramName:[n.paramName];r.off("load").on("load",function(){var e;try{if(!(e=r.contents()).length||!e[0].firstChild)throw new Error}catch(t){e=h}i(200,"success",{iframe:e}),l('').appendTo(o),window.setTimeout(function(){o.remove()},0)}),o.prop("target",r.prop("name")).prop("action",n.url).prop("method",n.type),n.formData&&l.each(n.formData,function(t,e){l(' ').prop("name",e.name).val(e.value).appendTo(o)}),n.fileInput&&n.fileInput.length&&"POST"===n.type&&(s=n.fileInput.clone(),n.fileInput.after(function(t){return s[t]}),n.paramName&&n.fileInput.each(function(t){l(this).prop("name",e[t]||n.paramName)}),o.append(n.fileInput).prop("enctype","multipart/form-data").prop("encoding","multipart/form-data"),n.fileInput.removeAttr("form")),o.trigger("submit"),s&&s.length&&n.fileInput.each(function(t,e){var i=l(s[t]);l(e).prop("name",i.prop("name")).attr("form",i.attr("form")),i.replaceWith(e)})}),o.append(r).appendTo(document.body)},abort:function(){r&&r.off("load").prop("src",a),o&&o.remove()}}}}),l.ajaxSetup({converters:{"iframe text":function(t){return t&&l(t[0].body).text()},"iframe json":function(t){return t&&JSON.parse(l(t[0].body).text())},"iframe html":function(t){return t&&l(t[0].body).html()},"iframe xml":function(t){var e=t&&t[0];return e&&l.isXMLDoc(e)?e:l.parseXML(e.XMLDocument&&e.XMLDocument.xml||l(e.body).html())},"iframe script":function(t){return t&&l.globalEval(l(t[0].body).text())}}})}),N2D("UILayerWindow",["UIMouse"],function(i,t){"use strict";function e(t,e){this.element=t,this.widgetName=this.widgetName||"UILayerWindow",this.widgetEventPrefix="layerWindow",this.options=i.extend(!0,{},this.options,e),N2Classes.UIMouse.prototype.constructor.apply(this,arguments),this.create()}return((e.prototype=Object.create(N2Classes.UIMouse.prototype)).constructor=e).prototype.create=function(){this.bodyRect=document.body.getBoundingClientRect(),window.addEventListener("resize",function(){this.bodyRect=document.body.getBoundingClientRect(),this.limitHorizontal(this.left,this.width,!0),this.limitVertical(this.top,this.height,!0)}.bind(this),{passive:!0}),this.left=parseInt(localStorage.getItem("ssPanelLeft")),this.left||(this.left=200),this.top=parseInt(localStorage.getItem("ssPanelTop")),this.top||(this.top=100),this.width=355,this.height=parseInt(localStorage.getItem("ssPanelHeight")),this.height||(this.height=400),this.limitHorizontal(this.left,this.width),this.limitVertical(this.top,this.height),this._setupHandles(),this._mouseInit()},e.prototype._setupHandles=function(){this.$title=this.element.find(".n2_ss_layer_window__title_inner").on("mousedown",this._mouseDown.bind(this)),this.$resize=i('
').on("mousedown",this._mouseDown.bind(this)).appendTo(this.element)},e.prototype._mouseInit=function(){},e.prototype._mouseCapture=function(t){return this.$title.is(t.target)?(this.currentAction="move",!0):!!this.$resize.is(t.target)&&(this.currentAction="resize",!0)},e.prototype._mouseStart=function(t){var e=this.element[0].getBoundingClientRect();this.context={},"move"===this.currentAction?this.context.mouseDiff={x:t.clientX-e.left,y:t.clientY-e.top}:"resize"===this.currentAction&&(this.context.mouseDiff={y:t.clientY-e.top-e.height})},e.prototype._mouseDrag=function(t){"move"===this.currentAction?(this.limitHorizontal(t.clientX-this.context.mouseDiff.x,this.width),this.limitVertical(t.clientY-this.context.mouseDiff.y,this.height)):"resize"===this.currentAction&&this.limitVertical(this.top,t.clientY-this.top-this.context.mouseDiff.y)},e.prototype._mouseStop=function(t){"move"===this.currentAction?(this.limitHorizontal(t.clientX-this.context.mouseDiff.x,this.width,!0),this.limitVertical(t.clientY-this.context.mouseDiff.y,this.height,!0)):"resize"===this.currentAction&&this.limitVertical(this.top,t.clientY-this.top-this.context.mouseDiff.y,!0),delete this.currentAction},e.prototype.limitVertical=function(t,e,i){this.height=e,this.top=Math.min(Math.max(t,60),this.bodyRect.height-this.height),this.top<60&&(this.height=this.height+this.top-60,this.top=60),this.height=Math.max(this.height,200),this.element.css({top:this.top+"px",height:this.height+"px"}),i&&(localStorage.setItem("ssPanelTop",this.top),localStorage.setItem("ssPanelHeight",this.height))},e.prototype.limitHorizontal=function(t,e,i){this.left=Math.min(Math.max(t,50),this.bodyRect.width-e),this.element.css({left:this.left+"px"}),i&&localStorage.setItem("ssPanelLeft",this.left)},e}),N2D("UIMouse",["UIWidgetBase"],function(n,t){"use strict";var e=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),o=!1;function i(t,e){this.widgetName=this.widgetName||"UIMouse",this.options=n.extend({cancel:"input, textarea, button, select, option",distance:1,delay:0},this.options),N2Classes.UIWidgetBase.prototype.constructor.apply(this,arguments)}return n(document).on("mouseup",function(){o=!1}),((i.prototype=Object.create(N2Classes.UIWidgetBase.prototype)).constructor=i).prototype._mouseInit=function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(t){if(!0===n.data(t.target,e.widgetName+".preventClickEvent"))return n.removeData(t.target,e.widgetName+".preventClickEvent"),t.stopImmediatePropagation(),!1})},i.prototype._mouseDestroy=function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},i.prototype._mouseDown=function(t){if(!o){document.activeElement&&document.activeElement!==document.body&&document.activeElement.blur(),this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var e=this,i=1===t.which,s=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&n(t.target).closest(this.options.cancel).length;return!(i&&!s&&this._mouseCapture(t))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?(t.preventDefault(),!0):(!0===n.data(t.target,this.widgetName+".preventClickEvent")&&n.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return e._mouseMove(t)},this._mouseUpDelegate=function(t){return e._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),o=!0))}},i.prototype._mouseMove=function(t){if(this._mouseMoved){if(e&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},i.prototype._mouseUp=function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted?(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&n.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)):this._mouseCancel(t),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,o=!1,t.preventDefault()},i.prototype._mouseDistanceMet=function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},i.prototype._mouseDelayMet=function(){return this.mouseDelayMet},i.prototype._mouseStart=function(){},i.prototype._mouseDrag=function(){},i.prototype._mouseStop=function(){},i.prototype._mouseCancel=function(){},i.prototype._mouseCapture=function(){return!0},i}),N2D("UIResizeBar",["UIMouse"],function(n,t){"use strict";function e(t,e){this.element=t,this.widgetName=this.widgetName||"UIResizable",this.widgetEventPrefix="resize",this.options=n.extend({resize:null,start:null,stop:null},this.options,e),N2Classes.UIMouse.prototype.constructor.apply(this,arguments),this.create()}return((e.prototype=Object.create(N2Classes.UIMouse.prototype)).constructor=e).prototype.create=function(){this.options;this.element.addClass("nui_resize_bar"),this._setupHandles(),this._mouseInit(),this._trigger("create",null,{})},e.prototype._setupHandles=function(){var t=["e","w"];this.handles={},this.$handles=n();for(var e=0;e").addClass("nui_resize_bar__handle nui_resize_bar__handle--"+i).on({mousedown:function(t,e){this.currentHandle=t,this._mouseDown(e)}.bind(this,i)}).appendTo(this.element);this.handles[i]=s,this.$handles=this.$handles.add(s)}},e.prototype._mouseStart=function(t){this.currentData=this.originalData={margin:parseInt(this.element.css("marginLeft")),width:parseInt(this.element.width())},this.originalMousePosition={left:t.pageX};var e=this.handles[this.currentHandle].css("cursor");return n("body").css("cursor",e),this._trigger("start",t,this.ui()),!0},e.prototype._mouseDrag=function(t){var e=t.pageX-this.originalMousePosition.left||0;this.currentData={},"e"===this.currentHandle?(this.currentData.margin=this.originalData.margin,this.currentData.width=Math.max(0,this.originalData.width+e)):"w"===this.currentHandle&&(this.currentData.margin=Math.max(0,this.originalData.margin+e),this.currentData.width=Math.max(0,this.originalData.width-e)),this.currentData.width=Math.max(0,this.currentData.width),this._trigger("resize",t,this.ui()),this.element.css("marginLeft",this.currentData.margin+"px"),this.element.css("width",this.currentData.width+"px")},e.prototype._mouseStop=function(t){n("body").css("cursor","auto"),this._trigger("stop",t,this.ui())},e.prototype.ui=function(){return{currentData:this.currentData}},e}),N2D("UISlider",["UIMouse"],function(i,e){"use strict";function t(t,e){this.element=i(t),this.widgetName=this.widgetName||"UISlider",this.widgetEventPrefix="sliding",this.options=i.extend({min:0,max:100,step:1,value:0,change:null,sliding:null,start:null,stop:null},this.options,e),N2Classes.UIMouse.prototype.constructor.apply(this,arguments),this.create()}return((t.prototype=Object.create(N2Classes.UIMouse.prototype)).constructor=t).prototype.create=function(){this._mouseSliding=!1,this._mouseInit(),this._calculateNewMax(),this.element.addClass("nui-slider nui-slider-horizontal"),this._refresh()},t.prototype.doAction=function(t){switch(N2Classes.UIWidgetBase.prototype.doAction.apply(this,arguments),t){case"value":return this._value()}},t.prototype.setOption=function(t,e){switch(N2Classes.UIWidgetBase.prototype.setOption.call(this,t,e),t){case"value":this._refreshValue(),this._change(null,0);break;case"step":case"min":case"max":this._calculateNewMax(),this._refreshValue()}},t.prototype._refresh=function(){this._createHandle(),this._refreshValue()},t.prototype._createHandle=function(){var t=this.element.find(".nui-slider-handle");t.length?this.handle=t:this.handle=i(" "),this.handle.addClass("nui-slider-handle").appendTo(this.element)},t.prototype._mouseCapture=function(t){var e,i,s=this.handle;return!this.options.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e),!1!==this._start(t)&&(this._mouseSliding=!0,s.trigger("focus"),this._slide(t,i),!0))},t.prototype._mouseStart=function(){return this.lastValue=Number.MAX_VALUE,!0},t.prototype._mouseDrag=function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this.lastValue!=i&&(this._slide(t,i),this.lastValue=i),!1},t.prototype._mouseStop=function(t){return this._mouseSliding=!1,this._stop(t),this._change(t),!1},t.prototype._mouseCancel=function(t){this._trigger("cancel",t)},t.prototype._normValueFromMouse=function(t){var e,i,s,n;return e=this.elementSize.width,1<(i=(t.x-this.elementOffset.left)/e)&&(i=1),i<0&&(i=0),s=this._valueMax()-this._valueMin(),n=this._valueMin()+i*s,this._trimAlignValue(n)},t.prototype._trimAlignValue=function(t){if(t<=this._valueMin())return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=0=e&&(s+=0this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},t.prototype._precision=function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},t.prototype._precisionOf=function(t){var e=t.toString(),i=e.indexOf(".");return-1===i?0:e.length-i-1},t.prototype._change=function(t){this._mouseSliding||this._trigger("change",t,this._uiHash())},t.prototype.value=function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},t.prototype._value=function(){var t=this.options.value;return t=this._trimAlignValue(t)},t.prototype._valueMin=function(){return this.options.min},t.prototype._valueMax=function(){return this.max},t.prototype._refreshValue=function(){var t=this.value(),e=this._valueMin(),i=this._valueMax(),s=i!==e?(t-e)/(i-e)*100:0;this.handle.css("left",s+"%")},t.prototype._uiHash=function(t){return{handle:this.handle[0],value:t!==e?t:this.value()}},t.prototype._start=function(t){return this._trigger("start",t,this._uiHash())},t.prototype._slide=function(t,e){e!==this.value()&&!1!==this._trigger("sliding",t,this._uiHash(e))&&this.value(e)},t.prototype._stop=function(t){this._trigger("stop",t,this._uiHash())},t}),N2D("UISortable",["UIMouse"],function(a,t){"use strict";function e(t,e){this.element=t,this.widgetName=this.widgetName||"UISortable",this.widgetEventPrefix="sortable",this.options=a.extend({items:"> *",handle:"",placeholder:!1,helper:"original",forcePlaceholderSize:!1,forceHelperSize:!1,axis:!1,droppables:!1},this.options,e),this.isOver=!1,N2Classes.UIMouse.prototype.constructor.apply(this,arguments),this.create()}return((e.prototype=Object.create(N2Classes.UIMouse.prototype)).constructor=e).prototype.create=function(){this._mouseInit()},e.prototype._mouseCapture=function(t){if(this.options.disabled)return!1;var e=null,i=a(t.target);if(""!==this.options.handle){var s=this.element.find(this.options.items+" "+this.options.handle);if(-1===s.index(i)&&!s.has(i).length)return!1}var n=this.element.find(this.options.items);return!!(e=-1!==n.index(i)?i:n.has(i)).length&&(this.currentItem=e,!0)},e.prototype._mouseStart=function(t){this._trigger("beforestart",t,{currentItem:this.currentItem}),this.context={e:t,original:{pageX:t.pageX,pageY:t.pageY,clientX:t.clientX,clientY:t.clientY,elementBCR:this.element[0].getBoundingClientRect(),currentItemBCR:this.currentItem[0].getBoundingClientRect()},offsetShift:{top:0,left:0},scrollCB:this._mouseScroll.bind(this)},this.element.addClass("n2-ui-sortable-in-progress"),this._cacheItems(),this.placeholder=a("
").addClass(this.options.placeholder||this.currentItem[0].className);var e={width:this.currentItem.width()+"px",height:this.currentItem.height()+"px"};"clone"===this.options.helper?this.helper=this.currentItem.clone():"clone_hide"===this.options.helper?(this.helper=this.currentItem.clone(),this.currentItem.css("display","none")):this.helper=this.currentItem,this.options.forceHelperSize&&this.helper.css(e),this.options.forcePlaceholderSize&&this.placeholder.css(e),this.helper.addClass("n2-ui-sortable-helper").css({position:"absolute",zIndex:"1000"}).appendTo(this.element),this._trigger("start",t,this.ui()),window.addEventListener("scroll",this.context.scrollCB,{capture:!0,passive:!0})},e.prototype._mouseDrag=function(t){this.context.e=t;var e=this.element[0].getBoundingClientRect(),i={};if(!this.options.axis||"x"===this.options.axis){var s=e.left+this.context.original.clientX-t.clientX;this.context.offsetShift.left=t.pageX-this.context.original.pageX-this.context.original.elementBCR.left+s,i.left=this.context.original.currentItemBCR.left-s+"px"}if(!this.options.axis||"y"===this.options.axis){var n=e.top+this.context.original.clientY-t.clientY;this.context.offsetShift.top=t.pageY-this.context.original.pageY-this.context.original.elementBCR.top+n,i.top=this.context.original.currentItemBCR.top-n+"px"}this.helper.css(i);var o=this._findClosestItem(t),r="before"===o[1]?this.items[Math.max(0,o[2]-1)]:this.items[Math.min(this.items.length-1,o[2])];"clone"===this.options.helper&&(o[0].is(this.currentItem)||a(r).is(this.currentItem))?this.placeholder.detach():this.positionPlaceholder(o),this.options.droppables&&("over"!==o[1]?this.isOver&&(this._trigger("out",t,this.ui()),this.isOver=!1):(this.isOver&&!this.isOver.is(o[0])&&(this._trigger("out",t,this.ui()),this.isOver=!1),this.isOver||(this.isOver=o[0],this._trigger("over",t,this.ui()))))},e.prototype.positionPlaceholder=function(t){switch(t[1]){case"before":this.placeholder.insertBefore(t[0]);break;case"after":this.placeholder.insertAfter(t[0]);break;case"over":this.placeholder.detach()}},e.prototype._mouseStop=function(t){this.context.e=t,this._trigger("beforestop",t,this.ui()),window.removeEventListener("scroll",this.context.scrollCB,{capture:!0,passive:!0}),this.placeholder.remove();var e=this._findClosestItem(t);switch(e[1]){case"before":this.currentItem.insertBefore(e[0]);break;case"after":this.currentItem.insertAfter(e[0])}this.helper.removeClass("n2-ui-sortable-helper").css({position:"",zIndex:"",left:"",top:""}),"clone"!==this.options.helper&&"clone_hide"!==this.options.helper||this.helper.remove(),"clone_hide"===this.options.helper&&this.currentItem.css("display",""),this.element.removeClass("n2-ui-sortable-in-progress"),"over"===e[1]?(this._trigger("drop",t,this.ui()),this._trigger("out",t,this.ui())):this._trigger("stop",t,this.ui()),this.currentItem=null},e.prototype._findClosestItem=function(t){for(var e,i,s,n=Number.MAX_VALUE,o=t.pageX-this.context.offsetShift.left,r=t.pageY-this.context.offsetShift.top,a=0;a').append(t('
').text(this.name).on("click",this.activate.bind(this))),this.isSystem()||this.row.append(t('
').append(t('
').on("click",this.delete.bind(this)))),this.row},i.prototype.setValue=function(t,e){N2Classes.NextendVisualWithSet.prototype.setValue.call(this,t,e),this.row&&this.row.find(".n2_fullscreen_editor__visual_label").text(this.name)},i.prototype.active=function(){this.row.addClass("n2_fullscreen_editor__visual--active"),N2Classes.NextendVisualWithSet.prototype.active.call(this)},i.prototype.notActive=function(){this.row.removeClass("n2_fullscreen_editor__visual--active"),N2Classes.NextendVisualWithSet.prototype.notActive.call(this)},i}),N2D("NextendVisualWithSetRowMultipleSelection",["NextendVisualWithSetRow"],function(e,t){function i(t,e,i){this.checked=!1,t.system=1,t.editable=0,N2Classes.NextendVisualWithSetRow.prototype.constructor.apply(this,arguments)}return((i.prototype=Object.create(N2Classes.NextendVisualWithSetRow.prototype)).constructor=i).prototype.createRow=function(){var t=N2Classes.NextendVisualWithSetRow.prototype.createRow.call(this);return this.checkbox=e('
').on("click",this.checkOrUnCheck.bind(this)).prependTo(t),t},i.prototype.setValue=function(t,e){this.name=t.name,this.value=t.data,this.row&&this.row.find(".n2_fullscreen_editor__visual_label").text(this.name),e&&this.render()},i.prototype.activate=function(t,e){t&&t.preventDefault(),this.visualManager.changeActiveVisual(this),this.visualManager.controller.setAnimationProperties(this.value)},i.prototype.checkOrUnCheck=function(t){t.preventDefault(),t.stopPropagation(),this.checked?this.unCheck():this.check()},i.prototype.check=function(){this.checked=!0,this.row.addClass("n2_fullscreen_editor__visual--selected"),this.activate()},i.prototype.unCheck=function(){this.checked=!1,this.row.removeClass("n2_fullscreen_editor__visual--selected"),this.activate()},i}),N2D("NextendVisualSetsManager",function(e,t){return function(t){this.visualManager=t,this.$=e(this)}}),N2D("NextendVisualSet",function(i,s){function t(t,e){this.set=t,this.visualManager=e,this.visualList=i('
'),this.visualManager.sets[t.id]=this,""!==t.referencekey&&(this.visualManager.setsByReference[t.referencekey]=t),this.visualManager.setsSelector&&(this.option=i(' ').text(t.value).appendTo(this.visualManager.setsSelector))}return t.prototype.active=function(){i.when(this._loadVisuals()).done(function(){this.visualList.appendTo(this.visualManager.visualListContainer)}.bind(this))},t.prototype.notActive=function(){this.visualList.detach()},t.prototype.loadVisuals=function(t){if(this.visuals===s){this.visuals={};for(var e=0;e').appendTo(this.lightbox.find(".n2_fullscreen_editor__content_sidebar")),this.parameters=t,this.visuals={},this.controller=this.initController(),this.controller&&(this.renderer=this.controller.renderer),this.firstLoadVisuals(t.visuals),this.lightbox.find(".n2_fullscreen_editor__save_as_new").on("click",this.saveAsNew.bind(this)),this.cancelButton=this.lightbox.find(".n2_fullscreen_editor__cancel").on("click",this.hide.bind(this)),this.saveButton=this.lightbox.find(".n2_fullscreen_editor__save"),this.setVisual!==n&&this.saveButton.on("click",this.setVisual.bind(this))}return t.prototype.loadDefaults=function(){this.mode="linked",this.labels={visual:"visual",visuals:"visuals"},this.visualLoadDeferreds={},this.showParameters=!1},t.prototype.firstLoadVisuals=function(t){for(var e in t)this.sets[e].loadVisuals(t[e])},t.prototype.initController=function(){},t.prototype.getVisual=function(t){if(0
'+t+"
"),s=t.split(".").pop();return"mp4"!==s&&"mp3"!==s?n('
').css("background-image","url("+encodeURI(nextend.imageHelper.fixed(e))+")").prependTo(i):n('
').prependTo(i),i}function e(t,e){this.url=t,this.uploadAllowed=parseInt(e),this.currentPath=localStorage.getItem("browsePath")||"";var i=null;this.node=n('
').on("dragover",function(t){null!==i?(clearTimeout(i),i=null):n(t.currentTarget).addClass("n2-drag-over"),i=setTimeout(function(){n(t.currentTarget).removeClass("n2-drag-over"),i=null},400)}),nextend.browse=this}return e.prototype.clear=function(){this.uiFileUpload&&this.uiFileUpload.destroy(),this.node.empty()},e.prototype.getNode=function(t,e){return this.clear(),this.node.attr("data-mode",t),"multiple"===(this.mode=t)&&(this.selected=[]),this.callback=e,this._loadPath(this.getCurrentFolder(),this._renderBoxes.bind(this)),this.node},e.prototype._renderBoxes=function(t){for(var e in this.clear(),localStorage.setItem("browsePath",this.getCurrentFolder()),n(''+n2_("Current path")+": "+t.fullPath+"
").appendTo(this.node),this.uploadAllowed&&this.initUpload(),""!==t.path&&n('
'+n2_("Parent directory")+"
").appendTo(this.node).on("click",function(t){this._loadPath(t,this._renderBoxes.bind(this))}.bind(this,t.path+"/..")),t.directories)t.directories.hasOwnProperty(e)&&n('").appendTo(this.node).on("click",function(t){this._loadPath(t,this._renderBoxes.bind(this))}.bind(this,t.directories[e]));for(var i in t.files)if(t.files.hasOwnProperty(i)){var s=o(i,t.files[i]).appendTo(this.node).on("click",this.clickImage.bind(this,t.files[i]));"multiple"===this.mode&&-1!==this.selected.indexOf(t.files[i])&&s.addClass("n2_modal_filesystem_box--active")}},e.prototype._loadPath=function(e,i){s[e]===t&&(s[e]=N2Classes.AjaxHelper.ajax({type:"POST",url:N2Classes.AjaxHelper.makeAjaxUrl(this.url),data:{path:e},dataType:"json"})),n.when(s[e]).done(function(t){this.currentPath=t.data.path,s[t.data.path]=t,s[e]=t,i(t.data)}.bind(this))},e.prototype.initUpload=function(){n('
').append('
').append('").appendTo(this.node),this.uiFileUpload=new N2Classes.UIFileUpload(this.node.find("#n2-browse-upload"),{url:N2Classes.AjaxHelper.makeAjaxUrl(this.url,{nextendaction:"upload"}),sequentialUploads:!0,dropZone:this.node,pasteZone:!1,dataType:"json",paramName:"image",add:function(t,e){e.box=n('').appendTo(this.node),e.formData={path:this.currentPath},e.submit()}.bind(this),progress:function(t,e){var i=parseInt(e.loaded/e.total*100,10);e.box.find(".n2_modal_filesystem_box__label").text(i+"%")},done:function(t,e){e.box.remove();var i=e.result;i.data&&i.data.name&&(s[i.data.path].data.files[i.data.name]=i.data.url,o(i.data.name,i.data.url).appendTo(this.node).on("click",this.clickImage.bind(this,i.data.url)),"multiple"===this.mode&&(this.selected.push(i.data.url),e.box.addClass("n2_modal_filesystem_box--active"))),N2Classes.AjaxHelper.notification(i)}.bind(this),fail:function(t,e){e.box.remove(),N2Classes.AjaxHelper.notification(e.jqXHR.responseJSON)}.bind(this)})},e.prototype.clickImage=function(t,e){if("single"===this.mode)this.callback(t);else if("multiple"===this.mode){var i=this.selected.indexOf(t);-1===i?(n(e.currentTarget).addClass("n2_modal_filesystem_box--active"),this.selected.push(t)):(n(e.currentTarget).removeClass("n2_modal_filesystem_box--active"),this.selected.splice(i,1))}},e.prototype.getSelected=function(){return this.selected},e.prototype.getCurrentFolder=function(){return this.currentPath},e}),N2D("IconPack",function(i,e){function t(t,e){this.currentQuery="",this.manager=t,this.data=e,this.$li=i(''+e.label+"
").on("click",function(t){t.preventDefault(),this.activate()}.bind(this)).appendTo(this.manager.$list)}return t.prototype.load=function(){this.data.isLoaded===e&&(i("head").append(" "),this.data.isLoaded=!0)},t.prototype.render=function(){if(this.table===e){for(var t in this.table=N2Classes.UI.modalFormTable(this.data.label),this.data.data)i(''+this._render(t)+"
").on("click",function(t){this.manager.selectIcon(i(t.currentTarget).data("identifier"),t)}.bind(this)).appendTo(this.table.$content);this.$icons=this.table.$content.find(".n2_modal_icons__icon")}},t.prototype.activate=function(){this.manager.activate(this),this.$li.addClass("n2_modal_icons__list_item--active"),this.load(),this.render(),this.search(this.manager.getQuery()),console.log(this.table.$table),this.manager.$content.append(this.table.$table)},t.prototype.search=function(t){if(this.currentQuery!==t)if(t.length<=1)this.$icons.css("display","");else{var e=this.$icons.filter("[data-kw*='"+t+"']");this.$icons.not(e).css("display","none"),e.css("display","")}this.currentQuery=t},t.prototype.deActivate=function(){this.$li.removeClass("n2_modal_icons__list_item--active"),this.table.$table.detach()},t.prototype._render=function(t){return this.data.isLigature?''+t+" ":' '},t.prototype.getIcon=function(t){return this.data.isLigature?{class:this.data.class,ligature:t}:{class:this.data.class+" "+this.data.prefix+t,ligature:""}},t}),N2D("Icons",function(s,o){function t(t){for(var e in(N2Classes.Icons=this).data=t,this.$list=s('
'),this.iconPacks={},this.data)this.iconPacks[this.data[e].id]=new N2Classes.IconPack(this,this.data[e]);this.defaultId=Object.keys(this.iconPacks)[0]}return t.prototype.render=function(t){var e=t.split(":");if(2!==e.length)return!1;var i=e[0],s=e[1];if(this.iconPacks[i]===o)return!1;var n=this.iconPacks[i];return n.data.data[s]!==o&&(n.load(),n.getIcon(s))},t.prototype.showModal=function(t,e){this.callback=t;var i=!1;this.modal===o&&(i=!0,this.startModal());var s=!1,n=e.split(":");this.iconPacks[n[0]]!==o&&(this.iconPacks[n[0]].activate(),s=!0),i&&!s&&this.iconPacks[this.defaultId].activate(),this.modal.show()},t.prototype.selectIcon=function(t,e){this.callback(t),this.modal.hide(e)},t.prototype.startModal=function(){this.modal=new N2Classes.ModalLightbox(n2_("Icons"),"icons");var t=s('');this.modal.addContent(t),this.$sidebar=s('').appendTo(t);var e=s('
').appendTo(this.$sidebar);this.$searchField=N2Classes.UI.modalFieldText(e,"search-icon",!1,"").attr("placeholder",n2_("Search")).on("keyup",function(t){this.activePack.search(this.$searchField.val())}.bind(this)),this.$list.appendTo(this.$sidebar);var i=s('
');this.$content=s('
').appendTo(i),this.modal.addContent(i)},t.prototype.activate=function(t){this.activePack!==o&&this.activePack.deActivate(),this.activePack=t},t.prototype.getQuery=function(){return this.$searchField.val()},t}),N2D("NextendFontServiceGoogle",function(n,s){function t(t,e,i,s){this.style=t,this.subset=e,this.fonts=i,this.loadedFamilies=s,n(window).on("n2Family",this.loadFamily.bind(this))}return t.prototype.loadFamily=function(t,e){var i=e.toLowerCase();return this.fonts[i]!==s&&-1===this.loadedFamilies.indexOf(this.fonts[i])?(n(" ").attr({rel:"stylesheet",type:"text/css",href:"//fonts.googleapis.com/css?family="+encodeURIComponent(this.fonts[i]+":"+this.style)+"&subset="+encodeURIComponent(this.subset)}).appendTo(n("head")),this.loadedFamilies.push(this.fonts[i]),this.fonts[i]):e},t}),N2D("NextendFontEditor",["NextendFragmentEditor"],function(t,e){function i(){N2Classes.NextendFragmentEditor.prototype.constructor.apply(this,arguments),this.fields={family:{element:t("#n2-font-editorfamily"),events:{"nextendChange.n2-editor":this.changeFamily.bind(this)}},color:{element:t("#n2-font-editorcolor"),events:{"outsideChange.n2-editor":this.changeColor.bind(this)}},size:{element:t("#n2-font-editorsize"),events:{"outsideChange.n2-editor":this.changeSize.bind(this)}},lineHeight:{element:t("#n2-font-editorlineheight"),events:{"outsideChange.n2-editor":this.changeLineHeight.bind(this)}},weight:{element:t("#n2-font-editorweight"),events:{"outsideChange.n2-editor":this.changeWeight.bind(this)}},decoration:{element:t("#n2-font-editordecoration"),events:{"outsideChange.n2-editor":this.changeDecoration.bind(this)}},align:{element:t("#n2-font-editortextalign"),events:{"outsideChange.n2-editor":this.changeAlign.bind(this)}},shadow:{element:t("#n2-font-editortshadow"),events:{"outsideChange.n2-editor":this.changeShadow.bind(this)}},letterSpacing:{element:t("#n2-font-editorletterspacing"),events:{"outsideChange.n2-editor":this.changeLetterSpacing.bind(this)}},wordSpacing:{element:t("#n2-font-editorwordspacing"),events:{"outsideChange.n2-editor":this.changeWordSpacing.bind(this)}},textTransform:{element:t("#n2-font-editortexttransform"),events:{"outsideChange.n2-editor":this.changeTextTransform.bind(this)}},css:{element:t("#n2-font-editorextracss"),events:{"outsideChange.n2-editor":this.changeCSS.bind(this)}}}}return((i.prototype=Object.create(N2Classes.NextendFragmentEditor.prototype)).constructor=i).prototype.load=function(t){this._off();var e=t.afont.split("||");this.fields.family.element.data("field").insideChange(e[0]),this.fields.color.element.data("field").insideChange(t.color),this.fields.size.element.data("field").insideChange(t.size.split("||").join("|*|")),this.fields.lineHeight.element.data("field").insideChange(t.lineheight),this.fields.weight.element.data("field").insideChange(t.weight),this.fields.decoration.element.data("field").insideChange([1==t.italic?"italic":"",1==t.underline?"underline":""].join("||")),this.fields.align.element.data("field").insideChange(t.align),this.fields.shadow.element.data("field").insideChange(t.tshadow.replace(/\|\|px/g,"")),this.fields.letterSpacing.element.data("field").insideChange(t.letterspacing),this.fields.wordSpacing.element.data("field").insideChange(t.wordspacing),this.fields.textTransform.element.data("field").insideChange(t.texttransform),this.fields.css.element.data("field").insideChange(t.extra),this._on()},i.prototype.changeFamily=function(){this.trigger("afont",this.fields.family.element.val())},i.prototype.changeColor=function(){this.trigger("color",this.fields.color.element.val())},i.prototype.changeSize=function(){this.trigger("size",this.fields.size.element.val().replace("|*|","||"))},i.prototype.changeLineHeight=function(){this.trigger("lineheight",this.fields.lineHeight.element.val())},i.prototype.changeWeight=function(){this.trigger("weight",this.fields.weight.element.val())},i.prototype.changeDecoration=function(){var t=this.fields.decoration.element.val(),e=0;-1!=t.indexOf("italic")&&(e=1),this.trigger("italic",e);var i=0;-1!=t.indexOf("underline")&&(i=1),this.trigger("underline",i)},i.prototype.changeAlign=function(){this.trigger("align",this.fields.align.element.val())},i.prototype.changeShadow=function(){this.trigger("tshadow",this.fields.shadow.element.val())},i.prototype.changeLetterSpacing=function(){this.trigger("letterspacing",this.fields.letterSpacing.element.val())},i.prototype.changeWordSpacing=function(){this.trigger("wordspacing",this.fields.wordSpacing.element.val())},i.prototype.changeTextTransform=function(){this.trigger("texttransform",this.fields.textTransform.element.val())},i.prototype.changeCSS=function(){this.trigger("extra",this.fields.css.element.val())},i}),N2D("NextendFontEditorController",["NextendFragmentEditorController"],function($,undefined){function NextendFontEditorController(){this.css=[],N2Classes.NextendFragmentEditorController.prototype.constructor.apply(this,arguments),this.preview=$('
').css("fontSize",N2Classes.CSSRendererFont.fontSize+"px").appendTo('.n2_form__table[data-field="table-font-preview"]'),this.initBackgroundColor()}return NextendFontEditorController.prototype=Object.create(N2Classes.NextendFragmentEditorController.prototype),NextendFontEditorController.prototype.constructor=NextendFontEditorController,NextendFontEditorController.prototype.loadDefaults=function(){N2Classes.NextendFragmentEditorController.prototype.loadDefaults.call(this),this.type="font",this.preview=null},NextendFontEditorController.prototype.initEditor=function(){return new N2Classes.NextendFontEditor},NextendFontEditorController.prototype.getCleanVisual=function(){return N2Classes.CSSRendererFont.getEmpty()},NextendFontEditorController.prototype.initBackgroundColor=function(){this.$background=$("#n2-font-editorpreview-background").on("nextendChange",function(){this.preview.css("background","#"+this.$background.val())}.bind(this)),this.preview.css("background","#"+this.$background.val())},NextendFontEditorController.prototype.getTabs=function(){return N2Classes.CSSRendererFont.rendererModes[this.mode].tabs},NextendFontEditorController.prototype.renderCSS=function(){this._renderTimeout=!1,this.clearCSS();var t=N2Classes.CSSRendererFont.addCSS("",this.getPreviewCssClass(),this.currentVisual,N2Classes.CSSRendererFont.rendererModes[this.mode]);this.css.push(t)},NextendFontEditorController.prototype.setPreview=function(){var fontClassName=this.getPreviewCssClass(),styleClassName=nextend.fontManager.styleClassName,styleClassName2=nextend.fontManager.styleClassName2,data={fontClassName:fontClassName,styleClassName:styleClassName,styleClassName2:styleClassName2},html="";this.localModePreview[this.mode]!==undefined?(this.preview.html(""),this.preview.append(N2Classes[this.localModePreview[this.mode]].renderFont(nextend.fontManager.fieldID,data))):(html=N2Classes.CSSRendererFont.rendererModes[this.mode].preview,html=html.replace(/\{([^]*?)\}/g,function(match,script){return eval(script)}),this.preview.html(html))},NextendFontEditorController.prototype.getPreviewCssClass=function(){return"n2-"+this.type+"-editor-preview"},NextendFontEditorController.prototype.pause=function(){this.clearCSS()},NextendFontEditorController.prototype.clearCSS=function(){for(var t=0;t').css("fontSize","16px").appendTo('.n2_form__table[data-field="table-style-preview"]'),this.initBackgroundColor()}return NextendStyleEditorController.prototype=Object.create(N2Classes.NextendFragmentEditorController.prototype),NextendStyleEditorController.prototype.constructor=NextendStyleEditorController,NextendStyleEditorController.prototype.loadDefaults=function(){N2Classes.NextendFragmentEditorController.prototype.loadDefaults.call(this),this.type="style",this.preview=null},NextendStyleEditorController.prototype.initEditor=function(){return new N2Classes.NextendStyleEditor},NextendStyleEditorController.prototype.getCleanVisual=function(){return N2Classes.CSSRendererStyle.getEmpty()},NextendStyleEditorController.prototype.initBackgroundColor=function(){this.$background=$("#n2-style-editorpreview-background").on("nextendChange",function(){this.preview.css("background","#"+this.$background.val())}.bind(this)),this.preview.css("background","#"+this.$background.val())},NextendStyleEditorController.prototype.getTabs=function(){return N2Classes.CSSRendererStyle.rendererModes[this.mode].tabs},NextendStyleEditorController.prototype.renderCSS=function(){this._renderTimeout=!1,this.clearCSS();var t=N2Classes.CSSRendererStyle.addCSS("",this.getPreviewCssClass(),this.currentVisual,N2Classes.CSSRendererStyle.rendererModes[this.mode]);this.css.push(t)},NextendStyleEditorController.prototype.setPreview=function(){var styleClassName=this.getPreviewCssClass(),fontClassName=nextend.styleManager.fontClassName,fontClassName2=nextend.styleManager.fontClassName2,styleClassName2=nextend.styleManager.styleClassName2,data={styleClassName:styleClassName,fontClassName:fontClassName,fontClassName2:fontClassName2,styleClassName2:styleClassName2},html="";this.localModePreview[this.mode]!==undefined&&""!==this.localModePreview[this.mode]?(this.preview.html(""),this.preview.append(N2Classes[this.localModePreview[this.mode]].renderStyle(nextend.styleManager.fieldID,data))):(html=N2Classes.CSSRendererStyle.rendererModes[this.mode].preview,html=html.replace(/\{([^]*?)\}/g,function(match,script){return eval(script)}),this.preview.html(html))},NextendStyleEditorController.prototype.getPreviewCssClass=function(){return"n2-"+this.type+"-editor-preview"},NextendStyleEditorController.prototype.pause=function(){this.clearCSS()},NextendStyleEditorController.prototype.clearCSS=function(){for(var t=0;t=i.firefox:(e=t.match(/Edge\/([0-9]+)/))?parseInt(e[1])>=i.edge:(e=t.match(/OPR\/([0-9]+)/))?parseInt(e[1])>=i.opera:(e=t.match(/Version\/([0-9]+)[0-9. ]*?Safari/))?parseInt(e[1])>=i.safari:(e=t.match(/Chrome\/([0-9]+)/))?parseInt(e[1])>=i.chrome:!!(e=t.match(/Safari\/([0-9]+)/))&&parseInt(e[1])>=i.safariIOS}()&&(window.location=t)}}),N2D("ContextMenu",function(l,a){var h,d,c,p,s,i,n,u,o,f;function g(t){d[0]===t.target||l.contains(d[0],t.target)||f&&(f===t.target||l.contains(f,t.target))||y()}function y(){0===h&&(C(),r(),p[0].removeEventListener("mouseover",m,{passive:!0,capture:!0}),p[0].removeEventListener("mouseleave",v,{passive:!0,capture:!0}),d.remove(),n=s=p=d=a,document.removeEventListener("mousedown",g,{passive:!0,capture:!0}),document.removeEventListener("pointerdown",g,{passive:!0,capture:!0}),cancelAnimationFrame(this.frame),window.removeEventListener("scroll",y,{passive:!0,capture:!0}),window.removeEventListener("resize",y),window.removeEventListener("blur",y),u.onClose&&u.onClose.call(window))}function m(t){var e=l(t.target);if(e.hasClass("n2_context_menu__item")||(e=e.closest(".n2_context_menu__item")),(!s||e[0]!==s[0])&&(C(),(s=e).length)){var i=s.data("items");i!==a&&(s.addClass("n2_context_menu__item--active"),(n=s.data("submenu"))||(n=function(t,e){for(var i=e.getBoundingClientRect(),s=l('').appendTo(d),n=0;n
"),e.forEach(function(t){var e=t[0],i=t[1];s=s.replace(e,i)}),-1!==s.indexOf("\x3c!-- wpnl --\x3e")&&(s=s.replace(/\s?\s?/g,"\n")),s}((t.prototype=Object.create(N2Classes.Item.prototype)).constructor=t).prototype.getLabel=function(){return n2_("Text")},t.prototype.getDefault=function(){return{content:"","content-mobile-enabled":0,contentmobile:"","content-tablet-enabled":0,contenttablet:"",font:"",style:""}},t.prototype.added=function(){this.needFill=["content","contenttablet","contentmobile"],this.addedFont("paragraph","font"),this.addedStyle("heading","style"),this.generator.registerFields(["#item_textcontent","#item_textcontenttablet","#item_textcontentmobile"])},t.prototype.parseAll=function(t){N2Classes.Item.prototype.parseAll.apply(this,arguments),t.p=e(t.content),t.ptablet=e(t.contenttablet),t.pmobile=e(t.contentmobile)},t.prototype._render=function(t){var e,i=!1,s=!1;1===parseInt(t["content-mobile-enabled"])&&(i=!0,n(''+t.pmobile+"
").appendTo(this.$item)),1===parseInt(t["content-tablet-enabled"])&&(s=!0,e=["n2-ss-hide-desktopportrait","n2-ss-hide-desktoplandscape"],i?(e.push("n2-ss-hide-mobileportrait"),e.push("n2-ss-hide-mobilelandscape")):i=!0,n(''+t.ptablet+"
").appendTo(this.$item)),e=[],i&&(e.push("n2-ss-hide-mobileportrait"),e.push("n2-ss-hide-mobilelandscape")),s&&(e.push("n2-ss-hide-tabletportrait"),e.push("n2-ss-hide-tabletlandscape")),n(''+t.p+"
").appendTo(this.$item),this.$item.find("p").addClass(t.fontclass+" "+t.styleclass)};var p=new RegExp("(<((?=!--|!\\[CDATA\\[)((?=!-)!(?:-(?!->)[^\\-]*)*(?:--\x3e)?|!\\[CDATA\\[[^\\]]*(?:](?!]>)[^\\]]*)*?(?:]]>)?)|[^>]*>?))");return t}),N2D("ItemVimeo",["Item"],function(n,s){"use strict";function t(){this.type="vimeo",N2Classes.Item.prototype.constructor.apply(this,arguments)}return((t.prototype=Object.create(N2Classes.Item.prototype)).constructor=t).needWidth=!0,t.prototype.getLabel=function(){return"Vimeo"},t.prototype.hasTextScale=function(){return!1},t.prototype.added=function(){this.needFill=["vimeourl"],this.generator.registerField("#item_vimeovimeourl")},t.prototype.parseAll=function(e){var t=this.values.vimeourl!=e.vimeourl;if(N2Classes.Item.prototype.parseAll.apply(this,arguments),""==e.image&&(e.image="$ss3-frontend$/images/placeholder/video.png"),e.image=nextend.imageHelper.fixed(e.image),t&&""!=e.vimeourl){var i=e.vimeourl.match(/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/),s=!1;i?s=i[3]:e.vimeourl.match(/^[0-9]+$/)&&(s=e.vimeourl),s?N2Classes.AjaxHelper.getJSON("https://vimeo.com/api/v2/video/"+encodeURI(s)+".json").done(function(t){n("#item_vimeoimage").val(t[0].thumbnail_large).trigger("change")}.bind(this)).fail(function(t){0==e.privateurl&&N2Classes.Notification.error("Video not found or private.")}):N2Classes.Notification.error("The provided URL does not match any known Vimeo url or code.")}},t.prototype._render=function(t){var e="";"custom"===t["aspect-ratio"]&&(e="padding-top:"+t["aspect-ratio-height"]/t["aspect-ratio-width"]*100+"%");var i=n('').attr("data-aspect-ratio",t["aspect-ratio"]).css({background:"url("+t.image+") no-repeat 50% 50%",backgroundSize:"cover"});!parseInt(t.playbutton)&&t.playbutton!==s||n('').appendTo(i),this.$item.append(i)},t.prototype.fitLayer=function(){return!0},t}),N2D("ItemYoutube",["Item"],function(n,s){"use strict";function t(){this.type="youtube",N2Classes.Item.prototype.constructor.apply(this,arguments)}return((t.prototype=Object.create(N2Classes.Item.prototype)).constructor=t).needWidth=!0,t.prototype.getLabel=function(){return"YouTube"},t.prototype.hasTextScale=function(){return!1},t.prototype.added=function(){this.needFill=["youtubeurl","image","start"],this.generator.registerFields(["#item_youtubeyoutubeurl","#item_youtubeimage","#item_youtubestart"])},t.prototype.parseAll=function(t){var e=this.values.youtubeurl!==t.youtubeurl;if(N2Classes.Item.prototype.parseAll.apply(this,arguments),""===t.image&&(t.image="$ss3-frontend$/images/placeholder/video.png"),t.image=nextend.imageHelper.fixed(t.image),e){var i=t.youtubeurl.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);if(i){var s="https://i.ytimg.com/vi/"+i[2]+"/hqdefault.jpg";"{video_url}"===this.values.youtubeurl&&(s="https://i.ytimg.com/vi/{video_id}/hqdefault.jpg"),setTimeout(function(){n("#item_youtubeimage").val(s).trigger("change")},100)}}},t.prototype.fitLayer=function(){return!0},t.prototype._render=function(t){var e="";"custom"===t["aspect-ratio"]&&(e="padding-top:"+t["aspect-ratio-height"]/t["aspect-ratio-width"]*100+"%");var i=n('').attr("data-aspect-ratio",t["aspect-ratio"]).css({background:"url("+t.image+") no-repeat 50% 50%",backgroundSize:"cover"});!parseInt(t.playbutton)&&t.playbutton!==s||n('').appendTo(i),this.$item.append(i)},t}),N2D("BgAnimationEditor",["NextendFragmentEditorControllerWithEditor"],function(i,e){function t(){this.parameters={shiftedBackgroundAnimation:0},this.$css=i("").appendTo("head"),this.preview=i('
').appendTo('.n2_form__table[data-field="table-background-animation-preview"]');var t=i('
').appendTo(this.preview);this.bgAnimationElement=i('
').appendTo(t);i('
').append(i('
').append(i('
'))).appendTo(t).clone().appendTo(t);this.backgroundAnimations={color:"eeeeeeff"},N2Classes.NextendFragmentEditorControllerWithEditor.prototype.constructor.call(this,!1),this.slides=t.find(".n2_ss_background_animation_preview__slide"),this.slides.eq(1).css("opactiy","0"),this.bgImages=t.find(".n2_ss_background_animation_preview__slide_background");var e=[nextend.imageHelper.fixed("$ss3-frontend$/images/placeholder/image.png"),nextend.imageHelper.fixed("$ss3-frontend$/images/placeholder/video.png")];t.find(".n2_ss_background_animation_preview__slide_background_image").each(function(t){i(this).css("backgroundImage","url("+e[t]+")")}),NextendTween.set(this.bgImages,{rotationZ:1e-4}),(n2const.isIE||n2const.isEdge)&&N2Classes.Notification.error("Background animations are not available in your browser. It works if the transform-style: preserve-3d feature available. "),this.$colorField=i("#n2-background-animationcolor").on("nextendChange",this.changeColor.bind(this))}return((t.prototype=Object.create(N2Classes.NextendFragmentEditorControllerWithEditor.prototype)).constructor=t).prototype.loadDefaults=function(){N2Classes.NextendFragmentEditorControllerWithEditor.prototype.loadDefaults.call(this),this.type="backgroundanimation",this.current=0,this.animationProperties=!1},t.prototype.get=function(){return null},t.prototype.load=function(t,e,i,s){},t.prototype.setTabs=function(t){},t.prototype.start=function(t){t.color!==e?(this.$colorField.data("field").insideChange(t.color),this.backgroundAnimations.color=t.color):(i("#n2-tab-background-animation-form").remove(),this.$css.html(".n2-3d-side,.tile-colored-overlay{background: "+nextend.currentEditor.frontend.parameters.bgAnimationsColor+";}")),this.animationProperties&&(this.timeline?this.timeline.play():this.next())},t.prototype.changeColor=function(){this.backgroundAnimations.color=this.$colorField.val(),this.$css.html(".n2-3d-side,.tile-colored-overlay{background: "+N2Color.hex2rgbaCSS(this.backgroundAnimations.color)+";}")},t.prototype.pause=function(){this.timeline&&this.timeline.pause()},t.prototype.next=function(){this.timeline=new NextendTimeline({paused:!0,onComplete:this.ended.bind(this)});var t=this.bgImages.eq(this.current),e=this.bgImages.eq(1-this.current);n2const.isIE||n2const.isEdge?(this.timeline.to(this.slides.eq(this.current),1.5,{opacity:0},0),this.timeline.to(this.slides.eq(1-this.current),1.5,{opacity:1},0)):(this.currentAnimation=new N2Classes["SmartSliderBackgroundAnimation"+this.animationProperties.type](this,t,e,this.animationProperties,1,0),this.slides.eq(this.current).css("zIndex","2"),this.slides.eq(1-this.current).css("zIndex","3"),this.timeline.to(this.slides.eq(this.current),.5,{opacity:0},this.currentAnimation.getExtraDelay()),this.timeline.to(this.slides.eq(1-this.current),.5,{opacity:1},this.currentAnimation.getExtraDelay()),this.currentAnimation.postSetup()),this.current=1-this.current,this.timeline.play()},t.prototype.ended=function(){this.currentAnimation&&this.currentAnimation.ended(),this.next()},t.prototype.setAnimationProperties=function(t){var e=this.animationProperties;this.animationProperties=t,e||this.next()},t}),N2D("BgAnimationManager",["NextendVisualManagerMultipleSelection"],function(n,t){function e(){this.type="backgroundanimation",N2Classes.NextendVisualManagerMultipleSelection.prototype.constructor.apply(this,arguments)}return((e.prototype=Object.create(N2Classes.NextendVisualManagerMultipleSelection.prototype)).constructor=e).prototype.loadDefaults=function(){N2Classes.NextendVisualManagerMultipleSelection.prototype.loadDefaults.apply(this,arguments),this.type="backgroundanimation",this.labels={visual:"Background animation",visuals:"Background animations"}},e.prototype.initController=function(){return new N2Classes.BgAnimationEditor},e.prototype.createVisual=function(t,e){return new N2Classes.NextendVisualWithSetRowMultipleSelection(t,e,this)},e.prototype.show=function(t,e){var i={},s=n("#sliderbackground-animation-color");s.length&&(i.color=s.val()),N2Classes.NextendVisualManagerMultipleSelection.prototype.show.call(this,t,e,i)},e.prototype.getAsString=function(){var t=n("#sliderbackground-animation-color");return t.length&&t.val(n("#n2-background-animationcolor").val()),N2Classes.NextendVisualManagerMultipleSelection.prototype.getAsString.call(this)},e}),N2D("SmartSliderAdminWidgetArrowImage",function(r,t){function e(){}return e.renderStyle=function(t,e){if("sliderwidget-arrow-style"===t){var i=r("
"),s=r("
").css("display","inline-block").addClass(e.styleClassName).appendTo(i),n=r(' ').appendTo(s),o=r("#sliderwidget-arrow-previous-image").val();return o?n.attr("src",nextend.imageHelper.fixed(o)):r("#sliderwidget-arrow-previous").data("field").getCurrentImage(r("#sliderwidget-arrow-previous-color").val()).done(function(t){n.attr("src",t)}),i}},e}),N2D("SmartSliderAdminWidgetAutoplayImage",function(o,t){function e(){}return e.renderStyle=function(t,e){if("sliderwidget-autoplay-style"===t){var i=o("
").css("display","inline-block").addClass(e.styleClassName),s=o(' ').appendTo(i),n=o("#sliderwidget-autoplay-play-image").val();return n?s.attr("src",nextend.imageHelper.fixed(n)):o("#sliderwidget-autoplay-play").data("field").getCurrentImage(o("#sliderwidget-autoplay-play-color").val()).done(function(t){s.attr("src",t)}),i}},e}),N2D("SmartSliderAdminWidgetBarHorizontal",function(n,t){function e(){}return e.renderStyle=function(t,e){if("sliderwidget-bar-style"===t){var i=n("#sliderwidget-bar-separator").val(),s=n("
").css({width:"100%",boxSizing:"border-box"}).addClass(e.styleClassName);return n("Slide title ").addClass(e.fontClassName).attr("href","#").appendTo(s),n(""+i+"Slide description which is longer than the title ").addClass(e.fontClassName2).appendTo(s),s}},e.renderFont=function(t,e){var i;return"sliderwidget-bar-font-title"===t?(i=n("
").css({width:"100%",boxSizing:"border-box"}).addClass(e.styleClassName),n("Slide title ").addClass(e.fontClassName).attr("href","#").appendTo(i),i):"sliderwidget-bar-font-description"===t?(i=n("
").css({width:"100%",boxSizing:"border-box"}).addClass(e.styleClassName),n("Slide description which is longer than the title ").addClass(e.fontClassName).attr("href","#").appendTo(i),i):void 0},e}),N2D("SmartSliderAdminWidgetBulletTransition",function(s,t){function e(){}return e.renderStyle=function(t,e){var i;return"sliderwidget-bullet-style"===t?(i=s("
").css("display","inline-block").addClass(e.styleClassName2),s("
").css({display:"inline-block","vertical-align":"top"}).addClass(e.styleClassName).appendTo(i),s("
").css({display:"inline-block","vertical-align":"top"}).addClass(e.styleClassName+" n2-active").appendTo(i),s("
").css({display:"inline-block","vertical-align":"top"}).addClass(e.styleClassName).appendTo(i)):"sliderwidget-bullet-bar"===t&&(i=s("
").css("display","inline-block").addClass(e.styleClassName),s("
").css({display:"inline-block","vertical-align":"top"}).addClass(e.styleClassName2).appendTo(i),s("
").css({display:"inline-block","vertical-align":"top"}).addClass(e.styleClassName2+" n2-active").appendTo(i),s("
").css({display:"inline-block","vertical-align":"top"}).addClass(e.styleClassName2).appendTo(i)),i},e}),N2D("SmartSliderAdminWidgetBulletThumbnail",function(s,t){function e(){}return e.renderStyle=function(t,e){if("sliderwidget-bullet-thumbnail-style"===t){var i=s("
").css("display","inline-block").addClass(e.styleClassName);return s("
").css({width:s("#sliderwidget-bullet-thumbnail-width").val()+"px",height:s("#sliderwidget-bullet-thumbnail-height").val()+"px",overflow:"hidden",background:'url("'+nextend.imageHelper.fixed("$ss3-frontend$/images/placeholder/image.png")+'")',"background-size":"cover"}).appendTo(i),i}},e}),N2D("SmartSliderAdminWidgetThumbnailBasic",function(r,t){function e(){}return e.renderStyle=function(t,e){var i,s,n=r("#sliderwidget-thumbnail-width").val(),o=r("#sliderwidget-thumbnail-height").val();return"sliderwidget-thumbnail-style-bar"===t?(i=r("
").css({overflow:"hidden",width:2.5*n+"px"}).addClass(e.styleClassName),s=r("
").css("width","200%").appendTo(i),r("
").css({display:"inline-block",verticalAlign:"top",width:n+"px",height:o+"px",backgroundImage:'url("'+nextend.imageHelper.fixed("$ss3-frontend$/images/placeholder/image.png")+'")'}).addClass(e.styleClassName2).appendTo(s),r("
").css({display:"inline-block",verticalAlign:"top",width:n+"px",height:o+"px",backgroundImage:'url("'+nextend.imageHelper.fixed("$ss3-frontend$/images/placeholder/video.png")+'")'}).addClass(e.styleClassName2+" n2-active").appendTo(s),r("
").css({display:"inline-block",verticalAlign:"top",width:n+"px",height:o+"px",backgroundImage:'url("'+nextend.imageHelper.fixed("$ss3-frontend$/images/placeholder/image.png")+'")'}).addClass(e.styleClassName2).appendTo(s),i):"sliderwidget-thumbnail-style-slides"===t?(i=r("
").css({overflow:"hidden",width:"480px"}).addClass(e.styleClassName2),s=r("
").css("width","200%").appendTo(i),r("
").css({display:"inline-block",verticalAlign:"top",width:n+"px",height:o+"px",backgroundImage:'url("'+nextend.imageHelper.fixed("$ss3-frontend$/images/placeholder/image.png")+'")'}).addClass(e.styleClassName).appendTo(s),r("
").css({display:"inline-block",verticalAlign:"top",width:n+"px",height:o+"px",backgroundImage:'url("'+nextend.imageHelper.fixed("$ss3-frontend$/images/placeholder/video.png")+'")'}).addClass(e.styleClassName+" n2-active").appendTo(s),r("
").css({display:"inline-block",verticalAlign:"top",width:n+"px",height:o+"px",backgroundImage:'url("'+nextend.imageHelper.fixed("$ss3-frontend$/images/placeholder/image.png")+'")'}).addClass(e.styleClassName).appendTo(s),i):"sliderwidget-thumbnail-title-style"===t?r("Slide title ").addClass(e.styleClassName+" "+e.fontClassName):void 0},e.renderFont=function(t,e){return"sliderwidget-thumbnail-title-font"===t?r("Slide title ").addClass(e.styleClassName+" "+e.fontClassName):"sliderwidget-thumbnail-description-font"===t?r("Slide description with long long text... ").addClass(e.styleClassName+" "+e.fontClassName):void 0},e}),N2D("SmartSliderAdminWidgetArrowImage",function(r,t){function e(){}return e.renderStyle=function(t,e){if("sliderwidget-arrow-style"===t){var i=r("
"),s=r("
").css("display","inline-block").addClass(e.styleClassName).appendTo(i),n=r(' ').appendTo(s),o=r("#sliderwidget-arrow-previous-image").val();return o?n.attr("src",nextend.imageHelper.fixed(o)):r("#sliderwidget-arrow-previous").data("field").getCurrentImage(r("#sliderwidget-arrow-previous-color").val()).done(function(t){n.attr("src",t)}),i}},e}),N2D("SmartSliderAdminWidgetAutoplayImage",function(o,t){function e(){}return e.renderStyle=function(t,e){if("sliderwidget-autoplay-style"===t){var i=o("
").css("display","inline-block").addClass(e.styleClassName),s=o(' ').appendTo(i),n=o("#sliderwidget-autoplay-play-image").val();return n?s.attr("src",nextend.imageHelper.fixed(n)):o("#sliderwidget-autoplay-play").data("field").getCurrentImage(o("#sliderwidget-autoplay-play-color").val()).done(function(t){s.attr("src",t)}),i}},e}),N2D("SmartSliderAdminWidgetBarHorizontal",function(n,t){function e(){}return e.renderStyle=function(t,e){if("sliderwidget-bar-style"===t){var i=n("#sliderwidget-bar-separator").val(),s=n("
").css({width:"100%",boxSizing:"border-box"}).addClass(e.styleClassName);return n("Slide title ").addClass(e.fontClassName).attr("href","#").appendTo(s),n(""+i+"Slide description which is longer than the title ").addClass(e.fontClassName2).appendTo(s),s}},e.renderFont=function(t,e){var i;return"sliderwidget-bar-font-title"===t?(i=n("
").css({width:"100%",boxSizing:"border-box"}).addClass(e.styleClassName),n("Slide title ").addClass(e.fontClassName).attr("href","#").appendTo(i),i):"sliderwidget-bar-font-description"===t?(i=n("
").css({width:"100%",boxSizing:"border-box"}).addClass(e.styleClassName),n("Slide description which is longer than the title ").addClass(e.fontClassName).attr("href","#").appendTo(i),i):void 0},e}),N2D("SmartSliderAdminWidgetBulletTransition",function(s,t){function e(){}return e.renderStyle=function(t,e){var i;return"sliderwidget-bullet-style"===t?(i=s("
").css("display","inline-block").addClass(e.styleClassName2),s("
").css({display:"inline-block","vertical-align":"top"}).addClass(e.styleClassName).appendTo(i),s("
").css({display:"inline-block","vertical-align":"top"}).addClass(e.styleClassName+" n2-active").appendTo(i),s("
").css({display:"inline-block","vertical-align":"top"}).addClass(e.styleClassName).appendTo(i)):"sliderwidget-bullet-bar"===t&&(i=s("
").css("display","inline-block").addClass(e.styleClassName),s("
").css({display:"inline-block","vertical-align":"top"}).addClass(e.styleClassName2).appendTo(i),s("
").css({display:"inline-block","vertical-align":"top"}).addClass(e.styleClassName2+" n2-active").appendTo(i),s("
").css({display:"inline-block","vertical-align":"top"}).addClass(e.styleClassName2).appendTo(i)),i},e}),N2D("SmartSliderAdminWidgetBulletThumbnail",function(s,t){function e(){}return e.renderStyle=function(t,e){if("sliderwidget-bullet-thumbnail-style"===t){var i=s("
").css("display","inline-block").addClass(e.styleClassName);return s("
").css({width:s("#sliderwidget-bullet-thumbnail-width").val()+"px",height:s("#sliderwidget-bullet-thumbnail-height").val()+"px",overflow:"hidden",background:'url("'+nextend.imageHelper.fixed("$ss3-frontend$/images/placeholder/image.png")+'")',"background-size":"cover"}).appendTo(i),i}},e}),N2D("SmartSliderAdminWidgetThumbnailBasic",function(r,t){function e(){}return e.renderStyle=function(t,e){var i,s,n=r("#sliderwidget-thumbnail-width").val(),o=r("#sliderwidget-thumbnail-height").val();return"sliderwidget-thumbnail-style-bar"===t?(i=r("
").css({overflow:"hidden",width:2.5*n+"px"}).addClass(e.styleClassName),s=r("
").css("width","200%").appendTo(i),r("
").css({display:"inline-block",verticalAlign:"top",width:n+"px",height:o+"px",backgroundImage:'url("'+nextend.imageHelper.fixed("$ss3-frontend$/images/placeholder/image.png")+'")'}).addClass(e.styleClassName2).appendTo(s),r("
").css({display:"inline-block",verticalAlign:"top",width:n+"px",height:o+"px",backgroundImage:'url("'+nextend.imageHelper.fixed("$ss3-frontend$/images/placeholder/video.png")+'")'}).addClass(e.styleClassName2+" n2-active").appendTo(s),r("
").css({display:"inline-block",verticalAlign:"top",width:n+"px",height:o+"px",backgroundImage:'url("'+nextend.imageHelper.fixed("$ss3-frontend$/images/placeholder/image.png")+'")'}).addClass(e.styleClassName2).appendTo(s),i):"sliderwidget-thumbnail-style-slides"===t?(i=r("
").css({overflow:"hidden",width:"480px"}).addClass(e.styleClassName2),s=r("
").css("width","200%").appendTo(i),r("
").css({display:"inline-block",verticalAlign:"top",width:n+"px",height:o+"px",backgroundImage:'url("'+nextend.imageHelper.fixed("$ss3-frontend$/images/placeholder/image.png")+'")'}).addClass(e.styleClassName).appendTo(s),r("
").css({display:"inline-block",verticalAlign:"top",width:n+"px",height:o+"px",backgroundImage:'url("'+nextend.imageHelper.fixed("$ss3-frontend$/images/placeholder/video.png")+'")'}).addClass(e.styleClassName+" n2-active").appendTo(s),r("
").css({display:"inline-block",verticalAlign:"top",width:n+"px",height:o+"px",backgroundImage:'url("'+nextend.imageHelper.fixed("$ss3-frontend$/images/placeholder/image.png")+'")'}).addClass(e.styleClassName).appendTo(s),i):"sliderwidget-thumbnail-title-style"===t?r("Slide title ").addClass(e.styleClassName+" "+e.fontClassName):void 0},e.renderFont=function(t,e){return"sliderwidget-thumbnail-title-font"===t?r("Slide title ").addClass(e.styleClassName+" "+e.fontClassName):"sliderwidget-thumbnail-description-font"===t?r("Slide description with long long text... ").addClass(e.styleClassName+" "+e.fontClassName):void 0},e}),N2D("smartslider-backend");
// source --> https://powerbank-personnalise.fr/wp-content/plugins/smart-slider-3/Public/SmartSlider3/Application/Frontend/Assets/dist/smartslider-frontend.min.js?ver=821e0c40
(function(){var e=this;e.N2_=e.N2_||{r:[],d:[]},e.N2R=e.N2R||function(){e.N2_.r.push(arguments)},e.N2D=e.N2D||function(){e.N2_.d.push(arguments)}}).call(window),N2D("SmartSliderBackgrounds",function(a,e){function t(e){this.device=null,this.slider=e,this.hasFixed=!1,this.lazyLoad=parseInt(e.parameters.lazyLoad),this.lazyLoadNeighbor=parseInt(e.parameters.lazyLoadNeighbor),this.loadDeferred=a.Deferred(),this.deviceDeferred=a.Deferred(),this.slider.stages.done("Resized",this.onResized.bind(this)),this.slider.stages.done("StarterSlide",this.onStarterSlide.bind(this))}return t.prototype.loadWithProgress=function(e){for(var t=0,i=this.loadDeferred,s=0;s').appendTo("body")),parseFloat(s.css("fontSize"))/10)+"rem"}}}),N2D("SmartSliderLoad",function(i,e){function t(e,t){this.parameters=i.extend({fade:1,scroll:0},t),this.deferred=i.Deferred(),this.slider=e,this.spinnerCouner=0,this.id=e.sliderElement.attr("id"),this.$window=i(window),this.spinner=i("#"+this.id+"-spinner"),this.$placeholder=i("#"+this.id+"-placeholder")}return t.prototype.start=function(){if(this.parameters.scroll)this.onScrollCallback=this.onScroll.bind(this),window.addEventListener("scroll",this.onScrollCallback,{capture:!0,passive:!0}),this.onScroll();else if(this.parameters.fade){this.loadingArea=this.$placeholder,this.showSpinner("fadePlaceholder");var i=this.spinner.find(".n2-ss-spinner-counter");i.length&&(i.html("0%"),this.slider.stages.done("SlidesReady",function(){this.slider.backgrounds.loadDeferred.progress(function(e,t){i.html(Math.round(e/(t+1)*100)+"%")}.bind(this))}.bind(this))),this.showSlider()}else this.showSlider()},t.prototype.onScroll=function(){this.$window.scrollTop()+this.$window.height()>this.slider.sliderElement.offset().top+100&&(window.removeEventListener("scroll",this.onScrollCallback,{capture:!0,passive:!0}),this.showSlider())},t.prototype.loadLayerImages=function(){var e=i.Deferred();return this.slider.sliderElement.find(".n2-ss-layers-container").n2imagesLoaded().always(function(){e.resolve()}),e},t.prototype.showSlider=function(){this.slider.stages.done("ResizeFirst",this.stage1.bind(this))},t.prototype.stage1=function(){this.slider.responsive.isReadyToResize=!0,i.when.apply(i,this.slider.widgetDeferreds).done(this.stage2.bind(this))},t.prototype.stage2=function(){this.slider.responsive.doResize(),this.slider.finalizeStarterSlide(),i.when(this.slider.backgrounds.loadDeferred,this.loadLayerImages(),this.slider.stages.get("Fonts").getDeferred()).always(this.stage3.bind(this))},t.prototype.stage3=function(){this.slider.responsive.doResize(),this.slider.stages.resolve("BeforeShow"),this.slider.widgets.onReady(),this.slider.responsive.alignElement.addClass("n2-ss-align-visible"),this.slider.sliderElement.addClass("n2-ss-loaded").removeClass("n2notransition"),this.spinner.find(".n2-ss-spinner-counter").html(""),this.removeSpinner("fadePlaceholder"),this.$placeholder.remove(),this.loadingArea=this.slider.sliderElement,i(window).trigger("scroll"),this.slider.stages.resolve("Show"),this.slider.startVisibilityCheck()},t.prototype.showSpinner=function(e){0===this.spinnerCouner&&this.spinner.appendTo(this.loadingArea).css("display",""),this.spinnerCouner++},t.prototype.removeSpinner=function(e){this.spinnerCouner--,this.spinnerCouner<=0&&(this.spinner.detach(),this.spinnerCouner=0)},t}),N2D("SmartSliderPlugins",function(e,i){function s(e){this.slider=e,this.plugins={}}s.prototype.add=function(e,t){this.plugins[e]=new t(this.slider)},s.prototype.get=function(e){return this.plugins[e]||!1};var n={},r=[];return{addPlugin:function(e,t){for(var i=0;i.7*t,n=!0;"partly-visible"===e.mode?s&&(i.bottom<0||i.top>=i.height)?n=!1:!s&&(i.bottom-i.height<0||0<=i.top-t+i.height)&&(n=!1):"not-visible"===e.mode&&(n=i.top-t<0&&0'+this.parameters.css+"").appendTo("head")},SmartSliderAbstract.prototype.onSliderHasDimension=function($sliderElement,parameters){this.stages.resolve("HasDimension"),this.killed=!1,this.isVisible=!0,n2const.isIE?$sliderElement.attr("data-ie",n2const.isIE):n2const.isEdge&&$sliderElement.attr("data-ie",n2const.isEdge),this.responsive=!1,this.mainAnimationLastChangeTime=0,this.currentSlide=null,this.currentRealSlide=null,this.staticSlides=[],this.slides=[],this.visibleRealSlides=[],this.visibleSlides=[],this.sliderElement=$sliderElement.data("ss",this),this.needBackgroundWrap=!1,this.blockCarousel=!1,this.parameters=$.extend({plugins:[],admin:!1,playWhenVisible:1,playWhenVisibleAt:.5,perspective:1e3,callbacks:"",autoplay:{},blockrightclick:!1,maintainSession:0,align:"normal",controls:{touch:"horizontal",keyboard:!1,mousewheel:!1,blockCarouselInteraction:1},hardwareAcceleration:!0,layerMode:{playOnce:0,playFirstLayer:1,mode:"skippable",inAnimation:"mainInEnd"},parallax:{enabled:0,mobile:0,horizontal:"mouse",vertical:"mouse",origin:"enter"},load:{},mainanimation:{},randomize:{randomize:0,randomizeFirst:0},responsive:{},lazyload:{enabled:0},postBackgroundAnimations:!1,initCallbacks:!1,dynamicHeight:0,titles:[],descriptions:[],backgroundParallax:{strength:0,tablet:0,mobile:0},alias:{id:0,smoothScroll:0,slideSwitch:0}},parameters),this.stages.resolve("Parameters"),this.disabled={layerAnimations:!1,layerSplitTextAnimations:!1,backgroundAnimations:!1,postBackgroundAnimations:!1},this.disableLayerAnimations!==undefined&&!0===this.disableLayerAnimations&&(this.disabled.layerAnimations=!0),n2const.isSamsungBrowser&&(this.disabled.layerSplitTextAnimations=!0,this.disabled.postBackgroundAnimations=!0),this.initCSS();try{eval(this.parameters.callbacks)}catch(e){console.error(e)}n2ss.makeReady(this.id,this),this.widgetDeferreds=[],this.sliderElement.on("addWidget",this.addWidget.bind(this)),this.isAdmin&&(this.changeTo=function(){}),this.load=new N2Classes.SmartSliderLoad(this,this.parameters.load),this.backgrounds=new N2Classes.SmartSliderBackgrounds(this),this.initSlides(),"function"==typeof this.parameters.initCallbacks&&this.parameters.initCallbacks.call(this,$),this.stages.done("VisibleSlides",this.onSlidesReady.bind(this)),this.initUI(),navigator.userAgent.match("UCBrowser")&&$("html").addClass("n2-ucbrowser")},SmartSliderAbstract.prototype.onSlidesReady=function(){this.stages.resolve("SlidesReady")},SmartSliderAbstract.prototype.initUI=function(){for(var i=0;ithis.realSlides.length-1?0:i+1]);this.widgets=new N2Classes.SmartSliderWidgets(this);var isHover=!1,hoverTimeout;if(this.sliderElement.on({universalenter:function(e){$(e.target).closest(".n2-full-screen-widget").length||(clearTimeout(hoverTimeout),isHover=!0,this.sliderElement.addClass("n2-hover"),this.widgets.setState("hover",!0))}.bind(this),universalleave:function(e){e.stopPropagation(),hoverTimeout=setTimeout(function(){isHover=!1,this.sliderElement.removeClass("n2-hover"),this.widgets.setState("hover",!1)}.bind(this),1e3)}.bind(this)}),this.parameters.carousel||this.initNotCarousel(),this.initHideArrow(),this.controls={},this.parameters.blockrightclick&&this.sliderElement.on("contextmenu",function(e){e.preventDefault()}),this.initMainAnimation(),this.initResponsiveMode(),!this.killed){try{var removeHoverClassCB=function(){this.sliderElement.removeClass("n2-has-hover"),this.sliderElement[0].removeEventListener("touchstart",removeHoverClassCB,!!window.n2const.passiveEvents&&{passive:!0})}.bind(this);this.sliderElement[0].addEventListener("touchstart",removeHoverClassCB,!!window.n2const.passiveEvents&&{passive:!0})}catch(e){}if(this.initControls(),this.stages.resolve("UIReady"),!this.isAdmin){var eventName="click";this.hasTouch()&&(eventName="n2click"),this.sliderElement.find("[data-n2click]").each(function(i,el){var el=$(el);el.on(eventName,function(e){eval(el.data("n2click"))})}),this.sliderElement.find("[data-n2middleclick]").on("mousedown",function(e){var el=$(this);2!=e.which&&4!=e.which||(e.preventDefault(),eval(el.data("n2middleclick")))})}this.load.start(),this.sliderElement.on("keypress",function(e){32!==e.charCode&&13!==e.charCode||($target=$(e.target).filter('[role="button"],[tabindex]').not("a,input,select,textarea"),$target.length&&(e.preventDefault(),$(e.target).trigger("click").triggerHandler("n2Activate")))}).on("mouseleave",function(e){$(e.currentTarget).trigger("blur")})}},SmartSliderAbstract.prototype.initSlides=function(){for(var e=this.sliderElement.find(".n2-ss-slide"),t=0;t=this.slides.length:"previous"===e&&this.currentSlide.index-1<0},SmartSliderAbstract.prototype.initNotCarousel=function(){this.realSlides[0].setPrevious(!1),this.realSlides[this.realSlides.length-1].setNext(!1)},SmartSliderAbstract.prototype.initHideArrow=function(){var i=function(e){this.widgets.setState("nonCarouselFirst",!this.getUIPreviousSlide(e)),this.widgets.setState("nonCarouselLast",!this.getUINextSlide(e))}.bind(this);this.stages.done("StarterSlide",function(){i(this.currentSlide),this.sliderElement.on("SliderResize",function(){i(this.currentSlide)}.bind(this))}.bind(this)),this.sliderElement.on("SlideWillChange",function(e,t){i(t)})},SmartSliderAbstract.prototype.next=function(e,t){var i=this.currentSlide.getNext();return!(!i||!this.getUINextSlide(this.currentSlide))&&this.changeTo(i.index,!1,e,t)},SmartSliderAbstract.prototype.previous=function(e,t){var i=this.getUIPreviousSlide(this.currentSlide);return!!i&&this.changeTo(i.index,!0,e,t)},SmartSliderAbstract.prototype.isChangePossible=function(e){var t=!1;if("next"===e){var i=this.currentSlide.getNext();i&&(t=i.index)}else if("previous"===e){var s=this.currentSlide.getPrevious();s&&(t=s.index)}return!1!==t&&t!==this.currentSlide.index},SmartSliderAbstract.prototype.nextCarousel=function(e,t){return!!this.next(e,t)||this.changeTo(this.getFirstSlide().index,!1,e,t)},SmartSliderAbstract.prototype.getFirstSlide=function(){return this.slides[0].isVisible?this.slides[0]:this.slides[0].getNext()},SmartSliderAbstract.prototype.getSlideCount=function(){for(var e=0,t=0;tthis.currentSlide.index?this.changeTo(e,!1):this.changeTo(e,!0)},SmartSliderAbstract.prototype.changeTo=function(i,s,n,r){if((i=parseInt(i))===this.currentSlide.index)return!1;if(!this.slides[i].isVisible)return console.error("this slide is not visible on this device"),!1;this.trigger("SlideWillChange",[this.slides[i]]);var o=$.now();return $.when($.when.apply($,this.backgrounds.preLoadSlides(this.getVisibleSlides(this.slides[i]))),this.focus(n)).done(function(){if(i!==this.currentSlide.index&&this.mainAnimationLastChangeTime<=o){this.mainAnimationLastChangeTime=o;var e=this.mainAnimation.getState();if("ended"===e){n===undefined&&(n=!1);var t=this.mainAnimation;r!==undefined&&(t=r),this._changeTo(i,s,n,r),t.changeTo(this.currentSlide,this.slides[i],s,n),this._changeCurrentSlide(i)}else"initAnimation"!==e&&"playing"!==e||(this.sliderElement.off(".fastChange").one("mainAnimationComplete.fastChange",function(){this.changeTo.call(this,i,s,n,r)}.bind(this)),this.mainAnimation.timeScale(2*this.mainAnimation.timeScale()))}}.bind(this)),!0},SmartSliderAbstract.prototype.setCurrentRealSlide=function(e){this.currentRealSlide=this.currentSlide=e},SmartSliderAbstract.prototype._changeCurrentSlide=function(e){this.setCurrentRealSlide(this.slides[e]),this.sliderElement.triggerHandler("sliderChangeCurrentSlide")},SmartSliderAbstract.prototype._changeTo=function(e,t,i,s){},SmartSliderAbstract.prototype.revertTo=function(e,t){this.slides[t].unsetActive(),this.slides[e].setActive(),this._changeCurrentSlide(e),this.trigger("SlideWillChange",[this.slides[e]])},SmartSliderAbstract.prototype.forceSetActiveSlide=function(e){e.setActive()},SmartSliderAbstract.prototype.forceUnsetActiveSlide=function(e){e.unsetActive()},SmartSliderAbstract.prototype.updateInsideSlides=function(e){for(var t=0;te?this.changeTo(e,!0,i):this.changeTo(e,!1,i):this.changeTo(e,!t,i))},SmartSliderAbstract.prototype.hide=function(){this.isVisible&&(this.responsive.alignElement.addClass("n2-ss-slider-has-no-slide"),this.load.$placeholder.addClass("n2-ss-slider-has-no-slide"),this.isVisible=!1)},SmartSliderAbstract.prototype.show=function(){this.isVisible||(this.responsive.alignElement.removeClass("n2-ss-slider-has-no-slide"),this.load.$placeholder.removeClass("n2-ss-slider-has-no-slide"),$(window).trigger("scroll"),this.isVisible=!0)},SmartSliderAbstract.prototype.startAutoplay=function(){return this.controlAutoplay!==undefined&&(this.controlAutoplay.setState("pausedSecondary",0),!0)},SmartSliderAbstract.prototype.pauseAutoplay=function(){return this.controlAutoplay!==undefined&&(this.controlAutoplay.setState("pausedSecondary",1),!0)},SmartSliderAbstract.prototype.getAnimationAxis=function(){return"horizontal"},SmartSliderAbstract.prototype.getDirectionPrevious=function(){return n2const.isRTL()&&"horizontal"===this.getAnimationAxis()?"next":"previous"},SmartSliderAbstract.prototype.getDirectionNext=function(){return n2const.isRTL()&&"horizontal"===this.getAnimationAxis()?"previous":"next"},SmartSliderAbstract.prototype.previousWithDirection=function(){return this[this.getDirectionPrevious()]()},SmartSliderAbstract.prototype.nextWithDirection=function(){return this[this.getDirectionNext()]()},SmartSliderAbstract.prototype.getUIPreviousSlide=function(e){return e.getPrevious()},SmartSliderAbstract.prototype.getUINextSlide=function(e){return e.getNext()},SmartSliderAbstract}),N2D("Stages",function(r,t){function e(){this.stages={}}function i(e){this.n=e,this.d=r.Deferred()}return e.prototype.get=function(e){return this.stages[e]===t&&(this.stages[e]=new i(e)),this.stages[e]},e.prototype.resolve=function(e){this.get(e).resolve()},e.prototype.done=function(e,t){var i;if("string"==typeof e)i=this.get(e);else{for(var s=[],n=0;n").attr("id",e).css({height:"0",lineHeight:"0",minHeight:"0",margin:"0",padding:"0"}).insertBefore(this.elements.$sliderAlign)},e.prototype.initSmoothScroll=function(){this.parameters.smoothScroll&&s("html").css("scroll-behavior","smooth")},e.prototype.getParameterNumber=function(){var s={};return this.parameters.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(e,t,i){s[t]=i}),s[this.parameters.alias]!==t?parseInt(s[this.parameters.alias]):null},e.prototype.smoothScrollTo=function(e){this.parameters.scroll&&this.parameters.smoothScroll&&n2const._animateScroll(document.scrollingElement,e.offset().top,this.parameters.scrollSpeed)},e}),N2D("SmartSliderControlAutoplay",function(i,s){"use strict";function e(e,t){this.slider=e,this.state={enabled:1,paused:1,pausedSecondary:0,mainAnimationPlaying:0,wait:0},this.wait=new N2Classes.SmartSliderControlAutoplayWait(this),this._currentCount=1,this.autoplayToSlide=0,this.autoplayToSlideIndex=-1,this.parameters=i.extend({enabled:0,start:1,duration:8e3,autoplayLoop:0,allowReStart:0,pause:{mouse:"enter",click:!0,mediaStarted:!0},resume:{click:0,mouse:0,mediaEnded:!0},interval:1,intervalModifier:"loop",intervalSlide:"current"},t),this.clickHandled=!1,(e.controls.autoplay=this).parameters.enabled?(this.parameters.duration/=1e3,this.slider.visible(this.onReady.bind(this))):this.disable()}return e.prototype.preventClickHandle=function(){this.clickHandled=!0,setTimeout(function(){this.clickHandled=!1}.bind(this),300)},e.prototype.onReady=function(){this.timeline=NextendTween.to({_progress:0},this.getSlideDuration(this.slider.currentSlide.index),{_progress:1,paused:!0,onComplete:this.next.bind(this)}),this.slider.sliderElement.on({"BeforeCurrentSlideChange.autoplay":function(){this.wait.resolveWeak(),this.setState("mainAnimationPlaying",1)}.bind(this),"CurrentSlideChanged.autoplay":function(e,t){this.timeline.duration(this.getSlideDuration(t.index)),this.timeline.pause(0,!1),this.setState("mainAnimationPlaying",0)}.bind(this),"mainAnimationStart.autoplay":function(){this._currentCount++,this.wait.resolveWeak(),this.setState("mainAnimationPlaying",1)}.bind(this),"mainAnimationComplete.autoplay":function(e,t,i,s){this.timeline.duration(this.getSlideDuration(s)),this.timeline.pause(0,!1),this.setState("mainAnimationPlaying",0)}.bind(this),"autoplayPause.autoplay":function(){this.setState("paused",1)}.bind(this),"autoplayResume.autoplay":function(e,t){(this.state.paused||0===parseInt(this.parameters.start)&&0===parseInt(this.state.paused))&&(this._currentCount=1),this.setState("pausedSecondary",0),this.setState("paused",0),t!==s&&this.timeline.progress(t)}.bind(this)}),this.initClick(this.parameters.pause.click,this.parameters.resume.click),this.initHover(this.parameters.pause.mouse,this.parameters.resume.mouse),this.initMedia(this.parameters.pause.mediaStarted,this.parameters.resume.mediaEnded),this.slider.stages.resolve("AutoplayReady"),this.slider.trigger("autoplay",0),this.parameters.start||this.setState("pausedSecondary",1),this.setState("paused",0)},e.prototype.setState=function(e,t){this.state[e]!==t&&(this.state[e]=t,this.timeline!==s&&(!this.state.enabled||this.state.paused||this.state.pausedSecondary||this.state.wait||this.state.mainAnimationPlaying?(this.timeline.paused()||this.timeline.pause(),this.state.mainAnimationPlaying||this.isPaused!==s&&this.isPaused||(this.isPaused=!0,this.slider.trigger("autoplayPaused"))):(this.timeline.paused()&&this.timeline.play(),this.isPaused!==s&&!this.isPaused||(this.isPaused=!1,this.slider.trigger("autoplayStarted")))))},e.prototype.initClick=function(t,i){(t||i)&&this.slider.sliderElement.on("universalclick.autoplay",function(e){this.clickHandled||(this.state.pausedSecondary?i&&this.setState("pausedSecondary",0):t&&this.setState("pausedSecondary",1))}.bind(this))},e.prototype.initHover=function(t,i){if(t||i){var s=!1;this.slider.sliderElement.on({"touchend.autoplay":function(){s=!0,setTimeout(function(){s=!1},300)},"mouseenter.autoplay":function(e){this.state.pausedSecondary?"enter"===i&&this.setState("pausedSecondary",0):s||"enter"!==t||this.setState("pausedSecondary",1)}.bind(this),"mouseleave.autoplay":function(e){this.state.pausedSecondary?"leave"===i&&this.setState("pausedSecondary",0):"leave"===t&&this.setState("pausedSecondary",1)}.bind(this)})}},e.prototype.initMedia=function(e,t){var i=this.slider.sliderElement;e?i.on({"mediaStarted.autoplay":function(e,t){this.wait.add(t)}.bind(this),"mediaEnded.autoplay":function(e,t){this.wait.resolve(t)}.bind(this)}):t&&i.on({"mediaEnded.autoplay":function(){this.setState("pausedSecondary",0)}.bind(this)})},e.prototype.enableProgress=function(){this.timeline&&this.timeline.eventCallback("onUpdate",function(){this.slider.trigger("autoplay",this.timeline.progress())}.bind(this))},e.prototype.next=function(){if(this.timeline.pause(),!this.parameters.autoplayLoop){switch(this.parameters.intervalModifier){case"slide":this.slideSwitchingSlideCount();break;case"slideindex":this.slideSwitchingIndex();break;default:this.slideSwitchingLoop()}0=this.autoplayToSlide&&this.limitAutoplay(),0<=this.autoplayToSlideIndex&&this.slider.slides.length===this.slider.visibleSlides.length&&(this.autoplayToSlideIndex===this.slider.currentRealSlide.index+2||1===this.autoplayToSlideIndex&&this.slider.currentRealSlide.index+this.autoplayToSlideIndex===this.slider.slides.length)&&this.limitAutoplay()}this.slider.nextCarousel(!0)},e.prototype.slideSwitchingLoop=function(){this.autoplayToSlide=this.parameters.interval*this.slider.visibleSlides.length-1,"next"===this.parameters.intervalSlide&&this.autoplayToSlide++},e.prototype.slideSwitchingSlideCount=function(){this.autoplayToSlide=this.parameters.interval},e.prototype.slideSwitchingIndex=function(){var e=Math.max(1,this.parameters.interval);e>this.slider.slides.length&&(e=1),this.autoplayToSlideIndex=e},e.prototype.limitAutoplay=function(){this.parameters.allowReStart?(this._currentCount=0,this.setState("paused",1)):this.disable()},e.prototype.disable=function(){this.setState("enabled",0),this.slider.sliderElement.off(".autoplay"),this.slider.stages.resolve("AutoplayDestroyed")},e.prototype.getSlideDuration=function(e){var t=this.slider.realSlides[this.slider.getRealIndex(e)],i=t.minimumSlideDuration;return 0===parseFloat(t.minimumSlideDuration)&&(i=this.parameters.duration),i},e}),N2D("SmartSliderControlFullscreen",function(n,e){"use strict";function t(e,t,i){this.slider=e,this.responsive=this.slider.responsive,this._type=this.responsive.parameters.type,this._forceFull=this.responsive.parameters.forceFull,this.forceFullpage="auto"==this._type||"fullwidth"==this._type||"fullpage"==this._type,this.forceFullpage&&(this._upscale=this.responsive.parameters.upscale),this.isFullScreen=!1,this.fullParent=this.slider.sliderElement.closest(".n2-ss-align"),this.browserSpecific={};var s=this.slider.sliderElement[0];s.requestFullscreen?(this.browserSpecific.requestFullscreen="requestFullscreen",this.browserSpecific.event="fullscreenchange"):s.msRequestFullscreen?(this.browserSpecific.requestFullscreen="msRequestFullscreen",this.browserSpecific.event="MSFullscreenChange"):s.mozRequestFullScreen?(this.browserSpecific.requestFullscreen="mozRequestFullScreen",this.browserSpecific.event="mozfullscreenchange"):s.webkitRequestFullscreen?(this.browserSpecific.requestFullscreen="webkitRequestFullscreen",this.browserSpecific.event="webkitfullscreenchange"):(this.browserSpecific.requestFullscreen="nextendRequestFullscreen",this.browserSpecific.event="nextendfullscreenchange",this.fullParent[0][this.browserSpecific.requestFullscreen]=function(){this.fullParent.css({position:"fixed",left:"0",top:"0",width:"100%",height:"100%",backgroundColor:"#000",zIndex:"1000000"}),document.fullscreenElement=this.fullParent[0],this.triggerEvent(document,this.browserSpecific.event),n(window).trigger("resize")}.bind(this)),document.exitFullscreen?this.browserSpecific.exitFullscreen="exitFullscreen":document.msExitFullscreen?this.browserSpecific.exitFullscreen="msExitFullscreen":document.mozCancelFullScreen?this.browserSpecific.exitFullscreen="mozCancelFullScreen":document.webkitExitFullscreen?this.browserSpecific.exitFullscreen="webkitExitFullscreen":(this.browserSpecific.exitFullscreen="nextendExitFullscreen",this.fullParent[0][this.browserSpecific.exitFullscreen]=function(){this.fullParent.css({position:"",left:"",top:"",width:"",height:"",backgroundColor:"",zIndex:""}),document.fullscreenElement=null,this.triggerEvent(document,this.browserSpecific.event)}.bind(this)),document.addEventListener(this.browserSpecific.event,this.fullScreenChange.bind(this))}return t.prototype.switchState=function(){this.isFullScreen=!this.isFullScreen,this.isFullScreen?this._fullScreen():this._normalScreen()},t.prototype.requestFullscreen=function(){return!this.isFullScreen&&(this.isFullScreen=!0,this._fullScreen(),!0)},t.prototype.exitFullscreen=function(){return!!this.isFullScreen&&(this.isFullScreen=!1,this._normalScreen(),!0)},t.prototype.triggerEvent=function(e,t){var i;document.createEvent?(i=document.createEvent("HTMLEvents")).initEvent(t,!0,!0):document.createEventObject&&((i=document.createEventObject()).eventType=t),i.eventName=t,e.dispatchEvent?e.dispatchEvent(i):e.fireEvent&&htmlEvents["on"+t]?e.fireEvent("on"+i.eventType,i):e[t]?e[t]():e["on"+t]&&e["on"+t]()},t.prototype._fullScreen=function(){this.forceFullpage&&(this.responsive.isFullScreen=!0,this.responsive.parameters.type="fullpage",this.responsive.parameters.upscale=!0,this.responsive.parameters.forceFull=!1,this._marginLeft=this.responsive.containerElement[0].style.marginLeft,this._marginRight=this.responsive.containerElement[0].style.marginRight,this.responsive.containerElement.css({marginLeft:"0",marginRight:"0"})),this.fullParent.css({width:"100%",height:"100%",backgroundColor:n("body").css("background-color")}).addClass("n2-ss-in-fullscreen"),this.fullParent.get(0)[this.browserSpecific.requestFullscreen]()},t.prototype._normalScreen=function(){document[this.browserSpecific.exitFullscreen]?document[this.browserSpecific.exitFullscreen]():this.fullParent[0][this.browserSpecific.exitFullscreen]&&this.fullParent[0][this.browserSpecific.exitFullscreen]()},t.prototype.fullScreenChange=function(){var e="",t="";this.isDocumentInFullScreenMode()?(this.slider.trigger("n2FullScreen"),n("html").addClass("n2-in-fullscreen"),this.isFullScreen=!0,n(window).trigger("resize")):this.forceFullpage&&(this.responsive.isFullScreen=!1,this.responsive.parameters.type=this._type,this.responsive.parameters.upscale=this._upscale,this.responsive.parameters.forceFull=this._forceFull,e=this._marginLeft?this._marginLeft+"px":this._marginLeft,t=this._marginRight?this._marginRight+"px":this._marginRight,this.responsive.containerElement.css({marginLeft:e,marginRight:t}),this.fullParent.css({width:"",height:"",backgroundColor:""}).removeClass("n2-ss-in-fullscreen"),n("html").removeClass("n2-in-fullscreen"),n(window).trigger("resize"),this.isFullScreen=!1,this.slider.trigger("n2ExitFullScreen"))},t.prototype.isDocumentInFullScreenMode=function(){return document.fullscreenElement&&null!==document.fullscreenElement||document.msFullscreenElement&&null!==document.msFullscreenElement||document.mozFullScreen||document.webkitIsFullScreen},t}),N2D("SmartSliderControlKeyboard",function(s,e){"use strict";var n;function r(){this.controls=[],document.addEventListener("keydown",this.onKeyDown.bind(this)),document.addEventListener("mousemove",this.onMouseMove.bind(this),{capture:!0})}function o(e,t,i){this.slider=e,this.parameters=s.extend({},i),this.parseEvent="vertical"===t?o.prototype.parseEventVertical:o.prototype.parseEventHorizontal,n||(n=new r),n.addControl(this),this.slider.sliderElement.on("SliderKeyDown",this.onKeyDown.bind(this)),e.controls.keyboard=this}return r.prototype.onMouseMove=function(e){this.mouseEvent=e},r.prototype.addControl=function(e){this.controls.push(e)},r.prototype.onKeyDown=function(e){if(e.target.tagName.match(/BODY|DIV|IMG/)&&!e.target.isContentEditable){var t;if(this.mouseEvent&&(t=this.findSlider(document.elementFromPoint(this.mouseEvent.clientX,this.mouseEvent.clientY))))return void t.trigger("SliderKeyDown",e);if(document.activeElement!==document.body&&(t=this.findSlider(document.activeElement)))return void t.trigger("SliderKeyDown",e);for(var i=0;i=t&&e.top-.5*i<=t+s(window).height()},o.prototype.onKeyDown=function(e,t){!t.defaultPrevented&&this.isSliderOnScreen()&&this.parseEvent.call(this,t)&&t.preventDefault()},o.prototype.parseEventHorizontal=function(e){switch(e.keyCode){case 39:return n2const.activeElementBlur(),this.slider[n2const.isRTL()?"previous":"next"](),!0;case 37:return n2const.activeElementBlur(),this.slider[n2const.isRTL()?"next":"previous"](),!0;default:return!1}},o.prototype.parseEventVertical=function(e){switch(e.keyCode){case 40:return(!this.slider.isChangeCarousel("next")||!this.slider.parameters.controls.blockCarouselInteraction)&&(n2const.activeElementBlur(),this.slider.next(),!0);case 38:return(!this.slider.isChangeCarousel("previous")||!this.slider.parameters.controls.blockCarouselInteraction)&&(n2const.activeElementBlur(),this.slider.previous(),!0);default:return!1}},o}),N2D("SmartSliderControlMouseWheel",function(s,e){"use strict";function t(e){this.preventScroll={local:!1,curve:!1,curveGlobal:!1,global:!1,localTimeout:!1,curveTimeout:!1,curveGlobalTimeout:!1,globalTimeout:!1},this.maxDelta=0,this.slider=e,document.addEventListener("wheel",this.onGlobalMouseWheel.bind(this),{passive:!1}),e.controls.mouseWheel=this}return t.prototype.hasScrollableParentRecursive=function(e,t){if(t===this.slider.sliderElement[0])return!1;if(t.scrollHeight>t.clientHeight){var i=s(t).css("overflow");if("hidden"!==i&&"visible"!==i)if(e){if(0t&&this.releaseCurveLock(),this.maxDelta=Math.max(this.maxDelta,t),this.preventScroll.curveGlobalTimeout&&clearTimeout(this.preventScroll.curveGlobalTimeout),this.preventScroll.curveGlobalTimeout=setTimeout(s.proxy(function(){this.preventScroll.curveGlobal=!1,this.maxDelta=0},this),500)}},t.prototype.releaseCurveLock=function(){this.preventScroll.curve=!1,clearTimeout(this.preventScroll.curveTimeout)},t.prototype.local=function(){!1!==this.preventScroll.local&&clearTimeout(this.preventScroll.localTimeout),this.preventScroll.local=!0,this.preventScroll.localTimeout=setTimeout(function(){this.preventScroll.local=!1,this.dynamicDelta||this.releaseCurveLock()}.bind(this),1e3)},t.prototype.global=function(){!1!==this.preventScroll.global&&clearTimeout(this.preventScroll.globalTimeout),this.preventScroll.global=!0,this.preventScroll.globalTimeout=setTimeout(function(){this.preventScroll.global=!1}.bind(this),2e3)},t}),N2D("SmartSliderControlTouch",function(t,e){"use strict";function i(e){this.slider=e,this.minDistance=10,this.interactiveDrag=!0,this.preventMultipleTap=!1,this._animation=e.mainAnimation,this.swipeElement=this.slider.sliderElement.find("> .n2_ss__touch_element"),this.$window=t(window),e.controls.touch=this,e.stages.done("StarterSlide",this.onStarterSlide.bind(this)),e.sliderElement.on("visibleSlidesChanged",this.onVisibleSlidesChanged.bind(this))}return i.prototype.onStarterSlide=function(){-1this.minDistance||Math.abs(i.y)>this.minDistance)&&(this.logDistance(n,i.y),this.currentInteraction.percent<1&&this.setTouchProgress(n,i.y),"touch"===this.currentInteraction.type&&e.cancelable&&("switch"!==this.currentInteraction.action&&"hold"!==this.currentInteraction.action||(this.currentInteraction.hadDirection=!0))),"switch"===this.currentInteraction.action)return!0}return!1},i.prototype._end=function(e,t,i,s){if("switch"===this.currentInteraction.action){var n=s?0:this.measureRealDirection();if(this.interactiveDrag)this._animation.timeline.progress()<1&&this._animation.setTouchEnd(n,this.currentInteraction.progress,i.time),this._animation.setTouch(!1);else n&&this.callAction(this.currentInteraction.animationStartDirection);this.swipeElement.removeClass("n2-grabbing")}this.onEnd(),delete this.currentInteraction,Math.abs(i.x)<10&&Math.abs(i.y)<10?this.onTap(e):nextend.preventClick()},i.prototype.onEnd=function(){if("scroll"===this.currentInteraction.action&&"pointer"===this.currentInteraction.type){var e=this.currentInteraction.distanceY[0],t=this.currentInteraction.distanceY[this.currentInteraction.distanceY.length-1],i=(e.d-t.d)/(t.t-e.t)*10,s=Date.now(),n=function(){requestAnimationFrame(function(){var e,t;if(!this.kineticScrollCancelled&&i&&(e=Date.now()-s,1<(t=i*Math.exp(-e/325))||t<-1))return this.$window.scrollTop(this.$window.scrollTop()+t),void n();this.onEndKineticScroll()}.bind(this))}.bind(this);this.kineticScrollCancelled=!1,n(),document.addEventListener("pointerdown",this.cancelKineticScroll)}},i.prototype.onEndKineticScroll=function(){delete this.kineticScrollCancelled,document.removeEventListener("pointerdown",this.cancelKineticScroll),t("html").css("scroll-behavior","")},i.prototype.setTouchProgress=function(e,t){this.recognizeSwitchInteraction();var i,s=this.getPercent(e);if(this.currentInteraction.percent=s,"switch"===this.currentInteraction.action){if(this.interactiveDrag){switch(this.currentInteraction.animationStartDirection){case"up":i=-1*s;break;case"down":i=s;break;case"left":i=-1*s;break;case"right":i=s}this.currentInteraction.progress=i,this._animation.setTouchProgress(i)}}else"unknown"!==this.currentInteraction.action&&"scroll"!==this.currentInteraction.action||this.startScrollInteraction(t)},i.prototype.startScrollInteraction=function(e){"vertical"!==this.axis&&!n2const.isEdge||this.slider.controlFullscreen.isFullScreen||(this.currentInteraction.action="scroll","pointer"===this.currentInteraction.type&&(t("html").css("scroll-behavior","auto"),this.$window.scrollTop(Math.max(0,this.currentInteraction.scrollTop-e))))},i.prototype.recognizeSwitchInteraction=function(){if("unknown"===this.currentInteraction.action&&1t.d||t.d<0&&e.d').attr(i).appendTo(this.$background)}}},e.prototype.fadeOut=function(){NextendTween.to(this.$background,.3,{opacity:0})},e}),N2D("SmartSliderSlideBackground",function(l,e){function t(e,t,i){if(this.loadStarted=!1,this.types=this.types||{color:"SmartSliderSlideBackgroundColor",image:"SmartSliderSlideBackgroundImage",video:"SmartSliderSlideBackgroundVideo"},this.width=0,this.height=0,this.slide=e,this.element=t,e.slider.needBackgroundWrap){var s=t.find("> *");this.$wrapElement=l('
').appendTo(t).append(s)}else this.$wrapElement=this.element;this.manager=i,this.loadDeferred=l.Deferred(),this.elements={color:!1,image:!1,video:!1},this.currentSrc="",this.mode=t.data("mode"),this.opacity=t.data("opacity");var n=this.element.find(".n2-ss-slide-background-image");n.length&&(this.elements.image=new N2Classes[this.types.image](e,i,this,n));var r=this.element.find(".n2-ss-slide-background-color");r.length&&(this.elements.color=new N2Classes[this.types.color](this,r));var o=[];for(var a in this.elements)this.elements[a]&&o.push(this.elements[a].getLoadedDeferred());l.when.apply(l,o).then(function(){this.loadDeferred.resolve()}.bind(this))}return t.prototype.preLoad=function(){return this.loadStarted||(this.slide.$element.find("[data-lazysrc]").each(function(){var e=l(this);e.attr("src",e.data("lazysrc"))}),this.loadStarted=!0),"pending"===this.loadDeferred.state()&&this.elements.image&&this.elements.image.preLoad(),this.loadDeferred},t.prototype.fadeOut=function(){this.elements.image&&this.elements.image.fadeOut()},t.prototype.hack=function(){NextendTween.set(this.element,{rotation:1e-4})},t.prototype.hasColor=function(){return this.elements.color},t.prototype.hasImage=function(){return this.elements.image},t.prototype.hasVideo=function(){return this.elements.video},t.prototype.hasBackground=function(){return this.elements.color||this.elements.image||this.elements.video},t.prototype.updateBackgroundToDevice=function(e){this.hasImage()&&this.elements.image.updateBackgroundToDevice(e)},t}),N2D("FrontendComponentCommon",["FrontendComponent"],function(s,n){function e(e,t,i,s){this.wraps={},N2Classes.FrontendComponent.prototype.constructor.apply(this,arguments)}return((e.prototype=Object.create(N2Classes.FrontendComponent.prototype)).constructor=e).prototype.init=function(e){this.stateCBs=[],this.state={InComplete:!1};var t=this.$layer.find("> .n2-ss-layer-mask");t.length&&(this.wraps.mask=t);var i=this.$layer.find("> .n2-ss-layer-parallax");switch(i.length&&(this.wraps.parallax=i),this.$layer.data("pm")){case"absolute":this.placement=new N2Classes.FrontendPlacementAbsolute(this);break;case"normal":this.placement=new N2Classes.FrontendPlacementNormal(this);break;case"content":this.placement=new N2Classes.FrontendPlacementContent(this);break;default:this.placement=new N2Classes.FrontendPlacementDefault(this)}this.parallax=this.$layer.data("parallax"),this.baseSize=this.baseSize||100,this.isAdaptiveFont=this.isAdaptiveFont||this.parent.isAdaptiveFont||this.get("adaptivefont"),this.refreshBaseSize(this.getDevice("fontsize",100)),N2Classes.FrontendComponent.prototype.init.call(this,e)},e.prototype.setState=function(e,t){this.state[e]=t;for(var i=0;i");NextendTween.set(t[0],{rotationZ:e})}},e.prototype.onDeviceChange=function(e){N2Classes.FrontendComponent.prototype.onDeviceChange.call(this,e);var t=this.isVisible;if(this.isVisible=this.getDevice("")&&this.parent.isVisible,this.isVisible===n&&(this.isVisible=1),t&&!this.isVisible?(this.$layer.data("shows",0),this.$layer.css("display","none"),this.$layer.triggerHandler("visibilityChange",[0])):!t&&this.isVisible&&(this.$layer.data("shows",1),this.$layer.css("display",""),this.$layer.triggerHandler("visibilityChange",[1])),this.isVisible){var i=this.getDevice("fontsize",100);this.refreshBaseSize(i),!this.parent.isAdaptiveFont&&this.isAdaptiveFont?this.$layer.css("font-size",N2Classes.FontSize.toRem(16*i/100)):this.$layer.css("font-size",i+"%");for(var s=0;s'+s+"").prependTo(this.$element),this.$focusableElements=this.$element.find('a[href]:not([href=""]),link,button,input:not([type="hidden"]),select,textarea,audio[controls],video[controls],[tabindex]:not([tabindex="-1"])'),this.disableFocus(),this.background=!1,e.parameters.admin?this.minimumSlideDuration=0:(this.minimumSlideDuration=parseFloat(t.data("slide-duration")),isFinite(this.minimumSlideDuration)||(this.minimumSlideDuration=0)),this._isCurrentlyEdited=this.slider.parameters.admin&&this.$element.hasClass("n2-ss-currently-edited-slide"),this.isCurrentlyEdited()?(this.$layer=t.find('.n2-ss-layer[data-sstype="slide"]'),e.sliderElement.on({SliderDeviceOrientation:function(){this.slider.visibleRealSlides.push(this),this.isVisible=!0,this.slider.responsive.visibleRealSlidesChanged=!0,this.triggerHandler("Visible")}.bind(this)})):(this.component=new N2Classes.FrontendComponentSectionSlide(this,e,t.find('.n2-ss-layer[data-sstype="slide"]')),this.$layer=this.component.$layer)}var t=!(((e.prototype=Object.create(N2Classes.FrontendSliderSlideAbstract.prototype)).constructor=e).prototype._setInside=function(e){this.isInside!==e&&(this.isInside=e)});try{document.createElement("div").focus(Object.defineProperty({},"preventScroll",{get:function(){t=!0}}))}catch(e){}return e.prototype.focus=function(){t&&this.$slideFocus[0].focus({preventScroll:!0})},e.prototype.allowFocus=function(){this.$focusableElements.attr("tabindex","0"),this.$element.removeAttr("aria-hidden")},e.prototype.disableFocus=function(){this.$focusableElements.attr("tabindex","-1"),this.$element.attr("aria-hidden",!0)},e.prototype.init=function(){var e=this.slider.findSlideBackground(this);0 .n2-ss-layer"))}return((i.prototype=Object.create(N2Classes.FrontendComponentCommon.prototype)).constructor=i).prototype.onDeviceChange=function(e){N2Classes.FrontendComponentCommon.prototype.onDeviceChange.apply(this,arguments),this.updateOrder(),this.updatePadding(),this.updateVerticalAlign(),this.updateInnerAlign(),this.updateMaxWidth()},i.prototype.updatePadding=function(){var e=this.getDevice("padding").split("|*|"),t=e.pop(),i=this.baseSize;if("px+"===t&&0 .n2-ss-layer"))}return((i.prototype=Object.create(N2Classes.FrontendComponentCommon.prototype)).constructor=i).prototype.onDeviceChange=function(e){N2Classes.FrontendComponentCommon.prototype.onDeviceChange.apply(this,arguments),this.updatePadding(),this.updateVerticalAlign(),this.updateInnerAlign(),this.updateMaxWidth(),this.updateSelfAlign()},i.prototype.updatePadding=function(){var e=this.getDevice("padding").split("|*|"),t=e.pop(),i=this.baseSize;if("px+"==t&&0 .n2-ss-layer"))}return((e.prototype=Object.create(N2Classes.FrontendComponentCommon.prototype)).constructor=e).prototype.init=function(e){N2Classes.FrontendComponentCommon.prototype.init.call(this,e);for(var t=0;t .n2-ss-layer")),t.sliderElement.on({SliderDeviceOrientation:function(e,t){this.onDeviceChange(t.device.toLowerCase())}.bind(this),SliderResize:function(e,t,i){this.onResize(t,i.resizeContext)}.bind(this)}),this.start()}return((i.prototype=Object.create(N2Classes.FrontendComponent.prototype)).constructor=i).prototype.onDeviceChange=function(e){N2Classes.FrontendComponent.prototype.onDeviceChange.call(this,e);for(var t=0;t').appendTo("body")),this.containerElementPadding=this.sliderElement.parent(),this.containerElement=this.containerElementPadding.parent(),!this.slider.isAdmin&&this.parameters.overflowHiddenPage&&p("html, body").css("overflow","hidden"),nextend.smallestZoom=320,this.slider.stages.resolve("ResponsiveStart"),this.init(),this.onResize(),p(window).on("SliderContentResize",function(e){this.onResize(e)}.bind(this)),this.parameters.onResizeEnabled)if(p(window).on({resize:this.onResize.bind(this),orientationchange:this.onResize.bind(this)}),window.ResizeObserver!==e){var t=0;new ResizeObserver(function(e){e.forEach(function(e){t!==e.contentRect.width&&(t=e.contentRect.width,this.internalResize())}.bind(this))}.bind(this)).observe(this.containerElement.parent().get(0))}else try{p('').on("load",function(e){var i=0,s=p(e.target.contentWindow?e.target.contentWindow:e.target.contentDocument.defaultView).on("resize",function(e){var t=s.width();i!==t&&(i=t,this.internalResize())}.bind(this));s[0].document.getElementsByTagName("HTML")[0].setAttribute("lang",window.document.getElementsByTagName("HTML")[0].getAttribute("lang"))}.bind(this)).insertBefore(this.containerElement)}catch(e){}},u.prototype.internalResize=function(){this.onResize()},u.prototype.getMinimumContentHeight=function(){var e,t,i=this.slider.visibleRealSlides,s=0;for(e=0;e');this.$playerElement.prepend(e),this.player=new Vimeo.Player(e[0],{autoplay:!1}),this.promise=this.player.ready(),this.slider.stages.done("BeforeShow",function(){this.promise.then(this.onReady.bind(this))}.bind(this))},i.prototype.onReady=function(){var e=parseFloat(this.parameters.volume);0<=e&&this.setVolume(e),this.slide=this.slider.findSlideByElement(this.$playerElement),this.isStatic=this.slide.isStatic();var t=this.$playerElement.closest(".n2-ss-layer");this.layer=t.data("layer"),this.layer.isVisible&&this.setState("visible",!0,!0),this.layer.$layer.on("visibilityChange",function(e,t){if(t)this.setState("visible",!0,!0);else{var i=this.state.play;this.setState("visible",!1,!0),i&&this.setState("continuePlay",!0)}}.bind(this)),this.slide.isVisible&&this.setState("slideVisible",!0,!0),this.slide.$element.on({Hidden:function(){var e=this.state.play;this.setState("slideVisible",!1,!0),e&&this.setState("continuePlay",!0)}.bind(this),Visible:function(){this.setState("slideVisible",!0,!0)}.bind(this)}),this.$cover.length&&(n2const.isMobile&&this.$cover.on("click",this.safePlay.bind(this)),t.one("n2play",function(){NextendTween.to(this.$cover,.3,{opacity:0,onComplete:function(){this.$cover.remove()}.bind(this)})}.bind(this))),this.player.on("play",function(){this.isStatic||this.slider.trigger("mediaStarted",this.playerId),t.triggerHandler("n2play")}.bind(this)),this.player.on("pause",function(){t.triggerHandler("n2pause"),this.state.continuePlay?(this.setState("continuePlay",!1),this.setState("play",!0)):this.setState("play",!1)}.bind(this)),this.player.on("ended",function(){this.isStatic||this.slider.trigger("mediaEnded",this.playerId),t.triggerHandler("n2stop"),this.setState("play",!1),"next"===this.parameters.ended&&0==this.parameters.loop&&((document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement)&&(document.exitFullscreen||document.mozCancelFullScreen||document.webkitExitFullscreen).call(document),this.slider.next())}.bind(this)),this.isStatic||this.slider.sliderElement.on({CurrentSlideChanged:function(e,t){this.onCurrentSlideChange(t)}.bind(this),mainAnimationStart:function(e,t,i,s){this.onCurrentSlideChange(this.slider.slides[s])}.bind(this)}),""!==this.parameters["scroll-pause"]?N2Classes.ScrollTracker.add(this.$playerElement,this.parameters["scroll-pause"],function(){this.setState("scroll",!0,!0)}.bind(this),function(){this.setState("continuePlay",!0),this.setState("scroll",!1,!0)}.bind(this)):this.setState("scroll",!0,!0),this.slide.isActiveWhen()&&this.setState("slide",!0,!0),1===parseInt(this.parameters.autoplay)&&this.slider.visible(this.initAutoplay.bind(this)),this.readyDeferred.resolve()},i.prototype.onCurrentSlideChange=function(e){this.slide.isActiveWhen(e)?1==this.parameters.autoplay&&this.setState("play",!0):parseInt(this.parameters.reset)&&this.reset(),this.setState("slide",!0,!0)},i.prototype.initAutoplay=function(){this.setState("InComplete",!0,!0),this.isStatic?(this.setState("play",!0),this.setState("slide",!0,!0)):(this.slider.sliderElement.on("mainAnimationComplete",function(e,t,i,s,n){this.slide.isActiveWhen(this.slider.slides[s])?(this.setState("play",!0),this.setState("slide",!0,!0)):this.setState("slide",!1,!0)}.bind(this)),this.slide.isActiveWhen()&&(this.setState("play",!0),this.setState("slide",!0,!0)))},i.prototype.setState=function(e,t,i){i=i||!1,this.state[e]=t,i&&(this.state.slideVisible&&this.state.visible&&this.state.play&&this.state.slide&&this.state.InComplete&&this.state.scroll&&this.layer.isVisible?this.play():this.pause())},i.prototype.play=function(){this.slider.trigger("mediaStarted",this.playerId),0!=this.start&&this.safeSetCurrentTime(this.start),this.safePlay(),this.player.getCurrentTime().then(function(e){e https://powerbank-personnalise.fr/wp-content/plugins/smart-slider-3/Public/SmartSlider3/Slider/SliderType/Simple/Assets/dist/smartslider-simple-type-frontend.min.js?ver=821e0c40
(function(){var e=this;e.N2_=e.N2_||{r:[],d:[]},e.N2R=e.N2R||function(){e.N2_.r.push(arguments)},e.N2D=e.N2D||function(){e.N2_.d.push(arguments)}}).call(window),N2D("SmartSliderMainAnimationSimple",["SmartSliderMainAnimationAbstract"],function(t,e){function i(e,i){switch(this.postBackgroundAnimation=!1,this._currentBackgroundAnimation=!1,this.reverseSlideIndex=null,(i=t.extend({delay:0,parallax:0,type:"horizontal",shiftedBackgroundAnimation:"auto"},i)).delay/=1e3,N2Classes.SmartSliderMainAnimationAbstract.prototype.constructor.apply(this,arguments),this.parameters.type){case"no":this.animation=this._mainAnimationNo,this.isNoAnimation=!0;break;case"fade":this.animation=this._mainAnimationFade;break;case"crossfade":this.animation=this._mainAnimationCrossFade;break;case"vertical":e.backgrounds.hasFixed?this.animation=this._mainAnimationFade:0===this.parameters.parallax?this.animation=this._mainAnimationVertical:this.animation=this._mainAnimationVerticalParallax;break;case"vertical-reversed":e.backgrounds.hasFixed?this.animation=this._mainAnimationFade:0===this.parameters.parallax?this.animation=this._mainAnimationVerticalReversed:this.animation=this._mainAnimationVerticalReversedParallax;break;case"horizontal-reversed":0===this.parameters.parallax?this.animation=this._mainAnimationHorizontalReversed:this.animation=this._mainAnimationHorizontalReversedParallax;break;default:0===this.parameters.parallax?this.animation=this._mainAnimationHorizontal:this.animation=this._mainAnimationHorizontalParallax}}return((i.prototype=Object.create(N2Classes.SmartSliderMainAnimationAbstract.prototype)).constructor=i).prototype.changeTo=function(e,i,t,s){this.postBackgroundAnimation&&this.postBackgroundAnimation.prepareToSwitchSlide(e,i),N2Classes.SmartSliderMainAnimationAbstract.prototype.changeTo.apply(this,arguments)},i.prototype.setActiveSlide=function(e){for(var i=0;i https://powerbank-personnalise.fr/wp-content/plugins/smart-slider-3/Public/SmartSlider3/Application/Frontend/Assets/dist/nextend-webfontloader.min.js?ver=821e0c40
!function(){function e(t,n,i){return t.call.apply(t.bind,arguments)}function o(n,i,t){if(!n)throw Error();if(2=o.f?t():e.fonts.load(function(t){return x(t)+" "+t.f+"00 300px "+b(t.c)}(o.a),o.h).then(function(t){1<=t.length?i():setTimeout(n,25)},function(){t()})}()}),i=null,n=new Promise(function(t,n){i=setTimeout(n,o.f)});Promise.race([n,t]).then(function(){i&&(clearTimeout(i),i=null),o.g(o.a)},function(){o.j(o.a)})};var F={D:"serif",C:"sans-serif"},I=null;function O(){if(null===I){var t=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);I=!!t&&(parseInt(t[1],10)<536||536===parseInt(t[1],10)&&parseInt(t[2],10)<=11)}return I}function P(t,n,i){for(var e in F)if(F.hasOwnProperty(e)&&n===t.f[F[e]]&&i===t.f[F[e]])return!0;return!1}function B(t){var n,i=t.g.a.offsetWidth,e=t.h.a.offsetWidth;(n=i===t.f.serif&&e===t.f["sans-serif"])||(n=O()&&P(t,i,e)),n?s()-t.A>=t.w?O()&&P(t,i,e)&&(null===t.u||t.u.hasOwnProperty(t.a.c))?L(t,t.v):L(t,t.B):function(t){setTimeout(g(function(){B(this)},t),50)}(t):L(t,t.v)}function L(t,n){setTimeout(g(function(){i(this.g.a),i(this.h.a),i(this.j.a),i(this.m.a),n(this.a)},t),0)}function D(t,n,i){this.c=t,this.a=n,this.f=0,this.m=this.j=!1,this.s=i}W.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=s(),B(this)};var $=null;function q(t){0==--t.f&&t.j&&(t.m?((t=t.a).g&&d(t.f,[t.a.c("wf","active")],[t.a.c("wf","loading"),t.a.c("wf","inactive")]),T(t,"active")):k(t.a))}function t(t){this.j=t,this.a=new S,this.h=0,this.f=this.g=!0}function H(t,n){this.c=t,this.a=n}function M(t,n){this.c=t,this.a=n}function z(t,n){this.c=t||"https://fonts.googleapis.com/css",this.a=[],this.f=[],this.g=n||""}D.prototype.g=function(t){var n=this.a;n.g&&d(n.f,[n.a.c("wf",t.c,j(t).toString(),"active")],[n.a.c("wf",t.c,j(t).toString(),"loading"),n.a.c("wf",t.c,j(t).toString(),"inactive")]),T(n,"fontactive",t),this.m=!0,q(this)},D.prototype.h=function(t){var n=this.a;if(n.g){var i=a(n.f,n.a.c("wf",t.c,j(t).toString(),"active")),e=[],o=[n.a.c("wf",t.c,j(t).toString(),"loading")];i||e.push(n.a.c("wf",t.c,j(t).toString(),"inactive")),d(n.f,e,o)}T(n,"fontinactive",t),q(this)},t.prototype.load=function(t){this.c=new n(this.j,t.context||this.j),this.g=!1!==t.events,this.f=!1!==t.classes,function(o,t,n){var i=[],e=n.timeout;!function(t){t.g&&d(t.f,[t.a.c("wf","loading")]),T(t,"loading")}(t);var i=function(t,n,i){var e,o=[];for(e in n)if(n.hasOwnProperty(e)){var a=t.c[e];a&&o.push(a(n[e],i))}return o}(o.a,n,o.c),a=new D(o.c,t,e);for(o.h=i.length,t=0,n=i.length;t