@oardi/ts-utils 0.0.33 → 0.0.34
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/extensions/string-extensions.d.ts +1 -0
- package/extensions/string-extensions.d.ts.map +1 -1
- package/index.cjs.js +5 -5
- package/index.es.js +84 -82
- package/index.umd.js +7 -7
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string-extensions.d.ts","sourceRoot":"","sources":["../../../lib/extensions/string-extensions.ts"],"names":[],"mappings":"AAAA,wBAAgB,oBAAoB,IAAI,IAAI,
|
|
1
|
+
{"version":3,"file":"string-extensions.d.ts","sourceRoot":"","sources":["../../../lib/extensions/string-extensions.ts"],"names":[],"mappings":"AAAA,wBAAgB,oBAAoB,IAAI,IAAI,CAiB3C"}
|
package/index.cjs.js
CHANGED
|
@@ -3,13 +3,13 @@ Papa Parse
|
|
|
3
3
|
v5.5.3
|
|
4
4
|
https://github.com/mholt/PapaParse
|
|
5
5
|
License: MIT
|
|
6
|
-
*/var Ae=_e.exports,Ee;function Te(){return Ee||(Ee=1,(function(s,r){((i,f)=>{s.exports=f()})(Ae,function i(){var f=typeof self<"u"?self:typeof window<"u"?window:f!==void 0?f:{},b,$=!f.document&&!!f.postMessage,I=f.IS_PAPA_WORKER||!1,Y={},
|
|
6
|
+
*/var Ae=_e.exports,Ee;function Te(){return Ee||(Ee=1,(function(s,r){((i,f)=>{s.exports=f()})(Ae,function i(){var f=typeof self<"u"?self:typeof window<"u"?window:f!==void 0?f:{},b,$=!f.document&&!!f.postMessage,I=f.IS_PAPA_WORKER||!1,Y={},H=0,w={};function N(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=se(t);n.chunkSize=parseInt(n.chunkSize),t.step||t.chunk||(n.chunkSize=null),this._handle=new ee(n),(this._handle.streamer=this)._config=n}).call(this,e),this.parseChunk=function(t,n){var o=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<o){let S=this._config.newline;S||(g=this._config.quoteChar||'"',S=this._handle.guessLineEndings(t,g)),t=[...t.split(S).slice(o)].join(S)}this.isFirstChunk&&C(this._config.beforeFirstChunk)&&(g=this._config.beforeFirstChunk(t))!==void 0&&(t=g),this.isFirstChunk=!1,this._halted=!1;var o=this._partialLine+t,g=(this._partialLine="",this._handle.parse(o,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(t=g.meta.cursor,o=(this._finished||(this._partialLine=o.substring(t-this._baseIndex),this._baseIndex=t),g&&g.data&&(this._rowCount+=g.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),I)f.postMessage({results:g,workerId:w.WORKER_ID,finished:o});else if(C(this._config.chunk)&&!n){if(this._config.chunk(g,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=g=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(g.data),this._completeResults.errors=this._completeResults.errors.concat(g.errors),this._completeResults.meta=g.meta),this._completed||!o||!C(this._config.complete)||g&&g.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),o||g&&g.meta.paused||this._nextChunk(),g}this._halted=!0},this._sendError=function(t){C(this._config.error)?this._config.error(t):I&&this._config.error&&f.postMessage({workerId:w.WORKER_ID,error:t,finished:!1})}}function B(e){var t;(e=e||{}).chunkSize||(e.chunkSize=w.RemoteChunkSize),N.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=q(this._chunkLoaded,this),t.onerror=q(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!$),this._config.downloadRequestHeaders){var n,o=this._config.downloadRequestHeaders;for(n in o)t.setRequestHeader(n,o[n])}var g;this._config.chunkSize&&(g=this._start+this._config.chunkSize-1,t.setRequestHeader("Range","bytes="+this._start+"-"+g));try{t.send(this._config.downloadRequestBody)}catch(S){this._chunkError(S.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 X(e){(e=e||{}).chunkSize||(e.chunkSize=w.LocalChunkSize),N.call(this,e);var t,n,o=typeof FileReader<"u";this.stream=function(g){this._input=g,n=g.slice||g.webkitSlice||g.mozSlice,o?((t=new FileReader).onload=q(this._chunkLoaded,this),t.onerror=q(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 g=this._input,S=(this._config.chunkSize&&(S=Math.min(this._start+this._config.chunkSize,this._input.size),g=n.call(g,this._start,S)),t.readAsText(g,this._config.encoding));o||this._chunkLoaded({target:{result:S}})},this._chunkLoaded=function(g){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(g.target.result)},this._chunkError=function(){this._sendError(t.error)}}function J(e){var t;N.call(this,e=e||{}),this.stream=function(n){return t=n,this._nextChunk()},this._nextChunk=function(){var n,o;if(!this._finished)return n=this._config.chunkSize,t=n?(o=t.substring(0,n),t.substring(n)):(o=t,""),this._finished=!t,this.parseChunk(o)}}function V(e){N.call(this,e=e||{});var t=[],n=!0,o=!1;this.pause=function(){N.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){N.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(g){this._input=g,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){o&&t.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=q(function(g){try{t.push(typeof g=="string"?g:g.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(S){this._streamError(S)}},this),this._streamError=q(function(g){this._streamCleanUp(),this._sendError(g)},this),this._streamEnd=q(function(){this._streamCleanUp(),o=!0,this._streamData("")},this),this._streamCleanUp=q(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function ee(e){var t,n,o,g,S=Math.pow(2,53),m=-S,h=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,l=/^((\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)))$/,a=this,u=0,c=0,y=!1,p=!1,_=[],d={data:[],errors:[],meta:{}};function M(k){return e.skipEmptyLines==="greedy"?k.join("").trim()==="":k.length===1&&k[0].length===0}function R(){if(d&&o&&(U("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+w.DefaultDelimiter+"'"),o=!1),e.skipEmptyLines&&(d.data=d.data.filter(function(v){return!M(v)})),F()){let v=function(A,z){C(e.transformHeader)&&(A=e.transformHeader(A,z)),_.push(A)};if(d)if(Array.isArray(d.data[0])){for(var k=0;F()&&k<d.data.length;k++)d.data[k].forEach(v);d.data.splice(0,1)}else d.data.forEach(v)}function E(v,A){for(var z=e.header?{}:[],T=0;T<v.length;T++){var L=T,O=v[T],O=((G,D)=>(j=>(e.dynamicTypingFunction&&e.dynamicTyping[j]===void 0&&(e.dynamicTyping[j]=e.dynamicTypingFunction(j)),(e.dynamicTyping[j]||e.dynamicTyping)===!0))(G)?D==="true"||D==="TRUE"||D!=="false"&&D!=="FALSE"&&((j=>{if(h.test(j)&&(j=parseFloat(j),m<j&&j<S))return 1})(D)?parseFloat(D):l.test(D)?new Date(D):D===""?null:D):D)(L=e.header?T>=_.length?"__parsed_extra":_[T]:L,O=e.transform?e.transform(O,L):O);L==="__parsed_extra"?(z[L]=z[L]||[],z[L].push(O)):z[L]=O}return e.header&&(T>_.length?U("FieldMismatch","TooManyFields","Too many fields: expected "+_.length+" fields but parsed "+T,c+A):T<_.length&&U("FieldMismatch","TooFewFields","Too few fields: expected "+_.length+" fields but parsed "+T,c+A)),z}var x;d&&(e.header||e.dynamicTyping||e.transform)&&(x=1,!d.data.length||Array.isArray(d.data[0])?(d.data=d.data.map(E),x=d.data.length):d.data=E(d.data,0),e.header&&d.meta&&(d.meta.fields=_),c+=x)}function F(){return e.header&&_.length===0}function U(k,E,x,v){k={type:k,code:E,message:x},v!==void 0&&(k.row=v),d.errors.push(k)}C(e.step)&&(g=e.step,e.step=function(k){d=k,F()?R():(R(),d.data.length!==0&&(u+=k.data.length,e.preview&&u>e.preview?n.abort():(d.data=d.data[0],g(d,a))))}),this.parse=function(k,E,x){var v=e.quoteChar||'"',v=(e.newline||(e.newline=this.guessLineEndings(k,v)),o=!1,e.delimiter?C(e.delimiter)&&(e.delimiter=e.delimiter(k),d.meta.delimiter=e.delimiter):((v=((A,z,T,L,O)=>{var G,D,j,ue;O=O||[","," ","|",";",w.RECORD_SEP,w.UNIT_SEP];for(var fe=0;fe<O.length;fe++){for(var te,ge=O[fe],W=0,re=0,P=0,Q=(j=void 0,new le({comments:L,delimiter:ge,newline:z,preview:10}).parse(A)),ae=0;ae<Q.data.length;ae++)T&&M(Q.data[ae])?P++:(te=Q.data[ae].length,re+=te,j===void 0?j=te:0<te&&(W+=Math.abs(te-j),j=te));0<Q.data.length&&(re/=Q.data.length-P),(D===void 0||W<=D)&&(ue===void 0||ue<re)&&1.99<re&&(D=W,G=ge,ue=re)}return{successful:!!(e.delimiter=G),bestDelimiter:G}})(k,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess)).successful?e.delimiter=v.bestDelimiter:(o=!0,e.delimiter=w.DefaultDelimiter),d.meta.delimiter=e.delimiter),se(e));return e.preview&&e.header&&v.preview++,t=k,n=new le(v),d=n.parse(t,E,x),R(),y?{meta:{paused:!0}}:d||{meta:{paused:!1}}},this.paused=function(){return y},this.pause=function(){y=!0,n.abort(),t=C(e.chunk)?"":t.substring(n.getCharIndex())},this.resume=function(){a.streamer._halted?(y=!1,a.streamer.parseChunk(t,!0)):setTimeout(a.resume,3)},this.aborted=function(){return p},this.abort=function(){p=!0,n.abort(),d.meta.aborted=!0,C(e.complete)&&e.complete(d),t=""},this.guessLineEndings=function(A,v){A=A.substring(0,1048576);var v=new RegExp(ie(v)+"([^]*?)"+ie(v),"gm"),x=(A=A.replace(v,"")).split("\r"),v=A.split(`
|
|
7
7
|
`),A=1<v.length&&v[0].length<x[0].length;if(x.length===1||A)return`
|
|
8
8
|
`;for(var z=0,T=0;T<x.length;T++)x[T][0]===`
|
|
9
9
|
`&&z++;return z>=x.length/2?`\r
|
|
10
|
-
`:"\r"}}function ie(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function
|
|
10
|
+
`:"\r"}}function ie(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function le(e){var t=(e=e||{}).delimiter,n=e.newline,o=e.comments,g=e.step,S=e.preview,m=e.fastMode,h=null,l=!1,a=e.quoteChar==null?'"':e.quoteChar,u=a;if(e.escapeChar!==void 0&&(u=e.escapeChar),(typeof t!="string"||-1<w.BAD_DELIMITERS.indexOf(t))&&(t=","),o===t)throw new Error("Comment character same as delimiter");o===!0?o="#":(typeof o!="string"||-1<w.BAD_DELIMITERS.indexOf(o))&&(o=!1),n!==`
|
|
11
11
|
`&&n!=="\r"&&n!==`\r
|
|
12
12
|
`&&(n=`
|
|
13
|
-
`);var
|
|
14
|
-
`,m='"',h=m+m,
|
|
15
|
-
`,'"',w.BYTE_ORDER_MARK],w.WORKERS_SUPPORTED=!$&&!!f.Worker,w.NODE_STREAM_INPUT=1,w.LocalChunkSize=10485760,w.RemoteChunkSize=5242880,w.DefaultDelimiter=",",w.Parser=ce,w.ParserHandle=ee,w.NetworkStreamer=B,w.FileStreamer=X,w.StringStreamer=J,w.ReadableStreamStreamer=V,f.jQuery&&((b=f.jQuery).fn.parse=function(e){var t=e.config||{},n=[];return this.each(function(S){if(!(b(this).prop("tagName").toUpperCase()==="INPUT"&&b(this).attr("type").toLowerCase()==="file"&&f.FileReader)||!this.files||this.files.length===0)return!0;for(var m=0;m<this.files.length;m++)n.push({file:this.files[m],inputElem:this,instanceConfig:b.extend({},t)})}),o(),this;function o(){if(n.length===0)C(e.complete)&&e.complete();else{var S,m,h,c,a=n[0];if(C(e.before)){var u=e.before(a.file,a.inputElem);if(typeof u=="object"){if(u.action==="abort")return S="AbortError",m=a.file,h=a.inputElem,c=u.reason,void(C(e.error)&&e.error({name:S},m,h,c));if(u.action==="skip")return void g();typeof u.config=="object"&&(a.instanceConfig=b.extend(a.instanceConfig,u.config))}else if(u==="skip")return void g()}var l=a.instanceConfig.complete;a.instanceConfig.complete=function(y){C(l)&&l(y,a.file,a.inputElem),g()},w.parse(a.file,a.instanceConfig)}}function g(){n.splice(0,1),o()}}),I&&(f.onmessage=function(e){e=e.data,w.WORKER_ID===void 0&&e&&(w.WORKER_ID=e.workerId),typeof e.input=="string"?f.postMessage({workerId:w.WORKER_ID,results:w.parse(e.input,e.config),finished:!0}):(f.File&&e.input instanceof File||e.input instanceof Object)&&(e=w.parse(e.input,e.config))&&f.postMessage({workerId:w.WORKER_ID,results:e,finished:!0})}),(B.prototype=Object.create(H.prototype)).constructor=B,(X.prototype=Object.create(H.prototype)).constructor=X,(J.prototype=Object.create(J.prototype)).constructor=J,(V.prototype=Object.create(H.prototype)).constructor=V,w})})(_e)),_e.exports}var Le=Te();const Ie=ke(Le),{parse:Fe,unparse:ze}=Ie;class je{static unparse(r,i){return ze(r,i)}static parse(r){return new Promise((i,f)=>{Fe(r,{header:!0,complete:b=>i(b),error:b=>f(b)})})}}async function Me(s,r,i){const f=i?.mimeType??Be(r),b=Ue(s,f);if("showSaveFilePicker"in window&&i?.showSaveFilePicker)try{const N=await(await window.showSaveFilePicker({suggestedName:r,types:[{description:"Datei",accept:{[f]:[`.${$e(r)}`]}}]})).createWritable();await N.write(b),await N.close();return}catch{}const $=URL.createObjectURL(b),I=document.createElement("a");I.href=$,I.download=r,I.rel="noopener",I.style.display="none",document.body.appendChild(I),Pe(I),window.setTimeout(()=>{document.body.removeChild(I),URL.revokeObjectURL($)},0),Ye()&&window.open($,"_blank","noopener,noreferrer")}function Ue(s,r){if(s instanceof Blob)return s.type?s:new Blob([s],{type:r});if(s instanceof ArrayBuffer||s instanceof Uint8Array){const i=s instanceof Uint8Array?s:new Uint8Array(s);return new Blob([i],{type:r})}return new Blob([s],{type:r||"text/plain;charset=utf-8"})}function Be(s){switch($e(s).toLowerCase()){case"txt":return"text/plain;charset=utf-8";case"csv":return"text/csv;charset=utf-8";case"json":return"application/json;charset=utf-8";case"pdf":return"application/pdf";case"png":return"image/png";case"jpg":case"jpeg":return"image/jpeg";case"svg":return"image/svg+xml";case"zip":return"application/zip";default:return"application/octet-stream"}}function $e(s){const r=s.lastIndexOf(".");return r>=0&&r<s.length-1?s.slice(r+1):""}function Pe(s){const r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),s.dispatchEvent(r)}function Ye(){const s=navigator.userAgent,r=/iPad|iPhone|iPod/.test(s),i=/^((?!chrome|android).)*safari/i.test(s);return r||i}class Ne{static getEnumValue(r,i){if(i in r)return r[i];throw Error(`${i} not found in ${r}`)}static getKeyValues(r){return Object.keys(r).filter(i=>!isNaN(Number(i))).map(i=>({key:Number(i),value:r[i]}))}}class He{static getFileExtension(r){let i="";const f=r.lastIndexOf(".");return f>0&&f<r.length-1&&(i=`.${r.substring(f+1).toLowerCase()}`),i}static readAsText(r){const i=new FileReader;return new Promise((f,b)=>{i.onload=()=>{i.onload=null,i.onerror=null,typeof i.result=="string"?f(i.result):b(new Error("Unexpected result type"))},i.onerror=()=>{const $=i.error??new Error("FileReader error");i.onload=null,i.onerror=null,b($)},i.readAsText(r)})}static readAsArrayBuffer(r){const i=new FileReader;return new Promise((f,b)=>{i.onload=()=>{i.onload=null,i.onerror=null,i.result instanceof ArrayBuffer?f(i.result):b(new Error("Unexpected result type"))},i.onerror=()=>{const $=i.error??new Error("FileReader error");i.onload=null,i.onerror=null,b($)},i.readAsArrayBuffer(r)})}static readAsDataUrl(r){const i=new FileReader;return new Promise((f,b)=>{i.onload=$=>{f($)},i.onerror=$=>b($),i.readAsDataURL(r)})}static formatFileSize(r,i=2,f){if(r===0)return"0 Bytes";const b=1024,$=["Bytes","KB","MB","GB","TB"];let I=Math.floor(Math.log(r)/Math.log(b));f&&$.includes(f)&&(I=$.indexOf(f));const Y=r/Math.pow(b,I);return`${parseFloat(Y.toFixed(i))} ${$[I]}`}static save(r,i,f){const b=new Blob([r],{type:f});Me(b,i)}}class de{static set(r,i){localStorage.setItem(r,JSON.stringify(i))}static get(r){let i=null;const f=localStorage.getItem(r);return f&&(i=JSON.parse(f)),i}static remove(r){let i=!!de.get(r);return i&&localStorage.removeItem(r),i}static removeAll(){localStorage.clear()}static getKeysBy(r){return Object.keys(localStorage).filter(i=>i.startsWith(r))}}var le=(s=>(s.log="log",s.info="info",s.warn="warn",s.debug="debug",s.error="error",s))(le||{});class K{static listeners=new Set;static enabled=!0;static log(...r){K.doLog(le.log,r)}static info(...r){K.doLog(le.info,r)}static warn(...r){K.doLog(le.warn,r)}static debug(...r){K.doLog(le.debug,r)}static error(...r){K.doLog(le.error,r)}static clearListeners(){K.listeners.clear()}static setEnabled(r){K.enabled=r}static doLog(r,i){if(!K.enabled)return;const f={type:r,args:i,timestamp:new Date().toISOString()};for(const b of K.listeners)try{if(b(f)===!1)return}catch{}console[r].apply(console,i)}static onLog(r,i=!1){if(i){const f=b=>{try{return r(b)}finally{K.listeners.delete(f)}};return K.listeners.add(f),()=>K.listeners.delete(f)}return K.listeners.add(r),()=>K.listeners.delete(r)}}class qe{static getScreenWidth(){return window.innerWidth}static getScreenHeight(){return window.innerHeight}}const We=(s,r,i)=>s.localeCompare(r)*(i?1:-1),Ke=(s,r)=>s<r?-1:s===r?0:1,Je=(s,r,i)=>Ke(s,r)*(i?1:-1),Qe=(s,r,i)=>{let f=0;return typeof s=="string"&&typeof r=="string"?f=We(s,r,i):f=Je(s,r,i),f},Re=(s,r,i,f)=>{const b=i(s),$=i(r);return Qe(b,$,f)};class Ve{static get(r){return de.get(r)}static set(r,i){de.set(r,i)}static remove(r){de.remove(r)}}function Ze(){Array.prototype.distinct=function(s){return s?this.filter((i,f,b)=>b.findIndex($=>s($,i))===f):this.filter((i,f,b)=>b.indexOf(i)===f)},Array.prototype.filterBy=function(s){return this.filter(r=>s(r))},Array.prototype.first=function(){return this.length>0?this[0]:null},Array.prototype.groupBy=function(s){return this.reduce((r,i)=>{const f=s(i);return r[f]||(r[f]=[]),r[f].push(i),r},{})},Array.prototype.orderBy=function(s,r=!0){return this?.sort((i,f)=>Re(i,f,s,r)),this},Array.prototype.removeBy=function(s,r){return this.filter(i=>s(i)!==r)}}var we={exports:{}},Ge=we.exports,xe;function Xe(){return xe||(xe=1,(function(s,r){(function(i,f){s.exports=f()})(Ge,(function(){var i=1e3,f=6e4,b=36e5,$="millisecond",I="second",Y="minute",N="hour",w="day",H="week",B="month",X="quarter",J="year",V="date",ee="Invalid Date",ie=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,ce=/\[([^\]]+)]|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,pe={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(m){var h=["th","st","nd","rd"],c=m%100;return"["+m+(h[(c-20)%10]||h[c]||h[0])+"]"}},oe=function(m,h,c){var a=String(m);return!a||a.length>=h?m:""+Array(h+1-a.length).join(c)+m},ye={s:oe,z:function(m){var h=-m.utcOffset(),c=Math.abs(h),a=Math.floor(c/60),u=c%60;return(h<=0?"+":"-")+oe(a,2,"0")+":"+oe(u,2,"0")},m:function m(h,c){if(h.date()<c.date())return-m(c,h);var a=12*(c.year()-h.year())+(c.month()-h.month()),u=h.clone().add(a,B),l=c-u<0,y=h.clone().add(a+(l?-1:1),B);return+(-(a+(c-u)/(l?u-y:y-u))||0)},a:function(m){return m<0?Math.ceil(m)||0:Math.floor(m)},p:function(m){return{M:B,y:J,w:H,d:w,D:V,h:N,m:Y,s:I,ms:$,Q:X}[m]||String(m||"").toLowerCase().replace(/s$/,"")},u:function(m){return m===void 0}},se="en",q={};q[se]=pe;var C="$isDayjsObject",e=function(m){return m instanceof g||!(!m||!m[C])},t=function m(h,c,a){var u;if(!h)return se;if(typeof h=="string"){var l=h.toLowerCase();q[l]&&(u=l),c&&(q[l]=c,u=l);var y=h.split("-");if(!u&&y.length>1)return m(y[0])}else{var p=h.name;q[p]=h,u=p}return!a&&u&&(se=u),u||!a&&se},n=function(m,h){if(e(m))return m.clone();var c=typeof h=="object"?h:{};return c.date=m,c.args=arguments,new g(c)},o=ye;o.l=t,o.i=e,o.w=function(m,h){return n(m,{locale:h.$L,utc:h.$u,x:h.$x,$offset:h.$offset})};var g=(function(){function m(c){this.$L=t(c.locale,null,!0),this.parse(c),this.$x=this.$x||c.x||{},this[C]=!0}var h=m.prototype;return h.parse=function(c){this.$d=(function(a){var u=a.date,l=a.utc;if(u===null)return new Date(NaN);if(o.u(u))return new Date;if(u instanceof Date)return new Date(u);if(typeof u=="string"&&!/Z$/i.test(u)){var y=u.match(ie);if(y){var p=y[2]-1||0,_=(y[7]||"0").substring(0,3);return l?new Date(Date.UTC(y[1],p,y[3]||1,y[4]||0,y[5]||0,y[6]||0,_)):new Date(y[1],p,y[3]||1,y[4]||0,y[5]||0,y[6]||0,_)}}return new Date(u)})(c),this.init()},h.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()},h.$utils=function(){return o},h.isValid=function(){return this.$d.toString()!==ee},h.isSame=function(c,a){var u=n(c);return this.startOf(a)<=u&&u<=this.endOf(a)},h.isAfter=function(c,a){return n(c)<this.startOf(a)},h.isBefore=function(c,a){return this.endOf(a)<n(c)},h.$g=function(c,a,u){return o.u(c)?this[a]:this.set(u,c)},h.unix=function(){return Math.floor(this.valueOf()/1e3)},h.valueOf=function(){return this.$d.getTime()},h.startOf=function(c,a){var u=this,l=!!o.u(a)||a,y=o.p(c),p=function(E,x){var v=o.w(u.$u?Date.UTC(u.$y,x,E):new Date(u.$y,x,E),u);return l?v:v.endOf(w)},_=function(E,x){return o.w(u.toDate()[E].apply(u.toDate("s"),(l?[0,0,0,0]:[23,59,59,999]).slice(x)),u)},d=this.$W,O=this.$M,R=this.$D,F="set"+(this.$u?"UTC":"");switch(y){case J:return l?p(1,0):p(31,11);case B:return l?p(1,O):p(0,O+1);case H:var U=this.$locale().weekStart||0,k=(d<U?d+7:d)-U;return p(l?R-k:R+(6-k),O);case w:case V:return _(F+"Hours",0);case N:return _(F+"Minutes",1);case Y:return _(F+"Seconds",2);case I:return _(F+"Milliseconds",3);default:return this.clone()}},h.endOf=function(c){return this.startOf(c,!1)},h.$set=function(c,a){var u,l=o.p(c),y="set"+(this.$u?"UTC":""),p=(u={},u[w]=y+"Date",u[V]=y+"Date",u[B]=y+"Month",u[J]=y+"FullYear",u[N]=y+"Hours",u[Y]=y+"Minutes",u[I]=y+"Seconds",u[$]=y+"Milliseconds",u)[l],_=l===w?this.$D+(a-this.$W):a;if(l===B||l===J){var d=this.clone().set(V,1);d.$d[p](_),d.init(),this.$d=d.set(V,Math.min(this.$D,d.daysInMonth())).$d}else p&&this.$d[p](_);return this.init(),this},h.set=function(c,a){return this.clone().$set(c,a)},h.get=function(c){return this[o.p(c)]()},h.add=function(c,a){var u,l=this;c=Number(c);var y=o.p(a),p=function(O){var R=n(l);return o.w(R.date(R.date()+Math.round(O*c)),l)};if(y===B)return this.set(B,this.$M+c);if(y===J)return this.set(J,this.$y+c);if(y===w)return p(1);if(y===H)return p(7);var _=(u={},u[Y]=f,u[N]=b,u[I]=i,u)[y]||1,d=this.$d.getTime()+c*_;return o.w(d,this)},h.subtract=function(c,a){return this.add(-1*c,a)},h.format=function(c){var a=this,u=this.$locale();if(!this.isValid())return u.invalidDate||ee;var l=c||"YYYY-MM-DDTHH:mm:ssZ",y=o.z(this),p=this.$H,_=this.$m,d=this.$M,O=u.weekdays,R=u.months,F=u.meridiem,U=function(x,v,A,z){return x&&(x[v]||x(a,l))||A[v].slice(0,z)},k=function(x){return o.s(p%12||12,x,"0")},E=F||function(x,v,A){var z=x<12?"AM":"PM";return A?z.toLowerCase():z};return l.replace(ce,(function(x,v){return v||(function(A){switch(A){case"YY":return String(a.$y).slice(-2);case"YYYY":return o.s(a.$y,4,"0");case"M":return d+1;case"MM":return o.s(d+1,2,"0");case"MMM":return U(u.monthsShort,d,R,3);case"MMMM":return U(R,d);case"D":return a.$D;case"DD":return o.s(a.$D,2,"0");case"d":return String(a.$W);case"dd":return U(u.weekdaysMin,a.$W,O,2);case"ddd":return U(u.weekdaysShort,a.$W,O,3);case"dddd":return O[a.$W];case"H":return String(p);case"HH":return o.s(p,2,"0");case"h":return k(1);case"hh":return k(2);case"a":return E(p,_,!0);case"A":return E(p,_,!1);case"m":return String(_);case"mm":return o.s(_,2,"0");case"s":return String(a.$s);case"ss":return o.s(a.$s,2,"0");case"SSS":return o.s(a.$ms,3,"0");case"Z":return y}return null})(x)||y.replace(":","")}))},h.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},h.diff=function(c,a,u){var l,y=this,p=o.p(a),_=n(c),d=(_.utcOffset()-this.utcOffset())*f,O=this-_,R=function(){return o.m(y,_)};switch(p){case J:l=R()/12;break;case B:l=R();break;case X:l=R()/3;break;case H:l=(O-d)/6048e5;break;case w:l=(O-d)/864e5;break;case N:l=O/b;break;case Y:l=O/f;break;case I:l=O/i;break;default:l=O}return u?l:o.a(l)},h.daysInMonth=function(){return this.endOf(B).$D},h.$locale=function(){return q[this.$L]},h.locale=function(c,a){if(!c)return this.$L;var u=this.clone(),l=t(c,a,!0);return l&&(u.$L=l),u},h.clone=function(){return o.w(this.$d,this)},h.toDate=function(){return new Date(this.valueOf())},h.toJSON=function(){return this.isValid()?this.toISOString():null},h.toISOString=function(){return this.$d.toISOString()},h.toString=function(){return this.$d.toUTCString()},m})(),S=g.prototype;return n.prototype=S,[["$ms",$],["$s",I],["$m",Y],["$H",N],["$W",w],["$M",B],["$y",J],["$D",V]].forEach((function(m){S[m[1]]=function(h){return this.$g(h,m[0],m[1])}})),n.extend=function(m,h){return m.$i||(m(h,g,n),m.$i=!0),n},n.locale=t,n.isDayjs=e,n.unix=function(m){return n(1e3*m)},n.en=q[se],n.Ls=q,n.p={},n}))})(we)),we.exports}var et=Xe();const Z=ke(et);var ve={exports:{}},tt=ve.exports,Oe;function rt(){return Oe||(Oe=1,(function(s,r){(function(i,f){s.exports=f()})(tt,(function(){var i={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(f,b,$){var I=b.prototype,Y=I.format;$.en.formats=i,I.format=function(N){N===void 0&&(N="YYYY-MM-DDTHH:mm:ssZ");var w=this.$locale().formats,H=(function(B,X){return B.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(J,V,ee){var ie=ee&&ee.toUpperCase();return V||X[ee]||i[ee]||X[ie].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(ce,pe,oe){return pe||oe.slice(1)}))}))})(N,w===void 0?{}:w);return Y.call(this,H)}}}))})(ve)),ve.exports}var nt=rt();const it=ke(nt);Z.extend(it);function st(){Date.prototype.add=function(s,r){return Z(this).add(s,r).toDate()},Date.prototype.diff=function(s,r){return Z(this).diff(s,r)},Date.prototype.endOf=function(s){return Z(this).endOf(s).toDate()},Date.prototype.firstDayOfMonth=function(){return Z(this).startOf("month").toDate()},Date.prototype.isAfter=function(s,r){return Z(this).isAfter(s,r)},Date.prototype.isBefore=function(s,r){return Z(this).isBefore(s,r)},Date.prototype.format=function(s){return Z(this).format(s)},Date.prototype.isValid=function(){return Z(this).isValid()},Date.prototype.subtract=function(s,r){return Z(this).subtract(s,r).toDate()},Date.prototype.lastDayOfMonth=function(){return Z(this).endOf("month").toDate()},Date.prototype.set=function(s,r){return Z(this).set(s,r).toDate()},Date.prototype.startOf=function(s){return Z(this).startOf(s).toDate()}}function at(){String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)},String.prototype.isNumber=function(){return!isNaN(Number(this))&&this.trim()!==""},String.prototype.isEmpty=function(){return this===void 0||!this||this.length===0}}class ot{resizeListener;onResizeCallbacks=new Set;rafId=null;emitTimeoutId=null;duplicateThresholdMs=60;constructor(){typeof window<"u"&&(this.resizeListener=this.onResize.bind(this),window.addEventListener("resize",this.resizeListener,{passive:!0}))}destroy(){typeof window<"u"&&window.removeEventListener("resize",this.resizeListener),this.onResizeCallbacks.clear(),this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null)}onResizeChange(r){this.onResizeCallbacks.add(r)}offResizeChange(r){this.onResizeCallbacks.delete(r)}onResize=()=>{typeof window>"u"||(this.emitTimeoutId&&clearTimeout(this.emitTimeoutId),this.emitTimeoutId=window.setTimeout(()=>{this.emitTimeoutId=null},this.duplicateThresholdMs))}}exports.BrowserService=ot;exports.CsvHelper=je;exports.EnumHelper=Ne;exports.FileHelper=He;exports.LocalStorageHelper=de;exports.LoggerHelper=K;exports.LoggerType=le;exports.ScreenHelper=qe;exports.TokenHelper=Ve;exports.copyToClipboard=Ce;exports.initArrayExtensions=Ze;exports.initDateExtensions=st;exports.initStringExtensions=at;exports.saveAs=Me;exports.sortHelper=Re;
|
|
13
|
+
`);var c=0,y=!1;this.parse=function(p,_,d){if(typeof p!="string")throw new Error("Input must be a string");var M=p.length,R=t.length,F=n.length,U=o.length,k=C(g),E=[],x=[],v=[],A=c=0;if(!p)return W();if(m||m!==!1&&p.indexOf(a)===-1){for(var z=p.split(n),T=0;T<z.length;T++){if(v=z[T],c+=v.length,T!==z.length-1)c+=n.length;else if(d)return W();if(!o||v.substring(0,U)!==o){if(k){if(E=[],ue(v.split(t)),re(),y)return W()}else ue(v.split(t));if(S&&S<=T)return E=E.slice(0,S),W(!0)}}return W()}for(var L=p.indexOf(t,c),O=p.indexOf(n,c),G=new RegExp(ie(u)+ie(a),"g"),D=p.indexOf(a,c);;)if(p[c]===a)for(D=c,c++;;){if((D=p.indexOf(a,D+1))===-1)return d||x.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:E.length,index:c}),te();if(D===M-1)return te(p.substring(c,D).replace(G,a));if(a===u&&p[D+1]===u)D++;else if(a===u||D===0||p[D-1]!==u){L!==-1&&L<D+1&&(L=p.indexOf(t,D+1));var j=fe((O=O!==-1&&O<D+1?p.indexOf(n,D+1):O)===-1?L:Math.min(L,O));if(p.substr(D+1+j,R)===t){v.push(p.substring(c,D).replace(G,a)),p[c=D+1+j+R]!==a&&(D=p.indexOf(a,c)),L=p.indexOf(t,c),O=p.indexOf(n,c);break}if(j=fe(O),p.substring(D+1+j,D+1+j+F)===n){if(v.push(p.substring(c,D).replace(G,a)),ge(D+1+j+F),L=p.indexOf(t,c),D=p.indexOf(a,c),k&&(re(),y))return W();if(S&&E.length>=S)return W(!0);break}x.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:E.length,index:c}),D++}}else if(o&&v.length===0&&p.substring(c,c+U)===o){if(O===-1)return W();c=O+F,O=p.indexOf(n,c),L=p.indexOf(t,c)}else if(L!==-1&&(L<O||O===-1))v.push(p.substring(c,L)),c=L+R,L=p.indexOf(t,c);else{if(O===-1)break;if(v.push(p.substring(c,O)),ge(O+F),k&&(re(),y))return W();if(S&&E.length>=S)return W(!0)}return te();function ue(P){E.push(P),A=c}function fe(P){var Q=0;return Q=P!==-1&&(P=p.substring(D+1,P))&&P.trim()===""?P.length:Q}function te(P){return d||(P===void 0&&(P=p.substring(c)),v.push(P),c=M,ue(v),k&&re()),W()}function ge(P){c=P,ue(v),v=[],O=p.indexOf(n,c)}function W(P){if(e.header&&!_&&E.length&&!l){var Q=E[0],ae=Object.create(null),be=new Set(Q);let Se=!1;for(let he=0;he<Q.length;he++){let ne=Q[he];if(ae[ne=C(e.transformHeader)?e.transformHeader(ne,he):ne]){let me,De=ae[ne];for(;me=ne+"_"+De,De++,be.has(me););be.add(me),Q[he]=me,ae[ne]++,Se=!0,(h=h===null?{}:h)[me]=ne}else ae[ne]=1,Q[he]=ne;be.add(ne)}Se&&console.warn("Duplicate headers found and renamed."),l=!0}return{data:E,errors:x,meta:{delimiter:t,linebreak:n,aborted:y,truncated:!!P,cursor:A+(_||0),renamedHeaders:h}}}function re(){g(W()),E=[],x=[]}},this.abort=function(){y=!0},this.getCharIndex=function(){return c}}function pe(e){var t=e.data,n=Y[t.workerId],o=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var g={abort:function(){o=!0,oe(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:ye,resume:ye};if(C(n.userStep)){for(var S=0;S<t.results.data.length&&(n.userStep({data:t.results.data[S],errors:t.results.errors,meta:t.results.meta},g),!o);S++);delete t.results}else C(n.userChunk)&&(n.userChunk(t.results,g,t.file),delete t.results)}t.finished&&!o&&oe(t.workerId,t.results)}function oe(e,t){var n=Y[e];C(n.userComplete)&&n.userComplete(t),n.terminate(),delete Y[e]}function ye(){throw new Error("Not implemented.")}function se(e){if(typeof e!="object"||e===null)return e;var t,n=Array.isArray(e)?[]:{};for(t in e)n[t]=se(e[t]);return n}function q(e,t){return function(){e.apply(t,arguments)}}function C(e){return typeof e=="function"}return w.parse=function(e,t){var n=(t=t||{}).dynamicTyping||!1;if(C(n)&&(t.dynamicTypingFunction=n,n={}),t.dynamicTyping=n,t.transform=!!C(t.transform)&&t.transform,!t.worker||!w.WORKERS_SUPPORTED)return n=null,w.NODE_STREAM_INPUT,typeof e=="string"?(e=(o=>o.charCodeAt(0)!==65279?o:o.slice(1))(e),n=new(t.download?B:J)(t)):e.readable===!0&&C(e.read)&&C(e.on)?n=new V(t):(f.File&&e instanceof File||e instanceof Object)&&(n=new X(t)),n.stream(e);(n=(()=>{var o;return!!w.WORKERS_SUPPORTED&&(o=(()=>{var g=f.URL||f.webkitURL||null,S=i.toString();return w.BLOB_URL||(w.BLOB_URL=g.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"})))})(),(o=new f.Worker(o)).onmessage=pe,o.id=H++,Y[o.id]=o)})()).userStep=t.step,n.userChunk=t.chunk,n.userComplete=t.complete,n.userError=t.error,t.step=C(t.step),t.chunk=C(t.chunk),t.complete=C(t.complete),t.error=C(t.error),delete t.worker,n.postMessage({input:e,config:t,workerId:n.id})},w.unparse=function(e,t){var n=!1,o=!0,g=",",S=`\r
|
|
14
|
+
`,m='"',h=m+m,l=!1,a=null,u=!1,c=((()=>{if(typeof t=="object"){if(typeof t.delimiter!="string"||w.BAD_DELIMITERS.filter(function(_){return t.delimiter.indexOf(_)!==-1}).length||(g=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"||(l=t.skipEmptyLines),typeof t.newline=="string"&&(S=t.newline),typeof t.quoteChar=="string"&&(m=t.quoteChar),typeof t.header=="boolean"&&(o=t.header),Array.isArray(t.columns)){if(t.columns.length===0)throw new Error("Option columns is empty");a=t.columns}t.escapeChar!==void 0&&(h=t.escapeChar+m),t.escapeFormulae instanceof RegExp?u=t.escapeFormulae:typeof t.escapeFormulae=="boolean"&&t.escapeFormulae&&(u=/^[=+\-@\t\r].*$/)}})(),new RegExp(ie(m),"g"));if(typeof e=="string"&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return y(null,e,l);if(typeof e[0]=="object")return y(a||Object.keys(e[0]),e,l)}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||a),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||[],l);throw new Error("Unable to serialize unrecognized input");function y(_,d,M){var R="",F=(typeof _=="string"&&(_=JSON.parse(_)),typeof d=="string"&&(d=JSON.parse(d)),Array.isArray(_)&&0<_.length),U=!Array.isArray(d[0]);if(F&&o){for(var k=0;k<_.length;k++)0<k&&(R+=g),R+=p(_[k],k);0<d.length&&(R+=S)}for(var E=0;E<d.length;E++){var x=(F?_:d[E]).length,v=!1,A=F?Object.keys(d[E]).length===0:d[E].length===0;if(M&&!F&&(v=M==="greedy"?d[E].join("").trim()==="":d[E].length===1&&d[E][0].length===0),M==="greedy"&&F){for(var z=[],T=0;T<x;T++){var L=U?_[T]:T;z.push(d[E][L])}v=z.join("").trim()===""}if(!v){for(var O=0;O<x;O++){0<O&&!A&&(R+=g);var G=F&&U?_[O]:O;R+=p(d[E][G],O)}E<d.length-1&&(!M||0<x&&!A)&&(R+=S)}}return R}function p(_,d){var M,R;return _==null?"":_.constructor===Date?JSON.stringify(_).slice(1,25):(R=!1,u&&typeof _=="string"&&u.test(_)&&(_="'"+_,R=!0),M=_.toString().replace(c,h),(R=R||n===!0||typeof n=="function"&&n(_,d)||Array.isArray(n)&&n[d]||((F,U)=>{for(var k=0;k<U.length;k++)if(-1<F.indexOf(U[k]))return!0;return!1})(M,w.BAD_DELIMITERS)||-1<M.indexOf(g)||M.charAt(0)===" "||M.charAt(M.length-1)===" ")?m+M+m:M)}},w.RECORD_SEP="",w.UNIT_SEP="",w.BYTE_ORDER_MARK="\uFEFF",w.BAD_DELIMITERS=["\r",`
|
|
15
|
+
`,'"',w.BYTE_ORDER_MARK],w.WORKERS_SUPPORTED=!$&&!!f.Worker,w.NODE_STREAM_INPUT=1,w.LocalChunkSize=10485760,w.RemoteChunkSize=5242880,w.DefaultDelimiter=",",w.Parser=le,w.ParserHandle=ee,w.NetworkStreamer=B,w.FileStreamer=X,w.StringStreamer=J,w.ReadableStreamStreamer=V,f.jQuery&&((b=f.jQuery).fn.parse=function(e){var t=e.config||{},n=[];return this.each(function(S){if(!(b(this).prop("tagName").toUpperCase()==="INPUT"&&b(this).attr("type").toLowerCase()==="file"&&f.FileReader)||!this.files||this.files.length===0)return!0;for(var m=0;m<this.files.length;m++)n.push({file:this.files[m],inputElem:this,instanceConfig:b.extend({},t)})}),o(),this;function o(){if(n.length===0)C(e.complete)&&e.complete();else{var S,m,h,l,a=n[0];if(C(e.before)){var u=e.before(a.file,a.inputElem);if(typeof u=="object"){if(u.action==="abort")return S="AbortError",m=a.file,h=a.inputElem,l=u.reason,void(C(e.error)&&e.error({name:S},m,h,l));if(u.action==="skip")return void g();typeof u.config=="object"&&(a.instanceConfig=b.extend(a.instanceConfig,u.config))}else if(u==="skip")return void g()}var c=a.instanceConfig.complete;a.instanceConfig.complete=function(y){C(c)&&c(y,a.file,a.inputElem),g()},w.parse(a.file,a.instanceConfig)}}function g(){n.splice(0,1),o()}}),I&&(f.onmessage=function(e){e=e.data,w.WORKER_ID===void 0&&e&&(w.WORKER_ID=e.workerId),typeof e.input=="string"?f.postMessage({workerId:w.WORKER_ID,results:w.parse(e.input,e.config),finished:!0}):(f.File&&e.input instanceof File||e.input instanceof Object)&&(e=w.parse(e.input,e.config))&&f.postMessage({workerId:w.WORKER_ID,results:e,finished:!0})}),(B.prototype=Object.create(N.prototype)).constructor=B,(X.prototype=Object.create(N.prototype)).constructor=X,(J.prototype=Object.create(J.prototype)).constructor=J,(V.prototype=Object.create(N.prototype)).constructor=V,w})})(_e)),_e.exports}var Le=Te();const Ie=ke(Le),{parse:Fe,unparse:ze}=Ie;class je{static unparse(r,i){return ze(r,i)}static parse(r){return new Promise((i,f)=>{Fe(r,{header:!0,complete:b=>i(b),error:b=>f(b)})})}}async function Oe(s,r,i){const f=i?.mimeType??Be(r),b=Ue(s,f);if("showSaveFilePicker"in window&&i?.showSaveFilePicker)try{const H=await(await window.showSaveFilePicker({suggestedName:r,types:[{description:"Datei",accept:{[f]:[`.${$e(r)}`]}}]})).createWritable();await H.write(b),await H.close();return}catch{}const $=URL.createObjectURL(b),I=document.createElement("a");I.href=$,I.download=r,I.rel="noopener",I.style.display="none",document.body.appendChild(I),Pe(I),window.setTimeout(()=>{document.body.removeChild(I),URL.revokeObjectURL($)},0),Ye()&&window.open($,"_blank","noopener,noreferrer")}function Ue(s,r){if(s instanceof Blob)return s.type?s:new Blob([s],{type:r});if(s instanceof ArrayBuffer||s instanceof Uint8Array){const i=s instanceof Uint8Array?s:new Uint8Array(s);return new Blob([i],{type:r})}return new Blob([s],{type:r||"text/plain;charset=utf-8"})}function Be(s){switch($e(s).toLowerCase()){case"txt":return"text/plain;charset=utf-8";case"csv":return"text/csv;charset=utf-8";case"json":return"application/json;charset=utf-8";case"pdf":return"application/pdf";case"png":return"image/png";case"jpg":case"jpeg":return"image/jpeg";case"svg":return"image/svg+xml";case"zip":return"application/zip";default:return"application/octet-stream"}}function $e(s){const r=s.lastIndexOf(".");return r>=0&&r<s.length-1?s.slice(r+1):""}function Pe(s){const r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),s.dispatchEvent(r)}function Ye(){const s=navigator.userAgent,r=/iPad|iPhone|iPod/.test(s),i=/^((?!chrome|android).)*safari/i.test(s);return r||i}class He{static getEnumValue(r,i){if(i in r)return r[i];throw Error(`${i} not found in ${r}`)}static getKeyValues(r){return Object.keys(r).filter(i=>!isNaN(Number(i))).map(i=>({key:Number(i),value:r[i]}))}}class Ne{static getFileExtension(r){let i="";const f=r.lastIndexOf(".");return f>0&&f<r.length-1&&(i=`.${r.substring(f+1).toLowerCase()}`),i}static readAsText(r){const i=new FileReader;return new Promise((f,b)=>{i.onload=()=>{i.onload=null,i.onerror=null,typeof i.result=="string"?f(i.result):b(new Error("Unexpected result type"))},i.onerror=()=>{const $=i.error??new Error("FileReader error");i.onload=null,i.onerror=null,b($)},i.readAsText(r)})}static readAsArrayBuffer(r){const i=new FileReader;return new Promise((f,b)=>{i.onload=()=>{i.onload=null,i.onerror=null,i.result instanceof ArrayBuffer?f(i.result):b(new Error("Unexpected result type"))},i.onerror=()=>{const $=i.error??new Error("FileReader error");i.onload=null,i.onerror=null,b($)},i.readAsArrayBuffer(r)})}static readAsDataUrl(r){const i=new FileReader;return new Promise((f,b)=>{i.onload=$=>{f($)},i.onerror=$=>b($),i.readAsDataURL(r)})}static formatFileSize(r,i=2,f){if(r===0)return"0 Bytes";const b=1024,$=["Bytes","KB","MB","GB","TB"];let I=Math.floor(Math.log(r)/Math.log(b));f&&$.includes(f)&&(I=$.indexOf(f));const Y=r/Math.pow(b,I);return`${parseFloat(Y.toFixed(i))} ${$[I]}`}static save(r,i,f){const b=new Blob([r],{type:f});Oe(b,i)}}class de{static set(r,i){localStorage.setItem(r,JSON.stringify(i))}static get(r){let i=null;const f=localStorage.getItem(r);return f&&(i=JSON.parse(f)),i}static remove(r){let i=!!de.get(r);return i&&localStorage.removeItem(r),i}static removeAll(){localStorage.clear()}static getKeysBy(r){return Object.keys(localStorage).filter(i=>i.startsWith(r))}}var ce=(s=>(s.log="log",s.info="info",s.warn="warn",s.debug="debug",s.error="error",s))(ce||{});class K{static listeners=new Set;static enabled=!0;static log(...r){K.doLog(ce.log,r)}static info(...r){K.doLog(ce.info,r)}static warn(...r){K.doLog(ce.warn,r)}static debug(...r){K.doLog(ce.debug,r)}static error(...r){K.doLog(ce.error,r)}static clearListeners(){K.listeners.clear()}static setEnabled(r){K.enabled=r}static doLog(r,i){if(!K.enabled)return;const f={type:r,args:i,timestamp:new Date().toISOString()};for(const b of K.listeners)try{if(b(f)===!1)return}catch{}console[r].apply(console,i)}static onLog(r,i=!1){if(i){const f=b=>{try{return r(b)}finally{K.listeners.delete(f)}};return K.listeners.add(f),()=>K.listeners.delete(f)}return K.listeners.add(r),()=>K.listeners.delete(r)}}class qe{static getScreenWidth(){return window.innerWidth}static getScreenHeight(){return window.innerHeight}}const We=(s,r,i)=>s.localeCompare(r)*(i?1:-1),Ke=(s,r)=>s<r?-1:s===r?0:1,Je=(s,r,i)=>Ke(s,r)*(i?1:-1),Qe=(s,r,i)=>{let f=0;return typeof s=="string"&&typeof r=="string"?f=We(s,r,i):f=Je(s,r,i),f},Re=(s,r,i,f)=>{const b=i(s),$=i(r);return Qe(b,$,f)};class Ve{static get(r){return de.get(r)}static set(r,i){de.set(r,i)}static remove(r){de.remove(r)}}function Ze(){Array.prototype.distinct=function(s){return s?this.filter((i,f,b)=>b.findIndex($=>s($,i))===f):this.filter((i,f,b)=>b.indexOf(i)===f)},Array.prototype.filterBy=function(s){return this.filter(r=>s(r))},Array.prototype.first=function(){return this.length>0?this[0]:null},Array.prototype.groupBy=function(s){return this.reduce((r,i)=>{const f=s(i);return r[f]||(r[f]=[]),r[f].push(i),r},{})},Array.prototype.orderBy=function(s,r=!0){return this?.sort((i,f)=>Re(i,f,s,r)),this},Array.prototype.removeBy=function(s,r){return this.filter(i=>s(i)!==r)}}var we={exports:{}},Ge=we.exports,xe;function Xe(){return xe||(xe=1,(function(s,r){(function(i,f){s.exports=f()})(Ge,(function(){var i=1e3,f=6e4,b=36e5,$="millisecond",I="second",Y="minute",H="hour",w="day",N="week",B="month",X="quarter",J="year",V="date",ee="Invalid Date",ie=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,le=/\[([^\]]+)]|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,pe={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(m){var h=["th","st","nd","rd"],l=m%100;return"["+m+(h[(l-20)%10]||h[l]||h[0])+"]"}},oe=function(m,h,l){var a=String(m);return!a||a.length>=h?m:""+Array(h+1-a.length).join(l)+m},ye={s:oe,z:function(m){var h=-m.utcOffset(),l=Math.abs(h),a=Math.floor(l/60),u=l%60;return(h<=0?"+":"-")+oe(a,2,"0")+":"+oe(u,2,"0")},m:function m(h,l){if(h.date()<l.date())return-m(l,h);var a=12*(l.year()-h.year())+(l.month()-h.month()),u=h.clone().add(a,B),c=l-u<0,y=h.clone().add(a+(c?-1:1),B);return+(-(a+(l-u)/(c?u-y:y-u))||0)},a:function(m){return m<0?Math.ceil(m)||0:Math.floor(m)},p:function(m){return{M:B,y:J,w:N,d:w,D:V,h:H,m:Y,s:I,ms:$,Q:X}[m]||String(m||"").toLowerCase().replace(/s$/,"")},u:function(m){return m===void 0}},se="en",q={};q[se]=pe;var C="$isDayjsObject",e=function(m){return m instanceof g||!(!m||!m[C])},t=function m(h,l,a){var u;if(!h)return se;if(typeof h=="string"){var c=h.toLowerCase();q[c]&&(u=c),l&&(q[c]=l,u=c);var y=h.split("-");if(!u&&y.length>1)return m(y[0])}else{var p=h.name;q[p]=h,u=p}return!a&&u&&(se=u),u||!a&&se},n=function(m,h){if(e(m))return m.clone();var l=typeof h=="object"?h:{};return l.date=m,l.args=arguments,new g(l)},o=ye;o.l=t,o.i=e,o.w=function(m,h){return n(m,{locale:h.$L,utc:h.$u,x:h.$x,$offset:h.$offset})};var g=(function(){function m(l){this.$L=t(l.locale,null,!0),this.parse(l),this.$x=this.$x||l.x||{},this[C]=!0}var h=m.prototype;return h.parse=function(l){this.$d=(function(a){var u=a.date,c=a.utc;if(u===null)return new Date(NaN);if(o.u(u))return new Date;if(u instanceof Date)return new Date(u);if(typeof u=="string"&&!/Z$/i.test(u)){var y=u.match(ie);if(y){var p=y[2]-1||0,_=(y[7]||"0").substring(0,3);return c?new Date(Date.UTC(y[1],p,y[3]||1,y[4]||0,y[5]||0,y[6]||0,_)):new Date(y[1],p,y[3]||1,y[4]||0,y[5]||0,y[6]||0,_)}}return new Date(u)})(l),this.init()},h.init=function(){var l=this.$d;this.$y=l.getFullYear(),this.$M=l.getMonth(),this.$D=l.getDate(),this.$W=l.getDay(),this.$H=l.getHours(),this.$m=l.getMinutes(),this.$s=l.getSeconds(),this.$ms=l.getMilliseconds()},h.$utils=function(){return o},h.isValid=function(){return this.$d.toString()!==ee},h.isSame=function(l,a){var u=n(l);return this.startOf(a)<=u&&u<=this.endOf(a)},h.isAfter=function(l,a){return n(l)<this.startOf(a)},h.isBefore=function(l,a){return this.endOf(a)<n(l)},h.$g=function(l,a,u){return o.u(l)?this[a]:this.set(u,l)},h.unix=function(){return Math.floor(this.valueOf()/1e3)},h.valueOf=function(){return this.$d.getTime()},h.startOf=function(l,a){var u=this,c=!!o.u(a)||a,y=o.p(l),p=function(E,x){var v=o.w(u.$u?Date.UTC(u.$y,x,E):new Date(u.$y,x,E),u);return c?v:v.endOf(w)},_=function(E,x){return o.w(u.toDate()[E].apply(u.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(x)),u)},d=this.$W,M=this.$M,R=this.$D,F="set"+(this.$u?"UTC":"");switch(y){case J:return c?p(1,0):p(31,11);case B:return c?p(1,M):p(0,M+1);case N:var U=this.$locale().weekStart||0,k=(d<U?d+7:d)-U;return p(c?R-k:R+(6-k),M);case w:case V:return _(F+"Hours",0);case H:return _(F+"Minutes",1);case Y:return _(F+"Seconds",2);case I:return _(F+"Milliseconds",3);default:return this.clone()}},h.endOf=function(l){return this.startOf(l,!1)},h.$set=function(l,a){var u,c=o.p(l),y="set"+(this.$u?"UTC":""),p=(u={},u[w]=y+"Date",u[V]=y+"Date",u[B]=y+"Month",u[J]=y+"FullYear",u[H]=y+"Hours",u[Y]=y+"Minutes",u[I]=y+"Seconds",u[$]=y+"Milliseconds",u)[c],_=c===w?this.$D+(a-this.$W):a;if(c===B||c===J){var d=this.clone().set(V,1);d.$d[p](_),d.init(),this.$d=d.set(V,Math.min(this.$D,d.daysInMonth())).$d}else p&&this.$d[p](_);return this.init(),this},h.set=function(l,a){return this.clone().$set(l,a)},h.get=function(l){return this[o.p(l)]()},h.add=function(l,a){var u,c=this;l=Number(l);var y=o.p(a),p=function(M){var R=n(c);return o.w(R.date(R.date()+Math.round(M*l)),c)};if(y===B)return this.set(B,this.$M+l);if(y===J)return this.set(J,this.$y+l);if(y===w)return p(1);if(y===N)return p(7);var _=(u={},u[Y]=f,u[H]=b,u[I]=i,u)[y]||1,d=this.$d.getTime()+l*_;return o.w(d,this)},h.subtract=function(l,a){return this.add(-1*l,a)},h.format=function(l){var a=this,u=this.$locale();if(!this.isValid())return u.invalidDate||ee;var c=l||"YYYY-MM-DDTHH:mm:ssZ",y=o.z(this),p=this.$H,_=this.$m,d=this.$M,M=u.weekdays,R=u.months,F=u.meridiem,U=function(x,v,A,z){return x&&(x[v]||x(a,c))||A[v].slice(0,z)},k=function(x){return o.s(p%12||12,x,"0")},E=F||function(x,v,A){var z=x<12?"AM":"PM";return A?z.toLowerCase():z};return c.replace(le,(function(x,v){return v||(function(A){switch(A){case"YY":return String(a.$y).slice(-2);case"YYYY":return o.s(a.$y,4,"0");case"M":return d+1;case"MM":return o.s(d+1,2,"0");case"MMM":return U(u.monthsShort,d,R,3);case"MMMM":return U(R,d);case"D":return a.$D;case"DD":return o.s(a.$D,2,"0");case"d":return String(a.$W);case"dd":return U(u.weekdaysMin,a.$W,M,2);case"ddd":return U(u.weekdaysShort,a.$W,M,3);case"dddd":return M[a.$W];case"H":return String(p);case"HH":return o.s(p,2,"0");case"h":return k(1);case"hh":return k(2);case"a":return E(p,_,!0);case"A":return E(p,_,!1);case"m":return String(_);case"mm":return o.s(_,2,"0");case"s":return String(a.$s);case"ss":return o.s(a.$s,2,"0");case"SSS":return o.s(a.$ms,3,"0");case"Z":return y}return null})(x)||y.replace(":","")}))},h.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},h.diff=function(l,a,u){var c,y=this,p=o.p(a),_=n(l),d=(_.utcOffset()-this.utcOffset())*f,M=this-_,R=function(){return o.m(y,_)};switch(p){case J:c=R()/12;break;case B:c=R();break;case X:c=R()/3;break;case N:c=(M-d)/6048e5;break;case w:c=(M-d)/864e5;break;case H:c=M/b;break;case Y:c=M/f;break;case I:c=M/i;break;default:c=M}return u?c:o.a(c)},h.daysInMonth=function(){return this.endOf(B).$D},h.$locale=function(){return q[this.$L]},h.locale=function(l,a){if(!l)return this.$L;var u=this.clone(),c=t(l,a,!0);return c&&(u.$L=c),u},h.clone=function(){return o.w(this.$d,this)},h.toDate=function(){return new Date(this.valueOf())},h.toJSON=function(){return this.isValid()?this.toISOString():null},h.toISOString=function(){return this.$d.toISOString()},h.toString=function(){return this.$d.toUTCString()},m})(),S=g.prototype;return n.prototype=S,[["$ms",$],["$s",I],["$m",Y],["$H",H],["$W",w],["$M",B],["$y",J],["$D",V]].forEach((function(m){S[m[1]]=function(h){return this.$g(h,m[0],m[1])}})),n.extend=function(m,h){return m.$i||(m(h,g,n),m.$i=!0),n},n.locale=t,n.isDayjs=e,n.unix=function(m){return n(1e3*m)},n.en=q[se],n.Ls=q,n.p={},n}))})(we)),we.exports}var et=Xe();const Z=ke(et);var ve={exports:{}},tt=ve.exports,Me;function rt(){return Me||(Me=1,(function(s,r){(function(i,f){s.exports=f()})(tt,(function(){var i={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(f,b,$){var I=b.prototype,Y=I.format;$.en.formats=i,I.format=function(H){H===void 0&&(H="YYYY-MM-DDTHH:mm:ssZ");var w=this.$locale().formats,N=(function(B,X){return B.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(J,V,ee){var ie=ee&&ee.toUpperCase();return V||X[ee]||i[ee]||X[ie].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(le,pe,oe){return pe||oe.slice(1)}))}))})(H,w===void 0?{}:w);return Y.call(this,N)}}}))})(ve)),ve.exports}var nt=rt();const it=ke(nt);Z.extend(it);function st(){Date.prototype.add=function(s,r){return Z(this).add(s,r).toDate()},Date.prototype.diff=function(s,r){return Z(this).diff(s,r)},Date.prototype.endOf=function(s){return Z(this).endOf(s).toDate()},Date.prototype.firstDayOfMonth=function(){return Z(this).startOf("month").toDate()},Date.prototype.isAfter=function(s,r){return Z(this).isAfter(s,r)},Date.prototype.isBefore=function(s,r){return Z(this).isBefore(s,r)},Date.prototype.format=function(s){return Z(this).format(s)},Date.prototype.isValid=function(){return Z(this).isValid()},Date.prototype.subtract=function(s,r){return Z(this).subtract(s,r).toDate()},Date.prototype.lastDayOfMonth=function(){return Z(this).endOf("month").toDate()},Date.prototype.set=function(s,r){return Z(this).set(s,r).toDate()},Date.prototype.startOf=function(s){return Z(this).startOf(s).toDate()}}function at(){String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)},String.prototype.isNumber=function(){return!isNaN(Number(this))&&this.trim()!==""},String.prototype.isEmpty=function(){return this===void 0||!this||this.length===0},String.prototype.stripTags=function(){return new DOMParser().parseFromString(this.toString(),"text/html").body.textContent||""}}class ot{resizeListener;onResizeCallbacks=new Set;rafId=null;emitTimeoutId=null;duplicateThresholdMs=60;constructor(){typeof window<"u"&&(this.resizeListener=this.onResize.bind(this),window.addEventListener("resize",this.resizeListener,{passive:!0}))}destroy(){typeof window<"u"&&window.removeEventListener("resize",this.resizeListener),this.onResizeCallbacks.clear(),this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null)}onResizeChange(r){this.onResizeCallbacks.add(r)}offResizeChange(r){this.onResizeCallbacks.delete(r)}onResize=()=>{typeof window>"u"||(this.emitTimeoutId&&clearTimeout(this.emitTimeoutId),this.emitTimeoutId=window.setTimeout(()=>{this.emitTimeoutId=null},this.duplicateThresholdMs))}}exports.BrowserService=ot;exports.CsvHelper=je;exports.EnumHelper=He;exports.FileHelper=Ne;exports.LocalStorageHelper=de;exports.LoggerHelper=K;exports.LoggerType=ce;exports.ScreenHelper=qe;exports.TokenHelper=Ve;exports.copyToClipboard=Ce;exports.initArrayExtensions=Ze;exports.initDateExtensions=st;exports.initStringExtensions=at;exports.saveAs=Oe;exports.sortHelper=Re;
|
package/index.es.js
CHANGED
|
@@ -17,7 +17,7 @@ function Rt() {
|
|
|
17
17
|
((i, f) => {
|
|
18
18
|
s.exports = f();
|
|
19
19
|
})($t, function i() {
|
|
20
|
-
var f = typeof self < "u" ? self : typeof window < "u" ? window : f !== void 0 ? f : {}, b, $ = !f.document && !!f.postMessage,
|
|
20
|
+
var f = typeof self < "u" ? self : typeof window < "u" ? window : f !== void 0 ? f : {}, b, $ = !f.document && !!f.postMessage, I = f.IS_PAPA_WORKER || !1, Y = {}, N = 0, w = {};
|
|
21
21
|
function q(t) {
|
|
22
22
|
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(e) {
|
|
23
23
|
var n = st(e);
|
|
@@ -31,7 +31,7 @@ function Rt() {
|
|
|
31
31
|
this.isFirstChunk && C(this._config.beforeFirstChunk) && (g = this._config.beforeFirstChunk(e)) !== void 0 && (e = g), this.isFirstChunk = !1, this._halted = !1;
|
|
32
32
|
var o = this._partialLine + e, g = (this._partialLine = "", this._handle.parse(o, this._baseIndex, !this._finished));
|
|
33
33
|
if (!this._handle.paused() && !this._handle.aborted()) {
|
|
34
|
-
if (e = g.meta.cursor, o = (this._finished || (this._partialLine = o.substring(e - this._baseIndex), this._baseIndex = e), g && g.data && (this._rowCount += g.data.length), this._finished || this._config.preview && this._rowCount >= this._config.preview),
|
|
34
|
+
if (e = g.meta.cursor, o = (this._finished || (this._partialLine = o.substring(e - this._baseIndex), this._baseIndex = e), g && g.data && (this._rowCount += g.data.length), this._finished || this._config.preview && this._rowCount >= this._config.preview), I) f.postMessage({ results: g, workerId: w.WORKER_ID, finished: o });
|
|
35
35
|
else if (C(this._config.chunk) && !n) {
|
|
36
36
|
if (this._config.chunk(g, this._handle), this._handle.paused() || this._handle.aborted()) return void (this._halted = !0);
|
|
37
37
|
this._completeResults = g = void 0;
|
|
@@ -40,7 +40,7 @@ function Rt() {
|
|
|
40
40
|
}
|
|
41
41
|
this._halted = !0;
|
|
42
42
|
}, this._sendError = function(e) {
|
|
43
|
-
C(this._config.error) ? this._config.error(e) :
|
|
43
|
+
C(this._config.error) ? this._config.error(e) : I && this._config.error && f.postMessage({ workerId: w.WORKER_ID, error: e, finished: !1 });
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
function B(t) {
|
|
@@ -127,12 +127,12 @@ function Rt() {
|
|
|
127
127
|
}
|
|
128
128
|
function tt(t) {
|
|
129
129
|
var e, n, o, g, S = Math.pow(2, 53), m = -S, h = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, l = /^((\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)))$/, a = this, u = 0, c = 0, y = !1, p = !1, _ = [], d = { data: [], errors: [], meta: {} };
|
|
130
|
-
function
|
|
130
|
+
function M(k) {
|
|
131
131
|
return t.skipEmptyLines === "greedy" ? k.join("").trim() === "" : k.length === 1 && k[0].length === 0;
|
|
132
132
|
}
|
|
133
133
|
function R() {
|
|
134
134
|
if (d && o && (U("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + w.DefaultDelimiter + "'"), o = !1), t.skipEmptyLines && (d.data = d.data.filter(function(v) {
|
|
135
|
-
return !
|
|
135
|
+
return !M(v);
|
|
136
136
|
})), F()) {
|
|
137
137
|
let v = function(A, z) {
|
|
138
138
|
C(t.transformHeader) && (A = t.transformHeader(A, z)), _.push(A);
|
|
@@ -144,11 +144,11 @@ function Rt() {
|
|
|
144
144
|
}
|
|
145
145
|
function E(v, A) {
|
|
146
146
|
for (var z = t.header ? {} : [], T = 0; T < v.length; T++) {
|
|
147
|
-
var
|
|
147
|
+
var L = T, O = v[T], O = ((G, D) => ((j) => (t.dynamicTypingFunction && t.dynamicTyping[j] === void 0 && (t.dynamicTyping[j] = t.dynamicTypingFunction(j)), (t.dynamicTyping[j] || t.dynamicTyping) === !0))(G) ? D === "true" || D === "TRUE" || D !== "false" && D !== "FALSE" && (((j) => {
|
|
148
148
|
if (h.test(j) && (j = parseFloat(j), m < j && j < S))
|
|
149
149
|
return 1;
|
|
150
|
-
})(D) ? parseFloat(D) : l.test(D) ? new Date(D) : D === "" ? null : D) : D)(
|
|
151
|
-
|
|
150
|
+
})(D) ? parseFloat(D) : l.test(D) ? new Date(D) : D === "" ? null : D) : D)(L = t.header ? T >= _.length ? "__parsed_extra" : _[T] : L, O = t.transform ? t.transform(O, L) : O);
|
|
151
|
+
L === "__parsed_extra" ? (z[L] = z[L] || [], z[L].push(O)) : z[L] = O;
|
|
152
152
|
}
|
|
153
153
|
return t.header && (T > _.length ? U("FieldMismatch", "TooManyFields", "Too many fields: expected " + _.length + " fields but parsed " + T, c + A) : T < _.length && U("FieldMismatch", "TooFewFields", "Too few fields: expected " + _.length + " fields but parsed " + T, c + A)), z;
|
|
154
154
|
}
|
|
@@ -164,11 +164,11 @@ function Rt() {
|
|
|
164
164
|
C(t.step) && (g = t.step, t.step = function(k) {
|
|
165
165
|
d = k, F() ? R() : (R(), d.data.length !== 0 && (u += k.data.length, t.preview && u > t.preview ? n.abort() : (d.data = d.data[0], g(d, a))));
|
|
166
166
|
}), this.parse = function(k, E, x) {
|
|
167
|
-
var v = t.quoteChar || '"', v = (t.newline || (t.newline = this.guessLineEndings(k, v)), o = !1, t.delimiter ? C(t.delimiter) && (t.delimiter = t.delimiter(k), d.meta.delimiter = t.delimiter) : ((v = ((A, z, T,
|
|
167
|
+
var v = t.quoteChar || '"', v = (t.newline || (t.newline = this.guessLineEndings(k, v)), o = !1, t.delimiter ? C(t.delimiter) && (t.delimiter = t.delimiter(k), d.meta.delimiter = t.delimiter) : ((v = ((A, z, T, L, O) => {
|
|
168
168
|
var G, D, j, ut;
|
|
169
|
-
|
|
170
|
-
for (var lt = 0; lt <
|
|
171
|
-
for (var et, pt =
|
|
169
|
+
O = O || [",", " ", "|", ";", w.RECORD_SEP, w.UNIT_SEP];
|
|
170
|
+
for (var lt = 0; lt < O.length; lt++) {
|
|
171
|
+
for (var et, pt = O[lt], H = 0, rt = 0, P = 0, Q = (j = void 0, new ct({ comments: L, delimiter: pt, newline: z, preview: 10 }).parse(A)), at = 0; at < Q.data.length; at++) T && M(Q.data[at]) ? P++ : (et = Q.data[at].length, rt += et, j === void 0 ? j = et : 0 < et && (H += Math.abs(et - j), j = et));
|
|
172
172
|
0 < Q.data.length && (rt /= Q.data.length - P), (D === void 0 || H <= D) && (ut === void 0 || ut < rt) && 1.99 < rt && (D = H, G = pt, ut = rt);
|
|
173
173
|
}
|
|
174
174
|
return { successful: !!(t.delimiter = G), bestDelimiter: G };
|
|
@@ -209,7 +209,7 @@ function Rt() {
|
|
|
209
209
|
var c = 0, y = !1;
|
|
210
210
|
this.parse = function(p, _, d) {
|
|
211
211
|
if (typeof p != "string") throw new Error("Input must be a string");
|
|
212
|
-
var
|
|
212
|
+
var M = p.length, R = e.length, F = n.length, U = o.length, k = C(g), E = [], x = [], v = [], A = c = 0;
|
|
213
213
|
if (!p) return H();
|
|
214
214
|
if (m || m !== !1 && p.indexOf(a) === -1) {
|
|
215
215
|
for (var z = p.split(n), T = 0; T < z.length; T++) {
|
|
@@ -224,19 +224,19 @@ function Rt() {
|
|
|
224
224
|
}
|
|
225
225
|
return H();
|
|
226
226
|
}
|
|
227
|
-
for (var
|
|
227
|
+
for (var L = p.indexOf(e, c), O = p.indexOf(n, c), G = new RegExp(it(u) + it(a), "g"), D = p.indexOf(a, c); ; ) if (p[c] === a) for (D = c, c++; ; ) {
|
|
228
228
|
if ((D = p.indexOf(a, D + 1)) === -1) return d || x.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: E.length, index: c }), et();
|
|
229
|
-
if (D ===
|
|
229
|
+
if (D === M - 1) return et(p.substring(c, D).replace(G, a));
|
|
230
230
|
if (a === u && p[D + 1] === u) D++;
|
|
231
231
|
else if (a === u || D === 0 || p[D - 1] !== u) {
|
|
232
|
-
|
|
233
|
-
var j = lt((
|
|
232
|
+
L !== -1 && L < D + 1 && (L = p.indexOf(e, D + 1));
|
|
233
|
+
var j = lt((O = O !== -1 && O < D + 1 ? p.indexOf(n, D + 1) : O) === -1 ? L : Math.min(L, O));
|
|
234
234
|
if (p.substr(D + 1 + j, R) === e) {
|
|
235
|
-
v.push(p.substring(c, D).replace(G, a)), p[c = D + 1 + j + R] !== a && (D = p.indexOf(a, c)),
|
|
235
|
+
v.push(p.substring(c, D).replace(G, a)), p[c = D + 1 + j + R] !== a && (D = p.indexOf(a, c)), L = p.indexOf(e, c), O = p.indexOf(n, c);
|
|
236
236
|
break;
|
|
237
237
|
}
|
|
238
|
-
if (j = lt(
|
|
239
|
-
if (v.push(p.substring(c, D).replace(G, a)), pt(D + 1 + j + F),
|
|
238
|
+
if (j = lt(O), p.substring(D + 1 + j, D + 1 + j + F) === n) {
|
|
239
|
+
if (v.push(p.substring(c, D).replace(G, a)), pt(D + 1 + j + F), L = p.indexOf(e, c), D = p.indexOf(a, c), k && (rt(), y)) return H();
|
|
240
240
|
if (S && E.length >= S) return H(!0);
|
|
241
241
|
break;
|
|
242
242
|
}
|
|
@@ -244,12 +244,12 @@ function Rt() {
|
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
else if (o && v.length === 0 && p.substring(c, c + U) === o) {
|
|
247
|
-
if (
|
|
248
|
-
c =
|
|
249
|
-
} else if (
|
|
247
|
+
if (O === -1) return H();
|
|
248
|
+
c = O + F, O = p.indexOf(n, c), L = p.indexOf(e, c);
|
|
249
|
+
} else if (L !== -1 && (L < O || O === -1)) v.push(p.substring(c, L)), c = L + R, L = p.indexOf(e, c);
|
|
250
250
|
else {
|
|
251
|
-
if (
|
|
252
|
-
if (v.push(p.substring(c,
|
|
251
|
+
if (O === -1) break;
|
|
252
|
+
if (v.push(p.substring(c, O)), pt(O + F), k && (rt(), y)) return H();
|
|
253
253
|
if (S && E.length >= S) return H(!0);
|
|
254
254
|
}
|
|
255
255
|
return et();
|
|
@@ -261,10 +261,10 @@ function Rt() {
|
|
|
261
261
|
return Q = P !== -1 && (P = p.substring(D + 1, P)) && P.trim() === "" ? P.length : Q;
|
|
262
262
|
}
|
|
263
263
|
function et(P) {
|
|
264
|
-
return d || (P === void 0 && (P = p.substring(c)), v.push(P), c =
|
|
264
|
+
return d || (P === void 0 && (P = p.substring(c)), v.push(P), c = M, ut(v), k && rt()), H();
|
|
265
265
|
}
|
|
266
266
|
function pt(P) {
|
|
267
|
-
c = P, ut(v), v = [],
|
|
267
|
+
c = P, ut(v), v = [], O = p.indexOf(n, c);
|
|
268
268
|
}
|
|
269
269
|
function H(P) {
|
|
270
270
|
if (t.header && !_ && E.length && !l) {
|
|
@@ -355,7 +355,7 @@ function Rt() {
|
|
|
355
355
|
if (typeof t[0] == "object") return y(a || Object.keys(t[0]), t, l);
|
|
356
356
|
} else if (typeof t == "object") return typeof t.data == "string" && (t.data = JSON.parse(t.data)), Array.isArray(t.data) && (t.fields || (t.fields = t.meta && t.meta.fields || a), t.fields || (t.fields = Array.isArray(t.data[0]) ? t.fields : typeof t.data[0] == "object" ? Object.keys(t.data[0]) : []), Array.isArray(t.data[0]) || typeof t.data[0] == "object" || (t.data = [t.data])), y(t.fields || [], t.data || [], l);
|
|
357
357
|
throw new Error("Unable to serialize unrecognized input");
|
|
358
|
-
function y(_, d,
|
|
358
|
+
function y(_, d, M) {
|
|
359
359
|
var R = "", F = (typeof _ == "string" && (_ = JSON.parse(_)), typeof d == "string" && (d = JSON.parse(d)), Array.isArray(_) && 0 < _.length), U = !Array.isArray(d[0]);
|
|
360
360
|
if (F && o) {
|
|
361
361
|
for (var k = 0; k < _.length; k++) 0 < k && (R += g), R += p(_[k], k);
|
|
@@ -363,30 +363,30 @@ function Rt() {
|
|
|
363
363
|
}
|
|
364
364
|
for (var E = 0; E < d.length; E++) {
|
|
365
365
|
var x = (F ? _ : d[E]).length, v = !1, A = F ? Object.keys(d[E]).length === 0 : d[E].length === 0;
|
|
366
|
-
if (
|
|
366
|
+
if (M && !F && (v = M === "greedy" ? d[E].join("").trim() === "" : d[E].length === 1 && d[E][0].length === 0), M === "greedy" && F) {
|
|
367
367
|
for (var z = [], T = 0; T < x; T++) {
|
|
368
|
-
var
|
|
369
|
-
z.push(d[E][
|
|
368
|
+
var L = U ? _[T] : T;
|
|
369
|
+
z.push(d[E][L]);
|
|
370
370
|
}
|
|
371
371
|
v = z.join("").trim() === "";
|
|
372
372
|
}
|
|
373
373
|
if (!v) {
|
|
374
|
-
for (var
|
|
375
|
-
0 <
|
|
376
|
-
var G = F && U ? _[
|
|
377
|
-
R += p(d[E][G],
|
|
374
|
+
for (var O = 0; O < x; O++) {
|
|
375
|
+
0 < O && !A && (R += g);
|
|
376
|
+
var G = F && U ? _[O] : O;
|
|
377
|
+
R += p(d[E][G], O);
|
|
378
378
|
}
|
|
379
|
-
E < d.length - 1 && (!
|
|
379
|
+
E < d.length - 1 && (!M || 0 < x && !A) && (R += S);
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
382
|
return R;
|
|
383
383
|
}
|
|
384
384
|
function p(_, d) {
|
|
385
|
-
var
|
|
386
|
-
return _ == null ? "" : _.constructor === Date ? JSON.stringify(_).slice(1, 25) : (R = !1, u && typeof _ == "string" && u.test(_) && (_ = "'" + _, R = !0),
|
|
385
|
+
var M, R;
|
|
386
|
+
return _ == null ? "" : _.constructor === Date ? JSON.stringify(_).slice(1, 25) : (R = !1, u && typeof _ == "string" && u.test(_) && (_ = "'" + _, R = !0), M = _.toString().replace(c, h), (R = R || n === !0 || typeof n == "function" && n(_, d) || Array.isArray(n) && n[d] || ((F, U) => {
|
|
387
387
|
for (var k = 0; k < U.length; k++) if (-1 < F.indexOf(U[k])) return !0;
|
|
388
388
|
return !1;
|
|
389
|
-
})(
|
|
389
|
+
})(M, w.BAD_DELIMITERS) || -1 < M.indexOf(g) || M.charAt(0) === " " || M.charAt(M.length - 1) === " ") ? m + M + m : M);
|
|
390
390
|
}
|
|
391
391
|
}, w.RECORD_SEP = "", w.UNIT_SEP = "", w.BYTE_ORDER_MARK = "\uFEFF", w.BAD_DELIMITERS = ["\r", `
|
|
392
392
|
`, '"', w.BYTE_ORDER_MARK], w.WORKERS_SUPPORTED = !$ && !!f.Worker, w.NODE_STREAM_INPUT = 1, w.LocalChunkSize = 10485760, w.RemoteChunkSize = 5242880, w.DefaultDelimiter = ",", w.Parser = ct, w.ParserHandle = tt, w.NetworkStreamer = B, w.FileStreamer = X, w.StringStreamer = K, w.ReadableStreamStreamer = V, f.jQuery && ((b = f.jQuery).fn.parse = function(t) {
|
|
@@ -416,17 +416,17 @@ function Rt() {
|
|
|
416
416
|
function g() {
|
|
417
417
|
n.splice(0, 1), o();
|
|
418
418
|
}
|
|
419
|
-
}),
|
|
419
|
+
}), I && (f.onmessage = function(t) {
|
|
420
420
|
t = t.data, w.WORKER_ID === void 0 && t && (w.WORKER_ID = t.workerId), typeof t.input == "string" ? f.postMessage({ workerId: w.WORKER_ID, results: w.parse(t.input, t.config), finished: !0 }) : (f.File && t.input instanceof File || t.input instanceof Object) && (t = w.parse(t.input, t.config)) && f.postMessage({ workerId: w.WORKER_ID, results: t, finished: !0 });
|
|
421
421
|
}), (B.prototype = Object.create(q.prototype)).constructor = B, (X.prototype = Object.create(q.prototype)).constructor = X, (K.prototype = Object.create(K.prototype)).constructor = K, (V.prototype = Object.create(q.prototype)).constructor = V, w;
|
|
422
422
|
});
|
|
423
423
|
})(_t)), _t.exports;
|
|
424
424
|
}
|
|
425
425
|
var Ct = Rt();
|
|
426
|
-
const At = /* @__PURE__ */ kt(Ct), { parse: Tt, unparse:
|
|
426
|
+
const At = /* @__PURE__ */ kt(Ct), { parse: Tt, unparse: Lt } = At;
|
|
427
427
|
class Xt {
|
|
428
428
|
static unparse(r, i) {
|
|
429
|
-
return
|
|
429
|
+
return Lt(r, i);
|
|
430
430
|
}
|
|
431
431
|
static parse(r) {
|
|
432
432
|
return new Promise((i, f) => {
|
|
@@ -438,21 +438,21 @@ class Xt {
|
|
|
438
438
|
});
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
|
-
async function
|
|
441
|
+
async function It(s, r, i) {
|
|
442
442
|
const f = i?.mimeType ?? zt(r), b = Ft(s, f);
|
|
443
443
|
if ("showSaveFilePicker" in window && i?.showSaveFilePicker)
|
|
444
444
|
try {
|
|
445
445
|
const N = await (await window.showSaveFilePicker({
|
|
446
446
|
suggestedName: r,
|
|
447
|
-
types: [{ description: "Datei", accept: { [f]: [`.${
|
|
447
|
+
types: [{ description: "Datei", accept: { [f]: [`.${Ot(r)}`] } }]
|
|
448
448
|
})).createWritable();
|
|
449
449
|
await N.write(b), await N.close();
|
|
450
450
|
return;
|
|
451
451
|
} catch {
|
|
452
452
|
}
|
|
453
|
-
const $ = URL.createObjectURL(b),
|
|
454
|
-
|
|
455
|
-
document.body.removeChild(
|
|
453
|
+
const $ = URL.createObjectURL(b), I = document.createElement("a");
|
|
454
|
+
I.href = $, I.download = r, I.rel = "noopener", I.style.display = "none", document.body.appendChild(I), jt(I), window.setTimeout(() => {
|
|
455
|
+
document.body.removeChild(I), URL.revokeObjectURL($);
|
|
456
456
|
}, 0), Ut() && window.open($, "_blank", "noopener,noreferrer");
|
|
457
457
|
}
|
|
458
458
|
function Ft(s, r) {
|
|
@@ -465,7 +465,7 @@ function Ft(s, r) {
|
|
|
465
465
|
return new Blob([s], { type: r || "text/plain;charset=utf-8" });
|
|
466
466
|
}
|
|
467
467
|
function zt(s) {
|
|
468
|
-
switch (
|
|
468
|
+
switch (Ot(s).toLowerCase()) {
|
|
469
469
|
case "txt":
|
|
470
470
|
return "text/plain;charset=utf-8";
|
|
471
471
|
case "csv":
|
|
@@ -487,7 +487,7 @@ function zt(s) {
|
|
|
487
487
|
return "application/octet-stream";
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function Ot(s) {
|
|
491
491
|
const r = s.lastIndexOf(".");
|
|
492
492
|
return r >= 0 && r < s.length - 1 ? s.slice(r + 1) : "";
|
|
493
493
|
}
|
|
@@ -559,14 +559,14 @@ class ee {
|
|
|
559
559
|
if (r === 0)
|
|
560
560
|
return "0 Bytes";
|
|
561
561
|
const b = 1024, $ = ["Bytes", "KB", "MB", "GB", "TB"];
|
|
562
|
-
let
|
|
563
|
-
f && $.includes(f) && (
|
|
564
|
-
const Y = r / Math.pow(b,
|
|
565
|
-
return `${parseFloat(Y.toFixed(i))} ${$[
|
|
562
|
+
let I = Math.floor(Math.log(r) / Math.log(b));
|
|
563
|
+
f && $.includes(f) && (I = $.indexOf(f));
|
|
564
|
+
const Y = r / Math.pow(b, I);
|
|
565
|
+
return `${parseFloat(Y.toFixed(i))} ${$[I]}`;
|
|
566
566
|
}
|
|
567
567
|
static save(r, i, f) {
|
|
568
568
|
const b = new Blob([r], { type: f });
|
|
569
|
-
|
|
569
|
+
It(b, i);
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
572
|
class mt {
|
|
@@ -694,7 +694,7 @@ function Ht() {
|
|
|
694
694
|
(function(i, f) {
|
|
695
695
|
s.exports = f();
|
|
696
696
|
})(Wt, (function() {
|
|
697
|
-
var i = 1e3, f = 6e4, b = 36e5, $ = "millisecond",
|
|
697
|
+
var i = 1e3, f = 6e4, b = 36e5, $ = "millisecond", I = "second", Y = "minute", N = "hour", w = "day", q = "week", B = "month", X = "quarter", K = "year", V = "date", tt = "Invalid Date", it = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, ct = /\[([^\]]+)]|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, dt = { 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(m) {
|
|
698
698
|
var h = ["th", "st", "nd", "rd"], l = m % 100;
|
|
699
699
|
return "[" + m + (h[(l - 20) % 10] || h[l] || h[0]) + "]";
|
|
700
700
|
} }, ot = function(m, h, l) {
|
|
@@ -710,7 +710,7 @@ function Ht() {
|
|
|
710
710
|
}, a: function(m) {
|
|
711
711
|
return m < 0 ? Math.ceil(m) || 0 : Math.floor(m);
|
|
712
712
|
}, p: function(m) {
|
|
713
|
-
return { M: B, y: K, w: q, d: w, D: V, h: N, m: Y, s:
|
|
713
|
+
return { M: B, y: K, w: q, d: w, D: V, h: N, m: Y, s: I, ms: $, Q: X }[m] || String(m || "").toLowerCase().replace(/s$/, "");
|
|
714
714
|
}, u: function(m) {
|
|
715
715
|
return m === void 0;
|
|
716
716
|
} }, st = "en", W = {};
|
|
@@ -784,15 +784,15 @@ function Ht() {
|
|
|
784
784
|
return c ? v : v.endOf(w);
|
|
785
785
|
}, _ = function(E, x) {
|
|
786
786
|
return o.w(u.toDate()[E].apply(u.toDate("s"), (c ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(x)), u);
|
|
787
|
-
}, d = this.$W,
|
|
787
|
+
}, d = this.$W, M = this.$M, R = this.$D, F = "set" + (this.$u ? "UTC" : "");
|
|
788
788
|
switch (y) {
|
|
789
789
|
case K:
|
|
790
790
|
return c ? p(1, 0) : p(31, 11);
|
|
791
791
|
case B:
|
|
792
|
-
return c ? p(1,
|
|
792
|
+
return c ? p(1, M) : p(0, M + 1);
|
|
793
793
|
case q:
|
|
794
794
|
var U = this.$locale().weekStart || 0, k = (d < U ? d + 7 : d) - U;
|
|
795
|
-
return p(c ? R - k : R + (6 - k),
|
|
795
|
+
return p(c ? R - k : R + (6 - k), M);
|
|
796
796
|
case w:
|
|
797
797
|
case V:
|
|
798
798
|
return _(F + "Hours", 0);
|
|
@@ -800,7 +800,7 @@ function Ht() {
|
|
|
800
800
|
return _(F + "Minutes", 1);
|
|
801
801
|
case Y:
|
|
802
802
|
return _(F + "Seconds", 2);
|
|
803
|
-
case
|
|
803
|
+
case I:
|
|
804
804
|
return _(F + "Milliseconds", 3);
|
|
805
805
|
default:
|
|
806
806
|
return this.clone();
|
|
@@ -808,7 +808,7 @@ function Ht() {
|
|
|
808
808
|
}, h.endOf = function(l) {
|
|
809
809
|
return this.startOf(l, !1);
|
|
810
810
|
}, h.$set = function(l, a) {
|
|
811
|
-
var u, c = o.p(l), y = "set" + (this.$u ? "UTC" : ""), p = (u = {}, u[w] = y + "Date", u[V] = y + "Date", u[B] = y + "Month", u[K] = y + "FullYear", u[N] = y + "Hours", u[Y] = y + "Minutes", u[
|
|
811
|
+
var u, c = o.p(l), y = "set" + (this.$u ? "UTC" : ""), p = (u = {}, u[w] = y + "Date", u[V] = y + "Date", u[B] = y + "Month", u[K] = y + "FullYear", u[N] = y + "Hours", u[Y] = y + "Minutes", u[I] = y + "Seconds", u[$] = y + "Milliseconds", u)[c], _ = c === w ? this.$D + (a - this.$W) : a;
|
|
812
812
|
if (c === B || c === K) {
|
|
813
813
|
var d = this.clone().set(V, 1);
|
|
814
814
|
d.$d[p](_), d.init(), this.$d = d.set(V, Math.min(this.$D, d.daysInMonth())).$d;
|
|
@@ -821,22 +821,22 @@ function Ht() {
|
|
|
821
821
|
}, h.add = function(l, a) {
|
|
822
822
|
var u, c = this;
|
|
823
823
|
l = Number(l);
|
|
824
|
-
var y = o.p(a), p = function(
|
|
824
|
+
var y = o.p(a), p = function(M) {
|
|
825
825
|
var R = n(c);
|
|
826
|
-
return o.w(R.date(R.date() + Math.round(
|
|
826
|
+
return o.w(R.date(R.date() + Math.round(M * l)), c);
|
|
827
827
|
};
|
|
828
828
|
if (y === B) return this.set(B, this.$M + l);
|
|
829
829
|
if (y === K) return this.set(K, this.$y + l);
|
|
830
830
|
if (y === w) return p(1);
|
|
831
831
|
if (y === q) return p(7);
|
|
832
|
-
var _ = (u = {}, u[Y] = f, u[N] = b, u[
|
|
832
|
+
var _ = (u = {}, u[Y] = f, u[N] = b, u[I] = i, u)[y] || 1, d = this.$d.getTime() + l * _;
|
|
833
833
|
return o.w(d, this);
|
|
834
834
|
}, h.subtract = function(l, a) {
|
|
835
835
|
return this.add(-1 * l, a);
|
|
836
836
|
}, h.format = function(l) {
|
|
837
837
|
var a = this, u = this.$locale();
|
|
838
838
|
if (!this.isValid()) return u.invalidDate || tt;
|
|
839
|
-
var c = l || "YYYY-MM-DDTHH:mm:ssZ", y = o.z(this), p = this.$H, _ = this.$m, d = this.$M,
|
|
839
|
+
var c = l || "YYYY-MM-DDTHH:mm:ssZ", y = o.z(this), p = this.$H, _ = this.$m, d = this.$M, M = u.weekdays, R = u.months, F = u.meridiem, U = function(x, v, A, z) {
|
|
840
840
|
return x && (x[v] || x(a, c)) || A[v].slice(0, z);
|
|
841
841
|
}, k = function(x) {
|
|
842
842
|
return o.s(p % 12 || 12, x, "0");
|
|
@@ -866,11 +866,11 @@ function Ht() {
|
|
|
866
866
|
case "d":
|
|
867
867
|
return String(a.$W);
|
|
868
868
|
case "dd":
|
|
869
|
-
return U(u.weekdaysMin, a.$W,
|
|
869
|
+
return U(u.weekdaysMin, a.$W, M, 2);
|
|
870
870
|
case "ddd":
|
|
871
|
-
return U(u.weekdaysShort, a.$W,
|
|
871
|
+
return U(u.weekdaysShort, a.$W, M, 3);
|
|
872
872
|
case "dddd":
|
|
873
|
-
return
|
|
873
|
+
return M[a.$W];
|
|
874
874
|
case "H":
|
|
875
875
|
return String(p);
|
|
876
876
|
case "HH":
|
|
@@ -902,7 +902,7 @@ function Ht() {
|
|
|
902
902
|
}, h.utcOffset = function() {
|
|
903
903
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
904
904
|
}, h.diff = function(l, a, u) {
|
|
905
|
-
var c, y = this, p = o.p(a), _ = n(l), d = (_.utcOffset() - this.utcOffset()) * f,
|
|
905
|
+
var c, y = this, p = o.p(a), _ = n(l), d = (_.utcOffset() - this.utcOffset()) * f, M = this - _, R = function() {
|
|
906
906
|
return o.m(y, _);
|
|
907
907
|
};
|
|
908
908
|
switch (p) {
|
|
@@ -916,22 +916,22 @@ function Ht() {
|
|
|
916
916
|
c = R() / 3;
|
|
917
917
|
break;
|
|
918
918
|
case q:
|
|
919
|
-
c = (
|
|
919
|
+
c = (M - d) / 6048e5;
|
|
920
920
|
break;
|
|
921
921
|
case w:
|
|
922
|
-
c = (
|
|
922
|
+
c = (M - d) / 864e5;
|
|
923
923
|
break;
|
|
924
924
|
case N:
|
|
925
|
-
c =
|
|
925
|
+
c = M / b;
|
|
926
926
|
break;
|
|
927
927
|
case Y:
|
|
928
|
-
c =
|
|
928
|
+
c = M / f;
|
|
929
929
|
break;
|
|
930
|
-
case
|
|
931
|
-
c =
|
|
930
|
+
case I:
|
|
931
|
+
c = M / i;
|
|
932
932
|
break;
|
|
933
933
|
default:
|
|
934
|
-
c =
|
|
934
|
+
c = M;
|
|
935
935
|
}
|
|
936
936
|
return u ? c : o.a(c);
|
|
937
937
|
}, h.daysInMonth = function() {
|
|
@@ -954,7 +954,7 @@ function Ht() {
|
|
|
954
954
|
return this.$d.toUTCString();
|
|
955
955
|
}, m;
|
|
956
956
|
})(), S = g.prototype;
|
|
957
|
-
return n.prototype = S, [["$ms", $], ["$s",
|
|
957
|
+
return n.prototype = S, [["$ms", $], ["$s", I], ["$m", Y], ["$H", N], ["$W", w], ["$M", B], ["$y", K], ["$D", V]].forEach((function(m) {
|
|
958
958
|
S[m[1]] = function(h) {
|
|
959
959
|
return this.$g(h, m[0], m[1]);
|
|
960
960
|
};
|
|
@@ -968,16 +968,16 @@ function Ht() {
|
|
|
968
968
|
}
|
|
969
969
|
var Kt = Ht();
|
|
970
970
|
const Z = /* @__PURE__ */ kt(Kt);
|
|
971
|
-
var vt = { exports: {} }, Jt = vt.exports,
|
|
971
|
+
var vt = { exports: {} }, Jt = vt.exports, Mt;
|
|
972
972
|
function Qt() {
|
|
973
|
-
return
|
|
973
|
+
return Mt || (Mt = 1, (function(s, r) {
|
|
974
974
|
(function(i, f) {
|
|
975
975
|
s.exports = f();
|
|
976
976
|
})(Jt, (function() {
|
|
977
977
|
var i = { 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" };
|
|
978
978
|
return function(f, b, $) {
|
|
979
|
-
var
|
|
980
|
-
$.en.formats = i,
|
|
979
|
+
var I = b.prototype, Y = I.format;
|
|
980
|
+
$.en.formats = i, I.format = function(N) {
|
|
981
981
|
N === void 0 && (N = "YYYY-MM-DDTHH:mm:ssZ");
|
|
982
982
|
var w = this.$locale().formats, q = (function(B, X) {
|
|
983
983
|
return B.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(K, V, tt) {
|
|
@@ -1030,6 +1030,8 @@ function ae() {
|
|
|
1030
1030
|
return !isNaN(Number(this)) && this.trim() !== "";
|
|
1031
1031
|
}, String.prototype.isEmpty = function() {
|
|
1032
1032
|
return this === void 0 || !this || this.length === 0;
|
|
1033
|
+
}, String.prototype.stripTags = function() {
|
|
1034
|
+
return new DOMParser().parseFromString(this.toString(), "text/html").body.textContent || "";
|
|
1033
1035
|
};
|
|
1034
1036
|
}
|
|
1035
1037
|
class oe {
|
|
@@ -1072,6 +1074,6 @@ export {
|
|
|
1072
1074
|
ie as initArrayExtensions,
|
|
1073
1075
|
se as initDateExtensions,
|
|
1074
1076
|
ae as initStringExtensions,
|
|
1075
|
-
|
|
1077
|
+
It as saveAs,
|
|
1076
1078
|
qt as sortHelper
|
|
1077
1079
|
};
|
package/index.umd.js
CHANGED
|
@@ -3,13 +3,13 @@ Papa Parse
|
|
|
3
3
|
v5.5.3
|
|
4
4
|
https://github.com/mholt/PapaParse
|
|
5
5
|
License: MIT
|
|
6
|
-
*/var Te=we.exports,Ee;function Le(){return Ee||(Ee=1,(function(s,r){((i,f)=>{s.exports=f()})(Te,function i(){var f=typeof self<"u"?self:typeof window<"u"?window:f!==void 0?f:{},b,$=!f.document&&!!f.postMessage,I=f.IS_PAPA_WORKER||!1,
|
|
7
|
-
`),A=1<v.length&&v[0].length<
|
|
8
|
-
`;for(var z=0,T=0;T<
|
|
9
|
-
`&&z++;return z>=
|
|
6
|
+
*/var Te=we.exports,Ee;function Le(){return Ee||(Ee=1,(function(s,r){((i,f)=>{s.exports=f()})(Te,function i(){var f=typeof self<"u"?self:typeof window<"u"?window:f!==void 0?f:{},b,$=!f.document&&!!f.postMessage,I=f.IS_PAPA_WORKER||!1,H={},q=0,w={};function W(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=ae(t);n.chunkSize=parseInt(n.chunkSize),t.step||t.chunk||(n.chunkSize=null),this._handle=new te(n),(this._handle.streamer=this)._config=n}).call(this,e),this.parseChunk=function(t,n){var o=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<o){let S=this._config.newline;S||(g=this._config.quoteChar||'"',S=this._handle.guessLineEndings(t,g)),t=[...t.split(S).slice(o)].join(S)}this.isFirstChunk&&C(this._config.beforeFirstChunk)&&(g=this._config.beforeFirstChunk(t))!==void 0&&(t=g),this.isFirstChunk=!1,this._halted=!1;var o=this._partialLine+t,g=(this._partialLine="",this._handle.parse(o,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(t=g.meta.cursor,o=(this._finished||(this._partialLine=o.substring(t-this._baseIndex),this._baseIndex=t),g&&g.data&&(this._rowCount+=g.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),I)f.postMessage({results:g,workerId:w.WORKER_ID,finished:o});else if(C(this._config.chunk)&&!n){if(this._config.chunk(g,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=g=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(g.data),this._completeResults.errors=this._completeResults.errors.concat(g.errors),this._completeResults.meta=g.meta),this._completed||!o||!C(this._config.complete)||g&&g.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),o||g&&g.meta.paused||this._nextChunk(),g}this._halted=!0},this._sendError=function(t){C(this._config.error)?this._config.error(t):I&&this._config.error&&f.postMessage({workerId:w.WORKER_ID,error:t,finished:!1})}}function P(e){var t;(e=e||{}).chunkSize||(e.chunkSize=w.RemoteChunkSize),W.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,o=this._config.downloadRequestHeaders;for(n in o)t.setRequestHeader(n,o[n])}var g;this._config.chunkSize&&(g=this._start+this._config.chunkSize-1,t.setRequestHeader("Range","bytes="+this._start+"-"+g));try{t.send(this._config.downloadRequestBody)}catch(S){this._chunkError(S.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 ee(e){(e=e||{}).chunkSize||(e.chunkSize=w.LocalChunkSize),W.call(this,e);var t,n,o=typeof FileReader<"u";this.stream=function(g){this._input=g,n=g.slice||g.webkitSlice||g.mozSlice,o?((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 g=this._input,S=(this._config.chunkSize&&(S=Math.min(this._start+this._config.chunkSize,this._input.size),g=n.call(g,this._start,S)),t.readAsText(g,this._config.encoding));o||this._chunkLoaded({target:{result:S}})},this._chunkLoaded=function(g){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(g.target.result)},this._chunkError=function(){this._sendError(t.error)}}function Q(e){var t;W.call(this,e=e||{}),this.stream=function(n){return t=n,this._nextChunk()},this._nextChunk=function(){var n,o;if(!this._finished)return n=this._config.chunkSize,t=n?(o=t.substring(0,n),t.substring(n)):(o=t,""),this._finished=!t,this.parseChunk(o)}}function G(e){W.call(this,e=e||{});var t=[],n=!0,o=!1;this.pause=function(){W.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){W.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(g){this._input=g,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){o&&t.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=K(function(g){try{t.push(typeof g=="string"?g:g.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(S){this._streamError(S)}},this),this._streamError=K(function(g){this._streamCleanUp(),this._sendError(g)},this),this._streamEnd=K(function(){this._streamCleanUp(),o=!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 te(e){var t,n,o,g,S=Math.pow(2,53),m=-S,h=/^\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)))$/,a=this,u=0,l=0,y=!1,p=!1,_=[],d={data:[],errors:[],meta:{}};function O(k){return e.skipEmptyLines==="greedy"?k.join("").trim()==="":k.length===1&&k[0].length===0}function R(){if(d&&o&&(B("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+w.DefaultDelimiter+"'"),o=!1),e.skipEmptyLines&&(d.data=d.data.filter(function(v){return!O(v)})),F()){let v=function(A,z){C(e.transformHeader)&&(A=e.transformHeader(A,z)),_.push(A)};if(d)if(Array.isArray(d.data[0])){for(var k=0;F()&&k<d.data.length;k++)d.data[k].forEach(v);d.data.splice(0,1)}else d.data.forEach(v)}function E(v,A){for(var z=e.header?{}:[],T=0;T<v.length;T++){var L=T,x=v[T],x=((X,D)=>(j=>(e.dynamicTypingFunction&&e.dynamicTyping[j]===void 0&&(e.dynamicTyping[j]=e.dynamicTypingFunction(j)),(e.dynamicTyping[j]||e.dynamicTyping)===!0))(X)?D==="true"||D==="TRUE"||D!=="false"&&D!=="FALSE"&&((j=>{if(h.test(j)&&(j=parseFloat(j),m<j&&j<S))return 1})(D)?parseFloat(D):c.test(D)?new Date(D):D===""?null:D):D)(L=e.header?T>=_.length?"__parsed_extra":_[T]:L,x=e.transform?e.transform(x,L):x);L==="__parsed_extra"?(z[L]=z[L]||[],z[L].push(x)):z[L]=x}return e.header&&(T>_.length?B("FieldMismatch","TooManyFields","Too many fields: expected "+_.length+" fields but parsed "+T,l+A):T<_.length&&B("FieldMismatch","TooFewFields","Too few fields: expected "+_.length+" fields but parsed "+T,l+A)),z}var M;d&&(e.header||e.dynamicTyping||e.transform)&&(M=1,!d.data.length||Array.isArray(d.data[0])?(d.data=d.data.map(E),M=d.data.length):d.data=E(d.data,0),e.header&&d.meta&&(d.meta.fields=_),l+=M)}function F(){return e.header&&_.length===0}function B(k,E,M,v){k={type:k,code:E,message:M},v!==void 0&&(k.row=v),d.errors.push(k)}C(e.step)&&(g=e.step,e.step=function(k){d=k,F()?R():(R(),d.data.length!==0&&(u+=k.data.length,e.preview&&u>e.preview?n.abort():(d.data=d.data[0],g(d,a))))}),this.parse=function(k,E,M){var v=e.quoteChar||'"',v=(e.newline||(e.newline=this.guessLineEndings(k,v)),o=!1,e.delimiter?C(e.delimiter)&&(e.delimiter=e.delimiter(k),d.meta.delimiter=e.delimiter):((v=((A,z,T,L,x)=>{var X,D,j,le;x=x||[","," ","|",";",w.RECORD_SEP,w.UNIT_SEP];for(var de=0;de<x.length;de++){for(var re,ye=x[de],J=0,ne=0,Y=0,V=(j=void 0,new he({comments:L,delimiter:ye,newline:z,preview:10}).parse(A)),oe=0;oe<V.data.length;oe++)T&&O(V.data[oe])?Y++:(re=V.data[oe].length,ne+=re,j===void 0?j=re:0<re&&(J+=Math.abs(re-j),j=re));0<V.data.length&&(ne/=V.data.length-Y),(D===void 0||J<=D)&&(le===void 0||le<ne)&&1.99<ne&&(D=J,X=ye,le=ne)}return{successful:!!(e.delimiter=X),bestDelimiter:X}})(k,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess)).successful?e.delimiter=v.bestDelimiter:(o=!0,e.delimiter=w.DefaultDelimiter),d.meta.delimiter=e.delimiter),ae(e));return e.preview&&e.header&&v.preview++,t=k,n=new he(v),d=n.parse(t,E,M),R(),y?{meta:{paused:!0}}:d||{meta:{paused:!1}}},this.paused=function(){return y},this.pause=function(){y=!0,n.abort(),t=C(e.chunk)?"":t.substring(n.getCharIndex())},this.resume=function(){a.streamer._halted?(y=!1,a.streamer.parseChunk(t,!0)):setTimeout(a.resume,3)},this.aborted=function(){return p},this.abort=function(){p=!0,n.abort(),d.meta.aborted=!0,C(e.complete)&&e.complete(d),t=""},this.guessLineEndings=function(A,v){A=A.substring(0,1048576);var v=new RegExp(se(v)+"([^]*?)"+se(v),"gm"),M=(A=A.replace(v,"")).split("\r"),v=A.split(`
|
|
7
|
+
`),A=1<v.length&&v[0].length<M[0].length;if(M.length===1||A)return`
|
|
8
|
+
`;for(var z=0,T=0;T<M.length;T++)M[T][0]===`
|
|
9
|
+
`&&z++;return z>=M.length/2?`\r
|
|
10
10
|
`:"\r"}}function se(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function he(e){var t=(e=e||{}).delimiter,n=e.newline,o=e.comments,g=e.step,S=e.preview,m=e.fastMode,h=null,c=!1,a=e.quoteChar==null?'"':e.quoteChar,u=a;if(e.escapeChar!==void 0&&(u=e.escapeChar),(typeof t!="string"||-1<w.BAD_DELIMITERS.indexOf(t))&&(t=","),o===t)throw new Error("Comment character same as delimiter");o===!0?o="#":(typeof o!="string"||-1<w.BAD_DELIMITERS.indexOf(o))&&(o=!1),n!==`
|
|
11
11
|
`&&n!=="\r"&&n!==`\r
|
|
12
12
|
`&&(n=`
|
|
13
|
-
`);var l=0,y=!1;this.parse=function(p,_,d){if(typeof p!="string")throw new Error("Input must be a string");var
|
|
14
|
-
`,m='"',h=m+m,c=!1,a=null,u=!1,l=((()=>{if(typeof t=="object"){if(typeof t.delimiter!="string"||w.BAD_DELIMITERS.filter(function(_){return t.delimiter.indexOf(_)!==-1}).length||(g=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"&&(S=t.newline),typeof t.quoteChar=="string"&&(m=t.quoteChar),typeof t.header=="boolean"&&(o=t.header),Array.isArray(t.columns)){if(t.columns.length===0)throw new Error("Option columns is empty");a=t.columns}t.escapeChar!==void 0&&(h=t.escapeChar+m),t.escapeFormulae instanceof RegExp?u=t.escapeFormulae:typeof t.escapeFormulae=="boolean"&&t.escapeFormulae&&(u=/^[=+\-@\t\r].*$/)}})(),new RegExp(se(m),"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(a||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||a),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(_,d,
|
|
15
|
-
`,'"',w.BYTE_ORDER_MARK],w.WORKERS_SUPPORTED=!$&&!!f.Worker,w.NODE_STREAM_INPUT=1,w.LocalChunkSize=10485760,w.RemoteChunkSize=5242880,w.DefaultDelimiter=",",w.Parser=he,w.ParserHandle=te,w.NetworkStreamer=P,w.FileStreamer=ee,w.StringStreamer=Q,w.ReadableStreamStreamer=G,f.jQuery&&((b=f.jQuery).fn.parse=function(e){var t=e.config||{},n=[];return this.each(function(S){if(!(b(this).prop("tagName").toUpperCase()==="INPUT"&&b(this).attr("type").toLowerCase()==="file"&&f.FileReader)||!this.files||this.files.length===0)return!0;for(var m=0;m<this.files.length;m++)n.push({file:this.files[m],inputElem:this,instanceConfig:b.extend({},t)})}),o(),this;function o(){if(n.length===0)C(e.complete)&&e.complete();else{var S,m,h,c,a=n[0];if(C(e.before)){var u=e.before(a.file,a.inputElem);if(typeof u=="object"){if(u.action==="abort")return S="AbortError",m=a.file,h=a.inputElem,c=u.reason,void(C(e.error)&&e.error({name:S},m,h,c));if(u.action==="skip")return void g();typeof u.config=="object"&&(a.instanceConfig=b.extend(a.instanceConfig,u.config))}else if(u==="skip")return void g()}var l=a.instanceConfig.complete;a.instanceConfig.complete=function(y){C(l)&&l(y,a.file,a.inputElem),g()},w.parse(a.file,a.instanceConfig)}}function g(){n.splice(0,1),o()}}),I&&(f.onmessage=function(e){e=e.data,w.WORKER_ID===void 0&&e&&(w.WORKER_ID=e.workerId),typeof e.input=="string"?f.postMessage({workerId:w.WORKER_ID,results:w.parse(e.input,e.config),finished:!0}):(f.File&&e.input instanceof File||e.input instanceof Object)&&(e=w.parse(e.input,e.config))&&f.postMessage({workerId:w.WORKER_ID,results:e,finished:!0})}),(P.prototype=Object.create(W.prototype)).constructor=P,(ee.prototype=Object.create(W.prototype)).constructor=ee,(Q.prototype=Object.create(Q.prototype)).constructor=Q,(G.prototype=Object.create(W.prototype)).constructor=G,w})})(we)),we.exports}var Ie=Le();const Fe=Se(Ie),{parse:ze,unparse:je}=Fe;class Ue{static unparse(r,i){return je(r,i)}static parse(r){return new Promise((i,f)=>{ze(r,{header:!0,complete:b=>i(b),error:b=>f(b)})})}}async function Oe(s,r,i){const f=i?.mimeType??Pe(r),b=Be(s,f);if("showSaveFilePicker"in window&&i?.showSaveFilePicker)try{const q=await(await window.showSaveFilePicker({suggestedName:r,types:[{description:"Datei",accept:{[f]:[`.${Me(r)}`]}}]})).createWritable();await q.write(b),await q.close();return}catch{}const $=URL.createObjectURL(b),I=document.createElement("a");I.href=$,I.download=r,I.rel="noopener",I.style.display="none",document.body.appendChild(I),Ye(I),window.setTimeout(()=>{document.body.removeChild(I),URL.revokeObjectURL($)},0),Ne()&&window.open($,"_blank","noopener,noreferrer")}function Be(s,r){if(s instanceof Blob)return s.type?s:new Blob([s],{type:r});if(s instanceof ArrayBuffer||s instanceof Uint8Array){const i=s instanceof Uint8Array?s:new Uint8Array(s);return new Blob([i],{type:r})}return new Blob([s],{type:r||"text/plain;charset=utf-8"})}function Pe(s){switch(Me(s).toLowerCase()){case"txt":return"text/plain;charset=utf-8";case"csv":return"text/csv;charset=utf-8";case"json":return"application/json;charset=utf-8";case"pdf":return"application/pdf";case"png":return"image/png";case"jpg":case"jpeg":return"image/jpeg";case"svg":return"image/svg+xml";case"zip":return"application/zip";default:return"application/octet-stream"}}function Me(s){const r=s.lastIndexOf(".");return r>=0&&r<s.length-1?s.slice(r+1):""}function Ye(s){const r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),s.dispatchEvent(r)}function Ne(){const s=navigator.userAgent,r=/iPad|iPhone|iPod/.test(s),i=/^((?!chrome|android).)*safari/i.test(s);return r||i}class He{static getEnumValue(r,i){if(i in r)return r[i];throw Error(`${i} not found in ${r}`)}static getKeyValues(r){return Object.keys(r).filter(i=>!isNaN(Number(i))).map(i=>({key:Number(i),value:r[i]}))}}class qe{static getFileExtension(r){let i="";const f=r.lastIndexOf(".");return f>0&&f<r.length-1&&(i=`.${r.substring(f+1).toLowerCase()}`),i}static readAsText(r){const i=new FileReader;return new Promise((f,b)=>{i.onload=()=>{i.onload=null,i.onerror=null,typeof i.result=="string"?f(i.result):b(new Error("Unexpected result type"))},i.onerror=()=>{const $=i.error??new Error("FileReader error");i.onload=null,i.onerror=null,b($)},i.readAsText(r)})}static readAsArrayBuffer(r){const i=new FileReader;return new Promise((f,b)=>{i.onload=()=>{i.onload=null,i.onerror=null,i.result instanceof ArrayBuffer?f(i.result):b(new Error("Unexpected result type"))},i.onerror=()=>{const $=i.error??new Error("FileReader error");i.onload=null,i.onerror=null,b($)},i.readAsArrayBuffer(r)})}static readAsDataUrl(r){const i=new FileReader;return new Promise((f,b)=>{i.onload=$=>{f($)},i.onerror=$=>b($),i.readAsDataURL(r)})}static formatFileSize(r,i=2,f){if(r===0)return"0 Bytes";const b=1024,$=["Bytes","KB","MB","GB","TB"];let I=Math.floor(Math.log(r)/Math.log(b));f&&$.includes(f)&&(I=$.indexOf(f));const N=r/Math.pow(b,I);return`${parseFloat(N.toFixed(i))} ${$[I]}`}static save(r,i,f){const b=new Blob([r],{type:f});Oe(b,i)}}class fe{static set(r,i){localStorage.setItem(r,JSON.stringify(i))}static get(r){let i=null;const f=localStorage.getItem(r);return f&&(i=JSON.parse(f)),i}static remove(r){let i=!!fe.get(r);return i&&localStorage.removeItem(r),i}static removeAll(){localStorage.clear()}static getKeysBy(r){return Object.keys(localStorage).filter(i=>i.startsWith(r))}}var ce=(s=>(s.log="log",s.info="info",s.warn="warn",s.debug="debug",s.error="error",s))(ce||{});class H{static listeners=new Set;static enabled=!0;static log(...r){H.doLog(ce.log,r)}static info(...r){H.doLog(ce.info,r)}static warn(...r){H.doLog(ce.warn,r)}static debug(...r){H.doLog(ce.debug,r)}static error(...r){H.doLog(ce.error,r)}static clearListeners(){H.listeners.clear()}static setEnabled(r){H.enabled=r}static doLog(r,i){if(!H.enabled)return;const f={type:r,args:i,timestamp:new Date().toISOString()};for(const b of H.listeners)try{if(b(f)===!1)return}catch{}console[r].apply(console,i)}static onLog(r,i=!1){if(i){const f=b=>{try{return r(b)}finally{H.listeners.delete(f)}};return H.listeners.add(f),()=>H.listeners.delete(f)}return H.listeners.add(r),()=>H.listeners.delete(r)}}class We{static getScreenWidth(){return window.innerWidth}static getScreenHeight(){return window.innerHeight}}const Ke=(s,r,i)=>s.localeCompare(r)*(i?1:-1),Je=(s,r)=>s<r?-1:s===r?0:1,Qe=(s,r,i)=>Je(s,r)*(i?1:-1),Ve=(s,r,i)=>{let f=0;return typeof s=="string"&&typeof r=="string"?f=Ke(s,r,i):f=Qe(s,r,i),f},xe=(s,r,i,f)=>{const b=i(s),$=i(r);return Ve(b,$,f)};class Ze{static get(r){return fe.get(r)}static set(r,i){fe.set(r,i)}static remove(r){fe.remove(r)}}function Ge(){Array.prototype.distinct=function(s){return s?this.filter((i,f,b)=>b.findIndex($=>s($,i))===f):this.filter((i,f,b)=>b.indexOf(i)===f)},Array.prototype.filterBy=function(s){return this.filter(r=>s(r))},Array.prototype.first=function(){return this.length>0?this[0]:null},Array.prototype.groupBy=function(s){return this.reduce((r,i)=>{const f=s(i);return r[f]||(r[f]=[]),r[f].push(i),r},{})},Array.prototype.orderBy=function(s,r=!0){return this?.sort((i,f)=>xe(i,f,s,r)),this},Array.prototype.removeBy=function(s,r){return this.filter(i=>s(i)!==r)}}var ve={exports:{}},Xe=ve.exports,$e;function et(){return $e||($e=1,(function(s,r){(function(i,f){s.exports=f()})(Xe,(function(){var i=1e3,f=6e4,b=36e5,$="millisecond",I="second",N="minute",q="hour",w="day",W="week",P="month",ee="quarter",Q="year",G="date",te="Invalid Date",se=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,he=/\[([^\]]+)]|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,me={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(m){var h=["th","st","nd","rd"],c=m%100;return"["+m+(h[(c-20)%10]||h[c]||h[0])+"]"}},ue=function(m,h,c){var a=String(m);return!a||a.length>=h?m:""+Array(h+1-a.length).join(c)+m},ke={s:ue,z:function(m){var h=-m.utcOffset(),c=Math.abs(h),a=Math.floor(c/60),u=c%60;return(h<=0?"+":"-")+ue(a,2,"0")+":"+ue(u,2,"0")},m:function m(h,c){if(h.date()<c.date())return-m(c,h);var a=12*(c.year()-h.year())+(c.month()-h.month()),u=h.clone().add(a,P),l=c-u<0,y=h.clone().add(a+(l?-1:1),P);return+(-(a+(c-u)/(l?u-y:y-u))||0)},a:function(m){return m<0?Math.ceil(m)||0:Math.floor(m)},p:function(m){return{M:P,y:Q,w:W,d:w,D:G,h:q,m:N,s:I,ms:$,Q:ee}[m]||String(m||"").toLowerCase().replace(/s$/,"")},u:function(m){return m===void 0}},ae="en",K={};K[ae]=me;var C="$isDayjsObject",e=function(m){return m instanceof g||!(!m||!m[C])},t=function m(h,c,a){var u;if(!h)return ae;if(typeof h=="string"){var l=h.toLowerCase();K[l]&&(u=l),c&&(K[l]=c,u=l);var y=h.split("-");if(!u&&y.length>1)return m(y[0])}else{var p=h.name;K[p]=h,u=p}return!a&&u&&(ae=u),u||!a&&ae},n=function(m,h){if(e(m))return m.clone();var c=typeof h=="object"?h:{};return c.date=m,c.args=arguments,new g(c)},o=ke;o.l=t,o.i=e,o.w=function(m,h){return n(m,{locale:h.$L,utc:h.$u,x:h.$x,$offset:h.$offset})};var g=(function(){function m(c){this.$L=t(c.locale,null,!0),this.parse(c),this.$x=this.$x||c.x||{},this[C]=!0}var h=m.prototype;return h.parse=function(c){this.$d=(function(a){var u=a.date,l=a.utc;if(u===null)return new Date(NaN);if(o.u(u))return new Date;if(u instanceof Date)return new Date(u);if(typeof u=="string"&&!/Z$/i.test(u)){var y=u.match(se);if(y){var p=y[2]-1||0,_=(y[7]||"0").substring(0,3);return l?new Date(Date.UTC(y[1],p,y[3]||1,y[4]||0,y[5]||0,y[6]||0,_)):new Date(y[1],p,y[3]||1,y[4]||0,y[5]||0,y[6]||0,_)}}return new Date(u)})(c),this.init()},h.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()},h.$utils=function(){return o},h.isValid=function(){return this.$d.toString()!==te},h.isSame=function(c,a){var u=n(c);return this.startOf(a)<=u&&u<=this.endOf(a)},h.isAfter=function(c,a){return n(c)<this.startOf(a)},h.isBefore=function(c,a){return this.endOf(a)<n(c)},h.$g=function(c,a,u){return o.u(c)?this[a]:this.set(u,c)},h.unix=function(){return Math.floor(this.valueOf()/1e3)},h.valueOf=function(){return this.$d.getTime()},h.startOf=function(c,a){var u=this,l=!!o.u(a)||a,y=o.p(c),p=function(E,O){var v=o.w(u.$u?Date.UTC(u.$y,O,E):new Date(u.$y,O,E),u);return l?v:v.endOf(w)},_=function(E,O){return o.w(u.toDate()[E].apply(u.toDate("s"),(l?[0,0,0,0]:[23,59,59,999]).slice(O)),u)},d=this.$W,M=this.$M,R=this.$D,F="set"+(this.$u?"UTC":"");switch(y){case Q:return l?p(1,0):p(31,11);case P:return l?p(1,M):p(0,M+1);case W:var B=this.$locale().weekStart||0,k=(d<B?d+7:d)-B;return p(l?R-k:R+(6-k),M);case w:case G:return _(F+"Hours",0);case q:return _(F+"Minutes",1);case N:return _(F+"Seconds",2);case I:return _(F+"Milliseconds",3);default:return this.clone()}},h.endOf=function(c){return this.startOf(c,!1)},h.$set=function(c,a){var u,l=o.p(c),y="set"+(this.$u?"UTC":""),p=(u={},u[w]=y+"Date",u[G]=y+"Date",u[P]=y+"Month",u[Q]=y+"FullYear",u[q]=y+"Hours",u[N]=y+"Minutes",u[I]=y+"Seconds",u[$]=y+"Milliseconds",u)[l],_=l===w?this.$D+(a-this.$W):a;if(l===P||l===Q){var d=this.clone().set(G,1);d.$d[p](_),d.init(),this.$d=d.set(G,Math.min(this.$D,d.daysInMonth())).$d}else p&&this.$d[p](_);return this.init(),this},h.set=function(c,a){return this.clone().$set(c,a)},h.get=function(c){return this[o.p(c)]()},h.add=function(c,a){var u,l=this;c=Number(c);var y=o.p(a),p=function(M){var R=n(l);return o.w(R.date(R.date()+Math.round(M*c)),l)};if(y===P)return this.set(P,this.$M+c);if(y===Q)return this.set(Q,this.$y+c);if(y===w)return p(1);if(y===W)return p(7);var _=(u={},u[N]=f,u[q]=b,u[I]=i,u)[y]||1,d=this.$d.getTime()+c*_;return o.w(d,this)},h.subtract=function(c,a){return this.add(-1*c,a)},h.format=function(c){var a=this,u=this.$locale();if(!this.isValid())return u.invalidDate||te;var l=c||"YYYY-MM-DDTHH:mm:ssZ",y=o.z(this),p=this.$H,_=this.$m,d=this.$M,M=u.weekdays,R=u.months,F=u.meridiem,B=function(O,v,A,z){return O&&(O[v]||O(a,l))||A[v].slice(0,z)},k=function(O){return o.s(p%12||12,O,"0")},E=F||function(O,v,A){var z=O<12?"AM":"PM";return A?z.toLowerCase():z};return l.replace(he,(function(O,v){return v||(function(A){switch(A){case"YY":return String(a.$y).slice(-2);case"YYYY":return o.s(a.$y,4,"0");case"M":return d+1;case"MM":return o.s(d+1,2,"0");case"MMM":return B(u.monthsShort,d,R,3);case"MMMM":return B(R,d);case"D":return a.$D;case"DD":return o.s(a.$D,2,"0");case"d":return String(a.$W);case"dd":return B(u.weekdaysMin,a.$W,M,2);case"ddd":return B(u.weekdaysShort,a.$W,M,3);case"dddd":return M[a.$W];case"H":return String(p);case"HH":return o.s(p,2,"0");case"h":return k(1);case"hh":return k(2);case"a":return E(p,_,!0);case"A":return E(p,_,!1);case"m":return String(_);case"mm":return o.s(_,2,"0");case"s":return String(a.$s);case"ss":return o.s(a.$s,2,"0");case"SSS":return o.s(a.$ms,3,"0");case"Z":return y}return null})(O)||y.replace(":","")}))},h.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},h.diff=function(c,a,u){var l,y=this,p=o.p(a),_=n(c),d=(_.utcOffset()-this.utcOffset())*f,M=this-_,R=function(){return o.m(y,_)};switch(p){case Q:l=R()/12;break;case P:l=R();break;case ee:l=R()/3;break;case W:l=(M-d)/6048e5;break;case w:l=(M-d)/864e5;break;case q:l=M/b;break;case N:l=M/f;break;case I:l=M/i;break;default:l=M}return u?l:o.a(l)},h.daysInMonth=function(){return this.endOf(P).$D},h.$locale=function(){return K[this.$L]},h.locale=function(c,a){if(!c)return this.$L;var u=this.clone(),l=t(c,a,!0);return l&&(u.$L=l),u},h.clone=function(){return o.w(this.$d,this)},h.toDate=function(){return new Date(this.valueOf())},h.toJSON=function(){return this.isValid()?this.toISOString():null},h.toISOString=function(){return this.$d.toISOString()},h.toString=function(){return this.$d.toUTCString()},m})(),S=g.prototype;return n.prototype=S,[["$ms",$],["$s",I],["$m",N],["$H",q],["$W",w],["$M",P],["$y",Q],["$D",G]].forEach((function(m){S[m[1]]=function(h){return this.$g(h,m[0],m[1])}})),n.extend=function(m,h){return m.$i||(m(h,g,n),m.$i=!0),n},n.locale=t,n.isDayjs=e,n.unix=function(m){return n(1e3*m)},n.en=K[ae],n.Ls=K,n.p={},n}))})(ve)),ve.exports}var tt=et();const Z=Se(tt);var be={exports:{}},rt=be.exports,Re;function nt(){return Re||(Re=1,(function(s,r){(function(i,f){s.exports=f()})(rt,(function(){var i={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(f,b,$){var I=b.prototype,N=I.format;$.en.formats=i,I.format=function(q){q===void 0&&(q="YYYY-MM-DDTHH:mm:ssZ");var w=this.$locale().formats,W=(function(P,ee){return P.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(Q,G,te){var se=te&&te.toUpperCase();return G||ee[te]||i[te]||ee[se].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(he,me,ue){return me||ue.slice(1)}))}))})(q,w===void 0?{}:w);return N.call(this,W)}}}))})(be)),be.exports}var it=nt();const st=Se(it);Z.extend(st);function at(){Date.prototype.add=function(s,r){return Z(this).add(s,r).toDate()},Date.prototype.diff=function(s,r){return Z(this).diff(s,r)},Date.prototype.endOf=function(s){return Z(this).endOf(s).toDate()},Date.prototype.firstDayOfMonth=function(){return Z(this).startOf("month").toDate()},Date.prototype.isAfter=function(s,r){return Z(this).isAfter(s,r)},Date.prototype.isBefore=function(s,r){return Z(this).isBefore(s,r)},Date.prototype.format=function(s){return Z(this).format(s)},Date.prototype.isValid=function(){return Z(this).isValid()},Date.prototype.subtract=function(s,r){return Z(this).subtract(s,r).toDate()},Date.prototype.lastDayOfMonth=function(){return Z(this).endOf("month").toDate()},Date.prototype.set=function(s,r){return Z(this).set(s,r).toDate()},Date.prototype.startOf=function(s){return Z(this).startOf(s).toDate()}}function ot(){String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)},String.prototype.isNumber=function(){return!isNaN(Number(this))&&this.trim()!==""},String.prototype.isEmpty=function(){return this===void 0||!this||this.length===0}}class ut{resizeListener;onResizeCallbacks=new Set;rafId=null;emitTimeoutId=null;duplicateThresholdMs=60;constructor(){typeof window<"u"&&(this.resizeListener=this.onResize.bind(this),window.addEventListener("resize",this.resizeListener,{passive:!0}))}destroy(){typeof window<"u"&&window.removeEventListener("resize",this.resizeListener),this.onResizeCallbacks.clear(),this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null)}onResizeChange(r){this.onResizeCallbacks.add(r)}offResizeChange(r){this.onResizeCallbacks.delete(r)}onResize=()=>{typeof window>"u"||(this.emitTimeoutId&&clearTimeout(this.emitTimeoutId),this.emitTimeoutId=window.setTimeout(()=>{this.emitTimeoutId=null},this.duplicateThresholdMs))}}U.BrowserService=ut,U.CsvHelper=Ue,U.EnumHelper=He,U.FileHelper=qe,U.LocalStorageHelper=fe,U.LoggerHelper=H,U.LoggerType=ce,U.ScreenHelper=We,U.TokenHelper=Ze,U.copyToClipboard=ge,U.initArrayExtensions=Ge,U.initDateExtensions=at,U.initStringExtensions=ot,U.saveAs=Oe,U.sortHelper=xe,Object.defineProperty(U,Symbol.toStringTag,{value:"Module"})}));
|
|
13
|
+
`);var l=0,y=!1;this.parse=function(p,_,d){if(typeof p!="string")throw new Error("Input must be a string");var O=p.length,R=t.length,F=n.length,B=o.length,k=C(g),E=[],M=[],v=[],A=l=0;if(!p)return J();if(m||m!==!1&&p.indexOf(a)===-1){for(var z=p.split(n),T=0;T<z.length;T++){if(v=z[T],l+=v.length,T!==z.length-1)l+=n.length;else if(d)return J();if(!o||v.substring(0,B)!==o){if(k){if(E=[],le(v.split(t)),ne(),y)return J()}else le(v.split(t));if(S&&S<=T)return E=E.slice(0,S),J(!0)}}return J()}for(var L=p.indexOf(t,l),x=p.indexOf(n,l),X=new RegExp(se(u)+se(a),"g"),D=p.indexOf(a,l);;)if(p[l]===a)for(D=l,l++;;){if((D=p.indexOf(a,D+1))===-1)return d||M.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:E.length,index:l}),re();if(D===O-1)return re(p.substring(l,D).replace(X,a));if(a===u&&p[D+1]===u)D++;else if(a===u||D===0||p[D-1]!==u){L!==-1&&L<D+1&&(L=p.indexOf(t,D+1));var j=de((x=x!==-1&&x<D+1?p.indexOf(n,D+1):x)===-1?L:Math.min(L,x));if(p.substr(D+1+j,R)===t){v.push(p.substring(l,D).replace(X,a)),p[l=D+1+j+R]!==a&&(D=p.indexOf(a,l)),L=p.indexOf(t,l),x=p.indexOf(n,l);break}if(j=de(x),p.substring(D+1+j,D+1+j+F)===n){if(v.push(p.substring(l,D).replace(X,a)),ye(D+1+j+F),L=p.indexOf(t,l),D=p.indexOf(a,l),k&&(ne(),y))return J();if(S&&E.length>=S)return J(!0);break}M.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:E.length,index:l}),D++}}else if(o&&v.length===0&&p.substring(l,l+B)===o){if(x===-1)return J();l=x+F,x=p.indexOf(n,l),L=p.indexOf(t,l)}else if(L!==-1&&(L<x||x===-1))v.push(p.substring(l,L)),l=L+R,L=p.indexOf(t,l);else{if(x===-1)break;if(v.push(p.substring(l,x)),ye(x+F),k&&(ne(),y))return J();if(S&&E.length>=S)return J(!0)}return re();function le(Y){E.push(Y),A=l}function de(Y){var V=0;return V=Y!==-1&&(Y=p.substring(D+1,Y))&&Y.trim()===""?Y.length:V}function re(Y){return d||(Y===void 0&&(Y=p.substring(l)),v.push(Y),l=O,le(v),k&&ne()),J()}function ye(Y){l=Y,le(v),v=[],x=p.indexOf(n,l)}function J(Y){if(e.header&&!_&&E.length&&!c){var V=E[0],oe=Object.create(null),De=new Set(V);let Ce=!1;for(let pe=0;pe<V.length;pe++){let ie=V[pe];if(oe[ie=C(e.transformHeader)?e.transformHeader(ie,pe):ie]){let _e,Ae=oe[ie];for(;_e=ie+"_"+Ae,Ae++,De.has(_e););De.add(_e),V[pe]=_e,oe[ie]++,Ce=!0,(h=h===null?{}:h)[_e]=ie}else oe[ie]=1,V[pe]=ie;De.add(ie)}Ce&&console.warn("Duplicate headers found and renamed."),c=!0}return{data:E,errors:M,meta:{delimiter:t,linebreak:n,aborted:y,truncated:!!Y,cursor:A+(_||0),renamedHeaders:h}}}function ne(){g(J()),E=[],M=[]}},this.abort=function(){y=!0},this.getCharIndex=function(){return l}}function me(e){var t=e.data,n=H[t.workerId],o=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var g={abort:function(){o=!0,ue(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:ke,resume:ke};if(C(n.userStep)){for(var S=0;S<t.results.data.length&&(n.userStep({data:t.results.data[S],errors:t.results.errors,meta:t.results.meta},g),!o);S++);delete t.results}else C(n.userChunk)&&(n.userChunk(t.results,g,t.file),delete t.results)}t.finished&&!o&&ue(t.workerId,t.results)}function ue(e,t){var n=H[e];C(n.userComplete)&&n.userComplete(t),n.terminate(),delete H[e]}function ke(){throw new Error("Not implemented.")}function ae(e){if(typeof e!="object"||e===null)return e;var t,n=Array.isArray(e)?[]:{};for(t in e)n[t]=ae(e[t]);return n}function K(e,t){return function(){e.apply(t,arguments)}}function C(e){return typeof e=="function"}return w.parse=function(e,t){var n=(t=t||{}).dynamicTyping||!1;if(C(n)&&(t.dynamicTypingFunction=n,n={}),t.dynamicTyping=n,t.transform=!!C(t.transform)&&t.transform,!t.worker||!w.WORKERS_SUPPORTED)return n=null,w.NODE_STREAM_INPUT,typeof e=="string"?(e=(o=>o.charCodeAt(0)!==65279?o:o.slice(1))(e),n=new(t.download?P:Q)(t)):e.readable===!0&&C(e.read)&&C(e.on)?n=new G(t):(f.File&&e instanceof File||e instanceof Object)&&(n=new ee(t)),n.stream(e);(n=(()=>{var o;return!!w.WORKERS_SUPPORTED&&(o=(()=>{var g=f.URL||f.webkitURL||null,S=i.toString();return w.BLOB_URL||(w.BLOB_URL=g.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"})))})(),(o=new f.Worker(o)).onmessage=me,o.id=q++,H[o.id]=o)})()).userStep=t.step,n.userChunk=t.chunk,n.userComplete=t.complete,n.userError=t.error,t.step=C(t.step),t.chunk=C(t.chunk),t.complete=C(t.complete),t.error=C(t.error),delete t.worker,n.postMessage({input:e,config:t,workerId:n.id})},w.unparse=function(e,t){var n=!1,o=!0,g=",",S=`\r
|
|
14
|
+
`,m='"',h=m+m,c=!1,a=null,u=!1,l=((()=>{if(typeof t=="object"){if(typeof t.delimiter!="string"||w.BAD_DELIMITERS.filter(function(_){return t.delimiter.indexOf(_)!==-1}).length||(g=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"&&(S=t.newline),typeof t.quoteChar=="string"&&(m=t.quoteChar),typeof t.header=="boolean"&&(o=t.header),Array.isArray(t.columns)){if(t.columns.length===0)throw new Error("Option columns is empty");a=t.columns}t.escapeChar!==void 0&&(h=t.escapeChar+m),t.escapeFormulae instanceof RegExp?u=t.escapeFormulae:typeof t.escapeFormulae=="boolean"&&t.escapeFormulae&&(u=/^[=+\-@\t\r].*$/)}})(),new RegExp(se(m),"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(a||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||a),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(_,d,O){var R="",F=(typeof _=="string"&&(_=JSON.parse(_)),typeof d=="string"&&(d=JSON.parse(d)),Array.isArray(_)&&0<_.length),B=!Array.isArray(d[0]);if(F&&o){for(var k=0;k<_.length;k++)0<k&&(R+=g),R+=p(_[k],k);0<d.length&&(R+=S)}for(var E=0;E<d.length;E++){var M=(F?_:d[E]).length,v=!1,A=F?Object.keys(d[E]).length===0:d[E].length===0;if(O&&!F&&(v=O==="greedy"?d[E].join("").trim()==="":d[E].length===1&&d[E][0].length===0),O==="greedy"&&F){for(var z=[],T=0;T<M;T++){var L=B?_[T]:T;z.push(d[E][L])}v=z.join("").trim()===""}if(!v){for(var x=0;x<M;x++){0<x&&!A&&(R+=g);var X=F&&B?_[x]:x;R+=p(d[E][X],x)}E<d.length-1&&(!O||0<M&&!A)&&(R+=S)}}return R}function p(_,d){var O,R;return _==null?"":_.constructor===Date?JSON.stringify(_).slice(1,25):(R=!1,u&&typeof _=="string"&&u.test(_)&&(_="'"+_,R=!0),O=_.toString().replace(l,h),(R=R||n===!0||typeof n=="function"&&n(_,d)||Array.isArray(n)&&n[d]||((F,B)=>{for(var k=0;k<B.length;k++)if(-1<F.indexOf(B[k]))return!0;return!1})(O,w.BAD_DELIMITERS)||-1<O.indexOf(g)||O.charAt(0)===" "||O.charAt(O.length-1)===" ")?m+O+m:O)}},w.RECORD_SEP="",w.UNIT_SEP="",w.BYTE_ORDER_MARK="\uFEFF",w.BAD_DELIMITERS=["\r",`
|
|
15
|
+
`,'"',w.BYTE_ORDER_MARK],w.WORKERS_SUPPORTED=!$&&!!f.Worker,w.NODE_STREAM_INPUT=1,w.LocalChunkSize=10485760,w.RemoteChunkSize=5242880,w.DefaultDelimiter=",",w.Parser=he,w.ParserHandle=te,w.NetworkStreamer=P,w.FileStreamer=ee,w.StringStreamer=Q,w.ReadableStreamStreamer=G,f.jQuery&&((b=f.jQuery).fn.parse=function(e){var t=e.config||{},n=[];return this.each(function(S){if(!(b(this).prop("tagName").toUpperCase()==="INPUT"&&b(this).attr("type").toLowerCase()==="file"&&f.FileReader)||!this.files||this.files.length===0)return!0;for(var m=0;m<this.files.length;m++)n.push({file:this.files[m],inputElem:this,instanceConfig:b.extend({},t)})}),o(),this;function o(){if(n.length===0)C(e.complete)&&e.complete();else{var S,m,h,c,a=n[0];if(C(e.before)){var u=e.before(a.file,a.inputElem);if(typeof u=="object"){if(u.action==="abort")return S="AbortError",m=a.file,h=a.inputElem,c=u.reason,void(C(e.error)&&e.error({name:S},m,h,c));if(u.action==="skip")return void g();typeof u.config=="object"&&(a.instanceConfig=b.extend(a.instanceConfig,u.config))}else if(u==="skip")return void g()}var l=a.instanceConfig.complete;a.instanceConfig.complete=function(y){C(l)&&l(y,a.file,a.inputElem),g()},w.parse(a.file,a.instanceConfig)}}function g(){n.splice(0,1),o()}}),I&&(f.onmessage=function(e){e=e.data,w.WORKER_ID===void 0&&e&&(w.WORKER_ID=e.workerId),typeof e.input=="string"?f.postMessage({workerId:w.WORKER_ID,results:w.parse(e.input,e.config),finished:!0}):(f.File&&e.input instanceof File||e.input instanceof Object)&&(e=w.parse(e.input,e.config))&&f.postMessage({workerId:w.WORKER_ID,results:e,finished:!0})}),(P.prototype=Object.create(W.prototype)).constructor=P,(ee.prototype=Object.create(W.prototype)).constructor=ee,(Q.prototype=Object.create(Q.prototype)).constructor=Q,(G.prototype=Object.create(W.prototype)).constructor=G,w})})(we)),we.exports}var Ie=Le();const Fe=Se(Ie),{parse:ze,unparse:je}=Fe;class Ue{static unparse(r,i){return je(r,i)}static parse(r){return new Promise((i,f)=>{ze(r,{header:!0,complete:b=>i(b),error:b=>f(b)})})}}async function Me(s,r,i){const f=i?.mimeType??Pe(r),b=Be(s,f);if("showSaveFilePicker"in window&&i?.showSaveFilePicker)try{const q=await(await window.showSaveFilePicker({suggestedName:r,types:[{description:"Datei",accept:{[f]:[`.${Oe(r)}`]}}]})).createWritable();await q.write(b),await q.close();return}catch{}const $=URL.createObjectURL(b),I=document.createElement("a");I.href=$,I.download=r,I.rel="noopener",I.style.display="none",document.body.appendChild(I),Ye(I),window.setTimeout(()=>{document.body.removeChild(I),URL.revokeObjectURL($)},0),He()&&window.open($,"_blank","noopener,noreferrer")}function Be(s,r){if(s instanceof Blob)return s.type?s:new Blob([s],{type:r});if(s instanceof ArrayBuffer||s instanceof Uint8Array){const i=s instanceof Uint8Array?s:new Uint8Array(s);return new Blob([i],{type:r})}return new Blob([s],{type:r||"text/plain;charset=utf-8"})}function Pe(s){switch(Oe(s).toLowerCase()){case"txt":return"text/plain;charset=utf-8";case"csv":return"text/csv;charset=utf-8";case"json":return"application/json;charset=utf-8";case"pdf":return"application/pdf";case"png":return"image/png";case"jpg":case"jpeg":return"image/jpeg";case"svg":return"image/svg+xml";case"zip":return"application/zip";default:return"application/octet-stream"}}function Oe(s){const r=s.lastIndexOf(".");return r>=0&&r<s.length-1?s.slice(r+1):""}function Ye(s){const r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),s.dispatchEvent(r)}function He(){const s=navigator.userAgent,r=/iPad|iPhone|iPod/.test(s),i=/^((?!chrome|android).)*safari/i.test(s);return r||i}class Ne{static getEnumValue(r,i){if(i in r)return r[i];throw Error(`${i} not found in ${r}`)}static getKeyValues(r){return Object.keys(r).filter(i=>!isNaN(Number(i))).map(i=>({key:Number(i),value:r[i]}))}}class qe{static getFileExtension(r){let i="";const f=r.lastIndexOf(".");return f>0&&f<r.length-1&&(i=`.${r.substring(f+1).toLowerCase()}`),i}static readAsText(r){const i=new FileReader;return new Promise((f,b)=>{i.onload=()=>{i.onload=null,i.onerror=null,typeof i.result=="string"?f(i.result):b(new Error("Unexpected result type"))},i.onerror=()=>{const $=i.error??new Error("FileReader error");i.onload=null,i.onerror=null,b($)},i.readAsText(r)})}static readAsArrayBuffer(r){const i=new FileReader;return new Promise((f,b)=>{i.onload=()=>{i.onload=null,i.onerror=null,i.result instanceof ArrayBuffer?f(i.result):b(new Error("Unexpected result type"))},i.onerror=()=>{const $=i.error??new Error("FileReader error");i.onload=null,i.onerror=null,b($)},i.readAsArrayBuffer(r)})}static readAsDataUrl(r){const i=new FileReader;return new Promise((f,b)=>{i.onload=$=>{f($)},i.onerror=$=>b($),i.readAsDataURL(r)})}static formatFileSize(r,i=2,f){if(r===0)return"0 Bytes";const b=1024,$=["Bytes","KB","MB","GB","TB"];let I=Math.floor(Math.log(r)/Math.log(b));f&&$.includes(f)&&(I=$.indexOf(f));const H=r/Math.pow(b,I);return`${parseFloat(H.toFixed(i))} ${$[I]}`}static save(r,i,f){const b=new Blob([r],{type:f});Me(b,i)}}class fe{static set(r,i){localStorage.setItem(r,JSON.stringify(i))}static get(r){let i=null;const f=localStorage.getItem(r);return f&&(i=JSON.parse(f)),i}static remove(r){let i=!!fe.get(r);return i&&localStorage.removeItem(r),i}static removeAll(){localStorage.clear()}static getKeysBy(r){return Object.keys(localStorage).filter(i=>i.startsWith(r))}}var ce=(s=>(s.log="log",s.info="info",s.warn="warn",s.debug="debug",s.error="error",s))(ce||{});class N{static listeners=new Set;static enabled=!0;static log(...r){N.doLog(ce.log,r)}static info(...r){N.doLog(ce.info,r)}static warn(...r){N.doLog(ce.warn,r)}static debug(...r){N.doLog(ce.debug,r)}static error(...r){N.doLog(ce.error,r)}static clearListeners(){N.listeners.clear()}static setEnabled(r){N.enabled=r}static doLog(r,i){if(!N.enabled)return;const f={type:r,args:i,timestamp:new Date().toISOString()};for(const b of N.listeners)try{if(b(f)===!1)return}catch{}console[r].apply(console,i)}static onLog(r,i=!1){if(i){const f=b=>{try{return r(b)}finally{N.listeners.delete(f)}};return N.listeners.add(f),()=>N.listeners.delete(f)}return N.listeners.add(r),()=>N.listeners.delete(r)}}class We{static getScreenWidth(){return window.innerWidth}static getScreenHeight(){return window.innerHeight}}const Ke=(s,r,i)=>s.localeCompare(r)*(i?1:-1),Je=(s,r)=>s<r?-1:s===r?0:1,Qe=(s,r,i)=>Je(s,r)*(i?1:-1),Ve=(s,r,i)=>{let f=0;return typeof s=="string"&&typeof r=="string"?f=Ke(s,r,i):f=Qe(s,r,i),f},xe=(s,r,i,f)=>{const b=i(s),$=i(r);return Ve(b,$,f)};class Ze{static get(r){return fe.get(r)}static set(r,i){fe.set(r,i)}static remove(r){fe.remove(r)}}function Ge(){Array.prototype.distinct=function(s){return s?this.filter((i,f,b)=>b.findIndex($=>s($,i))===f):this.filter((i,f,b)=>b.indexOf(i)===f)},Array.prototype.filterBy=function(s){return this.filter(r=>s(r))},Array.prototype.first=function(){return this.length>0?this[0]:null},Array.prototype.groupBy=function(s){return this.reduce((r,i)=>{const f=s(i);return r[f]||(r[f]=[]),r[f].push(i),r},{})},Array.prototype.orderBy=function(s,r=!0){return this?.sort((i,f)=>xe(i,f,s,r)),this},Array.prototype.removeBy=function(s,r){return this.filter(i=>s(i)!==r)}}var ve={exports:{}},Xe=ve.exports,$e;function et(){return $e||($e=1,(function(s,r){(function(i,f){s.exports=f()})(Xe,(function(){var i=1e3,f=6e4,b=36e5,$="millisecond",I="second",H="minute",q="hour",w="day",W="week",P="month",ee="quarter",Q="year",G="date",te="Invalid Date",se=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,he=/\[([^\]]+)]|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,me={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(m){var h=["th","st","nd","rd"],c=m%100;return"["+m+(h[(c-20)%10]||h[c]||h[0])+"]"}},ue=function(m,h,c){var a=String(m);return!a||a.length>=h?m:""+Array(h+1-a.length).join(c)+m},ke={s:ue,z:function(m){var h=-m.utcOffset(),c=Math.abs(h),a=Math.floor(c/60),u=c%60;return(h<=0?"+":"-")+ue(a,2,"0")+":"+ue(u,2,"0")},m:function m(h,c){if(h.date()<c.date())return-m(c,h);var a=12*(c.year()-h.year())+(c.month()-h.month()),u=h.clone().add(a,P),l=c-u<0,y=h.clone().add(a+(l?-1:1),P);return+(-(a+(c-u)/(l?u-y:y-u))||0)},a:function(m){return m<0?Math.ceil(m)||0:Math.floor(m)},p:function(m){return{M:P,y:Q,w:W,d:w,D:G,h:q,m:H,s:I,ms:$,Q:ee}[m]||String(m||"").toLowerCase().replace(/s$/,"")},u:function(m){return m===void 0}},ae="en",K={};K[ae]=me;var C="$isDayjsObject",e=function(m){return m instanceof g||!(!m||!m[C])},t=function m(h,c,a){var u;if(!h)return ae;if(typeof h=="string"){var l=h.toLowerCase();K[l]&&(u=l),c&&(K[l]=c,u=l);var y=h.split("-");if(!u&&y.length>1)return m(y[0])}else{var p=h.name;K[p]=h,u=p}return!a&&u&&(ae=u),u||!a&&ae},n=function(m,h){if(e(m))return m.clone();var c=typeof h=="object"?h:{};return c.date=m,c.args=arguments,new g(c)},o=ke;o.l=t,o.i=e,o.w=function(m,h){return n(m,{locale:h.$L,utc:h.$u,x:h.$x,$offset:h.$offset})};var g=(function(){function m(c){this.$L=t(c.locale,null,!0),this.parse(c),this.$x=this.$x||c.x||{},this[C]=!0}var h=m.prototype;return h.parse=function(c){this.$d=(function(a){var u=a.date,l=a.utc;if(u===null)return new Date(NaN);if(o.u(u))return new Date;if(u instanceof Date)return new Date(u);if(typeof u=="string"&&!/Z$/i.test(u)){var y=u.match(se);if(y){var p=y[2]-1||0,_=(y[7]||"0").substring(0,3);return l?new Date(Date.UTC(y[1],p,y[3]||1,y[4]||0,y[5]||0,y[6]||0,_)):new Date(y[1],p,y[3]||1,y[4]||0,y[5]||0,y[6]||0,_)}}return new Date(u)})(c),this.init()},h.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()},h.$utils=function(){return o},h.isValid=function(){return this.$d.toString()!==te},h.isSame=function(c,a){var u=n(c);return this.startOf(a)<=u&&u<=this.endOf(a)},h.isAfter=function(c,a){return n(c)<this.startOf(a)},h.isBefore=function(c,a){return this.endOf(a)<n(c)},h.$g=function(c,a,u){return o.u(c)?this[a]:this.set(u,c)},h.unix=function(){return Math.floor(this.valueOf()/1e3)},h.valueOf=function(){return this.$d.getTime()},h.startOf=function(c,a){var u=this,l=!!o.u(a)||a,y=o.p(c),p=function(E,M){var v=o.w(u.$u?Date.UTC(u.$y,M,E):new Date(u.$y,M,E),u);return l?v:v.endOf(w)},_=function(E,M){return o.w(u.toDate()[E].apply(u.toDate("s"),(l?[0,0,0,0]:[23,59,59,999]).slice(M)),u)},d=this.$W,O=this.$M,R=this.$D,F="set"+(this.$u?"UTC":"");switch(y){case Q:return l?p(1,0):p(31,11);case P:return l?p(1,O):p(0,O+1);case W:var B=this.$locale().weekStart||0,k=(d<B?d+7:d)-B;return p(l?R-k:R+(6-k),O);case w:case G:return _(F+"Hours",0);case q:return _(F+"Minutes",1);case H:return _(F+"Seconds",2);case I:return _(F+"Milliseconds",3);default:return this.clone()}},h.endOf=function(c){return this.startOf(c,!1)},h.$set=function(c,a){var u,l=o.p(c),y="set"+(this.$u?"UTC":""),p=(u={},u[w]=y+"Date",u[G]=y+"Date",u[P]=y+"Month",u[Q]=y+"FullYear",u[q]=y+"Hours",u[H]=y+"Minutes",u[I]=y+"Seconds",u[$]=y+"Milliseconds",u)[l],_=l===w?this.$D+(a-this.$W):a;if(l===P||l===Q){var d=this.clone().set(G,1);d.$d[p](_),d.init(),this.$d=d.set(G,Math.min(this.$D,d.daysInMonth())).$d}else p&&this.$d[p](_);return this.init(),this},h.set=function(c,a){return this.clone().$set(c,a)},h.get=function(c){return this[o.p(c)]()},h.add=function(c,a){var u,l=this;c=Number(c);var y=o.p(a),p=function(O){var R=n(l);return o.w(R.date(R.date()+Math.round(O*c)),l)};if(y===P)return this.set(P,this.$M+c);if(y===Q)return this.set(Q,this.$y+c);if(y===w)return p(1);if(y===W)return p(7);var _=(u={},u[H]=f,u[q]=b,u[I]=i,u)[y]||1,d=this.$d.getTime()+c*_;return o.w(d,this)},h.subtract=function(c,a){return this.add(-1*c,a)},h.format=function(c){var a=this,u=this.$locale();if(!this.isValid())return u.invalidDate||te;var l=c||"YYYY-MM-DDTHH:mm:ssZ",y=o.z(this),p=this.$H,_=this.$m,d=this.$M,O=u.weekdays,R=u.months,F=u.meridiem,B=function(M,v,A,z){return M&&(M[v]||M(a,l))||A[v].slice(0,z)},k=function(M){return o.s(p%12||12,M,"0")},E=F||function(M,v,A){var z=M<12?"AM":"PM";return A?z.toLowerCase():z};return l.replace(he,(function(M,v){return v||(function(A){switch(A){case"YY":return String(a.$y).slice(-2);case"YYYY":return o.s(a.$y,4,"0");case"M":return d+1;case"MM":return o.s(d+1,2,"0");case"MMM":return B(u.monthsShort,d,R,3);case"MMMM":return B(R,d);case"D":return a.$D;case"DD":return o.s(a.$D,2,"0");case"d":return String(a.$W);case"dd":return B(u.weekdaysMin,a.$W,O,2);case"ddd":return B(u.weekdaysShort,a.$W,O,3);case"dddd":return O[a.$W];case"H":return String(p);case"HH":return o.s(p,2,"0");case"h":return k(1);case"hh":return k(2);case"a":return E(p,_,!0);case"A":return E(p,_,!1);case"m":return String(_);case"mm":return o.s(_,2,"0");case"s":return String(a.$s);case"ss":return o.s(a.$s,2,"0");case"SSS":return o.s(a.$ms,3,"0");case"Z":return y}return null})(M)||y.replace(":","")}))},h.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},h.diff=function(c,a,u){var l,y=this,p=o.p(a),_=n(c),d=(_.utcOffset()-this.utcOffset())*f,O=this-_,R=function(){return o.m(y,_)};switch(p){case Q:l=R()/12;break;case P:l=R();break;case ee:l=R()/3;break;case W:l=(O-d)/6048e5;break;case w:l=(O-d)/864e5;break;case q:l=O/b;break;case H:l=O/f;break;case I:l=O/i;break;default:l=O}return u?l:o.a(l)},h.daysInMonth=function(){return this.endOf(P).$D},h.$locale=function(){return K[this.$L]},h.locale=function(c,a){if(!c)return this.$L;var u=this.clone(),l=t(c,a,!0);return l&&(u.$L=l),u},h.clone=function(){return o.w(this.$d,this)},h.toDate=function(){return new Date(this.valueOf())},h.toJSON=function(){return this.isValid()?this.toISOString():null},h.toISOString=function(){return this.$d.toISOString()},h.toString=function(){return this.$d.toUTCString()},m})(),S=g.prototype;return n.prototype=S,[["$ms",$],["$s",I],["$m",H],["$H",q],["$W",w],["$M",P],["$y",Q],["$D",G]].forEach((function(m){S[m[1]]=function(h){return this.$g(h,m[0],m[1])}})),n.extend=function(m,h){return m.$i||(m(h,g,n),m.$i=!0),n},n.locale=t,n.isDayjs=e,n.unix=function(m){return n(1e3*m)},n.en=K[ae],n.Ls=K,n.p={},n}))})(ve)),ve.exports}var tt=et();const Z=Se(tt);var be={exports:{}},rt=be.exports,Re;function nt(){return Re||(Re=1,(function(s,r){(function(i,f){s.exports=f()})(rt,(function(){var i={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(f,b,$){var I=b.prototype,H=I.format;$.en.formats=i,I.format=function(q){q===void 0&&(q="YYYY-MM-DDTHH:mm:ssZ");var w=this.$locale().formats,W=(function(P,ee){return P.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(Q,G,te){var se=te&&te.toUpperCase();return G||ee[te]||i[te]||ee[se].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(he,me,ue){return me||ue.slice(1)}))}))})(q,w===void 0?{}:w);return H.call(this,W)}}}))})(be)),be.exports}var it=nt();const st=Se(it);Z.extend(st);function at(){Date.prototype.add=function(s,r){return Z(this).add(s,r).toDate()},Date.prototype.diff=function(s,r){return Z(this).diff(s,r)},Date.prototype.endOf=function(s){return Z(this).endOf(s).toDate()},Date.prototype.firstDayOfMonth=function(){return Z(this).startOf("month").toDate()},Date.prototype.isAfter=function(s,r){return Z(this).isAfter(s,r)},Date.prototype.isBefore=function(s,r){return Z(this).isBefore(s,r)},Date.prototype.format=function(s){return Z(this).format(s)},Date.prototype.isValid=function(){return Z(this).isValid()},Date.prototype.subtract=function(s,r){return Z(this).subtract(s,r).toDate()},Date.prototype.lastDayOfMonth=function(){return Z(this).endOf("month").toDate()},Date.prototype.set=function(s,r){return Z(this).set(s,r).toDate()},Date.prototype.startOf=function(s){return Z(this).startOf(s).toDate()}}function ot(){String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)},String.prototype.isNumber=function(){return!isNaN(Number(this))&&this.trim()!==""},String.prototype.isEmpty=function(){return this===void 0||!this||this.length===0},String.prototype.stripTags=function(){return new DOMParser().parseFromString(this.toString(),"text/html").body.textContent||""}}class ut{resizeListener;onResizeCallbacks=new Set;rafId=null;emitTimeoutId=null;duplicateThresholdMs=60;constructor(){typeof window<"u"&&(this.resizeListener=this.onResize.bind(this),window.addEventListener("resize",this.resizeListener,{passive:!0}))}destroy(){typeof window<"u"&&window.removeEventListener("resize",this.resizeListener),this.onResizeCallbacks.clear(),this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null)}onResizeChange(r){this.onResizeCallbacks.add(r)}offResizeChange(r){this.onResizeCallbacks.delete(r)}onResize=()=>{typeof window>"u"||(this.emitTimeoutId&&clearTimeout(this.emitTimeoutId),this.emitTimeoutId=window.setTimeout(()=>{this.emitTimeoutId=null},this.duplicateThresholdMs))}}U.BrowserService=ut,U.CsvHelper=Ue,U.EnumHelper=Ne,U.FileHelper=qe,U.LocalStorageHelper=fe,U.LoggerHelper=N,U.LoggerType=ce,U.ScreenHelper=We,U.TokenHelper=Ze,U.copyToClipboard=ge,U.initArrayExtensions=Ge,U.initDateExtensions=at,U.initStringExtensions=ot,U.saveAs=Me,U.sortHelper=xe,Object.defineProperty(U,Symbol.toStringTag,{value:"Module"})}));
|