@abtasty/interstitiel
Advanced tools
Comparing version 2.0.6-0 to 2.0.6-1
@@ -1,1 +0,1 @@ | ||
!function(){"use strict";var t;!function(t,e){if("undefined"==typeof document)return e;t=t||"";var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",a.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}(".abtasty-modal{display:none;z-index:1000000}.abtasty-modal,.abtasty-modal .abtasty-modal__underlay{position:fixed;top:0;left:0;width:100%;height:100%;overflow-y:auto}.abtasty-modal .abtasty-modal__underlay{background-color:rgba(0,0,0,.8);cursor:pointer}.abtasty-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia{width:100%;height:100%;margin:0 auto!important;max-height:100%}.abtasty-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__content{height:100%;padding:0}.abtasty-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__image,.abtasty-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__media{height:100%}.abtasty-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__image div{width:100%;height:100%;background-repeat:no-repeat;background-size:contain;background-position:50% 50%}.abtasty-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__video{height:100%;overflow:hidden}.abtasty-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__video iframe{overflow:auto;margin:auto;position:absolute;top:0;left:0;bottom:0;right:0}.abtasty-modal .abtasty-modal__area{width:600px;margin:150px auto!important;top:0;left:0;right:0;max-height:100%;z-index:100;position:relative}@media (max-width:740px){.abtasty-modal .abtasty-modal__area{width:100%;overflow:auto;margin:0 auto!important}}.abtasty-modal .abtasty-modal__area .abtasty-modal__close{width:27px;height:27px;position:fixed;top:40px;right:40px;background-color:#fff;border-radius:50%;cursor:pointer}.abtasty-modal .abtasty-modal__area .abtasty-modal__close svg{stroke:#000;stroke-width:4;height:27px}@media (max-width:740px){.abtasty-modal .abtasty-modal__area .abtasty-modal__close{top:10px;right:10px}}.abtasty-modal .abtasty-modal__area .abtasty-modal__content{text-align:center;padding:20px;font-family:Lato!important;color:#000}.abtasty-modal .abtasty-modal__area .abtasty-modal__content .abtasty-modal__title{font-weight:500;line-height:1.1;margin-bottom:10px;margin-top:30px;font-family:Lato!important;color:#c49641;text-shadow:0 2px 4px rgba(0,0,0,.5);font-size:48px;font-weight:700}.abtasty-modal .abtasty-modal__area .abtasty-modal__content .abtasty-modal__image{cursor:pointer}.abtasty-modal .abtasty-modal__area .abtasty-modal__content .abtasty-modal__text{margin:0 0 40px!important;font-weight:300;font-size:30px;color:#fff;text-shadow:0 2px 4px rgba(0,0,0,.5)}.abtasty-modal .abtasty-modal__area .abtasty-modal__content .abtasty-modal__cta{margin:0 0 10px!important;font-size:25px;font-weight:300;min-width:100px;height:80px;padding:20px}",void 0);var e=function(t){var e=Object.prototype.hasOwnProperty;function a(t,o){return Array.isArray(t)?function(t,e){for(var o,i="",r="",n=Array.isArray(e),l=0;l<t.length;l++)(o=a(t[l]))&&(n&&e[l]&&(o=d(o)),i=i+r+o,r=" ");return i}(t,o):t&&"object"==typeof t?function(t){var a="",o="";for(var i in t)i&&t[i]&&e.call(t,i)&&(a=a+o+i,o=" ");return a}(t):t||""}function o(t){if(!t)return"";if("object"==typeof t){var a="";for(var o in t)e.call(t,o)&&(a=a+o+":"+t[o]+";");return a}return";"!==(t+="")[t.length-1]?t+";":t}function i(t,e,a,o){return!1!==e&&null!=e&&(e||"class"!==t&&"style"!==t)?!0===e?" "+(o?t:t+'="'+t+'"'):("function"==typeof e.toJSON&&(e=e.toJSON()),"string"==typeof e||(e=JSON.stringify(e),a||-1===e.indexOf('"'))?(a&&(e=d(e))," "+t+'="'+e+'"'):" "+t+"='"+e.replace(/'/g,"'")+"'"):""}t.merge=function t(e,a){if(1===arguments.length){for(var i=e[0],r=1;r<e.length;r++)i=t(i,e[r]);return i}for(var d in a)if("class"===d){var n=e[d]||[];e[d]=(Array.isArray(n)?n:[n]).concat(a[d]||[])}else if("style"===d){var n=o(e[d]),l=o(a[d]);e[d]=n+l}else e[d]=a[d];return e},t.classes=a,t.style=o,t.attr=i,t.attrs=function(t,r){var d="";for(var n in t)if(e.call(t,n)){var l=t[n];if("class"===n){l=a(l),d=i(n,l,!1,r)+d;continue}"style"===n&&(l=o(l)),d+=i(n,l,!1,r)}return d};var r=/["&<>]/;function d(t){var e=""+t,a=r.exec(e);if(!a)return t;var o,i,d,n="";for(o=a.index,i=0;o<e.length;o++){switch(e.charCodeAt(o)){case 34:d=""";break;case 38:d="&";break;case 60:d="<";break;case 62:d=">";break;default:continue}i!==o&&(n+=e.substring(i,o)),i=o+1,n+=d}return i!==o?n+e.substring(i,o):n}return t.escape=d,t.rethrow=function t(e,a,o,i){if(!(e instanceof Error))throw e;if(!("undefined"==typeof window&&a||i))throw e.message+=" on line "+o,e;try{i=i||require("fs").readFileSync(a,"utf8")}catch(a){t(e,null,o)}var r=3,d=i.split("\n"),n=Math.max(o-r,0),l=Math.min(d.length,o+r);var r=d.slice(n,l).map(function(t,e){var a=e+n+1;return(a==o?" > ":" ")+a+"| "+t}).join("\n");e.path=a;e.message=(a||"Pug")+":"+o+"\n"+r+"\n\n"+e.message;throw e},t}({}),a=function(t){var a,o="",i={};try{var r={},d=t||{};(function(t,r,d,n,l,s,c,m,y,u,f,b,v,p,_,h,g,x){i.image=a=function(){o+='<div class="abtasty-modal__image">',o="fullscreenMedia"===c&&d?(o=o+"<a"+e.attr("href",b,!0,!0)+' target="_blank">')+"<div"+e.attr("style",e.style({"background-image":"url("+s+")"}),!0,!0)+"></div></a>":"fullscreenMedia"===c?o+"<div"+e.attr("style",e.style({"background-image":"url("+s+")"}),!0,!0)+"></div>":"centeredMedia"===c&&d?(o=o+"<a"+e.attr("href",b,!0,!0)+' target="_blank">')+"<img"+(e.attr("src",s,!0,!0)+e.attr("style",e.style({"border-radius":y+"px",border:u+"px solid "+m}),!0,!0))+"></a>":o+"<img"+(e.attr("src",s,!0,!0)+e.attr("style",e.style({"border-radius":y+"px",border:u+"px solid "+m}),!0,!0))+">",o+="</div>"},i.video=a=function(){var t="fullscreenMedia"===c?"":{"border-radius":y+"px",border:u+"px solid "+m};o=(o+='<div class="abtasty-modal__video">')+"<iframe"+(e.attr("id",g,!0,!0)+e.attr("src",x,!0,!0))+" allowfullscreen"+e.attr("style",e.style(t),!0,!0)+"></iframe></div>"},o=(o+='<div class="abtasty-modal__underlay"></div>')+"<div"+e.attr("class",e.classes(["abtasty-modal__area","abtasty-modal__"+c],[!1,!0]),!1,!0)+">",o+='<div class="abtasty-modal__close">',o+=" ",o+='<svg viewbox="0 0 40 40">',o+='<path class="close-x" d="M 10,10 L 30,30 M 30,10 L 10,30"></path></svg></div>',o+='<div class="abtasty-modal__content">',"textOnly"!=c&&(o+='<div class="abtasty-modal__media">',"image"===f&&i.image(),"video"===f&&"textOnly"!==c&&i.video(),o+="</div>"),"textOnly"!=c&&"mediaAndText"!=c||(o=(o=(o=(o=o+'<h2 class="abtasty-modal__title"'+e.attr("style",e.style({color:h}),!0,!0)+">")+e.escape(null==(a=_)?"":a)+"</h2>")+'<p class="abtasty-modal__text"'+e.attr("style",e.style({color:p}),!0,!0)+">")+e.escape(null==(a=v)?"":a)+"</p>",d&&(o=(o=o+'<a class="abtasty-modal__cta"'+e.attr("href",b,!0,!0)+' target="_blank"'+e.attr("style",e.style({"border-radius":r+"px",color:l,"background-color":t}),!0,!0)+">")+(null==(a=n)?"":a)+"</a>")),o+="</div></div>"}).call(this,"ctaBackgroundColor"in d?d.ctaBackgroundColor:"undefined"!=typeof ctaBackgroundColor?ctaBackgroundColor:void 0,"ctaBorderRadius"in d?d.ctaBorderRadius:"undefined"!=typeof ctaBorderRadius?ctaBorderRadius:void 0,"ctaEnabled"in d?d.ctaEnabled:"undefined"!=typeof ctaEnabled?ctaEnabled:void 0,"ctaLabel"in d?d.ctaLabel:"undefined"!=typeof ctaLabel?ctaLabel:void 0,"ctaTextColor"in d?d.ctaTextColor:"undefined"!=typeof ctaTextColor?ctaTextColor:void 0,"image"in d?d.image:"undefined"!=typeof image?image:void 0,"layout"in d?d.layout:"undefined"!=typeof layout?layout:void 0,"mediaBorderColor"in d?d.mediaBorderColor:"undefined"!=typeof mediaBorderColor?mediaBorderColor:void 0,"mediaBorderRadius"in d?d.mediaBorderRadius:"undefined"!=typeof mediaBorderRadius?mediaBorderRadius:void 0,"mediaBorderThickness"in d?d.mediaBorderThickness:"undefined"!=typeof mediaBorderThickness?mediaBorderThickness:void 0,"mediaType"in d?d.mediaType:"undefined"!=typeof mediaType?mediaType:void 0,"redirectionUrl"in d?d.redirectionUrl:"undefined"!=typeof redirectionUrl?redirectionUrl:void 0,"text"in d?d.text:"undefined"!=typeof text?text:void 0,"textTextColor"in d?d.textTextColor:"undefined"!=typeof textTextColor?textTextColor:void 0,"title"in d?d.title:"undefined"!=typeof title?title:void 0,"titleTextColor"in d?d.titleTextColor:"undefined"!=typeof titleTextColor?titleTextColor:void 0,"videoID"in d?d.videoID:"undefined"!=typeof videoID?videoID:void 0,"videoUrl"in d?d.videoUrl:"undefined"!=typeof videoUrl?videoUrl:void 0)}catch(t){e.rethrow(t,void 0,void 0,r[void 0])}return o},o="AB Tasty Advertising modal "+TEST_ID,i=void 0!==window.ABTastyEditor,r=!!sessionStorage.getItem("ABTastyPreview"),d=Date.now();function n(t){var e=t.layout,a=void 0,o=void 0,i=window.innerWidth<window.innerHeight;if("fullscreenMedia"===e)!i?a=(o=window.innerHeight)/9*16:o=(a=window.innerWidth)/16*9;else{o=(a=window.innerWidth>=600?560:window.innerWidth-40)/16*9}return{height:Math.round(o),width:Math.round(a)}}var l,s,c,m=function(){var e="abtasty-widget-video-"+Date.now(),o=document.createElement("abtasty-modal"),i=function(){return o.querySelector(".abtasty-modal__underlay")},r=function(){return o.querySelector(".abtasty-modal__close")},d=function(){return o.querySelector("#"+e)};function l(e){var a=e.mediaType;o.style.display="none","video"===a&&(o.innerHTML=""),t&&(document.querySelector("body").style.overflowY=t)}function s(t){i().addEventListener("click",function(){return l(t)}),r().addEventListener("click",function(){return l(t)})}return{hide:l,show:function(t){o.style.display="block",s(t)},append:function(t){o.className="abtasty-modal",o.dataset.testId=TEST_ID;var i=Object.assign(t,{videoID:e,videoUrl:(r=t.video,s=t.autoPlay,c=r.indexOf("youtu")>-1,m=r.indexOf("vimeo")>-1,y=void 0,c?(y="//www.youtube.com/embed/"+r.match(/^.*(youtu.be\/|v\/|e\/|u\/\w+\/|embed\/|v=)([^#&?]*).*/)[2]+"?rel=0",s&&(y+="&autoplay=1")):m&&(y="//player.vimeo.com/video/"+r.match(/.*(www\.)?vimeo.com\/(\d+)($|\/)/)[2]),y)});var r,s,c,m,y;if(o.innerHTML=a(i),document.body.appendChild(o),d()){var u=n(t),f=u.width,b=u.height;d().style.width=f+"px",d().style.height=b+"px",d().frameBorder=0,window.addEventListener("resize",function(){var e=n(t);d().style.width=e.width+"px",d().style.height=e.height+"px"})}0!==t.timer&&setTimeout(function(){return l(t)},1e3*t.timer)},handleClose:s}}();function y(e,a){var n,l,s,c;l=e.recurrence,s=Number(l),(!(c=localStorage.getItem(o))||-1===s||i||r||(0===s?!sessionStorage.getItem(o):c<d-24*s*60*60*1e3))&&(m.append(e),m.show(e),e.actionTrackingEvent&&ABTastyEvent(e.actionTrackingName,null,a),n=document.querySelector("body"),t=window.getComputedStyle(n).overflowY,n.style.overflowY="hidden",i||(localStorage.setItem(o,d),sessionStorage.setItem(o,d)))}"exitIntent"===DATA.triggerEvent?(l=function(){return y(DATA,TEST_ID)},c=0,document.addEventListener("mousemove",function(t){c=t.clientY}),document.body.addEventListener("mouseleave",function t(e){e.clientY<=50&&(c=0,clearInterval(s),s=setTimeout(function(){0===c&&(l(),document.removeEventListener("mouseleave",t))},0))},!1)):y(DATA,TEST_ID)}(); | ||
!function(){"use strict";var t;!function(t,e){if("undefined"==typeof document)return e;t=t||"";var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",a.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}(".abtasty-modal{display:none;z-index:1000000}.abtasty-modal,.abtasty-modal .abtasty-modal__underlay{position:fixed;top:0;left:0;width:100%;height:100%;overflow-y:auto}.abtasty-modal .abtasty-modal__underlay{background-color:rgba(0,0,0,.8);cursor:pointer}.abtasty-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia{width:100%;height:100%;margin:0 auto!important;max-height:100%}.abtasty-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__content{height:100%;padding:0}.abtasty-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__image,.abtasty-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__media{height:100%}.abtasty-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__image div{width:100%;height:100%;background-repeat:no-repeat;background-size:contain;background-position:50% 50%}.abtasty-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__video{height:100%;overflow:hidden}.abtasty-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__video iframe{overflow:auto;margin:auto;position:absolute;top:0;left:0;bottom:0;right:0}.abtasty-modal .abtasty-modal__area{width:600px;margin:150px auto!important;top:0;left:0;right:0;max-height:100%;z-index:100;position:relative}@media (max-width:740px){.abtasty-modal .abtasty-modal__area{width:100%;overflow:auto;margin:0 auto!important}}.abtasty-modal .abtasty-modal__area .abtasty-modal__close{width:27px;height:27px;position:fixed;top:40px;right:40px;background-color:#fff;border-radius:50%;cursor:pointer}.abtasty-modal .abtasty-modal__area .abtasty-modal__close svg{stroke:#000;stroke-width:4;height:27px}@media (max-width:740px){.abtasty-modal .abtasty-modal__area .abtasty-modal__close{top:10px;right:10px}}.abtasty-modal .abtasty-modal__area .abtasty-modal__content{text-align:center;padding:20px;font-family:Lato!important;color:#000}.abtasty-modal .abtasty-modal__area .abtasty-modal__content .abtasty-modal__title{font-weight:500;line-height:1.1;margin-bottom:10px;margin-top:30px;font-family:Lato!important;color:#c49641;text-shadow:0 2px 4px rgba(0,0,0,.5);font-size:48px;font-weight:700}.abtasty-modal .abtasty-modal__area .abtasty-modal__content .abtasty-modal__image{cursor:pointer}.abtasty-modal .abtasty-modal__area .abtasty-modal__content .abtasty-modal__text{margin:0 0 40px!important;font-weight:300;font-size:30px;line-height:30px;color:#fff;text-shadow:0 2px 4px rgba(0,0,0,.5)}.abtasty-modal .abtasty-modal__area .abtasty-modal__content .abtasty-modal__cta{margin:0 0 10px!important;font-size:25px;font-weight:300;min-width:100px;height:80px;padding:20px}",void 0);var e=function(t){var e=Object.prototype.hasOwnProperty;function a(t,o){return Array.isArray(t)?function(t,e){for(var o,i="",r="",n=Array.isArray(e),l=0;l<t.length;l++)(o=a(t[l]))&&(n&&e[l]&&(o=d(o)),i=i+r+o,r=" ");return i}(t,o):t&&"object"==typeof t?function(t){var a="",o="";for(var i in t)i&&t[i]&&e.call(t,i)&&(a=a+o+i,o=" ");return a}(t):t||""}function o(t){if(!t)return"";if("object"==typeof t){var a="";for(var o in t)e.call(t,o)&&(a=a+o+":"+t[o]+";");return a}return";"!==(t+="")[t.length-1]?t+";":t}function i(t,e,a,o){return!1!==e&&null!=e&&(e||"class"!==t&&"style"!==t)?!0===e?" "+(o?t:t+'="'+t+'"'):("function"==typeof e.toJSON&&(e=e.toJSON()),"string"==typeof e||(e=JSON.stringify(e),a||-1===e.indexOf('"'))?(a&&(e=d(e))," "+t+'="'+e+'"'):" "+t+"='"+e.replace(/'/g,"'")+"'"):""}t.merge=function t(e,a){if(1===arguments.length){for(var i=e[0],r=1;r<e.length;r++)i=t(i,e[r]);return i}for(var d in a)if("class"===d){var n=e[d]||[];e[d]=(Array.isArray(n)?n:[n]).concat(a[d]||[])}else if("style"===d){var n=o(e[d]),l=o(a[d]);e[d]=n+l}else e[d]=a[d];return e},t.classes=a,t.style=o,t.attr=i,t.attrs=function(t,r){var d="";for(var n in t)if(e.call(t,n)){var l=t[n];if("class"===n){l=a(l),d=i(n,l,!1,r)+d;continue}"style"===n&&(l=o(l)),d+=i(n,l,!1,r)}return d};var r=/["&<>]/;function d(t){var e=""+t,a=r.exec(e);if(!a)return t;var o,i,d,n="";for(o=a.index,i=0;o<e.length;o++){switch(e.charCodeAt(o)){case 34:d=""";break;case 38:d="&";break;case 60:d="<";break;case 62:d=">";break;default:continue}i!==o&&(n+=e.substring(i,o)),i=o+1,n+=d}return i!==o?n+e.substring(i,o):n}return t.escape=d,t.rethrow=function t(e,a,o,i){if(!(e instanceof Error))throw e;if(!("undefined"==typeof window&&a||i))throw e.message+=" on line "+o,e;try{i=i||require("fs").readFileSync(a,"utf8")}catch(a){t(e,null,o)}var r=3,d=i.split("\n"),n=Math.max(o-r,0),l=Math.min(d.length,o+r);var r=d.slice(n,l).map(function(t,e){var a=e+n+1;return(a==o?" > ":" ")+a+"| "+t}).join("\n");e.path=a;e.message=(a||"Pug")+":"+o+"\n"+r+"\n\n"+e.message;throw e},t}({}),a=function(t){var a,o="",i={};try{var r={},d=t||{};(function(t,r,d,n,l,s,c,m,y,u,f,b,v,p,_,h,g,x){i.image=a=function(){o+='<div class="abtasty-modal__image">',o="fullscreenMedia"===c&&d?(o=o+"<a"+e.attr("href",b,!0,!0)+' target="_blank">')+"<div"+e.attr("style",e.style({"background-image":"url("+s+")"}),!0,!0)+"></div></a>":"fullscreenMedia"===c?o+"<div"+e.attr("style",e.style({"background-image":"url("+s+")"}),!0,!0)+"></div>":"centeredMedia"===c&&d?(o=o+"<a"+e.attr("href",b,!0,!0)+' target="_blank">')+"<img"+(e.attr("src",s,!0,!0)+e.attr("style",e.style({"border-radius":y+"px",border:u+"px solid "+m}),!0,!0))+"></a>":o+"<img"+(e.attr("src",s,!0,!0)+e.attr("style",e.style({"border-radius":y+"px",border:u+"px solid "+m}),!0,!0))+">",o+="</div>"},i.video=a=function(){var t="fullscreenMedia"===c?"":{"border-radius":y+"px",border:u+"px solid "+m};o=(o+='<div class="abtasty-modal__video">')+"<iframe"+(e.attr("id",g,!0,!0)+e.attr("src",x,!0,!0))+" allowfullscreen"+e.attr("style",e.style(t),!0,!0)+"></iframe></div>"},o=(o+='<div class="abtasty-modal__underlay"></div>')+"<div"+e.attr("class",e.classes(["abtasty-modal__area","abtasty-modal__"+c],[!1,!0]),!1,!0)+">",o+='<div class="abtasty-modal__close">',o+=" ",o+='<svg viewbox="0 0 40 40">',o+='<path class="close-x" d="M 10,10 L 30,30 M 30,10 L 10,30"></path></svg></div>',o+='<div class="abtasty-modal__content">',"textOnly"!=c&&(o+='<div class="abtasty-modal__media">',"image"===f&&i.image(),"video"===f&&"textOnly"!==c&&i.video(),o+="</div>"),"textOnly"!=c&&"mediaAndText"!=c||(o=(o=(o=(o=o+'<h2 class="abtasty-modal__title"'+e.attr("style",e.style({color:h}),!0,!0)+">")+e.escape(null==(a=_)?"":a)+"</h2>")+'<p class="abtasty-modal__text"'+e.attr("style",e.style({color:p}),!0,!0)+">")+e.escape(null==(a=v)?"":a)+"</p>",d&&(o=(o=o+'<a class="abtasty-modal__cta"'+e.attr("href",b,!0,!0)+' target="_blank"'+e.attr("style",e.style({"border-radius":r+"px",color:l,"background-color":t}),!0,!0)+">")+(null==(a=n)?"":a)+"</a>")),o+="</div></div>"}).call(this,"ctaBackgroundColor"in d?d.ctaBackgroundColor:"undefined"!=typeof ctaBackgroundColor?ctaBackgroundColor:void 0,"ctaBorderRadius"in d?d.ctaBorderRadius:"undefined"!=typeof ctaBorderRadius?ctaBorderRadius:void 0,"ctaEnabled"in d?d.ctaEnabled:"undefined"!=typeof ctaEnabled?ctaEnabled:void 0,"ctaLabel"in d?d.ctaLabel:"undefined"!=typeof ctaLabel?ctaLabel:void 0,"ctaTextColor"in d?d.ctaTextColor:"undefined"!=typeof ctaTextColor?ctaTextColor:void 0,"image"in d?d.image:"undefined"!=typeof image?image:void 0,"layout"in d?d.layout:"undefined"!=typeof layout?layout:void 0,"mediaBorderColor"in d?d.mediaBorderColor:"undefined"!=typeof mediaBorderColor?mediaBorderColor:void 0,"mediaBorderRadius"in d?d.mediaBorderRadius:"undefined"!=typeof mediaBorderRadius?mediaBorderRadius:void 0,"mediaBorderThickness"in d?d.mediaBorderThickness:"undefined"!=typeof mediaBorderThickness?mediaBorderThickness:void 0,"mediaType"in d?d.mediaType:"undefined"!=typeof mediaType?mediaType:void 0,"redirectionUrl"in d?d.redirectionUrl:"undefined"!=typeof redirectionUrl?redirectionUrl:void 0,"text"in d?d.text:"undefined"!=typeof text?text:void 0,"textTextColor"in d?d.textTextColor:"undefined"!=typeof textTextColor?textTextColor:void 0,"title"in d?d.title:"undefined"!=typeof title?title:void 0,"titleTextColor"in d?d.titleTextColor:"undefined"!=typeof titleTextColor?titleTextColor:void 0,"videoID"in d?d.videoID:"undefined"!=typeof videoID?videoID:void 0,"videoUrl"in d?d.videoUrl:"undefined"!=typeof videoUrl?videoUrl:void 0)}catch(t){e.rethrow(t,void 0,void 0,r[void 0])}return o},o="AB Tasty Advertising modal "+TEST_ID,i=void 0!==window.ABTastyEditor,r=!!sessionStorage.getItem("ABTastyPreview"),d=Date.now();function n(t){var e=t.layout,a=void 0,o=void 0,i=window.innerWidth<window.innerHeight;if("fullscreenMedia"===e)!i?a=(o=window.innerHeight)/9*16:o=(a=window.innerWidth)/16*9;else{o=(a=window.innerWidth>=600?560:window.innerWidth-40)/16*9}return{height:Math.round(o),width:Math.round(a)}}var l,s,c,m=function(){var e="abtasty-widget-video-"+Date.now(),o=document.createElement("abtasty-modal"),i=function(){return o.querySelector(".abtasty-modal__underlay")},r=function(){return o.querySelector(".abtasty-modal__close")},d=function(){return o.querySelector("#"+e)};function l(e){var a=e.mediaType;o.style.display="none","video"===a&&(o.innerHTML=""),t&&(document.querySelector("body").style.overflowY=t)}function s(t){i().addEventListener("click",function(){return l(t)}),r().addEventListener("click",function(){return l(t)})}return{hide:l,show:function(t){o.style.display="block",s(t)},append:function(t){o.className="abtasty-modal",o.dataset.testId=TEST_ID;var i=Object.assign(t,{videoID:e,videoUrl:(r=t.video,s=t.autoPlay,c=r.indexOf("youtu")>-1,m=r.indexOf("vimeo")>-1,y=void 0,c?(y="//www.youtube.com/embed/"+r.match(/^.*(youtu.be\/|v\/|e\/|u\/\w+\/|embed\/|v=)([^#&?]*).*/)[2]+"?rel=0",s&&(y+="&autoplay=1")):m&&(y="//player.vimeo.com/video/"+r.match(/.*(www\.)?vimeo.com\/(\d+)($|\/)/)[2]),y)});var r,s,c,m,y;if(o.innerHTML=a(i),document.body.appendChild(o),d()){var u=n(t),f=u.width,b=u.height;d().style.width=f+"px",d().style.height=b+"px",d().frameBorder=0,window.addEventListener("resize",function(){var e=n(t);d().style.width=e.width+"px",d().style.height=e.height+"px"})}0!==t.timer&&setTimeout(function(){return l(t)},1e3*t.timer)},handleClose:s}}();function y(e,a){var n,l,s,c;l=e.recurrence,s=Number(l),(!(c=localStorage.getItem(o))||-1===s||i||r||(0===s?!sessionStorage.getItem(o):c<d-24*s*60*60*1e3))&&(m.append(e),m.show(e),e.actionTrackingEvent&&ABTastyEvent(e.actionTrackingName,null,a),n=document.querySelector("body"),t=window.getComputedStyle(n).overflowY,n.style.overflowY="hidden",i||(localStorage.setItem(o,d),sessionStorage.setItem(o,d)))}"exitIntent"===DATA.triggerEvent?(l=function(){return y(DATA,TEST_ID)},c=0,document.addEventListener("mousemove",function(t){c=t.clientY}),document.body.addEventListener("mouseleave",function t(e){e.clientY<=50&&(c=0,clearInterval(s),s=setTimeout(function(){0===c&&(l(),document.removeEventListener("mouseleave",t))},0))},!1)):y(DATA,TEST_ID)}(); |
{ | ||
"name": "@abtasty/interstitiel", | ||
"description": "A simple widget", | ||
"version": "2.0.6-0", | ||
"version": "2.0.6-1", | ||
"main": "dist/main.js", | ||
@@ -6,0 +6,0 @@ "form": "dist/form.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
23250
0