Boxzilla - Version 3.2.23

Version Description

Download this release

Release Info

Developer DvanKooten
Plugin Icon 128x128 Boxzilla
Version 3.2.23
Comparing to
See all releases

Code changes from version 3.2.22 to 3.2.23

CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
  Changelog
2
  ==========
3
 
 
 
 
 
 
4
  #### 3.2.22 - Mar 19, 2020
5
 
6
  - Minor code improvements
@@ -53,7 +58,7 @@ Changelog
53
 
54
  **Improvements**
55
 
56
- Roll-back a change in version 3.2.15 that caused an issue with Boxzilla Theme Pack and Boxzilla WooCommerce.
57
 
58
  Please make sure your [Boxzilla plugin license](https://my.boxzillaplugin.com/) is activated and then update Boxzilla Theme Pack and Boxzilla WooCommerce to the latest version.
59
 
@@ -154,7 +159,7 @@ Please make sure your [Boxzilla plugin license](https://my.boxzillaplugin.com/)
154
 
155
  **Fixes**
156
 
157
- - Boxzilla content replicating parts of the page if other plugins "incorrectly" use `the_content` filter.
158
 
159
 
160
  #### 3.2.3 - May 29, 2018
@@ -243,7 +248,7 @@ Please make sure your [Boxzilla plugin license](https://my.boxzillaplugin.com/)
243
 
244
  **Additions**
245
 
246
- - Added [`[boxzilla_link]` shortcode to generate the correct HTML for a link to show/toggle/hide/dismiss a box](https://kb.boxzillaplugin.com/shortcode-boxzilla-link/).
247
 
248
 
249
  #### 3.1.17 - August 30, 2017
1
  Changelog
2
  ==========
3
 
4
+ #### 3.2.23 - Jul 13, 2020
5
+
6
+ - Add `aria-label` to close icon to help screen readers.
7
+
8
+
9
  #### 3.2.22 - Mar 19, 2020
10
 
11
  - Minor code improvements
58
 
59
  **Improvements**
60
 
61
+ Roll-back a change in version 3.2.15 that caused an issue with Boxzilla Theme Pack and Boxzilla WooCommerce.
62
 
63
  Please make sure your [Boxzilla plugin license](https://my.boxzillaplugin.com/) is activated and then update Boxzilla Theme Pack and Boxzilla WooCommerce to the latest version.
64
 
159
 
160
  **Fixes**
161
 
162
+ - Boxzilla content replicating parts of the page if other plugins "incorrectly" use `the_content` filter.
163
 
164
 
165
  #### 3.2.3 - May 29, 2018
248
 
249
  **Additions**
250
 
251
+ - Added [`[boxzilla_link]` shortcode to generate the correct HTML for a link to show/toggle/hide/dismiss a box](https://kb.boxzillaplugin.com/shortcode-boxzilla-link/).
252
 
253
 
254
  #### 3.1.17 - August 30, 2017
assets/js/script.js CHANGED
@@ -461,6 +461,7 @@ Box.prototype.dom = function () {
461
  var closeIcon = document.createElement('span');
462
  closeIcon.className = 'boxzilla-close-icon';
463
  closeIcon.innerHTML = this.config.icon;
 
464
  box.appendChild(closeIcon);
465
  this.closeIcon = closeIcon;
466
  }
461
  var closeIcon = document.createElement('span');
462
  closeIcon.className = 'boxzilla-close-icon';
463
  closeIcon.innerHTML = this.config.icon;
464
+ closeIcon.setAttribute('aria-label', 'close');
465
  box.appendChild(closeIcon);
466
  this.closeIcon = closeIcon;
467
  }
assets/js/script.min.js CHANGED
@@ -1,2 +1,2 @@
1
- !function r(s,l,c){function a(e,t){if(!l[e]){if(!s[e]){var i=!1;if(!t&&i)return i(e,!0);if(d)return d(e,!0);var o=new Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}var n=l[e]={exports:{}};s[e][0].call(n.exports,function(t){return a(s[e][1][t]||t)},n,n.exports,r,s,l,c)}return l[e].exports}for(var d=!1,t=0;t<c.length;t++)a(c[t]);return a}({1:[function(t,e,i){"use strict";function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t){if(!window.location.hash||0===window.location.hash.length)return!1;var e=window.location.hash.match(/[#&](boxzilla-\d+)/);if(!e||"object"!==s(e)||e.length<2)return!1;var i=e[1];return i===t.element.id||!!t.element.querySelector("#"+i)}var c,a,d;c=t("boxzilla"),a=window.boxzilla_options,(d=document.body&&document.body.className&&-1<document.body.className.indexOf("logged-in"))&&a.testMode&&console.log("Boxzilla: Test mode is enabled. Please disable test mode if you're done testing."),c.init(),window.addEventListener("load",function(){if(!a.inited){for(var t in a.boxes){var e=a.boxes[t];e.testMode=d&&a.testMode;var i=document.getElementById("boxzilla-box-"+e.id+"-content");if(i){e.content=i;var o=c.create(e.id,e);o.element.className=o.element.className+" boxzilla-"+e.post.slug,n=o.element,(r=e.css).background_color&&(n.style.background=r.background_color),r.color&&(n.style.color=r.color),r.border_color&&(n.style.borderColor=r.border_color),r.border_width&&(n.style.borderWidth=parseInt(r.border_width)+"px"),r.border_style&&(n.style.borderStyle=r.border_style),r.width&&(n.style.maxWidth=parseInt(r.width)+"px");try{o.element.firstChild.firstChild.className+=" first-child",o.element.firstChild.lastChild.className+=" last-child"}catch(t){}o.fits()&&l(o)&&o.show()}}var n,r;a.inited=!0,c.trigger("done"),function(){if("object"===s(window.mc4wp_forms_config)&&window.mc4wp_forms_config.submitted_form||"object"===s(window.mc4wp_submitted_form)){var e="#"+(window.mc4wp_submitted_form||window.mc4wp_forms_config.submitted_form).element_id;c.boxes.forEach(function(t){t.element.querySelector(e)&&t.show()})}}()}})},{boxzilla:4}],2:[function(t,e,i){"use strict";var n=320;function a(t,e){for(var i in e)e.hasOwnProperty(i)&&(t.style[i]=e[i])}function d(c,a,d){var h=+new Date,t=window.getComputedStyle(c),g={},u={};for(var e in a)if(a.hasOwnProperty(e)){a[e]=parseFloat(a[e]);var i=a[e],o=parseFloat(t[e]);o!==i?(u[e]=(i-o)/n,g[e]=o):delete a[e]}!function t(){var e,i,o,n,r=+new Date-h,s=!0;for(var l in a)a.hasOwnProperty(l)&&(e=u[l],i=a[l],o=e*r,n=g[l]+o,0<e&&i<=n||e<0&&n<=i?n=i:s=!1,g[l]=n,c.style[l]="opacity"!==l?n+"px":n);h=+new Date,s?d&&d():window.requestAnimationFrame(t)}()}e.exports={toggle:function(t,e,i){function o(){t.removeAttribute("data-animated"),t.setAttribute("style",l.getAttribute("style")),t.style.display=s?"none":"",i&&i()}var n,r,s="none"!==t.style.display||0<t.offsetLeft,l=t.cloneNode(!0);if(t.setAttribute("data-animated","true"),s||(t.style.display=""),"slide"===e){if(n=function(t,e){for(var i={},o=0;o<t.length;o++)i[t[o]]=e;return i}(["height","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],0),r={},!s){if(r=function(t,e){for(var i={},o=0;o<t.length;o++)i[t[o]]=e[t[o]];return i}(["height","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],window.getComputedStyle(t)),!isFinite(r.height)){var c=t.getBoundingClientRect();r.height=c.height}a(t,n)}t.style.overflowY="hidden",d(t,s?n:r,o)}else n={opacity:0},r={opacity:1},s||a(t,n),d(t,s?n:r,o)},animate:d,animated:function(t){return!!t.getAttribute("data-animated")}}},{}],3:[function(t,e,i){"use strict";var o={animation:"fade",rehide:!1,content:"",cookie:null,icon:"&times",screenWidthCondition:null,position:"center",testMode:!1,trigger:!1,closable:!0},n=t("./animator.js");function r(t,e,i){this.id=t,this.fireEvent=i,this.config=function(t,e){var i={};for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o]);for(var n in e)e.hasOwnProperty(n)&&(i[n]=e[n]);return i}(o,e),this.overlay=document.createElement("div"),this.overlay.style.display="none",this.overlay.id="boxzilla-overlay-"+this.id,this.overlay.classList.add("boxzilla-overlay"),document.body.appendChild(this.overlay),this.visible=!1,this.dismissed=!1,this.triggered=!1,this.triggerHeight=this.calculateTriggerHeight(),this.cookieSet=this.isCookieSet(),this.element=null,this.contentElement=null,this.closeIcon=null,this.dom(),this.events()}r.prototype.events=function(){var n=this;this.closeIcon&&this.closeIcon.addEventListener("click",function(t){t.preventDefault(),n.dismiss()}),this.element.addEventListener("click",function(t){"A"===t.target.tagName&&n.fireEvent("box.interactions.link",[n,t.target])},!1),this.element.addEventListener("submit",function(t){n.setCookie(),n.fireEvent("box.interactions.form",[n,t.target])},!1),this.overlay.addEventListener("click",function(t){var e=t.offsetX,i=t.offsetY,o=n.element.getBoundingClientRect();(e<o.left-40||e>o.right+40||i<o.top-40||i>o.bottom+40)&&n.dismiss()})},r.prototype.dom=function(){var t=document.createElement("div");t.className="boxzilla-container boxzilla-"+this.config.position+"-container";var e,i=document.createElement("div");if(i.id="boxzilla-"+this.id,i.className="boxzilla boxzilla-"+this.id+" boxzilla-"+this.config.position,i.style.display="none",t.appendChild(i),"string"==typeof this.config.content?(e=document.createElement("div")).innerHTML=this.config.content:(e=this.config.content).style.display="",e.className="boxzilla-content",i.appendChild(e),this.config.closable&&this.config.icon){var o=document.createElement("span");o.className="boxzilla-close-icon",o.innerHTML=this.config.icon,i.appendChild(o),this.closeIcon=o}document.body.appendChild(t),this.contentElement=e,this.element=i},r.prototype.setCustomBoxStyling=function(){var t=this.element.style.display;this.element.style.display="",this.element.style.overflowY="",this.element.style.maxHeight="";var e=window.innerHeight,i=this.element.clientHeight;if(e<i&&(this.element.style.maxHeight=e+"px",this.element.style.overflowY="scroll"),"center"===this.config.position){var o=(e-i)/2;o=0<=o?o:0,this.element.style.marginTop=o+"px"}this.element.style.display=t},r.prototype.toggle=function(t,e){return e=void 0===e||e,!((t=void 0===t?!this.visible:t)===this.visible||n.animated(this.element)||!t&&!this.config.closable||(this.visible=t,this.setCustomBoxStyling(),this.fireEvent("box."+(t?"show":"hide"),[this]),"center"===this.config.position&&(this.overlay.classList.toggle("boxzilla-"+this.id+"-overlay"),e?n.toggle(this.overlay,"fade"):this.overlay.style.display=t?"":"none"),e?n.toggle(this.element,this.config.animation,function(){this.visible||(this.contentElement.innerHTML=this.contentElement.innerHTML+"")}.bind(this)):this.element.style.display=t?"":"none",0))},r.prototype.show=function(t){return this.toggle(!0,t)},r.prototype.hide=function(t){return this.toggle(!1,t)},r.prototype.calculateTriggerHeight=function(){var t=0;if(this.config.trigger)if("element"===this.config.trigger.method){var e=document.body.querySelector(this.config.trigger.value);e&&(t=e.getBoundingClientRect().top)}else"percentage"===this.config.trigger.method&&(t=this.config.trigger.value/100*function(){var t=document.body,e=document.documentElement;return Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight)}());return t},r.prototype.fits=function(){if(!this.config.screenWidthCondition||!this.config.screenWidthCondition.value)return!0;switch(this.config.screenWidthCondition.condition){case"larger":return window.innerWidth>this.config.screenWidthCondition.value;case"smaller":return window.innerWidth<this.config.screenWidthCondition.value}return!0},r.prototype.onResize=function(){this.triggerHeight=this.calculateTriggerHeight(),this.setCustomBoxStyling()},r.prototype.mayAutoShow=function(){return!(this.dismissed||!this.fits()||!this.config.trigger||this.cookieSet)},r.prototype.mayRehide=function(){return this.config.rehide&&this.triggered},r.prototype.isCookieSet=function(){return!(this.config.testMode||!this.config.trigger||!this.config.cookie||!this.config.cookie.triggered&&!this.config.cookie.dismissed||"true"!==document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*boxzilla_box_"+this.id+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))},r.prototype.setCookie=function(t){var e=new Date;e.setHours(e.getHours()+t),document.cookie="boxzilla_box_"+this.id+"=true; expires="+e.toUTCString()+"; path=/"},r.prototype.trigger=function(){this.show()&&(this.triggered=!0,this.config.cookie&&this.config.cookie.triggered&&this.setCookie(this.config.cookie.triggered))},r.prototype.dismiss=function(t){return!!this.visible&&(this.hide(t),this.config.cookie&&this.config.cookie.dismissed&&this.setCookie(this.config.cookie.dismissed),this.dismissed=!0,this.fireEvent("box.dismiss",[this]),!0)},e.exports=r},{"./animator.js":2}],4:[function(t,e,i){"use strict";var o=t("./box.js"),n=t("./util.js").throttle,r=t("./styles.js"),s=t("./triggers/exit-intent.js"),l=t("./triggers/scroll.js"),c=t("./triggers/pageviews.js"),a=t("./triggers/time.js"),d=!1,h=[],g={};function u(t){"Escape"!==t.key&&"Esc"!==t.key||w()}function f(){h.forEach(function(t){return t.onResize()})}function m(t){for(var e=t.target,i=0;i<=3&&e&&"A"!==e.tagName;i++)e=e.parentElement;if(e&&"A"===e.tagName&&e.href){var o=e.href.match(/[#&]boxzilla-(.+)/i);o&&1<o.length&&b(o[1])}}function p(t,e){g[t]&&g[t].forEach(function(t){return t.apply(null,e)})}function v(t){t=String(t);for(var e=0;e<h.length;e++)if(h[e].id===t)return h[e];throw new Error("No box exists with ID "+t)}function w(t,e){t?v(t).dismiss(e):h.forEach(function(t){return t.dismiss(e)})}function b(t,e){t?v(t).toggle(e):h.forEach(function(t){return t.toggle(e)})}var y={off:function(t,e){g[t]&&g[t].filter(function(t){return t!==e})},on:function(t,e){g[t]=g[t]||[],g[t].push(e)},get:v,init:function(){if(!d){var t=document.createElement("style");t.innerHTML=r,document.head.appendChild(t),s(h),c(h),l(h),a(h),document.body.addEventListener("click",m,!0),window.addEventListener("resize",n(f)),window.addEventListener("load",f),document.addEventListener("keyup",u),p("ready"),d=!0}},create:function(t,e){void 0!==e.minimumScreenWidth&&(e.screenWidthCondition={condition:"larger",value:e.minimumScreenWidth}),t=String(t);var i=new o(t,e,p);return h.push(i),i},trigger:p,show:function(t,e){t?v(t).show(e):h.forEach(function(t){return t.show(e)})},hide:function(t,e){t?v(t).hide(e):h.forEach(function(t){return t.hide(e)})},dismiss:w,toggle:b,boxes:h};window.Boxzilla=y,void 0!==e&&e.exports&&(e.exports=y)},{"./box.js":3,"./styles.js":5,"./triggers/exit-intent.js":7,"./triggers/pageviews.js":8,"./triggers/scroll.js":9,"./triggers/time.js":10,"./util.js":11}],5:[function(t,e,i){"use strict";e.exports="#boxzilla-overlay,.boxzilla-overlay{position:fixed;background:rgba(0,0,0,.65);width:100%;height:100%;left:0;top:0;z-index:10000}.boxzilla-center-container{position:fixed;top:0;left:0;right:0;height:0;text-align:center;z-index:11000;line-height:0}.boxzilla-center-container .boxzilla{display:inline-block;text-align:left;position:relative;line-height:normal}.boxzilla{position:fixed;z-index:12000;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;padding:25px}.boxzilla.boxzilla-top-left{top:0;left:0}.boxzilla.boxzilla-top-right{top:0;right:0}.boxzilla.boxzilla-bottom-left{bottom:0;left:0}.boxzilla.boxzilla-bottom-right{bottom:0;right:0}.boxzilla-content>:first-child{margin-top:0;padding-top:0}.boxzilla-content>:last-child{margin-bottom:0;padding-bottom:0}.boxzilla-close-icon{position:absolute;right:0;top:0;text-align:center;padding:6px;cursor:pointer;-webkit-appearance:none;font-size:28px;font-weight:700;line-height:20px;color:#000;opacity:.5}.boxzilla-close-icon:focus,.boxzilla-close-icon:hover{opacity:.8}"},{}],6:[function(t,e,i){"use strict";function o(){this.time=0,this.interval=0}o.prototype.tick=function(){this.time++},o.prototype.start=function(){this.interval||(this.interval=window.setInterval(this.tick.bind(this),1e3))},o.prototype.stop=function(){this.interval&&(window.clearInterval(this.interval),this.interval=0)},e.exports=o},{}],7:[function(t,e,i){"use strict";e.exports=function(t){var e=null,i={};function o(){document.documentElement.removeEventListener("mouseleave",s),document.documentElement.removeEventListener("mouseenter",r),document.documentElement.removeEventListener("click",n),window.removeEventListener("touchstart",l),window.removeEventListener("touchend",c),t.forEach(function(t){t.mayAutoShow()&&"exit_intent"===t.config.trigger.method&&t.trigger()})}function n(){null!==e&&(window.clearTimeout(e),e=null)}function r(){n()}function s(t){n(),t.clientY<=(document.documentMode||/Edge\//.test(navigator.userAgent)?5:0)&&t.clientX<.8*window.innerWidth&&(e=window.setTimeout(o,600))}function l(){n(),i={timestamp:performance.now(),scrollY:window.scrollY,windowHeight:window.innerHeight}}function c(t){n(),window.innerHeight>i.windowHeight||window.scrollY+20>i.scrollY||300<performance.now()-i.timestamp||-1<["A","INPUT","BUTTON"].indexOf(t.target.tagName)||(e=window.setTimeout(o,800))}window.addEventListener("touchstart",l),window.addEventListener("touchend",c),document.documentElement.addEventListener("mouseenter",r),document.documentElement.addEventListener("mouseleave",s),document.documentElement.addEventListener("click",n)}},{}],8:[function(t,e,i){"use strict";e.exports=function(t){var e;try{e=sessionStorage.getItem("boxzilla_pageviews")||0,sessionStorage.setItem("boxzilla_pageviews",++e)}catch(t){e=0}window.setTimeout(function(){t.forEach(function(t){"pageviews"===t.config.trigger.method&&e>t.config.trigger.value&&t.mayAutoShow()&&t.trigger()})},1e3)}},{}],9:[function(t,e,i){"use strict";var o=t("../util.js").throttle;e.exports=function(t){function e(){var e=window.hasOwnProperty("pageYOffset")?window.pageYOffset:window.scrollTop;e+=.9*window.innerHeight,t.forEach(function(t){!t.mayAutoShow()||t.triggerHeight<=0||(e>t.triggerHeight?t.trigger():t.mayRehide()&&e<t.triggerHeight-5&&t.hide())})}window.addEventListener("touchstart",o(e),!0),window.addEventListener("scroll",o(e),!0)}},{"../util.js":11}],10:[function(t,e,i){"use strict";var r=t("../timer.js");e.exports=function(t){var e=new r,i=new r,o=function(){try{var t=parseInt(sessionStorage.getItem("boxzilla_timer"));t&&(e.time=t)}catch(t){}e.start(),i.start()},n=function(){sessionStorage.setItem("boxzilla_timer",e.time),e.stop(),i.stop()};o(),document.addEventListener("visibilitychange",function(){document.hidden?n():o()}),window.addEventListener("beforeunload",function(){n()}),window.setInterval(function(){t.forEach(function(t){"time_on_site"===t.config.trigger.method&&e.time>t.config.trigger.value&&t.mayAutoShow()?t.trigger():"time_on_page"===t.config.trigger.method&&i.time>t.config.trigger.value&&t.mayAutoShow()&&t.trigger()})},1e3)}},{"../timer.js":6}],11:[function(t,e,i){"use strict";e.exports={throttle:function(o,n,r){var s,l;return n=n||800,function(){var t=r||this,e=+new Date,i=arguments;s&&e<s+n?(clearTimeout(l),l=setTimeout(function(){s=e,o.apply(t,i)},n)):(s=e,o.apply(t,i))}}}},{}]},{},[1]);
2
  //# sourceMappingURL=script.min.js.map
1
+ !function r(s,l,c){function a(e,t){if(!l[e]){if(!s[e]){var i=!1;if(!t&&i)return i(e,!0);if(d)return d(e,!0);var o=new Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}var n=l[e]={exports:{}};s[e][0].call(n.exports,function(t){return a(s[e][1][t]||t)},n,n.exports,r,s,l,c)}return l[e].exports}for(var d=!1,t=0;t<c.length;t++)a(c[t]);return a}({1:[function(t,e,i){"use strict";function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t){if(!window.location.hash||0===window.location.hash.length)return!1;var e=window.location.hash.match(/[#&](boxzilla-\d+)/);if(!e||"object"!==s(e)||e.length<2)return!1;var i=e[1];return i===t.element.id||!!t.element.querySelector("#"+i)}var c,a,d;c=t("boxzilla"),a=window.boxzilla_options,(d=document.body&&document.body.className&&-1<document.body.className.indexOf("logged-in"))&&a.testMode&&console.log("Boxzilla: Test mode is enabled. Please disable test mode if you're done testing."),c.init(),window.addEventListener("load",function(){if(!a.inited){for(var t in a.boxes){var e=a.boxes[t];e.testMode=d&&a.testMode;var i=document.getElementById("boxzilla-box-"+e.id+"-content");if(i){e.content=i;var o=c.create(e.id,e);o.element.className=o.element.className+" boxzilla-"+e.post.slug,n=o.element,(r=e.css).background_color&&(n.style.background=r.background_color),r.color&&(n.style.color=r.color),r.border_color&&(n.style.borderColor=r.border_color),r.border_width&&(n.style.borderWidth=parseInt(r.border_width)+"px"),r.border_style&&(n.style.borderStyle=r.border_style),r.width&&(n.style.maxWidth=parseInt(r.width)+"px");try{o.element.firstChild.firstChild.className+=" first-child",o.element.firstChild.lastChild.className+=" last-child"}catch(t){}o.fits()&&l(o)&&o.show()}}var n,r;a.inited=!0,c.trigger("done"),function(){if("object"===s(window.mc4wp_forms_config)&&window.mc4wp_forms_config.submitted_form||"object"===s(window.mc4wp_submitted_form)){var e="#"+(window.mc4wp_submitted_form||window.mc4wp_forms_config.submitted_form).element_id;c.boxes.forEach(function(t){t.element.querySelector(e)&&t.show()})}}()}})},{boxzilla:4}],2:[function(t,e,i){"use strict";var n=320;function a(t,e){for(var i in e)e.hasOwnProperty(i)&&(t.style[i]=e[i])}function d(c,a,d){var h=+new Date,t=window.getComputedStyle(c),g={},u={};for(var e in a)if(a.hasOwnProperty(e)){a[e]=parseFloat(a[e]);var i=a[e],o=parseFloat(t[e]);o!==i?(u[e]=(i-o)/n,g[e]=o):delete a[e]}!function t(){var e,i,o,n,r=+new Date-h,s=!0;for(var l in a)a.hasOwnProperty(l)&&(e=u[l],i=a[l],o=e*r,n=g[l]+o,0<e&&i<=n||e<0&&n<=i?n=i:s=!1,g[l]=n,c.style[l]="opacity"!==l?n+"px":n);h=+new Date,s?d&&d():window.requestAnimationFrame(t)}()}e.exports={toggle:function(t,e,i){function o(){t.removeAttribute("data-animated"),t.setAttribute("style",l.getAttribute("style")),t.style.display=s?"none":"",i&&i()}var n,r,s="none"!==t.style.display||0<t.offsetLeft,l=t.cloneNode(!0);if(t.setAttribute("data-animated","true"),s||(t.style.display=""),"slide"===e){if(n=function(t,e){for(var i={},o=0;o<t.length;o++)i[t[o]]=e;return i}(["height","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],0),r={},!s){if(r=function(t,e){for(var i={},o=0;o<t.length;o++)i[t[o]]=e[t[o]];return i}(["height","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],window.getComputedStyle(t)),!isFinite(r.height)){var c=t.getBoundingClientRect();r.height=c.height}a(t,n)}t.style.overflowY="hidden",d(t,s?n:r,o)}else n={opacity:0},r={opacity:1},s||a(t,n),d(t,s?n:r,o)},animate:d,animated:function(t){return!!t.getAttribute("data-animated")}}},{}],3:[function(t,e,i){"use strict";var o={animation:"fade",rehide:!1,content:"",cookie:null,icon:"&times",screenWidthCondition:null,position:"center",testMode:!1,trigger:!1,closable:!0},n=t("./animator.js");function r(t,e,i){this.id=t,this.fireEvent=i,this.config=function(t,e){var i={};for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o]);for(var n in e)e.hasOwnProperty(n)&&(i[n]=e[n]);return i}(o,e),this.overlay=document.createElement("div"),this.overlay.style.display="none",this.overlay.id="boxzilla-overlay-"+this.id,this.overlay.classList.add("boxzilla-overlay"),document.body.appendChild(this.overlay),this.visible=!1,this.dismissed=!1,this.triggered=!1,this.triggerHeight=this.calculateTriggerHeight(),this.cookieSet=this.isCookieSet(),this.element=null,this.contentElement=null,this.closeIcon=null,this.dom(),this.events()}r.prototype.events=function(){var n=this;this.closeIcon&&this.closeIcon.addEventListener("click",function(t){t.preventDefault(),n.dismiss()}),this.element.addEventListener("click",function(t){"A"===t.target.tagName&&n.fireEvent("box.interactions.link",[n,t.target])},!1),this.element.addEventListener("submit",function(t){n.setCookie(),n.fireEvent("box.interactions.form",[n,t.target])},!1),this.overlay.addEventListener("click",function(t){var e=t.offsetX,i=t.offsetY,o=n.element.getBoundingClientRect();(e<o.left-40||e>o.right+40||i<o.top-40||i>o.bottom+40)&&n.dismiss()})},r.prototype.dom=function(){var t=document.createElement("div");t.className="boxzilla-container boxzilla-"+this.config.position+"-container";var e,i=document.createElement("div");if(i.id="boxzilla-"+this.id,i.className="boxzilla boxzilla-"+this.id+" boxzilla-"+this.config.position,i.style.display="none",t.appendChild(i),"string"==typeof this.config.content?(e=document.createElement("div")).innerHTML=this.config.content:(e=this.config.content).style.display="",e.className="boxzilla-content",i.appendChild(e),this.config.closable&&this.config.icon){var o=document.createElement("span");o.className="boxzilla-close-icon",o.innerHTML=this.config.icon,o.setAttribute("aria-label","close"),i.appendChild(o),this.closeIcon=o}document.body.appendChild(t),this.contentElement=e,this.element=i},r.prototype.setCustomBoxStyling=function(){var t=this.element.style.display;this.element.style.display="",this.element.style.overflowY="",this.element.style.maxHeight="";var e=window.innerHeight,i=this.element.clientHeight;if(e<i&&(this.element.style.maxHeight=e+"px",this.element.style.overflowY="scroll"),"center"===this.config.position){var o=(e-i)/2;o=0<=o?o:0,this.element.style.marginTop=o+"px"}this.element.style.display=t},r.prototype.toggle=function(t,e){return e=void 0===e||e,!((t=void 0===t?!this.visible:t)===this.visible||n.animated(this.element)||!t&&!this.config.closable||(this.visible=t,this.setCustomBoxStyling(),this.fireEvent("box."+(t?"show":"hide"),[this]),"center"===this.config.position&&(this.overlay.classList.toggle("boxzilla-"+this.id+"-overlay"),e?n.toggle(this.overlay,"fade"):this.overlay.style.display=t?"":"none"),e?n.toggle(this.element,this.config.animation,function(){this.visible||(this.contentElement.innerHTML=this.contentElement.innerHTML+"")}.bind(this)):this.element.style.display=t?"":"none",0))},r.prototype.show=function(t){return this.toggle(!0,t)},r.prototype.hide=function(t){return this.toggle(!1,t)},r.prototype.calculateTriggerHeight=function(){var t=0;if(this.config.trigger)if("element"===this.config.trigger.method){var e=document.body.querySelector(this.config.trigger.value);e&&(t=e.getBoundingClientRect().top)}else"percentage"===this.config.trigger.method&&(t=this.config.trigger.value/100*function(){var t=document.body,e=document.documentElement;return Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight)}());return t},r.prototype.fits=function(){if(!this.config.screenWidthCondition||!this.config.screenWidthCondition.value)return!0;switch(this.config.screenWidthCondition.condition){case"larger":return window.innerWidth>this.config.screenWidthCondition.value;case"smaller":return window.innerWidth<this.config.screenWidthCondition.value}return!0},r.prototype.onResize=function(){this.triggerHeight=this.calculateTriggerHeight(),this.setCustomBoxStyling()},r.prototype.mayAutoShow=function(){return!(this.dismissed||!this.fits()||!this.config.trigger||this.cookieSet)},r.prototype.mayRehide=function(){return this.config.rehide&&this.triggered},r.prototype.isCookieSet=function(){return!(this.config.testMode||!this.config.trigger||!this.config.cookie||!this.config.cookie.triggered&&!this.config.cookie.dismissed||"true"!==document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*boxzilla_box_"+this.id+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))},r.prototype.setCookie=function(t){var e=new Date;e.setHours(e.getHours()+t),document.cookie="boxzilla_box_"+this.id+"=true; expires="+e.toUTCString()+"; path=/"},r.prototype.trigger=function(){this.show()&&(this.triggered=!0,this.config.cookie&&this.config.cookie.triggered&&this.setCookie(this.config.cookie.triggered))},r.prototype.dismiss=function(t){return!!this.visible&&(this.hide(t),this.config.cookie&&this.config.cookie.dismissed&&this.setCookie(this.config.cookie.dismissed),this.dismissed=!0,this.fireEvent("box.dismiss",[this]),!0)},e.exports=r},{"./animator.js":2}],4:[function(t,e,i){"use strict";var o=t("./box.js"),n=t("./util.js").throttle,r=t("./styles.js"),s=t("./triggers/exit-intent.js"),l=t("./triggers/scroll.js"),c=t("./triggers/pageviews.js"),a=t("./triggers/time.js"),d=!1,h=[],g={};function u(t){"Escape"!==t.key&&"Esc"!==t.key||w()}function f(){h.forEach(function(t){return t.onResize()})}function m(t){for(var e=t.target,i=0;i<=3&&e&&"A"!==e.tagName;i++)e=e.parentElement;if(e&&"A"===e.tagName&&e.href){var o=e.href.match(/[#&]boxzilla-(.+)/i);o&&1<o.length&&b(o[1])}}function p(t,e){g[t]&&g[t].forEach(function(t){return t.apply(null,e)})}function v(t){t=String(t);for(var e=0;e<h.length;e++)if(h[e].id===t)return h[e];throw new Error("No box exists with ID "+t)}function w(t,e){t?v(t).dismiss(e):h.forEach(function(t){return t.dismiss(e)})}function b(t,e){t?v(t).toggle(e):h.forEach(function(t){return t.toggle(e)})}var y={off:function(t,e){g[t]&&g[t].filter(function(t){return t!==e})},on:function(t,e){g[t]=g[t]||[],g[t].push(e)},get:v,init:function(){if(!d){var t=document.createElement("style");t.innerHTML=r,document.head.appendChild(t),s(h),c(h),l(h),a(h),document.body.addEventListener("click",m,!0),window.addEventListener("resize",n(f)),window.addEventListener("load",f),document.addEventListener("keyup",u),p("ready"),d=!0}},create:function(t,e){void 0!==e.minimumScreenWidth&&(e.screenWidthCondition={condition:"larger",value:e.minimumScreenWidth}),t=String(t);var i=new o(t,e,p);return h.push(i),i},trigger:p,show:function(t,e){t?v(t).show(e):h.forEach(function(t){return t.show(e)})},hide:function(t,e){t?v(t).hide(e):h.forEach(function(t){return t.hide(e)})},dismiss:w,toggle:b,boxes:h};window.Boxzilla=y,void 0!==e&&e.exports&&(e.exports=y)},{"./box.js":3,"./styles.js":5,"./triggers/exit-intent.js":7,"./triggers/pageviews.js":8,"./triggers/scroll.js":9,"./triggers/time.js":10,"./util.js":11}],5:[function(t,e,i){"use strict";e.exports="#boxzilla-overlay,.boxzilla-overlay{position:fixed;background:rgba(0,0,0,.65);width:100%;height:100%;left:0;top:0;z-index:10000}.boxzilla-center-container{position:fixed;top:0;left:0;right:0;height:0;text-align:center;z-index:11000;line-height:0}.boxzilla-center-container .boxzilla{display:inline-block;text-align:left;position:relative;line-height:normal}.boxzilla{position:fixed;z-index:12000;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;padding:25px}.boxzilla.boxzilla-top-left{top:0;left:0}.boxzilla.boxzilla-top-right{top:0;right:0}.boxzilla.boxzilla-bottom-left{bottom:0;left:0}.boxzilla.boxzilla-bottom-right{bottom:0;right:0}.boxzilla-content>:first-child{margin-top:0;padding-top:0}.boxzilla-content>:last-child{margin-bottom:0;padding-bottom:0}.boxzilla-close-icon{position:absolute;right:0;top:0;text-align:center;padding:6px;cursor:pointer;-webkit-appearance:none;font-size:28px;font-weight:700;line-height:20px;color:#000;opacity:.5}.boxzilla-close-icon:focus,.boxzilla-close-icon:hover{opacity:.8}"},{}],6:[function(t,e,i){"use strict";function o(){this.time=0,this.interval=0}o.prototype.tick=function(){this.time++},o.prototype.start=function(){this.interval||(this.interval=window.setInterval(this.tick.bind(this),1e3))},o.prototype.stop=function(){this.interval&&(window.clearInterval(this.interval),this.interval=0)},e.exports=o},{}],7:[function(t,e,i){"use strict";e.exports=function(t){var e=null,i={};function o(){document.documentElement.removeEventListener("mouseleave",s),document.documentElement.removeEventListener("mouseenter",r),document.documentElement.removeEventListener("click",n),window.removeEventListener("touchstart",l),window.removeEventListener("touchend",c),t.forEach(function(t){t.mayAutoShow()&&"exit_intent"===t.config.trigger.method&&t.trigger()})}function n(){null!==e&&(window.clearTimeout(e),e=null)}function r(){n()}function s(t){n(),t.clientY<=(document.documentMode||/Edge\//.test(navigator.userAgent)?5:0)&&t.clientX<.8*window.innerWidth&&(e=window.setTimeout(o,600))}function l(){n(),i={timestamp:performance.now(),scrollY:window.scrollY,windowHeight:window.innerHeight}}function c(t){n(),window.innerHeight>i.windowHeight||window.scrollY+20>i.scrollY||300<performance.now()-i.timestamp||-1<["A","INPUT","BUTTON"].indexOf(t.target.tagName)||(e=window.setTimeout(o,800))}window.addEventListener("touchstart",l),window.addEventListener("touchend",c),document.documentElement.addEventListener("mouseenter",r),document.documentElement.addEventListener("mouseleave",s),document.documentElement.addEventListener("click",n)}},{}],8:[function(t,e,i){"use strict";e.exports=function(t){var e;try{e=sessionStorage.getItem("boxzilla_pageviews")||0,sessionStorage.setItem("boxzilla_pageviews",++e)}catch(t){e=0}window.setTimeout(function(){t.forEach(function(t){"pageviews"===t.config.trigger.method&&e>t.config.trigger.value&&t.mayAutoShow()&&t.trigger()})},1e3)}},{}],9:[function(t,e,i){"use strict";var o=t("../util.js").throttle;e.exports=function(t){function e(){var e=window.hasOwnProperty("pageYOffset")?window.pageYOffset:window.scrollTop;e+=.9*window.innerHeight,t.forEach(function(t){!t.mayAutoShow()||t.triggerHeight<=0||(e>t.triggerHeight?t.trigger():t.mayRehide()&&e<t.triggerHeight-5&&t.hide())})}window.addEventListener("touchstart",o(e),!0),window.addEventListener("scroll",o(e),!0)}},{"../util.js":11}],10:[function(t,e,i){"use strict";var r=t("../timer.js");e.exports=function(t){var e=new r,i=new r,o=function(){try{var t=parseInt(sessionStorage.getItem("boxzilla_timer"));t&&(e.time=t)}catch(t){}e.start(),i.start()},n=function(){sessionStorage.setItem("boxzilla_timer",e.time),e.stop(),i.stop()};o(),document.addEventListener("visibilitychange",function(){document.hidden?n():o()}),window.addEventListener("beforeunload",function(){n()}),window.setInterval(function(){t.forEach(function(t){"time_on_site"===t.config.trigger.method&&e.time>t.config.trigger.value&&t.mayAutoShow()?t.trigger():"time_on_page"===t.config.trigger.method&&i.time>t.config.trigger.value&&t.mayAutoShow()&&t.trigger()})},1e3)}},{"../timer.js":6}],11:[function(t,e,i){"use strict";e.exports={throttle:function(o,n,r){var s,l;return n=n||800,function(){var t=r||this,e=+new Date,i=arguments;s&&e<s+n?(clearTimeout(l),l=setTimeout(function(){s=e,o.apply(t,i)},n)):(s=e,o.apply(t,i))}}}},{}]},{},[1]);
2
  //# sourceMappingURL=script.min.js.map
assets/js/script.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["script.js"],"names":["r","e","n","t","o","i","f","c","u","a","Error","code","p","exports","call","length","1","require","module","_typeof","obj","Symbol","iterator","constructor","prototype","locationHashRefersBox","box","window","location","hash","match","elementId","element","id","querySelector","Boxzilla","options","isLoggedIn","boxzilla_options","document","body","className","indexOf","testMode","console","log","init","addEventListener","inited","key","boxes","boxOpts","boxContentElement","getElementById","content","create","post","slug","styles","css","background_color","style","background","color","border_color","borderColor","border_width","borderWidth","parseInt","border_style","borderStyle","width","maxWidth","firstChild","lastChild","fits","show","trigger","mc4wp_forms_config","submitted_form","mc4wp_submitted_form","selector","element_id","forEach","maybeOpenMailChimpForWordPressBox","boxzilla","2","duration","property","hasOwnProperty","animate","targetStyles","fn","last","Date","initialStyles","getComputedStyle","currentStyles","propSteps","parseFloat","to","current","tick","step","increment","newValue","timeSinceLastTick","done","_property","requestAnimationFrame","toggle","animation","callbackFn","cleanup","removeAttribute","setAttribute","clone","getAttribute","display","nowVisible","hiddenStyles","visibleStyles","offsetLeft","cloneNode","properties","value","newObject","initObjectProperties","object","copyObjectProperties","isFinite","height","clientRect","getBoundingClientRect","overflowY","opacity","animated","3","defaults","rehide","cookie","icon","screenWidthCondition","position","closable","Animator","Box","config","fireEvent","this","obj1","obj2","obj3","attrname","_attrname","merge","overlay","createElement","classList","add","appendChild","visible","dismissed","triggered","triggerHeight","calculateTriggerHeight","cookieSet","isCookieSet","contentElement","closeIcon","dom","events","evt","preventDefault","dismiss","target","tagName","setCookie","x","offsetX","y","offsetY","rect","left","right","top","bottom","wrapper","innerHTML","setCustomBoxStyling","origDisplay","maxHeight","windowHeight","innerHeight","boxHeight","clientHeight","newTopMargin","marginTop","bind","hide","method","triggerElement","html","documentElement","Math","max","scrollHeight","offsetHeight","getDocumentHeight","condition","innerWidth","onResize","mayAutoShow","mayRehide","replace","RegExp","hours","expiryDate","setHours","getHours","toUTCString","./animator.js","4","throttle","ExitIntent","Scroll","Pageviews","Time","initialised","listeners","onKeyUp","recalculateHeights","onElementClick","el","parentElement","href","event","args","apply","get","String","off","filter","on","push","styleElement","head","opts","minimumScreenWidth","./box.js","./styles.js","./triggers/exit-intent.js","./triggers/pageviews.js","./triggers/scroll.js","./triggers/time.js","./util.js","5","6","Timer","time","interval","start","setInterval","stop","clearInterval","7","timeout","touchStart","removeEventListener","onMouseLeave","onMouseEnter","clearTimeout","onTouchStart","onTouchEnd","clientY","documentMode","test","navigator","userAgent","clientX","setTimeout","timestamp","performance","now","scrollY","8","pageviews","sessionStorage","getItem","setItem","9","checkHeightCriteria","pageYOffset","scrollTop","../util.js","10","siteTimer","pageTimer","timers","sessionTime","hidden","../timer.js","11","threshold","scope","deferTimer","context","arguments"],"mappings":"CAA6H,SAASA,EAAEC,EAAEC,EAAEC,GAAG,SAASC,EAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,IAAIE,GAAE,EAAoC,IAAID,GAAGC,EAAE,OAAOA,EAAEF,GAAE,GAAI,GAAGG,EAAE,OAAOA,EAAEH,GAAE,GAAI,IAAII,EAAE,IAAIC,MAAM,uBAAuBL,EAAE,KAAK,MAAMI,EAAEE,KAAK,mBAAmBF,EAAE,IAAIG,EAAEV,EAAEG,GAAG,CAACQ,QAAQ,IAAIZ,EAAEI,GAAG,GAAGS,KAAKF,EAAEC,QAAQ,SAASb,GAAoB,OAAOI,EAAlBH,EAAEI,GAAG,GAAGL,IAAeA,IAAIY,EAAEA,EAAEC,QAAQb,EAAEC,EAAEC,EAAEC,GAAG,OAAOD,EAAEG,GAAGQ,QAAQ,IAAI,IAAIL,GAAE,EAAoCH,EAAE,EAAEA,EAAEF,EAAEY,OAAOV,IAAID,EAAED,EAAEE,IAAI,OAAOD,E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EACK,WACL,IACE,IAAIC,EAAcvO,SAAS2N,eAAeC,QAAQ,mBAE9CW,IACFH,EAAUrC,KAAOwC,GAEnB,MAAO1S,IAETuS,EAAUnC,QACVoC,EAAUpC,SAXVqC,EAaI,WACJX,eAAeE,QAAQ,iBAAkBO,EAAUrC,MACnDqC,EAAUjC,OACVkC,EAAUlC,QAIdmC,IAEAnQ,SAASQ,iBAAiB,mBAAoB,WAC5CR,SAASqQ,OAASF,IAAgBA,MAEpC/Q,OAAOoB,iBAAiB,eAAgB,WACtC2P,MAEF/Q,OAAO2O,YAAY,WACjBpN,EAAMiC,QAAQ,SAAUzD,GACY,iBAA9BA,EAAIyH,OAAOtE,QAAQ2H,QAA6BgG,EAAUrC,KAAOzO,EAAIyH,OAAOtE,QAAQgD,OAASnG,EAAI0L,cACnG1L,EAAImD,UACmC,iBAA9BnD,EAAIyH,OAAOtE,QAAQ2H,QAA6BiG,EAAUtC,KAAOzO,EAAIyH,OAAOtE,QAAQgD,OAASnG,EAAI0L,eAC1G1L,EAAImD,aAGP,OAGH,CAACgO,cAAc,IAAIC,GAAG,CAAC,SAAS7R,EAAQC,EAAOL,GACjD,aAyBAK,EAAOL,QAAU,CACfkN,SAxBF,SAAkBnI,EAAImN,EAAWC,GAE/B,IAAInN,EACAoN,EACJ,OAHcF,EAAdA,GAA0B,IAGnB,WACL,IAAIG,EAAUF,GAAS3J,KACnBsI,GAAO,IAAI7L,KACX+I,EAAOsE,UAEPtN,GAAQ8L,EAAM9L,EAAOkN,GAEvBhC,aAAakC,GACbA,EAAazB,WAAW,WACtB3L,EAAO8L,EACP/L,EAAGkJ,MAAMoE,EAASrE,IACjBkE,KAEHlN,EAAO8L,EACP/L,EAAGkJ,MAAMoE,EAASrE,QAStB,KAAK,GAAG,CAAC","file":"script.min.js","sourcesContent":["(function () { var require = undefined; var module = undefined; var exports = undefined; var define = undefined; (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n(function () {\n var Boxzilla = require('boxzilla');\n\n var options = window.boxzilla_options; // helper function for setting CSS styles\n\n function css(element, styles) {\n if (styles.background_color) {\n element.style.background = styles.background_color;\n }\n\n if (styles.color) {\n element.style.color = styles.color;\n }\n\n if (styles.border_color) {\n element.style.borderColor = styles.border_color;\n }\n\n if (styles.border_width) {\n element.style.borderWidth = parseInt(styles.border_width) + 'px';\n }\n\n if (styles.border_style) {\n element.style.borderStyle = styles.border_style;\n }\n\n if (styles.width) {\n element.style.maxWidth = parseInt(styles.width) + 'px';\n }\n }\n\n function createBoxesFromConfig() {\n // failsafe against including script twice.\n if (options.inited) {\n return;\n } // create boxes from options\n\n\n for (var key in options.boxes) {\n // get opts\n var boxOpts = options.boxes[key];\n boxOpts.testMode = isLoggedIn && options.testMode; // find box content element, bail if not found\n\n var boxContentElement = document.getElementById('boxzilla-box-' + boxOpts.id + '-content');\n\n if (!boxContentElement) {\n continue;\n } // use element as content option\n\n\n boxOpts.content = boxContentElement; // create box\n\n var box = Boxzilla.create(boxOpts.id, boxOpts); // add box slug to box element as classname\n\n box.element.className = box.element.className + ' boxzilla-' + boxOpts.post.slug; // add custom css to box\n\n css(box.element, boxOpts.css);\n\n try {\n box.element.firstChild.firstChild.className += ' first-child';\n box.element.firstChild.lastChild.className += ' last-child';\n } catch (e) {} // maybe show box right away\n\n\n if (box.fits() && locationHashRefersBox(box)) {\n box.show();\n }\n } // set flag to prevent initialising twice\n\n\n options.inited = true; // trigger \"done\" event.\n\n Boxzilla.trigger('done'); // maybe open box with MC4WP form in it\n\n maybeOpenMailChimpForWordPressBox();\n }\n\n function locationHashRefersBox(box) {\n if (!window.location.hash || window.location.hash.length === 0) {\n return false;\n } // parse \"boxzilla-{id}\" from location hash\n\n\n var match = window.location.hash.match(/[#&](boxzilla-\\d+)/);\n\n if (!match || _typeof(match) !== 'object' || match.length < 2) {\n return false;\n }\n\n var elementId = match[1];\n\n if (elementId === box.element.id) {\n return true;\n } else if (box.element.querySelector('#' + elementId)) {\n return true;\n }\n\n return false;\n }\n\n function maybeOpenMailChimpForWordPressBox() {\n if ((_typeof(window.mc4wp_forms_config) !== 'object' || !window.mc4wp_forms_config.submitted_form) && _typeof(window.mc4wp_submitted_form) !== 'object') {\n return;\n }\n\n var form = window.mc4wp_submitted_form || window.mc4wp_forms_config.submitted_form;\n var selector = '#' + form.element_id;\n Boxzilla.boxes.forEach(function (box) {\n if (box.element.querySelector(selector)) {\n box.show();\n }\n });\n } // print message when test mode is enabled\n\n\n var isLoggedIn = document.body && document.body.className && document.body.className.indexOf('logged-in') > -1;\n\n if (isLoggedIn && options.testMode) {\n console.log('Boxzilla: Test mode is enabled. Please disable test mode if you\\'re done testing.');\n } // init boxzilla\n\n\n Boxzilla.init(); // on window.load, create DOM elements for boxes\n\n window.addEventListener('load', createBoxesFromConfig);\n})();\n\n},{\"boxzilla\":4}],2:[function(require,module,exports){\n\"use strict\";\n\nvar duration = 320;\n\nfunction css(element, styles) {\n for (var property in styles) {\n if (!styles.hasOwnProperty(property)) {\n continue;\n }\n\n element.style[property] = styles[property];\n }\n}\n\nfunction initObjectProperties(properties, value) {\n var newObject = {};\n\n for (var i = 0; i < properties.length; i++) {\n newObject[properties[i]] = value;\n }\n\n return newObject;\n}\n\nfunction copyObjectProperties(properties, object) {\n var newObject = {};\n\n for (var i = 0; i < properties.length; i++) {\n newObject[properties[i]] = object[properties[i]];\n }\n\n return newObject;\n}\n/**\n * Checks if the given element is currently being animated.\n *\n * @param element\n * @returns {boolean}\n */\n\n\nfunction animated(element) {\n return !!element.getAttribute('data-animated');\n}\n/**\n * Toggles the element using the given animation.\n *\n * @param element\n * @param animation Either \"fade\" or \"slide\"\n * @param callbackFn\n */\n\n\nfunction toggle(element, animation, callbackFn) {\n var nowVisible = element.style.display !== 'none' || element.offsetLeft > 0; // create clone for reference\n\n var clone = element.cloneNode(true);\n\n var cleanup = function cleanup() {\n element.removeAttribute('data-animated');\n element.setAttribute('style', clone.getAttribute('style'));\n element.style.display = nowVisible ? 'none' : '';\n\n if (callbackFn) {\n callbackFn();\n }\n }; // store attribute so everyone knows we're animating this element\n\n\n element.setAttribute('data-animated', 'true'); // toggle element visiblity right away if we're making something visible\n\n if (!nowVisible) {\n element.style.display = '';\n }\n\n var hiddenStyles;\n var visibleStyles; // animate properties\n\n if (animation === 'slide') {\n hiddenStyles = initObjectProperties(['height', 'borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'], 0);\n visibleStyles = {};\n\n if (!nowVisible) {\n var computedStyles = window.getComputedStyle(element);\n visibleStyles = copyObjectProperties(['height', 'borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'], computedStyles); // in some browsers, getComputedStyle returns \"auto\" value. this falls back to getBoundingClientRect() in those browsers since we need an actual height.\n\n if (!isFinite(visibleStyles.height)) {\n var clientRect = element.getBoundingClientRect();\n visibleStyles.height = clientRect.height;\n }\n\n css(element, hiddenStyles);\n } // don't show a scrollbar during animation\n\n\n element.style.overflowY = 'hidden';\n animate(element, nowVisible ? hiddenStyles : visibleStyles, cleanup);\n } else {\n hiddenStyles = {\n opacity: 0\n };\n visibleStyles = {\n opacity: 1\n };\n\n if (!nowVisible) {\n css(element, hiddenStyles);\n }\n\n animate(element, nowVisible ? hiddenStyles : visibleStyles, cleanup);\n }\n}\n\nfunction animate(element, targetStyles, fn) {\n var last = +new Date();\n var initialStyles = window.getComputedStyle(element);\n var currentStyles = {};\n var propSteps = {};\n\n for (var property in targetStyles) {\n if (!targetStyles.hasOwnProperty(property)) {\n continue;\n } // make sure we have an object filled with floats\n\n\n targetStyles[property] = parseFloat(targetStyles[property]); // calculate step size & current value\n\n var to = targetStyles[property];\n var current = parseFloat(initialStyles[property]); // is there something to do?\n\n if (current === to) {\n delete targetStyles[property];\n continue;\n }\n\n propSteps[property] = (to - current) / duration; // points per second\n\n currentStyles[property] = current;\n }\n\n var tick = function tick() {\n var now = +new Date();\n var timeSinceLastTick = now - last;\n var done = true;\n var step, to, increment, newValue;\n\n for (var _property in targetStyles) {\n if (!targetStyles.hasOwnProperty(_property)) {\n continue;\n }\n\n step = propSteps[_property];\n to = targetStyles[_property];\n increment = step * timeSinceLastTick;\n newValue = currentStyles[_property] + increment;\n\n if (step > 0 && newValue >= to || step < 0 && newValue <= to) {\n newValue = to;\n } else {\n done = false;\n } // store new value\n\n\n currentStyles[_property] = newValue;\n element.style[_property] = _property !== 'opacity' ? newValue + 'px' : newValue;\n }\n\n last = +new Date();\n\n if (!done) {\n // keep going until we're done for all props\n window.requestAnimationFrame(tick);\n } else {\n // call callback\n fn && fn();\n }\n };\n\n tick();\n}\n\nmodule.exports = {\n toggle: toggle,\n animate: animate,\n animated: animated\n};\n\n},{}],3:[function(require,module,exports){\n\"use strict\";\n\nvar defaults = {\n animation: 'fade',\n rehide: false,\n content: '',\n cookie: null,\n icon: '&times',\n screenWidthCondition: null,\n position: 'center',\n testMode: false,\n trigger: false,\n closable: true\n};\n\nvar Animator = require('./animator.js');\n/**\n * Merge 2 objects, values of the latter overwriting the former.\n *\n * @param obj1\n * @param obj2\n * @returns {*}\n */\n\n\nfunction merge(obj1, obj2) {\n var obj3 = {}; // add obj1 to obj3\n\n for (var attrname in obj1) {\n if (obj1.hasOwnProperty(attrname)) {\n obj3[attrname] = obj1[attrname];\n }\n } // add obj2 to obj3\n\n\n for (var _attrname in obj2) {\n if (obj2.hasOwnProperty(_attrname)) {\n obj3[_attrname] = obj2[_attrname];\n }\n }\n\n return obj3;\n}\n/**\n * Get the real height of entire document.\n * @returns {number}\n */\n\n\nfunction getDocumentHeight() {\n var body = document.body;\n var html = document.documentElement;\n return Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);\n} // Box Object\n\n\nfunction Box(id, config, fireEvent) {\n this.id = id;\n this.fireEvent = fireEvent; // store config values\n\n this.config = merge(defaults, config); // add overlay element to dom and store ref to overlay\n\n this.overlay = document.createElement('div');\n this.overlay.style.display = 'none';\n this.overlay.id = 'boxzilla-overlay-' + this.id;\n this.overlay.classList.add('boxzilla-overlay');\n document.body.appendChild(this.overlay); // state\n\n this.visible = false;\n this.dismissed = false;\n this.triggered = false;\n this.triggerHeight = this.calculateTriggerHeight();\n this.cookieSet = this.isCookieSet();\n this.element = null;\n this.contentElement = null;\n this.closeIcon = null; // create dom elements for this box\n\n this.dom(); // further initialise the box\n\n this.events();\n} // initialise the box\n\n\nBox.prototype.events = function () {\n var box = this; // attach event to \"close\" icon inside box\n\n if (this.closeIcon) {\n this.closeIcon.addEventListener('click', function (evt) {\n evt.preventDefault();\n box.dismiss();\n });\n }\n\n this.element.addEventListener('click', function (evt) {\n if (evt.target.tagName === 'A') {\n box.fireEvent('box.interactions.link', [box, evt.target]);\n }\n }, false);\n this.element.addEventListener('submit', function (evt) {\n box.setCookie();\n box.fireEvent('box.interactions.form', [box, evt.target]);\n }, false);\n this.overlay.addEventListener('click', function (evt) {\n var x = evt.offsetX;\n var y = evt.offsetY; // calculate if click was less than 40px outside box to avoid closing it by accident\n\n var rect = box.element.getBoundingClientRect();\n var margin = 40; // if click was not anywhere near box, dismiss it.\n\n if (x < rect.left - margin || x > rect.right + margin || y < rect.top - margin || y > rect.bottom + margin) {\n box.dismiss();\n }\n });\n}; // generate dom elements for this box\n\n\nBox.prototype.dom = function () {\n var wrapper = document.createElement('div');\n wrapper.className = 'boxzilla-container boxzilla-' + this.config.position + '-container';\n var box = document.createElement('div');\n box.id = 'boxzilla-' + this.id;\n box.className = 'boxzilla boxzilla-' + this.id + ' boxzilla-' + this.config.position;\n box.style.display = 'none';\n wrapper.appendChild(box);\n var content;\n\n if (typeof this.config.content === 'string') {\n content = document.createElement('div');\n content.innerHTML = this.config.content;\n } else {\n content = this.config.content; // make sure element is visible\n\n content.style.display = '';\n }\n\n content.className = 'boxzilla-content';\n box.appendChild(content);\n\n if (this.config.closable && this.config.icon) {\n var closeIcon = document.createElement('span');\n closeIcon.className = 'boxzilla-close-icon';\n closeIcon.innerHTML = this.config.icon;\n box.appendChild(closeIcon);\n this.closeIcon = closeIcon;\n }\n\n document.body.appendChild(wrapper);\n this.contentElement = content;\n this.element = box;\n}; // set (calculate) custom box styling depending on box options\n\n\nBox.prototype.setCustomBoxStyling = function () {\n // reset element to its initial state\n var origDisplay = this.element.style.display;\n this.element.style.display = '';\n this.element.style.overflowY = '';\n this.element.style.maxHeight = ''; // get new dimensions\n\n var windowHeight = window.innerHeight;\n var boxHeight = this.element.clientHeight; // add scrollbar to box and limit height\n\n if (boxHeight > windowHeight) {\n this.element.style.maxHeight = windowHeight + 'px';\n this.element.style.overflowY = 'scroll';\n } // set new top margin for boxes which are centered\n\n\n if (this.config.position === 'center') {\n var newTopMargin = (windowHeight - boxHeight) / 2;\n newTopMargin = newTopMargin >= 0 ? newTopMargin : 0;\n this.element.style.marginTop = newTopMargin + 'px';\n }\n\n this.element.style.display = origDisplay;\n}; // toggle visibility of the box\n\n\nBox.prototype.toggle = function (show, animate) {\n show = typeof show === 'undefined' ? !this.visible : show;\n animate = typeof animate === 'undefined' ? true : animate; // is box already at desired visibility?\n\n if (show === this.visible) {\n return false;\n } // is box being animated?\n\n\n if (Animator.animated(this.element)) {\n return false;\n } // if box should be hidden but is not closable, bail.\n\n\n if (!show && !this.config.closable) {\n return false;\n } // set new visibility status\n\n\n this.visible = show; // calculate new styling rules\n\n this.setCustomBoxStyling(); // trigger event\n\n this.fireEvent('box.' + (show ? 'show' : 'hide'), [this]); // show or hide box using selected animation\n\n if (this.config.position === 'center') {\n this.overlay.classList.toggle('boxzilla-' + this.id + '-overlay');\n\n if (animate) {\n Animator.toggle(this.overlay, 'fade');\n } else {\n this.overlay.style.display = show ? '' : 'none';\n }\n }\n\n if (animate) {\n Animator.toggle(this.element, this.config.animation, function () {\n if (this.visible) {\n return;\n }\n\n this.contentElement.innerHTML = this.contentElement.innerHTML + '';\n }.bind(this));\n } else {\n this.element.style.display = show ? '' : 'none';\n }\n\n return true;\n}; // show the box\n\n\nBox.prototype.show = function (animate) {\n return this.toggle(true, animate);\n}; // hide the box\n\n\nBox.prototype.hide = function (animate) {\n return this.toggle(false, animate);\n}; // calculate trigger height\n\n\nBox.prototype.calculateTriggerHeight = function () {\n var triggerHeight = 0;\n\n if (this.config.trigger) {\n if (this.config.trigger.method === 'element') {\n var triggerElement = document.body.querySelector(this.config.trigger.value);\n\n if (triggerElement) {\n var offset = triggerElement.getBoundingClientRect();\n triggerHeight = offset.top;\n }\n } else if (this.config.trigger.method === 'percentage') {\n triggerHeight = this.config.trigger.value / 100 * getDocumentHeight();\n }\n }\n\n return triggerHeight;\n};\n\nBox.prototype.fits = function () {\n if (!this.config.screenWidthCondition || !this.config.screenWidthCondition.value) {\n return true;\n }\n\n switch (this.config.screenWidthCondition.condition) {\n case 'larger':\n return window.innerWidth > this.config.screenWidthCondition.value;\n\n case 'smaller':\n return window.innerWidth < this.config.screenWidthCondition.value;\n } // meh.. condition should be \"smaller\" or \"larger\", just return true.\n\n\n return true;\n};\n\nBox.prototype.onResize = function () {\n this.triggerHeight = this.calculateTriggerHeight();\n this.setCustomBoxStyling();\n}; // is this box enabled?\n\n\nBox.prototype.mayAutoShow = function () {\n if (this.dismissed) {\n return false;\n } // check if box fits on given minimum screen width\n\n\n if (!this.fits()) {\n return false;\n } // if trigger empty or error in calculating triggerHeight, return false\n\n\n if (!this.config.trigger) {\n return false;\n } // rely on cookie value (show if not set, don't show if set)\n\n\n return !this.cookieSet;\n};\n\nBox.prototype.mayRehide = function () {\n return this.config.rehide && this.triggered;\n};\n\nBox.prototype.isCookieSet = function () {\n // always show on test mode or when no auto-trigger is configured\n if (this.config.testMode || !this.config.trigger) {\n return false;\n } // if either cookie is null or trigger & dismiss are both falsey, don't bother checking.\n\n\n if (!this.config.cookie || !this.config.cookie.triggered && !this.config.cookie.dismissed) {\n return false;\n }\n\n return document.cookie.replace(new RegExp('(?:(?:^|.*;)\\\\s*' + 'boxzilla_box_' + this.id + '\\\\s*\\\\=\\\\s*([^;]*).*$)|^.*$'), '$1') === 'true';\n}; // set cookie that disables automatically showing the box\n\n\nBox.prototype.setCookie = function (hours) {\n var expiryDate = new Date();\n expiryDate.setHours(expiryDate.getHours() + hours);\n document.cookie = 'boxzilla_box_' + this.id + '=true; expires=' + expiryDate.toUTCString() + '; path=/';\n};\n\nBox.prototype.trigger = function () {\n var shown = this.show();\n\n if (!shown) {\n return;\n }\n\n this.triggered = true;\n\n if (this.config.cookie && this.config.cookie.triggered) {\n this.setCookie(this.config.cookie.triggered);\n }\n};\n/**\n * Dismisses the box and optionally sets a cookie.\n * @param animate\n * @returns {boolean}\n */\n\n\nBox.prototype.dismiss = function (animate) {\n // only dismiss box if it's currently open.\n if (!this.visible) {\n return false;\n } // hide box element\n\n\n this.hide(animate); // set cookie\n\n if (this.config.cookie && this.config.cookie.dismissed) {\n this.setCookie(this.config.cookie.dismissed);\n }\n\n this.dismissed = true;\n this.fireEvent('box.dismiss', [this]);\n return true;\n};\n\nmodule.exports = Box;\n\n},{\"./animator.js\":2}],4:[function(require,module,exports){\n\"use strict\";\n\nvar Box = require('./box.js');\n\nvar throttle = require('./util.js').throttle;\n\nvar styles = require('./styles.js');\n\nvar ExitIntent = require('./triggers/exit-intent.js');\n\nvar Scroll = require('./triggers/scroll.js');\n\nvar Pageviews = require('./triggers/pageviews.js');\n\nvar Time = require('./triggers/time.js');\n\nvar initialised = false;\nvar boxes = [];\nvar listeners = {};\n\nfunction onKeyUp(evt) {\n if (evt.key === 'Escape' || evt.key === 'Esc') {\n dismiss();\n }\n}\n\nfunction recalculateHeights() {\n boxes.forEach(function (box) {\n return box.onResize();\n });\n}\n\nfunction onElementClick(evt) {\n // bubble up to <a> element\n var el = evt.target;\n\n for (var i = 0; i <= 3; i++) {\n if (!el || el.tagName === 'A') {\n break;\n }\n\n el = el.parentElement;\n }\n\n if (!el || el.tagName !== 'A' || !el.href) {\n return;\n }\n\n var match = el.href.match(/[#&]boxzilla-(.+)/i);\n\n if (match && match.length > 1) {\n toggle(match[1]);\n }\n}\n\nfunction trigger(event, args) {\n listeners[event] && listeners[event].forEach(function (f) {\n return f.apply(null, args);\n });\n}\n\nfunction on(event, fn) {\n listeners[event] = listeners[event] || [];\n listeners[event].push(fn);\n}\n\nfunction off(event, fn) {\n listeners[event] && listeners[event].filter(function (f) {\n return f !== fn;\n });\n} // initialise & add event listeners\n\n\nfunction init() {\n if (initialised) {\n return;\n } // insert styles into DOM\n\n\n var styleElement = document.createElement('style');\n styleElement.innerHTML = styles;\n document.head.appendChild(styleElement); // init triggers\n\n ExitIntent(boxes);\n Pageviews(boxes);\n Scroll(boxes);\n Time(boxes);\n document.body.addEventListener('click', onElementClick, true);\n window.addEventListener('resize', throttle(recalculateHeights));\n window.addEventListener('load', recalculateHeights);\n document.addEventListener('keyup', onKeyUp);\n trigger('ready');\n initialised = true; // ensure this function doesn't run again\n}\n\nfunction create(id, opts) {\n // preserve backwards compat for minimumScreenWidth option\n if (typeof opts.minimumScreenWidth !== 'undefined') {\n opts.screenWidthCondition = {\n condition: 'larger',\n value: opts.minimumScreenWidth\n };\n }\n\n id = String(id);\n var box = new Box(id, opts, trigger);\n boxes.push(box);\n return box;\n}\n\nfunction get(id) {\n id = String(id);\n\n for (var i = 0; i < boxes.length; i++) {\n if (boxes[i].id === id) {\n return boxes[i];\n }\n }\n\n throw new Error('No box exists with ID ' + id);\n} // dismiss a single box (or all by omitting id param)\n\n\nfunction dismiss(id, animate) {\n if (id) {\n get(id).dismiss(animate);\n } else {\n boxes.forEach(function (box) {\n return box.dismiss(animate);\n });\n }\n}\n\nfunction hide(id, animate) {\n if (id) {\n get(id).hide(animate);\n } else {\n boxes.forEach(function (box) {\n return box.hide(animate);\n });\n }\n}\n\nfunction show(id, animate) {\n if (id) {\n get(id).show(animate);\n } else {\n boxes.forEach(function (box) {\n return box.show(animate);\n });\n }\n}\n\nfunction toggle(id, animate) {\n if (id) {\n get(id).toggle(animate);\n } else {\n boxes.forEach(function (box) {\n return box.toggle(animate);\n });\n }\n} // expose boxzilla object\n\n\nvar Boxzilla = {\n off: off,\n on: on,\n get: get,\n init: init,\n create: create,\n trigger: trigger,\n show: show,\n hide: hide,\n dismiss: dismiss,\n toggle: toggle,\n boxes: boxes\n};\nwindow.Boxzilla = Boxzilla;\n\nif (typeof module !== 'undefined' && module.exports) {\n module.exports = Boxzilla;\n}\n\n},{\"./box.js\":3,\"./styles.js\":5,\"./triggers/exit-intent.js\":7,\"./triggers/pageviews.js\":8,\"./triggers/scroll.js\":9,\"./triggers/time.js\":10,\"./util.js\":11}],5:[function(require,module,exports){\n\"use strict\";\n\nvar styles = \"#boxzilla-overlay,.boxzilla-overlay{position:fixed;background:rgba(0,0,0,.65);width:100%;height:100%;left:0;top:0;z-index:10000}.boxzilla-center-container{position:fixed;top:0;left:0;right:0;height:0;text-align:center;z-index:11000;line-height:0}.boxzilla-center-container .boxzilla{display:inline-block;text-align:left;position:relative;line-height:normal}.boxzilla{position:fixed;z-index:12000;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;padding:25px}.boxzilla.boxzilla-top-left{top:0;left:0}.boxzilla.boxzilla-top-right{top:0;right:0}.boxzilla.boxzilla-bottom-left{bottom:0;left:0}.boxzilla.boxzilla-bottom-right{bottom:0;right:0}.boxzilla-content>:first-child{margin-top:0;padding-top:0}.boxzilla-content>:last-child{margin-bottom:0;padding-bottom:0}.boxzilla-close-icon{position:absolute;right:0;top:0;text-align:center;padding:6px;cursor:pointer;-webkit-appearance:none;font-size:28px;font-weight:700;line-height:20px;color:#000;opacity:.5}.boxzilla-close-icon:focus,.boxzilla-close-icon:hover{opacity:.8}\";\nmodule.exports = styles;\n\n},{}],6:[function(require,module,exports){\n\"use strict\";\n\nvar Timer = function Timer() {\n this.time = 0;\n this.interval = 0;\n};\n\nTimer.prototype.tick = function () {\n this.time++;\n};\n\nTimer.prototype.start = function () {\n if (!this.interval) {\n this.interval = window.setInterval(this.tick.bind(this), 1000);\n }\n};\n\nTimer.prototype.stop = function () {\n if (this.interval) {\n window.clearInterval(this.interval);\n this.interval = 0;\n }\n};\n\nmodule.exports = Timer;\n\n},{}],7:[function(require,module,exports){\n\"use strict\";\n\nmodule.exports = function (boxes) {\n var timeout = null;\n var touchStart = {};\n\n function trigger() {\n document.documentElement.removeEventListener('mouseleave', onMouseLeave);\n document.documentElement.removeEventListener('mouseenter', onMouseEnter);\n document.documentElement.removeEventListener('click', clearTimeout);\n window.removeEventListener('touchstart', onTouchStart);\n window.removeEventListener('touchend', onTouchEnd); // show boxes with exit intent trigger\n\n boxes.forEach(function (box) {\n if (box.mayAutoShow() && box.config.trigger.method === 'exit_intent') {\n box.trigger();\n }\n });\n }\n\n function clearTimeout() {\n if (timeout === null) {\n return;\n }\n\n window.clearTimeout(timeout);\n timeout = null;\n }\n\n function onMouseEnter() {\n clearTimeout();\n }\n\n function getAddressBarY() {\n if (document.documentMode || /Edge\\//.test(navigator.userAgent)) {\n return 5;\n }\n\n return 0;\n }\n\n function onMouseLeave(evt) {\n clearTimeout(); // did mouse leave at top of window?\n // add small exception space in the top-right corner\n\n if (evt.clientY <= getAddressBarY() && evt.clientX < 0.8 * window.innerWidth) {\n timeout = window.setTimeout(trigger, 600);\n }\n }\n\n function onTouchStart() {\n clearTimeout();\n touchStart = {\n timestamp: performance.now(),\n scrollY: window.scrollY,\n windowHeight: window.innerHeight\n };\n }\n\n function onTouchEnd(evt) {\n clearTimeout(); // did address bar appear?\n\n if (window.innerHeight > touchStart.windowHeight) {\n return;\n } // allow a tiny tiny margin for error, to not fire on clicks\n\n\n if (window.scrollY + 20 > touchStart.scrollY) {\n return;\n }\n\n if (performance.now() - touchStart.timestamp > 300) {\n return;\n }\n\n if (['A', 'INPUT', 'BUTTON'].indexOf(evt.target.tagName) > -1) {\n return;\n }\n\n timeout = window.setTimeout(trigger, 800);\n }\n\n window.addEventListener('touchstart', onTouchStart);\n window.addEventListener('touchend', onTouchEnd);\n document.documentElement.addEventListener('mouseenter', onMouseEnter);\n document.documentElement.addEventListener('mouseleave', onMouseLeave);\n document.documentElement.addEventListener('click', clearTimeout);\n};\n\n},{}],8:[function(require,module,exports){\n\"use strict\";\n\nmodule.exports = function (boxes) {\n var pageviews;\n\n try {\n pageviews = sessionStorage.getItem('boxzilla_pageviews') || 0;\n sessionStorage.setItem('boxzilla_pageviews', ++pageviews);\n } catch (e) {\n pageviews = 0;\n }\n\n window.setTimeout(function () {\n boxes.forEach(function (box) {\n if (box.config.trigger.method === 'pageviews' && pageviews > box.config.trigger.value && box.mayAutoShow()) {\n box.trigger();\n }\n });\n }, 1000);\n};\n\n},{}],9:[function(require,module,exports){\n\"use strict\";\n\nvar throttle = require('../util.js').throttle;\n\nmodule.exports = function (boxes) {\n // check triggerHeight criteria for all boxes\n function checkHeightCriteria() {\n var scrollY = window.hasOwnProperty('pageYOffset') ? window.pageYOffset : window.scrollTop;\n scrollY = scrollY + window.innerHeight * 0.9;\n boxes.forEach(function (box) {\n if (!box.mayAutoShow() || box.triggerHeight <= 0) {\n return;\n }\n\n if (scrollY > box.triggerHeight) {\n box.trigger();\n } else if (box.mayRehide() && scrollY < box.triggerHeight - 5) {\n // if box may auto-hide and scrollY is less than triggerHeight (with small margin of error), hide box\n box.hide();\n }\n });\n }\n\n window.addEventListener('touchstart', throttle(checkHeightCriteria), true);\n window.addEventListener('scroll', throttle(checkHeightCriteria), true);\n};\n\n},{\"../util.js\":11}],10:[function(require,module,exports){\n\"use strict\";\n\nvar Timer = require('../timer.js');\n\nmodule.exports = function (boxes) {\n var siteTimer = new Timer();\n var pageTimer = new Timer();\n var timers = {\n start: function start() {\n try {\n var sessionTime = parseInt(sessionStorage.getItem('boxzilla_timer'));\n\n if (sessionTime) {\n siteTimer.time = sessionTime;\n }\n } catch (e) {}\n\n siteTimer.start();\n pageTimer.start();\n },\n stop: function stop() {\n sessionStorage.setItem('boxzilla_timer', siteTimer.time);\n siteTimer.stop();\n pageTimer.stop();\n }\n }; // start timers\n\n timers.start(); // stop timers when leaving page or switching to other tab\n\n document.addEventListener('visibilitychange', function () {\n document.hidden ? timers.stop() : timers.start();\n });\n window.addEventListener('beforeunload', function () {\n timers.stop();\n });\n window.setInterval(function () {\n boxes.forEach(function (box) {\n if (box.config.trigger.method === 'time_on_site' && siteTimer.time > box.config.trigger.value && box.mayAutoShow()) {\n box.trigger();\n } else if (box.config.trigger.method === 'time_on_page' && pageTimer.time > box.config.trigger.value && box.mayAutoShow()) {\n box.trigger();\n }\n });\n }, 1000);\n};\n\n},{\"../timer.js\":6}],11:[function(require,module,exports){\n\"use strict\";\n\nfunction throttle(fn, threshold, scope) {\n threshold || (threshold = 800);\n var last;\n var deferTimer;\n return function () {\n var context = scope || this;\n var now = +new Date();\n var args = arguments;\n\n if (last && now < last + threshold) {\n // hold on to it\n clearTimeout(deferTimer);\n deferTimer = setTimeout(function () {\n last = now;\n fn.apply(context, args);\n }, threshold);\n } else {\n last = now;\n fn.apply(context, args);\n }\n };\n}\n\nmodule.exports = {\n throttle: throttle\n};\n\n},{}]},{},[1]);\n; })();"]}
1
+ {"version":3,"sources":["script.js"],"names":["r","e","n","t","o","i","f","c","u","a","Error","code","p","exports","call","length","1","require","module","_typeof","obj","Symbol","iterator","constructor","prototype","locationHashRefersBox","box","window","location","hash","match","elementId","element","id","querySelector","Boxzilla","options","isLoggedIn","boxzilla_options","document","body","className","indexOf","testMode","console","log","init","addEventListener","inited","key","boxes","boxOpts","boxContentElement","getElementById","content","create","post","slug","styles","css","background_color","style","background","color","border_color","borderColor","border_width","borderWidth","parseInt","border_style","borderStyle","width","maxWidth","firstChild","lastChild","fits","show","trigger","mc4wp_forms_config","submitted_form","mc4wp_submitted_form","selector","element_id","forEach","maybeOpenMailChimpForWordPressBox","boxzilla","2","duration","property","hasOwnProperty","animate","targetStyles","fn","last","Date","initialStyles","getComputedStyle","currentStyles","propSteps","parseFloat","to","current","tick","step","increment","newValue","timeSinceLastTick","done","_property","requestAnimationFrame","toggle","animation","callbackFn","cleanup","removeAttribute","setAttribute","clone","getAttribute","display","nowVisible","hiddenStyles","visibleStyles","offsetLeft","cloneNode","properties","value","newObject","initObjectProperties","object","copyObjectProperties","isFinite","height","clientRect","getBoundingClientRect","overflowY","opacity","animated","3","defaults","rehide","cookie","icon","screenWidthCondition","position","closable","Animator","Box","config","fireEvent","this","obj1","obj2","obj3","attrname","_attrname","merge","overlay","createElement","classList","add","appendChild","visible","dismissed","triggered","triggerHeight","calculateTriggerHeight","cookieSet","isCookieSet","contentElement","closeIcon","dom","events","evt","preventDefault","dismiss","target","tagName","setCookie","x","offsetX","y","offsetY","rect","left","right","top","bottom","wrapper","innerHTML","setCustomBoxStyling","origDisplay","maxHeight","windowHeight","innerHeight","boxHeight","clientHeight","newTopMargin","marginTop","bind","hide","method","triggerElement","html","documentElement","Math","max","scrollHeight","offsetHeight","getDocumentHeight","condition","innerWidth","onResize","mayAutoShow","mayRehide","replace","RegExp","hours","expiryDate","setHours","getHours","toUTCString","./animator.js","4","throttle","ExitIntent","Scroll","Pageviews","Time","initialised","listeners","onKeyUp","recalculateHeights","onElementClick","el","parentElement","href","event","args","apply","get","String","off","filter","on","push","styleElement","head","opts","minimumScreenWidth","./box.js","./styles.js","./triggers/exit-intent.js","./triggers/pageviews.js","./triggers/scroll.js","./triggers/time.js","./util.js","5","6","Timer","time","interval","start","setInterval","stop","clearInterval","7","timeout","touchStart","removeEventListener","onMouseLeave","onMouseEnter","clearTimeout","onTouchStart","onTouchEnd","clientY","documentMode","test","navigator","userAgent","clientX","setTimeout","timestamp","performance","now","scrollY","8","pageviews","sessionStorage","getItem","setItem","9","checkHeightCriteria","pageYOffset","scrollTop","../util.js","10","siteTimer","pageTimer","timers","sessionTime","hidden","../timer.js","11","threshold","scope","deferTimer","context","arguments"],"mappings":"CAA6H,SAASA,EAAEC,EAAEC,EAAEC,GAAG,SAASC,EAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,IAAIE,GAAE,EAAoC,IAAID,GAAGC,EAAE,OAAOA,EAAEF,GAAE,GAAI,GAAGG,EAAE,OAAOA,EAAEH,GAAE,GAAI,IAAII,EAAE,IAAIC,MAAM,uBAAuBL,EAAE,KAAK,MAAMI,EAAEE,KAAK,mBAAmBF,EAAE,IAAIG,EAAEV,EAAEG,GAAG,CAACQ,QAAQ,IAAIZ,EAAEI,GAAG,GAAGS,KAAKF,EAAEC,QAAQ,SAASb,GAAoB,OAAOI,EAAlBH,EAAEI,GAAG,GAAGL,IAAeA,IAAIY,EAAEA,EAAEC,QAAQb,EAAEC,EAAEC,EAAEC,GAAG,OAAOD,EAAEG,GAAGQ,QAAQ,IAAI,IAAIL,GAAE,EAAoCH,EAAE,EAAEA,EAAEF,EAAEY,OAAOV,IAAID,EAAED,EAAEE,IAAI,OAAOD,EAA7b,CAA4c,CAACY,EAAE,CAAC,SAASC,EAAQC,EAAOL,GACzlB,aAEA,SAASM,EAAQC,GAAmV,OAAtOD,EAArD,mBAAXE,QAAoD,iBAApBA,OAAOC,SAAmC,SAAiBF,GAAO,cAAcA,GAA2B,SAAiBA,GAAO,OAAOA,GAAyB,mBAAXC,QAAyBD,EAAIG,cAAgBF,QAAUD,IAAQC,OAAOG,UAAY,gBAAkBJ,IAAyBA,GA+EjX,SAASK,EAAsBC,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AASqQ,OAASF,IAAgBA,MAEpC/Q,OAAOoB,iBAAiB,eAAgB,WACtC2P,MAEF/Q,OAAO2O,YAAY,WACjBpN,EAAMiC,QAAQ,SAAUzD,GACY,iBAA9BA,EAAIyH,OAAOtE,QAAQ2H,QAA6BgG,EAAUrC,KAAOzO,EAAIyH,OAAOtE,QAAQgD,OAASnG,EAAI0L,cACnG1L,EAAImD,UACmC,iBAA9BnD,EAAIyH,OAAOtE,QAAQ2H,QAA6BiG,EAAUtC,KAAOzO,EAAIyH,OAAOtE,QAAQgD,OAASnG,EAAI0L,eAC1G1L,EAAImD,aAGP,OAGH,CAACgO,cAAc,IAAIC,GAAG,CAAC,SAAS7R,EAAQC,EAAOL,GACjD,aAyBAK,EAAOL,QAAU,CACfkN,SAxBF,SAAkBnI,EAAImN,EAAWC,GAE/B,IAAInN,EACAoN,EACJ,OAHcF,EAAdA,GAA0B,IAGnB,WACL,IAAIG,EAAUF,GAAS3J,KACnBsI,GAAO,IAAI7L,KACX+I,EAAOsE,UAEPtN,GAAQ8L,EAAM9L,EAAOkN,GAEvBhC,aAAakC,GACbA,EAAazB,WAAW,WACtB3L,EAAO8L,EACP/L,EAAGkJ,MAAMoE,EAASrE,IACjBkE,KAEHlN,EAAO8L,EACP/L,EAAGkJ,MAAMoE,EAASrE,QAStB,KAAK,GAAG,CAAC","file":"script.min.js","sourcesContent":["(function () { var require = undefined; var module = undefined; var exports = undefined; var define = undefined; (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n(function () {\n var Boxzilla = require('boxzilla');\n\n var options = window.boxzilla_options; // helper function for setting CSS styles\n\n function css(element, styles) {\n if (styles.background_color) {\n element.style.background = styles.background_color;\n }\n\n if (styles.color) {\n element.style.color = styles.color;\n }\n\n if (styles.border_color) {\n element.style.borderColor = styles.border_color;\n }\n\n if (styles.border_width) {\n element.style.borderWidth = parseInt(styles.border_width) + 'px';\n }\n\n if (styles.border_style) {\n element.style.borderStyle = styles.border_style;\n }\n\n if (styles.width) {\n element.style.maxWidth = parseInt(styles.width) + 'px';\n }\n }\n\n function createBoxesFromConfig() {\n // failsafe against including script twice.\n if (options.inited) {\n return;\n } // create boxes from options\n\n\n for (var key in options.boxes) {\n // get opts\n var boxOpts = options.boxes[key];\n boxOpts.testMode = isLoggedIn && options.testMode; // find box content element, bail if not found\n\n var boxContentElement = document.getElementById('boxzilla-box-' + boxOpts.id + '-content');\n\n if (!boxContentElement) {\n continue;\n } // use element as content option\n\n\n boxOpts.content = boxContentElement; // create box\n\n var box = Boxzilla.create(boxOpts.id, boxOpts); // add box slug to box element as classname\n\n box.element.className = box.element.className + ' boxzilla-' + boxOpts.post.slug; // add custom css to box\n\n css(box.element, boxOpts.css);\n\n try {\n box.element.firstChild.firstChild.className += ' first-child';\n box.element.firstChild.lastChild.className += ' last-child';\n } catch (e) {} // maybe show box right away\n\n\n if (box.fits() && locationHashRefersBox(box)) {\n box.show();\n }\n } // set flag to prevent initialising twice\n\n\n options.inited = true; // trigger \"done\" event.\n\n Boxzilla.trigger('done'); // maybe open box with MC4WP form in it\n\n maybeOpenMailChimpForWordPressBox();\n }\n\n function locationHashRefersBox(box) {\n if (!window.location.hash || window.location.hash.length === 0) {\n return false;\n } // parse \"boxzilla-{id}\" from location hash\n\n\n var match = window.location.hash.match(/[#&](boxzilla-\\d+)/);\n\n if (!match || _typeof(match) !== 'object' || match.length < 2) {\n return false;\n }\n\n var elementId = match[1];\n\n if (elementId === box.element.id) {\n return true;\n } else if (box.element.querySelector('#' + elementId)) {\n return true;\n }\n\n return false;\n }\n\n function maybeOpenMailChimpForWordPressBox() {\n if ((_typeof(window.mc4wp_forms_config) !== 'object' || !window.mc4wp_forms_config.submitted_form) && _typeof(window.mc4wp_submitted_form) !== 'object') {\n return;\n }\n\n var form = window.mc4wp_submitted_form || window.mc4wp_forms_config.submitted_form;\n var selector = '#' + form.element_id;\n Boxzilla.boxes.forEach(function (box) {\n if (box.element.querySelector(selector)) {\n box.show();\n }\n });\n } // print message when test mode is enabled\n\n\n var isLoggedIn = document.body && document.body.className && document.body.className.indexOf('logged-in') > -1;\n\n if (isLoggedIn && options.testMode) {\n console.log('Boxzilla: Test mode is enabled. Please disable test mode if you\\'re done testing.');\n } // init boxzilla\n\n\n Boxzilla.init(); // on window.load, create DOM elements for boxes\n\n window.addEventListener('load', createBoxesFromConfig);\n})();\n\n},{\"boxzilla\":4}],2:[function(require,module,exports){\n\"use strict\";\n\nvar duration = 320;\n\nfunction css(element, styles) {\n for (var property in styles) {\n if (!styles.hasOwnProperty(property)) {\n continue;\n }\n\n element.style[property] = styles[property];\n }\n}\n\nfunction initObjectProperties(properties, value) {\n var newObject = {};\n\n for (var i = 0; i < properties.length; i++) {\n newObject[properties[i]] = value;\n }\n\n return newObject;\n}\n\nfunction copyObjectProperties(properties, object) {\n var newObject = {};\n\n for (var i = 0; i < properties.length; i++) {\n newObject[properties[i]] = object[properties[i]];\n }\n\n return newObject;\n}\n/**\n * Checks if the given element is currently being animated.\n *\n * @param element\n * @returns {boolean}\n */\n\n\nfunction animated(element) {\n return !!element.getAttribute('data-animated');\n}\n/**\n * Toggles the element using the given animation.\n *\n * @param element\n * @param animation Either \"fade\" or \"slide\"\n * @param callbackFn\n */\n\n\nfunction toggle(element, animation, callbackFn) {\n var nowVisible = element.style.display !== 'none' || element.offsetLeft > 0; // create clone for reference\n\n var clone = element.cloneNode(true);\n\n var cleanup = function cleanup() {\n element.removeAttribute('data-animated');\n element.setAttribute('style', clone.getAttribute('style'));\n element.style.display = nowVisible ? 'none' : '';\n\n if (callbackFn) {\n callbackFn();\n }\n }; // store attribute so everyone knows we're animating this element\n\n\n element.setAttribute('data-animated', 'true'); // toggle element visiblity right away if we're making something visible\n\n if (!nowVisible) {\n element.style.display = '';\n }\n\n var hiddenStyles;\n var visibleStyles; // animate properties\n\n if (animation === 'slide') {\n hiddenStyles = initObjectProperties(['height', 'borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'], 0);\n visibleStyles = {};\n\n if (!nowVisible) {\n var computedStyles = window.getComputedStyle(element);\n visibleStyles = copyObjectProperties(['height', 'borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'], computedStyles); // in some browsers, getComputedStyle returns \"auto\" value. this falls back to getBoundingClientRect() in those browsers since we need an actual height.\n\n if (!isFinite(visibleStyles.height)) {\n var clientRect = element.getBoundingClientRect();\n visibleStyles.height = clientRect.height;\n }\n\n css(element, hiddenStyles);\n } // don't show a scrollbar during animation\n\n\n element.style.overflowY = 'hidden';\n animate(element, nowVisible ? hiddenStyles : visibleStyles, cleanup);\n } else {\n hiddenStyles = {\n opacity: 0\n };\n visibleStyles = {\n opacity: 1\n };\n\n if (!nowVisible) {\n css(element, hiddenStyles);\n }\n\n animate(element, nowVisible ? hiddenStyles : visibleStyles, cleanup);\n }\n}\n\nfunction animate(element, targetStyles, fn) {\n var last = +new Date();\n var initialStyles = window.getComputedStyle(element);\n var currentStyles = {};\n var propSteps = {};\n\n for (var property in targetStyles) {\n if (!targetStyles.hasOwnProperty(property)) {\n continue;\n } // make sure we have an object filled with floats\n\n\n targetStyles[property] = parseFloat(targetStyles[property]); // calculate step size & current value\n\n var to = targetStyles[property];\n var current = parseFloat(initialStyles[property]); // is there something to do?\n\n if (current === to) {\n delete targetStyles[property];\n continue;\n }\n\n propSteps[property] = (to - current) / duration; // points per second\n\n currentStyles[property] = current;\n }\n\n var tick = function tick() {\n var now = +new Date();\n var timeSinceLastTick = now - last;\n var done = true;\n var step, to, increment, newValue;\n\n for (var _property in targetStyles) {\n if (!targetStyles.hasOwnProperty(_property)) {\n continue;\n }\n\n step = propSteps[_property];\n to = targetStyles[_property];\n increment = step * timeSinceLastTick;\n newValue = currentStyles[_property] + increment;\n\n if (step > 0 && newValue >= to || step < 0 && newValue <= to) {\n newValue = to;\n } else {\n done = false;\n } // store new value\n\n\n currentStyles[_property] = newValue;\n element.style[_property] = _property !== 'opacity' ? newValue + 'px' : newValue;\n }\n\n last = +new Date();\n\n if (!done) {\n // keep going until we're done for all props\n window.requestAnimationFrame(tick);\n } else {\n // call callback\n fn && fn();\n }\n };\n\n tick();\n}\n\nmodule.exports = {\n toggle: toggle,\n animate: animate,\n animated: animated\n};\n\n},{}],3:[function(require,module,exports){\n\"use strict\";\n\nvar defaults = {\n animation: 'fade',\n rehide: false,\n content: '',\n cookie: null,\n icon: '&times',\n screenWidthCondition: null,\n position: 'center',\n testMode: false,\n trigger: false,\n closable: true\n};\n\nvar Animator = require('./animator.js');\n/**\n * Merge 2 objects, values of the latter overwriting the former.\n *\n * @param obj1\n * @param obj2\n * @returns {*}\n */\n\n\nfunction merge(obj1, obj2) {\n var obj3 = {}; // add obj1 to obj3\n\n for (var attrname in obj1) {\n if (obj1.hasOwnProperty(attrname)) {\n obj3[attrname] = obj1[attrname];\n }\n } // add obj2 to obj3\n\n\n for (var _attrname in obj2) {\n if (obj2.hasOwnProperty(_attrname)) {\n obj3[_attrname] = obj2[_attrname];\n }\n }\n\n return obj3;\n}\n/**\n * Get the real height of entire document.\n * @returns {number}\n */\n\n\nfunction getDocumentHeight() {\n var body = document.body;\n var html = document.documentElement;\n return Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);\n} // Box Object\n\n\nfunction Box(id, config, fireEvent) {\n this.id = id;\n this.fireEvent = fireEvent; // store config values\n\n this.config = merge(defaults, config); // add overlay element to dom and store ref to overlay\n\n this.overlay = document.createElement('div');\n this.overlay.style.display = 'none';\n this.overlay.id = 'boxzilla-overlay-' + this.id;\n this.overlay.classList.add('boxzilla-overlay');\n document.body.appendChild(this.overlay); // state\n\n this.visible = false;\n this.dismissed = false;\n this.triggered = false;\n this.triggerHeight = this.calculateTriggerHeight();\n this.cookieSet = this.isCookieSet();\n this.element = null;\n this.contentElement = null;\n this.closeIcon = null; // create dom elements for this box\n\n this.dom(); // further initialise the box\n\n this.events();\n} // initialise the box\n\n\nBox.prototype.events = function () {\n var box = this; // attach event to \"close\" icon inside box\n\n if (this.closeIcon) {\n this.closeIcon.addEventListener('click', function (evt) {\n evt.preventDefault();\n box.dismiss();\n });\n }\n\n this.element.addEventListener('click', function (evt) {\n if (evt.target.tagName === 'A') {\n box.fireEvent('box.interactions.link', [box, evt.target]);\n }\n }, false);\n this.element.addEventListener('submit', function (evt) {\n box.setCookie();\n box.fireEvent('box.interactions.form', [box, evt.target]);\n }, false);\n this.overlay.addEventListener('click', function (evt) {\n var x = evt.offsetX;\n var y = evt.offsetY; // calculate if click was less than 40px outside box to avoid closing it by accident\n\n var rect = box.element.getBoundingClientRect();\n var margin = 40; // if click was not anywhere near box, dismiss it.\n\n if (x < rect.left - margin || x > rect.right + margin || y < rect.top - margin || y > rect.bottom + margin) {\n box.dismiss();\n }\n });\n}; // generate dom elements for this box\n\n\nBox.prototype.dom = function () {\n var wrapper = document.createElement('div');\n wrapper.className = 'boxzilla-container boxzilla-' + this.config.position + '-container';\n var box = document.createElement('div');\n box.id = 'boxzilla-' + this.id;\n box.className = 'boxzilla boxzilla-' + this.id + ' boxzilla-' + this.config.position;\n box.style.display = 'none';\n wrapper.appendChild(box);\n var content;\n\n if (typeof this.config.content === 'string') {\n content = document.createElement('div');\n content.innerHTML = this.config.content;\n } else {\n content = this.config.content; // make sure element is visible\n\n content.style.display = '';\n }\n\n content.className = 'boxzilla-content';\n box.appendChild(content);\n\n if (this.config.closable && this.config.icon) {\n var closeIcon = document.createElement('span');\n closeIcon.className = 'boxzilla-close-icon';\n closeIcon.innerHTML = this.config.icon;\n closeIcon.setAttribute('aria-label', 'close');\n box.appendChild(closeIcon);\n this.closeIcon = closeIcon;\n }\n\n document.body.appendChild(wrapper);\n this.contentElement = content;\n this.element = box;\n}; // set (calculate) custom box styling depending on box options\n\n\nBox.prototype.setCustomBoxStyling = function () {\n // reset element to its initial state\n var origDisplay = this.element.style.display;\n this.element.style.display = '';\n this.element.style.overflowY = '';\n this.element.style.maxHeight = ''; // get new dimensions\n\n var windowHeight = window.innerHeight;\n var boxHeight = this.element.clientHeight; // add scrollbar to box and limit height\n\n if (boxHeight > windowHeight) {\n this.element.style.maxHeight = windowHeight + 'px';\n this.element.style.overflowY = 'scroll';\n } // set new top margin for boxes which are centered\n\n\n if (this.config.position === 'center') {\n var newTopMargin = (windowHeight - boxHeight) / 2;\n newTopMargin = newTopMargin >= 0 ? newTopMargin : 0;\n this.element.style.marginTop = newTopMargin + 'px';\n }\n\n this.element.style.display = origDisplay;\n}; // toggle visibility of the box\n\n\nBox.prototype.toggle = function (show, animate) {\n show = typeof show === 'undefined' ? !this.visible : show;\n animate = typeof animate === 'undefined' ? true : animate; // is box already at desired visibility?\n\n if (show === this.visible) {\n return false;\n } // is box being animated?\n\n\n if (Animator.animated(this.element)) {\n return false;\n } // if box should be hidden but is not closable, bail.\n\n\n if (!show && !this.config.closable) {\n return false;\n } // set new visibility status\n\n\n this.visible = show; // calculate new styling rules\n\n this.setCustomBoxStyling(); // trigger event\n\n this.fireEvent('box.' + (show ? 'show' : 'hide'), [this]); // show or hide box using selected animation\n\n if (this.config.position === 'center') {\n this.overlay.classList.toggle('boxzilla-' + this.id + '-overlay');\n\n if (animate) {\n Animator.toggle(this.overlay, 'fade');\n } else {\n this.overlay.style.display = show ? '' : 'none';\n }\n }\n\n if (animate) {\n Animator.toggle(this.element, this.config.animation, function () {\n if (this.visible) {\n return;\n }\n\n this.contentElement.innerHTML = this.contentElement.innerHTML + '';\n }.bind(this));\n } else {\n this.element.style.display = show ? '' : 'none';\n }\n\n return true;\n}; // show the box\n\n\nBox.prototype.show = function (animate) {\n return this.toggle(true, animate);\n}; // hide the box\n\n\nBox.prototype.hide = function (animate) {\n return this.toggle(false, animate);\n}; // calculate trigger height\n\n\nBox.prototype.calculateTriggerHeight = function () {\n var triggerHeight = 0;\n\n if (this.config.trigger) {\n if (this.config.trigger.method === 'element') {\n var triggerElement = document.body.querySelector(this.config.trigger.value);\n\n if (triggerElement) {\n var offset = triggerElement.getBoundingClientRect();\n triggerHeight = offset.top;\n }\n } else if (this.config.trigger.method === 'percentage') {\n triggerHeight = this.config.trigger.value / 100 * getDocumentHeight();\n }\n }\n\n return triggerHeight;\n};\n\nBox.prototype.fits = function () {\n if (!this.config.screenWidthCondition || !this.config.screenWidthCondition.value) {\n return true;\n }\n\n switch (this.config.screenWidthCondition.condition) {\n case 'larger':\n return window.innerWidth > this.config.screenWidthCondition.value;\n\n case 'smaller':\n return window.innerWidth < this.config.screenWidthCondition.value;\n } // meh.. condition should be \"smaller\" or \"larger\", just return true.\n\n\n return true;\n};\n\nBox.prototype.onResize = function () {\n this.triggerHeight = this.calculateTriggerHeight();\n this.setCustomBoxStyling();\n}; // is this box enabled?\n\n\nBox.prototype.mayAutoShow = function () {\n if (this.dismissed) {\n return false;\n } // check if box fits on given minimum screen width\n\n\n if (!this.fits()) {\n return false;\n } // if trigger empty or error in calculating triggerHeight, return false\n\n\n if (!this.config.trigger) {\n return false;\n } // rely on cookie value (show if not set, don't show if set)\n\n\n return !this.cookieSet;\n};\n\nBox.prototype.mayRehide = function () {\n return this.config.rehide && this.triggered;\n};\n\nBox.prototype.isCookieSet = function () {\n // always show on test mode or when no auto-trigger is configured\n if (this.config.testMode || !this.config.trigger) {\n return false;\n } // if either cookie is null or trigger & dismiss are both falsey, don't bother checking.\n\n\n if (!this.config.cookie || !this.config.cookie.triggered && !this.config.cookie.dismissed) {\n return false;\n }\n\n return document.cookie.replace(new RegExp('(?:(?:^|.*;)\\\\s*' + 'boxzilla_box_' + this.id + '\\\\s*\\\\=\\\\s*([^;]*).*$)|^.*$'), '$1') === 'true';\n}; // set cookie that disables automatically showing the box\n\n\nBox.prototype.setCookie = function (hours) {\n var expiryDate = new Date();\n expiryDate.setHours(expiryDate.getHours() + hours);\n document.cookie = 'boxzilla_box_' + this.id + '=true; expires=' + expiryDate.toUTCString() + '; path=/';\n};\n\nBox.prototype.trigger = function () {\n var shown = this.show();\n\n if (!shown) {\n return;\n }\n\n this.triggered = true;\n\n if (this.config.cookie && this.config.cookie.triggered) {\n this.setCookie(this.config.cookie.triggered);\n }\n};\n/**\n * Dismisses the box and optionally sets a cookie.\n * @param animate\n * @returns {boolean}\n */\n\n\nBox.prototype.dismiss = function (animate) {\n // only dismiss box if it's currently open.\n if (!this.visible) {\n return false;\n } // hide box element\n\n\n this.hide(animate); // set cookie\n\n if (this.config.cookie && this.config.cookie.dismissed) {\n this.setCookie(this.config.cookie.dismissed);\n }\n\n this.dismissed = true;\n this.fireEvent('box.dismiss', [this]);\n return true;\n};\n\nmodule.exports = Box;\n\n},{\"./animator.js\":2}],4:[function(require,module,exports){\n\"use strict\";\n\nvar Box = require('./box.js');\n\nvar throttle = require('./util.js').throttle;\n\nvar styles = require('./styles.js');\n\nvar ExitIntent = require('./triggers/exit-intent.js');\n\nvar Scroll = require('./triggers/scroll.js');\n\nvar Pageviews = require('./triggers/pageviews.js');\n\nvar Time = require('./triggers/time.js');\n\nvar initialised = false;\nvar boxes = [];\nvar listeners = {};\n\nfunction onKeyUp(evt) {\n if (evt.key === 'Escape' || evt.key === 'Esc') {\n dismiss();\n }\n}\n\nfunction recalculateHeights() {\n boxes.forEach(function (box) {\n return box.onResize();\n });\n}\n\nfunction onElementClick(evt) {\n // bubble up to <a> element\n var el = evt.target;\n\n for (var i = 0; i <= 3; i++) {\n if (!el || el.tagName === 'A') {\n break;\n }\n\n el = el.parentElement;\n }\n\n if (!el || el.tagName !== 'A' || !el.href) {\n return;\n }\n\n var match = el.href.match(/[#&]boxzilla-(.+)/i);\n\n if (match && match.length > 1) {\n toggle(match[1]);\n }\n}\n\nfunction trigger(event, args) {\n listeners[event] && listeners[event].forEach(function (f) {\n return f.apply(null, args);\n });\n}\n\nfunction on(event, fn) {\n listeners[event] = listeners[event] || [];\n listeners[event].push(fn);\n}\n\nfunction off(event, fn) {\n listeners[event] && listeners[event].filter(function (f) {\n return f !== fn;\n });\n} // initialise & add event listeners\n\n\nfunction init() {\n if (initialised) {\n return;\n } // insert styles into DOM\n\n\n var styleElement = document.createElement('style');\n styleElement.innerHTML = styles;\n document.head.appendChild(styleElement); // init triggers\n\n ExitIntent(boxes);\n Pageviews(boxes);\n Scroll(boxes);\n Time(boxes);\n document.body.addEventListener('click', onElementClick, true);\n window.addEventListener('resize', throttle(recalculateHeights));\n window.addEventListener('load', recalculateHeights);\n document.addEventListener('keyup', onKeyUp);\n trigger('ready');\n initialised = true; // ensure this function doesn't run again\n}\n\nfunction create(id, opts) {\n // preserve backwards compat for minimumScreenWidth option\n if (typeof opts.minimumScreenWidth !== 'undefined') {\n opts.screenWidthCondition = {\n condition: 'larger',\n value: opts.minimumScreenWidth\n };\n }\n\n id = String(id);\n var box = new Box(id, opts, trigger);\n boxes.push(box);\n return box;\n}\n\nfunction get(id) {\n id = String(id);\n\n for (var i = 0; i < boxes.length; i++) {\n if (boxes[i].id === id) {\n return boxes[i];\n }\n }\n\n throw new Error('No box exists with ID ' + id);\n} // dismiss a single box (or all by omitting id param)\n\n\nfunction dismiss(id, animate) {\n if (id) {\n get(id).dismiss(animate);\n } else {\n boxes.forEach(function (box) {\n return box.dismiss(animate);\n });\n }\n}\n\nfunction hide(id, animate) {\n if (id) {\n get(id).hide(animate);\n } else {\n boxes.forEach(function (box) {\n return box.hide(animate);\n });\n }\n}\n\nfunction show(id, animate) {\n if (id) {\n get(id).show(animate);\n } else {\n boxes.forEach(function (box) {\n return box.show(animate);\n });\n }\n}\n\nfunction toggle(id, animate) {\n if (id) {\n get(id).toggle(animate);\n } else {\n boxes.forEach(function (box) {\n return box.toggle(animate);\n });\n }\n} // expose boxzilla object\n\n\nvar Boxzilla = {\n off: off,\n on: on,\n get: get,\n init: init,\n create: create,\n trigger: trigger,\n show: show,\n hide: hide,\n dismiss: dismiss,\n toggle: toggle,\n boxes: boxes\n};\nwindow.Boxzilla = Boxzilla;\n\nif (typeof module !== 'undefined' && module.exports) {\n module.exports = Boxzilla;\n}\n\n},{\"./box.js\":3,\"./styles.js\":5,\"./triggers/exit-intent.js\":7,\"./triggers/pageviews.js\":8,\"./triggers/scroll.js\":9,\"./triggers/time.js\":10,\"./util.js\":11}],5:[function(require,module,exports){\n\"use strict\";\n\nvar styles = \"#boxzilla-overlay,.boxzilla-overlay{position:fixed;background:rgba(0,0,0,.65);width:100%;height:100%;left:0;top:0;z-index:10000}.boxzilla-center-container{position:fixed;top:0;left:0;right:0;height:0;text-align:center;z-index:11000;line-height:0}.boxzilla-center-container .boxzilla{display:inline-block;text-align:left;position:relative;line-height:normal}.boxzilla{position:fixed;z-index:12000;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;padding:25px}.boxzilla.boxzilla-top-left{top:0;left:0}.boxzilla.boxzilla-top-right{top:0;right:0}.boxzilla.boxzilla-bottom-left{bottom:0;left:0}.boxzilla.boxzilla-bottom-right{bottom:0;right:0}.boxzilla-content>:first-child{margin-top:0;padding-top:0}.boxzilla-content>:last-child{margin-bottom:0;padding-bottom:0}.boxzilla-close-icon{position:absolute;right:0;top:0;text-align:center;padding:6px;cursor:pointer;-webkit-appearance:none;font-size:28px;font-weight:700;line-height:20px;color:#000;opacity:.5}.boxzilla-close-icon:focus,.boxzilla-close-icon:hover{opacity:.8}\";\nmodule.exports = styles;\n\n},{}],6:[function(require,module,exports){\n\"use strict\";\n\nvar Timer = function Timer() {\n this.time = 0;\n this.interval = 0;\n};\n\nTimer.prototype.tick = function () {\n this.time++;\n};\n\nTimer.prototype.start = function () {\n if (!this.interval) {\n this.interval = window.setInterval(this.tick.bind(this), 1000);\n }\n};\n\nTimer.prototype.stop = function () {\n if (this.interval) {\n window.clearInterval(this.interval);\n this.interval = 0;\n }\n};\n\nmodule.exports = Timer;\n\n},{}],7:[function(require,module,exports){\n\"use strict\";\n\nmodule.exports = function (boxes) {\n var timeout = null;\n var touchStart = {};\n\n function trigger() {\n document.documentElement.removeEventListener('mouseleave', onMouseLeave);\n document.documentElement.removeEventListener('mouseenter', onMouseEnter);\n document.documentElement.removeEventListener('click', clearTimeout);\n window.removeEventListener('touchstart', onTouchStart);\n window.removeEventListener('touchend', onTouchEnd); // show boxes with exit intent trigger\n\n boxes.forEach(function (box) {\n if (box.mayAutoShow() && box.config.trigger.method === 'exit_intent') {\n box.trigger();\n }\n });\n }\n\n function clearTimeout() {\n if (timeout === null) {\n return;\n }\n\n window.clearTimeout(timeout);\n timeout = null;\n }\n\n function onMouseEnter() {\n clearTimeout();\n }\n\n function getAddressBarY() {\n if (document.documentMode || /Edge\\//.test(navigator.userAgent)) {\n return 5;\n }\n\n return 0;\n }\n\n function onMouseLeave(evt) {\n clearTimeout(); // did mouse leave at top of window?\n // add small exception space in the top-right corner\n\n if (evt.clientY <= getAddressBarY() && evt.clientX < 0.8 * window.innerWidth) {\n timeout = window.setTimeout(trigger, 600);\n }\n }\n\n function onTouchStart() {\n clearTimeout();\n touchStart = {\n timestamp: performance.now(),\n scrollY: window.scrollY,\n windowHeight: window.innerHeight\n };\n }\n\n function onTouchEnd(evt) {\n clearTimeout(); // did address bar appear?\n\n if (window.innerHeight > touchStart.windowHeight) {\n return;\n } // allow a tiny tiny margin for error, to not fire on clicks\n\n\n if (window.scrollY + 20 > touchStart.scrollY) {\n return;\n }\n\n if (performance.now() - touchStart.timestamp > 300) {\n return;\n }\n\n if (['A', 'INPUT', 'BUTTON'].indexOf(evt.target.tagName) > -1) {\n return;\n }\n\n timeout = window.setTimeout(trigger, 800);\n }\n\n window.addEventListener('touchstart', onTouchStart);\n window.addEventListener('touchend', onTouchEnd);\n document.documentElement.addEventListener('mouseenter', onMouseEnter);\n document.documentElement.addEventListener('mouseleave', onMouseLeave);\n document.documentElement.addEventListener('click', clearTimeout);\n};\n\n},{}],8:[function(require,module,exports){\n\"use strict\";\n\nmodule.exports = function (boxes) {\n var pageviews;\n\n try {\n pageviews = sessionStorage.getItem('boxzilla_pageviews') || 0;\n sessionStorage.setItem('boxzilla_pageviews', ++pageviews);\n } catch (e) {\n pageviews = 0;\n }\n\n window.setTimeout(function () {\n boxes.forEach(function (box) {\n if (box.config.trigger.method === 'pageviews' && pageviews > box.config.trigger.value && box.mayAutoShow()) {\n box.trigger();\n }\n });\n }, 1000);\n};\n\n},{}],9:[function(require,module,exports){\n\"use strict\";\n\nvar throttle = require('../util.js').throttle;\n\nmodule.exports = function (boxes) {\n // check triggerHeight criteria for all boxes\n function checkHeightCriteria() {\n var scrollY = window.hasOwnProperty('pageYOffset') ? window.pageYOffset : window.scrollTop;\n scrollY = scrollY + window.innerHeight * 0.9;\n boxes.forEach(function (box) {\n if (!box.mayAutoShow() || box.triggerHeight <= 0) {\n return;\n }\n\n if (scrollY > box.triggerHeight) {\n box.trigger();\n } else if (box.mayRehide() && scrollY < box.triggerHeight - 5) {\n // if box may auto-hide and scrollY is less than triggerHeight (with small margin of error), hide box\n box.hide();\n }\n });\n }\n\n window.addEventListener('touchstart', throttle(checkHeightCriteria), true);\n window.addEventListener('scroll', throttle(checkHeightCriteria), true);\n};\n\n},{\"../util.js\":11}],10:[function(require,module,exports){\n\"use strict\";\n\nvar Timer = require('../timer.js');\n\nmodule.exports = function (boxes) {\n var siteTimer = new Timer();\n var pageTimer = new Timer();\n var timers = {\n start: function start() {\n try {\n var sessionTime = parseInt(sessionStorage.getItem('boxzilla_timer'));\n\n if (sessionTime) {\n siteTimer.time = sessionTime;\n }\n } catch (e) {}\n\n siteTimer.start();\n pageTimer.start();\n },\n stop: function stop() {\n sessionStorage.setItem('boxzilla_timer', siteTimer.time);\n siteTimer.stop();\n pageTimer.stop();\n }\n }; // start timers\n\n timers.start(); // stop timers when leaving page or switching to other tab\n\n document.addEventListener('visibilitychange', function () {\n document.hidden ? timers.stop() : timers.start();\n });\n window.addEventListener('beforeunload', function () {\n timers.stop();\n });\n window.setInterval(function () {\n boxes.forEach(function (box) {\n if (box.config.trigger.method === 'time_on_site' && siteTimer.time > box.config.trigger.value && box.mayAutoShow()) {\n box.trigger();\n } else if (box.config.trigger.method === 'time_on_page' && pageTimer.time > box.config.trigger.value && box.mayAutoShow()) {\n box.trigger();\n }\n });\n }, 1000);\n};\n\n},{\"../timer.js\":6}],11:[function(require,module,exports){\n\"use strict\";\n\nfunction throttle(fn, threshold, scope) {\n threshold || (threshold = 800);\n var last;\n var deferTimer;\n return function () {\n var context = scope || this;\n var now = +new Date();\n var args = arguments;\n\n if (last && now < last + threshold) {\n // hold on to it\n clearTimeout(deferTimer);\n deferTimer = setTimeout(function () {\n last = now;\n fn.apply(context, args);\n }, threshold);\n } else {\n last = now;\n fn.apply(context, args);\n }\n };\n}\n\nmodule.exports = {\n throttle: throttle\n};\n\n},{}]},{},[1]);\n; })();"]}
boxzilla.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  Plugin Name: Boxzilla
4
- Version: 3.2.22
5
  Plugin URI: https://boxzillaplugin.com/#utm_source=wp-plugin&utm_medium=boxzilla&utm_campaign=plugins-page
6
  Description: Call-To-Action Boxes that display after visitors scroll down far enough. Unobtrusive, but highly conversing!
7
  Author: ibericode
@@ -41,7 +41,7 @@ if ( ! defined( 'ABSPATH' ) ) {
41
  function _load_boxzilla() {
42
 
43
  define( 'BOXZILLA_FILE', __FILE__ );
44
- define( 'BOXZILLA_VERSION', '3.2.22' );
45
 
46
  require __DIR__ . '/bootstrap.php';
47
  }
1
  <?php
2
  /*
3
  Plugin Name: Boxzilla
4
+ Version: 3.2.23
5
  Plugin URI: https://boxzillaplugin.com/#utm_source=wp-plugin&utm_medium=boxzilla&utm_campaign=plugins-page
6
  Description: Call-To-Action Boxes that display after visitors scroll down far enough. Unobtrusive, but highly conversing!
7
  Author: ibericode
41
  function _load_boxzilla() {
42
 
43
  define( 'BOXZILLA_FILE', __FILE__ );
44
+ define( 'BOXZILLA_VERSION', '3.2.23' );
45
 
46
  require __DIR__ . '/bootstrap.php';
47
  }
languages/boxzilla.pot CHANGED
@@ -225,14 +225,6 @@ msgstr ""
225
  msgid "License Status"
226
  msgstr ""
227
 
228
- #: src/licensing/views/license-form.php:66
229
- msgid "ACTIVE"
230
- msgstr ""
231
-
232
- #: src/licensing/views/license-form.php:66
233
- msgid "you are receiving plugin updates"
234
- msgstr ""
235
-
236
  #: src/licensing/views/license-form.php:70
237
  msgid "INACTIVE"
238
  msgstr ""
@@ -241,6 +233,14 @@ msgstr ""
241
  msgid "you are <strong>not</strong> receiving plugin updates"
242
  msgstr ""
243
 
 
 
 
 
 
 
 
 
244
  #: src/licensing/views/license-form.php:82
245
  msgid "Save Changes"
246
  msgstr ""
225
  msgid "License Status"
226
  msgstr ""
227
 
 
 
 
 
 
 
 
 
228
  #: src/licensing/views/license-form.php:70
229
  msgid "INACTIVE"
230
  msgstr ""
233
  msgid "you are <strong>not</strong> receiving plugin updates"
234
  msgstr ""
235
 
236
+ #: src/licensing/views/license-form.php:66
237
+ msgid "ACTIVE"
238
+ msgstr ""
239
+
240
+ #: src/licensing/views/license-form.php:66
241
+ msgid "you are receiving plugin updates"
242
+ msgstr ""
243
+
244
  #: src/licensing/views/license-form.php:82
245
  msgid "Save Changes"
246
  msgstr ""
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://boxzillaplugin.com/#utm_source=wp-plugin-repo&utm_medium=bo
4
  Tags: scroll triggered box, cta, social, pop-up, newsletter, call to action, mailchimp, contact form 7, social media, mc4wp, ibericode
5
  Requires at least: 4.6
6
  Tested up to: 5.4
7
- Stable tag: 3.2.22
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  Requires PHP: 5.3
@@ -131,6 +131,11 @@ Have a look at the [frequently asked questions](https://wordpress.org/plugins/bo
131
  == Changelog ==
132
 
133
 
 
 
 
 
 
134
  #### 3.2.22 - Mar 19, 2020
135
 
136
  - Minor code improvements
@@ -183,7 +188,7 @@ Have a look at the [frequently asked questions](https://wordpress.org/plugins/bo
183
 
184
  **Improvements**
185
 
186
- Roll-back a change in version 3.2.15 that caused an issue with Boxzilla Theme Pack and Boxzilla WooCommerce.
187
 
188
  Please make sure your [Boxzilla plugin license](https://my.boxzillaplugin.com/) is activated and then update Boxzilla Theme Pack and Boxzilla WooCommerce to the latest version.
189
 
@@ -284,7 +289,7 @@ Please make sure your [Boxzilla plugin license](https://my.boxzillaplugin.com/)
284
 
285
  **Fixes**
286
 
287
- - Boxzilla content replicating parts of the page if other plugins "incorrectly" use `the_content` filter.
288
 
289
 
290
  #### 3.2.3 - May 29, 2018
@@ -373,7 +378,7 @@ Please make sure your [Boxzilla plugin license](https://my.boxzillaplugin.com/)
373
 
374
  **Additions**
375
 
376
- - Added [`[boxzilla_link]` shortcode to generate the correct HTML for a link to show/toggle/hide/dismiss a box](https://kb.boxzillaplugin.com/shortcode-boxzilla-link/).
377
 
378
 
379
  #### 3.1.17 - August 30, 2017
4
  Tags: scroll triggered box, cta, social, pop-up, newsletter, call to action, mailchimp, contact form 7, social media, mc4wp, ibericode
5
  Requires at least: 4.6
6
  Tested up to: 5.4
7
+ Stable tag: 3.2.23
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  Requires PHP: 5.3
131
  == Changelog ==
132
 
133
 
134
+ #### 3.2.23 - Jul 13, 2020
135
+
136
+ - Add `aria-label` to close icon to help screen readers.
137
+
138
+
139
  #### 3.2.22 - Mar 19, 2020
140
 
141
  - Minor code improvements
188
 
189
  **Improvements**
190
 
191
+ Roll-back a change in version 3.2.15 that caused an issue with Boxzilla Theme Pack and Boxzilla WooCommerce.
192
 
193
  Please make sure your [Boxzilla plugin license](https://my.boxzillaplugin.com/) is activated and then update Boxzilla Theme Pack and Boxzilla WooCommerce to the latest version.
194
 
289
 
290
  **Fixes**
291
 
292
+ - Boxzilla content replicating parts of the page if other plugins "incorrectly" use `the_content` filter.
293
 
294
 
295
  #### 3.2.3 - May 29, 2018
378
 
379
  **Additions**
380
 
381
+ - Added [`[boxzilla_link]` shortcode to generate the correct HTML for a link to show/toggle/hide/dismiss a box](https://kb.boxzillaplugin.com/shortcode-boxzilla-link/).
382
 
383
 
384
  #### 3.1.17 - August 30, 2017
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit38e5bd5c00bdfd9a6ae58e314c6ae5ae::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit59fb87a231276c9f5a3d6451d118748a::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit38e5bd5c00bdfd9a6ae58e314c6ae5ae
6
  {
7
  private static $loader;
8
 
@@ -13,24 +13,21 @@ class ComposerAutoloaderInit38e5bd5c00bdfd9a6ae58e314c6ae5ae
13
  }
14
  }
15
 
16
- /**
17
- * @return \Composer\Autoload\ClassLoader
18
- */
19
  public static function getLoader()
20
  {
21
  if (null !== self::$loader) {
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInit38e5bd5c00bdfd9a6ae58e314c6ae5ae', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInit38e5bd5c00bdfd9a6ae58e314c6ae5ae', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
- call_user_func(\Composer\Autoload\ComposerStaticInit38e5bd5c00bdfd9a6ae58e314c6ae5ae::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
@@ -51,19 +48,19 @@ class ComposerAutoloaderInit38e5bd5c00bdfd9a6ae58e314c6ae5ae
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
- $includeFiles = Composer\Autoload\ComposerStaticInit38e5bd5c00bdfd9a6ae58e314c6ae5ae::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
- composerRequire38e5bd5c00bdfd9a6ae58e314c6ae5ae($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
- function composerRequire38e5bd5c00bdfd9a6ae58e314c6ae5ae($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit59fb87a231276c9f5a3d6451d118748a
6
  {
7
  private static $loader;
8
 
13
  }
14
  }
15
 
 
 
 
16
  public static function getLoader()
17
  {
18
  if (null !== self::$loader) {
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit59fb87a231276c9f5a3d6451d118748a', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit59fb87a231276c9f5a3d6451d118748a', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit59fb87a231276c9f5a3d6451d118748a::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
+ $includeFiles = Composer\Autoload\ComposerStaticInit59fb87a231276c9f5a3d6451d118748a::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequire59fb87a231276c9f5a3d6451d118748a($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
+ function composerRequire59fb87a231276c9f5a3d6451d118748a($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit38e5bd5c00bdfd9a6ae58e314c6ae5ae
8
  {
9
  public static $files = array (
10
  '94cc07ee52e9ca5ddcd07a46efdfe8cc' => __DIR__ . '/../..' . '/src/functions.php',
@@ -37,7 +37,7 @@ class ComposerStaticInit38e5bd5c00bdfd9a6ae58e314c6ae5ae
37
  public static function getInitializer(ClassLoader $loader)
38
  {
39
  return \Closure::bind(function () use ($loader) {
40
- $loader->classMap = ComposerStaticInit38e5bd5c00bdfd9a6ae58e314c6ae5ae::$classMap;
41
 
42
  }, null, ClassLoader::class);
43
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit59fb87a231276c9f5a3d6451d118748a
8
  {
9
  public static $files = array (
10
  '94cc07ee52e9ca5ddcd07a46efdfe8cc' => __DIR__ . '/../..' . '/src/functions.php',
37
  public static function getInitializer(ClassLoader $loader)
38
  {
39
  return \Closure::bind(function () use ($loader) {
40
+ $loader->classMap = ComposerStaticInit59fb87a231276c9f5a3d6451d118748a::$classMap;
41
 
42
  }, null, ClassLoader::class);
43
  }