mario-education 2.4.512-feedback → 2.4.512-release

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/dist/index.js CHANGED
@@ -6006,6 +6006,30 @@ var UploadCSVButton = function UploadCSVButton(_ref) {
6006
6006
  }), text));
6007
6007
  };
6008
6008
 
6009
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
6010
+
6011
+ function commonjsRequire () {
6012
+ throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
6013
+ }
6014
+
6015
+ function unwrapExports (x) {
6016
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
6017
+ }
6018
+
6019
+ function createCommonjsModule(fn, module) {
6020
+ return module = { exports: {} }, fn(module, module.exports), module.exports;
6021
+ }
6022
+
6023
+ var papaparse_min = createCommonjsModule(function (module, exports) {
6024
+ /* @license
6025
+ Papa Parse
6026
+ v5.5.2
6027
+ https://github.com/mholt/PapaParse
6028
+ License: MIT
6029
+ */
6030
+ ((e,t)=>{module.exports=t();})(commonjsGlobal,function r(){var n="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n?n:{};var d,s=!n.document&&!!n.postMessage,a=n.IS_PAPA_WORKER||!1,o={},h=0,v={};function u(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=w(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null);this._handle=new i(t),(this._handle.streamer=this)._config=t;}.call(this,e),this.parseChunk=function(t,e){var i=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<i){let e=this._config.newline;e||(r=this._config.quoteChar||'"',e=this._handle.guessLineEndings(t,r)),t=[...t.split(e).slice(i)].join(e);}this.isFirstChunk&&U(this._config.beforeFirstChunk)&&void 0!==(r=this._config.beforeFirstChunk(t))&&(t=r),this.isFirstChunk=!1,this._halted=!1;var i=this._partialLine+t,r=(this._partialLine="",this._handle.parse(i,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){t=r.meta.cursor,i=(this._finished||(this._partialLine=i.substring(t-this._baseIndex),this._baseIndex=t),r&&r.data&&(this._rowCount+=r.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview);if(a)n.postMessage({results:r,workerId:v.WORKER_ID,finished:i});else if(U(this._config.chunk)&&!e){if(this._config.chunk(r,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=r=void 0;}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(r.data),this._completeResults.errors=this._completeResults.errors.concat(r.errors),this._completeResults.meta=r.meta),this._completed||!i||!U(this._config.complete)||r&&r.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),i||r&&r.meta.paused||this._nextChunk(),r}this._halted=!0;},this._sendError=function(e){U(this._config.error)?this._config.error(e):a&&this._config.error&&n.postMessage({workerId:v.WORKER_ID,error:e,finished:!1});};}function f(e){var r;(e=e||{}).chunkSize||(e.chunkSize=v.RemoteChunkSize),u.call(this,e),this._nextChunk=s?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(r=new XMLHttpRequest,this._config.withCredentials&&(r.withCredentials=this._config.withCredentials),s||(r.onload=y(this._chunkLoaded,this),r.onerror=y(this._chunkError,this)),r.open(this._config.downloadRequestBody?"POST":"GET",this._input,!s),this._config.downloadRequestHeaders){var e,t=this._config.downloadRequestHeaders;for(e in t)r.setRequestHeader(e,t[e]);}var i;this._config.chunkSize&&(i=this._start+this._config.chunkSize-1,r.setRequestHeader("Range","bytes="+this._start+"-"+i));try{r.send(this._config.downloadRequestBody);}catch(e){this._chunkError(e.message);}s&&0===r.status&&this._chunkError();}},this._chunkLoaded=function(){4===r.readyState&&(r.status<200||400<=r.status?this._chunkError():(this._start+=this._config.chunkSize||r.responseText.length,this._finished=!this._config.chunkSize||this._start>=(e=>null!==(e=e.getResponseHeader("Content-Range"))?parseInt(e.substring(e.lastIndexOf("/")+1)):-1)(r),this.parseChunk(r.responseText)));},this._chunkError=function(e){e=r.statusText||e;this._sendError(new Error(e));};}function l(e){(e=e||{}).chunkSize||(e.chunkSize=v.LocalChunkSize),u.call(this,e);var i,r,n="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,r=e.slice||e.webkitSlice||e.mozSlice,n?((i=new FileReader).onload=y(this._chunkLoaded,this),i.onerror=y(this._chunkError,this)):i=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,t=(this._config.chunkSize&&(t=Math.min(this._start+this._config.chunkSize,this._input.size),e=r.call(e,this._start,t)),i.readAsText(e,this._config.encoding));n||this._chunkLoaded({target:{result:t}});},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(i.error);};}function c(e){var i;u.call(this,e=e||{}),this.stream=function(e){return i=e,this._nextChunk()},this._nextChunk=function(){var e,t;if(!this._finished)return e=this._config.chunkSize,i=e?(t=i.substring(0,e),i.substring(e)):(t=i,""),this._finished=!i,this.parseChunk(t)};}function p(e){u.call(this,e=e||{});var t=[],i=!0,r=!1;this.pause=function(){u.prototype.pause.apply(this,arguments),this._input.pause();},this.resume=function(){u.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=y(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=y(function(e){this._streamCleanUp(),this._sendError(e);},this),this._streamEnd=y(function(){this._streamCleanUp(),r=!0,this._streamData("");},this),this._streamCleanUp=y(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError);},this);}function i(m){var n,s,a,t,o=Math.pow(2,53),h=-o,u=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,d=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,i=this,r=0,f=0,l=!1,e=!1,c=[],p={data:[],errors:[],meta:{}};function y(e){return "greedy"===m.skipEmptyLines?""===e.join("").trim():1===e.length&&0===e[0].length}function g(){if(p&&a&&(k("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+v.DefaultDelimiter+"'"),a=!1),m.skipEmptyLines&&(p.data=p.data.filter(function(e){return !y(e)})),_()){if(p)if(Array.isArray(p.data[0])){for(var e=0;_()&&e<p.data.length;e++)p.data[e].forEach(t);p.data.splice(0,1);}else p.data.forEach(t);function t(e,t){U(m.transformHeader)&&(e=m.transformHeader(e,t)),c.push(e);}}function i(e,t){for(var i=m.header?{}:[],r=0;r<e.length;r++){var n=r,s=e[r],s=((e,t)=>(e=>(m.dynamicTypingFunction&&void 0===m.dynamicTyping[e]&&(m.dynamicTyping[e]=m.dynamicTypingFunction(e)),!0===(m.dynamicTyping[e]||m.dynamicTyping)))(e)?"true"===t||"TRUE"===t||"false"!==t&&"FALSE"!==t&&((e=>{if(u.test(e)){e=parseFloat(e);if(h<e&&e<o)return 1}})(t)?parseFloat(t):d.test(t)?new Date(t):""===t?null:t):t)(n=m.header?r>=c.length?"__parsed_extra":c[r]:n,s=m.transform?m.transform(s,n):s);"__parsed_extra"===n?(i[n]=i[n]||[],i[n].push(s)):i[n]=s;}return m.header&&(r>c.length?k("FieldMismatch","TooManyFields","Too many fields: expected "+c.length+" fields but parsed "+r,f+t):r<c.length&&k("FieldMismatch","TooFewFields","Too few fields: expected "+c.length+" fields but parsed "+r,f+t)),i}var r;p&&(m.header||m.dynamicTyping||m.transform)&&(r=1,!p.data.length||Array.isArray(p.data[0])?(p.data=p.data.map(i),r=p.data.length):p.data=i(p.data,0),m.header&&p.meta&&(p.meta.fields=c),f+=r);}function _(){return m.header&&0===c.length}function k(e,t,i,r){e={type:e,code:t,message:i};void 0!==r&&(e.row=r),p.errors.push(e);}U(m.step)&&(t=m.step,m.step=function(e){p=e,_()?g():(g(),0!==p.data.length&&(r+=e.data.length,m.preview&&r>m.preview?s.abort():(p.data=p.data[0],t(p,i))));}),this.parse=function(e,t,i){var r=m.quoteChar||'"',r=(m.newline||(m.newline=this.guessLineEndings(e,r)),a=!1,m.delimiter?U(m.delimiter)&&(m.delimiter=m.delimiter(e),p.meta.delimiter=m.delimiter):((r=((e,t,i,r,n)=>{var s,a,o,h;n=n||[",","\t","|",";",v.RECORD_SEP,v.UNIT_SEP];for(var u=0;u<n.length;u++){for(var d,f=n[u],l=0,c=0,p=0,g=(o=void 0,new E({comments:r,delimiter:f,newline:t,preview:10}).parse(e)),_=0;_<g.data.length;_++)i&&y(g.data[_])?p++:(d=g.data[_].length,c+=d,void 0===o?o=d:0<d&&(l+=Math.abs(d-o),o=d));0<g.data.length&&(c/=g.data.length-p),(void 0===a||l<=a)&&(void 0===h||h<c)&&1.99<c&&(a=l,s=f,h=c);}return {successful:!!(m.delimiter=s),bestDelimiter:s}})(e,m.newline,m.skipEmptyLines,m.comments,m.delimitersToGuess)).successful?m.delimiter=r.bestDelimiter:(a=!0,m.delimiter=v.DefaultDelimiter),p.meta.delimiter=m.delimiter),w(m));return m.preview&&m.header&&r.preview++,n=e,s=new E(r),p=s.parse(n,t,i),g(),l?{meta:{paused:!0}}:p||{meta:{paused:!1}}},this.paused=function(){return l},this.pause=function(){l=!0,s.abort(),n=U(m.chunk)?"":n.substring(s.getCharIndex());},this.resume=function(){i.streamer._halted?(l=!1,i.streamer.parseChunk(n,!0)):setTimeout(i.resume,3);},this.aborted=function(){return e},this.abort=function(){e=!0,s.abort(),p.meta.aborted=!0,U(m.complete)&&m.complete(p),n="";},this.guessLineEndings=function(e,t){e=e.substring(0,1048576);var t=new RegExp(P(t)+"([^]*?)"+P(t),"gm"),i=(e=e.replace(t,"")).split("\r"),t=e.split("\n"),e=1<t.length&&t[0].length<i[0].length;if(1===i.length||e)return "\n";for(var r=0,n=0;n<i.length;n++)"\n"===i[n][0]&&r++;return r>=i.length/2?"\r\n":"\r"};}function P(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function E(C){var S=(C=C||{}).delimiter,O=C.newline,x=C.comments,I=C.step,A=C.preview,T=C.fastMode,D=null,L=!1,F=null==C.quoteChar?'"':C.quoteChar,j=F;if(void 0!==C.escapeChar&&(j=C.escapeChar),("string"!=typeof S||-1<v.BAD_DELIMITERS.indexOf(S))&&(S=","),x===S)throw new Error("Comment character same as delimiter");!0===x?x="#":("string"!=typeof x||-1<v.BAD_DELIMITERS.indexOf(x))&&(x=!1),"\n"!==O&&"\r"!==O&&"\r\n"!==O&&(O="\n");var z=0,M=!1;this.parse=function(i,t,r){if("string"!=typeof i)throw new Error("Input must be a string");var n=i.length,e=S.length,s=O.length,a=x.length,o=U(I),h=[],u=[],d=[],f=z=0;if(!i)return b();if(T||!1!==T&&-1===i.indexOf(F)){for(var l=i.split(O),c=0;c<l.length;c++){if(d=l[c],z+=d.length,c!==l.length-1)z+=O.length;else if(r)return b();if(!x||d.substring(0,a)!==x){if(o){if(h=[],k(d.split(S)),R(),M)return b()}else k(d.split(S));if(A&&A<=c)return h=h.slice(0,A),b(!0)}}return b()}for(var p=i.indexOf(S,z),g=i.indexOf(O,z),_=new RegExp(P(j)+P(F),"g"),m=i.indexOf(F,z);;)if(i[z]===F)for(m=z,z++;;){if(-1===(m=i.indexOf(F,m+1)))return r||u.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:h.length,index:z}),E();if(m===n-1)return E(i.substring(z,m).replace(_,F));if(F===j&&i[m+1]===j)m++;else if(F===j||0===m||i[m-1]!==j){-1!==p&&p<m+1&&(p=i.indexOf(S,m+1));var y=v(-1===(g=-1!==g&&g<m+1?i.indexOf(O,m+1):g)?p:Math.min(p,g));if(i.substr(m+1+y,e)===S){d.push(i.substring(z,m).replace(_,F)),i[z=m+1+y+e]!==F&&(m=i.indexOf(F,z)),p=i.indexOf(S,z),g=i.indexOf(O,z);break}y=v(g);if(i.substring(m+1+y,m+1+y+s)===O){if(d.push(i.substring(z,m).replace(_,F)),w(m+1+y+s),p=i.indexOf(S,z),m=i.indexOf(F,z),o&&(R(),M))return b();if(A&&h.length>=A)return b(!0);break}u.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:h.length,index:z}),m++;}}else if(x&&0===d.length&&i.substring(z,z+a)===x){if(-1===g)return b();z=g+s,g=i.indexOf(O,z),p=i.indexOf(S,z);}else if(-1!==p&&(p<g||-1===g))d.push(i.substring(z,p)),z=p+e,p=i.indexOf(S,z);else {if(-1===g)break;if(d.push(i.substring(z,g)),w(g+s),o&&(R(),M))return b();if(A&&h.length>=A)return b(!0)}return E();function k(e){h.push(e),f=z;}function v(e){var t=0;return t=-1!==e&&(e=i.substring(m+1,e))&&""===e.trim()?e.length:t}function E(e){return r||(void 0===e&&(e=i.substring(z)),d.push(e),z=n,k(d),o&&R()),b()}function w(e){z=e,k(d),d=[],g=i.indexOf(O,z);}function b(e){if(C.header&&!t&&h.length&&!L){var s=h[0],a={},o=new Set(s);let n=!1;for(let r=0;r<s.length;r++){let i=s[r];if(a[i=U(C.transformHeader)?C.transformHeader(i,r):i]){let e,t=a[i];for(;e=i+"_"+t,t++,o.has(e););o.add(e),s[r]=e,a[i]++,n=!0,(D=null===D?{}:D)[e]=i;}else a[i]=1,s[r]=i;o.add(i);}n&&console.warn("Duplicate headers found and renamed."),L=!0;}return {data:h,errors:u,meta:{delimiter:S,linebreak:O,aborted:M,truncated:!!e,cursor:f+(t||0),renamedHeaders:D}}}function R(){I(b()),h=[],u=[];}},this.abort=function(){M=!0;},this.getCharIndex=function(){return z};}function g(e){var t=e.data,i=o[t.workerId],r=!1;if(t.error)i.userError(t.error,t.file);else if(t.results&&t.results.data){var n={abort:function(){r=!0,_(t.workerId,{data:[],errors:[],meta:{aborted:!0}});},pause:m,resume:m};if(U(i.userStep)){for(var s=0;s<t.results.data.length&&(i.userStep({data:t.results.data[s],errors:t.results.errors,meta:t.results.meta},n),!r);s++);delete t.results;}else U(i.userChunk)&&(i.userChunk(t.results,n,t.file),delete t.results);}t.finished&&!r&&_(t.workerId,t.results);}function _(e,t){var i=o[e];U(i.userComplete)&&i.userComplete(t),i.terminate(),delete o[e];}function m(){throw new Error("Not implemented.")}function w(e){if("object"!=typeof e||null===e)return e;var t,i=Array.isArray(e)?[]:{};for(t in e)i[t]=w(e[t]);return i}function y(e,t){return function(){e.apply(t,arguments);}}function U(e){return "function"==typeof e}return v.parse=function(e,t){var i=(t=t||{}).dynamicTyping||!1;U(i)&&(t.dynamicTypingFunction=i,i={});if(t.dynamicTyping=i,t.transform=!!U(t.transform)&&t.transform,!t.worker||!v.WORKERS_SUPPORTED)return i=null,"string"==typeof e?(e=(e=>65279!==e.charCodeAt(0)?e:e.slice(1))(e),i=new(t.download?f:c)(t)):!0===e.readable&&U(e.read)&&U(e.on)?i=new p(t):(n.File&&e instanceof File||e instanceof Object)&&(i=new l(t)),i.stream(e);(i=(()=>{var e;return !!v.WORKERS_SUPPORTED&&(e=(()=>{var e=n.URL||n.webkitURL||null,t=r.toString();return v.BLOB_URL||(v.BLOB_URL=e.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; ","(",t,")();"],{type:"text/javascript"})))})(),(e=new n.Worker(e)).onmessage=g,e.id=h++,o[e.id]=e)})()).userStep=t.step,i.userChunk=t.chunk,i.userComplete=t.complete,i.userError=t.error,t.step=U(t.step),t.chunk=U(t.chunk),t.complete=U(t.complete),t.error=U(t.error),delete t.worker,i.postMessage({input:e,config:t,workerId:i.id});},v.unparse=function(e,t){var n=!1,_=!0,m=",",y="\r\n",s='"',a=s+s,i=!1,r=null,o=!1,h=((()=>{if("object"==typeof t){if("string"!=typeof t.delimiter||v.BAD_DELIMITERS.filter(function(e){return -1!==t.delimiter.indexOf(e)}).length||(m=t.delimiter),"boolean"!=typeof t.quotes&&"function"!=typeof t.quotes&&!Array.isArray(t.quotes)||(n=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(i=t.skipEmptyLines),"string"==typeof t.newline&&(y=t.newline),"string"==typeof t.quoteChar&&(s=t.quoteChar),"boolean"==typeof t.header&&(_=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");r=t.columns;}void 0!==t.escapeChar&&(a=t.escapeChar+s),t.escapeFormulae instanceof RegExp?o=t.escapeFormulae:"boolean"==typeof t.escapeFormulae&&t.escapeFormulae&&(o=/^[=+\-@\t\r].*$/);}})(),new RegExp(P(s),"g"));"string"==typeof e&&(e=JSON.parse(e));if(Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return u(null,e,i);if("object"==typeof e[0])return u(r||Object.keys(e[0]),e,i)}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||r),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])),u(e.fields||[],e.data||[],i);throw new Error("Unable to serialize unrecognized input");function u(e,t,i){var r="",n=("string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e)&&0<e.length),s=!Array.isArray(t[0]);if(n&&_){for(var a=0;a<e.length;a++)0<a&&(r+=m),r+=k(e[a],a);0<t.length&&(r+=y);}for(var o=0;o<t.length;o++){var h=(n?e:t[o]).length,u=!1,d=n?0===Object.keys(t[o]).length:0===t[o].length;if(i&&!n&&(u="greedy"===i?""===t[o].join("").trim():1===t[o].length&&0===t[o][0].length),"greedy"===i&&n){for(var f=[],l=0;l<h;l++){var c=s?e[l]:l;f.push(t[o][c]);}u=""===f.join("").trim();}if(!u){for(var p=0;p<h;p++){0<p&&!d&&(r+=m);var g=n&&s?e[p]:p;r+=k(t[o][g],p);}o<t.length-1&&(!i||0<h&&!d)&&(r+=y);}}return r}function k(e,t){var i,r;return null==e?"":e.constructor===Date?JSON.stringify(e).slice(1,25):(r=!1,o&&"string"==typeof e&&o.test(e)&&(e="'"+e,r=!0),i=e.toString().replace(h,a),(r=r||!0===n||"function"==typeof n&&n(e,t)||Array.isArray(n)&&n[t]||((e,t)=>{for(var i=0;i<t.length;i++)if(-1<e.indexOf(t[i]))return !0;return !1})(i,v.BAD_DELIMITERS)||-1<i.indexOf(m)||" "===i.charAt(0)||" "===i.charAt(i.length-1))?s+i+s:i)}},v.RECORD_SEP=String.fromCharCode(30),v.UNIT_SEP=String.fromCharCode(31),v.BYTE_ORDER_MARK="\ufeff",v.BAD_DELIMITERS=["\r","\n",'"',v.BYTE_ORDER_MARK],v.WORKERS_SUPPORTED=!s&&!!n.Worker,v.NODE_STREAM_INPUT=1,v.LocalChunkSize=10485760,v.RemoteChunkSize=5242880,v.DefaultDelimiter=",",v.Parser=E,v.ParserHandle=i,v.NetworkStreamer=f,v.FileStreamer=l,v.StringStreamer=c,v.ReadableStreamStreamer=p,n.jQuery&&((d=n.jQuery).fn.parse=function(o){var i=o.config||{},h=[];return this.each(function(e){if(!("INPUT"===d(this).prop("tagName").toUpperCase()&&"file"===d(this).attr("type").toLowerCase()&&n.FileReader)||!this.files||0===this.files.length)return !0;for(var t=0;t<this.files.length;t++)h.push({file:this.files[t],inputElem:this,instanceConfig:d.extend({},i)});}),e(),this;function e(){if(0===h.length)U(o.complete)&&o.complete();else {var e,t,i,r,n=h[0];if(U(o.before)){var s=o.before(n.file,n.inputElem);if("object"==typeof s){if("abort"===s.action)return e="AbortError",t=n.file,i=n.inputElem,r=s.reason,void(U(o.error)&&o.error({name:e},t,i,r));if("skip"===s.action)return void u();"object"==typeof s.config&&(n.instanceConfig=d.extend(n.instanceConfig,s.config));}else if("skip"===s)return void u()}var a=n.instanceConfig.complete;n.instanceConfig.complete=function(e){U(a)&&a(e,n.file,n.inputElem),u();},v.parse(n.file,n.instanceConfig);}}function u(){h.splice(0,1),e();}}),a&&(n.onmessage=function(e){e=e.data;void 0===v.WORKER_ID&&e&&(v.WORKER_ID=e.workerId);"string"==typeof e.input?n.postMessage({workerId:v.WORKER_ID,results:v.parse(e.input,e.config),finished:!0}):(n.File&&e.input instanceof File||e.input instanceof Object)&&(e=v.parse(e.input,e.config))&&n.postMessage({workerId:v.WORKER_ID,results:e,finished:!0});}),(f.prototype=Object.create(u.prototype)).constructor=f,(l.prototype=Object.create(u.prototype)).constructor=l,(c.prototype=Object.create(c.prototype)).constructor=c,(p.prototype=Object.create(u.prototype)).constructor=p,v});
6031
+ });
6032
+
6009
6033
  var CSV_FILE_URL = marioCore.BASE_URL + "/api/ImportCsv/csv";
6010
6034
  var CSV_FILE_TEACHER = marioCore.BASE_URL + "/api/Teacher";
6011
6035
  var importCSV = function importCSV(formData, subFolder) {
@@ -6018,9 +6042,7 @@ var importStudentByTeacher = function importStudentByTeacher(teacherId, formData
6018
6042
  return marioCore.apiUpload.post(CSV_FILE_TEACHER + "/adminImportStudentByTeacherId/" + teacherId, formData);
6019
6043
  };
6020
6044
  var importUsersCSV = function importUsersCSV(formData) {
6021
- return marioCore.apiUpload.post(CSV_FILE_TEACHER + "/adminImport", formData, {
6022
- timeout: 400000
6023
- });
6045
+ return marioCore.apiUpload.post(CSV_FILE_TEACHER + "/adminImport", formData);
6024
6046
  };
6025
6047
  var downloadTemplateFileUser = function downloadTemplateFileUser() {
6026
6048
  return marioCore.api.get(CSV_FILE_TEACHER + "/download-template-file-user");
@@ -6137,7 +6159,10 @@ var useCSVImport = function useCSVImport() {
6137
6159
 
6138
6160
  var upload = React.useCallback(function (file) {
6139
6161
  try {
6140
- var _temp11 = function _temp11() {
6162
+ var _exit2 = false;
6163
+
6164
+ var _temp12 = function _temp12(_result2) {
6165
+ if (_exit2) return _result2;
6141
6166
  dispatch(marioCore.setLoading(false));
6142
6167
  var inputId = document.getElementById(id);
6143
6168
  var input = document.getElementById('import-student');
@@ -6150,8 +6175,9 @@ var useCSVImport = function useCSVImport() {
6150
6175
  if (!type || !file) return Promise.resolve();
6151
6176
  dispatch(marioCore.setLoading(true));
6152
6177
 
6153
- var _temp12 = _catch(function () {
6154
- function _temp8() {
6178
+ var _temp13 = _catch(function () {
6179
+ function _temp9(_result) {
6180
+ if (_exit2) return _result;
6155
6181
  dispatch(marioCore.setAlert({
6156
6182
  type: "success",
6157
6183
  message: "Import CSV successfully"
@@ -6161,29 +6187,71 @@ var useCSVImport = function useCSVImport() {
6161
6187
  var formData = new FormData();
6162
6188
  formData.append("file", file, file.name);
6163
6189
 
6164
- var _temp7 = function () {
6190
+ var _temp8 = function () {
6165
6191
  if (type == CSVType.AllUser) {
6166
- return Promise.resolve(importUsersCSV(formData)).then(function () {});
6192
+ return Promise.resolve(file.text()).then(function (fileTextRaw) {
6193
+ var fileText = fileTextRaw.trim();
6194
+ var rows = fileText.split("\n").map(function (row) {
6195
+ return row.trim();
6196
+ });
6197
+ var headerIndex = rows.findIndex(function (row) {
6198
+ return row.split(",").includes("FirstName");
6199
+ });
6200
+
6201
+ if (headerIndex === 0) {
6202
+ throw new Error("Invalid CSV: Missing header row.");
6203
+ }
6204
+
6205
+ fileText = rows.slice(headerIndex).join("\n");
6206
+ var parsedData = papaparse_min.parse(fileText, {
6207
+ header: true,
6208
+ skipEmptyLines: true
6209
+ });
6210
+ var header = parsedData.meta.fields;
6211
+ var dataRows = parsedData.data;
6212
+ var chunkSize = 20;
6213
+ var chunks = [];
6214
+
6215
+ for (var _i = 0; _i < dataRows.length; _i += chunkSize) {
6216
+ var chunkData = dataRows.slice(_i, _i + chunkSize);
6217
+ var csvChunk = papaparse_min.unparse({
6218
+ fields: header,
6219
+ data: chunkData
6220
+ });
6221
+ chunks.push(csvChunk);
6222
+ }
6223
+
6224
+ var _temp5 = _forTo(chunks, function (i) {
6225
+ var blob = new Blob([chunks[i]], {
6226
+ type: "text/csv"
6227
+ });
6228
+ var formData = new FormData();
6229
+ formData.append("file", blob, "students_chunk" + (i + 1) + ".csv");
6230
+ return Promise.resolve(importUsersCSV(formData)).then(function () {});
6231
+ });
6232
+
6233
+ if (_temp5 && _temp5.then) return _temp5.then(function () {});
6234
+ });
6167
6235
  } else {
6168
- var _temp13 = function () {
6236
+ var _temp14 = function () {
6169
6237
  if (isCheckDomainIBS) {
6170
- var _temp14 = function () {
6238
+ var _temp15 = function () {
6171
6239
  if (type == CSVType.ClassReflection) {
6172
6240
  return Promise.resolve(importClassReflectionCSV(formData)).then(function () {});
6173
6241
  }
6174
6242
  }();
6175
6243
 
6176
- if (_temp14 && _temp14.then) return _temp14.then(function () {});
6244
+ if (_temp15 && _temp15.then) return _temp15.then(function () {});
6177
6245
  } else {
6178
6246
  return Promise.resolve(importCSV(formData, type.toString())).then(function () {});
6179
6247
  }
6180
6248
  }();
6181
6249
 
6182
- if (_temp13 && _temp13.then) return _temp13.then(function () {});
6250
+ if (_temp14 && _temp14.then) return _temp14.then(function () {});
6183
6251
  }
6184
6252
  }();
6185
6253
 
6186
- return _temp7 && _temp7.then ? _temp7.then(_temp8) : _temp8(_temp7);
6254
+ return _temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8);
6187
6255
  }, function (err) {
6188
6256
  var _err$response, _err$response$data;
6189
6257
 
@@ -6193,7 +6261,7 @@ var useCSVImport = function useCSVImport() {
6193
6261
  }));
6194
6262
  });
6195
6263
 
6196
- return Promise.resolve(_temp12 && _temp12.then ? _temp12.then(_temp11) : _temp11(_temp12));
6264
+ return Promise.resolve(_temp13 && _temp13.then ? _temp13.then(_temp12) : _temp12(_temp13));
6197
6265
  } catch (e) {
6198
6266
  return Promise.reject(e);
6199
6267
  }
@@ -6201,7 +6269,7 @@ var useCSVImport = function useCSVImport() {
6201
6269
 
6202
6270
  var uploadByTeacherId = function uploadByTeacherId(file) {
6203
6271
  try {
6204
- var _temp17 = function _temp17() {
6272
+ var _temp18 = function _temp18() {
6205
6273
  dispatch(marioCore.setLoading(false));
6206
6274
  var input = document.getElementById('teacherSelector');
6207
6275
  input && (input.value = "");
@@ -6218,7 +6286,7 @@ var useCSVImport = function useCSVImport() {
6218
6286
  if (!type || !file) return Promise.resolve();
6219
6287
  dispatch(marioCore.setLoading(true));
6220
6288
 
6221
- var _temp18 = _catch(function () {
6289
+ var _temp19 = _catch(function () {
6222
6290
  var formData = new FormData();
6223
6291
  formData.append("file", file, file.name);
6224
6292
  return Promise.resolve(importStudentByTeacher(defaultTeacher, formData)).then(function () {
@@ -6236,7 +6304,7 @@ var useCSVImport = function useCSVImport() {
6236
6304
  }));
6237
6305
  });
6238
6306
 
6239
- return Promise.resolve(_temp18 && _temp18.then ? _temp18.then(_temp17) : _temp17(_temp18));
6307
+ return Promise.resolve(_temp19 && _temp19.then ? _temp19.then(_temp18) : _temp18(_temp19));
6240
6308
  } catch (e) {
6241
6309
  return Promise.reject(e);
6242
6310
  }
@@ -6244,7 +6312,7 @@ var useCSVImport = function useCSVImport() {
6244
6312
 
6245
6313
  var onConfirm = function onConfirm(values) {
6246
6314
  try {
6247
- var _temp21 = function _temp21() {
6315
+ var _temp22 = function _temp22() {
6248
6316
  dispatch(marioCore.setLoading(false));
6249
6317
  var input = document.getElementById(id);
6250
6318
  input && (input.value = "");
@@ -6253,7 +6321,7 @@ var useCSVImport = function useCSVImport() {
6253
6321
  if (!dataFile || !dataFile) return Promise.resolve();
6254
6322
  dispatch(marioCore.setLoading(true));
6255
6323
 
6256
- var _temp22 = _catch(function () {
6324
+ var _temp23 = _catch(function () {
6257
6325
  var formData = new FormData();
6258
6326
  formData.append("file", dataFile, dataFile.name);
6259
6327
  formData.append("teacherName", values.teacherName);
@@ -6277,7 +6345,7 @@ var useCSVImport = function useCSVImport() {
6277
6345
  }));
6278
6346
  });
6279
6347
 
6280
- return Promise.resolve(_temp22 && _temp22.then ? _temp22.then(_temp21) : _temp21(_temp22));
6348
+ return Promise.resolve(_temp23 && _temp23.then ? _temp23.then(_temp22) : _temp22(_temp23));
6281
6349
  } catch (e) {
6282
6350
  return Promise.reject(e);
6283
6351
  }
@@ -18483,20 +18551,6 @@ var QuestionBankContainer = function QuestionBankContainer() {
18483
18551
  });
18484
18552
  };
18485
18553
 
18486
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
18487
-
18488
- function commonjsRequire () {
18489
- throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
18490
- }
18491
-
18492
- function unwrapExports (x) {
18493
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
18494
- }
18495
-
18496
- function createCommonjsModule(fn, module) {
18497
- return module = { exports: {} }, fn(module, module.exports), module.exports;
18498
- }
18499
-
18500
18554
  var objectWithoutPropertiesLoose = createCommonjsModule(function (module) {
18501
18555
  function _objectWithoutPropertiesLoose(source, excluded) {
18502
18556
  if (source == null) return {};
@@ -75457,7 +75511,7 @@ var useHeaderSideBar = function useHeaderSideBar(_navigations) {
75457
75511
  name: "External Api",
75458
75512
  icon: React__default.createElement(TokenIcon, null)
75459
75513
  }, {
75460
- name: "MarioAi",
75514
+ name: "MarioAI",
75461
75515
  icon: React__default.createElement("img", {
75462
75516
  src: "/images/mario-ai.png"
75463
75517
  })
@@ -75863,7 +75917,7 @@ var TimesIcon = function TimesIcon(_ref) {
75863
75917
  };
75864
75918
 
75865
75919
  var HeaderSideBar = function HeaderSideBar(_ref) {
75866
- var _handleUserRole, _navigations$filters, _clsx;
75920
+ var _handleUserRole, _navigations$filter, _clsx;
75867
75921
 
75868
75922
  var children = _ref.children,
75869
75923
  navigations = _ref.navigations,
@@ -76027,11 +76081,11 @@ var HeaderSideBar = function HeaderSideBar(_ref) {
76027
76081
  paddingTop: 0,
76028
76082
  paddingBottom: 50
76029
76083
  }
76030
- }, !!navigations && (navigations === null || navigations === void 0 ? void 0 : (_navigations$filters = navigations.filters(function (r) {
76084
+ }, !!navigations && (navigations === null || navigations === void 0 ? void 0 : (_navigations$filter = navigations.filter(function (r) {
76031
76085
  var _r$name;
76032
76086
 
76033
- return !isEnableMarioAi ? !((_r$name = r.name) !== null && _r$name !== void 0 && _r$name.includes('MarioAi')) : true;
76034
- })) === null || _navigations$filters === void 0 ? void 0 : _navigations$filters.map(function (navigation) {
76087
+ return !isEnableMarioAi ? !((_r$name = r.name) !== null && _r$name !== void 0 && _r$name.includes('MarioAI')) : true;
76088
+ })) === null || _navigations$filter === void 0 ? void 0 : _navigations$filter.map(function (navigation) {
76035
76089
  return renderNavigationItem(navigation);
76036
76090
  })))))), React__default.createElement("main", {
76037
76091
  className: clsx(classes.content, (_clsx = {}, _clsx[classes.contentShift] = isReadOnly ? false : isOpenSideBar, _clsx))