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

@abtasty/countdown

Package Overview
Dependencies
Maintainers
14
Versions
160
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@abtasty/countdown - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3-0

2

dist/main.js

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

!function(){"use strict";var t=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];t.unshift("[AB Tasty Widget] "+PACKAGE+":"),console.log.apply(console,t)},e=function(t){var e=Object.prototype.hasOwnProperty;function n(t,a){return Array.isArray(t)?function(t,e){for(var a,r="",o="",s=Array.isArray(e),c=0;c<t.length;c++)(a=n(t[c]))&&(s&&e[c]&&(a=i(a)),r=r+o+a,o=" ");return r}(t,a):t&&"object"==typeof t?function(t){var n="",a="";for(var r in t)r&&t[r]&&e.call(t,r)&&(n=n+a+r,a=" ");return n}(t):t||""}function a(t){if(!t)return"";if("object"==typeof t){var n="";for(var a in t)e.call(t,a)&&(n=n+a+":"+t[a]+";");return n}return";"!==(t+="")[t.length-1]?t+";":t}function r(t,e,n,a){return!1!==e&&null!=e&&(e||"class"!==t&&"style"!==t)?!0===e?" "+(a?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 r=e[0],o=1;o<e.length;o++)r=t(r,e[o]);return r}for(var i in n)if("class"===i){var s=e[i]||[];e[i]=(Array.isArray(s)?s:[s]).concat(n[i]||[])}else if("style"===i){var s=a(e[i]),c=a(n[i]);e[i]=s+c}else e[i]=n[i];return e},t.classes=n,t.style=a,t.attr=r,t.attrs=function(t,o){var i="";for(var s in t)if(e.call(t,s)){var c=t[s];if("class"===s){c=n(c),i=r(s,c,!1,o)+i;continue}"style"===s&&(c=a(c)),i+=r(s,c,!1,o)}return i};var o=/["&<>]/;function i(t){var e=""+t,n=o.exec(e);if(!n)return t;var a,r,i,s="";for(a=n.index,r=0;a<e.length;a++){switch(e.charCodeAt(a)){case 34:i="&quot;";break;case 38:i="&amp;";break;case 60:i="&lt;";break;case 62:i="&gt;";break;default:continue}r!==a&&(s+=e.substring(r,a)),r=a+1,s+=i}return r!==a?s+e.substring(r,a):s}return t.escape=i,t.rethrow=function t(e,n,a,r){if(!(e instanceof Error))throw e;if(!("undefined"==typeof window&&n||r))throw e.message+=" on line "+a,e;try{r=r||require("fs").readFileSync(n,"utf8")}catch(n){t(e,null,a)}var o=3,i=r.split("\n"),s=Math.max(a-o,0),c=Math.min(i.length,a+o);var o=i.slice(s,c).map(function(t,e){var n=e+s+1;return(n==a?" > ":" ")+n+"| "+t}).join("\n");e.path=n;e.message=(n||"Pug")+":"+a+"\n"+o+"\n\n"+e.message;throw e},t}({});!function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&a.firstChild?a.insertBefore(r,a.firstChild):a.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}}("abtasty-countdown {\n display: inline-block;\n}\n\nabtasty-countdown > div {\n display: inline-block;\n text-align: center;\n margin: 10px;\n}\n");var n,a,r=["fr","en","de","es"],o=["day","hour","minute","second"],i={day:{en:"Days",fr:"Jours",es:"Dias",de:"Tage"},hour:{en:"Hours",fr:"Heures",es:"Dias",de:"Tage"},second:{en:"Sec",fr:"Sec",es:"Seg",de:"Sek"}},s=DATA,c=s.date,u=s.time,d=document.createElement("abtasty-countdown"),l=navigator.language,f=function(t){return r.includes(t)}(l)?l:"en",v={day:i.day[f],hour:i.hour[f],minute:"Min",second:i.second[f]},y=void 0,g=void 0,h=void 0,m=void 0,w=void 0,b=(n=new Date(c),a=new Date(u),new Date(n.getFullYear(),n.getMonth(),n.getDate(),a.getHours(),a.getMinutes(),a.getSeconds()).getTime()),p=function(){var t=(new Date).getTime(),e=(b-t)/1e3;if(e<=0)clearInterval(y);else{var n=Math.floor(e/86400);e-=86400*n;var a=Math.floor(e/3600);e-=3600*a;var r=Math.floor(e/60);e-=60*r;var o=Math.floor(e);g.textContent=n,h.textContent=a,m.textContent=r,w.textContent=o}};!function(e,n,a){var r,o=0;try{document.querySelector(e)}catch(n){var i='Selector "'+e+'" not valid.';return t(i),"function"==typeof a&&a(i)}r=setTimeout(function(){clearInterval(o);var n="Can't find element \""+e+'".';return t(n),"function"==typeof a&&a(n)},1e4),o=setInterval(function(){var t=document.querySelector(e);if(null!==t)return clearTimeout(r),clearInterval(o),"function"==typeof n&&n(t)},200)}(DATA.selector,function(t){var n=function(t){var n="";try{var a={};n+='<div class="abtasty-countdown-days">',n+='<div class="abtasty-countdown-days__digit"></div>',n+='<div class="abtasty-countdown-days__text"></div></div>',n+='<div class="abtasty-countdown-hours">',n+='<div class="abtasty-countdown-hours__digit"></div>',n+='<div class="abtasty-countdown-hours__text"></div></div>',n+='<div class="abtasty-countdown-minutes">',n+='<div class="abtasty-countdown-minutes__digit"></div>',n+='<div class="abtasty-countdown-minutes__text"></div></div>',n+='<div class="abtasty-countdown-seconds">',n+='<div class="abtasty-countdown-seconds__digit"></div>',n+='<div class="abtasty-countdown-seconds__text"></div></div>'}catch(t){e.rethrow(t,void 0,void 0,a[void 0])}return n}();d.innerHTML=n,t.appendChild(d),g=d.querySelector(".abtasty-countdown-days__digit"),h=d.querySelector(".abtasty-countdown-hours__digit"),m=d.querySelector(".abtasty-countdown-minutes__digit"),w=d.querySelector(".abtasty-countdown-seconds__digit"),o.forEach(function(t){d.querySelector(".abtasty-countdown-"+t+"s__text").textContent=v[t]}),y=setInterval(p,1e3)})}();
!function(){"use strict";var t=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];t.unshift("[AB Tasty Widget] "+PACKAGE+":"),console.log.apply(console,t)},e=function(t){var e=Object.prototype.hasOwnProperty;function n(t,r){return Array.isArray(t)?function(t,e){for(var r,a="",o="",s=Array.isArray(e),c=0;c<t.length;c++)(r=n(t[c]))&&(s&&e[c]&&(r=i(r)),a=a+o+r,o=" ");return a}(t,r):t&&"object"==typeof t?function(t){var n="",r="";for(var a in t)a&&t[a]&&e.call(t,a)&&(n=n+r+a,r=" ");return n}(t):t||""}function r(t){if(!t)return"";if("object"==typeof t){var n="";for(var r in t)e.call(t,r)&&(n=n+r+":"+t[r]+";");return n}return";"!==(t+="")[t.length-1]?t+";":t}function a(t,e,n,r){return!1!==e&&null!=e&&(e||"class"!==t&&"style"!==t)?!0===e?" "+(r?t:t+'="'+t+'"'):("function"==typeof e.toJSON&&(e=e.toJSON()),"string"==typeof e||(e=JSON.stringify(e),n||-1===e.indexOf('"'))?(n&&(e=i(e))," "+t+'="'+e+'"'):" "+t+"='"+e.replace(/'/g,"&#39;")+"'"):""}t.merge=function t(e,n){if(1===arguments.length){for(var a=e[0],o=1;o<e.length;o++)a=t(a,e[o]);return a}for(var i in n)if("class"===i){var s=e[i]||[];e[i]=(Array.isArray(s)?s:[s]).concat(n[i]||[])}else if("style"===i){var s=r(e[i]),c=r(n[i]);e[i]=s+c}else e[i]=n[i];return e},t.classes=n,t.style=r,t.attr=a,t.attrs=function(t,o){var i="";for(var s in t)if(e.call(t,s)){var c=t[s];if("class"===s){c=n(c),i=a(s,c,!1,o)+i;continue}"style"===s&&(c=r(c)),i+=a(s,c,!1,o)}return i};var o=/["&<>]/;function i(t){var e=""+t,n=o.exec(e);if(!n)return t;var r,a,i,s="";for(r=n.index,a=0;r<e.length;r++){switch(e.charCodeAt(r)){case 34:i="&quot;";break;case 38:i="&amp;";break;case 60:i="&lt;";break;case 62:i="&gt;";break;default:continue}a!==r&&(s+=e.substring(a,r)),a=r+1,s+=i}return a!==r?s+e.substring(a,r):s}return t.escape=i,t.rethrow=function t(e,n,r,a){if(!(e instanceof Error))throw e;if(!("undefined"==typeof window&&n||a))throw e.message+=" on line "+r,e;try{a=a||require("fs").readFileSync(n,"utf8")}catch(n){t(e,null,r)}var o=3,i=a.split("\n"),s=Math.max(r-o,0),c=Math.min(i.length,r+o);var o=i.slice(s,c).map(function(t,e){var n=e+s+1;return(n==r?" > ":" ")+n+"| "+t}).join("\n");e.path=n;e.message=(n||"Pug")+":"+r+"\n"+o+"\n\n"+e.message;throw e},t}({});Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(t,e){if(null==this)throw new TypeError('"this" is null or not defined');var n=Object(this),r=n.length>>>0;if(0===r)return!1;for(var a=0|e,o=Math.max(a>=0?a:r-Math.abs(a),0);o<r;){if(n[o]===t)return!0;o++}return!1}});!function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=t:a.appendChild(document.createTextNode(t))}}("abtasty-countdown {\n display: inline-block;\n}\n\nabtasty-countdown > div {\n display: inline-block;\n text-align: center;\n margin: 10px;\n}\n");var n,r,a=["fr","en","de","es"],o=["day","hour","minute","second"],i={day:{en:"Days",fr:"Jours",es:"Dias",de:"Tage"},hour:{en:"Hours",fr:"Heures",es:"Dias",de:"Tage"},second:{en:"Sec",fr:"Sec",es:"Seg",de:"Sek"}},s=DATA,c=s.date,u=s.time,d=document.createElement("abtasty-countdown"),l=navigator.language,f=function(t){return a.includes(t)}(l)?l:"en",v={day:i.day[f],hour:i.hour[f],minute:"Min",second:i.second[f]},y=void 0,h=void 0,g=void 0,p=void 0,w=void 0,b=(n=new Date(c),r=new Date(u),new Date(n.getFullYear(),n.getMonth(),n.getDate(),r.getHours(),r.getMinutes(),r.getSeconds()).getTime()),m=function(){var t=(new Date).getTime(),e=(b-t)/1e3;if(e<=0)clearInterval(y);else{var n=Math.floor(e/86400);e-=86400*n;var r=Math.floor(e/3600);e-=3600*r;var a=Math.floor(e/60);e-=60*a;var o=Math.floor(e);h.textContent=n,g.textContent=r,p.textContent=a,w.textContent=o}};!function(e,n,r){var a,o=0;try{document.querySelector(e)}catch(n){var i='Selector "'+e+'" not valid.';return t(i),"function"==typeof r&&r(i)}a=setTimeout(function(){clearInterval(o);var n="Can't find element \""+e+'".';return t(n),"function"==typeof r&&r(n)},1e4),o=setInterval(function(){var t=document.querySelector(e);if(null!==t)return clearTimeout(a),clearInterval(o),"function"==typeof n&&n(t)},200)}(DATA.selector,function(t){var n=function(t){var n="";try{var r={};n+='<div class="abtasty-countdown-days">',n+='<div class="abtasty-countdown-days__digit"></div>',n+='<div class="abtasty-countdown-days__text"></div></div>',n+='<div class="abtasty-countdown-hours">',n+='<div class="abtasty-countdown-hours__digit"></div>',n+='<div class="abtasty-countdown-hours__text"></div></div>',n+='<div class="abtasty-countdown-minutes">',n+='<div class="abtasty-countdown-minutes__digit"></div>',n+='<div class="abtasty-countdown-minutes__text"></div></div>',n+='<div class="abtasty-countdown-seconds">',n+='<div class="abtasty-countdown-seconds__digit"></div>',n+='<div class="abtasty-countdown-seconds__text"></div></div>'}catch(t){e.rethrow(t,void 0,void 0,r[void 0])}return n}();d.innerHTML=n,t.appendChild(d),h=d.querySelector(".abtasty-countdown-days__digit"),g=d.querySelector(".abtasty-countdown-hours__digit"),p=d.querySelector(".abtasty-countdown-minutes__digit"),w=d.querySelector(".abtasty-countdown-seconds__digit"),o.forEach(function(t){d.querySelector(".abtasty-countdown-"+t+"s__text").textContent=v[t]}),y=setInterval(m,1e3)})}();
{
"name": "@abtasty/countdown",
"description": "Widget for AB Tasty",
"version": "1.0.2",
"version": "1.0.3-0",
"form": "dist/form.js",

@@ -6,0 +6,0 @@ "main": "dist/main.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