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

@ampproject/amp-date-countdown

Package Overview
Dependencies
Maintainers
16
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ampproject/amp-date-countdown - npm Package Compare versions

Comparing version 1.2110192227.0 to 1.2110202310.0

2

dist/component-react.module.js

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

function n(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function e(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function t(t){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?e(Object(a),!0).forEach((function(e){n(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):e(Object(a)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))}))}return t}function r(n,e){if(null==n)return{};var t,r,a={},o=Object.keys(n);for(r=0;r<o.length;r++)t=o[r],e.indexOf(t)>=0||(a[t]=n[t]);return a}var{hasOwnProperty:a,toString:o}=Object.prototype;function s(n){return n||{}}import{cloneElement as i,createContext as u,createElement as c,createRef as l}from"react";import{hydrate as f,render as d}from"react-dom";import{useCallback as p,useContext as m,useEffect as h,useImperativeHandle as y,useLayoutEffect as b,useMemo as v,useRef as g,useState as j}from"react";function w(n,e,t){return c.apply(void 0,arguments)}function S(n){return j(n)}function O(n,e){b(n,e)}function M(n,e){return v(n,e)}import{Children as $,createPortal as N,forwardRef as D}from"react";function C(n){return D(n)}var k=["as","children","class","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"],z=[null,"paint","layout","content","size","size paint","size layout","strict"],U={"position":"relative","width":"100%","height":"100%"};C((function(n,e){let{as:a="div",children:o,"class":s,contentAs:i="div",contentClassName:u,contentProps:c,contentRef:l,contentStyle:f,layout:d=!1,paint:p=!1,size:m=!1,"style":h,wrapperClassName:y,wrapperStyle:b}=n;const v=(m?4:0)+(d?2:0)+(p?1:0);return w(a,t(t({},r(n,k)),{},{ref:e,class:`${s||""} ${y||""}`.trim()||null,style:t(t(t({},h),b),{},{contain:z[v]})}),w(i,t(t({},c),{},{ref:l,class:u,style:t(t({},m&&U),{},{"overflow":p?"hidden":"visible"},f)}),o))}));var A,E=["as","children","class","style","wrapperClassName","wrapperStyle"],H=C((function(n,e){let{as:a="div",children:o,"class":s,"style":i,wrapperClassName:u,wrapperStyle:c}=n;return w(a,t(t({},r(n,E)),{},{ref:e,class:`${s||""} ${u||""}`.trim()||null,style:t(t({},i),c)}),o)}));function I(){const n=A||(A=u({renderable:!0,playable:!0,loading:"auto"},void 0));return m(n)}function P(n){return R[n]}new WeakMap,new WeakMap;var R={"de":["Jahren","Monaten","Tagen","Stunden","Minuten","Sekunden"],"en":["Years","Months","Days","Hours","Minutes","Seconds"],"es":["años","meses","días","horas","minutos","segundos"],"fr":["ans","mois","jours","heures","minutes","secondes"],"id":["tahun","bulan","hari","jam","menit","detik"],"it":["anni","mesi","giorni","ore","minuti","secondi"],"ja":["年","ヶ月","日","時間","分","秒"],"ko":["년","달","일","시간","분","초"],"nl":["jaar","maanden","dagen","uur","minuten","seconden"],"pt":["anos","meses","dias","horas","minutos","segundos"],"ru":["год","месяц","день","час","минута","секунда"],"th":["ปี","เดือน","วัน","ชั่วโมง","นาที","วินาที"],"tr":["yıl","ay","gün","saat","dakika","saniye"],"vi":["năm","tháng","ngày","giờ","phút","giây"],"zh-cn":["年","月","天","小时","分钟","秒"],"zh-tw":["年","月","天","小時","分鐘","秒"]},T=["datetime","whenEnded","locale","biggestUnit","countUp","render"],Y={DAYS:1,HOURS:2,MINUTES:3,SECONDS:4},W="en",_="stop",x="DAYS",J=!1,L=n=>`${n.days} ${n.dd}, ${n.hours} ${n.hh}, ${n.minutes} ${n.mm}, ${n.seconds} ${n.ss}`;function q(n){let{datetime:e,whenEnded:a=_,locale:o=W,biggestUnit:i=x,countUp:u=J,render:c=L}=n,l=r(n,T);!function(){const{notify:n}=I();O((()=>{n&&n()}))}();const{playable:f}=I(),d=M((()=>{return(n=e)?"number"==typeof n?n:"string"==typeof n?function(n){if(!n)return null;if("now"===n.toLowerCase())return Date.now();const e=Date.parse(n);return isNaN(e)?null:e}(n):(n=n).getTime():null;var n}),[e]),p=M((()=>function(n){var e;void 0===P(n)&&(e=`Invalid locale ${n}, defaulting to ${W}. DateCountdown`,console.warn(e),n=W);const t=P(n);return s({"years":t[0],"months":t[1],"days":t[2],"hours":t[3],"minutes":t[4],"seconds":t[5]})}(o)),[o]),[m,y]=S(d-Date.now()+1e3),b=M((()=>function(n,e,r,a){return t(t({},function(n,e,t){t&&(n*=-1);const r=Y[e]==Y.DAYS?F(Math.floor(n/864e5)):0,a=Y[e]==Y.HOURS?F(Math.floor(n/36e5)):Y[e]<Y.HOURS?F(Math.floor(n%864e5/36e5)):0,o=Y[e]==Y.MINUTES?F(Math.floor(n/6e4)):Y[e]<Y.MINUTES?F(Math.floor(n%36e5/6e4)):0,i=F(Y[e]==Y.SECONDS?Math.floor(n/1e3):Math.floor(n%6e4/1e3));return s({"d":r,"dd":B(r),"h":a,"hh":B(a),"m":o,"mm":B(o),"s":i,"ss":B(i)})}(n,e,a)),r)}(m,i,p,u)),[m,i,p,u]),v=g(null);h((()=>{if(!f||!v.current)return;const n=v.current.ownerDocument.defaultView,e=n.setInterval((()=>{const t=d-Date.now()+1e3;y(t),a===_&&t<1e3&&n.clearInterval(e)}),1e3);return()=>n.clearInterval(e)}),[f,d,a]);const j=function(n,e){const[t,r]=S(null);return O((()=>{const t=n&&n(e)||null;if(t&&"function"==typeof t.then){let n=!1;return t.then((e=>{n||r(e)})),()=>{n=!0}}r(t)}),[n,e]),t}(c,b),$=j&&"object"==typeof j&&"__html"in j;return w(H,t(t({},l),{},{ref:v,dangerouslySetInnerHTML:$?j:null}),$?null:j)}function B(n){return n<-9||n>9?String(n):n>=-9&&n<0?"-0"+-n:"0"+n}function F(n){return n<0?n+1:n}export{q as BentoDateCountdown};
function n(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function e(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function t(t){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?e(Object(a),!0).forEach((function(e){n(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):e(Object(a)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))}))}return t}function r(n,e){if(null==n)return{};var t,r,a={},o=Object.keys(n);for(r=0;r<o.length;r++)t=o[r],e.indexOf(t)>=0||(a[t]=n[t]);return a}var{hasOwnProperty:a,toString:o}=Object.prototype;function s(n){return n||{}}import{cloneElement as i,createContext as u,createElement as c,createRef as l}from"react";import{hydrate as f,render as d}from"react-dom";import{useCallback as p,useContext as m,useEffect as h,useImperativeHandle as y,useLayoutEffect as b,useMemo as v,useRef as g,useState as j}from"react";function w(n,e,t){return c.apply(void 0,arguments)}function S(n){return j(n)}function O(n,e){b(n,e)}function M(n,e){return v(n,e)}import{Children as $,createPortal as N,forwardRef as D}from"react";function k(n){return D(n)}var C=["as","children","class","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"],z=[null,"paint","layout","content","size","size paint","size layout","strict"],U={"position":"relative","width":"100%","height":"100%"};k((function(n,e){let{as:a="div",children:o,"class":s,contentAs:i="div",contentClassName:u,contentProps:c,contentRef:l,contentStyle:f,layout:d=!1,paint:p=!1,size:m=!1,"style":h,wrapperClassName:y,wrapperStyle:b}=n;const v=(m?4:0)+(d?2:0)+(p?1:0);return w(a,t(t({},r(n,C)),{},{ref:e,class:`${s||""} ${y||""}`.trim()||null,style:t(t(t({},h),b),{},{contain:z[v]})}),w(i,t(t({},c),{},{ref:l,class:u,style:t(t({},m&&U),{},{"overflow":p?"hidden":"visible"},f)}),o))}));var A,E=["as","children","class","style","wrapperClassName","wrapperStyle"],H=k((function(n,e){let{as:a="div",children:o,"class":s,"style":i,wrapperClassName:u,wrapperStyle:c}=n;return w(a,t(t({},r(n,E)),{},{ref:e,class:`${s||""} ${u||""}`.trim()||null,style:t(t({},i),c)}),o)}));function I(){const n=A||(A=u({renderable:!0,playable:!0,loading:"auto"},void 0));return m(n)}function P(n){return R[n]}new WeakMap,new WeakMap;var R={"de":["Jahren","Monaten","Tagen","Stunden","Minuten","Sekunden"],"en":["Years","Months","Days","Hours","Minutes","Seconds"],"es":["años","meses","días","horas","minutos","segundos"],"fr":["ans","mois","jours","heures","minutes","secondes"],"id":["tahun","bulan","hari","jam","menit","detik"],"it":["anni","mesi","giorni","ore","minuti","secondi"],"ja":["年","ヶ月","日","時間","分","秒"],"ko":["년","달","일","시간","분","초"],"nl":["jaar","maanden","dagen","uur","minuten","seconden"],"pt":["anos","meses","dias","horas","minutos","segundos"],"ru":["год","месяц","день","час","минута","секунда"],"th":["ปี","เดือน","วัน","ชั่วโมง","นาที","วินาที"],"tr":["yıl","ay","gün","saat","dakika","saniye"],"vi":["năm","tháng","ngày","giờ","phút","giây"],"zh-cn":["年","月","天","小时","分钟","秒"],"zh-tw":["年","月","天","小時","分鐘","秒"]},T=["datetime","whenEnded","locale","biggestUnit","countUp","render"],Y={DAYS:1,HOURS:2,MINUTES:3,SECONDS:4},W="en",_="stop",x="DAYS",J=!1,L=n=>`${n.days} ${n.dd}, ${n.hours} ${n.hh}, ${n.minutes} ${n.mm}, ${n.seconds} ${n.ss}`;function q(n){let{datetime:e,whenEnded:a=_,locale:o=W,biggestUnit:i=x,countUp:u=J,render:c=L}=n,l=r(n,T);!function(){const{notify:n}=I();O((()=>{n&&n()}))}();const{playable:f}=I(),d=M((()=>{return(n=e)?"number"==typeof n?n:"string"==typeof n?function(n){if(!n)return null;if("now"===n.toLowerCase())return Date.now();const e=Date.parse(n);return isNaN(e)?null:e}(n):(n=n).getTime():null;var n}),[e]),p=M((()=>function(n){var e;void 0===P(n)&&(e=`Invalid locale ${n}, defaulting to ${W}. DateCountdown`,console.warn(e),n=W);const t=P(n);return s({"years":t[0],"months":t[1],"days":t[2],"hours":t[3],"minutes":t[4],"seconds":t[5]})}(o)),[o]),[m,y]=S(d-Date.now()+1e3),b=M((()=>function(n,e,r,a){return t(t({},function(n,e,t){t&&(n*=-1);const r=Y[e]==Y.DAYS?F(Math.floor(n/864e5)):0,a=Y[e]==Y.HOURS?F(Math.floor(n/36e5)):Y[e]<Y.HOURS?F(Math.floor(n%864e5/36e5)):0,o=Y[e]==Y.MINUTES?F(Math.floor(n/6e4)):Y[e]<Y.MINUTES?F(Math.floor(n%36e5/6e4)):0,i=F(Y[e]==Y.SECONDS?Math.floor(n/1e3):Math.floor(n%6e4/1e3));return s({"d":r,"dd":B(r),"h":a,"hh":B(a),"m":o,"mm":B(o),"s":i,"ss":B(i)})}(n,e,a)),r)}(m,i,p,u)),[m,i,p,u]),v=g(null);h((()=>{if(!f||!v.current)return;const n=v.current.ownerDocument.defaultView,e=n.setInterval((()=>{const t=d-Date.now()+1e3;y(t),a===_&&t<1e3&&n.clearInterval(e)}),1e3);return()=>n.clearInterval(e)}),[f,d,a]);const j=function(n,e){const[t,r]=S(null);return O((()=>{const t=n&&n(e)||null;if(t&&"function"==typeof t.then){let n=!1;return t.then((e=>{n||r(e)})),()=>{n=!0}}r(t)}),[n,e]),t}(c,b),$=j&&"object"==typeof j&&"__html"in j;return w(H,t(t({},l),{},{ref:v,dangerouslySetInnerHTML:$?j:null}),$?null:j)}function B(n){return n<-9||n>9?String(n):n>=-9&&n<0?"-0"+-n:"0"+n}function F(n){return n<0?n+1:n}export{q as BentoDateCountdown};
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
{
"name": "@ampproject/amp-date-countdown",
"version": "1.2110192227.0",
"version": "1.2110202310.0",
"description": "AMP HTML amp-date-countdown Component",

@@ -5,0 +5,0 @@ "author": "The AMP HTML Authors",

@@ -38,3 +38,3 @@ # Bento Date Countdown

<head>
<script src="https://cdn.ampproject.org/custom-elements-polyfill.js"></script>
<script async src="https://cdn.ampproject.org/bento.js"></script>
<script async src="https://cdn.ampproject.org/v0/bento-date-countdown-1.0.js"></script>

@@ -41,0 +41,0 @@ <link rel="stylesheet" type="text/css" href="https://cdn.ampproject.org/v0/bento-date-countdown-1.0.css">

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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