2 lines
42 KiB
JavaScript
2 lines
42 KiB
JavaScript
/*! For license information please see firstExample.app.js.LICENSE.txt */
|
|
(()=>{var e={196:(e,t,i)=>{"use strict";i.d(t,{q:()=>M});var r=function(e,t){return e<t?-1:e>t?1:0},n=/(^0x[\da-fA-F]+$|^([+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?!\.\d+)(?=\D|\s|$))|\d+)/g,s=/^\s+|\s+$/g,a=/\s+/g,o=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,l=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[/-]\d{1,4}[/-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,d=/^0+[1-9]{1}[0-9]*$/,u=/[^\x00-\x80]/,c=function(e,t){var i=e.localeCompare(t);return i?i/Math.abs(i):0},h=function(e,t){return e<t?-1:e>t?1:0},f=function(e){if(0!==e.length){var t=Number(e);if(!Number.isNaN(t))return t}},p=function(e){return e.replace(a," ").replace(s,"")},g=function(e,t,i){if(o.test(e)&&(!d.test(e)||0===t||"."!==i[t-1]))return f(e)||0},v=function(e,t,i){return{parsedNumber:g(e,t,i),normalizedString:p(e)}},m=function(e){return function(e){return e.replace(n,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")}(e).map(v)},_=function(e){return"function"==typeof e},y=function(e){return Number.isNaN(e)||e instanceof Number&&Number.isNaN(e.valueOf())},b=function(e){return null===e},w=function(e){return!(null===e||"object"!=typeof e||Array.isArray(e)||e instanceof Number||e instanceof String||e instanceof Boolean||e instanceof Date)},E=function(e){return"symbol"==typeof e},S=function(e){return void 0===e},F=function(e){if("string"==typeof e||e instanceof String||("number"==typeof e||e instanceof Number)&&!y(e)||"boolean"==typeof e||e instanceof Boolean||e instanceof Date){var t=function(e){return"boolean"==typeof e||e instanceof Boolean?Number(e).toString():"number"==typeof e||e instanceof Number?e.toString():e instanceof Date?e.getTime().toString():"string"==typeof e||e instanceof String?e.toLowerCase().replace(s,""):""}(e),i=function(e){var t=f(e);return void 0!==t?t:function(e){if(l.test(e)){var t=Date.parse(e);if(!Number.isNaN(t))return t}}(e)}(t);return{parsedNumber:i,chunks:m(i?""+i:t),value:e}}return{isArray:Array.isArray(e),isFunction:_(e),isNaN:y(e),isNull:b(e),isObject:w(e),isSymbol:E(e),isUndefined:S(e),value:e}},k=function(e){return"string"==typeof e&&("asc"===e||"desc"===e)};function M(e){var t,i;return function(e){return function(t,i){return function(e,t){return e.value===t.value?0:void 0!==e.parsedNumber&&void 0!==t.parsedNumber?r(e.parsedNumber,t.parsedNumber):e.chunks&&t.chunks?function(e,t){for(var i=e.length,n=t.length,s=Math.min(i,n),a=0;a<s;a++){var o=e[a],l=t[a];if(o.normalizedString!==l.normalizedString){if(""===o.normalizedString!=(""===l.normalizedString))return""===o.normalizedString?-1:1;if(void 0!==o.parsedNumber&&void 0!==l.parsedNumber){var d=r(o.parsedNumber,l.parsedNumber);return 0===d?h(o.normalizedString,l.normalizedString):d}return void 0!==o.parsedNumber||void 0!==l.parsedNumber?void 0!==o.parsedNumber?-1:1:u.test(o.normalizedString+l.normalizedString)&&o.normalizedString.localeCompare?c(o.normalizedString,l.normalizedString):h(o.normalizedString,l.normalizedString)}}return i>s||n>s?i<=s?-1:1:0}(e.chunks,t.chunks):function(e,t){return(e.chunks?!t.chunks:t.chunks)?e.chunks?-1:1:(e.isNaN?!t.isNaN:t.isNaN)?e.isNaN?-1:1:(e.isSymbol?!t.isSymbol:t.isSymbol)?e.isSymbol?-1:1:(e.isObject?!t.isObject:t.isObject)?e.isObject?-1:1:(e.isArray?!t.isArray:t.isArray)?e.isArray?-1:1:(e.isFunction?!t.isFunction:t.isFunction)?e.isFunction?-1:1:(e.isNull?!t.isNull:t.isNull)?e.isNull?-1:1:0}(e,t)}(F(t),F(i))*("desc"===e.order?-1:1)}}((i="asc","string"==typeof(t=e)&&k(t)?i=t:t&&"object"==typeof t&&t.order&&k(t.order)&&(i=t.order),{order:i}))}},460:function(e,t){var i,r;void 0===(r="function"==typeof(i=function e(){"use strict";var t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{},i=!t.document&&!!t.postMessage,r=i&&/blob:/i.test((t.location||{}).protocol),n={},s=0,a={parse:function(i,r){var o=(r=r||{}).dynamicTyping||!1;if(w(o)&&(r.dynamicTypingFunction=o,o={}),r.dynamicTyping=o,r.transform=!!w(r.transform)&&r.transform,r.worker&&a.WORKERS_SUPPORTED){var l=function(){if(!a.WORKERS_SUPPORTED)return!1;var i,r,o=(i=t.URL||t.webkitURL||null,r=e.toString(),a.BLOB_URL||(a.BLOB_URL=i.createObjectURL(new Blob(["(",r,")();"],{type:"text/javascript"})))),l=new t.Worker(o);return l.onmessage=v,l.id=s++,n[l.id]=l}();return l.userStep=r.step,l.userChunk=r.chunk,l.userComplete=r.complete,l.userError=r.error,r.step=w(r.step),r.chunk=w(r.chunk),r.complete=w(r.complete),r.error=w(r.error),delete r.worker,void l.postMessage({input:i,config:r,workerId:l.id})}var f=null;return a.NODE_STREAM_INPUT,"string"==typeof i?f=r.download?new d(r):new c(r):!0===i.readable&&w(i.read)&&w(i.on)?f=new h(r):(t.File&&i instanceof File||i instanceof Object)&&(f=new u(r)),f.stream(i)},unparse:function(e,t){var i=!1,r=!0,n=",",s="\r\n",o='"',l=o+o,d=!1,u=null,c=!1;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||a.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(n=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(i=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(d=t.skipEmptyLines),"string"==typeof t.newline&&(s=t.newline),"string"==typeof t.quoteChar&&(o=t.quoteChar),"boolean"==typeof t.header&&(r=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");u=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+o),"boolean"==typeof t.escapeFormulae&&(c=t.escapeFormulae)}}();var h=new RegExp(p(o),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return f(null,e,d);if("object"==typeof e[0])return f(u||Object.keys(e[0]),e,d)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),f(e.fields||[],e.data||[],d);throw new Error("Unable to serialize unrecognized input");function f(e,t,i){var a="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var o=Array.isArray(e)&&0<e.length,l=!Array.isArray(t[0]);if(o&&r){for(var d=0;d<e.length;d++)0<d&&(a+=n),a+=g(e[d],d);0<t.length&&(a+=s)}for(var u=0;u<t.length;u++){var c=o?e.length:t[u].length,h=!1,f=o?0===Object.keys(t[u]).length:0===t[u].length;if(i&&!o&&(h="greedy"===i?""===t[u].join("").trim():1===t[u].length&&0===t[u][0].length),"greedy"===i&&o){for(var p=[],v=0;v<c;v++){var m=l?e[v]:v;p.push(t[u][m])}h=""===p.join("").trim()}if(!h){for(var _=0;_<c;_++){0<_&&!f&&(a+=n);var y=o&&l?e[_]:_;a+=g(t[u][y],_)}u<t.length-1&&(!i||0<c&&!f)&&(a+=s)}}return a}function g(e,t){if(null==e)return"";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);!0===c&&"string"==typeof e&&null!==e.match(/^[=+\-@].*$/)&&(e="'"+e);var r=e.toString().replace(h,l);return"boolean"==typeof i&&i||"function"==typeof i&&i(e,t)||Array.isArray(i)&&i[t]||function(e,t){for(var i=0;i<t.length;i++)if(-1<e.indexOf(t[i]))return!0;return!1}(r,a.BAD_DELIMITERS)||-1<r.indexOf(n)||" "===r.charAt(0)||" "===r.charAt(r.length-1)?o+r+o:r}}};if(a.RECORD_SEP=String.fromCharCode(30),a.UNIT_SEP=String.fromCharCode(31),a.BYTE_ORDER_MARK="\ufeff",a.BAD_DELIMITERS=["\r","\n",'"',a.BYTE_ORDER_MARK],a.WORKERS_SUPPORTED=!i&&!!t.Worker,a.NODE_STREAM_INPUT=1,a.LocalChunkSize=10485760,a.RemoteChunkSize=5242880,a.DefaultDelimiter=",",a.Parser=g,a.ParserHandle=f,a.NetworkStreamer=d,a.FileStreamer=u,a.StringStreamer=c,a.ReadableStreamStreamer=h,t.jQuery){var o=t.jQuery;o.fn.parse=function(e){var i=e.config||{},r=[];return this.each((function(e){if("INPUT"!==o(this).prop("tagName").toUpperCase()||"file"!==o(this).attr("type").toLowerCase()||!t.FileReader||!this.files||0===this.files.length)return!0;for(var n=0;n<this.files.length;n++)r.push({file:this.files[n],inputElem:this,instanceConfig:o.extend({},i)})})),n(),this;function n(){if(0!==r.length){var t,i,n,l=r[0];if(w(e.before)){var d=e.before(l.file,l.inputElem);if("object"==typeof d){if("abort"===d.action)return"AbortError",t=l.file,i=l.inputElem,n=d.reason,void(w(e.error)&&e.error({name:"AbortError"},t,i,n));if("skip"===d.action)return void s();"object"==typeof d.config&&(l.instanceConfig=o.extend(l.instanceConfig,d.config))}else if("skip"===d)return void s()}var u=l.instanceConfig.complete;l.instanceConfig.complete=function(e){w(u)&&u(e,l.file,l.inputElem),s()},a.parse(l.file,l.instanceConfig)}else w(e.complete)&&e.complete()}function s(){r.splice(0,1),n()}}}function l(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(e){var t=y(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new f(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,i){if(this.isFirstChunk&&w(this._config.beforeFirstChunk)){var n=this._config.beforeFirstChunk(e);void 0!==n&&(e=n)}this.isFirstChunk=!1,this._halted=!1;var s=this._partialLine+e;this._partialLine="";var o=this._handle.parse(s,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var l=o.meta.cursor;this._finished||(this._partialLine=s.substring(l-this._baseIndex),this._baseIndex=l),o&&o.data&&(this._rowCount+=o.data.length);var d=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(r)t.postMessage({results:o,workerId:a.WORKER_ID,finished:d});else if(w(this._config.chunk)&&!i){if(this._config.chunk(o,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);o=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(o.data),this._completeResults.errors=this._completeResults.errors.concat(o.errors),this._completeResults.meta=o.meta),this._completed||!d||!w(this._config.complete)||o&&o.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),d||o&&o.meta.paused||this._nextChunk(),o}this._halted=!0},this._sendError=function(e){w(this._config.error)?this._config.error(e):r&&this._config.error&&t.postMessage({workerId:a.WORKER_ID,error:e,finished:!1})}}function d(e){var t;(e=e||{}).chunkSize||(e.chunkSize=a.RemoteChunkSize),l.call(this,e),this._nextChunk=i?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),i||(t.onload=b(this._chunkLoaded,this),t.onerror=b(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!i),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var r in e)t.setRequestHeader(r,e[r])}if(this._config.chunkSize){var n=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+n)}try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}i&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var i=t.statusText||e;this._sendError(new Error(i))}}function u(e){var t,i;(e=e||{}).chunkSize||(e.chunkSize=a.LocalChunkSize),l.call(this,e);var r="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,i=e.slice||e.webkitSlice||e.mozSlice,r?((t=new FileReader).onload=b(this._chunkLoaded,this),t.onerror=b(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 e=this._input;if(this._config.chunkSize){var n=Math.min(this._start+this._config.chunkSize,this._input.size);e=i.call(e,this._start,n)}var s=t.readAsText(e,this._config.encoding);r||this._chunkLoaded({target:{result:s}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function c(e){var t;l.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,i=this._config.chunkSize;return i?(e=t.substring(0,i),t=t.substring(i)):(e=t,t=""),this._finished=!t,this.parseChunk(e)}}}function h(e){l.call(this,e=e||{});var t=[],i=!0,r=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):i=!0},this._streamData=b((function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}}),this),this._streamError=b((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=b((function(){this._streamCleanUp(),r=!0,this._streamData("")}),this),this._streamCleanUp=b((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function f(e){var t,i,r,n=Math.pow(2,53),s=-n,o=/^\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))$/,d=this,u=0,c=0,h=!1,f=!1,v=[],m={data:[],errors:[],meta:{}};if(w(e.step)){var _=e.step;e.step=function(t){if(m=t,S())E();else{if(E(),0===m.data.length)return;u+=t.data.length,e.preview&&u>e.preview?i.abort():(m.data=m.data[0],_(m,d))}}}function b(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function E(){if(m&&r&&(k("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines)for(var t=0;t<m.data.length;t++)b(m.data[t])&&m.data.splice(t--,1);return S()&&function(){if(m)if(Array.isArray(m.data[0])){for(var t=0;S()&&t<m.data.length;t++)m.data[t].forEach(i);m.data.splice(0,1)}else m.data.forEach(i);function i(t,i){w(e.transformHeader)&&(t=e.transformHeader(t,i)),v.push(t)}}(),function(){if(!m||!e.header&&!e.dynamicTyping&&!e.transform)return m;function t(t,i){var r,n=e.header?{}:[];for(r=0;r<t.length;r++){var s=r,a=t[r];e.header&&(s=r>=v.length?"__parsed_extra":v[r]),e.transform&&(a=e.transform(a,s)),a=F(s,a),"__parsed_extra"===s?(n[s]=n[s]||[],n[s].push(a)):n[s]=a}return e.header&&(r>v.length?k("FieldMismatch","TooManyFields","Too many fields: expected "+v.length+" fields but parsed "+r,c+i):r<v.length&&k("FieldMismatch","TooFewFields","Too few fields: expected "+v.length+" fields but parsed "+r,c+i)),n}var i=1;return!m.data.length||Array.isArray(m.data[0])?(m.data=m.data.map(t),i=m.data.length):m.data=t(m.data,0),e.header&&m.meta&&(m.meta.fields=v),c+=i,m}()}function S(){return e.header&&0===v.length}function F(t,i){return r=t,e.dynamicTypingFunction&&void 0===e.dynamicTyping[r]&&(e.dynamicTyping[r]=e.dynamicTypingFunction(r)),!0===(e.dynamicTyping[r]||e.dynamicTyping)?"true"===i||"TRUE"===i||"false"!==i&&"FALSE"!==i&&(function(e){if(o.test(e)){var t=parseFloat(e);if(s<t&&t<n)return!0}return!1}(i)?parseFloat(i):l.test(i)?new Date(i):""===i?null:i):i;var r}function k(e,t,i,r){var n={type:e,code:t,message:i};void 0!==r&&(n.row=r),m.errors.push(n)}this.parse=function(n,s,o){var l=e.quoteChar||'"';if(e.newline||(e.newline=function(e,t){e=e.substring(0,1048576);var i=new RegExp(p(t)+"([^]*?)"+p(t),"gm"),r=(e=e.replace(i,"")).split("\r"),n=e.split("\n"),s=1<n.length&&n[0].length<r[0].length;if(1===r.length||s)return"\n";for(var a=0,o=0;o<r.length;o++)"\n"===r[o][0]&&a++;return a>=r.length/2?"\r\n":"\r"}(n,l)),r=!1,e.delimiter)w(e.delimiter)&&(e.delimiter=e.delimiter(n),m.meta.delimiter=e.delimiter);else{var d=function(t,i,r,n,s){var o,l,d,u;s=s||[",","\t","|",";",a.RECORD_SEP,a.UNIT_SEP];for(var c=0;c<s.length;c++){var h=s[c],f=0,p=0,v=0;d=void 0;for(var m=new g({comments:n,delimiter:h,newline:i,preview:10}).parse(t),_=0;_<m.data.length;_++)if(r&&b(m.data[_]))v++;else{var y=m.data[_].length;p+=y,void 0!==d?0<y&&(f+=Math.abs(y-d),d=y):d=y}0<m.data.length&&(p/=m.data.length-v),(void 0===l||f<=l)&&(void 0===u||u<p)&&1.99<p&&(l=f,o=h,u=p)}return{successful:!!(e.delimiter=o),bestDelimiter:o}}(n,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);d.successful?e.delimiter=d.bestDelimiter:(r=!0,e.delimiter=a.DefaultDelimiter),m.meta.delimiter=e.delimiter}var u=y(e);return e.preview&&e.header&&u.preview++,t=n,i=new g(u),m=i.parse(t,s,o),E(),h?{meta:{paused:!0}}:m||{meta:{paused:!1}}},this.paused=function(){return h},this.pause=function(){h=!0,i.abort(),t=w(e.chunk)?"":t.substring(i.getCharIndex())},this.resume=function(){d.streamer._halted?(h=!1,d.streamer.parseChunk(t,!0)):setTimeout(d.resume,3)},this.aborted=function(){return f},this.abort=function(){f=!0,i.abort(),m.meta.aborted=!0,w(e.complete)&&e.complete(m),t=""}}function p(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function g(e){var t,i=(e=e||{}).delimiter,r=e.newline,n=e.comments,s=e.step,o=e.preview,l=e.fastMode,d=t=void 0===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(d=e.escapeChar),("string"!=typeof i||-1<a.BAD_DELIMITERS.indexOf(i))&&(i=","),n===i)throw new Error("Comment character same as delimiter");!0===n?n="#":("string"!=typeof n||-1<a.BAD_DELIMITERS.indexOf(n))&&(n=!1),"\n"!==r&&"\r"!==r&&"\r\n"!==r&&(r="\n");var u=0,c=!1;this.parse=function(e,a,h){if("string"!=typeof e)throw new Error("Input must be a string");var f=e.length,g=i.length,v=r.length,m=n.length,_=w(s),y=[],b=[],E=[],S=u=0;if(!e)return A();if(l||!1!==l&&-1===e.indexOf(t)){for(var F=e.split(r),k=0;k<F.length;k++){if(E=F[k],u+=E.length,k!==F.length-1)u+=r.length;else if(h)return A();if(!n||E.substring(0,m)!==n){if(_){if(y=[],x(E.split(i)),H(),c)return A()}else x(E.split(i));if(o&&o<=k)return y=y.slice(0,o),A(!0)}}return A()}for(var M=e.indexOf(i,u),N=e.indexOf(r,u),O=new RegExp(p(d)+p(t),"g"),D=e.indexOf(t,u);;)if(e[u]!==t)if(n&&0===E.length&&e.substring(u,u+m)===n){if(-1===N)return A();u=N+v,N=e.indexOf(r,u),M=e.indexOf(i,u)}else if(-1!==M&&(M<N||-1===N))E.push(e.substring(u,M)),u=M+g,M=e.indexOf(i,u);else{if(-1===N)break;if(E.push(e.substring(u,N)),R(N+v),_&&(H(),c))return A();if(o&&y.length>=o)return A(!0)}else for(D=u,u++;;){if(-1===(D=e.indexOf(t,D+1)))return h||b.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:y.length,index:u}),C();if(D===f-1)return C(e.substring(u,D).replace(O,t));if(t!==d||e[D+1]!==d){if(t===d||0===D||e[D-1]!==d){-1!==M&&M<D+1&&(M=e.indexOf(i,D+1)),-1!==N&&N<D+1&&(N=e.indexOf(r,D+1));var L=I(-1===N?M:Math.min(M,N));if(e[D+1+L]===i){E.push(e.substring(u,D).replace(O,t)),e[u=D+1+L+g]!==t&&(D=e.indexOf(t,u)),M=e.indexOf(i,u),N=e.indexOf(r,u);break}var T=I(N);if(e.substring(D+1+T,D+1+T+v)===r){if(E.push(e.substring(u,D).replace(O,t)),R(D+1+T+v),M=e.indexOf(i,u),D=e.indexOf(t,u),_&&(H(),c))return A();if(o&&y.length>=o)return A(!0);break}b.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:y.length,index:u}),D++}}else D++}return C();function x(e){y.push(e),S=u}function I(t){var i=0;if(-1!==t){var r=e.substring(D+1,t);r&&""===r.trim()&&(i=r.length)}return i}function C(t){return h||(void 0===t&&(t=e.substring(u)),E.push(t),u=f,x(E),_&&H()),A()}function R(t){u=t,x(E),E=[],N=e.indexOf(r,u)}function A(e){return{data:y,errors:b,meta:{delimiter:i,linebreak:r,aborted:c,truncated:!!e,cursor:S+(a||0)}}}function H(){s(A()),y=[],b=[]}},this.abort=function(){c=!0},this.getCharIndex=function(){return u}}function v(e){var t=e.data,i=n[t.workerId],r=!1;if(t.error)i.userError(t.error,t.file);else if(t.results&&t.results.data){var s={abort:function(){r=!0,m(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:_,resume:_};if(w(i.userStep)){for(var a=0;a<t.results.data.length&&(i.userStep({data:t.results.data[a],errors:t.results.errors,meta:t.results.meta},s),!r);a++);delete t.results}else w(i.userChunk)&&(i.userChunk(t.results,s,t.file),delete t.results)}t.finished&&!r&&m(t.workerId,t.results)}function m(e,t){var i=n[e];w(i.userComplete)&&i.userComplete(t),i.terminate(),delete n[e]}function _(){throw new Error("Not implemented.")}function y(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var i in e)t[i]=y(e[i]);return t}function b(e,t){return function(){e.apply(t,arguments)}}function w(e){return"function"==typeof e}return r&&(t.onmessage=function(e){var i=e.data;if(void 0===a.WORKER_ID&&i&&(a.WORKER_ID=i.workerId),"string"==typeof i.input)t.postMessage({workerId:a.WORKER_ID,results:a.parse(i.input,i.config),finished:!0});else if(t.File&&i.input instanceof File||i.input instanceof Object){var r=a.parse(i.input,i.config);r&&t.postMessage({workerId:a.WORKER_ID,results:r,finished:!0})}}),(d.prototype=Object.create(l.prototype)).constructor=d,(u.prototype=Object.create(l.prototype)).constructor=u,(c.prototype=Object.create(c.prototype)).constructor=c,(h.prototype=Object.create(l.prototype)).constructor=h,a})?i.apply(t,[]):i)||(e.exports=r)},658:e=>{e.exports={converterElementNotFound:'Aucun élément HTML n\'a été trouvé ayant comme "id" : ',converterFieldNotFound:"Le champ n'existe pas dans les données ou les données n'ont pas encore été chargées.",converterNeedDatasElt:"Merci de fournir un id valide pour l'élément où afficher les données.",converterRefreshFail:"Le nom des champs et l'élement du DOM receveur sont nécessaires à l'affichage des données.",pagination2HTMLFail:"Toutes les donnée nécessaires à la création des sélecteurs de pagination n'ont pas été fournies.",paginationNeedByfaultValueBeInOptions:"La valeur de pagination par défaut doit faire partie des options proposées.",paginationNeedDatas:"Il ne peut y avoir de pagination, si les données n'ont pas été récupérées.",paginationNeedOptionsValues:"Vous n'avez fourni aucune options possibles pour la pagination.",paginationNeedPositiveInteger:"Merci de fournir un nombre entier supérieur à zéro pour désigner chaque option de pagination.",parserDatasNotFound:"Aucune donnée n'a été trouvée.",parserFail:"La lecture des données du fichier a échoué.",parserNeedUrl:"Merci de fournir une url valide pour le fichier à parser.",renderNeedDatas:"Il ne peut y avoir de pagination, si les données n'ont pas été récupérées.",renderUnknownField:"Un champ non attendu a été trouvé dans les données à afficher : ",selector2HTMLFail:"Le création d'un filtre dans le DOM nécessite l'initialisation de l'élément HTML et du numéro du champs à filter.",selectorCheckIsOkFail:"Le test est lancé sur un filtre incorrectement initialisé ou sur un attribut absent de la donnée à tester.",selectorFieldNotFound:"Au moins un des champs devant servir à filtrer les données n'existe pas dans le fichier.",selectorNeedDatas:"Le création d'un filtre nécessite la transmission des données à filtrer.",selectorSelectedIndexNotFound:"La valeur sélectionnée n'a pas été trouvée dans la liste des champs.",sortingField2HTMLFail:"Toutes les donnée nécessaires à la création du lien de classement n'ont pas été fournies.",sortingFieldNeedDatas:"Le création d'un champ de classement nécessite la transmission de la liste des champs.",sortingFieldFieldNotFound:"Au moins un des champs devant permettre de classer les données n'existe pas dans le fichier.",sortingFieldsNbFail:"Le nombre de champs trouvés dans le DOM ne correspond pas à celui des données à classer.",sortingFieldsNotInHTML:"Les champs pouvant servir à classer les données n'ont pas été trouvés dans le DOM."}}},t={};function i(r){var n=t[r];if(void 0!==n)return n.exports;var s=t[r]={exports:{}};return e[r].call(s.exports,s,s.exports,i),s.exports}i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e,t,r=i(658),n=function(){function e(t,i){void 0===i&&(i=e.defaultSettings),this._converter=t,this.settings=i}return e.prototype.rend2HTML=function(e){if(void 0===this._converter.parseMetas||void 0===this._converter.parseMetas.fields)throw new Error(r.renderNeedDatas);var t=this.settings.allBegining;if(void 0!==this.settings.fieldsBegining&&void 0!==this.settings.fieldDisplaying&&void 0!==this.settings.fieldsEnding){for(var i in t+=this.settings.fieldsBegining,this._converter.parseMetas.fields)t+=this.settings.fieldDisplaying.replace("#FIELDNAME",this._converter.parseMetas.fields[Number(i)]);t+=this.settings.fieldsEnding}for(var n in t+=this.settings.linesBegining,e){for(var s in t+=this.settings.lineBegining,e[n])-1!==this._converter.parseMetas.fields.indexOf(s)?t+=this.settings.dataDisplaying.replace("#VALUE",e[n][s]).replace("#FIELDNAME",s):console.log(r.renderUnknownField+s);t+=this.settings.lineEnding}return t+(this.settings.linesEnding+this.settings.allEnding)},e.defaultSettings={allBegining:"<table>",allEnding:"</table>",fieldsBegining:"<thead><tr>",fieldsEnding:"</tr></thead>",fieldDisplaying:"<th>#FIELDNAME</th>",linesBegining:"<tbody>",linesEnding:"</tbody>",lineBegining:"<tr>",lineEnding:"</tr>",dataDisplaying:"<td>#VALUE</td>"},e}(),s=i(658),a=function(){function e(e,t,i){if(void 0===i&&(i="Pages"),void 0===e.parseMetas||void 0===e.parseMetas.fields)throw new Error(s.paginationNeedDatas);this._pages={displayElement:m.checkInDOMById(t),name:i},this._converter=e}return e.isPositiveInteger=function(e){return!(!1===Number.isInteger(e)||e<=0)},Object.defineProperty(e.prototype,"selectedValue",{get:function(){return this._selectedValue},set:function(t){if(void 0===t||!e.isPositiveInteger(t))throw new Error(s.needPositiveInteger);if(void 0!==this.options&&-1===this.options.values.indexOf(t))throw new Error(s.paginationNeedByfaultValueBeInOptions);this._selectedValue=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this._options},set:function(t){if(void 0!==t){if(t.displayElement=m.checkInDOMById(t.displayElement),0===t.values.length)throw new Error(s.paginationNeedOptionsValues);for(var i in t.values)if(!e.isPositiveInteger(t.values[i]))throw new Error(s.needPositiveInteger);if(void 0!==this.selectedValue&&-1===t.values.indexOf(this.selectedValue))throw new Error(s.paginationNeedByfaultValueBeInOptions);t.name=void 0===t.name?"Pagination":t.name,this._options=t}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pages",{get:function(){return this._pages},enumerable:!1,configurable:!0}),e.prototype.rend2HTML=function(){if(void 0===this._converter||void 0===this._options)throw new Error(s.pagination2HTMLFail);var e="<label for='freeDatas2HTMLPaginationSelector'>"+this._options.name+" </label><select name='freeDatas2HTMLPaginationSelector' id='freeDatas2HTMLPaginationSelector'><option value='0'>----</option>";for(var t in this._options.values)e+="<option value='"+(Number(t)+1)+"'>"+this._options.values[t]+"</option>";e+="</select>",this._options.displayElement.eltDOM.innerHTML=e;var i=document.getElementById("freeDatas2HTMLPaginationSelector");if(void 0!==this._selectedValue){var r=this._options.values.indexOf(this._selectedValue)+1;i.value=""+r}var n=this;i.addEventListener("change",(function(e){"0"===i.value?n._selectedValue=void 0:n._selectedValue=n._options.values[Number(i.value)-1],n._converter.refreshView()}))},e.prototype.creaPageSelector=function(e){if(void 0!==this.selectedValue)if(e>this.selectedValue){var t=Math.ceil(e/this.selectedValue),i="<label for='freeDatas2HTMLPagesSelector'>"+this.pages.name+" </label><select name='freeDatas2HTMLPagesSelector' id='freeDatas2HTMLPagesSelector'><option value='1'>1</option>";this.pages.values=[1];for(var r=2;r<=t;r++)i+="<option value='"+r+"'>"+r+"</option>",this.pages.values.push(r);i+="</select>",this.pages.displayElement.eltDOM.innerHTML=i;var n=document.getElementById("freeDatas2HTMLPagesSelector");void 0!==this.pages.selectedValue&&(n.value=""+this.pages.selectedValue),this.pages.selectedValue=1;var s=this;n.addEventListener("change",(function(e){s.pages.selectedValue=Number(n.value),s._converter.refreshView()}))}else this.pages.displayElement.eltDOM.innerHTML="";else this.pages.displayElement.eltDOM.innerHTML=""},e}(),o=i(196).q,l=i(658),d=function(){function e(e,t,i){if(this._datasViewElt={id:"",eltDOM:void 0},this.name="",this.values=[],void 0===e.parseMetas||void 0===e.parseMetas.fields||0===e.parseDatas.length)throw new Error(l.selectorNeedDatas);if(!e.checkFieldExist(Number(t)))throw new Error(l.selectorFieldNotFound);this._datasViewElt=m.checkInDOMById(i),this._converter=e,this._datasFieldNb=t}return Object.defineProperty(e.prototype,"separator",{get:function(){return this._separator},set:function(e){this._separator=""===e?void 0:e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"datasViewElt",{get:function(){return this._datasViewElt},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"datasFieldNb",{get:function(){return this._datasFieldNb},enumerable:!1,configurable:!0}),e.prototype.selector2HTML=function(){if(void 0===this._converter||void 0===this._datasViewElt.eltDOM||void 0===this._datasFieldNb)throw new Error(l.selector2HTMLFail);for(var e in this.name=this._converter.parseMetas.fields[this._datasFieldNb],this._converter.parseDatas)if(void 0===this._separator)""!==(r=String(this._converter.parseDatas[e][this.name]).trim())&&-1===this.values.indexOf(r)&&this.values.push(r);else{var t=String(this._converter.parseDatas[e][this.name]).split(this._separator);for(var i in t){var r;""!==(r=t[i].trim())&&-1===this.values.indexOf(r)&&this.values.push(r)}}if(this.values.length>0){void 0!==this._converter.getSortingFunctionForField(this._datasFieldNb)?this.values.sort(this._converter.getSortingFunctionForField(this._datasFieldNb).sort):this.values.sort(o());var n="<label for='freeDatas2HTML_"+this._datasViewElt.id+"'>"+this.name+" : </label><select name='freeDatas2HTML_"+this._datasViewElt.id+"' id='freeDatas2HTML_"+this._datasViewElt.id+"'><option value='0'>----</option>";for(var s in this.values)n+="<option value='"+(Number(s)+1)+"'>"+this.values[s]+"</option>";n+="</select>",this._datasViewElt.eltDOM.innerHTML=n;var a=document.getElementById("freeDatas2HTML_"+this._datasViewElt.id),d=this;a.addEventListener("change",(function(e){d._converter.refreshView()}))}},e.prototype.getSelectionnedId=function(){var e=document.getElementById("freeDatas2HTML_"+this._datasViewElt.id);return void 0===e?0:parseInt(e.value,10)},e.prototype.dataIsOk=function(e){if(void 0===this.name||""===this.name)throw new Error(l.selectorCheckIsOkFail);var t=this.getSelectionnedId();if(0===t)return!0;if(t-=1,void 0===this.values[t])throw new Error(l.selectorSelectedIndexNotFound);if(void 0===e[this.name])return!1;var i=this.values[t];if(void 0===this._separator)return e[this.name].trim()===i;var r=!1,n=String(e[this.name]).split(this._separator);for(var s in n)if(n[s].trim()===i){r=!0;break}return r},e}(),u=(i(196).q,i(658)),c=function(){function e(e,t,i){if(void 0===i&&(i="th"),this._order=void 0,void 0===e.parseMetas||void 0===e.parseMetas.fields)throw new Error(u.sortingFieldNeedDatas);if(!e.checkFieldExist(Number(t)))throw new Error(u.sortingFieldFieldNotFound);var r=document.querySelectorAll(i);if(void 0===r)throw new Error(u.sortingFieldsNotInHTML);if(r.length!==e.parseMetas.fields.length)throw new Error(u.sortingFieldsNbFail);this._converter=e,this._datasFieldNb=t,this._fieldsDOMSelector=i}return Object.defineProperty(e.prototype,"fieldsDOMSelector",{get:function(){return this._fieldsDOMSelector},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"datasFieldNb",{get:function(){return this._datasFieldNb},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"order",{get:function(){return this._order},enumerable:!1,configurable:!0}),e.prototype.field2HTML=function(){if(void 0===this._converter||""===this._fieldsDOMSelector||void 0===this._datasFieldNb)throw new Error(u.sortingField2HTMLFail);var e=document.querySelectorAll(this._fieldsDOMSelector),t=e[this._datasFieldNb].innerHTML;t="<a href='#freeDatas2HTMLSorting"+this._datasFieldNb+"' id='freeDatas2HTMLSorting"+this._datasFieldNb+"'>"+t+"</a>",e[this._datasFieldNb].innerHTML=t;var i=document.getElementById("freeDatas2HTMLSorting"+this._datasFieldNb),r=this;i.addEventListener("click",(function(e){e.preventDefault();var t=r._order;r._order=void 0===t||"desc"===t?"asc":"desc",r._converter.datasSortedField=r,r._converter.refreshView()}))},e}(),h=function(e,t,i,r){return new(i||(i=Promise))((function(n,s){function a(e){try{l(r.next(e))}catch(e){s(e)}}function o(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,o)}l((r=r.apply(e,t||[])).next())}))},f=function(e,t){var i,r,n,s,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,r&&(n=2&s[0]?r.return:s[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,s[1])).done)return n;switch(r=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((n=(n=a.trys).length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]<n[3])){a.label=s[1];break}if(6===s[0]&&a.label<n[1]){a.label=n[1],n=s;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(s);break}n[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{i=n=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}},p=i(460),g=i(658),v=i(196).q,m=function(){function e(){this._datasViewElt=void 0,this.datasHTML="",this._datasSourceUrl="",this.parseMetas=void 0,this.parseDatas=[],this.parseErrors=[],this.stopIfParseErrors=!1,this._datasSortingFunctions=[],this.datasSelectors=[],this.datasSortingFields=[],this._datasCounter={},this.datasRender=new n(this)}return e.checkInDOMById=function(e){var t=document.getElementById(e.id);if(null===t)throw new Error(g.converterElementNotFound+e.id);return e.eltDOM=t,e},e.prototype.checkFieldExist=function(e){return void 0!==this.parseMetas&&void 0!==this.parseMetas.fields&&void 0!==this.parseMetas.fields[e]},Object.defineProperty(e.prototype,"datasViewElt",{set:function(t){this._datasViewElt=e.checkInDOMById(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"datasSourceUrl",{set:function(e){if(0===e.trim().length)throw new Error(g.parserNeedUrl);this._datasSourceUrl=e.trim()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"datasSortingFunctions",{set:function(e){this._datasSortingFunctions=[];for(var t=0;t<e.length;t++){if(!this.checkFieldExist(e[t].datasFieldNb))throw new Error(g.converterFieldNotFound);this._datasSortingFunctions.push(e[t])}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"datasCounter",{set:function(t){this._datasCounter={displayElement:e.checkInDOMById(t),value:void 0}},enumerable:!1,configurable:!0}),e.prototype.getDatasCounterValue=function(){return void 0!==this._datasCounter&&null!=this._datasCounter.value?this._datasCounter.value:void 0},e.prototype.getSortingFunctionForField=function(e){for(var t in this._datasSortingFunctions)if(this._datasSortingFunctions[t].datasFieldNb===e)return this._datasSortingFunctions[t]},e.prototype.parse=function(){return h(this,void 0,void 0,(function(){var e;return f(this,(function(t){return e=this,[2,new Promise((function(t,i){""!==e._datasSourceUrl?p.parse(e._datasSourceUrl,{quoteChar:'"',header:!0,complete:function(i){e.parseErrors=i.errors,e.parseDatas=i.data;var r=[];for(var n in i.meta.fields)""!==i.meta.fields[n].trim()&&r.push(i.meta.fields[n]);i.meta.fields=r,e.parseMetas=i.meta,t(!0)},error:function(e){i(new Error(g.parserFail))},download:!0,skipEmptyLines:!0}):i(new Error(g.parserNeedUrl))}))]}))}))},e.prototype.run=function(){return h(this,void 0,void 0,(function(){return f(this,(function(e){switch(e.label){case 0:if(""===this._datasSourceUrl)throw new Error(g.parserNeedUrl);return[4,this.parse()];case 1:if(e.sent(),0===this.parseDatas.length||void 0===this.parseMetas.fields)throw new Error(g.parserDatasNotFound);return this.stopIfParseErrors&&0!==this.parseErrors.length?(console.error(this.parseErrors),[2]):(this.refreshView(),[2,!0])}}))}))},e.prototype.refreshView=function(){if(void 0===this.parseMetas||void 0===this.parseMetas.fields)throw new Error(g.converterRefreshFail);for(var e in this.datasHTML=this.createDatas2Display(this.parseMetas.fields,this.parseDatas),void 0!==this._datasViewElt&&void 0!==this._datasViewElt.eltDOM&&(this._datasViewElt.eltDOM.innerHTML=this.datasHTML),this.datasSortingFields)this.datasSortingFields[e].field2HTML()},e.prototype.createDatas2Display=function(e,t){if(void 0!==this.datasSortedField&&void 0!==this.datasSortedField.datasFieldNb){var i=e[this.datasSortedField.datasFieldNb],r=this.datasSortedField.order;if(void 0!==this.getSortingFunctionForField(this.datasSortedField.datasFieldNb)){var n=this.getSortingFunctionForField(this.datasSortedField.datasFieldNb);t.sort((function(e,t){return n.sort(e[i],t[i],r)}))}else t.sort((function(e,t){return v({order:r})(e[i],t[i])}))}var s=0;void 0!==this.pagination&&void 0!==this.pagination.selectedValue&&void 0!==this.pagination.pages&&void 0!==this.pagination.pages.selectedValue&&(s=this.pagination.selectedValue*(this.pagination.pages.selectedValue-1));var a=void 0!==this.pagination&&void 0!==this.pagination.selectedValue?this.pagination.selectedValue:t.length+1,o=[],l=0,d=0;for(var u in t){var c=!0;if(0!==this.datasSelectors.length)for(var h=0;void 0!==this.datasSelectors[h]&&!0===c;)c=this.datasSelectors[h].dataIsOk(t[u]),h++;c&&d>=s&&l<a?(o.push(t[u]),l++,d++):c&&d++}return void 0!==this._datasCounter&&void 0!==this._datasCounter.displayElement&&(this._datasCounter.value=d,this._datasCounter.displayElement.eltDOM.innerHTML=""+d),void 0!==this.pagination&&this.pagination.creaPageSelector(d),this.datasRender.rend2HTML(o)},e}();t=function(){var e,t,i,r,s,o,l,u,h,f,p,g;return function(e,t){var i,r,n,s,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,r&&(n=2&s[0]?r.return:s[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,s[1])).done)return n;switch(r=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((n=(n=a.trys).length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]<n[3])){a.label=s[1];break}if(6===s[0]&&a.label<n[1]){a.label=n[1],n=s;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(s);break}n[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{i=n=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}}(this,(function(v){switch(v.label){case 0:return v.trys.push([0,3,,4]),e=function(e,t,i){void 0===i&&(i="asc");var r=["> 100000","> 1 et < 100 000","≤ 1","Traces","Inexistant"];return"desc"===i&&r.reverse(),r.indexOf(e)>r.indexOf(t)?-1:r.indexOf(e)<r.indexOf(t)?1:0},(t=new m).datasViewElt={id:"datas"},t.datasSourceUrl="http://localhost:8080/datas/elements-chimiques.csv",[4,t.parse()];case 1:return v.sent(),t.datasSortingFunctions=[{datasFieldNb:4,sort:e}],i=new n(t),window.innerWidth<800?(i.settings={allBegining:"<h4>Affichage petits écrans !</h4>",allEnding:"",linesBegining:"<ul>",linesEnding:"</ul>",lineBegining:"<li><ul>",lineEnding:"</ul></li>",dataDisplaying:"<li><b>#FIELDNAME :</b> #VALUE</li>"},t.datasRender=i):(i.settings.allBegining="<table class='table-hover'>",t.datasRender=i),(r=new a(t,{id:"pages"},"Page à afficher :")).options={displayElement:{id:"paginationOptions"},values:[10,20,50,500],name:"Choix de pagination :"},r.selectedValue=10,t.pagination=r,r.rend2HTML(),t.datasCounter={id:"compteur"},[4,t.run()];case 2:return v.sent(),(s=new d(t,3,{id:"filtre1"})).selector2HTML(),(o=new d(t,4,{id:"filtre2"})).selector2HTML(),(l=new d(t,5,{id:"filtre3"})).separator=",",l.selector2HTML(),t.datasSelectors=[s,o,l],window.innerWidth>=800&&((u=new c(t,0)).field2HTML(),(h=new c(t,1)).field2HTML(),(f=new c(t,2)).field2HTML(),(p=new c(t,4)).field2HTML(),t.datasSortingFields=[u,h,f,p]),[3,4];case 3:return g=v.sent(),console.error(g),null!==document.getElementById("datas")&&(document.getElementById("datas").innerHTML="<strong>Désolé, mais un problème technique empêche l'affichage des données.</strong>"),[3,4];case 4:return[2]}}))},new((e=void 0)||(e=Promise))((function(i,r){function n(e){try{a(t.next(e))}catch(e){r(e)}}function s(e){try{a(t.throw(e))}catch(e){r(e)}}function a(t){var r;t.done?i(t.value):(r=t.value,r instanceof e?r:new e((function(e){e(r)}))).then(n,s)}a((t=t.apply(void 0,[])).next())}))})()})(); |