import bigInt from"big-integer";const Snowflake=function(){function t(t,e,i){if(this.twepoch=new Date("2021-05-01 00:00:01").getTime(),this.workerIdBits=5,this.dataCenterIdBits=5,this.maxWrokerId=-1^-1<this.maxWrokerId||this.workerId<0)throw new Error(`config.worker_id must max than 0 and small than maxWrokerId-[${this.maxWrokerId}]`);if(this.dataCenterId>this.maxDataCenterId||this.dataCenterId<0)throw new Error(`config.data_center_id must max than 0 and small than maxDataCenterId-[${this.maxDataCenterId}]`);this.workerId=t,this.dataCenterId=e,this.sequence=i}return t.prototype.tilNextMillis=function(t){let e=this.timeGen();for(;e<=t;)e=this.timeGen();return e},t.prototype.timeGen=function(){return Date.now()},t.prototype.nextId=function(){let t=this.timeGen();if(t