HEX
Server: nginx/1.24.0
System: Linux nowruzgan 6.8.0-57-generic #59-Ubuntu SMP PREEMPT_DYNAMIC Sat Mar 15 17:40:59 UTC 2025 x86_64
User: babak (1000)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: //usr/share/opensearch-dashboards/node_modules/expiry-js/dist/expiry.min.js
!function(a,b){"function"==typeof define&&define.amd?define(function(){return a.expiry=b()}):"object"==typeof exports?module.exports=b():a.expiry=b()}(this,function(){function a(){return b.forge.apply(b,arguments)}var b=function(){function a(b,c){b=b||0;var d=h[c||"millisecond"];if(!d)throw new Error("Invalid unit, "+c);var e,f=i(b);if("Number"===f)e=k(b,d);else{if("String"!==f)throw new Error("Invalid value, "+b);e=a.parse(b,d)}this._internal=e}var b=1,c=1e3*b,d=60*c,e=60*d,f=24*e,g={millisecond:b,second:c,minute:d,hour:e,day:f,month:function(a,b){var c=new Date,d=new Date(c);return d.setMonth(d.getMonth()+a),d.setDate(d.getDate()+b),d-c}},h={milliseconds:"millisecond",millisecond:"millisecond",ms:"millisecond",seconds:"second",second:"second",s:"second",minutes:"minute",minute:"minute",m:"minute",hours:"hour",hour:"hour",h:"hour",days:"day",day:"day",D:"day",weeks:"week",week:"week",W:"week",months:"month",month:"month",M:"month",years:"year",year:"year",Y:"year"},i=function(a){return toString.call(a).match(/\[object (\S+)\]/).pop()},j=function(a,b,c){this.milliseconds=a||0,this.days=b||0,this.months=c||0},k=function(a,b){var c=0,d=0,e=0;switch(b){case"year":e+=12*a;break;case"month":e+=a;break;case"week":d+=7*a;break;case"day":d+=a;break;case"hour":case"minute":case"second":case"millisecond":c+=a*g[b]}return new j(c,d,e)},l=Math.round;return a.forge=function(a,b){return new this(a,b)},a.parse=function(a,b){if("String"!==i(a))throw new Error("Invalid value, "+a);var c=/^[\d\.]+$/g;c.test(a)&&(a+=b);var d,e,f,b,k=0,l=0,m=0;for(c=/([\d\.]+)\s*([a-zA-Z]+)/g;null!==(d=c.exec(a));)switch(e=parseFloat(d[1]),f=d[2],b=h[f]){case"year":m+=12*e;break;case"month":m+=e;break;case"week":l+=7*e;break;case"day":l+=e;break;case"hour":case"minute":case"second":case"millisecond":k+=e*g[b];break;default:throw new Error("Missing or invalid unit, "+f)}return new j(k,l,m)},a.prototype.valueOf=function(){var a=this._internal,b=a.milliseconds,c=a.days,d=a.months;return b+g.month(d,c)},a.prototype.asMilliseconds=function(){return this.valueOf()},a.prototype.asSeconds=function(){return l(this.valueOf()/c)},a}();return a.Expiry=b,a.VERSION="0.1.7",a});