function t(t){if("number"!=typeof t||t<0)return t;var e=parseInt(t/3600);return t%=3600,[e,parseInt(t/60),t%=60].map((function(t){return(t=t.toString())[1]?t:"0"+t})).join(":")}function e(t,e){return"string"==typeof t&&"string"==typeof e&&(t=parseFloat(t),e=parseFloat(e)),t=t.toFixed(2),e=e.toFixed(2),{longitude:t.toString().split("."),latitude:e.toString().split(".")}}var r={UNITS:{"年":315576e5,"月":26298e5,"天":864e5,"小时":36e5,"分钟":6e4,"秒":1e3},humanize:function(t){var e="";for(var r in this.UNITS)if(t>=this.UNITS[r]){e=Math.floor(t/this.UNITS[r])+r+"前";break}return e||"刚刚"},format:function(t){var e=this.parse(t),r=Date.now()-e.getTime();if(r<this.UNITS["天"])return this.humanize(r);var n=function(t){return t<10?"0"+t:t};return e.getFullYear()+"/"+n(e.getMonth()+1)+"/"+n(e.getDate())+"-"+n(e.getHours())+":"+n(e.getMinutes())},parse:function(t){var e=t.split(/[^0-9]/);return new Date(e[0],e[1]-1,e[2],e[3],e[4],e[5])}};export{e as a,r as d,t as f};
