@oardi/ts-utils 0.0.7 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.js CHANGED
@@ -1,15 +1,15 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ae=(h,r,f)=>h.localeCompare(r)*(f?1:-1),Te=(h,r)=>h<r?-1:h===r?0:1,Fe=(h,r,f)=>Te(h,r)*(f?1:-1),Ie=(h,r,f)=>{let d=0;return typeof h=="string"&&typeof r=="string"?d=Ae(h,r,f):d=Fe(h,r,f),d},$e=(h,r,f,d)=>{const C=f(h),$=f(r);return Ie(C,$,d)};Array.prototype.groupBy=function(h){return this.reduce((r,f)=>{const d=h(f);return(r[d]=r[d]||[]).push(f),r},{})};Array.prototype.removeBy=function(h,r){return this.filter(f=>h(f)!==r)};Array.prototype.orderBy=function(h,r=!0){return this?.sort((f,d)=>$e(f,d,h,r)),this};Array.prototype.filterBy=function(h){return this.filter(r=>{let f=!1;return h&&r[h]?f=r[h]===h:f=r===h,f})};Array.prototype.distinct=function(h){const r=this;return h?r.filter((d,C,$)=>$.findIndex(z=>h(z,d))===C):r.filter((d,C,$)=>$.indexOf(d)===C)};var ge=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ce(h){return h&&h.__esModule&&Object.prototype.hasOwnProperty.call(h,"default")?h.default:h}var me={exports:{}},je=me.exports,Oe;function ze(){return Oe||(Oe=1,function(h,r){(function(f,d){h.exports=d()})(je,function(){var f=1e3,d=6e4,C=36e5,$="millisecond",z="second",N="minute",q="hour",o="day",S="week",A="month",D="quarter",T="year",Q="date",G="Invalid Date",X=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,se=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,ae={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(_){var l=["th","st","nd","rd"],c=_%100;return"["+_+(l[(c-20)%10]||l[c]||l[0])+"]"}},Z=function(_,l,c){var i=String(_);return!i||i.length>=l?_:""+Array(l+1-i.length).join(c)+_},pe={s:Z,z:function(_){var l=-_.utcOffset(),c=Math.abs(l),i=Math.floor(c/60),a=c%60;return(l<=0?"+":"-")+Z(i,2,"0")+":"+Z(a,2,"0")},m:function _(l,c){if(l.date()<c.date())return-_(c,l);var i=12*(c.year()-l.year())+(c.month()-l.month()),a=l.clone().add(i,A),u=c-a<0,y=l.clone().add(i+(u?-1:1),A);return+(-(i+(c-a)/(u?a-y:y-a))||0)},a:function(_){return _<0?Math.ceil(_)||0:Math.floor(_)},p:function(_){return{M:A,y:T,w:S,d:o,D:Q,h:q,m:N,s:z,ms:$,Q:D}[_]||String(_||"").toLowerCase().replace(/s$/,"")},u:function(_){return _===void 0}},oe="en",K={};K[oe]=ae;var F="$isDayjsObject",e=function(_){return _ instanceof m||!(!_||!_[F])},t=function _(l,c,i){var a;if(!l)return oe;if(typeof l=="string"){var u=l.toLowerCase();K[u]&&(a=u),c&&(K[u]=c,a=u);var y=l.split("-");if(!a&&y.length>1)return _(y[0])}else{var g=l.name;K[g]=l,a=g}return!i&&a&&(oe=a),a||!i&&oe},n=function(_,l){if(e(_))return _.clone();var c=typeof l=="object"?l:{};return c.date=_,c.args=arguments,new m(c)},s=pe;s.l=t,s.i=e,s.w=function(_,l){return n(_,{locale:l.$L,utc:l.$u,x:l.$x,$offset:l.$offset})};var m=function(){function _(c){this.$L=t(c.locale,null,!0),this.parse(c),this.$x=this.$x||c.x||{},this[F]=!0}var l=_.prototype;return l.parse=function(c){this.$d=function(i){var a=i.date,u=i.utc;if(a===null)return new Date(NaN);if(s.u(a))return new Date;if(a instanceof Date)return new Date(a);if(typeof a=="string"&&!/Z$/i.test(a)){var y=a.match(X);if(y){var g=y[2]-1||0,v=(y[7]||"0").substring(0,3);return u?new Date(Date.UTC(y[1],g,y[3]||1,y[4]||0,y[5]||0,y[6]||0,v)):new Date(y[1],g,y[3]||1,y[4]||0,y[5]||0,y[6]||0,v)}}return new Date(a)}(c),this.init()},l.init=function(){var c=this.$d;this.$y=c.getFullYear(),this.$M=c.getMonth(),this.$D=c.getDate(),this.$W=c.getDay(),this.$H=c.getHours(),this.$m=c.getMinutes(),this.$s=c.getSeconds(),this.$ms=c.getMilliseconds()},l.$utils=function(){return s},l.isValid=function(){return this.$d.toString()!==G},l.isSame=function(c,i){var a=n(c);return this.startOf(i)<=a&&a<=this.endOf(i)},l.isAfter=function(c,i){return n(c)<this.startOf(i)},l.isBefore=function(c,i){return this.endOf(i)<n(c)},l.$g=function(c,i,a){return s.u(c)?this[i]:this.set(a,c)},l.unix=function(){return Math.floor(this.valueOf()/1e3)},l.valueOf=function(){return this.$d.getTime()},l.startOf=function(c,i){var a=this,u=!!s.u(i)||i,y=s.p(c),g=function(O,x){var w=s.w(a.$u?Date.UTC(a.$y,x,O):new Date(a.$y,x,O),a);return u?w:w.endOf(o)},v=function(O,x){return s.w(a.toDate()[O].apply(a.toDate("s"),(u?[0,0,0,0]:[23,59,59,999]).slice(x)),a)},p=this.$W,M=this.$M,L=this.$D,B="set"+(this.$u?"UTC":"");switch(y){case T:return u?g(1,0):g(31,11);case A:return u?g(1,M):g(0,M+1);case S:var Y=this.$locale().weekStart||0,k=(p<Y?p+7:p)-Y;return g(u?L-k:L+(6-k),M);case o:case Q:return v(B+"Hours",0);case q:return v(B+"Minutes",1);case N:return v(B+"Seconds",2);case z:return v(B+"Milliseconds",3);default:return this.clone()}},l.endOf=function(c){return this.startOf(c,!1)},l.$set=function(c,i){var a,u=s.p(c),y="set"+(this.$u?"UTC":""),g=(a={},a[o]=y+"Date",a[Q]=y+"Date",a[A]=y+"Month",a[T]=y+"FullYear",a[q]=y+"Hours",a[N]=y+"Minutes",a[z]=y+"Seconds",a[$]=y+"Milliseconds",a)[u],v=u===o?this.$D+(i-this.$W):i;if(u===A||u===T){var p=this.clone().set(Q,1);p.$d[g](v),p.init(),this.$d=p.set(Q,Math.min(this.$D,p.daysInMonth())).$d}else g&&this.$d[g](v);return this.init(),this},l.set=function(c,i){return this.clone().$set(c,i)},l.get=function(c){return this[s.p(c)]()},l.add=function(c,i){var a,u=this;c=Number(c);var y=s.p(i),g=function(M){var L=n(u);return s.w(L.date(L.date()+Math.round(M*c)),u)};if(y===A)return this.set(A,this.$M+c);if(y===T)return this.set(T,this.$y+c);if(y===o)return g(1);if(y===S)return g(7);var v=(a={},a[N]=d,a[q]=C,a[z]=f,a)[y]||1,p=this.$d.getTime()+c*v;return s.w(p,this)},l.subtract=function(c,i){return this.add(-1*c,i)},l.format=function(c){var i=this,a=this.$locale();if(!this.isValid())return a.invalidDate||G;var u=c||"YYYY-MM-DDTHH:mm:ssZ",y=s.z(this),g=this.$H,v=this.$m,p=this.$M,M=a.weekdays,L=a.months,B=a.meridiem,Y=function(x,w,I,U){return x&&(x[w]||x(i,u))||I[w].slice(0,U)},k=function(x){return s.s(g%12||12,x,"0")},O=B||function(x,w,I){var U=x<12?"AM":"PM";return I?U.toLowerCase():U};return u.replace(se,function(x,w){return w||function(I){switch(I){case"YY":return String(i.$y).slice(-2);case"YYYY":return s.s(i.$y,4,"0");case"M":return p+1;case"MM":return s.s(p+1,2,"0");case"MMM":return Y(a.monthsShort,p,L,3);case"MMMM":return Y(L,p);case"D":return i.$D;case"DD":return s.s(i.$D,2,"0");case"d":return String(i.$W);case"dd":return Y(a.weekdaysMin,i.$W,M,2);case"ddd":return Y(a.weekdaysShort,i.$W,M,3);case"dddd":return M[i.$W];case"H":return String(g);case"HH":return s.s(g,2,"0");case"h":return k(1);case"hh":return k(2);case"a":return O(g,v,!0);case"A":return O(g,v,!1);case"m":return String(v);case"mm":return s.s(v,2,"0");case"s":return String(i.$s);case"ss":return s.s(i.$s,2,"0");case"SSS":return s.s(i.$ms,3,"0");case"Z":return y}return null}(x)||y.replace(":","")})},l.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},l.diff=function(c,i,a){var u,y=this,g=s.p(i),v=n(c),p=(v.utcOffset()-this.utcOffset())*d,M=this-v,L=function(){return s.m(y,v)};switch(g){case T:u=L()/12;break;case A:u=L();break;case D:u=L()/3;break;case S:u=(M-p)/6048e5;break;case o:u=(M-p)/864e5;break;case q:u=M/C;break;case N:u=M/d;break;case z:u=M/f;break;default:u=M}return a?u:s.a(u)},l.daysInMonth=function(){return this.endOf(A).$D},l.$locale=function(){return K[this.$L]},l.locale=function(c,i){if(!c)return this.$L;var a=this.clone(),u=t(c,i,!0);return u&&(a.$L=u),a},l.clone=function(){return s.w(this.$d,this)},l.toDate=function(){return new Date(this.valueOf())},l.toJSON=function(){return this.isValid()?this.toISOString():null},l.toISOString=function(){return this.$d.toISOString()},l.toString=function(){return this.$d.toUTCString()},_}(),b=m.prototype;return n.prototype=b,[["$ms",$],["$s",z],["$m",N],["$H",q],["$W",o],["$M",A],["$y",T],["$D",Q]].forEach(function(_){b[_[1]]=function(l){return this.$g(l,_[0],_[1])}}),n.extend=function(_,l){return _.$i||(_(l,m,n),_.$i=!0),n},n.locale=t,n.isDayjs=e,n.unix=function(_){return n(1e3*_)},n.en=K[oe],n.Ls=K,n.p={},n})}(me)),me.exports}var We=ze();const te=Ce(We);var _e={exports:{}},Be=_e.exports,xe;function Ue(){return xe||(xe=1,function(h,r){(function(f,d){h.exports=d()})(Be,function(){var f={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(d,C,$){var z=C.prototype,N=z.format;$.en.formats=f,z.format=function(q){q===void 0&&(q="YYYY-MM-DDTHH:mm:ssZ");var o=this.$locale().formats,S=function(A,D){return A.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(T,Q,G){var X=G&&G.toUpperCase();return Q||D[G]||f[G]||D[X].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(se,ae,Z){return ae||Z.slice(1)})})}(q,o===void 0?{}:o);return N.call(this,S)}}})}(_e)),_e.exports}var He=Ue();const Ye=Ce(He);te.extend(Ye);Date.prototype.isAfter=function(h,r){return te(this).isAfter(h,r)};Date.prototype.isBefore=function(h,r){return te(this).isBefore(h,r)};Date.prototype.format=function(h){return te(this).format(h)};Date.prototype.isValid=function(){return te(this).isValid()};Date.prototype.add=function(h,r){return te(this).add(h,r).toDate()};Date.prototype.subtract=function(h,r){return te(this).subtract(h,r).toDate()};Date.prototype.firstDayOfMonth=function(){return te(this).startOf("month").toDate()};Date.prototype.lastDayOfMonth=function(){return te(this).endOf("month").toDate()};Date.prototype.set=function(h,r){return te(this).set(h,r).toDate()};Date.prototype.diff=function(h,r){return te(this).diff(h,r)};String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)};var Le=(h=>(h.opera="opera",h.firefox="firefox",h.safari="safari",h.ie="ie",h.edge="edge",h.edg="edg",h.electron="electron",h.chrome="chrome",h.iOsSafari="iOsSafari",h.edgiOs="edgiOs",h.headlessChrome="headlessChrome",h))(Le||{});const ye=[{breakpoint:"xs",screenWidth:0},{breakpoint:"sm",screenWidth:375},{breakpoint:"md",screenWidth:768},{breakpoint:"lg",screenWidth:992},{breakpoint:"xl",screenWidth:1200},{breakpoint:"xxl",screenWidth:1400},{breakpoint:"xxxl",screenWidth:1600}];class Pe{screenWidth=0;lastBreakpoint;resizeListener;resizeCallbacks=new Set;constructor(){typeof window<"u"&&(this.screenWidth=window.innerWidth,this.resizeListener=this.onResize.bind(this),window.addEventListener("resize",this.resizeListener),this.lastBreakpoint=this.getBreakpointBySize(this.screenWidth))}destroy(){typeof window<"u"&&window.removeEventListener("resize",this.resizeListener),this.resizeCallbacks.clear()}onBreakpointChange(r){this.resizeCallbacks.add(r)}offBreakpointChange(r){this.resizeCallbacks.delete(r)}getCurrentBrowser(){const r=navigator.userAgent.toLowerCase();if(this.isOpera())return"opera";if(this.isFirefox())return"firefox";if(this.isSafari())return"safari";if(this.isIE())return"ie";if(this.isEdge())return"edge";if(this.isEdg())return"edg";if(this.isElectron(r))return"electron";if(this.isChrome())return"chrome";if(this.isIOsSafari(r))return"iOsSafari";if(this.isEdgiOs(r))return"edgiOs";if(this.isHeadlessChrome(r))return"headlessChrome";throw new Error("Browser could not be detected: "+r)}getBreakpointBySize(r=this.screenWidth){let f=ye[0];for(const d of ye)d.screenWidth<=r&&(f=d);return f}isScreenGreaterThan(r){const f=this.getBreakpoint(r);return this.screenWidth>(f?.screenWidth??0)}isScreenSmallerThan(r){const f=this.getBreakpoint(r);return this.screenWidth<(f?.screenWidth??0)}getBreakpoint(r){return ye.find(f=>f.breakpoint===r)}isOpera(){return typeof window<"u"&&(!!window.opr&&!!window.opr.addons||!!window.opera||navigator.userAgent.includes("OPR/"))}isFirefox(){return typeof InstallTrigger<"u"}isSafari(){return/constructor/i.test(window.HTMLElement)||(r=>r.toString()==="[object SafariRemoteNotification]")(!window.safari||window.safari&&window.safari.pushNotification)}isIE(){return!!document.documentMode}isEdge(){return!this.isIE()&&!!window.StyleMedia}isEdg(){return navigator.userAgent.toLowerCase().includes("edg")}isElectron(r){return r.includes("electron")}isChrome(){return typeof window<"u"&&!!window.chrome&&!this.isOpera()&&!this.isEdge()&&!this.isEdg()&&!this.isFirefox()&&!this.isSafari()&&!this.isIE()}isIOsSafari(r){return r.includes("iphone")||r.includes("ipad")||r.includes("macintosh")&&"ontouchend"in document&&r.includes("safari")}isEdgiOs(r){return r.includes("edgios")}isHeadlessChrome(r){return r.includes("headlesschrome")}onResize(r){const f=r.target.innerWidth;this.screenWidth=f;const d=this.getBreakpointBySize(f);this.lastBreakpoint?.breakpoint!==d?.breakpoint&&(this.lastBreakpoint=d,this.resizeCallbacks.forEach(C=>C(d)))}}class qe{copy(r){return navigator.clipboard.writeText(r)}}var ve={exports:{}},Ne=ve.exports,De;function Ke(){return De||(De=1,function(h,r){(function(f,d){d()})(Ne,function(){function f(o,S){return typeof S>"u"?S={autoBom:!1}:typeof S!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),S={autoBom:!S}),S.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(o.type)?new Blob(["\uFEFF",o],{type:o.type}):o}function d(o,S,A){var D=new XMLHttpRequest;D.open("GET",o),D.responseType="blob",D.onload=function(){q(D.response,S,A)},D.onerror=function(){console.error("could not download file")},D.send()}function C(o){var S=new XMLHttpRequest;S.open("HEAD",o,!1);try{S.send()}catch{}return 200<=S.status&&299>=S.status}function $(o){try{o.dispatchEvent(new MouseEvent("click"))}catch{var S=document.createEvent("MouseEvents");S.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),o.dispatchEvent(S)}}var z=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof ge=="object"&&ge.global===ge?ge:void 0,N=z.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),q=z.saveAs||(typeof window!="object"||window!==z?function(){}:"download"in HTMLAnchorElement.prototype&&!N?function(o,S,A){var D=z.URL||z.webkitURL,T=document.createElement("a");S=S||o.name||"download",T.download=S,T.rel="noopener",typeof o=="string"?(T.href=o,T.origin===location.origin?$(T):C(T.href)?d(o,S,A):$(T,T.target="_blank")):(T.href=D.createObjectURL(o),setTimeout(function(){D.revokeObjectURL(T.href)},4e4),setTimeout(function(){$(T)},0))}:"msSaveOrOpenBlob"in navigator?function(o,S,A){if(S=S||o.name||"download",typeof o!="string")navigator.msSaveOrOpenBlob(f(o,A),S);else if(C(o))d(o,S,A);else{var D=document.createElement("a");D.href=o,D.target="_blank",setTimeout(function(){$(D)})}}:function(o,S,A,D){if(D=D||open("","_blank"),D&&(D.document.title=D.document.body.innerText="downloading..."),typeof o=="string")return d(o,S,A);var T=o.type==="application/octet-stream",Q=/constructor/i.test(z.HTMLElement)||z.safari,G=/CriOS\/[\d]+/.test(navigator.userAgent);if((G||T&&Q||N)&&typeof FileReader<"u"){var X=new FileReader;X.onloadend=function(){var Z=X.result;Z=G?Z:Z.replace(/^data:[^;]*;/,"data:attachment/file;"),D?D.location.href=Z:location=Z,D=null},X.readAsDataURL(o)}else{var se=z.URL||z.webkitURL,ae=se.createObjectURL(o);D?D.location=ae:location.href=ae,D=null,setTimeout(function(){se.revokeObjectURL(ae)},4e4)}});z.saveAs=q.saveAs=q,h.exports=q})}(ve)),ve.exports}var Je=Ke(),we={exports:{}};/* @license
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ae=(f,r,h)=>f.localeCompare(r)*(h?1:-1),Te=(f,r)=>f<r?-1:f===r?0:1,Fe=(f,r,h)=>Te(f,r)*(h?1:-1),Ie=(f,r,h)=>{let d=0;return typeof f=="string"&&typeof r=="string"?d=Ae(f,r,h):d=Fe(f,r,h),d},$e=(f,r,h,d)=>{const C=h(f),$=h(r);return Ie(C,$,d)};Array.prototype.groupBy=function(f){return this.reduce((r,h)=>{const d=f(h);return(r[d]=r[d]||[]).push(h),r},{})};Array.prototype.removeBy=function(f,r){return this.filter(h=>f(h)!==r)};Array.prototype.orderBy=function(f,r=!0){return this?.sort((h,d)=>$e(h,d,f,r)),this};Array.prototype.filterBy=function(f){return this.filter(r=>{let h=!1;return f&&r[f]?h=r[f]===f:h=r===f,h})};Array.prototype.distinct=function(f){const r=this;return f?r.filter((d,C,$)=>$.findIndex(z=>f(z,d))===C):r.filter((d,C,$)=>$.indexOf(d)===C)};var ge=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ce(f){return f&&f.__esModule&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f}var me={exports:{}},je=me.exports,Oe;function ze(){return Oe||(Oe=1,function(f,r){(function(h,d){f.exports=d()})(je,function(){var h=1e3,d=6e4,C=36e5,$="millisecond",z="second",N="minute",q="hour",o="day",S="week",A="month",D="quarter",T="year",Q="date",G="Invalid Date",X=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,se=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,ae={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(_){var l=["th","st","nd","rd"],c=_%100;return"["+_+(l[(c-20)%10]||l[c]||l[0])+"]"}},Z=function(_,l,c){var i=String(_);return!i||i.length>=l?_:""+Array(l+1-i.length).join(c)+_},pe={s:Z,z:function(_){var l=-_.utcOffset(),c=Math.abs(l),i=Math.floor(c/60),a=c%60;return(l<=0?"+":"-")+Z(i,2,"0")+":"+Z(a,2,"0")},m:function _(l,c){if(l.date()<c.date())return-_(c,l);var i=12*(c.year()-l.year())+(c.month()-l.month()),a=l.clone().add(i,A),u=c-a<0,y=l.clone().add(i+(u?-1:1),A);return+(-(i+(c-a)/(u?a-y:y-a))||0)},a:function(_){return _<0?Math.ceil(_)||0:Math.floor(_)},p:function(_){return{M:A,y:T,w:S,d:o,D:Q,h:q,m:N,s:z,ms:$,Q:D}[_]||String(_||"").toLowerCase().replace(/s$/,"")},u:function(_){return _===void 0}},oe="en",K={};K[oe]=ae;var F="$isDayjsObject",e=function(_){return _ instanceof m||!(!_||!_[F])},t=function _(l,c,i){var a;if(!l)return oe;if(typeof l=="string"){var u=l.toLowerCase();K[u]&&(a=u),c&&(K[u]=c,a=u);var y=l.split("-");if(!a&&y.length>1)return _(y[0])}else{var g=l.name;K[g]=l,a=g}return!i&&a&&(oe=a),a||!i&&oe},n=function(_,l){if(e(_))return _.clone();var c=typeof l=="object"?l:{};return c.date=_,c.args=arguments,new m(c)},s=pe;s.l=t,s.i=e,s.w=function(_,l){return n(_,{locale:l.$L,utc:l.$u,x:l.$x,$offset:l.$offset})};var m=function(){function _(c){this.$L=t(c.locale,null,!0),this.parse(c),this.$x=this.$x||c.x||{},this[F]=!0}var l=_.prototype;return l.parse=function(c){this.$d=function(i){var a=i.date,u=i.utc;if(a===null)return new Date(NaN);if(s.u(a))return new Date;if(a instanceof Date)return new Date(a);if(typeof a=="string"&&!/Z$/i.test(a)){var y=a.match(X);if(y){var g=y[2]-1||0,v=(y[7]||"0").substring(0,3);return u?new Date(Date.UTC(y[1],g,y[3]||1,y[4]||0,y[5]||0,y[6]||0,v)):new Date(y[1],g,y[3]||1,y[4]||0,y[5]||0,y[6]||0,v)}}return new Date(a)}(c),this.init()},l.init=function(){var c=this.$d;this.$y=c.getFullYear(),this.$M=c.getMonth(),this.$D=c.getDate(),this.$W=c.getDay(),this.$H=c.getHours(),this.$m=c.getMinutes(),this.$s=c.getSeconds(),this.$ms=c.getMilliseconds()},l.$utils=function(){return s},l.isValid=function(){return this.$d.toString()!==G},l.isSame=function(c,i){var a=n(c);return this.startOf(i)<=a&&a<=this.endOf(i)},l.isAfter=function(c,i){return n(c)<this.startOf(i)},l.isBefore=function(c,i){return this.endOf(i)<n(c)},l.$g=function(c,i,a){return s.u(c)?this[i]:this.set(a,c)},l.unix=function(){return Math.floor(this.valueOf()/1e3)},l.valueOf=function(){return this.$d.getTime()},l.startOf=function(c,i){var a=this,u=!!s.u(i)||i,y=s.p(c),g=function(O,x){var w=s.w(a.$u?Date.UTC(a.$y,x,O):new Date(a.$y,x,O),a);return u?w:w.endOf(o)},v=function(O,x){return s.w(a.toDate()[O].apply(a.toDate("s"),(u?[0,0,0,0]:[23,59,59,999]).slice(x)),a)},p=this.$W,M=this.$M,L=this.$D,B="set"+(this.$u?"UTC":"");switch(y){case T:return u?g(1,0):g(31,11);case A:return u?g(1,M):g(0,M+1);case S:var Y=this.$locale().weekStart||0,k=(p<Y?p+7:p)-Y;return g(u?L-k:L+(6-k),M);case o:case Q:return v(B+"Hours",0);case q:return v(B+"Minutes",1);case N:return v(B+"Seconds",2);case z:return v(B+"Milliseconds",3);default:return this.clone()}},l.endOf=function(c){return this.startOf(c,!1)},l.$set=function(c,i){var a,u=s.p(c),y="set"+(this.$u?"UTC":""),g=(a={},a[o]=y+"Date",a[Q]=y+"Date",a[A]=y+"Month",a[T]=y+"FullYear",a[q]=y+"Hours",a[N]=y+"Minutes",a[z]=y+"Seconds",a[$]=y+"Milliseconds",a)[u],v=u===o?this.$D+(i-this.$W):i;if(u===A||u===T){var p=this.clone().set(Q,1);p.$d[g](v),p.init(),this.$d=p.set(Q,Math.min(this.$D,p.daysInMonth())).$d}else g&&this.$d[g](v);return this.init(),this},l.set=function(c,i){return this.clone().$set(c,i)},l.get=function(c){return this[s.p(c)]()},l.add=function(c,i){var a,u=this;c=Number(c);var y=s.p(i),g=function(M){var L=n(u);return s.w(L.date(L.date()+Math.round(M*c)),u)};if(y===A)return this.set(A,this.$M+c);if(y===T)return this.set(T,this.$y+c);if(y===o)return g(1);if(y===S)return g(7);var v=(a={},a[N]=d,a[q]=C,a[z]=h,a)[y]||1,p=this.$d.getTime()+c*v;return s.w(p,this)},l.subtract=function(c,i){return this.add(-1*c,i)},l.format=function(c){var i=this,a=this.$locale();if(!this.isValid())return a.invalidDate||G;var u=c||"YYYY-MM-DDTHH:mm:ssZ",y=s.z(this),g=this.$H,v=this.$m,p=this.$M,M=a.weekdays,L=a.months,B=a.meridiem,Y=function(x,w,I,U){return x&&(x[w]||x(i,u))||I[w].slice(0,U)},k=function(x){return s.s(g%12||12,x,"0")},O=B||function(x,w,I){var U=x<12?"AM":"PM";return I?U.toLowerCase():U};return u.replace(se,function(x,w){return w||function(I){switch(I){case"YY":return String(i.$y).slice(-2);case"YYYY":return s.s(i.$y,4,"0");case"M":return p+1;case"MM":return s.s(p+1,2,"0");case"MMM":return Y(a.monthsShort,p,L,3);case"MMMM":return Y(L,p);case"D":return i.$D;case"DD":return s.s(i.$D,2,"0");case"d":return String(i.$W);case"dd":return Y(a.weekdaysMin,i.$W,M,2);case"ddd":return Y(a.weekdaysShort,i.$W,M,3);case"dddd":return M[i.$W];case"H":return String(g);case"HH":return s.s(g,2,"0");case"h":return k(1);case"hh":return k(2);case"a":return O(g,v,!0);case"A":return O(g,v,!1);case"m":return String(v);case"mm":return s.s(v,2,"0");case"s":return String(i.$s);case"ss":return s.s(i.$s,2,"0");case"SSS":return s.s(i.$ms,3,"0");case"Z":return y}return null}(x)||y.replace(":","")})},l.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},l.diff=function(c,i,a){var u,y=this,g=s.p(i),v=n(c),p=(v.utcOffset()-this.utcOffset())*d,M=this-v,L=function(){return s.m(y,v)};switch(g){case T:u=L()/12;break;case A:u=L();break;case D:u=L()/3;break;case S:u=(M-p)/6048e5;break;case o:u=(M-p)/864e5;break;case q:u=M/C;break;case N:u=M/d;break;case z:u=M/h;break;default:u=M}return a?u:s.a(u)},l.daysInMonth=function(){return this.endOf(A).$D},l.$locale=function(){return K[this.$L]},l.locale=function(c,i){if(!c)return this.$L;var a=this.clone(),u=t(c,i,!0);return u&&(a.$L=u),a},l.clone=function(){return s.w(this.$d,this)},l.toDate=function(){return new Date(this.valueOf())},l.toJSON=function(){return this.isValid()?this.toISOString():null},l.toISOString=function(){return this.$d.toISOString()},l.toString=function(){return this.$d.toUTCString()},_}(),b=m.prototype;return n.prototype=b,[["$ms",$],["$s",z],["$m",N],["$H",q],["$W",o],["$M",A],["$y",T],["$D",Q]].forEach(function(_){b[_[1]]=function(l){return this.$g(l,_[0],_[1])}}),n.extend=function(_,l){return _.$i||(_(l,m,n),_.$i=!0),n},n.locale=t,n.isDayjs=e,n.unix=function(_){return n(1e3*_)},n.en=K[oe],n.Ls=K,n.p={},n})}(me)),me.exports}var We=ze();const te=Ce(We);var _e={exports:{}},Be=_e.exports,xe;function Ue(){return xe||(xe=1,function(f,r){(function(h,d){f.exports=d()})(Be,function(){var h={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(d,C,$){var z=C.prototype,N=z.format;$.en.formats=h,z.format=function(q){q===void 0&&(q="YYYY-MM-DDTHH:mm:ssZ");var o=this.$locale().formats,S=function(A,D){return A.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(T,Q,G){var X=G&&G.toUpperCase();return Q||D[G]||h[G]||D[X].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(se,ae,Z){return ae||Z.slice(1)})})}(q,o===void 0?{}:o);return N.call(this,S)}}})}(_e)),_e.exports}var He=Ue();const Ye=Ce(He);te.extend(Ye);Date.prototype.isAfter=function(f,r){return te(this).isAfter(f,r)};Date.prototype.isBefore=function(f,r){return te(this).isBefore(f,r)};Date.prototype.format=function(f){return te(this).format(f)};Date.prototype.isValid=function(){return te(this).isValid()};Date.prototype.add=function(f,r){return te(this).add(f,r).toDate()};Date.prototype.subtract=function(f,r){return te(this).subtract(f,r).toDate()};Date.prototype.firstDayOfMonth=function(){return te(this).startOf("month").toDate()};Date.prototype.lastDayOfMonth=function(){return te(this).endOf("month").toDate()};Date.prototype.set=function(f,r){return te(this).set(f,r).toDate()};Date.prototype.diff=function(f,r){return te(this).diff(f,r)};String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)};var Le=(f=>(f.opera="opera",f.firefox="firefox",f.safari="safari",f.ie="ie",f.edge="edge",f.edg="edg",f.electron="electron",f.chrome="chrome",f.iOsSafari="iOsSafari",f.edgiOs="edgiOs",f.headlessChrome="headlessChrome",f))(Le||{});const Se=[{breakpoint:"xs",screenWidth:0},{breakpoint:"sm",screenWidth:576},{breakpoint:"md",screenWidth:768},{breakpoint:"lg",screenWidth:992},{breakpoint:"xl",screenWidth:1200},{breakpoint:"xxl",screenWidth:1400},{breakpoint:"xxxl",screenWidth:1600}];class Pe{screenWidth=0;lastBreakpoint;resizeListener;resizeCallbacks=new Set;constructor(){typeof window<"u"&&(this.screenWidth=window.innerWidth,this.resizeListener=this.onResize.bind(this),window.addEventListener("resize",this.resizeListener),this.lastBreakpoint=this.getBreakpointBySize(this.screenWidth))}destroy(){typeof window<"u"&&window.removeEventListener("resize",this.resizeListener),this.resizeCallbacks.clear()}onBreakpointChange(r){this.resizeCallbacks.add(r)}offBreakpointChange(r){this.resizeCallbacks.delete(r)}getCurrentBrowser(){const r=navigator.userAgent.toLowerCase();if(this.isOpera())return"opera";if(this.isFirefox())return"firefox";if(this.isSafari())return"safari";if(this.isIE())return"ie";if(this.isEdge())return"edge";if(this.isEdg())return"edg";if(this.isElectron(r))return"electron";if(this.isChrome())return"chrome";if(this.isIOsSafari(r))return"iOsSafari";if(this.isEdgiOs(r))return"edgiOs";if(this.isHeadlessChrome(r))return"headlessChrome";throw new Error("Browser could not be detected: "+r)}getBreakpointBySize(r=this.screenWidth){let h;for(const d of Se)d.screenWidth<=r&&(h=d);return h}isScreenGreaterThan(r){const h=this.getBreakpoint(r);return this.screenWidth>(h?.screenWidth??0)}isScreenSmallerThan(r){const h=this.getBreakpoint(r);return this.screenWidth<(h?.screenWidth??0)}getBreakpoint(r){return Se.find(h=>h.breakpoint===r)}isOpera(){return typeof window<"u"&&(!!window.opr&&!!window.opr.addons||!!window.opera||navigator.userAgent.includes("OPR/"))}isFirefox(){return typeof InstallTrigger<"u"}isSafari(){return/constructor/i.test(window.HTMLElement)||(r=>r.toString()==="[object SafariRemoteNotification]")(!window.safari||window.safari&&window.safari.pushNotification)}isIE(){return!!document.documentMode}isEdge(){return!this.isIE()&&!!window.StyleMedia}isEdg(){return navigator.userAgent.toLowerCase().includes("edg")}isElectron(r){return r.includes("electron")}isChrome(){return typeof window<"u"&&!!window.chrome&&!this.isOpera()&&!this.isEdge()&&!this.isEdg()&&!this.isFirefox()&&!this.isSafari()&&!this.isIE()}isIOsSafari(r){return r.includes("iphone")||r.includes("ipad")||r.includes("macintosh")&&"ontouchend"in document&&r.includes("safari")}isEdgiOs(r){return r.includes("edgios")}isHeadlessChrome(r){return r.includes("headlesschrome")}onResize(r){const h=r.target.innerWidth;this.screenWidth=h;const d=this.getBreakpointBySize(h);this.lastBreakpoint?.breakpoint!==d?.breakpoint&&(this.lastBreakpoint=d,this.resizeCallbacks.forEach(C=>C(d)))}}class qe{copy(r){return navigator.clipboard.writeText(r)}}var ye={exports:{}},Ne=ye.exports,De;function Ke(){return De||(De=1,function(f,r){(function(h,d){d()})(Ne,function(){function h(o,S){return typeof S>"u"?S={autoBom:!1}:typeof S!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),S={autoBom:!S}),S.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(o.type)?new Blob(["\uFEFF",o],{type:o.type}):o}function d(o,S,A){var D=new XMLHttpRequest;D.open("GET",o),D.responseType="blob",D.onload=function(){q(D.response,S,A)},D.onerror=function(){console.error("could not download file")},D.send()}function C(o){var S=new XMLHttpRequest;S.open("HEAD",o,!1);try{S.send()}catch{}return 200<=S.status&&299>=S.status}function $(o){try{o.dispatchEvent(new MouseEvent("click"))}catch{var S=document.createEvent("MouseEvents");S.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),o.dispatchEvent(S)}}var z=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof ge=="object"&&ge.global===ge?ge:void 0,N=z.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),q=z.saveAs||(typeof window!="object"||window!==z?function(){}:"download"in HTMLAnchorElement.prototype&&!N?function(o,S,A){var D=z.URL||z.webkitURL,T=document.createElement("a");S=S||o.name||"download",T.download=S,T.rel="noopener",typeof o=="string"?(T.href=o,T.origin===location.origin?$(T):C(T.href)?d(o,S,A):$(T,T.target="_blank")):(T.href=D.createObjectURL(o),setTimeout(function(){D.revokeObjectURL(T.href)},4e4),setTimeout(function(){$(T)},0))}:"msSaveOrOpenBlob"in navigator?function(o,S,A){if(S=S||o.name||"download",typeof o!="string")navigator.msSaveOrOpenBlob(h(o,A),S);else if(C(o))d(o,S,A);else{var D=document.createElement("a");D.href=o,D.target="_blank",setTimeout(function(){$(D)})}}:function(o,S,A,D){if(D=D||open("","_blank"),D&&(D.document.title=D.document.body.innerText="downloading..."),typeof o=="string")return d(o,S,A);var T=o.type==="application/octet-stream",Q=/constructor/i.test(z.HTMLElement)||z.safari,G=/CriOS\/[\d]+/.test(navigator.userAgent);if((G||T&&Q||N)&&typeof FileReader<"u"){var X=new FileReader;X.onloadend=function(){var Z=X.result;Z=G?Z:Z.replace(/^data:[^;]*;/,"data:attachment/file;"),D?D.location.href=Z:location=Z,D=null},X.readAsDataURL(o)}else{var se=z.URL||z.webkitURL,ae=se.createObjectURL(o);D?D.location=ae:location.href=ae,D=null,setTimeout(function(){se.revokeObjectURL(ae)},4e4)}});z.saveAs=q.saveAs=q,f.exports=q})}(ye)),ye.exports}var Je=Ke(),ve={exports:{}};/* @license
2
2
  Papa Parse
3
3
  v5.5.3
4
4
  https://github.com/mholt/PapaParse
5
5
  License: MIT
6
- */var Qe=we.exports,Me;function Ze(){return Me||(Me=1,function(h,r){((f,d)=>{h.exports=d()})(Qe,function f(){var d=typeof self<"u"?self:typeof window<"u"?window:d!==void 0?d:{},C,$=!d.document&&!!d.postMessage,z=d.IS_PAPA_WORKER||!1,N={},q=0,o={};function S(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(t){var n=oe(t);n.chunkSize=parseInt(n.chunkSize),t.step||t.chunk||(n.chunkSize=null),this._handle=new G(n),(this._handle.streamer=this)._config=n}).call(this,e),this.parseChunk=function(t,n){var s=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<s){let b=this._config.newline;b||(m=this._config.quoteChar||'"',b=this._handle.guessLineEndings(t,m)),t=[...t.split(b).slice(s)].join(b)}this.isFirstChunk&&F(this._config.beforeFirstChunk)&&(m=this._config.beforeFirstChunk(t))!==void 0&&(t=m),this.isFirstChunk=!1,this._halted=!1;var s=this._partialLine+t,m=(this._partialLine="",this._handle.parse(s,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(t=m.meta.cursor,s=(this._finished||(this._partialLine=s.substring(t-this._baseIndex),this._baseIndex=t),m&&m.data&&(this._rowCount+=m.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),z)d.postMessage({results:m,workerId:o.WORKER_ID,finished:s});else if(F(this._config.chunk)&&!n){if(this._config.chunk(m,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=m=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(m.data),this._completeResults.errors=this._completeResults.errors.concat(m.errors),this._completeResults.meta=m.meta),this._completed||!s||!F(this._config.complete)||m&&m.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),s||m&&m.meta.paused||this._nextChunk(),m}this._halted=!0},this._sendError=function(t){F(this._config.error)?this._config.error(t):z&&this._config.error&&d.postMessage({workerId:o.WORKER_ID,error:t,finished:!1})}}function A(e){var t;(e=e||{}).chunkSize||(e.chunkSize=o.RemoteChunkSize),S.call(this,e),this._nextChunk=$?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(n){this._input=n,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),$||(t.onload=K(this._chunkLoaded,this),t.onerror=K(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!$),this._config.downloadRequestHeaders){var n,s=this._config.downloadRequestHeaders;for(n in s)t.setRequestHeader(n,s[n])}var m;this._config.chunkSize&&(m=this._start+this._config.chunkSize-1,t.setRequestHeader("Range","bytes="+this._start+"-"+m));try{t.send(this._config.downloadRequestBody)}catch(b){this._chunkError(b.message)}$&&t.status===0&&this._chunkError()}},this._chunkLoaded=function(){t.readyState===4&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize||t.responseText.length,this._finished=!this._config.chunkSize||this._start>=(n=>(n=n.getResponseHeader("Content-Range"))!==null?parseInt(n.substring(n.lastIndexOf("/")+1)):-1)(t),this.parseChunk(t.responseText)))},this._chunkError=function(n){n=t.statusText||n,this._sendError(new Error(n))}}function D(e){(e=e||{}).chunkSize||(e.chunkSize=o.LocalChunkSize),S.call(this,e);var t,n,s=typeof FileReader<"u";this.stream=function(m){this._input=m,n=m.slice||m.webkitSlice||m.mozSlice,s?((t=new FileReader).onload=K(this._chunkLoaded,this),t.onerror=K(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var m=this._input,b=(this._config.chunkSize&&(b=Math.min(this._start+this._config.chunkSize,this._input.size),m=n.call(m,this._start,b)),t.readAsText(m,this._config.encoding));s||this._chunkLoaded({target:{result:b}})},this._chunkLoaded=function(m){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(m.target.result)},this._chunkError=function(){this._sendError(t.error)}}function T(e){var t;S.call(this,e=e||{}),this.stream=function(n){return t=n,this._nextChunk()},this._nextChunk=function(){var n,s;if(!this._finished)return n=this._config.chunkSize,t=n?(s=t.substring(0,n),t.substring(n)):(s=t,""),this._finished=!t,this.parseChunk(s)}}function Q(e){S.call(this,e=e||{});var t=[],n=!0,s=!1;this.pause=function(){S.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){S.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(m){this._input=m,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){s&&t.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=K(function(m){try{t.push(typeof m=="string"?m:m.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(b){this._streamError(b)}},this),this._streamError=K(function(m){this._streamCleanUp(),this._sendError(m)},this),this._streamEnd=K(function(){this._streamCleanUp(),s=!0,this._streamData("")},this),this._streamCleanUp=K(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function G(e){var t,n,s,m,b=Math.pow(2,53),_=-b,l=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,c=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,i=this,a=0,u=0,y=!1,g=!1,v=[],p={data:[],errors:[],meta:{}};function M(k){return e.skipEmptyLines==="greedy"?k.join("").trim()==="":k.length===1&&k[0].length===0}function L(){if(p&&s&&(Y("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),s=!1),e.skipEmptyLines&&(p.data=p.data.filter(function(w){return!M(w)})),B()){let w=function(I,U){F(e.transformHeader)&&(I=e.transformHeader(I,U)),v.push(I)};if(p)if(Array.isArray(p.data[0])){for(var k=0;B()&&k<p.data.length;k++)p.data[k].forEach(w);p.data.splice(0,1)}else p.data.forEach(w)}function O(w,I){for(var U=e.header?{}:[],j=0;j<w.length;j++){var W=j,R=w[j],R=((ee,E)=>(H=>(e.dynamicTypingFunction&&e.dynamicTyping[H]===void 0&&(e.dynamicTyping[H]=e.dynamicTypingFunction(H)),(e.dynamicTyping[H]||e.dynamicTyping)===!0))(ee)?E==="true"||E==="TRUE"||E!=="false"&&E!=="FALSE"&&((H=>{if(l.test(H)&&(H=parseFloat(H),_<H&&H<b))return 1})(E)?parseFloat(E):c.test(E)?new Date(E):E===""?null:E):E)(W=e.header?j>=v.length?"__parsed_extra":v[j]:W,R=e.transform?e.transform(R,W):R);W==="__parsed_extra"?(U[W]=U[W]||[],U[W].push(R)):U[W]=R}return e.header&&(j>v.length?Y("FieldMismatch","TooManyFields","Too many fields: expected "+v.length+" fields but parsed "+j,u+I):j<v.length&&Y("FieldMismatch","TooFewFields","Too few fields: expected "+v.length+" fields but parsed "+j,u+I)),U}var x;p&&(e.header||e.dynamicTyping||e.transform)&&(x=1,!p.data.length||Array.isArray(p.data[0])?(p.data=p.data.map(O),x=p.data.length):p.data=O(p.data,0),e.header&&p.meta&&(p.meta.fields=v),u+=x)}function B(){return e.header&&v.length===0}function Y(k,O,x,w){k={type:k,code:O,message:x},w!==void 0&&(k.row=w),p.errors.push(k)}F(e.step)&&(m=e.step,e.step=function(k){p=k,B()?L():(L(),p.data.length!==0&&(a+=k.data.length,e.preview&&a>e.preview?n.abort():(p.data=p.data[0],m(p,i))))}),this.parse=function(k,O,x){var w=e.quoteChar||'"',w=(e.newline||(e.newline=this.guessLineEndings(k,w)),s=!1,e.delimiter?F(e.delimiter)&&(e.delimiter=e.delimiter(k),p.meta.delimiter=e.delimiter):((w=((I,U,j,W,R)=>{var ee,E,H,ce;R=R||[","," ","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var he=0;he<R.length;he++){for(var re,le=R[he],J=0,ne=0,P=0,V=(H=void 0,new se({comments:W,delimiter:le,newline:U,preview:10}).parse(I)),ue=0;ue<V.data.length;ue++)j&&M(V.data[ue])?P++:(re=V.data[ue].length,ne+=re,H===void 0?H=re:0<re&&(J+=Math.abs(re-H),H=re));0<V.data.length&&(ne/=V.data.length-P),(E===void 0||J<=E)&&(ce===void 0||ce<ne)&&1.99<ne&&(E=J,ee=le,ce=ne)}return{successful:!!(e.delimiter=ee),bestDelimiter:ee}})(k,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess)).successful?e.delimiter=w.bestDelimiter:(s=!0,e.delimiter=o.DefaultDelimiter),p.meta.delimiter=e.delimiter),oe(e));return e.preview&&e.header&&w.preview++,t=k,n=new se(w),p=n.parse(t,O,x),L(),y?{meta:{paused:!0}}:p||{meta:{paused:!1}}},this.paused=function(){return y},this.pause=function(){y=!0,n.abort(),t=F(e.chunk)?"":t.substring(n.getCharIndex())},this.resume=function(){i.streamer._halted?(y=!1,i.streamer.parseChunk(t,!0)):setTimeout(i.resume,3)},this.aborted=function(){return g},this.abort=function(){g=!0,n.abort(),p.meta.aborted=!0,F(e.complete)&&e.complete(p),t=""},this.guessLineEndings=function(I,w){I=I.substring(0,1048576);var w=new RegExp(X(w)+"([^]*?)"+X(w),"gm"),x=(I=I.replace(w,"")).split("\r"),w=I.split(`
6
+ */var Qe=ve.exports,Me;function Ze(){return Me||(Me=1,function(f,r){((h,d)=>{f.exports=d()})(Qe,function h(){var d=typeof self<"u"?self:typeof window<"u"?window:d!==void 0?d:{},C,$=!d.document&&!!d.postMessage,z=d.IS_PAPA_WORKER||!1,N={},q=0,o={};function S(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(t){var n=oe(t);n.chunkSize=parseInt(n.chunkSize),t.step||t.chunk||(n.chunkSize=null),this._handle=new G(n),(this._handle.streamer=this)._config=n}).call(this,e),this.parseChunk=function(t,n){var s=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<s){let b=this._config.newline;b||(m=this._config.quoteChar||'"',b=this._handle.guessLineEndings(t,m)),t=[...t.split(b).slice(s)].join(b)}this.isFirstChunk&&F(this._config.beforeFirstChunk)&&(m=this._config.beforeFirstChunk(t))!==void 0&&(t=m),this.isFirstChunk=!1,this._halted=!1;var s=this._partialLine+t,m=(this._partialLine="",this._handle.parse(s,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(t=m.meta.cursor,s=(this._finished||(this._partialLine=s.substring(t-this._baseIndex),this._baseIndex=t),m&&m.data&&(this._rowCount+=m.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),z)d.postMessage({results:m,workerId:o.WORKER_ID,finished:s});else if(F(this._config.chunk)&&!n){if(this._config.chunk(m,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=m=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(m.data),this._completeResults.errors=this._completeResults.errors.concat(m.errors),this._completeResults.meta=m.meta),this._completed||!s||!F(this._config.complete)||m&&m.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),s||m&&m.meta.paused||this._nextChunk(),m}this._halted=!0},this._sendError=function(t){F(this._config.error)?this._config.error(t):z&&this._config.error&&d.postMessage({workerId:o.WORKER_ID,error:t,finished:!1})}}function A(e){var t;(e=e||{}).chunkSize||(e.chunkSize=o.RemoteChunkSize),S.call(this,e),this._nextChunk=$?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(n){this._input=n,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),$||(t.onload=K(this._chunkLoaded,this),t.onerror=K(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!$),this._config.downloadRequestHeaders){var n,s=this._config.downloadRequestHeaders;for(n in s)t.setRequestHeader(n,s[n])}var m;this._config.chunkSize&&(m=this._start+this._config.chunkSize-1,t.setRequestHeader("Range","bytes="+this._start+"-"+m));try{t.send(this._config.downloadRequestBody)}catch(b){this._chunkError(b.message)}$&&t.status===0&&this._chunkError()}},this._chunkLoaded=function(){t.readyState===4&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize||t.responseText.length,this._finished=!this._config.chunkSize||this._start>=(n=>(n=n.getResponseHeader("Content-Range"))!==null?parseInt(n.substring(n.lastIndexOf("/")+1)):-1)(t),this.parseChunk(t.responseText)))},this._chunkError=function(n){n=t.statusText||n,this._sendError(new Error(n))}}function D(e){(e=e||{}).chunkSize||(e.chunkSize=o.LocalChunkSize),S.call(this,e);var t,n,s=typeof FileReader<"u";this.stream=function(m){this._input=m,n=m.slice||m.webkitSlice||m.mozSlice,s?((t=new FileReader).onload=K(this._chunkLoaded,this),t.onerror=K(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var m=this._input,b=(this._config.chunkSize&&(b=Math.min(this._start+this._config.chunkSize,this._input.size),m=n.call(m,this._start,b)),t.readAsText(m,this._config.encoding));s||this._chunkLoaded({target:{result:b}})},this._chunkLoaded=function(m){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(m.target.result)},this._chunkError=function(){this._sendError(t.error)}}function T(e){var t;S.call(this,e=e||{}),this.stream=function(n){return t=n,this._nextChunk()},this._nextChunk=function(){var n,s;if(!this._finished)return n=this._config.chunkSize,t=n?(s=t.substring(0,n),t.substring(n)):(s=t,""),this._finished=!t,this.parseChunk(s)}}function Q(e){S.call(this,e=e||{});var t=[],n=!0,s=!1;this.pause=function(){S.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){S.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(m){this._input=m,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){s&&t.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=K(function(m){try{t.push(typeof m=="string"?m:m.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(b){this._streamError(b)}},this),this._streamError=K(function(m){this._streamCleanUp(),this._sendError(m)},this),this._streamEnd=K(function(){this._streamCleanUp(),s=!0,this._streamData("")},this),this._streamCleanUp=K(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function G(e){var t,n,s,m,b=Math.pow(2,53),_=-b,l=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,c=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,i=this,a=0,u=0,y=!1,g=!1,v=[],p={data:[],errors:[],meta:{}};function M(k){return e.skipEmptyLines==="greedy"?k.join("").trim()==="":k.length===1&&k[0].length===0}function L(){if(p&&s&&(Y("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),s=!1),e.skipEmptyLines&&(p.data=p.data.filter(function(w){return!M(w)})),B()){let w=function(I,U){F(e.transformHeader)&&(I=e.transformHeader(I,U)),v.push(I)};if(p)if(Array.isArray(p.data[0])){for(var k=0;B()&&k<p.data.length;k++)p.data[k].forEach(w);p.data.splice(0,1)}else p.data.forEach(w)}function O(w,I){for(var U=e.header?{}:[],j=0;j<w.length;j++){var W=j,R=w[j],R=((ee,E)=>(H=>(e.dynamicTypingFunction&&e.dynamicTyping[H]===void 0&&(e.dynamicTyping[H]=e.dynamicTypingFunction(H)),(e.dynamicTyping[H]||e.dynamicTyping)===!0))(ee)?E==="true"||E==="TRUE"||E!=="false"&&E!=="FALSE"&&((H=>{if(l.test(H)&&(H=parseFloat(H),_<H&&H<b))return 1})(E)?parseFloat(E):c.test(E)?new Date(E):E===""?null:E):E)(W=e.header?j>=v.length?"__parsed_extra":v[j]:W,R=e.transform?e.transform(R,W):R);W==="__parsed_extra"?(U[W]=U[W]||[],U[W].push(R)):U[W]=R}return e.header&&(j>v.length?Y("FieldMismatch","TooManyFields","Too many fields: expected "+v.length+" fields but parsed "+j,u+I):j<v.length&&Y("FieldMismatch","TooFewFields","Too few fields: expected "+v.length+" fields but parsed "+j,u+I)),U}var x;p&&(e.header||e.dynamicTyping||e.transform)&&(x=1,!p.data.length||Array.isArray(p.data[0])?(p.data=p.data.map(O),x=p.data.length):p.data=O(p.data,0),e.header&&p.meta&&(p.meta.fields=v),u+=x)}function B(){return e.header&&v.length===0}function Y(k,O,x,w){k={type:k,code:O,message:x},w!==void 0&&(k.row=w),p.errors.push(k)}F(e.step)&&(m=e.step,e.step=function(k){p=k,B()?L():(L(),p.data.length!==0&&(a+=k.data.length,e.preview&&a>e.preview?n.abort():(p.data=p.data[0],m(p,i))))}),this.parse=function(k,O,x){var w=e.quoteChar||'"',w=(e.newline||(e.newline=this.guessLineEndings(k,w)),s=!1,e.delimiter?F(e.delimiter)&&(e.delimiter=e.delimiter(k),p.meta.delimiter=e.delimiter):((w=((I,U,j,W,R)=>{var ee,E,H,ce;R=R||[","," ","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var he=0;he<R.length;he++){for(var re,le=R[he],J=0,ne=0,P=0,V=(H=void 0,new se({comments:W,delimiter:le,newline:U,preview:10}).parse(I)),ue=0;ue<V.data.length;ue++)j&&M(V.data[ue])?P++:(re=V.data[ue].length,ne+=re,H===void 0?H=re:0<re&&(J+=Math.abs(re-H),H=re));0<V.data.length&&(ne/=V.data.length-P),(E===void 0||J<=E)&&(ce===void 0||ce<ne)&&1.99<ne&&(E=J,ee=le,ce=ne)}return{successful:!!(e.delimiter=ee),bestDelimiter:ee}})(k,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess)).successful?e.delimiter=w.bestDelimiter:(s=!0,e.delimiter=o.DefaultDelimiter),p.meta.delimiter=e.delimiter),oe(e));return e.preview&&e.header&&w.preview++,t=k,n=new se(w),p=n.parse(t,O,x),L(),y?{meta:{paused:!0}}:p||{meta:{paused:!1}}},this.paused=function(){return y},this.pause=function(){y=!0,n.abort(),t=F(e.chunk)?"":t.substring(n.getCharIndex())},this.resume=function(){i.streamer._halted?(y=!1,i.streamer.parseChunk(t,!0)):setTimeout(i.resume,3)},this.aborted=function(){return g},this.abort=function(){g=!0,n.abort(),p.meta.aborted=!0,F(e.complete)&&e.complete(p),t=""},this.guessLineEndings=function(I,w){I=I.substring(0,1048576);var w=new RegExp(X(w)+"([^]*?)"+X(w),"gm"),x=(I=I.replace(w,"")).split("\r"),w=I.split(`
7
7
  `),I=1<w.length&&w[0].length<x[0].length;if(x.length===1||I)return`
8
8
  `;for(var U=0,j=0;j<x.length;j++)x[j][0]===`
9
9
  `&&U++;return U>=x.length/2?`\r
10
10
  `:"\r"}}function X(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function se(e){var t=(e=e||{}).delimiter,n=e.newline,s=e.comments,m=e.step,b=e.preview,_=e.fastMode,l=null,c=!1,i=e.quoteChar==null?'"':e.quoteChar,a=i;if(e.escapeChar!==void 0&&(a=e.escapeChar),(typeof t!="string"||-1<o.BAD_DELIMITERS.indexOf(t))&&(t=","),s===t)throw new Error("Comment character same as delimiter");s===!0?s="#":(typeof s!="string"||-1<o.BAD_DELIMITERS.indexOf(s))&&(s=!1),n!==`
11
11
  `&&n!=="\r"&&n!==`\r
12
12
  `&&(n=`
13
- `);var u=0,y=!1;this.parse=function(g,v,p){if(typeof g!="string")throw new Error("Input must be a string");var M=g.length,L=t.length,B=n.length,Y=s.length,k=F(m),O=[],x=[],w=[],I=u=0;if(!g)return J();if(_||_!==!1&&g.indexOf(i)===-1){for(var U=g.split(n),j=0;j<U.length;j++){if(w=U[j],u+=w.length,j!==U.length-1)u+=n.length;else if(p)return J();if(!s||w.substring(0,Y)!==s){if(k){if(O=[],ce(w.split(t)),ne(),y)return J()}else ce(w.split(t));if(b&&b<=j)return O=O.slice(0,b),J(!0)}}return J()}for(var W=g.indexOf(t,u),R=g.indexOf(n,u),ee=new RegExp(X(a)+X(i),"g"),E=g.indexOf(i,u);;)if(g[u]===i)for(E=u,u++;;){if((E=g.indexOf(i,E+1))===-1)return p||x.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:O.length,index:u}),re();if(E===M-1)return re(g.substring(u,E).replace(ee,i));if(i===a&&g[E+1]===a)E++;else if(i===a||E===0||g[E-1]!==a){W!==-1&&W<E+1&&(W=g.indexOf(t,E+1));var H=he((R=R!==-1&&R<E+1?g.indexOf(n,E+1):R)===-1?W:Math.min(W,R));if(g.substr(E+1+H,L)===t){w.push(g.substring(u,E).replace(ee,i)),g[u=E+1+H+L]!==i&&(E=g.indexOf(i,u)),W=g.indexOf(t,u),R=g.indexOf(n,u);break}if(H=he(R),g.substring(E+1+H,E+1+H+B)===n){if(w.push(g.substring(u,E).replace(ee,i)),le(E+1+H+B),W=g.indexOf(t,u),E=g.indexOf(i,u),k&&(ne(),y))return J();if(b&&O.length>=b)return J(!0);break}x.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:O.length,index:u}),E++}}else if(s&&w.length===0&&g.substring(u,u+Y)===s){if(R===-1)return J();u=R+B,R=g.indexOf(n,u),W=g.indexOf(t,u)}else if(W!==-1&&(W<R||R===-1))w.push(g.substring(u,W)),u=W+L,W=g.indexOf(t,u);else{if(R===-1)break;if(w.push(g.substring(u,R)),le(R+B),k&&(ne(),y))return J();if(b&&O.length>=b)return J(!0)}return re();function ce(P){O.push(P),I=u}function he(P){var V=0;return V=P!==-1&&(P=g.substring(E+1,P))&&P.trim()===""?P.length:V}function re(P){return p||(P===void 0&&(P=g.substring(u)),w.push(P),u=M,ce(w),k&&ne()),J()}function le(P){u=P,ce(w),w=[],R=g.indexOf(n,u)}function J(P){if(e.header&&!v&&O.length&&!c){var V=O[0],ue=Object.create(null),Se=new Set(V);let be=!1;for(let fe=0;fe<V.length;fe++){let ie=V[fe];if(ue[ie=F(e.transformHeader)?e.transformHeader(ie,fe):ie]){let de,Ee=ue[ie];for(;de=ie+"_"+Ee,Ee++,Se.has(de););Se.add(de),V[fe]=de,ue[ie]++,be=!0,(l=l===null?{}:l)[de]=ie}else ue[ie]=1,V[fe]=ie;Se.add(ie)}be&&console.warn("Duplicate headers found and renamed."),c=!0}return{data:O,errors:x,meta:{delimiter:t,linebreak:n,aborted:y,truncated:!!P,cursor:I+(v||0),renamedHeaders:l}}}function ne(){m(J()),O=[],x=[]}},this.abort=function(){y=!0},this.getCharIndex=function(){return u}}function ae(e){var t=e.data,n=N[t.workerId],s=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var m={abort:function(){s=!0,Z(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:pe,resume:pe};if(F(n.userStep)){for(var b=0;b<t.results.data.length&&(n.userStep({data:t.results.data[b],errors:t.results.errors,meta:t.results.meta},m),!s);b++);delete t.results}else F(n.userChunk)&&(n.userChunk(t.results,m,t.file),delete t.results)}t.finished&&!s&&Z(t.workerId,t.results)}function Z(e,t){var n=N[e];F(n.userComplete)&&n.userComplete(t),n.terminate(),delete N[e]}function pe(){throw new Error("Not implemented.")}function oe(e){if(typeof e!="object"||e===null)return e;var t,n=Array.isArray(e)?[]:{};for(t in e)n[t]=oe(e[t]);return n}function K(e,t){return function(){e.apply(t,arguments)}}function F(e){return typeof e=="function"}return o.parse=function(e,t){var n=(t=t||{}).dynamicTyping||!1;if(F(n)&&(t.dynamicTypingFunction=n,n={}),t.dynamicTyping=n,t.transform=!!F(t.transform)&&t.transform,!t.worker||!o.WORKERS_SUPPORTED)return n=null,o.NODE_STREAM_INPUT,typeof e=="string"?(e=(s=>s.charCodeAt(0)!==65279?s:s.slice(1))(e),n=new(t.download?A:T)(t)):e.readable===!0&&F(e.read)&&F(e.on)?n=new Q(t):(d.File&&e instanceof File||e instanceof Object)&&(n=new D(t)),n.stream(e);(n=(()=>{var s;return!!o.WORKERS_SUPPORTED&&(s=(()=>{var m=d.URL||d.webkitURL||null,b=f.toString();return o.BLOB_URL||(o.BLOB_URL=m.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",b,")();"],{type:"text/javascript"})))})(),(s=new d.Worker(s)).onmessage=ae,s.id=q++,N[s.id]=s)})()).userStep=t.step,n.userChunk=t.chunk,n.userComplete=t.complete,n.userError=t.error,t.step=F(t.step),t.chunk=F(t.chunk),t.complete=F(t.complete),t.error=F(t.error),delete t.worker,n.postMessage({input:e,config:t,workerId:n.id})},o.unparse=function(e,t){var n=!1,s=!0,m=",",b=`\r
13
+ `);var u=0,y=!1;this.parse=function(g,v,p){if(typeof g!="string")throw new Error("Input must be a string");var M=g.length,L=t.length,B=n.length,Y=s.length,k=F(m),O=[],x=[],w=[],I=u=0;if(!g)return J();if(_||_!==!1&&g.indexOf(i)===-1){for(var U=g.split(n),j=0;j<U.length;j++){if(w=U[j],u+=w.length,j!==U.length-1)u+=n.length;else if(p)return J();if(!s||w.substring(0,Y)!==s){if(k){if(O=[],ce(w.split(t)),ne(),y)return J()}else ce(w.split(t));if(b&&b<=j)return O=O.slice(0,b),J(!0)}}return J()}for(var W=g.indexOf(t,u),R=g.indexOf(n,u),ee=new RegExp(X(a)+X(i),"g"),E=g.indexOf(i,u);;)if(g[u]===i)for(E=u,u++;;){if((E=g.indexOf(i,E+1))===-1)return p||x.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:O.length,index:u}),re();if(E===M-1)return re(g.substring(u,E).replace(ee,i));if(i===a&&g[E+1]===a)E++;else if(i===a||E===0||g[E-1]!==a){W!==-1&&W<E+1&&(W=g.indexOf(t,E+1));var H=he((R=R!==-1&&R<E+1?g.indexOf(n,E+1):R)===-1?W:Math.min(W,R));if(g.substr(E+1+H,L)===t){w.push(g.substring(u,E).replace(ee,i)),g[u=E+1+H+L]!==i&&(E=g.indexOf(i,u)),W=g.indexOf(t,u),R=g.indexOf(n,u);break}if(H=he(R),g.substring(E+1+H,E+1+H+B)===n){if(w.push(g.substring(u,E).replace(ee,i)),le(E+1+H+B),W=g.indexOf(t,u),E=g.indexOf(i,u),k&&(ne(),y))return J();if(b&&O.length>=b)return J(!0);break}x.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:O.length,index:u}),E++}}else if(s&&w.length===0&&g.substring(u,u+Y)===s){if(R===-1)return J();u=R+B,R=g.indexOf(n,u),W=g.indexOf(t,u)}else if(W!==-1&&(W<R||R===-1))w.push(g.substring(u,W)),u=W+L,W=g.indexOf(t,u);else{if(R===-1)break;if(w.push(g.substring(u,R)),le(R+B),k&&(ne(),y))return J();if(b&&O.length>=b)return J(!0)}return re();function ce(P){O.push(P),I=u}function he(P){var V=0;return V=P!==-1&&(P=g.substring(E+1,P))&&P.trim()===""?P.length:V}function re(P){return p||(P===void 0&&(P=g.substring(u)),w.push(P),u=M,ce(w),k&&ne()),J()}function le(P){u=P,ce(w),w=[],R=g.indexOf(n,u)}function J(P){if(e.header&&!v&&O.length&&!c){var V=O[0],ue=Object.create(null),we=new Set(V);let be=!1;for(let fe=0;fe<V.length;fe++){let ie=V[fe];if(ue[ie=F(e.transformHeader)?e.transformHeader(ie,fe):ie]){let de,Ee=ue[ie];for(;de=ie+"_"+Ee,Ee++,we.has(de););we.add(de),V[fe]=de,ue[ie]++,be=!0,(l=l===null?{}:l)[de]=ie}else ue[ie]=1,V[fe]=ie;we.add(ie)}be&&console.warn("Duplicate headers found and renamed."),c=!0}return{data:O,errors:x,meta:{delimiter:t,linebreak:n,aborted:y,truncated:!!P,cursor:I+(v||0),renamedHeaders:l}}}function ne(){m(J()),O=[],x=[]}},this.abort=function(){y=!0},this.getCharIndex=function(){return u}}function ae(e){var t=e.data,n=N[t.workerId],s=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var m={abort:function(){s=!0,Z(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:pe,resume:pe};if(F(n.userStep)){for(var b=0;b<t.results.data.length&&(n.userStep({data:t.results.data[b],errors:t.results.errors,meta:t.results.meta},m),!s);b++);delete t.results}else F(n.userChunk)&&(n.userChunk(t.results,m,t.file),delete t.results)}t.finished&&!s&&Z(t.workerId,t.results)}function Z(e,t){var n=N[e];F(n.userComplete)&&n.userComplete(t),n.terminate(),delete N[e]}function pe(){throw new Error("Not implemented.")}function oe(e){if(typeof e!="object"||e===null)return e;var t,n=Array.isArray(e)?[]:{};for(t in e)n[t]=oe(e[t]);return n}function K(e,t){return function(){e.apply(t,arguments)}}function F(e){return typeof e=="function"}return o.parse=function(e,t){var n=(t=t||{}).dynamicTyping||!1;if(F(n)&&(t.dynamicTypingFunction=n,n={}),t.dynamicTyping=n,t.transform=!!F(t.transform)&&t.transform,!t.worker||!o.WORKERS_SUPPORTED)return n=null,o.NODE_STREAM_INPUT,typeof e=="string"?(e=(s=>s.charCodeAt(0)!==65279?s:s.slice(1))(e),n=new(t.download?A:T)(t)):e.readable===!0&&F(e.read)&&F(e.on)?n=new Q(t):(d.File&&e instanceof File||e instanceof Object)&&(n=new D(t)),n.stream(e);(n=(()=>{var s;return!!o.WORKERS_SUPPORTED&&(s=(()=>{var m=d.URL||d.webkitURL||null,b=h.toString();return o.BLOB_URL||(o.BLOB_URL=m.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",b,")();"],{type:"text/javascript"})))})(),(s=new d.Worker(s)).onmessage=ae,s.id=q++,N[s.id]=s)})()).userStep=t.step,n.userChunk=t.chunk,n.userComplete=t.complete,n.userError=t.error,t.step=F(t.step),t.chunk=F(t.chunk),t.complete=F(t.complete),t.error=F(t.error),delete t.worker,n.postMessage({input:e,config:t,workerId:n.id})},o.unparse=function(e,t){var n=!1,s=!0,m=",",b=`\r
14
14
  `,_='"',l=_+_,c=!1,i=null,a=!1,u=((()=>{if(typeof t=="object"){if(typeof t.delimiter!="string"||o.BAD_DELIMITERS.filter(function(v){return t.delimiter.indexOf(v)!==-1}).length||(m=t.delimiter),typeof t.quotes!="boolean"&&typeof t.quotes!="function"&&!Array.isArray(t.quotes)||(n=t.quotes),typeof t.skipEmptyLines!="boolean"&&typeof t.skipEmptyLines!="string"||(c=t.skipEmptyLines),typeof t.newline=="string"&&(b=t.newline),typeof t.quoteChar=="string"&&(_=t.quoteChar),typeof t.header=="boolean"&&(s=t.header),Array.isArray(t.columns)){if(t.columns.length===0)throw new Error("Option columns is empty");i=t.columns}t.escapeChar!==void 0&&(l=t.escapeChar+_),t.escapeFormulae instanceof RegExp?a=t.escapeFormulae:typeof t.escapeFormulae=="boolean"&&t.escapeFormulae&&(a=/^[=+\-@\t\r].*$/)}})(),new RegExp(X(_),"g"));if(typeof e=="string"&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return y(null,e,c);if(typeof e[0]=="object")return y(i||Object.keys(e[0]),e,c)}else if(typeof e=="object")return typeof e.data=="string"&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||i),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:typeof e.data[0]=="object"?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||typeof e.data[0]=="object"||(e.data=[e.data])),y(e.fields||[],e.data||[],c);throw new Error("Unable to serialize unrecognized input");function y(v,p,M){var L="",B=(typeof v=="string"&&(v=JSON.parse(v)),typeof p=="string"&&(p=JSON.parse(p)),Array.isArray(v)&&0<v.length),Y=!Array.isArray(p[0]);if(B&&s){for(var k=0;k<v.length;k++)0<k&&(L+=m),L+=g(v[k],k);0<p.length&&(L+=b)}for(var O=0;O<p.length;O++){var x=(B?v:p[O]).length,w=!1,I=B?Object.keys(p[O]).length===0:p[O].length===0;if(M&&!B&&(w=M==="greedy"?p[O].join("").trim()==="":p[O].length===1&&p[O][0].length===0),M==="greedy"&&B){for(var U=[],j=0;j<x;j++){var W=Y?v[j]:j;U.push(p[O][W])}w=U.join("").trim()===""}if(!w){for(var R=0;R<x;R++){0<R&&!I&&(L+=m);var ee=B&&Y?v[R]:R;L+=g(p[O][ee],R)}O<p.length-1&&(!M||0<x&&!I)&&(L+=b)}}return L}function g(v,p){var M,L;return v==null?"":v.constructor===Date?JSON.stringify(v).slice(1,25):(L=!1,a&&typeof v=="string"&&a.test(v)&&(v="'"+v,L=!0),M=v.toString().replace(u,l),(L=L||n===!0||typeof n=="function"&&n(v,p)||Array.isArray(n)&&n[p]||((B,Y)=>{for(var k=0;k<Y.length;k++)if(-1<B.indexOf(Y[k]))return!0;return!1})(M,o.BAD_DELIMITERS)||-1<M.indexOf(m)||M.charAt(0)===" "||M.charAt(M.length-1)===" ")?_+M+_:M)}},o.RECORD_SEP="",o.UNIT_SEP="",o.BYTE_ORDER_MARK="\uFEFF",o.BAD_DELIMITERS=["\r",`
15
- `,'"',o.BYTE_ORDER_MARK],o.WORKERS_SUPPORTED=!$&&!!d.Worker,o.NODE_STREAM_INPUT=1,o.LocalChunkSize=10485760,o.RemoteChunkSize=5242880,o.DefaultDelimiter=",",o.Parser=se,o.ParserHandle=G,o.NetworkStreamer=A,o.FileStreamer=D,o.StringStreamer=T,o.ReadableStreamStreamer=Q,d.jQuery&&((C=d.jQuery).fn.parse=function(e){var t=e.config||{},n=[];return this.each(function(b){if(!(C(this).prop("tagName").toUpperCase()==="INPUT"&&C(this).attr("type").toLowerCase()==="file"&&d.FileReader)||!this.files||this.files.length===0)return!0;for(var _=0;_<this.files.length;_++)n.push({file:this.files[_],inputElem:this,instanceConfig:C.extend({},t)})}),s(),this;function s(){if(n.length===0)F(e.complete)&&e.complete();else{var b,_,l,c,i=n[0];if(F(e.before)){var a=e.before(i.file,i.inputElem);if(typeof a=="object"){if(a.action==="abort")return b="AbortError",_=i.file,l=i.inputElem,c=a.reason,void(F(e.error)&&e.error({name:b},_,l,c));if(a.action==="skip")return void m();typeof a.config=="object"&&(i.instanceConfig=C.extend(i.instanceConfig,a.config))}else if(a==="skip")return void m()}var u=i.instanceConfig.complete;i.instanceConfig.complete=function(y){F(u)&&u(y,i.file,i.inputElem),m()},o.parse(i.file,i.instanceConfig)}}function m(){n.splice(0,1),s()}}),z&&(d.onmessage=function(e){e=e.data,o.WORKER_ID===void 0&&e&&(o.WORKER_ID=e.workerId),typeof e.input=="string"?d.postMessage({workerId:o.WORKER_ID,results:o.parse(e.input,e.config),finished:!0}):(d.File&&e.input instanceof File||e.input instanceof Object)&&(e=o.parse(e.input,e.config))&&d.postMessage({workerId:o.WORKER_ID,results:e,finished:!0})}),(A.prototype=Object.create(S.prototype)).constructor=A,(D.prototype=Object.create(S.prototype)).constructor=D,(T.prototype=Object.create(T.prototype)).constructor=T,(Q.prototype=Object.create(S.prototype)).constructor=Q,o})}(we)),we.exports}var Re=Ze();class Ve{readAsText(r){const f=new FileReader;return new Promise((d,C)=>{f.onload=$=>{d($)},f.onerror=$=>{C($)},f.readAsText(r)})}readAsBinaryString(r){const f=new FileReader;return new Promise((d,C)=>{f.onload=$=>{d($)},f.onerror=$=>{C($)},f.readAsBinaryString(r)})}readAsDataUrl(r){const f=new FileReader;return new Promise((d,C)=>{f.onload=$=>{d($)},f.onerror=$=>C($),f.readAsDataURL(r)})}unparse(r,f){return Re.unparse(r,f)}parse(r){return new Promise((f,d)=>{Re.parse(r,{header:!0,complete:C=>f(C),error:C=>d(C)})})}getFileExtension(r){let f="-";return/[.]/.exec(r)&&(f=`.${/[^.]+$/.exec(r)?.[0]}`),f}save(r,f,d){const C=new Blob([r],{type:d});Je.saveAs(C,f,{autoBom:!0})}}class Ge{set(r,f){localStorage.setItem(r,JSON.stringify(f))}get(r){let f=null;const d=localStorage.getItem(r);return d&&(f=JSON.parse(d)),f}remove(r){localStorage.removeItem(r)}removeAll(){localStorage.clear()}getKeysBy(r){return Object.keys(localStorage).filter(f=>f.startsWith(r))}}var ke=(h=>(h.log="log",h.info="info",h.warn="warn",h.debug="debug",h.error="error",h))(ke||{});class Xe{logType=ke;log(...r){this._doLog(this.logType.log,r.join(" "))}info(...r){this._doLog(this.logType.info,r.join(" "))}warn(...r){this._doLog(this.logType.warn,r.join(" "))}debug(...r){this._doLog(this.logType.debug,r.join(" "))}error(...r){this._doLog(this.logType.error,r.join(" "))}_doLog(r,...f){console[r].apply(console,f)}}class et{constructor(r){this.localService=r}get(r){return this.localService.get(r)}set(r,f){this.localService.set(r,f)}remove(r){this.localService.remove(r)}}exports.BrowserService=Pe;exports.BrowserType=Le;exports.ClipboardService=qe;exports.FileService=Ve;exports.LocalService=Ge;exports.LogType=ke;exports.LoggerService=Xe;exports.ScreenBreakpoints=ye;exports.TokenService=et;exports.sortHelper=$e;
15
+ `,'"',o.BYTE_ORDER_MARK],o.WORKERS_SUPPORTED=!$&&!!d.Worker,o.NODE_STREAM_INPUT=1,o.LocalChunkSize=10485760,o.RemoteChunkSize=5242880,o.DefaultDelimiter=",",o.Parser=se,o.ParserHandle=G,o.NetworkStreamer=A,o.FileStreamer=D,o.StringStreamer=T,o.ReadableStreamStreamer=Q,d.jQuery&&((C=d.jQuery).fn.parse=function(e){var t=e.config||{},n=[];return this.each(function(b){if(!(C(this).prop("tagName").toUpperCase()==="INPUT"&&C(this).attr("type").toLowerCase()==="file"&&d.FileReader)||!this.files||this.files.length===0)return!0;for(var _=0;_<this.files.length;_++)n.push({file:this.files[_],inputElem:this,instanceConfig:C.extend({},t)})}),s(),this;function s(){if(n.length===0)F(e.complete)&&e.complete();else{var b,_,l,c,i=n[0];if(F(e.before)){var a=e.before(i.file,i.inputElem);if(typeof a=="object"){if(a.action==="abort")return b="AbortError",_=i.file,l=i.inputElem,c=a.reason,void(F(e.error)&&e.error({name:b},_,l,c));if(a.action==="skip")return void m();typeof a.config=="object"&&(i.instanceConfig=C.extend(i.instanceConfig,a.config))}else if(a==="skip")return void m()}var u=i.instanceConfig.complete;i.instanceConfig.complete=function(y){F(u)&&u(y,i.file,i.inputElem),m()},o.parse(i.file,i.instanceConfig)}}function m(){n.splice(0,1),s()}}),z&&(d.onmessage=function(e){e=e.data,o.WORKER_ID===void 0&&e&&(o.WORKER_ID=e.workerId),typeof e.input=="string"?d.postMessage({workerId:o.WORKER_ID,results:o.parse(e.input,e.config),finished:!0}):(d.File&&e.input instanceof File||e.input instanceof Object)&&(e=o.parse(e.input,e.config))&&d.postMessage({workerId:o.WORKER_ID,results:e,finished:!0})}),(A.prototype=Object.create(S.prototype)).constructor=A,(D.prototype=Object.create(S.prototype)).constructor=D,(T.prototype=Object.create(T.prototype)).constructor=T,(Q.prototype=Object.create(S.prototype)).constructor=Q,o})}(ve)),ve.exports}var Re=Ze();class Ve{readAsText(r){const h=new FileReader;return new Promise((d,C)=>{h.onload=$=>{d($)},h.onerror=$=>{C($)},h.readAsText(r)})}readAsBinaryString(r){const h=new FileReader;return new Promise((d,C)=>{h.onload=$=>{d($)},h.onerror=$=>{C($)},h.readAsBinaryString(r)})}readAsDataUrl(r){const h=new FileReader;return new Promise((d,C)=>{h.onload=$=>{d($)},h.onerror=$=>C($),h.readAsDataURL(r)})}unparse(r,h){return Re.unparse(r,h)}parse(r){return new Promise((h,d)=>{Re.parse(r,{header:!0,complete:C=>h(C),error:C=>d(C)})})}getFileExtension(r){let h="-";return/[.]/.exec(r)&&(h=`.${/[^.]+$/.exec(r)?.[0]}`),h}save(r,h,d){const C=new Blob([r],{type:d});Je.saveAs(C,h,{autoBom:!0})}}class Ge{set(r,h){localStorage.setItem(r,JSON.stringify(h))}get(r){let h=null;const d=localStorage.getItem(r);return d&&(h=JSON.parse(d)),h}remove(r){let h=!!this.get(r);return h&&localStorage.removeItem(r),h}removeAll(){localStorage.clear()}getKeysBy(r){return Object.keys(localStorage).filter(h=>h.startsWith(r))}}var ke=(f=>(f.log="log",f.info="info",f.warn="warn",f.debug="debug",f.error="error",f))(ke||{});class Xe{logType=ke;log(...r){this._doLog(this.logType.log,r.join(" "))}info(...r){this._doLog(this.logType.info,r.join(" "))}warn(...r){this._doLog(this.logType.warn,r.join(" "))}debug(...r){this._doLog(this.logType.debug,r.join(" "))}error(...r){this._doLog(this.logType.error,r.join(" "))}_doLog(r,...h){console[r].apply(console,h)}}class et{constructor(r){this.localService=r}get(r){return this.localService.get(r)}set(r,h){this.localService.set(r,h)}remove(r){this.localService.remove(r)}}exports.BrowserService=Pe;exports.BrowserType=Le;exports.ClipboardService=qe;exports.FileService=Ve;exports.LocalService=Ge;exports.LogType=ke;exports.LoggerService=Xe;exports.ScreenBreakpoints=Se;exports.TokenService=et;exports.sortHelper=$e;
package/index.es.js CHANGED
@@ -1,43 +1,43 @@
1
- const Ce = (c, r, f) => c.localeCompare(r) * (f ? 1 : -1), Le = (c, r) => c < r ? -1 : c === r ? 0 : 1, Ae = (c, r, f) => Le(c, r) * (f ? 1 : -1), Te = (c, r, f) => {
1
+ const Ce = (f, r, c) => f.localeCompare(r) * (c ? 1 : -1), Le = (f, r) => f < r ? -1 : f === r ? 0 : 1, Ae = (f, r, c) => Le(f, r) * (c ? 1 : -1), Te = (f, r, c) => {
2
2
  let d = 0;
3
- return typeof c == "string" && typeof r == "string" ? d = Ce(c, r, f) : d = Ae(c, r, f), d;
4
- }, Ie = (c, r, f, d) => {
5
- const C = f(c), $ = f(r);
3
+ return typeof f == "string" && typeof r == "string" ? d = Ce(f, r, c) : d = Ae(f, r, c), d;
4
+ }, Ie = (f, r, c, d) => {
5
+ const C = c(f), $ = c(r);
6
6
  return Te(C, $, d);
7
7
  };
8
- Array.prototype.groupBy = function(c) {
9
- return this.reduce((r, f) => {
10
- const d = c(f);
11
- return (r[d] = r[d] || []).push(f), r;
8
+ Array.prototype.groupBy = function(f) {
9
+ return this.reduce((r, c) => {
10
+ const d = f(c);
11
+ return (r[d] = r[d] || []).push(c), r;
12
12
  }, {});
13
13
  };
14
- Array.prototype.removeBy = function(c, r) {
15
- return this.filter((f) => c(f) !== r);
14
+ Array.prototype.removeBy = function(f, r) {
15
+ return this.filter((c) => f(c) !== r);
16
16
  };
17
- Array.prototype.orderBy = function(c, r = !0) {
18
- return this?.sort((f, d) => Ie(f, d, c, r)), this;
17
+ Array.prototype.orderBy = function(f, r = !0) {
18
+ return this?.sort((c, d) => Ie(c, d, f, r)), this;
19
19
  };
20
- Array.prototype.filterBy = function(c) {
20
+ Array.prototype.filterBy = function(f) {
21
21
  return this.filter((r) => {
22
- let f = !1;
23
- return c && r[c] ? f = r[c] === c : f = r === c, f;
22
+ let c = !1;
23
+ return f && r[f] ? c = r[f] === f : c = r === f, c;
24
24
  });
25
25
  };
26
- Array.prototype.distinct = function(c) {
26
+ Array.prototype.distinct = function(f) {
27
27
  const r = this;
28
- return c ? r.filter((d, C, $) => $.findIndex((z) => c(z, d)) === C) : r.filter((d, C, $) => $.indexOf(d) === C);
28
+ return f ? r.filter((d, C, $) => $.findIndex((z) => f(z, d)) === C) : r.filter((d, C, $) => $.indexOf(d) === C);
29
29
  };
30
30
  var ge = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
31
- function Re(c) {
32
- return c && c.__esModule && Object.prototype.hasOwnProperty.call(c, "default") ? c.default : c;
31
+ function Re(f) {
32
+ return f && f.__esModule && Object.prototype.hasOwnProperty.call(f, "default") ? f.default : f;
33
33
  }
34
- var me = { exports: {} }, Fe = me.exports, Ee;
34
+ var me = { exports: {} }, Fe = me.exports, Se;
35
35
  function je() {
36
- return Ee || (Ee = 1, function(c, r) {
37
- (function(f, d) {
38
- c.exports = d();
36
+ return Se || (Se = 1, function(f, r) {
37
+ (function(c, d) {
38
+ f.exports = d();
39
39
  })(Fe, function() {
40
- var f = 1e3, d = 6e4, C = 36e5, $ = "millisecond", z = "second", N = "minute", P = "hour", o = "day", k = "week", A = "month", D = "quarter", T = "year", Q = "date", G = "Invalid Date", X = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, se = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, ae = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(_) {
40
+ var c = 1e3, d = 6e4, C = 36e5, $ = "millisecond", z = "second", N = "minute", P = "hour", o = "day", k = "week", A = "month", D = "quarter", T = "year", Q = "date", G = "Invalid Date", X = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, se = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, ae = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(_) {
41
41
  var l = ["th", "st", "nd", "rd"], h = _ % 100;
42
42
  return "[" + _ + (l[(h - 20) % 10] || l[h] || l[0]) + "]";
43
43
  } }, Z = function(_, l, h) {
@@ -172,7 +172,7 @@ function je() {
172
172
  if (y === T) return this.set(T, this.$y + h);
173
173
  if (y === o) return g(1);
174
174
  if (y === k) return g(7);
175
- var v = (a = {}, a[N] = d, a[P] = C, a[z] = f, a)[y] || 1, p = this.$d.getTime() + h * v;
175
+ var v = (a = {}, a[N] = d, a[P] = C, a[z] = c, a)[y] || 1, p = this.$d.getTime() + h * v;
176
176
  return s.w(p, this);
177
177
  }, l.subtract = function(h, i) {
178
178
  return this.add(-1 * h, i);
@@ -271,7 +271,7 @@ function je() {
271
271
  u = M / d;
272
272
  break;
273
273
  case z:
274
- u = M / f;
274
+ u = M / c;
275
275
  break;
276
276
  default:
277
277
  u = M;
@@ -311,21 +311,21 @@ function je() {
311
311
  }
312
312
  var ze = je();
313
313
  const te = /* @__PURE__ */ Re(ze);
314
- var _e = { exports: {} }, We = _e.exports, Oe;
314
+ var _e = { exports: {} }, We = _e.exports, Ee;
315
315
  function Be() {
316
- return Oe || (Oe = 1, function(c, r) {
317
- (function(f, d) {
318
- c.exports = d();
316
+ return Ee || (Ee = 1, function(f, r) {
317
+ (function(c, d) {
318
+ f.exports = d();
319
319
  })(We, function() {
320
- var f = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" };
320
+ var c = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" };
321
321
  return function(d, C, $) {
322
322
  var z = C.prototype, N = z.format;
323
- $.en.formats = f, z.format = function(P) {
323
+ $.en.formats = c, z.format = function(P) {
324
324
  P === void 0 && (P = "YYYY-MM-DDTHH:mm:ssZ");
325
325
  var o = this.$locale().formats, k = function(A, D) {
326
326
  return A.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(T, Q, G) {
327
327
  var X = G && G.toUpperCase();
328
- return Q || D[G] || f[G] || D[X].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(se, ae, Z) {
328
+ return Q || D[G] || c[G] || D[X].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(se, ae, Z) {
329
329
  return ae || Z.slice(1);
330
330
  });
331
331
  });
@@ -339,23 +339,23 @@ function Be() {
339
339
  var Ue = Be();
340
340
  const He = /* @__PURE__ */ Re(Ue);
341
341
  te.extend(He);
342
- Date.prototype.isAfter = function(c, r) {
343
- return te(this).isAfter(c, r);
342
+ Date.prototype.isAfter = function(f, r) {
343
+ return te(this).isAfter(f, r);
344
344
  };
345
- Date.prototype.isBefore = function(c, r) {
346
- return te(this).isBefore(c, r);
345
+ Date.prototype.isBefore = function(f, r) {
346
+ return te(this).isBefore(f, r);
347
347
  };
348
- Date.prototype.format = function(c) {
349
- return te(this).format(c);
348
+ Date.prototype.format = function(f) {
349
+ return te(this).format(f);
350
350
  };
351
351
  Date.prototype.isValid = function() {
352
352
  return te(this).isValid();
353
353
  };
354
- Date.prototype.add = function(c, r) {
355
- return te(this).add(c, r).toDate();
354
+ Date.prototype.add = function(f, r) {
355
+ return te(this).add(f, r).toDate();
356
356
  };
357
- Date.prototype.subtract = function(c, r) {
358
- return te(this).subtract(c, r).toDate();
357
+ Date.prototype.subtract = function(f, r) {
358
+ return te(this).subtract(f, r).toDate();
359
359
  };
360
360
  Date.prototype.firstDayOfMonth = function() {
361
361
  return te(this).startOf("month").toDate();
@@ -363,19 +363,19 @@ Date.prototype.firstDayOfMonth = function() {
363
363
  Date.prototype.lastDayOfMonth = function() {
364
364
  return te(this).endOf("month").toDate();
365
365
  };
366
- Date.prototype.set = function(c, r) {
367
- return te(this).set(c, r).toDate();
366
+ Date.prototype.set = function(f, r) {
367
+ return te(this).set(f, r).toDate();
368
368
  };
369
- Date.prototype.diff = function(c, r) {
370
- return te(this).diff(c, r);
369
+ Date.prototype.diff = function(f, r) {
370
+ return te(this).diff(f, r);
371
371
  };
372
372
  String.prototype.capitalize = function() {
373
373
  return this.charAt(0).toUpperCase() + this.slice(1);
374
374
  };
375
- var Ye = /* @__PURE__ */ ((c) => (c.opera = "opera", c.firefox = "firefox", c.safari = "safari", c.ie = "ie", c.edge = "edge", c.edg = "edg", c.electron = "electron", c.chrome = "chrome", c.iOsSafari = "iOsSafari", c.edgiOs = "edgiOs", c.headlessChrome = "headlessChrome", c))(Ye || {});
376
- const ke = [
375
+ var Ye = /* @__PURE__ */ ((f) => (f.opera = "opera", f.firefox = "firefox", f.safari = "safari", f.ie = "ie", f.edge = "edge", f.edg = "edg", f.electron = "electron", f.chrome = "chrome", f.iOsSafari = "iOsSafari", f.edgiOs = "edgiOs", f.headlessChrome = "headlessChrome", f))(Ye || {});
376
+ const Oe = [
377
377
  { breakpoint: "xs", screenWidth: 0 },
378
- { breakpoint: "sm", screenWidth: 375 },
378
+ { breakpoint: "sm", screenWidth: 576 },
379
379
  { breakpoint: "md", screenWidth: 768 },
380
380
  { breakpoint: "lg", screenWidth: 992 },
381
381
  { breakpoint: "xl", screenWidth: 1200 },
@@ -415,21 +415,21 @@ class Qe {
415
415
  throw new Error("Browser could not be detected: " + r);
416
416
  }
417
417
  getBreakpointBySize(r = this.screenWidth) {
418
- let f = ke[0];
419
- for (const d of ke)
420
- d.screenWidth <= r && (f = d);
421
- return f;
418
+ let c;
419
+ for (const d of Oe)
420
+ d.screenWidth <= r && (c = d);
421
+ return c;
422
422
  }
423
423
  isScreenGreaterThan(r) {
424
- const f = this.getBreakpoint(r);
425
- return this.screenWidth > (f?.screenWidth ?? 0);
424
+ const c = this.getBreakpoint(r);
425
+ return this.screenWidth > (c?.screenWidth ?? 0);
426
426
  }
427
427
  isScreenSmallerThan(r) {
428
- const f = this.getBreakpoint(r);
429
- return this.screenWidth < (f?.screenWidth ?? 0);
428
+ const c = this.getBreakpoint(r);
429
+ return this.screenWidth < (c?.screenWidth ?? 0);
430
430
  }
431
431
  getBreakpoint(r) {
432
- return ke.find((f) => f.breakpoint === r);
432
+ return Oe.find((c) => c.breakpoint === r);
433
433
  }
434
434
  // ==== Browser Detection (Private) ====
435
435
  isOpera() {
@@ -469,9 +469,9 @@ class Qe {
469
469
  }
470
470
  // ==== Resize Handling ====
471
471
  onResize(r) {
472
- const f = r.target.innerWidth;
473
- this.screenWidth = f;
474
- const d = this.getBreakpointBySize(f);
472
+ const c = r.target.innerWidth;
473
+ this.screenWidth = c;
474
+ const d = this.getBreakpointBySize(c);
475
475
  this.lastBreakpoint?.breakpoint !== d?.breakpoint && (this.lastBreakpoint = d, this.resizeCallbacks.forEach((C) => C(d)));
476
476
  }
477
477
  }
@@ -482,11 +482,11 @@ class Ze {
482
482
  }
483
483
  var ye = { exports: {} }, qe = ye.exports, xe;
484
484
  function Pe() {
485
- return xe || (xe = 1, function(c, r) {
486
- (function(f, d) {
485
+ return xe || (xe = 1, function(f, r) {
486
+ (function(c, d) {
487
487
  d();
488
488
  })(qe, function() {
489
- function f(o, k) {
489
+ function c(o, k) {
490
490
  return typeof k > "u" ? k = { autoBom: !1 } : typeof k != "object" && (console.warn("Deprecated: Expected third argument to be a object"), k = { autoBom: !k }), k.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(o.type) ? new Blob(["\uFEFF", o], { type: o.type }) : o;
491
491
  }
492
492
  function d(o, k, A) {
@@ -523,7 +523,7 @@ function Pe() {
523
523
  $(T);
524
524
  }, 0));
525
525
  } : "msSaveOrOpenBlob" in navigator ? function(o, k, A) {
526
- if (k = k || o.name || "download", typeof o != "string") navigator.msSaveOrOpenBlob(f(o, A), k);
526
+ if (k = k || o.name || "download", typeof o != "string") navigator.msSaveOrOpenBlob(c(o, A), k);
527
527
  else if (C(o)) d(o, k, A);
528
528
  else {
529
529
  var D = document.createElement("a");
@@ -547,7 +547,7 @@ function Pe() {
547
547
  }, 4e4);
548
548
  }
549
549
  });
550
- z.saveAs = P.saveAs = P, c.exports = P;
550
+ z.saveAs = P.saveAs = P, f.exports = P;
551
551
  });
552
552
  }(ye)), ye.exports;
553
553
  }
@@ -560,10 +560,10 @@ License: MIT
560
560
  */
561
561
  var Ke = ve.exports, De;
562
562
  function Je() {
563
- return De || (De = 1, function(c, r) {
564
- ((f, d) => {
565
- c.exports = d();
566
- })(Ke, function f() {
563
+ return De || (De = 1, function(f, r) {
564
+ ((c, d) => {
565
+ f.exports = d();
566
+ })(Ke, function c() {
567
567
  var d = typeof self < "u" ? self : typeof window < "u" ? window : d !== void 0 ? d : {}, C, $ = !d.document && !!d.postMessage, z = d.IS_PAPA_WORKER || !1, N = {}, P = 0, o = {};
568
568
  function k(e) {
569
569
  this._handle = null, this._finished = !1, this._completed = !1, this._halted = !1, this._input = null, this._baseIndex = 0, this._partialLine = "", this._rowCount = 0, this._start = 0, this._nextChunk = null, this.isFirstChunk = !0, this._completeResults = { data: [], errors: [], meta: {} }, (function(t) {
@@ -816,17 +816,17 @@ function Je() {
816
816
  function J(q) {
817
817
  if (e.header && !v && O.length && !h) {
818
818
  var V = O[0], ue = /* @__PURE__ */ Object.create(null), we = new Set(V);
819
- let be = !1;
819
+ let ke = !1;
820
820
  for (let fe = 0; fe < V.length; fe++) {
821
821
  let ie = V[fe];
822
822
  if (ue[ie = I(e.transformHeader) ? e.transformHeader(ie, fe) : ie]) {
823
- let de, Se = ue[ie];
824
- for (; de = ie + "_" + Se, Se++, we.has(de); ) ;
825
- we.add(de), V[fe] = de, ue[ie]++, be = !0, (l = l === null ? {} : l)[de] = ie;
823
+ let de, be = ue[ie];
824
+ for (; de = ie + "_" + be, be++, we.has(de); ) ;
825
+ we.add(de), V[fe] = de, ue[ie]++, ke = !0, (l = l === null ? {} : l)[de] = ie;
826
826
  } else ue[ie] = 1, V[fe] = ie;
827
827
  we.add(ie);
828
828
  }
829
- be && console.warn("Duplicate headers found and renamed."), h = !0;
829
+ ke && console.warn("Duplicate headers found and renamed."), h = !0;
830
830
  }
831
831
  return { data: O, errors: x, meta: { delimiter: t, linebreak: n, aborted: y, truncated: !!q, cursor: F + (v || 0), renamedHeaders: l } };
832
832
  }
@@ -880,7 +880,7 @@ function Je() {
880
880
  (n = (() => {
881
881
  var s;
882
882
  return !!o.WORKERS_SUPPORTED && (s = (() => {
883
- var m = d.URL || d.webkitURL || null, S = f.toString();
883
+ var m = d.URL || d.webkitURL || null, S = c.toString();
884
884
  return o.BLOB_URL || (o.BLOB_URL = m.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ", "(", S, ")();"], { type: "text/javascript" })));
885
885
  })(), (s = new d.Worker(s)).onmessage = ae, s.id = P++, N[s.id] = s);
886
886
  })()).userStep = t.step, n.userChunk = t.chunk, n.userComplete = t.complete, n.userError = t.error, t.step = I(t.step), t.chunk = I(t.chunk), t.complete = I(t.complete), t.error = I(t.error), delete t.worker, n.postMessage({ input: e, config: t, workerId: n.id });
@@ -972,74 +972,75 @@ function Je() {
972
972
  var Me = Je();
973
973
  class Ve {
974
974
  readAsText(r) {
975
- const f = new FileReader();
975
+ const c = new FileReader();
976
976
  return new Promise((d, C) => {
977
- f.onload = ($) => {
977
+ c.onload = ($) => {
978
978
  d($);
979
- }, f.onerror = ($) => {
979
+ }, c.onerror = ($) => {
980
980
  C($);
981
- }, f.readAsText(r);
981
+ }, c.readAsText(r);
982
982
  });
983
983
  }
984
984
  readAsBinaryString(r) {
985
- const f = new FileReader();
985
+ const c = new FileReader();
986
986
  return new Promise((d, C) => {
987
- f.onload = ($) => {
987
+ c.onload = ($) => {
988
988
  d($);
989
- }, f.onerror = ($) => {
989
+ }, c.onerror = ($) => {
990
990
  C($);
991
- }, f.readAsBinaryString(r);
991
+ }, c.readAsBinaryString(r);
992
992
  });
993
993
  }
994
994
  readAsDataUrl(r) {
995
- const f = new FileReader();
995
+ const c = new FileReader();
996
996
  return new Promise((d, C) => {
997
- f.onload = ($) => {
997
+ c.onload = ($) => {
998
998
  d($);
999
- }, f.onerror = ($) => C($), f.readAsDataURL(r);
999
+ }, c.onerror = ($) => C($), c.readAsDataURL(r);
1000
1000
  });
1001
1001
  }
1002
- unparse(r, f) {
1003
- return Me.unparse(r, f);
1002
+ unparse(r, c) {
1003
+ return Me.unparse(r, c);
1004
1004
  }
1005
1005
  parse(r) {
1006
- return new Promise((f, d) => {
1006
+ return new Promise((c, d) => {
1007
1007
  Me.parse(r, {
1008
1008
  header: !0,
1009
- complete: (C) => f(C),
1009
+ complete: (C) => c(C),
1010
1010
  error: (C) => d(C)
1011
1011
  });
1012
1012
  });
1013
1013
  }
1014
1014
  getFileExtension(r) {
1015
- let f = "-";
1016
- return /[.]/.exec(r) && (f = `.${/[^.]+$/.exec(r)?.[0]}`), f;
1015
+ let c = "-";
1016
+ return /[.]/.exec(r) && (c = `.${/[^.]+$/.exec(r)?.[0]}`), c;
1017
1017
  }
1018
- save(r, f, d) {
1018
+ save(r, c, d) {
1019
1019
  const C = new Blob([r], { type: d });
1020
- Ne.saveAs(C, f, { autoBom: !0 });
1020
+ Ne.saveAs(C, c, { autoBom: !0 });
1021
1021
  }
1022
1022
  }
1023
1023
  class Ge {
1024
- set(r, f) {
1025
- localStorage.setItem(r, JSON.stringify(f));
1024
+ set(r, c) {
1025
+ localStorage.setItem(r, JSON.stringify(c));
1026
1026
  }
1027
1027
  get(r) {
1028
- let f = null;
1028
+ let c = null;
1029
1029
  const d = localStorage.getItem(r);
1030
- return d && (f = JSON.parse(d)), f;
1030
+ return d && (c = JSON.parse(d)), c;
1031
1031
  }
1032
1032
  remove(r) {
1033
- localStorage.removeItem(r);
1033
+ let c = !!this.get(r);
1034
+ return c && localStorage.removeItem(r), c;
1034
1035
  }
1035
1036
  removeAll() {
1036
1037
  localStorage.clear();
1037
1038
  }
1038
1039
  getKeysBy(r) {
1039
- return Object.keys(localStorage).filter((f) => f.startsWith(r));
1040
+ return Object.keys(localStorage).filter((c) => c.startsWith(r));
1040
1041
  }
1041
1042
  }
1042
- var $e = /* @__PURE__ */ ((c) => (c.log = "log", c.info = "info", c.warn = "warn", c.debug = "debug", c.error = "error", c))($e || {});
1043
+ var $e = /* @__PURE__ */ ((f) => (f.log = "log", f.info = "info", f.warn = "warn", f.debug = "debug", f.error = "error", f))($e || {});
1043
1044
  class Xe {
1044
1045
  logType = $e;
1045
1046
  log(...r) {
@@ -1057,8 +1058,8 @@ class Xe {
1057
1058
  error(...r) {
1058
1059
  this._doLog(this.logType.error, r.join(" "));
1059
1060
  }
1060
- _doLog(r, ...f) {
1061
- console[r].apply(console, f);
1061
+ _doLog(r, ...c) {
1062
+ console[r].apply(console, c);
1062
1063
  }
1063
1064
  }
1064
1065
  class et {
@@ -1068,8 +1069,8 @@ class et {
1068
1069
  get(r) {
1069
1070
  return this.localService.get(r);
1070
1071
  }
1071
- set(r, f) {
1072
- this.localService.set(r, f);
1072
+ set(r, c) {
1073
+ this.localService.set(r, c);
1073
1074
  }
1074
1075
  remove(r) {
1075
1076
  this.localService.remove(r);
@@ -1083,7 +1084,7 @@ export {
1083
1084
  Ge as LocalService,
1084
1085
  $e as LogType,
1085
1086
  Xe as LoggerService,
1086
- ke as ScreenBreakpoints,
1087
+ Oe as ScreenBreakpoints,
1087
1088
  et as TokenService,
1088
1089
  Ie as sortHelper
1089
1090
  };
package/index.umd.js CHANGED
@@ -1,15 +1,15 @@
1
- (function(Q,de){typeof exports=="object"&&typeof module<"u"?de(exports):typeof define=="function"&&define.amd?define(["exports"],de):(Q=typeof globalThis<"u"?globalThis:Q||self,de(Q["ts-utils"]={}))})(this,function(Q){"use strict";const de=(f,r,h)=>f.localeCompare(r)*(h?1:-1),Fe=(f,r)=>f<r?-1:f===r?0:1,Ie=(f,r,h)=>Fe(f,r)*(h?1:-1),je=(f,r,h)=>{let d=0;return typeof f=="string"&&typeof r=="string"?d=de(f,r,h):d=Ie(f,r,h),d},Oe=(f,r,h,d)=>{const C=h(f),$=h(r);return je(C,$,d)};Array.prototype.groupBy=function(f){return this.reduce((r,h)=>{const d=f(h);return(r[d]=r[d]||[]).push(h),r},{})},Array.prototype.removeBy=function(f,r){return this.filter(h=>f(h)!==r)},Array.prototype.orderBy=function(f,r=!0){return this?.sort((h,d)=>Oe(h,d,f,r)),this},Array.prototype.filterBy=function(f){return this.filter(r=>{let h=!1;return f&&r[f]?h=r[f]===f:h=r===f,h})},Array.prototype.distinct=function(f){const r=this;return f?r.filter((d,C,$)=>$.findIndex(z=>f(z,d))===C):r.filter((d,C,$)=>$.indexOf(d)===C)};var me=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function De(f){return f&&f.__esModule&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f}var _e={exports:{}},ze=_e.exports,Me;function We(){return Me||(Me=1,function(f,r){(function(h,d){f.exports=d()})(ze,function(){var h=1e3,d=6e4,C=36e5,$="millisecond",z="second",N="minute",q="hour",o="day",S="week",A="month",M="quarter",T="year",Z="date",X="Invalid Date",ee=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,ae=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,oe={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(_){var l=["th","st","nd","rd"],c=_%100;return"["+_+(l[(c-20)%10]||l[c]||l[0])+"]"}},V=function(_,l,c){var i=String(_);return!i||i.length>=l?_:""+Array(l+1-i.length).join(c)+_},ke={s:V,z:function(_){var l=-_.utcOffset(),c=Math.abs(l),i=Math.floor(c/60),a=c%60;return(l<=0?"+":"-")+V(i,2,"0")+":"+V(a,2,"0")},m:function _(l,c){if(l.date()<c.date())return-_(c,l);var i=12*(c.year()-l.year())+(c.month()-l.month()),a=l.clone().add(i,A),u=c-a<0,y=l.clone().add(i+(u?-1:1),A);return+(-(i+(c-a)/(u?a-y:y-a))||0)},a:function(_){return _<0?Math.ceil(_)||0:Math.floor(_)},p:function(_){return{M:A,y:T,w:S,d:o,D:Z,h:q,m:N,s:z,ms:$,Q:M}[_]||String(_||"").toLowerCase().replace(/s$/,"")},u:function(_){return _===void 0}},ue="en",K={};K[ue]=oe;var F="$isDayjsObject",e=function(_){return _ instanceof m||!(!_||!_[F])},t=function _(l,c,i){var a;if(!l)return ue;if(typeof l=="string"){var u=l.toLowerCase();K[u]&&(a=u),c&&(K[u]=c,a=u);var y=l.split("-");if(!a&&y.length>1)return _(y[0])}else{var g=l.name;K[g]=l,a=g}return!i&&a&&(ue=a),a||!i&&ue},n=function(_,l){if(e(_))return _.clone();var c=typeof l=="object"?l:{};return c.date=_,c.args=arguments,new m(c)},s=ke;s.l=t,s.i=e,s.w=function(_,l){return n(_,{locale:l.$L,utc:l.$u,x:l.$x,$offset:l.$offset})};var m=function(){function _(c){this.$L=t(c.locale,null,!0),this.parse(c),this.$x=this.$x||c.x||{},this[F]=!0}var l=_.prototype;return l.parse=function(c){this.$d=function(i){var a=i.date,u=i.utc;if(a===null)return new Date(NaN);if(s.u(a))return new Date;if(a instanceof Date)return new Date(a);if(typeof a=="string"&&!/Z$/i.test(a)){var y=a.match(ee);if(y){var g=y[2]-1||0,v=(y[7]||"0").substring(0,3);return u?new Date(Date.UTC(y[1],g,y[3]||1,y[4]||0,y[5]||0,y[6]||0,v)):new Date(y[1],g,y[3]||1,y[4]||0,y[5]||0,y[6]||0,v)}}return new Date(a)}(c),this.init()},l.init=function(){var c=this.$d;this.$y=c.getFullYear(),this.$M=c.getMonth(),this.$D=c.getDate(),this.$W=c.getDay(),this.$H=c.getHours(),this.$m=c.getMinutes(),this.$s=c.getSeconds(),this.$ms=c.getMilliseconds()},l.$utils=function(){return s},l.isValid=function(){return this.$d.toString()!==X},l.isSame=function(c,i){var a=n(c);return this.startOf(i)<=a&&a<=this.endOf(i)},l.isAfter=function(c,i){return n(c)<this.startOf(i)},l.isBefore=function(c,i){return this.endOf(i)<n(c)},l.$g=function(c,i,a){return s.u(c)?this[i]:this.set(a,c)},l.unix=function(){return Math.floor(this.valueOf()/1e3)},l.valueOf=function(){return this.$d.getTime()},l.startOf=function(c,i){var a=this,u=!!s.u(i)||i,y=s.p(c),g=function(O,D){var w=s.w(a.$u?Date.UTC(a.$y,D,O):new Date(a.$y,D,O),a);return u?w:w.endOf(o)},v=function(O,D){return s.w(a.toDate()[O].apply(a.toDate("s"),(u?[0,0,0,0]:[23,59,59,999]).slice(D)),a)},p=this.$W,x=this.$M,L=this.$D,B="set"+(this.$u?"UTC":"");switch(y){case T:return u?g(1,0):g(31,11);case A:return u?g(1,x):g(0,x+1);case S:var Y=this.$locale().weekStart||0,k=(p<Y?p+7:p)-Y;return g(u?L-k:L+(6-k),x);case o:case Z:return v(B+"Hours",0);case q:return v(B+"Minutes",1);case N:return v(B+"Seconds",2);case z:return v(B+"Milliseconds",3);default:return this.clone()}},l.endOf=function(c){return this.startOf(c,!1)},l.$set=function(c,i){var a,u=s.p(c),y="set"+(this.$u?"UTC":""),g=(a={},a[o]=y+"Date",a[Z]=y+"Date",a[A]=y+"Month",a[T]=y+"FullYear",a[q]=y+"Hours",a[N]=y+"Minutes",a[z]=y+"Seconds",a[$]=y+"Milliseconds",a)[u],v=u===o?this.$D+(i-this.$W):i;if(u===A||u===T){var p=this.clone().set(Z,1);p.$d[g](v),p.init(),this.$d=p.set(Z,Math.min(this.$D,p.daysInMonth())).$d}else g&&this.$d[g](v);return this.init(),this},l.set=function(c,i){return this.clone().$set(c,i)},l.get=function(c){return this[s.p(c)]()},l.add=function(c,i){var a,u=this;c=Number(c);var y=s.p(i),g=function(x){var L=n(u);return s.w(L.date(L.date()+Math.round(x*c)),u)};if(y===A)return this.set(A,this.$M+c);if(y===T)return this.set(T,this.$y+c);if(y===o)return g(1);if(y===S)return g(7);var v=(a={},a[N]=d,a[q]=C,a[z]=h,a)[y]||1,p=this.$d.getTime()+c*v;return s.w(p,this)},l.subtract=function(c,i){return this.add(-1*c,i)},l.format=function(c){var i=this,a=this.$locale();if(!this.isValid())return a.invalidDate||X;var u=c||"YYYY-MM-DDTHH:mm:ssZ",y=s.z(this),g=this.$H,v=this.$m,p=this.$M,x=a.weekdays,L=a.months,B=a.meridiem,Y=function(D,w,I,U){return D&&(D[w]||D(i,u))||I[w].slice(0,U)},k=function(D){return s.s(g%12||12,D,"0")},O=B||function(D,w,I){var U=D<12?"AM":"PM";return I?U.toLowerCase():U};return u.replace(ae,function(D,w){return w||function(I){switch(I){case"YY":return String(i.$y).slice(-2);case"YYYY":return s.s(i.$y,4,"0");case"M":return p+1;case"MM":return s.s(p+1,2,"0");case"MMM":return Y(a.monthsShort,p,L,3);case"MMMM":return Y(L,p);case"D":return i.$D;case"DD":return s.s(i.$D,2,"0");case"d":return String(i.$W);case"dd":return Y(a.weekdaysMin,i.$W,x,2);case"ddd":return Y(a.weekdaysShort,i.$W,x,3);case"dddd":return x[i.$W];case"H":return String(g);case"HH":return s.s(g,2,"0");case"h":return k(1);case"hh":return k(2);case"a":return O(g,v,!0);case"A":return O(g,v,!1);case"m":return String(v);case"mm":return s.s(v,2,"0");case"s":return String(i.$s);case"ss":return s.s(i.$s,2,"0");case"SSS":return s.s(i.$ms,3,"0");case"Z":return y}return null}(D)||y.replace(":","")})},l.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},l.diff=function(c,i,a){var u,y=this,g=s.p(i),v=n(c),p=(v.utcOffset()-this.utcOffset())*d,x=this-v,L=function(){return s.m(y,v)};switch(g){case T:u=L()/12;break;case A:u=L();break;case M:u=L()/3;break;case S:u=(x-p)/6048e5;break;case o:u=(x-p)/864e5;break;case q:u=x/C;break;case N:u=x/d;break;case z:u=x/h;break;default:u=x}return a?u:s.a(u)},l.daysInMonth=function(){return this.endOf(A).$D},l.$locale=function(){return K[this.$L]},l.locale=function(c,i){if(!c)return this.$L;var a=this.clone(),u=t(c,i,!0);return u&&(a.$L=u),a},l.clone=function(){return s.w(this.$d,this)},l.toDate=function(){return new Date(this.valueOf())},l.toJSON=function(){return this.isValid()?this.toISOString():null},l.toISOString=function(){return this.$d.toISOString()},l.toString=function(){return this.$d.toUTCString()},_}(),b=m.prototype;return n.prototype=b,[["$ms",$],["$s",z],["$m",N],["$H",q],["$W",o],["$M",A],["$y",T],["$D",Z]].forEach(function(_){b[_[1]]=function(l){return this.$g(l,_[0],_[1])}}),n.extend=function(_,l){return _.$i||(_(l,m,n),_.$i=!0),n},n.locale=t,n.isDayjs=e,n.unix=function(_){return n(1e3*_)},n.en=K[ue],n.Ls=K,n.p={},n})}(_e)),_e.exports}var Be=We();const te=De(Be);var ye={exports:{}},Ue=ye.exports,xe;function He(){return xe||(xe=1,function(f,r){(function(h,d){f.exports=d()})(Ue,function(){var h={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(d,C,$){var z=C.prototype,N=z.format;$.en.formats=h,z.format=function(q){q===void 0&&(q="YYYY-MM-DDTHH:mm:ssZ");var o=this.$locale().formats,S=function(A,M){return A.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(T,Z,X){var ee=X&&X.toUpperCase();return Z||M[X]||h[X]||M[ee].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(ae,oe,V){return oe||V.slice(1)})})}(q,o===void 0?{}:o);return N.call(this,S)}}})}(ye)),ye.exports}var Ye=He();const Pe=De(Ye);te.extend(Pe),Date.prototype.isAfter=function(f,r){return te(this).isAfter(f,r)},Date.prototype.isBefore=function(f,r){return te(this).isBefore(f,r)},Date.prototype.format=function(f){return te(this).format(f)},Date.prototype.isValid=function(){return te(this).isValid()},Date.prototype.add=function(f,r){return te(this).add(f,r).toDate()},Date.prototype.subtract=function(f,r){return te(this).subtract(f,r).toDate()},Date.prototype.firstDayOfMonth=function(){return te(this).startOf("month").toDate()},Date.prototype.lastDayOfMonth=function(){return te(this).endOf("month").toDate()},Date.prototype.set=function(f,r){return te(this).set(f,r).toDate()},Date.prototype.diff=function(f,r){return te(this).diff(f,r)},String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)};var Re=(f=>(f.opera="opera",f.firefox="firefox",f.safari="safari",f.ie="ie",f.edge="edge",f.edg="edg",f.electron="electron",f.chrome="chrome",f.iOsSafari="iOsSafari",f.edgiOs="edgiOs",f.headlessChrome="headlessChrome",f))(Re||{});const ve=[{breakpoint:"xs",screenWidth:0},{breakpoint:"sm",screenWidth:375},{breakpoint:"md",screenWidth:768},{breakpoint:"lg",screenWidth:992},{breakpoint:"xl",screenWidth:1200},{breakpoint:"xxl",screenWidth:1400},{breakpoint:"xxxl",screenWidth:1600}];class qe{screenWidth=0;lastBreakpoint;resizeListener;resizeCallbacks=new Set;constructor(){typeof window<"u"&&(this.screenWidth=window.innerWidth,this.resizeListener=this.onResize.bind(this),window.addEventListener("resize",this.resizeListener),this.lastBreakpoint=this.getBreakpointBySize(this.screenWidth))}destroy(){typeof window<"u"&&window.removeEventListener("resize",this.resizeListener),this.resizeCallbacks.clear()}onBreakpointChange(r){this.resizeCallbacks.add(r)}offBreakpointChange(r){this.resizeCallbacks.delete(r)}getCurrentBrowser(){const r=navigator.userAgent.toLowerCase();if(this.isOpera())return"opera";if(this.isFirefox())return"firefox";if(this.isSafari())return"safari";if(this.isIE())return"ie";if(this.isEdge())return"edge";if(this.isEdg())return"edg";if(this.isElectron(r))return"electron";if(this.isChrome())return"chrome";if(this.isIOsSafari(r))return"iOsSafari";if(this.isEdgiOs(r))return"edgiOs";if(this.isHeadlessChrome(r))return"headlessChrome";throw new Error("Browser could not be detected: "+r)}getBreakpointBySize(r=this.screenWidth){let h=ve[0];for(const d of ve)d.screenWidth<=r&&(h=d);return h}isScreenGreaterThan(r){const h=this.getBreakpoint(r);return this.screenWidth>(h?.screenWidth??0)}isScreenSmallerThan(r){const h=this.getBreakpoint(r);return this.screenWidth<(h?.screenWidth??0)}getBreakpoint(r){return ve.find(h=>h.breakpoint===r)}isOpera(){return typeof window<"u"&&(!!window.opr&&!!window.opr.addons||!!window.opera||navigator.userAgent.includes("OPR/"))}isFirefox(){return typeof InstallTrigger<"u"}isSafari(){return/constructor/i.test(window.HTMLElement)||(r=>r.toString()==="[object SafariRemoteNotification]")(!window.safari||window.safari&&window.safari.pushNotification)}isIE(){return!!document.documentMode}isEdge(){return!this.isIE()&&!!window.StyleMedia}isEdg(){return navigator.userAgent.toLowerCase().includes("edg")}isElectron(r){return r.includes("electron")}isChrome(){return typeof window<"u"&&!!window.chrome&&!this.isOpera()&&!this.isEdge()&&!this.isEdg()&&!this.isFirefox()&&!this.isSafari()&&!this.isIE()}isIOsSafari(r){return r.includes("iphone")||r.includes("ipad")||r.includes("macintosh")&&"ontouchend"in document&&r.includes("safari")}isEdgiOs(r){return r.includes("edgios")}isHeadlessChrome(r){return r.includes("headlesschrome")}onResize(r){const h=r.target.innerWidth;this.screenWidth=h;const d=this.getBreakpointBySize(h);this.lastBreakpoint?.breakpoint!==d?.breakpoint&&(this.lastBreakpoint=d,this.resizeCallbacks.forEach(C=>C(d)))}}class Ne{copy(r){return navigator.clipboard.writeText(r)}}var we={exports:{}},Ke=we.exports,$e;function Je(){return $e||($e=1,function(f,r){(function(h,d){d()})(Ke,function(){function h(o,S){return typeof S>"u"?S={autoBom:!1}:typeof S!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),S={autoBom:!S}),S.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(o.type)?new Blob(["\uFEFF",o],{type:o.type}):o}function d(o,S,A){var M=new XMLHttpRequest;M.open("GET",o),M.responseType="blob",M.onload=function(){q(M.response,S,A)},M.onerror=function(){console.error("could not download file")},M.send()}function C(o){var S=new XMLHttpRequest;S.open("HEAD",o,!1);try{S.send()}catch{}return 200<=S.status&&299>=S.status}function $(o){try{o.dispatchEvent(new MouseEvent("click"))}catch{var S=document.createEvent("MouseEvents");S.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),o.dispatchEvent(S)}}var z=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof me=="object"&&me.global===me?me:void 0,N=z.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),q=z.saveAs||(typeof window!="object"||window!==z?function(){}:"download"in HTMLAnchorElement.prototype&&!N?function(o,S,A){var M=z.URL||z.webkitURL,T=document.createElement("a");S=S||o.name||"download",T.download=S,T.rel="noopener",typeof o=="string"?(T.href=o,T.origin===location.origin?$(T):C(T.href)?d(o,S,A):$(T,T.target="_blank")):(T.href=M.createObjectURL(o),setTimeout(function(){M.revokeObjectURL(T.href)},4e4),setTimeout(function(){$(T)},0))}:"msSaveOrOpenBlob"in navigator?function(o,S,A){if(S=S||o.name||"download",typeof o!="string")navigator.msSaveOrOpenBlob(h(o,A),S);else if(C(o))d(o,S,A);else{var M=document.createElement("a");M.href=o,M.target="_blank",setTimeout(function(){$(M)})}}:function(o,S,A,M){if(M=M||open("","_blank"),M&&(M.document.title=M.document.body.innerText="downloading..."),typeof o=="string")return d(o,S,A);var T=o.type==="application/octet-stream",Z=/constructor/i.test(z.HTMLElement)||z.safari,X=/CriOS\/[\d]+/.test(navigator.userAgent);if((X||T&&Z||N)&&typeof FileReader<"u"){var ee=new FileReader;ee.onloadend=function(){var V=ee.result;V=X?V:V.replace(/^data:[^;]*;/,"data:attachment/file;"),M?M.location.href=V:location=V,M=null},ee.readAsDataURL(o)}else{var ae=z.URL||z.webkitURL,oe=ae.createObjectURL(o);M?M.location=oe:location.href=oe,M=null,setTimeout(function(){ae.revokeObjectURL(oe)},4e4)}});z.saveAs=q.saveAs=q,f.exports=q})}(we)),we.exports}var Qe=Je(),Se={exports:{}};/* @license
1
+ (function(Q,de){typeof exports=="object"&&typeof module<"u"?de(exports):typeof define=="function"&&define.amd?define(["exports"],de):(Q=typeof globalThis<"u"?globalThis:Q||self,de(Q["ts-utils"]={}))})(this,function(Q){"use strict";const de=(h,r,f)=>h.localeCompare(r)*(f?1:-1),Fe=(h,r)=>h<r?-1:h===r?0:1,Ie=(h,r,f)=>Fe(h,r)*(f?1:-1),je=(h,r,f)=>{let d=0;return typeof h=="string"&&typeof r=="string"?d=de(h,r,f):d=Ie(h,r,f),d},Oe=(h,r,f,d)=>{const C=f(h),$=f(r);return je(C,$,d)};Array.prototype.groupBy=function(h){return this.reduce((r,f)=>{const d=h(f);return(r[d]=r[d]||[]).push(f),r},{})},Array.prototype.removeBy=function(h,r){return this.filter(f=>h(f)!==r)},Array.prototype.orderBy=function(h,r=!0){return this?.sort((f,d)=>Oe(f,d,h,r)),this},Array.prototype.filterBy=function(h){return this.filter(r=>{let f=!1;return h&&r[h]?f=r[h]===h:f=r===h,f})},Array.prototype.distinct=function(h){const r=this;return h?r.filter((d,C,$)=>$.findIndex(z=>h(z,d))===C):r.filter((d,C,$)=>$.indexOf(d)===C)};var me=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function De(h){return h&&h.__esModule&&Object.prototype.hasOwnProperty.call(h,"default")?h.default:h}var _e={exports:{}},ze=_e.exports,Me;function We(){return Me||(Me=1,function(h,r){(function(f,d){h.exports=d()})(ze,function(){var f=1e3,d=6e4,C=36e5,$="millisecond",z="second",N="minute",q="hour",o="day",S="week",A="month",M="quarter",T="year",Z="date",X="Invalid Date",ee=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,ae=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,oe={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(_){var l=["th","st","nd","rd"],c=_%100;return"["+_+(l[(c-20)%10]||l[c]||l[0])+"]"}},V=function(_,l,c){var i=String(_);return!i||i.length>=l?_:""+Array(l+1-i.length).join(c)+_},Se={s:V,z:function(_){var l=-_.utcOffset(),c=Math.abs(l),i=Math.floor(c/60),a=c%60;return(l<=0?"+":"-")+V(i,2,"0")+":"+V(a,2,"0")},m:function _(l,c){if(l.date()<c.date())return-_(c,l);var i=12*(c.year()-l.year())+(c.month()-l.month()),a=l.clone().add(i,A),u=c-a<0,y=l.clone().add(i+(u?-1:1),A);return+(-(i+(c-a)/(u?a-y:y-a))||0)},a:function(_){return _<0?Math.ceil(_)||0:Math.floor(_)},p:function(_){return{M:A,y:T,w:S,d:o,D:Z,h:q,m:N,s:z,ms:$,Q:M}[_]||String(_||"").toLowerCase().replace(/s$/,"")},u:function(_){return _===void 0}},ue="en",K={};K[ue]=oe;var F="$isDayjsObject",e=function(_){return _ instanceof m||!(!_||!_[F])},t=function _(l,c,i){var a;if(!l)return ue;if(typeof l=="string"){var u=l.toLowerCase();K[u]&&(a=u),c&&(K[u]=c,a=u);var y=l.split("-");if(!a&&y.length>1)return _(y[0])}else{var g=l.name;K[g]=l,a=g}return!i&&a&&(ue=a),a||!i&&ue},n=function(_,l){if(e(_))return _.clone();var c=typeof l=="object"?l:{};return c.date=_,c.args=arguments,new m(c)},s=Se;s.l=t,s.i=e,s.w=function(_,l){return n(_,{locale:l.$L,utc:l.$u,x:l.$x,$offset:l.$offset})};var m=function(){function _(c){this.$L=t(c.locale,null,!0),this.parse(c),this.$x=this.$x||c.x||{},this[F]=!0}var l=_.prototype;return l.parse=function(c){this.$d=function(i){var a=i.date,u=i.utc;if(a===null)return new Date(NaN);if(s.u(a))return new Date;if(a instanceof Date)return new Date(a);if(typeof a=="string"&&!/Z$/i.test(a)){var y=a.match(ee);if(y){var g=y[2]-1||0,v=(y[7]||"0").substring(0,3);return u?new Date(Date.UTC(y[1],g,y[3]||1,y[4]||0,y[5]||0,y[6]||0,v)):new Date(y[1],g,y[3]||1,y[4]||0,y[5]||0,y[6]||0,v)}}return new Date(a)}(c),this.init()},l.init=function(){var c=this.$d;this.$y=c.getFullYear(),this.$M=c.getMonth(),this.$D=c.getDate(),this.$W=c.getDay(),this.$H=c.getHours(),this.$m=c.getMinutes(),this.$s=c.getSeconds(),this.$ms=c.getMilliseconds()},l.$utils=function(){return s},l.isValid=function(){return this.$d.toString()!==X},l.isSame=function(c,i){var a=n(c);return this.startOf(i)<=a&&a<=this.endOf(i)},l.isAfter=function(c,i){return n(c)<this.startOf(i)},l.isBefore=function(c,i){return this.endOf(i)<n(c)},l.$g=function(c,i,a){return s.u(c)?this[i]:this.set(a,c)},l.unix=function(){return Math.floor(this.valueOf()/1e3)},l.valueOf=function(){return this.$d.getTime()},l.startOf=function(c,i){var a=this,u=!!s.u(i)||i,y=s.p(c),g=function(O,D){var w=s.w(a.$u?Date.UTC(a.$y,D,O):new Date(a.$y,D,O),a);return u?w:w.endOf(o)},v=function(O,D){return s.w(a.toDate()[O].apply(a.toDate("s"),(u?[0,0,0,0]:[23,59,59,999]).slice(D)),a)},p=this.$W,x=this.$M,L=this.$D,B="set"+(this.$u?"UTC":"");switch(y){case T:return u?g(1,0):g(31,11);case A:return u?g(1,x):g(0,x+1);case S:var Y=this.$locale().weekStart||0,k=(p<Y?p+7:p)-Y;return g(u?L-k:L+(6-k),x);case o:case Z:return v(B+"Hours",0);case q:return v(B+"Minutes",1);case N:return v(B+"Seconds",2);case z:return v(B+"Milliseconds",3);default:return this.clone()}},l.endOf=function(c){return this.startOf(c,!1)},l.$set=function(c,i){var a,u=s.p(c),y="set"+(this.$u?"UTC":""),g=(a={},a[o]=y+"Date",a[Z]=y+"Date",a[A]=y+"Month",a[T]=y+"FullYear",a[q]=y+"Hours",a[N]=y+"Minutes",a[z]=y+"Seconds",a[$]=y+"Milliseconds",a)[u],v=u===o?this.$D+(i-this.$W):i;if(u===A||u===T){var p=this.clone().set(Z,1);p.$d[g](v),p.init(),this.$d=p.set(Z,Math.min(this.$D,p.daysInMonth())).$d}else g&&this.$d[g](v);return this.init(),this},l.set=function(c,i){return this.clone().$set(c,i)},l.get=function(c){return this[s.p(c)]()},l.add=function(c,i){var a,u=this;c=Number(c);var y=s.p(i),g=function(x){var L=n(u);return s.w(L.date(L.date()+Math.round(x*c)),u)};if(y===A)return this.set(A,this.$M+c);if(y===T)return this.set(T,this.$y+c);if(y===o)return g(1);if(y===S)return g(7);var v=(a={},a[N]=d,a[q]=C,a[z]=f,a)[y]||1,p=this.$d.getTime()+c*v;return s.w(p,this)},l.subtract=function(c,i){return this.add(-1*c,i)},l.format=function(c){var i=this,a=this.$locale();if(!this.isValid())return a.invalidDate||X;var u=c||"YYYY-MM-DDTHH:mm:ssZ",y=s.z(this),g=this.$H,v=this.$m,p=this.$M,x=a.weekdays,L=a.months,B=a.meridiem,Y=function(D,w,I,U){return D&&(D[w]||D(i,u))||I[w].slice(0,U)},k=function(D){return s.s(g%12||12,D,"0")},O=B||function(D,w,I){var U=D<12?"AM":"PM";return I?U.toLowerCase():U};return u.replace(ae,function(D,w){return w||function(I){switch(I){case"YY":return String(i.$y).slice(-2);case"YYYY":return s.s(i.$y,4,"0");case"M":return p+1;case"MM":return s.s(p+1,2,"0");case"MMM":return Y(a.monthsShort,p,L,3);case"MMMM":return Y(L,p);case"D":return i.$D;case"DD":return s.s(i.$D,2,"0");case"d":return String(i.$W);case"dd":return Y(a.weekdaysMin,i.$W,x,2);case"ddd":return Y(a.weekdaysShort,i.$W,x,3);case"dddd":return x[i.$W];case"H":return String(g);case"HH":return s.s(g,2,"0");case"h":return k(1);case"hh":return k(2);case"a":return O(g,v,!0);case"A":return O(g,v,!1);case"m":return String(v);case"mm":return s.s(v,2,"0");case"s":return String(i.$s);case"ss":return s.s(i.$s,2,"0");case"SSS":return s.s(i.$ms,3,"0");case"Z":return y}return null}(D)||y.replace(":","")})},l.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},l.diff=function(c,i,a){var u,y=this,g=s.p(i),v=n(c),p=(v.utcOffset()-this.utcOffset())*d,x=this-v,L=function(){return s.m(y,v)};switch(g){case T:u=L()/12;break;case A:u=L();break;case M:u=L()/3;break;case S:u=(x-p)/6048e5;break;case o:u=(x-p)/864e5;break;case q:u=x/C;break;case N:u=x/d;break;case z:u=x/f;break;default:u=x}return a?u:s.a(u)},l.daysInMonth=function(){return this.endOf(A).$D},l.$locale=function(){return K[this.$L]},l.locale=function(c,i){if(!c)return this.$L;var a=this.clone(),u=t(c,i,!0);return u&&(a.$L=u),a},l.clone=function(){return s.w(this.$d,this)},l.toDate=function(){return new Date(this.valueOf())},l.toJSON=function(){return this.isValid()?this.toISOString():null},l.toISOString=function(){return this.$d.toISOString()},l.toString=function(){return this.$d.toUTCString()},_}(),b=m.prototype;return n.prototype=b,[["$ms",$],["$s",z],["$m",N],["$H",q],["$W",o],["$M",A],["$y",T],["$D",Z]].forEach(function(_){b[_[1]]=function(l){return this.$g(l,_[0],_[1])}}),n.extend=function(_,l){return _.$i||(_(l,m,n),_.$i=!0),n},n.locale=t,n.isDayjs=e,n.unix=function(_){return n(1e3*_)},n.en=K[ue],n.Ls=K,n.p={},n})}(_e)),_e.exports}var Be=We();const te=De(Be);var ye={exports:{}},Ue=ye.exports,xe;function He(){return xe||(xe=1,function(h,r){(function(f,d){h.exports=d()})(Ue,function(){var f={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(d,C,$){var z=C.prototype,N=z.format;$.en.formats=f,z.format=function(q){q===void 0&&(q="YYYY-MM-DDTHH:mm:ssZ");var o=this.$locale().formats,S=function(A,M){return A.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(T,Z,X){var ee=X&&X.toUpperCase();return Z||M[X]||f[X]||M[ee].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(ae,oe,V){return oe||V.slice(1)})})}(q,o===void 0?{}:o);return N.call(this,S)}}})}(ye)),ye.exports}var Ye=He();const Pe=De(Ye);te.extend(Pe),Date.prototype.isAfter=function(h,r){return te(this).isAfter(h,r)},Date.prototype.isBefore=function(h,r){return te(this).isBefore(h,r)},Date.prototype.format=function(h){return te(this).format(h)},Date.prototype.isValid=function(){return te(this).isValid()},Date.prototype.add=function(h,r){return te(this).add(h,r).toDate()},Date.prototype.subtract=function(h,r){return te(this).subtract(h,r).toDate()},Date.prototype.firstDayOfMonth=function(){return te(this).startOf("month").toDate()},Date.prototype.lastDayOfMonth=function(){return te(this).endOf("month").toDate()},Date.prototype.set=function(h,r){return te(this).set(h,r).toDate()},Date.prototype.diff=function(h,r){return te(this).diff(h,r)},String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)};var Re=(h=>(h.opera="opera",h.firefox="firefox",h.safari="safari",h.ie="ie",h.edge="edge",h.edg="edg",h.electron="electron",h.chrome="chrome",h.iOsSafari="iOsSafari",h.edgiOs="edgiOs",h.headlessChrome="headlessChrome",h))(Re||{});const ke=[{breakpoint:"xs",screenWidth:0},{breakpoint:"sm",screenWidth:576},{breakpoint:"md",screenWidth:768},{breakpoint:"lg",screenWidth:992},{breakpoint:"xl",screenWidth:1200},{breakpoint:"xxl",screenWidth:1400},{breakpoint:"xxxl",screenWidth:1600}];class qe{screenWidth=0;lastBreakpoint;resizeListener;resizeCallbacks=new Set;constructor(){typeof window<"u"&&(this.screenWidth=window.innerWidth,this.resizeListener=this.onResize.bind(this),window.addEventListener("resize",this.resizeListener),this.lastBreakpoint=this.getBreakpointBySize(this.screenWidth))}destroy(){typeof window<"u"&&window.removeEventListener("resize",this.resizeListener),this.resizeCallbacks.clear()}onBreakpointChange(r){this.resizeCallbacks.add(r)}offBreakpointChange(r){this.resizeCallbacks.delete(r)}getCurrentBrowser(){const r=navigator.userAgent.toLowerCase();if(this.isOpera())return"opera";if(this.isFirefox())return"firefox";if(this.isSafari())return"safari";if(this.isIE())return"ie";if(this.isEdge())return"edge";if(this.isEdg())return"edg";if(this.isElectron(r))return"electron";if(this.isChrome())return"chrome";if(this.isIOsSafari(r))return"iOsSafari";if(this.isEdgiOs(r))return"edgiOs";if(this.isHeadlessChrome(r))return"headlessChrome";throw new Error("Browser could not be detected: "+r)}getBreakpointBySize(r=this.screenWidth){let f;for(const d of ke)d.screenWidth<=r&&(f=d);return f}isScreenGreaterThan(r){const f=this.getBreakpoint(r);return this.screenWidth>(f?.screenWidth??0)}isScreenSmallerThan(r){const f=this.getBreakpoint(r);return this.screenWidth<(f?.screenWidth??0)}getBreakpoint(r){return ke.find(f=>f.breakpoint===r)}isOpera(){return typeof window<"u"&&(!!window.opr&&!!window.opr.addons||!!window.opera||navigator.userAgent.includes("OPR/"))}isFirefox(){return typeof InstallTrigger<"u"}isSafari(){return/constructor/i.test(window.HTMLElement)||(r=>r.toString()==="[object SafariRemoteNotification]")(!window.safari||window.safari&&window.safari.pushNotification)}isIE(){return!!document.documentMode}isEdge(){return!this.isIE()&&!!window.StyleMedia}isEdg(){return navigator.userAgent.toLowerCase().includes("edg")}isElectron(r){return r.includes("electron")}isChrome(){return typeof window<"u"&&!!window.chrome&&!this.isOpera()&&!this.isEdge()&&!this.isEdg()&&!this.isFirefox()&&!this.isSafari()&&!this.isIE()}isIOsSafari(r){return r.includes("iphone")||r.includes("ipad")||r.includes("macintosh")&&"ontouchend"in document&&r.includes("safari")}isEdgiOs(r){return r.includes("edgios")}isHeadlessChrome(r){return r.includes("headlesschrome")}onResize(r){const f=r.target.innerWidth;this.screenWidth=f;const d=this.getBreakpointBySize(f);this.lastBreakpoint?.breakpoint!==d?.breakpoint&&(this.lastBreakpoint=d,this.resizeCallbacks.forEach(C=>C(d)))}}class Ne{copy(r){return navigator.clipboard.writeText(r)}}var ve={exports:{}},Ke=ve.exports,$e;function Je(){return $e||($e=1,function(h,r){(function(f,d){d()})(Ke,function(){function f(o,S){return typeof S>"u"?S={autoBom:!1}:typeof S!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),S={autoBom:!S}),S.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(o.type)?new Blob(["\uFEFF",o],{type:o.type}):o}function d(o,S,A){var M=new XMLHttpRequest;M.open("GET",o),M.responseType="blob",M.onload=function(){q(M.response,S,A)},M.onerror=function(){console.error("could not download file")},M.send()}function C(o){var S=new XMLHttpRequest;S.open("HEAD",o,!1);try{S.send()}catch{}return 200<=S.status&&299>=S.status}function $(o){try{o.dispatchEvent(new MouseEvent("click"))}catch{var S=document.createEvent("MouseEvents");S.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),o.dispatchEvent(S)}}var z=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof me=="object"&&me.global===me?me:void 0,N=z.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),q=z.saveAs||(typeof window!="object"||window!==z?function(){}:"download"in HTMLAnchorElement.prototype&&!N?function(o,S,A){var M=z.URL||z.webkitURL,T=document.createElement("a");S=S||o.name||"download",T.download=S,T.rel="noopener",typeof o=="string"?(T.href=o,T.origin===location.origin?$(T):C(T.href)?d(o,S,A):$(T,T.target="_blank")):(T.href=M.createObjectURL(o),setTimeout(function(){M.revokeObjectURL(T.href)},4e4),setTimeout(function(){$(T)},0))}:"msSaveOrOpenBlob"in navigator?function(o,S,A){if(S=S||o.name||"download",typeof o!="string")navigator.msSaveOrOpenBlob(f(o,A),S);else if(C(o))d(o,S,A);else{var M=document.createElement("a");M.href=o,M.target="_blank",setTimeout(function(){$(M)})}}:function(o,S,A,M){if(M=M||open("","_blank"),M&&(M.document.title=M.document.body.innerText="downloading..."),typeof o=="string")return d(o,S,A);var T=o.type==="application/octet-stream",Z=/constructor/i.test(z.HTMLElement)||z.safari,X=/CriOS\/[\d]+/.test(navigator.userAgent);if((X||T&&Z||N)&&typeof FileReader<"u"){var ee=new FileReader;ee.onloadend=function(){var V=ee.result;V=X?V:V.replace(/^data:[^;]*;/,"data:attachment/file;"),M?M.location.href=V:location=V,M=null},ee.readAsDataURL(o)}else{var ae=z.URL||z.webkitURL,oe=ae.createObjectURL(o);M?M.location=oe:location.href=oe,M=null,setTimeout(function(){ae.revokeObjectURL(oe)},4e4)}});z.saveAs=q.saveAs=q,h.exports=q})}(ve)),ve.exports}var Qe=Je(),we={exports:{}};/* @license
2
2
  Papa Parse
3
3
  v5.5.3
4
4
  https://github.com/mholt/PapaParse
5
5
  License: MIT
6
- */var Ze=Se.exports,Ce;function Ve(){return Ce||(Ce=1,function(f,r){((h,d)=>{f.exports=d()})(Ze,function h(){var d=typeof self<"u"?self:typeof window<"u"?window:d!==void 0?d:{},C,$=!d.document&&!!d.postMessage,z=d.IS_PAPA_WORKER||!1,N={},q=0,o={};function S(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(t){var n=ue(t);n.chunkSize=parseInt(n.chunkSize),t.step||t.chunk||(n.chunkSize=null),this._handle=new X(n),(this._handle.streamer=this)._config=n}).call(this,e),this.parseChunk=function(t,n){var s=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<s){let b=this._config.newline;b||(m=this._config.quoteChar||'"',b=this._handle.guessLineEndings(t,m)),t=[...t.split(b).slice(s)].join(b)}this.isFirstChunk&&F(this._config.beforeFirstChunk)&&(m=this._config.beforeFirstChunk(t))!==void 0&&(t=m),this.isFirstChunk=!1,this._halted=!1;var s=this._partialLine+t,m=(this._partialLine="",this._handle.parse(s,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(t=m.meta.cursor,s=(this._finished||(this._partialLine=s.substring(t-this._baseIndex),this._baseIndex=t),m&&m.data&&(this._rowCount+=m.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),z)d.postMessage({results:m,workerId:o.WORKER_ID,finished:s});else if(F(this._config.chunk)&&!n){if(this._config.chunk(m,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=m=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(m.data),this._completeResults.errors=this._completeResults.errors.concat(m.errors),this._completeResults.meta=m.meta),this._completed||!s||!F(this._config.complete)||m&&m.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),s||m&&m.meta.paused||this._nextChunk(),m}this._halted=!0},this._sendError=function(t){F(this._config.error)?this._config.error(t):z&&this._config.error&&d.postMessage({workerId:o.WORKER_ID,error:t,finished:!1})}}function A(e){var t;(e=e||{}).chunkSize||(e.chunkSize=o.RemoteChunkSize),S.call(this,e),this._nextChunk=$?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(n){this._input=n,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),$||(t.onload=K(this._chunkLoaded,this),t.onerror=K(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!$),this._config.downloadRequestHeaders){var n,s=this._config.downloadRequestHeaders;for(n in s)t.setRequestHeader(n,s[n])}var m;this._config.chunkSize&&(m=this._start+this._config.chunkSize-1,t.setRequestHeader("Range","bytes="+this._start+"-"+m));try{t.send(this._config.downloadRequestBody)}catch(b){this._chunkError(b.message)}$&&t.status===0&&this._chunkError()}},this._chunkLoaded=function(){t.readyState===4&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize||t.responseText.length,this._finished=!this._config.chunkSize||this._start>=(n=>(n=n.getResponseHeader("Content-Range"))!==null?parseInt(n.substring(n.lastIndexOf("/")+1)):-1)(t),this.parseChunk(t.responseText)))},this._chunkError=function(n){n=t.statusText||n,this._sendError(new Error(n))}}function M(e){(e=e||{}).chunkSize||(e.chunkSize=o.LocalChunkSize),S.call(this,e);var t,n,s=typeof FileReader<"u";this.stream=function(m){this._input=m,n=m.slice||m.webkitSlice||m.mozSlice,s?((t=new FileReader).onload=K(this._chunkLoaded,this),t.onerror=K(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var m=this._input,b=(this._config.chunkSize&&(b=Math.min(this._start+this._config.chunkSize,this._input.size),m=n.call(m,this._start,b)),t.readAsText(m,this._config.encoding));s||this._chunkLoaded({target:{result:b}})},this._chunkLoaded=function(m){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(m.target.result)},this._chunkError=function(){this._sendError(t.error)}}function T(e){var t;S.call(this,e=e||{}),this.stream=function(n){return t=n,this._nextChunk()},this._nextChunk=function(){var n,s;if(!this._finished)return n=this._config.chunkSize,t=n?(s=t.substring(0,n),t.substring(n)):(s=t,""),this._finished=!t,this.parseChunk(s)}}function Z(e){S.call(this,e=e||{});var t=[],n=!0,s=!1;this.pause=function(){S.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){S.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(m){this._input=m,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){s&&t.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=K(function(m){try{t.push(typeof m=="string"?m:m.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(b){this._streamError(b)}},this),this._streamError=K(function(m){this._streamCleanUp(),this._sendError(m)},this),this._streamEnd=K(function(){this._streamCleanUp(),s=!0,this._streamData("")},this),this._streamCleanUp=K(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function X(e){var t,n,s,m,b=Math.pow(2,53),_=-b,l=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,c=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,i=this,a=0,u=0,y=!1,g=!1,v=[],p={data:[],errors:[],meta:{}};function x(k){return e.skipEmptyLines==="greedy"?k.join("").trim()==="":k.length===1&&k[0].length===0}function L(){if(p&&s&&(Y("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),s=!1),e.skipEmptyLines&&(p.data=p.data.filter(function(w){return!x(w)})),B()){let w=function(I,U){F(e.transformHeader)&&(I=e.transformHeader(I,U)),v.push(I)};if(p)if(Array.isArray(p.data[0])){for(var k=0;B()&&k<p.data.length;k++)p.data[k].forEach(w);p.data.splice(0,1)}else p.data.forEach(w)}function O(w,I){for(var U=e.header?{}:[],j=0;j<w.length;j++){var W=j,R=w[j],R=((re,E)=>(H=>(e.dynamicTypingFunction&&e.dynamicTyping[H]===void 0&&(e.dynamicTyping[H]=e.dynamicTypingFunction(H)),(e.dynamicTyping[H]||e.dynamicTyping)===!0))(re)?E==="true"||E==="TRUE"||E!=="false"&&E!=="FALSE"&&((H=>{if(l.test(H)&&(H=parseFloat(H),_<H&&H<b))return 1})(E)?parseFloat(E):c.test(E)?new Date(E):E===""?null:E):E)(W=e.header?j>=v.length?"__parsed_extra":v[j]:W,R=e.transform?e.transform(R,W):R);W==="__parsed_extra"?(U[W]=U[W]||[],U[W].push(R)):U[W]=R}return e.header&&(j>v.length?Y("FieldMismatch","TooManyFields","Too many fields: expected "+v.length+" fields but parsed "+j,u+I):j<v.length&&Y("FieldMismatch","TooFewFields","Too few fields: expected "+v.length+" fields but parsed "+j,u+I)),U}var D;p&&(e.header||e.dynamicTyping||e.transform)&&(D=1,!p.data.length||Array.isArray(p.data[0])?(p.data=p.data.map(O),D=p.data.length):p.data=O(p.data,0),e.header&&p.meta&&(p.meta.fields=v),u+=D)}function B(){return e.header&&v.length===0}function Y(k,O,D,w){k={type:k,code:O,message:D},w!==void 0&&(k.row=w),p.errors.push(k)}F(e.step)&&(m=e.step,e.step=function(k){p=k,B()?L():(L(),p.data.length!==0&&(a+=k.data.length,e.preview&&a>e.preview?n.abort():(p.data=p.data[0],m(p,i))))}),this.parse=function(k,O,D){var w=e.quoteChar||'"',w=(e.newline||(e.newline=this.guessLineEndings(k,w)),s=!1,e.delimiter?F(e.delimiter)&&(e.delimiter=e.delimiter(k),p.meta.delimiter=e.delimiter):((w=((I,U,j,W,R)=>{var re,E,H,fe;R=R||[","," ","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var he=0;he<R.length;he++){for(var ne,pe=R[he],J=0,ie=0,P=0,G=(H=void 0,new ae({comments:W,delimiter:pe,newline:U,preview:10}).parse(I)),ce=0;ce<G.data.length;ce++)j&&x(G.data[ce])?P++:(ne=G.data[ce].length,ie+=ne,H===void 0?H=ne:0<ne&&(J+=Math.abs(ne-H),H=ne));0<G.data.length&&(ie/=G.data.length-P),(E===void 0||J<=E)&&(fe===void 0||fe<ie)&&1.99<ie&&(E=J,re=pe,fe=ie)}return{successful:!!(e.delimiter=re),bestDelimiter:re}})(k,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess)).successful?e.delimiter=w.bestDelimiter:(s=!0,e.delimiter=o.DefaultDelimiter),p.meta.delimiter=e.delimiter),ue(e));return e.preview&&e.header&&w.preview++,t=k,n=new ae(w),p=n.parse(t,O,D),L(),y?{meta:{paused:!0}}:p||{meta:{paused:!1}}},this.paused=function(){return y},this.pause=function(){y=!0,n.abort(),t=F(e.chunk)?"":t.substring(n.getCharIndex())},this.resume=function(){i.streamer._halted?(y=!1,i.streamer.parseChunk(t,!0)):setTimeout(i.resume,3)},this.aborted=function(){return g},this.abort=function(){g=!0,n.abort(),p.meta.aborted=!0,F(e.complete)&&e.complete(p),t=""},this.guessLineEndings=function(I,w){I=I.substring(0,1048576);var w=new RegExp(ee(w)+"([^]*?)"+ee(w),"gm"),D=(I=I.replace(w,"")).split("\r"),w=I.split(`
6
+ */var Ze=we.exports,Ce;function Ve(){return Ce||(Ce=1,function(h,r){((f,d)=>{h.exports=d()})(Ze,function f(){var d=typeof self<"u"?self:typeof window<"u"?window:d!==void 0?d:{},C,$=!d.document&&!!d.postMessage,z=d.IS_PAPA_WORKER||!1,N={},q=0,o={};function S(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(t){var n=ue(t);n.chunkSize=parseInt(n.chunkSize),t.step||t.chunk||(n.chunkSize=null),this._handle=new X(n),(this._handle.streamer=this)._config=n}).call(this,e),this.parseChunk=function(t,n){var s=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<s){let b=this._config.newline;b||(m=this._config.quoteChar||'"',b=this._handle.guessLineEndings(t,m)),t=[...t.split(b).slice(s)].join(b)}this.isFirstChunk&&F(this._config.beforeFirstChunk)&&(m=this._config.beforeFirstChunk(t))!==void 0&&(t=m),this.isFirstChunk=!1,this._halted=!1;var s=this._partialLine+t,m=(this._partialLine="",this._handle.parse(s,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(t=m.meta.cursor,s=(this._finished||(this._partialLine=s.substring(t-this._baseIndex),this._baseIndex=t),m&&m.data&&(this._rowCount+=m.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),z)d.postMessage({results:m,workerId:o.WORKER_ID,finished:s});else if(F(this._config.chunk)&&!n){if(this._config.chunk(m,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=m=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(m.data),this._completeResults.errors=this._completeResults.errors.concat(m.errors),this._completeResults.meta=m.meta),this._completed||!s||!F(this._config.complete)||m&&m.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),s||m&&m.meta.paused||this._nextChunk(),m}this._halted=!0},this._sendError=function(t){F(this._config.error)?this._config.error(t):z&&this._config.error&&d.postMessage({workerId:o.WORKER_ID,error:t,finished:!1})}}function A(e){var t;(e=e||{}).chunkSize||(e.chunkSize=o.RemoteChunkSize),S.call(this,e),this._nextChunk=$?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(n){this._input=n,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),$||(t.onload=K(this._chunkLoaded,this),t.onerror=K(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!$),this._config.downloadRequestHeaders){var n,s=this._config.downloadRequestHeaders;for(n in s)t.setRequestHeader(n,s[n])}var m;this._config.chunkSize&&(m=this._start+this._config.chunkSize-1,t.setRequestHeader("Range","bytes="+this._start+"-"+m));try{t.send(this._config.downloadRequestBody)}catch(b){this._chunkError(b.message)}$&&t.status===0&&this._chunkError()}},this._chunkLoaded=function(){t.readyState===4&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize||t.responseText.length,this._finished=!this._config.chunkSize||this._start>=(n=>(n=n.getResponseHeader("Content-Range"))!==null?parseInt(n.substring(n.lastIndexOf("/")+1)):-1)(t),this.parseChunk(t.responseText)))},this._chunkError=function(n){n=t.statusText||n,this._sendError(new Error(n))}}function M(e){(e=e||{}).chunkSize||(e.chunkSize=o.LocalChunkSize),S.call(this,e);var t,n,s=typeof FileReader<"u";this.stream=function(m){this._input=m,n=m.slice||m.webkitSlice||m.mozSlice,s?((t=new FileReader).onload=K(this._chunkLoaded,this),t.onerror=K(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var m=this._input,b=(this._config.chunkSize&&(b=Math.min(this._start+this._config.chunkSize,this._input.size),m=n.call(m,this._start,b)),t.readAsText(m,this._config.encoding));s||this._chunkLoaded({target:{result:b}})},this._chunkLoaded=function(m){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(m.target.result)},this._chunkError=function(){this._sendError(t.error)}}function T(e){var t;S.call(this,e=e||{}),this.stream=function(n){return t=n,this._nextChunk()},this._nextChunk=function(){var n,s;if(!this._finished)return n=this._config.chunkSize,t=n?(s=t.substring(0,n),t.substring(n)):(s=t,""),this._finished=!t,this.parseChunk(s)}}function Z(e){S.call(this,e=e||{});var t=[],n=!0,s=!1;this.pause=function(){S.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){S.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(m){this._input=m,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){s&&t.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=K(function(m){try{t.push(typeof m=="string"?m:m.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(b){this._streamError(b)}},this),this._streamError=K(function(m){this._streamCleanUp(),this._sendError(m)},this),this._streamEnd=K(function(){this._streamCleanUp(),s=!0,this._streamData("")},this),this._streamCleanUp=K(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function X(e){var t,n,s,m,b=Math.pow(2,53),_=-b,l=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,c=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,i=this,a=0,u=0,y=!1,g=!1,v=[],p={data:[],errors:[],meta:{}};function x(k){return e.skipEmptyLines==="greedy"?k.join("").trim()==="":k.length===1&&k[0].length===0}function L(){if(p&&s&&(Y("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),s=!1),e.skipEmptyLines&&(p.data=p.data.filter(function(w){return!x(w)})),B()){let w=function(I,U){F(e.transformHeader)&&(I=e.transformHeader(I,U)),v.push(I)};if(p)if(Array.isArray(p.data[0])){for(var k=0;B()&&k<p.data.length;k++)p.data[k].forEach(w);p.data.splice(0,1)}else p.data.forEach(w)}function O(w,I){for(var U=e.header?{}:[],j=0;j<w.length;j++){var W=j,R=w[j],R=((re,E)=>(H=>(e.dynamicTypingFunction&&e.dynamicTyping[H]===void 0&&(e.dynamicTyping[H]=e.dynamicTypingFunction(H)),(e.dynamicTyping[H]||e.dynamicTyping)===!0))(re)?E==="true"||E==="TRUE"||E!=="false"&&E!=="FALSE"&&((H=>{if(l.test(H)&&(H=parseFloat(H),_<H&&H<b))return 1})(E)?parseFloat(E):c.test(E)?new Date(E):E===""?null:E):E)(W=e.header?j>=v.length?"__parsed_extra":v[j]:W,R=e.transform?e.transform(R,W):R);W==="__parsed_extra"?(U[W]=U[W]||[],U[W].push(R)):U[W]=R}return e.header&&(j>v.length?Y("FieldMismatch","TooManyFields","Too many fields: expected "+v.length+" fields but parsed "+j,u+I):j<v.length&&Y("FieldMismatch","TooFewFields","Too few fields: expected "+v.length+" fields but parsed "+j,u+I)),U}var D;p&&(e.header||e.dynamicTyping||e.transform)&&(D=1,!p.data.length||Array.isArray(p.data[0])?(p.data=p.data.map(O),D=p.data.length):p.data=O(p.data,0),e.header&&p.meta&&(p.meta.fields=v),u+=D)}function B(){return e.header&&v.length===0}function Y(k,O,D,w){k={type:k,code:O,message:D},w!==void 0&&(k.row=w),p.errors.push(k)}F(e.step)&&(m=e.step,e.step=function(k){p=k,B()?L():(L(),p.data.length!==0&&(a+=k.data.length,e.preview&&a>e.preview?n.abort():(p.data=p.data[0],m(p,i))))}),this.parse=function(k,O,D){var w=e.quoteChar||'"',w=(e.newline||(e.newline=this.guessLineEndings(k,w)),s=!1,e.delimiter?F(e.delimiter)&&(e.delimiter=e.delimiter(k),p.meta.delimiter=e.delimiter):((w=((I,U,j,W,R)=>{var re,E,H,fe;R=R||[","," ","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var he=0;he<R.length;he++){for(var ne,pe=R[he],J=0,ie=0,P=0,G=(H=void 0,new ae({comments:W,delimiter:pe,newline:U,preview:10}).parse(I)),ce=0;ce<G.data.length;ce++)j&&x(G.data[ce])?P++:(ne=G.data[ce].length,ie+=ne,H===void 0?H=ne:0<ne&&(J+=Math.abs(ne-H),H=ne));0<G.data.length&&(ie/=G.data.length-P),(E===void 0||J<=E)&&(fe===void 0||fe<ie)&&1.99<ie&&(E=J,re=pe,fe=ie)}return{successful:!!(e.delimiter=re),bestDelimiter:re}})(k,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess)).successful?e.delimiter=w.bestDelimiter:(s=!0,e.delimiter=o.DefaultDelimiter),p.meta.delimiter=e.delimiter),ue(e));return e.preview&&e.header&&w.preview++,t=k,n=new ae(w),p=n.parse(t,O,D),L(),y?{meta:{paused:!0}}:p||{meta:{paused:!1}}},this.paused=function(){return y},this.pause=function(){y=!0,n.abort(),t=F(e.chunk)?"":t.substring(n.getCharIndex())},this.resume=function(){i.streamer._halted?(y=!1,i.streamer.parseChunk(t,!0)):setTimeout(i.resume,3)},this.aborted=function(){return g},this.abort=function(){g=!0,n.abort(),p.meta.aborted=!0,F(e.complete)&&e.complete(p),t=""},this.guessLineEndings=function(I,w){I=I.substring(0,1048576);var w=new RegExp(ee(w)+"([^]*?)"+ee(w),"gm"),D=(I=I.replace(w,"")).split("\r"),w=I.split(`
7
7
  `),I=1<w.length&&w[0].length<D[0].length;if(D.length===1||I)return`
8
8
  `;for(var U=0,j=0;j<D.length;j++)D[j][0]===`
9
9
  `&&U++;return U>=D.length/2?`\r
10
10
  `:"\r"}}function ee(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ae(e){var t=(e=e||{}).delimiter,n=e.newline,s=e.comments,m=e.step,b=e.preview,_=e.fastMode,l=null,c=!1,i=e.quoteChar==null?'"':e.quoteChar,a=i;if(e.escapeChar!==void 0&&(a=e.escapeChar),(typeof t!="string"||-1<o.BAD_DELIMITERS.indexOf(t))&&(t=","),s===t)throw new Error("Comment character same as delimiter");s===!0?s="#":(typeof s!="string"||-1<o.BAD_DELIMITERS.indexOf(s))&&(s=!1),n!==`
11
11
  `&&n!=="\r"&&n!==`\r
12
12
  `&&(n=`
13
- `);var u=0,y=!1;this.parse=function(g,v,p){if(typeof g!="string")throw new Error("Input must be a string");var x=g.length,L=t.length,B=n.length,Y=s.length,k=F(m),O=[],D=[],w=[],I=u=0;if(!g)return J();if(_||_!==!1&&g.indexOf(i)===-1){for(var U=g.split(n),j=0;j<U.length;j++){if(w=U[j],u+=w.length,j!==U.length-1)u+=n.length;else if(p)return J();if(!s||w.substring(0,Y)!==s){if(k){if(O=[],fe(w.split(t)),ie(),y)return J()}else fe(w.split(t));if(b&&b<=j)return O=O.slice(0,b),J(!0)}}return J()}for(var W=g.indexOf(t,u),R=g.indexOf(n,u),re=new RegExp(ee(a)+ee(i),"g"),E=g.indexOf(i,u);;)if(g[u]===i)for(E=u,u++;;){if((E=g.indexOf(i,E+1))===-1)return p||D.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:O.length,index:u}),ne();if(E===x-1)return ne(g.substring(u,E).replace(re,i));if(i===a&&g[E+1]===a)E++;else if(i===a||E===0||g[E-1]!==a){W!==-1&&W<E+1&&(W=g.indexOf(t,E+1));var H=he((R=R!==-1&&R<E+1?g.indexOf(n,E+1):R)===-1?W:Math.min(W,R));if(g.substr(E+1+H,L)===t){w.push(g.substring(u,E).replace(re,i)),g[u=E+1+H+L]!==i&&(E=g.indexOf(i,u)),W=g.indexOf(t,u),R=g.indexOf(n,u);break}if(H=he(R),g.substring(E+1+H,E+1+H+B)===n){if(w.push(g.substring(u,E).replace(re,i)),pe(E+1+H+B),W=g.indexOf(t,u),E=g.indexOf(i,u),k&&(ie(),y))return J();if(b&&O.length>=b)return J(!0);break}D.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:O.length,index:u}),E++}}else if(s&&w.length===0&&g.substring(u,u+Y)===s){if(R===-1)return J();u=R+B,R=g.indexOf(n,u),W=g.indexOf(t,u)}else if(W!==-1&&(W<R||R===-1))w.push(g.substring(u,W)),u=W+L,W=g.indexOf(t,u);else{if(R===-1)break;if(w.push(g.substring(u,R)),pe(R+B),k&&(ie(),y))return J();if(b&&O.length>=b)return J(!0)}return ne();function fe(P){O.push(P),I=u}function he(P){var G=0;return G=P!==-1&&(P=g.substring(E+1,P))&&P.trim()===""?P.length:G}function ne(P){return p||(P===void 0&&(P=g.substring(u)),w.push(P),u=x,fe(w),k&&ie()),J()}function pe(P){u=P,fe(w),w=[],R=g.indexOf(n,u)}function J(P){if(e.header&&!v&&O.length&&!c){var G=O[0],ce=Object.create(null),Ee=new Set(G);let Ae=!1;for(let le=0;le<G.length;le++){let se=G[le];if(ce[se=F(e.transformHeader)?e.transformHeader(se,le):se]){let ge,Te=ce[se];for(;ge=se+"_"+Te,Te++,Ee.has(ge););Ee.add(ge),G[le]=ge,ce[se]++,Ae=!0,(l=l===null?{}:l)[ge]=se}else ce[se]=1,G[le]=se;Ee.add(se)}Ae&&console.warn("Duplicate headers found and renamed."),c=!0}return{data:O,errors:D,meta:{delimiter:t,linebreak:n,aborted:y,truncated:!!P,cursor:I+(v||0),renamedHeaders:l}}}function ie(){m(J()),O=[],D=[]}},this.abort=function(){y=!0},this.getCharIndex=function(){return u}}function oe(e){var t=e.data,n=N[t.workerId],s=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var m={abort:function(){s=!0,V(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:ke,resume:ke};if(F(n.userStep)){for(var b=0;b<t.results.data.length&&(n.userStep({data:t.results.data[b],errors:t.results.errors,meta:t.results.meta},m),!s);b++);delete t.results}else F(n.userChunk)&&(n.userChunk(t.results,m,t.file),delete t.results)}t.finished&&!s&&V(t.workerId,t.results)}function V(e,t){var n=N[e];F(n.userComplete)&&n.userComplete(t),n.terminate(),delete N[e]}function ke(){throw new Error("Not implemented.")}function ue(e){if(typeof e!="object"||e===null)return e;var t,n=Array.isArray(e)?[]:{};for(t in e)n[t]=ue(e[t]);return n}function K(e,t){return function(){e.apply(t,arguments)}}function F(e){return typeof e=="function"}return o.parse=function(e,t){var n=(t=t||{}).dynamicTyping||!1;if(F(n)&&(t.dynamicTypingFunction=n,n={}),t.dynamicTyping=n,t.transform=!!F(t.transform)&&t.transform,!t.worker||!o.WORKERS_SUPPORTED)return n=null,o.NODE_STREAM_INPUT,typeof e=="string"?(e=(s=>s.charCodeAt(0)!==65279?s:s.slice(1))(e),n=new(t.download?A:T)(t)):e.readable===!0&&F(e.read)&&F(e.on)?n=new Z(t):(d.File&&e instanceof File||e instanceof Object)&&(n=new M(t)),n.stream(e);(n=(()=>{var s;return!!o.WORKERS_SUPPORTED&&(s=(()=>{var m=d.URL||d.webkitURL||null,b=h.toString();return o.BLOB_URL||(o.BLOB_URL=m.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",b,")();"],{type:"text/javascript"})))})(),(s=new d.Worker(s)).onmessage=oe,s.id=q++,N[s.id]=s)})()).userStep=t.step,n.userChunk=t.chunk,n.userComplete=t.complete,n.userError=t.error,t.step=F(t.step),t.chunk=F(t.chunk),t.complete=F(t.complete),t.error=F(t.error),delete t.worker,n.postMessage({input:e,config:t,workerId:n.id})},o.unparse=function(e,t){var n=!1,s=!0,m=",",b=`\r
13
+ `);var u=0,y=!1;this.parse=function(g,v,p){if(typeof g!="string")throw new Error("Input must be a string");var x=g.length,L=t.length,B=n.length,Y=s.length,k=F(m),O=[],D=[],w=[],I=u=0;if(!g)return J();if(_||_!==!1&&g.indexOf(i)===-1){for(var U=g.split(n),j=0;j<U.length;j++){if(w=U[j],u+=w.length,j!==U.length-1)u+=n.length;else if(p)return J();if(!s||w.substring(0,Y)!==s){if(k){if(O=[],fe(w.split(t)),ie(),y)return J()}else fe(w.split(t));if(b&&b<=j)return O=O.slice(0,b),J(!0)}}return J()}for(var W=g.indexOf(t,u),R=g.indexOf(n,u),re=new RegExp(ee(a)+ee(i),"g"),E=g.indexOf(i,u);;)if(g[u]===i)for(E=u,u++;;){if((E=g.indexOf(i,E+1))===-1)return p||D.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:O.length,index:u}),ne();if(E===x-1)return ne(g.substring(u,E).replace(re,i));if(i===a&&g[E+1]===a)E++;else if(i===a||E===0||g[E-1]!==a){W!==-1&&W<E+1&&(W=g.indexOf(t,E+1));var H=he((R=R!==-1&&R<E+1?g.indexOf(n,E+1):R)===-1?W:Math.min(W,R));if(g.substr(E+1+H,L)===t){w.push(g.substring(u,E).replace(re,i)),g[u=E+1+H+L]!==i&&(E=g.indexOf(i,u)),W=g.indexOf(t,u),R=g.indexOf(n,u);break}if(H=he(R),g.substring(E+1+H,E+1+H+B)===n){if(w.push(g.substring(u,E).replace(re,i)),pe(E+1+H+B),W=g.indexOf(t,u),E=g.indexOf(i,u),k&&(ie(),y))return J();if(b&&O.length>=b)return J(!0);break}D.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:O.length,index:u}),E++}}else if(s&&w.length===0&&g.substring(u,u+Y)===s){if(R===-1)return J();u=R+B,R=g.indexOf(n,u),W=g.indexOf(t,u)}else if(W!==-1&&(W<R||R===-1))w.push(g.substring(u,W)),u=W+L,W=g.indexOf(t,u);else{if(R===-1)break;if(w.push(g.substring(u,R)),pe(R+B),k&&(ie(),y))return J();if(b&&O.length>=b)return J(!0)}return ne();function fe(P){O.push(P),I=u}function he(P){var G=0;return G=P!==-1&&(P=g.substring(E+1,P))&&P.trim()===""?P.length:G}function ne(P){return p||(P===void 0&&(P=g.substring(u)),w.push(P),u=x,fe(w),k&&ie()),J()}function pe(P){u=P,fe(w),w=[],R=g.indexOf(n,u)}function J(P){if(e.header&&!v&&O.length&&!c){var G=O[0],ce=Object.create(null),Ee=new Set(G);let Ae=!1;for(let le=0;le<G.length;le++){let se=G[le];if(ce[se=F(e.transformHeader)?e.transformHeader(se,le):se]){let ge,Te=ce[se];for(;ge=se+"_"+Te,Te++,Ee.has(ge););Ee.add(ge),G[le]=ge,ce[se]++,Ae=!0,(l=l===null?{}:l)[ge]=se}else ce[se]=1,G[le]=se;Ee.add(se)}Ae&&console.warn("Duplicate headers found and renamed."),c=!0}return{data:O,errors:D,meta:{delimiter:t,linebreak:n,aborted:y,truncated:!!P,cursor:I+(v||0),renamedHeaders:l}}}function ie(){m(J()),O=[],D=[]}},this.abort=function(){y=!0},this.getCharIndex=function(){return u}}function oe(e){var t=e.data,n=N[t.workerId],s=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var m={abort:function(){s=!0,V(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:Se,resume:Se};if(F(n.userStep)){for(var b=0;b<t.results.data.length&&(n.userStep({data:t.results.data[b],errors:t.results.errors,meta:t.results.meta},m),!s);b++);delete t.results}else F(n.userChunk)&&(n.userChunk(t.results,m,t.file),delete t.results)}t.finished&&!s&&V(t.workerId,t.results)}function V(e,t){var n=N[e];F(n.userComplete)&&n.userComplete(t),n.terminate(),delete N[e]}function Se(){throw new Error("Not implemented.")}function ue(e){if(typeof e!="object"||e===null)return e;var t,n=Array.isArray(e)?[]:{};for(t in e)n[t]=ue(e[t]);return n}function K(e,t){return function(){e.apply(t,arguments)}}function F(e){return typeof e=="function"}return o.parse=function(e,t){var n=(t=t||{}).dynamicTyping||!1;if(F(n)&&(t.dynamicTypingFunction=n,n={}),t.dynamicTyping=n,t.transform=!!F(t.transform)&&t.transform,!t.worker||!o.WORKERS_SUPPORTED)return n=null,o.NODE_STREAM_INPUT,typeof e=="string"?(e=(s=>s.charCodeAt(0)!==65279?s:s.slice(1))(e),n=new(t.download?A:T)(t)):e.readable===!0&&F(e.read)&&F(e.on)?n=new Z(t):(d.File&&e instanceof File||e instanceof Object)&&(n=new M(t)),n.stream(e);(n=(()=>{var s;return!!o.WORKERS_SUPPORTED&&(s=(()=>{var m=d.URL||d.webkitURL||null,b=f.toString();return o.BLOB_URL||(o.BLOB_URL=m.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",b,")();"],{type:"text/javascript"})))})(),(s=new d.Worker(s)).onmessage=oe,s.id=q++,N[s.id]=s)})()).userStep=t.step,n.userChunk=t.chunk,n.userComplete=t.complete,n.userError=t.error,t.step=F(t.step),t.chunk=F(t.chunk),t.complete=F(t.complete),t.error=F(t.error),delete t.worker,n.postMessage({input:e,config:t,workerId:n.id})},o.unparse=function(e,t){var n=!1,s=!0,m=",",b=`\r
14
14
  `,_='"',l=_+_,c=!1,i=null,a=!1,u=((()=>{if(typeof t=="object"){if(typeof t.delimiter!="string"||o.BAD_DELIMITERS.filter(function(v){return t.delimiter.indexOf(v)!==-1}).length||(m=t.delimiter),typeof t.quotes!="boolean"&&typeof t.quotes!="function"&&!Array.isArray(t.quotes)||(n=t.quotes),typeof t.skipEmptyLines!="boolean"&&typeof t.skipEmptyLines!="string"||(c=t.skipEmptyLines),typeof t.newline=="string"&&(b=t.newline),typeof t.quoteChar=="string"&&(_=t.quoteChar),typeof t.header=="boolean"&&(s=t.header),Array.isArray(t.columns)){if(t.columns.length===0)throw new Error("Option columns is empty");i=t.columns}t.escapeChar!==void 0&&(l=t.escapeChar+_),t.escapeFormulae instanceof RegExp?a=t.escapeFormulae:typeof t.escapeFormulae=="boolean"&&t.escapeFormulae&&(a=/^[=+\-@\t\r].*$/)}})(),new RegExp(ee(_),"g"));if(typeof e=="string"&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return y(null,e,c);if(typeof e[0]=="object")return y(i||Object.keys(e[0]),e,c)}else if(typeof e=="object")return typeof e.data=="string"&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||i),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:typeof e.data[0]=="object"?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||typeof e.data[0]=="object"||(e.data=[e.data])),y(e.fields||[],e.data||[],c);throw new Error("Unable to serialize unrecognized input");function y(v,p,x){var L="",B=(typeof v=="string"&&(v=JSON.parse(v)),typeof p=="string"&&(p=JSON.parse(p)),Array.isArray(v)&&0<v.length),Y=!Array.isArray(p[0]);if(B&&s){for(var k=0;k<v.length;k++)0<k&&(L+=m),L+=g(v[k],k);0<p.length&&(L+=b)}for(var O=0;O<p.length;O++){var D=(B?v:p[O]).length,w=!1,I=B?Object.keys(p[O]).length===0:p[O].length===0;if(x&&!B&&(w=x==="greedy"?p[O].join("").trim()==="":p[O].length===1&&p[O][0].length===0),x==="greedy"&&B){for(var U=[],j=0;j<D;j++){var W=Y?v[j]:j;U.push(p[O][W])}w=U.join("").trim()===""}if(!w){for(var R=0;R<D;R++){0<R&&!I&&(L+=m);var re=B&&Y?v[R]:R;L+=g(p[O][re],R)}O<p.length-1&&(!x||0<D&&!I)&&(L+=b)}}return L}function g(v,p){var x,L;return v==null?"":v.constructor===Date?JSON.stringify(v).slice(1,25):(L=!1,a&&typeof v=="string"&&a.test(v)&&(v="'"+v,L=!0),x=v.toString().replace(u,l),(L=L||n===!0||typeof n=="function"&&n(v,p)||Array.isArray(n)&&n[p]||((B,Y)=>{for(var k=0;k<Y.length;k++)if(-1<B.indexOf(Y[k]))return!0;return!1})(x,o.BAD_DELIMITERS)||-1<x.indexOf(m)||x.charAt(0)===" "||x.charAt(x.length-1)===" ")?_+x+_:x)}},o.RECORD_SEP="",o.UNIT_SEP="",o.BYTE_ORDER_MARK="\uFEFF",o.BAD_DELIMITERS=["\r",`
15
- `,'"',o.BYTE_ORDER_MARK],o.WORKERS_SUPPORTED=!$&&!!d.Worker,o.NODE_STREAM_INPUT=1,o.LocalChunkSize=10485760,o.RemoteChunkSize=5242880,o.DefaultDelimiter=",",o.Parser=ae,o.ParserHandle=X,o.NetworkStreamer=A,o.FileStreamer=M,o.StringStreamer=T,o.ReadableStreamStreamer=Z,d.jQuery&&((C=d.jQuery).fn.parse=function(e){var t=e.config||{},n=[];return this.each(function(b){if(!(C(this).prop("tagName").toUpperCase()==="INPUT"&&C(this).attr("type").toLowerCase()==="file"&&d.FileReader)||!this.files||this.files.length===0)return!0;for(var _=0;_<this.files.length;_++)n.push({file:this.files[_],inputElem:this,instanceConfig:C.extend({},t)})}),s(),this;function s(){if(n.length===0)F(e.complete)&&e.complete();else{var b,_,l,c,i=n[0];if(F(e.before)){var a=e.before(i.file,i.inputElem);if(typeof a=="object"){if(a.action==="abort")return b="AbortError",_=i.file,l=i.inputElem,c=a.reason,void(F(e.error)&&e.error({name:b},_,l,c));if(a.action==="skip")return void m();typeof a.config=="object"&&(i.instanceConfig=C.extend(i.instanceConfig,a.config))}else if(a==="skip")return void m()}var u=i.instanceConfig.complete;i.instanceConfig.complete=function(y){F(u)&&u(y,i.file,i.inputElem),m()},o.parse(i.file,i.instanceConfig)}}function m(){n.splice(0,1),s()}}),z&&(d.onmessage=function(e){e=e.data,o.WORKER_ID===void 0&&e&&(o.WORKER_ID=e.workerId),typeof e.input=="string"?d.postMessage({workerId:o.WORKER_ID,results:o.parse(e.input,e.config),finished:!0}):(d.File&&e.input instanceof File||e.input instanceof Object)&&(e=o.parse(e.input,e.config))&&d.postMessage({workerId:o.WORKER_ID,results:e,finished:!0})}),(A.prototype=Object.create(S.prototype)).constructor=A,(M.prototype=Object.create(S.prototype)).constructor=M,(T.prototype=Object.create(T.prototype)).constructor=T,(Z.prototype=Object.create(S.prototype)).constructor=Z,o})}(Se)),Se.exports}var Le=Ve();class Ge{readAsText(r){const h=new FileReader;return new Promise((d,C)=>{h.onload=$=>{d($)},h.onerror=$=>{C($)},h.readAsText(r)})}readAsBinaryString(r){const h=new FileReader;return new Promise((d,C)=>{h.onload=$=>{d($)},h.onerror=$=>{C($)},h.readAsBinaryString(r)})}readAsDataUrl(r){const h=new FileReader;return new Promise((d,C)=>{h.onload=$=>{d($)},h.onerror=$=>C($),h.readAsDataURL(r)})}unparse(r,h){return Le.unparse(r,h)}parse(r){return new Promise((h,d)=>{Le.parse(r,{header:!0,complete:C=>h(C),error:C=>d(C)})})}getFileExtension(r){let h="-";return/[.]/.exec(r)&&(h=`.${/[^.]+$/.exec(r)?.[0]}`),h}save(r,h,d){const C=new Blob([r],{type:d});Qe.saveAs(C,h,{autoBom:!0})}}class Xe{set(r,h){localStorage.setItem(r,JSON.stringify(h))}get(r){let h=null;const d=localStorage.getItem(r);return d&&(h=JSON.parse(d)),h}remove(r){localStorage.removeItem(r)}removeAll(){localStorage.clear()}getKeysBy(r){return Object.keys(localStorage).filter(h=>h.startsWith(r))}}var be=(f=>(f.log="log",f.info="info",f.warn="warn",f.debug="debug",f.error="error",f))(be||{});class et{logType=be;log(...r){this._doLog(this.logType.log,r.join(" "))}info(...r){this._doLog(this.logType.info,r.join(" "))}warn(...r){this._doLog(this.logType.warn,r.join(" "))}debug(...r){this._doLog(this.logType.debug,r.join(" "))}error(...r){this._doLog(this.logType.error,r.join(" "))}_doLog(r,...h){console[r].apply(console,h)}}class tt{constructor(r){this.localService=r}get(r){return this.localService.get(r)}set(r,h){this.localService.set(r,h)}remove(r){this.localService.remove(r)}}Q.BrowserService=qe,Q.BrowserType=Re,Q.ClipboardService=Ne,Q.FileService=Ge,Q.LocalService=Xe,Q.LogType=be,Q.LoggerService=et,Q.ScreenBreakpoints=ve,Q.TokenService=tt,Q.sortHelper=Oe,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})});
15
+ `,'"',o.BYTE_ORDER_MARK],o.WORKERS_SUPPORTED=!$&&!!d.Worker,o.NODE_STREAM_INPUT=1,o.LocalChunkSize=10485760,o.RemoteChunkSize=5242880,o.DefaultDelimiter=",",o.Parser=ae,o.ParserHandle=X,o.NetworkStreamer=A,o.FileStreamer=M,o.StringStreamer=T,o.ReadableStreamStreamer=Z,d.jQuery&&((C=d.jQuery).fn.parse=function(e){var t=e.config||{},n=[];return this.each(function(b){if(!(C(this).prop("tagName").toUpperCase()==="INPUT"&&C(this).attr("type").toLowerCase()==="file"&&d.FileReader)||!this.files||this.files.length===0)return!0;for(var _=0;_<this.files.length;_++)n.push({file:this.files[_],inputElem:this,instanceConfig:C.extend({},t)})}),s(),this;function s(){if(n.length===0)F(e.complete)&&e.complete();else{var b,_,l,c,i=n[0];if(F(e.before)){var a=e.before(i.file,i.inputElem);if(typeof a=="object"){if(a.action==="abort")return b="AbortError",_=i.file,l=i.inputElem,c=a.reason,void(F(e.error)&&e.error({name:b},_,l,c));if(a.action==="skip")return void m();typeof a.config=="object"&&(i.instanceConfig=C.extend(i.instanceConfig,a.config))}else if(a==="skip")return void m()}var u=i.instanceConfig.complete;i.instanceConfig.complete=function(y){F(u)&&u(y,i.file,i.inputElem),m()},o.parse(i.file,i.instanceConfig)}}function m(){n.splice(0,1),s()}}),z&&(d.onmessage=function(e){e=e.data,o.WORKER_ID===void 0&&e&&(o.WORKER_ID=e.workerId),typeof e.input=="string"?d.postMessage({workerId:o.WORKER_ID,results:o.parse(e.input,e.config),finished:!0}):(d.File&&e.input instanceof File||e.input instanceof Object)&&(e=o.parse(e.input,e.config))&&d.postMessage({workerId:o.WORKER_ID,results:e,finished:!0})}),(A.prototype=Object.create(S.prototype)).constructor=A,(M.prototype=Object.create(S.prototype)).constructor=M,(T.prototype=Object.create(T.prototype)).constructor=T,(Z.prototype=Object.create(S.prototype)).constructor=Z,o})}(we)),we.exports}var Le=Ve();class Ge{readAsText(r){const f=new FileReader;return new Promise((d,C)=>{f.onload=$=>{d($)},f.onerror=$=>{C($)},f.readAsText(r)})}readAsBinaryString(r){const f=new FileReader;return new Promise((d,C)=>{f.onload=$=>{d($)},f.onerror=$=>{C($)},f.readAsBinaryString(r)})}readAsDataUrl(r){const f=new FileReader;return new Promise((d,C)=>{f.onload=$=>{d($)},f.onerror=$=>C($),f.readAsDataURL(r)})}unparse(r,f){return Le.unparse(r,f)}parse(r){return new Promise((f,d)=>{Le.parse(r,{header:!0,complete:C=>f(C),error:C=>d(C)})})}getFileExtension(r){let f="-";return/[.]/.exec(r)&&(f=`.${/[^.]+$/.exec(r)?.[0]}`),f}save(r,f,d){const C=new Blob([r],{type:d});Qe.saveAs(C,f,{autoBom:!0})}}class Xe{set(r,f){localStorage.setItem(r,JSON.stringify(f))}get(r){let f=null;const d=localStorage.getItem(r);return d&&(f=JSON.parse(d)),f}remove(r){let f=!!this.get(r);return f&&localStorage.removeItem(r),f}removeAll(){localStorage.clear()}getKeysBy(r){return Object.keys(localStorage).filter(f=>f.startsWith(r))}}var be=(h=>(h.log="log",h.info="info",h.warn="warn",h.debug="debug",h.error="error",h))(be||{});class et{logType=be;log(...r){this._doLog(this.logType.log,r.join(" "))}info(...r){this._doLog(this.logType.info,r.join(" "))}warn(...r){this._doLog(this.logType.warn,r.join(" "))}debug(...r){this._doLog(this.logType.debug,r.join(" "))}error(...r){this._doLog(this.logType.error,r.join(" "))}_doLog(r,...f){console[r].apply(console,f)}}class tt{constructor(r){this.localService=r}get(r){return this.localService.get(r)}set(r,f){this.localService.set(r,f)}remove(r){this.localService.remove(r)}}Q.BrowserService=qe,Q.BrowserType=Re,Q.ClipboardService=Ne,Q.FileService=Ge,Q.LocalService=Xe,Q.LogType=be,Q.LoggerService=et,Q.ScreenBreakpoints=ke,Q.TokenService=tt,Q.sortHelper=Oe,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oardi/ts-utils",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "utility services, types",
5
5
  "main": "index.cjs.js",
6
6
  "module": "index.es.js",
@@ -1 +1 @@
1
- {"version":3,"file":"browser.service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/browser.service.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;AAErE,oBAAY,WAAW;IACtB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,EAAE,OAAO;IACT,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,cAAc,mBAAmB;CACjC;AAMD,MAAM,WAAW,iBAAiB;IACjC,UAAU,EAAE,IAAI,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,iBAAiB,EAAE,iBAAiB,EAQhD,CAAC;AAEF,KAAK,cAAc,GAAG,CAAC,UAAU,EAAE,iBAAiB,KAAK,IAAI,CAAC;AAE9D,qBAAa,cAAc;IAC1B,OAAO,CAAC,WAAW,CAAa;IAChC,OAAO,CAAC,cAAc,CAAC,CAAoB;IAC3C,OAAO,CAAC,cAAc,CAA4B;IAClD,OAAO,CAAC,eAAe,CAAkC;;IAWlD,OAAO,IAAI,IAAI;IAOf,kBAAkB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI;IAIlD,mBAAmB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI;IAInD,iBAAiB,IAAI,WAAW;IAkBhC,mBAAmB,CAAC,IAAI,GAAE,MAAyB,GAAG,QAAQ,CAAC,iBAAiB,CAAC;IAUjF,mBAAmB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO;IAKxC,mBAAmB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO;IAKxC,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,QAAQ,CAAC,iBAAiB,CAAC;IAM7D,OAAO,CAAC,OAAO;IAOf,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,QAAQ;IAShB,OAAO,CAAC,IAAI;IAIZ,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,KAAK;IAIb,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,QAAQ;IAahB,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,QAAQ;CAUhB"}
1
+ {"version":3,"file":"browser.service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/browser.service.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;AAErE,oBAAY,WAAW;IACtB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,EAAE,OAAO;IACT,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,cAAc,mBAAmB;CACjC;AAED,MAAM,WAAW,iBAAiB;IACjC,UAAU,EAAE,IAAI,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,iBAAiB,EAAE,iBAAiB,EAQhD,CAAC;AAEF,KAAK,cAAc,GAAG,CAAC,UAAU,EAAE,iBAAiB,KAAK,IAAI,CAAC;AAE9D,qBAAa,cAAc;IAC1B,OAAO,CAAC,WAAW,CAAa;IAChC,OAAO,CAAC,cAAc,CAAC,CAAoB;IAC3C,OAAO,CAAC,cAAc,CAA4B;IAClD,OAAO,CAAC,eAAe,CAAkC;;IAWlD,OAAO,IAAI,IAAI;IAOf,kBAAkB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI;IAIlD,mBAAmB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI;IAInD,iBAAiB,IAAI,WAAW;IAkBhC,mBAAmB,CAAC,IAAI,GAAE,MAAyB,GAAG,QAAQ,CAAC,iBAAiB,CAAC;IAUjF,mBAAmB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO;IAKxC,mBAAmB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO;IAKxC,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,QAAQ,CAAC,iBAAiB,CAAC;IAM7D,OAAO,CAAC,OAAO;IAOf,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,QAAQ;IAShB,OAAO,CAAC,IAAI;IAIZ,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,KAAK;IAIb,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,QAAQ;IAahB,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,QAAQ;CAUhB"}
@@ -1,7 +1,7 @@
1
1
  export declare class LocalService {
2
2
  set<T>(key: string, value: T): void;
3
3
  get<T>(key: string): Nullable<T>;
4
- remove(key: string): void;
4
+ remove(key: string): boolean;
5
5
  removeAll(): void;
6
6
  getKeysBy(key: string): string[];
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"local.service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/local.service.ts"],"names":[],"mappings":"AAAA,qBAAa,YAAY;IACxB,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI;IAInC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC;IAShC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIzB,SAAS,IAAI,IAAI;IAIjB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE;CAGhC"}
1
+ {"version":3,"file":"local.service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/local.service.ts"],"names":[],"mappings":"AAAA,qBAAa,YAAY;IACxB,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI;IAInC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC;IAShC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAQ5B,SAAS,IAAI,IAAI;IAIjB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE;CAGhC"}
@@ -1,9 +1,10 @@
1
1
  import { LocalService } from './local.service';
2
+ export type TokenType = 'accesstoken' | 'refreshtoken';
2
3
  export declare class TokenService {
3
4
  private localService;
4
5
  constructor(localService: LocalService);
5
- get(key: 'accesstoken' | 'refreshtoken'): string | null;
6
- set(key: 'accesstoken' | 'refreshtoken', token: string): void;
7
- remove(key: 'accesstoken' | 'refreshtoken'): void;
6
+ get(key: TokenType): string | null;
7
+ set(key: TokenType, token: string): void;
8
+ remove(key: TokenType): void;
8
9
  }
9
10
  //# sourceMappingURL=token.service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"token.service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/token.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,qBAAa,YAAY;IACZ,OAAO,CAAC,YAAY;gBAAZ,YAAY,EAAE,YAAY;IAE9C,GAAG,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,GAAG,MAAM,GAAG,IAAI;IAIvD,GAAG,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAI7D,MAAM,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,GAAG,IAAI;CAGjD"}
1
+ {"version":3,"file":"token.service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/token.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,cAAc,CAAC;AAEvD,qBAAa,YAAY;IACZ,OAAO,CAAC,YAAY;gBAAZ,YAAY,EAAE,YAAY;IAE9C,GAAG,CAAC,GAAG,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI;IAIlC,GAAG,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAIxC,MAAM,CAAC,GAAG,EAAE,SAAS,GAAG,IAAI;CAG5B"}
package/README.md DELETED
@@ -1,15 +0,0 @@
1
- # @oardi/ts-utils
2
-
3
- Powerful set of Typescript Utility Extensions Methods, Helpers, Interfaces, Services and Types.
4
-
5
- ## Setup
6
-
7
- ### Install npm package
8
-
9
- ```
10
- npm i @oardi/ts-utils
11
- ```
12
-
13
- ### about
14
-
15
- Developed and maintained by [oardi](https://github.com/oardi)