!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).index=t(e.Vue)}(this,(function(e){"use strict";var t=document.createElement("style");t.textContent='@charset "UTF-8";.mn-fast[data-v-b0081ed0]{display:block;--elHeight: calc(var(--fontSizeH) + 6px);height:var(--elHeight);line-height:var(--elHeight);font-size:var(--fontSize)}.mn-fix[data-v-b0081ed0]{display:flex;--fontSize: 14px;--fontSizeH: 14px;--elHeight: calc(var(--fontSizeH) + 6px)}.mn-fix>.mn-fix-item[data-v-b0081ed0]{height:var(--elHeight);display:block;overflow:hidden}.mn-fix>.mn-fix-item>.mn-fix-numBox[data-v-b0081ed0]{display:flex;flex-direction:column}.mn-fix>.mn-fix-item>.mn-fix-numBox>.mn-fix-num[data-v-b0081ed0]{font-size:var(--fontSize);height:var(--elHeight);line-height:var(--elHeight);text-align:center;flex-shrink:0}.mn-scroll[data-v-b0081ed0]{display:flex;--fontSize: 14px;--fontSizeH: 14px;--elHeight: calc(var(--fontSizeH) + 6px);--startTop: 0px;--endTop: 0px}.mn-scroll>.mn-scroll-item[data-v-b0081ed0]{height:var(--elHeight);display:block;overflow:hidden}.mn-scroll>.mn-scroll-item>.mn-scroll-numBox[data-v-b0081ed0]{display:flex;flex-direction:column}.mn-scroll>.mn-scroll-item>.mn-scroll-numBox>.mn-scroll-num[data-v-b0081ed0]{font-size:var(--fontSize);height:var(--elHeight);line-height:var(--elHeight);text-align:center;flex-shrink:0}.mn-scroll>.mn-scroll-item>.mn-scroll-numBox.mn-scroll-move[data-v-b0081ed0]{animation-name:numBox_move-b0081ed0;-webkit-animation-name:numBox_move-b0081ed0;animation-duration:.3s;-webkit-animation-duration:.3s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}@keyframes numBox_move-b0081ed0{0%{margin-top:var(--startTop)}to{margin-top:var(--endTop)}}@-webkit-keyframes numBox_move-b0081ed0{0%{margin-top:var(--startTop)}to{margin-top:var(--endTop)}}\n',document.head.appendChild(t);const o=1e-14;function s(e,t=2){return i(e)&&(e=Number(e)+"").indexOf(".")>-1&&e.split(".")[1].length>t?((e=Number(e))+o).toFixed(t):e}function i(e){if(null==e||""===e)return!1;const t=typeof e;return"number"===t||"string"===t&&!isNaN(Number(e,10))}const n={checkNum:i,numberB0:function(e){return e<10?"0"+e:e},longNumText:function(e,t=2){if(i(e)){let s="";const i=Number(e)<0?-1:1,n=Math.abs(Number(e));return n<1e4?s=i*n:n>=1e4&&n<1e8?s=i*(n/1e4+o).toFixed(t)+"万":n>=1e8&&n<1e12?s=i*(n/1e8+o).toFixed(t)+"亿":n>=1e12&&(s=i*(n/1e12+o).toFixed(t)+"万亿"),s}return e},numberCeil:function(e){if(i(e)){const t=((e=Math.ceil(e))+"").length,o=Math.pow(10,t-1);return Math.ceil(e/o)*o}return e},moneySplit:function(e,t=4){if(i(e)){var o=(e+="").split("."),s=o[0],n=o.length>1?"."+o[1]:"";const i=new RegExp("(\\d+)(\\d{"+t+"})");for(;i.test(s);)s=s.replace(i,"$1,$2");return s+n}return e},numberChangeDecimal:s,averageNum:function(e,t=12,o=2){const i=((e=Number(e))/t).toFixed(o),n=[];for(let l=0;lthis.newNum&&(e=-1,t=this.oldNum-this.newNum,o=t/20),this.mode_fast.showNum=Number(this.oldNum),this.mode_fast.scissors=setInterval((()=>{1===e&&this.mode_fast.showNumthis.newNum?this.mode_fast.showNum+=o*e:(this.mode_fast.showNum=this.newNum,clearInterval(this.mode_fast.scissors)),this.decimal&&(this.mode_fast.showNum=Number(n.numberChangeDecimal(this.mode_fast.showNum,this.decimal))),this.quantileShow&&(this.mode_fast.showNum=n.moneySplit(this.mode_fast.showNum,this.quantileType))}),15)},wcb_fix(){this.mode_fix.showNum=[],this.quantileShow&&(this.oldNum=n.moneySplit(this.oldNum,this.quantileType));const e=this.oldNum.toString().split(""),t=[];e.forEach((e=>{let o=0;o="."===e?10:","===e?12:"-"===e?13:e,t.push(o)})),this.mode_fix.showNum=t,this.quantileShow&&(this.newNum=n.moneySplit(this.newNum,this.quantileType));const o=this.newNum.toString().split(""),s=[];o.forEach((e=>{let t=0;t="."===e?10:","===e?12:"-"===e?13:e,s.push(t)}));const i=this.mode_fix.showNum.length,l=s.length;if(il&&(this.mode_fix.showNum=this.mode_fix.showNum.slice(i-l,i)),this.mode_fix.scissors=setInterval((()=>{const e=[];this.mode_fix.showNum.forEach(((t,o)=>{let i=Number(t),n=Number(s[o]);i!==n&&(10===n?i=n:(in&&i--)),e.push(i)})),this.mode_fix.showNum=e,this.mode_fix.showNum.toString()===this.newNum.toString()&&clearInterval(this.mode_fix.scissors)}),50)},wcb_scroll(){this.mode_scroll.showNum=[],setTimeout((()=>{this.quantileShow&&(this.oldNum=n.moneySplit(this.oldNum,this.quantileType));const e=this.oldNum.toString().split(""),t=[];e.forEach((e=>{let o=0;o="."===e?10:","===e?12:"-"===e?13:e,t.push(o)})),this.mode_scroll.showNum=t,this.quantileShow&&(this.newNum=n.moneySplit(this.newNum,this.quantileType));const o=this.newNum.toString().split(""),s=[];o.forEach((e=>{let t=0;t="."===e?10:","===e?12:"-"===e?13:e,s.push(t)}));const i=this.mode_scroll.showNum.length,l=s.length;if(il&&(this.mode_scroll.showNum=this.mode_scroll.showNum.slice(i-l,i)),this.mode_scroll.targetNum=s}),0)},pxToRem:(e,t=16)=>e/t}},m={key:0},a={key:1};const r=((e,t)=>{const o=e.__vccOpts||e;for(const[s,i]of t)o[s]=i;return o})(l,[["render",function(t,o,s,i,n,l){return t.userMoveNumTag?(e.openBlock(),e.createElementBlock("span",m,["fix"===t.mode?(e.openBlock(),e.createElementBlock("span",{key:0,class:"mn-fix",style:e.normalizeStyle({"--fontSize":`${t.pxToRem(t.fontSize)}rem`,"--fontSizeH":`${t.fontSize}px`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.mode_fix.showNum,((o,s)=>(e.openBlock(),e.createElementBlock("span",{class:"mn-fix-item",key:s},[e.createElementVNode("span",{class:"mn-fix-numBox",style:e.normalizeStyle({marginTop:`calc(-1 * ${o} * ${t.fontSize+6}px)`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.mode_fix.baseData,((t,o)=>(e.openBlock(),e.createElementBlock("span",{class:"mn-fix-num",key:o},e.toDisplayString(t),1)))),128))],4)])))),128))],4)):"scroll"===t.mode?(e.openBlock(),e.createElementBlock("span",{key:1,class:"mn-scroll",style:e.normalizeStyle({"--fontSize":`${t.pxToRem(t.fontSize)}rem`,"--fontSizeH":`${t.fontSize}px`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.mode_scroll.showNum,((o,s)=>(e.openBlock(),e.createElementBlock("span",{class:"mn-scroll-item",key:s},[e.createElementVNode("span",{class:"mn-scroll-numBox mn-scroll-move",style:e.normalizeStyle({"--startTop":`calc(-1 * ${o} * ${t.fontSize+6}px)`,"--endTop":`calc(-1 * ${t.mode_scroll.targetNum[s]} * ${t.fontSize+6}px)`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.mode_scroll.baseData,((t,o)=>(e.openBlock(),e.createElementBlock("span",{class:"mn-scroll-num",key:o},e.toDisplayString(t),1)))),128))],4)])))),128))],4)):"fast"===t.mode?(e.openBlock(),e.createElementBlock("span",{key:2,class:"mn-fast",style:e.normalizeStyle({"--fontSize":`${t.pxToRem(t.fontSize)}rem`,"--fontSizeH":`${t.fontSize}px`})},e.toDisplayString(t.mode_fast.showNum),5)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("span",a,e.toDisplayString(t.userMoveNum),1))}],["__scopeId","data-v-b0081ed0"]]),u=[r];return{install:function(e){u.map((t=>{e.component(t.name,t)}))},MovingNumbers:r}}));