var global=void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};!function(e){!String.prototype.trimAll&&Object.defineProperty(String.prototype,"trimAll",{value:function(){let e=this;for(e=e.trim().replace(/\t/g," ").replace(/\r/g," ").replace(/\n/g," ");e.indexOf(" ")>=0;)e=e.replace(/ /g," ");return e}}),!String.prototype.toCamelCase&&Object.defineProperty(String.prototype,"toCamelCase",{value:function(){let e=this.trimAll(),t="",r=!1;if(e.indexOf(" ")>0||e.indexOf("-")>0||e.indexOf("_")>0)for(let o=0,n=(e=e.toLowerCase()).length;o0||e.indexOf("-")>0||e.indexOf("_")>0)for(let o=0,n=(e=e.toLowerCase()).length;o0?t+="-"+e[r].toLowerCase():t+=e[r].toLowerCase();return t}}),!String.prototype.toPascalCase&&Object.defineProperty(String.prototype,"toPascalCase",{value:function(){let e=this.trimAll(),t="",r=!1;if(e.indexOf(" ")>0||e.indexOf("-")>0||e.indexOf("_")>0)for(let o=0,n=(e=e.toLowerCase()).length;o0||e.indexOf("-")>0||e.indexOf("_")>0)for(let o=0,n=(e=e.toLowerCase()).length;o0?t+="_"+e[r].toLowerCase():t+=e[r].toLowerCase();return t}}),!String.prototype.left&&Object.defineProperty(String.prototype,"left",{value:function(e){return e=e||1,this.substr(0,e)}}),!String.prototype.right&&Object.defineProperty(String.prototype,"right",{value:function(e){return e=e||1,this.substring(this.length-e)}}),!String.prototype.mid&&Object.defineProperty(String.prototype,"mid",{value:function(e,t){return e=e||Math.floor(this.length/2),t=t||1,this.substr(e,t)}}),!String.prototype.reverse&&Object.defineProperty(String.prototype,"reverse",{value:function(){return this.split("").reverse().join("")}}),!String.prototype.sort&&Object.defineProperty(String.prototype,"sort",{value:function(e){return this.split("").sort(e||((e,t)=>e>t?1:-1)).join("")}}),!String.prototype.sortAsc&&Object.defineProperty(String.prototype,"sortAsc",{value:function(){return this.split("").sort((e,t)=>e>t?1:-1).join("")}}),!String.prototype.sortDesc&&Object.defineProperty(String.prototype,"sortDesc",{value:function(){return this.split("").sort((e,t)=>e0?o.indexOf(":")>3?(n=o.substring(0,o.indexOf(":")-2).trimAll(),a=o.substring(o.indexOf(":")-2).trimAll()):(r.dd=t.getDate(),r.mm=t.getMonth(),r.yy=t.getFullYear(),0!=new Date(1900,1,1).getDay()&&r.mm++,a=o.trimAll()):n=o.trimAll(),/^[0-3][0-9][ ](jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec|january|february|march|april|may|june|july|august|september|october|november|december)[ ][1-2][0-9][0-9][0-9]$/i.test(n)?(r.dd=parseInt(n.substr(0,2)),r.mm=e[n.substr(3,3).toLowerCase()],r.yy=parseInt(n.right(4))):/^[0-9][ ](jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec|january|february|march|april|may|june|july|august|september|october|november|december)[ ][1-2][0-9][0-9][0-9]$/i.test(n)?(r.dd=parseInt(n.substr(0,1)),r.mm=e[n.substr(2,3).toLowerCase()],r.yy=parseInt(n.right(4))):/^[0-3][0-9](jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec|january|february|march|april|may|june|july|august|september|october|november|december)[1-2][0-9][0-9][0-9]$/i.test(n)?(r.dd=parseInt(n.substr(0,2)),r.mm=e[n.substr(2,3).toLowerCase()],r.yy=parseInt(n.right(4))):/^[0-9](jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec|january|february|march|april|may|june|july|august|september|october|november|december)[1-2][0-9][0-9][0-9]$/i.test(n)?(r.dd=parseInt(n.substr(0,1)),r.mm=e[n.substr(1,3).toLowerCase()],r.yy=parseInt(n.right(4))):/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec|january|february|march|april|may|june|july|august|september|october|november|december)[ ][1-2][0-9][0-9][0-9]$/i.test(n)?(r.dd=1,r.mm=e[n.substr(0,3).toLowerCase()],r.yy=parseInt(n.right(4))):/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec|january|february|march|april|may|june|july|august|september|october|november|december)[1-2][0-9][0-9][0-9]$/i.test(n)?(r.dd=1,r.mm=e[n.substr(0,3).toLowerCase()],r.yy=parseInt(n.right(4))):/^[0-3][0-9][ ](jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec|january|february|march|april|may|june|july|august|september|october|november|december)[ ][0-9][0-9]$/i.test(n)?(r.dd=parseInt(n.substr(0,2)),r.mm=e[n.substr(3,3).toLowerCase()],r.yy=parseInt(n.right(2))):/^[0-9][ ](jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec|january|february|march|april|may|june|july|august|september|october|november|december)[ ][0-9][0-9]$/i.test(n)?(r.dd=parseInt(n.substr(0,1)),r.mm=e[n.substr(2,3).toLowerCase()],r.yy=parseInt(n.right(2))):/^[0-3][0-9](jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec|january|february|march|april|may|june|july|august|september|october|november|december)[0-9][0-9]$/i.test(n)?(r.dd=parseInt(n.substr(0,2)),r.mm=e[n.substr(2,3).toLowerCase()],r.yy=parseInt(n.right(2))):/^[0-9](jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec|january|february|march|april|may|june|july|august|september|october|november|december)[0-9][0-9]$/i.test(n)?(r.dd=parseInt(n.substr(0,1)),r.mm=e[n.substr(1,3).toLowerCase()],r.yy=parseInt(n.right(2))):/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec|january|february|march|april|may|june|july|august|september|october|november|december)[ ][0-9][0-9]$/i.test(n)?(r.dd=1,r.mm=e[n.substr(0,3).toLowerCase()],r.yy=parseInt(n.right(2))):/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec|january|february|march|april|may|june|july|august|september|october|november|december)[0-9][0-9]$/i.test(n)?(r.dd=1,r.mm=e[n.substr(0,3).toLowerCase()],r.yy=parseInt(n.right(2))):/^[0-3][0-9][ ](jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec|january|february|march|april|may|june|july|august|september|october|november|december)$/i.test(n)?(r.dd=parseInt(n.substr(0,2)),r.mm=e[n.substr(3,3).toLowerCase()],r.yy=t.getFullYear()):/^[0-9][ ](jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec|january|february|march|april|may|june|july|august|september|october|november|december)$/i.test(n)?(r.dd=parseInt(n.substr(0,1)),r.mm=e[n.substr(2,3).toLowerCase()],r.yy=t.getFullYear()):/^[0-3][0-9](jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec|january|february|march|april|may|june|july|august|september|october|november|december)$/i.test(n)?(r.dd=parseInt(n.substr(0,2)),r.mm=e[n.substr(2,3).toLowerCase()],r.yy=t.getFullYear()):/^[0-9](jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec|january|february|march|april|may|june|july|august|september|october|november|december)$/i.test(n)?(r.dd=parseInt(n.substr(0,1)),r.mm=e[n.substr(1,3).toLowerCase()],r.yy=t.getFullYear()):/^[0-3][0-9][ ][0-1][0-9][ ][1-2][0-9][0-9][0-9]$/i.test(n)?(r.dd=parseInt(n.substr(0,2)),r.mm=parseInt(n.substr(3,2)),r.yy=parseInt(n.right(4))):/^[0-9][ ][0-1][0-9][ ][1-2][0-9][0-9][0-9]$/i.test(n)?(r.dd=parseInt(n.substr(0,1)),r.mm=parseInt(n.substr(2,2)),r.yy=parseInt(n.right(4))):/^[0-9][ ][0-9][ ][1-2][0-9][0-9][0-9]$/i.test(n)?(r.dd=parseInt(n.substr(0,1)),r.mm=parseInt(n.substr(2,1)),r.yy=parseInt(n.right(4))):/^[0-3][0-9][ ][0-9][ ][1-2][0-9][0-9][0-9]$/i.test(n)?(r.dd=parseInt(n.substr(0,2)),r.mm=parseInt(n.substr(3,1)),r.yy=parseInt(n.right(4))):/^[0-1][0-9][ ][1-2][0-9][0-9][0-9]$/i.test(n)?(r.dd=1,r.mm=parseInt(n.substr(0,2)),r.yy=parseInt(n.right(4))):/^[0-9][ ][1-2][0-9][0-9][0-9]$/i.test(n)?(r.dd=1,r.mm=parseInt(n.substr(0,1)),r.yy=parseInt(n.right(4))):/^[0-3][0-9][ ][0-1][0-9][ ][0-9][0-9]$/i.test(n)?(r.dd=parseInt(n.substr(0,2)),r.mm=parseInt(n.substr(3,2)),r.yy=parseInt(n.right(2))):/^[0-9][ ][0-1][0-9][ ][0-9][0-9]$/i.test(n)?(r.dd=parseInt(n.substr(0,1)),r.mm=parseInt(n.substr(2,2)),r.yy=parseInt(n.right(2))):/^[0-9][ ][0-9][ ][0-9][0-9]$/i.test(n)?(r.dd=parseInt(n.substr(0,1)),r.mm=parseInt(n.substr(2,1)),r.yy=parseInt(n.right(2))):/^[0-3][0-9][ ][0-9][ ][0-9][0-9]$/i.test(n)?(r.dd=parseInt(n.substr(0,2)),r.mm=parseInt(n.substr(3,1)),r.yy=parseInt(n.right(2))):/^[0-1][0-9][ ][0-9][0-9]$/i.test(n)?(r.dd=1,r.mm=parseInt(n.substr(0,2)),r.yy=parseInt(n.right(2))):/^[0-9][ ][0-9][0-9]$/i.test(n)?(r.dd=1,r.mm=parseInt(n.substr(0,1)),r.yy=parseInt(n.right(2))):(t=new Date(this),isNaN(t)||(r.dd=t.getDate(),r.mm=t.getMonth(),r.yy=t.getFullYear(),0!=new Date(1900,1,1).getDay()&&r.mm++,r.h=t.getHours(),r.m=t.getMinutes(),r.s=t.getSeconds())),/^([0-2][0-9]|[0-9])(:([0-5][0-9]|[0-9])){1,2}(:[0-9]{1,3})?[ ]?(am|pm)?$/i.test(a)){let e=a.match(/\d+/g);r.h=parseInt(e[0]||0),r.m=parseInt(e[1]||0),r.s=parseInt(e[2]||0),r.f=parseInt(e[3]||0),"pm"===a.right(2).toLowerCase()?r.h<12&&(r.h+=12):12==r.h&&(r.h=0)}return 0!=new Date(1900,1,1).getDay()&&r.mm--,r.yy<50?r.yy+=2e3:r.yy<100&&(r.yy+=1900),t=new Date(r.yy,r.mm,r.dd,r.h,r.m,r.s,r.f),isNaN(t)&&(t=new Date("1jan1900")),t}}),!String.prototype.toDate&&Object.defineProperty(String.prototype,"toDate",{value:function(){return this.toDateTime().format("dd/MMM/yyyy").toDateTime()}}),!Number.prototype.isNaN&&Object.defineProperty(Number.prototype,"isNaN",{value:function(t){return isNaN(this)||this===1/0?t===e.itself?this:null==t||t:null!=t&&this}}),!Number.prototype.toChar&&Object.defineProperty(Number.prototype,"toChar",{value:function(){return String.fromCharCode(this)}}),!Number.prototype.format&&Object.defineProperty(Number.prototype,"format",{value:function(e){if(e&&"string"==typeof e&&/^([0#,])+([.]){0,1}([0])*$/.test(e)){let t=this.toString();if(t.indexOf("e")>0)return t;let r="";if("-"===t[0]&&(r="-",t=t.substring(1)),/,[#0][#0],/.test(e)){let r="##,";0===e.indexOf(",")?e=(r+="##")+e:1===e.indexOf(",")?e=(r+="#")+e:2===e.indexOf(",")&&(e=r+e);for(let r=0,o=t.length/2;r0?(o=t.substring(0,t.indexOf(".")),n=t.substring(t.indexOf(".")+1)):o=t;let a="",s="";e.indexOf(".")>0?(a=e.substring(0,e.indexOf(".")),s=e.substring(e.indexOf(".")+1)):a=e,s.indexOf(".")>0&&(s=s.substring(0,s.indexOf(".")));let i="",u="",p=o.length-1;for(let e=a.length-1;e>=0;e--)o[p]?","===a[e]?i=a[e]+i:(i=o[p]+i,p--):("0"===a[e]&&a.substring(e).indexOf("#")<0||","===a[e]&&a.substring(e).indexOf("#")<0)&&(i=a[e]+i);i=o.substring(0,p+1)+i;for(let e=0;eu.length&&parseInt(n[s.length])>=5&&(u=(parseInt(u)+1).toString()),r+i+(u?".":"")+u}return this.toLocaleString()}}),!Number.prototype.toNumber&&Object.defineProperty(Number.prototype,"toNumber",{value:function(){return this}}),!Number.prototype.toDate&&Object.defineProperty(Number.prototype,"toDate",{value:function(){return new Date(this)}}),!Number.prototype.toDateTime&&Object.defineProperty(Number.prototype,"toDateTime",{value:function(){return new Date(this)}}),!Date.prototype.toDateTime&&Object.defineProperty(Date.prototype,"toDateTime",{value:function(){return this}}),!Date.prototype.format&&Object.defineProperty(Date.prototype,"format",{value:function(e){if(e){let t=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],r=["January","February","March","April","May","June","July","August","September","October","November","December"],o=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],n=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],a=this.getDay(),s=this.getDate(),i=this.getMonth(),u=this.getFullYear(),p=this.getHours(),y=this.getMinutes(),l=this.getSeconds(),c=this.getMilliseconds(),f=p>=12?"PM":"AM",b=p%12,d=parseInt(u.toString().right(2));12==p&&(b=12);let m=new Date("1Jan1900");return 0!=m.getMonth()&&i--,0==m.getDay()&&(0==a?a=6:a--),e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/dddd/g,"DDDD")).replace(/ddd/g,"DDD")).replace(/dd/g,s.format("00"))).replace(/d/g,s)).replace(/MMMM/g,"XXXX")).replace(/MMM/g,"XXX")).replace(/MM/g,"XX")).replace(/M/g,"X")).replace(/yyyy/g,u.format("0000"))).replace(/yyy/g,u.format("0000"))).replace(/yy/g,d.format("00"))).replace(/y/g,d)).replace(/HH/g,p.format("00"))).replace(/H/g,p)).replace(/hh/g,b.format("00"))).replace(/h/g,b)).replace(/mm/g,y.format("00"))).replace(/m/g,y)).replace(/ss/g,l.format("00"))).replace(/s/g,l)).replace(/fff/g,c.format("000"))).replace(/ff/g,c.format("000"))).replace(/f/g,c.format("000"))).replace(/tt/g,f)).replace(/t/g,f.toLowerCase())).replace(/DDDD/g,n[a])).replace(/DDD/g,o[a])).replace(/XXXX/g,r[i])).replace(/XXX/g,t[i])).replace(/XX/g,(i+1).format("00"))).replace(/X/g,i+1)}return this.toString()}}),!Date.prototype.addDays&&Object.defineProperty(Date.prototype,"addDays",{value:function(e){let t=new Date(this);return e&&t.setDate(this.getDate()+e),t}}),!Date.prototype.addMonths&&Object.defineProperty(Date.prototype,"addMonths",{value:function(e){let t=new Date(this);return e&&t.setMonth(this.getMonth()+e),t}}),!Date.prototype.addYears&&Object.defineProperty(Date.prototype,"addYears",{value:function(e){let t=new Date(this);return e&&t.setFullYear(this.getFullYear()+e),t}}),!Date.prototype.addHours&&Object.defineProperty(Date.prototype,"addHours",{value:function(e){let t=new Date(this);return e&&t.setHours(this.getHours()+e),t}}),!Date.prototype.addMinutes&&Object.defineProperty(Date.prototype,"addMinutes",{value:function(e){let t=new Date(this);return e&&t.setMinutes(this.getMinutes()+e),t}}),!Date.prototype.addSeconds&&Object.defineProperty(Date.prototype,"addSeconds",{value:function(e){let t=new Date(this);return e&&t.setSeconds(this.getSeconds()+e),t}}),!Date.prototype.dateDiff&&Object.defineProperty(Date.prototype,"dateDiff",{value:function(e){if((e=e||new Date).isDate){return(e-this)/864e5}return 0}}),!Date.prototype.toNumber&&Object.defineProperty(Date.prototype,"toNumber",{value:function(){return this.getTime()}}),!Array.prototype.toSet&&Object.defineProperty(Array.prototype,"toSet",{value:function(){return new Set(this)}}),!Array.prototype.contains&&Object.defineProperty(Array.prototype,"contains",{value:function(e){for(let t=0,r=this.length;t