UNPKG

2.28 kBJavaScriptView Raw
1module.exports=function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=9)}({9:function(t,n,e){"use strict";e.r(n);var r=function(t,n){function e(t){return 10>t?"0".concat(parseInt(t)):parseInt(t)}var r=25;void 0!==n&&(r=n);var o=function(t,n){return+(1/n*Math.floor(+(n*t).toPrecision(12))).toFixed(2)}(t,r),c=Math.floor(o),u=((o-c)*r).toFixed(2);return"".concat(e(c/60/60%60),":").concat(e(c/60%60),":").concat(e(c%60),":").concat(e(u))},o=function(t,n){var e=25;return void 0!==n&&(e=n),+(+function(t,n){var e=t.split(":"),r=parseInt(e[3]);return r+=parseInt(e[2])*n,r+=parseInt(e[1])*(60*n),r+=parseInt(e[0])*(60*n*60)}(t,e)/e).toFixed(2)},c=function(t){return 1===t.length},u=function(t){if("string"!=typeof t)return t;switch(t.split(":").length){case 4:return t;case 2:return c(t.split(":")[0])?"00:0".concat(t,":00"):"00:".concat(t,":00");case 3:return"".concat(t,":00");default:return function(t){return t.includes(".")}(t)?c(t.split(".")[0])?"00:0".concat(t.split(".")[0],":").concat(t.split(".")[1],":00"):"00:".concat(t.replace(".",":"),":00"):c(t)?"00:00:0".concat(t,":00"):"00:00:".concat(t,":00")}};e.d(n,"timecodeToSeconds",function(){return i}),e.d(n,"shortTimecode",function(){return a}),e.d(n,"secondsToTimecode",function(){return r});var i=function(t){if("string"==typeof t){var n=u(t);return o(n)}return parseFloat(t)},a=function(t){return r(t).slice(0,-3)}}});
2//# sourceMappingURL=timecodeConverter.js.map
\No newline at end of file