Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@abtasty/modal

Package Overview
Dependencies
Maintainers
24
Versions
201
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@abtasty/modal - npm Package Compare versions

Comparing version 2.7.1-3 to 2.7.1-4

2

dist/main.js

@@ -1,1 +0,1 @@

!function(){"use strict";function t(t,e){return t(e={exports:{}},e.exports),e.exports}var e=t(function(t){var e=function(t){var e,n=Object.prototype,r=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(t,e,n,r){var a=e&&e.prototype instanceof f?e:f,o=Object.create(a.prototype),i=new C(r||[]);return o._invoke=function(t,e,n){var r=u;return function(a,o){if(r===y)throw new Error("Generator is already running");if(r===p){if("throw"===a)throw o;return P()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var s=E(i,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===u)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=y;var c=l(t,e,n);if("normal"===c.type){if(r=n.done?p:d,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=p,n.method="throw",n.arg=c.arg)}}}(t,n,i),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var u="suspendedStart",d="suspendedYield",y="executing",p="completed",m={};function f(){}function h(){}function g(){}var b={};b[o]=function(){return this};var v=Object.getPrototypeOf,w=v&&v(v(T([])));w&&w!==n&&r.call(w,o)&&(b=w);var _=g.prototype=f.prototype=Object.create(b);function x(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function k(t){var e;this._invoke=function(n,a){function o(){return new Promise(function(e,o){!function e(n,a,o,i){var s=l(t[n],t,a);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&r.call(u,"__await")?Promise.resolve(u.__await).then(function(t){e("next",t,o,i)},function(t){e("throw",t,o,i)}):Promise.resolve(u).then(function(t){c.value=t,o(c)},function(t){return e("throw",t,o,i)})}i(s.arg)}(n,a,e,o)})}return e=e?e.then(o,o):o()}}function E(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var a=l(r,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,m;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function T(t){if(t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}return{next:P}}function P(){return{value:e,done:!0}}return h.prototype=_.constructor=g,g.constructor=h,g[s]=h.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(_),t},t.awrap=function(t){return{__await:t}},x(k.prototype),k.prototype[i]=function(){return this},t.AsyncIterator=k,t.async=function(e,n,r,a){var o=new k(c(e,n,r,a));return t.isGeneratorFunction(n)?o:o.next().then(function(t){return t.done?t.value:o.next()})},x(_),_[s]="Generator",_[o]=function(){return this},_.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=T,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(r,a){return s.type="throw",s.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var a=r.arg;S(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}),n=Object.freeze({default:e,__moduleExports:e}),r=n&&e||n;var a=function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}},o=Object.freeze({default:a,__moduleExports:a});var i=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)},s=Object.freeze({default:i,__moduleExports:i});var c=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")},l=Object.freeze({default:c,__moduleExports:c}),u=o&&a||o,d=s&&i||s,y=l&&c||l;var p=function(t){return u(t)||d(t)||y()};var m=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};var f=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function h(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var g=function(t,e,n){return e&&h(t.prototype,e),n&&h(t,n),t},b=t(function(t){function e(t){return(e="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 n(r){return"function"==typeof Symbol&&"symbol"===e(Symbol.iterator)?t.exports=n=function(t){return e(t)}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":e(t)},n(r)}t.exports=n}),v=Object.freeze({default:b,__moduleExports:b});var w=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},_=Object.freeze({default:w,__moduleExports:w}),x=v&&b||v,k=_&&w||_;var E=function(t,e){return!e||"object"!==x(e)&&"function"!=typeof e?k(t):e},O=t(function(t){function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e(n)}t.exports=e}),S=t(function(t){function e(n,r){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(n,r)}t.exports=e}),C=Object.freeze({default:S,__moduleExports:S}),T=C&&S||C;var P=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&T(t,e)};function R(t,e,n,r,a,o,i){try{var s=t[o](i),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,a)}var L=function(t){return function(){var e=this,n=arguments;return new Promise(function(r,a){var o=t.apply(e,n);function i(t){R(o,r,a,i,s,"next",t)}function s(t){R(o,r,a,i,s,"throw",t)}i(void 0)})}};var I=function(t,e){if(null==t)return{};var n,r,a={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(a[n]=t[n]);return a},A=Object.freeze({default:I,__moduleExports:I}),N=A&&I||A;var j=function(t,e){if(null==t)return{};var n,r,a=N(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a},B="Recurrence",D="Récurrence",W="Recurrencia",z="Wiederholung",q={en:"".concat(B," of the display"),fr:"".concat(D," de l'affichage"),es:"".concat(W," de visualización"),de:"".concat(z," der Anzeige")},M={en:"".concat(B," after closure"),fr:"".concat(D," après fermeture"),es:"".concat(W," tras el cierre"),de:"".concat(z," nach Schließung")},V={en:"".concat(B," after validation"),fr:"".concat(D," après validation"),es:"".concat(W," tras la validación"),de:"".concat(z," nach der Validierung")},Y={en:"Trigger",fr:"Déclencheur",es:"Activador",de:"Trigger"},G="abtasty_resetActionTracking",H="remove",F="rebuild";function J(t,e){var n=Object.keys(t);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(t)),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n}function K(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?J(n,!0).forEach(function(e){m(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):J(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var U,Z={category:"conditions",type:"select",options:[{label:{en:"Every time",fr:"Tout le temps",es:"Todo el tiempo",de:"Jedes Mal"},value:"-1"},{label:{en:"Every session",fr:"Chaque session",es:"A cada sesión",de:"Jede Session"},value:"0"},{label:{en:"Everyday",fr:"Chaque jour",es:"Cada día",de:"Jeden Tag"},value:"1"},{label:{en:"Every week",fr:"Chaque semaine",es:"Cada semana",de:"Jede Woche"},value:"7"},{label:{en:"Every month",fr:"Chaque mois",es:"Cada mes",de:"Jeden Monat"},value:"30"},{label:{en:"Once per user (no recurrence)",fr:"Une fois par visiteur (pas de récurrence)",es:"Una vez por usuario (sin recurrencia)",de:"Einmal pro User (keine Wiederholung)"},value:"365"}],value:"-1"},$=(K({},Z,{label:M,propName:"closingRecurrence"}),K({},Z,{label:q,propName:"displayRecurrence"}),K({},Z,{label:V,propName:"validationRecurrence"}),[{label:{en:"Page load",fr:"Au chargement de la page",es:"Al cargar la página",de:"Beim Laden der Seite"},value:"pageLoad"},{label:{en:"Click",fr:"Au clic",es:"Al hacer clic",de:"Klick"},value:"click"},{label:{en:"Exit intent",fr:"Avant fermeture de l'onglet",es:"Antes de cerrar la pestaña",de:"Exit Intent"},value:"exitIntent"},{label:{en:"Delay",fr:"Après un délai",es:"Tras un retraso",de:"Verzögert"},value:"delay"},{label:{en:"Reengage (after inactivity)",fr:"Au réengagement (après inactivité)",es:"En la reactivación (tras un periodo de inactividad)",de:"Nach Inaktivität"},value:"reengage"}]),Q={category:"conditions",type:"selectelement",propName:"".concat("triggerEvent","Click"),label:Y,placeholder:{en:"Select an element in the webpage",fr:"Sélectionner un élément dans la page",es:"Selecciona un elemento en la página web",de:"Wählen Sie ein Element auf der Webseite aus"},conditions:[{field:"triggerEvent",value:"click"}]},X={category:"conditions",type:"number",propName:"".concat("triggerEvent","ExitDelay"),label:{en:"Delay after exit intent",fr:"Délai après intention de sortie",es:"Retraso después de la intención de salida",de:"Verzögerung nach Ausstiegsabsicht"},min:0,max:120,value:0,conditions:[{field:"triggerEvent",value:"exitIntent"}]},tt={category:"conditions",type:"number",propName:"".concat("triggerEvent","ReengageDelay"),label:{en:"Idle timeout before posting",fr:"Délai d'inactivité avant l'affichage",es:"Tiempo de espera inactivo antes de publicar",de:"Zeitüberschreitung vor dem Posten"},min:1,max:120,value:10,conditions:[{field:"triggerEvent",value:"reengage"}]},et={category:"conditions",type:"number",propName:"".concat("triggerEvent","Delay"),label:{en:"Trigger event delay (in seconds)",fr:"Délai avant l'affichage (en secondes)",es:"Retraso antes de publicar",de:"Verzögerung vor dem Posten"},value:10,conditions:[{field:"triggerEvent",value:"delay"}]},nt=([{category:"conditions",type:"select",label:{en:"Triggers on",fr:"Se déclenche",es:"¿ Cuándo se activa? ",de:"Triggert bei"},options:$,propName:"triggerEvent",value:"pageLoad"}].concat(p([Q,X,tt,et])),function(){return Object.prototype.hasOwnProperty.call(window,"ABTastyEditor")}),rt=((U="undefined"!=typeof global?global:window).ABTasty||Object.assign(U,{ABTasty:{widgetutils:{}}}),U.ABTasty.widgetutils||Object.assign(U.ABTasty,{widgetutils:{}}),U).ABTasty.widgetutils;function at(t,e){return rt.hasOwnProperty(t)||Object.assign(rt,m({},t,new e)),rt[t]}var ot=function(){return"".concat(PACKAGE.replace("@abtasty/","")).concat(DATA&&DATA.type?"_".concat(DATA.type):"")},it=function(){return"".concat(PLUGIN_ID.split("-")[0],"_").concat(TEST_ID)},st=function(){if(nt())return!1;var t=DATA;return{displayRecurrence:t.displayRecurrence,closingRecurrence:t.closingRecurrence,validationRecurrence:t.validationRecurrence}},ct=function(){if(nt())return!1;var t,e=DATA,n=e.triggerEvent,r=e.triggerEventClick,a=e.triggerEventExitDelay,o=e.triggerEventDelay,i=e.triggerEventReengageDelay,s=r;switch(n){case"exitIntent":t=a;break;case"delay":t=o;break;case"reengage":t=i;break;default:t=0}return{triggerEvent:n,triggerSelector:s,triggerDelay:t}},lt=function(){function t(){f(this,t),this.uniqueId=it(),this.widgetName=ot(),this.recurrenceParams=st(),this.triggerParams=ct(),this.recurrence=!!this.recurrenceParams&&new yt(this.recurrenceParams),this.trigger=!!this.triggerParams&&new ht(this.triggerParams),this.basicClassName="ab_widget_container_".concat(this.widgetName),this.widgetContainerId="".concat(this.basicClassName,"_").concat(this.uniqueId),this.contentClassName="".concat(this.basicClassName,"_content"),this.overlayClassName="".concat(this.basicClassName,"_overlay"),this.closeButtonClassName="".concat(this.basicClassName,"_close_button"),this.hideClassName="ab_hide_".concat(this.uniqueId),this.domElement=this.getDom()}return g(t,[{key:"insert",value:function(){var t=this;return vt("head",function(e){return e.appendChild(t.styleElement)},function(t){return console.error(t)}),vt("body",function(e){return e.appendChild(t.domElement)},function(t){return console.error(t)}),this}},{key:"remove",value:function(){return this.domElement.remove(),this.styleElement.remove(),this}},{key:"show",value:function(){return this.domElement.classList.remove(this.hideClassName),this.recurrence&&this.recurrence.setDisplayRecurrence(),this}},{key:"hide",value:function(){return this.domElement.classList.add(this.hideClassName),this}},{key:"init",value:function(){var t=L(r.mark(function t(){return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.recurrence||this.recurrence.isOver()){t.next=2;break}return t.abrupt("return",!1);case 2:if(t.t0=nt(),t.t0){t.next=10;break}if(t.t1=this.trigger,!t.t1){t.next=9;break}return t.next=8,this.trigger.isTriggered();case 8:t.t1=t.sent;case 9:t.t0=t.t1;case 10:if(t.t0){t.next=13;break}return t.abrupt("return",!1);case 13:return this.insert(),this.addCloseEvent(),t.abrupt("return",this);case 16:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"addCloseEvent",value:function(){for(var t=this,e=this.domElement.querySelectorAll("\n\t\t\t.".concat(this.overlayClassName,",\n\t\t\t.").concat(this.closeButtonClassName,"\n\t\t")),n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return r.push.apply(r,p(e)),r.forEach(function(e){e.addEventListener("click",function(){t.recurrence&&t.recurrence.setClosingRecurrence(),t.hide()},{passive:!0,once:!0})}),this}},{key:"getDom",value:function(){var t=document.createElement("div");return t.className="".concat(this.basicClassName," ").concat(this.hideClassName),t.id=this.widgetContainerId,t.innerHTML='\n\t\t\t<div class="'.concat(this.overlayClassName,'"></div>\n\t\t\t<div class="').concat(this.contentClassName,'">\n\t\t\t\t<button class="').concat(this.closeButtonClassName,'" ').concat(nt()?"data-abtasty-actionnable":"",">+</button>\n\t\t\t</div>"),t}},{key:"getStyleTag",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=document.createElement("style");return e.type="text/css",nt()&&e.setAttribute("abtasty-script-added","true"),e.textContent="\n\t\t\t.".concat(this.hideClassName," {opacity: 0 !important; pointer-events: none;}\n\t\t\t").concat(t),e}}]),t}();(function(t){function e(){var t;return f(this,e),(t=E(this,O(e).call(this))).stringStyles=t.getStyles(),t.styleElement=t.getStyleTag(t.stringStyles),t}P(e,lt),g(e,[{key:"getStyles",value:function(){return"\n\t\t#".concat(this.widgetContainerId," {\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tz-index: 9999;\n\t\t\topacity: 1;\n\t\t\ttransition: opacity 0.25s ease;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.overlayClassName," {\n\t\t\tposition: absolute;\n\t\t\tz-index: -1;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tbackground-color: black;\n\t\t\topacity: 0.6;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.contentClassName," {\n\t\t\tposition: absolute;\n\t\t\tleft: 50%;\n\t\t\ttop: 50%;\n\t\t\ttransform: translate(-50%, -50%);\n\t\t\twidth: auto;\n\t\t\theight: auto;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.closeButtonClassName," {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tright: 0;\n\t\t\tcolor: black;\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\ttransform: rotate(45deg);\n\t\t\tcursor: pointer;\n\t\t\toutline: none;\n\t\t\tfont-size: 1.8em;\n\t\t}\n\t\t\n\t\t@media screen and (max-width: 550px) and (orientation: portrait) {\n\t\t\t#").concat(this.widgetContainerId," .").concat(this.closeButtonClassName," {\n\t\t\t\tfont-size: 6vmin;\n\t\t\t}\n\t\t}")}}])})(),function(t){function e(t){var n;return f(this,e),(n=E(this,O(e).call(this))).position=t,n.stringStyles=n.getStyles(),n.styleElement=n.getStyleTag(n.stringStyles),n}P(e,lt),g(e,[{key:"getStyles",value:function(){return"\n\t\t#".concat(this.widgetContainerId," {\n\t\t\tposition: fixed;\n\t\t\t").concat(this.position,": 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: auto;\n\t\t\tz-index: 9999;\n\t\t\topacity: 1;\n\t\t\ttransition: opacity 0.25s ease;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.overlayClassName," {\n\t\t\tdisplay: none;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.closeButtonClassName," {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tright: 0;\n\t\t\tcolor: black;\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\ttransform: rotate(45deg);\n\t\t\tcursor: pointer;\n\t\t\toutline: none;\n\t\t\tfont-size: 1.8em;\n\t\t}")}}])}(),function(t){function e(t,n){var r;return f(this,e),(r=E(this,O(e).call(this))).position=t,r.referrerElement=n,r.stringStyles=r.getStyles(),r.styleElement=r.getStyleTag(r.stringStyles),r}P(e,lt),g(e,[{key:"insert",value:function(){var t=this;return vt("head",function(e){return e.appendChild(t.styleElement)},function(t){return console.error(t)}),vt(this.referrerElement,function(e){return e.insertAdjacentElement(t.position,t.domElement)},function(t){return console.error(t)}),this}},{key:"getStyles",value:function(){return"\n\t\t#".concat(this.widgetContainerId," {\n\t\t\twidth: auto;\n\t\t\theight: auto;\n\t\t\tposition: relative;\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.overlayClassName," {\n\t\t\tdisplay: none;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.closeButtonClassName," {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tright: 0;\n\t\t\tcolor: black;\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\ttransform: rotate(45deg);\n\t\t\tcursor: pointer;\n\t\t\toutline: none;\n\t\t\tfont-size: 1.8em;\n\t\t}")}}])}();function ut(t,e){var n=Object.keys(t);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(t)),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n}function dt(t){var e=function(t,e){if("object"!==b(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===b(e)?e:String(e)}var yt=function(){function t(e){var n=e.displayRecurrence,r=e.closingRecurrence,a=e.validationRecurrence;f(this,t),this.displayRecurrence=parseFloat(n),this.closingRecurrence=parseFloat(r),this.validationRecurrence=parseFloat(a),this.widgetName=ot(),this.uniqueId=it(),this.recurrenceKey="".concat(this.widgetName,"_").concat(this.uniqueId)}return g(t,[{key:"getGivenRecurrenceStorageParsed",value:function(t){try{var e=t.getItem("ABTastyWidgets");return JSON.parse(e)}catch(e){return t.removeItem("ABTastyWidgets"),!1}}},{key:"getSessionRecurrenceStorageParsed",value:function(){return this.getGivenRecurrenceStorageParsed(window.sessionStorage)}},{key:"getLocalRecurrenceStorageParsed",value:function(){return this.getGivenRecurrenceStorageParsed(window.localStorage)}},{key:"removeGivenStorage",value:function(t,e){var n=this.recurrenceKey,r=(e[n],j(e,[n].map(dt)));return Object.entries(r).length?(t.setItem("ABTastyWidgets",JSON.stringify(r)),r):(t.removeItem("ABTastyWidgets"),!1)}},{key:"removeSessionRecurrenceStorage",value:function(){var t=this.getSessionRecurrenceStorageParsed();return!!t&&this.removeGivenStorage(window.sessionStorage,t)}},{key:"removeLocalRecurrenceStorage",value:function(){var t=this.getLocalRecurrenceStorageParsed();return!!t&&this.removeGivenStorage(window.localStorage,t)}},{key:"getSessionRecurrence",value:function(){var t=this.getSessionRecurrenceStorageParsed();return!!t&&t[this.recurrenceKey]}},{key:"getLocalRecurrence",value:function(){var t=this.getLocalRecurrenceStorageParsed();return!!t&&t[this.recurrenceKey]}},{key:"getCurrentRecurrence",value:function(){var t=this.getSessionRecurrence(),e=this.getLocalRecurrence();return t||e||{type:!1}}},{key:"isOver",value:function(){var t=this.getLocalRecurrence(),e=(t?parseFloat(t.stamp):0)<(new Date).getTime();return e&&this.removeLocalRecurrenceStorage(),e&&!this.getLocalRecurrence()&&!this.getSessionRecurrence()}},{key:"setRecurrence",value:function(t,e){var n=this,r=this.getTypeOfStorage(t);if(!r&&"object"!==b(r))return!1;var a=this.getTypeOfStorage(t),o=a.storageString,i=a.storageMethod,s=this.getStamp(t),c={type:e,stamp:s},l=this.getCurrentRecurrence().type,u=function(){var t,e=n.getSessionRecurrence(),r=n.getLocalRecurrence();"session"===o?e?t=n.removeSessionRecurrenceStorage():(n.removeLocalRecurrenceStorage(),t=n.getSessionRecurrenceStorageParsed()):"local"===o&&(r?t=n.removeLocalRecurrenceStorage():(n.removeSessionRecurrenceStorage(),t=n.getLocalRecurrenceStorageParsed()));var a=t?function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ut(n,!0).forEach(function(e){m(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ut(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}(m({},n.recurrenceKey,c),t):m({},n.recurrenceKey,c);i.setItem("ABTastyWidgets",JSON.stringify(a))};if(!i)return!1;if(l&&"validation"!==e)if("closing"===e&&"validation"!==l)u();else{if("display"!==e||"validation"===l||"closing"===l)return!1;u()}else u();return s}},{key:"setDisplayRecurrence",value:function(){this.setRecurrence(this.displayRecurrence,"display")}},{key:"setClosingRecurrence",value:function(){this.setRecurrence(this.closingRecurrence,"closing")}},{key:"setValidationRecurrence",value:function(){this.setRecurrence(this.validationRecurrence,"validation")}},{key:"getStamp",value:function(t){return(new Date).getTime()+864e5*t}},{key:"getTypeOfStorage",value:function(t){return!(isNaN(t)||t<0||0!==t&&!t)&&(t>0?{storageString:"local",storageMethod:window.localStorage}:0===t&&{storageString:"session",storageMethod:window.sessionStorage})}}]),t}();function pt(){return"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype||(t="https://polyfill.io/v3/polyfill.min.js?flags=gated&features=IntersectionObserver",new Promise(function(e,n){var r=window.document.getElementsByTagName("script")[0],a=window.document.createElement("script");a.src=t,r.parentNode.insertBefore(a,r),a.onload=e,a.onerror=n}));var t}function mt(t){return function(){return L(r.mark(function t(e){return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e,t.next="IntersectionObserver"===t.t0?3:6;break;case 3:return t.next=5,pt();case 5:return t.abrupt("return",t.sent);case 6:return t.abrupt("return",!0);case 7:case"end":return t.stop()}},t)})).apply(this,arguments)}.apply(this,arguments)}var ft=function(){function t(){f(this,t),this.targets=[],this.existingTargets=[],this.inViewPortTargets=[],this.visibilityobserver=this.startVisibilityObserver(),this.mutationobserver=this.startMutationObserver()}return g(t,[{key:"intersectionHandler",value:function(t){var e=this;t.forEach(function(t){t.isIntersecting?(e.existingTargets=e.existingTargets.filter(function(n){return n.element!==t.target||(e.inViewPortTargets.push(n),!1)}),e.checkElements()):e.inViewPortTargets=e.inViewPortTargets.filter(function(n){return n.element!==t.target||(e.existingTargets.push(n),!1)})})}},{key:"startVisibilityObserver",value:function(){return new IntersectionObserver(this.intersectionHandler.bind(this),{root:null,rootMargin:"0px",threshold:.5})}},{key:"startMutationObserver",value:function(){var t=new MutationObserver(this.checkElements.bind(this));return t.observe(document,{attributes:!0,childList:!0,subtree:!0}),t}},{key:"isElementVisible",value:function(t){return this.isElementTopmost(t)&&this.isElementOpaque(t)}},{key:"isElementOpaque",value:function(t){return"HTML"===function t(e,n){return n(e)||!e.parentElement?e:t(e.parentElement,n)}(t,function(t){return"0"===window.getComputedStyle(t).opacity}).nodeName}},{key:"isElementTopmost",value:function(t){for(var e=t.getBoundingClientRect(),n=[[e.left,e.top],[e.right,e.top],[e.left,e.bottom],[e.right,e.bottom]],r=!1,a=0;!r&&a<n.length;){var o,i=(o=document).elementFromPoint.apply(o,p(n[a]));r=t===i||t.contains(i),a++}return r}},{key:"checkElements",value:function(){var t=this;this.targets=this.targets.filter(function(e){var n=document.querySelector(e.selector);return!n||(t.existingTargets.push(Object.assign(e,{element:n})),t.visibilityobserver.observe(n),!1)}),this.existingTargets=this.existingTargets.filter(function(e){return!!document.querySelector(e.selector)||(t.visibilityobserver.unobserve(e.element),t.targets.push(e),!1)}),this.inViewPortTargets=this.inViewPortTargets.filter(function(e){var n=e.element,r=e.resolve;return!t.isElementVisible(n)||(t.visibilityobserver.unobserve(n),r(n),!1)})}},{key:"watch",value:function(t,e){this.targets.push({selector:t,resolve:e})}}]),t}(),ht=function(){function t(e){var n=e.triggerEvent,r=e.triggerSelector,a=e.triggerDelay;f(this,t),this.event=n,this.selector=r&&r.length?r:"body",this.delay=a}return g(t,[{key:"onElementVisible",value:function(){var t,e=this;return new Promise((t=L(r.mark(function t(n){var a,o,i;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.onPageLoad();case 2:return a=t.sent,t.next=5,mt();case 5:o=t.sent,i=at("VisibilityObserver",ft),o&&a&&i.watch(e.selector,n);case 8:case"end":return t.stop()}},t)})),function(e){return t.apply(this,arguments)}))}},{key:"onPageLoad",value:function(){return new Promise(function(t,e){var n=function(){return"complete"===document.readyState};if(n())return t(!0);var r,a=setTimeout(function(){var t;return(t=document).removeEventListener.apply(t,o),e(!1)},15e3),o=["readystatechange",function(){return n()&&!clearTimeout(a)&&t(!0)},{passive:!0}];(r=document).addEventListener.apply(r,o)})}},{key:"onClick",value:function(){var t=this,e=document.createElement("style");return e.innerHTML="".concat(this.selector," {\n\t\t\tcursor: pointer !important;\n\t\t\tpointer-events: all !important;\n\t\t}"),document.head.appendChild(e),new Promise(function(n){var r,a=function(e){return p(document.querySelectorAll(t.selector)).some(function(n){return n.isSameNode(e)||!!e.closest(t.selector)})},o=["click",function(t){var r,i=t.target;return!!a(i)&&(document.head.removeChild(e),(r=document).removeEventListener.apply(r,o),n(!0))},{passive:!0,capture:!0}];(r=document).addEventListener.apply(r,o)})}},{key:"onExitIntent",value:function(){var t,e=this;return new Promise((t=L(r.mark(function t(n){var a;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return a=["mouseleave",function(){var t=L(r.mark(function t(){var a;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.delay){t.next=5;break}a=1e3*e.delay,setTimeout(function(){return n(!0)},a),t.next=6;break;case 5:return t.abrupt("return",n(!0));case 6:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}(),{passive:!0,once:!0}],t.next=4,e.onPageLoad();case 4:t.sent&&vt("body",function(t){return t.addEventListener.apply(t,a)});case 6:case"end":return t.stop()}},t)})),function(e){return t.apply(this,arguments)}))}},{key:"onDelay",value:function(){var t,e=this;return new Promise((t=L(r.mark(function t(n){var a;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return a=1e3*e.delay,t.next=3,e.onPageLoad();case 3:t.sent&&setTimeout(function(){return n(!0)},a);case 5:case"end":return t.stop()}},t)})),function(e){return t.apply(this,arguments)}))}},{key:"onReengage",value:function(){var t=this;return new Promise(function(e){var n=1e3*t.delay,r=n,a=["click","mousemove","scroll","keypress"],o=[function(){return r=n},{passive:!0}];a.forEach(function(t){var e;return(e=document).addEventListener.apply(e,[t].concat(o))});var i=setInterval(function(){r<=0?(e(!0),clearInterval(i),a.forEach(function(t){var e;return(e=document).removeEventListener.apply(e,[t].concat(o))})):r-=100},100)})}},{key:"isTriggered",value:function(){var t=L(r.mark(function t(){var e;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=this.event,t.next="pageLoad"===t.t0?3:"click"===t.t0?7:"exitIntent"===t.t0?11:"delay"===t.t0?15:"reengage"===t.t0?19:"elementVisible"===t.t0?23:27;break;case 3:return t.next=5,this.onPageLoad();case 5:return e=t.sent,t.abrupt("break",28);case 7:return t.next=9,this.onClick();case 9:return e=t.sent,t.abrupt("break",28);case 11:return t.next=13,this.onExitIntent();case 13:return e=t.sent,t.abrupt("break",28);case 15:return t.next=17,this.onDelay();case 17:return e=t.sent,t.abrupt("break",28);case 19:return t.next=21,this.onReengage();case 21:return e=t.sent,t.abrupt("break",28);case 23:return t.next=25,this.onElementVisible();case 25:return e=t.sent,t.abrupt("break",28);case 27:e=!1;case 28:return t.abrupt("return",e);case 29:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}]),t}();var gt=function(){function t(e,n,r){f(this,t),this.recurrence=e,this.isWidgetApplied=n,this.callback=r,this.observer=new MutationObserver(this.observerHandler.bind(this)),this.observerParams=[document.body,{childList:!0,subtree:!0}],this.eventListenerParams=[G,this.eventHandler.bind(this),{passive:!0}]}return g(t,[{key:"decisionHandler",value:function(){var t=!!window.ABTasty.getTestsOnPage()[TEST_ID];!this.isWidgetApplied()&&t&&this.recurrence.isOver()?(this.callback(F),this.clearWatcher()):!t&&this.isWidgetApplied()&&this.callback(H)}},{key:"eventHandler",value:function(){var t=this;return setTimeout(function(){t.decisionHandler()},250),this}},{key:"observerHandler",value:function(t){var e=t.some(function(t){var e=t.removedNodes;return e&&e.length}),n=t.some(function(t){var e=t.addedNodes;return e&&e.length});return e||n?(this.decisionHandler(),this):this}},{key:"watch",value:function(){var t,e;return(t=document).addEventListener.apply(t,p(this.eventListenerParams)),(e=this.observer).observe.apply(e,p(this.observerParams)),this}},{key:"clearWatcher",value:function(){var t;return(t=document).removeEventListener.apply(t,p(this.eventListenerParams)),this.observer.disconnect(),this}}]),t}(),bt=function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];n.unshift("[AB Tasty Widget] ".concat(PACKAGE,":")),(t=console).log.apply(t,n)},vt=function(t,e,n){var r,a=0;try{document.querySelector(t)}catch(e){var o="Selector «".concat(t,"» not valid.");return bt(o),"function"==typeof n&&n(o)}r=setTimeout(function(){clearInterval(a);var e="Can't find element «".concat(t,"».");return bt(e),"function"==typeof n&&n(e)},1e4),a=setInterval(function(){var n=document.querySelector(t);if(null!==n)return clearTimeout(r),clearInterval(a),"function"==typeof e&&e(n)},200)};!function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=t:a.appendChild(document.createTextNode(t))}}("abtasty-modal{display:none;position:fixed;top:0;left:0;width:100%;height:100%;z-index:2147483145}abtasty-modal:not(.abtasty-modal--video){overflow-y:auto}abtasty-modal__underlay{width:100%;height:100%;position:fixed;top:0;left:0;background-color:rgba(0,0,0,.5);cursor:pointer}.abtasty-modal__area{top:0;left:0;right:0;width:auto;margin:10px!important;z-index:100;position:relative;float:none}.abtasty-modal__area-layout--imageOnly{max-width:80%}.abtasty-modal__area-layout--imageOnly img{border-style:solid;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100%;opacity:1}.abtasty-modal__area-type--video.abtasty-modal__area-layout--no-title .abtasty-modal__content{padding:5px;border-radius:0!important;border-width:0!important;background-color:transparent!important;background-image:none!important}.abtasty-modal__area-type--video.abtasty-modal__area-layout--bottom .abtasty-modal__content{padding:25px 20px 20px}.abtasty-modal .abtasty-modal__content{border-color:#f6f6f6;border-style:solid;padding:20px}.abtasty-modal__area-type--image,.abtasty-modal__area-type--no-title,.abtasty-modal__area-type--simple,.abtasty-modal__area-type--video{margin:0 auto 20px!important;top:10vh;border:none;background:none}.abtasty-modal__area-type--video.abtasty-modal__area-layout--bottom .abtasty-modal__close--inside{top:2px}.abtasty-modal__area-type--video.abtasty-modal__area-layout--top .abtasty-modal__close--inside{right:15px;top:20px}.abtasty-modal__area-type--image .abtasty-modal__close,.abtasty-modal__area-type--simple .abtasty-modal__close{right:10px;top:15px}.abtasty-modal__close{position:absolute;right:5px;top:0;font-size:20px;font-weight:300;background:transparent;border:0;color:#222;font-family:Helvetica Neue,Helvetica,Arial,sans-serif!important;line-height:24px!important;margin-right:5px;cursor:pointer;width:20px;height:20px;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.abtasty-modal__close svg{display:block}.abtasty-modal__close svg .close-x{stroke:#5c5c5c;fill:transparent;stroke-linecap:round;stroke-width:3}.abtasty-modal__area-type--video.abtasty-modal__area-layout--no-title .abtasty-modal__close--inside{top:-6px;right:-15px;background:#fff;border-radius:20px;width:20px;height:20px}.abtasty-modal__area-type--image .abtasty-modal__close--outside,.abtasty-modal__area-type--simple .abtasty-modal__close--outside,.abtasty-modal__close .abtasty-modal__close--outside{top:-25px;right:0;width:20px;height:20px}.abtasty-modal__close--outside{top:-25px;right:-25px;background:#fff;border-radius:20px;width:20px;height:20px}.abtasty-modal__media,.abtasty-modal__media-link{max-width:100%;display:block}.abtasty-modal__text{padding:20px;font-family:Open Sans,sans-serif!important;color:#000;overflow:auto}.abtasty-modal__title{width:auto;font-size:20px!important;font-weight:500;line-height:1.1;margin-bottom:10px}.abtasty-modal__text p{margin:0 0 10px!important;font-size:15px;font-weight:300;word-wrap:break-word}.abtasty-modal__button{width:100%;text-align:center;margin-top:20px}.abtasty-modal__button a{padding:10px 20px;border-radius:10px;display:inline-block;font-weight:700}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--center .abtasty-modal__title{text-align:center}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--center .abtasty-modal__innertext{text-align:center;white-space:pre-wrap}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--left .abtasty-modal__title{width:50%;float:left;text-align:center;vertical-align:middle}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--left .abtasty-modal__innertext{width:50%;float:left}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--right .abtasty-modal__title{width:50%;float:left;text-align:center;vertical-align:middle}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--right .abtasty-modal__innertext{width:50%;float:left}.abtasty-modal__area-type--image .abtasty-modal__image img{max-height:400px;max-width:100%;display:inline;opacity:1}.abtasty-modal__area-type--image.abtasty-modal__area-layout--left .abtasty-modal__image{width:50%;display:inline-block;height:auto;vertical-align:middle;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--left .abtasty-modal__text{text-align:left;width:50%;display:inline-block;vertical-align:middle;-webkit-box-sizing:border-box;box-sizing:border-box}.abtasty-modal__area-type--image.abtasty-modal__area-layout--right .abtasty-modal__image{width:50%;display:inline-block;height:auto;vertical-align:middle;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--right .abtasty-modal__text{text-align:left;width:50%;display:inline-block;vertical-align:middle;-webkit-box-sizing:border-box;box-sizing:border-box}.abtasty-modal__area-type--image.abtasty-modal__area-layout--top .abtasty-modal__image{width:100%;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--top .abtasty-modal__text{width:100%;padding:20px 0}.abtasty-modal__area-type--image.abtasty-modal__area-layout--top .abtasty-modal__image img{max-height:300px;opacity:1}.abtasty-modal__area-type--image.abtasty-modal__area-layout--bottom .abtasty-modal__image{width:100%;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--bottom .abtasty-modal__text{width:100%;padding:20px 0}.abtasty-modal__area-type--video{text-align:center;width:100%}.abtasty-modal__area-type--video iframe{width:100%}@media (min-width:630px){abtasty-modal:not(.abtasty-modal--video) .abtasty-modal__area-width--medium{width:600px;margin:0 auto 20px!important}.abtasty-modal--video{width:50%;left:25%}}@media (min-width:330px){abtasty-modal:not(.abtasty-modal--video) .abtasty-modal__area-width--small{width:300px;margin:0 auto 20px!important}}@media (min-width:930px){abtasty-modal:not(.abtasty-modal--video) .abtasty-modal__area-width--large{width:900px;margin:0 auto 20px!important}}.abtasty-animation-fadeIn{-webkit-animation-name:a;animation-name:a}.abtasty-animation-fadeIn,.abtasty-animation-fadeOut{-webkit-animation-duration:.5s;animation-duration:.5s}.abtasty-animation-fadeOut{-webkit-animation-name:b;animation-name:b}.abtasty-animation-slideIn{-webkit-animation-name:c;animation-name:c;-webkit-animation-duration:.5s;animation-duration:.5s}.abtasty-animation-slideOut{-webkit-animation-name:d;animation-name:d;-webkit-animation-duration:.5s;animation-duration:.5s}@-webkit-keyframes a{0%{opacity:0}to{opacity:1}}@keyframes a{0%{opacity:0}to{opacity:1}}@-webkit-keyframes b{0%{opacity:1}to{opacity:0}}@keyframes b{0%{opacity:1}to{opacity:0}}@-webkit-keyframes c{0%{-webkit-transform:translateY(-100%);transform:translateY(-100%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes c{0%{-webkit-transform:translateY(-100%);transform:translateY(-100%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes d{0%{-webkit-transform:translateY(0);transform:translateY(0)}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes d{0%{-webkit-transform:translateY(0);transform:translateY(0)}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}");var wt=function(t){var e=Object.prototype.hasOwnProperty;function n(t,r){return Array.isArray(t)?function(t,e){for(var r,a="",o="",s=Array.isArray(e),c=0;c<t.length;c++)(r=n(t[c]))&&(s&&e[c]&&(r=i(r)),a=a+o+r,o=" ");return a}(t,r):t&&"object"==typeof t?function(t){var n="",r="";for(var a in t)a&&t[a]&&e.call(t,a)&&(n=n+r+a,r=" ");return n}(t):t||""}function r(t){if(!t)return"";if("object"==typeof t){var n="";for(var r in t)e.call(t,r)&&(n=n+r+":"+t[r]+";");return n}return";"!==(t+="")[t.length-1]?t+";":t}function a(t,e,n,r){return!1!==e&&null!=e&&(e||"class"!==t&&"style"!==t)?!0===e?" "+(r?t:t+'="'+t+'"'):("function"==typeof e.toJSON&&(e=e.toJSON()),"string"==typeof e||(e=JSON.stringify(e),n||-1===e.indexOf('"'))?(n&&(e=i(e))," "+t+'="'+e+'"'):" "+t+"='"+e.replace(/'/g,"&#39;")+"'"):""}t.merge=function t(e,n){if(1===arguments.length){for(var a=e[0],o=1;o<e.length;o++)a=t(a,e[o]);return a}for(var i in n)if("class"===i){var s=e[i]||[];e[i]=(Array.isArray(s)?s:[s]).concat(n[i]||[])}else if("style"===i){var s=r(e[i]),c=r(n[i]);e[i]=s+c}else e[i]=n[i];return e},t.classes=n,t.style=r,t.attr=a,t.attrs=function(t,o){var i="";for(var s in t)if(e.call(t,s)){var c=t[s];if("class"===s){c=n(c),i=a(s,c,!1,o)+i;continue}"style"===s&&(c=r(c)),i+=a(s,c,!1,o)}return i};var o=/["&<>]/;function i(t){var e=""+t,n=o.exec(e);if(!n)return t;var r,a,i,s="";for(r=n.index,a=0;r<e.length;r++){switch(e.charCodeAt(r)){case 34:i="&quot;";break;case 38:i="&amp;";break;case 60:i="&lt;";break;case 62:i="&gt;";break;default:continue}a!==r&&(s+=e.substring(a,r)),a=r+1,s+=i}return a!==r?s+e.substring(a,r):s}return t.escape=i,t.rethrow=function t(e,n,r,a){if(!(e instanceof Error))throw e;if(!("undefined"==typeof window&&n||a))throw e.message+=" on line "+r,e;try{a=a||require("fs").readFileSync(n,"utf8")}catch(n){t(e,null,r)}var o=3,i=a.split("\n"),s=Math.max(r-o,0),c=Math.min(i.length,r+o);var o=i.slice(s,c).map(function(t,e){var n=e+s+1;return(n==r?" > ":" ")+n+"| "+t}).join("\n");e.path=n;e.message=(n||"Pug")+":"+r+"\n"+o+"\n\n"+e.message;throw e},t}({});var _t,xt,kt,Et,Ot,St,Ct,Tt=DATA,Pt=Tt.type,Rt=Tt.animation,Lt=Tt.backgroundColor,It=Tt.overlayOpacity,At=Tt.backgroundImage,Nt=Tt.borderRadius,jt=Tt.borderRadiusImage,Bt=Tt.borderWidth,Dt=Tt.borderColor,Wt=Tt.button,zt=Tt.buttonBackgroundColor,qt=Tt.buttonLink,Mt=Tt.buttonText,Vt=Tt.buttonTextColor,Yt=Tt.backgroundCloseButtonColor,Gt=Tt.closeButtonColor,Ht=Tt.closeButtonPosition,Ft=Tt.content,Jt=Tt.customWidth,Kt=Tt.title,Ut=Tt.layout,Zt=Tt.videoLink,$t=Tt.widthImageWithText,Qt=Tt.widthImageOnly,Xt=Tt.autoPlay,te=Tt.triggerEvent,ee=Tt.triggerEventClick,ne=Tt.triggerEventDelay,re=Tt.triggerEventExitDelay,ae=Tt.triggerEventReengageDelay,oe=Tt.displayRecurrence,ie=Tt.closingRecurrence,se=Tt.validationRecurrence,ce=Pt.replace(/^\w/,function(t){return t.toUpperCase()}),le="imageOnly"===Ut?Qt:$t,ue=DATA.image||"https://widgets-images.abtasty.com/image-placeholder.png",de="abtasty-modal__underlay",ye=".abtasty-modal__close";function pe(t,e,n,r){var a,o=[t,function(t){var a=t.target,i=p(document.querySelectorAll(e)).some(function(t){return t.isSameNode(a)||a.closest(e)});return i&&n(),i&&r&&function(t){var e;return(e=document).removeEventListener.apply(e,p(t))}(o)},!0];(a=document).addEventListener.apply(a,o)}function me(t){pe("click","".concat(de,", ").concat(ye),function(){_t.style.display="none","video"===Pt&&(_t.innerHTML=""),ABTastyEvent("".concat(ce," modal closed"),null,TEST_ID),t.setClosingRecurrence()},!0)}function fe(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e={layout:Ut,type:Pt,borderRadius:Nt,borderRadiusImage:jt,borderWidth:Bt,borderColor:Dt,button:Wt,buttonBackgroundColor:zt,buttonLink:qt,buttonText:Mt,buttonTextColor:Vt,backgroundColor:"imageOnly"!==Ut?Lt:"initial",overlayOpacity:It,backgroundImage:At,image:ue,width:le,videoLink:Zt,customWidth:Jt,animation:Rt,title:Kt,closeButtonPosition:Ht,backgroundCloseButtonColor:Yt,modalContent:Ft||t.outerHTML};(_t.className="abtasty-modal abtasty-modal--".concat(Pt),_t.dataset.testId=TEST_ID,_t.innerHTML=function(t){var e,n="",r={};try{var a={},o=t||{};(function(t,a,o,i,s,c,l,u,d,y,p,m,f,h,g,b,v,w,_,x,k,E){r.button=e=function(){this&&this.block,this&&this.attributes,n=(n=(n+='<div class="abtasty-modal__button">')+"<a"+wt.attr("href",p,!0,!0)+' target="_self"'+wt.attr("style",wt.style({"background-color":y+"!important",color:f+"!important"}),!0,!0)+">")+wt.escape(null==(e=m)?"":e)+"</a></div>"},r.title=e=function(){this&&this.block,this&&this.attributes,n=(n+='<h2 class="abtasty-modal__title" style="text-align:center;">')+(null==(e=x)?"":e)+"</h2>"},r.imageOnly=e=function(){this&&this.block,this&&this.attributes,n=n+"<img"+(wt.attr("src",b,!0,!0)+wt.attr("style",wt.style({"border-radius":c+"px!important","border-width":u+"px!important","border-color":s+"!important"}),!0,!0))+">"},r.imageWithText=e=function(){this&&this.block,this&&this.attributes,n+='<div class="abtasty-modal__image">',b&&(n=n+"<img"+(wt.attr("src",b,!0,!0)+wt.attr("style",wt.style({"border-radius":l+"px!important"}),!0,!0))+">"),n+="</div>"},r.content=e=function(){this&&this.block,this&&this.attributes,n+='<div class="abtasty-modal__innertext">',n=(n+="<p>")+(null==(e=w)?"":e)+"</p></div>"},r.closeButton=e=function(){this&&this.block,this&&this.attributes,n=n+"<div"+wt.attr("class",wt.classes(["abtasty-modal__close",h?"abtasty-modal__close--"+h:""],[!1,!0]),!1,!0)+" data-abtasty-actionnable"+wt.attr("style",wt.style("outside"===h?{"background-color":a}:""),!0,!0)+">",n+='<svg viewbox="0 0 40 40">',n+='<path class="close-x" d="M 10,10 L 30,30 M 30,10 L 10,30"></path></svg></div>'},r.contentWrapper=e=function(){var t=this&&this.block;this&&this.attributes,n=n+'<div class="abtasty-modal__content"'+wt.attr("style",wt.style({"border-radius":c+"px!important","border-width":u+"px!important","border-color":s+"!important","background-color":o+"!important","background-image":'url("'+i+'")!important'}),!0,!0)+">",t&&t&&t(),n+="</div>"},r.modalWrapper=e=function(){var e=this&&this.block;this&&this.attributes,n=(n=n+"<abtasty-modal__underlay"+wt.attr("style",wt.style({"background-color":"rgba(0, 0, 0, "+_/100+")"}),!0,!0)+"></abtasty-modal__underlay>")+"<div"+(wt.attr("class",wt.classes(["abtasty-animation-"+t+" abtasty-modal__area abtasty-modal__area-width--"+E+" abtasty-modal__area-type--"+k+" abtasty-modal__area-layout--"+v],[!0]),!1,!0)+wt.attr("style",wt.style({width:"custom"===E&&g+"%","margin-left":"custom"===E&&(100-g)/2+"% !important"}),!0,!0))+">",e&&e&&e(),n+="</div>"},r.modalWrapper.call({block:function(){r.closeButton(),"image"===k&&"imageOnly"===v?(r.imageOnly(),d&&r.button()):r.contentWrapper.call({block:function(){"simple"===k?(n+='<div class="abtasty-modal__text">',"center"===v||"left"===v?(r.title(),r.content(),n+='<div style="clear:both;"></div>'):(r.content(),r.title(),n+='<div style="clear:both;"></div>'),n+="</div>",d&&r.button()):"image"===k?("top"!==v&&"left"!==v||r.imageWithText(),n+='<div class="abtasty-modal__text">',r.title(),r.content(),d&&r.button(),n+="</div>","right"!==v&&"bottom"!==v||r.imageWithText(),n+='<div style="clear:both;"></div>'):"video"===k&&("top"===v&&r.title(),n+=null==(e=w)?"":e,"bottom"===v&&r.title(),d&&r.button())}})}})}).call(this,"animation"in o?o.animation:"undefined"!=typeof animation?animation:void 0,"backgroundCloseButtonColor"in o?o.backgroundCloseButtonColor:"undefined"!=typeof backgroundCloseButtonColor?backgroundCloseButtonColor:void 0,"backgroundColor"in o?o.backgroundColor:"undefined"!=typeof backgroundColor?backgroundColor:void 0,"backgroundImage"in o?o.backgroundImage:"undefined"!=typeof backgroundImage?backgroundImage:void 0,"borderColor"in o?o.borderColor:"undefined"!=typeof borderColor?borderColor:void 0,"borderRadius"in o?o.borderRadius:"undefined"!=typeof borderRadius?borderRadius:void 0,"borderRadiusImage"in o?o.borderRadiusImage:"undefined"!=typeof borderRadiusImage?borderRadiusImage:void 0,"borderWidth"in o?o.borderWidth:"undefined"!=typeof borderWidth?borderWidth:void 0,"button"in o?o.button:"undefined"!=typeof button?button:void 0,"buttonBackgroundColor"in o?o.buttonBackgroundColor:"undefined"!=typeof buttonBackgroundColor?buttonBackgroundColor:void 0,"buttonLink"in o?o.buttonLink:"undefined"!=typeof buttonLink?buttonLink:void 0,"buttonText"in o?o.buttonText:"undefined"!=typeof buttonText?buttonText:void 0,"buttonTextColor"in o?o.buttonTextColor:"undefined"!=typeof buttonTextColor?buttonTextColor:void 0,"closeButtonPosition"in o?o.closeButtonPosition:"undefined"!=typeof closeButtonPosition?closeButtonPosition:void 0,"customWidth"in o?o.customWidth:"undefined"!=typeof customWidth?customWidth:void 0,"image"in o?o.image:"undefined"!=typeof image?image:void 0,"layout"in o?o.layout:"undefined"!=typeof layout?layout:void 0,"modalContent"in o?o.modalContent:"undefined"!=typeof modalContent?modalContent:void 0,"overlayOpacity"in o?o.overlayOpacity:"undefined"!=typeof overlayOpacity?overlayOpacity:void 0,"title"in o?o.title:"undefined"!=typeof title?title:void 0,"type"in o?o.type:"undefined"!=typeof type?type:void 0,"width"in o?o.width:"undefined"!=typeof width?width:void 0)}catch(t){wt.rethrow(t,void 0,void 0,a[void 0])}return n}(e),document.body.appendChild(_t),xt=_t.querySelector(".abtasty-modal__area"),Gt)&&(_t.querySelector("".concat(ye," .close-x")).style.stroke=Gt);return new Promise(function(t){t(!0)})}function he(t){var e,n=t.indexOf("youtu")>-1,r=t.indexOf("vimeo")>-1;if(n){var a=t.match(/^.*(youtu.be\/|v\/|e\/|u\/\w+\/|embed\/|v=)([^#&?]*).*/)[2];e="//www.youtube.com/embed/".concat(a,"?rel=0"),Xt&&(e+="&autoplay=1")}else if(r){var o=t.match(/.*(www\.)?vimeo.com\/(\d+)($|\/)/)[2];e="//player.vimeo.com/video/".concat(o)}return e}function ge(){var t=(window.innerWidth>630?.5*window.innerWidth:window.innerWidth-40)/16*9;return Math.round(t)}function be(){var t,e,n,a,o,i;return r.async(function(s){for(;;)switch(s.prev=s.next){case 0:return t=Date.now(),e="abtasty-widget-video-".concat(t),(n=document.createElement("iframe")).setAttribute("id",e),a=he(Zt),o=ge(),n.style.height="".concat(o,"px"),"no-title"===Ut&&(n.style.border="".concat(Bt,"px solid ").concat(Dt,"!important"),n.style.borderRadius="".concat(Nt,"px!important")),n.src=a,n.frameBorder=0,n.allowfullscreen=!0,s.next=13,r.awrap(fe(n));case 13:return i=s.sent,xt.style.height="".concat(o,"px"),window.addEventListener("resize",function(){var t=document.querySelector("abtasty-modal iframe"),e=ge();t.style.height="".concat(e,"px"),xt.style.height="".concat(e,"px")}),s.abrupt("return",i&&new Promise(function(t){t(!0)}));case 17:case"end":return s.stop()}})}function ve(t){_t.style.display="block",me(t),function(t){Wt&&qt.length&&pe("mouseup",".abtasty-modal__button",function(){t.setValidationRecurrence()},!0)}(t),nt()||function(t){new gt(t,function(){return _t.closest("body")},function(e){switch(e){case H:_t.style.display="none",_t.remove();break;case F:we(t)}}).watch()}(t)}function we(t){var e;return r.async(function(n){for(;;)switch(n.prev=n.next){case 0:if(_t=document.createElement("abtasty-modal"),"video"!==Pt){n.next=8;break}return n.next=4,r.awrap(be());case 4:n.sent&&ve(t),n.next=19;break;case 8:if("image"!==Pt||"fit"!==le){n.next=15;break}(e=new Image).src=ue,e.className="abtasty-modal__media",e.onload=function(){return r.async(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.awrap(fe(this));case 2:e.sent&&ve(t),xt.style.width="".concat(this.width,"px"),xt.style.height="".concat(this.height,"px");case 6:case"end":return e.stop()}},null,this)},n.next=19;break;case 15:return n.next=17,r.awrap(fe());case 17:n.sent&&ve(t);case 19:case"end":return n.stop()}})}nt()?we():r.async(function(t){for(;;)switch(t.prev=t.next){case 0:if((kt=new yt({displayRecurrence:oe,closingRecurrence:ie,validationRecurrence:se})).isOver()){t.next=4;break}return t.abrupt("return",!1);case 4:Et=ee,t.t0=te,t.next="exitIntent"===t.t0?8:"delay"===t.t0?10:"reengage"===t.t0?12:14;break;case 8:return Ot=re,t.abrupt("break",16);case 10:return Ot=ne,t.abrupt("break",16);case 12:return Ot=ae,t.abrupt("break",16);case 14:return Ot=0,t.abrupt("break",16);case 16:return St=new ht({triggerEvent:te,triggerSelector:Et,triggerDelay:Ot}),t.next=20,r.awrap(St.isTriggered());case 20:return(Ct=t.sent)&&we(kt),t.abrupt("return",Ct);case 23:case"end":return t.stop()}})}();
!function(){"use strict";function t(t,e){return t(e={exports:{}},e.exports),e.exports}var e=t(function(t){var e=function(t){var e,n=Object.prototype,r=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(t,e,n,r){var a=e&&e.prototype instanceof f?e:f,o=Object.create(a.prototype),i=new C(r||[]);return o._invoke=function(t,e,n){var r=u;return function(a,o){if(r===y)throw new Error("Generator is already running");if(r===m){if("throw"===a)throw o;return P()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var s=E(i,n);if(s){if(s===p)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===u)throw r=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=y;var c=l(t,e,n);if("normal"===c.type){if(r=n.done?m:d,c.arg===p)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=m,n.method="throw",n.arg=c.arg)}}}(t,n,i),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var u="suspendedStart",d="suspendedYield",y="executing",m="completed",p={};function f(){}function h(){}function g(){}var b={};b[o]=function(){return this};var v=Object.getPrototypeOf,w=v&&v(v(T([])));w&&w!==n&&r.call(w,o)&&(b=w);var _=g.prototype=f.prototype=Object.create(b);function x(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function k(t){var e;this._invoke=function(n,a){function o(){return new Promise(function(e,o){!function e(n,a,o,i){var s=l(t[n],t,a);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&r.call(u,"__await")?Promise.resolve(u.__await).then(function(t){e("next",t,o,i)},function(t){e("throw",t,o,i)}):Promise.resolve(u).then(function(t){c.value=t,o(c)},function(t){return e("throw",t,o,i)})}i(s.arg)}(n,a,e,o)})}return e=e?e.then(o,o):o()}}function E(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method))return p;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var a=l(r,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,p;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,p):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,p)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function T(t){if(t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}return{next:P}}function P(){return{value:e,done:!0}}return h.prototype=_.constructor=g,g.constructor=h,g[s]=h.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(_),t},t.awrap=function(t){return{__await:t}},x(k.prototype),k.prototype[i]=function(){return this},t.AsyncIterator=k,t.async=function(e,n,r,a){var o=new k(c(e,n,r,a));return t.isGeneratorFunction(n)?o:o.next().then(function(t){return t.done?t.value:o.next()})},x(_),_[s]="Generator",_[o]=function(){return this},_.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=T,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(r,a){return s.type="throw",s.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var a=r.arg;S(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),p}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}),n=Object.freeze({default:e,__moduleExports:e}),r=n&&e||n;var a=function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}},o=Object.freeze({default:a,__moduleExports:a});var i=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)},s=Object.freeze({default:i,__moduleExports:i});var c=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")},l=Object.freeze({default:c,__moduleExports:c}),u=o&&a||o,d=s&&i||s,y=l&&c||l;var m=function(t){return u(t)||d(t)||y()};var p=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};var f=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function h(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var g=function(t,e,n){return e&&h(t.prototype,e),n&&h(t,n),t},b=t(function(t){function e(t){return(e="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 n(r){return"function"==typeof Symbol&&"symbol"===e(Symbol.iterator)?t.exports=n=function(t){return e(t)}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":e(t)},n(r)}t.exports=n}),v=Object.freeze({default:b,__moduleExports:b});var w=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},_=Object.freeze({default:w,__moduleExports:w}),x=v&&b||v,k=_&&w||_;var E=function(t,e){return!e||"object"!==x(e)&&"function"!=typeof e?k(t):e},O=t(function(t){function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e(n)}t.exports=e}),S=t(function(t){function e(n,r){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(n,r)}t.exports=e}),C=Object.freeze({default:S,__moduleExports:S}),T=C&&S||C;var P=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&T(t,e)};function R(t,e,n,r,a,o,i){try{var s=t[o](i),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,a)}var L=function(t){return function(){var e=this,n=arguments;return new Promise(function(r,a){var o=t.apply(e,n);function i(t){R(o,r,a,i,s,"next",t)}function s(t){R(o,r,a,i,s,"throw",t)}i(void 0)})}};var I=function(t,e){if(null==t)return{};var n,r,a={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(a[n]=t[n]);return a},A=Object.freeze({default:I,__moduleExports:I}),N=A&&I||A;var j=function(t,e){if(null==t)return{};var n,r,a=N(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a},B="Recurrence",D="Récurrence",W="Recurrencia",z="Wiederholung",q={en:"".concat(B," of the display"),fr:"".concat(D," de l'affichage"),es:"".concat(W," de visualización"),de:"".concat(z," der Anzeige")},M={en:"".concat(B," after closure"),fr:"".concat(D," après fermeture"),es:"".concat(W," tras el cierre"),de:"".concat(z," nach Schließung")},V={en:"".concat(B," after validation"),fr:"".concat(D," après validation"),es:"".concat(W," tras la validación"),de:"".concat(z," nach der Validierung")},Y={en:"Trigger",fr:"Déclencheur",es:"Activador",de:"Trigger"},G="abtasty_resetActionTracking",H="remove",F="rebuild";function J(t,e){var n=Object.keys(t);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(t)),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n}function K(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?J(n,!0).forEach(function(e){p(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):J(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var U,Z={category:"conditions",type:"select",options:[{label:{en:"Every time",fr:"Tout le temps",es:"Todo el tiempo",de:"Jedes Mal"},value:"-1"},{label:{en:"Every session",fr:"Chaque session",es:"A cada sesión",de:"Jede Session"},value:"0"},{label:{en:"Everyday",fr:"Chaque jour",es:"Cada día",de:"Jeden Tag"},value:"1"},{label:{en:"Every week",fr:"Chaque semaine",es:"Cada semana",de:"Jede Woche"},value:"7"},{label:{en:"Every month",fr:"Chaque mois",es:"Cada mes",de:"Jeden Monat"},value:"30"},{label:{en:"Once per user (no recurrence)",fr:"Une fois par visiteur (pas de récurrence)",es:"Una vez por usuario (sin recurrencia)",de:"Einmal pro User (keine Wiederholung)"},value:"365"}],value:"-1"},$=(K({},Z,{label:M,propName:"closingRecurrence"}),K({},Z,{label:q,propName:"displayRecurrence"}),K({},Z,{label:V,propName:"validationRecurrence"}),[{label:{en:"Page load",fr:"Au chargement de la page",es:"Al cargar la página",de:"Beim Laden der Seite"},value:"pageLoad"},{label:{en:"Click",fr:"Au clic",es:"Al hacer clic",de:"Klick"},value:"click"},{label:{en:"Exit intent",fr:"Avant fermeture de l'onglet",es:"Antes de cerrar la pestaña",de:"Exit Intent"},value:"exitIntent"},{label:{en:"Delay",fr:"Après un délai",es:"Tras un retraso",de:"Verzögert"},value:"delay"},{label:{en:"Reengage (after inactivity)",fr:"Au réengagement (après inactivité)",es:"En la reactivación (tras un periodo de inactividad)",de:"Nach Inaktivität"},value:"reengage"}]),Q={category:"conditions",type:"selectelement",propName:"".concat("triggerEvent","Click"),label:Y,placeholder:{en:"Select an element in the webpage",fr:"Sélectionner un élément dans la page",es:"Selecciona un elemento en la página web",de:"Wählen Sie ein Element auf der Webseite aus"},conditions:[{field:"triggerEvent",value:"click"}]},X={category:"conditions",type:"number",propName:"".concat("triggerEvent","ExitDelay"),label:{en:"Delay after exit intent",fr:"Délai après intention de sortie",es:"Retraso después de la intención de salida",de:"Verzögerung nach Ausstiegsabsicht"},min:0,max:120,value:0,conditions:[{field:"triggerEvent",value:"exitIntent"}]},tt={category:"conditions",type:"number",propName:"".concat("triggerEvent","ReengageDelay"),label:{en:"Idle timeout before posting",fr:"Délai d'inactivité avant l'affichage",es:"Tiempo de espera inactivo antes de publicar",de:"Zeitüberschreitung vor dem Posten"},min:1,max:120,value:10,conditions:[{field:"triggerEvent",value:"reengage"}]},et={category:"conditions",type:"number",propName:"".concat("triggerEvent","Delay"),label:{en:"Trigger event delay (in seconds)",fr:"Délai avant l'affichage (en secondes)",es:"Retraso antes de publicar",de:"Verzögerung vor dem Posten"},value:10,conditions:[{field:"triggerEvent",value:"delay"}]},nt=([{category:"conditions",type:"select",label:{en:"Triggers on",fr:"Se déclenche",es:"¿ Cuándo se activa? ",de:"Triggert bei"},options:$,propName:"triggerEvent",value:"pageLoad"}].concat(m([Q,X,tt,et])),function(){return Object.prototype.hasOwnProperty.call(window,"ABTastyEditor")}),rt=((U="undefined"!=typeof global?global:window).ABTasty||Object.assign(U,{ABTasty:{widgetutils:{}}}),U.ABTasty.widgetutils||Object.assign(U.ABTasty,{widgetutils:{}}),U).ABTasty.widgetutils;function at(t,e){return rt.hasOwnProperty(t)||Object.assign(rt,p({},t,new e)),rt[t]}var ot=function(){return"".concat(PACKAGE.replace("@abtasty/","")).concat(DATA&&DATA.type?"_".concat(DATA.type):"")},it=function(){return"".concat(PLUGIN_ID.split("-")[0],"_").concat(TEST_ID)},st=function(){if(nt())return!1;var t=DATA;return{displayRecurrence:t.displayRecurrence,closingRecurrence:t.closingRecurrence,validationRecurrence:t.validationRecurrence}},ct=function(){if(nt())return!1;var t,e=DATA,n=e.triggerEvent,r=e.triggerEventClick,a=e.triggerEventExitDelay,o=e.triggerEventDelay,i=e.triggerEventReengageDelay,s=r;switch(n){case"exitIntent":t=a;break;case"delay":t=o;break;case"reengage":t=i;break;default:t=0}return{triggerEvent:n,triggerSelector:s,triggerDelay:t}},lt=function(){function t(){f(this,t),this.uniqueId=it(),this.widgetName=ot(),this.recurrenceParams=st(),this.triggerParams=ct(),this.recurrence=!!this.recurrenceParams&&new yt(this.recurrenceParams),this.trigger=!!this.triggerParams&&new ht(this.triggerParams),this.basicClassName="ab_widget_container_".concat(this.widgetName),this.widgetContainerId="".concat(this.basicClassName,"_").concat(this.uniqueId),this.contentClassName="".concat(this.basicClassName,"_content"),this.overlayClassName="".concat(this.basicClassName,"_overlay"),this.closeButtonClassName="".concat(this.basicClassName,"_close_button"),this.hideClassName="ab_hide_".concat(this.uniqueId),this.domElement=this.getDom()}return g(t,[{key:"insert",value:function(){var t=this;return vt("head",function(e){return e.appendChild(t.styleElement)},function(t){return console.error(t)}),vt("body",function(e){return e.appendChild(t.domElement)},function(t){return console.error(t)}),this}},{key:"remove",value:function(){return this.domElement.remove(),this.styleElement.remove(),this}},{key:"show",value:function(){return this.domElement.classList.remove(this.hideClassName),this.recurrence&&this.recurrence.setDisplayRecurrence(),this}},{key:"hide",value:function(){return this.domElement.classList.add(this.hideClassName),this}},{key:"init",value:function(){var t=L(r.mark(function t(){return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.recurrence||this.recurrence.isOver()){t.next=2;break}return t.abrupt("return",!1);case 2:if(t.t0=nt(),t.t0){t.next=10;break}if(t.t1=this.trigger,!t.t1){t.next=9;break}return t.next=8,this.trigger.isTriggered();case 8:t.t1=t.sent;case 9:t.t0=t.t1;case 10:if(t.t0){t.next=13;break}return t.abrupt("return",!1);case 13:return this.insert(),this.addCloseEvent(),t.abrupt("return",this);case 16:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"addCloseEvent",value:function(){for(var t=this,e=this.domElement.querySelectorAll("\n\t\t\t.".concat(this.overlayClassName,",\n\t\t\t.").concat(this.closeButtonClassName,"\n\t\t")),n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return r.push.apply(r,m(e)),r.forEach(function(e){e.addEventListener("click",function(){t.recurrence&&t.recurrence.setClosingRecurrence(),t.hide()},{passive:!0,once:!0})}),this}},{key:"getDom",value:function(){var t=document.createElement("div");return t.className="".concat(this.basicClassName," ").concat(this.hideClassName),t.id=this.widgetContainerId,t.innerHTML='\n\t\t\t<div class="'.concat(this.overlayClassName,'"></div>\n\t\t\t<div class="').concat(this.contentClassName,'">\n\t\t\t\t<button class="').concat(this.closeButtonClassName,'" ').concat(nt()?"data-abtasty-actionnable":"",">+</button>\n\t\t\t</div>"),t}},{key:"getStyleTag",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=document.createElement("style");return e.type="text/css",nt()&&e.setAttribute("abtasty-script-added","true"),e.textContent="\n\t\t\t.".concat(this.hideClassName," {opacity: 0 !important; pointer-events: none;}\n\t\t\t").concat(t),e}}]),t}();(function(t){function e(){var t;return f(this,e),(t=E(this,O(e).call(this))).stringStyles=t.getStyles(),t.styleElement=t.getStyleTag(t.stringStyles),t}P(e,lt),g(e,[{key:"getStyles",value:function(){return"\n\t\t#".concat(this.widgetContainerId," {\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tz-index: 9999;\n\t\t\topacity: 1;\n\t\t\ttransition: opacity 0.25s ease;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.overlayClassName," {\n\t\t\tposition: absolute;\n\t\t\tz-index: -1;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tbackground-color: black;\n\t\t\topacity: 0.6;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.contentClassName," {\n\t\t\tposition: absolute;\n\t\t\tleft: 50%;\n\t\t\ttop: 50%;\n\t\t\ttransform: translate(-50%, -50%);\n\t\t\twidth: auto;\n\t\t\theight: auto;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.closeButtonClassName," {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tright: 0;\n\t\t\tcolor: black;\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\ttransform: rotate(45deg);\n\t\t\tcursor: pointer;\n\t\t\toutline: none;\n\t\t\tfont-size: 1.8em;\n\t\t}\n\t\t\n\t\t@media screen and (max-width: 550px) and (orientation: portrait) {\n\t\t\t#").concat(this.widgetContainerId," .").concat(this.closeButtonClassName," {\n\t\t\t\tfont-size: 6vmin;\n\t\t\t}\n\t\t}")}}])})(),function(t){function e(t){var n;return f(this,e),(n=E(this,O(e).call(this))).position=t,n.stringStyles=n.getStyles(),n.styleElement=n.getStyleTag(n.stringStyles),n}P(e,lt),g(e,[{key:"getStyles",value:function(){return"\n\t\t#".concat(this.widgetContainerId," {\n\t\t\tposition: fixed;\n\t\t\t").concat(this.position,": 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: auto;\n\t\t\tz-index: 9999;\n\t\t\topacity: 1;\n\t\t\ttransition: opacity 0.25s ease;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.overlayClassName," {\n\t\t\tdisplay: none;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.closeButtonClassName," {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tright: 0;\n\t\t\tcolor: black;\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\ttransform: rotate(45deg);\n\t\t\tcursor: pointer;\n\t\t\toutline: none;\n\t\t\tfont-size: 1.8em;\n\t\t}")}}])}(),function(t){function e(t,n){var r;return f(this,e),(r=E(this,O(e).call(this))).position=t,r.referrerElement=n,r.stringStyles=r.getStyles(),r.styleElement=r.getStyleTag(r.stringStyles),r}P(e,lt),g(e,[{key:"insert",value:function(){var t=this;return vt("head",function(e){return e.appendChild(t.styleElement)},function(t){return console.error(t)}),vt(this.referrerElement,function(e){return e.insertAdjacentElement(t.position,t.domElement)},function(t){return console.error(t)}),this}},{key:"getStyles",value:function(){return"\n\t\t#".concat(this.widgetContainerId," {\n\t\t\twidth: auto;\n\t\t\theight: auto;\n\t\t\tposition: relative;\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.overlayClassName," {\n\t\t\tdisplay: none;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.closeButtonClassName," {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tright: 0;\n\t\t\tcolor: black;\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\ttransform: rotate(45deg);\n\t\t\tcursor: pointer;\n\t\t\toutline: none;\n\t\t\tfont-size: 1.8em;\n\t\t}")}}])}();function ut(t,e){var n=Object.keys(t);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(t)),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n}function dt(t){var e=function(t,e){if("object"!==b(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===b(e)?e:String(e)}var yt=function(){function t(e){var n=e.displayRecurrence,r=e.closingRecurrence,a=e.validationRecurrence;f(this,t),this.displayRecurrence=parseFloat(n),this.closingRecurrence=parseFloat(r),this.validationRecurrence=parseFloat(a),this.widgetName=ot(),this.uniqueId=it(),this.recurrenceKey="".concat(this.widgetName,"_").concat(this.uniqueId)}return g(t,[{key:"getGivenRecurrenceStorageParsed",value:function(t){try{var e=t.getItem("ABTastyWidgets");return JSON.parse(e)}catch(e){return t.removeItem("ABTastyWidgets"),!1}}},{key:"getSessionRecurrenceStorageParsed",value:function(){return this.getGivenRecurrenceStorageParsed(window.sessionStorage)}},{key:"getLocalRecurrenceStorageParsed",value:function(){return this.getGivenRecurrenceStorageParsed(window.localStorage)}},{key:"removeGivenStorage",value:function(t,e){var n=this.recurrenceKey,r=(e[n],j(e,[n].map(dt)));return Object.entries(r).length?(t.setItem("ABTastyWidgets",JSON.stringify(r)),r):(t.removeItem("ABTastyWidgets"),!1)}},{key:"removeSessionRecurrenceStorage",value:function(){var t=this.getSessionRecurrenceStorageParsed();return!!t&&this.removeGivenStorage(window.sessionStorage,t)}},{key:"removeLocalRecurrenceStorage",value:function(){var t=this.getLocalRecurrenceStorageParsed();return!!t&&this.removeGivenStorage(window.localStorage,t)}},{key:"getSessionRecurrence",value:function(){var t=this.getSessionRecurrenceStorageParsed();return!!t&&t[this.recurrenceKey]}},{key:"getLocalRecurrence",value:function(){var t=this.getLocalRecurrenceStorageParsed();return!!t&&t[this.recurrenceKey]}},{key:"getCurrentRecurrence",value:function(){var t=this.getSessionRecurrence(),e=this.getLocalRecurrence();return t||e||{type:!1}}},{key:"isOver",value:function(){var t=this.getLocalRecurrence(),e=(t?parseFloat(t.stamp):0)<(new Date).getTime();return e&&this.removeLocalRecurrenceStorage(),e&&!this.getLocalRecurrence()&&!this.getSessionRecurrence()}},{key:"setRecurrence",value:function(t,e){var n=this,r=this.getTypeOfStorage(t);if(!r&&"object"!==b(r))return!1;var a=this.getTypeOfStorage(t),o=a.storageString,i=a.storageMethod,s=this.getStamp(t),c={type:e,stamp:s},l=this.getCurrentRecurrence().type,u=function(){var t,e=n.getSessionRecurrence(),r=n.getLocalRecurrence();"session"===o?e?t=n.removeSessionRecurrenceStorage():(n.removeLocalRecurrenceStorage(),t=n.getSessionRecurrenceStorageParsed()):"local"===o&&(r?t=n.removeLocalRecurrenceStorage():(n.removeSessionRecurrenceStorage(),t=n.getLocalRecurrenceStorageParsed()));var a=t?function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ut(n,!0).forEach(function(e){p(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ut(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}(p({},n.recurrenceKey,c),t):p({},n.recurrenceKey,c);i.setItem("ABTastyWidgets",JSON.stringify(a))};if(!i)return!1;if(l&&"validation"!==e)if("closing"===e&&"validation"!==l)u();else{if("display"!==e||"validation"===l||"closing"===l)return!1;u()}else u();return s}},{key:"setDisplayRecurrence",value:function(){this.setRecurrence(this.displayRecurrence,"display")}},{key:"setClosingRecurrence",value:function(){this.setRecurrence(this.closingRecurrence,"closing")}},{key:"setValidationRecurrence",value:function(){this.setRecurrence(this.validationRecurrence,"validation")}},{key:"getStamp",value:function(t){return(new Date).getTime()+864e5*t}},{key:"getTypeOfStorage",value:function(t){return!(isNaN(t)||t<0||0!==t&&!t)&&(t>0?{storageString:"local",storageMethod:window.localStorage}:0===t&&{storageString:"session",storageMethod:window.sessionStorage})}}]),t}();function mt(){return"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype||(t="https://polyfill.io/v3/polyfill.min.js?flags=gated&features=IntersectionObserver",new Promise(function(e,n){var r=window.document.getElementsByTagName("script")[0],a=window.document.createElement("script");a.src=t,r.parentNode.insertBefore(a,r),a.onload=e,a.onerror=n}));var t}function pt(t){return function(){return L(r.mark(function t(e){return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e,t.next="IntersectionObserver"===t.t0?3:6;break;case 3:return t.next=5,mt();case 5:return t.abrupt("return",t.sent);case 6:return t.abrupt("return",!0);case 7:case"end":return t.stop()}},t)})).apply(this,arguments)}.apply(this,arguments)}var ft=function(){function t(){f(this,t),this.targets=[],this.existingTargets=[],this.inViewPortTargets=[],this.visibilityobserver=this.startVisibilityObserver(),this.mutationobserver=this.startMutationObserver()}return g(t,[{key:"intersectionHandler",value:function(t){var e=this;t.forEach(function(t){t.isIntersecting?(e.existingTargets=e.existingTargets.filter(function(n){return n.element!==t.target||(e.inViewPortTargets.push(n),!1)}),e.checkElements()):e.inViewPortTargets=e.inViewPortTargets.filter(function(n){return n.element!==t.target||(e.existingTargets.push(n),!1)})})}},{key:"startVisibilityObserver",value:function(){return new IntersectionObserver(this.intersectionHandler.bind(this),{root:null,rootMargin:"0px",threshold:.5})}},{key:"startMutationObserver",value:function(){var t=new MutationObserver(this.checkElements.bind(this));return t.observe(document,{attributes:!0,childList:!0,subtree:!0}),t}},{key:"isElementVisible",value:function(t){return this.isElementTopmost(t)&&this.isElementOpaque(t)}},{key:"isElementOpaque",value:function(t){return"HTML"===function t(e,n){return n(e)||!e.parentElement?e:t(e.parentElement,n)}(t,function(t){return"0"===window.getComputedStyle(t).opacity}).nodeName}},{key:"isElementTopmost",value:function(t){for(var e=t.getBoundingClientRect(),n=[[e.left,e.top],[e.right,e.top],[e.left,e.bottom],[e.right,e.bottom]],r=!1,a=0;!r&&a<n.length;){var o,i=(o=document).elementFromPoint.apply(o,m(n[a]));r=t===i||t.contains(i),a++}return r}},{key:"checkElements",value:function(){var t=this;this.targets=this.targets.filter(function(e){var n=document.querySelector(e.selector);return!n||(t.existingTargets.push(Object.assign(e,{element:n})),t.visibilityobserver.observe(n),!1)}),this.existingTargets=this.existingTargets.filter(function(e){return!!document.querySelector(e.selector)||(t.visibilityobserver.unobserve(e.element),t.targets.push(e),!1)}),this.inViewPortTargets=this.inViewPortTargets.filter(function(e){var n=e.element,r=e.resolve;return!t.isElementVisible(n)||(t.visibilityobserver.unobserve(n),r(n),!1)})}},{key:"watch",value:function(t,e){this.targets.push({selector:t,resolve:e})}}]),t}(),ht=function(){function t(e){var n=e.triggerEvent,r=e.triggerSelector,a=e.triggerDelay;f(this,t),this.event=n,this.selector=r&&r.length?r:"body",this.delay=a}return g(t,[{key:"onElementVisible",value:function(){var t,e=this;return new Promise((t=L(r.mark(function t(n){var a,o,i;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.onPageLoad();case 2:return a=t.sent,t.next=5,pt();case 5:o=t.sent,i=at("VisibilityObserver",ft),o&&a&&i.watch(e.selector,n);case 8:case"end":return t.stop()}},t)})),function(e){return t.apply(this,arguments)}))}},{key:"onPageLoad",value:function(){return new Promise(function(t,e){var n=function(){return"complete"===document.readyState};if(n())return t(!0);var r,a=setTimeout(function(){var t;return(t=document).removeEventListener.apply(t,o),e(!1)},15e3),o=["readystatechange",function(){return n()&&!clearTimeout(a)&&t(!0)},{passive:!0}];(r=document).addEventListener.apply(r,o)})}},{key:"onClick",value:function(){var t=this,e=document.createElement("style");return e.innerHTML="".concat(this.selector," {\n\t\t\tcursor: pointer !important;\n\t\t\tpointer-events: all !important;\n\t\t}"),document.head.appendChild(e),new Promise(function(n){var r,a=function(e){return m(document.querySelectorAll(t.selector)).some(function(n){return n.isSameNode(e)||!!e.closest(t.selector)})},o=["click",function(t){var r,i=t.target;return!!a(i)&&(document.head.removeChild(e),(r=document).removeEventListener.apply(r,o),n(!0))},{passive:!0,capture:!0}];(r=document).addEventListener.apply(r,o)})}},{key:"onExitIntent",value:function(){var t,e=this;return new Promise((t=L(r.mark(function t(n){var a;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return a=["mouseleave",function(){var t=L(r.mark(function t(){var a;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.delay){t.next=5;break}a=1e3*e.delay,setTimeout(function(){return n(!0)},a),t.next=6;break;case 5:return t.abrupt("return",n(!0));case 6:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}(),{passive:!0,once:!0}],t.next=4,e.onPageLoad();case 4:t.sent&&vt("body",function(t){return t.addEventListener.apply(t,a)});case 6:case"end":return t.stop()}},t)})),function(e){return t.apply(this,arguments)}))}},{key:"onDelay",value:function(){var t,e=this;return new Promise((t=L(r.mark(function t(n){var a;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return a=1e3*e.delay,t.next=3,e.onPageLoad();case 3:t.sent&&setTimeout(function(){return n(!0)},a);case 5:case"end":return t.stop()}},t)})),function(e){return t.apply(this,arguments)}))}},{key:"onReengage",value:function(){var t=this;return new Promise(function(e){var n=1e3*t.delay,r=n,a=["click","mousemove","scroll","keypress"],o=[function(){return r=n},{passive:!0}];a.forEach(function(t){var e;return(e=document).addEventListener.apply(e,[t].concat(o))});var i=setInterval(function(){r<=0?(e(!0),clearInterval(i),a.forEach(function(t){var e;return(e=document).removeEventListener.apply(e,[t].concat(o))})):r-=100},100)})}},{key:"isTriggered",value:function(){var t=L(r.mark(function t(){var e;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=this.event,t.next="pageLoad"===t.t0?3:"click"===t.t0?7:"exitIntent"===t.t0?11:"delay"===t.t0?15:"reengage"===t.t0?19:"elementVisible"===t.t0?23:27;break;case 3:return t.next=5,this.onPageLoad();case 5:return e=t.sent,t.abrupt("break",28);case 7:return t.next=9,this.onClick();case 9:return e=t.sent,t.abrupt("break",28);case 11:return t.next=13,this.onExitIntent();case 13:return e=t.sent,t.abrupt("break",28);case 15:return t.next=17,this.onDelay();case 17:return e=t.sent,t.abrupt("break",28);case 19:return t.next=21,this.onReengage();case 21:return e=t.sent,t.abrupt("break",28);case 23:return t.next=25,this.onElementVisible();case 25:return e=t.sent,t.abrupt("break",28);case 27:e=!1;case 28:return t.abrupt("return",e);case 29:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}]),t}();var gt=function(){function t(e,n,r){f(this,t),this.recurrence=e,this.isWidgetApplied=n,this.callback=r,this.observer=new MutationObserver(this.observerHandler.bind(this)),this.observerParams=[document.body,{childList:!0,subtree:!0}],this.eventListenerParams=[G,this.eventHandler.bind(this),{passive:!0}]}return g(t,[{key:"decisionHandler",value:function(){var t=!!window.ABTasty.getTestsOnPage()[TEST_ID];!this.isWidgetApplied()&&t&&this.recurrence.isOver()?(this.callback(F),this.clearWatcher()):!t&&this.isWidgetApplied()&&this.callback(H)}},{key:"eventHandler",value:function(){var t=this;return setTimeout(function(){t.decisionHandler()},250),this}},{key:"observerHandler",value:function(t){var e=t.some(function(t){var e=t.removedNodes;return e&&e.length}),n=t.some(function(t){var e=t.addedNodes;return e&&e.length});return e||n?(this.decisionHandler(),this):this}},{key:"watch",value:function(){var t,e;return(t=document).addEventListener.apply(t,m(this.eventListenerParams)),(e=this.observer).observe.apply(e,m(this.observerParams)),this}},{key:"clearWatcher",value:function(){var t;return(t=document).removeEventListener.apply(t,m(this.eventListenerParams)),this.observer.disconnect(),this}}]),t}(),bt=function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];n.unshift("[AB Tasty Widget] ".concat(PACKAGE,":")),(t=console).log.apply(t,n)},vt=function(t,e,n){var r,a=0;try{document.querySelector(t)}catch(e){var o="Selector «".concat(t,"» not valid.");return bt(o),"function"==typeof n&&n(o)}r=setTimeout(function(){clearInterval(a);var e="Can't find element «".concat(t,"».");return bt(e),"function"==typeof n&&n(e)},1e4),a=setInterval(function(){var n=document.querySelector(t);if(null!==n)return clearTimeout(r),clearInterval(a),"function"==typeof e&&e(n)},200)};!function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=t:a.appendChild(document.createTextNode(t))}}("abtasty-modal{display:none;position:fixed;top:0;left:0;width:100%;height:100%;z-index:2147483145}abtasty-modal:not(.abtasty-modal--video){overflow-y:auto}abtasty-modal__underlay{width:100%;height:100%;position:fixed;top:0;left:0;background-color:rgba(0,0,0,.5);cursor:pointer}.abtasty-modal__area{top:0;left:0;right:0;width:auto;margin:10px!important;z-index:100;position:relative;float:none}.abtasty-modal__area-layout--imageOnly{max-width:80%}.abtasty-modal__area-layout--imageOnly img{border-style:solid;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100%;opacity:1}.abtasty-modal__area-type--video.abtasty-modal__area-layout--no-title .abtasty-modal__content{padding:5px;border-radius:0!important;border-width:0!important;background-color:transparent!important;background-image:none!important}.abtasty-modal__area-type--video.abtasty-modal__area-layout--bottom .abtasty-modal__content{padding:25px 20px 20px}.abtasty-modal .abtasty-modal__content{border-color:#f6f6f6;border-style:solid;padding:20px}.abtasty-modal__area-type--image,.abtasty-modal__area-type--no-title,.abtasty-modal__area-type--simple,.abtasty-modal__area-type--video{margin:0 auto 20px!important;top:10vh;border:none;background:none}.abtasty-modal__area-type--video.abtasty-modal__area-layout--bottom .abtasty-modal__close--inside{top:2px}.abtasty-modal__area-type--video.abtasty-modal__area-layout--top .abtasty-modal__close--inside{right:15px;top:20px}.abtasty-modal__area-type--image .abtasty-modal__close,.abtasty-modal__area-type--simple .abtasty-modal__close{right:10px;top:15px}.abtasty-modal__close{position:absolute;right:5px;top:0;font-size:20px;font-weight:300;background:transparent;border:0;color:#222;font-family:Helvetica Neue,Helvetica,Arial,sans-serif!important;line-height:24px!important;margin-right:5px;cursor:pointer;width:20px;height:20px;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.abtasty-modal__close svg{display:block}.abtasty-modal__close svg .close-x{stroke:#5c5c5c;fill:transparent;stroke-linecap:round;stroke-width:3}.abtasty-modal__area-type--video.abtasty-modal__area-layout--no-title .abtasty-modal__close--inside{top:-6px;right:-15px;background:#fff;border-radius:20px;width:20px;height:20px}.abtasty-modal__area-type--image .abtasty-modal__close--outside,.abtasty-modal__area-type--simple .abtasty-modal__close--outside,.abtasty-modal__close .abtasty-modal__close--outside{top:-25px;right:0;width:20px;height:20px}.abtasty-modal__close--outside{top:-25px;right:-25px;background:#fff;border-radius:20px;width:20px;height:20px}.abtasty-modal__media,.abtasty-modal__media-link{max-width:100%;display:block}.abtasty-modal__text{padding:20px;font-family:Open Sans,sans-serif!important;color:#000;overflow:auto}.abtasty-modal__title{width:auto;font-size:20px!important;font-weight:500;line-height:1.1;margin-bottom:10px}.abtasty-modal__text p{margin:0 0 10px!important;font-size:15px;font-weight:300;word-wrap:break-word}.abtasty-modal__button{width:100%;text-align:center;margin-top:20px}.abtasty-modal__button a{padding:10px 20px;border-radius:10px;display:inline-block;font-weight:700}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--center .abtasty-modal__title{text-align:center}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--center .abtasty-modal__innertext{text-align:center;white-space:pre-wrap}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--left .abtasty-modal__title{width:50%;float:left;text-align:center;vertical-align:middle}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--left .abtasty-modal__innertext{width:50%;float:left}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--right .abtasty-modal__title{width:50%;float:left;text-align:center;vertical-align:middle}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--right .abtasty-modal__innertext{width:50%;float:left}.abtasty-modal__area-type--image .abtasty-modal__image img{max-height:400px;max-width:100%;display:inline;opacity:1}.abtasty-modal__area-type--image.abtasty-modal__area-layout--left .abtasty-modal__image{width:50%;display:inline-block;height:auto;vertical-align:middle;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--left .abtasty-modal__text{text-align:left;width:50%;display:inline-block;vertical-align:middle;-webkit-box-sizing:border-box;box-sizing:border-box}.abtasty-modal__area-type--image.abtasty-modal__area-layout--right .abtasty-modal__image{width:50%;display:inline-block;height:auto;vertical-align:middle;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--right .abtasty-modal__text{text-align:left;width:50%;display:inline-block;vertical-align:middle;-webkit-box-sizing:border-box;box-sizing:border-box}.abtasty-modal__area-type--image.abtasty-modal__area-layout--top .abtasty-modal__image{width:100%;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--top .abtasty-modal__text{width:100%;padding:20px 0}.abtasty-modal__area-type--image.abtasty-modal__area-layout--top .abtasty-modal__image img{max-height:300px;opacity:1}.abtasty-modal__area-type--image.abtasty-modal__area-layout--bottom .abtasty-modal__image{width:100%;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--bottom .abtasty-modal__text{width:100%;padding:20px 0}.abtasty-modal__area-type--video{text-align:center;width:100%}.abtasty-modal__area-type--video iframe{width:100%}@media (min-width:630px){abtasty-modal:not(.abtasty-modal--video) .abtasty-modal__area-width--medium{width:600px;margin:0 auto 20px!important}.abtasty-modal--video{width:50%;left:25%}}@media (min-width:330px){abtasty-modal:not(.abtasty-modal--video) .abtasty-modal__area-width--small{width:300px;margin:0 auto 20px!important}}@media (min-width:930px){abtasty-modal:not(.abtasty-modal--video) .abtasty-modal__area-width--large{width:900px;margin:0 auto 20px!important}}.abtasty-animation-fadeIn{-webkit-animation-name:a;animation-name:a}.abtasty-animation-fadeIn,.abtasty-animation-fadeOut{-webkit-animation-duration:.5s;animation-duration:.5s}.abtasty-animation-fadeOut{-webkit-animation-name:b;animation-name:b}.abtasty-animation-slideIn{-webkit-animation-name:c;animation-name:c;-webkit-animation-duration:.5s;animation-duration:.5s}.abtasty-animation-slideOut{-webkit-animation-name:d;animation-name:d;-webkit-animation-duration:.5s;animation-duration:.5s}@-webkit-keyframes a{0%{opacity:0}to{opacity:1}}@keyframes a{0%{opacity:0}to{opacity:1}}@-webkit-keyframes b{0%{opacity:1}to{opacity:0}}@keyframes b{0%{opacity:1}to{opacity:0}}@-webkit-keyframes c{0%{-webkit-transform:translateY(-100%);transform:translateY(-100%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes c{0%{-webkit-transform:translateY(-100%);transform:translateY(-100%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes d{0%{-webkit-transform:translateY(0);transform:translateY(0)}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes d{0%{-webkit-transform:translateY(0);transform:translateY(0)}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}");var wt=function(t){var e=Object.prototype.hasOwnProperty;function n(t,r){return Array.isArray(t)?function(t,e){for(var r,a="",o="",s=Array.isArray(e),c=0;c<t.length;c++)(r=n(t[c]))&&(s&&e[c]&&(r=i(r)),a=a+o+r,o=" ");return a}(t,r):t&&"object"==typeof t?function(t){var n="",r="";for(var a in t)a&&t[a]&&e.call(t,a)&&(n=n+r+a,r=" ");return n}(t):t||""}function r(t){if(!t)return"";if("object"==typeof t){var n="";for(var r in t)e.call(t,r)&&(n=n+r+":"+t[r]+";");return n}return";"!==(t+="")[t.length-1]?t+";":t}function a(t,e,n,r){return!1!==e&&null!=e&&(e||"class"!==t&&"style"!==t)?!0===e?" "+(r?t:t+'="'+t+'"'):("function"==typeof e.toJSON&&(e=e.toJSON()),"string"==typeof e||(e=JSON.stringify(e),n||-1===e.indexOf('"'))?(n&&(e=i(e))," "+t+'="'+e+'"'):" "+t+"='"+e.replace(/'/g,"&#39;")+"'"):""}t.merge=function t(e,n){if(1===arguments.length){for(var a=e[0],o=1;o<e.length;o++)a=t(a,e[o]);return a}for(var i in n)if("class"===i){var s=e[i]||[];e[i]=(Array.isArray(s)?s:[s]).concat(n[i]||[])}else if("style"===i){var s=r(e[i]),c=r(n[i]);e[i]=s+c}else e[i]=n[i];return e},t.classes=n,t.style=r,t.attr=a,t.attrs=function(t,o){var i="";for(var s in t)if(e.call(t,s)){var c=t[s];if("class"===s){c=n(c),i=a(s,c,!1,o)+i;continue}"style"===s&&(c=r(c)),i+=a(s,c,!1,o)}return i};var o=/["&<>]/;function i(t){var e=""+t,n=o.exec(e);if(!n)return t;var r,a,i,s="";for(r=n.index,a=0;r<e.length;r++){switch(e.charCodeAt(r)){case 34:i="&quot;";break;case 38:i="&amp;";break;case 60:i="&lt;";break;case 62:i="&gt;";break;default:continue}a!==r&&(s+=e.substring(a,r)),a=r+1,s+=i}return a!==r?s+e.substring(a,r):s}return t.escape=i,t.rethrow=function t(e,n,r,a){if(!(e instanceof Error))throw e;if(!("undefined"==typeof window&&n||a))throw e.message+=" on line "+r,e;try{a=a||require("fs").readFileSync(n,"utf8")}catch(n){t(e,null,r)}var o=3,i=a.split("\n"),s=Math.max(r-o,0),c=Math.min(i.length,r+o);var o=i.slice(s,c).map(function(t,e){var n=e+s+1;return(n==r?" > ":" ")+n+"| "+t}).join("\n");e.path=n;e.message=(n||"Pug")+":"+r+"\n"+o+"\n\n"+e.message;throw e},t}({});var _t,xt,kt,Et,Ot,St=DATA,Ct=St.type,Tt=St.animation,Pt=St.backgroundColor,Rt=St.overlayOpacity,Lt=St.backgroundImage,It=St.borderRadius,At=St.borderRadiusImage,Nt=St.borderWidth,jt=St.borderColor,Bt=St.button,Dt=St.buttonBackgroundColor,Wt=St.buttonLink,zt=St.buttonText,qt=St.buttonTextColor,Mt=St.backgroundCloseButtonColor,Vt=St.closeButtonColor,Yt=St.closeButtonPosition,Gt=St.content,Ht=St.customWidth,Ft=St.title,Jt=St.layout,Kt=St.videoLink,Ut=St.widthImageWithText,Zt=St.widthImageOnly,$t=St.autoPlay,Qt=(St.triggerEvent,St.triggerEventClick,St.triggerEventDelay,St.triggerEventExitDelay,St.triggerEventReengageDelay,St.displayRecurrence,St.closingRecurrence,St.validationRecurrence,Ct.replace(/^\w/,function(t){return t.toUpperCase()})),Xt="imageOnly"===Jt?Zt:Ut,te=DATA.image||"https://widgets-images.abtasty.com/image-placeholder.png",ee="abtasty-modal__underlay",ne=".abtasty-modal__close";function re(t,e,n,r){var a,o=[t,function(t){var a=t.target,i=m(document.querySelectorAll(e)).some(function(t){return t.isSameNode(a)||a.closest(e)});return i&&n(),i&&r&&function(t){var e;return(e=document).removeEventListener.apply(e,m(t))}(o)},!0];(a=document).addEventListener.apply(a,o)}function ae(t){re("click","".concat(ee,", ").concat(ne),function(){_t.style.display="none","video"===Ct&&(_t.innerHTML=""),ABTastyEvent("".concat(Qt," modal closed"),null,TEST_ID),t.setClosingRecurrence()},!0)}function oe(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e={layout:Jt,type:Ct,borderRadius:It,borderRadiusImage:At,borderWidth:Nt,borderColor:jt,button:Bt,buttonBackgroundColor:Dt,buttonLink:Wt,buttonText:zt,buttonTextColor:qt,backgroundColor:"imageOnly"!==Jt?Pt:"initial",overlayOpacity:Rt,backgroundImage:Lt,image:te,width:Xt,videoLink:Kt,customWidth:Ht,animation:Tt,title:Ft,closeButtonPosition:Yt,backgroundCloseButtonColor:Mt,modalContent:Gt||t.outerHTML};(_t.className="abtasty-modal abtasty-modal--".concat(Ct),_t.dataset.testId=TEST_ID,_t.innerHTML=function(t){var e,n="",r={};try{var a={},o=t||{};(function(t,a,o,i,s,c,l,u,d,y,m,p,f,h,g,b,v,w,_,x,k,E){r.button=e=function(){this&&this.block,this&&this.attributes,n=(n=(n+='<div class="abtasty-modal__button">')+"<a"+wt.attr("href",m,!0,!0)+' target="_self"'+wt.attr("style",wt.style({"background-color":y+"!important",color:f+"!important"}),!0,!0)+">")+wt.escape(null==(e=p)?"":e)+"</a></div>"},r.title=e=function(){this&&this.block,this&&this.attributes,n=(n+='<h2 class="abtasty-modal__title" style="text-align:center;">')+(null==(e=x)?"":e)+"</h2>"},r.imageOnly=e=function(){this&&this.block,this&&this.attributes,n=n+"<img"+(wt.attr("src",b,!0,!0)+wt.attr("style",wt.style({"border-radius":c+"px!important","border-width":u+"px!important","border-color":s+"!important"}),!0,!0))+">"},r.imageWithText=e=function(){this&&this.block,this&&this.attributes,n+='<div class="abtasty-modal__image">',b&&(n=n+"<img"+(wt.attr("src",b,!0,!0)+wt.attr("style",wt.style({"border-radius":l+"px!important"}),!0,!0))+">"),n+="</div>"},r.content=e=function(){this&&this.block,this&&this.attributes,n+='<div class="abtasty-modal__innertext">',n=(n+="<p>")+(null==(e=w)?"":e)+"</p></div>"},r.closeButton=e=function(){this&&this.block,this&&this.attributes,n=n+"<div"+wt.attr("class",wt.classes(["abtasty-modal__close",h?"abtasty-modal__close--"+h:""],[!1,!0]),!1,!0)+" data-abtasty-actionnable"+wt.attr("style",wt.style("outside"===h?{"background-color":a}:""),!0,!0)+">",n+='<svg viewbox="0 0 40 40">',n+='<path class="close-x" d="M 10,10 L 30,30 M 30,10 L 10,30"></path></svg></div>'},r.contentWrapper=e=function(){var t=this&&this.block;this&&this.attributes,n=n+'<div class="abtasty-modal__content"'+wt.attr("style",wt.style({"border-radius":c+"px!important","border-width":u+"px!important","border-color":s+"!important","background-color":o+"!important","background-image":'url("'+i+'")!important'}),!0,!0)+">",t&&t&&t(),n+="</div>"},r.modalWrapper=e=function(){var e=this&&this.block;this&&this.attributes,n=(n=n+"<abtasty-modal__underlay"+wt.attr("style",wt.style({"background-color":"rgba(0, 0, 0, "+_/100+")"}),!0,!0)+"></abtasty-modal__underlay>")+"<div"+(wt.attr("class",wt.classes(["abtasty-animation-"+t+" abtasty-modal__area abtasty-modal__area-width--"+E+" abtasty-modal__area-type--"+k+" abtasty-modal__area-layout--"+v],[!0]),!1,!0)+wt.attr("style",wt.style({width:"custom"===E&&g+"%","margin-left":"custom"===E&&(100-g)/2+"% !important"}),!0,!0))+">",e&&e&&e(),n+="</div>"},r.modalWrapper.call({block:function(){r.closeButton(),"image"===k&&"imageOnly"===v?(r.imageOnly(),d&&r.button()):r.contentWrapper.call({block:function(){"simple"===k?(n+='<div class="abtasty-modal__text">',"center"===v||"left"===v?(r.title(),r.content(),n+='<div style="clear:both;"></div>'):(r.content(),r.title(),n+='<div style="clear:both;"></div>'),n+="</div>",d&&r.button()):"image"===k?("top"!==v&&"left"!==v||r.imageWithText(),n+='<div class="abtasty-modal__text">',r.title(),r.content(),d&&r.button(),n+="</div>","right"!==v&&"bottom"!==v||r.imageWithText(),n+='<div style="clear:both;"></div>'):"video"===k&&("top"===v&&r.title(),n+=null==(e=w)?"":e,"bottom"===v&&r.title(),d&&r.button())}})}})}).call(this,"animation"in o?o.animation:"undefined"!=typeof animation?animation:void 0,"backgroundCloseButtonColor"in o?o.backgroundCloseButtonColor:"undefined"!=typeof backgroundCloseButtonColor?backgroundCloseButtonColor:void 0,"backgroundColor"in o?o.backgroundColor:"undefined"!=typeof backgroundColor?backgroundColor:void 0,"backgroundImage"in o?o.backgroundImage:"undefined"!=typeof backgroundImage?backgroundImage:void 0,"borderColor"in o?o.borderColor:"undefined"!=typeof borderColor?borderColor:void 0,"borderRadius"in o?o.borderRadius:"undefined"!=typeof borderRadius?borderRadius:void 0,"borderRadiusImage"in o?o.borderRadiusImage:"undefined"!=typeof borderRadiusImage?borderRadiusImage:void 0,"borderWidth"in o?o.borderWidth:"undefined"!=typeof borderWidth?borderWidth:void 0,"button"in o?o.button:"undefined"!=typeof button?button:void 0,"buttonBackgroundColor"in o?o.buttonBackgroundColor:"undefined"!=typeof buttonBackgroundColor?buttonBackgroundColor:void 0,"buttonLink"in o?o.buttonLink:"undefined"!=typeof buttonLink?buttonLink:void 0,"buttonText"in o?o.buttonText:"undefined"!=typeof buttonText?buttonText:void 0,"buttonTextColor"in o?o.buttonTextColor:"undefined"!=typeof buttonTextColor?buttonTextColor:void 0,"closeButtonPosition"in o?o.closeButtonPosition:"undefined"!=typeof closeButtonPosition?closeButtonPosition:void 0,"customWidth"in o?o.customWidth:"undefined"!=typeof customWidth?customWidth:void 0,"image"in o?o.image:"undefined"!=typeof image?image:void 0,"layout"in o?o.layout:"undefined"!=typeof layout?layout:void 0,"modalContent"in o?o.modalContent:"undefined"!=typeof modalContent?modalContent:void 0,"overlayOpacity"in o?o.overlayOpacity:"undefined"!=typeof overlayOpacity?overlayOpacity:void 0,"title"in o?o.title:"undefined"!=typeof title?title:void 0,"type"in o?o.type:"undefined"!=typeof type?type:void 0,"width"in o?o.width:"undefined"!=typeof width?width:void 0)}catch(t){wt.rethrow(t,void 0,void 0,a[void 0])}return n}(e),document.body.appendChild(_t),xt=_t.querySelector(".abtasty-modal__area"),Vt)&&(_t.querySelector("".concat(ne," .close-x")).style.stroke=Vt);return new Promise(function(t){t(!0)})}function ie(t){var e,n=t.indexOf("youtu")>-1,r=t.indexOf("vimeo")>-1;if(n){var a=t.match(/^.*(youtu.be\/|v\/|e\/|u\/\w+\/|embed\/|v=)([^#&?]*).*/)[2];e="//www.youtube.com/embed/".concat(a,"?rel=0"),$t&&(e+="&autoplay=1")}else if(r){var o=t.match(/.*(www\.)?vimeo.com\/(\d+)($|\/)/)[2];e="//player.vimeo.com/video/".concat(o)}return e}function se(){var t=(window.innerWidth>630?.5*window.innerWidth:window.innerWidth-40)/16*9;return Math.round(t)}function ce(){var t,e,n,a,o,i;return r.async(function(s){for(;;)switch(s.prev=s.next){case 0:return t=Date.now(),e="abtasty-widget-video-".concat(t),(n=document.createElement("iframe")).setAttribute("id",e),a=ie(Kt),o=se(),n.style.height="".concat(o,"px"),"no-title"===Jt&&(n.style.border="".concat(Nt,"px solid ").concat(jt,"!important"),n.style.borderRadius="".concat(It,"px!important")),n.src=a,n.frameBorder=0,n.allowfullscreen=!0,s.next=13,r.awrap(oe(n));case 13:return i=s.sent,xt.style.height="".concat(o,"px"),window.addEventListener("resize",function(){var t=document.querySelector("abtasty-modal iframe"),e=se();t.style.height="".concat(e,"px"),xt.style.height="".concat(e,"px")}),s.abrupt("return",i&&new Promise(function(t){t(!0)}));case 17:case"end":return s.stop()}})}function le(t){_t.style.display="block",ae(t),function(t){Bt&&Wt.length&&re("mouseup",".abtasty-modal__button",function(){t.setValidationRecurrence()},!0)}(t),nt()||function(t){new gt(t,function(){return _t.closest("body")},function(e){switch(e){case H:_t.style.display="none",_t.remove();break;case F:ue(t)}}).watch()}(t)}function ue(t){var e;return r.async(function(n){for(;;)switch(n.prev=n.next){case 0:if(_t=document.createElement("abtasty-modal"),"video"!==Ct){n.next=8;break}return n.next=4,r.awrap(ce());case 4:n.sent&&le(t),n.next=19;break;case 8:if("image"!==Ct||"fit"!==Xt){n.next=15;break}(e=new Image).src=te,e.className="abtasty-modal__media",e.onload=function(){return r.async(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.awrap(oe(this));case 2:e.sent&&le(t),xt.style.width="".concat(this.width,"px"),xt.style.height="".concat(this.height,"px");case 6:case"end":return e.stop()}},null,this)},n.next=19;break;case 15:return n.next=17,r.awrap(oe());case 17:n.sent&&le(t);case 19:case"end":return n.stop()}})}nt()?ue():r.async(function(t){for(;;)switch(t.prev=t.next){case 0:if((kt=new yt(st())).isOver()){t.next=3;break}return t.abrupt("return",!1);case 3:return Et=new ht(ct()),t.next=6,r.awrap(Et.isTriggered());case 6:return(Ot=t.sent)&&ue(kt),t.abrupt("return",Ot);case 9:case"end":return t.stop()}})}();
{
"name": "@abtasty/modal",
"description": "Widget for AB Tasty",
"version": "2.7.1-3",
"icon": "icon.png",
"version": "2.7.1-4",
"form": "dist/form.js",
"main": "dist/main.js",
"files": [
"icon.png",
"dist"

@@ -11,0 +9,0 @@ ],

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc