@visulima/humanizer 3.0.0-alpha.12 → 3.0.0-alpha.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{formatBytes as a,parseBytes as e}from"./packem_shared/parseBytes-DQ0Kw2M8.js";import{default as f}from"./packem_shared/duration-8-I9U1BK.js";import{default as p}from"./packem_shared/parseDuration-teGYCgRI.js";export{f as duration,a as formatBytes,e as parseBytes,p as parseDuration};
1
+ import{formatBytes as a,parseBytes as e}from"./packem_shared/parseBytes-CxhY-u8u.js";import{default as f}from"./packem_shared/duration-LS6hKnI1.js";import{default as p}from"./packem_shared/parseDuration-CfrrX3_c.js";export{f as duration,a as formatBytes,e as parseBytes,p as parseDuration};
@@ -0,0 +1 @@
1
+ var x=Object.defineProperty;var b=(r,n)=>x(r,"name",{value:n,configurable:!0});import{durationLanguage as M}from"../language/en.js";import P from"../language/util/validate-duration-language.js";var w=Object.defineProperty,g=b((r,n)=>w(r,"name",{value:n,configurable:!0}),"g");const N=g((r,n)=>{n=n||-1;const e=new RegExp(String.raw`^-?\d+(?:\.\d{0,${String(n)}})?`).exec(r.toString());return e===null?r:Number.parseFloat(e[0])},"toFixed"),v=g(({unitCount:r,unitName:n},e,l)=>{let{spacer:d}=l;const{maxDecimalPoints:s}=l;let o=".";l.decimal!==void 0?o=l.decimal:e.decimal!==void 0&&(o=e.decimal);let t;"digitReplacements"in l?t=l.digitReplacements:"_digitReplacements"in e&&(t=e._digitReplacements);let i,f=r;s!==void 0&&(f=N(r,s));const a=f.toString();if(!e._hideCountIf2||r!==2)if(t){i="";for(const m of a)i+=m==="."?o:t[m]}else i=a.replace(".",o);else i="";const u=e[n];let c=u;return typeof u=="function"&&(c=u(r)),e._hideCountIf2&&r===2&&(d=""),e._numberFirst?c+d+i:i+d+c},"renderPiece"),C=g((r,n)=>{const{units:e}=n;if(e.length===0)return[];const{unitMeasures:l}=n,d=n.largest??Number.POSITIVE_INFINITY,s={};let o,t,i,f=r;for(t=0;t<e.length;t++){o=e[t];const u=l[o];i=t===e.length-1?f/u:Math.floor(f/u),s[o]=i,f-=i*u}if(n.round){let u=d;for(t=0;t<e.length;t++)if(o=e[t],i=s[o],i!==0&&(u--,u===0)){for(let c=t+1;c<e.length;c++){const m=e[c],h=s[m];s[o]=(s[o]??0)+h*l[m]/l[o],s[m]=0}break}for(t=e.length-1;t>=0;t--){if(o=e[t],i=s[o],i===0)continue;const c=Math.round(i);if(s[o]=c,t===0)break;const m=e[t-1],h=l[m],p=Math.floor(c*l[o]/h);if(p)s[m]=(s[m]??0)+p,s[o]=0;else break}}const a=[];for(t=0;t<e.length&&a.length<d;t++){if(o=e[t],i=s[o],i&&!n.round&&a.length===d-1){let u,c=0;for(u=t+1,e.length;u<e.length;u++){const m=e[u];c+=s[m]*(n.unitMeasures[m]/n.unitMeasures[o])}i+=c,n.maxDecimalPoints!==void 0&&(i=N(i,n.maxDecimalPoints))}i&&a.push({unitCount:i,unitName:o})}return a},"getPieces"),I=g((r,n,e)=>{const{language:l,units:d}=n;if(r.length===0){const u=d.at(-1);return v({unitCount:0,unitName:u},l,n)}const{conjunction:s,serialComma:o}=n;let t=", ";n.delimiter!==void 0?t=n.delimiter:l.delimiter!==void 0&&(t=l.delimiter);let i="";n.timeAdverb&&e!==0&&(i=l.future??"",e<0&&(i=l.past??""));const f=r.map(u=>v(u,l,n));let a;return!s||r.length===1?a=f.join(t):r.length===2?a=f.join(s):a=f.slice(0,-1).join(t)+(o?",":"")+s+(f.at(-1)??""),i&&(a=i.replace("%s",a)),a},"formatPieces"),R=g((r,n)=>{if(Number.isNaN(r))throw new TypeError("Expected a valid number");if(typeof r!="number")throw new TypeError("Expected a number for milliseconds input");const e={conjunction:"",language:M,round:!1,serialComma:!0,spacer:" ",timeAdverb:!1,unitMeasures:{d:864e5,h:36e5,m:6e4,mo:2629746e3,ms:1,s:1e3,w:6048e5,y:31556952e3},units:["w","d","h","m","s"],...n};P(e.language);const l=Math.abs(r),d=C(l,e);return I(d,e,r)},"duration");export{R as default};
@@ -1 +1 @@
1
- var w=Object.defineProperty;var y=(e,t)=>w(e,"name",{value:t,configurable:!0});var x=Object.defineProperty,l=y((e,t)=>x(e,"name",{value:t,configurable:!0}),"i");const d=/^(?<value>-?\d+(?:[.,]\d+)*) *(?<type>[a-z]+)?$/i,G=/^KIBI/,P=/^MIBI/,N=/^GIBI/,Y=/^TEBI/,Z=/^PEBI/,A=/^EXBI/,K=/^ZEBI/,F=/^YIBI/,v=/^(.)IB$/,E={iec:[{long:"Bytes",short:"B"},{long:"Kibibytes",short:"KiB"},{long:"Mebibytes",short:"MiB"},{long:"Gibibytes",short:"GiB"},{long:"Tebibytes",short:"TiB"},{long:"Pebibytes",short:"PiB"},{long:"Exbibytes",short:"EiB"},{long:"Zebibytes",short:"ZiB"},{long:"Yobibytes",short:"YiB"}],iec_octet:[{long:"Octets",short:"o"},{long:"Kibioctets",short:"Kio"},{long:"Mebioctets",short:"Mio"},{long:"Gibioctets",short:"Gio"},{long:"Tebioctets",short:"Tio"},{long:"Pebioctets",short:"Pio"},{long:"Exbioctets",short:"Eio"},{long:"Zebioctets",short:"Zio"},{long:"Yobioctets",short:"Yio"}],metric:[{long:"Bytes",short:"Bytes"},{long:"Kilobytes",short:"KB"},{long:"Megabytes",short:"MB"},{long:"Gigabytes",short:"GB"},{long:"Terabytes",short:"TB"},{long:"Petabytes",short:"PB"},{long:"Exabytes",short:"EB"},{long:"Zettabytes",short:"ZB"},{long:"Yottabytes",short:"YB"}],metric_octet:[{long:"Octets",short:"o"},{long:"Kilo-octets",short:"ko"},{long:"Mega-octets",short:"Mo"},{long:"Giga-octets",short:"Go"},{long:"Tera-octets",short:"To"},{long:"Peta-octets",short:"Po"},{long:"Exa-octets",short:"Eo"},{long:"Zetta-octets",short:"Zo"},{long:"Yotta-octets",short:"Yo"}]},R=l((e,t)=>{const r=new Intl.NumberFormat(t).format(11111).replaceAll(new RegExp("\\p{Number}","gu"),""),o=new Intl.NumberFormat(t).format(1.1).replaceAll(new RegExp("\\p{Number}","gu"),"");return Number.parseFloat(e.replaceAll(new RegExp(`\\${r}`,"g"),"").replace(new RegExp(`\\${o}`),"."))},"parseLocalizedNumber"),f=l(e=>{switch(e){case 2:return 1024;case 10:return 1e3;default:throw new Error("Unsupported base.")}},"fromBase"),U=l((e,t)=>{const r={base:2,locale:"en-US",units:"metric",...t};if(typeof e!="string"||e.length===0)throw new TypeError("Value is not a string or is empty.");if(e.length>100)throw new TypeError("Value exceeds the maximum length of 100 characters.");const o=d.exec(e)?.groups;if(!o)return Number.NaN;const a=R(o.value,r.locale),n=(o.type??"Bytes").toUpperCase().replace(G,"KILO").replace(P,"MEGA").replace(N,"GIGA").replace(Y,"TERA").replace(Z,"PETA").replace(A,"EXA").replace(K,"ZETTA").replace(F,"YOTTA").replace(v,"$1B"),i=E[r.units].findIndex(g=>g.short[0].toUpperCase()===n[0]),c=f(r.base);return a*c**i},"parseBytes"),$=l((e,t)=>{if(typeof e!="number"||!Number.isFinite(e))throw new TypeError("Bytesize is not a number.");const{base:r,decimals:o,locale:a,long:n,unit:i,units:c,...g}={base:2,decimals:0,locale:"en-US",long:!1,units:"metric",...t},p=f(r),I=Math.abs(e),m=t?.space??!0?" ":"",s=E[c],h=s.findIndex(b=>b.short===i);if(e===0){const b=Math.min(0,Math.max(h,s.length-1));return"0"+m+s[b][n?"long":"short"]}const u=h===-1?Math.min(Math.floor(Math.log(I)/Math.log(p)),s.length-1):h,T=s[u][n?"long":"short"],M=e/p**u,B=o<0?void 0:o;return new Intl.NumberFormat(a,{maximumFractionDigits:B,minimumFractionDigits:B,...g}).format(M)+m+T},"formatBytes");export{$ as formatBytes,U as parseBytes};
1
+ var M=Object.defineProperty;var y=(e,t)=>M(e,"name",{value:t,configurable:!0});var x=Object.defineProperty,c=y((e,t)=>x(e,"name",{value:t,configurable:!0}),"a");const d=/^(?<value>-?\d+(?:[.,]\d+)*) *(?<type>[a-z]+)?$/i,N=/^KIBI/,G=/^MIBI/,P=/^GIBI/,Y=/^TEBI/,Z=/^PEBI/,A=/^EXBI/,K=/^ZEBI/,F=/^YIBI/,v=/^(.)IB$/,E={iec:[{long:"Bytes",short:"B"},{long:"Kibibytes",short:"KiB"},{long:"Mebibytes",short:"MiB"},{long:"Gibibytes",short:"GiB"},{long:"Tebibytes",short:"TiB"},{long:"Pebibytes",short:"PiB"},{long:"Exbibytes",short:"EiB"},{long:"Zebibytes",short:"ZiB"},{long:"Yobibytes",short:"YiB"}],iec_octet:[{long:"Octets",short:"o"},{long:"Kibioctets",short:"Kio"},{long:"Mebioctets",short:"Mio"},{long:"Gibioctets",short:"Gio"},{long:"Tebioctets",short:"Tio"},{long:"Pebioctets",short:"Pio"},{long:"Exbioctets",short:"Eio"},{long:"Zebioctets",short:"Zio"},{long:"Yobioctets",short:"Yio"}],metric:[{long:"Bytes",short:"Bytes"},{long:"Kilobytes",short:"KB"},{long:"Megabytes",short:"MB"},{long:"Gigabytes",short:"GB"},{long:"Terabytes",short:"TB"},{long:"Petabytes",short:"PB"},{long:"Exabytes",short:"EB"},{long:"Zettabytes",short:"ZB"},{long:"Yottabytes",short:"YB"}],metric_octet:[{long:"Octets",short:"o"},{long:"Kilo-octets",short:"ko"},{long:"Mega-octets",short:"Mo"},{long:"Giga-octets",short:"Go"},{long:"Tera-octets",short:"To"},{long:"Peta-octets",short:"Po"},{long:"Exa-octets",short:"Eo"},{long:"Zetta-octets",short:"Zo"},{long:"Yotta-octets",short:"Yo"}]},R=c((e,t)=>{const r=new Intl.NumberFormat(t).format(11111).replaceAll(new RegExp("\\p{Number}","gu"),""),o=new Intl.NumberFormat(t).format(1.1).replaceAll(new RegExp("\\p{Number}","gu"),"");return Number.parseFloat(e.replaceAll(new RegExp(`\\${r}`,"g"),"").replace(new RegExp(`\\${o}`),"."))},"parseLocalizedNumber"),f=c(e=>{switch(e){case 2:return 1024;case 10:return 1e3;default:throw new Error("Unsupported base.")}},"fromBase"),O=c((e,t)=>{const r={base:2,locale:"en-US",units:"metric",...t};if(typeof e!="string"||e.length===0)throw new TypeError("Value is not a string or is empty.");if(e.length>100)throw new TypeError("Value exceeds the maximum length of 100 characters.");const o=d.exec(e)?.groups;if(!o)return Number.NaN;const g=R(o.value,r.locale),s=(o.type??"Bytes").toUpperCase().replace(N,"KILO").replace(G,"MEGA").replace(P,"GIGA").replace(Y,"TERA").replace(Z,"PETA").replace(A,"EXA").replace(K,"ZETTA").replace(F,"YOTTA").replace(v,"$1B"),l=E[r.units].findIndex(a=>a.short.toUpperCase()===s||a.long.toUpperCase()===s);if(l===-1)return Number.NaN;const h=f(r.base);return g*h**l},"parseBytes"),$=c((e,t)=>{if(typeof e!="number"||!Number.isFinite(e))throw new TypeError("Bytesize is not a number.");const{base:r,decimals:o,locale:g,long:s,unit:l,units:h,...a}={base:2,decimals:0,locale:"en-US",long:!1,units:"metric",...t},p=f(r),I=Math.abs(e),u=t?.space??!0?" ":"",n=E[h],i=n.findIndex(b=>b.short===l);if(e===0){const b=i===-1?0:Math.min(i,n.length-1);return"0"+u+n[b][s?"long":"short"]}const m=i===-1?Math.min(Math.floor(Math.log(I)/Math.log(p)),n.length-1):i,T=n[m][s?"long":"short"],w=e/p**m,B=o<0?void 0:o;return new Intl.NumberFormat(g,{maximumFractionDigits:B,minimumFractionDigits:B,...a}).format(w)+u+T},"formatBytes");export{$ as formatBytes,O as parseBytes};
@@ -0,0 +1 @@
1
+ var U=Object.defineProperty;var v=(r,l)=>U(r,"name",{value:l,configurable:!0});import{durationLanguage as D,englishUnitMap as F}from"../language/en.js";import P from"../language/util/validate-duration-language.js";var T=Object.defineProperty,W=v((r,l)=>T(r,"name",{value:l,configurable:!0}),"h");const S={d:864e5,h:36e5,m:6e4,mo:2629746e3,ms:1,s:1e3,w:6048e5,y:31556952e3},m=/[-/\\^$*+?.()|[\]{}]/g,h=new WeakMap,_=/^PT(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?$/i,C=/^(?:(\d+):)?(?:(\d+):)?(\d+)$/,G=/^[+-]?\d+(?:\.\d+)?$/,H=/^[-+]/,z=W((r,l)=>{if(typeof r!="string"||r.length===0)return;const{defaultUnit:x="ms",language:c=D}=l??{};P(c);const g=c.decimal??".",I=c.groupSeparator??",",A=c.placeholderSeparator??"_",y=g.replaceAll(m,String.raw`\$&`),M=I.replaceAll(m,String.raw`\$&`),j=A.replaceAll(m,String.raw`\$&`),u=c.unitMap??F;let o=r.replaceAll(new RegExp(String.raw`(\d)[${j}${M}](\d)`,"g"),"$1$2");if(g!=="."&&(o=o.replace(y,".")),G.test(r)){const t=Number.parseFloat(o.trim());if(!Number.isNaN(t)){const e=u[x];if(e!==void 0)return t*S[e]}return}const n=_.exec(r);if(n&&(n[1]!==void 0||n[2]!==void 0||n[3]!==void 0)){const t=Number.parseInt(n[1]??"0",10),e=Number.parseInt(n[2]??"0",10),a=Number.parseInt(n[3]??"0",10);return t*36e5+e*6e4+a*1e3}const i=C.exec(r);if(i){let t=0,e=0;i[2]!==void 0?(t=Number.parseInt(i[1]??"0",10),e=Number.parseInt(i[2],10)):i[1]!==void 0&&(e=Number.parseInt(i[1],10));const a=Number.parseInt(i[3]??"0",10);return t*36e5+e*6e4+a*1e3}let s=h.get(u);if(s===void 0){const t=Object.keys(u).toSorted((e,a)=>a.length-e.length).map(e=>e.replaceAll(m,String.raw`\$&`)).join("|");s=new RegExp(String.raw`(-?\d*\.?\d+)\s*(${t})`,"gi"),h.set(u,s)}let f=0,p,d=!1,N=-1,b=0;for(s.lastIndex=0;(p=s.exec(o))!==null;){d||(N=p.index),d=!0;const t=p[1],e=p[2];if(!t||!e)continue;const a=t.trim(),L=a.startsWith("-")?-1:1,O=a.replace(H,""),$=Number.parseFloat(O),w=u[e.toLowerCase()];if(w===void 0)continue;const R=S[w];if(Number.isNaN($))return;f+=L*$*R,b=s.lastIndex}const k=o.slice(0,N).trim(),E=o.slice(b).trim();if(!(d&&(k.length>0||E.length>0))&&d)return f},"parseDuration");export{z as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/humanizer",
3
- "version": "3.0.0-alpha.12",
3
+ "version": "3.0.0-alpha.13",
4
4
  "description": "Humanizer is a library for humanizing data in a human-readable form.",
5
5
  "keywords": [
6
6
  "bytes",
@@ -1 +0,0 @@
1
- var x=Object.defineProperty;var b=(r,n)=>x(r,"name",{value:n,configurable:!0});import{durationLanguage as M}from"../language/en.js";import P from"../language/util/validate-duration-language.js";var w=Object.defineProperty,g=b((r,n)=>w(r,"name",{value:n,configurable:!0}),"g");const N=g((r,n)=>{n=n||-1;const e=new RegExp(String.raw`^-?\d+(?:.\d{0,${String(n)}})?`).exec(r.toString());return e===null?r:Number.parseFloat(e[0])},"toFixed"),v=g(({unitCount:r,unitName:n},e,l)=>{let{spacer:d}=l;const{maxDecimalPoints:s}=l;let o=".";l.decimal!==void 0?o=l.decimal:e.decimal!==void 0&&(o=e.decimal);let t;"digitReplacements"in l?t=l.digitReplacements:"_digitReplacements"in e&&(t=e._digitReplacements);let i,f=r;s!==void 0&&(f=N(r,s));const a=f.toString();if(!e._hideCountIf2||r!==2)if(t){i="";for(const m of a)i+=m==="."?o:t[m]}else i=a.replace(".",o);else i="";const u=e[n];let c=u;return typeof u=="function"&&(c=u(r)),e._hideCountIf2&&r===2&&(d=""),e._numberFirst?c+d+i:i+d+c},"renderPiece"),C=g((r,n)=>{const{units:e}=n;if(e.length===0)return[];const{unitMeasures:l}=n,d=n.largest??Number.POSITIVE_INFINITY,s={};let o,t,i,f=r;for(t=0;t<e.length;t++){o=e[t];const u=l[o];i=t===e.length-1?f/u:Math.floor(f/u),s[o]=i,f-=i*u}if(n.round){let u=d;for(t=0;t<e.length;t++)if(o=e[t],i=s[o],i!==0&&(u--,u===0)){for(let c=t+1;c<e.length;c++){const m=e[c],h=s[m];s[o]=(s[o]??0)+h*l[m]/l[o],s[m]=0}break}for(t=e.length-1;t>=0;t--){if(o=e[t],i=s[o],i===0)continue;const c=Math.round(i);if(s[o]=c,t===0)break;const m=e[t-1],h=l[m],p=Math.floor(c*l[o]/h);if(p)s[m]=(s[m]??0)+p,s[o]=0;else break}}const a=[];for(t=0;t<e.length&&a.length<d;t++){if(o=e[t],i=s[o],i&&!n.round&&a.length===d-1){let u,c=0;for(u=t+1,e.length;u<e.length;u++){const m=e[u];c+=s[m]*(n.unitMeasures[m]/n.unitMeasures[o])}i+=c,n.maxDecimalPoints!==void 0&&(i=N(i,n.maxDecimalPoints))}i&&a.push({unitCount:i,unitName:o})}return a},"getPieces"),I=g((r,n,e)=>{const{language:l,units:d}=n;if(r.length===0){const u=d.at(-1);return v({unitCount:0,unitName:u},l,n)}const{conjunction:s,serialComma:o}=n;let t=", ";n.delimiter!==void 0?t=n.delimiter:l.delimiter!==void 0&&(t=l.delimiter);let i="";n.timeAdverb&&e!==0&&(i=l.future??"",e<0&&(i=l.past??""));const f=r.map(u=>v(u,l,n));let a;return!s||r.length===1?a=f.join(t):r.length===2?a=f.join(s):a=f.slice(0,-1).join(t)+(o?",":"")+s+(f.at(-1)??""),i&&(a=i.replace("%s",a)),a},"formatPieces"),R=g((r,n)=>{if(Number.isNaN(r))throw new TypeError("Expected a valid number");if(typeof r!="number")throw new TypeError("Expected a number for milliseconds input");const e={conjunction:"",language:M,round:!1,serialComma:!0,spacer:" ",timeAdverb:!1,unitMeasures:{d:864e5,h:36e5,m:6e4,mo:2629746e3,ms:1,s:1e3,w:6048e5,y:31556952e3},units:["w","d","h","m","s"],...n};P(e.language);const l=Math.abs(r),d=C(l,e);return I(d,e,r)},"duration");export{R as default};
@@ -1 +0,0 @@
1
- var U=Object.defineProperty;var S=(t,s)=>U(t,"name",{value:s,configurable:!0});import{durationLanguage as C,englishUnitMap as D}from"../language/en.js";import P from"../language/util/validate-duration-language.js";var T=Object.defineProperty,_=S((t,s)=>T(t,"name",{value:s,configurable:!0}),"h");const h={d:864e5,h:36e5,m:6e4,mo:2629746e3,ms:1,s:1e3,w:6048e5,y:31556952e3},p=/[-/\\^$*+?.()|[\]{}]/g,k=/^PT(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?$/i,H=/^(?:(\d+):)?(?:(\d+):)?(\d+)$/,V=/^[+-]?\d+(?:\.\d+)?$/,W=/^[-+]/,B=_((t,s)=>{if(typeof t!="string"||t.length===0)return;const{defaultUnit:x="ms",language:o=C}=s??{};P(o);const g=o.decimal??".",I=o.groupSeparator??",",v=o.placeholderSeparator??"_",A=g.replaceAll(p,String.raw`\$&`),y=I.replaceAll(p,String.raw`\$&`),j=v.replaceAll(p,String.raw`\$&`),d=o.unitMap??D;let a=t.replaceAll(new RegExp(String.raw`(\d)[${j}${y}](\d)`,"g"),"$1$2");if(g!=="."&&(a=a.replace(A,".")),V.test(t)){const e=Number.parseFloat(a.trim());if(!Number.isNaN(e)){const r=d[x];if(r!==void 0)return e*h[r]}return}const l=k.exec(t);if(l){const e=Number.parseInt(l[1]??"0",10),r=Number.parseInt(l[2]??"0",10),i=Number.parseInt(l[3]??"0",10);return e*36e5+r*6e4+i*1e3}const n=H.exec(t);if(n){let e=0,r=0;n[2]!==void 0?(e=Number.parseInt(n[1]??"0",10),r=Number.parseInt(n[2],10)):n[1]!==void 0&&(r=Number.parseInt(n[1],10));const i=Number.parseInt(n[3]??"0",10);return e*36e5+r*6e4+i*1e3}const M=Object.keys(d).toSorted((e,r)=>r.length-e.length).map(e=>e.replaceAll(p,String.raw`\$&`)).join("|"),m=new RegExp(String.raw`(-?\d*\.?\d+)\s*(${M})`,"gi");let f=0,c,u=!1,N=-1,b=0;for(m.lastIndex=0;(c=m.exec(a))!==null;){u||(N=c.index),u=!0;const e=c[1],r=c[2];if(!e||!r)continue;const i=e.trim(),L=i.startsWith("-")?-1:1,O=i.replace(W,""),$=Number.parseFloat(O),w=d[r.toLowerCase()];if(w===void 0)continue;const R=h[w];if(Number.isNaN($))return;f+=L*$*R,b=m.lastIndex}const E=a.slice(0,N).trim(),F=a.slice(b).trim();if(!(u&&(E.length>0||F.length>0))&&u)return f},"parseDuration");export{B as default};