META-INF.web.lib.js.bee.util.js Maven / Gradle / Ivy
var isIE=navigator.userAgent.toLowerCase().indexOf("msie")!=-1;var isIE6=navigator.userAgent.toLowerCase().indexOf("msie 6.0")!=-1;var isGecko=navigator.userAgent.toLowerCase().indexOf("gecko")!=-1;var isQuirks=document.compatMode=="BackCompat";var Util={number_cn:"〇一二三四五六七八九十".split(""),digit_cn:"亿万千百十".split(""),formatNumber:function(z,i){if(!i||!typeof(i)=="string"){return z}if(isNaN(parseFloat(z))){return z}z=parseFloat(z);if(i.trim().startsWith("{")){var w=JSON.parse(i);return w[z]}i=i.replace(/[a-z0-9]/ig,"#");var t=i.substr(0,i.indexOf("#")),F=i.substr(i.lastIndexOf("#")+1);i=i.replace(t,"").replace(F,"");if(!i){return t+z+F}var B=0,E=0,C="",w=0,v=i.split("");for(var x=v.length-1;x>=0;x--){if(v[x]=="."){E=w;w=0;continue}if(v[x]!="#"){C=v[x];B=w;w=0;break}w++}var y="",D=0,A=E>0?"."+"000000000000000000000000".substr(0,E):"",r=0,l=(""+z).split(".");if(l.length>1){r=E==0?parseFloat("."+l[1]):parseFloat("."+l[l.length-1]).toFixed(E);A=(""+r).substr(1)}D=parseInt(l[0])+parseInt(r);l[0]=""+D;if(B==0){y=l[0]}else{var u=l[0].split("");for(var x=0;x0){document.writeln('