phaser3-rex-plugins
Version:
10 lines • 69.9 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).rexquestplugin=e();}(undefined,(function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(r=i.key,o=void 0,"symbol"==typeof(o=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return ("string"===e?String:Number)(t)}(r,"string"))?o:String(o)),i);}var r,o;}function i(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function r(t){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},r(t)}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function s(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if("function"==typeof Proxy)return !0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return !1}}();return function(){var n,i=r(t);if(e){var o=r(this).constructor;n=Reflect.construct(i,arguments,o);}else n=i.apply(this,arguments);return s(this,n)}}var u={setEventEmitter:function(t,e){return void 0===e&&(e=Phaser.Events.EventEmitter),this._privateEE=!0===t||void 0===t,this._eventEmitter=this._privateEE?new e:t,this},destroyEventEmitter:function(){return this._eventEmitter&&this._privateEE&&this._eventEmitter.shutdown(),this},getEventEmitter:function(){return this._eventEmitter},on:function(){return this._eventEmitter&&this._eventEmitter.on.apply(this._eventEmitter,arguments),this},once:function(){return this._eventEmitter&&this._eventEmitter.once.apply(this._eventEmitter,arguments),this},off:function(){return this._eventEmitter&&this._eventEmitter.off.apply(this._eventEmitter,arguments),this},emit:function(t){return this._eventEmitter&&t&&this._eventEmitter.emit.apply(this._eventEmitter,arguments),this},addListener:function(){return this._eventEmitter&&this._eventEmitter.addListener.apply(this._eventEmitter,arguments),this},removeListener:function(){return this._eventEmitter&&this._eventEmitter.removeListener.apply(this._eventEmitter,arguments),this},removeAllListeners:function(){return this._eventEmitter&&this._eventEmitter.removeAllListeners.apply(this._eventEmitter,arguments),this},listenerCount:function(){return this._eventEmitter?this._eventEmitter.listenerCount.apply(this._eventEmitter,arguments):0},listeners:function(){return this._eventEmitter?this._eventEmitter.listeners.apply(this._eventEmitter,arguments):[]},eventNames:function(){return this._eventEmitter?this._eventEmitter.eventNames.apply(this._eventEmitter,arguments):[]}},l=function(t,e,n){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(-1!==e.indexOf(".")){for(var i=e.split("."),r=t,o=n,s=0;s<i.length;s++){if(!r.hasOwnProperty(i[s])){o=n;break}o=r[i[s]],r=r[i[s]];}return o}return n}return n};
function c(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var f={exports:{}};
/* @license
Papa Parse
v5.4.1
https://github.com/mholt/PapaParse
License: MIT
*/!function(t,e){t.exports=function t(){var e="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:{},n=!e.document&&!!e.postMessage,i=e.IS_PAPA_WORKER||!1,r={},o=0,s={parse:function(n,i){var a=(i=i||{}).dynamicTyping||!1;if(k(a)&&(i.dynamicTypingFunction=a,a={}),i.dynamicTyping=a,i.transform=!!k(i.transform)&&i.transform,i.worker&&s.WORKERS_SUPPORTED){var u=function(){if(!s.WORKERS_SUPPORTED)return !1;var n,i,a=(n=e.URL||e.webkitURL||null,i=t.toString(),s.BLOB_URL||(s.BLOB_URL=n.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; ","(",i,")();"],{type:"text/javascript"})))),u=new e.Worker(a);return u.onmessage=m,u.id=o++,r[u.id]=u}();return u.userStep=i.step,u.userChunk=i.chunk,u.userComplete=i.complete,u.userError=i.error,i.step=k(i.step),i.chunk=k(i.chunk),i.complete=k(i.complete),i.error=k(i.error),delete i.worker,void u.postMessage({input:n,config:i,workerId:u.id})}var p=null;return s.NODE_STREAM_INPUT,"string"==typeof n?(n=function(t){return 65279===t.charCodeAt(0)?t.slice(1):t}(n),p=i.download?new l(i):new f(i)):!0===n.readable&&k(n.read)&&k(n.on)?p=new h(i):(e.File&&n instanceof File||n instanceof Object)&&(p=new c(i)),p.stream(n)},unparse:function(t,e){var n=!1,i=!0,r=",",o="\r\n",a='"',u=a+a,l=!1,c=null,f=!1;!function(){if("object"==typeof e){if("string"!=typeof e.delimiter||s.BAD_DELIMITERS.filter((function(t){return -1!==e.delimiter.indexOf(t)})).length||(r=e.delimiter),("boolean"==typeof e.quotes||"function"==typeof e.quotes||Array.isArray(e.quotes))&&(n=e.quotes),"boolean"!=typeof e.skipEmptyLines&&"string"!=typeof e.skipEmptyLines||(l=e.skipEmptyLines),"string"==typeof e.newline&&(o=e.newline),"string"==typeof e.quoteChar&&(a=e.quoteChar),"boolean"==typeof e.header&&(i=e.header),Array.isArray(e.columns)){if(0===e.columns.length)throw new Error("Option columns is empty");c=e.columns;}void 0!==e.escapeChar&&(u=e.escapeChar+a),("boolean"==typeof e.escapeFormulae||e.escapeFormulae instanceof RegExp)&&(f=e.escapeFormulae instanceof RegExp?e.escapeFormulae:/^[=+\-@\t\r].*$/);}}();var h=new RegExp(d(a),"g");if("string"==typeof t&&(t=JSON.parse(t)),Array.isArray(t)){if(!t.length||Array.isArray(t[0]))return p(null,t,l);if("object"==typeof t[0])return p(c||Object.keys(t[0]),t,l)}else if("object"==typeof t)return "string"==typeof t.data&&(t.data=JSON.parse(t.data)),Array.isArray(t.data)&&(t.fields||(t.fields=t.meta&&t.meta.fields||c),t.fields||(t.fields=Array.isArray(t.data[0])?t.fields:"object"==typeof t.data[0]?Object.keys(t.data[0]):[]),Array.isArray(t.data[0])||"object"==typeof t.data[0]||(t.data=[t.data])),p(t.fields||[],t.data||[],l);throw new Error("Unable to serialize unrecognized input");function p(t,e,n){var s="";"string"==typeof t&&(t=JSON.parse(t)),"string"==typeof e&&(e=JSON.parse(e));var a=Array.isArray(t)&&0<t.length,u=!Array.isArray(e[0]);if(a&&i){for(var l=0;l<t.length;l++)0<l&&(s+=r),s+=g(t[l],l);0<e.length&&(s+=o);}for(var c=0;c<e.length;c++){var f=a?t.length:e[c].length,h=!1,p=a?0===Object.keys(e[c]).length:0===e[c].length;if(n&&!a&&(h="greedy"===n?""===e[c].join("").trim():1===e[c].length&&0===e[c][0].length),"greedy"===n&&a){for(var d=[],m=0;m<f;m++){var y=u?t[m]:m;d.push(e[c][y]);}h=""===d.join("").trim();}if(!h){for(var v=0;v<f;v++){0<v&&!p&&(s+=r);var b=a&&u?t[v]:v;s+=g(e[c][b],v);}c<e.length-1&&(!n||0<f&&!p)&&(s+=o);}}return s}function g(t,e){if(null==t)return "";if(t.constructor===Date)return JSON.stringify(t).slice(1,25);var i=!1;f&&"string"==typeof t&&f.test(t)&&(t="'"+t,i=!0);var o=t.toString().replace(h,u);return (i=i||!0===n||"function"==typeof n&&n(t,e)||Array.isArray(n)&&n[e]||function(t,e){for(var n=0;n<e.length;n++)if(-1<t.indexOf(e[n]))return !0;return !1}(o,s.BAD_DELIMITERS)||-1<o.indexOf(r)||" "===o.charAt(0)||" "===o.charAt(o.length-1))?a+o+a:o}}};if(s.RECORD_SEP=String.fromCharCode(30),s.UNIT_SEP=String.fromCharCode(31),s.BYTE_ORDER_MARK="\ufeff",s.BAD_DELIMITERS=["\r","\n",'"',s.BYTE_ORDER_MARK],s.WORKERS_SUPPORTED=!n&&!!e.Worker,s.NODE_STREAM_INPUT=1,s.LocalChunkSize=10485760,s.RemoteChunkSize=5242880,s.DefaultDelimiter=",",s.Parser=g,s.ParserHandle=p,s.NetworkStreamer=l,s.FileStreamer=c,s.StringStreamer=f,s.ReadableStreamStreamer=h,e.jQuery){var a=e.jQuery;a.fn.parse=function(t){var n=t.config||{},i=[];return this.each((function(t){if("INPUT"!==a(this).prop("tagName").toUpperCase()||"file"!==a(this).attr("type").toLowerCase()||!e.FileReader||!this.files||0===this.files.length)return !0;for(var r=0;r<this.files.length;r++)i.push({file:this.files[r],inputElem:this,instanceConfig:a.extend({},n)});})),r(),this;function r(){if(0!==i.length){var e,n,r,u,l=i[0];if(k(t.before)){var c=t.before(l.file,l.inputElem);if("object"==typeof c){if("abort"===c.action)return e="AbortError",n=l.file,r=l.inputElem,u=c.reason,void(k(t.error)&&t.error({name:e},n,r,u));if("skip"===c.action)return void o();"object"==typeof c.config&&(l.instanceConfig=a.extend(l.instanceConfig,c.config));}else if("skip"===c)return void o()}var f=l.instanceConfig.complete;l.instanceConfig.complete=function(t){k(f)&&f(t,l.file,l.inputElem),o();},s.parse(l.file,l.instanceConfig);}else k(t.complete)&&t.complete();}function o(){i.splice(0,1),r();}};}function u(t){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 e=b(t);e.chunkSize=parseInt(e.chunkSize),t.step||t.chunk||(e.chunkSize=null),this._handle=new p(e),(this._handle.streamer=this)._config=e;}.call(this,t),this.parseChunk=function(t,n){if(this.isFirstChunk&&k(this._config.beforeFirstChunk)){var r=this._config.beforeFirstChunk(t);void 0!==r&&(t=r);}this.isFirstChunk=!1,this._halted=!1;var o=this._partialLine+t;this._partialLine="";var a=this._handle.parse(o,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var u=a.meta.cursor;this._finished||(this._partialLine=o.substring(u-this._baseIndex),this._baseIndex=u),a&&a.data&&(this._rowCount+=a.data.length);var l=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(i)e.postMessage({results:a,workerId:s.WORKER_ID,finished:l});else if(k(this._config.chunk)&&!n){if(this._config.chunk(a,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);a=void 0,this._completeResults=void 0;}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(a.data),this._completeResults.errors=this._completeResults.errors.concat(a.errors),this._completeResults.meta=a.meta),this._completed||!l||!k(this._config.complete)||a&&a.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),l||a&&a.meta.paused||this._nextChunk(),a}this._halted=!0;},this._sendError=function(t){k(this._config.error)?this._config.error(t):i&&this._config.error&&e.postMessage({workerId:s.WORKER_ID,error:t,finished:!1});};}function l(t){var e;(t=t||{}).chunkSize||(t.chunkSize=s.RemoteChunkSize),u.call(this,t),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded();}:function(){this._readChunk();},this.stream=function(t){this._input=t,this._nextChunk();},this._readChunk=function(){if(this._finished)this._chunkLoaded();else {if(e=new XMLHttpRequest,this._config.withCredentials&&(e.withCredentials=this._config.withCredentials),n||(e.onload=_(this._chunkLoaded,this),e.onerror=_(this._chunkError,this)),e.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var t=this._config.downloadRequestHeaders;for(var i in t)e.setRequestHeader(i,t[i]);}if(this._config.chunkSize){var r=this._start+this._config.chunkSize-1;e.setRequestHeader("Range","bytes="+this._start+"-"+r);}try{e.send(this._config.downloadRequestBody);}catch(t){this._chunkError(t.message);}n&&0===e.status&&this._chunkError();}},this._chunkLoaded=function(){4===e.readyState&&(e.status<200||400<=e.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:e.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(t){var e=t.getResponseHeader("Content-Range");return null===e?-1:parseInt(e.substring(e.lastIndexOf("/")+1))}(e),this.parseChunk(e.responseText)));},this._chunkError=function(t){var n=e.statusText||t;this._sendError(new Error(n));};}function c(t){var e,n;(t=t||{}).chunkSize||(t.chunkSize=s.LocalChunkSize),u.call(this,t);var i="undefined"!=typeof FileReader;this.stream=function(t){this._input=t,n=t.slice||t.webkitSlice||t.mozSlice,i?((e=new FileReader).onload=_(this._chunkLoaded,this),e.onerror=_(this._chunkError,this)):e=new FileReaderSync,this._nextChunk();},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk();},this._readChunk=function(){var t=this._input;if(this._config.chunkSize){var r=Math.min(this._start+this._config.chunkSize,this._input.size);t=n.call(t,this._start,r);}var o=e.readAsText(t,this._config.encoding);i||this._chunkLoaded({target:{result:o}});},this._chunkLoaded=function(t){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(t.target.result);},this._chunkError=function(){this._sendError(e.error);};}function f(t){var e;u.call(this,t=t||{}),this.stream=function(t){return e=t,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var t,n=this._config.chunkSize;return n?(t=e.substring(0,n),e=e.substring(n)):(t=e,e=""),this._finished=!e,this.parseChunk(t)}};}function h(t){u.call(this,t=t||{});var e=[],n=!0,i=!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(t){this._input=t,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError);},this._checkIsFinished=function(){i&&1===e.length&&(this._finished=!0);},this._nextChunk=function(){this._checkIsFinished(),e.length?this.parseChunk(e.shift()):n=!0;},this._streamData=_((function(t){try{e.push("string"==typeof t?t:t.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(e.shift()));}catch(t){this._streamError(t);}}),this),this._streamError=_((function(t){this._streamCleanUp(),this._sendError(t);}),this),this._streamEnd=_((function(){this._streamCleanUp(),i=!0,this._streamData("");}),this),this._streamCleanUp=_((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError);}),this);}function p(t){var e,n,i,r=Math.pow(2,53),o=-r,a=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,u=/^((\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)))$/,l=this,c=0,f=0,h=!1,p=!1,m=[],y={data:[],errors:[],meta:{}};if(k(t.step)){var v=t.step;t.step=function(e){if(y=e,A())w();else {if(w(),0===y.data.length)return;c+=e.data.length,t.preview&&c>t.preview?n.abort():(y.data=y.data[0],v(y,l));}};}function _(e){return "greedy"===t.skipEmptyLines?""===e.join("").trim():1===e.length&&0===e[0].length}function w(){return y&&i&&(x("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+s.DefaultDelimiter+"'"),i=!1),t.skipEmptyLines&&(y.data=y.data.filter((function(t){return !_(t)}))),A()&&function(){if(y)if(Array.isArray(y.data[0])){for(var e=0;A()&&e<y.data.length;e++)y.data[e].forEach(n);y.data.splice(0,1);}else y.data.forEach(n);function n(e,n){k(t.transformHeader)&&(e=t.transformHeader(e,n)),m.push(e);}}(),function(){if(!y||!t.header&&!t.dynamicTyping&&!t.transform)return y;function e(e,n){var i,r=t.header?{}:[];for(i=0;i<e.length;i++){var o=i,s=e[i];t.header&&(o=i>=m.length?"__parsed_extra":m[i]),t.transform&&(s=t.transform(s,o)),s=E(o,s),"__parsed_extra"===o?(r[o]=r[o]||[],r[o].push(s)):r[o]=s;}return t.header&&(i>m.length?x("FieldMismatch","TooManyFields","Too many fields: expected "+m.length+" fields but parsed "+i,f+n):i<m.length&&x("FieldMismatch","TooFewFields","Too few fields: expected "+m.length+" fields but parsed "+i,f+n)),r}var n=1;return !y.data.length||Array.isArray(y.data[0])?(y.data=y.data.map(e),n=y.data.length):y.data=e(y.data,0),t.header&&y.meta&&(y.meta.fields=m),f+=n,y}()}function A(){return t.header&&0===m.length}function E(e,n){return i=e,t.dynamicTypingFunction&&void 0===t.dynamicTyping[i]&&(t.dynamicTyping[i]=t.dynamicTypingFunction(i)),!0===(t.dynamicTyping[i]||t.dynamicTyping)?"true"===n||"TRUE"===n||"false"!==n&&"FALSE"!==n&&(function(t){if(a.test(t)){var e=parseFloat(t);if(o<e&&e<r)return !0}return !1}(n)?parseFloat(n):u.test(n)?new Date(n):""===n?null:n):n;var i;}function x(t,e,n,i){var r={type:t,code:e,message:n};void 0!==i&&(r.row=i),y.errors.push(r);}this.parse=function(r,o,a){var u=t.quoteChar||'"';if(t.newline||(t.newline=function(t,e){t=t.substring(0,1048576);var n=new RegExp(d(e)+"([^]*?)"+d(e),"gm"),i=(t=t.replace(n,"")).split("\r"),r=t.split("\n"),o=1<r.length&&r[0].length<i[0].length;if(1===i.length||o)return "\n";for(var s=0,a=0;a<i.length;a++)"\n"===i[a][0]&&s++;return s>=i.length/2?"\r\n":"\r"}(r,u)),i=!1,t.delimiter)k(t.delimiter)&&(t.delimiter=t.delimiter(r),y.meta.delimiter=t.delimiter);else {var l=function(e,n,i,r,o){var a,u,l,c;o=o||[",","\t","|",";",s.RECORD_SEP,s.UNIT_SEP];for(var f=0;f<o.length;f++){var h=o[f],p=0,d=0,m=0;l=void 0;for(var y=new g({comments:r,delimiter:h,newline:n,preview:10}).parse(e),v=0;v<y.data.length;v++)if(i&&_(y.data[v]))m++;else {var b=y.data[v].length;d+=b,void 0!==l?0<b&&(p+=Math.abs(b-l),l=b):l=b;}0<y.data.length&&(d/=y.data.length-m),(void 0===u||p<=u)&&(void 0===c||c<d)&&1.99<d&&(u=p,a=h,c=d);}return {successful:!!(t.delimiter=a),bestDelimiter:a}}(r,t.newline,t.skipEmptyLines,t.comments,t.delimitersToGuess);l.successful?t.delimiter=l.bestDelimiter:(i=!0,t.delimiter=s.DefaultDelimiter),y.meta.delimiter=t.delimiter;}var c=b(t);return t.preview&&t.header&&c.preview++,e=r,n=new g(c),y=n.parse(e,o,a),w(),h?{meta:{paused:!0}}:y||{meta:{paused:!1}}},this.paused=function(){return h},this.pause=function(){h=!0,n.abort(),e=k(t.chunk)?"":e.substring(n.getCharIndex());},this.resume=function(){l.streamer._halted?(h=!1,l.streamer.parseChunk(e,!0)):setTimeout(l.resume,3);},this.aborted=function(){return p},this.abort=function(){p=!0,n.abort(),y.meta.aborted=!0,k(t.complete)&&t.complete(y),e="";};}function d(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function g(t){var e,n=(t=t||{}).delimiter,i=t.newline,r=t.comments,o=t.step,a=t.preview,u=t.fastMode,l=e=void 0===t.quoteChar||null===t.quoteChar?'"':t.quoteChar;if(void 0!==t.escapeChar&&(l=t.escapeChar),("string"!=typeof n||-1<s.BAD_DELIMITERS.indexOf(n))&&(n=","),r===n)throw new Error("Comment character same as delimiter");!0===r?r="#":("string"!=typeof r||-1<s.BAD_DELIMITERS.indexOf(r))&&(r=!1),"\n"!==i&&"\r"!==i&&"\r\n"!==i&&(i="\n");var c=0,f=!1;this.parse=function(s,h,p){if("string"!=typeof s)throw new Error("Input must be a string");var g=s.length,m=n.length,y=i.length,v=r.length,b=k(o),_=[],w=[],A=[],E=c=0;if(!s)return Y();if(t.header&&!h){var x=s.split(i)[0].split(n),C=[],O={},S=!1;for(var I in x){var j=x[I];k(t.transformHeader)&&(j=t.transformHeader(j,I));var T=j,R=O[j]||0;for(0<R&&(S=!0,T=j+"_"+R),O[j]=R+1;C.includes(T);)T=T+"_"+R;C.push(T);}if(S){var L=s.split(i);L[0]=C.join(n),s=L.join(i);}}if(u||!1!==u&&-1===s.indexOf(e)){for(var M=s.split(i),q=0;q<M.length;q++){if(A=M[q],c+=A.length,q!==M.length-1)c+=i.length;else if(p)return Y();if(!r||A.substring(0,v)!==r){if(b){if(_=[],z(A.split(n)),H(),f)return Y()}else z(A.split(n));if(a&&a<=q)return _=_.slice(0,a),Y(!0)}}return Y()}for(var F=s.indexOf(n,c),D=s.indexOf(i,c),N=new RegExp(d(l)+d(e),"g"),P=s.indexOf(e,c);;)if(s[c]!==e)if(r&&0===A.length&&s.substring(c,c+v)===r){if(-1===D)return Y();c=D+y,D=s.indexOf(i,c),F=s.indexOf(n,c);}else if(-1!==F&&(F<D||-1===D))A.push(s.substring(c,F)),c=F+m,F=s.indexOf(n,c);else {if(-1===D)break;if(A.push(s.substring(c,D)),W(D+y),b&&(H(),f))return Y();if(a&&_.length>=a)return Y(!0)}else for(P=c,c++;;){if(-1===(P=s.indexOf(e,P+1)))return p||w.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:_.length,index:c}),B();if(P===g-1)return B(s.substring(c,P).replace(N,e));if(e!==l||s[P+1]!==l){if(e===l||0===P||s[P-1]!==l){-1!==F&&F<P+1&&(F=s.indexOf(n,P+1)),-1!==D&&D<P+1&&(D=s.indexOf(i,P+1));var U=Q(-1===D?F:Math.min(F,D));if(s.substr(P+1+U,m)===n){A.push(s.substring(c,P).replace(N,e)),s[c=P+1+U+m]!==e&&(P=s.indexOf(e,c)),F=s.indexOf(n,c),D=s.indexOf(i,c);break}var K=Q(D);if(s.substring(P+1+K,P+1+K+y)===i){if(A.push(s.substring(c,P).replace(N,e)),W(P+1+K+y),F=s.indexOf(n,c),P=s.indexOf(e,c),b&&(H(),f))return Y();if(a&&_.length>=a)return Y(!0);break}w.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:_.length,index:c}),P++;}}else P++;}return B();function z(t){_.push(t),E=c;}function Q(t){var e=0;if(-1!==t){var n=s.substring(P+1,t);n&&""===n.trim()&&(e=n.length);}return e}function B(t){return p||(void 0===t&&(t=s.substring(c)),A.push(t),c=g,z(A),b&&H()),Y()}function W(t){c=t,z(A),A=[],D=s.indexOf(i,c);}function Y(t){return {data:_,errors:w,meta:{delimiter:n,linebreak:i,aborted:f,truncated:!!t,cursor:E+(h||0)}}}function H(){o(Y()),_=[],w=[];}},this.abort=function(){f=!0;},this.getCharIndex=function(){return c};}function m(t){var e=t.data,n=r[e.workerId],i=!1;if(e.error)n.userError(e.error,e.file);else if(e.results&&e.results.data){var o={abort:function(){i=!0,y(e.workerId,{data:[],errors:[],meta:{aborted:!0}});},pause:v,resume:v};if(k(n.userStep)){for(var s=0;s<e.results.data.length&&(n.userStep({data:e.results.data[s],errors:e.results.errors,meta:e.results.meta},o),!i);s++);delete e.results;}else k(n.userChunk)&&(n.userChunk(e.results,o,e.file),delete e.results);}e.finished&&!i&&y(e.workerId,e.results);}function y(t,e){var n=r[t];k(n.userComplete)&&n.userComplete(e),n.terminate(),delete r[t];}function v(){throw new Error("Not implemented.")}function b(t){if("object"!=typeof t||null===t)return t;var e=Array.isArray(t)?[]:{};for(var n in t)e[n]=b(t[n]);return e}function _(t,e){return function(){t.apply(e,arguments);}}function k(t){return "function"==typeof t}return i&&(e.onmessage=function(t){var n=t.data;if(void 0===s.WORKER_ID&&n&&(s.WORKER_ID=n.workerId),"string"==typeof n.input)e.postMessage({workerId:s.WORKER_ID,results:s.parse(n.input,n.config),finished:!0});else if(e.File&&n.input instanceof File||n.input instanceof Object){var i=s.parse(n.input,n.config);i&&e.postMessage({workerId:s.WORKER_ID,results:i,finished:!0});}}),(l.prototype=Object.create(u.prototype)).constructor=l,(c.prototype=Object.create(u.prototype)).constructor=c,(f.prototype=Object.create(f.prototype)).constructor=f,(h.prototype=Object.create(u.prototype)).constructor=h,s}();}(f);var h=c(f.exports),p=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,d=/^0x[0-9A-F]+$/i,g=function(t){if("string"!=typeof t)return t;if(""===t)t=null;else if(p.test(t))t=parseFloat(t);else if(d.test(t))t=parseInt(t,16);else switch(t){case"false":t=!1;break;case"true":t=!0;break;case"null":t=null;break;case"undefined":t=void 0;}return t},m=function(t,e){if(!e)return t;for(var n in t)t[n]=e(t[n],n);return t};
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
function y(t){return null==t}var v={isNothing:y,isObject:function(t){return "object"==typeof t&&null!==t},toArray:function(t){return Array.isArray(t)?t:y(t)?[]:[t]},repeat:function(t,e){var n,i="";for(n=0;n<e;n+=1)i+=t;return i},isNegativeZero:function(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t},extend:function(t,e){var n,i,r,o;if(e)for(n=0,i=(o=Object.keys(e)).length;n<i;n+=1)t[r=o[n]]=e[r];return t}};function b(t,e){var n="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(n+='in "'+t.mark.name+'" '),n+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(n+="\n\n"+t.mark.snippet),i+" "+n):i}function _(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=b(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||"";}_.prototype=Object.create(Error.prototype),_.prototype.constructor=_,_.prototype.toString=function(t){return this.name+": "+b(this,t)};var k=_;function w(t,e,n,i,r){var o="",s="",a=Math.floor(r/2)-1;return i-e>a&&(e=i-a+(o=" ... ").length),n-i>a&&(n=i+a-(s=" ...").length),{str:o+t.slice(e,n).replace(/\t/g,"→")+s,pos:i-e+o.length}}function A(t,e){return v.repeat(" ",e-t.length)+t}var E=function(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var n,i=/\r?\n|\r|\0/g,r=[0],o=[],s=-1;n=i.exec(t.buffer);)o.push(n.index),r.push(n.index+n[0].length),t.position<=n.index&&s<0&&(s=r.length-2);s<0&&(s=r.length-1);var a,u,l="",c=Math.min(t.line+e.linesAfter,o.length).toString().length,f=e.maxLength-(e.indent+c+3);for(a=1;a<=e.linesBefore&&!(s-a<0);a++)u=w(t.buffer,r[s-a],o[s-a],t.position-(r[s]-r[s-a]),f),l=v.repeat(" ",e.indent)+A((t.line-a+1).toString(),c)+" | "+u.str+"\n"+l;for(u=w(t.buffer,r[s],o[s],t.position,f),l+=v.repeat(" ",e.indent)+A((t.line+1).toString(),c)+" | "+u.str+"\n",l+=v.repeat("-",e.indent+c+3+u.pos)+"^\n",a=1;a<=e.linesAfter&&!(s+a>=o.length);a++)u=w(t.buffer,r[s+a],o[s+a],t.position-(r[s]-r[s+a]),f),l+=v.repeat(" ",e.indent)+A((t.line+a+1).toString(),c)+" | "+u.str+"\n";return l.replace(/\n$/,"")},x=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],C=["scalar","sequence","mapping"];var O=function(t,e){if(e=e||{},Object.keys(e).forEach((function(e){if(-1===x.indexOf(e))throw new k('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')})),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return !0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=function(t){var e={};return null!==t&&Object.keys(t).forEach((function(n){t[n].forEach((function(t){e[String(t)]=n;}));})),e}(e.styleAliases||null),-1===C.indexOf(this.kind))throw new k('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')};function S(t,e){var n=[];return t[e].forEach((function(t){var e=n.length;n.forEach((function(n,i){n.tag===t.tag&&n.kind===t.kind&&n.multi===t.multi&&(e=i);})),n[e]=t;})),n}function I(t){return this.extend(t)}I.prototype.extend=function(t){var e=[],n=[];if(t instanceof O)n.push(t);else if(Array.isArray(t))n=n.concat(t);else {if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new k("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));}e.forEach((function(t){if(!(t instanceof O))throw new k("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new k("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new k("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),n.forEach((function(t){if(!(t instanceof O))throw new k("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var i=Object.create(I.prototype);return i.implicit=(this.implicit||[]).concat(e),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=S(i,"implicit"),i.compiledExplicit=S(i,"explicit"),i.compiledTypeMap=function(){var t,e,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(t){t.multi?(n.multi[t.kind].push(t),n.multi.fallback.push(t)):n[t.kind][t.tag]=n.fallback[t.tag]=t;}for(t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(i);return n}(i.compiledImplicit,i.compiledExplicit),i};var j=I,T=new O("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return null!==t?t:""}}),R=new O("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return null!==t?t:[]}}),L=new O("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return null!==t?t:{}}}),M=new j({explicit:[T,R,L]});var q=new O("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(t){if(null===t)return !0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)},construct:function(){return null},predicate:function(t){return null===t},represent:{canonical:function(){return "~"},lowercase:function(){return "null"},uppercase:function(){return "NULL"},camelcase:function(){return "Null"},empty:function(){return ""}},defaultStyle:"lowercase"});var F=new O("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(t){if(null===t)return !1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)},construct:function(t){return "true"===t||"True"===t||"TRUE"===t},predicate:function(t){return "[object Boolean]"===Object.prototype.toString.call(t)},represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function D(t){return 48<=t&&t<=55}function N(t){return 48<=t&&t<=57}var P=new O("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(t){if(null===t)return !1;var e,n,i=t.length,r=0,o=!1;if(!i)return !1;if("-"!==(e=t[r])&&"+"!==e||(e=t[++r]),"0"===e){if(r+1===i)return !0;if("b"===(e=t[++r])){for(r++;r<i;r++)if("_"!==(e=t[r])){if("0"!==e&&"1"!==e)return !1;o=!0;}return o&&"_"!==e}if("x"===e){for(r++;r<i;r++)if("_"!==(e=t[r])){if(!(48<=(n=t.charCodeAt(r))&&n<=57||65<=n&&n<=70||97<=n&&n<=102))return !1;o=!0;}return o&&"_"!==e}if("o"===e){for(r++;r<i;r++)if("_"!==(e=t[r])){if(!D(t.charCodeAt(r)))return !1;o=!0;}return o&&"_"!==e}}if("_"===e)return !1;for(;r<i;r++)if("_"!==(e=t[r])){if(!N(t.charCodeAt(r)))return !1;o=!0;}return !(!o||"_"===e)},construct:function(t){var e,n=t,i=1;if(-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),"-"!==(e=n[0])&&"+"!==e||("-"===e&&(i=-1),e=(n=n.slice(1))[0]),"0"===n)return 0;if("0"===e){if("b"===n[1])return i*parseInt(n.slice(2),2);if("x"===n[1])return i*parseInt(n.slice(2),16);if("o"===n[1])return i*parseInt(n.slice(2),8)}return i*parseInt(n,10)},predicate:function(t){return "[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!v.isNegativeZero(t)},represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),U=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var K=/^[-+]?[0-9]+e/;var z=new O("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(t){return null!==t&&!(!U.test(t)||"_"===t[t.length-1])},construct:function(t){var e,n;return n="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:n*parseFloat(e,10)},predicate:function(t){return "[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||v.isNegativeZero(t))},represent:function(t,e){var n;if(isNaN(t))switch(e){case"lowercase":return ".nan";case"uppercase":return ".NAN";case"camelcase":return ".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return ".inf";case"uppercase":return ".INF";case"camelcase":return ".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return "-.inf";case"uppercase":return "-.INF";case"camelcase":return "-.Inf"}else if(v.isNegativeZero(t))return "-0.0";return n=t.toString(10),K.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"}),Q=M.extend({implicit:[q,F,P,z]}),B=Q,W=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Y=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var H=new O("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(t){return null!==t&&(null!==W.exec(t)||null!==Y.exec(t))},construct:function(t){var e,n,i,r,o,s,a,u,l=0,c=null;if(null===(e=W.exec(t))&&(e=Y.exec(t)),null===e)throw new Error("Date resolve error");if(n=+e[1],i=+e[2]-1,r=+e[3],!e[4])return new Date(Date.UTC(n,i,r));if(o=+e[4],s=+e[5],a=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l;}return e[9]&&(c=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(c=-c)),u=new Date(Date.UTC(n,i,r,o,s,a,l)),c&&u.setTime(u.getTime()-c),u},instanceOf:Date,represent:function(t){return t.toISOString()}});var $=new O("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(t){return "<<"===t||null===t}}),J="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var G=new O("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(t){if(null===t)return !1;var e,n,i=0,r=t.length,o=J;for(n=0;n<r;n++)if(!((e=o.indexOf(t.charAt(n)))>64)){if(e<0)return !1;i+=6;}return i%8==0},construct:function(t){var e,n,i=t.replace(/[\r\n=]/g,""),r=i.length,o=J,s=0,a=[];for(e=0;e<r;e++)e%4==0&&e&&(a.push(s>>16&255),a.push(s>>8&255),a.push(255&s)),s=s<<6|o.indexOf(i.charAt(e));return 0===(n=r%4*6)?(a.push(s>>16&255),a.push(s>>8&255),a.push(255&s)):18===n?(a.push(s>>10&255),a.push(s>>2&255)):12===n&&a.push(s>>4&255),new Uint8Array(a)},predicate:function(t){return "[object Uint8Array]"===Object.prototype.toString.call(t)},represent:function(t){var e,n,i="",r=0,o=t.length,s=J;for(e=0;e<o;e++)e%3==0&&e&&(i+=s[r>>18&63],i+=s[r>>12&63],i+=s[r>>6&63],i+=s[63&r]),r=(r<<8)+t[e];return 0===(n=o%3)?(i+=s[r>>18&63],i+=s[r>>12&63],i+=s[r>>6&63],i+=s[63&r]):2===n?(i+=s[r>>10&63],i+=s[r>>4&63],i+=s[r<<2&63],i+=s[64]):1===n&&(i+=s[r>>2&63],i+=s[r<<4&63],i+=s[64],i+=s[64]),i}}),Z=Object.prototype.hasOwnProperty,V=Object.prototype.toString;var X=new O("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(t){if(null===t)return !0;var e,n,i,r,o,s=[],a=t;for(e=0,n=a.length;e<n;e+=1){if(i=a[e],o=!1,"[object Object]"!==V.call(i))return !1;for(r in i)if(Z.call(i,r)){if(o)return !1;o=!0;}if(!o)return !1;if(-1!==s.indexOf(r))return !1;s.push(r);}return !0},construct:function(t){return null!==t?t:[]}}),tt=Object.prototype.toString;var et=new O("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(t){if(null===t)return !0;var e,n,i,r,o,s=t;for(o=new Array(s.length),e=0,n=s.length;e<n;e+=1){if(i=s[e],"[object Object]"!==tt.call(i))return !1;if(1!==(r=Object.keys(i)).length)return !1;o[e]=[r[0],i[r[0]]];}return !0},construct:function(t){if(null===t)return [];var e,n,i,r,o,s=t;for(o=new Array(s.length),e=0,n=s.length;e<n;e+=1)i=s[e],r=Object.keys(i),o[e]=[r[0],i[r[0]]];return o}}),nt=Object.prototype.hasOwnProperty;var it=new O("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(t){if(null===t)return !0;var e,n=t;for(e in n)if(nt.call(n,e)&&null!==n[e])return !1;return !0},construct:function(t){return null!==t?t:{}}}),rt=B.extend({implicit:[H,$],explicit:[G,X,et,it]}),ot=Object.prototype.hasOwnProperty,st=1,at=2,ut=3,lt=4,ct=1,ft=2,ht=3,pt=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,dt=/[\x85\u2028\u2029]/,gt=/[,\[\]\{\}]/,mt=/^(?:!|!!|![a-z\-]+!)$/i,yt=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function vt(t){return Object.prototype.toString.call(t)}function bt(t){return 10===t||13===t}function _t(t){return 9===t||32===t}function kt(t){return 9===t||32===t||10===t||13===t}function wt(t){return 44===t||91===t||93===t||123===t||125===t}function At(t){var e;return 48<=t&&t<=57?t-48:97<=(e=32|t)&&e<=102?e-97+10:-1}function Et(t){return 48===t?"\0":97===t?"":98===t?"\b":116===t||9===t?"\t":110===t?"\n":118===t?"\v":102===t?"\f":114===t?"\r":101===t?"":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"
":95===t?" ":76===t?"\u2028":80===t?"\u2029":""}function xt(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}for(var Ct=new Array(256),Ot=new Array(256),St=0;St<256;St++)Ct[St]=Et(St)?1:0,Ot[St]=Et(St);function It(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||rt,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[];}function jt(t,e){var n={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return n.snippet=E(n),new k(e,n)}function Tt(t,e){throw jt(t,e)}function Rt(t,e){t.onWarning&&t.onWarning.call(null,jt(t,e));}var Lt={YAML:function(t,e,n){var i,r,o;null!==t.version&&Tt(t,"duplication of %YAML directive"),1!==n.length&&Tt(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&Tt(t,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&Tt(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=o<2,1!==o&&2!==o&&Rt(t,"unsupported YAML version of the document");},TAG:function(t,e,n){var i,r;2!==n.length&&Tt(t,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],mt.test(i)||Tt(t,"ill-formed tag handle (first argument) of the TAG directive"),ot.call(t.tagMap,i)&&Tt(t,'there is a previously declared suffix for "'+i+'" tag handle'),yt.test(r)||Tt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{r=decodeURIComponent(r);}catch(e){Tt(t,"tag prefix is malformed: "+r);}t.tagMap[i]=r;}};function Mt(t,e,n,i){var r,o,s,a;if(e<n){if(a=t.input.slice(e,n),i)for(r=0,o=a.length;r<o;r+=1)9===(s=a.charCodeAt(r))||32<=s&&s<=1114111||Tt(t,"expected valid JSON character");else pt.test(a)&&Tt(t,"the stream contains non-printable characters");t.result+=a;}}function qt(t,e,n,i){var r,o,s,a;for(v.isObject(n)||Tt(t,"cannot merge mappings; the provided source object is unacceptable"),s=0,a=(r=Object.keys(n)).length;s<a;s+=1)o=r[s],ot.call(e,o)||(e[o]=n[o],i[o]=!0);}function Ft(t,e,n,i,r,o,s,a,u){var l,c;if(Array.isArray(r))for(l=0,c=(r=Array.prototype.slice.call(r)).length;l<c;l+=1)Array.isArray(r[l])&&Tt(t,"nested arrays are not supported inside keys"),"object"==typeof r&&"[object Object]"===vt(r[l])&&(r[l]="[object Object]");if("object"==typeof r&&"[object Object]"===vt(r)&&(r="[object Object]"),r=String(r),null===e&&(e={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(o))for(l=0,c=o.length;l<c;l+=1)qt(t,e,o[l],n);else qt(t,e,o,n);else t.json||ot.call(n,r)||!ot.call(e,r)||(t.line=s||t.line,t.lineStart=a||t.lineStart,t.position=u||t.position,Tt(t,"duplicated mapping key")),"__proto__"===r?Object.defineProperty(e,r,{configurable:!0,enumerable:!0,writable:!0,value:o}):e[r]=o,delete n[r];return e}function Dt(t){var e;10===(e=t.input.charCodeAt(t.position))?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):Tt(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1;}function Nt(t,e,n){for(var i=0,r=t.input.charCodeAt(t.position);0!==r;){for(;_t(r);)9===r&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),r=t.input.charCodeAt(++t.position);if(e&&35===r)do{r=t.input.charCodeAt(++t.position);}while(10!==r&&13!==r&&0!==r);if(!bt(r))break;for(Dt(t),r=t.input.charCodeAt(t.position),i++,t.lineIndent=0;32===r;)t.lineIndent++,r=t.input.charCodeAt(++t.position);}return -1!==n&&0!==i&&t.lineIndent<n&&Rt(t,"deficient indentation"),i}function Pt(t){var e,n=t.position;return !(45!==(e=t.input.charCodeAt(n))&&46!==e||e!==t.input.charCodeAt(n+1)||e!==t.input.charCodeAt(n+2)||(n+=3,0!==(e=t.input.charCodeAt(n))&&!kt(e)))}function Ut(t,e){1===e?t.result+=" ":e>1&&(t.result+=v.repeat("\n",e-1));}function Kt(t,e){var n,i,r=t.tag,o=t.anchor,s=[],a=!1;if(-1!==t.firstTabInLine)return !1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=s),i=t.input.charCodeAt(t.position);0!==i&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,Tt(t,"tab characters must not be used in indentation")),45===i)&&kt(t.input.charCodeAt(t.position+1));)if(a=!0,t.position++,Nt(t,!0,-1)&&t.lineIndent<=e)s.push(null),i=t.input.charCodeAt(t.position);else if(n=t.line,Bt(t,e,ut,!1,!0),s.push(t.result),Nt(t,!0,-1),i=t.input.charCodeAt(t.position),(t.line===n||t.lineIndent>e)&&0!==i)Tt(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return !!a&&(t.tag=r,t.anchor=o,t.kind="sequence",t.result=s,!0)}function zt(t){var e,n,i,r,o=!1,s=!1;if(33!==(r=t.input.charCodeAt(t.position)))return !1;if(null!==t.tag&&Tt(t,"duplication of a tag property"),60===(r=t.input.charCodeAt(++t.position))?(o=!0,r=t.input.charCodeAt(++t.position)):33===r?(s=!0,n="!!",r=t.input.charCodeAt(++t.position)):n="!",e=t.position,o){do{r=t.input.charCodeAt(++t.position);}while(0!==r&&62!==r);t.position<t.length?(i=t.input.slice(e,t.position),r=t.input.charCodeAt(++t.position)):Tt(t,"unexpected end of the stream within a verbatim tag");}else {for(;0!==r&&!kt(r);)33===r&&(s?Tt(t,"tag suffix cannot contain exclamation marks"):(n=t.input.slice(e-1,t.position+1),mt.test(n)||Tt(t,"named tag handle cannot contain such characters"),s=!0,e=t.position+1)),r=t.input.charCodeAt(++t.position);i=t.input.slice(e,t.position),gt.test(i)&&Tt(t,"tag suffix cannot contain flow indicator characters");}i&&!yt.test(i)&&Tt(t,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i);}catch(e){Tt(t,"tag name is malformed: "+i);}return o?t.tag=i:ot.call(t.tagMap,n)?t.tag=t.tagMap[n]+i:"!"===n?t.tag="!"+i:"!!"===n?t.tag="tag:yaml.org,2002:"+i:Tt(t,'undeclared tag handle "'+n+'"'),!0}function Qt(t){var e,n;if(38!==(n=t.input.charCodeAt(t.position)))return !1;for(null!==t.anchor&&Tt(t,"duplication of an anchor property"),n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!kt(n)&&!wt(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&Tt(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function Bt(t,e,n,i,r){var o,s,a,u,l,c,f,h,p,d=1,g=!1,m=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,o=s=a=lt===n||ut===n,i&&Nt(t,!0,-1)&&(g=!0,t.lineIndent>e?d=1:t.lineIndent===e?d=0:t.lineIndent<e&&(d=-1)),1===d)for(;zt(t)||Qt(t);)Nt(t,!0,-1)?(g=!0,a=o,t.lineIndent>e?d=1:t.lineIndent===e?d=0:t.lineIndent<e&&(d=-1)):a=!1;if(a&&(a=g||r),1!==d&<!==n||(h=st===n||at===n?e:e+1,p=t.position-t.lineStart,1===d?a&&(Kt(t,p)||function(t,e,n){var i,r,o,s,a,u,l,c=t.tag,f=t.anchor,h={},p=Object.create(null),d=null,g=null,m=null,y=!1,v=!1;if(-1!==t.firstTabInLine)return !1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=h),l=t.input.charCodeAt(t.position);0!==l;){if(y||-1===t.firstTabInLine||(t.position=t.firstTabInLine,Tt(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),o=t.line,63!==l&&58!==l||!kt(i)){if(s=t.line,a=t.lineStart,u=t.position,!Bt(t,n,at,!1,!0))break;if(t.line===o){for(l=t.input.charCodeAt(t.position);_t(l);)l=t.input.charCodeAt(++t.position);if(58===l)kt(l=t.input.charCodeAt(++t.position))||Tt(t,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Ft(t,h,p,d,g,null,s,a,u),d=g=m=null),v=!0,y=!1,r=!1,d=t.tag,g=t.result;else {if(!v)return t.tag=c,t.anchor=f,!0;Tt(t,"can not read an implicit mapping pair; a colon is missed");}}else {if(!v)return t.tag=c,t.anchor=f,!0;Tt(t,"can not read a block mapping entry; a multiline key may not be an implicit key");}}else 63===l?(y&&(Ft(t,h,p,d,g,null,s,a,u),d=g=m=null),v=!0,y=!0,r=!0):y?(y=!1,r=!0):Tt(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,l=i;if((t.line===o||t.lineIndent>e)&&(y&&(s=t.line,a=t.lineStart,u=t.position),Bt(t,e,lt,!0,r)&&(y?g=t.result:m=t.result),y||(Ft(t,h,p,d,g,m,s,a,u),d=g=m=null),Nt(t,!0,-1),l=t.input.charCodeAt(t.position)),(t.line===o||t.lineIndent>e)&&0!==l)Tt(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return y&&Ft(t,h,p,d,g,null,s,a,u),v&&(t.tag=c,t.anchor=f,t.kind="mapping",t.result=h),v}(t,p,h))||function(t,e){var n,i,r,o,s,a,u,l,c,f,h,p,d=!0,g=t.tag,m=t.anchor,y=Object.create(null);if(91===(p=t.input.charCodeAt(t.position)))s=93,l=!1,o=[];else {if(123!==p)return !1;s=125,l=!0,o={};}for(null!==t.anchor&&(t.anchorMap[t.anchor]=o),p=t.input.charCodeAt(++t.position);0!==p;){if(Nt(t,!0,e),(p=t.input.charCodeAt(t.position))===s)return t.position++,t.tag=g,t.anchor=m,t.kind=l?"mapping":"sequence",t.result=o,!0;d?44===p&&Tt(t,"expected the node content, but found ','"):Tt(t,"missed comma between flow collection entries"),h=null,a=u=!1,63===p&&kt(t.input.charCodeAt(t.position+1))&&(a=u=!0,t.position++,Nt(t,!0,e)),n=t.line,i=t.lineStart,r=t.position,Bt(t,e,st,!1,!0),f=t.tag,c=t.result,Nt(t,!0,e),p=t.input.charCodeAt(t.position),!u&&t.line!==n||58!==p||(a=!0,p=t.input.charCodeAt(++t.position),Nt(t,!0,e),Bt(t,e,st,!1,!0),h=t.result),l?Ft(t,o,y,f,c,h,n,i,r):a?o.push(Ft(t,null,y,f,c,h,n,i,r)):o.push(c),Nt(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(d=!0,p=t.input.charCodeAt(++t.position)):d=!1;}Tt(t,"unexpected end of the stream within a flow collection");}(t,h)?m=!0:(s&&function(t,e){var n,i,r,o,s,a=ct,u=!1,l=!1,c=e,f=0,h=!1;if(124===(o=t.input.charCodeAt(t.position)))i=!1;else {if(62!==o)return !1;i=!0;}for(t.kind="scalar",t.result="";0!==o;)if(43===(o=t.input.charCodeAt(++t.position))||45===o)ct===a?a=43===o?ht:ft:Tt(t,"repeat of a chomping mode identifier");else {if(!((r=48<=(s=o)&&s<=57?s-48:-1)>=0))break;0===r?Tt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?Tt(t,"repeat of an indentation width identifier"):(c=e+r-1,l=!0);}if(_t(o)){do{o=t.input.charCodeAt(++t.position);}while(_t(o));if(35===o)do{o=t.input.charCodeAt(++t.position);}while(!bt(o)&&0!==o)}for(;0!==o;){for(Dt(t),t.lineIndent=0,o=t.input.charCodeAt(t.position);(!l||t.lineIndent<c)&&32===o;)t.lineIndent++,o=t.input.charCodeAt(++t.position);if(!l&&t.lineIndent>c&&(c=t.lineIndent),bt(o))f++;else {if(t.lineIndent<c){a===ht?t.result+=v.repeat("\n",u?1+f:f):a===ct&&u&&(t.result+="\n");break}for(i?_t(o)?(h=!0,t.result+=v.repeat("\n",u?1+f:f)):h?(h=!1,t.result+=v.repeat("\n",f+1)):0===f?u&&(t.result+=" "):t.result+=v.repeat("\n",f):t.result+=v.repeat("\n",u?1+f:f),u=!0,l=!0,f=0,n=t.position;!bt(o)&&0!==o;)o=t.input.charCodeAt(++t.position);Mt(t,n,t.position,!1);}}return !0}(t,h)||function(t,e){var n,i,r;if(39!==(n=t.input.charCodeAt(t.position)))return !1;for(t.kind="scalar",t.result="",t.position++,i=r=t.position;0!==(n=t.input.charCodeAt(t.position));)if(39===n){if(Mt(t,i,t.position,!0),39!==(n=t.input.charCodeAt(++t.position)))return !0;i=t.position,t.position++,r=t.position;}else bt(n)?(Mt(t,i,r,!0),Ut(t,Nt(t,!1,e)),i=r=t.position):t.position===t.lineStart&&Pt(t)?Tt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,r=t.position);Tt(t,"unexpected end of the stream within a single quoted scalar");}(t,h)||function(t,e){var n,i,r,o,s,a,u;if(34!==(a=t.input.charCodeAt(t.position)))return !1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;0!==(a=t.input.charCodeAt(t.position));){if(34===a)return Mt(t,n,t.position,!0),t.position++,!0;if(92===a){if(Mt(t,n,t.position,!0),bt(a=t.input.charCodeAt(++t.position)))Nt(t,!1,e);else if(a<256&&Ct[a])t.result+=Ot[a],t.position++;else if((s=120===(u=a)?2:117===u?4:85===u?8:0)>0){for(r=s,o=0;r>0;r--)(s=At(a=t.input.charCodeAt(++t.position)))>=0?o=(o<<4)+s:Tt(t,"expected hexadecimal character");t.result+=xt(o),t.position++;}else Tt(t,"unknown escape sequence");n=i=t.position;}else bt(a)?(Mt(t,n,i,!0),Ut(t,Nt(t,!1,e)),n=i=t.position):t.position===t.lineStart&&Pt(t)?Tt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position);}Tt(t,"unexpected end of the stream within a double quoted scalar");}(t,h)?m=!0:!function(t){var e,n,i;if(42!==(i=t.input.charCodeAt(t.position)))return !1;for(i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!kt(i)&&!wt(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&Tt(t,"name of an alias node must contain at least one character"),n=t.input.slice(e,t.position),ot.call(t.anchorMap,n)||Tt(t,'unidentified alias "'+n+'"'),t.result=t.anchorMap[n],Nt(t,!0,-1),!0}(t)?function(t,e,n){var i,r,o,s,a,u,l,c,f=t.kind,h=t.result;if(kt(c=t.input.charCodeAt(t.position))||wt(c)||35===c||38===c||42===c||33===c||124===c||62===c||39===c||34===c||37===c||64===c||96===c)return !1;if((63===c||45===c)&&(kt(i=t.input.charCodeAt(t.position+1))|