New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@abtasty/social-proof

Package Overview
Dependencies
Maintainers
22
Versions
166
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@abtasty/social-proof - npm Package Compare versions

Comparing version 0.1.26-2 to 0.1.26-3

2

dist/main.js

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

!function(){"use strict";function t(t,e){return t(e={exports:{}},e.exports),e.exports}var e=t(function(t){var e=function(t){var e,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),i=new T(r||[]);return a._invoke=function(t,e,n){var r=l;return function(o,a){if(r===f)throw new Error("Generator is already running");if(r===p){if("throw"===o)throw a;return L()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var c=E(i,n);if(c){if(c===h)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=f;var s=u(t,e,n);if("normal"===s.type){if(r=n.done?p:d,s.arg===h)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=p,n.method="throw",n.arg=s.arg)}}}(t,n,i),a}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l="suspendedStart",d="suspendedYield",f="executing",p="completed",h={};function y(){}function g(){}function v(){}var m={};m[a]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(N([])));w&&w!==n&&r.call(w,a)&&(m=w);var x=v.prototype=y.prototype=Object.create(m);function S(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,o){function a(){return new Promise(function(e,a){!function e(n,o,a,i){var c=u(t[n],t,o);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?Promise.resolve(l.__await).then(function(t){e("next",t,a,i)},function(t){e("throw",t,a,i)}):Promise.resolve(l).then(function(t){s.value=t,a(s)},function(t){return e("throw",t,a,i)})}i(c.arg)}(n,o,e,a)})}return e=e?e.then(a,a):a()}}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 h;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=u(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,h;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,h):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function A(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function N(t){if(t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}return{next:L}}function L(){return{value:e,done:!0}}return g.prototype=x.constructor=v,v.constructor=g,v[c]=g.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},S(k.prototype),k.prototype[i]=function(){return this},t.AsyncIterator=k,t.async=function(e,n,r,o){var a=new k(s(e,n,r,o));return t.isGeneratorFunction(n)?a:a.next().then(function(t){return t.done?t.value:a.next()})},S(x),x[c]="Generator",x[a]=function(){return this},x.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=N,T.prototype={constructor:T,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(C),!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 o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(s){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(t,e){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"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,h):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),h},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),C(n),h}},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 o=r.arg;C(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),h}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}});function n(t,e,n,r,o,a,i){try{var c=t[a](i),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}var r=function(t){return function(){var e=this,r=arguments;return new Promise(function(o,a){var i=t.apply(e,r);function c(t){n(i,o,a,c,s,"next",t)}function s(t){n(i,o,a,c,s,"throw",t)}c(void 0)})}};var o=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 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}};var i=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)};var c=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var s=function(t){return a(t)||i(t)||c()};var u=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function l(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 d=function(t,e,n){return e&&l(t.prototype,e),n&&l(t,n),t},f=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 p=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t};var h=function(t,e){return!e||"object"!==f(e)&&"function"!=typeof e?p(t):e},y=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}),g=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});var v=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&&g(t,e)},m="Recurrence",b="Récurrence",w="Recurrencia",x="Wiederholung",S={en:"".concat(m," of the display"),fr:"".concat(b," de l'affichage"),es:"".concat(w," de visualización"),de:"".concat(x," der Anzeige")},k={en:"".concat(m," after closure"),fr:"".concat(b," après fermeture"),es:"".concat(w," tras el cierre"),de:"".concat(x," nach Schließung")},E={en:"".concat(m," after validation"),fr:"".concat(b," après validation"),es:"".concat(w," tras la validación"),de:"".concat(x," nach der Validierung")},A={en:"Trigger",fr:"Déclencheur",es:"Activador",de:"Trigger"};function C(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 T(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?C(n,!0).forEach(function(e){o(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):C(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var N={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"},L=(T({},N,{label:k,propName:"closingRecurrence"}),T({},N,{label:S,propName:"displayRecurrence"}),T({},N,{label:E,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"}]),O={category:"conditions",type:"selectelement",propName:"".concat("triggerEvent","Click"),label:A,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"}]},R={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"}]},_={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"}]},I={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"}]},P=([{category:"conditions",type:"select",label:{en:"Triggers on",fr:"Se déclenche",es:"¿ Cuándo se activa? ",de:"Triggert bei"},options:L,propName:"triggerEvent",value:"pageLoad"}].concat(s([O,R,_,I])),function(){return Object.prototype.hasOwnProperty.call(window,"ABTastyEditor")}),D=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"000000",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";u(this,t),this.uniqueId=e,this.widgetContainer=n,this.basicClassName="ab_widget_container_".concat(n),this.widgetContainerId="".concat(this.basicClassName,"_").concat(e),this.contentClassName="".concat(this.basicClassName,"_content"),this.overlayClassName="".concat(this.basicClassName,"_overlay"),this.closeButtonClassName="".concat(this.basicClassName,"_close_button"),this.hideClassName="ab_hide_".concat(e),this.domElement=this.getDom()}return d(t,[{key:"insert",value:function(){var t=this;return B("head",function(e){return e.appendChild(t.styleElement)},function(t){return console.error(t)}),B("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}},{key:"hide",value:function(){return this.domElement.classList.add(this.hideClassName),this}},{key:"init",value:function(){return this.insert(),this.addCloseEvent(),this}},{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),o=0;o<n;o++)r[o]=arguments[o];return r.push.apply(r,s(e)),r.forEach(function(e){e.addEventListener("click",function(){t.hide()},!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(P()?"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",P()&&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}(),j=(function(t){function e(t,n){var r;return u(this,e),(r=h(this,y(e).call(this,t,n))).stringStyles=r.getStyles(),r.styleElement=r.getStyleTag(r.stringStyles),r}v(e,D),d(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}")}}])}(),function(t){function e(t,n,r){var o;return u(this,e),(o=h(this,y(e).call(this,t,n))).position=r,o.stringStyles=o.getStyles(),o.styleElement=o.getStyleTag(o.stringStyles),o}v(e,D),d(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,r,o){var a;return u(this,e),(a=h(this,y(e).call(this,t,n))).position=r,a.referrerElement=o,a.stringStyles=a.getStyles(),a.styleElement=a.getStyleTag(a.stringStyles),a}v(e,D),d(e,[{key:"insert",value:function(){var t=this;return B("head",function(e){return e.appendChild(t.styleElement)},function(t){return console.error(t)}),B(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(){function t(e){var n=e.displayRecurrence,r=e.closingRecurrence,o=e.validationRecurrence,a=e.widgetName,i=e.uniqueId;u(this,t),this.displayRecurrence=parseFloat(n),this.closingRecurrence=parseFloat(r),this.validationRecurrence=parseFloat(o),this.storageName="Rec_".concat(a,"_").concat(i)}d(t,[{key:"getSessionRecurrenceStorage",value:function(){return sessionStorage.getItem(this.storageName)}},{key:"getLocalRecurrenceStorage",value:function(){return localStorage.getItem(this.storageName)}},{key:"removeSessionRecurrenceStorage",value:function(){return sessionStorage.removeItem(this.storageName)}},{key:"removeLocalRecurrenceStorage",value:function(){return localStorage.removeItem(this.storageName)}},{key:"getSessionRecurrence",value:function(){var t=this.getSessionRecurrenceStorage();try{return JSON.parse(t)}catch(t){return console.error("Cannot parse recurrence from storage, format is wrong, more details : ".concat(t)),!1}}},{key:"getLocalRecurrence",value:function(){var t=this.getLocalRecurrenceStorage();try{return JSON.parse(t)}catch(t){return console.error("Cannot parse recurrence from storage, format is wrong, more details : ".concat(t)),!1}}},{key:"getCurrentRecurrence",value:function(){return this.getSessionRecurrenceStorage()?this.getSessionRecurrence():this.getLocalRecurrenceStorage()?this.getLocalRecurrence():{type:!1}}},{key:"isOver",value:function(){var t=this.getLocalRecurrence(),e=(t?parseFloat(t.stamp):0)<(new Date).getTime();return e&&localStorage.removeItem(this.storageName),e&&!this.getLocalRecurrence()&&!this.getSessionRecurrence()}},{key:"setRecurrence",value:function(t,e){var n=this,r=this.getTypeOfStorage(t),o=this.getStamp(t),a={type:e,stamp:o},i=this.getCurrentRecurrence().type,c=function(){n.getSessionRecurrenceStorage()&&n.removeSessionRecurrenceStorage(),n.getLocalRecurrenceStorage()&&n.removeLocalRecurrenceStorage(),r.setItem(n.storageName,JSON.stringify(a))};if(!r)return!1;if(i&&"validation"!==e)if("closing"===e&&"validation"!==i)c();else{if("display"!==e||"validation"===i||"closing"===i)return!1;c()}else c();return o}},{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?window.localStorage:0===t&&window.sessionStorage)}}])}(),function(){function t(e){var n=e.triggerEvent,r=e.triggerSelector,o=e.triggerDelay;u(this,t),this.event=n,this.selector=r&&r.length?r:"body",this.delay=o}d(t,[{key:"onPageLoad",value:function(){return new Promise(function(t,e){if("complete"!==document.readyState){var n,r=["DOMContentLoaded",function(){return t(!0)},{passive:!0,once:!0}];(n=window).addEventListener.apply(n,r),setTimeout(function(){var t;return(t=window).removeEventListener.apply(t,r),e(!1)},15e3)}return t(!0)})}},{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,o=function(e){return s(document.querySelectorAll(t.selector)).some(function(n){return n.isSameNode(e)||!!e.closest(t.selector)})},a=["click",function(t){return!!o(t.target)&&(document.head.removeChild(e),n(!0))},{passive:!0,once:!0,capture:!0}];(r=document).addEventListener.apply(r,a)})}},{key:"onExitIntent",value:function(){var t,n=this;return new Promise((t=r(e.mark(function t(o){var a;return e.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return a=["mouseleave",function(){var t=r(e.mark(function t(){var r;return e.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!n.delay){t.next=5;break}r=1e3*n.delay,setTimeout(function(){return o(!0)},r),t.next=6;break;case 5:return t.abrupt("return",o(!0));case 6:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}(),{passive:!0,once:!0}],t.next=4,n.onPageLoad();case 4:t.sent&&B("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,n=this;return new Promise((t=r(e.mark(function t(r){var o;return e.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=1e3*n.delay,t.next=3,n.onPageLoad();case 3:t.sent&&setTimeout(function(){return r(!0)},o);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,o=["click","mousemove","scroll","keypress"],a=[function(){return r=n},{passive:!0}];o.forEach(function(t){var e;return(e=document).addEventListener.apply(e,[t].concat(a))});var i=setInterval(function(){r<=0?(e(!0),clearInterval(i),o.forEach(function(t){var e;return(e=document).removeEventListener.apply(e,[t].concat(a))})):r-=100},100)})}},{key:"isTriggered",value:function(){var t=r(e.mark(function t(){var n;return e.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:23;break;case 3:return t.next=5,this.onPageLoad();case 5:return n=t.sent,t.abrupt("break",24);case 7:return t.next=9,this.onClick();case 9:return n=t.sent,t.abrupt("break",24);case 11:return t.next=13,this.onExitIntent();case 13:return n=t.sent,t.abrupt("break",24);case 15:return t.next=17,this.onDelay();case 17:return n=t.sent,t.abrupt("break",24);case 19:return t.next=21,this.onReengage();case 21:return n=t.sent,t.abrupt("break",24);case 23:n=!1;case 24:return t.abrupt("return",n);case 25:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}])}(),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)}),B=function(t,e,n){var r,o=0;try{document.querySelector(t)}catch(e){var a="Selector «".concat(t,"» not valid.");return j(a),"function"==typeof n&&n(a)}r=setTimeout(function(){clearInterval(o);var e="Can't find element «".concat(t,"».");return j(e),"function"==typeof n&&n(e)},1e4),o=setInterval(function(){var n=document.querySelector(t);if(null!==n)return clearTimeout(r),clearInterval(o),"function"==typeof e&&e(n)},200)},z=function(t){var e=Object.prototype.hasOwnProperty;function n(t,r){return Array.isArray(t)?function(t,e){for(var r,o="",a="",c=Array.isArray(e),s=0;s<t.length;s++)(r=n(t[s]))&&(c&&e[s]&&(r=i(r)),o=o+a+r,a=" ");return o}(t,r):t&&"object"==typeof t?function(t){var n="",r="";for(var o in t)o&&t[o]&&e.call(t,o)&&(n=n+r+o,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+""}function o(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 o=e[0],a=1;a<e.length;a++)o=t(o,e[a]);return o}for(var i in n)if("class"===i){var c=e[i]||[];e[i]=(Array.isArray(c)?c:[c]).concat(n[i]||[])}else if("style"===i){var c=r(e[i]);c=c&&";"!==c[c.length-1]?c+";":c;var s=r(n[i]);s=s&&";"!==s[s.length-1]?s+";":s,e[i]=c+s}else e[i]=n[i];return e},t.classes=n,t.style=r,t.attr=o,t.attrs=function(t,a){var i="";for(var c in t)if(e.call(t,c)){var s=t[c];if("class"===c){s=n(s),i=o(c,s,!1,a)+i;continue}"style"===c&&(s=r(s)),i+=o(c,s,!1,a)}return i};var a=/["&<>]/;function i(t){var e=""+t,n=a.exec(e);if(!n)return t;var r,o,i,c="";for(r=n.index,o=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}o!==r&&(c+=e.substring(o,r)),o=r+1,c+=i}return o!==r?c+e.substring(o,r):c}return t.escape=i,t.rethrow=function t(e,n,r,o){if(!(e instanceof Error))throw e;if(!("undefined"==typeof window&&n||o))throw e.message+=" on line "+r,e;try{o=o||require("fs").readFileSync(n,"utf8")}catch(n){t(e,null,r)}var a=3,i=o.split("\n"),c=Math.max(r-a,0),s=Math.min(i.length,r+a);var a=i.slice(c,s).map(function(t,e){var n=e+c+1;return(n==r?" > ":" ")+n+"| "+t}).join("\n");e.path=n;e.message=(n||"Pug")+":"+r+"\n"+a+"\n\n"+e.message;throw e},t}({});function q(t){var e,n="";try{var r={},o=t||{};(function(t,r,o){n=(n+='<div class="abtasty-widget-relative-wrapper">')+'<div class="abtasty-wiget__close"'+z.attr("style",z.style(t),!0,!0)+">",n+="×</div>",n=(n=(n+='<div class="abtasty-widget-relative-container">')+'<div class="abtasty-widget-text abtasty-wiget__prevent-transform"'+z.attr("style",z.style(o),!0,!0)+">")+(null==(e=r)?"":e)+"</div></div></div>"}).call(this,"closeStyle"in o?o.closeStyle:"undefined"!=typeof closeStyle?closeStyle:void 0,"content"in o?o.content:"undefined"!=typeof content?content:void 0,"paddingOveruse"in o?o.paddingOveruse:"undefined"!=typeof paddingOveruse?paddingOveruse:void 0)}catch(t){z.rethrow(t,void 0,void 0,r[void 0])}return n}!function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}(".abtasty-widget-base{width:300px;position:fixed;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding:3px;z-index:999999998}.abtasty-widget-top{-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);top:0;margin-top:66px;left:50%}.abtasty-widget-text{padding:10% 0;position:relative;max-width:100%;color:#fff;font-size:14px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.abtasty-widget-bottom{-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);bottom:0;left:50%}.abtasty-widget-left{left:0}.abtasty-widget-left,.abtasty-widget-right{-webkit-transform:translateY(-50%);transform:translateY(-50%);top:50%}.abtasty-widget-right{right:0;margin-right:80px}.abtasty-widget-relative-wrapper{position:relative;max-width:100%}.abtasty-widget-relative-container{max-width:100%;padding:20px;position:relative}.abtasty-widget-content{font-size:12px;width:300px;color:#fff;position:relative}.abtasty-wiget__prevent-transform>*{text-transform:none!important}.abtasty-wiget__close{position:absolute;top:0;right:0;width:14px;height:14px;color:#fff;line-height:14px;text-align:center;vertical-align:middle;z-index:99999999999999;cursor:pointer;font-size:14px;font-weight:300;border:0;font-family:Helvetica Neue,Helvetica,Arial,sans-serif!important}.abtasty-wiget__close:hover{color:#000}");var F=["fr","en","de","es"],J={1:{fr:"Ce produit a été acheté !purchaseQty! fois depuis !period! !unit!",en:"This item has been purchased !purchaseQty! times in the last !period! !unit!",de:"Dieses Produkt wurde in den letzten !period! !unit! !purchaseQty! mal aufgerufen",es:"Este producto se ha comprado !purchaseQty! veces en las últimas !period! !unit!"},2:{fr:"Cette page a été vue !views! fois depuis !period! !unit!",en:"This page has been viewed !views! times in the last !period! !unit!",de:"Diese Seite wurde in den letzten !period! !unit! !views! mal gekauft",es:"Esta página se ha visto !views! veces en las últimas !period! !unit!"}},G={fr:{days:"jours",hours:"heures"},en:{days:"days",hours:"hours"},de:{days:"Tagen",hours:"Stunden"},es:{days:"días",hours:"horas"}},H=["count_72hours","count_168hours"],M=function(){if(window.ABTasty)return window.ABTasty.accountSettings?window.ABTasty.accountSettings.identifier:window.ABTasty.getAccountSettings&&"function"==typeof window.ABTasty.getAccountSettings?window.ABTasty.getAccountSettings().identifier:void 0}()||"83cb13aabbfc8e879084f3a0bcdcb4f3",W={1:"i",2:"pv"},K={1:function(){return window.ABTastyProductKey},2:function(){return encodeURIComponent("".concat(window.location.pathname).concat(window.location.search))}},Q=function(t){return fetch("".concat("https://social-proof-api.abtasty.com/clients/").concat(M).concat("/metrics/").concat(W[t]).concat("?key=").concat(K[t]())).then(function(t){return t.ok?t.json():new Error("Network response was not ok.")}).then(function(t){return t}).catch(function(){return console.error("Failed to fetch statistics from server.")})},U=void 0!==window.ABTastyEditor,V=function(){try{return window.self!==window.top}catch(t){return!0}},Y=DATA,Z=Y.recurrence,X=Y.stickTo,$=Y.viewInterval,tt=Y.typeOfContent,et=Y.manualInput,nt=Y.fadeOut,rt=Y.positionSelector,ot=function(){return 1===tt&&!window.ABTastyProductKey&&!U},at=function(){return console.error("ABTasty_Log: Error during widget api execution, ABTastyProductKey is undefined")},it=(navigator.language||navigator.userLanguage).substr(0,2),ct=function(t){return F.indexOf(t)>-1}(it)?it:"en",st=function(){var t=r(e.mark(function t(){var n,o,a,i,c,s,u,l;return e.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!ot()){t.next=3;break}return at(),t.abrupt("return");case 3:return(n=document.createElement("div")).className="abtasty-widget-base ".concat(X?"":DATA.layout),n.id="abtasty-widget-base",n.style.display="block !important",n.style.marginBottom="".concat(-50+DATA.marginBottom,"px"),n.style.padding="".concat(DATA.borderRadius?DATA.borderRadius/Math.PI:0,"px"),n.style.marginTop="".concat(DATA.marginTop,"px"),n.style.marginLeft="".concat(DATA.marginLeft,"px"),n.style.marginRight="".concat(DATA.marginRight,"px"),n.style.textAlign=DATA.textAlign,n.style.borderColor=DATA.borderColor,n.style.borderStyle="solid",n.style.whiteSpace="initial",n.style.position=X?"absolute":"fixed",n.style.borderRadius="".concat(DATA.borderRadius,"px"),n.style.borderWidth="".concat(DATA.borderWidth,"px"),n.style.backgroundColor=DATA.backgroundColor,n.style.opacity="".concat(1-.01*DATA.backgroundOpacity),n.style.boxShadow=DATA.dropShadow?"5px 3px rgba(0,0,0,".concat(1-.01*DATA.shadowOpacity,")"):"none",n.dataset.testId=TEST_ID,o={padding:"".concat(DATA.contentPadding,"px")},nt&&!U&&setTimeout(function(){n.className="",n.style.display="none"},nt),a=function(){var t=X?rt:"beforeend";(X?document.querySelector("".concat(X)):document.body).insertAdjacentElement(t,n),document.querySelector(".abtasty-wiget__close").addEventListener("click",function(){document.getElementById("abtasty-widget-base").style.display="none"},!1)},i=function(t){return(et||J[tt][ct]).replace("!purchaseQty!",t?t[$]:"0 (example)").replace("!views!",t?t[$]:"0 (example)").replace("!period!",(a=$,a.split(/(?:count_|hours)+/)[1]/(H.includes(a)?24:1))).replace("!unit!",(e=$,r=(n=G[ct]).days,o=n.hours,H.includes(e)?r:o));var e,n,r,o,a},c=function(t){n.innerHTML=q({content:t,paddingOveruse:o})},s=function(t){var e;n.style.display=!t||(e=t[$],void 0===Z||null===Z||U||"ALWAYS"===Z.toString().toUpperCase()||Z<=e||0===parseInt(DATA.recurrence,10))?"visible":"none";var r=i(t);c(r),a()},u=function(){var t=r(e.mark(function t(){var n;return e.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Q(tt);case 2:return n=t.sent,t.abrupt("return",V()?void 0:n);case 4:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}(),t.next=33,u();case 33:l=t.sent,s(l);case 35:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}();B("body",function(){var t=null;null!==document.querySelector(".abtasty-widget-base")||V()&&!U||(t=setInterval(function(){ot()?at():(clearInterval(t),st())},600))})}();
!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,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),i=new C(r||[]);return a._invoke=function(t,e,n){var r=l;return function(o,a){if(r===f)throw new Error("Generator is already running");if(r===p){if("throw"===o)throw a;return O()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var c=k(i,n);if(c){if(c===h)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=f;var s=u(t,e,n);if("normal"===s.type){if(r=n.done?p:d,s.arg===h)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=p,n.method="throw",n.arg=s.arg)}}}(t,n,i),a}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l="suspendedStart",d="suspendedYield",f="executing",p="completed",h={};function y(){}function g(){}function v(){}var m={};m[a]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(N([])));w&&w!==n&&r.call(w,a)&&(m=w);var x=v.prototype=y.prototype=Object.create(m);function S(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function A(t){var e;this._invoke=function(n,o){function a(){return new Promise(function(e,a){!function e(n,o,a,i){var c=u(t[n],t,o);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?Promise.resolve(l.__await).then(function(t){e("next",t,a,i)},function(t){e("throw",t,a,i)}):Promise.resolve(l).then(function(t){s.value=t,a(s)},function(t){return e("throw",t,a,i)})}i(c.arg)}(n,o,e,a)})}return e=e?e.then(a,a):a()}}function k(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,k(t,n),"throw"===n.method))return h;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=u(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,h;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,h):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function E(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function N(t){if(t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}return{next:O}}function O(){return{value:e,done:!0}}return g.prototype=x.constructor=v,v.constructor=g,v[c]=g.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},S(A.prototype),A.prototype[i]=function(){return this},t.AsyncIterator=A,t.async=function(e,n,r,o){var a=new A(s(e,n,r,o));return t.isGeneratorFunction(n)?a:a.next().then(function(t){return t.done?t.value:a.next()})},S(x),x[c]="Generator",x[a]=function(){return this},x.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=N,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(T),!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 o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(s){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(t,e){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"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,h):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),h},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),T(n),h}},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 o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),h}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}});function n(t,e,n,r,o,a,i){try{var c=t[a](i),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}var r=function(t){return function(){var e=this,r=arguments;return new Promise(function(o,a){var i=t.apply(e,r);function c(t){n(i,o,a,c,s,"next",t)}function s(t){n(i,o,a,c,s,"throw",t)}c(void 0)})}};var o=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 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}};var i=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)};var c=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var s=function(t){return a(t)||i(t)||c()};var u=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function l(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 d=function(t,e,n){return e&&l(t.prototype,e),n&&l(t,n),t},f=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 p=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t};var h=function(t,e){return!e||"object"!==f(e)&&"function"!=typeof e?p(t):e},y=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}),g=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});var v=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&&g(t,e)},m="Recurrence",b="Récurrence",w="Recurrencia",x="Wiederholung",S={en:"".concat(m," of the display"),fr:"".concat(b," de l'affichage"),es:"".concat(w," de visualización"),de:"".concat(x," der Anzeige")},A={en:"".concat(m," after closure"),fr:"".concat(b," après fermeture"),es:"".concat(w," tras el cierre"),de:"".concat(x," nach Schließung")},k={en:"".concat(m," after validation"),fr:"".concat(b," après validation"),es:"".concat(w," tras la validación"),de:"".concat(x," nach der Validierung")},E={en:"Trigger",fr:"Déclencheur",es:"Activador",de:"Trigger"};function T(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 C(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?T(n,!0).forEach(function(e){o(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):T(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var N={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"},O=(C({},N,{label:A,propName:"closingRecurrence"}),C({},N,{label:S,propName:"displayRecurrence"}),C({},N,{label:k,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"}]),L={category:"conditions",type:"selectelement",propName:"".concat("triggerEvent","Click"),label:E,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"}]},R={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"}]},_={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"}]},I={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"}]},P=([{category:"conditions",type:"select",label:{en:"Triggers on",fr:"Se déclenche",es:"¿ Cuándo se activa? ",de:"Triggert bei"},options:O,propName:"triggerEvent",value:"pageLoad"}].concat(s([L,R,_,I])),function(){return Object.prototype.hasOwnProperty.call(window,"ABTastyEditor")}),D=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"000000",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";u(this,t),this.uniqueId=e,this.widgetContainer=n,this.basicClassName="ab_widget_container_".concat(n),this.widgetContainerId="".concat(this.basicClassName,"_").concat(e),this.contentClassName="".concat(this.basicClassName,"_content"),this.overlayClassName="".concat(this.basicClassName,"_overlay"),this.closeButtonClassName="".concat(this.basicClassName,"_close_button"),this.hideClassName="ab_hide_".concat(e),this.domElement=this.getDom()}return d(t,[{key:"insert",value:function(){var t=this;return B("head",function(e){return e.appendChild(t.styleElement)},function(t){return console.error(t)}),B("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}},{key:"hide",value:function(){return this.domElement.classList.add(this.hideClassName),this}},{key:"init",value:function(){return this.insert(),this.addCloseEvent(),this}},{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),o=0;o<n;o++)r[o]=arguments[o];return r.push.apply(r,s(e)),r.forEach(function(e){e.addEventListener("click",function(){t.hide()},!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(P()?"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",P()&&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}(),j=(function(t){function e(t,n){var r;return u(this,e),(r=h(this,y(e).call(this,t,n))).stringStyles=r.getStyles(),r.styleElement=r.getStyleTag(r.stringStyles),r}v(e,D),d(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}")}}])}(),function(t){function e(t,n,r){var o;return u(this,e),(o=h(this,y(e).call(this,t,n))).position=r,o.stringStyles=o.getStyles(),o.styleElement=o.getStyleTag(o.stringStyles),o}v(e,D),d(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,r,o){var a;return u(this,e),(a=h(this,y(e).call(this,t,n))).position=r,a.referrerElement=o,a.stringStyles=a.getStyles(),a.styleElement=a.getStyleTag(a.stringStyles),a}v(e,D),d(e,[{key:"insert",value:function(){var t=this;return B("head",function(e){return e.appendChild(t.styleElement)},function(t){return console.error(t)}),B(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(){function t(e){var n=e.displayRecurrence,r=e.closingRecurrence,o=e.validationRecurrence,a=e.widgetName,i=e.uniqueId;u(this,t),this.displayRecurrence=parseFloat(n),this.closingRecurrence=parseFloat(r),this.validationRecurrence=parseFloat(o),this.storageName="Rec_".concat(a,"_").concat(i)}d(t,[{key:"getSessionRecurrenceStorage",value:function(){return sessionStorage.getItem(this.storageName)}},{key:"getLocalRecurrenceStorage",value:function(){return localStorage.getItem(this.storageName)}},{key:"removeSessionRecurrenceStorage",value:function(){return sessionStorage.removeItem(this.storageName)}},{key:"removeLocalRecurrenceStorage",value:function(){return localStorage.removeItem(this.storageName)}},{key:"getSessionRecurrence",value:function(){var t=this.getSessionRecurrenceStorage();try{return JSON.parse(t)}catch(t){return console.error("Cannot parse recurrence from storage, format is wrong, more details : ".concat(t)),!1}}},{key:"getLocalRecurrence",value:function(){var t=this.getLocalRecurrenceStorage();try{return JSON.parse(t)}catch(t){return console.error("Cannot parse recurrence from storage, format is wrong, more details : ".concat(t)),!1}}},{key:"getCurrentRecurrence",value:function(){return this.getSessionRecurrenceStorage()?this.getSessionRecurrence():this.getLocalRecurrenceStorage()?this.getLocalRecurrence():{type:!1}}},{key:"isOver",value:function(){var t=this.getLocalRecurrence(),e=(t?parseFloat(t.stamp):0)<(new Date).getTime();return e&&localStorage.removeItem(this.storageName),e&&!this.getLocalRecurrence()&&!this.getSessionRecurrence()}},{key:"setRecurrence",value:function(t,e){var n=this,r=this.getTypeOfStorage(t),o=this.getStamp(t),a={type:e,stamp:o},i=this.getCurrentRecurrence().type,c=function(){n.getSessionRecurrenceStorage()&&n.removeSessionRecurrenceStorage(),n.getLocalRecurrenceStorage()&&n.removeLocalRecurrenceStorage(),r.setItem(n.storageName,JSON.stringify(a))};if(!r)return!1;if(i&&"validation"!==e)if("closing"===e&&"validation"!==i)c();else{if("display"!==e||"validation"===i||"closing"===i)return!1;c()}else c();return o}},{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?window.localStorage:0===t&&window.sessionStorage)}}])}(),function(){function t(e){var n=e.triggerEvent,r=e.triggerSelector,o=e.triggerDelay;u(this,t),this.event=n,this.selector=r&&r.length?r:"body",this.delay=o}d(t,[{key:"onPageLoad",value:function(){return new Promise(function(t,e){if("complete"!==document.readyState){var n,r=["DOMContentLoaded",function(){return t(!0)},{passive:!0,once:!0}];(n=window).addEventListener.apply(n,r),setTimeout(function(){var t;return(t=window).removeEventListener.apply(t,r),e(!1)},15e3)}return t(!0)})}},{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,o=function(e){return s(document.querySelectorAll(t.selector)).some(function(n){return n.isSameNode(e)||!!e.closest(t.selector)})},a=["click",function(t){return!!o(t.target)&&(document.head.removeChild(e),n(!0))},{passive:!0,once:!0,capture:!0}];(r=document).addEventListener.apply(r,a)})}},{key:"onExitIntent",value:function(){var t,n=this;return new Promise((t=r(e.mark(function t(o){var a;return e.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return a=["mouseleave",function(){var t=r(e.mark(function t(){var r;return e.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!n.delay){t.next=5;break}r=1e3*n.delay,setTimeout(function(){return o(!0)},r),t.next=6;break;case 5:return t.abrupt("return",o(!0));case 6:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}(),{passive:!0,once:!0}],t.next=4,n.onPageLoad();case 4:t.sent&&B("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,n=this;return new Promise((t=r(e.mark(function t(r){var o;return e.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=1e3*n.delay,t.next=3,n.onPageLoad();case 3:t.sent&&setTimeout(function(){return r(!0)},o);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,o=["click","mousemove","scroll","keypress"],a=[function(){return r=n},{passive:!0}];o.forEach(function(t){var e;return(e=document).addEventListener.apply(e,[t].concat(a))});var i=setInterval(function(){r<=0?(e(!0),clearInterval(i),o.forEach(function(t){var e;return(e=document).removeEventListener.apply(e,[t].concat(a))})):r-=100},100)})}},{key:"isTriggered",value:function(){var t=r(e.mark(function t(){var n;return e.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:23;break;case 3:return t.next=5,this.onPageLoad();case 5:return n=t.sent,t.abrupt("break",24);case 7:return t.next=9,this.onClick();case 9:return n=t.sent,t.abrupt("break",24);case 11:return t.next=13,this.onExitIntent();case 13:return n=t.sent,t.abrupt("break",24);case 15:return t.next=17,this.onDelay();case 17:return n=t.sent,t.abrupt("break",24);case 19:return t.next=21,this.onReengage();case 21:return n=t.sent,t.abrupt("break",24);case 23:n=!1;case 24:return t.abrupt("return",n);case 25:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}])}(),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)}),B=function(t,e,n){var r,o=0;try{document.querySelector(t)}catch(e){var a="Selector «".concat(t,"» not valid.");return j(a),"function"==typeof n&&n(a)}r=setTimeout(function(){clearInterval(o);var e="Can't find element «".concat(t,"».");return j(e),"function"==typeof n&&n(e)},1e4),o=setInterval(function(){var n=document.querySelector(t);if(null!==n)return clearTimeout(r),clearInterval(o),"function"==typeof e&&e(n)},200)},z=function(t){var e=Object.prototype.hasOwnProperty;function n(t,r){return Array.isArray(t)?function(t,e){for(var r,o="",a="",c=Array.isArray(e),s=0;s<t.length;s++)(r=n(t[s]))&&(c&&e[s]&&(r=i(r)),o=o+a+r,a=" ");return o}(t,r):t&&"object"==typeof t?function(t){var n="",r="";for(var o in t)o&&t[o]&&e.call(t,o)&&(n=n+r+o,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+""}function o(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 o=e[0],a=1;a<e.length;a++)o=t(o,e[a]);return o}for(var i in n)if("class"===i){var c=e[i]||[];e[i]=(Array.isArray(c)?c:[c]).concat(n[i]||[])}else if("style"===i){var c=r(e[i]);c=c&&";"!==c[c.length-1]?c+";":c;var s=r(n[i]);s=s&&";"!==s[s.length-1]?s+";":s,e[i]=c+s}else e[i]=n[i];return e},t.classes=n,t.style=r,t.attr=o,t.attrs=function(t,a){var i="";for(var c in t)if(e.call(t,c)){var s=t[c];if("class"===c){s=n(s),i=o(c,s,!1,a)+i;continue}"style"===c&&(s=r(s)),i+=o(c,s,!1,a)}return i};var a=/["&<>]/;function i(t){var e=""+t,n=a.exec(e);if(!n)return t;var r,o,i,c="";for(r=n.index,o=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}o!==r&&(c+=e.substring(o,r)),o=r+1,c+=i}return o!==r?c+e.substring(o,r):c}return t.escape=i,t.rethrow=function t(e,n,r,o){if(!(e instanceof Error))throw e;if(!("undefined"==typeof window&&n||o))throw e.message+=" on line "+r,e;try{o=o||require("fs").readFileSync(n,"utf8")}catch(n){t(e,null,r)}var a=3,i=o.split("\n"),c=Math.max(r-a,0),s=Math.min(i.length,r+a);var a=i.slice(c,s).map(function(t,e){var n=e+c+1;return(n==r?" > ":" ")+n+"| "+t}).join("\n");e.path=n;e.message=(n||"Pug")+":"+r+"\n"+a+"\n\n"+e.message;throw e},t}({});function q(t){var e,n="";try{var r={},o=t||{};(function(t,r,o){n=(n+='<div class="abtasty-widget-relative-wrapper">')+'<div class="abtasty-wiget__close"'+z.attr("style",z.style(t),!0,!0)+">",n+="×</div>",n=(n=(n+='<div class="abtasty-widget-relative-container">')+'<div class="abtasty-widget-text abtasty-wiget__prevent-transform"'+z.attr("style",z.style(o),!0,!0)+">")+(null==(e=r)?"":e)+"</div></div></div>"}).call(this,"closeStyle"in o?o.closeStyle:"undefined"!=typeof closeStyle?closeStyle:void 0,"content"in o?o.content:"undefined"!=typeof content?content:void 0,"paddingOveruse"in o?o.paddingOveruse:"undefined"!=typeof paddingOveruse?paddingOveruse:void 0)}catch(t){z.rethrow(t,void 0,void 0,r[void 0])}return n}function F(t){var e=document.location.href;if(!t||!e)return!1;if(e===t)return!0;if(t.split("?")[0]!==function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.location;return"".concat(t.origin).concat(t.pathname)}(document.location))return!1;var n=t.split("?")[1],r=e.split("?")[1];if(n&&r&&r.length>0){var o=r.split("&").find(function(t){return-1==n.indexOf(t)});return!Boolean(o)}return e===t}!function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}(".abtasty-widget-base{width:300px;position:fixed;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding:3px;z-index:999999998}.abtasty-widget-top{-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);top:0;margin-top:66px;left:50%}.abtasty-widget-text{padding:10% 0;position:relative;max-width:100%;color:#fff;font-size:14px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.abtasty-widget-bottom{-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);bottom:0;left:50%}.abtasty-widget-left{left:0}.abtasty-widget-left,.abtasty-widget-right{-webkit-transform:translateY(-50%);transform:translateY(-50%);top:50%}.abtasty-widget-right{right:0;margin-right:80px}.abtasty-widget-relative-wrapper{position:relative;max-width:100%}.abtasty-widget-relative-container{max-width:100%;padding:20px;position:relative}.abtasty-widget-content{font-size:12px;width:300px;color:#fff;position:relative}.abtasty-wiget__prevent-transform>*{text-transform:none!important}.abtasty-wiget__close{position:absolute;top:0;right:0;width:14px;height:14px;color:#fff;line-height:14px;text-align:center;vertical-align:middle;z-index:99999999999999;cursor:pointer;font-size:14px;font-weight:300;border:0;font-family:Helvetica Neue,Helvetica,Arial,sans-serif!important}.abtasty-wiget__close:hover{color:#000}");var J=["fr","en","de","es"],G={1:{fr:"Ce produit a été acheté !purchaseQty! fois depuis !period! !unit!",en:"This item has been purchased !purchaseQty! times in the last !period! !unit!",de:"Dieses Produkt wurde in den letzten !period! !unit! !purchaseQty! mal aufgerufen",es:"Este producto se ha comprado !purchaseQty! veces en las últimas !period! !unit!"},2:{fr:"Cette page a été vue !views! fois depuis !period! !unit!",en:"This page has been viewed !views! times in the last !period! !unit!",de:"Diese Seite wurde in den letzten !period! !unit! !views! mal gekauft",es:"Esta página se ha visto !views! veces en las últimas !period! !unit!"}},H={fr:{days:"jours",hours:"heures"},en:{days:"days",hours:"hours"},de:{days:"Tagen",hours:"Stunden"},es:{days:"días",hours:"horas"}},M=["count_72hours","count_168hours"],W=function(){if(window.ABTasty)return window.ABTasty.accountSettings?window.ABTasty.accountSettings.identifier:window.ABTasty.getAccountSettings&&"function"==typeof window.ABTasty.getAccountSettings?window.ABTasty.getAccountSettings().identifier:void 0}()||"83cb13aabbfc8e879084f3a0bcdcb4f3",K={1:"i",2:"pv"},Q={1:function(){return window.ABTastyProductKey},2:function(){return encodeURIComponent("".concat(window.location.pathname).concat(window.location.search))}},U=function(t){return fetch("".concat("https://social-proof-api.abtasty.com/clients/").concat(W).concat("/metrics/").concat(K[t]).concat("?key=").concat(Q[t]())).then(function(t){return t.ok?t.json():new Error("Network response was not ok.")}).then(function(t){return t}).catch(function(){return console.error("Failed to fetch statistics from server.")})},V=void 0!==window.ABTastyEditor,Y=function(){try{return window.self!==window.top}catch(t){return!0}},Z=DATA,X=Z.recurrence,$=Z.stickTo,tt=Z.viewInterval,et=Z.typeOfContent,nt=Z.manualInput,rt=Z.fadeOut,ot=Z.positionSelector,at=function(t){return t.split(/(?:count_|hours)+/)[1]/(M.includes(t)?24:1)},it=function(t,e){var n=e.days,r=e.hours;return M.includes(t)?n:r},ct=function(t){return void 0===X||null===X||V||"ALWAYS"===X.toString().toUpperCase()||X<=t||0===parseInt(DATA.recurrence,10)},st=function(){return 1===et&&!window.ABTastyProductKey&&!V},ut=function(){return console.error("ABTasty_Log: Error during widget api execution, ABTastyProductKey is undefined")},lt=(navigator.language||navigator.userLanguage).substr(0,2),dt=function(t){return J.indexOf(t)>-1}(lt)?lt:"en",ft=function(){return nt||G[et][dt]};function pt(t){return ht.apply(this,arguments)}function ht(){return(ht=r(e.mark(function t(n){var o,a,i,c,s,u;return e.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o={padding:"".concat(DATA.contentPadding,"px")},a=function(t){return ft().replace("!purchaseQty!",t?t[tt]:"0 (example)").replace("!views!",t?t[tt]:"0 (example)").replace("!period!",at(tt)).replace("!unit!",it(tt,H[dt]))},i=function(t){n.innerHTML=q({content:t,paddingOveruse:o})},c=function(t){n.style.display=!t||ct(t[tt])?"visible":"none";var e=a(t);i(e),n.hidden=!1},s=function(){var t=r(e.mark(function t(){var n;return e.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,U(et);case 2:return n=t.sent,t.abrupt("return",Y()?void 0:n);case 4:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}(),t.next=7,s();case 7:u=t.sent,c(u);case 9:case"end":return t.stop()}},t)}))).apply(this,arguments)}var yt=function(){var t=null;Y()&&!V||(t=setInterval(function(){if(st())ut();else{clearInterval(t);var e=function(){if(!st()){var t,e=document.createElement("div");return e.className="abtasty-widget-base ".concat($?"":DATA.layout),e.id="abtasty-widget-base",e.style.display="block !important",e.style.marginBottom="".concat(-50+DATA.marginBottom,"px"),e.style.padding="".concat(DATA.borderRadius?DATA.borderRadius/Math.PI:0,"px"),e.style.marginTop="".concat(DATA.marginTop,"px"),e.style.marginLeft="".concat(DATA.marginLeft,"px"),e.style.marginRight="".concat(DATA.marginRight,"px"),e.style.textAlign=DATA.textAlign,e.style.borderColor=DATA.borderColor,e.style.borderStyle="solid",e.style.whiteSpace="initial",e.style.position=$?"absolute":"fixed",e.style.borderRadius="".concat(DATA.borderRadius,"px"),e.style.borderWidth="".concat(DATA.borderWidth,"px"),e.style.backgroundColor=DATA.backgroundColor,e.style.opacity="".concat(1-.01*DATA.backgroundOpacity),e.style.boxShadow=DATA.dropShadow?"5px 3px rgba(0,0,0,".concat(1-.01*DATA.shadowOpacity,")"):"none",e.dataset.testId=TEST_ID,rt&&!V&&setTimeout(function(){e.className="",e.style.display="none"},rt),t=$?ot:"beforeend",($?document.querySelector("".concat($)):document.body).insertAdjacentElement(t,e),function(t){t.addEventListener("click",function(e){e.target.matches(".abtasty-wiget__close")&&(t.hidden=!0)},!1)}(e),e.hidden=!0,e}ut()}();e&&e.nodeName&&(pt(e),gt(e))}},600))};function gt(t){!function t(e,n){F(e)?window.ABTasty.widgetRelaunchTimeout=setTimeout(function(){t(e,n)},64):(window.ABTasty.widgetRelaunchTimeout&&clearTimeout(window.ABTasty.widgetRelaunchTimeout),n())}(document.location.href,function(t){return function(){t&&(t.hidden=!0),setTimeout(function(){var e=window.ABTasty.getTestsOnPage();e.hasOwnProperty(TEST_ID)?t?(pt(t),gt(t)):yt():(t.remove(),gt(null))},400)}}(t))}B("body",yt)}();
{
"name": "@abtasty/social-proof",
"description": "simple",
"version": "0.1.26-2",
"version": "0.1.26-3",
"main": "dist/main.js",

@@ -6,0 +6,0 @@ "form": "dist/form.js",

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