@oardi/ts-utils 0.0.19 → 0.0.20
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/helpers/browser/browser-type.enum.d.ts.map +1 -0
- package/helpers/browser/browser.helper.d.ts +16 -0
- package/helpers/browser/browser.helper.d.ts.map +1 -0
- package/helpers/browser/index.d.ts +3 -0
- package/helpers/browser/index.d.ts.map +1 -0
- package/index.cjs.js +9 -9
- package/index.es.js +539 -590
- package/index.umd.js +9 -9
- package/package.json +1 -1
- package/services/browser/browser.consts.d.ts +3 -0
- package/services/browser/browser.consts.d.ts.map +1 -0
- package/services/browser/browser.service.d.ts +4 -18
- package/services/browser/browser.service.d.ts.map +1 -1
- package/services/browser/browser.types.d.ts +4 -0
- package/services/browser/browser.types.d.ts.map +1 -0
- package/services/browser/index.d.ts +2 -1
- package/services/browser/index.d.ts.map +1 -1
- package/services/browser/browser-type.enum.d.ts.map +0 -1
- /package/{services → helpers}/browser/browser-type.enum.d.ts +0 -0
package/index.umd.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(Y,ge){typeof exports=="object"&&typeof module<"u"?ge(exports):typeof define=="function"&&define.amd?define(["exports"],ge):(Y=typeof globalThis<"u"?globalThis:Y||self,ge(Y["ts-utils"]={}))})(this,(function(Y){"use strict";function ge(u){return navigator.clipboard.writeText(u)}function Se(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var we={exports:{}};/* @license
|
|
2
2
|
Papa Parse
|
|
3
3
|
v5.5.3
|
|
4
4
|
https://github.com/mholt/PapaParse
|
|
5
5
|
License: MIT
|
|
6
|
-
*/var
|
|
7
|
-
`),A=1<
|
|
8
|
-
`;for(var
|
|
9
|
-
`&&
|
|
10
|
-
`:"\r"}}function
|
|
6
|
+
*/var Le=we.exports,De;function Ie(){return De||(De=1,(function(u,r){((i,l)=>{u.exports=l()})(Le,function i(){var l=typeof self<"u"?self:typeof window<"u"?window:l!==void 0?l:{},v,O=!l.document&&!!l.postMessage,T=l.IS_PAPA_WORKER||!1,P={},N=0,w={};function H(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 a=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<a){let S=this._config.newline;S||(g=this._config.quoteChar||'"',S=this._handle.guessLineEndings(t,g)),t=[...t.split(S).slice(a)].join(S)}this.isFirstChunk&&R(this._config.beforeFirstChunk)&&(g=this._config.beforeFirstChunk(t))!==void 0&&(t=g),this.isFirstChunk=!1,this._halted=!1;var a=this._partialLine+t,g=(this._partialLine="",this._handle.parse(a,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(t=g.meta.cursor,a=(this._finished||(this._partialLine=a.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),T)l.postMessage({results:g,workerId:w.WORKER_ID,finished:a});else if(R(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||!a||!R(this._config.complete)||g&&g.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),a||g&&g.meta.paused||this._nextChunk(),g}this._halted=!0},this._sendError=function(t){R(this._config.error)?this._config.error(t):T&&this._config.error&&l.postMessage({workerId:w.WORKER_ID,error:t,finished:!1})}}function W(e){var t;(e=e||{}).chunkSize||(e.chunkSize=w.RemoteChunkSize),H.call(this,e),this._nextChunk=O?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),O||(t.onload=q(this._chunkLoaded,this),t.onerror=q(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!O),this._config.downloadRequestHeaders){var n,a=this._config.downloadRequestHeaders;for(n in a)t.setRequestHeader(n,a[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)}O&&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),H.call(this,e);var t,n,a=typeof FileReader<"u";this.stream=function(g){this._input=g,n=g.slice||g.webkitSlice||g.mozSlice,a?((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));a||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;H.call(this,e=e||{}),this.stream=function(n){return t=n,this._nextChunk()},this._nextChunk=function(){var n,a;if(!this._finished)return n=this._config.chunkSize,t=n?(a=t.substring(0,n),t.substring(n)):(a=t,""),this._finished=!t,this.parseChunk(a)}}function Z(e){H.call(this,e=e||{});var t=[],n=!0,a=!1;this.pause=function(){H.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){H.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(){a&&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(),a=!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 te(e){var t,n,a,g,S=Math.pow(2,53),m=-S,f=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,h=/^((\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)))$/,s=this,o=0,c=0,y=!1,p=!1,_=[],d={data:[],errors:[],meta:{}};function M(b){return e.skipEmptyLines==="greedy"?b.join("").trim()==="":b.length===1&&b[0].length===0}function $(){if(d&&a&&(j("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+w.DefaultDelimiter+"'"),a=!1),e.skipEmptyLines&&(d.data=d.data.filter(function(k){return!M(k)})),B()){let k=function(A,F){R(e.transformHeader)&&(A=e.transformHeader(A,F)),_.push(A)};if(d)if(Array.isArray(d.data[0])){for(var b=0;B()&&b<d.data.length;b++)d.data[b].forEach(k);d.data.splice(0,1)}else d.data.forEach(k)}function D(k,A){for(var F=e.header?{}:[],L=0;L<k.length;L++){var I=L,C=k[L],C=((X,E)=>(z=>(e.dynamicTypingFunction&&e.dynamicTyping[z]===void 0&&(e.dynamicTyping[z]=e.dynamicTypingFunction(z)),(e.dynamicTyping[z]||e.dynamicTyping)===!0))(X)?E==="true"||E==="TRUE"||E!=="false"&&E!=="FALSE"&&((z=>{if(f.test(z)&&(z=parseFloat(z),m<z&&z<S))return 1})(E)?parseFloat(E):h.test(E)?new Date(E):E===""?null:E):E)(I=e.header?L>=_.length?"__parsed_extra":_[L]:I,C=e.transform?e.transform(C,I):C);I==="__parsed_extra"?(F[I]=F[I]||[],F[I].push(C)):F[I]=C}return e.header&&(L>_.length?j("FieldMismatch","TooManyFields","Too many fields: expected "+_.length+" fields but parsed "+L,c+A):L<_.length&&j("FieldMismatch","TooFewFields","Too few fields: expected "+_.length+" fields but parsed "+L,c+A)),F}var x;d&&(e.header||e.dynamicTyping||e.transform)&&(x=1,!d.data.length||Array.isArray(d.data[0])?(d.data=d.data.map(D),x=d.data.length):d.data=D(d.data,0),e.header&&d.meta&&(d.meta.fields=_),c+=x)}function B(){return e.header&&_.length===0}function j(b,D,x,k){b={type:b,code:D,message:x},k!==void 0&&(b.row=k),d.errors.push(b)}R(e.step)&&(g=e.step,e.step=function(b){d=b,B()?$():($(),d.data.length!==0&&(o+=b.data.length,e.preview&&o>e.preview?n.abort():(d.data=d.data[0],g(d,s))))}),this.parse=function(b,D,x){var k=e.quoteChar||'"',k=(e.newline||(e.newline=this.guessLineEndings(b,k)),a=!1,e.delimiter?R(e.delimiter)&&(e.delimiter=e.delimiter(b),d.meta.delimiter=e.delimiter):((k=((A,F,L,I,C)=>{var X,E,z,ce;C=C||[","," ","|",";",w.RECORD_SEP,w.UNIT_SEP];for(var de=0;de<C.length;de++){for(var re,ye=C[de],K=0,ne=0,U=0,Q=(z=void 0,new fe({comments:I,delimiter:ye,newline:F,preview:10}).parse(A)),oe=0;oe<Q.data.length;oe++)L&&M(Q.data[oe])?U++:(re=Q.data[oe].length,ne+=re,z===void 0?z=re:0<re&&(K+=Math.abs(re-z),z=re));0<Q.data.length&&(ne/=Q.data.length-U),(E===void 0||K<=E)&&(ce===void 0||ce<ne)&&1.99<ne&&(E=K,X=ye,ce=ne)}return{successful:!!(e.delimiter=X),bestDelimiter:X}})(b,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess)).successful?e.delimiter=k.bestDelimiter:(a=!0,e.delimiter=w.DefaultDelimiter),d.meta.delimiter=e.delimiter),ae(e));return e.preview&&e.header&&k.preview++,t=b,n=new fe(k),d=n.parse(t,D,x),$(),y?{meta:{paused:!0}}:d||{meta:{paused:!1}}},this.paused=function(){return y},this.pause=function(){y=!0,n.abort(),t=R(e.chunk)?"":t.substring(n.getCharIndex())},this.resume=function(){s.streamer._halted?(y=!1,s.streamer.parseChunk(t,!0)):setTimeout(s.resume,3)},this.aborted=function(){return p},this.abort=function(){p=!0,n.abort(),d.meta.aborted=!0,R(e.complete)&&e.complete(d),t=""},this.guessLineEndings=function(A,k){A=A.substring(0,1048576);var k=new RegExp(se(k)+"([^]*?)"+se(k),"gm"),x=(A=A.replace(k,"")).split("\r"),k=A.split(`
|
|
7
|
+
`),A=1<k.length&&k[0].length<x[0].length;if(x.length===1||A)return`
|
|
8
|
+
`;for(var F=0,L=0;L<x.length;L++)x[L][0]===`
|
|
9
|
+
`&&F++;return F>=x.length/2?`\r
|
|
10
|
+
`:"\r"}}function se(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function fe(e){var t=(e=e||{}).delimiter,n=e.newline,a=e.comments,g=e.step,S=e.preview,m=e.fastMode,f=null,h=!1,s=e.quoteChar==null?'"':e.quoteChar,o=s;if(e.escapeChar!==void 0&&(o=e.escapeChar),(typeof t!="string"||-1<w.BAD_DELIMITERS.indexOf(t))&&(t=","),a===t)throw new Error("Comment character same as delimiter");a===!0?a="#":(typeof a!="string"||-1<w.BAD_DELIMITERS.indexOf(a))&&(a=!1),n!==`
|
|
11
11
|
`&&n!=="\r"&&n!==`\r
|
|
12
12
|
`&&(n=`
|
|
13
|
-
`);var
|
|
14
|
-
`,m='"',f=m+m,
|
|
15
|
-
`,'"',w.BYTE_ORDER_MARK],w.WORKERS_SUPPORTED=!D&&!!c.Worker,w.NODE_STREAM_INPUT=1,w.LocalChunkSize=10485760,w.RemoteChunkSize=5242880,w.DefaultDelimiter=",",w.Parser=pe,w.ParserHandle=re,w.NetworkStreamer=W,w.FileStreamer=te,w.StringStreamer=J,w.ReadableStreamStreamer=G,c.jQuery&&((k=c.jQuery).fn.parse=function(e){var t=e.config||{},n=[];return this.each(function(S){if(!(k(this).prop("tagName").toUpperCase()==="INPUT"&&k(this).attr("type").toLowerCase()==="file"&&c.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:k.extend({},t)})}),o(),this;function o(){if(n.length===0)$(e.complete)&&e.complete();else{var S,m,f,l,a=n[0];if($(e.before)){var u=e.before(a.file,a.inputElem);if(typeof u=="object"){if(u.action==="abort")return S="AbortError",m=a.file,f=a.inputElem,l=u.reason,void($(e.error)&&e.error({name:S},m,f,l));if(u.action==="skip")return void g();typeof u.config=="object"&&(a.instanceConfig=k.extend(a.instanceConfig,u.config))}else if(u==="skip")return void g()}var h=a.instanceConfig.complete;a.instanceConfig.complete=function(y){$(h)&&h(y,a.file,a.inputElem),g()},w.parse(a.file,a.instanceConfig)}}function g(){n.splice(0,1),o()}}),I&&(c.onmessage=function(e){e=e.data,w.WORKER_ID===void 0&&e&&(w.WORKER_ID=e.workerId),typeof e.input=="string"?c.postMessage({workerId:w.WORKER_ID,results:w.parse(e.input,e.config),finished:!0}):(c.File&&e.input instanceof File||e.input instanceof Object)&&(e=w.parse(e.input,e.config))&&c.postMessage({workerId:w.WORKER_ID,results:e,finished:!0})}),(W.prototype=Object.create(H.prototype)).constructor=W,(te.prototype=Object.create(H.prototype)).constructor=te,(J.prototype=Object.create(J.prototype)).constructor=J,(G.prototype=Object.create(H.prototype)).constructor=G,w})})(ke)),ke.exports}var ze=Fe();const Be=Oe(ze),{parse:je,unparse:We}=Be;class Ue{static unparse(r,i){return We(r,i)}static parse(r){return new Promise((i,c)=>{je(r,{header:!0,complete:k=>i(k),error:k=>c(k)})})}}async function De(s,r,i){const c=i?.mimeType??Ye(r),k=Pe(s,c);if("showSaveFilePicker"in window&&i?.showSaveFilePicker)try{const N=await(await window.showSaveFilePicker({suggestedName:r,types:[{description:"Datei",accept:{[c]:[`.${Me(r)}`]}}]})).createWritable();await N.write(k),await N.close();return}catch{}const D=URL.createObjectURL(k),I=document.createElement("a");I.href=D,I.download=r,I.rel="noopener",I.style.display="none",document.body.appendChild(I),Ne(I),window.setTimeout(()=>{document.body.removeChild(I),URL.revokeObjectURL(D)},0),He()&&window.open(D,"_blank","noopener,noreferrer")}function Pe(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 Ye(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 Ne(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 qe{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 Ke{static getFileExtension(r){let i="";const c=r.lastIndexOf(".");return c>0&&c<r.length-1&&(i=`.${r.substring(c+1).toLowerCase()}`),i}static readAsText(r){const i=new FileReader;return new Promise((c,k)=>{i.onload=()=>{i.onload=null,i.onerror=null,typeof i.result=="string"?c(i.result):k(new Error("Unexpected result type"))},i.onerror=()=>{const D=i.error??new Error("FileReader error");i.onload=null,i.onerror=null,k(D)},i.readAsText(r)})}static readAsArrayBuffer(r){const i=new FileReader;return new Promise((c,k)=>{i.onload=()=>{i.onload=null,i.onerror=null,i.result instanceof ArrayBuffer?c(i.result):k(new Error("Unexpected result type"))},i.onerror=()=>{const D=i.error??new Error("FileReader error");i.onload=null,i.onerror=null,k(D)},i.readAsArrayBuffer(r)})}static readAsDataUrl(r){const i=new FileReader;return new Promise((c,k)=>{i.onload=D=>{c(D)},i.onerror=D=>k(D),i.readAsDataURL(r)})}static formatFileSize(r,i=2,c){if(r===0)return"0 Bytes";const k=1024,D=["Bytes","KB","MB","GB","TB"];let I=Math.floor(Math.log(r)/Math.log(k));c&&D.includes(c)&&(I=D.indexOf(c));const Y=r/Math.pow(k,I);return`${parseFloat(Y.toFixed(i))} ${D[I]}`}static save(r,i,c){const k=new Blob([r],{type:c});De(k,i)}}class fe{static set(r,i){localStorage.setItem(r,JSON.stringify(i))}static get(r){let i=null;const c=localStorage.getItem(r);return c&&(i=JSON.parse(c)),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 de=(s=>(s.log="log",s.info="info",s.warn="warn",s.debug="debug",s.error="error",s))(de||{});class V{static listeners=new Set;static log(...r){V.doLog(de.log,r)}static info(...r){V.doLog(de.info,r)}static warn(...r){V.doLog(de.warn,r)}static debug(...r){V.doLog(de.debug,r)}static error(...r){V.doLog(de.error,r)}static doLog(r,i){const c={type:r,args:i,timestamp:new Date().toISOString()};for(const k of V.listeners)try{if(k(c)===!1)return}catch{}console[r].apply(console,i)}static onLog(r,i=!1){if(i){const c=k=>{try{return r(k)}finally{V.listeners.delete(c)}};return V.listeners.add(c),()=>V.listeners.delete(c)}return V.listeners.add(r),()=>V.listeners.delete(r)}}const Je=(s,r,i)=>s.localeCompare(r)*(i?1:-1),Qe=(s,r)=>s<r?-1:s===r?0:1,Ve=(s,r,i)=>Qe(s,r)*(i?1:-1),Ze=(s,r,i)=>{let c=0;return typeof s=="string"&&typeof r=="string"?c=Je(s,r,i):c=Ve(s,r,i),c},Re=(s,r,i,c)=>{const k=i(s),D=i(r);return Ze(k,D,c)};class Ge{static get(r){return fe.get(r)}static set(r,i){fe.set(r,i)}static remove(r){fe.remove(r)}}Array.prototype.distinct=function(s){const r=this;return s?r.filter((c,k,D)=>D.findIndex(I=>s(I,c))===k):r.filter((c,k,D)=>D.indexOf(c)===k)},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 c=s(i);return(r[c]=r[c]||[]).push(i),r},{})},Array.prototype.orderBy=function(s,r=!0){return this?.sort((i,c)=>Re(i,c,s,r)),this},Array.prototype.removeBy=function(s,r){return this.filter(i=>s(i)!==r)};var be={exports:{}},Xe=be.exports,$e;function et(){return $e||($e=1,(function(s,r){(function(i,c){s.exports=c()})(Xe,(function(){var i=1e3,c=6e4,k=36e5,D="millisecond",I="second",Y="minute",N="hour",w="day",H="week",W="month",te="quarter",J="year",G="date",re="Invalid Date",ae=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,pe=/\[([^\]]+)]|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,_e={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 f=["th","st","nd","rd"],l=m%100;return"["+m+(f[(l-20)%10]||f[l]||f[0])+"]"}},he=function(m,f,l){var a=String(m);return!a||a.length>=f?m:""+Array(f+1-a.length).join(l)+m},Ee={s:he,z:function(m){var f=-m.utcOffset(),l=Math.abs(f),a=Math.floor(l/60),u=l%60;return(f<=0?"+":"-")+he(a,2,"0")+":"+he(u,2,"0")},m:function m(f,l){if(f.date()<l.date())return-m(l,f);var a=12*(l.year()-f.year())+(l.month()-f.month()),u=f.clone().add(a,W),h=l-u<0,y=f.clone().add(a+(h?-1:1),W);return+(-(a+(l-u)/(h?u-y:y-u))||0)},a:function(m){return m<0?Math.ceil(m)||0:Math.floor(m)},p:function(m){return{M:W,y:J,w:H,d:w,D:G,h:N,m:Y,s:I,ms:D,Q:te}[m]||String(m||"").toLowerCase().replace(/s$/,"")},u:function(m){return m===void 0}},oe="en",q={};q[oe]=_e;var $="$isDayjsObject",e=function(m){return m instanceof g||!(!m||!m[$])},t=function m(f,l,a){var u;if(!f)return oe;if(typeof f=="string"){var h=f.toLowerCase();q[h]&&(u=h),l&&(q[h]=l,u=h);var y=f.split("-");if(!u&&y.length>1)return m(y[0])}else{var p=f.name;q[p]=f,u=p}return!a&&u&&(oe=u),u||!a&&oe},n=function(m,f){if(e(m))return m.clone();var l=typeof f=="object"?f:{};return l.date=m,l.args=arguments,new g(l)},o=Ee;o.l=t,o.i=e,o.w=function(m,f){return n(m,{locale:f.$L,utc:f.$u,x:f.$x,$offset:f.$offset})};var g=(function(){function m(l){this.$L=t(l.locale,null,!0),this.parse(l),this.$x=this.$x||l.x||{},this[$]=!0}var f=m.prototype;return f.parse=function(l){this.$d=(function(a){var u=a.date,h=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(ae);if(y){var p=y[2]-1||0,_=(y[7]||"0").substring(0,3);return h?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()},f.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()},f.$utils=function(){return o},f.isValid=function(){return this.$d.toString()!==re},f.isSame=function(l,a){var u=n(l);return this.startOf(a)<=u&&u<=this.endOf(a)},f.isAfter=function(l,a){return n(l)<this.startOf(a)},f.isBefore=function(l,a){return this.endOf(a)<n(l)},f.$g=function(l,a,u){return o.u(l)?this[a]:this.set(u,l)},f.unix=function(){return Math.floor(this.valueOf()/1e3)},f.valueOf=function(){return this.$d.getTime()},f.startOf=function(l,a){var u=this,h=!!o.u(a)||a,y=o.p(l),p=function(O,x){var v=o.w(u.$u?Date.UTC(u.$y,x,O):new Date(u.$y,x,O),u);return h?v:v.endOf(w)},_=function(O,x){return o.w(u.toDate()[O].apply(u.toDate("s"),(h?[0,0,0,0]:[23,59,59,999]).slice(x)),u)},d=this.$W,C=this.$M,R=this.$D,F="set"+(this.$u?"UTC":"");switch(y){case J:return h?p(1,0):p(31,11);case W:return h?p(1,C):p(0,C+1);case H:var j=this.$locale().weekStart||0,b=(d<j?d+7:d)-j;return p(h?R-b:R+(6-b),C);case w:case G: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()}},f.endOf=function(l){return this.startOf(l,!1)},f.$set=function(l,a){var u,h=o.p(l),y="set"+(this.$u?"UTC":""),p=(u={},u[w]=y+"Date",u[G]=y+"Date",u[W]=y+"Month",u[J]=y+"FullYear",u[N]=y+"Hours",u[Y]=y+"Minutes",u[I]=y+"Seconds",u[D]=y+"Milliseconds",u)[h],_=h===w?this.$D+(a-this.$W):a;if(h===W||h===J){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},f.set=function(l,a){return this.clone().$set(l,a)},f.get=function(l){return this[o.p(l)]()},f.add=function(l,a){var u,h=this;l=Number(l);var y=o.p(a),p=function(C){var R=n(h);return o.w(R.date(R.date()+Math.round(C*l)),h)};if(y===W)return this.set(W,this.$M+l);if(y===J)return this.set(J,this.$y+l);if(y===w)return p(1);if(y===H)return p(7);var _=(u={},u[Y]=c,u[N]=k,u[I]=i,u)[y]||1,d=this.$d.getTime()+l*_;return o.w(d,this)},f.subtract=function(l,a){return this.add(-1*l,a)},f.format=function(l){var a=this,u=this.$locale();if(!this.isValid())return u.invalidDate||re;var h=l||"YYYY-MM-DDTHH:mm:ssZ",y=o.z(this),p=this.$H,_=this.$m,d=this.$M,C=u.weekdays,R=u.months,F=u.meridiem,j=function(x,v,A,z){return x&&(x[v]||x(a,h))||A[v].slice(0,z)},b=function(x){return o.s(p%12||12,x,"0")},O=F||function(x,v,A){var z=x<12?"AM":"PM";return A?z.toLowerCase():z};return h.replace(pe,(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 j(u.monthsShort,d,R,3);case"MMMM":return j(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 j(u.weekdaysMin,a.$W,C,2);case"ddd":return j(u.weekdaysShort,a.$W,C,3);case"dddd":return C[a.$W];case"H":return String(p);case"HH":return o.s(p,2,"0");case"h":return b(1);case"hh":return b(2);case"a":return O(p,_,!0);case"A":return O(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(":","")}))},f.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},f.diff=function(l,a,u){var h,y=this,p=o.p(a),_=n(l),d=(_.utcOffset()-this.utcOffset())*c,C=this-_,R=function(){return o.m(y,_)};switch(p){case J:h=R()/12;break;case W:h=R();break;case te:h=R()/3;break;case H:h=(C-d)/6048e5;break;case w:h=(C-d)/864e5;break;case N:h=C/k;break;case Y:h=C/c;break;case I:h=C/i;break;default:h=C}return u?h:o.a(h)},f.daysInMonth=function(){return this.endOf(W).$D},f.$locale=function(){return q[this.$L]},f.locale=function(l,a){if(!l)return this.$L;var u=this.clone(),h=t(l,a,!0);return h&&(u.$L=h),u},f.clone=function(){return o.w(this.$d,this)},f.toDate=function(){return new Date(this.valueOf())},f.toJSON=function(){return this.isValid()?this.toISOString():null},f.toISOString=function(){return this.$d.toISOString()},f.toString=function(){return this.$d.toUTCString()},m})(),S=g.prototype;return n.prototype=S,[["$ms",D],["$s",I],["$m",Y],["$H",N],["$W",w],["$M",W],["$y",J],["$D",G]].forEach((function(m){S[m[1]]=function(f){return this.$g(f,m[0],m[1])}})),n.extend=function(m,f){return m.$i||(m(f,g,n),m.$i=!0),n},n.locale=t,n.isDayjs=e,n.unix=function(m){return n(1e3*m)},n.en=q[oe],n.Ls=q,n.p={},n}))})(be)),be.exports}var tt=et();const X=Oe(tt);var Se={exports:{}},rt=Se.exports,Ae;function nt(){return Ae||(Ae=1,(function(s,r){(function(i,c){s.exports=c()})(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(c,k,D){var I=k.prototype,Y=I.format;D.en.formats=i,I.format=function(N){N===void 0&&(N="YYYY-MM-DDTHH:mm:ssZ");var w=this.$locale().formats,H=(function(W,te){return W.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(J,G,re){var ae=re&&re.toUpperCase();return G||te[re]||i[re]||te[ae].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(pe,_e,he){return _e||he.slice(1)}))}))})(N,w===void 0?{}:w);return Y.call(this,H)}}}))})(Se)),Se.exports}var it=nt();const st=Oe(it);X.extend(st),Date.prototype.isAfter=function(s,r){return X(this).isAfter(s,r)},Date.prototype.isBefore=function(s,r){return X(this).isBefore(s,r)},Date.prototype.format=function(s){return X(this).format(s)},Date.prototype.isValid=function(){return X(this).isValid()},Date.prototype.add=function(s,r){return X(this).add(s,r).toDate()},Date.prototype.subtract=function(s,r){return X(this).subtract(s,r).toDate()},Date.prototype.firstDayOfMonth=function(){return X(this).startOf("month").toDate()},Date.prototype.lastDayOfMonth=function(){return X(this).endOf("month").toDate()},Date.prototype.set=function(s,r){return X(this).set(s,r).toDate()},Date.prototype.diff=function(s,r){return X(this).diff(s,r)},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};var Z=(s=>(s.opera="opera",s.firefox="firefox",s.safari="safari",s.ie="ie",s.edge="edge",s.edg="edg",s.electron="electron",s.chrome="chrome",s.iOsSafari="iOsSafari",s.edgiOs="edgiOs",s.headlessChrome="headlessChrome",s))(Z||{});const ce={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400,xxxl:1600};class at{screenWidth=0;lastBreakpoint;resizeListener;breakpointChangeCallbacks=new Set;onResizeCallbacks=new Set;rafId=null;emitTimeoutId=null;pendingWidth;pendingBreakpoint;duplicateThresholdMs=60;constructor(){typeof window<"u"&&(this.screenWidth=window.innerWidth,this.resizeListener=this.onResize.bind(this),window.addEventListener("resize",this.resizeListener,{passive:!0}),this.lastBreakpoint=this.getBreakpointByScreenWidth(this.screenWidth))}destroy(){typeof window<"u"&&window.removeEventListener("resize",this.resizeListener),this.breakpointChangeCallbacks.clear(),this.onResizeCallbacks.clear(),this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null)}getCurrentBreakpoint(){return this.lastBreakpoint}getCurrentScreenWidth(){return this.screenWidth}onBreakpointChange(r){this.breakpointChangeCallbacks.add(r)}offBreakpointChange(r){this.breakpointChangeCallbacks.delete(r)}onResizeChange(r){this.onResizeCallbacks.add(r)}offResizeChange(r){this.onResizeCallbacks.delete(r)}getCurrentBrowser(){const r=navigator.userAgent.toLowerCase();if(this.isOpera())return Z.opera;if(this.isFirefox())return Z.firefox;if(this.isSafari())return Z.safari;if(this.isIE())return Z.ie;if(this.isEdge())return Z.edge;if(this.isEdg())return Z.edg;if(this.isElectron(r))return Z.electron;if(this.isChrome())return Z.chrome;if(this.isIOsSafari(r))return Z.iOsSafari;if(this.isEdgiOs(r))return Z.edgiOs;if(this.isHeadlessChrome(r))return Z.headlessChrome;throw new Error("Browser could not be detected: "+r)}getBreakpointByScreenWidth(r=this.screenWidth){let i="xs";for(const c of Object.keys(ce))ce[c]<=r&&(i=c);return{breakpoint:i,screenWidth:ce[i]}}isScreenGreaterThan(r){return this.screenWidth>ce[r]}isScreenSmallerThan(r){return this.screenWidth<ce[r]}getBreakpoint(r){return{breakpoint:r,screenWidth:ce[r]}}isOpera(){return typeof window<"u"&&(!!window.opr&&!!window.opr.addons||!!window.opera||navigator.userAgent.includes("OPR/"))}isFirefox(){return typeof globalThis.InstallTrigger<"u"}isSafari(){return typeof window>"u"?!1:/constructor/i.test(window.HTMLElement)||(r=>r.toString()==="[object SafariRemoteNotification]")(!window.safari||window.safari&&window.safari.pushNotification)}isIE(){return typeof document>"u"?!1:!!document.documentMode}isEdge(){return typeof window>"u"?!1:!this.isIE()&&!!window.StyleMedia}isEdg(){return typeof navigator>"u"?!1:navigator.userAgent.toLowerCase().includes("edg")}isElectron(r){return r.includes("electron")}isChrome(){return typeof window>"u"?!1:!!window.chrome&&!this.isOpera()&&!this.isEdge()&&!this.isEdg()&&!this.isFirefox()&&!this.isSafari()&&!this.isIE()}isIOsSafari(r){return r.includes("iphone")||r.includes("ipad")||r.includes("macintosh")&&typeof document<"u"&&"ontouchend"in document&&r.includes("safari")}isEdgiOs(r){return r.includes("edgios")}isHeadlessChrome(r){return r.includes("headlesschrome")}onResize=()=>{if(typeof window>"u")return;const r=window.innerWidth,i=this.getBreakpointByScreenWidth(r);this.lastBreakpoint?.breakpoint!==i?.breakpoint&&(this.lastBreakpoint=i,i&&this.breakpointChangeCallbacks.forEach(c=>c(i))),this.pendingWidth=r,this.pendingBreakpoint=i,this.emitTimeoutId&&clearTimeout(this.emitTimeoutId),this.emitTimeoutId=window.setTimeout(()=>{this.pendingBreakpoint&&this.onResizeCallbacks.forEach(c=>c(this.pendingWidth,this.pendingBreakpoint)),this.pendingWidth=void 0,this.pendingBreakpoint=void 0,this.emitTimeoutId=null},this.duplicateThresholdMs)}}P.BrowserService=at,P.BrowserType=Z,P.CsvHelper=Ue,P.EnumHelper=qe,P.FileHelper=Ke,P.LocalStorageHelper=fe,P.LoggerHelper=V,P.ScreenBreakpoints=ce,P.TokenHelper=Ge,P.copyToClipboard=ye,P.saveAs=De,P.sortHelper=Re,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})}));
|
|
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,$=t.length,B=n.length,j=a.length,b=R(g),D=[],x=[],k=[],A=c=0;if(!p)return K();if(m||m!==!1&&p.indexOf(s)===-1){for(var F=p.split(n),L=0;L<F.length;L++){if(k=F[L],c+=k.length,L!==F.length-1)c+=n.length;else if(d)return K();if(!a||k.substring(0,j)!==a){if(b){if(D=[],ce(k.split(t)),ne(),y)return K()}else ce(k.split(t));if(S&&S<=L)return D=D.slice(0,S),K(!0)}}return K()}for(var I=p.indexOf(t,c),C=p.indexOf(n,c),X=new RegExp(se(o)+se(s),"g"),E=p.indexOf(s,c);;)if(p[c]===s)for(E=c,c++;;){if((E=p.indexOf(s,E+1))===-1)return d||x.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:D.length,index:c}),re();if(E===M-1)return re(p.substring(c,E).replace(X,s));if(s===o&&p[E+1]===o)E++;else if(s===o||E===0||p[E-1]!==o){I!==-1&&I<E+1&&(I=p.indexOf(t,E+1));var z=de((C=C!==-1&&C<E+1?p.indexOf(n,E+1):C)===-1?I:Math.min(I,C));if(p.substr(E+1+z,$)===t){k.push(p.substring(c,E).replace(X,s)),p[c=E+1+z+$]!==s&&(E=p.indexOf(s,c)),I=p.indexOf(t,c),C=p.indexOf(n,c);break}if(z=de(C),p.substring(E+1+z,E+1+z+B)===n){if(k.push(p.substring(c,E).replace(X,s)),ye(E+1+z+B),I=p.indexOf(t,c),E=p.indexOf(s,c),b&&(ne(),y))return K();if(S&&D.length>=S)return K(!0);break}x.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:D.length,index:c}),E++}}else if(a&&k.length===0&&p.substring(c,c+j)===a){if(C===-1)return K();c=C+B,C=p.indexOf(n,c),I=p.indexOf(t,c)}else if(I!==-1&&(I<C||C===-1))k.push(p.substring(c,I)),c=I+$,I=p.indexOf(t,c);else{if(C===-1)break;if(k.push(p.substring(c,C)),ye(C+B),b&&(ne(),y))return K();if(S&&D.length>=S)return K(!0)}return re();function ce(U){D.push(U),A=c}function de(U){var Q=0;return Q=U!==-1&&(U=p.substring(E+1,U))&&U.trim()===""?U.length:Q}function re(U){return d||(U===void 0&&(U=p.substring(c)),k.push(U),c=M,ce(k),b&&ne()),K()}function ye(U){c=U,ce(k),k=[],C=p.indexOf(n,c)}function K(U){if(e.header&&!_&&D.length&&!h){var Q=D[0],oe=Object.create(null),Ee=new Set(Q);let Ae=!1;for(let pe=0;pe<Q.length;pe++){let ie=Q[pe];if(oe[ie=R(e.transformHeader)?e.transformHeader(ie,pe):ie]){let _e,Te=oe[ie];for(;_e=ie+"_"+Te,Te++,Ee.has(_e););Ee.add(_e),Q[pe]=_e,oe[ie]++,Ae=!0,(f=f===null?{}:f)[_e]=ie}else oe[ie]=1,Q[pe]=ie;Ee.add(ie)}Ae&&console.warn("Duplicate headers found and renamed."),h=!0}return{data:D,errors:x,meta:{delimiter:t,linebreak:n,aborted:y,truncated:!!U,cursor:A+(_||0),renamedHeaders:f}}}function ne(){g(K()),D=[],x=[]}},this.abort=function(){y=!0},this.getCharIndex=function(){return c}}function me(e){var t=e.data,n=P[t.workerId],a=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var g={abort:function(){a=!0,ue(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:be,resume:be};if(R(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),!a);S++);delete t.results}else R(n.userChunk)&&(n.userChunk(t.results,g,t.file),delete t.results)}t.finished&&!a&&ue(t.workerId,t.results)}function ue(e,t){var n=P[e];R(n.userComplete)&&n.userComplete(t),n.terminate(),delete P[e]}function be(){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 q(e,t){return function(){e.apply(t,arguments)}}function R(e){return typeof e=="function"}return w.parse=function(e,t){var n=(t=t||{}).dynamicTyping||!1;if(R(n)&&(t.dynamicTypingFunction=n,n={}),t.dynamicTyping=n,t.transform=!!R(t.transform)&&t.transform,!t.worker||!w.WORKERS_SUPPORTED)return n=null,w.NODE_STREAM_INPUT,typeof e=="string"?(e=(a=>a.charCodeAt(0)!==65279?a:a.slice(1))(e),n=new(t.download?W:J)(t)):e.readable===!0&&R(e.read)&&R(e.on)?n=new Z(t):(l.File&&e instanceof File||e instanceof Object)&&(n=new ee(t)),n.stream(e);(n=(()=>{var a;return!!w.WORKERS_SUPPORTED&&(a=(()=>{var g=l.URL||l.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"})))})(),(a=new l.Worker(a)).onmessage=me,a.id=N++,P[a.id]=a)})()).userStep=t.step,n.userChunk=t.chunk,n.userComplete=t.complete,n.userError=t.error,t.step=R(t.step),t.chunk=R(t.chunk),t.complete=R(t.complete),t.error=R(t.error),delete t.worker,n.postMessage({input:e,config:t,workerId:n.id})},w.unparse=function(e,t){var n=!1,a=!0,g=",",S=`\r
|
|
14
|
+
`,m='"',f=m+m,h=!1,s=null,o=!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"||(h=t.skipEmptyLines),typeof t.newline=="string"&&(S=t.newline),typeof t.quoteChar=="string"&&(m=t.quoteChar),typeof t.header=="boolean"&&(a=t.header),Array.isArray(t.columns)){if(t.columns.length===0)throw new Error("Option columns is empty");s=t.columns}t.escapeChar!==void 0&&(f=t.escapeChar+m),t.escapeFormulae instanceof RegExp?o=t.escapeFormulae:typeof t.escapeFormulae=="boolean"&&t.escapeFormulae&&(o=/^[=+\-@\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,h);if(typeof e[0]=="object")return y(s||Object.keys(e[0]),e,h)}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||s),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||[],h);throw new Error("Unable to serialize unrecognized input");function y(_,d,M){var $="",B=(typeof _=="string"&&(_=JSON.parse(_)),typeof d=="string"&&(d=JSON.parse(d)),Array.isArray(_)&&0<_.length),j=!Array.isArray(d[0]);if(B&&a){for(var b=0;b<_.length;b++)0<b&&($+=g),$+=p(_[b],b);0<d.length&&($+=S)}for(var D=0;D<d.length;D++){var x=(B?_:d[D]).length,k=!1,A=B?Object.keys(d[D]).length===0:d[D].length===0;if(M&&!B&&(k=M==="greedy"?d[D].join("").trim()==="":d[D].length===1&&d[D][0].length===0),M==="greedy"&&B){for(var F=[],L=0;L<x;L++){var I=j?_[L]:L;F.push(d[D][I])}k=F.join("").trim()===""}if(!k){for(var C=0;C<x;C++){0<C&&!A&&($+=g);var X=B&&j?_[C]:C;$+=p(d[D][X],C)}D<d.length-1&&(!M||0<x&&!A)&&($+=S)}}return $}function p(_,d){var M,$;return _==null?"":_.constructor===Date?JSON.stringify(_).slice(1,25):($=!1,o&&typeof _=="string"&&o.test(_)&&(_="'"+_,$=!0),M=_.toString().replace(c,f),($=$||n===!0||typeof n=="function"&&n(_,d)||Array.isArray(n)&&n[d]||((B,j)=>{for(var b=0;b<j.length;b++)if(-1<B.indexOf(j[b]))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=!O&&!!l.Worker,w.NODE_STREAM_INPUT=1,w.LocalChunkSize=10485760,w.RemoteChunkSize=5242880,w.DefaultDelimiter=",",w.Parser=fe,w.ParserHandle=te,w.NetworkStreamer=W,w.FileStreamer=ee,w.StringStreamer=J,w.ReadableStreamStreamer=Z,l.jQuery&&((v=l.jQuery).fn.parse=function(e){var t=e.config||{},n=[];return this.each(function(S){if(!(v(this).prop("tagName").toUpperCase()==="INPUT"&&v(this).attr("type").toLowerCase()==="file"&&l.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:v.extend({},t)})}),a(),this;function a(){if(n.length===0)R(e.complete)&&e.complete();else{var S,m,f,h,s=n[0];if(R(e.before)){var o=e.before(s.file,s.inputElem);if(typeof o=="object"){if(o.action==="abort")return S="AbortError",m=s.file,f=s.inputElem,h=o.reason,void(R(e.error)&&e.error({name:S},m,f,h));if(o.action==="skip")return void g();typeof o.config=="object"&&(s.instanceConfig=v.extend(s.instanceConfig,o.config))}else if(o==="skip")return void g()}var c=s.instanceConfig.complete;s.instanceConfig.complete=function(y){R(c)&&c(y,s.file,s.inputElem),g()},w.parse(s.file,s.instanceConfig)}}function g(){n.splice(0,1),a()}}),T&&(l.onmessage=function(e){e=e.data,w.WORKER_ID===void 0&&e&&(w.WORKER_ID=e.workerId),typeof e.input=="string"?l.postMessage({workerId:w.WORKER_ID,results:w.parse(e.input,e.config),finished:!0}):(l.File&&e.input instanceof File||e.input instanceof Object)&&(e=w.parse(e.input,e.config))&&l.postMessage({workerId:w.WORKER_ID,results:e,finished:!0})}),(W.prototype=Object.create(H.prototype)).constructor=W,(ee.prototype=Object.create(H.prototype)).constructor=ee,(J.prototype=Object.create(J.prototype)).constructor=J,(Z.prototype=Object.create(H.prototype)).constructor=Z,w})})(we)),we.exports}var Be=Ie();const Fe=Se(Be),{parse:ze,unparse:je}=Fe;class We{static unparse(r,i){return je(r,i)}static parse(r){return new Promise((i,l)=>{ze(r,{header:!0,complete:v=>i(v),error:v=>l(v)})})}}async function xe(u,r,i){const l=i?.mimeType??Pe(r),v=Ue(u,l);if("showSaveFilePicker"in window&&i?.showSaveFilePicker)try{const N=await(await window.showSaveFilePicker({suggestedName:r,types:[{description:"Datei",accept:{[l]:[`.${Me(r)}`]}}]})).createWritable();await N.write(v),await N.close();return}catch{}const O=URL.createObjectURL(v),T=document.createElement("a");T.href=O,T.download=r,T.rel="noopener",T.style.display="none",document.body.appendChild(T),Ye(T),window.setTimeout(()=>{document.body.removeChild(T),URL.revokeObjectURL(O)},0),Ne()&&window.open(O,"_blank","noopener,noreferrer")}function Ue(u,r){if(u instanceof Blob)return u.type?u:new Blob([u],{type:r});if(u instanceof ArrayBuffer||u instanceof Uint8Array){const i=u instanceof Uint8Array?u:new Uint8Array(u);return new Blob([i],{type:r})}return new Blob([u],{type:r||"text/plain;charset=utf-8"})}function Pe(u){switch(Me(u).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(u){const r=u.lastIndexOf(".");return r>=0&&r<u.length-1?u.slice(r+1):""}function Ye(u){const r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),u.dispatchEvent(r)}function Ne(){const u=navigator.userAgent,r=/iPad|iPhone|iPod/.test(u),i=/^((?!chrome|android).)*safari/i.test(u);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 l=r.lastIndexOf(".");return l>0&&l<r.length-1&&(i=`.${r.substring(l+1).toLowerCase()}`),i}static readAsText(r){const i=new FileReader;return new Promise((l,v)=>{i.onload=()=>{i.onload=null,i.onerror=null,typeof i.result=="string"?l(i.result):v(new Error("Unexpected result type"))},i.onerror=()=>{const O=i.error??new Error("FileReader error");i.onload=null,i.onerror=null,v(O)},i.readAsText(r)})}static readAsArrayBuffer(r){const i=new FileReader;return new Promise((l,v)=>{i.onload=()=>{i.onload=null,i.onerror=null,i.result instanceof ArrayBuffer?l(i.result):v(new Error("Unexpected result type"))},i.onerror=()=>{const O=i.error??new Error("FileReader error");i.onload=null,i.onerror=null,v(O)},i.readAsArrayBuffer(r)})}static readAsDataUrl(r){const i=new FileReader;return new Promise((l,v)=>{i.onload=O=>{l(O)},i.onerror=O=>v(O),i.readAsDataURL(r)})}static formatFileSize(r,i=2,l){if(r===0)return"0 Bytes";const v=1024,O=["Bytes","KB","MB","GB","TB"];let T=Math.floor(Math.log(r)/Math.log(v));l&&O.includes(l)&&(T=O.indexOf(l));const P=r/Math.pow(v,T);return`${parseFloat(P.toFixed(i))} ${O[T]}`}static save(r,i,l){const v=new Blob([r],{type:l});xe(v,i)}}class he{static set(r,i){localStorage.setItem(r,JSON.stringify(i))}static get(r){let i=null;const l=localStorage.getItem(r);return l&&(i=JSON.parse(l)),i}static remove(r){let i=!!he.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=(u=>(u.log="log",u.info="info",u.warn="warn",u.debug="debug",u.error="error",u))(le||{});class V{static listeners=new Set;static log(...r){V.doLog(le.log,r)}static info(...r){V.doLog(le.info,r)}static warn(...r){V.doLog(le.warn,r)}static debug(...r){V.doLog(le.debug,r)}static error(...r){V.doLog(le.error,r)}static doLog(r,i){const l={type:r,args:i,timestamp:new Date().toISOString()};for(const v of V.listeners)try{if(v(l)===!1)return}catch{}console[r].apply(console,i)}static onLog(r,i=!1){if(i){const l=v=>{try{return r(v)}finally{V.listeners.delete(l)}};return V.listeners.add(l),()=>V.listeners.delete(l)}return V.listeners.add(r),()=>V.listeners.delete(r)}}const Ke=(u,r,i)=>u.localeCompare(r)*(i?1:-1),Je=(u,r)=>u<r?-1:u===r?0:1,Qe=(u,r,i)=>Je(u,r)*(i?1:-1),Ve=(u,r,i)=>{let l=0;return typeof u=="string"&&typeof r=="string"?l=Ke(u,r,i):l=Qe(u,r,i),l},Oe=(u,r,i,l)=>{const v=i(u),O=i(r);return Ve(v,O,l)};class Ze{static get(r){return he.get(r)}static set(r,i){he.set(r,i)}static remove(r){he.remove(r)}}Array.prototype.distinct=function(u){const r=this;return u?r.filter((l,v,O)=>O.findIndex(T=>u(T,l))===v):r.filter((l,v,O)=>O.indexOf(l)===v)},Array.prototype.filterBy=function(u){return this.filter(r=>u(r))},Array.prototype.first=function(){return this?.length>0?this[0]:null},Array.prototype.groupBy=function(u){return this.reduce((r,i)=>{const l=u(i);return(r[l]=r[l]||[]).push(i),r},{})},Array.prototype.orderBy=function(u,r=!0){return this?.sort((i,l)=>Oe(i,l,u,r)),this},Array.prototype.removeBy=function(u,r){return this.filter(i=>u(i)!==r)};var ke={exports:{}},Ge=ke.exports,Ce;function Xe(){return Ce||(Ce=1,(function(u,r){(function(i,l){u.exports=l()})(Ge,(function(){var i=1e3,l=6e4,v=36e5,O="millisecond",T="second",P="minute",N="hour",w="day",H="week",W="month",ee="quarter",J="year",Z="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+)?$/,fe=/\[([^\]]+)]|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 f=["th","st","nd","rd"],h=m%100;return"["+m+(f[(h-20)%10]||f[h]||f[0])+"]"}},ue=function(m,f,h){var s=String(m);return!s||s.length>=f?m:""+Array(f+1-s.length).join(h)+m},be={s:ue,z:function(m){var f=-m.utcOffset(),h=Math.abs(f),s=Math.floor(h/60),o=h%60;return(f<=0?"+":"-")+ue(s,2,"0")+":"+ue(o,2,"0")},m:function m(f,h){if(f.date()<h.date())return-m(h,f);var s=12*(h.year()-f.year())+(h.month()-f.month()),o=f.clone().add(s,W),c=h-o<0,y=f.clone().add(s+(c?-1:1),W);return+(-(s+(h-o)/(c?o-y:y-o))||0)},a:function(m){return m<0?Math.ceil(m)||0:Math.floor(m)},p:function(m){return{M:W,y:J,w:H,d:w,D:Z,h:N,m:P,s:T,ms:O,Q:ee}[m]||String(m||"").toLowerCase().replace(/s$/,"")},u:function(m){return m===void 0}},ae="en",q={};q[ae]=me;var R="$isDayjsObject",e=function(m){return m instanceof g||!(!m||!m[R])},t=function m(f,h,s){var o;if(!f)return ae;if(typeof f=="string"){var c=f.toLowerCase();q[c]&&(o=c),h&&(q[c]=h,o=c);var y=f.split("-");if(!o&&y.length>1)return m(y[0])}else{var p=f.name;q[p]=f,o=p}return!s&&o&&(ae=o),o||!s&&ae},n=function(m,f){if(e(m))return m.clone();var h=typeof f=="object"?f:{};return h.date=m,h.args=arguments,new g(h)},a=be;a.l=t,a.i=e,a.w=function(m,f){return n(m,{locale:f.$L,utc:f.$u,x:f.$x,$offset:f.$offset})};var g=(function(){function m(h){this.$L=t(h.locale,null,!0),this.parse(h),this.$x=this.$x||h.x||{},this[R]=!0}var f=m.prototype;return f.parse=function(h){this.$d=(function(s){var o=s.date,c=s.utc;if(o===null)return new Date(NaN);if(a.u(o))return new Date;if(o instanceof Date)return new Date(o);if(typeof o=="string"&&!/Z$/i.test(o)){var y=o.match(se);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(o)})(h),this.init()},f.init=function(){var h=this.$d;this.$y=h.getFullYear(),this.$M=h.getMonth(),this.$D=h.getDate(),this.$W=h.getDay(),this.$H=h.getHours(),this.$m=h.getMinutes(),this.$s=h.getSeconds(),this.$ms=h.getMilliseconds()},f.$utils=function(){return a},f.isValid=function(){return this.$d.toString()!==te},f.isSame=function(h,s){var o=n(h);return this.startOf(s)<=o&&o<=this.endOf(s)},f.isAfter=function(h,s){return n(h)<this.startOf(s)},f.isBefore=function(h,s){return this.endOf(s)<n(h)},f.$g=function(h,s,o){return a.u(h)?this[s]:this.set(o,h)},f.unix=function(){return Math.floor(this.valueOf()/1e3)},f.valueOf=function(){return this.$d.getTime()},f.startOf=function(h,s){var o=this,c=!!a.u(s)||s,y=a.p(h),p=function(D,x){var k=a.w(o.$u?Date.UTC(o.$y,x,D):new Date(o.$y,x,D),o);return c?k:k.endOf(w)},_=function(D,x){return a.w(o.toDate()[D].apply(o.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(x)),o)},d=this.$W,M=this.$M,$=this.$D,B="set"+(this.$u?"UTC":"");switch(y){case J:return c?p(1,0):p(31,11);case W:return c?p(1,M):p(0,M+1);case H:var j=this.$locale().weekStart||0,b=(d<j?d+7:d)-j;return p(c?$-b:$+(6-b),M);case w:case Z:return _(B+"Hours",0);case N:return _(B+"Minutes",1);case P:return _(B+"Seconds",2);case T:return _(B+"Milliseconds",3);default:return this.clone()}},f.endOf=function(h){return this.startOf(h,!1)},f.$set=function(h,s){var o,c=a.p(h),y="set"+(this.$u?"UTC":""),p=(o={},o[w]=y+"Date",o[Z]=y+"Date",o[W]=y+"Month",o[J]=y+"FullYear",o[N]=y+"Hours",o[P]=y+"Minutes",o[T]=y+"Seconds",o[O]=y+"Milliseconds",o)[c],_=c===w?this.$D+(s-this.$W):s;if(c===W||c===J){var d=this.clone().set(Z,1);d.$d[p](_),d.init(),this.$d=d.set(Z,Math.min(this.$D,d.daysInMonth())).$d}else p&&this.$d[p](_);return this.init(),this},f.set=function(h,s){return this.clone().$set(h,s)},f.get=function(h){return this[a.p(h)]()},f.add=function(h,s){var o,c=this;h=Number(h);var y=a.p(s),p=function(M){var $=n(c);return a.w($.date($.date()+Math.round(M*h)),c)};if(y===W)return this.set(W,this.$M+h);if(y===J)return this.set(J,this.$y+h);if(y===w)return p(1);if(y===H)return p(7);var _=(o={},o[P]=l,o[N]=v,o[T]=i,o)[y]||1,d=this.$d.getTime()+h*_;return a.w(d,this)},f.subtract=function(h,s){return this.add(-1*h,s)},f.format=function(h){var s=this,o=this.$locale();if(!this.isValid())return o.invalidDate||te;var c=h||"YYYY-MM-DDTHH:mm:ssZ",y=a.z(this),p=this.$H,_=this.$m,d=this.$M,M=o.weekdays,$=o.months,B=o.meridiem,j=function(x,k,A,F){return x&&(x[k]||x(s,c))||A[k].slice(0,F)},b=function(x){return a.s(p%12||12,x,"0")},D=B||function(x,k,A){var F=x<12?"AM":"PM";return A?F.toLowerCase():F};return c.replace(fe,(function(x,k){return k||(function(A){switch(A){case"YY":return String(s.$y).slice(-2);case"YYYY":return a.s(s.$y,4,"0");case"M":return d+1;case"MM":return a.s(d+1,2,"0");case"MMM":return j(o.monthsShort,d,$,3);case"MMMM":return j($,d);case"D":return s.$D;case"DD":return a.s(s.$D,2,"0");case"d":return String(s.$W);case"dd":return j(o.weekdaysMin,s.$W,M,2);case"ddd":return j(o.weekdaysShort,s.$W,M,3);case"dddd":return M[s.$W];case"H":return String(p);case"HH":return a.s(p,2,"0");case"h":return b(1);case"hh":return b(2);case"a":return D(p,_,!0);case"A":return D(p,_,!1);case"m":return String(_);case"mm":return a.s(_,2,"0");case"s":return String(s.$s);case"ss":return a.s(s.$s,2,"0");case"SSS":return a.s(s.$ms,3,"0");case"Z":return y}return null})(x)||y.replace(":","")}))},f.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},f.diff=function(h,s,o){var c,y=this,p=a.p(s),_=n(h),d=(_.utcOffset()-this.utcOffset())*l,M=this-_,$=function(){return a.m(y,_)};switch(p){case J:c=$()/12;break;case W:c=$();break;case ee:c=$()/3;break;case H:c=(M-d)/6048e5;break;case w:c=(M-d)/864e5;break;case N:c=M/v;break;case P:c=M/l;break;case T:c=M/i;break;default:c=M}return o?c:a.a(c)},f.daysInMonth=function(){return this.endOf(W).$D},f.$locale=function(){return q[this.$L]},f.locale=function(h,s){if(!h)return this.$L;var o=this.clone(),c=t(h,s,!0);return c&&(o.$L=c),o},f.clone=function(){return a.w(this.$d,this)},f.toDate=function(){return new Date(this.valueOf())},f.toJSON=function(){return this.isValid()?this.toISOString():null},f.toISOString=function(){return this.$d.toISOString()},f.toString=function(){return this.$d.toUTCString()},m})(),S=g.prototype;return n.prototype=S,[["$ms",O],["$s",T],["$m",P],["$H",N],["$W",w],["$M",W],["$y",J],["$D",Z]].forEach((function(m){S[m[1]]=function(f){return this.$g(f,m[0],m[1])}})),n.extend=function(m,f){return m.$i||(m(f,g,n),m.$i=!0),n},n.locale=t,n.isDayjs=e,n.unix=function(m){return n(1e3*m)},n.en=q[ae],n.Ls=q,n.p={},n}))})(ke)),ke.exports}var et=Xe();const G=Se(et);var ve={exports:{}},tt=ve.exports,$e;function rt(){return $e||($e=1,(function(u,r){(function(i,l){u.exports=l()})(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(l,v,O){var T=v.prototype,P=T.format;O.en.formats=i,T.format=function(N){N===void 0&&(N="YYYY-MM-DDTHH:mm:ssZ");var w=this.$locale().formats,H=(function(W,ee){return W.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(J,Z,te){var se=te&&te.toUpperCase();return Z||ee[te]||i[te]||ee[se].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(fe,me,ue){return me||ue.slice(1)}))}))})(N,w===void 0?{}:w);return P.call(this,H)}}}))})(ve)),ve.exports}var nt=rt();const it=Se(nt);G.extend(it),Date.prototype.isAfter=function(u,r){return G(this).isAfter(u,r)},Date.prototype.isBefore=function(u,r){return G(this).isBefore(u,r)},Date.prototype.format=function(u){return G(this).format(u)},Date.prototype.isValid=function(){return G(this).isValid()},Date.prototype.add=function(u,r){return G(this).add(u,r).toDate()},Date.prototype.subtract=function(u,r){return G(this).subtract(u,r).toDate()},Date.prototype.firstDayOfMonth=function(){return G(this).startOf("month").toDate()},Date.prototype.lastDayOfMonth=function(){return G(this).endOf("month").toDate()},Date.prototype.set=function(u,r){return G(this).set(u,r).toDate()},Date.prototype.diff=function(u,r){return G(this).diff(u,r)},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};const Re={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400,xxxl:1600};class st{screenBreakpoints;screenWidth=0;lastBreakpoint;resizeListener;breakpointChangeCallbacks=new Set;onResizeCallbacks=new Set;rafId=null;emitTimeoutId=null;pendingWidth;pendingBreakpoint;duplicateThresholdMs=60;constructor(r){typeof window<"u"&&(this.screenBreakpoints=r||Re,this.screenWidth=window.innerWidth,this.resizeListener=this.onResize.bind(this),window.addEventListener("resize",this.resizeListener,{passive:!0}),this.lastBreakpoint=this.getBreakpointByScreenWidth(this.screenWidth))}destroy(){typeof window<"u"&&window.removeEventListener("resize",this.resizeListener),this.breakpointChangeCallbacks.clear(),this.onResizeCallbacks.clear(),this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null)}getCurrentScreenWidth(){return this.screenWidth}getCurrentBreakpoint(){return this.lastBreakpoint}onBreakpointChange(r){this.breakpointChangeCallbacks.add(r)}offBreakpointChange(r){this.breakpointChangeCallbacks.delete(r)}onResizeChange(r){this.onResizeCallbacks.add(r)}offResizeChange(r){this.onResizeCallbacks.delete(r)}getBreakpointByScreenWidth(r=this.screenWidth){let i="xs";for(const l of Object.keys(this.screenBreakpoints))this.screenBreakpoints[l]<=r&&(i=l);return{breakpoint:i,screenWidth:this.screenBreakpoints[i]}}isScreenGreaterThan(r){return this.screenWidth>this.screenBreakpoints[r]}isScreenSmallerThan(r){return this.screenWidth<this.screenBreakpoints[r]}getBreakpoint(r){return{breakpoint:r,screenWidth:this.screenBreakpoints[r]}}onResize=()=>{if(typeof window>"u")return;const r=window.innerWidth,i=this.getBreakpointByScreenWidth(r);this.lastBreakpoint?.breakpoint!==i?.breakpoint&&(this.lastBreakpoint=i,i&&this.breakpointChangeCallbacks.forEach(l=>l(i))),this.pendingWidth=r,this.pendingBreakpoint=i,this.emitTimeoutId&&clearTimeout(this.emitTimeoutId),this.emitTimeoutId=window.setTimeout(()=>{this.pendingBreakpoint&&this.onResizeCallbacks.forEach(l=>l(this.pendingWidth,this.pendingBreakpoint)),this.pendingWidth=void 0,this.pendingBreakpoint=void 0,this.emitTimeoutId=null},this.duplicateThresholdMs)}}Y.BrowserService=st,Y.CsvHelper=We,Y.EnumHelper=He,Y.FileHelper=qe,Y.LocalStorageHelper=he,Y.LoggerHelper=V,Y.ScreenBreakpoints=Re,Y.TokenHelper=Ze,Y.copyToClipboard=ge,Y.saveAs=xe,Y.sortHelper=Oe,Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser.consts.d.ts","sourceRoot":"","sources":["../../../../lib/services/browser/browser.consts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAQlD,CAAC"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { Size } from '../../types';
|
|
2
|
-
import { BrowserType } from './browser-type.enum';
|
|
3
2
|
import { IScreenBreakpoint } from './browser.interface';
|
|
4
|
-
|
|
5
|
-
export type ResizeCallback = (breakpoint: IScreenBreakpoint) => void;
|
|
6
|
-
export type OnResizeCallback = (width: number, breakpoint: IScreenBreakpoint) => void;
|
|
3
|
+
import { OnResizeCallback, ResizeCallback } from './browser.types';
|
|
7
4
|
export declare class BrowserService {
|
|
5
|
+
private screenBreakpoints;
|
|
8
6
|
private screenWidth;
|
|
9
7
|
private lastBreakpoint;
|
|
10
8
|
private resizeListener;
|
|
@@ -15,30 +13,18 @@ export declare class BrowserService {
|
|
|
15
13
|
private pendingWidth?;
|
|
16
14
|
private pendingBreakpoint?;
|
|
17
15
|
private duplicateThresholdMs;
|
|
18
|
-
constructor();
|
|
16
|
+
constructor(screenBreakpoints?: Record<Size, number>);
|
|
19
17
|
destroy(): void;
|
|
20
|
-
getCurrentBreakpoint(): IScreenBreakpoint;
|
|
21
18
|
getCurrentScreenWidth(): number;
|
|
19
|
+
getCurrentBreakpoint(): IScreenBreakpoint;
|
|
22
20
|
onBreakpointChange(callback: ResizeCallback): void;
|
|
23
21
|
offBreakpointChange(callback: ResizeCallback): void;
|
|
24
22
|
onResizeChange(callback: OnResizeCallback): void;
|
|
25
23
|
offResizeChange(callback: OnResizeCallback): void;
|
|
26
|
-
getCurrentBrowser(): BrowserType;
|
|
27
24
|
getBreakpointByScreenWidth(width?: number): IScreenBreakpoint;
|
|
28
25
|
isScreenGreaterThan(size: Size): boolean;
|
|
29
26
|
isScreenSmallerThan(size: Size): boolean;
|
|
30
27
|
getBreakpoint(size: Size): IScreenBreakpoint;
|
|
31
|
-
private isOpera;
|
|
32
|
-
private isFirefox;
|
|
33
|
-
private isSafari;
|
|
34
|
-
private isIE;
|
|
35
|
-
private isEdge;
|
|
36
|
-
private isEdg;
|
|
37
|
-
private isElectron;
|
|
38
|
-
private isChrome;
|
|
39
|
-
private isIOsSafari;
|
|
40
|
-
private isEdgiOs;
|
|
41
|
-
private isHeadlessChrome;
|
|
42
28
|
private onResize;
|
|
43
29
|
}
|
|
44
30
|
//# sourceMappingURL=browser.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.service.d.ts","sourceRoot":"","sources":["../../../../lib/services/browser/browser.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"browser.service.d.ts","sourceRoot":"","sources":["../../../../lib/services/browser/browser.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAInE,qBAAa,cAAc;IAC1B,OAAO,CAAC,iBAAiB,CAAwB;IACjD,OAAO,CAAC,WAAW,CAAa;IAChC,OAAO,CAAC,cAAc,CAAqB;IAC3C,OAAO,CAAC,cAAc,CAA4B;IAClD,OAAO,CAAC,yBAAyB,CAAkC;IACnE,OAAO,CAAC,iBAAiB,CAAoC;IAC7D,OAAO,CAAC,KAAK,CAAuB;IACpC,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,YAAY,CAAC,CAAS;IAC9B,OAAO,CAAC,iBAAiB,CAAC,CAAoB;IAC9C,OAAO,CAAC,oBAAoB,CAAM;gBAEtB,iBAAiB,CAAC,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC;IAY7C,OAAO,IAAI,IAAI;IAYf,qBAAqB,IAAI,MAAM;IAI/B,oBAAoB,IAAI,iBAAiB;IAIzC,kBAAkB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI;IAIlD,mBAAmB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI;IAInD,cAAc,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IAIhD,eAAe,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IAIjD,0BAA0B,CAAC,KAAK,GAAE,MAAyB,GAAG,iBAAiB;IAU/E,mBAAmB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO;IAIxC,mBAAmB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO;IAIxC,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,iBAAiB;IAOnD,OAAO,CAAC,QAAQ,CAwBd;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser.types.d.ts","sourceRoot":"","sources":["../../../../lib/services/browser/browser.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,MAAM,cAAc,GAAG,CAAC,UAAU,EAAE,iBAAiB,KAAK,IAAI,CAAC;AACrE,MAAM,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,iBAAiB,KAAK,IAAI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/services/browser/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/services/browser/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"browser-type.enum.d.ts","sourceRoot":"","sources":["../../../../lib/services/browser/browser-type.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACtB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,EAAE,OAAO;IACT,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,cAAc,mBAAmB;CACjC"}
|
|
File without changes
|