mirror of
https://github.com/owncast/owncast.git
synced 2025-01-03 23:27:37 +03:00
1 line
No EOL
3 KiB
JavaScript
Vendored
1 line
No EOL
3 KiB
JavaScript
Vendored
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5938],{49474:function(t,r,n){n.d(r,{Z:function(){return o}});var e=n(19013),a=n(13882);function o(t,r){(0,a.Z)(2,arguments);var n=(0,e.Z)(t),o=(0,e.Z)(r),u=n.getTime()-o.getTime();return u<0?-1:u>0?1:u}},82161:function(t,r,n){n.d(r,{Z:function(){return u}});var e=n(19013),a=n(13882),o=n(49474);function u(t,r){(0,a.Z)(2,arguments);var n,u=(0,e.Z)(t),i=(0,e.Z)(r),s=(0,o.Z)(u,i),f=Math.abs(function(t,r){(0,a.Z)(2,arguments);var n=(0,e.Z)(t),o=(0,e.Z)(r);return 12*(n.getFullYear()-o.getFullYear())+(n.getMonth()-o.getMonth())}(u,i));if(f<1)n=0;else{1===u.getMonth()&&u.getDate()>27&&u.setDate(30),u.setMonth(u.getMonth()-s*f);var c=(0,o.Z)(u,i)===-s;(function(t){(0,a.Z)(1,arguments);var r=(0,e.Z)(t);return(function(t){(0,a.Z)(1,arguments);var r=(0,e.Z)(t);return r.setHours(23,59,59,999),r})(r).getTime()===(function(t){(0,a.Z)(1,arguments);var r=(0,e.Z)(t),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(23,59,59,999),r})(r).getTime()})((0,e.Z)(t))&&1===f&&1===(0,o.Z)(t,i)&&(c=!1),n=s*(f-Number(c))}return 0===n?0:n}},45938:function(t,r,n){n.d(r,{Z:function(){return Z}});var e=n(84314),a=n(49474),o=n(82161),u=n(11699),i=n(86559),s=n(19013);function f(t,r){if(null==t)throw TypeError("assign requires that input parameter not be null or undefined");for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n]);return t}var c=n(24262),l=n(13882);function Z(t,r){return(0,l.Z)(1,arguments),function(t,r,n){(0,l.Z)(2,arguments);var Z,m,h,v,D,d=(0,e.j)(),M=null!==(Z=null!==(m=null==n?void 0:n.locale)&&void 0!==m?m:d.locale)&&void 0!==Z?Z:i.Z;if(!M.formatDistance)throw RangeError("locale must contain formatDistance property");var g=(0,a.Z)(t,r);if(isNaN(g))throw RangeError("Invalid time value");var p=f(f({},n),{addSuffix:!!(null==n?void 0:n.addSuffix),comparison:g});g>0?(h=(0,s.Z)(r),v=(0,s.Z)(t)):(h=(0,s.Z)(t),v=(0,s.Z)(r));var X=(0,u.Z)(v,h),b=Math.round((X-((0,c.Z)(v)-(0,c.Z)(h))/1e3)/60);if(b<2){if(null!=n&&n.includeSeconds){if(X<5)return M.formatDistance("lessThanXSeconds",5,p);if(X<10)return M.formatDistance("lessThanXSeconds",10,p);if(X<20)return M.formatDistance("lessThanXSeconds",20,p);if(X<40)return M.formatDistance("halfAMinute",0,p);else if(X<60)return M.formatDistance("lessThanXMinutes",1,p);else return M.formatDistance("xMinutes",1,p)}return 0===b?M.formatDistance("lessThanXMinutes",1,p):M.formatDistance("xMinutes",b,p)}if(b<45)return M.formatDistance("xMinutes",b,p);if(b<90)return M.formatDistance("aboutXHours",1,p);if(b<1440){var T=Math.round(b/60);return M.formatDistance("aboutXHours",T,p)}if(b<2520)return M.formatDistance("xDays",1,p);if(b<43200){var x=Math.round(b/1440);return M.formatDistance("xDays",x,p)}if(b<86400)return D=Math.round(b/43200),M.formatDistance("aboutXMonths",D,p);if((D=(0,o.Z)(v,h))<12){var w=Math.round(b/43200);return M.formatDistance("xMonths",w,p)}var Y=D%12,y=Math.floor(D/12);return Y<3?M.formatDistance("aboutXYears",y,p):Y<9?M.formatDistance("overXYears",y,p):M.formatDistance("almostXYears",y+1,p)}(t,Date.now(),r)}}}]); |