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.8.1 to 2.8.2

2

dist/form.js

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.widgetForm=t()}(this,function(){"use strict";var e=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}};var t=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)};var n=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var r=function(r){return e(r)||t(r)||n()},o={backgroundGroup:{propName:"backgroundGroup",category:"style",type:"group",label:{en:"Background",fr:"Fond",es:"Fondo",de:"Hintergrund"},collapsible:!0,children:[{propName:"backgroundColor",type:"colorpicker",category:"style",label:{en:"Background color",fr:"Couleur d'arrière-plan"},value:"rgba(255, 255, 255, 1)",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{category:"style",type:"short-separator",propName:"backgroundImage-style-separator",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{propName:"backgroundImage",type:"mediaupload",category:"style",label:{en:"Background image",fr:"Image d'arrière-plan"},conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{category:"style",type:"short-separator",propName:"overlay-style-separator",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{propName:"overlayOpacity",type:"slider",category:"style",label:{en:"Overlay opacity",fr:"Opacité de l'overlay",es:"Opacidad de la capa",de:"Overlay Opacity"},value:"50",unit:"%"}]},borderGroup:{propName:"borderGroup",category:"style",type:"group",label:{en:"Border",fr:"Bordure"},collapsible:!0,children:[{propName:"borderWidth",category:"style",type:"slider",unit:"px",value:0,min:0,max:10,label:{en:"Border Thickness",fr:"Largeur de la bordure"}},{category:"style",type:"short-separator",propName:"borderRadius-style-separator"},{propName:"borderRadius",category:"style",type:"slider",unit:"px",value:10,min:0,max:20,label:{en:"Border radius",fr:"Angle de la bordure"}},{category:"style",type:"short-separator",propName:"borderRadiusImage-separator",conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]},{propName:"borderRadiusImage",category:"style",type:"slider",unit:"px",value:10,min:0,max:20,label:{en:"Image Border radius",fr:"Angle de la bordure de l'image"},conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]},{category:"style",type:"short-separator",propName:"borderColor-style-separator"},{propName:"borderColor",category:"style",type:"colorpicker",label:{en:"Border color",fr:"Couleur de la bordure"},value:"rgba(0, 0, 0, 1)"}]},closeButtonGroup:{propName:"closeButtonGroup",category:"style",type:"group",label:{en:"Close button",fr:"Bouton de fermeture",es:"Botón cerrar",de:"Schließen-Button"},collapsible:!0,children:[{propName:"closeButtonPosition",category:"style",type:"radio",label:{en:"Close button position",fr:"Position du bouton de fermeture",es:"Posición del botón",de:"Button-Position"},value:"inside",options:[{label:{en:"Inside",fr:"À l'intérieur",es:"Dentro",de:"Innen"},value:"inside"},{label:{en:"Outside",fr:"À l'extérieur",es:"Fuera",de:"Außen"},value:"outside"}]},{category:"style",type:"short-separator",propName:"closeButtonColor-style-separator"},{propName:"closeButtonColor",type:"colorpicker",category:"style",label:{en:"Close button color",fr:"Couleur du bouton de fermeture",es:"Color del botón cerrar",de:"Button-Farbe"},value:"rgba(92, 92, 92, 1)"},{category:"style",type:"short-separator",propName:"closeBackgroundButtonColor-style-separator",conditions:[{field:"closeButtonPosition",value:"outside"}]},{propName:"backgroundCloseButtonColor",type:"colorpicker",category:"style",label:{en:"Background close button color",fr:"Couleur du fond du bouton de fermeture",es:"Background close button color",de:"Background close button color"},value:"rgba(255, 255, 255, 1)",conditions:[{field:"closeButtonPosition",value:"outside"}]}]},dimensions:[{propName:"widthImageWithText",type:"radio",category:"style",label:{en:"Width",fr:"Largeur"},value:"medium",options:[{label:{en:"Small",fr:"Petite",es:"Pequeño",de:"Klein"},value:"small"},{label:{en:"Medium",fr:"Moyenne",es:"Mediano",de:"Medium"},value:"medium"},{label:{en:"Large",fr:"Large",es:"Grande",de:"Groß"},value:"large"},{label:{en:"Custom",fr:"Sur mesure"},value:"custom"}],conditions:[{field:"type",value:function(e){return"video"!==e}},{field:"layout",value:function(e){return"imageOnly"!==e}}]},{propName:"widthImageOnly",type:"radio",category:"style",label:{en:"Width",fr:"Largeur"},value:"fit",options:[{label:{en:"Fit to size",fr:"S'adapte à la taille",es:"Ajustar",de:"Angepasst"},value:"fit"},{label:{en:"Small",fr:"Petite",es:"Pequeño",de:"Klein"},value:"small"},{label:{en:"Medium",fr:"Moyenne",es:"Mediano",de:"Medium"},value:"medium"},{label:{en:"Large",fr:"Large",es:"Grande",de:"Groß"},value:"large"}],conditions:[{field:"type",value:function(e){return"video"!==e}},{field:"layout",value:function(e){return"imageOnly"===e}}]},{propName:"customWidth",type:"number",category:"style",label:{en:"Custom width (%)",fr:"Largeur sur mesure (%)"},value:50,conditions:[{field:"widthImageWithText",value:"custom"}]}],animations:[{category:"style",type:"separator",propName:"animation-separator"},{propName:"animation",type:"radio",category:"style",label:{en:"Animation",fr:"Animation",es:"Animación",de:"Animation"},value:"none",options:[{label:{en:"None",fr:"Aucune",es:"Ninguna",de:"Keine"},value:"none"},{label:{en:"Slide In",fr:"Slide In",es:"Deslizar",de:"Slide In"},value:"slideIn"},{label:{en:"Fade In",fr:"Fade In",es:"Disolver",de:"Fade In"},value:"fadeIn"}]}]};var a=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e};var i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var c=function(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),e};function u(e,t){return e(t={exports:{}},t.exports),t.exports}var l=u(function(e){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(r){return"function"==typeof Symbol&&"symbol"===t(Symbol.iterator)?e.exports=n=function(e){return t(e)}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":t(e)},n(r)}e.exports=n});var d=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e};var p=function(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?d(e):t},g=u(function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(n)}e.exports=t}),y=u(function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(n,r)}e.exports=t});var f=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)},h=u(function(e){var t=function(e){var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(e,t,n,r){var o=t&&t.prototype instanceof f?t:f,a=Object.create(o.prototype),i=new C(r||[]);return a._invoke=function(e,t,n){var r=l;return function(o,a){if(r===p)throw new Error("Generator is already running");if(r===g){if("throw"===o)throw a;return T()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var s=E(i,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var c=u(e,t,n);if("normal"===c.type){if(r=n.done?g:d,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=g,n.method="throw",n.arg=c.arg)}}}(e,n,i),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var l="suspendedStart",d="suspendedYield",p="executing",g="completed",y={};function f(){}function h(){}function m(){}var v={};v[a]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(P([])));w&&w!==n&&r.call(w,a)&&(v=w);var k=m.prototype=f.prototype=Object.create(v);function S(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function x(e){var t;this._invoke=function(n,o){function a(){return new Promise(function(t,a){!function t(n,o,a,i){var s=u(e[n],e,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?Promise.resolve(l.__await).then(function(e){t("next",e,a,i)},function(e){t("throw",e,a,i)}):Promise.resolve(l).then(function(e){c.value=e,a(c)},function(e){return t("throw",e,a,i)})}i(s.arg)}(n,o,t,a)})}return t=t?t.then(a,a):a()}}function E(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,E(e,n),"throw"===n.method))return y;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=u(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function P(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}return{next:T}}function T(){return{value:t,done:!0}}return h.prototype=k.constructor=m,m.constructor=h,m[s]=h.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(k),e},e.awrap=function(e){return{__await:e}},S(x.prototype),x.prototype[i]=function(){return this},e.AsyncIterator=x,e.async=function(t,n,r,o){var a=new x(c(t,n,r,o));return e.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},S(k),k[s]="Generator",k[a]=function(){return this},k.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=P,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return s.type="throw",s.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;N(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:P(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}});function m(e,t,n,r,o,a,i){try{var s=e[a](i),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}var v=function(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function i(e){m(a,r,o,i,s,"next",e)}function s(e){m(a,r,o,i,s,"throw",e)}i(void 0)})}};var b=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o};var w=function(e,t){if(null==e)return{};var n,r,o=b(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},k={en:"Recurrence",fr:"Récurrence",es:"Recurrencia",de:"Wiederholung"},S={en:"".concat(k.en," of the display"),fr:"".concat(k.fr," de l'affichage"),es:"".concat(k.es," de visualización"),de:"".concat(k.de," der Anzeige")},x={en:"".concat(k.en," after closure"),fr:"".concat(k.fr," après fermeture"),es:"".concat(k.es," tras el cierre"),de:"".concat(k.de," nach Schließung")},E={en:"".concat(k.en," after validation"),fr:"".concat(k.fr," après validation"),es:"".concat(k.es," tras la validación"),de:"".concat(k.de," nach der Validierung")},O={en:"Trigger",fr:"Déclencheur",es:"Activador",de:"Trigger"},N="abtasty_resetActionTracking";function C(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(n,!0).forEach(function(t){a(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var T,L={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"},R=P({},L,{label:x,propName:"closingRecurrence"}),I={category:"conditions",type:"group",label:k,collapsible:!0,children:[P({},L,{label:S,propName:"displayRecurrence"}),R,P({},L,{label:E,propName:"validationRecurrence"})]},A=[{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"}],B={category:"conditions",type:"selectelement",propName:"".concat("triggerEvent","Click"),label:O,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"}]},j={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"}]},D={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"}]},_={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"}]},G={category:"conditions",type:"group",label:O,collapsible:!0,children:[{category:"conditions",type:"select",label:{en:"Triggers on",fr:"Se déclenche",es:"¿ Cuándo se activa? ",de:"Triggert bei"},options:A,propName:"triggerEvent",value:"pageLoad"}].concat(r([B,j,D,_]))},q=function(){return Object.prototype.hasOwnProperty.call(window,"ABTastyEditor")},W=((T="undefined"!=typeof global?global:window).ABTasty||Object.assign(T,{ABTasty:{widgetutils:{}}}),T.ABTasty.widgetutils||Object.assign(T.ABTasty,{widgetutils:{}}),T).ABTasty.widgetutils;function M(e,t){return W.hasOwnProperty(e)||Object.assign(W,a({},e,new t)),W[e]}var V=function(){return"".concat(PACKAGE.replace("@abtasty/","")).concat(DATA&&DATA.type?"_".concat(DATA.type):"")},F=function(){return"".concat(PLUGIN_ID.split("-")[0],"_").concat(TEST_ID)},z=function(){if(q())return!1;var e=DATA;return{displayRecurrence:e.displayRecurrence,closingRecurrence:e.closingRecurrence,validationRecurrence:e.validationRecurrence}},H=function(){if(q())return!1;var e,t=DATA,n=t.triggerEvent,r=t.triggerEventClick,o=t.triggerEventExitDelay,a=t.triggerEventDelay,i=t.triggerEventReengageDelay,s=r;switch(n){case"exitIntent":e=o;break;case"delay":e=a;break;case"reengage":e=i;break;default:e=0}return{triggerEvent:n,triggerSelector:s,triggerDelay:e}},K=function(){function e(){i(this,e),this.uniqueId=F(),this.widgetName=V(),this.recurrenceParams=z(),this.triggerParams=H(),this.recurrence=!!this.recurrenceParams&&new Y(this.recurrenceParams),this.trigger=!!this.triggerParams&&new $(this.triggerParams),this.pageWatcher=new ee(this.recurrence,this.isWidgetApplied.bind(this),this.onPageChange.bind(this)),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(),this.hasBeenShown=!1}return c(e,[{key:"isWidgetApplied",value:function(){return this.domElement&&!!this.domElement.closest("body")}},{key:"insert",value:function(){var e=this;return top.console.log("insert"),ne("head",function(t){return t.appendChild(e.styleElement)},function(e){return console.error(e)}),ne("body",function(t){return t.appendChild(e.domElement)},function(e){return console.error(e)}),this}},{key:"remove",value:function(){return this.domElement.remove(),this.styleElement.remove(),this}},{key:"show",value:function(){return top.console.log("show"),this.domElement.classList.remove(this.hideClassName),this.recurrence&&this.recurrence.setDisplayRecurrence(),this.hasBeenShown=!0,this.pageWatcher.watch(),this}},{key:"hide",value:function(){return this.domElement.classList.add(this.hideClassName),this}},{key:"init",value:function(){var e=v(h.mark(function e(){var t,n;return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.recurrence&&!this.recurrence.isOver(),e.t0=q()||!this.trigger,e.t0){e.next=9;break}if(e.t1=this.trigger,!e.t1){e.next=8;break}return e.next=7,this.trigger.isTriggered();case 7:e.t1=e.sent;case 8:e.t0=e.t1;case 9:if(n=e.t0,t||n){e.next=13;break}return this.pageWatcher.watch(),e.abrupt("return",this);case 13:return this.insert(),this.addCloseEvent(),e.abrupt("return",this);case 16:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"onPageChange",value:function(e){var t=this;switch(top.console.log("onPageChange",e),e){case"remove":this.hide(),this.remove();break;case"rebuild":this.hasBeenShown?this.insert().show():this.init().then(function(){return t.show()})}}},{key:"addCloseEvent",value:function(){for(var e=this,t=this.domElement.querySelectorAll("\n\t\t\t.".concat(this.overlayClassName,",\n\t\t\t.").concat(this.closeButtonClassName,"\n\t\t")),n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return o.push.apply(o,r(t)),o.forEach(function(t){t.addEventListener("click",function(){e.recurrence&&e.recurrence.setClosingRecurrence(),e.hide()},{passive:!0,once:!0})}),this}},{key:"getDom",value:function(){var e=document.createElement("div");return e.className="".concat(this.basicClassName," ").concat(this.hideClassName),e.id=this.widgetContainerId,e.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(q()?"data-abtasty-actionnable":"",">+</button>\n\t\t\t</div>"),e}},{key:"getStyleTag",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=document.createElement("style");return t.type="text/css",q()&&t.setAttribute("abtasty-script-added","true"),t.textContent="\n\t\t\t.".concat(this.hideClassName," {opacity: 0 !important; pointer-events: none;}\n\t\t\t").concat(e),t}}]),e}();(function(e){function t(){var e;return i(this,t),(e=p(this,g(t).call(this))).stringStyles=e.getStyles(),e.styleElement=e.getStyleTag(e.stringStyles),e}f(t,K),c(t,[{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(e){function t(e){var n;return i(this,t),(n=p(this,g(t).call(this))).position=e,n.stringStyles=n.getStyles(),n.styleElement=n.getStyleTag(n.stringStyles),n}f(t,K),c(t,[{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(e){function t(e,n){var r;return i(this,t),(r=p(this,g(t).call(this))).position=e,r.referrerElement=n,r.stringStyles=r.getStyles(),r.styleElement=r.getStyleTag(r.stringStyles),r}f(t,K),c(t,[{key:"insert",value:function(){var e=this;return ne("head",function(t){return t.appendChild(e.styleElement)},function(e){return console.error(e)}),ne(this.referrerElement,function(t){return t.insertAdjacentElement(e.position,e.domElement)},function(e){return console.error(e)}),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 J(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n}function U(e){var t=function(e,t){if("object"!==l(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===l(t)?t:String(t)}var Y=function(){function e(t){var n=t.displayRecurrence,r=t.closingRecurrence,o=t.validationRecurrence;i(this,e),this.displayRecurrence=parseFloat(n),this.closingRecurrence=parseFloat(r),this.validationRecurrence=parseFloat(o),this.widgetName=V(),this.uniqueId=F(),this.recurrenceKey="".concat(this.widgetName,"_").concat(this.uniqueId)}return c(e,[{key:"getGivenRecurrenceStorageParsed",value:function(e){try{var t=e.getItem("ABTastyWidgets");return JSON.parse(t)}catch(t){return e.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(e,t){var n=this.recurrenceKey,r=(t[n],w(t,[n].map(U)));return Object.entries(r).length?(e.setItem("ABTastyWidgets",JSON.stringify(r)),r):(e.removeItem("ABTastyWidgets"),!1)}},{key:"removeSessionRecurrenceStorage",value:function(){var e=this.getSessionRecurrenceStorageParsed();return!!e&&this.removeGivenStorage(window.sessionStorage,e)}},{key:"removeLocalRecurrenceStorage",value:function(){var e=this.getLocalRecurrenceStorageParsed();return!!e&&this.removeGivenStorage(window.localStorage,e)}},{key:"getSessionRecurrence",value:function(){var e=this.getSessionRecurrenceStorageParsed();return!!e&&e[this.recurrenceKey]}},{key:"getLocalRecurrence",value:function(){var e=this.getLocalRecurrenceStorageParsed();return!!e&&e[this.recurrenceKey]}},{key:"getCurrentRecurrence",value:function(){var e=this.getSessionRecurrence(),t=this.getLocalRecurrence();return e||t||{type:!1}}},{key:"isOver",value:function(){var e=this.getLocalRecurrence(),t=(e?parseFloat(e.stamp):0)<(new Date).getTime();return t&&this.removeLocalRecurrenceStorage(),t&&!this.getLocalRecurrence()&&!this.getSessionRecurrence()}},{key:"setRecurrence",value:function(e,t){var n=this,r=this.getTypeOfStorage(e);if(!r&&"object"!==l(r))return!1;var o=this.getTypeOfStorage(e),i=o.storageString,s=o.storageMethod,c=this.getStamp(e),u={type:t,stamp:c},d=this.getCurrentRecurrence().type,p=function(){var e,t=n.getSessionRecurrence(),r=n.getLocalRecurrence();"session"===i?t?e=n.removeSessionRecurrenceStorage():(n.removeLocalRecurrenceStorage(),e=n.getSessionRecurrenceStorageParsed()):"local"===i&&(r?e=n.removeLocalRecurrenceStorage():(n.removeSessionRecurrenceStorage(),e=n.getLocalRecurrenceStorageParsed()));var o=e?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(n,!0).forEach(function(t){a(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}(a({},n.recurrenceKey,u),e):a({},n.recurrenceKey,u);s.setItem("ABTastyWidgets",JSON.stringify(o))};if(!s)return!1;if(d&&"validation"!==t)if("closing"===t&&"validation"!==d)p();else{if("display"!==t||"validation"===d||"closing"===d)return!1;p()}else p();return c}},{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(e){return(new Date).getTime()+864e5*e}},{key:"getTypeOfStorage",value:function(e){return!(isNaN(e)||e<0||0!==e&&!e)&&(e>0?{storageString:"local",storageMethod:window.localStorage}:0===e&&{storageString:"session",storageMethod:window.sessionStorage})}}]),e}();function Z(){return"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype||(e="https://polyfill.io/v3/polyfill.min.js?flags=gated&features=IntersectionObserver",new Promise(function(t,n){var r=window.document.getElementsByTagName("script")[0],o=window.document.createElement("script");o.src=e,r.parentNode.insertBefore(o,r),o.onload=t,o.onerror=n}));var e}function Q(e){return function(){return v(h.mark(function e(t){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t,e.next="IntersectionObserver"===e.t0?3:6;break;case 3:return e.next=5,Z();case 5:return e.abrupt("return",e.sent);case 6:return e.abrupt("return",!0);case 7:case"end":return e.stop()}},e)})).apply(this,arguments)}.apply(this,arguments)}var X=function(){function e(){i(this,e),this.targets=[],this.existingTargets=[],this.inViewPortTargets=[],this.visibilityobserver=this.startVisibilityObserver(),this.mutationobserver=this.startMutationObserver()}return c(e,[{key:"intersectionHandler",value:function(e){var t=this;e.forEach(function(e){e.isIntersecting?(t.existingTargets=t.existingTargets.filter(function(n){return n.element!==e.target||(t.inViewPortTargets.push(n),!1)}),t.checkElements()):t.inViewPortTargets=t.inViewPortTargets.filter(function(n){return n.element!==e.target||(t.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 e=new MutationObserver(this.checkElements.bind(this));return e.observe(document,{attributes:!0,childList:!0,subtree:!0}),e}},{key:"isElementVisible",value:function(e){return this.isElementTopmost(e)&&this.isElementOpaque(e)}},{key:"isElementOpaque",value:function(e){return"HTML"===function e(t,n){return n(t)||!t.parentElement?t:e(t.parentElement,n)}(e,function(e){return"0"===window.getComputedStyle(e).opacity}).nodeName}},{key:"isElementTopmost",value:function(e){for(var t=e.getBoundingClientRect(),n=[[t.left,t.top],[t.right,t.top],[t.left,t.bottom],[t.right,t.bottom]],o=!1,a=0;!o&&a<n.length;){var i,s=(i=document).elementFromPoint.apply(i,r(n[a]));o=e===s||e.contains(s),a++}return o}},{key:"checkElements",value:function(){var e=this;this.targets=this.targets.filter(function(t){var n=document.querySelector(t.selector);return!n||(e.existingTargets.push(Object.assign(t,{element:n})),e.visibilityobserver.observe(n),!1)}),this.existingTargets=this.existingTargets.filter(function(t){return!!document.querySelector(t.selector)||(e.visibilityobserver.unobserve(t.element),e.targets.push(t),!1)}),this.inViewPortTargets=this.inViewPortTargets.filter(function(t){var n=t.element,r=t.resolve;return!e.isElementVisible(n)||(e.visibilityobserver.unobserve(n),r(n),!1)})}},{key:"watch",value:function(e,t){this.targets.push({selector:e,resolve:t})}}]),e}(),$=function(){function e(t){var n=t.triggerEvent,r=t.triggerSelector,o=t.triggerDelay;i(this,e),this.event=n,this.selector=r&&r.length?r:"body",this.delay=o}return c(e,[{key:"onElementVisible",value:function(){var e,t=this;return new Promise((e=v(h.mark(function e(n){var r,o,a;return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.onPageLoad();case 2:return r=e.sent,e.next=5,Q();case 5:o=e.sent,a=M("VisibilityObserver",X),o&&r&&a.watch(t.selector,n);case 8:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)}))}},{key:"onPageLoad",value:function(){return new Promise(function(e,t){var n=function(){return"complete"===document.readyState};if(n())return e(!0);var r,o=setTimeout(function(){var e;return(e=document).removeEventListener.apply(e,a),t(!1)},15e3),a=["readystatechange",function(){return n()&&!clearTimeout(o)&&e(!0)},{passive:!0}];(r=document).addEventListener.apply(r,a)})}},{key:"onClick",value:function(){var e=this,t=document.createElement("style");return t.innerHTML="".concat(this.selector," {\n\t\t\tcursor: pointer !important;\n\t\t\tpointer-events: all !important;\n\t\t}"),document.head.appendChild(t),new Promise(function(n){var o,a=function(t){return r(document.querySelectorAll(e.selector)).some(function(n){return n.isSameNode(t)||!!t.closest(e.selector)})},i=["click",function(e){var r,o=e.target;return!!a(o)&&(document.head.removeChild(t),(r=document).removeEventListener.apply(r,i),n(!0))},{passive:!0,capture:!0}];(o=document).addEventListener.apply(o,i)})}},{key:"onExitIntent",value:function(){var e,t=this;return new Promise((e=v(h.mark(function e(n){var r;return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=["mouseleave",function(){var e=v(h.mark(function e(){var r;return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.delay){e.next=5;break}r=1e3*t.delay,setTimeout(function(){return n(!0)},r),e.next=6;break;case 5:return e.abrupt("return",n(!0));case 6:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),{passive:!0,once:!0}],e.next=4,t.onPageLoad();case 4:e.sent&&ne("body",function(e){return e.addEventListener.apply(e,r)});case 6:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)}))}},{key:"onDelay",value:function(){var e,t=this;return new Promise((e=v(h.mark(function e(n){var r;return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=1e3*t.delay,e.next=3,t.onPageLoad();case 3:e.sent&&setTimeout(function(){return n(!0)},r);case 5:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)}))}},{key:"onReengage",value:function(){var e=this;return new Promise(function(t){var n=1e3*e.delay,r=n,o=["click","mousemove","scroll","keypress"],a=[function(){return r=n},{passive:!0}];o.forEach(function(e){var t;return(t=document).addEventListener.apply(t,[e].concat(a))});var i=setInterval(function(){r<=0?(t(!0),clearInterval(i),o.forEach(function(e){var t;return(t=document).removeEventListener.apply(t,[e].concat(a))})):r-=100},100)})}},{key:"isTriggered",value:function(){var e=v(h.mark(function e(){var t;return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=this.event,e.next="pageLoad"===e.t0?3:"click"===e.t0?7:"exitIntent"===e.t0?11:"delay"===e.t0?15:"reengage"===e.t0?19:"elementVisible"===e.t0?23:27;break;case 3:return e.next=5,this.onPageLoad();case 5:return t=e.sent,e.abrupt("break",28);case 7:return e.next=9,this.onClick();case 9:return t=e.sent,e.abrupt("break",28);case 11:return e.next=13,this.onExitIntent();case 13:return t=e.sent,e.abrupt("break",28);case 15:return e.next=17,this.onDelay();case 17:return t=e.sent,e.abrupt("break",28);case 19:return e.next=21,this.onReengage();case 21:return t=e.sent,e.abrupt("break",28);case 23:return e.next=25,this.onElementVisible();case 25:return t=e.sent,e.abrupt("break",28);case 27:t=!1;case 28:return e.abrupt("return",t);case 29:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()}]),e}();var ee=function(){function e(t,n,r){i(this,e),this.recurrence=t,this.isWidgetApplied=n,this.callback=r,this.observer=new MutationObserver(this.observerHandler.bind(this)),this.observerParams=[!console.log(document)&&!console.log(document.body)&&document.body,{childList:!0,subtree:!0}],this.eventListenerParams=[N,this.eventHandler.bind(this),{passive:!0}]}return c(e,[{key:"recurrenceIsDone",value:function(){return!this.recurrence||this.recurrence.isOver()}},{key:"decisionHandler",value:function(e){var t=this,n=!!window.ABTasty.getTestsOnPage()[TEST_ID],r=(this.recurrence?this.recurrence.getCurrentRecurrence():{type:!1}).type,o=function(){return e&&"display"===r||t.recurrenceIsDone()};return top.console.log("this.isWidgetApplied()",this.isWidgetApplied()),top.console.log("affectedToCampaign",n),top.console.log("isBlockingRecurrence()",o()),!this.isWidgetApplied()&&n&&o()?(this.clearWatcher(),this.callback("rebuild")):!this.isWidgetApplied()||n&&o()||(this.clearWatcher(),this.callback("remove"),this.watch()),this}},{key:"eventHandler",value:function(){var e=this;return setTimeout(function(){e.decisionHandler(!1)},250),this}},{key:"observerHandler",value:function(e){var t=e.some(function(e){var t=e.removedNodes;return t&&t.length}),n=e.some(function(e){var t=e.addedNodes;return t&&t.length});return t||n?(this.decisionHandler(!0),this):this}},{key:"watch",value:function(){var e,t;return(e=document).addEventListener.apply(e,r(this.eventListenerParams)),top.console.log("watch => obserParams",this.observerParams),(t=this.observer).observe.apply(t,r(this.observerParams)),this}},{key:"clearWatcher",value:function(){var e;return(e=document).removeEventListener.apply(e,r(this.eventListenerParams)),this.observer.disconnect(),this}}]),e}(),te=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.unshift("[AB Tasty Widget] ".concat(PACKAGE,":")),(e=console).log.apply(e,n)},ne=function(e,t,n){var r,o=0;try{document.querySelector(e)}catch(t){var a="Selector «".concat(e,"» not valid.");return te(a),"function"==typeof n&&n(a)}r=setTimeout(function(){clearInterval(o);var t="Can't find element «".concat(e,"».");return te(t),"function"==typeof n&&n(t)},1e4),o=setInterval(function(){var n=document.querySelector(e);if(null!==n)return clearTimeout(r),clearInterval(o),"function"==typeof t&&t(n)},200)};I.children[I.children.length-1].label={en:"Recurrence after redirection",fr:"Récurrence après redirection",es:"Recurrencia después de la redirección",de:"Wiederholung nach Weiterleitung"};var re,oe=[I,G],ae={title:{propName:"title",type:"wysiwyg",category:"content",label:{en:"Title",fr:"Titre"},placeholder:{en:"Some title",fr:"Mon titre"},value:{en:"Title",fr:"Titre"},conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},buttonSettings:[{category:"content",type:"separator",propName:"button-separator"},{propName:"button",category:"content",type:"switch",value:!1,label:{en:"Add a button",fr:"Ajouter un bouton",es:"Añadir un botón",de:"Button hinzufügen"}},{propName:"buttonText",type:"text",category:"content",label:{en:"Button text",fr:"Texte du bouton",es:"Texto del botón",de:"Button-Text"},value:{en:"Accept",fr:"Valider"},placeholder:{en:"Submit",fr:"Valider"},conditions:[{field:"button"}]},{propName:"buttonLink",type:"text",category:"content",label:{en:"Button link",fr:"Lien du bouton",es:"Enlace del botón",de:"Button-Link"},value:location.origin,conditions:[{field:"button"}]},{propName:"buttonTextColor",category:"content",type:"colorpicker",label:{en:"Button text color",fr:"Couleur du texte du bouton",es:"Color del texto del botón",de:"Button-Textfarbe"},value:"rgba(255, 255, 255, 1)",conditions:[{field:"button"}]},{propName:"buttonBackgroundColor",category:"content",type:"colorpicker",label:{en:"Button background color",fr:"Couleur de fond du bouton",es:"Color del botón",de:"Button-Hintergrundfarbe"},value:"rgba(0, 156, 178, 1)",conditions:[{field:"button"}]}]},ie="https://widgets-images.abtasty.com/modal/",se="".concat(ie,"image/"),ce="".concat(ie,"simple/"),ue="".concat(ie,"video/"),le=[{propName:"type",value:"image",type:"hidden",category:"layout"},{propName:"layout",category:"layout",value:"imageOnly",type:"radioImage",options:[{label:{en:"Image only",fr:"Image seule",es:"Solo imagen",de:"Nur Bild"},value:"imageOnly",src:"".concat(se,"image-only.png")},{label:{en:"Left",fr:"Gauche"},value:"left",src:"".concat(se,"left.png")},{label:{en:"Right",fr:"Droite"},value:"right",src:"".concat(se,"right.png")},{label:{en:"Top",fr:"Haut"},value:"top",src:"".concat(se,"top.png")},{label:{en:"Bottom",fr:"Bas"},value:"bottom",src:"".concat(se,"bottom.png")}]},{propName:"image",type:"mediaupload",category:"content",label:{en:"Image",fr:"Image",es:"Imagen",de:"Bild"}},{category:"content",type:"separator",propName:"title-separator",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},ae.title,{category:"content",type:"separator",propName:"wysiwyg-content-separator",conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]},{propName:"content",type:"wysiwyg",category:"content",label:{en:"Content",fr:"Contenu"},value:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]}].concat(r(ae.buttonSettings),r(o.dimensions),[{type:"separator",category:"style"},o.backgroundGroup,{type:"separator",category:"style"},o.borderGroup,{type:"separator",category:"style"},o.closeButtonGroup],r(o.animations),r(oe)),de=[{propName:"type",value:"simple",type:"hidden",category:"layout"},{propName:"layout",category:"layout",value:"center",type:"radioImage",options:[{label:{en:"Center",fr:"Centre"},value:"center",src:"".concat(ce,"center.png")},{label:{en:"Left",fr:"Gauche"},value:"left",src:"".concat(ce,"left.png")},{label:{en:"Right",fr:"Droite"},value:"right",src:"".concat(ce,"right.png")}]},ae.title,{category:"content",type:"separator",propName:"title-content-separator"},{propName:"content",type:"wysiwyg",category:"content",label:{en:"Content",fr:"Contenu"},value:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."}].concat(r(ae.buttonSettings),r(o.dimensions),[{type:"separator",category:"style"},o.backgroundGroup,{type:"separator",category:"style"},o.borderGroup,{type:"separator",category:"style"},o.closeButtonGroup],r(o.animations),r(oe)),pe=[{propName:"type",value:"video",type:"hidden",category:"layout"},{propName:"layout",category:"layout",value:"no-title",type:"radioImage",options:[{label:{en:"No title",fr:"Sans titre",es:"Sin título",de:"Kein Titel"},value:"no-title",src:"".concat(ue,"video-only.png")},{label:{en:"Top",fr:"Haut"},value:"top",src:"".concat(ue,"bottom.png")},{label:{en:"Bottom",fr:"Bas"},value:"bottom",src:"".concat(ue,"top.png")}]},ae.title,{propName:"videoLink",type:"text",category:"content",label:{en:"URL (Youtube or Vimeo)",fr:"URL (Youtube ou Vimeo)"},value:"https://www.youtube.com/watch?v=btb3bKfxims"}].concat(r(ae.buttonSettings),r(o.dimensions),[{type:"separator",category:"style",conditions:[{field:"type",value:function(e){return"video"!==e}},{field:"layout",value:function(e){return"imageOnly"!==e}}]},o.backgroundGroup,{type:"separator",category:"style"},o.borderGroup,{type:"separator",category:"style"},o.closeButtonGroup],r(o.animations),r(oe),[{category:"content",type:"separator",propName:"autoPlay-separator"},{propName:"autoPlay",category:"conditions",type:"switch",value:!1,label:{en:["Auto play (Youtube only).","Warning: on Chrome auto play is only allowed when the media doesn't include sound."],fr:["Lecture automatique (Youtube uniquement).","Attention : sur Chrome, la lecture automatique n'est autorisée que lorsque le support n'inclut pas le son."],es:["Reproducción automática (solo para vídeos de YouTube).","Aviso : En Chrome solo se permite la reproducción automática de videos sin sonido."],de:["Autoplay (nur für YouTube).","Achtung : Chrome erlaubt Autoplay nur, wenn das Medium keinen Ton hat."]}}]),ge=document.getElementById("abtasty-widget-react-form__widget");if(ge){var ye=ge.getAttribute("data-plugin-id");re="d5f5d126-4f25-413a-976e-6ca5f4a4734d"===ye||9===Number(ye)?de:"b5bb5334-ad3c-48bc-b9e0-4fc5fcce38e2"===ye||64===Number(ye)?pe:le}else re=le;return re});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.widgetForm=t()}(this,function(){"use strict";var e=function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}};var t=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)};var r=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var n=function(n){return e(n)||t(n)||r()},o={backgroundGroup:{propName:"backgroundGroup",category:"style",type:"group",label:{en:"Background",fr:"Fond",es:"Fondo",de:"Hintergrund"},collapsible:!0,children:[{propName:"backgroundColor",type:"colorpicker",category:"style",label:{en:"Background color",fr:"Couleur d'arrière-plan"},value:"rgba(255, 255, 255, 1)",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{category:"style",type:"short-separator",propName:"backgroundImage-style-separator",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{propName:"backgroundImage",type:"mediaupload",category:"style",label:{en:"Background image",fr:"Image d'arrière-plan"},conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{category:"style",type:"short-separator",propName:"overlay-style-separator",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{propName:"overlayOpacity",type:"slider",category:"style",label:{en:"Overlay opacity",fr:"Opacité de l'overlay",es:"Opacidad de la capa",de:"Overlay Opacity"},value:"50",unit:"%"}]},borderGroup:{propName:"borderGroup",category:"style",type:"group",label:{en:"Border",fr:"Bordure"},collapsible:!0,children:[{propName:"borderWidth",category:"style",type:"slider",unit:"px",value:0,min:0,max:10,label:{en:"Border Thickness",fr:"Largeur de la bordure"}},{category:"style",type:"short-separator",propName:"borderRadius-style-separator"},{propName:"borderRadius",category:"style",type:"slider",unit:"px",value:10,min:0,max:20,label:{en:"Border radius",fr:"Angle de la bordure"}},{category:"style",type:"short-separator",propName:"borderRadiusImage-separator",conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]},{propName:"borderRadiusImage",category:"style",type:"slider",unit:"px",value:10,min:0,max:20,label:{en:"Image Border radius",fr:"Angle de la bordure de l'image"},conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]},{category:"style",type:"short-separator",propName:"borderColor-style-separator"},{propName:"borderColor",category:"style",type:"colorpicker",label:{en:"Border color",fr:"Couleur de la bordure"},value:"rgba(0, 0, 0, 1)"}]},closeButtonGroup:{propName:"closeButtonGroup",category:"style",type:"group",label:{en:"Close button",fr:"Bouton de fermeture",es:"Botón cerrar",de:"Schließen-Button"},collapsible:!0,children:[{propName:"closeButtonPosition",category:"style",type:"radio",label:{en:"Close button position",fr:"Position du bouton de fermeture",es:"Posición del botón",de:"Button-Position"},value:"inside",options:[{label:{en:"Inside",fr:"À l'intérieur",es:"Dentro",de:"Innen"},value:"inside"},{label:{en:"Outside",fr:"À l'extérieur",es:"Fuera",de:"Außen"},value:"outside"}]},{category:"style",type:"short-separator",propName:"closeButtonColor-style-separator"},{propName:"closeButtonColor",type:"colorpicker",category:"style",label:{en:"Close button color",fr:"Couleur du bouton de fermeture",es:"Color del botón cerrar",de:"Button-Farbe"},value:"rgba(92, 92, 92, 1)"},{category:"style",type:"short-separator",propName:"closeBackgroundButtonColor-style-separator",conditions:[{field:"closeButtonPosition",value:"outside"}]},{propName:"backgroundCloseButtonColor",type:"colorpicker",category:"style",label:{en:"Background close button color",fr:"Couleur du fond du bouton de fermeture",es:"Background close button color",de:"Background close button color"},value:"rgba(255, 255, 255, 1)",conditions:[{field:"closeButtonPosition",value:"outside"}]}]},dimensions:[{propName:"widthImageWithText",type:"radio",category:"style",label:{en:"Width",fr:"Largeur"},value:"medium",options:[{label:{en:"Small",fr:"Petite",es:"Pequeño",de:"Klein"},value:"small"},{label:{en:"Medium",fr:"Moyenne",es:"Mediano",de:"Medium"},value:"medium"},{label:{en:"Large",fr:"Large",es:"Grande",de:"Groß"},value:"large"},{label:{en:"Custom",fr:"Sur mesure"},value:"custom"}],conditions:[{field:"type",value:function(e){return"video"!==e}},{field:"layout",value:function(e){return"imageOnly"!==e}}]},{propName:"widthImageOnly",type:"radio",category:"style",label:{en:"Width",fr:"Largeur"},value:"fit",options:[{label:{en:"Fit to size",fr:"S'adapte à la taille",es:"Ajustar",de:"Angepasst"},value:"fit"},{label:{en:"Small",fr:"Petite",es:"Pequeño",de:"Klein"},value:"small"},{label:{en:"Medium",fr:"Moyenne",es:"Mediano",de:"Medium"},value:"medium"},{label:{en:"Large",fr:"Large",es:"Grande",de:"Groß"},value:"large"}],conditions:[{field:"type",value:function(e){return"video"!==e}},{field:"layout",value:function(e){return"imageOnly"===e}}]},{propName:"customWidth",type:"number",category:"style",label:{en:"Custom width (%)",fr:"Largeur sur mesure (%)"},value:50,conditions:[{field:"widthImageWithText",value:"custom"}]}],animations:[{category:"style",type:"separator",propName:"animation-separator"},{propName:"animation",type:"radio",category:"style",label:{en:"Animation",fr:"Animation",es:"Animación",de:"Animation"},value:"none",options:[{label:{en:"None",fr:"Aucune",es:"Ninguna",de:"Keine"},value:"none"},{label:{en:"Slide In",fr:"Slide In",es:"Deslizar",de:"Slide In"},value:"slideIn"},{label:{en:"Fade In",fr:"Fade In",es:"Disolver",de:"Fade In"},value:"fadeIn"}]}]};var i=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e};function a(e,t){return e(t={exports:{}},t.exports),t.exports}var s=a(function(e){var t=function(e){var t,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(e,t,r,n){var o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),a=new C(n||[]);return i._invoke=function(e,t,r){var n=l;return function(o,i){if(n===d)throw new Error("Generator is already running");if(n===h){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=x(a,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var c=u(e,t,r);if("normal"===c.type){if(n=r.done?h:p,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=h,r.method="throw",r.arg=c.arg)}}}(e,r,a),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var l="suspendedStart",p="suspendedYield",d="executing",h="completed",g={};function y(){}function f(){}function v(){}var m={};m[i]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(T([])));w&&w!==r&&n.call(w,i)&&(m=w);var k=v.prototype=y.prototype=Object.create(m);function S(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function E(e){var t;this._invoke=function(r,o){function i(){return new Promise(function(t,i){!function t(r,o,i,a){var s=u(e[r],e,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?Promise.resolve(l.__await).then(function(e){t("next",e,i,a)},function(e){t("throw",e,i,a)}):Promise.resolve(l).then(function(e){c.value=e,i(c)},function(e){return t("throw",e,i,a)})}a(s.arg)}(r,o,t,i)})}return t=t?t.then(i,i):i()}}function x(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,x(e,r),"throw"===r.method))return g;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var o=u(n,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function T(e){if(e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}return{next:L}}function L(){return{value:t,done:!0}}return f.prototype=k.constructor=v,v.constructor=f,v[s]=f.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(k),e},e.awrap=function(e){return{__await:e}},S(E.prototype),E.prototype[a]=function(){return this},e.AsyncIterator=E,e.async=function(t,r,n,o){var i=new E(c(t,r,n,o));return e.isGeneratorFunction(r)?i:i.next().then(function(e){return e.done?e.value:i.next()})},S(k),k[s]="Generator",k[i]=function(){return this},k.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=T,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),N(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}});function c(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}var u=function(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,s,"next",e)}function s(e){c(i,n,o,a,s,"throw",e)}a(void 0)})}};var l=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var d=function(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),e},h=a(function(e){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(n){return"function"==typeof Symbol&&"symbol"===t(Symbol.iterator)?e.exports=r=function(e){return t(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":t(e)},r(n)}e.exports=r});var g=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e};var y=function(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?g(e):t},f=a(function(e){function t(r){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(r)}e.exports=t}),v=a(function(e){function t(r,n){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(r,n)}e.exports=t});var m=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)};var b=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o};var w=function(e,t){if(null==e)return{};var r,n,o=b(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o},k={en:"Recurrence",fr:"Récurrence",es:"Recurrencia",de:"Wiederholung"},S={en:"".concat(k.en," of the display"),fr:"".concat(k.fr," de l'affichage"),es:"".concat(k.es," de visualización"),de:"".concat(k.de," der Anzeige")},E={en:"".concat(k.en," after closure"),fr:"".concat(k.fr," après fermeture"),es:"".concat(k.es," tras el cierre"),de:"".concat(k.de," nach Schließung")},x={en:"".concat(k.en," after validation"),fr:"".concat(k.fr," après validation"),es:"".concat(k.es," tras la validación"),de:"".concat(k.de," nach der Validierung")},O={en:"Trigger",fr:"Déclencheur",es:"Activador",de:"Trigger"},N="abtasty_resetActionTracking";function C(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(e)),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r}function T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(r,!0).forEach(function(t){i(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var L,P={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"},I=T({},P,{label:E,propName:"closingRecurrence"}),R={category:"conditions",type:"group",label:k,collapsible:!0,children:[T({},P,{label:S,propName:"displayRecurrence"}),I,T({},P,{label:x,propName:"validationRecurrence"})]},A=[{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"}],B={category:"conditions",type:"selectelement",propName:"".concat("triggerEvent","Click"),label:O,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"}]},j={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"}]},D={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"}]},_={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"}]},G={category:"conditions",type:"group",label:O,collapsible:!0,children:[{category:"conditions",type:"select",label:{en:"Triggers on",fr:"Se déclenche",es:"¿ Cuándo se activa? ",de:"Triggert bei"},options:A,propName:"triggerEvent",value:"pageLoad"}].concat(n([B,j,D,_]))},q=function(){return Object.prototype.hasOwnProperty.call(window,"ABTastyEditor")},W=((L="undefined"!=typeof global?global:window).ABTasty||Object.assign(L,{ABTasty:{widgetutils:{}}}),L.ABTasty.widgetutils||Object.assign(L.ABTasty,{widgetutils:{}}),L).ABTasty.widgetutils;function V(e,t){return W.hasOwnProperty(e)||Object.assign(W,i({},e,new t)),W[e]}var M=function(){return"".concat(PACKAGE.replace("@abtasty/","")).concat(DATA&&DATA.type?"_".concat(DATA.type):"")},F=function(){return"".concat(PLUGIN_ID.split("-")[0],"_").concat(TEST_ID)},z=function(){if(q())return!1;var e=DATA;return{displayRecurrence:e.displayRecurrence,closingRecurrence:e.closingRecurrence,validationRecurrence:e.validationRecurrence}},H=function(){if(q())return!1;var e,t=DATA,r=t.triggerEvent,n=t.triggerEventClick,o=t.triggerEventExitDelay,i=t.triggerEventDelay,a=t.triggerEventReengageDelay,s=n;switch(r){case"exitIntent":e=o;break;case"delay":e=i;break;case"reengage":e=a;break;default:e=0}return{triggerEvent:r,triggerSelector:s,triggerDelay:e}};function K(){return"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype||(e="https://polyfill.io/v3/polyfill.min.js?flags=gated&features=IntersectionObserver",new Promise(function(t,r){var n=window.document.getElementsByTagName("script")[0],o=window.document.createElement("script");o.src=e,n.parentNode.insertBefore(o,n),o.onload=t,o.onerror=r}));var e}function J(e){return function(){return u(s.mark(function e(t){return s.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t,e.next="IntersectionObserver"===e.t0?3:6;break;case 3:return e.next=5,K();case 5:return e.abrupt("return",e.sent);case 6:return e.abrupt("return",!0);case 7:case"end":return e.stop()}},e)})).apply(this,arguments)}.apply(this,arguments)}var U=function(){function e(){l(this,e),this.uniqueId=F(),this.widgetName=M(),this.recurrenceParams=z(),this.triggerParams=H(),this.recurrence=!!this.recurrenceParams&&new Q(this.recurrenceParams),this.trigger=!!this.triggerParams&&new ee(this.triggerParams),this.pageWatcher=new te(this.recurrence,this.isWidgetApplied.bind(this),this.onPageChange.bind(this)),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(),this.hasBeenShown=!1}return d(e,[{key:"isWidgetApplied",value:function(){return this.domElement&&!!this.domElement.closest("body")}},{key:"insert",value:function(){var e=this;return ne("head",function(t){return t.appendChild(e.styleElement)},function(e){return console.error(e)}),ne("body",function(t){return t.appendChild(e.domElement)},function(e){return console.error(e)}),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.hasBeenShown=!0,q()||this.pageWatcher.watch(),this}},{key:"hide",value:function(){return this.domElement.classList.add(this.hideClassName),this}},{key:"init",value:function(){var e=u(s.mark(function e(){var t;return s.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.recurrence&&this.recurrence.isOver(),!this.recurrence||t){e.next=4;break}return this.pageWatcher.watch(),e.abrupt("return",!1);case 4:if(q()||this.pageWatcher.watch(),e.t0=q()||!this.trigger,e.t0){e.next=13;break}if(e.t1=this.trigger,!e.t1){e.next=12;break}return e.next=11,this.trigger.isTriggered();case 11:e.t1=e.sent;case 12:e.t0=e.t1;case 13:if(e.t0){e.next=16;break}return e.abrupt("return",!1);case 16:return this.insert(),this.addCloseEvent(),e.abrupt("return",this);case 19:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"onPageChange",value:function(e){var t=this;switch(e){case"remove":this.hasBeenShown?this.remove():this.trigger.clear()&&this.pageWatcher.watch();break;case"rebuild":this.hasBeenShown?this.insert().show():t.init().then(function(e){return e&&t.show()})}}},{key:"addCloseEvent",value:function(){for(var e=this,t=this.domElement.querySelectorAll("\n\t\t\t.".concat(this.overlayClassName,",\n\t\t\t.").concat(this.closeButtonClassName,"\n\t\t")),r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return o.push.apply(o,n(t)),o.forEach(function(t){t.addEventListener("click",function(){e.recurrence&&e.recurrence.setClosingRecurrence(),e.hide()},{passive:!0,once:!0})}),this}},{key:"getDom",value:function(){var e=document.createElement("div");return e.className="".concat(this.basicClassName," ").concat(this.hideClassName),e.id=this.widgetContainerId,e.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(q()?"data-abtasty-actionnable":"",">+</button>\n\t\t\t</div>"),e}},{key:"getStyleTag",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=document.createElement("style");return t.type="text/css",q()&&t.setAttribute("abtasty-script-added","true"),t.textContent="\n\t\t\t.".concat(this.hideClassName," {opacity: 0 !important; pointer-events: none;}\n\t\t\t").concat(e),t}}]),e}();(function(e){function t(){var e;return l(this,t),(e=y(this,f(t).call(this))).stringStyles=e.getStyles(),e.styleElement=e.getStyleTag(e.stringStyles),e}m(t,U),d(t,[{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(e){function t(e){var r;return l(this,t),(r=y(this,f(t).call(this))).position=e,r.stringStyles=r.getStyles(),r.styleElement=r.getStyleTag(r.stringStyles),r}m(t,U),d(t,[{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(e){function t(e,r){var n;return l(this,t),(n=y(this,f(t).call(this))).position=e,n.referrerElement=r,n.stringStyles=n.getStyles(),n.styleElement=n.getStyleTag(n.stringStyles),n}m(t,U),d(t,[{key:"insert",value:function(){var e=this;return ne("head",function(t){return t.appendChild(e.styleElement)},function(e){return console.error(e)}),ne(this.referrerElement,function(t){return t.insertAdjacentElement(e.position,e.domElement)},function(e){return console.error(e)}),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 Y(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(e)),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r}function Z(e){var t=function(e,t){if("object"!==h(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===h(t)?t:String(t)}var Q=function(){function e(t){var r=t.displayRecurrence,n=t.closingRecurrence,o=t.validationRecurrence;l(this,e),this.displayRecurrence=parseFloat(r),this.closingRecurrence=parseFloat(n),this.validationRecurrence=parseFloat(o),this.widgetName=M(),this.uniqueId=F(),this.recurrenceKey="".concat(this.widgetName,"_").concat(this.uniqueId)}return d(e,[{key:"getGivenRecurrenceStorageParsed",value:function(e){try{var t=e.getItem("ABTastyWidgets");return JSON.parse(t)}catch(t){return e.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(e,t){var r=this.recurrenceKey,n=(t[r],w(t,[r].map(Z)));return Object.entries(n).length?(e.setItem("ABTastyWidgets",JSON.stringify(n)),n):(e.removeItem("ABTastyWidgets"),!1)}},{key:"removeSessionRecurrenceStorage",value:function(){var e=this.getSessionRecurrenceStorageParsed();return!!e&&this.removeGivenStorage(window.sessionStorage,e)}},{key:"removeLocalRecurrenceStorage",value:function(){var e=this.getLocalRecurrenceStorageParsed();return!!e&&this.removeGivenStorage(window.localStorage,e)}},{key:"getSessionRecurrence",value:function(){var e=this.getSessionRecurrenceStorageParsed();return!!e&&e[this.recurrenceKey]}},{key:"getLocalRecurrence",value:function(){var e=this.getLocalRecurrenceStorageParsed();return!!e&&e[this.recurrenceKey]}},{key:"getCurrentRecurrence",value:function(){var e=this.getSessionRecurrence(),t=this.getLocalRecurrence();return e||t||{type:!1}}},{key:"isOver",value:function(){var e=this.getLocalRecurrence(),t=(e?parseFloat(e.stamp):0)<(new Date).getTime();return t&&this.removeLocalRecurrenceStorage(),t&&!this.getLocalRecurrence()&&!this.getSessionRecurrence()}},{key:"setRecurrence",value:function(e,t){var r=this,n=this.getTypeOfStorage(e);if(!n&&"object"!==h(n))return!1;var o=this.getTypeOfStorage(e),a=o.storageString,s=o.storageMethod,c=this.getStamp(e),u={type:t,stamp:c},l=this.getCurrentRecurrence().type,p=function(){var e,t=r.getSessionRecurrence(),n=r.getLocalRecurrence();"session"===a?t?e=r.removeSessionRecurrenceStorage():(r.removeLocalRecurrenceStorage(),e=r.getSessionRecurrenceStorageParsed()):"local"===a&&(n?e=r.removeLocalRecurrenceStorage():(r.removeSessionRecurrenceStorage(),e=r.getLocalRecurrenceStorageParsed()));var o=e?function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Y(r,!0).forEach(function(t){i(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}(i({},r.recurrenceKey,u),e):i({},r.recurrenceKey,u);s.setItem("ABTastyWidgets",JSON.stringify(o))};if(!s)return!1;if(l&&"validation"!==t)if("closing"===t&&"validation"!==l)p();else{if("display"!==t||"validation"===l||"closing"===l)return!1;p()}else p();return c}},{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(e){return(new Date).getTime()+864e5*e}},{key:"getTypeOfStorage",value:function(e){return!(isNaN(e)||e<0||0!==e&&!e)&&(e>0?{storageString:"local",storageMethod:window.localStorage}:0===e&&{storageString:"session",storageMethod:window.sessionStorage})}}]),e}(),X=function(){function e(){l(this,e),this.targets=[],this.existingTargets=[],this.inViewPortTargets=[],this.visibilityobserver=this.startVisibilityObserver(),this.mutationobserver=this.startMutationObserver()}return d(e,[{key:"intersectionHandler",value:function(e){var t=this;e.forEach(function(e){e.isIntersecting?(t.existingTargets=t.existingTargets.filter(function(r){return r.element!==e.target||(t.inViewPortTargets.push(r),!1)}),t.checkElements()):t.inViewPortTargets=t.inViewPortTargets.filter(function(r){return r.element!==e.target||(t.existingTargets.push(r),!1)})})}},{key:"startVisibilityObserver",value:function(){return new IntersectionObserver(this.intersectionHandler.bind(this),{root:null,rootMargin:"0px",threshold:.5})}},{key:"startMutationObserver",value:function(){var e=new MutationObserver(this.checkElements.bind(this));return e.observe(document,{attributes:!0,childList:!0,subtree:!0}),e}},{key:"isElementVisible",value:function(e){return this.isElementTopmost(e)&&this.isElementOpaque(e)}},{key:"isElementOpaque",value:function(e){return"HTML"===function e(t,r){return r(t)||!t.parentElement?t:e(t.parentElement,r)}(e,function(e){return"0"===window.getComputedStyle(e).opacity}).nodeName}},{key:"isElementTopmost",value:function(e){for(var t=e.getBoundingClientRect(),r=[[t.left,t.top],[t.right,t.top],[t.left,t.bottom],[t.right,t.bottom]],o=!1,i=0;!o&&i<r.length;){var a,s=(a=document).elementFromPoint.apply(a,n(r[i]));o=e===s||e.contains(s),i++}return o}},{key:"checkElements",value:function(){var e=this;this.targets=this.targets.filter(function(t){var r=document.querySelector(t.selector);return!r||(e.existingTargets.push(Object.assign(t,{element:r})),e.visibilityobserver.observe(r),!1)}),this.existingTargets=this.existingTargets.filter(function(t){return!!document.querySelector(t.selector)||(e.visibilityobserver.unobserve(t.element),e.targets.push(t),!1)}),this.inViewPortTargets=this.inViewPortTargets.filter(function(t){var r=t.element,n=t.resolve;return!e.isElementVisible(r)||(e.visibilityobserver.unobserve(r),n(r),!1)})}},{key:"watch",value:function(e,t){this.targets.push({selector:e,resolve:t})}},{key:"clear",value:function(e){var t=this.targets.filter(function(t){return t.selector!==e});0===t.length&&(this.existingTargets=[],this.inViewPortTargets=[],this.mutationobserver.disconnect(),this.visibilityobserver.unobserve(e)),this.targets.length>t&&(this.targets=t,this.visibilityobserver.unobserve(e))}}]),e}(),$=function(){var e={promise:null,resolve:null,reject:null};return e.promise=new Promise(function(t,r){e.resolve=t,e.reject=r}),e},ee=function(){function e(t){var r=t.triggerEvent,n=t.triggerSelector,o=t.triggerDelay;l(this,e),this.event=r,this.selector=n&&n.length?n:"body",this.delay=o,this.elementsSelectors=[],this.eventsListeners=[],this.timeouts=[],this.intervals=[],this.observers=[],this.promises=[],this.visibilityObservers=[]}return d(e,[{key:"onElementVisible",value:function(){var e=u(s.mark(function e(){var t,r,n,o;return s.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=$(),this.promises.push(t),e.next=4,this.onPageLoad();case 4:return r=e.sent,e.next=7,J("IntersectionObserver");case 7:return n=e.sent,o=V("VisibilityObserver",X),this.visibilityObservers.push(o),n&&r&&o.watch(this.selector,t.resolve),e.abrupt("return",t.promise);case 12:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"onPageLoad",value:function(){var e=$();this.promises.push(e);var t=function(){return"complete"===document.readyState};if(t())return e.resolve(!0);var r,n=setTimeout(function(){var t;return(t=document).removeEventListener.apply(t,o),e.resolve(!1)},15e3),o=["readystatechange",function(){return t()&&!clearTimeout(n)&&e.resolve(!0)},{passive:!0}];return this.clearTrigger=function(){var t;clearTimeout(n),(t=document).removeEventListener.apply(t,o),e.resolve(!1)},(r=document).addEventListener.apply(r,o),e.promise}},{key:"onClick",value:function(){var e,t=this,r=document.createElement("style");r.type="text/css",r.id="Click_".concat(F()),r.innerHTML="".concat(this.selector," {\n\t\t\tcursor: pointer !important;\n\t\t\tpointer-events: all !important;\n\t\t}"),document.head.appendChild(r),this.elementsSelectors.push("#".concat(r.id));var o=$();this.promises.push(o);var i=["click",function(e){return!!function(e){return n(document.querySelectorAll(t.selector)).some(function(r){return r.isSameNode(e)||!!e.closest(t.selector)})}(e.target)&&(o.resolve(!0),t.clear())},{passive:!0,capture:!0}];return this.eventsListeners.push(i),(e=document).addEventListener.apply(e,i),o.promise}},{key:"onExitIntent",value:function(){var e=u(s.mark(function e(){var t,r,n=this;return s.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=$(),this.promises.push(t),r=["mouseleave",function(){var e=u(s.mark(function e(){var r,o;return s.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.delay){e.next=6;break}r=1e3*n.delay,o=setTimeout(function(){t.resolve(!0),n.clear()},r),n.timeouts.push(o),e.next=9;break;case 6:return t.resolve(!0),n.clear(),e.abrupt("return");case 9:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),{passive:!0,once:!0}],e.next=6,this.onPageLoad();case 6:return e.sent&&ne("body",function(e){e.addEventListener.apply(e,r),n.eventsListeners.push(r)}),e.abrupt("return",t.promise);case 9:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"onDelay",value:function(){var e=u(s.mark(function e(){var t,r,n,o=this;return s.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=$(),this.promises.push(t),r=1e3*this.delay,e.next=5,this.onPageLoad();case 5:return e.sent&&(n=setTimeout(function(){t.resolve(!0),o.clear()},r),this.timeouts.push(n)),e.abrupt("return",t.promise);case 8:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"onReengage",value:function(){var e=this,t=$();this.promises.push(t);var r=1e3*this.delay,n=r,o=[function(){return n=r},{passive:!0}];["click","mousemove","scroll","keypress"].forEach(function(t){var r;(r=document).addEventListener.apply(r,[t].concat(o)),e.eventsListeners.push([t].concat(o))});var i=setInterval(function(){n<=0?(t.resolve(!0),e.clear()):n-=100},100);return this.intervals.push(i),t.promise}},{key:"clear",value:function(){var e=this;return this.elementsSelectors.length&&(this.elementsSelectors.forEach(function(e){document.querySelector(e)&&document.querySelector(e).remove()}),this.elementsSelectors=[]),this.eventsListeners.length&&(this.eventsListeners.forEach(function(e){var t;return(t=document).removeEventListener.apply(t,n(e))}),this.eventsListeners=[]),this.timeouts.length&&(this.timeouts.forEach(function(e){return clearTimeout(e)}),this.timeouts=[]),this.intervals.length&&(this.intervals.forEach(function(e){return clearInterval(e)}),this.intervals=[]),this.observers.length&&(this.observers.forEach(function(e){return e.disconnect()}),this.observers=[]),this.visibilityObservers.length&&(this.visibilityObservers.forEach(function(t){return t.clear(e.selector)}),this.visibilityObservers=[]),this.promises.length&&(this.promises.forEach(function(e){return e.resolve(!1)}),this.promises=[]),this}},{key:"isTriggered",value:function(){var e=u(s.mark(function e(){var t;return s.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this.clear(),e.t0=this.event,e.next="pageLoad"===e.t0?4:"click"===e.t0?8:"exitIntent"===e.t0?12:"delay"===e.t0?16:"reengage"===e.t0?20:"elementVisible"===e.t0?24:28;break;case 4:return e.next=6,this.onPageLoad();case 6:return t=e.sent,e.abrupt("break",29);case 8:return e.next=10,this.onClick();case 10:return t=e.sent,e.abrupt("break",29);case 12:return e.next=14,this.onExitIntent();case 14:return t=e.sent,e.abrupt("break",29);case 16:return e.next=18,this.onDelay();case 18:return t=e.sent,e.abrupt("break",29);case 20:return e.next=22,this.onReengage();case 22:return t=e.sent,e.abrupt("break",29);case 24:return e.next=26,this.onElementVisible();case 26:return t=e.sent,e.abrupt("break",29);case 28:t=!1;case 29:return e.abrupt("return",t);case 30:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()}]),e}();var te=function(){function e(t,r,n){l(this,e),this.recurrence=t,this.isWidgetApplied=r,this.callback=n,this.observer=new MutationObserver(this.observerHandler.bind(this)),this.eventListenerParams=[N,this.eventHandler.bind(this),{passive:!0}]}return d(e,[{key:"recurrenceIsDone",value:function(){return!this.recurrence||this.recurrence.isOver()}},{key:"decisionHandler",value:function(e){var t=this,r=!!window.ABTasty.getTestsOnPage()[TEST_ID],n=(this.recurrence?this.recurrence.getCurrentRecurrence():{type:!1}).type,o=function(){return e&&"display"===n||t.recurrenceIsDone()};return!this.isWidgetApplied()&&r&&o()?(this.clearWatcher(),this.callback("rebuild")):(!this.isWidgetApplied()||r&&o())&&(this.isWidgetApplied()||r)||(this.clearWatcher(),this.callback("remove"),this.watch()),this}},{key:"eventHandler",value:function(){var e=this;return setTimeout(function(){e.decisionHandler(!1)},250),this}},{key:"observerHandler",value:function(e){var t=e.some(function(e){var t=e.removedNodes;return t&&t.length}),r=e.some(function(e){var t=e.addedNodes;return t&&t.length});return t||r?(this.decisionHandler(!0),this):this}},{key:"watch",value:function(){var e,t=this;return this.clearWatcher(),(e=document).addEventListener.apply(e,n(this.eventListenerParams)),ne("body",function(e){var r,n=[e,{childList:!0,subtree:!0}];(r=t.observer).observe.apply(r,n)}),this}},{key:"clearWatcher",value:function(){var e;return(e=document).removeEventListener.apply(e,n(this.eventListenerParams)),this.observer.disconnect(),this}}]),e}(),re=function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];r.unshift("[AB Tasty Widget] ".concat(PACKAGE,":")),(e=console).log.apply(e,r)},ne=function(e,t,r){var n,o=0;try{document.querySelector(e)}catch(t){var i="Selector «".concat(e,"» not valid.");return re(i),"function"==typeof r&&r(i)}n=setTimeout(function(){clearInterval(o);var t="Can't find element «".concat(e,"».");return re(t),"function"==typeof r&&r(t)},1e4),o=setInterval(function(){var r=document.querySelector(e);if(null!==r)return clearTimeout(n),clearInterval(o),"function"==typeof t&&t(r)},200)};R.children[R.children.length-1].label={en:"Recurrence after redirection",fr:"Récurrence après redirection",es:"Recurrencia después de la redirección",de:"Wiederholung nach Weiterleitung"};var oe,ie=[R,G],ae={title:{propName:"title",type:"wysiwyg",category:"content",label:{en:"Title",fr:"Titre"},placeholder:{en:"Some title",fr:"Mon titre"},value:{en:"Title",fr:"Titre"},conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},buttonSettings:[{category:"content",type:"separator",propName:"button-separator"},{propName:"button",category:"content",type:"switch",value:!1,label:{en:"Add a button",fr:"Ajouter un bouton",es:"Añadir un botón",de:"Button hinzufügen"}},{propName:"buttonText",type:"text",category:"content",label:{en:"Button text",fr:"Texte du bouton",es:"Texto del botón",de:"Button-Text"},value:{en:"Accept",fr:"Valider"},placeholder:{en:"Submit",fr:"Valider"},conditions:[{field:"button"}]},{propName:"buttonLink",type:"text",category:"content",label:{en:"Button link",fr:"Lien du bouton",es:"Enlace del botón",de:"Button-Link"},value:location.origin,conditions:[{field:"button"}]},{propName:"buttonTextColor",category:"content",type:"colorpicker",label:{en:"Button text color",fr:"Couleur du texte du bouton",es:"Color del texto del botón",de:"Button-Textfarbe"},value:"rgba(255, 255, 255, 1)",conditions:[{field:"button"}]},{propName:"buttonBackgroundColor",category:"content",type:"colorpicker",label:{en:"Button background color",fr:"Couleur de fond du bouton",es:"Color del botón",de:"Button-Hintergrundfarbe"},value:"rgba(0, 156, 178, 1)",conditions:[{field:"button"}]}]},se="https://widgets-images.abtasty.com/modal/",ce="".concat(se,"image/"),ue="".concat(se,"simple/"),le="".concat(se,"video/"),pe=[{propName:"type",value:"image",type:"hidden",category:"layout"},{propName:"layout",category:"layout",value:"imageOnly",type:"radioImage",options:[{label:{en:"Image only",fr:"Image seule",es:"Solo imagen",de:"Nur Bild"},value:"imageOnly",src:"".concat(ce,"image-only.png")},{label:{en:"Left",fr:"Gauche"},value:"left",src:"".concat(ce,"left.png")},{label:{en:"Right",fr:"Droite"},value:"right",src:"".concat(ce,"right.png")},{label:{en:"Top",fr:"Haut"},value:"top",src:"".concat(ce,"top.png")},{label:{en:"Bottom",fr:"Bas"},value:"bottom",src:"".concat(ce,"bottom.png")}]},{propName:"image",type:"mediaupload",category:"content",label:{en:"Image",fr:"Image",es:"Imagen",de:"Bild"}},{category:"content",type:"separator",propName:"title-separator",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},ae.title,{category:"content",type:"separator",propName:"wysiwyg-content-separator",conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]},{propName:"content",type:"wysiwyg",category:"content",label:{en:"Content",fr:"Contenu"},value:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]}].concat(n(ae.buttonSettings),n(o.dimensions),[{type:"separator",category:"style"},o.backgroundGroup,{type:"separator",category:"style"},o.borderGroup,{type:"separator",category:"style"},o.closeButtonGroup],n(o.animations),n(ie)),de=[{propName:"type",value:"simple",type:"hidden",category:"layout"},{propName:"layout",category:"layout",value:"center",type:"radioImage",options:[{label:{en:"Center",fr:"Centre"},value:"center",src:"".concat(ue,"center.png")},{label:{en:"Left",fr:"Gauche"},value:"left",src:"".concat(ue,"left.png")},{label:{en:"Right",fr:"Droite"},value:"right",src:"".concat(ue,"right.png")}]},ae.title,{category:"content",type:"separator",propName:"title-content-separator"},{propName:"content",type:"wysiwyg",category:"content",label:{en:"Content",fr:"Contenu"},value:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."}].concat(n(ae.buttonSettings),n(o.dimensions),[{type:"separator",category:"style"},o.backgroundGroup,{type:"separator",category:"style"},o.borderGroup,{type:"separator",category:"style"},o.closeButtonGroup],n(o.animations),n(ie)),he=[{propName:"type",value:"video",type:"hidden",category:"layout"},{propName:"layout",category:"layout",value:"no-title",type:"radioImage",options:[{label:{en:"No title",fr:"Sans titre",es:"Sin título",de:"Kein Titel"},value:"no-title",src:"".concat(le,"video-only.png")},{label:{en:"Top",fr:"Haut"},value:"top",src:"".concat(le,"bottom.png")},{label:{en:"Bottom",fr:"Bas"},value:"bottom",src:"".concat(le,"top.png")}]},ae.title,{propName:"videoLink",type:"text",category:"content",label:{en:"URL (Youtube or Vimeo)",fr:"URL (Youtube ou Vimeo)"},value:"https://www.youtube.com/watch?v=btb3bKfxims"}].concat(n(ae.buttonSettings),n(o.dimensions),[{type:"separator",category:"style",conditions:[{field:"type",value:function(e){return"video"!==e}},{field:"layout",value:function(e){return"imageOnly"!==e}}]},o.backgroundGroup,{type:"separator",category:"style"},o.borderGroup,{type:"separator",category:"style"},o.closeButtonGroup],n(o.animations),n(ie),[{category:"content",type:"separator",propName:"autoPlay-separator"},{propName:"autoPlay",category:"conditions",type:"switch",value:!1,label:{en:["Auto play (Youtube only).","Warning: on Chrome auto play is only allowed when the media doesn't include sound."],fr:["Lecture automatique (Youtube uniquement).","Attention : sur Chrome, la lecture automatique n'est autorisée que lorsque le support n'inclut pas le son."],es:["Reproducción automática (solo para vídeos de YouTube).","Aviso : En Chrome solo se permite la reproducción automática de videos sin sonido."],de:["Autoplay (nur für YouTube).","Achtung : Chrome erlaubt Autoplay nur, wenn das Medium keinen Ton hat."]}}]),ge=document.getElementById("abtasty-widget-react-form__widget");if(ge){var ye=ge.getAttribute("data-plugin-id");oe="d5f5d126-4f25-413a-976e-6ca5f4a4734d"===ye||9===Number(ye)?de:"b5bb5334-ad3c-48bc-b9e0-4fc5fcce38e2"===ye||64===Number(ye)?he:pe}else oe=pe;return oe});

@@ -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 h?e:h,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 h(){}function f(){}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=h.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 S(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 O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,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 f.prototype=_.constructor=g,g.constructor=f,g[s]=f.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"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(O),!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),O(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;O(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 h=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function f(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&&f(t.prototype,e),n&&f(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});var v=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},w=Object.freeze({default:v,__moduleExports:v}),_=w&&v||w;var x=function(t,e){return!e||"object"!==b(e)&&"function"!=typeof e?_(t):e},k=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}),E=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}),S=Object.freeze({default:E,__moduleExports:E}),O=S&&E||S;var C=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&&O(t,e)};function T(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 P=function(t){return function(){var e=this,n=arguments;return new Promise(function(r,a){var o=t.apply(e,n);function i(t){T(o,r,a,i,s,"next",t)}function s(t){T(o,r,a,i,s,"throw",t)}i(void 0)})}};var R=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},L=Object.freeze({default:R,__moduleExports:R}),A=L&&R||L;var I=function(t,e){if(null==t)return{};var n,r,a=A(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},N="Recurrence",j="Récurrence",B="Recurrencia",W="Wiederholung",D={en:"".concat(N," of the display"),fr:"".concat(j," de l'affichage"),es:"".concat(B," de visualización"),de:"".concat(W," der Anzeige")},z={en:"".concat(N," after closure"),fr:"".concat(j," après fermeture"),es:"".concat(B," tras el cierre"),de:"".concat(W," nach Schließung")},q={en:"".concat(N," after validation"),fr:"".concat(j," après validation"),es:"".concat(B," tras la validación"),de:"".concat(W," nach der Validierung")},M={en:"Trigger",fr:"Déclencheur",es:"Activador",de:"Trigger"},V="abtasty_resetActionTracking",Y="remove",G="rebuild";function H(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 F(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?H(n,!0).forEach(function(e){m(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):H(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var J,K={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"},U=(F({},K,{label:z,propName:"closingRecurrence"}),F({},K,{label:D,propName:"displayRecurrence"}),F({},K,{label:q,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"}]),Z={category:"conditions",type:"selectelement",propName:"".concat("triggerEvent","Click"),label:M,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"}]},$={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"}]},Q={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"}]},X={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"}]},tt=([{category:"conditions",type:"select",label:{en:"Triggers on",fr:"Se déclenche",es:"¿ Cuándo se activa? ",de:"Triggert bei"},options:U,propName:"triggerEvent",value:"pageLoad"}].concat(p([Z,$,Q,X])),function(){return Object.prototype.hasOwnProperty.call(window,"ABTastyEditor")}),et=((J="undefined"!=typeof global?global:window).ABTasty||Object.assign(J,{ABTasty:{widgetutils:{}}}),J.ABTasty.widgetutils||Object.assign(J.ABTasty,{widgetutils:{}}),J).ABTasty.widgetutils;function nt(t,e){return et.hasOwnProperty(t)||Object.assign(et,m({},t,new e)),et[t]}var rt=function(){return"".concat(PACKAGE.replace("@abtasty/","")).concat(DATA&&DATA.type?"_".concat(DATA.type):"")},at=function(){return"".concat(PLUGIN_ID.split("-")[0],"_").concat(TEST_ID)},ot=function(){if(tt())return!1;var t=DATA;return{displayRecurrence:t.displayRecurrence,closingRecurrence:t.closingRecurrence,validationRecurrence:t.validationRecurrence}},it=function(){if(tt())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}},st=function(){function t(){h(this,t),this.uniqueId=at(),this.widgetName=rt(),this.recurrenceParams=ot(),this.triggerParams=it(),this.recurrence=!!this.recurrenceParams&&new ut(this.recurrenceParams),this.trigger=!!this.triggerParams&&new mt(this.triggerParams),this.pageWatcher=new ht(this.recurrence,this.isWidgetApplied.bind(this),this.onPageChange.bind(this)),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(),this.hasBeenShown=!1}return g(t,[{key:"isWidgetApplied",value:function(){return this.domElement&&!!this.domElement.closest("body")}},{key:"insert",value:function(){var t=this;return top.console.log("insert"),gt("head",function(e){return e.appendChild(t.styleElement)},function(t){return console.error(t)}),gt("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 top.console.log("show"),this.domElement.classList.remove(this.hideClassName),this.recurrence&&this.recurrence.setDisplayRecurrence(),this.hasBeenShown=!0,this.pageWatcher.watch(),this}},{key:"hide",value:function(){return this.domElement.classList.add(this.hideClassName),this}},{key:"init",value:function(){var t=P(r.mark(function t(){var e,n;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.recurrence&&!this.recurrence.isOver(),t.t0=tt()||!this.trigger,t.t0){t.next=9;break}if(t.t1=this.trigger,!t.t1){t.next=8;break}return t.next=7,this.trigger.isTriggered();case 7:t.t1=t.sent;case 8:t.t0=t.t1;case 9:if(n=t.t0,e||n){t.next=13;break}return this.pageWatcher.watch(),t.abrupt("return",this);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:"onPageChange",value:function(t){var e=this;switch(top.console.log("onPageChange",t),t){case Y:this.hide(),this.remove();break;case G:this.hasBeenShown?this.insert().show():this.init().then(function(){return e.show()})}}},{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(tt()?"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",tt()&&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 h(this,e),(t=x(this,k(e).call(this))).stringStyles=t.getStyles(),t.styleElement=t.getStyleTag(t.stringStyles),t}C(e,st),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 h(this,e),(n=x(this,k(e).call(this))).position=t,n.stringStyles=n.getStyles(),n.styleElement=n.getStyleTag(n.stringStyles),n}C(e,st),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 h(this,e),(r=x(this,k(e).call(this))).position=t,r.referrerElement=n,r.stringStyles=r.getStyles(),r.styleElement=r.getStyleTag(r.stringStyles),r}C(e,st),g(e,[{key:"insert",value:function(){var t=this;return gt("head",function(e){return e.appendChild(t.styleElement)},function(t){return console.error(t)}),gt(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 ct(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 lt(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 ut=function(){function t(e){var n=e.displayRecurrence,r=e.closingRecurrence,a=e.validationRecurrence;h(this,t),this.displayRecurrence=parseFloat(n),this.closingRecurrence=parseFloat(r),this.validationRecurrence=parseFloat(a),this.widgetName=rt(),this.uniqueId=at(),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],I(e,[n].map(lt)));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?ct(n,!0).forEach(function(e){m(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ct(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 dt(){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 yt(t){return function(){return P(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,dt();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 pt=function(){function t(){h(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}(),mt=function(){function t(e){var n=e.triggerEvent,r=e.triggerSelector,a=e.triggerDelay;h(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=P(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,yt();case 5:o=t.sent,i=nt("VisibilityObserver",pt),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=P(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=P(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&&gt("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=P(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=P(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 ht=function(){function t(e,n,r){h(this,t),this.recurrence=e,this.isWidgetApplied=n,this.callback=r,this.observer=new MutationObserver(this.observerHandler.bind(this)),this.observerParams=[!console.log(document)&&!console.log(document.body)&&document.body,{childList:!0,subtree:!0}],this.eventListenerParams=[V,this.eventHandler.bind(this),{passive:!0}]}return g(t,[{key:"recurrenceIsDone",value:function(){return!this.recurrence||this.recurrence.isOver()}},{key:"decisionHandler",value:function(t){var e=this,n=!!window.ABTasty.getTestsOnPage()[TEST_ID],r=(this.recurrence?this.recurrence.getCurrentRecurrence():{type:!1}).type,a=function(){return t&&"display"===r||e.recurrenceIsDone()};return top.console.log("this.isWidgetApplied()",this.isWidgetApplied()),top.console.log("affectedToCampaign",n),top.console.log("isBlockingRecurrence()",a()),!this.isWidgetApplied()&&n&&a()?(this.clearWatcher(),this.callback(G)):!this.isWidgetApplied()||n&&a()||(this.clearWatcher(),this.callback(Y),this.watch()),this}},{key:"eventHandler",value:function(){var t=this;return setTimeout(function(){t.decisionHandler(!1)},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(!0),this):this}},{key:"watch",value:function(){var t,e;return(t=document).addEventListener.apply(t,p(this.eventListenerParams)),top.console.log("watch => obserParams",this.observerParams),(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}(),ft=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)},gt=function(t,e,n){var r,a=0;try{document.querySelector(t)}catch(e){var o="Selector «".concat(t,"» not valid.");return ft(o),"function"==typeof n&&n(o)}r=setTimeout(function(){clearInterval(a);var e="Can't find element «".concat(t,"».");return ft(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 bt=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 vt,wt,_t,xt,kt,Et=DATA,St=Et.type,Ot=Et.animation,Ct=Et.backgroundColor,Tt=Et.overlayOpacity,Pt=Et.backgroundImage,Rt=Et.borderRadius,Lt=Et.borderRadiusImage,At=Et.borderWidth,It=Et.borderColor,Nt=Et.button,jt=Et.buttonBackgroundColor,Bt=Et.buttonLink,Wt=Et.buttonText,Dt=Et.buttonTextColor,zt=Et.backgroundCloseButtonColor,qt=Et.closeButtonColor,Mt=Et.closeButtonPosition,Vt=Et.content,Yt=Et.customWidth,Gt=Et.title,Ht=Et.layout,Ft=Et.videoLink,Jt=Et.widthImageWithText,Kt=Et.widthImageOnly,Ut=Et.autoPlay,Zt=St.replace(/^\w/,function(t){return t.toUpperCase()}),$t="imageOnly"===Ht?Kt:Jt,Qt=DATA.image||"https://widgets-images.abtasty.com/image-placeholder.png",Xt="abtasty-modal__underlay",te=".abtasty-modal__close";function ee(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 ne(t){ee("click","".concat(Xt,", ").concat(te),function(){vt.style.display="none","video"===St&&(vt.innerHTML=""),ABTastyEvent("".concat(Zt," modal closed"),null,TEST_ID),t.setClosingRecurrence()},!0)}function re(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e={layout:Ht,type:St,borderRadius:Rt,borderRadiusImage:Lt,borderWidth:At,borderColor:It,button:Nt,buttonBackgroundColor:jt,buttonLink:Bt,buttonText:Wt,buttonTextColor:Dt,backgroundColor:"imageOnly"!==Ht?Ct:"initial",overlayOpacity:Tt,backgroundImage:Pt,image:Qt,width:$t,videoLink:Ft,customWidth:Yt,animation:Ot,title:Gt,closeButtonPosition:Mt,backgroundCloseButtonColor:zt,modalContent:Vt||t.outerHTML};(vt.className="abtasty-modal abtasty-modal--".concat(St),vt.dataset.testId=TEST_ID,vt.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,h,f,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"+bt.attr("href",p,!0,!0)+' target="_self"'+bt.attr("style",bt.style({"background-color":y+"!important",color:h+"!important"}),!0,!0)+">")+bt.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"+(bt.attr("src",b,!0,!0)+bt.attr("style",bt.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"+(bt.attr("src",b,!0,!0)+bt.attr("style",bt.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"+bt.attr("class",bt.classes(["abtasty-modal__close",f?"abtasty-modal__close--"+f:""],[!1,!0]),!1,!0)+" data-abtasty-actionnable"+bt.attr("style",bt.style("outside"===f?{"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"'+bt.attr("style",bt.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"+bt.attr("style",bt.style({"background-color":"rgba(0, 0, 0, "+_/100+")"}),!0,!0)+"></abtasty-modal__underlay>")+"<div"+(bt.attr("class",bt.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)+bt.attr("style",bt.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){bt.rethrow(t,void 0,void 0,a[void 0])}return n}(e),document.body.appendChild(vt),wt=vt.querySelector(".abtasty-modal__area"),qt)&&(vt.querySelector("".concat(te," .close-x")).style.stroke=qt);return new Promise(function(t){t(!0)})}function ae(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"),Ut&&(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 oe(){var t=(window.innerWidth>630?.5*window.innerWidth:window.innerWidth-40)/16*9;return Math.round(t)}function ie(){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=ae(Ft),o=oe(),n.style.height="".concat(o,"px"),"no-title"===Ht&&(n.style.border="".concat(At,"px solid ").concat(It,"!important"),n.style.borderRadius="".concat(Rt,"px!important")),n.src=a,n.frameBorder=0,n.allowfullscreen=!0,s.next=13,r.awrap(re(n));case 13:return i=s.sent,wt.style.height="".concat(o,"px"),window.addEventListener("resize",function(){var t=document.querySelector("abtasty-modal iframe"),e=oe();t.style.height="".concat(e,"px"),wt.style.height="".concat(e,"px")}),s.abrupt("return",i&&new Promise(function(t){t(!0)}));case 17:case"end":return s.stop()}})}function se(t){vt.style.display="block",ne(t),function(t){Nt&&Bt.length&&ee("mouseup",".abtasty-modal__button",function(){t.setValidationRecurrence()},!0)}(t),tt()||(!function(t){new ht(t,function(){return vt.closest("body")},function(e){switch(e){case Y:vt.style.display="none",vt.remove();break;case G:ce(t)}}).watch()}(t),t.setDisplayRecurrence())}function ce(t){var e;return r.async(function(n){for(;;)switch(n.prev=n.next){case 0:if(vt=document.createElement("abtasty-modal"),"video"!==St){n.next=8;break}return n.next=4,r.awrap(ie());case 4:n.sent&&se(t),n.next=19;break;case 8:if("image"!==St||"fit"!==$t){n.next=15;break}(e=new Image).src=Qt,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(re(this));case 2:e.sent&&se(t),wt.style.width="".concat(this.width,"px"),wt.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(re());case 17:n.sent&&se(t);case 19:case"end":return n.stop()}})}tt()?ce():r.async(function(t){for(;;)switch(t.prev=t.next){case 0:if((_t=new ut(ot())).isOver()){t.next=3;break}return t.abrupt("return",!1);case 3:return xt=new mt(it()),t.next=6,r.awrap(xt.isTriggered());case 6:return(kt=t.sent)&&ce(_t),t.abrupt("return",kt);case 9: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:{},i=a.iterator||"@@iterator",o=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(t,e,n,r){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),o=new C(r||[]);return i._invoke=function(t,e,n){var r=u;return function(a,i){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===a)throw i;return L()}for(n.method=a,n.arg=i;;){var o=n.delegate;if(o){var s=E(o,n);if(s){if(s===y)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=h;var c=l(t,e,n);if("normal"===c.type){if(r=n.done?p:d,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=p,n.method="throw",n.arg=c.arg)}}}(t,n,o),i}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",h="executing",p="completed",y={};function m(){}function f(){}function g(){}var b={};b[i]=function(){return this};var v=Object.getPrototypeOf,w=v&&v(v(T([])));w&&w!==n&&r.call(w,i)&&(b=w);var _=g.prototype=m.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 i(){return new Promise(function(e,i){!function e(n,a,i,o){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,i,o)},function(t){e("throw",t,i,o)}):Promise.resolve(u).then(function(t){c.value=t,i(c)},function(t){return e("throw",t,i,o)})}o(s.arg)}(n,a,e,i)})}return e=e?e.then(i,i):i()}}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 y;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var a=l(r,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,y;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function S(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 O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function T(t){if(t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=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 o.next=o}}return{next:L}}function L(){return{value:e,done:!0}}return f.prototype=_.constructor=g,g.constructor=f,g[s]=f.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"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[o]=function(){return this},t.AsyncIterator=k,t.async=function(e,n,r,a){var i=new k(c(e,n,r,a));return t.isGeneratorFunction(n)?i:i.next().then(function(t){return t.done?t.value:i.next()})},x(_),_[s]="Generator",_[i]=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(O),!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 i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(o.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 i=a;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(o)},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),y},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),O(n),y}},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;O(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),y}},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}},i=Object.freeze({default:a,__moduleExports:a});var o=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)},s=Object.freeze({default:o,__moduleExports:o});var c=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")},l=Object.freeze({default:c,__moduleExports:c}),u=i&&a||i,d=s&&o||s,h=l&&c||l;var p=function(t){return u(t)||d(t)||h()};var y=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};function m(t,e,n,r,a,i,o){try{var s=t[i](o),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,a)}var f=function(t){return function(){var e=this,n=arguments;return new Promise(function(r,a){var i=t.apply(e,n);function o(t){m(i,r,a,o,s,"next",t)}function s(t){m(i,r,a,o,s,"throw",t)}o(void 0)})}};var g=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function b(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 v=function(t,e,n){return e&&b(t.prototype,e),n&&b(t,n),t},w=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}),_=Object.freeze({default:w,__moduleExports:w});var x=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},k=Object.freeze({default:x,__moduleExports:x}),E=_&&w||_,S=k&&x||k;var O=function(t,e){return!e||"object"!==E(e)&&"function"!=typeof e?S(t):e},C=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}),T=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}),L=Object.freeze({default:T,__moduleExports:T}),P=L&&T||L;var R=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&&P(t,e)};var I=function(t,e){if(null==t)return{};var n,r,a={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[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 i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a},B="Recurrence",W="Récurrence",D="Recurrencia",z="Wiederholung",q={en:"".concat(B," of the display"),fr:"".concat(W," de l'affichage"),es:"".concat(D," de visualización"),de:"".concat(z," der Anzeige")},M={en:"".concat(B," after closure"),fr:"".concat(W," après fermeture"),es:"".concat(D," tras el cierre"),de:"".concat(z," nach Schließung")},V={en:"".concat(B," after validation"),fr:"".concat(W," après validation"),es:"".concat(D," 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){y(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,y({},t,new e)),rt[t]}var it=function(){return"".concat(PACKAGE.replace("@abtasty/","")).concat(DATA&&DATA.type?"_".concat(DATA.type):"")},ot=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,i=e.triggerEventDelay,o=e.triggerEventReengageDelay,s=r;switch(n){case"exitIntent":t=a;break;case"delay":t=i;break;case"reengage":t=o;break;default:t=0}return{triggerEvent:n,triggerSelector:s,triggerDelay:t}};function lt(){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 ut(t){return function(){return f(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,lt();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 dt=function(){function t(){g(this,t),this.uniqueId=ot(),this.widgetName=it(),this.recurrenceParams=st(),this.triggerParams=ct(),this.recurrence=!!this.recurrenceParams&&new yt(this.recurrenceParams),this.trigger=!!this.triggerParams&&new gt(this.triggerParams),this.pageWatcher=new bt(this.recurrence,this.isWidgetApplied.bind(this),this.onPageChange.bind(this)),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(),this.hasBeenShown=!1}return v(t,[{key:"isWidgetApplied",value:function(){return this.domElement&&!!this.domElement.closest("body")}},{key:"insert",value:function(){var t=this;return wt("head",function(e){return e.appendChild(t.styleElement)},function(t){return console.error(t)}),wt("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.hasBeenShown=!0,nt()||this.pageWatcher.watch(),this}},{key:"hide",value:function(){return this.domElement.classList.add(this.hideClassName),this}},{key:"init",value:function(){var t=f(r.mark(function t(){var e;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.recurrence&&this.recurrence.isOver(),!this.recurrence||e){t.next=4;break}return this.pageWatcher.watch(),t.abrupt("return",!1);case 4:if(nt()||this.pageWatcher.watch(),t.t0=nt()||!this.trigger,t.t0){t.next=13;break}if(t.t1=this.trigger,!t.t1){t.next=12;break}return t.next=11,this.trigger.isTriggered();case 11:t.t1=t.sent;case 12:t.t0=t.t1;case 13:if(t.t0){t.next=16;break}return t.abrupt("return",!1);case 16:return this.insert(),this.addCloseEvent(),t.abrupt("return",this);case 19:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"onPageChange",value:function(t){var e=this;switch(t){case H:this.hasBeenShown?this.remove():this.trigger.clear()&&this.pageWatcher.watch();break;case F:this.hasBeenShown?this.insert().show():e.init().then(function(t){return t&&e.show()})}}},{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 g(this,e),(t=O(this,C(e).call(this))).stringStyles=t.getStyles(),t.styleElement=t.getStyleTag(t.stringStyles),t}R(e,dt),v(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 g(this,e),(n=O(this,C(e).call(this))).position=t,n.stringStyles=n.getStyles(),n.styleElement=n.getStyleTag(n.stringStyles),n}R(e,dt),v(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 g(this,e),(r=O(this,C(e).call(this))).position=t,r.referrerElement=n,r.stringStyles=r.getStyles(),r.styleElement=r.getStyleTag(r.stringStyles),r}R(e,dt),v(e,[{key:"insert",value:function(){var t=this;return wt("head",function(e){return e.appendChild(t.styleElement)},function(t){return console.error(t)}),wt(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 ht(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 pt(t){var e=function(t,e){if("object"!==w(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==w(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===w(e)?e:String(e)}var yt=function(){function t(e){var n=e.displayRecurrence,r=e.closingRecurrence,a=e.validationRecurrence;g(this,t),this.displayRecurrence=parseFloat(n),this.closingRecurrence=parseFloat(r),this.validationRecurrence=parseFloat(a),this.widgetName=it(),this.uniqueId=ot(),this.recurrenceKey="".concat(this.widgetName,"_").concat(this.uniqueId)}return v(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(pt)));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"!==w(r))return!1;var a=this.getTypeOfStorage(t),i=a.storageString,o=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"===i?e?t=n.removeSessionRecurrenceStorage():(n.removeLocalRecurrenceStorage(),t=n.getSessionRecurrenceStorageParsed()):"local"===i&&(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?ht(n,!0).forEach(function(e){y(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ht(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}(y({},n.recurrenceKey,c),t):y({},n.recurrenceKey,c);o.setItem("ABTastyWidgets",JSON.stringify(a))};if(!o)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}(),mt=function(){function t(){g(this,t),this.targets=[],this.existingTargets=[],this.inViewPortTargets=[],this.visibilityobserver=this.startVisibilityObserver(),this.mutationobserver=this.startMutationObserver()}return v(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 i,o=(i=document).elementFromPoint.apply(i,p(n[a]));r=t===o||t.contains(o),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})}},{key:"clear",value:function(t){var e=this.targets.filter(function(e){return e.selector!==t});0===e.length&&(this.existingTargets=[],this.inViewPortTargets=[],this.mutationobserver.disconnect(),this.visibilityobserver.unobserve(t)),this.targets.length>e&&(this.targets=e,this.visibilityobserver.unobserve(t))}}]),t}(),ft=function(){var t={promise:null,resolve:null,reject:null};return t.promise=new Promise(function(e,n){t.resolve=e,t.reject=n}),t},gt=function(){function t(e){var n=e.triggerEvent,r=e.triggerSelector,a=e.triggerDelay;g(this,t),this.event=n,this.selector=r&&r.length?r:"body",this.delay=a,this.elementsSelectors=[],this.eventsListeners=[],this.timeouts=[],this.intervals=[],this.observers=[],this.promises=[],this.visibilityObservers=[]}return v(t,[{key:"onElementVisible",value:function(){var t=f(r.mark(function t(){var e,n,a,i;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=ft(),this.promises.push(e),t.next=4,this.onPageLoad();case 4:return n=t.sent,t.next=7,ut("IntersectionObserver");case 7:return a=t.sent,i=at("VisibilityObserver",mt),this.visibilityObservers.push(i),a&&n&&i.watch(this.selector,e.resolve),t.abrupt("return",e.promise);case 12:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"onPageLoad",value:function(){var t=ft();this.promises.push(t);var e=function(){return"complete"===document.readyState};if(e())return t.resolve(!0);var n,r=setTimeout(function(){var e;return(e=document).removeEventListener.apply(e,a),t.resolve(!1)},15e3),a=["readystatechange",function(){return e()&&!clearTimeout(r)&&t.resolve(!0)},{passive:!0}];return this.clearTrigger=function(){var e;clearTimeout(r),(e=document).removeEventListener.apply(e,a),t.resolve(!1)},(n=document).addEventListener.apply(n,a),t.promise}},{key:"onClick",value:function(){var t,e=this,n=document.createElement("style");n.type="text/css",n.id="Click_".concat(ot()),n.innerHTML="".concat(this.selector," {\n\t\t\tcursor: pointer !important;\n\t\t\tpointer-events: all !important;\n\t\t}"),document.head.appendChild(n),this.elementsSelectors.push("#".concat(n.id));var r=ft();this.promises.push(r);var a=["click",function(t){return!!function(t){return p(document.querySelectorAll(e.selector)).some(function(n){return n.isSameNode(t)||!!t.closest(e.selector)})}(t.target)&&(r.resolve(!0),e.clear())},{passive:!0,capture:!0}];return this.eventsListeners.push(a),(t=document).addEventListener.apply(t,a),r.promise}},{key:"onExitIntent",value:function(){var t=f(r.mark(function t(){var e,n,a=this;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=ft(),this.promises.push(e),n=["mouseleave",function(){var t=f(r.mark(function t(){var n,i;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!a.delay){t.next=6;break}n=1e3*a.delay,i=setTimeout(function(){e.resolve(!0),a.clear()},n),a.timeouts.push(i),t.next=9;break;case 6:return e.resolve(!0),a.clear(),t.abrupt("return");case 9:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}(),{passive:!0,once:!0}],t.next=6,this.onPageLoad();case 6:return t.sent&&wt("body",function(t){t.addEventListener.apply(t,n),a.eventsListeners.push(n)}),t.abrupt("return",e.promise);case 9:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"onDelay",value:function(){var t=f(r.mark(function t(){var e,n,a,i=this;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=ft(),this.promises.push(e),n=1e3*this.delay,t.next=5,this.onPageLoad();case 5:return t.sent&&(a=setTimeout(function(){e.resolve(!0),i.clear()},n),this.timeouts.push(a)),t.abrupt("return",e.promise);case 8:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"onReengage",value:function(){var t=this,e=ft();this.promises.push(e);var n=1e3*this.delay,r=n,a=[function(){return r=n},{passive:!0}];["click","mousemove","scroll","keypress"].forEach(function(e){var n;(n=document).addEventListener.apply(n,[e].concat(a)),t.eventsListeners.push([e].concat(a))});var i=setInterval(function(){r<=0?(e.resolve(!0),t.clear()):r-=100},100);return this.intervals.push(i),e.promise}},{key:"clear",value:function(){var t=this;return this.elementsSelectors.length&&(this.elementsSelectors.forEach(function(t){document.querySelector(t)&&document.querySelector(t).remove()}),this.elementsSelectors=[]),this.eventsListeners.length&&(this.eventsListeners.forEach(function(t){var e;return(e=document).removeEventListener.apply(e,p(t))}),this.eventsListeners=[]),this.timeouts.length&&(this.timeouts.forEach(function(t){return clearTimeout(t)}),this.timeouts=[]),this.intervals.length&&(this.intervals.forEach(function(t){return clearInterval(t)}),this.intervals=[]),this.observers.length&&(this.observers.forEach(function(t){return t.disconnect()}),this.observers=[]),this.visibilityObservers.length&&(this.visibilityObservers.forEach(function(e){return e.clear(t.selector)}),this.visibilityObservers=[]),this.promises.length&&(this.promises.forEach(function(t){return t.resolve(!1)}),this.promises=[]),this}},{key:"isTriggered",value:function(){var t=f(r.mark(function t(){var e;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.clear(),t.t0=this.event,t.next="pageLoad"===t.t0?4:"click"===t.t0?8:"exitIntent"===t.t0?12:"delay"===t.t0?16:"reengage"===t.t0?20:"elementVisible"===t.t0?24:28;break;case 4:return t.next=6,this.onPageLoad();case 6:return e=t.sent,t.abrupt("break",29);case 8:return t.next=10,this.onClick();case 10:return e=t.sent,t.abrupt("break",29);case 12:return t.next=14,this.onExitIntent();case 14:return e=t.sent,t.abrupt("break",29);case 16:return t.next=18,this.onDelay();case 18:return e=t.sent,t.abrupt("break",29);case 20:return t.next=22,this.onReengage();case 22:return e=t.sent,t.abrupt("break",29);case 24:return t.next=26,this.onElementVisible();case 26:return e=t.sent,t.abrupt("break",29);case 28:e=!1;case 29:return t.abrupt("return",e);case 30:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}]),t}();var bt=function(){function t(e,n,r){g(this,t),this.recurrence=e,this.isWidgetApplied=n,this.callback=r,this.observer=new MutationObserver(this.observerHandler.bind(this)),this.eventListenerParams=[G,this.eventHandler.bind(this),{passive:!0}]}return v(t,[{key:"recurrenceIsDone",value:function(){return!this.recurrence||this.recurrence.isOver()}},{key:"decisionHandler",value:function(t){var e=this,n=!!window.ABTasty.getTestsOnPage()[TEST_ID],r=(this.recurrence?this.recurrence.getCurrentRecurrence():{type:!1}).type,a=function(){return t&&"display"===r||e.recurrenceIsDone()};return!this.isWidgetApplied()&&n&&a()?(this.clearWatcher(),this.callback(F)):(!this.isWidgetApplied()||n&&a())&&(this.isWidgetApplied()||n)||(this.clearWatcher(),this.callback(H),this.watch()),this}},{key:"eventHandler",value:function(){var t=this;return setTimeout(function(){t.decisionHandler(!1)},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(!0),this):this}},{key:"watch",value:function(){var t,e=this;return this.clearWatcher(),(t=document).addEventListener.apply(t,p(this.eventListenerParams)),wt("body",function(t){var n,r=[t,{childList:!0,subtree:!0}];(n=e.observer).observe.apply(n,r)}),this}},{key:"clearWatcher",value:function(){var t;return(t=document).removeEventListener.apply(t,p(this.eventListenerParams)),this.observer.disconnect(),this}}]),t}(),vt=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)},wt=function(t,e,n){var r,a=0;try{document.querySelector(t)}catch(e){var i="Selector «".concat(t,"» not valid.");return vt(i),"function"==typeof n&&n(i)}r=setTimeout(function(){clearInterval(a);var e="Can't find element «".concat(t,"».");return vt(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 _t=function(t){var e=Object.prototype.hasOwnProperty;function n(t,r){return Array.isArray(t)?function(t,e){for(var r,a="",i="",s=Array.isArray(e),c=0;c<t.length;c++)(r=n(t[c]))&&(s&&e[c]&&(r=o(r)),a=a+i+r,i=" ");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=o(e))," "+t+'="'+e+'"'):" "+t+"='"+e.replace(/'/g,"&#39;")+"'"):""}t.merge=function t(e,n){if(1===arguments.length){for(var a=e[0],i=1;i<e.length;i++)a=t(a,e[i]);return a}for(var o in n)if("class"===o){var s=e[o]||[];e[o]=(Array.isArray(s)?s:[s]).concat(n[o]||[])}else if("style"===o){var s=r(e[o]),c=r(n[o]);e[o]=s+c}else e[o]=n[o];return e},t.classes=n,t.style=r,t.attr=a,t.attrs=function(t,i){var o="";for(var s in t)if(e.call(t,s)){var c=t[s];if("class"===s){c=n(c),o=a(s,c,!1,i)+o;continue}"style"===s&&(c=r(c)),o+=a(s,c,!1,i)}return o};var i=/["&<>]/;function o(t){var e=""+t,n=i.exec(e);if(!n)return t;var r,a,o,s="";for(r=n.index,a=0;r<e.length;r++){switch(e.charCodeAt(r)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;case 62:o="&gt;";break;default:continue}a!==r&&(s+=e.substring(a,r)),a=r+1,s+=o}return a!==r?s+e.substring(a,r):s}return t.escape=o,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 i=3,o=a.split("\n"),s=Math.max(r-i,0),c=Math.min(o.length,r+i);var i=o.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"+i+"\n\n"+e.message;throw e},t}({});var xt,kt,Et,St,Ot,Ct=DATA,Tt=Ct.type,Lt=Ct.animation,Pt=Ct.backgroundColor,Rt=Ct.overlayOpacity,It=Ct.backgroundImage,At=Ct.borderRadius,Nt=Ct.borderRadiusImage,jt=Ct.borderWidth,Bt=Ct.borderColor,Wt=Ct.button,Dt=Ct.buttonBackgroundColor,zt=Ct.buttonLink,qt=Ct.buttonText,Mt=Ct.buttonTextColor,Vt=Ct.backgroundCloseButtonColor,Yt=Ct.closeButtonColor,Gt=Ct.closeButtonPosition,Ht=Ct.content,Ft=Ct.customWidth,Jt=Ct.title,Kt=Ct.layout,Ut=Ct.videoLink,Zt=Ct.widthImageWithText,$t=Ct.widthImageOnly,Qt=Ct.autoPlay,Xt=Tt.replace(/^\w/,function(t){return t.toUpperCase()}),te="imageOnly"===Kt?$t:Zt,ee=DATA.image||"https://widgets-images.abtasty.com/image-placeholder.png",ne="abtasty-modal__underlay",re=".abtasty-modal__close";function ae(t,e,n,r){var a,i=[t,function(t){var a=t.target,o=p(document.querySelectorAll(e)).some(function(t){return t.isSameNode(a)||a.closest(e)});return o&&n(),o&&r&&function(t){var e;return(e=document).removeEventListener.apply(e,p(t))}(i)},!0];(a=document).addEventListener.apply(a,i)}function ie(t){ae("click","".concat(ne,", ").concat(re),function(){xt.style.display="none","video"===Tt&&(xt.innerHTML=""),ABTastyEvent("".concat(Xt," modal closed"),null,TEST_ID),t.setClosingRecurrence()},!0)}function oe(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e={layout:Kt,type:Tt,borderRadius:At,borderRadiusImage:Nt,borderWidth:jt,borderColor:Bt,button:Wt,buttonBackgroundColor:Dt,buttonLink:zt,buttonText:qt,buttonTextColor:Mt,backgroundColor:"imageOnly"!==Kt?Pt:"initial",overlayOpacity:Rt,backgroundImage:It,image:ee,width:te,videoLink:Ut,customWidth:Ft,animation:Lt,title:Jt,closeButtonPosition:Gt,backgroundCloseButtonColor:Vt,modalContent:Ht||t.outerHTML};(xt.className="abtasty-modal abtasty-modal--".concat(Tt),xt.dataset.testId=TEST_ID,xt.innerHTML=function(t){var e,n="",r={};try{var a={},i=t||{};(function(t,a,i,o,s,c,l,u,d,h,p,y,m,f,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"+_t.attr("href",p,!0,!0)+' target="_self"'+_t.attr("style",_t.style({"background-color":h+"!important",color:m+"!important"}),!0,!0)+">")+_t.escape(null==(e=y)?"":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"+(_t.attr("src",b,!0,!0)+_t.attr("style",_t.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"+(_t.attr("src",b,!0,!0)+_t.attr("style",_t.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"+_t.attr("class",_t.classes(["abtasty-modal__close",f?"abtasty-modal__close--"+f:""],[!1,!0]),!1,!0)+" data-abtasty-actionnable"+_t.attr("style",_t.style("outside"===f?{"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"'+_t.attr("style",_t.style({"border-radius":c+"px!important","border-width":u+"px!important","border-color":s+"!important","background-color":i+"!important","background-image":'url("'+o+'")!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"+_t.attr("style",_t.style({"background-color":"rgba(0, 0, 0, "+_/100+")"}),!0,!0)+"></abtasty-modal__underlay>")+"<div"+(_t.attr("class",_t.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)+_t.attr("style",_t.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 i?i.animation:"undefined"!=typeof animation?animation:void 0,"backgroundCloseButtonColor"in i?i.backgroundCloseButtonColor:"undefined"!=typeof backgroundCloseButtonColor?backgroundCloseButtonColor:void 0,"backgroundColor"in i?i.backgroundColor:"undefined"!=typeof backgroundColor?backgroundColor:void 0,"backgroundImage"in i?i.backgroundImage:"undefined"!=typeof backgroundImage?backgroundImage:void 0,"borderColor"in i?i.borderColor:"undefined"!=typeof borderColor?borderColor:void 0,"borderRadius"in i?i.borderRadius:"undefined"!=typeof borderRadius?borderRadius:void 0,"borderRadiusImage"in i?i.borderRadiusImage:"undefined"!=typeof borderRadiusImage?borderRadiusImage:void 0,"borderWidth"in i?i.borderWidth:"undefined"!=typeof borderWidth?borderWidth:void 0,"button"in i?i.button:"undefined"!=typeof button?button:void 0,"buttonBackgroundColor"in i?i.buttonBackgroundColor:"undefined"!=typeof buttonBackgroundColor?buttonBackgroundColor:void 0,"buttonLink"in i?i.buttonLink:"undefined"!=typeof buttonLink?buttonLink:void 0,"buttonText"in i?i.buttonText:"undefined"!=typeof buttonText?buttonText:void 0,"buttonTextColor"in i?i.buttonTextColor:"undefined"!=typeof buttonTextColor?buttonTextColor:void 0,"closeButtonPosition"in i?i.closeButtonPosition:"undefined"!=typeof closeButtonPosition?closeButtonPosition:void 0,"customWidth"in i?i.customWidth:"undefined"!=typeof customWidth?customWidth:void 0,"image"in i?i.image:"undefined"!=typeof image?image:void 0,"layout"in i?i.layout:"undefined"!=typeof layout?layout:void 0,"modalContent"in i?i.modalContent:"undefined"!=typeof modalContent?modalContent:void 0,"overlayOpacity"in i?i.overlayOpacity:"undefined"!=typeof overlayOpacity?overlayOpacity:void 0,"title"in i?i.title:"undefined"!=typeof title?title:void 0,"type"in i?i.type:"undefined"!=typeof type?type:void 0,"width"in i?i.width:"undefined"!=typeof width?width:void 0)}catch(t){_t.rethrow(t,void 0,void 0,a[void 0])}return n}(e),document.body.appendChild(xt),kt=xt.querySelector(".abtasty-modal__area"),Yt)&&(xt.querySelector("".concat(re," .close-x")).style.stroke=Yt);return new Promise(function(t){t(!0)})}function se(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"),Qt&&(e+="&autoplay=1")}else if(r){var i=t.match(/.*(www\.)?vimeo.com\/(\d+)($|\/)/)[2];e="//player.vimeo.com/video/".concat(i)}return e}function ce(){var t=(window.innerWidth>630?.5*window.innerWidth:window.innerWidth-40)/16*9;return Math.round(t)}function le(){var t,e,n,a,i,o;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=se(Ut),i=ce(),n.style.height="".concat(i,"px"),"no-title"===Kt&&(n.style.border="".concat(jt,"px solid ").concat(Bt,"!important"),n.style.borderRadius="".concat(At,"px!important")),n.src=a,n.frameBorder=0,n.allowfullscreen=!0,s.next=13,r.awrap(oe(n));case 13:return o=s.sent,kt.style.height="".concat(i,"px"),window.addEventListener("resize",function(){var t=document.querySelector("abtasty-modal iframe"),e=ce();t.style.height="".concat(e,"px"),kt.style.height="".concat(e,"px")}),s.abrupt("return",o&&new Promise(function(t){t(!0)}));case 17:case"end":return s.stop()}})}function ue(t){xt.style.display="block",ie(t),function(t){Wt&&zt.length&&ae("mouseup",".abtasty-modal__button",function(){t.setValidationRecurrence()},!0)}(t),nt()||(!function(t){new bt(t,function(){return xt.closest("body")},function(e){switch(e){case H:xt.style.display="none",xt.remove();break;case F:de(t)}}).watch()}(t),t.setDisplayRecurrence())}function de(t){var e;return r.async(function(n){for(;;)switch(n.prev=n.next){case 0:if(xt=document.createElement("abtasty-modal"),"video"!==Tt){n.next=8;break}return n.next=4,r.awrap(le());case 4:n.sent&&ue(t),n.next=19;break;case 8:if("image"!==Tt||"fit"!==te){n.next=15;break}(e=new Image).src=ee,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&&ue(t),kt.style.width="".concat(this.width,"px"),kt.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&&ue(t);case 19:case"end":return n.stop()}})}nt()?de():r.async(function(t){for(;;)switch(t.prev=t.next){case 0:if((Et=new yt(st())).isOver()){t.next=3;break}return t.abrupt("return",!1);case 3:return St=new gt(ct()),t.next=6,r.awrap(St.isTriggered());case 6:return(Ot=t.sent)&&de(Et),t.abrupt("return",Ot);case 9:case"end":return t.stop()}})}();
{
"name": "@abtasty/modal",
"description": "Widget for AB Tasty",
"version": "2.8.1",
"version": "2.8.2",
"form": "dist/form.js",

@@ -44,5 +44,5 @@ "main": "dist/main.js",

"dependencies": {
"@abtasty/widget-utils": "1.12.8-2",
"@abtasty/widget-utils": "1.12.8-4",
"@babel/runtime": "^7.4.2"
}
}
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