'use strict';function n(r){return !!(r==null||typeof r=="undefined"||typeof r=="string"&&r===""||Array.isArray(r)&&!r.length)}var f=r=>{if(n(r))return NaN;if(typeof r=="number")return r;try{let t=Number(r);return isNaN(t)?NaN:t}catch(t){}return NaN};exports.toNumber=f;