@werckmeister/components 1.1.6-117 → 1.1.6-118

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.
@@ -36,7 +36,7 @@ var e=require("codemirror/lib/codemirror.js");require("codemirror/addon/mode/sim
36
36
  "use strict";function e(e,r){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=t(e))||r&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return u=e.done,e},e:function(e){l=!0,a=e},f:function(){try{u||null==n.return||n.return()}finally{if(l)throw a}}}}function t(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}var a=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),u=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&a(t,e,r);return u(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(t){o(t)}}function u(e){try{l(n.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,u)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Editor=exports.Mode=void 0;var c=require("./SourceDocumentImpl"),f=l(require("lodash")),h=require("codemirror/lib/codemirror.js");require("codemirror/addon/hint/show-hint.js"),require("codemirror/mode/lua/lua.js"),require("./SheetMode"),require("./ConductionsSheetMode");var d,m="base16-dark";function v(e,t){var r=f.map(t,function(e){return"".concat(e,"?")}).join("");r=r.replace(/\./g,"\\.").replace(/\(/g,"\\(").replace(/\)/g,"\\)").replace(/\{/g,"\\{").replace(/\}/g,"\\}").replace(/\[/g,"\\[").replace(/\[/g,"\\]");var n=new RegExp("(".concat(r,")$"),"g");return(e.match(n)||[])[0]}function p(e,t){return(e.match(/.*="?(.*)/)||[])[1]}!function(e){e.sheet="sheet",e.text="text",e.lua="lua",e.conductions="conductions"}(d=exports.Mode||(exports.Mode={}));var y=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0;n(this,t),this.element=e,this.eventMarkClass="wm-marked",this.errorClass="wm-error",this.warningClass="wm-warning",i=i||{theme:"default"},this.editor=h(e,{value:r,theme:i.theme,mode:d[d.sheet],lineNumbers:i.lineNumbers})}return o(t,[{key:"activateAutoCompletion",value:function(e,t){var r=this;this.languageFeatures=e,h.registerHelper("hint","wmAutoComplete",function(e,n){return s(r,void 0,void 0,regeneratorRuntime.mark(function r(){var n,i,o,a,u,l,s;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return n=e.getCursor(),i=n.ch,o=i,a=new c.ActiveSourceDocument(e,t),r.next=5,this.languageFeatures.autoComplete(a);case 5:return u=r.sent,l=function(e){return e.file?e.file.isDirectory?"isFolder":"isFile":""},s={list:u.map(function(e){return{text:e.displayText,replaceText:e.text,isValueSuggestion:!!e.parameter,className:l(e),hint:function(e,t,r){var i=r.isValueSuggestion,a=e.getRange({line:n.line,ch:0},{line:n.line,ch:n.ch}),u=r.replaceText,l=((i?p(a,u):v(a,u))||"").length,s=o-l,c=o+l;s!==c&&(c-=1),e.replaceRange(r.replaceText,h.Pos(n.line,s),h.Pos(n.line,c))}}}),from:h.Pos(n.line,o),to:h.Pos(n.line,i)},r.abrupt("return",s);case 9:case"end":return r.stop()}},r,this)}))}),h.commands.autocomplete=function(e){e.showHint({hint:h.hint.wmAutoComplete,container:r.element})};var n=function(e,t){var r=t.getCursor();t.replaceRange(e,r),h.commands.autocomplete(t)};this.editor.setOption("extraKeys",{"Ctrl-Space":"autocomplete","'\"'":n.bind(null,'"'),"'/'":n.bind(null,"/"),"'_'":n.bind(null,"_"),"'='":n.bind(null,"=")})}},{key:"setMode",value:function(e){e!==d.text?this.editor.setOption("mode",d[e]):this.editor.setOption("mode",null)}},{key:"getValue",value:function(){return this.editor.getValue()}},{key:"setValue",value:function(e){this.editor.setValue(e)}},{key:"clearEventMarkers",value:function(){var t,r=e(this.editor.getAllMarks());try{for(r.s();!(t=r.n()).done;){var n=t.value;n.className!==this.warningClass&&n.className!==this.errorClass&&n.clear()}}catch(i){r.e(i)}finally{r.f()}}},{key:"clearAllMarkers",value:function(){var t,r=e(this.editor.getAllMarks());try{for(r.s();!(t=r.n()).done;){t.value.clear()}}catch(n){r.e(n)}finally{r.f()}}},{key:"setMarker",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,i=this.editor.posFromIndex(e),o=this.editor.posFromIndex(t+1);return this.editor.markText(i,o,{className:r,attributes:n})}},{key:"setEventMarker",value:function(e,t){return this.setMarker(e,t,this.eventMarkClass)}},{key:"setErrorMarker",value:function(e,t){return this.setMarker(e,t,this.errorClass)}},{key:"setWarningMarker",value:function(e,t,r){return this.setMarker(t,r,this.warningClass,{title:e})}},{key:"update",value:function(){this.editor.refresh()}},{key:"isClean",value:function(){return this.editor.isClean()}},{key:"markClean",value:function(){this.editor.markClean()}},{key:"clearHistory",value:function(){this.editor.clearHistory()}}]),t}();exports.Editor=y;
37
37
  },{"./SourceDocumentImpl":"Glli","lodash":"B1iE","codemirror/lib/codemirror.js":"tQq4","codemirror/addon/hint/show-hint.js":"rbVD","codemirror/mode/lua/lua.js":"JTrO","./SheetMode":"edJQ","./ConductionsSheetMode":"PWBo"}],"LghJ":[function(require,module,exports) {
38
38
  var define;
39
- var n;parcelRequire=function(t,e,r,i){var o,u="function"==typeof parcelRequire&&parcelRequire,a="function"==typeof require&&require;function c(n,r){if(!e[n]){if(!t[n]){var i="function"==typeof parcelRequire&&parcelRequire;if(!r&&i)return i(n,!0);if(u)return u(n,!0);if(a&&"string"==typeof n)return a(n);var o=new Error("Cannot find module '"+n+"'");throw o.code="MODULE_NOT_FOUND",o}s.resolve=function(e){return t[n][1][e]||e},s.cache={};var f=e[n]=new c.Module(n);t[n][0].call(f.exports,s,f,f.exports,this)}return e[n].exports;function s(n){return c(s.resolve(n))}}c.isParcelRequire=!0,c.Module=function(n){this.id=n,this.bundle=c,this.exports={}},c.modules=t,c.cache=e,c.parent=u,c.register=function(n,e){t[n]=[function(n,t){t.exports=e},{}]};for(var f=0;f<r.length;f++)try{c(r[f])}catch(t){o||(o=t)}if(r.length){var s=c(r[r.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=s:"function"==typeof n&&n.amd&&n(function(){return s})}if(parcelRequire=c,o)throw o;return c}({yh9p:[function(n,t,e){"use strict";e.byteLength=function(n){var t=f(n),e=t[0],r=t[1];return 3*(e+r)/4-r},e.toByteArray=function(n){var t,e,r=f(n),u=r[0],a=r[1],c=new o(function(n,t,e){return 3*(t+e)/4-e}(0,u,a)),s=0,l=a>0?u-4:u;for(e=0;e<l;e+=4)t=i[n.charCodeAt(e)]<<18|i[n.charCodeAt(e+1)]<<12|i[n.charCodeAt(e+2)]<<6|i[n.charCodeAt(e+3)],c[s++]=t>>16&255,c[s++]=t>>8&255,c[s++]=255&t;return 2===a&&(t=i[n.charCodeAt(e)]<<2|i[n.charCodeAt(e+1)]>>4,c[s++]=255&t),1===a&&(t=i[n.charCodeAt(e)]<<10|i[n.charCodeAt(e+1)]<<4|i[n.charCodeAt(e+2)]>>2,c[s++]=t>>8&255,c[s++]=255&t),c},e.fromByteArray=function(n){for(var t,e=n.length,i=e%3,o=[],u=0,a=e-i;u<a;u+=16383)o.push(l(n,u,u+16383>a?a:u+16383));return 1===i?(t=n[e-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(n[e-2]<<8)+n[e-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=u.length;a<c;++a)r[a]=u[a],i[u.charCodeAt(a)]=a;function f(n){var t=n.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=n.indexOf("=");return-1===e&&(e=t),[e,e===t?0:4-e%4]}function s(n){return r[n>>18&63]+r[n>>12&63]+r[n>>6&63]+r[63&n]}function l(n,t,e){for(var r,i=[],o=t;o<e;o+=3)r=(n[o]<<16&16711680)+(n[o+1]<<8&65280)+(255&n[o+2]),i.push(s(r));return i.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],JgNJ:[function(n,t,e){e.read=function(n,t,e,r,i){var o,u,a=8*i-r-1,c=(1<<a)-1,f=c>>1,s=-7,l=e?i-1:0,h=e?-1:1,p=n[t+l];for(l+=h,o=p&(1<<-s)-1,p>>=-s,s+=a;s>0;o=256*o+n[t+l],l+=h,s-=8);for(u=o&(1<<-s)-1,o>>=-s,s+=r;s>0;u=256*u+n[t+l],l+=h,s-=8);if(0===o)o=1-f;else{if(o===c)return u?NaN:1/0*(p?-1:1);u+=Math.pow(2,r),o-=f}return(p?-1:1)*u*Math.pow(2,o-r)},e.write=function(n,t,e,r,i,o){var u,a,c,f=8*o-i-1,s=(1<<f)-1,l=s>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,m=r?1:-1,d=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,u=s):(u=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-u))<1&&(u--,c*=2),(t+=u+l>=1?h/c:h*Math.pow(2,1-l))*c>=2&&(u++,c/=2),u+l>=s?(a=0,u=s):u+l>=1?(a=(t*c-1)*Math.pow(2,i),u+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,i),u=0));i>=8;n[e+p]=255&a,p+=m,a/=256,i-=8);for(u=u<<i|a,f+=i;f>0;n[e+p]=255&u,p+=m,u/=256,f-=8);n[e+p-m]|=128*d}},{}],REa7:[function(n,t,e){var r={}.toString;t.exports=Array.isArray||function(n){return"[object Array]"==r.call(n)}},{}],dskh:[function(n,t,e){arguments[3];var r=arguments[3],i=n("base64-js"),o=n("ieee754"),u=n("isarray");function a(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(n,t){if(a()<t)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(n=new Uint8Array(t)).__proto__=f.prototype:(null===n&&(n=new f(t)),n.length=t),n}function f(n,t,e){if(!(f.TYPED_ARRAY_SUPPORT||this instanceof f))return new f(n,t,e);if("number"==typeof n){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return h(this,n)}return s(this,n,t,e)}function s(n,t,e,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(n,t,e,r){if(t.byteLength,e<0||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),f.TYPED_ARRAY_SUPPORT?(n=t).__proto__=f.prototype:n=p(n,t),n}(n,t,e,r):"string"==typeof t?function(n,t,e){if("string"==typeof e&&""!==e||(e="utf8"),!f.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var r=0|g(t,e),i=(n=c(n,r)).write(t,e);return i!==r&&(n=n.slice(0,i)),n}(n,t,e):m(n,t)}function l(n){if("number"!=typeof n)throw new TypeError('"size" argument must be a number');if(n<0)throw new RangeError('"size" argument must not be negative')}function h(n,t){if(l(t),n=c(n,t<0?0:0|d(t)),!f.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)n[e]=0;return n}function p(n,t){var e=t.length<0?0:0|d(t.length);n=c(n,e);for(var r=0;r<e;r+=1)n[r]=255&t[r];return n}function m(n,t){if(f.isBuffer(t)){var e=0|d(t.length);return 0===(n=c(n,e)).length?n:(t.copy(n,0,0,e),n)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||function(n){return n!=n}(t.length)?c(n,0):p(n,t);if("Buffer"===t.type&&u(t.data))return p(n,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function d(n){if(n>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|n}function g(n,t){if(f.isBuffer(n))return n.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(n)||n instanceof ArrayBuffer))return n.byteLength;"string"!=typeof n&&(n=""+n);var e=n.length;if(0===e)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return W(n).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return Y(n).length;default:if(r)return W(n).length;t=(""+t).toLowerCase(),r=!0}}function v(n,t,e){var r=n[t];n[t]=n[e],n[e]=r}function y(n,t,e,r,i){if(0===n.length)return-1;if("string"==typeof e?(r=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:n.length-1),e<0&&(e=n.length+e),e>=n.length){if(i)return-1;e=n.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof t&&(t=f.from(t,r)),f.isBuffer(t))return 0===t.length?-1:_(n,t,e,r,i);if("number"==typeof t)return t&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(n,t,e):Uint8Array.prototype.lastIndexOf.call(n,t,e):_(n,[t],e,r,i);throw new TypeError("val must be string, number or Buffer")}function _(n,t,e,r,i){var o,u=1,a=n.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(n.length<2||t.length<2)return-1;u=2,a/=2,c/=2,e/=2}function f(n,t){return 1===u?n[t]:n.readUInt16BE(t*u)}if(i){var s=-1;for(o=e;o<a;o++)if(f(n,o)===f(t,-1===s?0:o-s)){if(-1===s&&(s=o),o-s+1===c)return s*u}else-1!==s&&(o-=o-s),s=-1}else for(e+c>a&&(e=a-c),o=e;o>=0;o--){for(var l=!0,h=0;h<c;h++)if(f(n,o+h)!==f(t,h)){l=!1;break}if(l)return o}return-1}function w(n,t,e,r){e=Number(e)||0;var i=n.length-e;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var u=0;u<r;++u){var a=parseInt(t.substr(2*u,2),16);if(isNaN(a))return u;n[e+u]=a}return u}function b(n,t,e,r){return q(W(t,n.length-e),n,e,r)}function x(n,t,e,r){return q(function(n){for(var t=[],e=0;e<n.length;++e)t.push(255&n.charCodeAt(e));return t}(t),n,e,r)}function A(n,t,e,r){return x(n,t,e,r)}function S(n,t,e,r){return q(Y(t),n,e,r)}function k(n,t,e,r){return q(function(n,t){for(var e,r,i,o=[],u=0;u<n.length&&!((t-=2)<0);++u)r=(e=n.charCodeAt(u))>>8,i=e%256,o.push(i),o.push(r);return o}(t,n.length-e),n,e,r)}function R(n,t,e){return 0===t&&e===n.length?i.fromByteArray(n):i.fromByteArray(n.slice(t,e))}function E(n,t,e){e=Math.min(n.length,e);for(var r=[],i=t;i<e;){var o,u,a,c,f=n[i],s=null,l=f>239?4:f>223?3:f>191?2:1;if(i+l<=e)switch(l){case 1:f<128&&(s=f);break;case 2:128==(192&(o=n[i+1]))&&(c=(31&f)<<6|63&o)>127&&(s=c);break;case 3:o=n[i+1],u=n[i+2],128==(192&o)&&128==(192&u)&&(c=(15&f)<<12|(63&o)<<6|63&u)>2047&&(c<55296||c>57343)&&(s=c);break;case 4:o=n[i+1],u=n[i+2],a=n[i+3],128==(192&o)&&128==(192&u)&&128==(192&a)&&(c=(15&f)<<18|(63&o)<<12|(63&u)<<6|63&a)>65535&&c<1114112&&(s=c)}null===s?(s=65533,l=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|1023&s),r.push(s),i+=l}return function(n){var t=n.length;if(t<=O)return String.fromCharCode.apply(String,n);for(var e="",r=0;r<t;)e+=String.fromCharCode.apply(String,n.slice(r,r+=O));return e}(r)}e.Buffer=f,e.SlowBuffer=function(n){return+n!=n&&(n=0),f.alloc(+n)},e.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=void 0!==r.TYPED_ARRAY_SUPPORT?r.TYPED_ARRAY_SUPPORT:function(){try{var n=new Uint8Array(1);return n.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===n.foo()&&"function"==typeof n.subarray&&0===n.subarray(1,1).byteLength}catch(i){return!1}}(),e.kMaxLength=a(),f.poolSize=8192,f._augment=function(n){return n.__proto__=f.prototype,n},f.from=function(n,t,e){return s(null,n,t,e)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(n,t,e){return function(n,t,e,r){return l(t),t<=0?c(n,t):void 0!==e?"string"==typeof r?c(n,t).fill(e,r):c(n,t).fill(e):c(n,t)}(null,n,t,e)},f.allocUnsafe=function(n){return h(null,n)},f.allocUnsafeSlow=function(n){return h(null,n)},f.isBuffer=function(n){return!(null==n||!n._isBuffer)},f.compare=function(n,t){if(!f.isBuffer(n)||!f.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(n===t)return 0;for(var e=n.length,r=t.length,i=0,o=Math.min(e,r);i<o;++i)if(n[i]!==t[i]){e=n[i],r=t[i];break}return e<r?-1:r<e?1:0},f.isEncoding=function(n){switch(String(n).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(n,t){if(!u(n))throw new TypeError('"list" argument must be an Array of Buffers');if(0===n.length)return f.alloc(0);var e;if(void 0===t)for(t=0,e=0;e<n.length;++e)t+=n[e].length;var r=f.allocUnsafe(t),i=0;for(e=0;e<n.length;++e){var o=n[e];if(!f.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},f.byteLength=g,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var n=this.length;if(n%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<n;t+=2)v(this,t,t+1);return this},f.prototype.swap32=function(){var n=this.length;if(n%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<n;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},f.prototype.swap64=function(){var n=this.length;if(n%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<n;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},f.prototype.toString=function(){var n=0|this.length;return 0===n?"":0===arguments.length?E(this,0,n):function(n,t,e){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(t>>>=0))return"";for(n||(n="utf8");;)switch(n){case"hex":return j(this,t,e);case"utf8":case"utf-8":return E(this,t,e);case"ascii":return T(this,t,e);case"latin1":case"binary":return I(this,t,e);case"base64":return R(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,e);default:if(r)throw new TypeError("Unknown encoding: "+n);n=(n+"").toLowerCase(),r=!0}}.apply(this,arguments)},f.prototype.equals=function(n){if(!f.isBuffer(n))throw new TypeError("Argument must be a Buffer");return this===n||0===f.compare(this,n)},f.prototype.inspect=function(){var n="",t=e.INSPECT_MAX_BYTES;return this.length>0&&(n=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(n+=" ... ")),"<Buffer "+n+">"},f.prototype.compare=function(n,t,e,r,i){if(!f.isBuffer(n))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===e&&(e=n?n.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||e>n.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=e)return 0;if(r>=i)return-1;if(t>=e)return 1;if(this===n)return 0;for(var o=(i>>>=0)-(r>>>=0),u=(e>>>=0)-(t>>>=0),a=Math.min(o,u),c=this.slice(r,i),s=n.slice(t,e),l=0;l<a;++l)if(c[l]!==s[l]){o=c[l],u=s[l];break}return o<u?-1:u<o?1:0},f.prototype.includes=function(n,t,e){return-1!==this.indexOf(n,t,e)},f.prototype.indexOf=function(n,t,e){return y(this,n,t,e,!0)},f.prototype.lastIndexOf=function(n,t,e){return y(this,n,t,e,!1)},f.prototype.write=function(n,t,e,r){if(void 0===t)r="utf8",e=this.length,t=0;else if(void 0===e&&"string"==typeof t)r=t,e=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(e)?(e|=0,void 0===r&&(r="utf8")):(r=e,e=void 0)}var i=this.length-t;if((void 0===e||e>i)&&(e=i),n.length>0&&(e<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return w(this,n,t,e);case"utf8":case"utf-8":return b(this,n,t,e);case"ascii":return x(this,n,t,e);case"latin1":case"binary":return A(this,n,t,e);case"base64":return S(this,n,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,n,t,e);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function T(n,t,e){var r="";e=Math.min(n.length,e);for(var i=t;i<e;++i)r+=String.fromCharCode(127&n[i]);return r}function I(n,t,e){var r="";e=Math.min(n.length,e);for(var i=t;i<e;++i)r+=String.fromCharCode(n[i]);return r}function j(n,t,e){var r=n.length;(!t||t<0)&&(t=0),(!e||e<0||e>r)&&(e=r);for(var i="",o=t;o<e;++o)i+=F(n[o]);return i}function D(n,t,e){for(var r=n.slice(t,e),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function P(n,t,e){if(n%1!=0||n<0)throw new RangeError("offset is not uint");if(n+t>e)throw new RangeError("Trying to access beyond buffer length")}function C(n,t,e,r,i,o){if(!f.isBuffer(n))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(e+r>n.length)throw new RangeError("Index out of range")}function M(n,t,e,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(n.length-e,2);i<o;++i)n[e+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function B(n,t,e,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(n.length-e,4);i<o;++i)n[e+i]=t>>>8*(r?i:3-i)&255}function L(n,t,e,r,i,o){if(e+r>n.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function U(n,t,e,r,i){return i||L(n,0,e,4),o.write(n,t,e,r,23,4),e+4}function N(n,t,e,r,i){return i||L(n,0,e,8),o.write(n,t,e,r,52,8),e+8}f.prototype.slice=function(n,t){var e,r=this.length;if((n=~~n)<0?(n+=r)<0&&(n=0):n>r&&(n=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<n&&(t=n),f.TYPED_ARRAY_SUPPORT)(e=this.subarray(n,t)).__proto__=f.prototype;else{var i=t-n;e=new f(i,void 0);for(var o=0;o<i;++o)e[o]=this[o+n]}return e},f.prototype.readUIntLE=function(n,t,e){n|=0,t|=0,e||P(n,t,this.length);for(var r=this[n],i=1,o=0;++o<t&&(i*=256);)r+=this[n+o]*i;return r},f.prototype.readUIntBE=function(n,t,e){n|=0,t|=0,e||P(n,t,this.length);for(var r=this[n+--t],i=1;t>0&&(i*=256);)r+=this[n+--t]*i;return r},f.prototype.readUInt8=function(n,t){return t||P(n,1,this.length),this[n]},f.prototype.readUInt16LE=function(n,t){return t||P(n,2,this.length),this[n]|this[n+1]<<8},f.prototype.readUInt16BE=function(n,t){return t||P(n,2,this.length),this[n]<<8|this[n+1]},f.prototype.readUInt32LE=function(n,t){return t||P(n,4,this.length),(this[n]|this[n+1]<<8|this[n+2]<<16)+16777216*this[n+3]},f.prototype.readUInt32BE=function(n,t){return t||P(n,4,this.length),16777216*this[n]+(this[n+1]<<16|this[n+2]<<8|this[n+3])},f.prototype.readIntLE=function(n,t,e){n|=0,t|=0,e||P(n,t,this.length);for(var r=this[n],i=1,o=0;++o<t&&(i*=256);)r+=this[n+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},f.prototype.readIntBE=function(n,t,e){n|=0,t|=0,e||P(n,t,this.length);for(var r=t,i=1,o=this[n+--r];r>0&&(i*=256);)o+=this[n+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},f.prototype.readInt8=function(n,t){return t||P(n,1,this.length),128&this[n]?-1*(255-this[n]+1):this[n]},f.prototype.readInt16LE=function(n,t){t||P(n,2,this.length);var e=this[n]|this[n+1]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt16BE=function(n,t){t||P(n,2,this.length);var e=this[n+1]|this[n]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt32LE=function(n,t){return t||P(n,4,this.length),this[n]|this[n+1]<<8|this[n+2]<<16|this[n+3]<<24},f.prototype.readInt32BE=function(n,t){return t||P(n,4,this.length),this[n]<<24|this[n+1]<<16|this[n+2]<<8|this[n+3]},f.prototype.readFloatLE=function(n,t){return t||P(n,4,this.length),o.read(this,n,!0,23,4)},f.prototype.readFloatBE=function(n,t){return t||P(n,4,this.length),o.read(this,n,!1,23,4)},f.prototype.readDoubleLE=function(n,t){return t||P(n,8,this.length),o.read(this,n,!0,52,8)},f.prototype.readDoubleBE=function(n,t){return t||P(n,8,this.length),o.read(this,n,!1,52,8)},f.prototype.writeUIntLE=function(n,t,e,r){n=+n,t|=0,e|=0,r||C(this,n,t,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[t]=255&n;++o<e&&(i*=256);)this[t+o]=n/i&255;return t+e},f.prototype.writeUIntBE=function(n,t,e,r){n=+n,t|=0,e|=0,r||C(this,n,t,e,Math.pow(2,8*e)-1,0);var i=e-1,o=1;for(this[t+i]=255&n;--i>=0&&(o*=256);)this[t+i]=n/o&255;return t+e},f.prototype.writeUInt8=function(n,t,e){return n=+n,t|=0,e||C(this,n,t,1,255,0),f.TYPED_ARRAY_SUPPORT||(n=Math.floor(n)),this[t]=255&n,t+1},f.prototype.writeUInt16LE=function(n,t,e){return n=+n,t|=0,e||C(this,n,t,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[t]=255&n,this[t+1]=n>>>8):M(this,n,t,!0),t+2},f.prototype.writeUInt16BE=function(n,t,e){return n=+n,t|=0,e||C(this,n,t,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[t]=n>>>8,this[t+1]=255&n):M(this,n,t,!1),t+2},f.prototype.writeUInt32LE=function(n,t,e){return n=+n,t|=0,e||C(this,n,t,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[t+3]=n>>>24,this[t+2]=n>>>16,this[t+1]=n>>>8,this[t]=255&n):B(this,n,t,!0),t+4},f.prototype.writeUInt32BE=function(n,t,e){return n=+n,t|=0,e||C(this,n,t,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[t]=n>>>24,this[t+1]=n>>>16,this[t+2]=n>>>8,this[t+3]=255&n):B(this,n,t,!1),t+4},f.prototype.writeIntLE=function(n,t,e,r){if(n=+n,t|=0,!r){var i=Math.pow(2,8*e-1);C(this,n,t,e,i-1,-i)}var o=0,u=1,a=0;for(this[t]=255&n;++o<e&&(u*=256);)n<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(n/u>>0)-a&255;return t+e},f.prototype.writeIntBE=function(n,t,e,r){if(n=+n,t|=0,!r){var i=Math.pow(2,8*e-1);C(this,n,t,e,i-1,-i)}var o=e-1,u=1,a=0;for(this[t+o]=255&n;--o>=0&&(u*=256);)n<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(n/u>>0)-a&255;return t+e},f.prototype.writeInt8=function(n,t,e){return n=+n,t|=0,e||C(this,n,t,1,127,-128),f.TYPED_ARRAY_SUPPORT||(n=Math.floor(n)),n<0&&(n=255+n+1),this[t]=255&n,t+1},f.prototype.writeInt16LE=function(n,t,e){return n=+n,t|=0,e||C(this,n,t,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[t]=255&n,this[t+1]=n>>>8):M(this,n,t,!0),t+2},f.prototype.writeInt16BE=function(n,t,e){return n=+n,t|=0,e||C(this,n,t,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[t]=n>>>8,this[t+1]=255&n):M(this,n,t,!1),t+2},f.prototype.writeInt32LE=function(n,t,e){return n=+n,t|=0,e||C(this,n,t,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[t]=255&n,this[t+1]=n>>>8,this[t+2]=n>>>16,this[t+3]=n>>>24):B(this,n,t,!0),t+4},f.prototype.writeInt32BE=function(n,t,e){return n=+n,t|=0,e||C(this,n,t,4,2147483647,-2147483648),n<0&&(n=4294967295+n+1),f.TYPED_ARRAY_SUPPORT?(this[t]=n>>>24,this[t+1]=n>>>16,this[t+2]=n>>>8,this[t+3]=255&n):B(this,n,t,!1),t+4},f.prototype.writeFloatLE=function(n,t,e){return U(this,n,t,!0,e)},f.prototype.writeFloatBE=function(n,t,e){return U(this,n,t,!1,e)},f.prototype.writeDoubleLE=function(n,t,e){return N(this,n,t,!0,e)},f.prototype.writeDoubleBE=function(n,t,e){return N(this,n,t,!1,e)},f.prototype.copy=function(n,t,e,r){if(e||(e=0),r||0===r||(r=this.length),t>=n.length&&(t=n.length),t||(t=0),r>0&&r<e&&(r=e),r===e)return 0;if(0===n.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),n.length-t<r-e&&(r=n.length-t+e);var i,o=r-e;if(this===n&&e<t&&t<r)for(i=o-1;i>=0;--i)n[i+t]=this[i+e];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)n[i+t]=this[i+e];else Uint8Array.prototype.set.call(n,this.subarray(e,e+o),t);return o},f.prototype.fill=function(n,t,e,r){if("string"==typeof n){if("string"==typeof t?(r=t,t=0,e=this.length):"string"==typeof e&&(r=e,e=this.length),1===n.length){var i=n.charCodeAt(0);i<256&&(n=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!f.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof n&&(n&=255);if(t<0||this.length<t||this.length<e)throw new RangeError("Out of range index");if(e<=t)return this;var o;if(t>>>=0,e=void 0===e?this.length:e>>>0,n||(n=0),"number"==typeof n)for(o=t;o<e;++o)this[o]=n;else{var u=f.isBuffer(n)?n:W(new f(n,r).toString()),a=u.length;for(o=0;o<e-t;++o)this[o+t]=u[o%a]}return this};var z=/[^+\/0-9A-Za-z-_]/g;function F(n){return n<16?"0"+n.toString(16):n.toString(16)}function W(n,t){var e;t=t||1/0;for(var r=n.length,i=null,o=[],u=0;u<r;++u){if((e=n.charCodeAt(u))>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(u+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(t-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((t-=1)<0)break;o.push(e)}else if(e<2048){if((t-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((t-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function Y(n){return i.toByteArray(function(n){if((n=function(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")}(n).replace(z,"")).length<2)return"";for(;n.length%4!=0;)n+="=";return n}(n))}function q(n,t,e,r){for(var i=0;i<r&&!(i+e>=t.length||i>=n.length);++i)t[i+e]=n[i];return i}},{"base64-js":"yh9p",ieee754:"JgNJ",isarray:"REa7",buffer:"dskh"}],B1iE:[function(n,t,e){arguments[3],n("buffer").Buffer;var r=arguments[3];n("buffer").Buffer;(function(){var n,i=200,o="Expected a function",u="__lodash_hash_undefined__",a="__lodash_placeholder__",c=1,f=2,s=4,l=1,h=2,p=1,m=2,d=4,g=8,v=16,y=32,_=64,w=128,b=256,x=512,A=800,S=16,k=1/0,R=9007199254740991,E=1.7976931348623157e308,O=NaN,T=4294967295,I=T-1,j=T>>>1,D=[["ary",w],["bind",p],["bindKey",m],["curry",g],["curryRight",v],["flip",x],["partial",y],["partialRight",_],["rearg",b]],P="[object Arguments]",C="[object Array]",M="[object AsyncFunction]",B="[object Boolean]",L="[object Date]",U="[object DOMException]",N="[object Error]",z="[object Function]",F="[object GeneratorFunction]",W="[object Map]",Y="[object Number]",q="[object Null]",$="[object Object]",V="[object Proxy]",G="[object RegExp]",K="[object Set]",H="[object String]",Z="[object Symbol]",J="[object Undefined]",X="[object WeakMap]",Q="[object ArrayBuffer]",nn="[object DataView]",tn="[object Float32Array]",en="[object Float64Array]",rn="[object Int8Array]",on="[object Int16Array]",un="[object Int32Array]",an="[object Uint8Array]",cn="[object Uint8ClampedArray]",fn="[object Uint16Array]",sn="[object Uint32Array]",ln=/\b__p \+= '';/g,hn=/\b(__p \+=) '' \+/g,pn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mn=/&(?:amp|lt|gt|quot|#39);/g,dn=/[&<>"']/g,gn=RegExp(mn.source),vn=RegExp(dn.source),yn=/<%-([\s\S]+?)%>/g,_n=/<%([\s\S]+?)%>/g,wn=/<%=([\s\S]+?)%>/g,bn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xn=/^\w*$/,An=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Sn=/[\\^$.*+?()[\]{}|]/g,kn=RegExp(Sn.source),Rn=/^\s+/,En=/\s/,On=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Tn=/\{\n\/\* \[wrapped with (.+)\] \*/,In=/,? & /,jn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Dn=/[()=,{}\[\]\/\s]/,Pn=/\\(\\)?/g,Cn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Mn=/\w*$/,Bn=/^[-+]0x[0-9a-f]+$/i,Ln=/^0b[01]+$/i,Un=/^\[object .+?Constructor\]$/,Nn=/^0o[0-7]+$/i,zn=/^(?:0|[1-9]\d*)$/,Fn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Wn=/($^)/,Yn=/['\n\r\u2028\u2029\\]/g,qn="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",$n="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Vn="["+$n+"]",Gn="["+qn+"]",Kn="\\d+",Hn="[a-z\\xdf-\\xf6\\xf8-\\xff]",Zn="[^\\ud800-\\udfff"+$n+Kn+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Jn="\\ud83c[\\udffb-\\udfff]",Xn="[^\\ud800-\\udfff]",Qn="(?:\\ud83c[\\udde6-\\uddff]){2}",nt="[\\ud800-\\udbff][\\udc00-\\udfff]",tt="[A-Z\\xc0-\\xd6\\xd8-\\xde]",et="(?:"+Hn+"|"+Zn+")",rt="(?:"+tt+"|"+Zn+")",it="(?:"+Gn+"|"+Jn+")?",ot="[\\ufe0e\\ufe0f]?"+it+"(?:\\u200d(?:"+[Xn,Qn,nt].join("|")+")[\\ufe0e\\ufe0f]?"+it+")*",ut="(?:"+["[\\u2700-\\u27bf]",Qn,nt].join("|")+")"+ot,at="(?:"+[Xn+Gn+"?",Gn,Qn,nt,"[\\ud800-\\udfff]"].join("|")+")",ct=RegExp("['’]","g"),ft=RegExp(Gn,"g"),st=RegExp(Jn+"(?="+Jn+")|"+at+ot,"g"),lt=RegExp([tt+"?"+Hn+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[Vn,tt,"$"].join("|")+")",rt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[Vn,tt+et,"$"].join("|")+")",tt+"?"+et+"+(?:['’](?:d|ll|m|re|s|t|ve))?",tt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Kn,ut].join("|"),"g"),ht=RegExp("[\\u200d\\ud800-\\udfff"+qn+"\\ufe0e\\ufe0f]"),pt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,mt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],dt=-1,gt={};gt[tn]=gt[en]=gt[rn]=gt[on]=gt[un]=gt[an]=gt[cn]=gt[fn]=gt[sn]=!0,gt[P]=gt[C]=gt[Q]=gt[B]=gt[nn]=gt[L]=gt[N]=gt[z]=gt[W]=gt[Y]=gt[$]=gt[G]=gt[K]=gt[H]=gt[X]=!1;var vt={};vt[P]=vt[C]=vt[Q]=vt[nn]=vt[B]=vt[L]=vt[tn]=vt[en]=vt[rn]=vt[on]=vt[un]=vt[W]=vt[Y]=vt[$]=vt[G]=vt[K]=vt[H]=vt[Z]=vt[an]=vt[cn]=vt[fn]=vt[sn]=!0,vt[N]=vt[z]=vt[X]=!1;var yt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},_t=parseFloat,wt=parseInt,bt="object"==typeof r&&r&&r.Object===Object&&r,xt="object"==typeof self&&self&&self.Object===Object&&self,At=bt||xt||Function("return this")(),St="object"==typeof e&&e&&!e.nodeType&&e,kt=St&&"object"==typeof t&&t&&!t.nodeType&&t,Rt=kt&&kt.exports===St,Et=Rt&&bt.process,Ot=function(){try{return kt&&kt.require&&kt.require("util").types||Et&&Et.binding&&Et.binding("util")}catch(r){}}(),Tt=Ot&&Ot.isArrayBuffer,It=Ot&&Ot.isDate,jt=Ot&&Ot.isMap,Dt=Ot&&Ot.isRegExp,Pt=Ot&&Ot.isSet,Ct=Ot&&Ot.isTypedArray;function Mt(n,t,e){switch(e.length){case 0:return n.call(t);case 1:return n.call(t,e[0]);case 2:return n.call(t,e[0],e[1]);case 3:return n.call(t,e[0],e[1],e[2])}return n.apply(t,e)}function Bt(n,t,e,r){for(var i=-1,o=null==n?0:n.length;++i<o;){var u=n[i];t(r,u,e(u),n)}return r}function Lt(n,t){for(var e=-1,r=null==n?0:n.length;++e<r&&!1!==t(n[e],e,n););return n}function Ut(n,t){for(var e=-1,r=null==n?0:n.length;++e<r;)if(!t(n[e],e,n))return!1;return!0}function Nt(n,t){for(var e=-1,r=null==n?0:n.length,i=0,o=[];++e<r;){var u=n[e];t(u,e,n)&&(o[i++]=u)}return o}function zt(n,t){return!(null==n||!n.length)&&Zt(n,t,0)>-1}function Ft(n,t,e){for(var r=-1,i=null==n?0:n.length;++r<i;)if(e(t,n[r]))return!0;return!1}function Wt(n,t){for(var e=-1,r=null==n?0:n.length,i=Array(r);++e<r;)i[e]=t(n[e],e,n);return i}function Yt(n,t){for(var e=-1,r=t.length,i=n.length;++e<r;)n[i+e]=t[e];return n}function qt(n,t,e,r){var i=-1,o=null==n?0:n.length;for(r&&o&&(e=n[++i]);++i<o;)e=t(e,n[i],i,n);return e}function $t(n,t,e,r){var i=null==n?0:n.length;for(r&&i&&(e=n[--i]);i--;)e=t(e,n[i],i,n);return e}function Vt(n,t){for(var e=-1,r=null==n?0:n.length;++e<r;)if(t(n[e],e,n))return!0;return!1}var Gt=ne("length");function Kt(n,t,e){var r;return e(n,function(n,e,i){if(t(n,e,i))return r=e,!1}),r}function Ht(n,t,e,r){for(var i=n.length,o=e+(r?1:-1);r?o--:++o<i;)if(t(n[o],o,n))return o;return-1}function Zt(n,t,e){return t==t?function(n,t,e){for(var r=e-1,i=n.length;++r<i;)if(n[r]===t)return r;return-1}(n,t,e):Ht(n,Xt,e)}function Jt(n,t,e,r){for(var i=e-1,o=n.length;++i<o;)if(r(n[i],t))return i;return-1}function Xt(n){return n!=n}function Qt(n,t){var e=null==n?0:n.length;return e?re(n,t)/e:O}function ne(t){return function(e){return null==e?n:e[t]}}function te(t){return function(e){return null==t?n:t[e]}}function ee(n,t,e,r,i){return i(n,function(n,i,o){e=r?(r=!1,n):t(e,n,i,o)}),e}function re(t,e){for(var r,i=-1,o=t.length;++i<o;){var u=e(t[i]);u!==n&&(r=r===n?u:r+u)}return r}function ie(n,t){for(var e=-1,r=Array(n);++e<n;)r[e]=t(e);return r}function oe(n){return n?n.slice(0,be(n)+1).replace(Rn,""):n}function ue(n){return function(t){return n(t)}}function ae(n,t){return Wt(t,function(t){return n[t]})}function ce(n,t){return n.has(t)}function fe(n,t){for(var e=-1,r=n.length;++e<r&&Zt(t,n[e],0)>-1;);return e}function se(n,t){for(var e=n.length;e--&&Zt(t,n[e],0)>-1;);return e}var le=te({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),he=te({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function pe(n){return"\\"+yt[n]}function me(n){return ht.test(n)}function de(n){var t=-1,e=Array(n.size);return n.forEach(function(n,r){e[++t]=[r,n]}),e}function ge(n,t){return function(e){return n(t(e))}}function ve(n,t){for(var e=-1,r=n.length,i=0,o=[];++e<r;){var u=n[e];u!==t&&u!==a||(n[e]=a,o[i++]=e)}return o}function ye(n){var t=-1,e=Array(n.size);return n.forEach(function(n){e[++t]=n}),e}function _e(n){return me(n)?function(n){for(var t=st.lastIndex=0;st.test(n);)++t;return t}(n):Gt(n)}function we(n){return me(n)?function(n){return n.match(st)||[]}(n):function(n){return n.split("")}(n)}function be(n){for(var t=n.length;t--&&En.test(n.charAt(t)););return t}var xe=te({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),Ae=function t(e){var r,En=(e=null==e?At:Ae.defaults(At.Object(),e,Ae.pick(At,mt))).Array,qn=e.Date,$n=e.Error,Vn=e.Function,Gn=e.Math,Kn=e.Object,Hn=e.RegExp,Zn=e.String,Jn=e.TypeError,Xn=En.prototype,Qn=Vn.prototype,nt=Kn.prototype,tt=e["__core-js_shared__"],et=Qn.toString,rt=nt.hasOwnProperty,it=0,ot=(r=/[^.]+$/.exec(tt&&tt.keys&&tt.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",ut=nt.toString,at=et.call(Kn),st=At._,ht=Hn("^"+et.call(rt).replace(Sn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),yt=Rt?e.Buffer:n,bt=e.Symbol,xt=e.Uint8Array,St=yt?yt.allocUnsafe:n,kt=ge(Kn.getPrototypeOf,Kn),Et=Kn.create,Ot=nt.propertyIsEnumerable,Gt=Xn.splice,te=bt?bt.isConcatSpreadable:n,Se=bt?bt.iterator:n,ke=bt?bt.toStringTag:n,Re=function(){try{var n=ko(Kn,"defineProperty");return n({},"",{}),n}catch(e){}}(),Ee=e.clearTimeout!==At.clearTimeout&&e.clearTimeout,Oe=qn&&qn.now!==At.Date.now&&qn.now,Te=e.setTimeout!==At.setTimeout&&e.setTimeout,Ie=Gn.ceil,je=Gn.floor,De=Kn.getOwnPropertySymbols,Pe=yt?yt.isBuffer:n,Ce=e.isFinite,Me=Xn.join,Be=ge(Kn.keys,Kn),Le=Gn.max,Ue=Gn.min,Ne=qn.now,ze=e.parseInt,Fe=Gn.random,We=Xn.reverse,Ye=ko(e,"DataView"),qe=ko(e,"Map"),$e=ko(e,"Promise"),Ve=ko(e,"Set"),Ge=ko(e,"WeakMap"),Ke=ko(Kn,"create"),He=Ge&&new Ge,Ze={},Je=Jo(Ye),Xe=Jo(qe),Qe=Jo($e),nr=Jo(Ve),tr=Jo(Ge),er=bt?bt.prototype:n,rr=er?er.valueOf:n,ir=er?er.toString:n;function or(n){if(ma(n)&&!ra(n)&&!(n instanceof fr)){if(n instanceof cr)return n;if(rt.call(n,"__wrapped__"))return Xo(n)}return new cr(n)}var ur=function(){function t(){}return function(e){if(!pa(e))return{};if(Et)return Et(e);t.prototype=e;var r=new t;return t.prototype=n,r}}();function ar(){}function cr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=n}function fr(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=T,this.__views__=[]}function sr(n){var t=-1,e=null==n?0:n.length;for(this.clear();++t<e;){var r=n[t];this.set(r[0],r[1])}}function lr(n){var t=-1,e=null==n?0:n.length;for(this.clear();++t<e;){var r=n[t];this.set(r[0],r[1])}}function hr(n){var t=-1,e=null==n?0:n.length;for(this.clear();++t<e;){var r=n[t];this.set(r[0],r[1])}}function pr(n){var t=-1,e=null==n?0:n.length;for(this.__data__=new hr;++t<e;)this.add(n[t])}function mr(n){var t=this.__data__=new lr(n);this.size=t.size}function dr(n,t){var e=ra(n),r=!e&&ea(n),i=!e&&!r&&aa(n),o=!e&&!r&&!i&&xa(n),u=e||r||i||o,a=u?ie(n.length,Zn):[],c=a.length;for(var f in n)!t&&!rt.call(n,f)||u&&("length"==f||i&&("offset"==f||"parent"==f)||o&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||Do(f,c))||a.push(f);return a}function gr(t){var e=t.length;return e?t[si(0,e-1)]:n}function vr(t,e,r){(r===n||Qu(t[e],r))&&(r!==n||e in t)||xr(t,e,r)}function yr(t,e,r){var i=t[e];rt.call(t,e)&&Qu(i,r)&&(r!==n||e in t)||xr(t,e,r)}function _r(n,t){for(var e=n.length;e--;)if(Qu(n[e][0],t))return e;return-1}function wr(n,t,e,r){return Tr(n,function(n,i,o){t(r,n,e(n),o)}),r}function br(n,t){return n&&Yi(t,qa(t),n)}function xr(n,t,e){"__proto__"==t&&Re?Re(n,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):n[t]=e}function Ar(t,e){for(var r=-1,i=e.length,o=En(i),u=null==t;++r<i;)o[r]=u?n:Na(t,e[r]);return o}function Sr(t,e,r){return t==t&&(r!==n&&(t=t<=r?t:r),e!==n&&(t=t>=e?t:e)),t}function kr(t,e,r,i,o,u){var a,l=e&c,h=e&f,p=e&s;if(r&&(a=o?r(t,i,o,u):r(t)),a!==n)return a;if(!pa(t))return t;var m=ra(t);if(m){if(a=function(n){var t=n.length,e=new n.constructor(t);return t&&"string"==typeof n[0]&&rt.call(n,"index")&&(e.index=n.index,e.input=n.input),e}(t),!l)return Wi(t,a)}else{var d=Oo(t),g=d==z||d==F;if(aa(t))return Bi(t,l);if(d==$||d==P||g&&!o){if(a=h||g?{}:Io(t),!l)return h?function(n,t){return Yi(n,Eo(n),t)}(t,function(n,t){return n&&Yi(t,$a(t),n)}(a,t)):function(n,t){return Yi(n,Ro(n),t)}(t,br(a,t))}else{if(!vt[d])return o?t:{};a=function(n,t,e){var r,i,o,u=n.constructor;switch(t){case Q:return Li(n);case B:case L:return new u(+n);case nn:return function(n,t){var e=t?Li(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.byteLength)}(n,e);case tn:case en:case rn:case on:case un:case an:case cn:case fn:case sn:return Ui(n,e);case W:return new u;case Y:case H:return new u(n);case G:return(o=new(i=n).constructor(i.source,Mn.exec(i))).lastIndex=i.lastIndex,o;case K:return new u;case Z:return r=n,rr?Kn(rr.call(r)):{}}}(t,d,l)}}u||(u=new mr);var v=u.get(t);if(v)return v;u.set(t,a),_a(t)?t.forEach(function(n){a.add(kr(n,e,r,n,t,u))}):da(t)&&t.forEach(function(n,i){a.set(i,kr(n,e,r,i,t,u))});var y=m?n:(p?h?yo:vo:h?$a:qa)(t);return Lt(y||t,function(n,i){y&&(n=t[i=n]),yr(a,i,kr(n,e,r,i,t,u))}),a}function Rr(t,e,r){var i=r.length;if(null==t)return!i;for(t=Kn(t);i--;){var o=r[i],u=e[o],a=t[o];if(a===n&&!(o in t)||!u(a))return!1}return!0}function Er(t,e,r){if("function"!=typeof t)throw new Jn(o);return qo(function(){t.apply(n,r)},e)}function Or(n,t,e,r){var o=-1,u=zt,a=!0,c=n.length,f=[],s=t.length;if(!c)return f;e&&(t=Wt(t,ue(e))),r?(u=Ft,a=!1):t.length>=i&&(u=ce,a=!1,t=new pr(t));n:for(;++o<c;){var l=n[o],h=null==e?l:e(l);if(l=r||0!==l?l:0,a&&h==h){for(var p=s;p--;)if(t[p]===h)continue n;f.push(l)}else u(t,h,r)||f.push(l)}return f}or.templateSettings={escape:yn,evaluate:_n,interpolate:wn,variable:"",imports:{_:or}},or.prototype=ar.prototype,or.prototype.constructor=or,cr.prototype=ur(ar.prototype),cr.prototype.constructor=cr,fr.prototype=ur(ar.prototype),fr.prototype.constructor=fr,sr.prototype.clear=function(){this.__data__=Ke?Ke(null):{},this.size=0},sr.prototype.delete=function(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t},sr.prototype.get=function(t){var e=this.__data__;if(Ke){var r=e[t];return r===u?n:r}return rt.call(e,t)?e[t]:n},sr.prototype.has=function(t){var e=this.__data__;return Ke?e[t]!==n:rt.call(e,t)},sr.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ke&&e===n?u:e,this},lr.prototype.clear=function(){this.__data__=[],this.size=0},lr.prototype.delete=function(n){var t=this.__data__,e=_r(t,n);return!(e<0||(e==t.length-1?t.pop():Gt.call(t,e,1),--this.size,0))},lr.prototype.get=function(t){var e=this.__data__,r=_r(e,t);return r<0?n:e[r][1]},lr.prototype.has=function(n){return _r(this.__data__,n)>-1},lr.prototype.set=function(n,t){var e=this.__data__,r=_r(e,n);return r<0?(++this.size,e.push([n,t])):e[r][1]=t,this},hr.prototype.clear=function(){this.size=0,this.__data__={hash:new sr,map:new(qe||lr),string:new sr}},hr.prototype.delete=function(n){var t=Ao(this,n).delete(n);return this.size-=t?1:0,t},hr.prototype.get=function(n){return Ao(this,n).get(n)},hr.prototype.has=function(n){return Ao(this,n).has(n)},hr.prototype.set=function(n,t){var e=Ao(this,n),r=e.size;return e.set(n,t),this.size+=e.size==r?0:1,this},pr.prototype.add=pr.prototype.push=function(n){return this.__data__.set(n,u),this},pr.prototype.has=function(n){return this.__data__.has(n)},mr.prototype.clear=function(){this.__data__=new lr,this.size=0},mr.prototype.delete=function(n){var t=this.__data__,e=t.delete(n);return this.size=t.size,e},mr.prototype.get=function(n){return this.__data__.get(n)},mr.prototype.has=function(n){return this.__data__.has(n)},mr.prototype.set=function(n,t){var e=this.__data__;if(e instanceof lr){var r=e.__data__;if(!qe||r.length<i-1)return r.push([n,t]),this.size=++e.size,this;e=this.__data__=new hr(r)}return e.set(n,t),this.size=e.size,this};var Tr=Vi(Lr),Ir=Vi(Ur,!0);function jr(n,t){var e=!0;return Tr(n,function(n,r,i){return e=!!t(n,r,i)}),e}function Dr(t,e,r){for(var i=-1,o=t.length;++i<o;){var u=t[i],a=e(u);if(null!=a&&(c===n?a==a&&!ba(a):r(a,c)))var c=a,f=u}return f}function Pr(n,t){var e=[];return Tr(n,function(n,r,i){t(n,r,i)&&e.push(n)}),e}function Cr(n,t,e,r,i){var o=-1,u=n.length;for(e||(e=jo),i||(i=[]);++o<u;){var a=n[o];t>0&&e(a)?t>1?Cr(a,t-1,e,r,i):Yt(i,a):r||(i[i.length]=a)}return i}var Mr=Gi(),Br=Gi(!0);function Lr(n,t){return n&&Mr(n,t,qa)}function Ur(n,t){return n&&Br(n,t,qa)}function Nr(n,t){return Nt(t,function(t){return sa(n[t])})}function zr(t,e){for(var r=0,i=(e=Di(e,t)).length;null!=t&&r<i;)t=t[Zo(e[r++])];return r&&r==i?t:n}function Fr(n,t,e){var r=t(n);return ra(n)?r:Yt(r,e(n))}function Wr(t){return null==t?t===n?J:q:ke&&ke in Kn(t)?function(t){var e=rt.call(t,ke),r=t[ke];try{t[ke]=n;var i=!0}catch(u){}var o=ut.call(t);return i&&(e?t[ke]=r:delete t[ke]),o}(t):function(n){return ut.call(n)}(t)}function Yr(n,t){return n>t}function qr(n,t){return null!=n&&rt.call(n,t)}function $r(n,t){return null!=n&&t in Kn(n)}function Vr(t,e,r){for(var i=r?Ft:zt,o=t[0].length,u=t.length,a=u,c=En(u),f=1/0,s=[];a--;){var l=t[a];a&&e&&(l=Wt(l,ue(e))),f=Ue(l.length,f),c[a]=!r&&(e||o>=120&&l.length>=120)?new pr(a&&l):n}l=t[0];var h=-1,p=c[0];n:for(;++h<o&&s.length<f;){var m=l[h],d=e?e(m):m;if(m=r||0!==m?m:0,!(p?ce(p,d):i(s,d,r))){for(a=u;--a;){var g=c[a];if(!(g?ce(g,d):i(t[a],d,r)))continue n}p&&p.push(d),s.push(m)}}return s}function Gr(t,e,r){var i=null==(t=Fo(t,e=Di(e,t)))?t:t[Zo(fu(e))];return null==i?n:Mt(i,t,r)}function Kr(n){return ma(n)&&Wr(n)==P}function Hr(t,e,r,i,o){return t===e||(null==t||null==e||!ma(t)&&!ma(e)?t!=t&&e!=e:function(t,e,r,i,o,u){var a=ra(t),c=ra(e),f=a?C:Oo(t),s=c?C:Oo(e),p=(f=f==P?$:f)==$,m=(s=s==P?$:s)==$,d=f==s;if(d&&aa(t)){if(!aa(e))return!1;a=!0,p=!1}if(d&&!p)return u||(u=new mr),a||xa(t)?mo(t,e,r,i,o,u):function(n,t,e,r,i,o,u){switch(e){case nn:if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)return!1;n=n.buffer,t=t.buffer;case Q:return!(n.byteLength!=t.byteLength||!o(new xt(n),new xt(t)));case B:case L:case Y:return Qu(+n,+t);case N:return n.name==t.name&&n.message==t.message;case G:case H:return n==t+"";case W:var a=de;case K:var c=r&l;if(a||(a=ye),n.size!=t.size&&!c)return!1;var f=u.get(n);if(f)return f==t;r|=h,u.set(n,t);var s=mo(a(n),a(t),r,i,o,u);return u.delete(n),s;case Z:if(rr)return rr.call(n)==rr.call(t)}return!1}(t,e,f,r,i,o,u);if(!(r&l)){var g=p&&rt.call(t,"__wrapped__"),v=m&&rt.call(e,"__wrapped__");if(g||v){var y=g?t.value():t,_=v?e.value():e;return u||(u=new mr),o(y,_,r,i,u)}}return!!d&&(u||(u=new mr),function(t,e,r,i,o,u){var a=r&l,c=vo(t),f=c.length;if(f!=vo(e).length&&!a)return!1;for(var s=f;s--;){var h=c[s];if(!(a?h in e:rt.call(e,h)))return!1}var p=u.get(t),m=u.get(e);if(p&&m)return p==e&&m==t;var d=!0;u.set(t,e),u.set(e,t);for(var g=a;++s<f;){var v=t[h=c[s]],y=e[h];if(i)var _=a?i(y,v,h,e,t,u):i(v,y,h,t,e,u);if(!(_===n?v===y||o(v,y,r,i,u):_)){d=!1;break}g||(g="constructor"==h)}if(d&&!g){var w=t.constructor,b=e.constructor;w!=b&&"constructor"in t&&"constructor"in e&&!("function"==typeof w&&w instanceof w&&"function"==typeof b&&b instanceof b)&&(d=!1)}return u.delete(t),u.delete(e),d}(t,e,r,i,o,u))}(t,e,r,i,Hr,o))}function Zr(t,e,r,i){var o=r.length,u=o,a=!i;if(null==t)return!u;for(t=Kn(t);o--;){var c=r[o];if(a&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++o<u;){var f=(c=r[o])[0],s=t[f],p=c[1];if(a&&c[2]){if(s===n&&!(f in t))return!1}else{var m=new mr;if(i)var d=i(s,p,f,t,e,m);if(!(d===n?Hr(p,s,l|h,i,m):d))return!1}}return!0}function Jr(n){return!(!pa(n)||(t=n,ot&&ot in t))&&(sa(n)?ht:Un).test(Jo(n));var t}function Xr(n){return"function"==typeof n?n:null==n?gc:"object"==typeof n?ra(n)?ri(n[0],n[1]):ei(n):kc(n)}function Qr(n){if(!Lo(n))return Be(n);var t=[];for(var e in Kn(n))rt.call(n,e)&&"constructor"!=e&&t.push(e);return t}function ni(n,t){return n<t}function ti(n,t){var e=-1,r=oa(n)?En(n.length):[];return Tr(n,function(n,i,o){r[++e]=t(n,i,o)}),r}function ei(n){var t=So(n);return 1==t.length&&t[0][2]?No(t[0][0],t[0][1]):function(e){return e===n||Zr(e,n,t)}}function ri(t,e){return Co(t)&&Uo(e)?No(Zo(t),e):function(r){var i=Na(r,t);return i===n&&i===e?za(r,t):Hr(e,i,l|h)}}function ii(t,e,r,i,o){t!==e&&Mr(e,function(u,a){if(o||(o=new mr),pa(u))!function(t,e,r,i,o,u,a){var c=Wo(t,r),f=Wo(e,r),s=a.get(f);if(s)vr(t,r,s);else{var l=u?u(c,f,r+"",t,e,a):n,h=l===n;if(h){var p=ra(f),m=!p&&aa(f),d=!p&&!m&&xa(f);l=f,p||m||d?ra(c)?l=c:ua(c)?l=Wi(c):m?(h=!1,l=Bi(f,!0)):d?(h=!1,l=Ui(f,!0)):l=[]:va(f)||ea(f)?(l=c,ea(c)?l=Ia(c):pa(c)&&!sa(c)||(l=Io(f))):h=!1}h&&(a.set(f,l),o(l,f,i,u,a),a.delete(f)),vr(t,r,l)}}(t,e,a,r,ii,i,o);else{var c=i?i(Wo(t,a),u,a+"",t,e,o):n;c===n&&(c=u),vr(t,a,c)}},$a)}function oi(t,e){var r=t.length;if(r)return Do(e+=e<0?r:0,r)?t[e]:n}function ui(n,t,e){t=t.length?Wt(t,function(n){return ra(n)?function(t){return zr(t,1===n.length?n[0]:n)}:n}):[gc];var r=-1;return t=Wt(t,ue(xo())),function(n,t){var e=n.length;for(n.sort(t);e--;)n[e]=n[e].value;return n}(ti(n,function(n,e,i){return{criteria:Wt(t,function(t){return t(n)}),index:++r,value:n}}),function(n,t){return function(n,t,e){for(var r=-1,i=n.criteria,o=t.criteria,u=i.length,a=e.length;++r<u;){var c=Ni(i[r],o[r]);if(c)return r>=a?c:c*("desc"==e[r]?-1:1)}return n.index-t.index}(n,t,e)})}function ai(n,t,e){for(var r=-1,i=t.length,o={};++r<i;){var u=t[r],a=zr(n,u);e(a,u)&&pi(o,Di(u,n),a)}return o}function ci(n,t,e,r){var i=r?Jt:Zt,o=-1,u=t.length,a=n;for(n===t&&(t=Wi(t)),e&&(a=Wt(n,ue(e)));++o<u;)for(var c=0,f=t[o],s=e?e(f):f;(c=i(a,s,c,r))>-1;)a!==n&&Gt.call(a,c,1),Gt.call(n,c,1);return n}function fi(n,t){for(var e=n?t.length:0,r=e-1;e--;){var i=t[e];if(e==r||i!==o){var o=i;Do(i)?Gt.call(n,i,1):Si(n,i)}}return n}function si(n,t){return n+je(Fe()*(t-n+1))}function li(n,t){var e="";if(!n||t<1||t>R)return e;do{t%2&&(e+=n),(t=je(t/2))&&(n+=n)}while(t);return e}function hi(n,t){return $o(zo(n,t,gc),n+"")}function pi(t,e,r,i){if(!pa(t))return t;for(var o=-1,u=(e=Di(e,t)).length,a=u-1,c=t;null!=c&&++o<u;){var f=Zo(e[o]),s=r;if("__proto__"===f||"constructor"===f||"prototype"===f)return t;if(o!=a){var l=c[f];(s=i?i(l,f,c):n)===n&&(s=pa(l)?l:Do(e[o+1])?[]:{})}yr(c,f,s),c=c[f]}return t}var mi=He?function(n,t){return He.set(n,t),n}:gc,di=Re?function(n,t){return Re(n,"toString",{configurable:!0,enumerable:!1,value:pc(t),writable:!0})}:gc;function gi(n,t,e){var r=-1,i=n.length;t<0&&(t=-t>i?0:i+t),(e=e>i?i:e)<0&&(e+=i),i=t>e?0:e-t>>>0,t>>>=0;for(var o=En(i);++r<i;)o[r]=n[r+t];return o}function vi(n,t){var e;return Tr(n,function(n,r,i){return!(e=t(n,r,i))}),!!e}function yi(n,t,e){var r=0,i=null==n?r:n.length;if("number"==typeof t&&t==t&&i<=j){for(;r<i;){var o=r+i>>>1,u=n[o];null!==u&&!ba(u)&&(e?u<=t:u<t)?r=o+1:i=o}return i}return _i(n,t,gc,e)}function _i(t,e,r,i){var o=0,u=null==t?0:t.length;if(0===u)return 0;for(var a=(e=r(e))!=e,c=null===e,f=ba(e),s=e===n;o<u;){var l=je((o+u)/2),h=r(t[l]),p=h!==n,m=null===h,d=h==h,g=ba(h);if(a)var v=i||d;else v=s?d&&(i||p):c?d&&p&&(i||!m):f?d&&p&&!m&&(i||!g):!m&&!g&&(i?h<=e:h<e);v?o=l+1:u=l}return Ue(u,I)}function wi(n,t){for(var e=-1,r=n.length,i=0,o=[];++e<r;){var u=n[e],a=t?t(u):u;if(!e||!Qu(a,c)){var c=a;o[i++]=0===u?0:u}}return o}function bi(n){return"number"==typeof n?n:ba(n)?O:+n}function xi(n){if("string"==typeof n)return n;if(ra(n))return Wt(n,xi)+"";if(ba(n))return ir?ir.call(n):"";var t=n+"";return"0"==t&&1/n==-k?"-0":t}function Ai(n,t,e){var r=-1,o=zt,u=n.length,a=!0,c=[],f=c;if(e)a=!1,o=Ft;else if(u>=i){var s=t?null:co(n);if(s)return ye(s);a=!1,o=ce,f=new pr}else f=t?[]:c;n:for(;++r<u;){var l=n[r],h=t?t(l):l;if(l=e||0!==l?l:0,a&&h==h){for(var p=f.length;p--;)if(f[p]===h)continue n;t&&f.push(h),c.push(l)}else o(f,h,e)||(f!==c&&f.push(h),c.push(l))}return c}function Si(n,t){return null==(n=Fo(n,t=Di(t,n)))||delete n[Zo(fu(t))]}function ki(n,t,e,r){return pi(n,t,e(zr(n,t)),r)}function Ri(n,t,e,r){for(var i=n.length,o=r?i:-1;(r?o--:++o<i)&&t(n[o],o,n););return e?gi(n,r?0:o,r?o+1:i):gi(n,r?o+1:0,r?i:o)}function Ei(n,t){var e=n;return e instanceof fr&&(e=e.value()),qt(t,function(n,t){return t.func.apply(t.thisArg,Yt([n],t.args))},e)}function Oi(n,t,e){var r=n.length;if(r<2)return r?Ai(n[0]):[];for(var i=-1,o=En(r);++i<r;)for(var u=n[i],a=-1;++a<r;)a!=i&&(o[i]=Or(o[i]||u,n[a],t,e));return Ai(Cr(o,1),t,e)}function Ti(t,e,r){for(var i=-1,o=t.length,u=e.length,a={};++i<o;){var c=i<u?e[i]:n;r(a,t[i],c)}return a}function Ii(n){return ua(n)?n:[]}function ji(n){return"function"==typeof n?n:gc}function Di(n,t){return ra(n)?n:Co(n,t)?[n]:Ho(ja(n))}var Pi=hi;function Ci(t,e,r){var i=t.length;return r=r===n?i:r,!e&&r>=i?t:gi(t,e,r)}var Mi=Ee||function(n){return At.clearTimeout(n)};function Bi(n,t){if(t)return n.slice();var e=n.length,r=St?St(e):new n.constructor(e);return n.copy(r),r}function Li(n){var t=new n.constructor(n.byteLength);return new xt(t).set(new xt(n)),t}function Ui(n,t){var e=t?Li(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.length)}function Ni(t,e){if(t!==e){var r=t!==n,i=null===t,o=t==t,u=ba(t),a=e!==n,c=null===e,f=e==e,s=ba(e);if(!c&&!s&&!u&&t>e||u&&a&&f&&!c&&!s||i&&a&&f||!r&&f||!o)return 1;if(!i&&!u&&!s&&t<e||s&&r&&o&&!i&&!u||c&&r&&o||!a&&o||!f)return-1}return 0}function zi(n,t,e,r){for(var i=-1,o=n.length,u=e.length,a=-1,c=t.length,f=Le(o-u,0),s=En(c+f),l=!r;++a<c;)s[a]=t[a];for(;++i<u;)(l||i<o)&&(s[e[i]]=n[i]);for(;f--;)s[a++]=n[i++];return s}function Fi(n,t,e,r){for(var i=-1,o=n.length,u=-1,a=e.length,c=-1,f=t.length,s=Le(o-a,0),l=En(s+f),h=!r;++i<s;)l[i]=n[i];for(var p=i;++c<f;)l[p+c]=t[c];for(;++u<a;)(h||i<o)&&(l[p+e[u]]=n[i++]);return l}function Wi(n,t){var e=-1,r=n.length;for(t||(t=En(r));++e<r;)t[e]=n[e];return t}function Yi(t,e,r,i){var o=!r;r||(r={});for(var u=-1,a=e.length;++u<a;){var c=e[u],f=i?i(r[c],t[c],c,r,t):n;f===n&&(f=t[c]),o?xr(r,c,f):yr(r,c,f)}return r}function qi(n,t){return function(e,r){var i=ra(e)?Bt:wr,o=t?t():{};return i(e,n,xo(r,2),o)}}function $i(t){return hi(function(e,r){var i=-1,o=r.length,u=o>1?r[o-1]:n,a=o>2?r[2]:n;for(u=t.length>3&&"function"==typeof u?(o--,u):n,a&&Po(r[0],r[1],a)&&(u=o<3?n:u,o=1),e=Kn(e);++i<o;){var c=r[i];c&&t(e,c,i,u)}return e})}function Vi(n,t){return function(e,r){if(null==e)return e;if(!oa(e))return n(e,r);for(var i=e.length,o=t?i:-1,u=Kn(e);(t?o--:++o<i)&&!1!==r(u[o],o,u););return e}}function Gi(n){return function(t,e,r){for(var i=-1,o=Kn(t),u=r(t),a=u.length;a--;){var c=u[n?a:++i];if(!1===e(o[c],c,o))break}return t}}function Ki(t){return function(e){var r=me(e=ja(e))?we(e):n,i=r?r[0]:e.charAt(0),o=r?Ci(r,1).join(""):e.slice(1);return i[t]()+o}}function Hi(n){return function(t){return qt(sc(ec(t).replace(ct,"")),n,"")}}function Zi(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var e=ur(n.prototype),r=n.apply(e,t);return pa(r)?r:e}}function Ji(t){return function(e,r,i){var o=Kn(e);if(!oa(e)){var u=xo(r,3);e=qa(e),r=function(n){return u(o[n],n,o)}}var a=t(e,r,i);return a>-1?o[u?e[a]:a]:n}}function Xi(t){return go(function(e){var r=e.length,i=r,u=cr.prototype.thru;for(t&&e.reverse();i--;){var a=e[i];if("function"!=typeof a)throw new Jn(o);if(u&&!c&&"wrapper"==wo(a))var c=new cr([],!0)}for(i=c?i:r;++i<r;){var f=wo(a=e[i]),s="wrapper"==f?_o(a):n;c=s&&Mo(s[0])&&s[1]==(w|g|y|b)&&!s[4].length&&1==s[9]?c[wo(s[0])].apply(c,s[3]):1==a.length&&Mo(a)?c[f]():c.thru(a)}return function(){var n=arguments,t=n[0];if(c&&1==n.length&&ra(t))return c.plant(t).value();for(var i=0,o=r?e[i].apply(this,n):t;++i<r;)o=e[i].call(this,o);return o}})}function Qi(t,e,r,i,o,u,a,c,f,s){var l=e&w,h=e&p,d=e&m,y=e&(g|v),_=e&x,b=d?n:Zi(t);return function p(){for(var m=arguments.length,g=En(m),v=m;v--;)g[v]=arguments[v];if(y)var w=bo(p),x=function(n,t){for(var e=n.length,r=0;e--;)n[e]===t&&++r;return r}(g,w);if(i&&(g=zi(g,i,o,y)),u&&(g=Fi(g,u,a,y)),m-=x,y&&m<s){var A=ve(g,w);return uo(t,e,Qi,p.placeholder,r,g,A,c,f,s-m)}var S=h?r:this,k=d?S[t]:t;return m=g.length,c?g=function(t,e){for(var r=t.length,i=Ue(e.length,r),o=Wi(t);i--;){var u=e[i];t[i]=Do(u,r)?o[u]:n}return t}(g,c):_&&m>1&&g.reverse(),l&&f<m&&(g.length=f),this&&this!==At&&this instanceof p&&(k=b||Zi(k)),k.apply(S,g)}}function no(n,t){return function(e,r){return function(n,t,e,r){return Lr(n,function(n,i,o){t(r,e(n),i,o)}),r}(e,n,t(r),{})}}function to(t,e){return function(r,i){var o;if(r===n&&i===n)return e;if(r!==n&&(o=r),i!==n){if(o===n)return i;"string"==typeof r||"string"==typeof i?(r=xi(r),i=xi(i)):(r=bi(r),i=bi(i)),o=t(r,i)}return o}}function eo(n){return go(function(t){return t=Wt(t,ue(xo())),hi(function(e){var r=this;return n(t,function(n){return Mt(n,r,e)})})})}function ro(t,e){var r=(e=e===n?" ":xi(e)).length;if(r<2)return r?li(e,t):e;var i=li(e,Ie(t/_e(e)));return me(e)?Ci(we(i),0,t).join(""):i.slice(0,t)}function io(t){return function(e,r,i){return i&&"number"!=typeof i&&Po(e,r,i)&&(r=i=n),e=Ra(e),r===n?(r=e,e=0):r=Ra(r),function(n,t,e,r){for(var i=-1,o=Le(Ie((t-n)/(e||1)),0),u=En(o);o--;)u[r?o:++i]=n,n+=e;return u}(e,r,i=i===n?e<r?1:-1:Ra(i),t)}}function oo(n){return function(t,e){return"string"==typeof t&&"string"==typeof e||(t=Ta(t),e=Ta(e)),n(t,e)}}function uo(t,e,r,i,o,u,a,c,f,s){var l=e&g;e|=l?y:_,(e&=~(l?_:y))&d||(e&=~(p|m));var h=[t,e,o,l?u:n,l?a:n,l?n:u,l?n:a,c,f,s],v=r.apply(n,h);return Mo(t)&&Yo(v,h),v.placeholder=i,Vo(v,t,e)}function ao(n){var t=Gn[n];return function(n,e){if(n=Ta(n),(e=null==e?0:Ue(Ea(e),292))&&Ce(n)){var r=(ja(n)+"e").split("e");return+((r=(ja(t(r[0]+"e"+(+r[1]+e)))+"e").split("e"))[0]+"e"+(+r[1]-e))}return t(n)}}var co=Ve&&1/ye(new Ve([,-0]))[1]==k?function(n){return new Ve(n)}:bc;function fo(n){return function(t){var e=Oo(t);return e==W?de(t):e==K?function(n){var t=-1,e=Array(n.size);return n.forEach(function(n){e[++t]=[n,n]}),e}(t):function(n,t){return Wt(t,function(t){return[t,n[t]]})}(t,n(t))}}function so(t,e,r,i,u,c,f,s){var l=e&m;if(!l&&"function"!=typeof t)throw new Jn(o);var h=i?i.length:0;if(h||(e&=~(y|_),i=u=n),f=f===n?f:Le(Ea(f),0),s=s===n?s:Ea(s),h-=u?u.length:0,e&_){var x=i,A=u;i=u=n}var S=l?n:_o(t),k=[t,e,r,i,u,x,A,c,f,s];if(S&&function(n,t){var e=n[1],r=t[1],i=e|r,o=i<(p|m|w),u=r==w&&e==g||r==w&&e==b&&n[7].length<=t[8]||r==(w|b)&&t[7].length<=t[8]&&e==g;if(!o&&!u)return n;r&p&&(n[2]=t[2],i|=e&p?0:d);var c=t[3];if(c){var f=n[3];n[3]=f?zi(f,c,t[4]):c,n[4]=f?ve(n[3],a):t[4]}(c=t[5])&&(f=n[5],n[5]=f?Fi(f,c,t[6]):c,n[6]=f?ve(n[5],a):t[6]),(c=t[7])&&(n[7]=c),r&w&&(n[8]=null==n[8]?t[8]:Ue(n[8],t[8])),null==n[9]&&(n[9]=t[9]),n[0]=t[0],n[1]=i}(k,S),t=k[0],e=k[1],r=k[2],i=k[3],u=k[4],!(s=k[9]=k[9]===n?l?0:t.length:Le(k[9]-h,0))&&e&(g|v)&&(e&=~(g|v)),e&&e!=p)R=e==g||e==v?function(t,e,r){var i=Zi(t);return function o(){for(var u=arguments.length,a=En(u),c=u,f=bo(o);c--;)a[c]=arguments[c];var s=u<3&&a[0]!==f&&a[u-1]!==f?[]:ve(a,f);return(u-=s.length)<r?uo(t,e,Qi,o.placeholder,n,a,s,n,n,r-u):Mt(this&&this!==At&&this instanceof o?i:t,this,a)}}(t,e,s):e!=y&&e!=(p|y)||u.length?Qi.apply(n,k):function(n,t,e,r){var i=t&p,o=Zi(n);return function t(){for(var u=-1,a=arguments.length,c=-1,f=r.length,s=En(f+a),l=this&&this!==At&&this instanceof t?o:n;++c<f;)s[c]=r[c];for(;a--;)s[c++]=arguments[++u];return Mt(l,i?e:this,s)}}(t,e,r,i);else var R=function(n,t,e){var r=t&p,i=Zi(n);return function t(){return(this&&this!==At&&this instanceof t?i:n).apply(r?e:this,arguments)}}(t,e,r);return Vo((S?mi:Yo)(R,k),t,e)}function lo(t,e,r,i){return t===n||Qu(t,nt[r])&&!rt.call(i,r)?e:t}function ho(t,e,r,i,o,u){return pa(t)&&pa(e)&&(u.set(e,t),ii(t,e,n,ho,u),u.delete(e)),t}function po(t){return va(t)?n:t}function mo(t,e,r,i,o,u){var a=r&l,c=t.length,f=e.length;if(c!=f&&!(a&&f>c))return!1;var s=u.get(t),p=u.get(e);if(s&&p)return s==e&&p==t;var m=-1,d=!0,g=r&h?new pr:n;for(u.set(t,e),u.set(e,t);++m<c;){var v=t[m],y=e[m];if(i)var _=a?i(y,v,m,e,t,u):i(v,y,m,t,e,u);if(_!==n){if(_)continue;d=!1;break}if(g){if(!Vt(e,function(n,t){if(!ce(g,t)&&(v===n||o(v,n,r,i,u)))return g.push(t)})){d=!1;break}}else if(v!==y&&!o(v,y,r,i,u)){d=!1;break}}return u.delete(t),u.delete(e),d}function go(t){return $o(zo(t,n,iu),t+"")}function vo(n){return Fr(n,qa,Ro)}function yo(n){return Fr(n,$a,Eo)}var _o=He?function(n){return He.get(n)}:bc;function wo(n){for(var t=n.name+"",e=Ze[t],r=rt.call(Ze,t)?e.length:0;r--;){var i=e[r],o=i.func;if(null==o||o==n)return i.name}return t}function bo(n){return(rt.call(or,"placeholder")?or:n).placeholder}function xo(){var n=or.iteratee||vc;return n=n===vc?Xr:n,arguments.length?n(arguments[0],arguments[1]):n}function Ao(n,t){var e,r,i=n.__data__;return("string"==(r=typeof(e=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==e:null===e)?i["string"==typeof t?"string":"hash"]:i.map}function So(n){for(var t=qa(n),e=t.length;e--;){var r=t[e],i=n[r];t[e]=[r,i,Uo(i)]}return t}function ko(t,e){var r=function(t,e){return null==t?n:t[e]}(t,e);return Jr(r)?r:n}var Ro=De?function(n){return null==n?[]:(n=Kn(n),Nt(De(n),function(t){return Ot.call(n,t)}))}:Oc,Eo=De?function(n){for(var t=[];n;)Yt(t,Ro(n)),n=kt(n);return t}:Oc,Oo=Wr;function To(n,t,e){for(var r=-1,i=(t=Di(t,n)).length,o=!1;++r<i;){var u=Zo(t[r]);if(!(o=null!=n&&e(n,u)))break;n=n[u]}return o||++r!=i?o:!!(i=null==n?0:n.length)&&ha(i)&&Do(u,i)&&(ra(n)||ea(n))}function Io(n){return"function"!=typeof n.constructor||Lo(n)?{}:ur(kt(n))}function jo(n){return ra(n)||ea(n)||!!(te&&n&&n[te])}function Do(n,t){var e=typeof n;return!!(t=null==t?R:t)&&("number"==e||"symbol"!=e&&zn.test(n))&&n>-1&&n%1==0&&n<t}function Po(n,t,e){if(!pa(e))return!1;var r=typeof t;return!!("number"==r?oa(e)&&Do(t,e.length):"string"==r&&t in e)&&Qu(e[t],n)}function Co(n,t){if(ra(n))return!1;var e=typeof n;return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=n&&!ba(n))||xn.test(n)||!bn.test(n)||null!=t&&n in Kn(t)}function Mo(n){var t=wo(n),e=or[t];if("function"!=typeof e||!(t in fr.prototype))return!1;if(n===e)return!0;var r=_o(e);return!!r&&n===r[0]}(Ye&&Oo(new Ye(new ArrayBuffer(1)))!=nn||qe&&Oo(new qe)!=W||$e&&"[object Promise]"!=Oo($e.resolve())||Ve&&Oo(new Ve)!=K||Ge&&Oo(new Ge)!=X)&&(Oo=function(t){var e=Wr(t),r=e==$?t.constructor:n,i=r?Jo(r):"";if(i)switch(i){case Je:return nn;case Xe:return W;case Qe:return"[object Promise]";case nr:return K;case tr:return X}return e});var Bo=tt?sa:Tc;function Lo(n){var t=n&&n.constructor;return n===("function"==typeof t&&t.prototype||nt)}function Uo(n){return n==n&&!pa(n)}function No(t,e){return function(r){return null!=r&&r[t]===e&&(e!==n||t in Kn(r))}}function zo(t,e,r){return e=Le(e===n?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=Le(n.length-e,0),u=En(o);++i<o;)u[i]=n[e+i];i=-1;for(var a=En(e+1);++i<e;)a[i]=n[i];return a[e]=r(u),Mt(t,this,a)}}function Fo(n,t){return t.length<2?n:zr(n,gi(t,0,-1))}function Wo(n,t){if(("constructor"!==t||"function"!=typeof n[t])&&"__proto__"!=t)return n[t]}var Yo=Go(mi),qo=Te||function(n,t){return At.setTimeout(n,t)},$o=Go(di);function Vo(n,t,e){var r=t+"";return $o(n,function(n,t){var e=t.length;if(!e)return n;var r=e-1;return t[r]=(e>1?"& ":"")+t[r],t=t.join(e>2?", ":" "),n.replace(On,"{\n/* [wrapped with "+t+"] */\n")}(r,function(n,t){return Lt(D,function(e){var r="_."+e[0];t&e[1]&&!zt(n,r)&&n.push(r)}),n.sort()}(function(n){var t=r.match(Tn);return t?t[1].split(In):[]}(),e)))}function Go(t){var e=0,r=0;return function(){var i=Ne(),o=S-(i-r);if(r=i,o>0){if(++e>=A)return arguments[0]}else e=0;return t.apply(n,arguments)}}function Ko(t,e){var r=-1,i=t.length,o=i-1;for(e=e===n?i:e;++r<e;){var u=si(r,o),a=t[u];t[u]=t[r],t[r]=a}return t.length=e,t}var Ho=function(n){var t=Gu(function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(An,function(n,e,r,i){t.push(r?i.replace(Pn,"$1"):e||n)}),t},function(n){return 500===e.size&&e.clear(),n}),e=t.cache;return t}();function Zo(n){if("string"==typeof n||ba(n))return n;var t=n+"";return"0"==t&&1/n==-k?"-0":t}function Jo(n){if(null!=n){try{return et.call(n)}catch(e){}try{return n+""}catch(e){}}return""}function Xo(n){if(n instanceof fr)return n.clone();var t=new cr(n.__wrapped__,n.__chain__);return t.__actions__=Wi(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}var Qo=hi(function(n,t){return ua(n)?Or(n,Cr(t,1,ua,!0)):[]}),nu=hi(function(t,e){var r=fu(e);return ua(r)&&(r=n),ua(t)?Or(t,Cr(e,1,ua,!0),xo(r,2)):[]}),tu=hi(function(t,e){var r=fu(e);return ua(r)&&(r=n),ua(t)?Or(t,Cr(e,1,ua,!0),n,r):[]});function eu(n,t,e){var r=null==n?0:n.length;if(!r)return-1;var i=null==e?0:Ea(e);return i<0&&(i=Le(r+i,0)),Ht(n,xo(t,3),i)}function ru(t,e,r){var i=null==t?0:t.length;if(!i)return-1;var o=i-1;return r!==n&&(o=Ea(r),o=r<0?Le(i+o,0):Ue(o,i-1)),Ht(t,xo(e,3),o,!0)}function iu(n){return null!=n&&n.length?Cr(n,1):[]}function ou(t){return t&&t.length?t[0]:n}var uu=hi(function(n){var t=Wt(n,Ii);return t.length&&t[0]===n[0]?Vr(t):[]}),au=hi(function(t){var e=fu(t),r=Wt(t,Ii);return e===fu(r)?e=n:r.pop(),r.length&&r[0]===t[0]?Vr(r,xo(e,2)):[]}),cu=hi(function(t){var e=fu(t),r=Wt(t,Ii);return(e="function"==typeof e?e:n)&&r.pop(),r.length&&r[0]===t[0]?Vr(r,n,e):[]});function fu(t){var e=null==t?0:t.length;return e?t[e-1]:n}var su=hi(lu);function lu(n,t){return n&&n.length&&t&&t.length?ci(n,t):n}var hu=go(function(n,t){var e=null==n?0:n.length,r=Ar(n,t);return fi(n,Wt(t,function(n){return Do(n,e)?+n:n}).sort(Ni)),r});function pu(n){return null==n?n:We.call(n)}var mu=hi(function(n){return Ai(Cr(n,1,ua,!0))}),du=hi(function(t){var e=fu(t);return ua(e)&&(e=n),Ai(Cr(t,1,ua,!0),xo(e,2))}),gu=hi(function(t){var e=fu(t);return e="function"==typeof e?e:n,Ai(Cr(t,1,ua,!0),n,e)});function vu(n){if(!n||!n.length)return[];var t=0;return n=Nt(n,function(n){if(ua(n))return t=Le(n.length,t),!0}),ie(t,function(t){return Wt(n,ne(t))})}function yu(t,e){if(!t||!t.length)return[];var r=vu(t);return null==e?r:Wt(r,function(t){return Mt(e,n,t)})}var _u=hi(function(n,t){return ua(n)?Or(n,t):[]}),wu=hi(function(n){return Oi(Nt(n,ua))}),bu=hi(function(t){var e=fu(t);return ua(e)&&(e=n),Oi(Nt(t,ua),xo(e,2))}),xu=hi(function(t){var e=fu(t);return e="function"==typeof e?e:n,Oi(Nt(t,ua),n,e)}),Au=hi(vu),Su=hi(function(t){var e=t.length,r=e>1?t[e-1]:n;return r="function"==typeof r?(t.pop(),r):n,yu(t,r)});function ku(n){var t=or(n);return t.__chain__=!0,t}function Ru(n,t){return t(n)}var Eu=go(function(t){var e=t.length,r=e?t[0]:0,i=this.__wrapped__,o=function(n){return Ar(n,t)};return!(e>1||this.__actions__.length)&&i instanceof fr&&Do(r)?((i=i.slice(r,+r+(e?1:0))).__actions__.push({func:Ru,args:[o],thisArg:n}),new cr(i,this.__chain__).thru(function(t){return e&&!t.length&&t.push(n),t})):this.thru(o)}),Ou=qi(function(n,t,e){rt.call(n,e)?++n[e]:xr(n,e,1)}),Tu=Ji(eu),Iu=Ji(ru);function ju(n,t){return(ra(n)?Lt:Tr)(n,xo(t,3))}function Du(n,t){return(ra(n)?function(n,t){for(var e=null==n?0:n.length;e--&&!1!==t(n[e],e,n););return n}:Ir)(n,xo(t,3))}var Pu=qi(function(n,t,e){rt.call(n,e)?n[e].push(t):xr(n,e,[t])}),Cu=hi(function(n,t,e){var r=-1,i="function"==typeof t,o=oa(n)?En(n.length):[];return Tr(n,function(n){o[++r]=i?Mt(t,n,e):Gr(n,t,e)}),o}),Mu=qi(function(n,t,e){xr(n,e,t)});function Bu(n,t){return(ra(n)?Wt:ti)(n,xo(t,3))}var Lu=qi(function(n,t,e){n[e?0:1].push(t)},function(){return[[],[]]}),Uu=hi(function(n,t){if(null==n)return[];var e=t.length;return e>1&&Po(n,t[0],t[1])?t=[]:e>2&&Po(t[0],t[1],t[2])&&(t=[t[0]]),ui(n,Cr(t,1),[])}),Nu=Oe||function(){return At.Date.now()};function zu(t,e,r){return e=r?n:e,e=t&&null==e?t.length:e,so(t,w,n,n,n,n,e)}function Fu(t,e){var r;if("function"!=typeof e)throw new Jn(o);return t=Ea(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=n),r}}var Wu=hi(function(n,t,e){var r=p;if(e.length){var i=ve(e,bo(Wu));r|=y}return so(n,r,t,e,i)}),Yu=hi(function(n,t,e){var r=p|m;if(e.length){var i=ve(e,bo(Yu));r|=y}return so(t,r,n,e,i)});function qu(t,e,r){var i,u,a,c,f,s,l=0,h=!1,p=!1,m=!0;if("function"!=typeof t)throw new Jn(o);function d(e){var r=i,o=u;return i=u=n,l=e,c=t.apply(o,r)}function g(t){var r=t-s;return s===n||r>=e||r<0||p&&t-l>=a}function v(){var n=Nu();if(g(n))return y(n);f=qo(v,function(n){var t=e-(n-s);return p?Ue(t,a-(n-l)):t}(n))}function y(t){return f=n,m&&i?d(t):(i=u=n,c)}function _(){var t=Nu(),r=g(t);if(i=arguments,u=this,s=t,r){if(f===n)return function(n){return l=n,f=qo(v,e),h?d(n):c}(s);if(p)return Mi(f),f=qo(v,e),d(s)}return f===n&&(f=qo(v,e)),c}return e=Ta(e)||0,pa(r)&&(h=!!r.leading,a=(p="maxWait"in r)?Le(Ta(r.maxWait)||0,e):a,m="trailing"in r?!!r.trailing:m),_.cancel=function(){f!==n&&Mi(f),l=0,i=s=u=f=n},_.flush=function(){return f===n?c:y(Nu())},_}var $u=hi(function(n,t){return Er(n,1,t)}),Vu=hi(function(n,t,e){return Er(n,Ta(t)||0,e)});function Gu(n,t){if("function"!=typeof n||null!=t&&"function"!=typeof t)throw new Jn(o);var e=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=e.cache;if(o.has(i))return o.get(i);var u=n.apply(this,r);return e.cache=o.set(i,u)||o,u};return e.cache=new(Gu.Cache||hr),e}function Ku(n){if("function"!=typeof n)throw new Jn(o);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}Gu.Cache=hr;var Hu=Pi(function(n,t){var e=(t=1==t.length&&ra(t[0])?Wt(t[0],ue(xo())):Wt(Cr(t,1),ue(xo()))).length;return hi(function(r){for(var i=-1,o=Ue(r.length,e);++i<o;)r[i]=t[i].call(this,r[i]);return Mt(n,this,r)})}),Zu=hi(function(t,e){var r=ve(e,bo(Zu));return so(t,y,n,e,r)}),Ju=hi(function(t,e){var r=ve(e,bo(Ju));return so(t,_,n,e,r)}),Xu=go(function(t,e){return so(t,b,n,n,n,e)});function Qu(n,t){return n===t||n!=n&&t!=t}var na=oo(Yr),ta=oo(function(n,t){return n>=t}),ea=Kr(function(){return arguments}())?Kr:function(n){return ma(n)&&rt.call(n,"callee")&&!Ot.call(n,"callee")},ra=En.isArray,ia=Tt?ue(Tt):function(n){return ma(n)&&Wr(n)==Q};function oa(n){return null!=n&&ha(n.length)&&!sa(n)}function ua(n){return ma(n)&&oa(n)}var aa=Pe||Tc,ca=It?ue(It):function(n){return ma(n)&&Wr(n)==L};function fa(n){if(!ma(n))return!1;var t=Wr(n);return t==N||t==U||"string"==typeof n.message&&"string"==typeof n.name&&!va(n)}function sa(n){if(!pa(n))return!1;var t=Wr(n);return t==z||t==F||t==M||t==V}function la(n){return"number"==typeof n&&n==Ea(n)}function ha(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=R}function pa(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function ma(n){return null!=n&&"object"==typeof n}var da=jt?ue(jt):function(n){return ma(n)&&Oo(n)==W};function ga(n){return"number"==typeof n||ma(n)&&Wr(n)==Y}function va(n){if(!ma(n)||Wr(n)!=$)return!1;var t=kt(n);if(null===t)return!0;var e=rt.call(t,"constructor")&&t.constructor;return"function"==typeof e&&e instanceof e&&et.call(e)==at}var ya=Dt?ue(Dt):function(n){return ma(n)&&Wr(n)==G},_a=Pt?ue(Pt):function(n){return ma(n)&&Oo(n)==K};function wa(n){return"string"==typeof n||!ra(n)&&ma(n)&&Wr(n)==H}function ba(n){return"symbol"==typeof n||ma(n)&&Wr(n)==Z}var xa=Ct?ue(Ct):function(n){return ma(n)&&ha(n.length)&&!!gt[Wr(n)]},Aa=oo(ni),Sa=oo(function(n,t){return n<=t});function ka(n){if(!n)return[];if(oa(n))return wa(n)?we(n):Wi(n);if(Se&&n[Se])return function(n){for(var t,e=[];!(t=n.next()).done;)e.push(t.value);return e}(n[Se]());var t=Oo(n);return(t==W?de:t==K?ye:Qa)(n)}function Ra(n){return n?(n=Ta(n))===k||n===-k?(n<0?-1:1)*E:n==n?n:0:0===n?n:0}function Ea(n){var t=Ra(n),e=t%1;return t==t?e?t-e:t:0}function Oa(n){return n?Sr(Ea(n),0,T):0}function Ta(n){if("number"==typeof n)return n;if(ba(n))return O;if(pa(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=pa(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=oe(n);var e=Ln.test(n);return e||Nn.test(n)?wt(n.slice(2),e?2:8):Bn.test(n)?O:+n}function Ia(n){return Yi(n,$a(n))}function ja(n){return null==n?"":xi(n)}var Da=$i(function(n,t){if(Lo(t)||oa(t))Yi(t,qa(t),n);else for(var e in t)rt.call(t,e)&&yr(n,e,t[e])}),Pa=$i(function(n,t){Yi(t,$a(t),n)}),Ca=$i(function(n,t,e,r){Yi(t,$a(t),n,r)}),Ma=$i(function(n,t,e,r){Yi(t,qa(t),n,r)}),Ba=go(Ar),La=hi(function(t,e){t=Kn(t);var r=-1,i=e.length,o=i>2?e[2]:n;for(o&&Po(e[0],e[1],o)&&(i=1);++r<i;)for(var u=e[r],a=$a(u),c=-1,f=a.length;++c<f;){var s=a[c],l=t[s];(l===n||Qu(l,nt[s])&&!rt.call(t,s))&&(t[s]=u[s])}return t}),Ua=hi(function(t){return t.push(n,ho),Mt(Ga,n,t)});function Na(t,e,r){var i=null==t?n:zr(t,e);return i===n?r:i}function za(n,t){return null!=n&&To(n,t,$r)}var Fa=no(function(n,t,e){null!=t&&"function"!=typeof t.toString&&(t=ut.call(t)),n[t]=e},pc(gc)),Wa=no(function(n,t,e){null!=t&&"function"!=typeof t.toString&&(t=ut.call(t)),rt.call(n,t)?n[t].push(e):n[t]=[e]},xo),Ya=hi(Gr);function qa(n){return oa(n)?dr(n):Qr(n)}function $a(n){return oa(n)?dr(n,!0):function(n){if(!pa(n))return function(n){var t=[];if(null!=n)for(var e in Kn(n))t.push(e);return t}(n);var t=Lo(n),e=[];for(var r in n)("constructor"!=r||!t&&rt.call(n,r))&&e.push(r);return e}(n)}var Va=$i(function(n,t,e){ii(n,t,e)}),Ga=$i(function(n,t,e,r){ii(n,t,e,r)}),Ka=go(function(n,t){var e={};if(null==n)return e;var r=!1;t=Wt(t,function(t){return t=Di(t,n),r||(r=t.length>1),t}),Yi(n,yo(n),e),r&&(e=kr(e,c|f|s,po));for(var i=t.length;i--;)Si(e,t[i]);return e}),Ha=go(function(n,t){return null==n?{}:function(n,t){return ai(n,t,function(t,e){return za(n,e)})}(n,t)});function Za(n,t){if(null==n)return{};var e=Wt(yo(n),function(n){return[n]});return t=xo(t),ai(n,e,function(n,e){return t(n,e[0])})}var Ja=fo(qa),Xa=fo($a);function Qa(n){return null==n?[]:ae(n,qa(n))}var nc=Hi(function(n,t,e){return t=t.toLowerCase(),n+(e?tc(t):t)});function tc(n){return fc(ja(n).toLowerCase())}function ec(n){return(n=ja(n))&&n.replace(Fn,le).replace(ft,"")}var rc=Hi(function(n,t,e){return n+(e?"-":"")+t.toLowerCase()}),ic=Hi(function(n,t,e){return n+(e?" ":"")+t.toLowerCase()}),oc=Ki("toLowerCase"),uc=Hi(function(n,t,e){return n+(e?"_":"")+t.toLowerCase()}),ac=Hi(function(n,t,e){return n+(e?" ":"")+fc(t)}),cc=Hi(function(n,t,e){return n+(e?" ":"")+t.toUpperCase()}),fc=Ki("toUpperCase");function sc(t,e,r){return t=ja(t),(e=r?n:e)===n?function(n){return pt.test(n)}(t)?function(n){return n.match(lt)||[]}(t):function(n){return n.match(jn)||[]}(t):t.match(e)||[]}var lc=hi(function(t,e){try{return Mt(t,n,e)}catch(i){return fa(i)?i:new $n(i)}}),hc=go(function(n,t){return Lt(t,function(t){t=Zo(t),xr(n,t,Wu(n[t],n))}),n});function pc(n){return function(){return n}}var mc=Xi(),dc=Xi(!0);function gc(n){return n}function vc(n){return Xr("function"==typeof n?n:kr(n,c))}var yc=hi(function(n,t){return function(e){return Gr(e,n,t)}}),_c=hi(function(n,t){return function(e){return Gr(n,e,t)}});function wc(n,t,e){var r=qa(t),i=Nr(t,r);null!=e||pa(t)&&(i.length||!r.length)||(e=t,t=n,n=this,i=Nr(t,qa(t)));var o=!(pa(e)&&"chain"in e&&!e.chain),u=sa(n);return Lt(i,function(e){var r=t[e];n[e]=r,u&&(n.prototype[e]=function(){var t=this.__chain__;if(o||t){var e=n(this.__wrapped__);return(e.__actions__=Wi(this.__actions__)).push({func:r,args:arguments,thisArg:n}),e.__chain__=t,e}return r.apply(n,Yt([this.value()],arguments))})}),n}function bc(){}var xc=eo(Wt),Ac=eo(Ut),Sc=eo(Vt);function kc(n){return Co(n)?ne(Zo(n)):function(n){return function(t){return zr(t,n)}}(n)}var Rc=io(),Ec=io(!0);function Oc(){return[]}function Tc(){return!1}var Ic,jc=to(function(n,t){return n+t},0),Dc=ao("ceil"),Pc=to(function(n,t){return n/t},1),Cc=ao("floor"),Mc=to(function(n,t){return n*t},1),Bc=ao("round"),Lc=to(function(n,t){return n-t},0);return or.after=function(n,t){if("function"!=typeof t)throw new Jn(o);return n=Ea(n),function(){if(--n<1)return t.apply(this,arguments)}},or.ary=zu,or.assign=Da,or.assignIn=Pa,or.assignInWith=Ca,or.assignWith=Ma,or.at=Ba,or.before=Fu,or.bind=Wu,or.bindAll=hc,or.bindKey=Yu,or.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return ra(n)?n:[n]},or.chain=ku,or.chunk=function(t,e,r){e=(r?Po(t,e,r):e===n)?1:Le(Ea(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var o=0,u=0,a=En(Ie(i/e));o<i;)a[u++]=gi(t,o,o+=e);return a},or.compact=function(n){for(var t=-1,e=null==n?0:n.length,r=0,i=[];++t<e;){var o=n[t];o&&(i[r++]=o)}return i},or.concat=function(){var n=arguments.length;if(!n)return[];for(var t=En(n-1),e=arguments[0],r=n;r--;)t[r-1]=arguments[r];return Yt(ra(e)?Wi(e):[e],Cr(t,1))},or.cond=function(n){var t=null==n?0:n.length,e=xo();return n=t?Wt(n,function(n){if("function"!=typeof n[1])throw new Jn(o);return[e(n[0]),n[1]]}):[],hi(function(e){for(var r=-1;++r<t;){var i=n[r];if(Mt(i[0],this,e))return Mt(i[1],this,e)}})},or.conforms=function(n){return function(n){var t=qa(n);return function(e){return Rr(e,n,t)}}(kr(n,c))},or.constant=pc,or.countBy=Ou,or.create=function(n,t){var e=ur(n);return null==t?e:br(e,t)},or.curry=function t(e,r,i){var o=so(e,g,n,n,n,n,n,r=i?n:r);return o.placeholder=t.placeholder,o},or.curryRight=function t(e,r,i){var o=so(e,v,n,n,n,n,n,r=i?n:r);return o.placeholder=t.placeholder,o},or.debounce=qu,or.defaults=La,or.defaultsDeep=Ua,or.defer=$u,or.delay=Vu,or.difference=Qo,or.differenceBy=nu,or.differenceWith=tu,or.drop=function(t,e,r){var i=null==t?0:t.length;return i?gi(t,(e=r||e===n?1:Ea(e))<0?0:e,i):[]},or.dropRight=function(t,e,r){var i=null==t?0:t.length;return i?gi(t,0,(e=i-(e=r||e===n?1:Ea(e)))<0?0:e):[]},or.dropRightWhile=function(n,t){return n&&n.length?Ri(n,xo(t,3),!0,!0):[]},or.dropWhile=function(n,t){return n&&n.length?Ri(n,xo(t,3),!0):[]},or.fill=function(t,e,r,i){var o=null==t?0:t.length;return o?(r&&"number"!=typeof r&&Po(t,e,r)&&(r=0,i=o),function(t,e,r,i){var o=t.length;for((r=Ea(r))<0&&(r=-r>o?0:o+r),(i=i===n||i>o?o:Ea(i))<0&&(i+=o),i=r>i?0:Oa(i);r<i;)t[r++]=e;return t}(t,e,r,i)):[]},or.filter=function(n,t){return(ra(n)?Nt:Pr)(n,xo(t,3))},or.flatMap=function(n,t){return Cr(Bu(n,t),1)},or.flatMapDeep=function(n,t){return Cr(Bu(n,t),k)},or.flatMapDepth=function(t,e,r){return r=r===n?1:Ea(r),Cr(Bu(t,e),r)},or.flatten=iu,or.flattenDeep=function(n){return null!=n&&n.length?Cr(n,k):[]},or.flattenDepth=function(t,e){return null!=t&&t.length?Cr(t,e=e===n?1:Ea(e)):[]},or.flip=function(n){return so(n,x)},or.flow=mc,or.flowRight=dc,or.fromPairs=function(n){for(var t=-1,e=null==n?0:n.length,r={};++t<e;){var i=n[t];r[i[0]]=i[1]}return r},or.functions=function(n){return null==n?[]:Nr(n,qa(n))},or.functionsIn=function(n){return null==n?[]:Nr(n,$a(n))},or.groupBy=Pu,or.initial=function(n){return null!=n&&n.length?gi(n,0,-1):[]},or.intersection=uu,or.intersectionBy=au,or.intersectionWith=cu,or.invert=Fa,or.invertBy=Wa,or.invokeMap=Cu,or.iteratee=vc,or.keyBy=Mu,or.keys=qa,or.keysIn=$a,or.map=Bu,or.mapKeys=function(n,t){var e={};return t=xo(t,3),Lr(n,function(n,r,i){xr(e,t(n,r,i),n)}),e},or.mapValues=function(n,t){var e={};return t=xo(t,3),Lr(n,function(n,r,i){xr(e,r,t(n,r,i))}),e},or.matches=function(n){return ei(kr(n,c))},or.matchesProperty=function(n,t){return ri(n,kr(t,c))},or.memoize=Gu,or.merge=Va,or.mergeWith=Ga,or.method=yc,or.methodOf=_c,or.mixin=wc,or.negate=Ku,or.nthArg=function(n){return n=Ea(n),hi(function(t){return oi(t,n)})},or.omit=Ka,or.omitBy=function(n,t){return Za(n,Ku(xo(t)))},or.once=function(n){return Fu(2,n)},or.orderBy=function(t,e,r,i){return null==t?[]:(ra(e)||(e=null==e?[]:[e]),ra(r=i?n:r)||(r=null==r?[]:[r]),ui(t,e,r))},or.over=xc,or.overArgs=Hu,or.overEvery=Ac,or.overSome=Sc,or.partial=Zu,or.partialRight=Ju,or.partition=Lu,or.pick=Ha,or.pickBy=Za,or.property=kc,or.propertyOf=function(t){return function(e){return null==t?n:zr(t,e)}},or.pull=su,or.pullAll=lu,or.pullAllBy=function(n,t,e){return n&&n.length&&t&&t.length?ci(n,t,xo(e,2)):n},or.pullAllWith=function(t,e,r){return t&&t.length&&e&&e.length?ci(t,e,n,r):t},or.pullAt=hu,or.range=Rc,or.rangeRight=Ec,or.rearg=Xu,or.reject=function(n,t){return(ra(n)?Nt:Pr)(n,Ku(xo(t,3)))},or.remove=function(n,t){var e=[];if(!n||!n.length)return e;var r=-1,i=[],o=n.length;for(t=xo(t,3);++r<o;){var u=n[r];t(u,r,n)&&(e.push(u),i.push(r))}return fi(n,i),e},or.rest=function(t,e){if("function"!=typeof t)throw new Jn(o);return hi(t,e=e===n?e:Ea(e))},or.reverse=pu,or.sampleSize=function(t,e,r){return e=(r?Po(t,e,r):e===n)?1:Ea(e),(ra(t)?function(n,t){return Ko(Wi(n),Sr(t,0,n.length))}:function(n,t){var e=Qa(n);return Ko(e,Sr(t,0,e.length))})(t,e)},or.set=function(n,t,e){return null==n?n:pi(n,t,e)},or.setWith=function(t,e,r,i){return i="function"==typeof i?i:n,null==t?t:pi(t,e,r,i)},or.shuffle=function(n){return(ra(n)?function(n){return Ko(Wi(n))}:function(n){return Ko(Qa(n))})(n)},or.slice=function(t,e,r){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&Po(t,e,r)?(e=0,r=i):(e=null==e?0:Ea(e),r=r===n?i:Ea(r)),gi(t,e,r)):[]},or.sortBy=Uu,or.sortedUniq=function(n){return n&&n.length?wi(n):[]},or.sortedUniqBy=function(n,t){return n&&n.length?wi(n,xo(t,2)):[]},or.split=function(t,e,r){return r&&"number"!=typeof r&&Po(t,e,r)&&(e=r=n),(r=r===n?T:r>>>0)?(t=ja(t))&&("string"==typeof e||null!=e&&!ya(e))&&!(e=xi(e))&&me(t)?Ci(we(t),0,r):t.split(e,r):[]},or.spread=function(n,t){if("function"!=typeof n)throw new Jn(o);return t=null==t?0:Le(Ea(t),0),hi(function(e){var r=e[t],i=Ci(e,0,t);return r&&Yt(i,r),Mt(n,this,i)})},or.tail=function(n){var t=null==n?0:n.length;return t?gi(n,1,t):[]},or.take=function(t,e,r){return t&&t.length?gi(t,0,(e=r||e===n?1:Ea(e))<0?0:e):[]},or.takeRight=function(t,e,r){var i=null==t?0:t.length;return i?gi(t,(e=i-(e=r||e===n?1:Ea(e)))<0?0:e,i):[]},or.takeRightWhile=function(n,t){return n&&n.length?Ri(n,xo(t,3),!1,!0):[]},or.takeWhile=function(n,t){return n&&n.length?Ri(n,xo(t,3)):[]},or.tap=function(n,t){return t(n),n},or.throttle=function(n,t,e){var r=!0,i=!0;if("function"!=typeof n)throw new Jn(o);return pa(e)&&(r="leading"in e?!!e.leading:r,i="trailing"in e?!!e.trailing:i),qu(n,t,{leading:r,maxWait:t,trailing:i})},or.thru=Ru,or.toArray=ka,or.toPairs=Ja,or.toPairsIn=Xa,or.toPath=function(n){return ra(n)?Wt(n,Zo):ba(n)?[n]:Wi(Ho(ja(n)))},or.toPlainObject=Ia,or.transform=function(n,t,e){var r=ra(n),i=r||aa(n)||xa(n);if(t=xo(t,4),null==e){var o=n&&n.constructor;e=i?r?new o:[]:pa(n)&&sa(o)?ur(kt(n)):{}}return(i?Lt:Lr)(n,function(n,r,i){return t(e,n,r,i)}),e},or.unary=function(n){return zu(n,1)},or.union=mu,or.unionBy=du,or.unionWith=gu,or.uniq=function(n){return n&&n.length?Ai(n):[]},or.uniqBy=function(n,t){return n&&n.length?Ai(n,xo(t,2)):[]},or.uniqWith=function(t,e){return e="function"==typeof e?e:n,t&&t.length?Ai(t,n,e):[]},or.unset=function(n,t){return null==n||Si(n,t)},or.unzip=vu,or.unzipWith=yu,or.update=function(n,t,e){return null==n?n:ki(n,t,ji(e))},or.updateWith=function(t,e,r,i){return i="function"==typeof i?i:n,null==t?t:ki(t,e,ji(r),i)},or.values=Qa,or.valuesIn=function(n){return null==n?[]:ae(n,$a(n))},or.without=_u,or.words=sc,or.wrap=function(n,t){return Zu(ji(t),n)},or.xor=wu,or.xorBy=bu,or.xorWith=xu,or.zip=Au,or.zipObject=function(n,t){return Ti(n||[],t||[],yr)},or.zipObjectDeep=function(n,t){return Ti(n||[],t||[],pi)},or.zipWith=Su,or.entries=Ja,or.entriesIn=Xa,or.extend=Pa,or.extendWith=Ca,wc(or,or),or.add=jc,or.attempt=lc,or.camelCase=nc,or.capitalize=tc,or.ceil=Dc,or.clamp=function(t,e,r){return r===n&&(r=e,e=n),r!==n&&(r=(r=Ta(r))==r?r:0),e!==n&&(e=(e=Ta(e))==e?e:0),Sr(Ta(t),e,r)},or.clone=function(n){return kr(n,s)},or.cloneDeep=function(n){return kr(n,c|s)},or.cloneDeepWith=function(t,e){return kr(t,c|s,e="function"==typeof e?e:n)},or.cloneWith=function(t,e){return kr(t,s,e="function"==typeof e?e:n)},or.conformsTo=function(n,t){return null==t||Rr(n,t,qa(t))},or.deburr=ec,or.defaultTo=function(n,t){return null==n||n!=n?t:n},or.divide=Pc,or.endsWith=function(t,e,r){t=ja(t),e=xi(e);var i=t.length,o=r=r===n?i:Sr(Ea(r),0,i);return(r-=e.length)>=0&&t.slice(r,o)==e},or.eq=Qu,or.escape=function(n){return(n=ja(n))&&vn.test(n)?n.replace(dn,he):n},or.escapeRegExp=function(n){return(n=ja(n))&&kn.test(n)?n.replace(Sn,"\\$&"):n},or.every=function(t,e,r){var i=ra(t)?Ut:jr;return r&&Po(t,e,r)&&(e=n),i(t,xo(e,3))},or.find=Tu,or.findIndex=eu,or.findKey=function(n,t){return Kt(n,xo(t,3),Lr)},or.findLast=Iu,or.findLastIndex=ru,or.findLastKey=function(n,t){return Kt(n,xo(t,3),Ur)},or.floor=Cc,or.forEach=ju,or.forEachRight=Du,or.forIn=function(n,t){return null==n?n:Mr(n,xo(t,3),$a)},or.forInRight=function(n,t){return null==n?n:Br(n,xo(t,3),$a)},or.forOwn=function(n,t){return n&&Lr(n,xo(t,3))},or.forOwnRight=function(n,t){return n&&Ur(n,xo(t,3))},or.get=Na,or.gt=na,or.gte=ta,or.has=function(n,t){return null!=n&&To(n,t,qr)},or.hasIn=za,or.head=ou,or.identity=gc,or.includes=function(n,t,e,r){n=oa(n)?n:Qa(n),e=e&&!r?Ea(e):0;var i=n.length;return e<0&&(e=Le(i+e,0)),wa(n)?e<=i&&n.indexOf(t,e)>-1:!!i&&Zt(n,t,e)>-1},or.indexOf=function(n,t,e){var r=null==n?0:n.length;if(!r)return-1;var i=null==e?0:Ea(e);return i<0&&(i=Le(r+i,0)),Zt(n,t,i)},or.inRange=function(t,e,r){return e=Ra(e),r===n?(r=e,e=0):r=Ra(r),function(n,t,e){return n>=Ue(t,e)&&n<Le(t,e)}(t=Ta(t),e,r)},or.invoke=Ya,or.isArguments=ea,or.isArray=ra,or.isArrayBuffer=ia,or.isArrayLike=oa,or.isArrayLikeObject=ua,or.isBoolean=function(n){return!0===n||!1===n||ma(n)&&Wr(n)==B},or.isBuffer=aa,or.isDate=ca,or.isElement=function(n){return ma(n)&&1===n.nodeType&&!va(n)},or.isEmpty=function(n){if(null==n)return!0;if(oa(n)&&(ra(n)||"string"==typeof n||"function"==typeof n.splice||aa(n)||xa(n)||ea(n)))return!n.length;var t=Oo(n);if(t==W||t==K)return!n.size;if(Lo(n))return!Qr(n).length;for(var e in n)if(rt.call(n,e))return!1;return!0},or.isEqual=function(n,t){return Hr(n,t)},or.isEqualWith=function(t,e,r){var i=(r="function"==typeof r?r:n)?r(t,e):n;return i===n?Hr(t,e,n,r):!!i},or.isError=fa,or.isFinite=function(n){return"number"==typeof n&&Ce(n)},or.isFunction=sa,or.isInteger=la,or.isLength=ha,or.isMap=da,or.isMatch=function(n,t){return n===t||Zr(n,t,So(t))},or.isMatchWith=function(t,e,r){return r="function"==typeof r?r:n,Zr(t,e,So(e),r)},or.isNaN=function(n){return ga(n)&&n!=+n},or.isNative=function(n){if(Bo(n))throw new $n("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Jr(n)},or.isNil=function(n){return null==n},or.isNull=function(n){return null===n},or.isNumber=ga,or.isObject=pa,or.isObjectLike=ma,or.isPlainObject=va,or.isRegExp=ya,or.isSafeInteger=function(n){return la(n)&&n>=-R&&n<=R},or.isSet=_a,or.isString=wa,or.isSymbol=ba,or.isTypedArray=xa,or.isUndefined=function(t){return t===n},or.isWeakMap=function(n){return ma(n)&&Oo(n)==X},or.isWeakSet=function(n){return ma(n)&&"[object WeakSet]"==Wr(n)},or.join=function(n,t){return null==n?"":Me.call(n,t)},or.kebabCase=rc,or.last=fu,or.lastIndexOf=function(t,e,r){var i=null==t?0:t.length;if(!i)return-1;var o=i;return r!==n&&(o=(o=Ea(r))<0?Le(i+o,0):Ue(o,i-1)),e==e?function(n,t,e){for(var r=o+1;r--;)if(n[r]===t)return r;return r}(t,e):Ht(t,Xt,o,!0)},or.lowerCase=ic,or.lowerFirst=oc,or.lt=Aa,or.lte=Sa,or.max=function(t){return t&&t.length?Dr(t,gc,Yr):n},or.maxBy=function(t,e){return t&&t.length?Dr(t,xo(e,2),Yr):n},or.mean=function(n){return Qt(n,gc)},or.meanBy=function(n,t){return Qt(n,xo(t,2))},or.min=function(t){return t&&t.length?Dr(t,gc,ni):n},or.minBy=function(t,e){return t&&t.length?Dr(t,xo(e,2),ni):n},or.stubArray=Oc,or.stubFalse=Tc,or.stubObject=function(){return{}},or.stubString=function(){return""},or.stubTrue=function(){return!0},or.multiply=Mc,or.nth=function(t,e){return t&&t.length?oi(t,Ea(e)):n},or.noConflict=function(){return At._===this&&(At._=st),this},or.noop=bc,or.now=Nu,or.pad=function(n,t,e){n=ja(n);var r=(t=Ea(t))?_e(n):0;if(!t||r>=t)return n;var i=(t-r)/2;return ro(je(i),e)+n+ro(Ie(i),e)},or.padEnd=function(n,t,e){n=ja(n);var r=(t=Ea(t))?_e(n):0;return t&&r<t?n+ro(t-r,e):n},or.padStart=function(n,t,e){n=ja(n);var r=(t=Ea(t))?_e(n):0;return t&&r<t?ro(t-r,e)+n:n},or.parseInt=function(n,t,e){return e||null==t?t=0:t&&(t=+t),ze(ja(n).replace(Rn,""),t||0)},or.random=function(t,e,r){if(r&&"boolean"!=typeof r&&Po(t,e,r)&&(e=r=n),r===n&&("boolean"==typeof e?(r=e,e=n):"boolean"==typeof t&&(r=t,t=n)),t===n&&e===n?(t=0,e=1):(t=Ra(t),e===n?(e=t,t=0):e=Ra(e)),t>e){var i=t;t=e,e=i}if(r||t%1||e%1){var o=Fe();return Ue(t+o*(e-t+_t("1e-"+((o+"").length-1))),e)}return si(t,e)},or.reduce=function(n,t,e){var r=ra(n)?qt:ee,i=arguments.length<3;return r(n,xo(t,4),e,i,Tr)},or.reduceRight=function(n,t,e){var r=ra(n)?$t:ee,i=arguments.length<3;return r(n,xo(t,4),e,i,Ir)},or.repeat=function(t,e,r){return e=(r?Po(t,e,r):e===n)?1:Ea(e),li(ja(t),e)},or.replace=function(){var n=arguments,t=ja(n[0]);return n.length<3?t:t.replace(n[1],n[2])},or.result=function(t,e,r){var i=-1,o=(e=Di(e,t)).length;for(o||(o=1,t=n);++i<o;){var u=null==t?n:t[Zo(e[i])];u===n&&(i=o,u=r),t=sa(u)?u.call(t):u}return t},or.round=Bc,or.runInContext=t,or.sample=function(n){return(ra(n)?gr:function(n){return gr(Qa(n))})(n)},or.size=function(n){if(null==n)return 0;if(oa(n))return wa(n)?_e(n):n.length;var t=Oo(n);return t==W||t==K?n.size:Qr(n).length},or.snakeCase=uc,or.some=function(t,e,r){var i=ra(t)?Vt:vi;return r&&Po(t,e,r)&&(e=n),i(t,xo(e,3))},or.sortedIndex=function(n,t){return yi(n,t)},or.sortedIndexBy=function(n,t,e){return _i(n,t,xo(e,2))},or.sortedIndexOf=function(n,t){var e=null==n?0:n.length;if(e){var r=yi(n,t);if(r<e&&Qu(n[r],t))return r}return-1},or.sortedLastIndex=function(n,t){return yi(n,t,!0)},or.sortedLastIndexBy=function(n,t,e){return _i(n,t,xo(e,2),!0)},or.sortedLastIndexOf=function(n,t){if(null!=n&&n.length){var e=yi(n,t,!0)-1;if(Qu(n[e],t))return e}return-1},or.startCase=ac,or.startsWith=function(n,t,e){return n=ja(n),e=null==e?0:Sr(Ea(e),0,n.length),t=xi(t),n.slice(e,e+t.length)==t},or.subtract=Lc,or.sum=function(n){return n&&n.length?re(n,gc):0},or.sumBy=function(n,t){return n&&n.length?re(n,xo(t,2)):0},or.template=function(t,e,r){var i=or.templateSettings;r&&Po(t,e,r)&&(e=n),t=ja(t),e=Ca({},e,i,lo);var o,u,a=Ca({},e.imports,i.imports,lo),c=qa(a),f=ae(a,c),s=0,l=e.interpolate||Wn,h="__p += '",p=Hn((e.escape||Wn).source+"|"+l.source+"|"+(l===wn?Cn:Wn).source+"|"+(e.evaluate||Wn).source+"|$","g"),m="//# sourceURL="+(rt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++dt+"]")+"\n";t.replace(p,function(n,e,r,i,a,c){return r||(r=i),h+=t.slice(s,c).replace(Yn,pe),e&&(o=!0,h+="' +\n__e("+e+") +\n'"),a&&(u=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),s=c+n.length,n}),h+="';\n";var d=rt.call(e,"variable")&&e.variable;if(d){if(Dn.test(d))throw new $n("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(u?h.replace(ln,""):h).replace(hn,"$1").replace(pn,"$1;"),h="function("+(d||"obj")+") {\n"+(d?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(u?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var g=lc(function(){return Vn(c,m+"return "+h).apply(n,f)});if(g.source=h,fa(g))throw g;return g},or.times=function(n,t){if((n=Ea(n))<1||n>R)return[];var e=T,r=Ue(n,T);t=xo(t),n-=T;for(var i=ie(r,t);++e<n;)t(e);return i},or.toFinite=Ra,or.toInteger=Ea,or.toLength=Oa,or.toLower=function(n){return ja(n).toLowerCase()},or.toNumber=Ta,or.toSafeInteger=function(n){return n?Sr(Ea(n),-R,R):0===n?n:0},or.toString=ja,or.toUpper=function(n){return ja(n).toUpperCase()},or.trim=function(t,e,r){if((t=ja(t))&&(r||e===n))return oe(t);if(!t||!(e=xi(e)))return t;var i=we(t),o=we(e);return Ci(i,fe(i,o),se(i,o)+1).join("")},or.trimEnd=function(t,e,r){if((t=ja(t))&&(r||e===n))return t.slice(0,be(t)+1);if(!t||!(e=xi(e)))return t;var i=we(t);return Ci(i,0,se(i,we(e))+1).join("")},or.trimStart=function(t,e,r){if((t=ja(t))&&(r||e===n))return t.replace(Rn,"");if(!t||!(e=xi(e)))return t;var i=we(t);return Ci(i,fe(i,we(e))).join("")},or.truncate=function(t,e){var r=30,i="...";if(pa(e)){var o="separator"in e?e.separator:o;r="length"in e?Ea(e.length):r,i="omission"in e?xi(e.omission):i}var u=(t=ja(t)).length;if(me(t)){var a=we(t);u=a.length}if(r>=u)return t;var c=r-_e(i);if(c<1)return i;var f=a?Ci(a,0,c).join(""):t.slice(0,c);if(o===n)return f+i;if(a&&(c+=f.length-c),ya(o)){if(t.slice(c).search(o)){var s,l=f;for(o.global||(o=Hn(o.source,ja(Mn.exec(o))+"g")),o.lastIndex=0;s=o.exec(l);)var h=s.index;f=f.slice(0,h===n?c:h)}}else if(t.indexOf(xi(o),c)!=c){var p=f.lastIndexOf(o);p>-1&&(f=f.slice(0,p))}return f+i},or.unescape=function(n){return(n=ja(n))&&gn.test(n)?n.replace(mn,xe):n},or.uniqueId=function(n){var t=++it;return ja(n)+t},or.upperCase=cc,or.upperFirst=fc,or.each=ju,or.eachRight=Du,or.first=ou,wc(or,(Ic={},Lr(or,function(n,t){rt.call(or.prototype,t)||(Ic[t]=n)}),Ic),{chain:!1}),or.VERSION="4.17.21",Lt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){or[n].placeholder=or}),Lt(["drop","take"],function(t,e){fr.prototype[t]=function(r){r=r===n?1:Le(Ea(r),0);var i=this.__filtered__&&!e?new fr(this):this.clone();return i.__filtered__?i.__takeCount__=Ue(r,i.__takeCount__):i.__views__.push({size:Ue(r,T),type:t+(i.__dir__<0?"Right":"")}),i},fr.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),Lt(["filter","map","takeWhile"],function(n,t){var e=t+1,r=1==e||3==e;fr.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:xo(n,3),type:e}),t.__filtered__=t.__filtered__||r,t}}),Lt(["head","last"],function(n,t){var e="take"+(t?"Right":"");fr.prototype[n]=function(){return this[e](1).value()[0]}}),Lt(["initial","tail"],function(n,t){var e="drop"+(t?"":"Right");fr.prototype[n]=function(){return this.__filtered__?new fr(this):this[e](1)}}),fr.prototype.compact=function(){return this.filter(gc)},fr.prototype.find=function(n){return this.filter(n).head()},fr.prototype.findLast=function(n){return this.reverse().find(n)},fr.prototype.invokeMap=hi(function(n,t){return"function"==typeof n?new fr(this):this.map(function(e){return Gr(e,n,t)})}),fr.prototype.reject=function(n){return this.filter(Ku(xo(n)))},fr.prototype.slice=function(t,e){t=Ea(t);var r=this;return r.__filtered__&&(t>0||e<0)?new fr(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==n&&(r=(e=Ea(e))<0?r.dropRight(-e):r.take(e-t)),r)},fr.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},fr.prototype.toArray=function(){return this.take(T)},Lr(fr.prototype,function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),o=or[i?"take"+("last"==e?"Right":""):e],u=i||/^find/.test(e);o&&(or.prototype[e]=function(){var e=this.__wrapped__,a=i?[1]:arguments,c=e instanceof fr,f=a[0],s=c||ra(e),l=function(n){var t=o.apply(or,Yt([n],a));return i&&h?t[0]:t};s&&r&&"function"==typeof f&&1!=f.length&&(c=s=!1);var h=this.__chain__,p=!!this.__actions__.length,m=u&&!h,d=c&&!p;if(!u&&s){e=d?e:new fr(this);var g=t.apply(e,a);return g.__actions__.push({func:Ru,args:[l],thisArg:n}),new cr(g,h)}return m&&d?t.apply(this,a):(g=this.thru(l),m?i?g.value()[0]:g.value():g)})}),Lt(["pop","push","shift","sort","splice","unshift"],function(n){var t=Xn[n],e=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);or.prototype[n]=function(){var n=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(ra(i)?i:[],n)}return this[e](function(e){return t.apply(ra(e)?e:[],n)})}}),Lr(fr.prototype,function(n,t){var e=or[t];if(e){var r=e.name+"";rt.call(Ze,r)||(Ze[r]=[]),Ze[r].push({name:t,func:e})}}),Ze[Qi(n,m).name]=[{name:"wrapper",func:n}],fr.prototype.clone=function(){var n=new fr(this.__wrapped__);return n.__actions__=Wi(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Wi(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Wi(this.__views__),n},fr.prototype.reverse=function(){if(this.__filtered__){var n=new fr(this);n.__dir__=-1,n.__filtered__=!0}else(n=this.clone()).__dir__*=-1;return n},fr.prototype.value=function(){var n=this.__wrapped__.value(),t=this.__dir__,e=ra(n),r=t<0,i=e?n.length:0,o=function(n,t,e){for(var r=-1,i=e.length;++r<i;){var o=e[r],u=o.size;switch(o.type){case"drop":n+=u;break;case"dropRight":t-=u;break;case"take":t=Ue(t,n+u);break;case"takeRight":n=Le(n,t-u)}}return{start:n,end:t}}(0,i,this.__views__),u=o.start,a=o.end,c=a-u,f=r?a:u-1,s=this.__iteratees__,l=s.length,h=0,p=Ue(c,this.__takeCount__);if(!e||!r&&i==c&&p==c)return Ei(n,this.__actions__);var m=[];n:for(;c--&&h<p;){for(var d=-1,g=n[f+=t];++d<l;){var v=s[d],y=v.iteratee,_=v.type,w=y(g);if(2==_)g=w;else if(!w){if(1==_)continue n;break n}}m[h++]=g}return m},or.prototype.at=Eu,or.prototype.chain=function(){return ku(this)},or.prototype.commit=function(){return new cr(this.value(),this.__chain__)},or.prototype.next=function(){this.__values__===n&&(this.__values__=ka(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?n:this.__values__[this.__index__++]}},or.prototype.plant=function(t){for(var e,r=this;r instanceof ar;){var i=Xo(r);i.__index__=0,i.__values__=n,e?o.__wrapped__=i:e=i;var o=i;r=r.__wrapped__}return o.__wrapped__=t,e},or.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof fr){var e=t;return this.__actions__.length&&(e=new fr(this)),(e=e.reverse()).__actions__.push({func:Ru,args:[pu],thisArg:n}),new cr(e,this.__chain__)}return this.thru(pu)},or.prototype.toJSON=or.prototype.valueOf=or.prototype.value=function(){return Ei(this.__wrapped__,this.__actions__)},or.prototype.first=or.prototype.head,Se&&(or.prototype[Se]=function(){return this}),or}();kt?((kt.exports=Ae)._=Ae,St._=Ae):At._=Ae}).call(this)},{buffer:"dskh"}],I6jy:[function(n,t,e){"use strict";function r(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e<t;e++)r[e]=n[e];return r}var i=this&&this.__createBinding||(Object.create?function(n,t,e,r){void 0===r&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}:function(n,t,e,r){void 0===r&&(r=e),n[r]=t[e]}),o=this&&this.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=this&&this.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&i(t,n,e);return o(t,n),t},a=this&&this.__awaiter||function(n,t,e,r){return new(e||(e=Promise))(function(i,o){function u(n){try{c(r.next(n))}catch(t){o(t)}}function a(n){try{c(r.throw(n))}catch(t){o(t)}}function c(n){var t;n.done?i(n.value):(t=n.value,t instanceof e?t:new e(function(n){n(t)})).then(u,a)}c((r=r.apply(n,t||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.getExpressionLine=e.getFileExtension=e.SupportedFileExtensions=e.AllMetaCommands=e.AllKeywords=e.Keywords=e.MetaCommands=e.SupportedUsingFileExtensions=void 0;var c=u(n("lodash"));e.SupportedUsingFileExtensions=[".lua",".template",".chords",".pitchmap",".config",".conductions"],e.MetaCommands={instrument:"instrument",volume:"volume",pan:"pan",mod:"mod",do:"do",doOnce:"doOnce",modOnce:"modOnce",voicingStrategy:"voicingStrategy",tempo:"tempo",signature:"signature",mark:"mark",jump:"jump",type:"type",template:"template",name:"name",instrumentDef:"instrumentDef",instrumentConf:"instrumentConf",device:"device"},e.Keywords=Object.assign({using:"using"},e.MetaCommands),e.AllKeywords=c.values(e.Keywords),e.AllMetaCommands=c.values(e.MetaCommands);var f=["(".concat(e.AllMetaCommands.join("|"),")\\s*:\\s*.*"),"".concat(e.Keywords.using,".*")],s=new RegExp(".*(".concat(f.join("|"),")"),"s");e.SupportedFileExtensions=[].concat(function(n){return function(n){if(Array.isArray(n))return r(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||function(n,t){if(n){if("string"==typeof n)return r(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?r(n,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.SupportedUsingFileExtensions),[".sheet"]),e.getFileExtension=function(n){if(n)return(n.match(/^.*(\.\w+)$/)||[])[1]},e.getExpressionLine=function(n,t){return a(this,void 0,void 0,regeneratorRuntime.mark(function e(){var r,i,o,u,a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=t.line;case 1:if(!(r>=0)){e.next=13;break}return i={line:r,col:0},e.next=5,n.getRange(i,t);case 5:if(o=e.sent,!(u=s.exec(o))){e.next=10;break}return a=u[1],e.abrupt("return",a.replace(/\n/g," "));case 10:--r,e.next=1;break;case 13:return e.abrupt("return","");case 14:case"end":return e.stop()}},e)}))}},{lodash:"B1iE"}],sarP:[function(n,t,e){!function(n){var t={"&amp;":"&","&lt;":"<","&gt;":">","&apos;":"'","&quot;":'"'};function r(n){return n&&n.replace(/^\s+|\s+$/g,"")}function i(n){return n.replace(/(&(?:lt|gt|amp|apos|quot|#(?:\d{1,6}|x[0-9a-fA-F]{1,5}));)/g,function(n){if("#"===n[1]){var e="x"===n[2]?parseInt(n.substr(3),16):parseInt(n.substr(2),10);if(e>-1)return String.fromCharCode(e)}return t[n]||n})}function o(n,t,e){if(void 0!==e){var r=n[t];r instanceof Array?r.push(e):n[t]=t in n?[r,e]:e}}("object"==typeof e&&e||{}).fromXML=function(n,t){return function n(t,e){if("string"==typeof t)return t;var u=t.r;if(u)return u;var a,c=function(n,t){if(n.t){for(var e,u,a=n.t.split(/([^\s='"]+(?:\s*=\s*(?:'[\S\s]*?'|"[\S\s]*?"|[^\s'"]*))?)/),c=a.length,f=0;f<c;f++){var s=r(a[f]);if(s){e||(e={});var l=s.indexOf("=");if(l<0)s="@"+s,u=null;else{u=s.substr(l+1).replace(/^\s+/,""),s="@"+s.substr(0,l).replace(/\s+$/,"");var h=u[0];h!==u[u.length-1]||"'"!==h&&'"'!==h||(u=u.substr(1,u.length-2)),u=i(u)}t&&(u=t(s,u)),o(e,s,u)}}return e}}(t,e),f=t.f,s=f.length;if(c||s>1)a=c||{},f.forEach(function(t){"string"==typeof t?o(a,"#",t):o(a,t.n,n(t,e))});else if(s){var l=f[0];if(a=n(l,e),l.n){var h={};h[l.n]=a,a=h}}else a=t.c?null:"";return e&&(a=e(t.n||"",a)),a}(function(n){for(var t=String.prototype.split.call(n,/<([^!<>?](?:'[\S\s]*?'|"[\S\s]*?"|[^'"<>])*|!(?:--[\S\s]*?--|\[[^\[\]'"<>]+\[[\S\s]*?]]|DOCTYPE[^\[<>]*?\[[\S\s]*?]|(?:ENTITY[^"<>]*?"[\S\s]*?")?[\S\s]*?)|\?[\S\s]*?\?)>/),e=t.length,o={f:[]},u=o,a=[],c=0;c<e;){var f=t[c++];f&&p(f);var s=t[c++];s&&l(s)}return o;function l(n){var t=n.length,e=n[0];if("/"===e)for(var r=n.replace(/^\/|[\s\/].*$/g,"").toLowerCase();a.length;){var i=u.n&&u.n.toLowerCase();if(u=a.pop(),i===r)break}else if("?"===e)h({n:"?",r:n.substr(1,t-2)});else if("!"===e)"[CDATA["===n.substr(1,7)&&"]]"===n.substr(-2)?p(n.substr(8,t-10)):h({n:"!",r:n.substr(1)});else{var o=function(n){var t={f:[]},e=(n=n.replace(/\s*\/?$/,"")).search(/[\s='"\/]/);return e<0?t.n=n:(t.n=n.substr(0,e),t.t=n.substr(e)),t}(n);h(o),"/"===n[t-1]?o.c=1:(a.push(u),u=o)}}function h(n){u.f.push(n)}function p(n){(n=r(n))&&h(i(n))}}(n),t)}}()},{}],ol4r:[function(n,t,e){"use strict";function r(n,t){var e="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!e){if(Array.isArray(n)||(e=i(n))||t&&n&&"number"==typeof n.length){e&&(n=e);var r=0,o=function(){};return{s:o,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,a=!0,c=!1;return{s:function(){e=e.call(n)},n:function(){var n=e.next();return a=n.done,n},e:function(n){c=!0,u=n},f:function(){try{a||null==e.return||e.return()}finally{if(c)throw u}}}}function i(n,t){if(n){if("string"==typeof n)return o(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?o(n,t):void 0}}function o(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e<t;e++)r[e]=n[e];return r}function u(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function a(n,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}function c(n,t,e){return t&&a(n.prototype,t),e&&a(n,e),n}Object.defineProperty(e,"__esModule",{value:!0}),e.DocParser=e.parseCommandDbJson=void 0;var f=n("from-xml"),s=function(){function n(t){u(this,n),this.rawObject=t}return c(n,[{key:"getName",value:function(){return(this.rawObject||{})["@name"]}},{key:"getIsOptional",value:function(){return"1"===(this.rawObject||{})["@optional"]}},{key:"getType",value:function(){return(this.rawObject||{})["@type"]}},{key:"getDescription",value:function(){return(this.rawObject||{})["#"]}}]),n}(),l=function(){function n(t){u(this,n),this.rawObject=t}return c(n,[{key:"getName",value:function(){var n,t;return((null===(t=null===(n=this.rawObject)||void 0===n?void 0:n.doc)||void 0===t?void 0:t.command)||{})["@name"]}},{key:"getDescription",value:function(){var n,t;return((null===(t=null===(n=this.rawObject)||void 0===n?void 0:n.doc)||void 0===t?void 0:t.command)||{})["#"]}},{key:"getParameter",value:function(){var n,t,e=null===(t=null===(n=this.rawObject)||void 0===n?void 0:n.doc)||void 0===t?void 0:t.param;return e?(Array.isArray(e)||(e=[e]),(e||[]).map(function(n){return new s(n)})):[]}}]),n}();e.parseCommandDbJson=function(n){var t={},e=JSON.parse(n);for(var r in e)t[r]=new l(e[r].rawObject);return t};var h=function(){function n(){u(this,n),this.commandDb={}}return c(n,[{key:"getDocComment",value:function(n,t){var e,i=[],o=!1,u=r(n.split("\n"));try{for(u.s();!(e=u.n()).done;){var a=e.value,c=a.trim().startsWith(t);if(!o&&c&&(o=!0),o&&!c)break;c&&i.push(a.replace(t,"").trim())}}catch(f){u.e(f)}finally{u.f()}return i.join("\n")}},{key:"parseDocumentText",value:function(n){var t=f.fromXML("<doc>".concat(n,"</doc>")),e=new l(t),r=e.getName();r&&(this.commandDb[r]=e)}},{key:"parseLua",value:function(n){var t=this.getDocComment(n,"--");t&&this.parseDocumentText(t)}},{key:"parseHpp",value:function(n){var t=this.getDocComment(n,"///");t&&this.parseDocumentText(t)}}]),n}();e.DocParser=h},{"from-xml":"sarP"}],zyF4:[function(n,t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GMInstruments=void 0,e.GMInstruments=["Acoustic Grand Piano","Bright Acoustic Piano","Electric Grand Piano","Honky-tonk Piano","Electric Piano 1","Electric Piano 2","Harpsichord","Clavi","Celesta","Glockenspiel","Music Box","Vibraphone","Marimba","Xylophone","Tubular Bells","Dulcimer","Drawbar Organ","Percussive Organ","Rock Organ","Church Organ","Reed Organ","Accordion","Harmonica","Tango Accordion","Acoustic Guitar Nylon","Acoustic Guitar Steel","Electric Guitar Jazz","Electric Guitar Clean","Electric Guitar Muted","Overdriven Guitar","Distortion Guitar","Guitar harmonics","Acoustic Bass","Electric Bass Finger","Electric Bass Pick","Fretless Bass","Slap Bass 1","Slap Bass 2","Synth Bass 1","Synth Bass 2","Violin","Viola","Cello","Contrabass","Tremolo Strings","Pizzicato Strings","Orchestral Harp","Timpani","String Ensemble 1","String Ensemble 2","SynthStrings 1","SynthStrings 2","Choir Aahs","Voice Oohs","Synth Voice","Orchestra Hit","Trumpet","Trombone","Tuba","Muted Trumpet","French Horn","Brass Section","SynthBrass 1","SynthBrass 2","Soprano Sax","Alto Sax","Tenor Sax","Baritone Sax","Oboe","English Horn","Bassoon","Clarinet","Piccolo","Flute","Recorder","Pan Flute","Blown Bottle","Shakuhachi","Whistle","Ocarina","Lead 1 Square","Lead 2 Sawtooth","Lead 3 Calliope","Lead 4 Chiff","Lead 5 Charang","Lead 6 Voice","Lead 7 Fifths","Lead 8 Bass+Lead","Pad 1 New Age","Pad 2 Warm","Pad 3 Polysynth","Pad 4 Choir","Pad 5 Bowed","Pad 6 Metallic","Pad 7 Halo","Pad 8 Sweep","FX 1 Rain","FX 2 Soundtrack","FX 3 Crystal","FX 4 Atmosphere","FX 5 Brightness","FX 6 Goblins","FX 7 Echoes","FX 8 Sci-Fi","Sitar","Banjo","Shamisen","Koto","Kalimba","Bag pipe","Fiddle","Shanai","Tinkle Bell","Agogo","Steel Drums","Woodblock","Taiko Drum","Melodic Tom","Synth Drum","Reverse Cymbal","Guitar Fret Noise","Breath Noise","Seashore","Bird Tweet","Telephone Ring","Helicopter","Applause","Gunshot"]},{}],f88W:[function(n,t,e){},{}],ykR4:[function(n,t,e){"use strict";function r(n,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}function i(n,t,e){return t&&r(n.prototype,t),e&&r(n,e),n}var o=this&&this.__awaiter||function(n,t,e,r){return new(e||(e=Promise))(function(i,o){function u(n){try{c(r.next(n))}catch(t){o(t)}}function a(n){try{c(r.throw(n))}catch(t){o(t)}}function c(n){var t;n.done?i(n.value):(t=n.value,t instanceof e?t:new e(function(n){n(t)})).then(u,a)}c((r=r.apply(n,t||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.CommandArgument=void 0;var u=n("../../parser/docParser"),a=n("../../Common"),c=n("./GMInstruments"),f=(n("fs"),'{"device":{"rawObject":{"doc":{"command":{"@name":"device","@where":"document","#":"Defines a device which can be used when adding instruments (see [instrumentDef](#instrumentDef))\\nsee [instrumentDef](#instrumentDef), [instrument](#instrument)\\n### example\\ndefine an device, an instrument and assign it to a track.\\n```\\ndevice: MyDevice midi 0;\\ninstrumentDef: organ _onDevice=MyDevice _ch=0 _pc=16; \\\\n\\n[ \\\\n\\ninstrument: organ; \\\\n\\n{ \\\\n\\nc d e f \\\\n\\n} \\\\n\\n] \\\\n\\n``` \\\\n\\n**Fluidsynth**\\nIf you want to use [fluidSynth](http://www.fluidsynth.org) as output device, you can achieve this with a command like this:\\n`device: MyDevice fluidSynth _useFont=\\"PATH OF A SOUNDFONT FILE\\";`\\nOn mac, make sure that you have fluidsynth installed."},"param":[{"@name":"setName","@position":"0","@type":"text","#":"An arbitary name."},{"@name":"isType","@position":"1","@type":"[midi,fluidSynth]","#":"The type of the device."},{"@name":"usePort","@position":"2","@type":"0..N","#":"The midi port id of your device. You can get a list of your connected devices, by executing `sheetp --list`"},{"@name":"withOffset","@position":"","@optional":"1","@type":"0..N","#":"Defines an offset in milliseconds. Can be used to keep different devices in sync."},{"@name":"useFont","@position":"","@optional":"1","@type":"a file path","#":"Only valid if isType=`fluidsynth`. Sets the location of the soundfont file, which will be used by FluidSynth"}]}}},"instrumentConf":{"rawObject":{"doc":{"command":{"@name":"instrumentConf","@where":"document","#":"With `instrumentConf` you are able to setup a specific instrument.\\nFollowing settings can be applied:\\n* volume\\n* pan\\n* voicing strategy\\n* mod\\n* velocity remap\\n### examples\\n#### mixed settings\\n`instrumentConf: piano volume 100 pan 50;`\\n#### setup a mod\\n`instrumentConf: piano mod myLuaMod someValue; --the `someValue` argument belongs to \\"myLuaMod\\"`\\n#### setup a velocity remap\\nWith `remapVelocity` you are able to change the velocity values behind `ppppp..fffff` for a specific instrument.\\nIn the example below the velcity for `p` will be set to 100 and the value for `f` will be set to 10.\\nThe value range is 0..100. (100=127 Midi velocity)\\n`instrumentConf: _set=remapVelocity _p=100 _f=10;`"},"param":{"@name":"for","@position":"0","#":"The name of the target instrument. This is the only \\"unique\\" parameter for this command. All further parameters are specific to its related setting."}}}},"mod":{"rawObject":{"doc":{"command":{"@name":"mod","@where":"track","#":"Adds a modification to the track. Every `mod` statement adds a further modification to the related voice.\\nIf you want to use ony one modification at the time use [do](#do) instead.\\n### examples\\n`/mod: arpeggio/`\\nMods can be external lua scripts, or one of theese internal mods:\\n#### Bend\\nPerforms a pitch bend from or to the pitch of a note. The value range is 0..100 where 50 means the pichbend center.\\n```language=Werckmeister,type=single,tempo=140\\n/doOnce: bend _from=0/ c1 | /doOnce: bend _to=0/ c1\\n```\\n#### Arpeggio\\nPerforms an arpeggio over a given chord.\\n**Arpeggio is deprecated. Use the lua mod [myArpeggio](#myarpeggio) instead.**"},"param":{"@name":"use","@position":"0","@type":"text","#":"The name of the modification to load. This is the only \\"unique\\" parameter for this command. All further parameters are specific to its related modification."}}}},"modOnce":{"rawObject":{"doc":{"command":{"@name":"modOnce","@where":"track","#":"Like [mod](#mod). But with the difference, that the loaded mod will be only executed once for the following event.\\n### examples\\n`/modOnce: arpeggio/`"},"param":{"@name":"use","@position":"0","@type":"text","#":"The name of the modification to load. This is the only \\"unique\\" parameter for this command. All further parameters are specific to its related modification."}}}},"cue":{"rawObject":{"doc":{"command":{"@name":"cue","@where":"track","#":"adds a cue meta message to the corresponding midi track\\n### examples\\n`/cue: _text=\\"cue text\\"/`"},"param":{"@name":"text","@type":"text","#":"the text which appears in the MIDI message"}}}},"instrumentSection":{"rawObject":{"doc":{"command":{"@name":"instrumentSection","@where":"document","#":["Layers arbitrary instruments into one.\\nsee [instrumentDef](#instrumentDef), [instrument](#instrument), [device](#device)\\n### example\\ncreate 3 instruments and assign them to the section `myNewInstrument`.","```language=Werckmeister\\\\n\\ntempo: 120;\\\\n\\ndevice: MyDevice midi _usePort=0;\\\\n\\ninstrumentDef:piano _onDevice=MyDevice _ch=0 _pc=0;\\\\n\\ninstrumentDef:guitar _onDevice=MyDevice _ch=1 _pc=29;\\\\n\\ninstrumentDef:organ _onDevice=MyDevice _ch=2 _pc=16;\\\\n\\ninstrumentSection: myNewInstrument piano guitar organ;\\\\n\\n\\\\n\\n[\\\\n\\ninstrument: myNewInstrument;\\\\n\\n{\\\\n\\na,,1 | a, | d#,~ | &\\\\n\\n}\\\\n\\n]\\\\n\\n```"]},"param":{"@name":"setName","@position":"0","@type":"text","#":"An arbitary name."}}}},"instrumentDef":{"rawObject":{"doc":{"command":{"@name":"instrumentDef","@where":"document","#":"Adds a new MIDI instrument.\\nsee [instrument](#instrument), [device](#device)\\n### example\\ndefine an device, an instrument and assign it to a track.\\n```\\ndevice: MyDevice midi 0;\\ninstrumentDef: organ _onDevice=MyDevice _ch=0 _pc=16; \\\\n\\n[ \\\\n\\ninstrument: organ; \\\\n\\n{ \\\\n\\nc d e f \\\\n\\n} \\\\n\\n] \\\\n\\n```"},"param":[{"@name":"setName","@position":"0","@type":"text","#":"An arbitary name."},{"@name":"onDevice","@position":"1","@type":"text","#":"The device which to use (The name of the device, see [device](#device))."},{"@name":"ch","@position":"2","@type":"0..15","#":"The MIDI channel."},{"@name":"cc","@position":"3","@type":"0..127","#":"A MIDI `control change` value."},{"@name":"pc","@position":"4","@type":"0..127","#":"A MIDI `program change` value."}]}}},"fill":{"rawObject":{"doc":{"command":{"@name":"fill","@where":"accomp","#":["Plays a template only once. Is also able to replace the performance of another template during its playback.\\nUseful for fill ins.","```language=Werckmeister\\\\n\\nusing \\"chords/default.chords\\";\\\\n\\ntempo: 90;\\\\n\\ndevice: MyDevice midi _usePort=0;\\\\n\\ninstrumentDef:drums _onDevice=MyDevice _ch=9 _pc=0;\\\\n\\n\\\\n\\n[\\\\n\\ntype: template;\\\\n\\nname: drums.fill;\\\\n\\ninstrument: drums;\\\\n\\n{\\\\n\\n(c, & &)4 (b,, & &)4 (a,, & &)4 (g,, & &)4 |\\\\n\\n}\\\\n\\n]\\\\n\\n\\\\n\\n[\\\\n\\ntype: template;\\\\n\\nname: drums.main;\\\\n\\ninstrument: drums;\\\\n\\n{\\\\n\\nr8 f#,, r & r & r & |\\\\n\\n}\\\\n\\n{\\\\n\\nr4 d,, r4 & | \\\\n\\n}\\\\n\\n{\\\\n\\nc,,4 r & r |\\\\n\\n}\\\\n\\n]\\\\n\\n\\\\n\\n[\\\\n\\ntype: accomp;\\\\n\\n{\\\\n\\n/template: drums.main/\\\\n\\nC |\\\\n\\n/fill: drums.fill/ -- play fill and drum beat together\\\\n\\nC | C |\\\\n\\n/fill: drums.fill _replace=\\"drums.main\\"/ -- play only the fill in\\\\n\\nC | C |\\\\n\\n}\\\\n\\n]\\\\n\\n```"]},"param":{"@name":"replace","@type":"text","#":"the name of the template to be replaced by the fill"}}}},"jump":{"rawObject":{"doc":{"command":{"@name":"jump","@where":"voice","#":["Jumps to a previous defined mark See [mark](manual/#mark).\\n### example","```language=Werckmeister\\\\n\\ndevice: _usePort=0 _setName=MyDevice _isType=midi;\\\\n\\ninstrumentDef: _setName=piano _onDevice=MyDevice _ch=0 _pc=1 _cc=8;\\\\n\\n[\\\\n\\ninstrument: piano;\\\\n\\n{\\\\n\\n/signature: 5 4/\\\\n\\n/mark: A/ -- valid & unique to this voice\\\\n\\nc4 d e f g |\\\\n\\n/jump: A/ -- jumps to A once\\\\n\\na b c\'2\\\\n\\n}\\\\n\\n]\\\\n\\n```"]},"param":[{"@name":"to","@position":"0","@type":"text","#":"the destination marker"},{"@name":"ignore","@position":"","@optional":"1","@type":"0..100","#":"Ignores the jump N times"},{"@name":"repeat","@position":"","@optional":"1","@type":"0..100","#":"Repeats the jump N times. (A repeat value of 1 performs 2 jumps)"}]}}},"mark":{"rawObject":{"doc":{"command":{"@name":"mark","@where":"voice","#":["adds a mark to the voice. Us it in combination with [jump](manual/#jump).\\n### examples","```language=Werckmeister\\\\n\\ndevice: _usePort=0 _setName=MyDevice _isType=midi;\\\\n\\ninstrumentDef: _setName=piano _onDevice=MyDevice _ch=0 _pc=1 _cc=8;\\\\n\\n[\\\\n\\ninstrument: piano;\\\\n\\n{\\\\n\\n/signature: 5 4/\\\\n\\n/mark: A/ -- valid & unique to this voice\\\\n\\nc4 d e f g |\\\\n\\n/jump: A/ -- jumps to A once\\\\n\\na b c\'2\\\\n\\n}\\\\n\\n]\\\\n\\n```"]},"param":{"@name":"name","@position":"0","@type":"word","#":"the name of the mark"}}}},"fade":{"rawObject":{"doc":{"command":{"@name":"fade","@where":"track","#":"Fades the volume over a given duration in quarters.\\n### example\\n```language=Werckmeister,type=full\\ndevice: myDevice midi _usePort=0;\\\\n\\ninstrumentDef: organ myDevice _ch=0 _pc=16;\\\\n\\ntempo: 75;\\\\n\\n[\\\\n\\ninstrument: organ;\\\\n\\n{\\\\n\\n\\\\fff\\\\n\\n/fade: _from=0 _to=100 _duration=4/\\\\n\\nc1 |\\\\n\\n/fade: _from=0 _to=100 _duration=4 _curve=\\"quad\\"/\\\\n\\nc1 |\\\\n\\n/fade: _from=0 _to=100 _duration=4 _curve=\\"cub\\"/\\\\n\\nc1 |\\\\n\\n/fade: _from=0 _to=100 _duration=4 _curve=\\"quart\\"/\\\\n\\nc1 |\\\\n\\n/fade: _from=0 _to=100 _duration=4 _curve=\\"quint\\"/\\\\n\\nc1 |\\\\n\\n/fade: _from=0 _to=100 _duration=4 _curve=\\"exp\\"/\\\\n\\nc1 |\\\\n\\n}\\\\n\\n]\\\\n\\n```\\n![supported curve types](https://raw.githubusercontent.com/werckme/werckmeister/main/assets/curve-types.png)"},"param":[{"@name":"duration","@position":"0","@type":"0..N","#":"the duration in quarters."},{"@name":"from","@position":"1","@default":"0","@type":"0..100","#":"The source volume value."},{"@name":"to","@position":"2","@default":"100","@type":"0..100","#":"The target volume value."},{"@name":"curve","@position":"3","@default":"lin","@type":"lin,quad,cub,quart,quint,exp","#":"The fade curve type."}]}}},"instrument":{"rawObject":{"doc":{"command":{"@name":"instrument","@where":"trackConfig, track","#":"Set or change the instrument of a track.\\n### examples\\n**set an instrument for a track**\\n```\\n[ \\\\n\\ninstrument: myInstrument; \\\\n\\n{ \\\\n\\nc d e f \\\\n\\n} \\\\n\\n] \\\\n\\n```\\n**change current instrument within a track**\\n```\\n[ \\\\n\\n{ \\\\n\\nc d e f | \\\\n\\n/instrument: myOtherInstrument/\\nc d e f\\n} \\\\n\\n] \\\\n\\n```"},"param":{"@name":"use","@position":"0","@type":"text","#":"The instrument name."}}}},"pan":{"rawObject":{"doc":{"command":{"@name":"pan","@where":"track","#":"set the pan of the current track\\n### example\\n`/pan: 50/`"},"param":{"@name":"to","@position":"0","@type":"0..100","#":"The pan value. Where 50 means the center"}}}},"signature":{"rawObject":{"doc":{"command":{"@name":"signature","#":"Set the time signature of the current track.\\n### example\\n`/signature: 3 4/`"},"param":[{"@name":"upper","@position":"0","#":"The upper value of the signature."},{"@name":"lower","@position":"1","#":"The lower value of the signature."}]}}},"do":{"rawObject":{"doc":{"command":{"@name":"do","@where":"track","#":"Such as [mod](#mod)&nbsp;`do` adds a modification to the track.\\nThe difference is: every `mod` command adds a further modification to a voice.\\n`do` replaces the previous modification.\\n### example\\n`/do: arpeggio/`"},"param":{"@name":"use","@position":"0","@type":"text","#":"The name of the modification to load. This is the only \\"unique\\" parameter for this command. All further parameters are specific to its related modification."}}}},"doOnce":{"rawObject":{"doc":{"command":{"@name":"doOnce","@where":"track","#":"Like [do](#do). But with the difference, that the loaded mod will be only executed once for the following event.\\n### example\\n`/doOnce: arpeggio/`"},"param":{"@name":"use","@position":"0","@type":"text","#":"The name of the modification to load. This is the only \\"unique\\" parameter for this command. All further parameters are specific to its related modification."}}}},"tempo":{"rawObject":{"doc":{"command":{"@name":"tempo","@where":"document, track","#":"`tempo` defines or changes the current tempo.\\n### example\\n`tempo: 120;`\\nIt is also possible to set different tempo values for several tracks:\\n[see here](/manual#tempo)"},"param":{"@name":"bpm","@position":"0","#":"The tempo bpm value."}}}},"voicingStrategy":{"rawObject":{"doc":{"command":{"@name":"voicingStrategy","@where":"track","#":"Adds a modification to the track.\\n### example\\n`/voicingStrategy: asNotated/`\\nVoicing strategies can be external lua scripts, or one of theese internal strategies:\\n* asNotated\\n* simpleGuitar"},"param":{"@name":"use","@position":"0","@type":"text","#":"The name of the strategy to load. This is the only \\"unique\\" parameter for this command. All further parameters are specific to its related strategy."}}}},"volume":{"rawObject":{"doc":{"command":{"@name":"volume","@where":"track","#":"set the volume of the current track\\n### examples\\n`/volume: 50/`"},"param":{"@name":"to","@position":"0","@type":"0..100","#":"The volume value."}}}},"drumRudiments":{"rawObject":{"doc":{"command":{"@name":"drumRudiments","@where":"mod","@using":"lua/mod/drumRudiments.lua","#":"Implements a collection of different drum rudiments. ([see Wikipedia](https://en.wikipedia.org/wiki/Drum_rudiment))\\nYou can specify which notes are for `L` and `R` and performing duration.\\nThis will be achived by using an chord as source material.\\nThe chord pitches will be used for `L` and `R`.\\nThe length of the chord event defines over which time the rudiment will be peformed.\\nAn event tag specifies which rudiment will be performed.\\nFor example:\\nThis plays one paradiddle over a length of 1 quarter\\nusing `sn1` for R and `sn2` for L:\\n```\\n/mod: drumRudiments/\\\\n\\nR L \\\\n\\n\\"paradiddle\\"@<\\"sn1\\" \\"sn2\\">4\\\\n\\n```\\nExamples:\\n**a single paradiddle**\\n```language=Werckmeister\\\\n\\nusing \\"lua/mods/drumRudiments.lua\\";\\\\n\\ntempo: 150;\\\\n\\ndevice: MyDevice midi 0;\\\\n\\ninstrumentDef:piano MyDevice _ch=0 _pc=118;\\\\n\\n[\\\\n\\ninstrument: piano;\\\\n\\n{\\\\n\\n/mod: drumRudiments/\\\\n\\n-- a paradiddle (RLRR) with c\' for R and c for L\\\\n\\n\\"paradiddle\\"@<c\' c>1\\\\n\\n}\\\\n\\n]\\\\n\\n```\\n**repeating**\\n```language=Werckmeister\\\\n\\nusing \\"lua/mods/drumRudiments.lua\\";\\\\n\\ntempo: 120;\\\\n\\ndevice: MyDevice midi 0;\\\\n\\ninstrumentDef:piano MyDevice _ch=0 _pc=118;\\\\n\\n[\\\\n\\ninstrument: piano;\\\\n\\n{\\\\n\\n/mod: drumRudiments/\\\\n\\n-- performs 4 paradiddles (RLRR LRLL RLRR LRLL) with c\' for R and c for L\\\\n\\n\\"4x paradiddle\\"@<c\' c>1\\\\n\\n}\\\\n\\n]\\\\n\\n```\\n**orchestration**\\nIf you want to orchestrate a rudiment over a drum set,\\nyou are able to define more R & L notes. *(The total number of the notes has to be even.)*\\n```language=Werckmeister\\\\n\\nusing \\"lua/mods/drumRudiments.lua\\";\\\\n\\ntempo: 120;\\\\n\\ndevice: MyDevice midi 0;\\\\n\\ninstrumentDef:piano MyDevice _ch=0 _pc=118;\\\\n\\n[\\\\n\\ninstrument: piano;\\\\n\\n{\\\\n\\n/mod: drumRudiments/\\\\n\\n-- performs 4 paradiddles (RLRR LRLL RLRR LRLL) with \\\\n\\n-- c\' for R1 and c for L1\\\\n\\n-- and c, for R2 and c,, for L2.\\\\n\\n-- The final sequence will be: c\'(R1) c(L1) c,(R2) c,,(R1) ... \\\\n\\n\\"4x paradiddle\\"@<c\' c c, c,,>1\\n}\\\\n\\n]\\\\n\\n```\\n**Supported Rudiments**\\n<ul style=\\"font-size: 0.9em;\\">\\n<li>singleStrokeRoll</li>\\n<li>doubleStrokeRoll</li>\\n<li>trippleStrokeRoll</li>\\n<li>fiveStrokeRoll</li>\\n<li>singleStrokeFour</li>\\n<li>singleStrokeSeven</li>\\n<li>multipleBounceRoll</li>\\n<li>sixStrokeRoll</li>\\n<li>sevenStrokeRoll</li>\\n<li>nineStrokeRoll</li>\\n<li>tenStrokeRoll</li>\\n<li>elevenStrokeRoll</li>\\n<li>thirteenStrokeRoll</li>\\n<li>fifteenStrokeRoll</li>\\n<li>seventeenStrokeRoll</li>\\n<li>paradiddle</li>\\n<li>doubleParadiddle</li>\\n<li>trippleParadiddle</li>\\n<li>paradiddlediddle</li>\\n<li>flam</li>\\n<li>flamAccent</li>\\n<li>flamTap</li>\\n<li>flamacue</li>\\n<li>flamParadiddle</li>\\n<li>singleFlammedMill</li>\\n<li>pataflafla</li>\\n<li>swissArmytriplet</li>\\n<li>invertedFlamTap</li>\\n<li>flamDrag</li>\\n<li>singleDragTap</li>\\n<li>doubleDragTap</li>\\n<li>lesson25</li>\\n<li>singleDragadiddle</li>\\n<li>dragParadiddle1</li>\\n<li>dragParadiddle2</li>\\n<li>singleRatamacue</li>\\n<li>doubleRatamacue</li>\\n<li>trippleRatamacue</li>\\n</ul>"},"param":[{"@name":"velocityFactorAccented","@optional":"1","@type":"0..1","#":"The velocity factor for accented notes (Default=1)"},{"@name":"velocityFactorUnaccented","@optional":"1","@type":"0..1","#":"The velocity factor for unaccented notes (Default=0.7)"},{"@name":"velocityFactorGraceNote","@optional":"1","@type":"0..1","#":"The velocity factor for accented notes (Default=1)"},{"@name":"flamOffset","@optional":"1","@type":"0..N","#":"The offset in quartes when to perform the grace note before the actual note (Default=0.05)"},{"@name":"dragOffset","@optional":"1","@type":"0..N","#":"The offset in quartes when to perform the two grace notes before the actual note (Default=0.05)"}]}}},"guitarStroke":{"rawObject":{"doc":{"command":{"@name":"guitarStroke","@where":"mod","@using":"lua/mod/guitarStroke.lua","#":"Simulates guitar strokes as mini arpeggios.\\n*Note: the alternate mode works only if this mod is set via instrumentConf.*\\n```\\n-- does not work: \\\\n\\n[ \\\\n\\n{ \\\\n\\n/mod: guitarStroke _mode=alternate/\\\\n\\n} \\\\n\\n] \\\\n\\n```\\n```\\n-- does work: \\\\n\\ninstrumentConf: myInstrument mod guitarStroke _mode=alternate; \\\\n\\n```\\n**Example**\\n```language=Werckmeister\\\\n\\nusing \\"lua/mods/guitarStroke.lua\\";\\\\n\\ntempo: 120;\\\\n\\ndevice: MyDevice midi 0;\\\\n\\ninstrumentDef: piano MyDevice _ch=0 _pc=24;\\\\n\\ninstrumentConf: piano mod guitarStroke _mode=alternate _value=16; \\\\n\\n[\\\\n\\ninstrument: piano;\\\\n\\n{\\\\n\\n<c e g b>4 <c e g b>4 <c eb g bb>2 | <c eb g bb>2 <c eb g bb>2\\\\n\\n}\\\\n\\n]\\\\n\\n```"},"param":[{"@name":"direction","@optional":"1","@type":"[up,down]","#":"Specifies the start direction of the stroke"},{"@name":"value","@optional":"1","@type":"[1,2,4,8,...]","#":"the duration of one aprgeggio event. (Default=64)"},{"@name":"mode","@optional":"1","@type":"[normal,alternate]","#":"Perform only one stroke direction (normal) or alternates between up and down. (Default=normal)"}]}}},"legato":{"rawObject":{"doc":{"command":{"@name":"legato","@where":"mod","@using":"lua/mod/legato.lua","#":"Performs every note legato. It is also possible to tag single notes.\\nIf a tag is given, only the tagged notes are performed legato.\\n```language=Werckmeister\\\\n\\nusing \\"lua/mods/legato.lua\\";\\\\n\\ntempo: 140;\\\\n\\ndevice: MyDevice midi 0;\\\\n\\ninstrumentDef:piano MyDevice _ch=0 _pc=0;\\\\n\\n[\\\\n\\ninstrument: piano;\\\\n\\n{\\\\n\\n/mod: legato _forTag=leg _amount=100/\\\\n\\n-- only the `d` will be performed legato. \\\\n\\nc \\"leg\\"@d e f\\\\n\\n}\\\\n\\n]\\\\n\\n```"},"param":[{"@name":"forTag","@optional":"1","@type":"text","#":"Specifies a tag name. If set only events with this tag name will be affected by the legato mod."},{"@name":"amount","@optional":"1","@type":"0..100","#":"The ammount of the legato effect"}]}}},"myArpeggio":{"rawObject":{"doc":{"command":{"@name":"myArpeggio","@where":"mod","@using":"lua/mod/myArpeggio.lua","#":"A simple arpeggio implementation.\\n**Example**\\n```language=Werckmeister\\\\n\\nusing \\"lua/mods/myArpeggio.lua\\";\\\\n\\ntempo: 120;\\\\n\\ndevice: MyDevice midi 0;\\\\n\\ninstrumentDef: piano MyDevice _ch=0 _pc=0;\\\\n\\n[\\\\n\\ninstrument: piano;\\\\n\\n{\\\\n\\n/do: myArpeggio/ \\\\n\\n<c e g b>2 \\\\n\\n/do: myArpeggio _direction=down/ \\\\n\\n<c eb g bb>2 \\\\n\\n}\\\\n\\n]\\\\n\\n```"},"param":[{"@name":"style","@optional":"1","@type":"[normal,legato]","#":"Performs the arpeggio normal or legato"},{"@name":"direction","@optional":"1","@type":"[up,down]","#":"the direction of the aprgeggio. (Default=up)"}]}}},"staccato":{"rawObject":{"doc":{"command":{"@name":"staccato","@where":"mod","@using":"lua/mod/staccato.lua","#":"Performs every note staccato. It is also possible to tag single notes.\\nIf a tag is given, only the tagged notes are performed staccato.\\n```language=Werckmeister\\\\n\\nusing \\"lua/mods/staccato.lua\\";\\\\n\\ntempo: 140;\\\\n\\ndevice: MyDevice midi 0;\\\\n\\ninstrumentDef:piano MyDevice _ch=0 _pc=0;\\\\n\\n[\\\\n\\ninstrument: piano;\\\\n\\n{\\\\n\\n/mod: staccato _forTag=stac _amount=100/\\\\n\\n-- only the `d` will be performed staccato. \\\\n\\nc \\"stac\\"@d e f\\\\n\\n}\\\\n\\n]\\\\n\\n```"},"param":[{"@name":"forTag","@optional":"1","@type":"text","#":"Specifies a tag name. If set only events with this tag name will be affected by the staccato mod."},{"@name":"amount","@optional":"1","@type":"0..100","#":"The ammount of the staccato effect"}]}}},"swing":{"rawObject":{"doc":{"command":{"@name":"swing","@where":"mod","@using":"lua/mod/swing.lua","#":"Performs a swing groove.\\n```language=Werckmeister\\\\n\\nusing \\"lua/mods/swing.lua\\";\\\\n\\ntempo: 120;\\\\n\\ndevice: MyDevice midi 0;\\\\n\\ninstrumentDef: piano MyDevice _ch=0 _pc=0;\\\\n\\n[\\\\n\\ninstrument: piano;\\\\n\\n{\\\\n\\n/mod: swing/\\\\n\\nc8 c c c c c c c\\n}\\\\n\\n]\\\\n\\n```"},"param":[{"@name":"grid","@optional":"1","@type":"[8, 16]","#":"Performs the swing offset either on 8th or 16th. (Default=8)"},{"@name":"offset","@optional":"1","@type":"0..100","#":"The ammount of the swing offset"}]}}},"guitar":{"rawObject":{"doc":{"command":{"@name":"guitar","@where":"voicingStrategy","@using":"lua/voicings/guitar.lua","#":"Tries to simulate the chord voicing of an guitar.\\n```language=Werckmeister\\\\n\\nusing \\"lua/voicings/guitar.lua\\";\\\\n\\nusing \\"chords/default.chords\\";\\ntempo: 120;\\\\n\\ndevice: MyDevice midi 0;\\\\n\\ninstrumentDef:piano MyDevice _ch=0 _pc=0;\\\\n\\n[\\\\n\\ntype: template;\\\\n\\nname: myTemplate;\\\\n\\ninstrument: piano;\\\\n\\n{\\\\n\\n/voicingStrategy: guitar/\\\\n\\n<I II III IV V VI VII>1\\\\n\\n}\\\\n\\n]\\\\n\\n[\\\\n\\ntype: accomp;\\n{\\\\n\\nC | F | G | C |\\\\n\\n}\\\\n\\n]\\\\n\\n```"},"param":{"@name":"range","@optional":"1","@type":"[contrabass,bass,baritone,tenor,alto,mezzosoprano,soprano]","#":"If given the strategy tries to keeps the range by shifting the octave of the chord."}}}},"simple":{"rawObject":{"doc":{"command":{"@name":"simple","@where":"voicingStrategy","@using":"lua/voicings/simple.lua","#":"The simple approach with no strategy.\\n```language=Werckmeister\\\\n\\nusing \\"lua/voicings/simple.lua\\";\\\\n\\nusing \\"chords/default.chords\\";\\ntempo: 120;\\\\n\\ndevice: MyDevice midi 0;\\\\n\\ninstrumentDef:piano MyDevice _ch=0 _pc=0;\\\\n\\n[\\\\n\\ntype: template;\\\\n\\nname: myTemplate;\\\\n\\ninstrument: piano;\\\\n\\n{\\\\n\\n/voicingStrategy: simple/\\\\n\\n<I II III IV V VI VII>1\\\\n\\n}\\\\n\\n]\\\\n\\n[\\\\n\\ntype: accomp;\\n{\\\\n\\nC | F | G | C |\\\\n\\n}\\\\n\\n]\\\\n\\n```"},"param":{"@name":"range","@optional":"1","@type":"[contrabass,bass,baritone,tenor,alto,mezzosoprano,soprano]","#":"If given the strategy tries to keeps the range by shifting the octave of the chord."}}}},"voicelead":{"rawObject":{"doc":{"command":{"@name":"voicelead","@where":"voicingStrategy","@using":"lua/voicings/voicelead.lua","#":"Tries to simulates a voice leading approach:\\nthe octaves of a chord are rearranged, so that the actual pitch distance between the previous chord is kept minimal.\\n```language=Werckmeister\\\\n\\nusing \\"lua/voicings/voicelead.lua\\";\\\\n\\nusing \\"chords/default.chords\\";\\ntempo: 120;\\\\n\\ndevice: MyDevice midi 0;\\\\n\\ninstrumentDef:piano MyDevice _ch=0 _pc=0;\\\\n\\n[\\\\n\\ntype: template;\\\\n\\nname: myTemplate;\\\\n\\ninstrument: piano;\\\\n\\n{\\\\n\\n/voicingStrategy: voicelead/\\\\n\\n<I II III IV V VI VII>1\\\\n\\n}\\\\n\\n]\\\\n\\n[\\\\n\\ntype: accomp;\\n{\\\\n\\nC | F | G | C |\\\\n\\n}\\\\n\\n]\\\\n\\n```"},"param":{"@name":"range","@optional":"1","@type":"[contrabass,bass,baritone,tenor,alto,mezzosoprano,soprano]","#":"If given the strategy tries to keeps the range by shifting the octave of the chord."}}}}}'),s=[a.Keywords.mod,a.Keywords.voicingStrategy,a.Keywords.do,a.Keywords.doOnce],l=[a.Keywords.volume,a.Keywords.pan],h=[].concat(l,s),p=function(){function n(){(function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")})(this,n),this.autoHintDb=u.parseCommandDbJson(f)}return i(n,[{key:"getModName",value:function(n){n=n||"";var t=h.join("|"),e=new RegExp("\\s*(".concat(a.Keywords.modOnce,"|").concat(t,')\\s*:.*_use="?([a-zA-Z0-9]+)"?')).exec(n);return e||(e=new RegExp("\\s*(".concat(a.Keywords.modOnce,"|").concat(t,")\\s*:\\s*([a-zA-Z0-9]+)")).exec(n)),!e||e.length<2?"":e[2]}},{key:"getInstrumentConfModName",value:function(n){n=n||"";var t=h.join("|"),e=(new RegExp(".*(".concat(t,").*")).exec(n)||[])[1];if(e&&l.includes(e))return e;t=h.map(function(n){return"".concat(n,".*")}).join("|");var r=(new RegExp(".*(".concat(t,")")).exec(n)||[])[1];if(r){var i=r.match(/\s*_use="?([a-zA-Z0-9]+)"?/);return i&&i.length>1?i[1]:(t=h.join("|"),!(i=new RegExp("\\s*(".concat(t,")\\s*([a-zA-Z0-9]+)")).exec(r))||i.length<2?"":i[2])}}},{key:"isMod",value:function(n){return n===a.Keywords.mod||n===a.Keywords.modOnce||n===a.Keywords.voicingStrategy}},{key:"isInstrumentConf",value:function(n){return n===a.Keywords.instrumentConf}},{key:"getParameterSuggestion",value:function(n,t){var e=n.getParameter();return t&&(e=e.filter(function(n){return n.getName().startsWith(t)})),e.sort(function(n,t){return n.getName().localeCompare(t.getName())}).map(function(t){return{displayText:t.getName(),text:"_".concat(t.getName()),command:n}})}},{key:"getInstrumentDefPcSuggestions",value:function(n,t,e){var r=c.GMInstruments.map(function(e,r){return{displayText:"".concat(e," (").concat(r,")"),text:r.toString(),command:n,parameter:t}});return e&&(r=r.filter(function(n){return n.displayText.toLowerCase().indexOf(e.toLowerCase())>=0})),r}},{key:"getValueSuggestion",value:function(n,t,e){var r=n.getParameter().filter(function(n){return n.getName()===t})[0];if(!r)return[];if(n.getName()===a.Keywords.instrumentDef&&"pc"==t)return this.getInstrumentDefPcSuggestions(n,r,e);var i=(r.getType()||"").match(/\[(.*)\]/);if(!i||!i[1])return[];var o=i[1].split(",").map(function(n){return n.trim()});return e&&(o=o.filter(function(n){return n.startsWith(e)})),o.map(function(t){return{displayText:t,text:'"'.concat(t,'"'),command:n,parameter:r}})}},{key:"getSuggestions",value:function(n,t){return o(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e,r,i,o,u,a,c;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n){t.next=2;break}return t.abrupt("return",[]);case 2:if(e=n.match(/.*?(\w+)\s*:.*?_(\w*)(="?(\w*))?$/)){t.next=5;break}return t.abrupt("return",[]);case 5:if(r=(e[1]||"").trim(),i=void 0!==e[3],o=(e[2]||"").trim(),this.isMod(r)&&(r=this.getModName(n)),this.isInstrumentConf(r)&&(r=this.getInstrumentConfModName(n)),u=this.autoHintDb[r]){t.next=13;break}return t.abrupt("return",[]);case 13:if(!i){t.next=17;break}return a=(e[2]||"").trim(),c=(e[4]||"").trim(),t.abrupt("return",this.getValueSuggestion(u,a,c));case 17:return t.abrupt("return",this.getParameterSuggestion(u,o));case 18:case"end":return t.stop()}},t,this)}))}}]),n}();e.CommandArgument=p},{"../../parser/docParser":"ol4r","../../Common":"I6jy","./GMInstruments":"zyF4",fs:"f88W"}],Tlxz:[function(n,t,e){"use strict";function r(n,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}function i(n,t,e){return t&&r(n.prototype,t),e&&r(n,e),n}var o=this&&this.__createBinding||(Object.create?function(n,t,e,r){void 0===r&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}:function(n,t,e,r){void 0===r&&(r=e),n[r]=t[e]}),u=this&&this.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),a=this&&this.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&o(t,n,e);return u(t,n),t},c=this&&this.__awaiter||function(n,t,e,r){return new(e||(e=Promise))(function(i,o){function u(n){try{c(r.next(n))}catch(t){o(t)}}function a(n){try{c(r.throw(n))}catch(t){o(t)}}function c(n){var t;n.done?i(n.value):(t=n.value,t instanceof e?t:new e(function(n){n(t)})).then(u,a)}c((r=r.apply(n,t||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.Using=void 0;var f=n("../../Common"),s=a(n("lodash")),l=function(){function n(t){(function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")})(this,n),this.fileInspector=t}return i(n,[{key:"getSuggestions",value:function(n,t){return c(this,void 0,void 0,regeneratorRuntime.mark(function e(){var r,i,o,u,a,c;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return",[]);case 2:if(n.match(/^\s*using\s*"{0,1}[^"]*$/)){e.next=5;break}return e.abrupt("return",[]);case 5:if(r=(n.match(/.+"(.*)/)||[])[1]){e.next=8;break}return e.abrupt("return",[]);case 8:return i=r?s.last(r.split("/")):"",e.next=11,t.getAbsolutePath();case 11:return o=e.sent,e.next=14,this.fileInspector.getParentPath(o);case 14:if(o=e.sent,u=r,!i){e.next=20;break}return e.next=19,this.fileInspector.getParentPath(r);case 19:u=e.sent;case 20:return e.next=22,this.fileInspector.resolve(o,u);case 22:return u=e.sent,e.next=25,this.fileInspector.ls(u);case 25:return a=e.sent,c=a.filter(function(n){return n.isDirectory||f.SupportedUsingFileExtensions.includes(f.getFileExtension(n.name))}),i&&(c=c.filter(function(n){return n.name.startsWith(i)})),e.abrupt("return",c.sort(function(n,t){return n.isDirectory&&!t.isDirectory?-1:!n.isDirectory&&t.isDirectory?1:n.name.localeCompare(t.name)}).map(function(n){return{displayText:n.name,text:n.name,file:n}}));case 29:case"end":return e.stop()}},e,this)}))}}]),n}();e.Using=l},{"../../Common":"I6jy",lodash:"B1iE"}],bvdo:[function(n,t,e){"use strict";function r(n){return function(n){if(Array.isArray(n))return u(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||o(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(n,t){var e="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!e){if(Array.isArray(n)||(e=o(n))||t&&n&&"number"==typeof n.length){e&&(n=e);var r=0,i=function(){};return{s:i,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(n){throw n},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,a=!0,c=!1;return{s:function(){e=e.call(n)},n:function(){var n=e.next();return a=n.done,n},e:function(n){c=!0,u=n},f:function(){try{a||null==e.return||e.return()}finally{if(c)throw u}}}}function o(n,t){if(n){if("string"==typeof n)return u(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?u(n,t):void 0}}function u(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e<t;e++)r[e]=n[e];return r}function a(n,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}var c=this&&this.__awaiter||function(n,t,e,r){return new(e||(e=Promise))(function(i,o){function u(n){try{c(r.next(n))}catch(t){o(t)}}function a(n){try{c(r.throw(n))}catch(t){o(t)}}function c(n){var t;n.done?i(n.value):(t=n.value,t instanceof e?t:new e(function(n){n(t)})).then(u,a)}c((r=r.apply(n,t||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeatures=void 0;var f=n("./Common"),s=n("./features/autocomplete/CommandArgument"),l=n("./features/autocomplete/Using"),h=function(){function n(t){(function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")})(this,n),this.fileSystemInspector=t,this.features={autoCompletes:[new l.Using(this.fileSystemInspector),new s.CommandArgument]}}return function(n,t,e){t&&a(n.prototype,t),e&&a(n,e)}(n,[{key:"autoComplete",value:function(n){return c(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e,o,u,a,c,s,l;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.getCursor();case 2:return e=t.sent,t.next=5,f.getExpressionLine(n,e);case 5:if(o=t.sent){t.next=8;break}return t.abrupt("return",[]);case 8:u=[],a=i(this.features.autoCompletes),t.prev=10,a.s();case 12:if((c=a.n()).done){t.next=22;break}return s=c.value,t.next=16,s.getSuggestions(o,n);case 16:if(l=t.sent){t.next=19;break}return t.abrupt("continue",20);case 19:u.push.apply(u,r(l));case 20:t.next=12;break;case 22:t.next=27;break;case 24:t.prev=24,t.t0=t.catch(10),a.e(t.t0);case 27:return t.prev=27,a.f(),t.finish(27);case 30:return t.abrupt("return",u);case 31:case"end":return t.stop()}},t,this,[[10,24,27,30]])}))}}]),n}();e.LanguageFeatures=h},{"./Common":"I6jy","./features/autocomplete/CommandArgument":"ykR4","./features/autocomplete/Using":"Tlxz"}]},{},["bvdo"]);
39
+ var n;parcelRequire=function(t,e,r,i){var o,u="function"==typeof parcelRequire&&parcelRequire,a="function"==typeof require&&require;function c(n,r){if(!e[n]){if(!t[n]){var i="function"==typeof parcelRequire&&parcelRequire;if(!r&&i)return i(n,!0);if(u)return u(n,!0);if(a&&"string"==typeof n)return a(n);var o=new Error("Cannot find module '"+n+"'");throw o.code="MODULE_NOT_FOUND",o}s.resolve=function(e){return t[n][1][e]||e},s.cache={};var f=e[n]=new c.Module(n);t[n][0].call(f.exports,s,f,f.exports,this)}return e[n].exports;function s(n){return c(s.resolve(n))}}c.isParcelRequire=!0,c.Module=function(n){this.id=n,this.bundle=c,this.exports={}},c.modules=t,c.cache=e,c.parent=u,c.register=function(n,e){t[n]=[function(n,t){t.exports=e},{}]};for(var f=0;f<r.length;f++)try{c(r[f])}catch(t){o||(o=t)}if(r.length){var s=c(r[r.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=s:"function"==typeof n&&n.amd&&n(function(){return s})}if(parcelRequire=c,o)throw o;return c}({sarP:[function(n,t,e){!function(n){var t={"&amp;":"&","&lt;":"<","&gt;":">","&apos;":"'","&quot;":'"'};function r(n){return n&&n.replace(/^\s+|\s+$/g,"")}function i(n){return n.replace(/(&(?:lt|gt|amp|apos|quot|#(?:\d{1,6}|x[0-9a-fA-F]{1,5}));)/g,function(n){if("#"===n[1]){var e="x"===n[2]?parseInt(n.substr(3),16):parseInt(n.substr(2),10);if(e>-1)return String.fromCharCode(e)}return t[n]||n})}function o(n,t,e){if(void 0!==e){var r=n[t];r instanceof Array?r.push(e):n[t]=t in n?[r,e]:e}}("object"==typeof e&&e||{}).fromXML=function(n,t){return function n(t,e){if("string"==typeof t)return t;var u=t.r;if(u)return u;var a,c=function(n,t){if(n.t){for(var e,u,a=n.t.split(/([^\s='"]+(?:\s*=\s*(?:'[\S\s]*?'|"[\S\s]*?"|[^\s'"]*))?)/),c=a.length,f=0;f<c;f++){var s=r(a[f]);if(s){e||(e={});var l=s.indexOf("=");if(l<0)s="@"+s,u=null;else{u=s.substr(l+1).replace(/^\s+/,""),s="@"+s.substr(0,l).replace(/\s+$/,"");var h=u[0];h!==u[u.length-1]||"'"!==h&&'"'!==h||(u=u.substr(1,u.length-2)),u=i(u)}t&&(u=t(s,u)),o(e,s,u)}}return e}}(t,e),f=t.f,s=f.length;if(c||s>1)a=c||{},f.forEach(function(t){"string"==typeof t?o(a,"#",t):o(a,t.n,n(t,e))});else if(s){var l=f[0];if(a=n(l,e),l.n){var h={};h[l.n]=a,a=h}}else a=t.c?null:"";return e&&(a=e(t.n||"",a)),a}(function(n){for(var t=String.prototype.split.call(n,/<([^!<>?](?:'[\S\s]*?'|"[\S\s]*?"|[^'"<>])*|!(?:--[\S\s]*?--|\[[^\[\]'"<>]+\[[\S\s]*?]]|DOCTYPE[^\[<>]*?\[[\S\s]*?]|(?:ENTITY[^"<>]*?"[\S\s]*?")?[\S\s]*?)|\?[\S\s]*?\?)>/),e=t.length,o={f:[]},u=o,a=[],c=0;c<e;){var f=t[c++];f&&p(f);var s=t[c++];s&&l(s)}return o;function l(n){var t=n.length,e=n[0];if("/"===e)for(var r=n.replace(/^\/|[\s\/].*$/g,"").toLowerCase();a.length;){var i=u.n&&u.n.toLowerCase();if(u=a.pop(),i===r)break}else if("?"===e)h({n:"?",r:n.substr(1,t-2)});else if("!"===e)"[CDATA["===n.substr(1,7)&&"]]"===n.substr(-2)?p(n.substr(8,t-10)):h({n:"!",r:n.substr(1)});else{var o=function(n){var t={f:[]},e=(n=n.replace(/\s*\/?$/,"")).search(/[\s='"\/]/);return e<0?t.n=n:(t.n=n.substr(0,e),t.t=n.substr(e)),t}(n);h(o),"/"===n[t-1]?o.c=1:(a.push(u),u=o)}}function h(n){u.f.push(n)}function p(n){(n=r(n))&&h(i(n))}}(n),t)}}()},{}],ol4r:[function(n,t,e){"use strict";function r(n,t){var e="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!e){if(Array.isArray(n)||(e=i(n))||t&&n&&"number"==typeof n.length){e&&(n=e);var r=0,o=function(){};return{s:o,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,a=!0,c=!1;return{s:function(){e=e.call(n)},n:function(){var n=e.next();return a=n.done,n},e:function(n){c=!0,u=n},f:function(){try{a||null==e.return||e.return()}finally{if(c)throw u}}}}function i(n,t){if(n){if("string"==typeof n)return o(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?o(n,t):void 0}}function o(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e<t;e++)r[e]=n[e];return r}function u(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function a(n,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}function c(n,t,e){return t&&a(n.prototype,t),e&&a(n,e),n}Object.defineProperty(e,"__esModule",{value:!0}),e.DocParser=e.parseCommandDbJson=void 0;var f=n("from-xml"),s=function(){function n(t){u(this,n),this.rawObject=t}return c(n,[{key:"getName",value:function(){return(this.rawObject||{})["@name"]}},{key:"getIsOptional",value:function(){return"1"===(this.rawObject||{})["@optional"]}},{key:"getType",value:function(){return(this.rawObject||{})["@type"]}},{key:"getDescription",value:function(){return(this.rawObject||{})["#"]}},{key:"getIsDeprecated",value:function(){return(this.rawObject||{})["@deprecated"].length>0}},{key:"getDeprecatedText",value:function(){return(this.rawObject||{})["@deprecated"]}}]),n}(),l=function(){function n(t){u(this,n),this.rawObject=t}return c(n,[{key:"getName",value:function(){var n,t;return((null===(t=null===(n=this.rawObject)||void 0===n?void 0:n.doc)||void 0===t?void 0:t.command)||{})["@name"]}},{key:"getDescription",value:function(){var n,t;return((null===(t=null===(n=this.rawObject)||void 0===n?void 0:n.doc)||void 0===t?void 0:t.command)||{})["#"]}},{key:"getParameter",value:function(){var n,t,e=null===(t=null===(n=this.rawObject)||void 0===n?void 0:n.doc)||void 0===t?void 0:t.param;return e?(Array.isArray(e)||(e=[e]),(e||[]).map(function(n){return new s(n)})):[]}}]),n}();e.parseCommandDbJson=function(n){var t={},e=JSON.parse(n);for(var r in e)t[r]=new l(e[r].rawObject);return t};var h=function(){function n(){u(this,n),this.commandDb={}}return c(n,[{key:"getDocComment",value:function(n,t){var e,i=[],o=!1,u=r(n.split("\n"));try{for(u.s();!(e=u.n()).done;){var a=e.value,c=a.trim().startsWith(t);if(!o&&c&&(o=!0),o&&!c)break;c&&i.push(a.replace(t,"").trim())}}catch(f){u.e(f)}finally{u.f()}return i.join("\n")}},{key:"parseDocumentText",value:function(n){var t=f.fromXML("<doc>".concat(n,"</doc>")),e=new l(t),r=e.getName();r&&(this.commandDb[r]=e)}},{key:"parseLua",value:function(n){var t=this.getDocComment(n,"--");t&&this.parseDocumentText(t)}},{key:"parseHpp",value:function(n){var t=this.getDocComment(n,"///");t&&this.parseDocumentText(t)}}]),n}();e.DocParser=h},{"from-xml":"sarP"}],f88W:[function(n,t,e){},{}],Y3F9:[function(n,t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getAutoHintDb=void 0;var r=n("./parser/docParser"),i=(n("fs"),r.parseCommandDbJson('{"device":{"rawObject":{"doc":{"command":{"@name":"device","@where":"document","#":"Defines a device which can be used when adding instruments (see [instrumentDef](#instrumentDef))\\nsee [instrumentDef](#instrumentDef), [instrument](#instrument)\\n### example\\ndefine an device, an instrument and assign it to a track.\\n```\\ndevice: MyDevice midi 0;\\ninstrumentDef: organ _onDevice=MyDevice _ch=0 _pc=16; \\\\n\\n[ \\\\n\\ninstrument: organ; \\\\n\\n{ \\\\n\\nc d e f \\\\n\\n} \\\\n\\n] \\\\n\\n``` \\\\n\\n**Fluidsynth**\\nIf you want to use [fluidSynth](http://www.fluidsynth.org) as output device, you can achieve this with a command like this:\\n`device: MyDevice fluidSynth _useFont=\\"PATH OF A SOUNDFONT FILE\\";`\\nOn mac, make sure that you have fluidsynth installed."},"param":[{"@name":"setName","@position":"0","@type":"text","#":"An arbitary name."},{"@name":"isType","@position":"1","@type":"[midi,fluidSynth]","#":"The type of the device."},{"@name":"usePort","@position":"2","@type":"0..N","#":"The midi port id of your device. You can get a list of your connected devices, by executing `sheetp --list`"},{"@name":"withOffset","@position":"","@optional":"1","@type":"0..N","#":"Defines an offset in milliseconds. Can be used to keep different devices in sync."},{"@name":"useFont","@position":"","@optional":"1","@type":"a file path","#":"Only valid if isType=`fluidsynth`. Sets the location of the soundfont file, which will be used by FluidSynth"}]}}},"instrumentConf":{"rawObject":{"doc":{"command":{"@name":"instrumentConf","@where":"document","#":"With `instrumentConf` you are able to setup a specific instrument.\\nFollowing settings can be applied:\\n* volume\\n* pan\\n* voicing strategy\\n* mod\\n* velocity remap\\n### examples\\n#### mixed settings\\n`instrumentConf: piano volume 100 pan 50;`\\n#### setup a mod\\n`instrumentConf: piano mod myLuaMod someValue; --the `someValue` argument belongs to \\"myLuaMod\\"`\\n#### setup a velocity remap\\nWith `remapVelocity` you are able to change the velocity values behind `ppppp..fffff` for a specific instrument.\\nIn the example below the velocity for `p` will be set to 100 and the value for `f` will be set to 10.\\nThe value range is 0..100. (100=127 Midi velocity)\\n`instrumentConf: _set=remapVelocity _p=100 _f=10;`"},"param":{"@name":"for","@position":"0","#":"The name of the target instrument. This is the only \\"unique\\" parameter for this command. All further parameters are specific to its related setting."}}}},"mod":{"rawObject":{"doc":{"command":{"@name":"mod","@where":"track","#":"Adds a modification to the track. Every `mod` statement adds a further modification to the related voice.\\nIf you want to use ony one modification at the time use [do](#do) instead.\\n### examples\\n`/mod: arpeggio/`\\nMods can be external lua scripts, or one of these internal mods:\\n#### Bend\\nPerforms a pitch bend from or to the pitch of a note. The value range is 0..100 where 50 means the pichbend center.\\n```language=Werckmeister,type=single,tempo=140\\n/doOnce: bend _from=0/ c1 | /doOnce: bend _to=0/ c1\\n```\\n#### Arpeggio\\nPerforms an arpeggio over a given chord.\\n**Arpeggio is deprecated. Use the lua mod [myArpeggio](#myarpeggio) instead.**"},"param":{"@name":"use","@position":"0","@type":"text","#":"The name of the modification to load. This is the only \\"unique\\" parameter for this command. All further parameters are specific to its related modification."}}}},"modOnce":{"rawObject":{"doc":{"command":{"@name":"modOnce","@where":"track","#":"Like [mod](#mod). But with the difference, that the loaded mod will be only executed once for the following event.\\n### examples\\n`/modOnce: arpeggio/`"},"param":{"@name":"use","@position":"0","@type":"text","#":"The name of the modification to load. This is the only \\"unique\\" parameter for this command. All further parameters are specific to its related modification."}}}},"cue":{"rawObject":{"doc":{"command":{"@name":"cue","@where":"track","#":"adds a cue meta message to the corresponding midi track\\n### examples\\n`/cue: _text=\\"cue text\\"/`"},"param":{"@name":"text","@type":"text","#":"the text which appears in the MIDI message"}}}},"instrumentSection":{"rawObject":{"doc":{"command":{"@name":"instrumentSection","@where":"document","#":["Layers arbitrary instruments into one.\\nsee [instrumentDef](#instrumentDef), [instrument](#instrument), [device](#device)\\n### example\\ncreate 3 instruments and assign them to the section `myNewInstrument`.","```language=Werckmeister\\\\n\\ntempo: 120;\\\\n\\ndevice: MyDevice midi _usePort=0;\\\\n\\ninstrumentDef:piano _onDevice=MyDevice _ch=0 _pc=0;\\\\n\\ninstrumentDef:guitar _onDevice=MyDevice _ch=1 _pc=29;\\\\n\\ninstrumentDef:organ _onDevice=MyDevice _ch=2 _pc=16;\\\\n\\ninstrumentSection: myNewInstrument piano guitar organ;\\\\n\\n\\\\n\\n[\\\\n\\ninstrument: myNewInstrument;\\\\n\\n{\\\\n\\na,,1 | a, | d#,~ | &\\\\n\\n}\\\\n\\n]\\\\n\\n```"]},"param":{"@name":"setName","@position":"0","@type":"text","#":"An arbitary name."}}}},"instrumentDef":{"rawObject":{"doc":{"command":{"@name":"instrumentDef","@where":"document","#":"Adds a new MIDI instrument.\\nsee [instrument](#instrument), [device](#device)\\n### example\\ndefine an device, an instrument and assign it to a track.\\n```\\ndevice: MyDevice midi 0;\\ninstrumentDef: organ _onDevice=MyDevice _ch=0 _pc=16; \\\\n\\n[ \\\\n\\ninstrument: organ; \\\\n\\n{ \\\\n\\nc d e f \\\\n\\n} \\\\n\\n] \\\\n\\n```"},"param":[{"@name":"setName","@position":"0","@type":"text","#":"An arbitary name."},{"@name":"onDevice","@position":"1","@type":"text","#":"The device which to use (The name of the device, see [device](#device))."},{"@name":"ch","@position":"2","@type":"0..15","#":"The MIDI channel."},{"@name":"bankMsb","@position":"3","@type":"0..127","#":"A MIDI `bank select MSB` value."},{"@name":"pc","@position":"4","@type":"0..127","#":"A MIDI `program change` value."},{"@name":"bankLsb","@type":"0..127","#":"A MIDI `bank select LSB` value."},{"@name":"cc","@type":"0..127","@deprecated":"use bankMsb instead","#":"A MIDI `bank select MSB. Deprecated use bankMsb instead` value."}]}}},"fill":{"rawObject":{"doc":{"command":{"@name":"fill","@where":"accomp","#":["Plays a template only once. Is also able to replace the performance of another template during its playback.\\nUseful for fill ins.","```language=Werckmeister\\\\n\\nusing \\"chords/default.chords\\";\\\\n\\ntempo: 90;\\\\n\\ndevice: MyDevice midi _usePort=0;\\\\n\\ninstrumentDef:drums _onDevice=MyDevice _ch=9 _pc=0;\\\\n\\n\\\\n\\n[\\\\n\\ntype: template;\\\\n\\nname: drums.fill;\\\\n\\ninstrument: drums;\\\\n\\n{\\\\n\\n(c, & &)4 (b,, & &)4 (a,, & &)4 (g,, & &)4 |\\\\n\\n}\\\\n\\n]\\\\n\\n\\\\n\\n[\\\\n\\ntype: template;\\\\n\\nname: drums.main;\\\\n\\ninstrument: drums;\\\\n\\n{\\\\n\\nr8 f#,, r & r & r & |\\\\n\\n}\\\\n\\n{\\\\n\\nr4 d,, r4 & | \\\\n\\n}\\\\n\\n{\\\\n\\nc,,4 r & r |\\\\n\\n}\\\\n\\n]\\\\n\\n\\\\n\\n[\\\\n\\ntype: accomp;\\\\n\\n{\\\\n\\n/template: drums.main/\\\\n\\nC |\\\\n\\n/fill: drums.fill/ -- play fill and drum beat together\\\\n\\nC | C |\\\\n\\n/fill: drums.fill _replace=\\"drums.main\\"/ -- play only the fill in\\\\n\\nC | C |\\\\n\\n}\\\\n\\n]\\\\n\\n```"]},"param":{"@name":"replace","@type":"text","#":"the name of the template to be replaced by the fill"}}}},"jump":{"rawObject":{"doc":{"command":{"@name":"jump","@where":"voice","#":["Jumps to a previous defined mark See [mark](manual/#mark).\\n### example","```language=Werckmeister\\\\n\\ndevice: _usePort=0 _setName=MyDevice _isType=midi;\\\\n\\ninstrumentDef: _setName=piano _onDevice=MyDevice _ch=0 _pc=1 _cc=8;\\\\n\\n[\\\\n\\ninstrument: piano;\\\\n\\n{\\\\n\\n/signature: 5 4/\\\\n\\n/mark: A/ -- valid & unique to this voice\\\\n\\nc4 d e f g |\\\\n\\n/jump: A/ -- jumps to A once\\\\n\\na b c\'2\\\\n\\n}\\\\n\\n]\\\\n\\n```"]},"param":[{"@name":"to","@position":"0","@type":"text","#":"the destination marker"},{"@name":"ignore","@position":"","@optional":"1","@type":"0..100","#":"Ignores the jump N times"},{"@name":"repeat","@position":"","@optional":"1","@type":"0..100","#":"Repeats the jump N times. (A repeat value of 1 performs 2 jumps)"}]}}},"mark":{"rawObject":{"doc":{"command":{"@name":"mark","@where":"voice","#":["adds a mark to the voice. Us it in combination with [jump](manual/#jump).\\n### examples","```language=Werckmeister\\\\n\\ndevice: _usePort=0 _setName=MyDevice _isType=midi;\\\\n\\ninstrumentDef: _setName=piano _onDevice=MyDevice _ch=0 _pc=1 _cc=8;\\\\n\\n[\\\\n\\ninstrument: piano;\\\\n\\n{\\\\n\\n/signature: 5 4/\\\\n\\n/mark: A/ -- valid & unique to this voice\\\\n\\nc4 d e f g |\\\\n\\n/jump: A/ -- jumps to A once\\\\n\\na b c\'2\\\\n\\n}\\\\n\\n]\\\\n\\n```"]},"param":{"@name":"name","@position":"0","@type":"word","#":"the name of the mark"}}}},"fade":{"rawObject":{"doc":{"command":{"@name":"fade","@where":"track","#":"Fades the volume over a given duration in quarters.\\n### example\\n```language=Werckmeister,type=full\\ndevice: myDevice midi _usePort=0;\\\\n\\ninstrumentDef: organ myDevice _ch=0 _pc=16;\\\\n\\ntempo: 75;\\\\n\\n[\\\\n\\ninstrument: organ;\\\\n\\n{\\\\n\\n\\\\fff\\\\n\\n/fade: _from=0 _to=100 _duration=4/\\\\n\\nc1 |\\\\n\\n/fade: _from=0 _to=100 _duration=4 _curve=\\"quad\\"/\\\\n\\nc1 |\\\\n\\n/fade: _from=0 _to=100 _duration=4 _curve=\\"cub\\"/\\\\n\\nc1 |\\\\n\\n/fade: _from=0 _to=100 _duration=4 _curve=\\"quart\\"/\\\\n\\nc1 |\\\\n\\n/fade: _from=0 _to=100 _duration=4 _curve=\\"quint\\"/\\\\n\\nc1 |\\\\n\\n/fade: _from=0 _to=100 _duration=4 _curve=\\"exp\\"/\\\\n\\nc1 |\\\\n\\n}\\\\n\\n]\\\\n\\n```\\n![supported curve types](https://raw.githubusercontent.com/werckme/werckmeister/main/assets/curve-types.png)"},"param":[{"@name":"duration","@position":"0","@type":"0..N","#":"the duration in quarters."},{"@name":"from","@position":"1","@default":"0","@type":"0..100","#":"The source volume value."},{"@name":"to","@position":"2","@default":"100","@type":"0..100","#":"The target volume value."},{"@name":"curve","@position":"3","@default":"lin","@type":"lin,quad,cub,quart,quint,exp","#":"The fade curve type."}]}}},"instrument":{"rawObject":{"doc":{"command":{"@name":"instrument","@where":"trackConfig, track","#":"Set or change the instrument of a track.\\n### examples\\n**set an instrument for a track**\\n```\\n[ \\\\n\\ninstrument: myInstrument; \\\\n\\n{ \\\\n\\nc d e f \\\\n\\n} \\\\n\\n] \\\\n\\n```\\n**change current instrument within a track**\\n```\\n[ \\\\n\\n{ \\\\n\\nc d e f | \\\\n\\n/instrument: myOtherInstrument/\\nc d e f\\n} \\\\n\\n] \\\\n\\n```"},"param":{"@name":"use","@position":"0","@type":"text","#":"The instrument name."}}}},"pan":{"rawObject":{"doc":{"command":{"@name":"pan","@where":"track","#":"set the pan of the current track\\n### example\\n`/pan: 50/`"},"param":{"@name":"to","@position":"0","@type":"0..100","#":"The pan value. Where 50 means the center"}}}},"signature":{"rawObject":{"doc":{"command":{"@name":"signature","#":"Set the time signature of the current track.\\n### example\\n`/signature: 3 4/`"},"param":[{"@name":"upper","@position":"0","#":"The upper value of the signature."},{"@name":"lower","@position":"1","#":"The lower value of the signature."}]}}},"do":{"rawObject":{"doc":{"command":{"@name":"do","@where":"track","#":"Such as [mod](#mod)&nbsp;`do` adds a modification to the track.\\nThe difference is: every `mod` command adds a further modification to a voice.\\n`do` replaces the previous modification.\\n### example\\n`/do: arpeggio/`"},"param":{"@name":"use","@position":"0","@type":"text","#":"The name of the modification to load. This is the only \\"unique\\" parameter for this command. All further parameters are specific to its related modification."}}}},"doOnce":{"rawObject":{"doc":{"command":{"@name":"doOnce","@where":"track","#":"Like [do](#do). But with the difference, that the loaded mod will be only executed once for the following event.\\n### example\\n`/doOnce: arpeggio/`"},"param":{"@name":"use","@position":"0","@type":"text","#":"The name of the modification to load. This is the only \\"unique\\" parameter for this command. All further parameters are specific to its related modification."}}}},"tempo":{"rawObject":{"doc":{"command":{"@name":"tempo","@where":"document, track","#":"`tempo` defines or changes the current tempo.\\n### example\\n`tempo: 120;`\\nIt is also possible to set different tempo values for several tracks:\\n[see here](/manual#tempo)"},"param":{"@name":"bpm","@position":"0","#":"The tempo bpm value."}}}},"voicingStrategy":{"rawObject":{"doc":{"command":{"@name":"voicingStrategy","@where":"track","#":"Adds a modification to the track.\\n### example\\n`/voicingStrategy: asNotated/`\\nVoicing strategies can be external lua scripts, or one of these internal strategies:\\n* asNotated\\n* simpleGuitar"},"param":{"@name":"use","@position":"0","@type":"text","#":"The name of the strategy to load. This is the only \\"unique\\" parameter for this command. All further parameters are specific to its related strategy."}}}},"volume":{"rawObject":{"doc":{"command":{"@name":"volume","@where":"track","#":"set the volume of the current track\\n### examples\\n`/volume: 50/`"},"param":{"@name":"to","@position":"0","@type":"0..100","#":"The volume value."}}}},"drumRudiments":{"rawObject":{"doc":{"command":{"@name":"drumRudiments","@where":"mod","@using":"lua/mod/drumRudiments.lua","#":"Implements a collection of different drum rudiments. ([see Wikipedia](https://en.wikipedia.org/wiki/Drum_rudiment))\\nYou can specify which notes are for `L` and `R` and performing duration.\\nThis will be achieved by using an chord as source material.\\nThe chord pitches will be used for `L` and `R`.\\nThe length of the chord event defines over which time the rudiment will be peformed.\\nAn event tag specifies which rudiment will be performed.\\nFor example:\\nThis plays one paradiddle over a length of 1 quarter\\nusing `sn1` for R and `sn2` for L:\\n```\\n/mod: drumRudiments/\\\\n\\nR L \\\\n\\n\\"paradiddle\\"@<\\"sn1\\" \\"sn2\\">4\\\\n\\n```\\nExamples:\\n**a single paradiddle**\\n```language=Werckmeister\\\\n\\nusing \\"lua/mods/drumRudiments.lua\\";\\\\n\\ntempo: 150;\\\\n\\ndevice: MyDevice midi 0;\\\\n\\ninstrumentDef:piano MyDevice _ch=0 _pc=118;\\\\n\\n[\\\\n\\ninstrument: piano;\\\\n\\n{\\\\n\\n/mod: drumRudiments/\\\\n\\n-- a paradiddle (RLRR) with c\' for R and c for L\\\\n\\n\\"paradiddle\\"@<c\' c>1\\\\n\\n}\\\\n\\n]\\\\n\\n```\\n**repeating**\\n```language=Werckmeister\\\\n\\nusing \\"lua/mods/drumRudiments.lua\\";\\\\n\\ntempo: 120;\\\\n\\ndevice: MyDevice midi 0;\\\\n\\ninstrumentDef:piano MyDevice _ch=0 _pc=118;\\\\n\\n[\\\\n\\ninstrument: piano;\\\\n\\n{\\\\n\\n/mod: drumRudiments/\\\\n\\n-- performs 4 paradiddles (RLRR LRLL RLRR LRLL) with c\' for R and c for L\\\\n\\n\\"4x paradiddle\\"@<c\' c>1\\\\n\\n}\\\\n\\n]\\\\n\\n```\\n**orchestration**\\nIf you want to orchestrate a rudiment over a drum set,\\nyou are able to define more R & L notes. *(The total number of the notes has to be even.)*\\n```language=Werckmeister\\\\n\\nusing \\"lua/mods/drumRudiments.lua\\";\\\\n\\ntempo: 120;\\\\n\\ndevice: MyDevice midi 0;\\\\n\\ninstrumentDef:piano MyDevice _ch=0 _pc=118;\\\\n\\n[\\\\n\\ninstrument: piano;\\\\n\\n{\\\\n\\n/mod: drumRudiments/\\\\n\\n-- performs 4 paradiddles (RLRR LRLL RLRR LRLL) with \\\\n\\n-- c\' for R1 and c for L1\\\\n\\n-- and c, for R2 and c,, for L2.\\\\n\\n-- The final sequence will be: c\'(R1) c(L1) c,(R2) c,,(R1) ... \\\\n\\n\\"4x paradiddle\\"@<c\' c c, c,,>1\\n}\\\\n\\n]\\\\n\\n```\\n**Supported Rudiments**\\n<ul style=\\"font-size: 0.9em;\\">\\n<li>singleStrokeRoll</li>\\n<li>doubleStrokeRoll</li>\\n<li>trippleStrokeRoll</li>\\n<li>fiveStrokeRoll</li>\\n<li>singleStrokeFour</li>\\n<li>singleStrokeSeven</li>\\n<li>multipleBounceRoll</li>\\n<li>sixStrokeRoll</li>\\n<li>sevenStrokeRoll</li>\\n<li>nineStrokeRoll</li>\\n<li>tenStrokeRoll</li>\\n<li>elevenStrokeRoll</li>\\n<li>thirteenStrokeRoll</li>\\n<li>fifteenStrokeRoll</li>\\n<li>seventeenStrokeRoll</li>\\n<li>paradiddle</li>\\n<li>doubleParadiddle</li>\\n<li>trippleParadiddle</li>\\n<li>paradiddlediddle</li>\\n<li>flam</li>\\n<li>flamAccent</li>\\n<li>flamTap</li>\\n<li>flamacue</li>\\n<li>flamParadiddle</li>\\n<li>singleFlammedMill</li>\\n<li>pataflafla</li>\\n<li>swissArmytriplet</li>\\n<li>invertedFlamTap</li>\\n<li>flamDrag</li>\\n<li>singleDragTap</li>\\n<li>doubleDragTap</li>\\n<li>lesson25</li>\\n<li>singleDragadiddle</li>\\n<li>dragParadiddle1</li>\\n<li>dragParadiddle2</li>\\n<li>singleRatamacue</li>\\n<li>doubleRatamacue</li>\\n<li>trippleRatamacue</li>\\n</ul>"},"param":[{"@name":"velocityFactorAccented","@optional":"1","@type":"0..1","#":"The velocity factor for accented notes (Default=1)"},{"@name":"velocityFactorUnaccented","@optional":"1","@type":"0..1","#":"The velocity factor for unaccented notes (Default=0.7)"},{"@name":"velocityFactorGraceNote","@optional":"1","@type":"0..1","#":"The velocity factor for accented notes (Default=1)"},{"@name":"flamOffset","@optional":"1","@type":"0..N","#":"The offset in quartes when to perform the grace note before the actual note (Default=0.05)"},{"@name":"dragOffset","@optional":"1","@type":"0..N","#":"The offset in quartes when to perform the two grace notes before the actual note (Default=0.05)"}]}}},"guitarStroke":{"rawObject":{"doc":{"command":{"@name":"guitarStroke","@where":"mod","@using":"lua/mod/guitarStroke.lua","#":"Simulates guitar strokes as mini arpeggios.\\n*Note: the alternate mode works only if this mod is set via instrumentConf.*\\n```\\n-- does not work: \\\\n\\n[ \\\\n\\n{ \\\\n\\n/mod: guitarStroke _mode=alternate/\\\\n\\n} \\\\n\\n] \\\\n\\n```\\n```\\n-- does work: \\\\n\\ninstrumentConf: myInstrument mod guitarStroke _mode=alternate; \\\\n\\n```\\n**Example**\\n```language=Werckmeister\\\\n\\nusing \\"lua/mods/guitarStroke.lua\\";\\\\n\\ntempo: 120;\\\\n\\ndevice: MyDevice midi 0;\\\\n\\ninstrumentDef: piano MyDevice _ch=0 _pc=24;\\\\n\\ninstrumentConf: piano mod guitarStroke _mode=alternate _value=16; \\\\n\\n[\\\\n\\ninstrument: piano;\\\\n\\n{\\\\n\\n<c e g b>4 <c e g b>4 <c eb g bb>2 | <c eb g bb>2 <c eb g bb>2\\\\n\\n}\\\\n\\n]\\\\n\\n```"},"param":[{"@name":"direction","@optional":"1","@type":"[up,down]","#":"Specifies the start direction of the stroke"},{"@name":"value","@optional":"1","@type":"[1,2,4,8,...]","#":"the duration of one arpeggio event. (Default=64)"},{"@name":"mode","@optional":"1","@type":"[normal,alternate]","#":"Perform only one stroke direction (normal) or alternates between up and down. (Default=normal)"}]}}},"legato":{"rawObject":{"doc":{"command":{"@name":"legato","@where":"mod","@using":"lua/mod/legato.lua","#":"Performs every note legato. It is also possible to tag single notes.\\nIf a tag is given, only the tagged notes are performed legato.\\n```language=Werckmeister\\\\n\\nusing \\"lua/mods/legato.lua\\";\\\\n\\ntempo: 140;\\\\n\\ndevice: MyDevice midi 0;\\\\n\\ninstrumentDef:piano MyDevice _ch=0 _pc=0;\\\\n\\n[\\\\n\\ninstrument: piano;\\\\n\\n{\\\\n\\n/mod: legato _forTag=leg _amount=100/\\\\n\\n-- only the `d` will be performed legato. \\\\n\\nc \\"leg\\"@d e f\\\\n\\n}\\\\n\\n]\\\\n\\n```"},"param":[{"@name":"forTag","@optional":"1","@type":"text","#":"Specifies a tag name. If set only events with this tag name will be affected by the legato mod."},{"@name":"amount","@optional":"1","@type":"0..100","#":"The ammount of the legato effect"}]}}},"myArpeggio":{"rawObject":{"doc":{"command":{"@name":"myArpeggio","@where":"mod","@using":"lua/mod/myArpeggio.lua","#":"A simple arpeggio implementation.\\n**Example**\\n```language=Werckmeister\\\\n\\nusing \\"lua/mods/myArpeggio.lua\\";\\\\n\\ntempo: 120;\\\\n\\ndevice: MyDevice midi 0;\\\\n\\ninstrumentDef: piano MyDevice _ch=0 _pc=0;\\\\n\\n[\\\\n\\ninstrument: piano;\\\\n\\n{\\\\n\\n/do: myArpeggio/ \\\\n\\n<c e g b>2 \\\\n\\n/do: myArpeggio _direction=down/ \\\\n\\n<c eb g bb>2 \\\\n\\n}\\\\n\\n]\\\\n\\n```"},"param":[{"@name":"style","@optional":"1","@type":"[normal,legato]","#":"Performs the arpeggio normal or legato"},{"@name":"direction","@optional":"1","@type":"[up,down]","#":"the direction of the arpeggio. (Default=up)"}]}}},"staccato":{"rawObject":{"doc":{"command":{"@name":"staccato","@where":"mod","@using":"lua/mod/staccato.lua","#":"Performs every note staccato. It is also possible to tag single notes.\\nIf a tag is given, only the tagged notes are performed staccato.\\n```language=Werckmeister\\\\n\\nusing \\"lua/mods/staccato.lua\\";\\\\n\\ntempo: 140;\\\\n\\ndevice: MyDevice midi 0;\\\\n\\ninstrumentDef:piano MyDevice _ch=0 _pc=0;\\\\n\\n[\\\\n\\ninstrument: piano;\\\\n\\n{\\\\n\\n/mod: staccato _forTag=stac _amount=100/\\\\n\\n-- only the `d` will be performed staccato. \\\\n\\nc \\"stac\\"@d e f\\\\n\\n}\\\\n\\n]\\\\n\\n```"},"param":[{"@name":"forTag","@optional":"1","@type":"text","#":"Specifies a tag name. If set only events with this tag name will be affected by the staccato mod."},{"@name":"amount","@optional":"1","@type":"0..100","#":"The ammount of the staccato effect"}]}}},"swing":{"rawObject":{"doc":{"command":{"@name":"swing","@where":"mod","@using":"lua/mod/swing.lua","#":"Performs a swing groove.\\n```language=Werckmeister\\\\n\\nusing \\"lua/mods/swing.lua\\";\\\\n\\ntempo: 120;\\\\n\\ndevice: MyDevice midi 0;\\\\n\\ninstrumentDef: piano MyDevice _ch=0 _pc=0;\\\\n\\n[\\\\n\\ninstrument: piano;\\\\n\\n{\\\\n\\n/mod: swing/\\\\n\\nc8 c c c c c c c\\n}\\\\n\\n]\\\\n\\n```"},"param":[{"@name":"grid","@optional":"1","@type":"[8, 16]","#":"Performs the swing offset either on 8th or 16th. (Default=8)"},{"@name":"offset","@optional":"1","@type":"0..100","#":"The ammount of the swing offset"}]}}},"guitar":{"rawObject":{"doc":{"command":{"@name":"guitar","@where":"voicingStrategy","@using":"lua/voicings/guitar.lua","#":"Tries to simulate the chord voicing of an guitar.\\n```language=Werckmeister\\\\n\\nusing \\"lua/voicings/guitar.lua\\";\\\\n\\nusing \\"chords/default.chords\\";\\ntempo: 120;\\\\n\\ndevice: MyDevice midi 0;\\\\n\\ninstrumentDef:piano MyDevice _ch=0 _pc=0;\\\\n\\n[\\\\n\\ntype: template;\\\\n\\nname: myTemplate;\\\\n\\ninstrument: piano;\\\\n\\n{\\\\n\\n/voicingStrategy: guitar/\\\\n\\n<I II III IV V VI VII>1\\\\n\\n}\\\\n\\n]\\\\n\\n[\\\\n\\ntype: accomp;\\n{\\\\n\\nC | F | G | C |\\\\n\\n}\\\\n\\n]\\\\n\\n```"},"param":{"@name":"range","@optional":"1","@type":"[contrabass,bass,baritone,tenor,alto,mezzosoprano,soprano]","#":"If given the strategy tries to keeps the range by shifting the octave of the chord."}}}},"simple":{"rawObject":{"doc":{"command":{"@name":"simple","@where":"voicingStrategy","@using":"lua/voicings/simple.lua","#":"The simple approach with no strategy.\\n```language=Werckmeister\\\\n\\nusing \\"lua/voicings/simple.lua\\";\\\\n\\nusing \\"chords/default.chords\\";\\ntempo: 120;\\\\n\\ndevice: MyDevice midi 0;\\\\n\\ninstrumentDef:piano MyDevice _ch=0 _pc=0;\\\\n\\n[\\\\n\\ntype: template;\\\\n\\nname: myTemplate;\\\\n\\ninstrument: piano;\\\\n\\n{\\\\n\\n/voicingStrategy: simple/\\\\n\\n<I II III IV V VI VII>1\\\\n\\n}\\\\n\\n]\\\\n\\n[\\\\n\\ntype: accomp;\\n{\\\\n\\nC | F | G | C |\\\\n\\n}\\\\n\\n]\\\\n\\n```"},"param":{"@name":"range","@optional":"1","@type":"[contrabass,bass,baritone,tenor,alto,mezzosoprano,soprano]","#":"If given the strategy tries to keeps the range by shifting the octave of the chord."}}}},"voicelead":{"rawObject":{"doc":{"command":{"@name":"voicelead","@where":"voicingStrategy","@using":"lua/voicings/voicelead.lua","#":"Tries to simulates a voice leading approach:\\nthe octaves of a chord are rearranged, so that the actual pitch distance between the previous chord is kept minimal.\\n```language=Werckmeister\\\\n\\nusing \\"lua/voicings/voicelead.lua\\";\\\\n\\nusing \\"chords/default.chords\\";\\ntempo: 120;\\\\n\\ndevice: MyDevice midi 0;\\\\n\\ninstrumentDef:piano MyDevice _ch=0 _pc=0;\\\\n\\n[\\\\n\\ntype: template;\\\\n\\nname: myTemplate;\\\\n\\ninstrument: piano;\\\\n\\n{\\\\n\\n/voicingStrategy: voicelead/\\\\n\\n<I II III IV V VI VII>1\\\\n\\n}\\\\n\\n]\\\\n\\n[\\\\n\\ntype: accomp;\\n{\\\\n\\nC | F | G | C |\\\\n\\n}\\\\n\\n]\\\\n\\n```"},"param":{"@name":"range","@optional":"1","@type":"[contrabass,bass,baritone,tenor,alto,mezzosoprano,soprano]","#":"If given the strategy tries to keeps the range by shifting the octave of the chord."}}}}}'));e.getAutoHintDb=function(){return i}},{"./parser/docParser":"ol4r",fs:"f88W"}],yh9p:[function(n,t,e){"use strict";e.byteLength=function(n){var t=f(n),e=t[0],r=t[1];return 3*(e+r)/4-r},e.toByteArray=function(n){var t,e,r=f(n),u=r[0],a=r[1],c=new o(function(n,t,e){return 3*(t+e)/4-e}(0,u,a)),s=0,l=a>0?u-4:u;for(e=0;e<l;e+=4)t=i[n.charCodeAt(e)]<<18|i[n.charCodeAt(e+1)]<<12|i[n.charCodeAt(e+2)]<<6|i[n.charCodeAt(e+3)],c[s++]=t>>16&255,c[s++]=t>>8&255,c[s++]=255&t;return 2===a&&(t=i[n.charCodeAt(e)]<<2|i[n.charCodeAt(e+1)]>>4,c[s++]=255&t),1===a&&(t=i[n.charCodeAt(e)]<<10|i[n.charCodeAt(e+1)]<<4|i[n.charCodeAt(e+2)]>>2,c[s++]=t>>8&255,c[s++]=255&t),c},e.fromByteArray=function(n){for(var t,e=n.length,i=e%3,o=[],u=0,a=e-i;u<a;u+=16383)o.push(l(n,u,u+16383>a?a:u+16383));return 1===i?(t=n[e-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(n[e-2]<<8)+n[e-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=u.length;a<c;++a)r[a]=u[a],i[u.charCodeAt(a)]=a;function f(n){var t=n.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=n.indexOf("=");return-1===e&&(e=t),[e,e===t?0:4-e%4]}function s(n){return r[n>>18&63]+r[n>>12&63]+r[n>>6&63]+r[63&n]}function l(n,t,e){for(var r,i=[],o=t;o<e;o+=3)r=(n[o]<<16&16711680)+(n[o+1]<<8&65280)+(255&n[o+2]),i.push(s(r));return i.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],JgNJ:[function(n,t,e){e.read=function(n,t,e,r,i){var o,u,a=8*i-r-1,c=(1<<a)-1,f=c>>1,s=-7,l=e?i-1:0,h=e?-1:1,p=n[t+l];for(l+=h,o=p&(1<<-s)-1,p>>=-s,s+=a;s>0;o=256*o+n[t+l],l+=h,s-=8);for(u=o&(1<<-s)-1,o>>=-s,s+=r;s>0;u=256*u+n[t+l],l+=h,s-=8);if(0===o)o=1-f;else{if(o===c)return u?NaN:1/0*(p?-1:1);u+=Math.pow(2,r),o-=f}return(p?-1:1)*u*Math.pow(2,o-r)},e.write=function(n,t,e,r,i,o){var u,a,c,f=8*o-i-1,s=(1<<f)-1,l=s>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,u=s):(u=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-u))<1&&(u--,c*=2),(t+=u+l>=1?h/c:h*Math.pow(2,1-l))*c>=2&&(u++,c/=2),u+l>=s?(a=0,u=s):u+l>=1?(a=(t*c-1)*Math.pow(2,i),u+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,i),u=0));i>=8;n[e+p]=255&a,p+=d,a/=256,i-=8);for(u=u<<i|a,f+=i;f>0;n[e+p]=255&u,p+=d,u/=256,f-=8);n[e+p-d]|=128*m}},{}],REa7:[function(n,t,e){var r={}.toString;t.exports=Array.isArray||function(n){return"[object Array]"==r.call(n)}},{}],dskh:[function(n,t,e){arguments[3];var r=arguments[3],i=n("base64-js"),o=n("ieee754"),u=n("isarray");function a(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(n,t){if(a()<t)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(n=new Uint8Array(t)).__proto__=f.prototype:(null===n&&(n=new f(t)),n.length=t),n}function f(n,t,e){if(!(f.TYPED_ARRAY_SUPPORT||this instanceof f))return new f(n,t,e);if("number"==typeof n){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return h(this,n)}return s(this,n,t,e)}function s(n,t,e,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(n,t,e,r){if(t.byteLength,e<0||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),f.TYPED_ARRAY_SUPPORT?(n=t).__proto__=f.prototype:n=p(n,t),n}(n,t,e,r):"string"==typeof t?function(n,t,e){if("string"==typeof e&&""!==e||(e="utf8"),!f.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var r=0|g(t,e),i=(n=c(n,r)).write(t,e);return i!==r&&(n=n.slice(0,i)),n}(n,t,e):d(n,t)}function l(n){if("number"!=typeof n)throw new TypeError('"size" argument must be a number');if(n<0)throw new RangeError('"size" argument must not be negative')}function h(n,t){if(l(t),n=c(n,t<0?0:0|m(t)),!f.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)n[e]=0;return n}function p(n,t){var e=t.length<0?0:0|m(t.length);n=c(n,e);for(var r=0;r<e;r+=1)n[r]=255&t[r];return n}function d(n,t){if(f.isBuffer(t)){var e=0|m(t.length);return 0===(n=c(n,e)).length?n:(t.copy(n,0,0,e),n)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||function(n){return n!=n}(t.length)?c(n,0):p(n,t);if("Buffer"===t.type&&u(t.data))return p(n,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function m(n){if(n>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|n}function g(n,t){if(f.isBuffer(n))return n.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(n)||n instanceof ArrayBuffer))return n.byteLength;"string"!=typeof n&&(n=""+n);var e=n.length;if(0===e)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return W(n).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return Y(n).length;default:if(r)return W(n).length;t=(""+t).toLowerCase(),r=!0}}function v(n,t,e){var r=n[t];n[t]=n[e],n[e]=r}function y(n,t,e,r,i){if(0===n.length)return-1;if("string"==typeof e?(r=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:n.length-1),e<0&&(e=n.length+e),e>=n.length){if(i)return-1;e=n.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof t&&(t=f.from(t,r)),f.isBuffer(t))return 0===t.length?-1:_(n,t,e,r,i);if("number"==typeof t)return t&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(n,t,e):Uint8Array.prototype.lastIndexOf.call(n,t,e):_(n,[t],e,r,i);throw new TypeError("val must be string, number or Buffer")}function _(n,t,e,r,i){var o,u=1,a=n.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(n.length<2||t.length<2)return-1;u=2,a/=2,c/=2,e/=2}function f(n,t){return 1===u?n[t]:n.readUInt16BE(t*u)}if(i){var s=-1;for(o=e;o<a;o++)if(f(n,o)===f(t,-1===s?0:o-s)){if(-1===s&&(s=o),o-s+1===c)return s*u}else-1!==s&&(o-=o-s),s=-1}else for(e+c>a&&(e=a-c),o=e;o>=0;o--){for(var l=!0,h=0;h<c;h++)if(f(n,o+h)!==f(t,h)){l=!1;break}if(l)return o}return-1}function b(n,t,e,r){e=Number(e)||0;var i=n.length-e;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var u=0;u<r;++u){var a=parseInt(t.substr(2*u,2),16);if(isNaN(a))return u;n[e+u]=a}return u}function w(n,t,e,r){return q(W(t,n.length-e),n,e,r)}function x(n,t,e,r){return q(function(n){for(var t=[],e=0;e<n.length;++e)t.push(255&n.charCodeAt(e));return t}(t),n,e,r)}function A(n,t,e,r){return x(n,t,e,r)}function S(n,t,e,r){return q(Y(t),n,e,r)}function k(n,t,e,r){return q(function(n,t){for(var e,r,i,o=[],u=0;u<n.length&&!((t-=2)<0);++u)r=(e=n.charCodeAt(u))>>8,i=e%256,o.push(i),o.push(r);return o}(t,n.length-e),n,e,r)}function R(n,t,e){return 0===t&&e===n.length?i.fromByteArray(n):i.fromByteArray(n.slice(t,e))}function E(n,t,e){e=Math.min(n.length,e);for(var r=[],i=t;i<e;){var o,u,a,c,f=n[i],s=null,l=f>239?4:f>223?3:f>191?2:1;if(i+l<=e)switch(l){case 1:f<128&&(s=f);break;case 2:128==(192&(o=n[i+1]))&&(c=(31&f)<<6|63&o)>127&&(s=c);break;case 3:o=n[i+1],u=n[i+2],128==(192&o)&&128==(192&u)&&(c=(15&f)<<12|(63&o)<<6|63&u)>2047&&(c<55296||c>57343)&&(s=c);break;case 4:o=n[i+1],u=n[i+2],a=n[i+3],128==(192&o)&&128==(192&u)&&128==(192&a)&&(c=(15&f)<<18|(63&o)<<12|(63&u)<<6|63&a)>65535&&c<1114112&&(s=c)}null===s?(s=65533,l=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|1023&s),r.push(s),i+=l}return function(n){var t=n.length;if(t<=D)return String.fromCharCode.apply(String,n);for(var e="",r=0;r<t;)e+=String.fromCharCode.apply(String,n.slice(r,r+=D));return e}(r)}e.Buffer=f,e.SlowBuffer=function(n){return+n!=n&&(n=0),f.alloc(+n)},e.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=void 0!==r.TYPED_ARRAY_SUPPORT?r.TYPED_ARRAY_SUPPORT:function(){try{var n=new Uint8Array(1);return n.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===n.foo()&&"function"==typeof n.subarray&&0===n.subarray(1,1).byteLength}catch(i){return!1}}(),e.kMaxLength=a(),f.poolSize=8192,f._augment=function(n){return n.__proto__=f.prototype,n},f.from=function(n,t,e){return s(null,n,t,e)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(n,t,e){return function(n,t,e,r){return l(t),t<=0?c(n,t):void 0!==e?"string"==typeof r?c(n,t).fill(e,r):c(n,t).fill(e):c(n,t)}(null,n,t,e)},f.allocUnsafe=function(n){return h(null,n)},f.allocUnsafeSlow=function(n){return h(null,n)},f.isBuffer=function(n){return!(null==n||!n._isBuffer)},f.compare=function(n,t){if(!f.isBuffer(n)||!f.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(n===t)return 0;for(var e=n.length,r=t.length,i=0,o=Math.min(e,r);i<o;++i)if(n[i]!==t[i]){e=n[i],r=t[i];break}return e<r?-1:r<e?1:0},f.isEncoding=function(n){switch(String(n).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(n,t){if(!u(n))throw new TypeError('"list" argument must be an Array of Buffers');if(0===n.length)return f.alloc(0);var e;if(void 0===t)for(t=0,e=0;e<n.length;++e)t+=n[e].length;var r=f.allocUnsafe(t),i=0;for(e=0;e<n.length;++e){var o=n[e];if(!f.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},f.byteLength=g,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var n=this.length;if(n%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<n;t+=2)v(this,t,t+1);return this},f.prototype.swap32=function(){var n=this.length;if(n%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<n;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},f.prototype.swap64=function(){var n=this.length;if(n%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<n;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},f.prototype.toString=function(){var n=0|this.length;return 0===n?"":0===arguments.length?E(this,0,n):function(n,t,e){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(t>>>=0))return"";for(n||(n="utf8");;)switch(n){case"hex":return I(this,t,e);case"utf8":case"utf-8":return E(this,t,e);case"ascii":return O(this,t,e);case"latin1":case"binary":return T(this,t,e);case"base64":return R(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,e);default:if(r)throw new TypeError("Unknown encoding: "+n);n=(n+"").toLowerCase(),r=!0}}.apply(this,arguments)},f.prototype.equals=function(n){if(!f.isBuffer(n))throw new TypeError("Argument must be a Buffer");return this===n||0===f.compare(this,n)},f.prototype.inspect=function(){var n="",t=e.INSPECT_MAX_BYTES;return this.length>0&&(n=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(n+=" ... ")),"<Buffer "+n+">"},f.prototype.compare=function(n,t,e,r,i){if(!f.isBuffer(n))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===e&&(e=n?n.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||e>n.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=e)return 0;if(r>=i)return-1;if(t>=e)return 1;if(this===n)return 0;for(var o=(i>>>=0)-(r>>>=0),u=(e>>>=0)-(t>>>=0),a=Math.min(o,u),c=this.slice(r,i),s=n.slice(t,e),l=0;l<a;++l)if(c[l]!==s[l]){o=c[l],u=s[l];break}return o<u?-1:u<o?1:0},f.prototype.includes=function(n,t,e){return-1!==this.indexOf(n,t,e)},f.prototype.indexOf=function(n,t,e){return y(this,n,t,e,!0)},f.prototype.lastIndexOf=function(n,t,e){return y(this,n,t,e,!1)},f.prototype.write=function(n,t,e,r){if(void 0===t)r="utf8",e=this.length,t=0;else if(void 0===e&&"string"==typeof t)r=t,e=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(e)?(e|=0,void 0===r&&(r="utf8")):(r=e,e=void 0)}var i=this.length-t;if((void 0===e||e>i)&&(e=i),n.length>0&&(e<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,n,t,e);case"utf8":case"utf-8":return w(this,n,t,e);case"ascii":return x(this,n,t,e);case"latin1":case"binary":return A(this,n,t,e);case"base64":return S(this,n,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,n,t,e);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var D=4096;function O(n,t,e){var r="";e=Math.min(n.length,e);for(var i=t;i<e;++i)r+=String.fromCharCode(127&n[i]);return r}function T(n,t,e){var r="";e=Math.min(n.length,e);for(var i=t;i<e;++i)r+=String.fromCharCode(n[i]);return r}function I(n,t,e){var r=n.length;(!t||t<0)&&(t=0),(!e||e<0||e>r)&&(e=r);for(var i="",o=t;o<e;++o)i+=z(n[o]);return i}function j(n,t,e){for(var r=n.slice(t,e),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function P(n,t,e){if(n%1!=0||n<0)throw new RangeError("offset is not uint");if(n+t>e)throw new RangeError("Trying to access beyond buffer length")}function C(n,t,e,r,i,o){if(!f.isBuffer(n))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(e+r>n.length)throw new RangeError("Index out of range")}function M(n,t,e,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(n.length-e,2);i<o;++i)n[e+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function B(n,t,e,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(n.length-e,4);i<o;++i)n[e+i]=t>>>8*(r?i:3-i)&255}function L(n,t,e,r,i,o){if(e+r>n.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function U(n,t,e,r,i){return i||L(n,0,e,4),o.write(n,t,e,r,23,4),e+4}function N(n,t,e,r,i){return i||L(n,0,e,8),o.write(n,t,e,r,52,8),e+8}f.prototype.slice=function(n,t){var e,r=this.length;if((n=~~n)<0?(n+=r)<0&&(n=0):n>r&&(n=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<n&&(t=n),f.TYPED_ARRAY_SUPPORT)(e=this.subarray(n,t)).__proto__=f.prototype;else{var i=t-n;e=new f(i,void 0);for(var o=0;o<i;++o)e[o]=this[o+n]}return e},f.prototype.readUIntLE=function(n,t,e){n|=0,t|=0,e||P(n,t,this.length);for(var r=this[n],i=1,o=0;++o<t&&(i*=256);)r+=this[n+o]*i;return r},f.prototype.readUIntBE=function(n,t,e){n|=0,t|=0,e||P(n,t,this.length);for(var r=this[n+--t],i=1;t>0&&(i*=256);)r+=this[n+--t]*i;return r},f.prototype.readUInt8=function(n,t){return t||P(n,1,this.length),this[n]},f.prototype.readUInt16LE=function(n,t){return t||P(n,2,this.length),this[n]|this[n+1]<<8},f.prototype.readUInt16BE=function(n,t){return t||P(n,2,this.length),this[n]<<8|this[n+1]},f.prototype.readUInt32LE=function(n,t){return t||P(n,4,this.length),(this[n]|this[n+1]<<8|this[n+2]<<16)+16777216*this[n+3]},f.prototype.readUInt32BE=function(n,t){return t||P(n,4,this.length),16777216*this[n]+(this[n+1]<<16|this[n+2]<<8|this[n+3])},f.prototype.readIntLE=function(n,t,e){n|=0,t|=0,e||P(n,t,this.length);for(var r=this[n],i=1,o=0;++o<t&&(i*=256);)r+=this[n+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},f.prototype.readIntBE=function(n,t,e){n|=0,t|=0,e||P(n,t,this.length);for(var r=t,i=1,o=this[n+--r];r>0&&(i*=256);)o+=this[n+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},f.prototype.readInt8=function(n,t){return t||P(n,1,this.length),128&this[n]?-1*(255-this[n]+1):this[n]},f.prototype.readInt16LE=function(n,t){t||P(n,2,this.length);var e=this[n]|this[n+1]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt16BE=function(n,t){t||P(n,2,this.length);var e=this[n+1]|this[n]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt32LE=function(n,t){return t||P(n,4,this.length),this[n]|this[n+1]<<8|this[n+2]<<16|this[n+3]<<24},f.prototype.readInt32BE=function(n,t){return t||P(n,4,this.length),this[n]<<24|this[n+1]<<16|this[n+2]<<8|this[n+3]},f.prototype.readFloatLE=function(n,t){return t||P(n,4,this.length),o.read(this,n,!0,23,4)},f.prototype.readFloatBE=function(n,t){return t||P(n,4,this.length),o.read(this,n,!1,23,4)},f.prototype.readDoubleLE=function(n,t){return t||P(n,8,this.length),o.read(this,n,!0,52,8)},f.prototype.readDoubleBE=function(n,t){return t||P(n,8,this.length),o.read(this,n,!1,52,8)},f.prototype.writeUIntLE=function(n,t,e,r){n=+n,t|=0,e|=0,r||C(this,n,t,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[t]=255&n;++o<e&&(i*=256);)this[t+o]=n/i&255;return t+e},f.prototype.writeUIntBE=function(n,t,e,r){n=+n,t|=0,e|=0,r||C(this,n,t,e,Math.pow(2,8*e)-1,0);var i=e-1,o=1;for(this[t+i]=255&n;--i>=0&&(o*=256);)this[t+i]=n/o&255;return t+e},f.prototype.writeUInt8=function(n,t,e){return n=+n,t|=0,e||C(this,n,t,1,255,0),f.TYPED_ARRAY_SUPPORT||(n=Math.floor(n)),this[t]=255&n,t+1},f.prototype.writeUInt16LE=function(n,t,e){return n=+n,t|=0,e||C(this,n,t,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[t]=255&n,this[t+1]=n>>>8):M(this,n,t,!0),t+2},f.prototype.writeUInt16BE=function(n,t,e){return n=+n,t|=0,e||C(this,n,t,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[t]=n>>>8,this[t+1]=255&n):M(this,n,t,!1),t+2},f.prototype.writeUInt32LE=function(n,t,e){return n=+n,t|=0,e||C(this,n,t,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[t+3]=n>>>24,this[t+2]=n>>>16,this[t+1]=n>>>8,this[t]=255&n):B(this,n,t,!0),t+4},f.prototype.writeUInt32BE=function(n,t,e){return n=+n,t|=0,e||C(this,n,t,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[t]=n>>>24,this[t+1]=n>>>16,this[t+2]=n>>>8,this[t+3]=255&n):B(this,n,t,!1),t+4},f.prototype.writeIntLE=function(n,t,e,r){if(n=+n,t|=0,!r){var i=Math.pow(2,8*e-1);C(this,n,t,e,i-1,-i)}var o=0,u=1,a=0;for(this[t]=255&n;++o<e&&(u*=256);)n<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(n/u>>0)-a&255;return t+e},f.prototype.writeIntBE=function(n,t,e,r){if(n=+n,t|=0,!r){var i=Math.pow(2,8*e-1);C(this,n,t,e,i-1,-i)}var o=e-1,u=1,a=0;for(this[t+o]=255&n;--o>=0&&(u*=256);)n<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(n/u>>0)-a&255;return t+e},f.prototype.writeInt8=function(n,t,e){return n=+n,t|=0,e||C(this,n,t,1,127,-128),f.TYPED_ARRAY_SUPPORT||(n=Math.floor(n)),n<0&&(n=255+n+1),this[t]=255&n,t+1},f.prototype.writeInt16LE=function(n,t,e){return n=+n,t|=0,e||C(this,n,t,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[t]=255&n,this[t+1]=n>>>8):M(this,n,t,!0),t+2},f.prototype.writeInt16BE=function(n,t,e){return n=+n,t|=0,e||C(this,n,t,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[t]=n>>>8,this[t+1]=255&n):M(this,n,t,!1),t+2},f.prototype.writeInt32LE=function(n,t,e){return n=+n,t|=0,e||C(this,n,t,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[t]=255&n,this[t+1]=n>>>8,this[t+2]=n>>>16,this[t+3]=n>>>24):B(this,n,t,!0),t+4},f.prototype.writeInt32BE=function(n,t,e){return n=+n,t|=0,e||C(this,n,t,4,2147483647,-2147483648),n<0&&(n=4294967295+n+1),f.TYPED_ARRAY_SUPPORT?(this[t]=n>>>24,this[t+1]=n>>>16,this[t+2]=n>>>8,this[t+3]=255&n):B(this,n,t,!1),t+4},f.prototype.writeFloatLE=function(n,t,e){return U(this,n,t,!0,e)},f.prototype.writeFloatBE=function(n,t,e){return U(this,n,t,!1,e)},f.prototype.writeDoubleLE=function(n,t,e){return N(this,n,t,!0,e)},f.prototype.writeDoubleBE=function(n,t,e){return N(this,n,t,!1,e)},f.prototype.copy=function(n,t,e,r){if(e||(e=0),r||0===r||(r=this.length),t>=n.length&&(t=n.length),t||(t=0),r>0&&r<e&&(r=e),r===e)return 0;if(0===n.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),n.length-t<r-e&&(r=n.length-t+e);var i,o=r-e;if(this===n&&e<t&&t<r)for(i=o-1;i>=0;--i)n[i+t]=this[i+e];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)n[i+t]=this[i+e];else Uint8Array.prototype.set.call(n,this.subarray(e,e+o),t);return o},f.prototype.fill=function(n,t,e,r){if("string"==typeof n){if("string"==typeof t?(r=t,t=0,e=this.length):"string"==typeof e&&(r=e,e=this.length),1===n.length){var i=n.charCodeAt(0);i<256&&(n=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!f.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof n&&(n&=255);if(t<0||this.length<t||this.length<e)throw new RangeError("Out of range index");if(e<=t)return this;var o;if(t>>>=0,e=void 0===e?this.length:e>>>0,n||(n=0),"number"==typeof n)for(o=t;o<e;++o)this[o]=n;else{var u=f.isBuffer(n)?n:W(new f(n,r).toString()),a=u.length;for(o=0;o<e-t;++o)this[o+t]=u[o%a]}return this};var F=/[^+\/0-9A-Za-z-_]/g;function z(n){return n<16?"0"+n.toString(16):n.toString(16)}function W(n,t){var e;t=t||1/0;for(var r=n.length,i=null,o=[],u=0;u<r;++u){if((e=n.charCodeAt(u))>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(u+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(t-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((t-=1)<0)break;o.push(e)}else if(e<2048){if((t-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((t-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function Y(n){return i.toByteArray(function(n){if((n=function(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")}(n).replace(F,"")).length<2)return"";for(;n.length%4!=0;)n+="=";return n}(n))}function q(n,t,e,r){for(var i=0;i<r&&!(i+e>=t.length||i>=n.length);++i)t[i+e]=n[i];return i}},{"base64-js":"yh9p",ieee754:"JgNJ",isarray:"REa7",buffer:"dskh"}],B1iE:[function(n,t,e){arguments[3],n("buffer").Buffer;var r=arguments[3];n("buffer").Buffer;(function(){var n,i=200,o="Expected a function",u="__lodash_hash_undefined__",a="__lodash_placeholder__",c=1,f=2,s=4,l=1,h=2,p=1,d=2,m=4,g=8,v=16,y=32,_=64,b=128,w=256,x=512,A=800,S=16,k=1/0,R=9007199254740991,E=1.7976931348623157e308,D=NaN,O=4294967295,T=O-1,I=O>>>1,j=[["ary",b],["bind",p],["bindKey",d],["curry",g],["curryRight",v],["flip",x],["partial",y],["partialRight",_],["rearg",w]],P="[object Arguments]",C="[object Array]",M="[object AsyncFunction]",B="[object Boolean]",L="[object Date]",U="[object DOMException]",N="[object Error]",F="[object Function]",z="[object GeneratorFunction]",W="[object Map]",Y="[object Number]",q="[object Null]",$="[object Object]",V="[object Proxy]",G="[object RegExp]",K="[object Set]",H="[object String]",Z="[object Symbol]",J="[object Undefined]",X="[object WeakMap]",Q="[object ArrayBuffer]",nn="[object DataView]",tn="[object Float32Array]",en="[object Float64Array]",rn="[object Int8Array]",on="[object Int16Array]",un="[object Int32Array]",an="[object Uint8Array]",cn="[object Uint8ClampedArray]",fn="[object Uint16Array]",sn="[object Uint32Array]",ln=/\b__p \+= '';/g,hn=/\b(__p \+=) '' \+/g,pn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,dn=/&(?:amp|lt|gt|quot|#39);/g,mn=/[&<>"']/g,gn=RegExp(dn.source),vn=RegExp(mn.source),yn=/<%-([\s\S]+?)%>/g,_n=/<%([\s\S]+?)%>/g,bn=/<%=([\s\S]+?)%>/g,wn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xn=/^\w*$/,An=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Sn=/[\\^$.*+?()[\]{}|]/g,kn=RegExp(Sn.source),Rn=/^\s+/,En=/\s/,Dn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,On=/\{\n\/\* \[wrapped with (.+)\] \*/,Tn=/,? & /,In=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,jn=/[()=,{}\[\]\/\s]/,Pn=/\\(\\)?/g,Cn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Mn=/\w*$/,Bn=/^[-+]0x[0-9a-f]+$/i,Ln=/^0b[01]+$/i,Un=/^\[object .+?Constructor\]$/,Nn=/^0o[0-7]+$/i,Fn=/^(?:0|[1-9]\d*)$/,zn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Wn=/($^)/,Yn=/['\n\r\u2028\u2029\\]/g,qn="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",$n="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Vn="["+$n+"]",Gn="["+qn+"]",Kn="\\d+",Hn="[a-z\\xdf-\\xf6\\xf8-\\xff]",Zn="[^\\ud800-\\udfff"+$n+Kn+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Jn="\\ud83c[\\udffb-\\udfff]",Xn="[^\\ud800-\\udfff]",Qn="(?:\\ud83c[\\udde6-\\uddff]){2}",nt="[\\ud800-\\udbff][\\udc00-\\udfff]",tt="[A-Z\\xc0-\\xd6\\xd8-\\xde]",et="(?:"+Hn+"|"+Zn+")",rt="(?:"+tt+"|"+Zn+")",it="(?:"+Gn+"|"+Jn+")?",ot="[\\ufe0e\\ufe0f]?"+it+"(?:\\u200d(?:"+[Xn,Qn,nt].join("|")+")[\\ufe0e\\ufe0f]?"+it+")*",ut="(?:"+["[\\u2700-\\u27bf]",Qn,nt].join("|")+")"+ot,at="(?:"+[Xn+Gn+"?",Gn,Qn,nt,"[\\ud800-\\udfff]"].join("|")+")",ct=RegExp("['’]","g"),ft=RegExp(Gn,"g"),st=RegExp(Jn+"(?="+Jn+")|"+at+ot,"g"),lt=RegExp([tt+"?"+Hn+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[Vn,tt,"$"].join("|")+")",rt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[Vn,tt+et,"$"].join("|")+")",tt+"?"+et+"+(?:['’](?:d|ll|m|re|s|t|ve))?",tt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Kn,ut].join("|"),"g"),ht=RegExp("[\\u200d\\ud800-\\udfff"+qn+"\\ufe0e\\ufe0f]"),pt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,dt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],mt=-1,gt={};gt[tn]=gt[en]=gt[rn]=gt[on]=gt[un]=gt[an]=gt[cn]=gt[fn]=gt[sn]=!0,gt[P]=gt[C]=gt[Q]=gt[B]=gt[nn]=gt[L]=gt[N]=gt[F]=gt[W]=gt[Y]=gt[$]=gt[G]=gt[K]=gt[H]=gt[X]=!1;var vt={};vt[P]=vt[C]=vt[Q]=vt[nn]=vt[B]=vt[L]=vt[tn]=vt[en]=vt[rn]=vt[on]=vt[un]=vt[W]=vt[Y]=vt[$]=vt[G]=vt[K]=vt[H]=vt[Z]=vt[an]=vt[cn]=vt[fn]=vt[sn]=!0,vt[N]=vt[F]=vt[X]=!1;var yt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},_t=parseFloat,bt=parseInt,wt="object"==typeof r&&r&&r.Object===Object&&r,xt="object"==typeof self&&self&&self.Object===Object&&self,At=wt||xt||Function("return this")(),St="object"==typeof e&&e&&!e.nodeType&&e,kt=St&&"object"==typeof t&&t&&!t.nodeType&&t,Rt=kt&&kt.exports===St,Et=Rt&&wt.process,Dt=function(){try{return kt&&kt.require&&kt.require("util").types||Et&&Et.binding&&Et.binding("util")}catch(r){}}(),Ot=Dt&&Dt.isArrayBuffer,Tt=Dt&&Dt.isDate,It=Dt&&Dt.isMap,jt=Dt&&Dt.isRegExp,Pt=Dt&&Dt.isSet,Ct=Dt&&Dt.isTypedArray;function Mt(n,t,e){switch(e.length){case 0:return n.call(t);case 1:return n.call(t,e[0]);case 2:return n.call(t,e[0],e[1]);case 3:return n.call(t,e[0],e[1],e[2])}return n.apply(t,e)}function Bt(n,t,e,r){for(var i=-1,o=null==n?0:n.length;++i<o;){var u=n[i];t(r,u,e(u),n)}return r}function Lt(n,t){for(var e=-1,r=null==n?0:n.length;++e<r&&!1!==t(n[e],e,n););return n}function Ut(n,t){for(var e=-1,r=null==n?0:n.length;++e<r;)if(!t(n[e],e,n))return!1;return!0}function Nt(n,t){for(var e=-1,r=null==n?0:n.length,i=0,o=[];++e<r;){var u=n[e];t(u,e,n)&&(o[i++]=u)}return o}function Ft(n,t){return!(null==n||!n.length)&&Zt(n,t,0)>-1}function zt(n,t,e){for(var r=-1,i=null==n?0:n.length;++r<i;)if(e(t,n[r]))return!0;return!1}function Wt(n,t){for(var e=-1,r=null==n?0:n.length,i=Array(r);++e<r;)i[e]=t(n[e],e,n);return i}function Yt(n,t){for(var e=-1,r=t.length,i=n.length;++e<r;)n[i+e]=t[e];return n}function qt(n,t,e,r){var i=-1,o=null==n?0:n.length;for(r&&o&&(e=n[++i]);++i<o;)e=t(e,n[i],i,n);return e}function $t(n,t,e,r){var i=null==n?0:n.length;for(r&&i&&(e=n[--i]);i--;)e=t(e,n[i],i,n);return e}function Vt(n,t){for(var e=-1,r=null==n?0:n.length;++e<r;)if(t(n[e],e,n))return!0;return!1}var Gt=ne("length");function Kt(n,t,e){var r;return e(n,function(n,e,i){if(t(n,e,i))return r=e,!1}),r}function Ht(n,t,e,r){for(var i=n.length,o=e+(r?1:-1);r?o--:++o<i;)if(t(n[o],o,n))return o;return-1}function Zt(n,t,e){return t==t?function(n,t,e){for(var r=e-1,i=n.length;++r<i;)if(n[r]===t)return r;return-1}(n,t,e):Ht(n,Xt,e)}function Jt(n,t,e,r){for(var i=e-1,o=n.length;++i<o;)if(r(n[i],t))return i;return-1}function Xt(n){return n!=n}function Qt(n,t){var e=null==n?0:n.length;return e?re(n,t)/e:D}function ne(t){return function(e){return null==e?n:e[t]}}function te(t){return function(e){return null==t?n:t[e]}}function ee(n,t,e,r,i){return i(n,function(n,i,o){e=r?(r=!1,n):t(e,n,i,o)}),e}function re(t,e){for(var r,i=-1,o=t.length;++i<o;){var u=e(t[i]);u!==n&&(r=r===n?u:r+u)}return r}function ie(n,t){for(var e=-1,r=Array(n);++e<n;)r[e]=t(e);return r}function oe(n){return n?n.slice(0,we(n)+1).replace(Rn,""):n}function ue(n){return function(t){return n(t)}}function ae(n,t){return Wt(t,function(t){return n[t]})}function ce(n,t){return n.has(t)}function fe(n,t){for(var e=-1,r=n.length;++e<r&&Zt(t,n[e],0)>-1;);return e}function se(n,t){for(var e=n.length;e--&&Zt(t,n[e],0)>-1;);return e}var le=te({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),he=te({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function pe(n){return"\\"+yt[n]}function de(n){return ht.test(n)}function me(n){var t=-1,e=Array(n.size);return n.forEach(function(n,r){e[++t]=[r,n]}),e}function ge(n,t){return function(e){return n(t(e))}}function ve(n,t){for(var e=-1,r=n.length,i=0,o=[];++e<r;){var u=n[e];u!==t&&u!==a||(n[e]=a,o[i++]=e)}return o}function ye(n){var t=-1,e=Array(n.size);return n.forEach(function(n){e[++t]=n}),e}function _e(n){return de(n)?function(n){for(var t=st.lastIndex=0;st.test(n);)++t;return t}(n):Gt(n)}function be(n){return de(n)?function(n){return n.match(st)||[]}(n):function(n){return n.split("")}(n)}function we(n){for(var t=n.length;t--&&En.test(n.charAt(t)););return t}var xe=te({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),Ae=function t(e){var r,En=(e=null==e?At:Ae.defaults(At.Object(),e,Ae.pick(At,dt))).Array,qn=e.Date,$n=e.Error,Vn=e.Function,Gn=e.Math,Kn=e.Object,Hn=e.RegExp,Zn=e.String,Jn=e.TypeError,Xn=En.prototype,Qn=Vn.prototype,nt=Kn.prototype,tt=e["__core-js_shared__"],et=Qn.toString,rt=nt.hasOwnProperty,it=0,ot=(r=/[^.]+$/.exec(tt&&tt.keys&&tt.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",ut=nt.toString,at=et.call(Kn),st=At._,ht=Hn("^"+et.call(rt).replace(Sn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),yt=Rt?e.Buffer:n,wt=e.Symbol,xt=e.Uint8Array,St=yt?yt.allocUnsafe:n,kt=ge(Kn.getPrototypeOf,Kn),Et=Kn.create,Dt=nt.propertyIsEnumerable,Gt=Xn.splice,te=wt?wt.isConcatSpreadable:n,Se=wt?wt.iterator:n,ke=wt?wt.toStringTag:n,Re=function(){try{var n=ko(Kn,"defineProperty");return n({},"",{}),n}catch(e){}}(),Ee=e.clearTimeout!==At.clearTimeout&&e.clearTimeout,De=qn&&qn.now!==At.Date.now&&qn.now,Oe=e.setTimeout!==At.setTimeout&&e.setTimeout,Te=Gn.ceil,Ie=Gn.floor,je=Kn.getOwnPropertySymbols,Pe=yt?yt.isBuffer:n,Ce=e.isFinite,Me=Xn.join,Be=ge(Kn.keys,Kn),Le=Gn.max,Ue=Gn.min,Ne=qn.now,Fe=e.parseInt,ze=Gn.random,We=Xn.reverse,Ye=ko(e,"DataView"),qe=ko(e,"Map"),$e=ko(e,"Promise"),Ve=ko(e,"Set"),Ge=ko(e,"WeakMap"),Ke=ko(Kn,"create"),He=Ge&&new Ge,Ze={},Je=Jo(Ye),Xe=Jo(qe),Qe=Jo($e),nr=Jo(Ve),tr=Jo(Ge),er=wt?wt.prototype:n,rr=er?er.valueOf:n,ir=er?er.toString:n;function or(n){if(da(n)&&!ra(n)&&!(n instanceof fr)){if(n instanceof cr)return n;if(rt.call(n,"__wrapped__"))return Xo(n)}return new cr(n)}var ur=function(){function t(){}return function(e){if(!pa(e))return{};if(Et)return Et(e);t.prototype=e;var r=new t;return t.prototype=n,r}}();function ar(){}function cr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=n}function fr(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=O,this.__views__=[]}function sr(n){var t=-1,e=null==n?0:n.length;for(this.clear();++t<e;){var r=n[t];this.set(r[0],r[1])}}function lr(n){var t=-1,e=null==n?0:n.length;for(this.clear();++t<e;){var r=n[t];this.set(r[0],r[1])}}function hr(n){var t=-1,e=null==n?0:n.length;for(this.clear();++t<e;){var r=n[t];this.set(r[0],r[1])}}function pr(n){var t=-1,e=null==n?0:n.length;for(this.__data__=new hr;++t<e;)this.add(n[t])}function dr(n){var t=this.__data__=new lr(n);this.size=t.size}function mr(n,t){var e=ra(n),r=!e&&ea(n),i=!e&&!r&&aa(n),o=!e&&!r&&!i&&xa(n),u=e||r||i||o,a=u?ie(n.length,Zn):[],c=a.length;for(var f in n)!t&&!rt.call(n,f)||u&&("length"==f||i&&("offset"==f||"parent"==f)||o&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||jo(f,c))||a.push(f);return a}function gr(t){var e=t.length;return e?t[si(0,e-1)]:n}function vr(t,e,r){(r===n||Qu(t[e],r))&&(r!==n||e in t)||xr(t,e,r)}function yr(t,e,r){var i=t[e];rt.call(t,e)&&Qu(i,r)&&(r!==n||e in t)||xr(t,e,r)}function _r(n,t){for(var e=n.length;e--;)if(Qu(n[e][0],t))return e;return-1}function br(n,t,e,r){return Or(n,function(n,i,o){t(r,n,e(n),o)}),r}function wr(n,t){return n&&Yi(t,qa(t),n)}function xr(n,t,e){"__proto__"==t&&Re?Re(n,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):n[t]=e}function Ar(t,e){for(var r=-1,i=e.length,o=En(i),u=null==t;++r<i;)o[r]=u?n:Na(t,e[r]);return o}function Sr(t,e,r){return t==t&&(r!==n&&(t=t<=r?t:r),e!==n&&(t=t>=e?t:e)),t}function kr(t,e,r,i,o,u){var a,l=e&c,h=e&f,p=e&s;if(r&&(a=o?r(t,i,o,u):r(t)),a!==n)return a;if(!pa(t))return t;var d=ra(t);if(d){if(a=function(n){var t=n.length,e=new n.constructor(t);return t&&"string"==typeof n[0]&&rt.call(n,"index")&&(e.index=n.index,e.input=n.input),e}(t),!l)return Wi(t,a)}else{var m=Do(t),g=m==F||m==z;if(aa(t))return Bi(t,l);if(m==$||m==P||g&&!o){if(a=h||g?{}:To(t),!l)return h?function(n,t){return Yi(n,Eo(n),t)}(t,function(n,t){return n&&Yi(t,$a(t),n)}(a,t)):function(n,t){return Yi(n,Ro(n),t)}(t,wr(a,t))}else{if(!vt[m])return o?t:{};a=function(n,t,e){var r,i,o,u=n.constructor;switch(t){case Q:return Li(n);case B:case L:return new u(+n);case nn:return function(n,t){var e=t?Li(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.byteLength)}(n,e);case tn:case en:case rn:case on:case un:case an:case cn:case fn:case sn:return Ui(n,e);case W:return new u;case Y:case H:return new u(n);case G:return(o=new(i=n).constructor(i.source,Mn.exec(i))).lastIndex=i.lastIndex,o;case K:return new u;case Z:return r=n,rr?Kn(rr.call(r)):{}}}(t,m,l)}}u||(u=new dr);var v=u.get(t);if(v)return v;u.set(t,a),_a(t)?t.forEach(function(n){a.add(kr(n,e,r,n,t,u))}):ma(t)&&t.forEach(function(n,i){a.set(i,kr(n,e,r,i,t,u))});var y=d?n:(p?h?yo:vo:h?$a:qa)(t);return Lt(y||t,function(n,i){y&&(n=t[i=n]),yr(a,i,kr(n,e,r,i,t,u))}),a}function Rr(t,e,r){var i=r.length;if(null==t)return!i;for(t=Kn(t);i--;){var o=r[i],u=e[o],a=t[o];if(a===n&&!(o in t)||!u(a))return!1}return!0}function Er(t,e,r){if("function"!=typeof t)throw new Jn(o);return qo(function(){t.apply(n,r)},e)}function Dr(n,t,e,r){var o=-1,u=Ft,a=!0,c=n.length,f=[],s=t.length;if(!c)return f;e&&(t=Wt(t,ue(e))),r?(u=zt,a=!1):t.length>=i&&(u=ce,a=!1,t=new pr(t));n:for(;++o<c;){var l=n[o],h=null==e?l:e(l);if(l=r||0!==l?l:0,a&&h==h){for(var p=s;p--;)if(t[p]===h)continue n;f.push(l)}else u(t,h,r)||f.push(l)}return f}or.templateSettings={escape:yn,evaluate:_n,interpolate:bn,variable:"",imports:{_:or}},or.prototype=ar.prototype,or.prototype.constructor=or,cr.prototype=ur(ar.prototype),cr.prototype.constructor=cr,fr.prototype=ur(ar.prototype),fr.prototype.constructor=fr,sr.prototype.clear=function(){this.__data__=Ke?Ke(null):{},this.size=0},sr.prototype.delete=function(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t},sr.prototype.get=function(t){var e=this.__data__;if(Ke){var r=e[t];return r===u?n:r}return rt.call(e,t)?e[t]:n},sr.prototype.has=function(t){var e=this.__data__;return Ke?e[t]!==n:rt.call(e,t)},sr.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ke&&e===n?u:e,this},lr.prototype.clear=function(){this.__data__=[],this.size=0},lr.prototype.delete=function(n){var t=this.__data__,e=_r(t,n);return!(e<0||(e==t.length-1?t.pop():Gt.call(t,e,1),--this.size,0))},lr.prototype.get=function(t){var e=this.__data__,r=_r(e,t);return r<0?n:e[r][1]},lr.prototype.has=function(n){return _r(this.__data__,n)>-1},lr.prototype.set=function(n,t){var e=this.__data__,r=_r(e,n);return r<0?(++this.size,e.push([n,t])):e[r][1]=t,this},hr.prototype.clear=function(){this.size=0,this.__data__={hash:new sr,map:new(qe||lr),string:new sr}},hr.prototype.delete=function(n){var t=Ao(this,n).delete(n);return this.size-=t?1:0,t},hr.prototype.get=function(n){return Ao(this,n).get(n)},hr.prototype.has=function(n){return Ao(this,n).has(n)},hr.prototype.set=function(n,t){var e=Ao(this,n),r=e.size;return e.set(n,t),this.size+=e.size==r?0:1,this},pr.prototype.add=pr.prototype.push=function(n){return this.__data__.set(n,u),this},pr.prototype.has=function(n){return this.__data__.has(n)},dr.prototype.clear=function(){this.__data__=new lr,this.size=0},dr.prototype.delete=function(n){var t=this.__data__,e=t.delete(n);return this.size=t.size,e},dr.prototype.get=function(n){return this.__data__.get(n)},dr.prototype.has=function(n){return this.__data__.has(n)},dr.prototype.set=function(n,t){var e=this.__data__;if(e instanceof lr){var r=e.__data__;if(!qe||r.length<i-1)return r.push([n,t]),this.size=++e.size,this;e=this.__data__=new hr(r)}return e.set(n,t),this.size=e.size,this};var Or=Vi(Lr),Tr=Vi(Ur,!0);function Ir(n,t){var e=!0;return Or(n,function(n,r,i){return e=!!t(n,r,i)}),e}function jr(t,e,r){for(var i=-1,o=t.length;++i<o;){var u=t[i],a=e(u);if(null!=a&&(c===n?a==a&&!wa(a):r(a,c)))var c=a,f=u}return f}function Pr(n,t){var e=[];return Or(n,function(n,r,i){t(n,r,i)&&e.push(n)}),e}function Cr(n,t,e,r,i){var o=-1,u=n.length;for(e||(e=Io),i||(i=[]);++o<u;){var a=n[o];t>0&&e(a)?t>1?Cr(a,t-1,e,r,i):Yt(i,a):r||(i[i.length]=a)}return i}var Mr=Gi(),Br=Gi(!0);function Lr(n,t){return n&&Mr(n,t,qa)}function Ur(n,t){return n&&Br(n,t,qa)}function Nr(n,t){return Nt(t,function(t){return sa(n[t])})}function Fr(t,e){for(var r=0,i=(e=ji(e,t)).length;null!=t&&r<i;)t=t[Zo(e[r++])];return r&&r==i?t:n}function zr(n,t,e){var r=t(n);return ra(n)?r:Yt(r,e(n))}function Wr(t){return null==t?t===n?J:q:ke&&ke in Kn(t)?function(t){var e=rt.call(t,ke),r=t[ke];try{t[ke]=n;var i=!0}catch(u){}var o=ut.call(t);return i&&(e?t[ke]=r:delete t[ke]),o}(t):function(n){return ut.call(n)}(t)}function Yr(n,t){return n>t}function qr(n,t){return null!=n&&rt.call(n,t)}function $r(n,t){return null!=n&&t in Kn(n)}function Vr(t,e,r){for(var i=r?zt:Ft,o=t[0].length,u=t.length,a=u,c=En(u),f=1/0,s=[];a--;){var l=t[a];a&&e&&(l=Wt(l,ue(e))),f=Ue(l.length,f),c[a]=!r&&(e||o>=120&&l.length>=120)?new pr(a&&l):n}l=t[0];var h=-1,p=c[0];n:for(;++h<o&&s.length<f;){var d=l[h],m=e?e(d):d;if(d=r||0!==d?d:0,!(p?ce(p,m):i(s,m,r))){for(a=u;--a;){var g=c[a];if(!(g?ce(g,m):i(t[a],m,r)))continue n}p&&p.push(m),s.push(d)}}return s}function Gr(t,e,r){var i=null==(t=zo(t,e=ji(e,t)))?t:t[Zo(fu(e))];return null==i?n:Mt(i,t,r)}function Kr(n){return da(n)&&Wr(n)==P}function Hr(t,e,r,i,o){return t===e||(null==t||null==e||!da(t)&&!da(e)?t!=t&&e!=e:function(t,e,r,i,o,u){var a=ra(t),c=ra(e),f=a?C:Do(t),s=c?C:Do(e),p=(f=f==P?$:f)==$,d=(s=s==P?$:s)==$,m=f==s;if(m&&aa(t)){if(!aa(e))return!1;a=!0,p=!1}if(m&&!p)return u||(u=new dr),a||xa(t)?mo(t,e,r,i,o,u):function(n,t,e,r,i,o,u){switch(e){case nn:if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)return!1;n=n.buffer,t=t.buffer;case Q:return!(n.byteLength!=t.byteLength||!o(new xt(n),new xt(t)));case B:case L:case Y:return Qu(+n,+t);case N:return n.name==t.name&&n.message==t.message;case G:case H:return n==t+"";case W:var a=me;case K:var c=r&l;if(a||(a=ye),n.size!=t.size&&!c)return!1;var f=u.get(n);if(f)return f==t;r|=h,u.set(n,t);var s=mo(a(n),a(t),r,i,o,u);return u.delete(n),s;case Z:if(rr)return rr.call(n)==rr.call(t)}return!1}(t,e,f,r,i,o,u);if(!(r&l)){var g=p&&rt.call(t,"__wrapped__"),v=d&&rt.call(e,"__wrapped__");if(g||v){var y=g?t.value():t,_=v?e.value():e;return u||(u=new dr),o(y,_,r,i,u)}}return!!m&&(u||(u=new dr),function(t,e,r,i,o,u){var a=r&l,c=vo(t),f=c.length;if(f!=vo(e).length&&!a)return!1;for(var s=f;s--;){var h=c[s];if(!(a?h in e:rt.call(e,h)))return!1}var p=u.get(t),d=u.get(e);if(p&&d)return p==e&&d==t;var m=!0;u.set(t,e),u.set(e,t);for(var g=a;++s<f;){var v=t[h=c[s]],y=e[h];if(i)var _=a?i(y,v,h,e,t,u):i(v,y,h,t,e,u);if(!(_===n?v===y||o(v,y,r,i,u):_)){m=!1;break}g||(g="constructor"==h)}if(m&&!g){var b=t.constructor,w=e.constructor;b!=w&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w)&&(m=!1)}return u.delete(t),u.delete(e),m}(t,e,r,i,o,u))}(t,e,r,i,Hr,o))}function Zr(t,e,r,i){var o=r.length,u=o,a=!i;if(null==t)return!u;for(t=Kn(t);o--;){var c=r[o];if(a&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++o<u;){var f=(c=r[o])[0],s=t[f],p=c[1];if(a&&c[2]){if(s===n&&!(f in t))return!1}else{var d=new dr;if(i)var m=i(s,p,f,t,e,d);if(!(m===n?Hr(p,s,l|h,i,d):m))return!1}}return!0}function Jr(n){return!(!pa(n)||(t=n,ot&&ot in t))&&(sa(n)?ht:Un).test(Jo(n));var t}function Xr(n){return"function"==typeof n?n:null==n?gc:"object"==typeof n?ra(n)?ri(n[0],n[1]):ei(n):kc(n)}function Qr(n){if(!Lo(n))return Be(n);var t=[];for(var e in Kn(n))rt.call(n,e)&&"constructor"!=e&&t.push(e);return t}function ni(n,t){return n<t}function ti(n,t){var e=-1,r=oa(n)?En(n.length):[];return Or(n,function(n,i,o){r[++e]=t(n,i,o)}),r}function ei(n){var t=So(n);return 1==t.length&&t[0][2]?No(t[0][0],t[0][1]):function(e){return e===n||Zr(e,n,t)}}function ri(t,e){return Co(t)&&Uo(e)?No(Zo(t),e):function(r){var i=Na(r,t);return i===n&&i===e?Fa(r,t):Hr(e,i,l|h)}}function ii(t,e,r,i,o){t!==e&&Mr(e,function(u,a){if(o||(o=new dr),pa(u))!function(t,e,r,i,o,u,a){var c=Wo(t,r),f=Wo(e,r),s=a.get(f);if(s)vr(t,r,s);else{var l=u?u(c,f,r+"",t,e,a):n,h=l===n;if(h){var p=ra(f),d=!p&&aa(f),m=!p&&!d&&xa(f);l=f,p||d||m?ra(c)?l=c:ua(c)?l=Wi(c):d?(h=!1,l=Bi(f,!0)):m?(h=!1,l=Ui(f,!0)):l=[]:va(f)||ea(f)?(l=c,ea(c)?l=Ta(c):pa(c)&&!sa(c)||(l=To(f))):h=!1}h&&(a.set(f,l),o(l,f,i,u,a),a.delete(f)),vr(t,r,l)}}(t,e,a,r,ii,i,o);else{var c=i?i(Wo(t,a),u,a+"",t,e,o):n;c===n&&(c=u),vr(t,a,c)}},$a)}function oi(t,e){var r=t.length;if(r)return jo(e+=e<0?r:0,r)?t[e]:n}function ui(n,t,e){t=t.length?Wt(t,function(n){return ra(n)?function(t){return Fr(t,1===n.length?n[0]:n)}:n}):[gc];var r=-1;return t=Wt(t,ue(xo())),function(n,t){var e=n.length;for(n.sort(t);e--;)n[e]=n[e].value;return n}(ti(n,function(n,e,i){return{criteria:Wt(t,function(t){return t(n)}),index:++r,value:n}}),function(n,t){return function(n,t,e){for(var r=-1,i=n.criteria,o=t.criteria,u=i.length,a=e.length;++r<u;){var c=Ni(i[r],o[r]);if(c)return r>=a?c:c*("desc"==e[r]?-1:1)}return n.index-t.index}(n,t,e)})}function ai(n,t,e){for(var r=-1,i=t.length,o={};++r<i;){var u=t[r],a=Fr(n,u);e(a,u)&&pi(o,ji(u,n),a)}return o}function ci(n,t,e,r){var i=r?Jt:Zt,o=-1,u=t.length,a=n;for(n===t&&(t=Wi(t)),e&&(a=Wt(n,ue(e)));++o<u;)for(var c=0,f=t[o],s=e?e(f):f;(c=i(a,s,c,r))>-1;)a!==n&&Gt.call(a,c,1),Gt.call(n,c,1);return n}function fi(n,t){for(var e=n?t.length:0,r=e-1;e--;){var i=t[e];if(e==r||i!==o){var o=i;jo(i)?Gt.call(n,i,1):Si(n,i)}}return n}function si(n,t){return n+Ie(ze()*(t-n+1))}function li(n,t){var e="";if(!n||t<1||t>R)return e;do{t%2&&(e+=n),(t=Ie(t/2))&&(n+=n)}while(t);return e}function hi(n,t){return $o(Fo(n,t,gc),n+"")}function pi(t,e,r,i){if(!pa(t))return t;for(var o=-1,u=(e=ji(e,t)).length,a=u-1,c=t;null!=c&&++o<u;){var f=Zo(e[o]),s=r;if("__proto__"===f||"constructor"===f||"prototype"===f)return t;if(o!=a){var l=c[f];(s=i?i(l,f,c):n)===n&&(s=pa(l)?l:jo(e[o+1])?[]:{})}yr(c,f,s),c=c[f]}return t}var di=He?function(n,t){return He.set(n,t),n}:gc,mi=Re?function(n,t){return Re(n,"toString",{configurable:!0,enumerable:!1,value:pc(t),writable:!0})}:gc;function gi(n,t,e){var r=-1,i=n.length;t<0&&(t=-t>i?0:i+t),(e=e>i?i:e)<0&&(e+=i),i=t>e?0:e-t>>>0,t>>>=0;for(var o=En(i);++r<i;)o[r]=n[r+t];return o}function vi(n,t){var e;return Or(n,function(n,r,i){return!(e=t(n,r,i))}),!!e}function yi(n,t,e){var r=0,i=null==n?r:n.length;if("number"==typeof t&&t==t&&i<=I){for(;r<i;){var o=r+i>>>1,u=n[o];null!==u&&!wa(u)&&(e?u<=t:u<t)?r=o+1:i=o}return i}return _i(n,t,gc,e)}function _i(t,e,r,i){var o=0,u=null==t?0:t.length;if(0===u)return 0;for(var a=(e=r(e))!=e,c=null===e,f=wa(e),s=e===n;o<u;){var l=Ie((o+u)/2),h=r(t[l]),p=h!==n,d=null===h,m=h==h,g=wa(h);if(a)var v=i||m;else v=s?m&&(i||p):c?m&&p&&(i||!d):f?m&&p&&!d&&(i||!g):!d&&!g&&(i?h<=e:h<e);v?o=l+1:u=l}return Ue(u,T)}function bi(n,t){for(var e=-1,r=n.length,i=0,o=[];++e<r;){var u=n[e],a=t?t(u):u;if(!e||!Qu(a,c)){var c=a;o[i++]=0===u?0:u}}return o}function wi(n){return"number"==typeof n?n:wa(n)?D:+n}function xi(n){if("string"==typeof n)return n;if(ra(n))return Wt(n,xi)+"";if(wa(n))return ir?ir.call(n):"";var t=n+"";return"0"==t&&1/n==-k?"-0":t}function Ai(n,t,e){var r=-1,o=Ft,u=n.length,a=!0,c=[],f=c;if(e)a=!1,o=zt;else if(u>=i){var s=t?null:co(n);if(s)return ye(s);a=!1,o=ce,f=new pr}else f=t?[]:c;n:for(;++r<u;){var l=n[r],h=t?t(l):l;if(l=e||0!==l?l:0,a&&h==h){for(var p=f.length;p--;)if(f[p]===h)continue n;t&&f.push(h),c.push(l)}else o(f,h,e)||(f!==c&&f.push(h),c.push(l))}return c}function Si(n,t){return null==(n=zo(n,t=ji(t,n)))||delete n[Zo(fu(t))]}function ki(n,t,e,r){return pi(n,t,e(Fr(n,t)),r)}function Ri(n,t,e,r){for(var i=n.length,o=r?i:-1;(r?o--:++o<i)&&t(n[o],o,n););return e?gi(n,r?0:o,r?o+1:i):gi(n,r?o+1:0,r?i:o)}function Ei(n,t){var e=n;return e instanceof fr&&(e=e.value()),qt(t,function(n,t){return t.func.apply(t.thisArg,Yt([n],t.args))},e)}function Di(n,t,e){var r=n.length;if(r<2)return r?Ai(n[0]):[];for(var i=-1,o=En(r);++i<r;)for(var u=n[i],a=-1;++a<r;)a!=i&&(o[i]=Dr(o[i]||u,n[a],t,e));return Ai(Cr(o,1),t,e)}function Oi(t,e,r){for(var i=-1,o=t.length,u=e.length,a={};++i<o;){var c=i<u?e[i]:n;r(a,t[i],c)}return a}function Ti(n){return ua(n)?n:[]}function Ii(n){return"function"==typeof n?n:gc}function ji(n,t){return ra(n)?n:Co(n,t)?[n]:Ho(Ia(n))}var Pi=hi;function Ci(t,e,r){var i=t.length;return r=r===n?i:r,!e&&r>=i?t:gi(t,e,r)}var Mi=Ee||function(n){return At.clearTimeout(n)};function Bi(n,t){if(t)return n.slice();var e=n.length,r=St?St(e):new n.constructor(e);return n.copy(r),r}function Li(n){var t=new n.constructor(n.byteLength);return new xt(t).set(new xt(n)),t}function Ui(n,t){var e=t?Li(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.length)}function Ni(t,e){if(t!==e){var r=t!==n,i=null===t,o=t==t,u=wa(t),a=e!==n,c=null===e,f=e==e,s=wa(e);if(!c&&!s&&!u&&t>e||u&&a&&f&&!c&&!s||i&&a&&f||!r&&f||!o)return 1;if(!i&&!u&&!s&&t<e||s&&r&&o&&!i&&!u||c&&r&&o||!a&&o||!f)return-1}return 0}function Fi(n,t,e,r){for(var i=-1,o=n.length,u=e.length,a=-1,c=t.length,f=Le(o-u,0),s=En(c+f),l=!r;++a<c;)s[a]=t[a];for(;++i<u;)(l||i<o)&&(s[e[i]]=n[i]);for(;f--;)s[a++]=n[i++];return s}function zi(n,t,e,r){for(var i=-1,o=n.length,u=-1,a=e.length,c=-1,f=t.length,s=Le(o-a,0),l=En(s+f),h=!r;++i<s;)l[i]=n[i];for(var p=i;++c<f;)l[p+c]=t[c];for(;++u<a;)(h||i<o)&&(l[p+e[u]]=n[i++]);return l}function Wi(n,t){var e=-1,r=n.length;for(t||(t=En(r));++e<r;)t[e]=n[e];return t}function Yi(t,e,r,i){var o=!r;r||(r={});for(var u=-1,a=e.length;++u<a;){var c=e[u],f=i?i(r[c],t[c],c,r,t):n;f===n&&(f=t[c]),o?xr(r,c,f):yr(r,c,f)}return r}function qi(n,t){return function(e,r){var i=ra(e)?Bt:br,o=t?t():{};return i(e,n,xo(r,2),o)}}function $i(t){return hi(function(e,r){var i=-1,o=r.length,u=o>1?r[o-1]:n,a=o>2?r[2]:n;for(u=t.length>3&&"function"==typeof u?(o--,u):n,a&&Po(r[0],r[1],a)&&(u=o<3?n:u,o=1),e=Kn(e);++i<o;){var c=r[i];c&&t(e,c,i,u)}return e})}function Vi(n,t){return function(e,r){if(null==e)return e;if(!oa(e))return n(e,r);for(var i=e.length,o=t?i:-1,u=Kn(e);(t?o--:++o<i)&&!1!==r(u[o],o,u););return e}}function Gi(n){return function(t,e,r){for(var i=-1,o=Kn(t),u=r(t),a=u.length;a--;){var c=u[n?a:++i];if(!1===e(o[c],c,o))break}return t}}function Ki(t){return function(e){var r=de(e=Ia(e))?be(e):n,i=r?r[0]:e.charAt(0),o=r?Ci(r,1).join(""):e.slice(1);return i[t]()+o}}function Hi(n){return function(t){return qt(sc(ec(t).replace(ct,"")),n,"")}}function Zi(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var e=ur(n.prototype),r=n.apply(e,t);return pa(r)?r:e}}function Ji(t){return function(e,r,i){var o=Kn(e);if(!oa(e)){var u=xo(r,3);e=qa(e),r=function(n){return u(o[n],n,o)}}var a=t(e,r,i);return a>-1?o[u?e[a]:a]:n}}function Xi(t){return go(function(e){var r=e.length,i=r,u=cr.prototype.thru;for(t&&e.reverse();i--;){var a=e[i];if("function"!=typeof a)throw new Jn(o);if(u&&!c&&"wrapper"==bo(a))var c=new cr([],!0)}for(i=c?i:r;++i<r;){var f=bo(a=e[i]),s="wrapper"==f?_o(a):n;c=s&&Mo(s[0])&&s[1]==(b|g|y|w)&&!s[4].length&&1==s[9]?c[bo(s[0])].apply(c,s[3]):1==a.length&&Mo(a)?c[f]():c.thru(a)}return function(){var n=arguments,t=n[0];if(c&&1==n.length&&ra(t))return c.plant(t).value();for(var i=0,o=r?e[i].apply(this,n):t;++i<r;)o=e[i].call(this,o);return o}})}function Qi(t,e,r,i,o,u,a,c,f,s){var l=e&b,h=e&p,m=e&d,y=e&(g|v),_=e&x,w=m?n:Zi(t);return function p(){for(var d=arguments.length,g=En(d),v=d;v--;)g[v]=arguments[v];if(y)var b=wo(p),x=function(n,t){for(var e=n.length,r=0;e--;)n[e]===t&&++r;return r}(g,b);if(i&&(g=Fi(g,i,o,y)),u&&(g=zi(g,u,a,y)),d-=x,y&&d<s){var A=ve(g,b);return uo(t,e,Qi,p.placeholder,r,g,A,c,f,s-d)}var S=h?r:this,k=m?S[t]:t;return d=g.length,c?g=function(t,e){for(var r=t.length,i=Ue(e.length,r),o=Wi(t);i--;){var u=e[i];t[i]=jo(u,r)?o[u]:n}return t}(g,c):_&&d>1&&g.reverse(),l&&f<d&&(g.length=f),this&&this!==At&&this instanceof p&&(k=w||Zi(k)),k.apply(S,g)}}function no(n,t){return function(e,r){return function(n,t,e,r){return Lr(n,function(n,i,o){t(r,e(n),i,o)}),r}(e,n,t(r),{})}}function to(t,e){return function(r,i){var o;if(r===n&&i===n)return e;if(r!==n&&(o=r),i!==n){if(o===n)return i;"string"==typeof r||"string"==typeof i?(r=xi(r),i=xi(i)):(r=wi(r),i=wi(i)),o=t(r,i)}return o}}function eo(n){return go(function(t){return t=Wt(t,ue(xo())),hi(function(e){var r=this;return n(t,function(n){return Mt(n,r,e)})})})}function ro(t,e){var r=(e=e===n?" ":xi(e)).length;if(r<2)return r?li(e,t):e;var i=li(e,Te(t/_e(e)));return de(e)?Ci(be(i),0,t).join(""):i.slice(0,t)}function io(t){return function(e,r,i){return i&&"number"!=typeof i&&Po(e,r,i)&&(r=i=n),e=Ra(e),r===n?(r=e,e=0):r=Ra(r),function(n,t,e,r){for(var i=-1,o=Le(Te((t-n)/(e||1)),0),u=En(o);o--;)u[r?o:++i]=n,n+=e;return u}(e,r,i=i===n?e<r?1:-1:Ra(i),t)}}function oo(n){return function(t,e){return"string"==typeof t&&"string"==typeof e||(t=Oa(t),e=Oa(e)),n(t,e)}}function uo(t,e,r,i,o,u,a,c,f,s){var l=e&g;e|=l?y:_,(e&=~(l?_:y))&m||(e&=~(p|d));var h=[t,e,o,l?u:n,l?a:n,l?n:u,l?n:a,c,f,s],v=r.apply(n,h);return Mo(t)&&Yo(v,h),v.placeholder=i,Vo(v,t,e)}function ao(n){var t=Gn[n];return function(n,e){if(n=Oa(n),(e=null==e?0:Ue(Ea(e),292))&&Ce(n)){var r=(Ia(n)+"e").split("e");return+((r=(Ia(t(r[0]+"e"+(+r[1]+e)))+"e").split("e"))[0]+"e"+(+r[1]-e))}return t(n)}}var co=Ve&&1/ye(new Ve([,-0]))[1]==k?function(n){return new Ve(n)}:wc;function fo(n){return function(t){var e=Do(t);return e==W?me(t):e==K?function(n){var t=-1,e=Array(n.size);return n.forEach(function(n){e[++t]=[n,n]}),e}(t):function(n,t){return Wt(t,function(t){return[t,n[t]]})}(t,n(t))}}function so(t,e,r,i,u,c,f,s){var l=e&d;if(!l&&"function"!=typeof t)throw new Jn(o);var h=i?i.length:0;if(h||(e&=~(y|_),i=u=n),f=f===n?f:Le(Ea(f),0),s=s===n?s:Ea(s),h-=u?u.length:0,e&_){var x=i,A=u;i=u=n}var S=l?n:_o(t),k=[t,e,r,i,u,x,A,c,f,s];if(S&&function(n,t){var e=n[1],r=t[1],i=e|r,o=i<(p|d|b),u=r==b&&e==g||r==b&&e==w&&n[7].length<=t[8]||r==(b|w)&&t[7].length<=t[8]&&e==g;if(!o&&!u)return n;r&p&&(n[2]=t[2],i|=e&p?0:m);var c=t[3];if(c){var f=n[3];n[3]=f?Fi(f,c,t[4]):c,n[4]=f?ve(n[3],a):t[4]}(c=t[5])&&(f=n[5],n[5]=f?zi(f,c,t[6]):c,n[6]=f?ve(n[5],a):t[6]),(c=t[7])&&(n[7]=c),r&b&&(n[8]=null==n[8]?t[8]:Ue(n[8],t[8])),null==n[9]&&(n[9]=t[9]),n[0]=t[0],n[1]=i}(k,S),t=k[0],e=k[1],r=k[2],i=k[3],u=k[4],!(s=k[9]=k[9]===n?l?0:t.length:Le(k[9]-h,0))&&e&(g|v)&&(e&=~(g|v)),e&&e!=p)R=e==g||e==v?function(t,e,r){var i=Zi(t);return function o(){for(var u=arguments.length,a=En(u),c=u,f=wo(o);c--;)a[c]=arguments[c];var s=u<3&&a[0]!==f&&a[u-1]!==f?[]:ve(a,f);return(u-=s.length)<r?uo(t,e,Qi,o.placeholder,n,a,s,n,n,r-u):Mt(this&&this!==At&&this instanceof o?i:t,this,a)}}(t,e,s):e!=y&&e!=(p|y)||u.length?Qi.apply(n,k):function(n,t,e,r){var i=t&p,o=Zi(n);return function t(){for(var u=-1,a=arguments.length,c=-1,f=r.length,s=En(f+a),l=this&&this!==At&&this instanceof t?o:n;++c<f;)s[c]=r[c];for(;a--;)s[c++]=arguments[++u];return Mt(l,i?e:this,s)}}(t,e,r,i);else var R=function(n,t,e){var r=t&p,i=Zi(n);return function t(){return(this&&this!==At&&this instanceof t?i:n).apply(r?e:this,arguments)}}(t,e,r);return Vo((S?di:Yo)(R,k),t,e)}function lo(t,e,r,i){return t===n||Qu(t,nt[r])&&!rt.call(i,r)?e:t}function ho(t,e,r,i,o,u){return pa(t)&&pa(e)&&(u.set(e,t),ii(t,e,n,ho,u),u.delete(e)),t}function po(t){return va(t)?n:t}function mo(t,e,r,i,o,u){var a=r&l,c=t.length,f=e.length;if(c!=f&&!(a&&f>c))return!1;var s=u.get(t),p=u.get(e);if(s&&p)return s==e&&p==t;var d=-1,m=!0,g=r&h?new pr:n;for(u.set(t,e),u.set(e,t);++d<c;){var v=t[d],y=e[d];if(i)var _=a?i(y,v,d,e,t,u):i(v,y,d,t,e,u);if(_!==n){if(_)continue;m=!1;break}if(g){if(!Vt(e,function(n,t){if(!ce(g,t)&&(v===n||o(v,n,r,i,u)))return g.push(t)})){m=!1;break}}else if(v!==y&&!o(v,y,r,i,u)){m=!1;break}}return u.delete(t),u.delete(e),m}function go(t){return $o(Fo(t,n,iu),t+"")}function vo(n){return zr(n,qa,Ro)}function yo(n){return zr(n,$a,Eo)}var _o=He?function(n){return He.get(n)}:wc;function bo(n){for(var t=n.name+"",e=Ze[t],r=rt.call(Ze,t)?e.length:0;r--;){var i=e[r],o=i.func;if(null==o||o==n)return i.name}return t}function wo(n){return(rt.call(or,"placeholder")?or:n).placeholder}function xo(){var n=or.iteratee||vc;return n=n===vc?Xr:n,arguments.length?n(arguments[0],arguments[1]):n}function Ao(n,t){var e,r,i=n.__data__;return("string"==(r=typeof(e=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==e:null===e)?i["string"==typeof t?"string":"hash"]:i.map}function So(n){for(var t=qa(n),e=t.length;e--;){var r=t[e],i=n[r];t[e]=[r,i,Uo(i)]}return t}function ko(t,e){var r=function(t,e){return null==t?n:t[e]}(t,e);return Jr(r)?r:n}var Ro=je?function(n){return null==n?[]:(n=Kn(n),Nt(je(n),function(t){return Dt.call(n,t)}))}:Dc,Eo=je?function(n){for(var t=[];n;)Yt(t,Ro(n)),n=kt(n);return t}:Dc,Do=Wr;function Oo(n,t,e){for(var r=-1,i=(t=ji(t,n)).length,o=!1;++r<i;){var u=Zo(t[r]);if(!(o=null!=n&&e(n,u)))break;n=n[u]}return o||++r!=i?o:!!(i=null==n?0:n.length)&&ha(i)&&jo(u,i)&&(ra(n)||ea(n))}function To(n){return"function"!=typeof n.constructor||Lo(n)?{}:ur(kt(n))}function Io(n){return ra(n)||ea(n)||!!(te&&n&&n[te])}function jo(n,t){var e=typeof n;return!!(t=null==t?R:t)&&("number"==e||"symbol"!=e&&Fn.test(n))&&n>-1&&n%1==0&&n<t}function Po(n,t,e){if(!pa(e))return!1;var r=typeof t;return!!("number"==r?oa(e)&&jo(t,e.length):"string"==r&&t in e)&&Qu(e[t],n)}function Co(n,t){if(ra(n))return!1;var e=typeof n;return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=n&&!wa(n))||xn.test(n)||!wn.test(n)||null!=t&&n in Kn(t)}function Mo(n){var t=bo(n),e=or[t];if("function"!=typeof e||!(t in fr.prototype))return!1;if(n===e)return!0;var r=_o(e);return!!r&&n===r[0]}(Ye&&Do(new Ye(new ArrayBuffer(1)))!=nn||qe&&Do(new qe)!=W||$e&&"[object Promise]"!=Do($e.resolve())||Ve&&Do(new Ve)!=K||Ge&&Do(new Ge)!=X)&&(Do=function(t){var e=Wr(t),r=e==$?t.constructor:n,i=r?Jo(r):"";if(i)switch(i){case Je:return nn;case Xe:return W;case Qe:return"[object Promise]";case nr:return K;case tr:return X}return e});var Bo=tt?sa:Oc;function Lo(n){var t=n&&n.constructor;return n===("function"==typeof t&&t.prototype||nt)}function Uo(n){return n==n&&!pa(n)}function No(t,e){return function(r){return null!=r&&r[t]===e&&(e!==n||t in Kn(r))}}function Fo(t,e,r){return e=Le(e===n?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=Le(n.length-e,0),u=En(o);++i<o;)u[i]=n[e+i];i=-1;for(var a=En(e+1);++i<e;)a[i]=n[i];return a[e]=r(u),Mt(t,this,a)}}function zo(n,t){return t.length<2?n:Fr(n,gi(t,0,-1))}function Wo(n,t){if(("constructor"!==t||"function"!=typeof n[t])&&"__proto__"!=t)return n[t]}var Yo=Go(di),qo=Oe||function(n,t){return At.setTimeout(n,t)},$o=Go(mi);function Vo(n,t,e){var r=t+"";return $o(n,function(n,t){var e=t.length;if(!e)return n;var r=e-1;return t[r]=(e>1?"& ":"")+t[r],t=t.join(e>2?", ":" "),n.replace(Dn,"{\n/* [wrapped with "+t+"] */\n")}(r,function(n,t){return Lt(j,function(e){var r="_."+e[0];t&e[1]&&!Ft(n,r)&&n.push(r)}),n.sort()}(function(n){var t=r.match(On);return t?t[1].split(Tn):[]}(),e)))}function Go(t){var e=0,r=0;return function(){var i=Ne(),o=S-(i-r);if(r=i,o>0){if(++e>=A)return arguments[0]}else e=0;return t.apply(n,arguments)}}function Ko(t,e){var r=-1,i=t.length,o=i-1;for(e=e===n?i:e;++r<e;){var u=si(r,o),a=t[u];t[u]=t[r],t[r]=a}return t.length=e,t}var Ho=function(n){var t=Gu(function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(An,function(n,e,r,i){t.push(r?i.replace(Pn,"$1"):e||n)}),t},function(n){return 500===e.size&&e.clear(),n}),e=t.cache;return t}();function Zo(n){if("string"==typeof n||wa(n))return n;var t=n+"";return"0"==t&&1/n==-k?"-0":t}function Jo(n){if(null!=n){try{return et.call(n)}catch(e){}try{return n+""}catch(e){}}return""}function Xo(n){if(n instanceof fr)return n.clone();var t=new cr(n.__wrapped__,n.__chain__);return t.__actions__=Wi(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}var Qo=hi(function(n,t){return ua(n)?Dr(n,Cr(t,1,ua,!0)):[]}),nu=hi(function(t,e){var r=fu(e);return ua(r)&&(r=n),ua(t)?Dr(t,Cr(e,1,ua,!0),xo(r,2)):[]}),tu=hi(function(t,e){var r=fu(e);return ua(r)&&(r=n),ua(t)?Dr(t,Cr(e,1,ua,!0),n,r):[]});function eu(n,t,e){var r=null==n?0:n.length;if(!r)return-1;var i=null==e?0:Ea(e);return i<0&&(i=Le(r+i,0)),Ht(n,xo(t,3),i)}function ru(t,e,r){var i=null==t?0:t.length;if(!i)return-1;var o=i-1;return r!==n&&(o=Ea(r),o=r<0?Le(i+o,0):Ue(o,i-1)),Ht(t,xo(e,3),o,!0)}function iu(n){return null!=n&&n.length?Cr(n,1):[]}function ou(t){return t&&t.length?t[0]:n}var uu=hi(function(n){var t=Wt(n,Ti);return t.length&&t[0]===n[0]?Vr(t):[]}),au=hi(function(t){var e=fu(t),r=Wt(t,Ti);return e===fu(r)?e=n:r.pop(),r.length&&r[0]===t[0]?Vr(r,xo(e,2)):[]}),cu=hi(function(t){var e=fu(t),r=Wt(t,Ti);return(e="function"==typeof e?e:n)&&r.pop(),r.length&&r[0]===t[0]?Vr(r,n,e):[]});function fu(t){var e=null==t?0:t.length;return e?t[e-1]:n}var su=hi(lu);function lu(n,t){return n&&n.length&&t&&t.length?ci(n,t):n}var hu=go(function(n,t){var e=null==n?0:n.length,r=Ar(n,t);return fi(n,Wt(t,function(n){return jo(n,e)?+n:n}).sort(Ni)),r});function pu(n){return null==n?n:We.call(n)}var du=hi(function(n){return Ai(Cr(n,1,ua,!0))}),mu=hi(function(t){var e=fu(t);return ua(e)&&(e=n),Ai(Cr(t,1,ua,!0),xo(e,2))}),gu=hi(function(t){var e=fu(t);return e="function"==typeof e?e:n,Ai(Cr(t,1,ua,!0),n,e)});function vu(n){if(!n||!n.length)return[];var t=0;return n=Nt(n,function(n){if(ua(n))return t=Le(n.length,t),!0}),ie(t,function(t){return Wt(n,ne(t))})}function yu(t,e){if(!t||!t.length)return[];var r=vu(t);return null==e?r:Wt(r,function(t){return Mt(e,n,t)})}var _u=hi(function(n,t){return ua(n)?Dr(n,t):[]}),bu=hi(function(n){return Di(Nt(n,ua))}),wu=hi(function(t){var e=fu(t);return ua(e)&&(e=n),Di(Nt(t,ua),xo(e,2))}),xu=hi(function(t){var e=fu(t);return e="function"==typeof e?e:n,Di(Nt(t,ua),n,e)}),Au=hi(vu),Su=hi(function(t){var e=t.length,r=e>1?t[e-1]:n;return r="function"==typeof r?(t.pop(),r):n,yu(t,r)});function ku(n){var t=or(n);return t.__chain__=!0,t}function Ru(n,t){return t(n)}var Eu=go(function(t){var e=t.length,r=e?t[0]:0,i=this.__wrapped__,o=function(n){return Ar(n,t)};return!(e>1||this.__actions__.length)&&i instanceof fr&&jo(r)?((i=i.slice(r,+r+(e?1:0))).__actions__.push({func:Ru,args:[o],thisArg:n}),new cr(i,this.__chain__).thru(function(t){return e&&!t.length&&t.push(n),t})):this.thru(o)}),Du=qi(function(n,t,e){rt.call(n,e)?++n[e]:xr(n,e,1)}),Ou=Ji(eu),Tu=Ji(ru);function Iu(n,t){return(ra(n)?Lt:Or)(n,xo(t,3))}function ju(n,t){return(ra(n)?function(n,t){for(var e=null==n?0:n.length;e--&&!1!==t(n[e],e,n););return n}:Tr)(n,xo(t,3))}var Pu=qi(function(n,t,e){rt.call(n,e)?n[e].push(t):xr(n,e,[t])}),Cu=hi(function(n,t,e){var r=-1,i="function"==typeof t,o=oa(n)?En(n.length):[];return Or(n,function(n){o[++r]=i?Mt(t,n,e):Gr(n,t,e)}),o}),Mu=qi(function(n,t,e){xr(n,e,t)});function Bu(n,t){return(ra(n)?Wt:ti)(n,xo(t,3))}var Lu=qi(function(n,t,e){n[e?0:1].push(t)},function(){return[[],[]]}),Uu=hi(function(n,t){if(null==n)return[];var e=t.length;return e>1&&Po(n,t[0],t[1])?t=[]:e>2&&Po(t[0],t[1],t[2])&&(t=[t[0]]),ui(n,Cr(t,1),[])}),Nu=De||function(){return At.Date.now()};function Fu(t,e,r){return e=r?n:e,e=t&&null==e?t.length:e,so(t,b,n,n,n,n,e)}function zu(t,e){var r;if("function"!=typeof e)throw new Jn(o);return t=Ea(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=n),r}}var Wu=hi(function(n,t,e){var r=p;if(e.length){var i=ve(e,wo(Wu));r|=y}return so(n,r,t,e,i)}),Yu=hi(function(n,t,e){var r=p|d;if(e.length){var i=ve(e,wo(Yu));r|=y}return so(t,r,n,e,i)});function qu(t,e,r){var i,u,a,c,f,s,l=0,h=!1,p=!1,d=!0;if("function"!=typeof t)throw new Jn(o);function m(e){var r=i,o=u;return i=u=n,l=e,c=t.apply(o,r)}function g(t){var r=t-s;return s===n||r>=e||r<0||p&&t-l>=a}function v(){var n=Nu();if(g(n))return y(n);f=qo(v,function(n){var t=e-(n-s);return p?Ue(t,a-(n-l)):t}(n))}function y(t){return f=n,d&&i?m(t):(i=u=n,c)}function _(){var t=Nu(),r=g(t);if(i=arguments,u=this,s=t,r){if(f===n)return function(n){return l=n,f=qo(v,e),h?m(n):c}(s);if(p)return Mi(f),f=qo(v,e),m(s)}return f===n&&(f=qo(v,e)),c}return e=Oa(e)||0,pa(r)&&(h=!!r.leading,a=(p="maxWait"in r)?Le(Oa(r.maxWait)||0,e):a,d="trailing"in r?!!r.trailing:d),_.cancel=function(){f!==n&&Mi(f),l=0,i=s=u=f=n},_.flush=function(){return f===n?c:y(Nu())},_}var $u=hi(function(n,t){return Er(n,1,t)}),Vu=hi(function(n,t,e){return Er(n,Oa(t)||0,e)});function Gu(n,t){if("function"!=typeof n||null!=t&&"function"!=typeof t)throw new Jn(o);var e=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=e.cache;if(o.has(i))return o.get(i);var u=n.apply(this,r);return e.cache=o.set(i,u)||o,u};return e.cache=new(Gu.Cache||hr),e}function Ku(n){if("function"!=typeof n)throw new Jn(o);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}Gu.Cache=hr;var Hu=Pi(function(n,t){var e=(t=1==t.length&&ra(t[0])?Wt(t[0],ue(xo())):Wt(Cr(t,1),ue(xo()))).length;return hi(function(r){for(var i=-1,o=Ue(r.length,e);++i<o;)r[i]=t[i].call(this,r[i]);return Mt(n,this,r)})}),Zu=hi(function(t,e){var r=ve(e,wo(Zu));return so(t,y,n,e,r)}),Ju=hi(function(t,e){var r=ve(e,wo(Ju));return so(t,_,n,e,r)}),Xu=go(function(t,e){return so(t,w,n,n,n,e)});function Qu(n,t){return n===t||n!=n&&t!=t}var na=oo(Yr),ta=oo(function(n,t){return n>=t}),ea=Kr(function(){return arguments}())?Kr:function(n){return da(n)&&rt.call(n,"callee")&&!Dt.call(n,"callee")},ra=En.isArray,ia=Ot?ue(Ot):function(n){return da(n)&&Wr(n)==Q};function oa(n){return null!=n&&ha(n.length)&&!sa(n)}function ua(n){return da(n)&&oa(n)}var aa=Pe||Oc,ca=Tt?ue(Tt):function(n){return da(n)&&Wr(n)==L};function fa(n){if(!da(n))return!1;var t=Wr(n);return t==N||t==U||"string"==typeof n.message&&"string"==typeof n.name&&!va(n)}function sa(n){if(!pa(n))return!1;var t=Wr(n);return t==F||t==z||t==M||t==V}function la(n){return"number"==typeof n&&n==Ea(n)}function ha(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=R}function pa(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function da(n){return null!=n&&"object"==typeof n}var ma=It?ue(It):function(n){return da(n)&&Do(n)==W};function ga(n){return"number"==typeof n||da(n)&&Wr(n)==Y}function va(n){if(!da(n)||Wr(n)!=$)return!1;var t=kt(n);if(null===t)return!0;var e=rt.call(t,"constructor")&&t.constructor;return"function"==typeof e&&e instanceof e&&et.call(e)==at}var ya=jt?ue(jt):function(n){return da(n)&&Wr(n)==G},_a=Pt?ue(Pt):function(n){return da(n)&&Do(n)==K};function ba(n){return"string"==typeof n||!ra(n)&&da(n)&&Wr(n)==H}function wa(n){return"symbol"==typeof n||da(n)&&Wr(n)==Z}var xa=Ct?ue(Ct):function(n){return da(n)&&ha(n.length)&&!!gt[Wr(n)]},Aa=oo(ni),Sa=oo(function(n,t){return n<=t});function ka(n){if(!n)return[];if(oa(n))return ba(n)?be(n):Wi(n);if(Se&&n[Se])return function(n){for(var t,e=[];!(t=n.next()).done;)e.push(t.value);return e}(n[Se]());var t=Do(n);return(t==W?me:t==K?ye:Qa)(n)}function Ra(n){return n?(n=Oa(n))===k||n===-k?(n<0?-1:1)*E:n==n?n:0:0===n?n:0}function Ea(n){var t=Ra(n),e=t%1;return t==t?e?t-e:t:0}function Da(n){return n?Sr(Ea(n),0,O):0}function Oa(n){if("number"==typeof n)return n;if(wa(n))return D;if(pa(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=pa(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=oe(n);var e=Ln.test(n);return e||Nn.test(n)?bt(n.slice(2),e?2:8):Bn.test(n)?D:+n}function Ta(n){return Yi(n,$a(n))}function Ia(n){return null==n?"":xi(n)}var ja=$i(function(n,t){if(Lo(t)||oa(t))Yi(t,qa(t),n);else for(var e in t)rt.call(t,e)&&yr(n,e,t[e])}),Pa=$i(function(n,t){Yi(t,$a(t),n)}),Ca=$i(function(n,t,e,r){Yi(t,$a(t),n,r)}),Ma=$i(function(n,t,e,r){Yi(t,qa(t),n,r)}),Ba=go(Ar),La=hi(function(t,e){t=Kn(t);var r=-1,i=e.length,o=i>2?e[2]:n;for(o&&Po(e[0],e[1],o)&&(i=1);++r<i;)for(var u=e[r],a=$a(u),c=-1,f=a.length;++c<f;){var s=a[c],l=t[s];(l===n||Qu(l,nt[s])&&!rt.call(t,s))&&(t[s]=u[s])}return t}),Ua=hi(function(t){return t.push(n,ho),Mt(Ga,n,t)});function Na(t,e,r){var i=null==t?n:Fr(t,e);return i===n?r:i}function Fa(n,t){return null!=n&&Oo(n,t,$r)}var za=no(function(n,t,e){null!=t&&"function"!=typeof t.toString&&(t=ut.call(t)),n[t]=e},pc(gc)),Wa=no(function(n,t,e){null!=t&&"function"!=typeof t.toString&&(t=ut.call(t)),rt.call(n,t)?n[t].push(e):n[t]=[e]},xo),Ya=hi(Gr);function qa(n){return oa(n)?mr(n):Qr(n)}function $a(n){return oa(n)?mr(n,!0):function(n){if(!pa(n))return function(n){var t=[];if(null!=n)for(var e in Kn(n))t.push(e);return t}(n);var t=Lo(n),e=[];for(var r in n)("constructor"!=r||!t&&rt.call(n,r))&&e.push(r);return e}(n)}var Va=$i(function(n,t,e){ii(n,t,e)}),Ga=$i(function(n,t,e,r){ii(n,t,e,r)}),Ka=go(function(n,t){var e={};if(null==n)return e;var r=!1;t=Wt(t,function(t){return t=ji(t,n),r||(r=t.length>1),t}),Yi(n,yo(n),e),r&&(e=kr(e,c|f|s,po));for(var i=t.length;i--;)Si(e,t[i]);return e}),Ha=go(function(n,t){return null==n?{}:function(n,t){return ai(n,t,function(t,e){return Fa(n,e)})}(n,t)});function Za(n,t){if(null==n)return{};var e=Wt(yo(n),function(n){return[n]});return t=xo(t),ai(n,e,function(n,e){return t(n,e[0])})}var Ja=fo(qa),Xa=fo($a);function Qa(n){return null==n?[]:ae(n,qa(n))}var nc=Hi(function(n,t,e){return t=t.toLowerCase(),n+(e?tc(t):t)});function tc(n){return fc(Ia(n).toLowerCase())}function ec(n){return(n=Ia(n))&&n.replace(zn,le).replace(ft,"")}var rc=Hi(function(n,t,e){return n+(e?"-":"")+t.toLowerCase()}),ic=Hi(function(n,t,e){return n+(e?" ":"")+t.toLowerCase()}),oc=Ki("toLowerCase"),uc=Hi(function(n,t,e){return n+(e?"_":"")+t.toLowerCase()}),ac=Hi(function(n,t,e){return n+(e?" ":"")+fc(t)}),cc=Hi(function(n,t,e){return n+(e?" ":"")+t.toUpperCase()}),fc=Ki("toUpperCase");function sc(t,e,r){return t=Ia(t),(e=r?n:e)===n?function(n){return pt.test(n)}(t)?function(n){return n.match(lt)||[]}(t):function(n){return n.match(In)||[]}(t):t.match(e)||[]}var lc=hi(function(t,e){try{return Mt(t,n,e)}catch(i){return fa(i)?i:new $n(i)}}),hc=go(function(n,t){return Lt(t,function(t){t=Zo(t),xr(n,t,Wu(n[t],n))}),n});function pc(n){return function(){return n}}var dc=Xi(),mc=Xi(!0);function gc(n){return n}function vc(n){return Xr("function"==typeof n?n:kr(n,c))}var yc=hi(function(n,t){return function(e){return Gr(e,n,t)}}),_c=hi(function(n,t){return function(e){return Gr(n,e,t)}});function bc(n,t,e){var r=qa(t),i=Nr(t,r);null!=e||pa(t)&&(i.length||!r.length)||(e=t,t=n,n=this,i=Nr(t,qa(t)));var o=!(pa(e)&&"chain"in e&&!e.chain),u=sa(n);return Lt(i,function(e){var r=t[e];n[e]=r,u&&(n.prototype[e]=function(){var t=this.__chain__;if(o||t){var e=n(this.__wrapped__);return(e.__actions__=Wi(this.__actions__)).push({func:r,args:arguments,thisArg:n}),e.__chain__=t,e}return r.apply(n,Yt([this.value()],arguments))})}),n}function wc(){}var xc=eo(Wt),Ac=eo(Ut),Sc=eo(Vt);function kc(n){return Co(n)?ne(Zo(n)):function(n){return function(t){return Fr(t,n)}}(n)}var Rc=io(),Ec=io(!0);function Dc(){return[]}function Oc(){return!1}var Tc,Ic=to(function(n,t){return n+t},0),jc=ao("ceil"),Pc=to(function(n,t){return n/t},1),Cc=ao("floor"),Mc=to(function(n,t){return n*t},1),Bc=ao("round"),Lc=to(function(n,t){return n-t},0);return or.after=function(n,t){if("function"!=typeof t)throw new Jn(o);return n=Ea(n),function(){if(--n<1)return t.apply(this,arguments)}},or.ary=Fu,or.assign=ja,or.assignIn=Pa,or.assignInWith=Ca,or.assignWith=Ma,or.at=Ba,or.before=zu,or.bind=Wu,or.bindAll=hc,or.bindKey=Yu,or.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return ra(n)?n:[n]},or.chain=ku,or.chunk=function(t,e,r){e=(r?Po(t,e,r):e===n)?1:Le(Ea(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var o=0,u=0,a=En(Te(i/e));o<i;)a[u++]=gi(t,o,o+=e);return a},or.compact=function(n){for(var t=-1,e=null==n?0:n.length,r=0,i=[];++t<e;){var o=n[t];o&&(i[r++]=o)}return i},or.concat=function(){var n=arguments.length;if(!n)return[];for(var t=En(n-1),e=arguments[0],r=n;r--;)t[r-1]=arguments[r];return Yt(ra(e)?Wi(e):[e],Cr(t,1))},or.cond=function(n){var t=null==n?0:n.length,e=xo();return n=t?Wt(n,function(n){if("function"!=typeof n[1])throw new Jn(o);return[e(n[0]),n[1]]}):[],hi(function(e){for(var r=-1;++r<t;){var i=n[r];if(Mt(i[0],this,e))return Mt(i[1],this,e)}})},or.conforms=function(n){return function(n){var t=qa(n);return function(e){return Rr(e,n,t)}}(kr(n,c))},or.constant=pc,or.countBy=Du,or.create=function(n,t){var e=ur(n);return null==t?e:wr(e,t)},or.curry=function t(e,r,i){var o=so(e,g,n,n,n,n,n,r=i?n:r);return o.placeholder=t.placeholder,o},or.curryRight=function t(e,r,i){var o=so(e,v,n,n,n,n,n,r=i?n:r);return o.placeholder=t.placeholder,o},or.debounce=qu,or.defaults=La,or.defaultsDeep=Ua,or.defer=$u,or.delay=Vu,or.difference=Qo,or.differenceBy=nu,or.differenceWith=tu,or.drop=function(t,e,r){var i=null==t?0:t.length;return i?gi(t,(e=r||e===n?1:Ea(e))<0?0:e,i):[]},or.dropRight=function(t,e,r){var i=null==t?0:t.length;return i?gi(t,0,(e=i-(e=r||e===n?1:Ea(e)))<0?0:e):[]},or.dropRightWhile=function(n,t){return n&&n.length?Ri(n,xo(t,3),!0,!0):[]},or.dropWhile=function(n,t){return n&&n.length?Ri(n,xo(t,3),!0):[]},or.fill=function(t,e,r,i){var o=null==t?0:t.length;return o?(r&&"number"!=typeof r&&Po(t,e,r)&&(r=0,i=o),function(t,e,r,i){var o=t.length;for((r=Ea(r))<0&&(r=-r>o?0:o+r),(i=i===n||i>o?o:Ea(i))<0&&(i+=o),i=r>i?0:Da(i);r<i;)t[r++]=e;return t}(t,e,r,i)):[]},or.filter=function(n,t){return(ra(n)?Nt:Pr)(n,xo(t,3))},or.flatMap=function(n,t){return Cr(Bu(n,t),1)},or.flatMapDeep=function(n,t){return Cr(Bu(n,t),k)},or.flatMapDepth=function(t,e,r){return r=r===n?1:Ea(r),Cr(Bu(t,e),r)},or.flatten=iu,or.flattenDeep=function(n){return null!=n&&n.length?Cr(n,k):[]},or.flattenDepth=function(t,e){return null!=t&&t.length?Cr(t,e=e===n?1:Ea(e)):[]},or.flip=function(n){return so(n,x)},or.flow=dc,or.flowRight=mc,or.fromPairs=function(n){for(var t=-1,e=null==n?0:n.length,r={};++t<e;){var i=n[t];r[i[0]]=i[1]}return r},or.functions=function(n){return null==n?[]:Nr(n,qa(n))},or.functionsIn=function(n){return null==n?[]:Nr(n,$a(n))},or.groupBy=Pu,or.initial=function(n){return null!=n&&n.length?gi(n,0,-1):[]},or.intersection=uu,or.intersectionBy=au,or.intersectionWith=cu,or.invert=za,or.invertBy=Wa,or.invokeMap=Cu,or.iteratee=vc,or.keyBy=Mu,or.keys=qa,or.keysIn=$a,or.map=Bu,or.mapKeys=function(n,t){var e={};return t=xo(t,3),Lr(n,function(n,r,i){xr(e,t(n,r,i),n)}),e},or.mapValues=function(n,t){var e={};return t=xo(t,3),Lr(n,function(n,r,i){xr(e,r,t(n,r,i))}),e},or.matches=function(n){return ei(kr(n,c))},or.matchesProperty=function(n,t){return ri(n,kr(t,c))},or.memoize=Gu,or.merge=Va,or.mergeWith=Ga,or.method=yc,or.methodOf=_c,or.mixin=bc,or.negate=Ku,or.nthArg=function(n){return n=Ea(n),hi(function(t){return oi(t,n)})},or.omit=Ka,or.omitBy=function(n,t){return Za(n,Ku(xo(t)))},or.once=function(n){return zu(2,n)},or.orderBy=function(t,e,r,i){return null==t?[]:(ra(e)||(e=null==e?[]:[e]),ra(r=i?n:r)||(r=null==r?[]:[r]),ui(t,e,r))},or.over=xc,or.overArgs=Hu,or.overEvery=Ac,or.overSome=Sc,or.partial=Zu,or.partialRight=Ju,or.partition=Lu,or.pick=Ha,or.pickBy=Za,or.property=kc,or.propertyOf=function(t){return function(e){return null==t?n:Fr(t,e)}},or.pull=su,or.pullAll=lu,or.pullAllBy=function(n,t,e){return n&&n.length&&t&&t.length?ci(n,t,xo(e,2)):n},or.pullAllWith=function(t,e,r){return t&&t.length&&e&&e.length?ci(t,e,n,r):t},or.pullAt=hu,or.range=Rc,or.rangeRight=Ec,or.rearg=Xu,or.reject=function(n,t){return(ra(n)?Nt:Pr)(n,Ku(xo(t,3)))},or.remove=function(n,t){var e=[];if(!n||!n.length)return e;var r=-1,i=[],o=n.length;for(t=xo(t,3);++r<o;){var u=n[r];t(u,r,n)&&(e.push(u),i.push(r))}return fi(n,i),e},or.rest=function(t,e){if("function"!=typeof t)throw new Jn(o);return hi(t,e=e===n?e:Ea(e))},or.reverse=pu,or.sampleSize=function(t,e,r){return e=(r?Po(t,e,r):e===n)?1:Ea(e),(ra(t)?function(n,t){return Ko(Wi(n),Sr(t,0,n.length))}:function(n,t){var e=Qa(n);return Ko(e,Sr(t,0,e.length))})(t,e)},or.set=function(n,t,e){return null==n?n:pi(n,t,e)},or.setWith=function(t,e,r,i){return i="function"==typeof i?i:n,null==t?t:pi(t,e,r,i)},or.shuffle=function(n){return(ra(n)?function(n){return Ko(Wi(n))}:function(n){return Ko(Qa(n))})(n)},or.slice=function(t,e,r){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&Po(t,e,r)?(e=0,r=i):(e=null==e?0:Ea(e),r=r===n?i:Ea(r)),gi(t,e,r)):[]},or.sortBy=Uu,or.sortedUniq=function(n){return n&&n.length?bi(n):[]},or.sortedUniqBy=function(n,t){return n&&n.length?bi(n,xo(t,2)):[]},or.split=function(t,e,r){return r&&"number"!=typeof r&&Po(t,e,r)&&(e=r=n),(r=r===n?O:r>>>0)?(t=Ia(t))&&("string"==typeof e||null!=e&&!ya(e))&&!(e=xi(e))&&de(t)?Ci(be(t),0,r):t.split(e,r):[]},or.spread=function(n,t){if("function"!=typeof n)throw new Jn(o);return t=null==t?0:Le(Ea(t),0),hi(function(e){var r=e[t],i=Ci(e,0,t);return r&&Yt(i,r),Mt(n,this,i)})},or.tail=function(n){var t=null==n?0:n.length;return t?gi(n,1,t):[]},or.take=function(t,e,r){return t&&t.length?gi(t,0,(e=r||e===n?1:Ea(e))<0?0:e):[]},or.takeRight=function(t,e,r){var i=null==t?0:t.length;return i?gi(t,(e=i-(e=r||e===n?1:Ea(e)))<0?0:e,i):[]},or.takeRightWhile=function(n,t){return n&&n.length?Ri(n,xo(t,3),!1,!0):[]},or.takeWhile=function(n,t){return n&&n.length?Ri(n,xo(t,3)):[]},or.tap=function(n,t){return t(n),n},or.throttle=function(n,t,e){var r=!0,i=!0;if("function"!=typeof n)throw new Jn(o);return pa(e)&&(r="leading"in e?!!e.leading:r,i="trailing"in e?!!e.trailing:i),qu(n,t,{leading:r,maxWait:t,trailing:i})},or.thru=Ru,or.toArray=ka,or.toPairs=Ja,or.toPairsIn=Xa,or.toPath=function(n){return ra(n)?Wt(n,Zo):wa(n)?[n]:Wi(Ho(Ia(n)))},or.toPlainObject=Ta,or.transform=function(n,t,e){var r=ra(n),i=r||aa(n)||xa(n);if(t=xo(t,4),null==e){var o=n&&n.constructor;e=i?r?new o:[]:pa(n)&&sa(o)?ur(kt(n)):{}}return(i?Lt:Lr)(n,function(n,r,i){return t(e,n,r,i)}),e},or.unary=function(n){return Fu(n,1)},or.union=du,or.unionBy=mu,or.unionWith=gu,or.uniq=function(n){return n&&n.length?Ai(n):[]},or.uniqBy=function(n,t){return n&&n.length?Ai(n,xo(t,2)):[]},or.uniqWith=function(t,e){return e="function"==typeof e?e:n,t&&t.length?Ai(t,n,e):[]},or.unset=function(n,t){return null==n||Si(n,t)},or.unzip=vu,or.unzipWith=yu,or.update=function(n,t,e){return null==n?n:ki(n,t,Ii(e))},or.updateWith=function(t,e,r,i){return i="function"==typeof i?i:n,null==t?t:ki(t,e,Ii(r),i)},or.values=Qa,or.valuesIn=function(n){return null==n?[]:ae(n,$a(n))},or.without=_u,or.words=sc,or.wrap=function(n,t){return Zu(Ii(t),n)},or.xor=bu,or.xorBy=wu,or.xorWith=xu,or.zip=Au,or.zipObject=function(n,t){return Oi(n||[],t||[],yr)},or.zipObjectDeep=function(n,t){return Oi(n||[],t||[],pi)},or.zipWith=Su,or.entries=Ja,or.entriesIn=Xa,or.extend=Pa,or.extendWith=Ca,bc(or,or),or.add=Ic,or.attempt=lc,or.camelCase=nc,or.capitalize=tc,or.ceil=jc,or.clamp=function(t,e,r){return r===n&&(r=e,e=n),r!==n&&(r=(r=Oa(r))==r?r:0),e!==n&&(e=(e=Oa(e))==e?e:0),Sr(Oa(t),e,r)},or.clone=function(n){return kr(n,s)},or.cloneDeep=function(n){return kr(n,c|s)},or.cloneDeepWith=function(t,e){return kr(t,c|s,e="function"==typeof e?e:n)},or.cloneWith=function(t,e){return kr(t,s,e="function"==typeof e?e:n)},or.conformsTo=function(n,t){return null==t||Rr(n,t,qa(t))},or.deburr=ec,or.defaultTo=function(n,t){return null==n||n!=n?t:n},or.divide=Pc,or.endsWith=function(t,e,r){t=Ia(t),e=xi(e);var i=t.length,o=r=r===n?i:Sr(Ea(r),0,i);return(r-=e.length)>=0&&t.slice(r,o)==e},or.eq=Qu,or.escape=function(n){return(n=Ia(n))&&vn.test(n)?n.replace(mn,he):n},or.escapeRegExp=function(n){return(n=Ia(n))&&kn.test(n)?n.replace(Sn,"\\$&"):n},or.every=function(t,e,r){var i=ra(t)?Ut:Ir;return r&&Po(t,e,r)&&(e=n),i(t,xo(e,3))},or.find=Ou,or.findIndex=eu,or.findKey=function(n,t){return Kt(n,xo(t,3),Lr)},or.findLast=Tu,or.findLastIndex=ru,or.findLastKey=function(n,t){return Kt(n,xo(t,3),Ur)},or.floor=Cc,or.forEach=Iu,or.forEachRight=ju,or.forIn=function(n,t){return null==n?n:Mr(n,xo(t,3),$a)},or.forInRight=function(n,t){return null==n?n:Br(n,xo(t,3),$a)},or.forOwn=function(n,t){return n&&Lr(n,xo(t,3))},or.forOwnRight=function(n,t){return n&&Ur(n,xo(t,3))},or.get=Na,or.gt=na,or.gte=ta,or.has=function(n,t){return null!=n&&Oo(n,t,qr)},or.hasIn=Fa,or.head=ou,or.identity=gc,or.includes=function(n,t,e,r){n=oa(n)?n:Qa(n),e=e&&!r?Ea(e):0;var i=n.length;return e<0&&(e=Le(i+e,0)),ba(n)?e<=i&&n.indexOf(t,e)>-1:!!i&&Zt(n,t,e)>-1},or.indexOf=function(n,t,e){var r=null==n?0:n.length;if(!r)return-1;var i=null==e?0:Ea(e);return i<0&&(i=Le(r+i,0)),Zt(n,t,i)},or.inRange=function(t,e,r){return e=Ra(e),r===n?(r=e,e=0):r=Ra(r),function(n,t,e){return n>=Ue(t,e)&&n<Le(t,e)}(t=Oa(t),e,r)},or.invoke=Ya,or.isArguments=ea,or.isArray=ra,or.isArrayBuffer=ia,or.isArrayLike=oa,or.isArrayLikeObject=ua,or.isBoolean=function(n){return!0===n||!1===n||da(n)&&Wr(n)==B},or.isBuffer=aa,or.isDate=ca,or.isElement=function(n){return da(n)&&1===n.nodeType&&!va(n)},or.isEmpty=function(n){if(null==n)return!0;if(oa(n)&&(ra(n)||"string"==typeof n||"function"==typeof n.splice||aa(n)||xa(n)||ea(n)))return!n.length;var t=Do(n);if(t==W||t==K)return!n.size;if(Lo(n))return!Qr(n).length;for(var e in n)if(rt.call(n,e))return!1;return!0},or.isEqual=function(n,t){return Hr(n,t)},or.isEqualWith=function(t,e,r){var i=(r="function"==typeof r?r:n)?r(t,e):n;return i===n?Hr(t,e,n,r):!!i},or.isError=fa,or.isFinite=function(n){return"number"==typeof n&&Ce(n)},or.isFunction=sa,or.isInteger=la,or.isLength=ha,or.isMap=ma,or.isMatch=function(n,t){return n===t||Zr(n,t,So(t))},or.isMatchWith=function(t,e,r){return r="function"==typeof r?r:n,Zr(t,e,So(e),r)},or.isNaN=function(n){return ga(n)&&n!=+n},or.isNative=function(n){if(Bo(n))throw new $n("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Jr(n)},or.isNil=function(n){return null==n},or.isNull=function(n){return null===n},or.isNumber=ga,or.isObject=pa,or.isObjectLike=da,or.isPlainObject=va,or.isRegExp=ya,or.isSafeInteger=function(n){return la(n)&&n>=-R&&n<=R},or.isSet=_a,or.isString=ba,or.isSymbol=wa,or.isTypedArray=xa,or.isUndefined=function(t){return t===n},or.isWeakMap=function(n){return da(n)&&Do(n)==X},or.isWeakSet=function(n){return da(n)&&"[object WeakSet]"==Wr(n)},or.join=function(n,t){return null==n?"":Me.call(n,t)},or.kebabCase=rc,or.last=fu,or.lastIndexOf=function(t,e,r){var i=null==t?0:t.length;if(!i)return-1;var o=i;return r!==n&&(o=(o=Ea(r))<0?Le(i+o,0):Ue(o,i-1)),e==e?function(n,t,e){for(var r=o+1;r--;)if(n[r]===t)return r;return r}(t,e):Ht(t,Xt,o,!0)},or.lowerCase=ic,or.lowerFirst=oc,or.lt=Aa,or.lte=Sa,or.max=function(t){return t&&t.length?jr(t,gc,Yr):n},or.maxBy=function(t,e){return t&&t.length?jr(t,xo(e,2),Yr):n},or.mean=function(n){return Qt(n,gc)},or.meanBy=function(n,t){return Qt(n,xo(t,2))},or.min=function(t){return t&&t.length?jr(t,gc,ni):n},or.minBy=function(t,e){return t&&t.length?jr(t,xo(e,2),ni):n},or.stubArray=Dc,or.stubFalse=Oc,or.stubObject=function(){return{}},or.stubString=function(){return""},or.stubTrue=function(){return!0},or.multiply=Mc,or.nth=function(t,e){return t&&t.length?oi(t,Ea(e)):n},or.noConflict=function(){return At._===this&&(At._=st),this},or.noop=wc,or.now=Nu,or.pad=function(n,t,e){n=Ia(n);var r=(t=Ea(t))?_e(n):0;if(!t||r>=t)return n;var i=(t-r)/2;return ro(Ie(i),e)+n+ro(Te(i),e)},or.padEnd=function(n,t,e){n=Ia(n);var r=(t=Ea(t))?_e(n):0;return t&&r<t?n+ro(t-r,e):n},or.padStart=function(n,t,e){n=Ia(n);var r=(t=Ea(t))?_e(n):0;return t&&r<t?ro(t-r,e)+n:n},or.parseInt=function(n,t,e){return e||null==t?t=0:t&&(t=+t),Fe(Ia(n).replace(Rn,""),t||0)},or.random=function(t,e,r){if(r&&"boolean"!=typeof r&&Po(t,e,r)&&(e=r=n),r===n&&("boolean"==typeof e?(r=e,e=n):"boolean"==typeof t&&(r=t,t=n)),t===n&&e===n?(t=0,e=1):(t=Ra(t),e===n?(e=t,t=0):e=Ra(e)),t>e){var i=t;t=e,e=i}if(r||t%1||e%1){var o=ze();return Ue(t+o*(e-t+_t("1e-"+((o+"").length-1))),e)}return si(t,e)},or.reduce=function(n,t,e){var r=ra(n)?qt:ee,i=arguments.length<3;return r(n,xo(t,4),e,i,Or)},or.reduceRight=function(n,t,e){var r=ra(n)?$t:ee,i=arguments.length<3;return r(n,xo(t,4),e,i,Tr)},or.repeat=function(t,e,r){return e=(r?Po(t,e,r):e===n)?1:Ea(e),li(Ia(t),e)},or.replace=function(){var n=arguments,t=Ia(n[0]);return n.length<3?t:t.replace(n[1],n[2])},or.result=function(t,e,r){var i=-1,o=(e=ji(e,t)).length;for(o||(o=1,t=n);++i<o;){var u=null==t?n:t[Zo(e[i])];u===n&&(i=o,u=r),t=sa(u)?u.call(t):u}return t},or.round=Bc,or.runInContext=t,or.sample=function(n){return(ra(n)?gr:function(n){return gr(Qa(n))})(n)},or.size=function(n){if(null==n)return 0;if(oa(n))return ba(n)?_e(n):n.length;var t=Do(n);return t==W||t==K?n.size:Qr(n).length},or.snakeCase=uc,or.some=function(t,e,r){var i=ra(t)?Vt:vi;return r&&Po(t,e,r)&&(e=n),i(t,xo(e,3))},or.sortedIndex=function(n,t){return yi(n,t)},or.sortedIndexBy=function(n,t,e){return _i(n,t,xo(e,2))},or.sortedIndexOf=function(n,t){var e=null==n?0:n.length;if(e){var r=yi(n,t);if(r<e&&Qu(n[r],t))return r}return-1},or.sortedLastIndex=function(n,t){return yi(n,t,!0)},or.sortedLastIndexBy=function(n,t,e){return _i(n,t,xo(e,2),!0)},or.sortedLastIndexOf=function(n,t){if(null!=n&&n.length){var e=yi(n,t,!0)-1;if(Qu(n[e],t))return e}return-1},or.startCase=ac,or.startsWith=function(n,t,e){return n=Ia(n),e=null==e?0:Sr(Ea(e),0,n.length),t=xi(t),n.slice(e,e+t.length)==t},or.subtract=Lc,or.sum=function(n){return n&&n.length?re(n,gc):0},or.sumBy=function(n,t){return n&&n.length?re(n,xo(t,2)):0},or.template=function(t,e,r){var i=or.templateSettings;r&&Po(t,e,r)&&(e=n),t=Ia(t),e=Ca({},e,i,lo);var o,u,a=Ca({},e.imports,i.imports,lo),c=qa(a),f=ae(a,c),s=0,l=e.interpolate||Wn,h="__p += '",p=Hn((e.escape||Wn).source+"|"+l.source+"|"+(l===bn?Cn:Wn).source+"|"+(e.evaluate||Wn).source+"|$","g"),d="//# sourceURL="+(rt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++mt+"]")+"\n";t.replace(p,function(n,e,r,i,a,c){return r||(r=i),h+=t.slice(s,c).replace(Yn,pe),e&&(o=!0,h+="' +\n__e("+e+") +\n'"),a&&(u=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),s=c+n.length,n}),h+="';\n";var m=rt.call(e,"variable")&&e.variable;if(m){if(jn.test(m))throw new $n("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(u?h.replace(ln,""):h).replace(hn,"$1").replace(pn,"$1;"),h="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(u?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var g=lc(function(){return Vn(c,d+"return "+h).apply(n,f)});if(g.source=h,fa(g))throw g;return g},or.times=function(n,t){if((n=Ea(n))<1||n>R)return[];var e=O,r=Ue(n,O);t=xo(t),n-=O;for(var i=ie(r,t);++e<n;)t(e);return i},or.toFinite=Ra,or.toInteger=Ea,or.toLength=Da,or.toLower=function(n){return Ia(n).toLowerCase()},or.toNumber=Oa,or.toSafeInteger=function(n){return n?Sr(Ea(n),-R,R):0===n?n:0},or.toString=Ia,or.toUpper=function(n){return Ia(n).toUpperCase()},or.trim=function(t,e,r){if((t=Ia(t))&&(r||e===n))return oe(t);if(!t||!(e=xi(e)))return t;var i=be(t),o=be(e);return Ci(i,fe(i,o),se(i,o)+1).join("")},or.trimEnd=function(t,e,r){if((t=Ia(t))&&(r||e===n))return t.slice(0,we(t)+1);if(!t||!(e=xi(e)))return t;var i=be(t);return Ci(i,0,se(i,be(e))+1).join("")},or.trimStart=function(t,e,r){if((t=Ia(t))&&(r||e===n))return t.replace(Rn,"");if(!t||!(e=xi(e)))return t;var i=be(t);return Ci(i,fe(i,be(e))).join("")},or.truncate=function(t,e){var r=30,i="...";if(pa(e)){var o="separator"in e?e.separator:o;r="length"in e?Ea(e.length):r,i="omission"in e?xi(e.omission):i}var u=(t=Ia(t)).length;if(de(t)){var a=be(t);u=a.length}if(r>=u)return t;var c=r-_e(i);if(c<1)return i;var f=a?Ci(a,0,c).join(""):t.slice(0,c);if(o===n)return f+i;if(a&&(c+=f.length-c),ya(o)){if(t.slice(c).search(o)){var s,l=f;for(o.global||(o=Hn(o.source,Ia(Mn.exec(o))+"g")),o.lastIndex=0;s=o.exec(l);)var h=s.index;f=f.slice(0,h===n?c:h)}}else if(t.indexOf(xi(o),c)!=c){var p=f.lastIndexOf(o);p>-1&&(f=f.slice(0,p))}return f+i},or.unescape=function(n){return(n=Ia(n))&&gn.test(n)?n.replace(dn,xe):n},or.uniqueId=function(n){var t=++it;return Ia(n)+t},or.upperCase=cc,or.upperFirst=fc,or.each=Iu,or.eachRight=ju,or.first=ou,bc(or,(Tc={},Lr(or,function(n,t){rt.call(or.prototype,t)||(Tc[t]=n)}),Tc),{chain:!1}),or.VERSION="4.17.21",Lt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){or[n].placeholder=or}),Lt(["drop","take"],function(t,e){fr.prototype[t]=function(r){r=r===n?1:Le(Ea(r),0);var i=this.__filtered__&&!e?new fr(this):this.clone();return i.__filtered__?i.__takeCount__=Ue(r,i.__takeCount__):i.__views__.push({size:Ue(r,O),type:t+(i.__dir__<0?"Right":"")}),i},fr.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),Lt(["filter","map","takeWhile"],function(n,t){var e=t+1,r=1==e||3==e;fr.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:xo(n,3),type:e}),t.__filtered__=t.__filtered__||r,t}}),Lt(["head","last"],function(n,t){var e="take"+(t?"Right":"");fr.prototype[n]=function(){return this[e](1).value()[0]}}),Lt(["initial","tail"],function(n,t){var e="drop"+(t?"":"Right");fr.prototype[n]=function(){return this.__filtered__?new fr(this):this[e](1)}}),fr.prototype.compact=function(){return this.filter(gc)},fr.prototype.find=function(n){return this.filter(n).head()},fr.prototype.findLast=function(n){return this.reverse().find(n)},fr.prototype.invokeMap=hi(function(n,t){return"function"==typeof n?new fr(this):this.map(function(e){return Gr(e,n,t)})}),fr.prototype.reject=function(n){return this.filter(Ku(xo(n)))},fr.prototype.slice=function(t,e){t=Ea(t);var r=this;return r.__filtered__&&(t>0||e<0)?new fr(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==n&&(r=(e=Ea(e))<0?r.dropRight(-e):r.take(e-t)),r)},fr.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},fr.prototype.toArray=function(){return this.take(O)},Lr(fr.prototype,function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),o=or[i?"take"+("last"==e?"Right":""):e],u=i||/^find/.test(e);o&&(or.prototype[e]=function(){var e=this.__wrapped__,a=i?[1]:arguments,c=e instanceof fr,f=a[0],s=c||ra(e),l=function(n){var t=o.apply(or,Yt([n],a));return i&&h?t[0]:t};s&&r&&"function"==typeof f&&1!=f.length&&(c=s=!1);var h=this.__chain__,p=!!this.__actions__.length,d=u&&!h,m=c&&!p;if(!u&&s){e=m?e:new fr(this);var g=t.apply(e,a);return g.__actions__.push({func:Ru,args:[l],thisArg:n}),new cr(g,h)}return d&&m?t.apply(this,a):(g=this.thru(l),d?i?g.value()[0]:g.value():g)})}),Lt(["pop","push","shift","sort","splice","unshift"],function(n){var t=Xn[n],e=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);or.prototype[n]=function(){var n=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(ra(i)?i:[],n)}return this[e](function(e){return t.apply(ra(e)?e:[],n)})}}),Lr(fr.prototype,function(n,t){var e=or[t];if(e){var r=e.name+"";rt.call(Ze,r)||(Ze[r]=[]),Ze[r].push({name:t,func:e})}}),Ze[Qi(n,d).name]=[{name:"wrapper",func:n}],fr.prototype.clone=function(){var n=new fr(this.__wrapped__);return n.__actions__=Wi(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Wi(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Wi(this.__views__),n},fr.prototype.reverse=function(){if(this.__filtered__){var n=new fr(this);n.__dir__=-1,n.__filtered__=!0}else(n=this.clone()).__dir__*=-1;return n},fr.prototype.value=function(){var n=this.__wrapped__.value(),t=this.__dir__,e=ra(n),r=t<0,i=e?n.length:0,o=function(n,t,e){for(var r=-1,i=e.length;++r<i;){var o=e[r],u=o.size;switch(o.type){case"drop":n+=u;break;case"dropRight":t-=u;break;case"take":t=Ue(t,n+u);break;case"takeRight":n=Le(n,t-u)}}return{start:n,end:t}}(0,i,this.__views__),u=o.start,a=o.end,c=a-u,f=r?a:u-1,s=this.__iteratees__,l=s.length,h=0,p=Ue(c,this.__takeCount__);if(!e||!r&&i==c&&p==c)return Ei(n,this.__actions__);var d=[];n:for(;c--&&h<p;){for(var m=-1,g=n[f+=t];++m<l;){var v=s[m],y=v.iteratee,_=v.type,b=y(g);if(2==_)g=b;else if(!b){if(1==_)continue n;break n}}d[h++]=g}return d},or.prototype.at=Eu,or.prototype.chain=function(){return ku(this)},or.prototype.commit=function(){return new cr(this.value(),this.__chain__)},or.prototype.next=function(){this.__values__===n&&(this.__values__=ka(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?n:this.__values__[this.__index__++]}},or.prototype.plant=function(t){for(var e,r=this;r instanceof ar;){var i=Xo(r);i.__index__=0,i.__values__=n,e?o.__wrapped__=i:e=i;var o=i;r=r.__wrapped__}return o.__wrapped__=t,e},or.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof fr){var e=t;return this.__actions__.length&&(e=new fr(this)),(e=e.reverse()).__actions__.push({func:Ru,args:[pu],thisArg:n}),new cr(e,this.__chain__)}return this.thru(pu)},or.prototype.toJSON=or.prototype.valueOf=or.prototype.value=function(){return Ei(this.__wrapped__,this.__actions__)},or.prototype.first=or.prototype.head,Se&&(or.prototype[Se]=function(){return this}),or}();kt?((kt.exports=Ae)._=Ae,St._=Ae):At._=Ae}).call(this)},{buffer:"dskh"}],I6jy:[function(n,t,e){"use strict";function r(n){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function i(){i=function(n,t){return new e(n,void 0,t)};var n=RegExp.prototype,t=new WeakMap;function e(n,r,i){var u=new RegExp(n,r);return t.set(u,i||t.get(n)),o(u,e.prototype)}function u(n,e){var r=t.get(e);return Object.keys(r).reduce(function(t,e){return t[e]=n[r[e]],t},Object.create(null))}return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&o(n,t)}(e,RegExp),e.prototype.exec=function(t){var e=n.exec.call(this,t);return e&&(e.groups=u(e,this)),e},e.prototype[Symbol.replace]=function(e,i){if("string"==typeof i){var o=t.get(this);return n[Symbol.replace].call(this,e,i.replace(/\$<([^>]+)>/g,function(n,t){return"$"+o[t]}))}if("function"==typeof i){var a=this;return n[Symbol.replace].call(this,e,function(){var n=arguments;return"object"!==r(n[n.length-1])&&(n=[].slice.call(n)).push(u(n,a)),i.apply(this,n)})}return n[Symbol.replace].call(this,e,i)},i.apply(this,arguments)}function o(n,t){return(o=Object.setPrototypeOf||function(n,t){return n.__proto__=t,n})(n,t)}function u(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e<t;e++)r[e]=n[e];return r}var a=this&&this.__createBinding||(Object.create?function(n,t,e,r){void 0===r&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}:function(n,t,e,r){void 0===r&&(r=e),n[r]=t[e]}),c=this&&this.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),f=this&&this.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&a(t,n,e);return c(t,n),t},s=this&&this.__awaiter||function(n,t,e,r){return new(e||(e=Promise))(function(i,o){function u(n){try{c(r.next(n))}catch(t){o(t)}}function a(n){try{c(r.throw(n))}catch(t){o(t)}}function c(n){var t;n.done?i(n.value):(t=n.value,t instanceof e?t:new e(function(n){n(t)})).then(u,a)}c((r=r.apply(n,t||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.getExpressionLine=e.getFileExtension=e.SupportedFileExtensions=e.AllMetaCommands=e.AllKeywords=e.Keywords=e.MetaCommands=e.SupportedUsingFileExtensions=void 0;var l=n("./WerckmeisterAutoHintDb"),h=f(n("lodash"));e.SupportedUsingFileExtensions=[".lua",".template",".chords",".pitchmap",".config",".conductions"],e.MetaCommands=h.fromPairs(h.map(l.getAutoHintDb(),function(n,t){return[t,t]})),e.Keywords=Object.assign({using:"using"},e.MetaCommands),e.AllKeywords=h.values(e.Keywords),e.AllMetaCommands=h.values(e.MetaCommands);var p=["(".concat(e.AllMetaCommands.join("|"),")\\s*:\\s*[^/;]*$"),"".concat(e.Keywords.using,"[^;]*$")],d=new RegExp(".*?(".concat(p.join("|"),")"),"s");e.SupportedFileExtensions=[].concat(function(n){return function(n){if(Array.isArray(n))return u(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||function(n,t){if(n){if("string"==typeof n)return u(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?u(n,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.SupportedUsingFileExtensions),[".sheet"]),e.getFileExtension=function(n){if(n)return(n.match(/^.*(\.\w+)$/)||[])[1]},e.getExpressionLine=function(n,t){var e;return s(this,void 0,void 0,regeneratorRuntime.mark(function r(){var o,u,a,c,f,s,l,h;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:o=t.line;case 1:if(!(o>=0)){r.next=13;break}return u={line:o,col:0},r.next=5,n.getRange(u,t);case 5:if(a=r.sent,!(c=d.exec(a))){r.next=10;break}return f=c[1],r.abrupt("return",f.replace(/\n/g," "));case 10:--o,r.next=1;break;case 13:return r.next=15,n.getRange({line:t.line,col:0},t);case 15:if(s=r.sent,l=(null===(e=s.match(i(/(.*\/([0-9A-Z_a-z]+$))|(^([A-Za-z]+)$)/,{a:2,b:4})))||void 0===e?void 0:e.groups)||{},!(h=l.a||l.b)){r.next=20;break}return r.abrupt("return",h);case 20:return r.abrupt("return","");case 21:case"end":return r.stop()}},r)}))}},{"./WerckmeisterAutoHintDb":"Y3F9",lodash:"B1iE"}],zyF4:[function(n,t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GMInstruments=void 0,e.GMInstruments=["Acoustic Grand Piano","Bright Acoustic Piano","Electric Grand Piano","Honky-tonk Piano","Electric Piano 1","Electric Piano 2","Harpsichord","Clavi","Celesta","Glockenspiel","Music Box","Vibraphone","Marimba","Xylophone","Tubular Bells","Dulcimer","Drawbar Organ","Percussive Organ","Rock Organ","Church Organ","Reed Organ","Accordion","Harmonica","Tango Accordion","Acoustic Guitar Nylon","Acoustic Guitar Steel","Electric Guitar Jazz","Electric Guitar Clean","Electric Guitar Muted","Overdriven Guitar","Distortion Guitar","Guitar harmonics","Acoustic Bass","Electric Bass Finger","Electric Bass Pick","Fretless Bass","Slap Bass 1","Slap Bass 2","Synth Bass 1","Synth Bass 2","Violin","Viola","Cello","Contrabass","Tremolo Strings","Pizzicato Strings","Orchestral Harp","Timpani","String Ensemble 1","String Ensemble 2","SynthStrings 1","SynthStrings 2","Choir Aahs","Voice Oohs","Synth Voice","Orchestra Hit","Trumpet","Trombone","Tuba","Muted Trumpet","French Horn","Brass Section","SynthBrass 1","SynthBrass 2","Soprano Sax","Alto Sax","Tenor Sax","Baritone Sax","Oboe","English Horn","Bassoon","Clarinet","Piccolo","Flute","Recorder","Pan Flute","Blown Bottle","Shakuhachi","Whistle","Ocarina","Lead 1 Square","Lead 2 Sawtooth","Lead 3 Calliope","Lead 4 Chiff","Lead 5 Charang","Lead 6 Voice","Lead 7 Fifths","Lead 8 Bass+Lead","Pad 1 New Age","Pad 2 Warm","Pad 3 Polysynth","Pad 4 Choir","Pad 5 Bowed","Pad 6 Metallic","Pad 7 Halo","Pad 8 Sweep","FX 1 Rain","FX 2 Soundtrack","FX 3 Crystal","FX 4 Atmosphere","FX 5 Brightness","FX 6 Goblins","FX 7 Echoes","FX 8 Sci-Fi","Sitar","Banjo","Shamisen","Koto","Kalimba","Bag pipe","Fiddle","Shanai","Tinkle Bell","Agogo","Steel Drums","Woodblock","Taiko Drum","Melodic Tom","Synth Drum","Reverse Cymbal","Guitar Fret Noise","Breath Noise","Seashore","Bird Tweet","Telephone Ring","Helicopter","Applause","Gunshot"]},{}],ykR4:[function(n,t,e){"use strict";function r(n,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}function i(n,t,e){return t&&r(n.prototype,t),e&&r(n,e),n}var o=this&&this.__awaiter||function(n,t,e,r){return new(e||(e=Promise))(function(i,o){function u(n){try{c(r.next(n))}catch(t){o(t)}}function a(n){try{c(r.throw(n))}catch(t){o(t)}}function c(n){var t;n.done?i(n.value):(t=n.value,t instanceof e?t:new e(function(n){n(t)})).then(u,a)}c((r=r.apply(n,t||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.CommandArgument=void 0;var u=n("../../Common"),a=n("./GMInstruments"),c=n("../../WerckmeisterAutoHintDb"),f=[u.Keywords.mod,u.Keywords.voicingStrategy,u.Keywords.do,u.Keywords.doOnce],s=[u.Keywords.volume,u.Keywords.pan],l=[].concat(s,f),h=function(){function n(){(function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")})(this,n),this.autoHintDb=c.getAutoHintDb()}return i(n,[{key:"getModName",value:function(n){n=n||"";var t=l.join("|"),e=new RegExp("\\s*(".concat(u.Keywords.modOnce,"|").concat(t,')\\s*:.*_use="?([a-zA-Z0-9]+)"?')).exec(n);return e||(e=new RegExp("\\s*(".concat(u.Keywords.modOnce,"|").concat(t,")\\s*:\\s*([a-zA-Z0-9]+)")).exec(n)),!e||e.length<2?"":e[2]}},{key:"getInstrumentConfModName",value:function(n){n=n||"";var t=l.join("|"),e=(new RegExp(".*(".concat(t,").*")).exec(n)||[])[1];if(e&&s.includes(e))return e;t=l.map(function(n){return"".concat(n,".*")}).join("|");var r=(new RegExp(".*(".concat(t,")")).exec(n)||[])[1];if(r){var i=r.match(/\s*_use="?([a-zA-Z0-9]+)"?/);return i&&i.length>1?i[1]:(t=l.join("|"),!(i=new RegExp("\\s*(".concat(t,")\\s*([a-zA-Z0-9]+)")).exec(r))||i.length<2?"":i[2])}}},{key:"isMod",value:function(n){return n===u.Keywords.mod||n===u.Keywords.modOnce||n===u.Keywords.voicingStrategy}},{key:"isInstrumentConf",value:function(n){return n===u.Keywords.instrumentConf}},{key:"getParameterSuggestion",value:function(n,t){var e=n.getParameter();return t&&(e=e.filter(function(n){return n.getName().startsWith(t)})),e.sort(function(n,t){return n.getName().localeCompare(t.getName())}).map(function(t){return{displayText:t.getName(),text:"_".concat(t.getName()),deprecated:t.getDeprecatedText(),command:n}})}},{key:"getInstrumentDefPcSuggestions",value:function(n,t,e){var r=a.GMInstruments.map(function(e,r){return{displayText:"".concat(e," (").concat(r,")"),text:r.toString(),command:n,parameter:t}});return e&&(r=r.filter(function(n){return n.displayText.toLowerCase().indexOf(e.toLowerCase())>=0})),r}},{key:"getValueSuggestion",value:function(n,t,e){var r=n.getParameter().filter(function(n){return n.getName()===t})[0];if(!r)return[];if(n.getName()===u.Keywords.instrumentDef&&"pc"==t)return this.getInstrumentDefPcSuggestions(n,r,e);var i=(r.getType()||"").match(/\[(.*)\]/);if(!i||!i[1])return[];var o=i[1].split(",").map(function(n){return n.trim()});return e&&(o=o.filter(function(n){return n.startsWith(e)})),o.map(function(t){return{displayText:t,text:'"'.concat(t,'"'),command:n,parameter:r}})}},{key:"getSuggestions",value:function(n,t){return o(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e,r,i,o,u,a,c;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n){t.next=2;break}return t.abrupt("return",[]);case 2:if(e=n.match(/.*?(\w+)\s*:.*?_(\w*)(="?(\w*))?$/)){t.next=5;break}return t.abrupt("return",[]);case 5:if(r=(e[1]||"").trim(),i=void 0!==e[3],o=(e[2]||"").trim(),this.isMod(r)&&(r=this.getModName(n)),this.isInstrumentConf(r)&&(r=this.getInstrumentConfModName(n)),u=this.autoHintDb[r]){t.next=13;break}return t.abrupt("return",[]);case 13:if(!i){t.next=17;break}return a=(e[2]||"").trim(),c=(e[4]||"").trim(),t.abrupt("return",this.getValueSuggestion(u,a,c));case 17:return t.abrupt("return",this.getParameterSuggestion(u,o));case 18:case"end":return t.stop()}},t,this)}))}}]),n}();e.CommandArgument=h},{"../../Common":"I6jy","./GMInstruments":"zyF4","../../WerckmeisterAutoHintDb":"Y3F9"}],nviV:[function(n,t,e){"use strict";function r(n,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}function i(n,t,e){return t&&r(n.prototype,t),e&&r(n,e),n}var o=this&&this.__awaiter||function(n,t,e,r){return new(e||(e=Promise))(function(i,o){function u(n){try{c(r.next(n))}catch(t){o(t)}}function a(n){try{c(r.throw(n))}catch(t){o(t)}}function c(n){var t;n.done?i(n.value):(t=n.value,t instanceof e?t:new e(function(n){n(t)})).then(u,a)}c((r=r.apply(n,t||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.Command=void 0;var u=n("lodash"),a=n("../../WerckmeisterAutoHintDb"),c=function(){function n(){(function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")})(this,n),this.commandDb=a.getAutoHintDb()}return i(n,[{key:"getSuggestions",value:function(n,t){return o(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.toLowerCase(),r=u(this.commandDb).filter(function(n,t){return t.toLowerCase().indexOf(e)>=0}).value(),t.abrupt("return",r.map(function(n){return{displayText:n.getName(),text:n.getName(),description:n.getDescription()}}));case 3:case"end":return t.stop()}},t,this)}))}}]),n}();e.Command=c},{lodash:"B1iE","../../WerckmeisterAutoHintDb":"Y3F9"}],Tlxz:[function(n,t,e){"use strict";function r(n,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}function i(n,t,e){return t&&r(n.prototype,t),e&&r(n,e),n}var o=this&&this.__createBinding||(Object.create?function(n,t,e,r){void 0===r&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}:function(n,t,e,r){void 0===r&&(r=e),n[r]=t[e]}),u=this&&this.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),a=this&&this.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&o(t,n,e);return u(t,n),t},c=this&&this.__awaiter||function(n,t,e,r){return new(e||(e=Promise))(function(i,o){function u(n){try{c(r.next(n))}catch(t){o(t)}}function a(n){try{c(r.throw(n))}catch(t){o(t)}}function c(n){var t;n.done?i(n.value):(t=n.value,t instanceof e?t:new e(function(n){n(t)})).then(u,a)}c((r=r.apply(n,t||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.Using=void 0;var f=n("../../Common"),s=a(n("lodash")),l=function(){function n(t){(function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")})(this,n),this.fileInspector=t}return i(n,[{key:"getSuggestions",value:function(n,t){return c(this,void 0,void 0,regeneratorRuntime.mark(function e(){var r,i,o,u,a,c;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return",[]);case 2:if(n.match(/^\s*using\s*"{0,1}[^"]*$/)){e.next=5;break}return e.abrupt("return",[]);case 5:if(r=(n.match(/.+"(.*)/)||[])[1]){e.next=8;break}return e.abrupt("return",[]);case 8:return i=r?s.last(r.split("/")):"",e.next=11,t.getAbsolutePath();case 11:return o=e.sent,e.next=14,this.fileInspector.getParentPath(o);case 14:if(o=e.sent,u=r,!i){e.next=20;break}return e.next=19,this.fileInspector.getParentPath(r);case 19:u=e.sent;case 20:return e.next=22,this.fileInspector.resolve(o,u);case 22:return u=e.sent,e.next=25,this.fileInspector.ls(u);case 25:return a=e.sent,c=a.filter(function(n){return n.isDirectory||f.SupportedUsingFileExtensions.includes(f.getFileExtension(n.name))}),i&&(c=c.filter(function(n){return n.name.startsWith(i)})),e.abrupt("return",c.sort(function(n,t){return n.isDirectory&&!t.isDirectory?-1:!n.isDirectory&&t.isDirectory?1:n.name.localeCompare(t.name)}).map(function(n){return{displayText:n.name,text:n.name,file:n}}));case 29:case"end":return e.stop()}},e,this)}))}}]),n}();e.Using=l},{"../../Common":"I6jy",lodash:"B1iE"}],bvdo:[function(n,t,e){"use strict";function r(n){return function(n){if(Array.isArray(n))return u(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||o(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(n,t){var e="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!e){if(Array.isArray(n)||(e=o(n))||t&&n&&"number"==typeof n.length){e&&(n=e);var r=0,i=function(){};return{s:i,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(n){throw n},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,a=!0,c=!1;return{s:function(){e=e.call(n)},n:function(){var n=e.next();return a=n.done,n},e:function(n){c=!0,u=n},f:function(){try{a||null==e.return||e.return()}finally{if(c)throw u}}}}function o(n,t){if(n){if("string"==typeof n)return u(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?u(n,t):void 0}}function u(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e<t;e++)r[e]=n[e];return r}function a(n,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}var c=this&&this.__awaiter||function(n,t,e,r){return new(e||(e=Promise))(function(i,o){function u(n){try{c(r.next(n))}catch(t){o(t)}}function a(n){try{c(r.throw(n))}catch(t){o(t)}}function c(n){var t;n.done?i(n.value):(t=n.value,t instanceof e?t:new e(function(n){n(t)})).then(u,a)}c((r=r.apply(n,t||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeatures=void 0;var f=n("./Common"),s=n("./features/autocomplete/CommandArgument"),l=n("./features/autocomplete/Command"),h=n("./features/autocomplete/Using"),p=function(){function n(t){(function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")})(this,n),this.fileSystemInspector=t,this.features={autoCompletes:[new h.Using(this.fileSystemInspector),new l.Command,new s.CommandArgument]}}return function(n,t,e){t&&a(n.prototype,t),e&&a(n,e)}(n,[{key:"autoComplete",value:function(n){return c(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e,o,u,a,c,s,l;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.getCursor();case 2:return e=t.sent,t.next=5,f.getExpressionLine(n,e);case 5:if(o=t.sent){t.next=8;break}return t.abrupt("return",[]);case 8:u=[],a=i(this.features.autoCompletes),t.prev=10,a.s();case 12:if((c=a.n()).done){t.next=22;break}return s=c.value,t.next=16,s.getSuggestions(o,n);case 16:if(l=t.sent){t.next=19;break}return t.abrupt("continue",20);case 19:u.push.apply(u,r(l));case 20:t.next=12;break;case 22:t.next=27;break;case 24:t.prev=24,t.t0=t.catch(10),a.e(t.t0);case 27:return t.prev=27,a.f(),t.finish(27);case 30:return t.abrupt("return",u);case 31:case"end":return t.stop()}},t,this,[[10,24,27,30]])}))}}]),n}();e.LanguageFeatures=p},{"./Common":"I6jy","./features/autocomplete/CommandArgument":"ykR4","./features/autocomplete/Command":"nviV","./features/autocomplete/Using":"Tlxz"}]},{},["bvdo"]);
40
40
  },{}],"vSbS":[function(require,module,exports) {
41
41
  "use strict";var t=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(u,a){function o(t){try{i(r.next(t))}catch(e){a(e)}}function c(t){try{i(r.throw(t))}catch(e){a(e)}}function i(t){var e;t.done?u(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(o,c)}i((r=r.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.fetchText=void 0;var e=new Map;function n(n){return t(this,void 0,void 0,regeneratorRuntime.mark(function t(){var r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.has(n)){t.next=2;break}return t.abrupt("return",e.get(n));case 2:return r=fetch(n).then(function(t){return t.text()}),e.set(n,r),t.abrupt("return",r);case 5:case"end":return t.stop()}},t)}))}exports.fetchText=n;
42
42
  },{}],"pBGv":[function(require,module,exports) {
@@ -487,7 +487,7 @@ var process = require("process");
487
487
  var __dirname = "/home/runner/work/werckmeister-component/werckmeister-component/node_modules/@werckmeister/compilerjs";
488
488
  var Buffer = require("buffer").Buffer;
489
489
  var define;
490
- var r,t="/home/runner/work/werckmeister-component/werckmeister-component/node_modules/@werckmeister/compilerjs/werckmeister.js",e=require("process"),n="/home/runner/work/werckmeister-component/werckmeister-component/node_modules/@werckmeister/compilerjs",o=require("buffer").Buffer,i=(()=>{var r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return void 0!==t&&(r=r||t),function(t){var i,a,u=void 0!==(t=t||{})?t:{},s=Object.assign;u.ready=new Promise(function(r,t){i=r,a=t});var c,f,l,d,m,h,p=s({},u),w=[],v="./this.program",g=(r,t)=>{throw t},y="object"==typeof window,_="function"==typeof importScripts,E="object"==typeof e&&"object"==typeof e.versions&&"string"==typeof e.versions.node,b="";E?(b=_?require("path").dirname(b)+"/":n+"/",h=function(){m||(d=require("fs"),m=require("path"))},c=function(r,t){return h(),r=m.normalize(r),d.readFileSync(r,t?null:"utf8")},l=function(r){var t=c(r,!0);return t.buffer||(t=new Uint8Array(t)),t},f=function(r,t,e){h(),r=m.normalize(r),d.readFile(r,function(r,n){r?e(r):t(n.buffer)})},e.argv.length>1&&(v=e.argv[1].replace(/\\/g,"/")),w=e.argv.slice(2),e.on("uncaughtException",function(r){if(!(r instanceof kt))throw r}),e.on("unhandledRejection",function(r){throw r}),g=((r,t)=>{if(tr())throw e.exitCode=r,t;!function(r){if(r instanceof kt)return;j("exiting due to exception: "+r)}(t),e.exit(r)}),u.inspect=function(){return"[Emscripten Module object]"}):(y||_)&&(_?b=self.location.href:"undefined"!=typeof document&&document.currentScript&&(b=document.currentScript.src),r&&(b=r),b=0!==b.indexOf("blob:")?b.substr(0,b.replace(/[?#].*/,"").lastIndexOf("/")+1):"",c=function(r){var t=new XMLHttpRequest;return t.open("GET",r,!1),t.send(null),t.responseText},_&&(l=function(r){var t=new XMLHttpRequest;return t.open("GET",r,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),f=function(r,t,e){var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):e()},n.onerror=e,n.send(null)});var k=u.print||console.log.bind(console),j=u.printErr||console.warn.bind(console);s(u,p),p=null,u.arguments&&(w=u.arguments),u.thisProgram&&(v=u.thisProgram),u.quit&&(g=u.quit);var D,S=0,F=function(r){S=r},M=function(){return S};u.wasmBinary&&(D=u.wasmBinary);var A,P=u.noExitRuntime||!0;"object"!=typeof WebAssembly&&sr("no native wasm support detected");var T,x=!1;function C(r){return u["_"+r]}function R(r,t,e,n,o){var i={string:function(r){var t=0;if(null!=r&&0!==r){var e=1+(r.length<<2);q(r,t=nt(e),e)}return t},array:function(r){var t=nt(r.length);return V(r,t),t}};var a=C(r),u=[],s=0;if(n)for(var c=0;c<n.length;c++){var f=i[e[c]];f?(0===s&&(s=tt()),u[c]=f(n[c])):u[c]=n[c]}var l=a.apply(null,u);return l=function(r){return 0!==s&&et(s),function(r){return"string"===t?H(r):"boolean"===t?Boolean(r):r}(r)}(l)}var z,O,B,N,I,U="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function L(r,t,e){for(var n=t+e,o=t;r[o]&&!(o>=n);)++o;if(o-t>16&&r.subarray&&U)return U.decode(r.subarray(t,o));for(var i="";t<o;){var a=r[t++];if(128&a){var u=63&r[t++];if(192!=(224&a)){var s=63&r[t++];if((a=224==(240&a)?(15&a)<<12|u<<6|s:(7&a)<<18|u<<12|s<<6|63&r[t++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|u)}else i+=String.fromCharCode(a)}return i}function H(r,t){return r?L(B,r,t):""}function Y(r,t,e,n){if(!(n>0))return 0;for(var o=e,i=e+n-1,a=0;a<r.length;++a){var u=r.charCodeAt(a);if(u>=55296&&u<=57343)u=65536+((1023&u)<<10)|1023&r.charCodeAt(++a);if(u<=127){if(e>=i)break;t[e++]=u}else if(u<=2047){if(e+1>=i)break;t[e++]=192|u>>6,t[e++]=128|63&u}else if(u<=65535){if(e+2>=i)break;t[e++]=224|u>>12,t[e++]=128|u>>6&63,t[e++]=128|63&u}else{if(e+3>=i)break;t[e++]=240|u>>18,t[e++]=128|u>>12&63,t[e++]=128|u>>6&63,t[e++]=128|63&u}}return t[e]=0,e-o}function q(r,t,e){return Y(r,B,t,e)}function W(r){for(var t=0,e=0;e<r.length;++e){var n=r.charCodeAt(e);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&r.charCodeAt(++e)),n<=127?++t:t+=n<=2047?2:n<=65535?3:4}return t}function G(r){var t=W(r)+1,e=Kr(t);return e&&Y(r,O,e,t),e}function X(r){var t=W(r)+1,e=nt(t);return Y(r,O,e,t),e}function V(r,t){O.set(r,t)}u.INITIAL_MEMORY;var K,J=[],$=[],Z=[],Q=[],rr=0;function tr(){return P||rr>0}var er=0,nr=null,or=null;function ir(r){return r}function ar(r){er++,u.monitorRunDependencies&&u.monitorRunDependencies(er)}function ur(r){if(er--,u.monitorRunDependencies&&u.monitorRunDependencies(er),0==er&&(null!==nr&&(clearInterval(nr),nr=null),or)){var t=or;or=null,t()}}function sr(r){u.onAbort&&u.onAbort(r),j(r="Aborted("+r+")"),x=!0,T=1,r+=". Build with -s ASSERTIONS=1 for more info.";var t=new WebAssembly.RuntimeError(r);throw a(t),t}u.preloadedImages={},u.preloadedAudios={};var cr,fr,lr,dr,mr,hr="data:application/octet-stream;base64,";function pr(r){return r.startsWith(hr)}function wr(r){return r.startsWith("file://")}function vr(r){try{if(r==cr&&D)return new Uint8Array(D);if(l)return l(r);throw"both async and sync fetching of the wasm failed"}catch(j){sr(j)}}function gr(r){for(;r.length>0;){var t=r.shift();if("function"!=typeof t){var e=t.func;"number"==typeof e?void 0===t.arg?yr(e)():yr(e)(t.arg):e(void 0===t.arg?null:t.arg)}else t(u)}}function yr(r){return K.get(r)}pr(cr="werckmeister.wasm")||(fr=cr,cr=u.locateFile?u.locateFile(fr,b):b+fr),mr=E?()=>{var r=e.hrtime();return 1e3*r[0]+r[1]/1e6}:()=>performance.now();var _r=!0;function Er(r){return I[Jr()>>2]=r,r}function br(r){this.excPtr=r,this.ptr=r-16,this.set_type=function(r){I[this.ptr+4>>2]=r},this.get_type=function(){return I[this.ptr+4>>2]},this.set_destructor=function(r){I[this.ptr+8>>2]=r},this.get_destructor=function(){return I[this.ptr+8>>2]},this.set_refcount=function(r){I[this.ptr>>2]=r},this.set_caught=function(r){r=r?1:0,O[this.ptr+12>>0]=r},this.get_caught=function(){return 0!=O[this.ptr+12>>0]},this.set_rethrown=function(r){r=r?1:0,O[this.ptr+13>>0]=r},this.get_rethrown=function(){return 0!=O[this.ptr+13>>0]},this.init=function(r,t){this.set_type(r),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var r=I[this.ptr>>2];I[this.ptr>>2]=r+1},this.release_ref=function(){var r=I[this.ptr>>2];return I[this.ptr>>2]=r-1,1===r}}function kr(r){this.free=function(){Vr(this.ptr),this.ptr=0},this.set_base_ptr=function(r){I[this.ptr>>2]=r},this.get_base_ptr=function(){return I[this.ptr>>2]},this.set_adjusted_ptr=function(r){I[this.ptr+4>>2]=r},this.get_adjusted_ptr_addr=function(){return this.ptr+4},this.get_adjusted_ptr=function(){return I[this.ptr+4>>2]},this.get_exception_ptr=function(){if(it(this.get_exception_info().get_type()))return I[this.get_base_ptr()>>2];var r=this.get_adjusted_ptr();return 0!==r?r:this.get_base_ptr()},this.get_exception_info=function(){return new br(this.get_base_ptr())},void 0===r?(this.ptr=Kr(8),this.set_adjusted_ptr(0)):this.ptr=r}var jr=[];var Dr=0;var Sr=0;function Fr(r){try{return Vr(new br(r).ptr)}catch(t){}}function Mr(){Mr.called||(Mr.called=!0,function(){var r=(new Date).getFullYear(),t=new Date(r,0,1),e=new Date(r,6,1),n=t.getTimezoneOffset(),o=e.getTimezoneOffset(),i=Math.max(n,o);function a(r){var t=r.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}I[Qr()>>2]=60*i,I[Zr()>>2]=Number(n!=o);var u=a(t),s=a(e),c=G(u),f=G(s);o<n?(I[$r()>>2]=c,I[$r()+4>>2]=f):(I[$r()>>2]=f,I[$r()+4>>2]=c)}())}var Ar={splitPath:function(r){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(r).slice(1)},normalizeArray:function(r,t){for(var e=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),e++):e&&(r.splice(n,1),e--)}if(t)for(;e;e--)r.unshift("..");return r},normalize:function(r){var t="/"===r.charAt(0),e="/"===r.substr(-1);return(r=Ar.normalizeArray(r.split("/").filter(function(r){return!!r}),!t).join("/"))||t||(r="."),r&&e&&(r+="/"),(t?"/":"")+r},dirname:function(r){var t=Ar.splitPath(r),e=t[0],n=t[1];return e||n?(n&&(n=n.substr(0,n.length-1)),e+n):"."},basename:function(r){if("/"===r)return"/";var t=(r=(r=Ar.normalize(r)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?r:r.substr(t+1)},extname:function(r){return Ar.splitPath(r)[3]},join:function(){var r=Array.prototype.slice.call(arguments,0);return Ar.normalize(r.join("/"))},join2:function(r,t){return Ar.normalize(r+"/"+t)}};var Pr={resolve:function(){for(var r="",t=!1,e=arguments.length-1;e>=-1&&!t;e--){var n=e>=0?arguments[e]:Rr.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,t="/"===n.charAt(0)}return(t?"/":"")+(r=Ar.normalizeArray(r.split("/").filter(function(r){return!!r}),!t).join("/"))||"."},relative:function(r,t){function e(r){for(var t=0;t<r.length&&""===r[t];t++);for(var e=r.length-1;e>=0&&""===r[e];e--);return t>e?[]:r.slice(t,e-t+1)}r=Pr.resolve(r).substr(1),t=Pr.resolve(t).substr(1);for(var n=e(r.split("/")),o=e(t.split("/")),i=Math.min(n.length,o.length),a=i,u=0;u<i;u++)if(n[u]!==o[u]){a=u;break}var s=[];for(u=a;u<n.length;u++)s.push("..");return(s=s.concat(o.slice(a))).join("/")}},Tr={ttys:[],init:function(){},shutdown:function(){},register:function(r,t){Tr.ttys[r]={input:[],output:[],ops:t},Rr.registerDevice(r,Tr.stream_ops)},stream_ops:{open:function(r){var t=Tr.ttys[r.node.rdev];if(!t)throw new Rr.ErrnoError(43);r.tty=t,r.seekable=!1},close:function(r){r.tty.ops.flush(r.tty)},flush:function(r){r.tty.ops.flush(r.tty)},read:function(r,t,e,n,o){if(!r.tty||!r.tty.ops.get_char)throw new Rr.ErrnoError(60);for(var i=0,a=0;a<n;a++){var u;try{u=r.tty.ops.get_char(r.tty)}catch(s){throw new Rr.ErrnoError(29)}if(void 0===u&&0===i)throw new Rr.ErrnoError(6);if(null==u)break;i++,t[e+a]=u}return i&&(r.node.timestamp=Date.now()),i},write:function(r,t,e,n,o){if(!r.tty||!r.tty.ops.put_char)throw new Rr.ErrnoError(60);try{for(var i=0;i<n;i++)r.tty.ops.put_char(r.tty,t[e+i])}catch(a){throw new Rr.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(r){if(!r.input.length){var t=null;if(E){var n=o.alloc(256),i=0;try{i=d.readSync(e.stdin.fd,n,0,256,null)}catch(a){if(!a.toString().includes("EOF"))throw a;i=0}t=i>0?n.slice(0,i).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n");if(!t)return null;r.input=Wr(t,!0)}return r.input.shift()},put_char:function(r,t){null===t||10===t?(k(L(r.output,0)),r.output=[]):0!=t&&r.output.push(t)},flush:function(r){r.output&&r.output.length>0&&(k(L(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,t){null===t||10===t?(j(L(r.output,0)),r.output=[]):0!=t&&r.output.push(t)},flush:function(r){r.output&&r.output.length>0&&(j(L(r.output,0)),r.output=[])}}};var xr={ops_table:null,mount:function(r){return xr.createNode(null,"/",16895,0)},createNode:function(r,t,e,n){if(Rr.isBlkdev(e)||Rr.isFIFO(e))throw new Rr.ErrnoError(63);xr.ops_table||(xr.ops_table={dir:{node:{getattr:xr.node_ops.getattr,setattr:xr.node_ops.setattr,lookup:xr.node_ops.lookup,mknod:xr.node_ops.mknod,rename:xr.node_ops.rename,unlink:xr.node_ops.unlink,rmdir:xr.node_ops.rmdir,readdir:xr.node_ops.readdir,symlink:xr.node_ops.symlink},stream:{llseek:xr.stream_ops.llseek}},file:{node:{getattr:xr.node_ops.getattr,setattr:xr.node_ops.setattr},stream:{llseek:xr.stream_ops.llseek,read:xr.stream_ops.read,write:xr.stream_ops.write,allocate:xr.stream_ops.allocate,mmap:xr.stream_ops.mmap,msync:xr.stream_ops.msync}},link:{node:{getattr:xr.node_ops.getattr,setattr:xr.node_ops.setattr,readlink:xr.node_ops.readlink},stream:{}},chrdev:{node:{getattr:xr.node_ops.getattr,setattr:xr.node_ops.setattr},stream:Rr.chrdev_stream_ops}});var o=Rr.createNode(r,t,e,n);return Rr.isDir(o.mode)?(o.node_ops=xr.ops_table.dir.node,o.stream_ops=xr.ops_table.dir.stream,o.contents={}):Rr.isFile(o.mode)?(o.node_ops=xr.ops_table.file.node,o.stream_ops=xr.ops_table.file.stream,o.usedBytes=0,o.contents=null):Rr.isLink(o.mode)?(o.node_ops=xr.ops_table.link.node,o.stream_ops=xr.ops_table.link.stream):Rr.isChrdev(o.mode)&&(o.node_ops=xr.ops_table.chrdev.node,o.stream_ops=xr.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[t]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(r,t){var e=r.contents?r.contents.length:0;if(!(e>=t)){t=Math.max(t,e*(e<1048576?2:1.125)>>>0),0!=e&&(t=Math.max(t,256));var n=r.contents;r.contents=new Uint8Array(t),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,t){if(r.usedBytes!=t)if(0==t)r.contents=null,r.usedBytes=0;else{var e=r.contents;r.contents=new Uint8Array(t),e&&r.contents.set(e.subarray(0,Math.min(t,r.usedBytes))),r.usedBytes=t}},node_ops:{getattr:function(r){var t={};return t.dev=Rr.isChrdev(r.mode)?r.id:1,t.ino=r.id,t.mode=r.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=r.rdev,Rr.isDir(r.mode)?t.size=4096:Rr.isFile(r.mode)?t.size=r.usedBytes:Rr.isLink(r.mode)?t.size=r.link.length:t.size=0,t.atime=new Date(r.timestamp),t.mtime=new Date(r.timestamp),t.ctime=new Date(r.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(r,t){void 0!==t.mode&&(r.mode=t.mode),void 0!==t.timestamp&&(r.timestamp=t.timestamp),void 0!==t.size&&xr.resizeFileStorage(r,t.size)},lookup:function(r,t){throw Rr.genericErrors[44]},mknod:function(r,t,e,n){return xr.createNode(r,t,e,n)},rename:function(r,t,e){if(Rr.isDir(r.mode)){var n;try{n=Rr.lookupNode(t,e)}catch(i){}if(n)for(var o in n.contents)throw new Rr.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=e,t.contents[e]=r,t.timestamp=r.parent.timestamp,r.parent=t},unlink:function(r,t){delete r.contents[t],r.timestamp=Date.now()},rmdir:function(r,t){var e=Rr.lookupNode(r,t);for(var n in e.contents)throw new Rr.ErrnoError(55);delete r.contents[t],r.timestamp=Date.now()},readdir:function(r){var t=[".",".."];for(var e in r.contents)r.contents.hasOwnProperty(e)&&t.push(e);return t},symlink:function(r,t,e){var n=xr.createNode(r,t,41471,0);return n.link=e,n},readlink:function(r){if(!Rr.isLink(r.mode))throw new Rr.ErrnoError(28);return r.link}},stream_ops:{read:function(r,t,e,n,o){var i=r.node.contents;if(o>=r.node.usedBytes)return 0;var a=Math.min(r.node.usedBytes-o,n);if(a>8&&i.subarray)t.set(i.subarray(o,o+a),e);else for(var u=0;u<a;u++)t[e+u]=i[o+u];return a},write:function(r,t,e,n,o,i){if(!n)return 0;var a=r.node;if(a.timestamp=Date.now(),t.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=t.subarray(e,e+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=t.slice(e,e+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(t.subarray(e,e+n),o),n}if(xr.expandFileStorage(a,o+n),a.contents.subarray&&t.subarray)a.contents.set(t.subarray(e,e+n),o);else for(var u=0;u<n;u++)a.contents[o+u]=t[e+u];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(r,t,e){var n=t;if(1===e?n+=r.position:2===e&&Rr.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new Rr.ErrnoError(28);return n},allocate:function(r,t,e){xr.expandFileStorage(r.node,t+e),r.node.usedBytes=Math.max(r.node.usedBytes,t+e)},mmap:function(r,t,e,n,o,i){if(0!==t)throw new Rr.ErrnoError(28);if(!Rr.isFile(r.node.mode))throw new Rr.ErrnoError(43);var a,u,s=r.node.contents;if(2&i||s.buffer!==z){if((n>0||n+e<s.length)&&(s=s.subarray?s.subarray(n,n+e):Array.prototype.slice.call(s,n,n+e)),u=!0,!(a=void sr()))throw new Rr.ErrnoError(48);O.set(s,a)}else u=!1,a=s.byteOffset;return{ptr:a,allocated:u}},msync:function(r,t,e,n,o){if(!Rr.isFile(r.node.mode))throw new Rr.ErrnoError(43);if(2&o)return 0;xr.stream_ops.write(r,t,0,n,e,!1);return 0}}};function Cr(r,t,e,n){var o=n?"":ir("al "+r);f(r,function(e){var n;n='Loading data file "'+r+'" failed (no arrayBuffer).',e||sr(n),t(new Uint8Array(e)),o&&ur()},function(t){if(!e)throw'Loading data file "'+r+'" failed.';e()}),o&&ar()}var Rr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:function(r,t){if(t=t||{},!(r=Pr.resolve(Rr.cwd(),r)))return{path:"",node:null};var e={follow_mount:!0,recurse_count:0};for(var n in e)void 0===t[n]&&(t[n]=e[n]);if(t.recurse_count>8)throw new Rr.ErrnoError(32);for(var o=Ar.normalizeArray(r.split("/").filter(function(r){return!!r}),!1),i=Rr.root,a="/",u=0;u<o.length;u++){var s=u===o.length-1;if(s&&t.parent)break;if(i=Rr.lookupNode(i,o[u]),a=Ar.join2(a,o[u]),Rr.isMountpoint(i)&&(!s||s&&t.follow_mount)&&(i=i.mounted.root),!s||t.follow)for(var c=0;Rr.isLink(i.mode);){var f=Rr.readlink(a);if(a=Pr.resolve(Ar.dirname(a),f),i=Rr.lookupPath(a,{recurse_count:t.recurse_count}).node,c++>40)throw new Rr.ErrnoError(32)}}return{path:a,node:i}},getPath:function(r){for(var t;;){if(Rr.isRoot(r)){var e=r.mount.mountpoint;return t?"/"!==e[e.length-1]?e+"/"+t:e+t:e}t=t?r.name+"/"+t:r.name,r=r.parent}},hashName:function(r,t){for(var e=0,n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n)|0;return(r+e>>>0)%Rr.nameTable.length},hashAddNode:function(r){var t=Rr.hashName(r.parent.id,r.name);r.name_next=Rr.nameTable[t],Rr.nameTable[t]=r},hashRemoveNode:function(r){var t=Rr.hashName(r.parent.id,r.name);if(Rr.nameTable[t]===r)Rr.nameTable[t]=r.name_next;else for(var e=Rr.nameTable[t];e;){if(e.name_next===r){e.name_next=r.name_next;break}e=e.name_next}},lookupNode:function(r,t){var e=Rr.mayLookup(r);if(e)throw new Rr.ErrnoError(e,r);for(var n=Rr.hashName(r.id,t),o=Rr.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===r.id&&i===t)return o}return Rr.lookup(r,t)},createNode:function(r,t,e,n){var o=new Rr.FSNode(r,t,e,n);return Rr.hashAddNode(o),o},destroyNode:function(r){Rr.hashRemoveNode(r)},isRoot:function(r){return r===r.parent},isMountpoint:function(r){return!!r.mounted},isFile:function(r){return 32768==(61440&r)},isDir:function(r){return 16384==(61440&r)},isLink:function(r){return 40960==(61440&r)},isChrdev:function(r){return 8192==(61440&r)},isBlkdev:function(r){return 24576==(61440&r)},isFIFO:function(r){return 4096==(61440&r)},isSocket:function(r){return 49152==(49152&r)},flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:function(r){var t=Rr.flagModes[r];if(void 0===t)throw new Error("Unknown file open mode: "+r);return t},flagsToPermissionString:function(r){var t=["r","w","rw"][3&r];return 512&r&&(t+="w"),t},nodePermissions:function(r,t){return Rr.ignorePermissions?0:(!t.includes("r")||292&r.mode)&&(!t.includes("w")||146&r.mode)&&(!t.includes("x")||73&r.mode)?0:2},mayLookup:function(r){var t=Rr.nodePermissions(r,"x");return t||(r.node_ops.lookup?0:2)},mayCreate:function(r,t){try{Rr.lookupNode(r,t);return 20}catch(e){}return Rr.nodePermissions(r,"wx")},mayDelete:function(r,t,e){var n;try{n=Rr.lookupNode(r,t)}catch(i){return i.errno}var o=Rr.nodePermissions(r,"wx");if(o)return o;if(e){if(!Rr.isDir(n.mode))return 54;if(Rr.isRoot(n)||Rr.getPath(n)===Rr.cwd())return 10}else if(Rr.isDir(n.mode))return 31;return 0},mayOpen:function(r,t){return r?Rr.isLink(r.mode)?32:Rr.isDir(r.mode)&&("r"!==Rr.flagsToPermissionString(t)||512&t)?31:Rr.nodePermissions(r,Rr.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd:function(r,t){r=r||0,t=t||Rr.MAX_OPEN_FDS;for(var e=r;e<=t;e++)if(!Rr.streams[e])return e;throw new Rr.ErrnoError(33)},getStream:function(r){return Rr.streams[r]},createStream:function(r,t,e){Rr.FSStream||(Rr.FSStream=function(){},Rr.FSStream.prototype={object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}});var n=new Rr.FSStream;for(var o in r)n[o]=r[o];r=n;var i=Rr.nextfd(t,e);return r.fd=i,Rr.streams[i]=r,r},closeStream:function(r){Rr.streams[r]=null},chrdev_stream_ops:{open:function(r){var t=Rr.getDevice(r.node.rdev);r.stream_ops=t.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:function(){throw new Rr.ErrnoError(70)}},major:function(r){return r>>8},minor:function(r){return 255&r},makedev:function(r,t){return r<<8|t},registerDevice:function(r,t){Rr.devices[r]={stream_ops:t}},getDevice:function(r){return Rr.devices[r]},getMounts:function(r){for(var t=[],e=[r];e.length;){var n=e.pop();t.push(n),e.push.apply(e,n.mounts)}return t},syncfs:function(r,t){"function"==typeof r&&(t=r,r=!1),Rr.syncFSRequests++,Rr.syncFSRequests>1&&j("warning: "+Rr.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var e=Rr.getMounts(Rr.root.mount),n=0;function o(r){return Rr.syncFSRequests--,t(r)}function i(r){if(r)return i.errored?void 0:(i.errored=!0,o(r));++n>=e.length&&o(null)}e.forEach(function(t){if(!t.type.syncfs)return i(null);t.type.syncfs(t,r,i)})},mount:function(r,t,e){var n,o="/"===e,i=!e;if(o&&Rr.root)throw new Rr.ErrnoError(10);if(!o&&!i){var a=Rr.lookupPath(e,{follow_mount:!1});if(e=a.path,n=a.node,Rr.isMountpoint(n))throw new Rr.ErrnoError(10);if(!Rr.isDir(n.mode))throw new Rr.ErrnoError(54)}var u={type:r,opts:t,mountpoint:e,mounts:[]},s=r.mount(u);return s.mount=u,u.root=s,o?Rr.root=s:n&&(n.mounted=u,n.mount&&n.mount.mounts.push(u)),s},unmount:function(r){var t=Rr.lookupPath(r,{follow_mount:!1});if(!Rr.isMountpoint(t.node))throw new Rr.ErrnoError(28);var e=t.node,n=e.mounted,o=Rr.getMounts(n);Object.keys(Rr.nameTable).forEach(function(r){for(var t=Rr.nameTable[r];t;){var e=t.name_next;o.includes(t.mount)&&Rr.destroyNode(t),t=e}}),e.mounted=null;var i=e.mount.mounts.indexOf(n);e.mount.mounts.splice(i,1)},lookup:function(r,t){return r.node_ops.lookup(r,t)},mknod:function(r,t,e){var n=Rr.lookupPath(r,{parent:!0}).node,o=Ar.basename(r);if(!o||"."===o||".."===o)throw new Rr.ErrnoError(28);var i=Rr.mayCreate(n,o);if(i)throw new Rr.ErrnoError(i);if(!n.node_ops.mknod)throw new Rr.ErrnoError(63);return n.node_ops.mknod(n,o,t,e)},create:function(r,t){return t=void 0!==t?t:438,t&=4095,t|=32768,Rr.mknod(r,t,0)},mkdir:function(r,t){return t=void 0!==t?t:511,t&=1023,t|=16384,Rr.mknod(r,t,0)},mkdirTree:function(r,t){for(var e=r.split("/"),n="",o=0;o<e.length;++o)if(e[o]){n+="/"+e[o];try{Rr.mkdir(n,t)}catch(i){if(20!=i.errno)throw i}}},mkdev:function(r,t,e){return void 0===e&&(e=t,t=438),t|=8192,Rr.mknod(r,t,e)},symlink:function(r,t){if(!Pr.resolve(r))throw new Rr.ErrnoError(44);var e=Rr.lookupPath(t,{parent:!0}).node;if(!e)throw new Rr.ErrnoError(44);var n=Ar.basename(t),o=Rr.mayCreate(e,n);if(o)throw new Rr.ErrnoError(o);if(!e.node_ops.symlink)throw new Rr.ErrnoError(63);return e.node_ops.symlink(e,n,r)},rename:function(r,t){var e,n,o=Ar.dirname(r),i=Ar.dirname(t),a=Ar.basename(r),u=Ar.basename(t);if(e=Rr.lookupPath(r,{parent:!0}).node,n=Rr.lookupPath(t,{parent:!0}).node,!e||!n)throw new Rr.ErrnoError(44);if(e.mount!==n.mount)throw new Rr.ErrnoError(75);var s,c=Rr.lookupNode(e,a),f=Pr.relative(r,i);if("."!==f.charAt(0))throw new Rr.ErrnoError(28);if("."!==(f=Pr.relative(t,o)).charAt(0))throw new Rr.ErrnoError(55);try{s=Rr.lookupNode(n,u)}catch(m){}if(c!==s){var l=Rr.isDir(c.mode),d=Rr.mayDelete(e,a,l);if(d)throw new Rr.ErrnoError(d);if(d=s?Rr.mayDelete(n,u,l):Rr.mayCreate(n,u))throw new Rr.ErrnoError(d);if(!e.node_ops.rename)throw new Rr.ErrnoError(63);if(Rr.isMountpoint(c)||s&&Rr.isMountpoint(s))throw new Rr.ErrnoError(10);if(n!==e&&(d=Rr.nodePermissions(e,"w")))throw new Rr.ErrnoError(d);Rr.hashRemoveNode(c);try{e.node_ops.rename(c,n,u)}catch(m){throw m}finally{Rr.hashAddNode(c)}}},rmdir:function(r){var t=Rr.lookupPath(r,{parent:!0}).node,e=Ar.basename(r),n=Rr.lookupNode(t,e),o=Rr.mayDelete(t,e,!0);if(o)throw new Rr.ErrnoError(o);if(!t.node_ops.rmdir)throw new Rr.ErrnoError(63);if(Rr.isMountpoint(n))throw new Rr.ErrnoError(10);t.node_ops.rmdir(t,e),Rr.destroyNode(n)},readdir:function(r){var t=Rr.lookupPath(r,{follow:!0}).node;if(!t.node_ops.readdir)throw new Rr.ErrnoError(54);return t.node_ops.readdir(t)},unlink:function(r){var t=Rr.lookupPath(r,{parent:!0}).node;if(!t)throw new Rr.ErrnoError(44);var e=Ar.basename(r),n=Rr.lookupNode(t,e),o=Rr.mayDelete(t,e,!1);if(o)throw new Rr.ErrnoError(o);if(!t.node_ops.unlink)throw new Rr.ErrnoError(63);if(Rr.isMountpoint(n))throw new Rr.ErrnoError(10);t.node_ops.unlink(t,e),Rr.destroyNode(n)},readlink:function(r){var t=Rr.lookupPath(r).node;if(!t)throw new Rr.ErrnoError(44);if(!t.node_ops.readlink)throw new Rr.ErrnoError(28);return Pr.resolve(Rr.getPath(t.parent),t.node_ops.readlink(t))},stat:function(r,t){var e=Rr.lookupPath(r,{follow:!t}).node;if(!e)throw new Rr.ErrnoError(44);if(!e.node_ops.getattr)throw new Rr.ErrnoError(63);return e.node_ops.getattr(e)},lstat:function(r){return Rr.stat(r,!0)},chmod:function(r,t,e){var n;"string"==typeof r?n=Rr.lookupPath(r,{follow:!e}).node:n=r;if(!n.node_ops.setattr)throw new Rr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:function(r,t){Rr.chmod(r,t,!0)},fchmod:function(r,t){var e=Rr.getStream(r);if(!e)throw new Rr.ErrnoError(8);Rr.chmod(e.node,t)},chown:function(r,t,e,n){var o;"string"==typeof r?o=Rr.lookupPath(r,{follow:!n}).node:o=r;if(!o.node_ops.setattr)throw new Rr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:function(r,t,e){Rr.chown(r,t,e,!0)},fchown:function(r,t,e){var n=Rr.getStream(r);if(!n)throw new Rr.ErrnoError(8);Rr.chown(n.node,t,e)},truncate:function(r,t){if(t<0)throw new Rr.ErrnoError(28);var e;"string"==typeof r?e=Rr.lookupPath(r,{follow:!0}).node:e=r;if(!e.node_ops.setattr)throw new Rr.ErrnoError(63);if(Rr.isDir(e.mode))throw new Rr.ErrnoError(31);if(!Rr.isFile(e.mode))throw new Rr.ErrnoError(28);var n=Rr.nodePermissions(e,"w");if(n)throw new Rr.ErrnoError(n);e.node_ops.setattr(e,{size:t,timestamp:Date.now()})},ftruncate:function(r,t){var e=Rr.getStream(r);if(!e)throw new Rr.ErrnoError(8);if(0==(2097155&e.flags))throw new Rr.ErrnoError(28);Rr.truncate(e.node,t)},utime:function(r,t,e){var n=Rr.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,e)})},open:function(r,t,e,n,o){if(""===r)throw new Rr.ErrnoError(44);var i;if(e=void 0===e?438:e,e=64&(t="string"==typeof t?Rr.modeStringToFlags(t):t)?4095&e|32768:0,"object"==typeof r)i=r;else{r=Ar.normalize(r);try{i=Rr.lookupPath(r,{follow:!(131072&t)}).node}catch(f){}}var a=!1;if(64&t)if(i){if(128&t)throw new Rr.ErrnoError(20)}else i=Rr.mknod(r,e,0),a=!0;if(!i)throw new Rr.ErrnoError(44);if(Rr.isChrdev(i.mode)&&(t&=-513),65536&t&&!Rr.isDir(i.mode))throw new Rr.ErrnoError(54);if(!a){var s=Rr.mayOpen(i,t);if(s)throw new Rr.ErrnoError(s)}512&t&&Rr.truncate(i,0),t&=-131713;var c=Rr.createStream({node:i,path:Rr.getPath(i),id:i.id,flags:t,mode:i.mode,seekable:!0,position:0,stream_ops:i.stream_ops,node_ops:i.node_ops,ungotten:[],error:!1},n,o);return c.stream_ops.open&&c.stream_ops.open(c),!u.logReadFiles||1&t||(Rr.readFiles||(Rr.readFiles={}),r in Rr.readFiles||(Rr.readFiles[r]=1)),c},close:function(r){if(Rr.isClosed(r))throw new Rr.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(t){throw t}finally{Rr.closeStream(r.fd)}r.fd=null},isClosed:function(r){return null===r.fd},llseek:function(r,t,e){if(Rr.isClosed(r))throw new Rr.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new Rr.ErrnoError(70);if(0!=e&&1!=e&&2!=e)throw new Rr.ErrnoError(28);return r.position=r.stream_ops.llseek(r,t,e),r.ungotten=[],r.position},read:function(r,t,e,n,o){if(n<0||o<0)throw new Rr.ErrnoError(28);if(Rr.isClosed(r))throw new Rr.ErrnoError(8);if(1==(2097155&r.flags))throw new Rr.ErrnoError(8);if(Rr.isDir(r.node.mode))throw new Rr.ErrnoError(31);if(!r.stream_ops.read)throw new Rr.ErrnoError(28);var i=void 0!==o;if(i){if(!r.seekable)throw new Rr.ErrnoError(70)}else o=r.position;var a=r.stream_ops.read(r,t,e,n,o);return i||(r.position+=a),a},write:function(r,t,e,n,o,i){if(n<0||o<0)throw new Rr.ErrnoError(28);if(Rr.isClosed(r))throw new Rr.ErrnoError(8);if(0==(2097155&r.flags))throw new Rr.ErrnoError(8);if(Rr.isDir(r.node.mode))throw new Rr.ErrnoError(31);if(!r.stream_ops.write)throw new Rr.ErrnoError(28);r.seekable&&1024&r.flags&&Rr.llseek(r,0,2);var a=void 0!==o;if(a){if(!r.seekable)throw new Rr.ErrnoError(70)}else o=r.position;var u=r.stream_ops.write(r,t,e,n,o,i);return a||(r.position+=u),u},allocate:function(r,t,e){if(Rr.isClosed(r))throw new Rr.ErrnoError(8);if(t<0||e<=0)throw new Rr.ErrnoError(28);if(0==(2097155&r.flags))throw new Rr.ErrnoError(8);if(!Rr.isFile(r.node.mode)&&!Rr.isDir(r.node.mode))throw new Rr.ErrnoError(43);if(!r.stream_ops.allocate)throw new Rr.ErrnoError(138);r.stream_ops.allocate(r,t,e)},mmap:function(r,t,e,n,o,i){if(0!=(2&o)&&0==(2&i)&&2!=(2097155&r.flags))throw new Rr.ErrnoError(2);if(1==(2097155&r.flags))throw new Rr.ErrnoError(2);if(!r.stream_ops.mmap)throw new Rr.ErrnoError(43);return r.stream_ops.mmap(r,t,e,n,o,i)},msync:function(r,t,e,n,o){return r&&r.stream_ops.msync?r.stream_ops.msync(r,t,e,n,o):0},munmap:function(r){return 0},ioctl:function(r,t,e){if(!r.stream_ops.ioctl)throw new Rr.ErrnoError(59);return r.stream_ops.ioctl(r,t,e)},readFile:function(r,t){if((t=t||{}).flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var e,n=Rr.open(r,t.flags),o=Rr.stat(r).size,i=new Uint8Array(o);return Rr.read(n,i,0,o,0),"utf8"===t.encoding?e=L(i,0):"binary"===t.encoding&&(e=i),Rr.close(n),e},writeFile:function(r,t,e){(e=e||{}).flags=e.flags||577;var n=Rr.open(r,e.flags,e.mode);if("string"==typeof t){var o=new Uint8Array(W(t)+1),i=Y(t,o,0,o.length);Rr.write(n,o,0,i,void 0,e.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");Rr.write(n,t,0,t.byteLength,void 0,e.canOwn)}Rr.close(n)},cwd:function(){return Rr.currentPath},chdir:function(r){var t=Rr.lookupPath(r,{follow:!0});if(null===t.node)throw new Rr.ErrnoError(44);if(!Rr.isDir(t.node.mode))throw new Rr.ErrnoError(54);var e=Rr.nodePermissions(t.node,"x");if(e)throw new Rr.ErrnoError(e);Rr.currentPath=t.path},createDefaultDirectories:function(){Rr.mkdir("/tmp"),Rr.mkdir("/home"),Rr.mkdir("/home/web_user")},createDefaultDevices:function(){Rr.mkdir("/dev"),Rr.registerDevice(Rr.makedev(1,3),{read:function(){return 0},write:function(r,t,e,n,o){return n}}),Rr.mkdev("/dev/null",Rr.makedev(1,3)),Tr.register(Rr.makedev(5,0),Tr.default_tty_ops),Tr.register(Rr.makedev(6,0),Tr.default_tty1_ops),Rr.mkdev("/dev/tty",Rr.makedev(5,0)),Rr.mkdev("/dev/tty1",Rr.makedev(6,0));var r=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var r=new Uint8Array(1);return function(){return crypto.getRandomValues(r),r[0]}}if(E)try{var t=require("crypto");return function(){return t.randomBytes(1)[0]}}catch(e){}return function(){sr("randomDevice")}}();Rr.createDevice("/dev","random",r),Rr.createDevice("/dev","urandom",r),Rr.mkdir("/dev/shm"),Rr.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){Rr.mkdir("/proc");var r=Rr.mkdir("/proc/self");Rr.mkdir("/proc/self/fd"),Rr.mount({mount:function(){var t=Rr.createNode(r,"fd",16895,73);return t.node_ops={lookup:function(r,t){var e=+t,n=Rr.getStream(e);if(!n)throw new Rr.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return n.path}}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams:function(){u.stdin?Rr.createDevice("/dev","stdin",u.stdin):Rr.symlink("/dev/tty","/dev/stdin"),u.stdout?Rr.createDevice("/dev","stdout",null,u.stdout):Rr.symlink("/dev/tty","/dev/stdout"),u.stderr?Rr.createDevice("/dev","stderr",null,u.stderr):Rr.symlink("/dev/tty1","/dev/stderr");Rr.open("/dev/stdin",0),Rr.open("/dev/stdout",1),Rr.open("/dev/stderr",1)},ensureErrnoError:function(){Rr.ErrnoError||(Rr.ErrnoError=function(r,t){this.node=t,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},Rr.ErrnoError.prototype=new Error,Rr.ErrnoError.prototype.constructor=Rr.ErrnoError,[44].forEach(function(r){Rr.genericErrors[r]=new Rr.ErrnoError(r),Rr.genericErrors[r].stack="<generic error, no stack>"}))},staticInit:function(){Rr.ensureErrnoError(),Rr.nameTable=new Array(4096),Rr.mount(xr,{},"/"),Rr.createDefaultDirectories(),Rr.createDefaultDevices(),Rr.createSpecialDirectories(),Rr.filesystems={MEMFS:xr}},init:function(r,t,e){Rr.init.initialized=!0,Rr.ensureErrnoError(),u.stdin=r||u.stdin,u.stdout=t||u.stdout,u.stderr=e||u.stderr,Rr.createStandardStreams()},quit:function(){Rr.init.initialized=!1;for(var r=0;r<Rr.streams.length;r++){var t=Rr.streams[r];t&&Rr.close(t)}},getMode:function(r,t){var e=0;return r&&(e|=365),t&&(e|=146),e},findObject:function(r,t){var e=Rr.analyzePath(r,t);return e.exists?e.object:null},analyzePath:function(r,t){try{r=(n=Rr.lookupPath(r,{follow:!t})).path}catch(o){}var e={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=Rr.lookupPath(r,{parent:!0});e.parentExists=!0,e.parentPath=n.path,e.parentObject=n.node,e.name=Ar.basename(r),n=Rr.lookupPath(r,{follow:!t}),e.exists=!0,e.path=n.path,e.object=n.node,e.name=n.node.name,e.isRoot="/"===n.path}catch(o){e.error=o.errno}return e},createPath:function(r,t,e,n){r="string"==typeof r?r:Rr.getPath(r);for(var o=t.split("/").reverse();o.length;){var i=o.pop();if(i){var a=Ar.join2(r,i);try{Rr.mkdir(a)}catch(u){}r=a}}return a},createFile:function(r,t,e,n,o){var i=Ar.join2("string"==typeof r?r:Rr.getPath(r),t),a=Rr.getMode(n,o);return Rr.create(i,a)},createDataFile:function(r,t,e,n,o,i){var a=t?Ar.join2("string"==typeof r?r:Rr.getPath(r),t):r,u=Rr.getMode(n,o),s=Rr.create(a,u);if(e){if("string"==typeof e){for(var c=new Array(e.length),f=0,l=e.length;f<l;++f)c[f]=e.charCodeAt(f);e=c}Rr.chmod(s,146|u);var d=Rr.open(s,577);Rr.write(d,e,0,e.length,0,i),Rr.close(d),Rr.chmod(s,u)}return s},createDevice:function(r,t,e,n){var o=Ar.join2("string"==typeof r?r:Rr.getPath(r),t),i=Rr.getMode(!!e,!!n);Rr.createDevice.major||(Rr.createDevice.major=64);var a=Rr.makedev(Rr.createDevice.major++,0);return Rr.registerDevice(a,{open:function(r){r.seekable=!1},close:function(r){n&&n.buffer&&n.buffer.length&&n(10)},read:function(r,t,n,o,i){for(var a=0,u=0;u<o;u++){var s;try{s=e()}catch(c){throw new Rr.ErrnoError(29)}if(void 0===s&&0===a)throw new Rr.ErrnoError(6);if(null==s)break;a++,t[n+u]=s}return a&&(r.node.timestamp=Date.now()),a},write:function(r,t,e,o,i){for(var a=0;a<o;a++)try{n(t[e+a])}catch(u){throw new Rr.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),a}}),Rr.mkdev(o,i,a)},forceLoadFile:function(r){if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!c)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=Wr(c(r.url),!0),r.usedBytes=r.contents.length}catch(t){throw new Rr.ErrnoError(29)}},createLazyFile:function(r,t,e,n,o){function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(r){if(!(r>this.length-1||r<0)){var t=r%this.chunkSize,e=r/this.chunkSize|0;return this.getter(e)[t]}},i.prototype.setDataGetter=function(r){this.getter=r},i.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",e,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+e+". Status: "+r.status);var t,n=Number(r.getResponseHeader("Content-length")),o=(t=r.getResponseHeader("Accept-Ranges"))&&"bytes"===t,i=(t=r.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;o||(a=n);var u=this;u.setDataGetter(function(r){var t=r*a,o=(r+1)*a-1;if(o=Math.min(o,n-1),void 0===u.chunks[r]&&(u.chunks[r]=function(r,t){if(r>t)throw new Error("invalid range ("+r+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",e,!1),n!==a&&o.setRequestHeader("Range","bytes="+r+"-"+t),"undefined"!=typeof Uint8Array&&(o.responseType="arraybuffer"),o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+e+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):Wr(o.responseText||"",!0)}(t,o)),void 0===u.chunks[r])throw new Error("doXHR failed!");return u.chunks[r]}),!i&&n||(a=n=1,n=this.getter(0).length,a=n,k("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!_)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new i;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var u={isDevice:!1,contents:a}}else u={isDevice:!1,url:e};var s=Rr.createFile(r,t,u,n,o);u.contents?s.contents=u.contents:u.url&&(s.contents=null,s.url=u.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var c={};return Object.keys(s.stream_ops).forEach(function(r){var t=s.stream_ops[r];c[r]=function(){return Rr.forceLoadFile(s),t.apply(null,arguments)}}),c.read=function(r,t,e,n,o){Rr.forceLoadFile(s);var i=r.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var u=0;u<a;u++)t[e+u]=i[o+u];else for(u=0;u<a;u++)t[e+u]=i.get(o+u);return a},s.stream_ops=c,s},createPreloadedFile:function(r,t,e,n,o,i,a,s,c,f){Browser.init();var l=t?Pr.resolve(Ar.join2(r,t)):r;ir("cp "+l);function d(e){function d(e){f&&f(),s||Rr.createDataFile(r,t,e,n,o,c),i&&i(),ur()}var m=!1;u.preloadPlugins.forEach(function(r){m||r.canHandle(l)&&(r.handle(e,l,d,function(){a&&a(),ur()}),m=!0)}),m||d(e)}ar(),"string"==typeof e?Cr(e,function(r){d(r)},a):d(e)},indexedDB:function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:function(){return"EM_FS_"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function(r,t,e){t=t||function(){},e=e||function(){};var n=Rr.indexedDB();try{var o=n.open(Rr.DB_NAME(),Rr.DB_VERSION)}catch(i){return e(i)}o.onupgradeneeded=function(){k("creating db"),o.result.createObjectStore(Rr.DB_STORE_NAME)},o.onsuccess=function(){var n=o.result.transaction([Rr.DB_STORE_NAME],"readwrite"),i=n.objectStore(Rr.DB_STORE_NAME),a=0,u=0,s=r.length;function c(){0==u?t():e()}r.forEach(function(r){var t=i.put(Rr.analyzePath(r).object.contents,r);t.onsuccess=function(){++a+u==s&&c()},t.onerror=function(){a+ ++u==s&&c()}}),n.onerror=e},o.onerror=e},loadFilesFromDB:function(r,t,e){t=t||function(){},e=e||function(){};var n=Rr.indexedDB();try{var o=n.open(Rr.DB_NAME(),Rr.DB_VERSION)}catch(i){return e(i)}o.onupgradeneeded=e,o.onsuccess=function(){var n=o.result;try{var a=n.transaction([Rr.DB_STORE_NAME],"readonly")}catch(i){return void e(i)}var u=a.objectStore(Rr.DB_STORE_NAME),s=0,c=0,f=r.length;function l(){0==c?t():e()}r.forEach(function(r){var t=u.get(r);t.onsuccess=function(){Rr.analyzePath(r).exists&&Rr.unlink(r),Rr.createDataFile(Ar.dirname(r),Ar.basename(r),t.result,!0,!0,!0),++s+c==f&&l()},t.onerror=function(){s+ ++c==f&&l()}}),a.onerror=e},o.onerror=e}},zr={mappings:{},DEFAULT_POLLMASK:5,calculateAt:function(r,t,e){if("/"===t[0])return t;var n;if(-100===r)n=Rr.cwd();else{var o=Rr.getStream(r);if(!o)throw new Rr.ErrnoError(8);n=o.path}if(0==t.length){if(!e)throw new Rr.ErrnoError(44);return n}return Ar.join2(n,t)},doStat:function(r,t,e){try{var n=r(t)}catch(o){if(o&&o.node&&Ar.normalize(t)!==Ar.normalize(Rr.getPath(o.node)))return-54;throw o}return I[e>>2]=n.dev,I[e+4>>2]=0,I[e+8>>2]=n.ino,I[e+12>>2]=n.mode,I[e+16>>2]=n.nlink,I[e+20>>2]=n.uid,I[e+24>>2]=n.gid,I[e+28>>2]=n.rdev,I[e+32>>2]=0,dr=[n.size>>>0,(lr=n.size,+Math.abs(lr)>=1?lr>0?(0|Math.min(+Math.floor(lr/4294967296),4294967295))>>>0:~~+Math.ceil((lr-+(~~lr>>>0))/4294967296)>>>0:0)],I[e+40>>2]=dr[0],I[e+44>>2]=dr[1],I[e+48>>2]=4096,I[e+52>>2]=n.blocks,I[e+56>>2]=n.atime.getTime()/1e3|0,I[e+60>>2]=0,I[e+64>>2]=n.mtime.getTime()/1e3|0,I[e+68>>2]=0,I[e+72>>2]=n.ctime.getTime()/1e3|0,I[e+76>>2]=0,dr=[n.ino>>>0,(lr=n.ino,+Math.abs(lr)>=1?lr>0?(0|Math.min(+Math.floor(lr/4294967296),4294967295))>>>0:~~+Math.ceil((lr-+(~~lr>>>0))/4294967296)>>>0:0)],I[e+80>>2]=dr[0],I[e+84>>2]=dr[1],0},doMsync:function(r,t,e,n,o){var i=B.slice(r,r+e);Rr.msync(t,i,o,e,n)},doMkdir:function(r,t){return"/"===(r=Ar.normalize(r))[r.length-1]&&(r=r.substr(0,r.length-1)),Rr.mkdir(r,t,0),0},doMknod:function(r,t,e){switch(61440&t){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return Rr.mknod(r,t,e),0},doReadlink:function(r,t,e){if(e<=0)return-28;var n=Rr.readlink(r),o=Math.min(e,W(n)),i=O[t+o];return q(n,t,e+1),O[t+o]=i,o},doAccess:function(r,t){if(-8&t)return-28;var e=Rr.lookupPath(r,{follow:!0}).node;if(!e)return-44;var n="";return 4&t&&(n+="r"),2&t&&(n+="w"),1&t&&(n+="x"),n&&Rr.nodePermissions(e,n)?-2:0},doDup:function(r,t,e){var n=Rr.getStream(e);return n&&Rr.close(n),Rr.open(r,t,0,e,e).fd},doReadv:function(r,t,e,n){for(var o=0,i=0;i<e;i++){var a=I[t+8*i>>2],u=I[t+(8*i+4)>>2],s=Rr.read(r,O,a,u,n);if(s<0)return-1;if(o+=s,s<u)break}return o},doWritev:function(r,t,e,n){for(var o=0,i=0;i<e;i++){var a=I[t+8*i>>2],u=I[t+(8*i+4)>>2],s=Rr.write(r,O,a,u,n);if(s<0)return-1;o+=s}return o},varargs:void 0,get:function(){return zr.varargs+=4,I[zr.varargs-4>>2]},getStr:function(r){return H(r)},getStreamFromFD:function(r){var t=Rr.getStream(r);if(!t)throw new Rr.ErrnoError(8);return t},get64:function(r,t){return r}};var Or={};function Br(){if(!Br.strings){var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:v||"./this.program"};for(var t in Or)void 0===Or[t]?delete r[t]:r[t]=Or[t];var e=[];for(var t in r)e.push(t+"="+r[t]);Br.strings=e}return Br.strings}function Nr(r){return r%4==0&&(r%100!=0||r%400==0)}function Ir(r,t){for(var e=0,n=0;n<=t;e+=r[n++]);return e}var Ur=[31,29,31,30,31,30,31,31,30,31,30,31],Lr=[31,28,31,30,31,30,31,31,30,31,30,31];function Hr(r,t){for(var e=new Date(r.getTime());t>0;){var n=Nr(e.getFullYear()),o=e.getMonth(),i=(n?Ur:Lr)[o];if(!(t>i-e.getDate()))return e.setDate(e.getDate()+t),e;t-=i-e.getDate()+1,e.setDate(1),o<11?e.setMonth(o+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1))}return e}function Yr(r,t,e,n){var o=I[n+40>>2],i={tm_sec:I[n>>2],tm_min:I[n+4>>2],tm_hour:I[n+8>>2],tm_mday:I[n+12>>2],tm_mon:I[n+16>>2],tm_year:I[n+20>>2],tm_wday:I[n+24>>2],tm_yday:I[n+28>>2],tm_isdst:I[n+32>>2],tm_gmtoff:I[n+36>>2],tm_zone:o?H(o):""},a=H(e),u={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var s in u)a=a.replace(new RegExp(s,"g"),u[s]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],f=["January","February","March","April","May","June","July","August","September","October","November","December"];function l(r,t,e){for(var n="number"==typeof r?r.toString():r||"";n.length<t;)n=e[0]+n;return n}function d(r,t){return l(r,t,"0")}function m(r,t){function e(r){return r<0?-1:r>0?1:0}var n;return 0===(n=e(r.getFullYear()-t.getFullYear()))&&0===(n=e(r.getMonth()-t.getMonth()))&&(n=e(r.getDate()-t.getDate())),n}function h(r){switch(r.getDay()){case 0:return new Date(r.getFullYear()-1,11,29);case 1:return r;case 2:return new Date(r.getFullYear(),0,3);case 3:return new Date(r.getFullYear(),0,2);case 4:return new Date(r.getFullYear(),0,1);case 5:return new Date(r.getFullYear()-1,11,31);case 6:return new Date(r.getFullYear()-1,11,30)}}function p(r){var t=Hr(new Date(r.tm_year+1900,0,1),r.tm_yday),e=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),o=h(e),i=h(n);return m(o,t)<=0?m(i,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var w={"%a":function(r){return c[r.tm_wday].substring(0,3)},"%A":function(r){return c[r.tm_wday]},"%b":function(r){return f[r.tm_mon].substring(0,3)},"%B":function(r){return f[r.tm_mon]},"%C":function(r){return d((r.tm_year+1900)/100|0,2)},"%d":function(r){return d(r.tm_mday,2)},"%e":function(r){return l(r.tm_mday,2," ")},"%g":function(r){return p(r).toString().substring(2)},"%G":function(r){return p(r)},"%H":function(r){return d(r.tm_hour,2)},"%I":function(r){var t=r.tm_hour;return 0==t?t=12:t>12&&(t-=12),d(t,2)},"%j":function(r){return d(r.tm_mday+Ir(Nr(r.tm_year+1900)?Ur:Lr,r.tm_mon-1),3)},"%m":function(r){return d(r.tm_mon+1,2)},"%M":function(r){return d(r.tm_min,2)},"%n":function(){return"\n"},"%p":function(r){return r.tm_hour>=0&&r.tm_hour<12?"AM":"PM"},"%S":function(r){return d(r.tm_sec,2)},"%t":function(){return"\t"},"%u":function(r){return r.tm_wday||7},"%U":function(r){var t=new Date(r.tm_year+1900,0,1),e=0===t.getDay()?t:Hr(t,7-t.getDay()),n=new Date(r.tm_year+1900,r.tm_mon,r.tm_mday);if(m(e,n)<0){var o=Ir(Nr(n.getFullYear())?Ur:Lr,n.getMonth()-1)-31,i=31-e.getDate()+o+n.getDate();return d(Math.ceil(i/7),2)}return 0===m(e,t)?"01":"00"},"%V":function(r){var t,e=new Date(r.tm_year+1900,0,4),n=new Date(r.tm_year+1901,0,4),o=h(e),i=h(n),a=Hr(new Date(r.tm_year+1900,0,1),r.tm_yday);return m(a,o)<0?"53":m(i,a)<=0?"01":(t=o.getFullYear()<r.tm_year+1900?r.tm_yday+32-o.getDate():r.tm_yday+1-o.getDate(),d(Math.ceil(t/7),2))},"%w":function(r){return r.tm_wday},"%W":function(r){var t=new Date(r.tm_year,0,1),e=1===t.getDay()?t:Hr(t,0===t.getDay()?1:7-t.getDay()+1),n=new Date(r.tm_year+1900,r.tm_mon,r.tm_mday);if(m(e,n)<0){var o=Ir(Nr(n.getFullYear())?Ur:Lr,n.getMonth()-1)-31,i=31-e.getDate()+o+n.getDate();return d(Math.ceil(i/7),2)}return 0===m(e,t)?"01":"00"},"%y":function(r){return(r.tm_year+1900).toString().substring(2)},"%Y":function(r){return r.tm_year+1900},"%z":function(r){var t=r.tm_gmtoff,e=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(e?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(r){return r.tm_zone},"%%":function(){return"%"}};for(var s in w)a.includes(s)&&(a=a.replace(new RegExp(s,"g"),w[s](i)));var v=Wr(a,!1);return v.length>t?0:(V(v,r),v.length-1)}var qr=function(r,t,e,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=Rr.nextInode++,this.name=t,this.mode=e,this.node_ops={},this.stream_ops={},this.rdev=n};function Wr(r,t,e){var n=e>0?e:W(r)+1,o=new Array(n),i=Y(r,o,0,o.length);return t&&(o.length=i),o}Object.defineProperties(qr.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(r){r?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(r){r?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return Rr.isDir(this.mode)}},isDevice:{get:function(){return Rr.isChrdev(this.mode)}}}),Rr.FSNode=qr,Rr.staticInit();var Gr,Xr={qa:function(r,t){return function(r,t){var e;if(0===r)e=Date.now();else{if(1!==r&&4!==r||!_r)return Er(28),-1;e=mr()}return I[t>>2]=e/1e3|0,I[t+4>>2]=e%1e3*1e3*1e3|0,0}(r,t)},k:function(r){return Kr(r+16)+16},q:function(r){var t=new kr(r),e=t.get_exception_info();return e.get_caught()||(e.set_caught(!0),Dr--),e.set_rethrown(!1),jr.push(t),function(r){r.add_ref()}(e),t.get_exception_ptr()},v:function(){rt(0);var r=jr.pop();!function(r){if(r.release_ref()&&!r.get_rethrown()){var t=r.get_destructor();t&&yr(t)(r.excPtr),Fr(r.excPtr)}}(r.get_exception_info()),r.free(),Sr=0},b:function(){var r=Sr;if(!r)return F(0),0;var t=new br(r).get_type(),e=new kr;if(e.set_base_ptr(r),e.set_adjusted_ptr(r),!t)return F(0),0|e.ptr;for(var n=Array.prototype.slice.call(arguments),o=0;o<n.length;o++){var i=n[o];if(0===i||i===t)break;if(ot(i,t,e.get_adjusted_ptr_addr()))return F(i),0|e.ptr}return F(t),0|e.ptr},g:function(){var r=Sr;if(!r)return F(0),0;var t=new br(r).get_type(),e=new kr;if(e.set_base_ptr(r),e.set_adjusted_ptr(r),!t)return F(0),0|e.ptr;for(var n=Array.prototype.slice.call(arguments),o=0;o<n.length;o++){var i=n[o];if(0===i||i===t)break;if(ot(i,t,e.get_adjusted_ptr_addr()))return F(i),0|e.ptr}return F(t),0|e.ptr},B:function(){var r=Sr;if(!r)return F(0),0;var t=new br(r).get_type(),e=new kr;if(e.set_base_ptr(r),e.set_adjusted_ptr(r),!t)return F(0),0|e.ptr;for(var n=Array.prototype.slice.call(arguments),o=0;o<n.length;o++){var i=n[o];if(0===i||i===t)break;if(ot(i,t,e.get_adjusted_ptr_addr()))return F(i),0|e.ptr}return F(t),0|e.ptr},K:function(){var r=Sr;if(!r)return F(0),0;var t=new br(r).get_type(),e=new kr;if(e.set_base_ptr(r),e.set_adjusted_ptr(r),!t)return F(0),0|e.ptr;for(var n=Array.prototype.slice.call(arguments),o=0;o<n.length;o++){var i=n[o];if(0===i||i===t)break;if(ot(i,t,e.get_adjusted_ptr_addr()))return F(i),0|e.ptr}return F(t),0|e.ptr},m:Fr,V:function(){var r=jr.pop();r||sr("no exception to throw");var t=r.get_exception_info(),e=r.get_base_ptr();throw t.get_rethrown()?r.free():(jr.push(r),t.set_rethrown(!0),t.set_caught(!1),Dr++),Sr=e,e},s:function(r,t,e){throw new br(r).init(t,e),Sr=r,Dr++,r},oa:function(){return Dr},va:function(r,t){return function(r,t){Mr();var e=new Date(1e3*I[r>>2]);I[t>>2]=e.getSeconds(),I[t+4>>2]=e.getMinutes(),I[t+8>>2]=e.getHours(),I[t+12>>2]=e.getDate(),I[t+16>>2]=e.getMonth(),I[t+20>>2]=e.getFullYear()-1900,I[t+24>>2]=e.getDay();var n=new Date(e.getFullYear(),0,1),o=(e.getTime()-n.getTime())/864e5|0;I[t+28>>2]=o,I[t+36>>2]=-60*e.getTimezoneOffset();var i=new Date(e.getFullYear(),6,1).getTimezoneOffset(),a=n.getTimezoneOffset(),u=0|(i!=a&&e.getTimezoneOffset()==Math.min(a,i));I[t+32>>2]=u;var s=I[$r()+(u?4:0)>>2];return I[t+40>>2]=s,t}(r,t)},c:function(r){var t=new kr(r),e=t.get_base_ptr();throw Sr||(Sr=e),t.free(),e},Aa:function(r,t,e){try{var n=zr.getStreamFromFD(r);return n.fd===t?-28:zr.doDup(n.path,n.flags,t)}catch(o){if(void 0===Rr||!(o instanceof Rr.ErrnoError))throw o;return-o.errno}},I:function(r,t,e){zr.varargs=e;try{var n=zr.getStreamFromFD(r);switch(t){case 0:return(o=zr.get())<0?-28:Rr.open(n.path,n.flags,0,o).fd;case 1:case 2:return 0;case 3:return n.flags;case 4:var o=zr.get();return n.flags|=o,0;case 5:return o=zr.get(),N[o+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return Er(28),-1;default:return-28}}catch(i){if(void 0===Rr||!(i instanceof Rr.ErrnoError))throw i;return-i.errno}},Da:function(r,t,e,n){try{t=zr.getStr(t);var o=256&n,i=4096&n;return n&=-4353,t=zr.calculateAt(r,t,i),zr.doStat(o?Rr.lstat:Rr.stat,t,e)}catch(a){if(void 0===Rr||!(a instanceof Rr.ErrnoError))throw a;return-a.errno}},za:function(r,t){try{if(0===t)return-28;var e=Rr.cwd();return t<W(e)+1?-68:(q(e,r,t),r)}catch(n){if(void 0===Rr||!(n instanceof Rr.ErrnoError))throw n;return-n.errno}},Ca:function(r,t,e){zr.varargs=e;try{var n=zr.getStreamFromFD(r);switch(t){case 21509:case 21505:return n.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=zr.get();return I[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=zr.get(),Rr.ioctl(n,t,o);case 21523:case 21524:return n.tty?0:-59;default:sr("bad ioctl syscall "+t)}}catch(i){if(void 0===Rr||!(i instanceof Rr.ErrnoError))throw i;return-i.errno}},P:function(r,t){try{return r=zr.getStr(r),zr.doStat(Rr.lstat,r,t)}catch(e){if(void 0===Rr||!(e instanceof Rr.ErrnoError))throw e;return-e.errno}},R:function(r,t,e){zr.varargs=e;try{var n=zr.getStr(r),o=e?zr.get():0;return Rr.open(n,t,o).fd}catch(i){if(void 0===Rr||!(i instanceof Rr.ErrnoError))throw i;return-i.errno}},ta:function(r,t,e){try{return r=zr.getStr(r),zr.doReadlink(r,t,e)}catch(n){if(void 0===Rr||!(n instanceof Rr.ErrnoError))throw n;return-n.errno}},ra:function(r,t){try{return r=zr.getStr(r),t=zr.getStr(t),Rr.rename(r,t),0}catch(e){if(void 0===Rr||!(e instanceof Rr.ErrnoError))throw e;return-e.errno}},sa:function(r){try{return r=zr.getStr(r),Rr.rmdir(r),0}catch(t){if(void 0===Rr||!(t instanceof Rr.ErrnoError))throw t;return-t.errno}},ua:function(r,t){try{return r=zr.getStr(r),zr.doStat(Rr.stat,r,t)}catch(e){if(void 0===Rr||!(e instanceof Rr.ErrnoError))throw e;return-e.errno}},O:function(r){try{return r=zr.getStr(r),Rr.unlink(r),0}catch(t){if(void 0===Rr||!(t instanceof Rr.ErrnoError))throw t;return-t.errno}},pa:function(){throw"longjmp"},wa:function(r,t){var e=new Date(1e3*I[r>>2]);I[t>>2]=e.getUTCSeconds(),I[t+4>>2]=e.getUTCMinutes(),I[t+8>>2]=e.getUTCHours(),I[t+12>>2]=e.getUTCDate(),I[t+16>>2]=e.getUTCMonth(),I[t+20>>2]=e.getUTCFullYear()-1900,I[t+24>>2]=e.getUTCDay();var n=Date.UTC(e.getUTCFullYear(),0,1,0,0,0,0),o=(e.getTime()-n)/864e5|0;I[t+28>>2]=o},G:function(){sr("")},S:function r(){return void 0===r.start&&(r.start=Date.now()),1e3*(Date.now()-r.start)|0},Ha:function(r,t){return r-t},ma:function(r){B.length,sr("OOM")},xa:function(r,t){var e=0;return Br().forEach(function(n,o){var i=t+e;I[r+4*o>>2]=i,function(r,t,e){for(var n=0;n<r.length;++n)O[t++>>0]=r.charCodeAt(n);e||(O[t>>0]=0)}(n,i),e+=n.length+1}),0},ya:function(r,t){var e=Br();I[r>>2]=e.length;var n=0;return e.forEach(function(r){n+=r.length+1}),I[t>>2]=n,0},Fa:function(r){St(r)},J:function(r){try{var t=zr.getStreamFromFD(r);return Rr.close(t),0}catch(e){if(void 0===Rr||!(e instanceof Rr.ErrnoError))throw e;return e.errno}},Ba:function(r,t,e,n){try{var o=zr.getStreamFromFD(r),i=zr.doReadv(o,t,e);return I[n>>2]=i,0}catch(a){if(void 0===Rr||!(a instanceof Rr.ErrnoError))throw a;return a.errno}},Y:function(r,t,e,n,o){try{var i=zr.getStreamFromFD(r),a=4294967296*e+(t>>>0);return a<=-9007199254740992||a>=9007199254740992?-61:(Rr.llseek(i,a,n),dr=[i.position>>>0,(lr=i.position,+Math.abs(lr)>=1?lr>0?(0|Math.min(+Math.floor(lr/4294967296),4294967295))>>>0:~~+Math.ceil((lr-+(~~lr>>>0))/4294967296)>>>0:0)],I[o>>2]=dr[0],I[o+4>>2]=dr[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0)}catch(u){if(void 0===Rr||!(u instanceof Rr.ErrnoError))throw u;return u.errno}},Q:function(r,t,e,n){try{var o=zr.getStreamFromFD(r),i=zr.doWritev(o,t,e);return I[n>>2]=i,0}catch(a){if(void 0===Rr||!(a instanceof Rr.ErrnoError))throw a;return a.errno}},a:function(){return M()},w:function(r,t){var e=tt();try{return yr(r)(t)}catch(n){if(et(e),n!==n+0&&"longjmp"!==n)throw n;rt(1,0)}},L:function(r,t,e,n){var o=tt();try{return yr(r)(t,e,n)}catch(i){if(et(o),i!==i+0&&"longjmp"!==i)throw i;rt(1,0)}},M:function(r,t,e,n){var o=tt();try{return yr(r)(t,e,n)}catch(i){if(et(o),i!==i+0&&"longjmp"!==i)throw i;rt(1,0)}},r:function(r){var t=tt();try{return yr(r)()}catch(e){if(et(t),e!==e+0&&"longjmp"!==e)throw e;rt(1,0)}},i:function(r,t){var e=tt();try{return yr(r)(t)}catch(n){if(et(e),n!==n+0&&"longjmp"!==n)throw n;rt(1,0)}},d:function(r,t,e){var n=tt();try{return yr(r)(t,e)}catch(o){if(et(n),o!==o+0&&"longjmp"!==o)throw o;rt(1,0)}},h:function(r,t,e,n){var o=tt();try{return yr(r)(t,e,n)}catch(i){if(et(o),i!==i+0&&"longjmp"!==i)throw i;rt(1,0)}},j:function(r,t,e,n,o){var i=tt();try{return yr(r)(t,e,n,o)}catch(a){if(et(i),a!==a+0&&"longjmp"!==a)throw a;rt(1,0)}},u:function(r,t,e,n,o,i){var a=tt();try{return yr(r)(t,e,n,o,i)}catch(u){if(et(a),u!==u+0&&"longjmp"!==u)throw u;rt(1,0)}},x:function(r,t,e,n,o,i,a){var u=tt();try{return yr(r)(t,e,n,o,i,a)}catch(s){if(et(u),s!==s+0&&"longjmp"!==s)throw s;rt(1,0)}},N:function(r,t,e,n,o,i,a,u){var s=tt();try{return yr(r)(t,e,n,o,i,a,u)}catch(c){if(et(s),c!==c+0&&"longjmp"!==c)throw c;rt(1,0)}},Ka:function(r,t,e,n,o,i,a,u,s,c,f){var l=tt();try{return yr(r)(t,e,n,o,i,a,u,s,c,f)}catch(d){if(et(l),d!==d+0&&"longjmp"!==d)throw d;rt(1,0)}},E:function(r,t,e,n,o,i,a,u,s,c,f,l){var d=tt();try{return yr(r)(t,e,n,o,i,a,u,s,c,f,l)}catch(m){if(et(d),m!==m+0&&"longjmp"!==m)throw m;rt(1,0)}},T:function(r,t,e,n,o,i,a,u,s,c,f,l,d){var m=tt();try{return yr(r)(t,e,n,o,i,a,u,s,c,f,l,d)}catch(h){if(et(m),h!==h+0&&"longjmp"!==h)throw h;rt(1,0)}},X:function(r,t,e,n,o,i,a,u,s){var c=tt();try{return Et(r,t,e,n,o,i,a,u,s)}catch(f){if(et(c),f!==f+0&&"longjmp"!==f)throw f;rt(1,0)}},ia:function(r,t,e,n,o,i){var a=tt();try{return ct(r,t,e,n,o,i)}catch(u){if(et(a),u!==u+0&&"longjmp"!==u)throw u;rt(1,0)}},ha:function(r,t,e,n,o,i,a,u){var s=tt();try{return ft(r,t,e,n,o,i,a,u)}catch(c){if(et(s),c!==c+0&&"longjmp"!==c)throw c;rt(1,0)}},_:function(r,t,e,n){var o=tt();try{return yt(r,t,e,n)}catch(i){if(et(o),i!==i+0&&"longjmp"!==i)throw i;rt(1,0)}},W:function(r,t,e,n,o){var i=tt();try{return bt(r,t,e,n,o)}catch(a){if(et(i),a!==a+0&&"longjmp"!==a)throw a;rt(1,0)}},l:function(r){var t=tt();try{yr(r)()}catch(e){if(et(t),e!==e+0&&"longjmp"!==e)throw e;rt(1,0)}},p:function(r,t){var e=tt();try{yr(r)(t)}catch(n){if(et(e),n!==n+0&&"longjmp"!==n)throw n;rt(1,0)}},z:function(r,t,e){var n=tt();try{yr(r)(t,e)}catch(o){if(et(n),o!==o+0&&"longjmp"!==o)throw o;rt(1,0)}},aa:function(r,t,e,n,o,i,a){var u=tt();try{pt(r,t,e,n,o,i,a)}catch(s){if(et(u),s!==s+0&&"longjmp"!==s)throw s;rt(1,0)}},e:function(r,t,e){var n=tt();try{yr(r)(t,e)}catch(o){if(et(n),o!==o+0&&"longjmp"!==o)throw o;rt(1,0)}},f:function(r,t,e,n){var o=tt();try{yr(r)(t,e,n)}catch(i){if(et(o),i!==i+0&&"longjmp"!==i)throw i;rt(1,0)}},H:function(r,t,e,n,o,i,a,u,s,c,f,l){var d=tt();try{yr(r)(t,e,n,o,i,a,u,s,c,f,l)}catch(m){if(et(d),m!==m+0&&"longjmp"!==m)throw m;rt(1,0)}},n:function(r,t,e,n,o){var i=tt();try{yr(r)(t,e,n,o)}catch(a){if(et(i),a!==a+0&&"longjmp"!==a)throw a;rt(1,0)}},o:function(r,t,e,n,o,i){var a=tt();try{yr(r)(t,e,n,o,i)}catch(u){if(et(a),u!==u+0&&"longjmp"!==u)throw u;rt(1,0)}},Ja:function(r,t,e,n,o,i,a){var u=tt();try{yr(r)(t,e,n,o,i,a)}catch(s){if(et(u),s!==s+0&&"longjmp"!==s)throw s;rt(1,0)}},y:function(r,t,e,n,o,i,a,u){var s=tt();try{yr(r)(t,e,n,o,i,a,u)}catch(c){if(et(s),c!==c+0&&"longjmp"!==c)throw c;rt(1,0)}},U:function(r,t,e,n,o,i,a,u,s){var c=tt();try{yr(r)(t,e,n,o,i,a,u,s)}catch(f){if(et(c),f!==f+0&&"longjmp"!==f)throw f;rt(1,0)}},A:function(r,t,e,n,o,i,a,u,s,c,f){var l=tt();try{yr(r)(t,e,n,o,i,a,u,s,c,f)}catch(d){if(et(l),d!==d+0&&"longjmp"!==d)throw d;rt(1,0)}},D:function(r,t,e,n,o,i,a,u,s,c,f,l,d,m,h,p){var w=tt();try{yr(r)(t,e,n,o,i,a,u,s,c,f,l,d,m,h,p)}catch(v){if(et(w),v!==v+0&&"longjmp"!==v)throw v;rt(1,0)}},da:function(r,t,e,n,o,i,a){var u=tt();try{ht(r,t,e,n,o,i,a)}catch(s){if(et(u),s!==s+0&&"longjmp"!==s)throw s;rt(1,0)}},ea:function(r,t,e,n,o,i,a,u){var s=tt();try{mt(r,t,e,n,o,i,a,u)}catch(c){if(et(s),c!==c+0&&"longjmp"!==c)throw c;rt(1,0)}},ba:function(r,t,e,n,o,i,a,u,s){var c=tt();try{wt(r,t,e,n,o,i,a,u,s)}catch(f){if(et(c),f!==f+0&&"longjmp"!==f)throw f;rt(1,0)}},ca:function(r,t,e,n,o,i,a,u,s,c,f,l){var d=tt();try{vt(r,t,e,n,o,i,a,u,s,c,f,l)}catch(m){if(et(d),m!==m+0&&"longjmp"!==m)throw m;rt(1,0)}},ka:function(r,t,e,n,o,i,a,u){var s=tt();try{ut(r,t,e,n,o,i,a,u)}catch(c){if(et(s),c!==c+0&&"longjmp"!==c)throw c;rt(1,0)}},fa:function(r,t,e,n,o,i,a,u,s){var c=tt();try{dt(r,t,e,n,o,i,a,u,s)}catch(f){if(et(c),f!==f+0&&"longjmp"!==f)throw f;rt(1,0)}},ja:function(r,t,e,n,o,i,a,u,s,c){var f=tt();try{st(r,t,e,n,o,i,a,u,s,c)}catch(l){if(et(f),l!==l+0&&"longjmp"!==l)throw l;rt(1,0)}},$:function(r,t,e,n){var o=tt();try{gt(r,t,e,n)}catch(i){if(et(o),i!==i+0&&"longjmp"!==i)throw i;rt(1,0)}},ga:function(r,t,e,n,o,i){var a=tt();try{lt(r,t,e,n,o,i)}catch(u){if(et(a),u!==u+0&&"longjmp"!==u)throw u;rt(1,0)}},Z:function(r,t,e,n,o,i,a){var u=tt();try{_t(r,t,e,n,o,i,a)}catch(s){if(et(u),s!==s+0&&"longjmp"!==s)throw s;rt(1,0)}},la:function(r,t,e,n,o,i,a,u,s,c){var f=tt();try{at(r,t,e,n,o,i,a,u,s,c)}catch(l){if(et(f),l!==l+0&&"longjmp"!==l)throw l;rt(1,0)}},t:function(r){return r},Ea:function(r){Mr();var t=new Date(I[r+20>>2]+1900,I[r+16>>2],I[r+12>>2],I[r+8>>2],I[r+4>>2],I[r>>2],0),e=I[r+32>>2],n=t.getTimezoneOffset(),o=new Date(t.getFullYear(),0,1),i=new Date(t.getFullYear(),6,1).getTimezoneOffset(),a=o.getTimezoneOffset(),u=Math.min(a,i);if(e<0)I[r+32>>2]=Number(i!=a&&u==n);else if(e>0!=(u==n)){var s=Math.max(a,i),c=e>0?u:s;t.setTime(t.getTime()+6e4*(c-n))}I[r+24>>2]=t.getDay();var f=(t.getTime()-o.getTime())/864e5|0;return I[r+28>>2]=f,I[r>>2]=t.getSeconds(),I[r+4>>2]=t.getMinutes(),I[r+8>>2]=t.getHours(),I[r+12>>2]=t.getDate(),I[r+16>>2]=t.getMonth(),t.getTime()/1e3|0},C:function(r){F(r)},Ia:Yr,na:function(r,t,e,n){return Yr(r,t,e,n)},Ga:function(r){if(E){if(!r)return 1;var t=H(r);if(!t.length)return 0;var e=require("child_process").spawnSync(t,[],{shell:!0,stdio:"inherit"}),n=(r,t)=>r<<8|t;return null===e.status?n(0,(r=>{switch(r){case"SIGHUP":return 1;case"SIGINT":return 2;case"SIGQUIT":return 3;case"SIGFPE":return 8;case"SIGKILL":return 9;case"SIGALRM":return 14;case"SIGTERM":return 15}return 2})(e.signal)):n(e.status,0)}return r?(Er(52),-1):0},F:function(r){var t=Date.now()/1e3|0;return r&&(I[r>>2]=t),t}},Vr=(function(){var r={a:Xr};function t(r,t){var e,n,o=r.exports;u.asm=o,A=u.asm.La,e=A.buffer,z=e,u.HEAP8=O=new Int8Array(e),u.HEAP16=N=new Int16Array(e),u.HEAP32=I=new Int32Array(e),u.HEAPU8=B=new Uint8Array(e),u.HEAPU16=new Uint16Array(e),u.HEAPU32=new Uint32Array(e),u.HEAPF32=new Float32Array(e),u.HEAPF64=new Float64Array(e),K=u.asm.Pa,n=u.asm.Ma,$.unshift(n),ur()}function e(r){t(r.instance)}function n(t){return function(){if(!D&&(y||_)){if("function"==typeof fetch&&!wr(cr))return fetch(cr,{credentials:"same-origin"}).then(function(r){if(!r.ok)throw"failed to load wasm binary file at '"+cr+"'";return r.arrayBuffer()}).catch(function(){return vr(cr)});if(f)return new Promise(function(r,t){f(cr,function(t){r(new Uint8Array(t))},t)})}return Promise.resolve().then(function(){return vr(cr)})}().then(function(t){return WebAssembly.instantiate(t,r)}).then(function(r){return r}).then(t,function(r){j("failed to asynchronously prepare wasm: "+r),sr(r)})}if(ar(),u.instantiateWasm)try{return u.instantiateWasm(r,t)}catch(o){return j("Module.instantiateWasm callback failed with error: "+o),!1}(D||"function"!=typeof WebAssembly.instantiateStreaming||pr(cr)||wr(cr)||"function"!=typeof fetch?n(e):fetch(cr,{credentials:"same-origin"}).then(function(t){return WebAssembly.instantiateStreaming(t,r).then(e,function(r){return j("wasm streaming compile failed: "+r),j("falling back to ArrayBuffer instantiation"),n(e)})})).catch(a)}(),u.___wasm_call_ctors=function(){return(u.___wasm_call_ctors=u.asm.Ma).apply(null,arguments)},u._create_compile_result=function(){return(u._create_compile_result=u.asm.Na).apply(null,arguments)},u._main=function(){return(u._main=u.asm.Oa).apply(null,arguments)},u._free=function(){return(Vr=u._free=u.asm.Qa).apply(null,arguments)}),Kr=u._malloc=function(){return(Kr=u._malloc=u.asm.Ra).apply(null,arguments)},Jr=u.___errno_location=function(){return(Jr=u.___errno_location=u.asm.Sa).apply(null,arguments)},$r=u.__get_tzname=function(){return($r=u.__get_tzname=u.asm.Ta).apply(null,arguments)},Zr=u.__get_daylight=function(){return(Zr=u.__get_daylight=u.asm.Ua).apply(null,arguments)},Qr=u.__get_timezone=function(){return(Qr=u.__get_timezone=u.asm.Va).apply(null,arguments)},rt=u._setThrew=function(){return(rt=u._setThrew=u.asm.Wa).apply(null,arguments)},tt=u.stackSave=function(){return(tt=u.stackSave=u.asm.Xa).apply(null,arguments)},et=u.stackRestore=function(){return(et=u.stackRestore=u.asm.Ya).apply(null,arguments)},nt=u.stackAlloc=function(){return(nt=u.stackAlloc=u.asm.Za).apply(null,arguments)},ot=u.___cxa_can_catch=function(){return(ot=u.___cxa_can_catch=u.asm._a).apply(null,arguments)},it=u.___cxa_is_pointer_type=function(){return(it=u.___cxa_is_pointer_type=u.asm.$a).apply(null,arguments)},at=u.dynCall_vijjjj=function(){return(at=u.dynCall_vijjjj=u.asm.ab).apply(null,arguments)},ut=u.dynCall_viijji=function(){return(ut=u.dynCall_viijji=u.asm.bb).apply(null,arguments)},st=u.dynCall_viijjiii=function(){return(st=u.dynCall_viijjiii=u.asm.cb).apply(null,arguments)},ct=u.dynCall_iijj=function(){return(ct=u.dynCall_iijj=u.asm.db).apply(null,arguments)},ft=u.dynCall_iijjii=function(){return(ft=u.dynCall_iijjii=u.asm.eb).apply(null,arguments)},lt=u.dynCall_vijj=function(){return(lt=u.dynCall_vijj=u.asm.fb).apply(null,arguments)},dt=u.dynCall_viijjii=function(){return(dt=u.dynCall_viijjii=u.asm.gb).apply(null,arguments)},mt=u.dynCall_viijjd=function(){return(mt=u.dynCall_viijjd=u.asm.hb).apply(null,arguments)},ht=u.dynCall_viijj=function(){return(ht=u.dynCall_viijj=u.asm.ib).apply(null,arguments)},pt=u.dynCall_vidjj=function(){return(pt=u.dynCall_vidjj=u.asm.jb).apply(null,arguments)},wt=u.dynCall_viijjdi=function(){return(wt=u.dynCall_viijjdi=u.asm.kb).apply(null,arguments)},vt=u.dynCall_viijjdjj=function(){return(vt=u.dynCall_viijjdjj=u.asm.lb).apply(null,arguments)},gt=u.dynCall_vij=function(){return(gt=u.dynCall_vij=u.asm.mb).apply(null,arguments)},yt=u.dynCall_jiii=function(){return(yt=u.dynCall_jiii=u.asm.nb).apply(null,arguments)},_t=u.dynCall_vijji=function(){return(_t=u.dynCall_vijji=u.asm.ob).apply(null,arguments)},Et=u.dynCall_iiiiijj=function(){return(Et=u.dynCall_iiiiijj=u.asm.pb).apply(null,arguments)},bt=u.dynCall_jiiii=function(){return(bt=u.dynCall_jiiii=u.asm.qb).apply(null,arguments)};function kt(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}u.cwrap=function(r,t,e,n){var o=(e=e||[]).every(function(r){return"number"===r});return"string"!==t&&o&&!n?C(r):function(){return R(r,t,e,arguments)}},u.UTF8ToString=H,u.FS=Rr;function jt(r){var t=u._main,e=(r=r||[]).length+1,n=nt(4*(e+1));I[n>>2]=X(v);for(var o=1;o<e;o++)I[(n>>2)+o]=X(r[o-1]);I[(n>>2)+e]=0;try{var i=t(e,n);return St(i,!0),i}catch(a){return function(r){if(r instanceof kt||"unwind"==r)return T;g(1,r)}(a)}finally{!0}}function Dt(r){function t(){Gr||(Gr=!0,u.calledRun=!0,x||(!0,u.noFSInit||Rr.init.initialized||Rr.init(),Rr.ignorePermissions=!1,Tr.init(),gr($),gr(Z),i(u),u.onRuntimeInitialized&&u.onRuntimeInitialized(),Ft&&jt(r),function(){if(u.postRun)for("function"==typeof u.postRun&&(u.postRun=[u.postRun]);u.postRun.length;)r=u.postRun.shift(),Q.unshift(r);var r;gr(Q)}()))}r=r||w,er>0||(!function(){if(u.preRun)for("function"==typeof u.preRun&&(u.preRun=[u.preRun]);u.preRun.length;)r=u.preRun.shift(),J.unshift(r);var r;gr(J)}(),er>0||(u.setStatus?(u.setStatus("Running..."),setTimeout(function(){setTimeout(function(){u.setStatus("")},1),t()},1)):t()))}function St(r,t){T=r,tr()||!0,function(r){T=r,tr()||(u.onExit&&u.onExit(r),x=!0);g(r,new kt(r))}(r)}if(or=function r(){Gr||Dt(),Gr||(or=r)},u.run=Dt,u.preInit)for("function"==typeof u.preInit&&(u.preInit=[u.preInit]);u.preInit.length>0;)u.preInit.pop()();var Ft=!0;return u.noInitialRun&&(Ft=!1),Dt(),t.ready}})();"object"==typeof exports&&"object"==typeof module?module.exports=i:"function"==typeof r&&r.amd?r([],function(){return i}):"object"==typeof exports&&(exports.startWerckmeisterJs=i);
490
+ var r,t="/home/runner/work/werckmeister-component/werckmeister-component/node_modules/@werckmeister/compilerjs/werckmeister.js",e=require("process"),n="/home/runner/work/werckmeister-component/werckmeister-component/node_modules/@werckmeister/compilerjs",o=require("buffer").Buffer,a=(()=>{var r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return void 0!==t&&(r=r||t),function(t){var a,i,s=void 0!==(t=t||{})?t:{},u=Object.assign;s.ready=new Promise(function(r,t){a=r,i=t});var c,l,f,d,h,m,p=u({},s),w=[],v="./this.program",g=(r,t)=>{throw t},y="object"==typeof window,_="function"==typeof importScripts,E="object"==typeof e&&"object"==typeof e.versions&&"string"==typeof e.versions.node,b="";E?(b=_?require("path").dirname(b)+"/":n+"/",m=(()=>{h||(d=require("fs"),h=require("path"))}),c=function(r,t){return m(),r=h.normalize(r),d.readFileSync(r,t?null:"utf8")},f=(r=>{var t=c(r,!0);return t.buffer||(t=new Uint8Array(t)),t}),l=((r,t,e)=>{m(),r=h.normalize(r),d.readFile(r,function(r,n){r?e(r):t(n.buffer)})}),e.argv.length>1&&(v=e.argv[1].replace(/\\/g,"/")),w=e.argv.slice(2),e.on("uncaughtException",function(r){if(!(r instanceof yt))throw r}),e.on("unhandledRejection",function(r){throw r}),g=((r,t)=>{if(tr())throw e.exitCode=r,t;!function(r){if(r instanceof yt)return;j("exiting due to exception: "+r)}(t),e.exit(r)}),s.inspect=function(){return"[Emscripten Module object]"}):(y||_)&&(_?b=self.location.href:"undefined"!=typeof document&&document.currentScript&&(b=document.currentScript.src),r&&(b=r),b=0!==b.indexOf("blob:")?b.substr(0,b.replace(/[?#].*/,"").lastIndexOf("/")+1):"",c=(r=>{var t=new XMLHttpRequest;return t.open("GET",r,!1),t.send(null),t.responseText}),_&&(f=(r=>{var t=new XMLHttpRequest;return t.open("GET",r,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)})),l=((r,t,e)=>{var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=(()=>{200==n.status||0==n.status&&n.response?t(n.response):e()}),n.onerror=e,n.send(null)}));var k=s.print||console.log.bind(console),j=s.printErr||console.warn.bind(console);u(s,p),p=null,s.arguments&&(w=s.arguments),s.thisProgram&&(v=s.thisProgram),s.quit&&(g=s.quit);var D,S=0,F=r=>{S=r},M=()=>S;s.wasmBinary&&(D=s.wasmBinary);var A,P=s.noExitRuntime||!0;"object"!=typeof WebAssembly&&ur("no native wasm support detected");var T,x=!1;function C(r){return s["_"+r]}function R(r,t,e,n,o){var a={string:function(r){var t=0;if(null!=r&&0!==r){var e=1+(r.length<<2);q(r,t=Qr(e),e)}return t},array:function(r){var t=Qr(r.length);return V(r,t),t}};var i=C(r),s=[],u=0;if(n)for(var c=0;c<n.length;c++){var l=a[e[c]];l?(0===u&&(u=$r()),s[c]=l(n[c])):s[c]=n[c]}var f=i.apply(null,s);return f=function(r){return 0!==u&&Zr(u),function(r){return"string"===t?H(r):"boolean"===t?Boolean(r):r}(r)}(f)}var z,O,B,N,I,U="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function L(r,t,e){for(var n=t+e,o=t;r[o]&&!(o>=n);)++o;if(o-t>16&&r.subarray&&U)return U.decode(r.subarray(t,o));for(var a="";t<o;){var i=r[t++];if(128&i){var s=63&r[t++];if(192!=(224&i)){var u=63&r[t++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&r[t++])<65536)a+=String.fromCharCode(i);else{var c=i-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a}function H(r,t){return r?L(B,r,t):""}function Y(r,t,e,n){if(!(n>0))return 0;for(var o=e,a=e+n-1,i=0;i<r.length;++i){var s=r.charCodeAt(i);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&r.charCodeAt(++i);if(s<=127){if(e>=a)break;t[e++]=s}else if(s<=2047){if(e+1>=a)break;t[e++]=192|s>>6,t[e++]=128|63&s}else if(s<=65535){if(e+2>=a)break;t[e++]=224|s>>12,t[e++]=128|s>>6&63,t[e++]=128|63&s}else{if(e+3>=a)break;t[e++]=240|s>>18,t[e++]=128|s>>12&63,t[e++]=128|s>>6&63,t[e++]=128|63&s}}return t[e]=0,e-o}function q(r,t,e){return Y(r,B,t,e)}function W(r){for(var t=0,e=0;e<r.length;++e){var n=r.charCodeAt(e);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&r.charCodeAt(++e)),n<=127?++t:t+=n<=2047?2:n<=65535?3:4}return t}function G(r){var t=W(r)+1,e=Vr(t);return e&&Y(r,O,e,t),e}function X(r){var t=W(r)+1,e=Qr(t);return Y(r,O,e,t),e}function V(r,t){O.set(r,t)}s.INITIAL_MEMORY;var K,J=[],$=[],Z=[],Q=[],rr=0;function tr(){return P||rr>0}var er=0,nr=null,or=null;function ar(r){return r}function ir(r){er++,s.monitorRunDependencies&&s.monitorRunDependencies(er)}function sr(r){if(er--,s.monitorRunDependencies&&s.monitorRunDependencies(er),0==er&&(null!==nr&&(clearInterval(nr),nr=null),or)){var t=or;or=null,t()}}function ur(r){s.onAbort&&s.onAbort(r),j(r="Aborted("+r+")"),x=!0,T=1,r+=". Build with -s ASSERTIONS=1 for more info.";var t=new WebAssembly.RuntimeError(r);throw i(t),t}s.preloadedImages={},s.preloadedAudios={};var cr,lr,fr,dr,hr,mr="data:application/octet-stream;base64,";function pr(r){return r.startsWith(mr)}function wr(r){return r.startsWith("file://")}function vr(r){try{if(r==cr&&D)return new Uint8Array(D);if(f)return f(r);throw"both async and sync fetching of the wasm failed"}catch(j){ur(j)}}function gr(r){for(;r.length>0;){var t=r.shift();if("function"!=typeof t){var e=t.func;"number"==typeof e?void 0===t.arg?yr(e)():yr(e)(t.arg):e(void 0===t.arg?null:t.arg)}else t(s)}}function yr(r){return K.get(r)}pr(cr="werckmeister.wasm")||(lr=cr,cr=s.locateFile?s.locateFile(lr,b):b+lr),hr=E?()=>{var r=e.hrtime();return 1e3*r[0]+r[1]/1e6}:()=>performance.now();var _r=!0;function Er(r){return I[Kr()>>2]=r,r}function br(r){this.excPtr=r,this.ptr=r-16,this.set_type=function(r){I[this.ptr+4>>2]=r},this.get_type=function(){return I[this.ptr+4>>2]},this.set_destructor=function(r){I[this.ptr+8>>2]=r},this.get_destructor=function(){return I[this.ptr+8>>2]},this.set_refcount=function(r){I[this.ptr>>2]=r},this.set_caught=function(r){r=r?1:0,O[this.ptr+12>>0]=r},this.get_caught=function(){return 0!=O[this.ptr+12>>0]},this.set_rethrown=function(r){r=r?1:0,O[this.ptr+13>>0]=r},this.get_rethrown=function(){return 0!=O[this.ptr+13>>0]},this.init=function(r,t){this.set_type(r),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var r=I[this.ptr>>2];I[this.ptr>>2]=r+1},this.release_ref=function(){var r=I[this.ptr>>2];return I[this.ptr>>2]=r-1,1===r}}function kr(r){this.free=function(){Xr(this.ptr),this.ptr=0},this.set_base_ptr=function(r){I[this.ptr>>2]=r},this.get_base_ptr=function(){return I[this.ptr>>2]},this.set_adjusted_ptr=function(r){I[this.ptr+4>>2]=r},this.get_adjusted_ptr_addr=function(){return this.ptr+4},this.get_adjusted_ptr=function(){return I[this.ptr+4>>2]},this.get_exception_ptr=function(){if(tt(this.get_exception_info().get_type()))return I[this.get_base_ptr()>>2];var r=this.get_adjusted_ptr();return 0!==r?r:this.get_base_ptr()},this.get_exception_info=function(){return new br(this.get_base_ptr())},void 0===r?(this.ptr=Vr(8),this.set_adjusted_ptr(0)):this.ptr=r}var jr=[];var Dr=0;var Sr=0;function Fr(r){try{return Xr(new br(r).ptr)}catch(t){}}var Mr={splitPath:function(r){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(r).slice(1)},normalizeArray:function(r,t){for(var e=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),e++):e&&(r.splice(n,1),e--)}if(t)for(;e;e--)r.unshift("..");return r},normalize:function(r){var t="/"===r.charAt(0),e="/"===r.substr(-1);return(r=Mr.normalizeArray(r.split("/").filter(function(r){return!!r}),!t).join("/"))||t||(r="."),r&&e&&(r+="/"),(t?"/":"")+r},dirname:function(r){var t=Mr.splitPath(r),e=t[0],n=t[1];return e||n?(n&&(n=n.substr(0,n.length-1)),e+n):"."},basename:function(r){if("/"===r)return"/";var t=(r=(r=Mr.normalize(r)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?r:r.substr(t+1)},extname:function(r){return Mr.splitPath(r)[3]},join:function(){var r=Array.prototype.slice.call(arguments,0);return Mr.normalize(r.join("/"))},join2:function(r,t){return Mr.normalize(r+"/"+t)}};var Ar={resolve:function(){for(var r="",t=!1,e=arguments.length-1;e>=-1&&!t;e--){var n=e>=0?arguments[e]:Cr.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,t="/"===n.charAt(0)}return(t?"/":"")+(r=Mr.normalizeArray(r.split("/").filter(function(r){return!!r}),!t).join("/"))||"."},relative:function(r,t){function e(r){for(var t=0;t<r.length&&""===r[t];t++);for(var e=r.length-1;e>=0&&""===r[e];e--);return t>e?[]:r.slice(t,e-t+1)}r=Ar.resolve(r).substr(1),t=Ar.resolve(t).substr(1);for(var n=e(r.split("/")),o=e(t.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var u=[];for(s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}},Pr={ttys:[],init:function(){},shutdown:function(){},register:function(r,t){Pr.ttys[r]={input:[],output:[],ops:t},Cr.registerDevice(r,Pr.stream_ops)},stream_ops:{open:function(r){var t=Pr.ttys[r.node.rdev];if(!t)throw new Cr.ErrnoError(43);r.tty=t,r.seekable=!1},close:function(r){r.tty.ops.flush(r.tty)},flush:function(r){r.tty.ops.flush(r.tty)},read:function(r,t,e,n,o){if(!r.tty||!r.tty.ops.get_char)throw new Cr.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(u){throw new Cr.ErrnoError(29)}if(void 0===s&&0===a)throw new Cr.ErrnoError(6);if(null==s)break;a++,t[e+i]=s}return a&&(r.node.timestamp=Date.now()),a},write:function(r,t,e,n,o){if(!r.tty||!r.tty.ops.put_char)throw new Cr.ErrnoError(60);try{for(var a=0;a<n;a++)r.tty.ops.put_char(r.tty,t[e+a])}catch(i){throw new Cr.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(r){if(!r.input.length){var t=null;if(E){var n=o.alloc(256),a=0;try{a=d.readSync(e.stdin.fd,n,0,256,null)}catch(i){if(!i.toString().includes("EOF"))throw i;a=0}t=a>0?n.slice(0,a).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n");if(!t)return null;r.input=qr(t,!0)}return r.input.shift()},put_char:function(r,t){null===t||10===t?(k(L(r.output,0)),r.output=[]):0!=t&&r.output.push(t)},flush:function(r){r.output&&r.output.length>0&&(k(L(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,t){null===t||10===t?(j(L(r.output,0)),r.output=[]):0!=t&&r.output.push(t)},flush:function(r){r.output&&r.output.length>0&&(j(L(r.output,0)),r.output=[])}}};var Tr={ops_table:null,mount:function(r){return Tr.createNode(null,"/",16895,0)},createNode:function(r,t,e,n){if(Cr.isBlkdev(e)||Cr.isFIFO(e))throw new Cr.ErrnoError(63);Tr.ops_table||(Tr.ops_table={dir:{node:{getattr:Tr.node_ops.getattr,setattr:Tr.node_ops.setattr,lookup:Tr.node_ops.lookup,mknod:Tr.node_ops.mknod,rename:Tr.node_ops.rename,unlink:Tr.node_ops.unlink,rmdir:Tr.node_ops.rmdir,readdir:Tr.node_ops.readdir,symlink:Tr.node_ops.symlink},stream:{llseek:Tr.stream_ops.llseek}},file:{node:{getattr:Tr.node_ops.getattr,setattr:Tr.node_ops.setattr},stream:{llseek:Tr.stream_ops.llseek,read:Tr.stream_ops.read,write:Tr.stream_ops.write,allocate:Tr.stream_ops.allocate,mmap:Tr.stream_ops.mmap,msync:Tr.stream_ops.msync}},link:{node:{getattr:Tr.node_ops.getattr,setattr:Tr.node_ops.setattr,readlink:Tr.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Tr.node_ops.getattr,setattr:Tr.node_ops.setattr},stream:Cr.chrdev_stream_ops}});var o=Cr.createNode(r,t,e,n);return Cr.isDir(o.mode)?(o.node_ops=Tr.ops_table.dir.node,o.stream_ops=Tr.ops_table.dir.stream,o.contents={}):Cr.isFile(o.mode)?(o.node_ops=Tr.ops_table.file.node,o.stream_ops=Tr.ops_table.file.stream,o.usedBytes=0,o.contents=null):Cr.isLink(o.mode)?(o.node_ops=Tr.ops_table.link.node,o.stream_ops=Tr.ops_table.link.stream):Cr.isChrdev(o.mode)&&(o.node_ops=Tr.ops_table.chrdev.node,o.stream_ops=Tr.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[t]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(r,t){var e=r.contents?r.contents.length:0;if(!(e>=t)){t=Math.max(t,e*(e<1048576?2:1.125)>>>0),0!=e&&(t=Math.max(t,256));var n=r.contents;r.contents=new Uint8Array(t),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,t){if(r.usedBytes!=t)if(0==t)r.contents=null,r.usedBytes=0;else{var e=r.contents;r.contents=new Uint8Array(t),e&&r.contents.set(e.subarray(0,Math.min(t,r.usedBytes))),r.usedBytes=t}},node_ops:{getattr:function(r){var t={};return t.dev=Cr.isChrdev(r.mode)?r.id:1,t.ino=r.id,t.mode=r.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=r.rdev,Cr.isDir(r.mode)?t.size=4096:Cr.isFile(r.mode)?t.size=r.usedBytes:Cr.isLink(r.mode)?t.size=r.link.length:t.size=0,t.atime=new Date(r.timestamp),t.mtime=new Date(r.timestamp),t.ctime=new Date(r.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(r,t){void 0!==t.mode&&(r.mode=t.mode),void 0!==t.timestamp&&(r.timestamp=t.timestamp),void 0!==t.size&&Tr.resizeFileStorage(r,t.size)},lookup:function(r,t){throw Cr.genericErrors[44]},mknod:function(r,t,e,n){return Tr.createNode(r,t,e,n)},rename:function(r,t,e){if(Cr.isDir(r.mode)){var n;try{n=Cr.lookupNode(t,e)}catch(a){}if(n)for(var o in n.contents)throw new Cr.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=e,t.contents[e]=r,t.timestamp=r.parent.timestamp,r.parent=t},unlink:function(r,t){delete r.contents[t],r.timestamp=Date.now()},rmdir:function(r,t){var e=Cr.lookupNode(r,t);for(var n in e.contents)throw new Cr.ErrnoError(55);delete r.contents[t],r.timestamp=Date.now()},readdir:function(r){var t=[".",".."];for(var e in r.contents)r.contents.hasOwnProperty(e)&&t.push(e);return t},symlink:function(r,t,e){var n=Tr.createNode(r,t,41471,0);return n.link=e,n},readlink:function(r){if(!Cr.isLink(r.mode))throw new Cr.ErrnoError(28);return r.link}},stream_ops:{read:function(r,t,e,n,o){var a=r.node.contents;if(o>=r.node.usedBytes)return 0;var i=Math.min(r.node.usedBytes-o,n);if(i>8&&a.subarray)t.set(a.subarray(o,o+i),e);else for(var s=0;s<i;s++)t[e+s]=a[o+s];return i},write:function(r,t,e,n,o,a){if(!n)return 0;var i=r.node;if(i.timestamp=Date.now(),t.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=t.subarray(e,e+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=t.slice(e,e+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(t.subarray(e,e+n),o),n}if(Tr.expandFileStorage(i,o+n),i.contents.subarray&&t.subarray)i.contents.set(t.subarray(e,e+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=t[e+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek:function(r,t,e){var n=t;if(1===e?n+=r.position:2===e&&Cr.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new Cr.ErrnoError(28);return n},allocate:function(r,t,e){Tr.expandFileStorage(r.node,t+e),r.node.usedBytes=Math.max(r.node.usedBytes,t+e)},mmap:function(r,t,e,n,o,a){if(0!==t)throw new Cr.ErrnoError(28);if(!Cr.isFile(r.node.mode))throw new Cr.ErrnoError(43);var i,s,u=r.node.contents;if(2&a||u.buffer!==z){if((n>0||n+e<u.length)&&(u=u.subarray?u.subarray(n,n+e):Array.prototype.slice.call(u,n,n+e)),s=!0,!(i=void ur()))throw new Cr.ErrnoError(48);O.set(u,i)}else s=!1,i=u.byteOffset;return{ptr:i,allocated:s}},msync:function(r,t,e,n,o){if(!Cr.isFile(r.node.mode))throw new Cr.ErrnoError(43);if(2&o)return 0;Tr.stream_ops.write(r,t,0,n,e,!1);return 0}}};function xr(r,t,e,n){var o=n?"":ar("al "+r);l(r,function(e){var n;n='Loading data file "'+r+'" failed (no arrayBuffer).',e||ur(n),t(new Uint8Array(e)),o&&sr()},function(t){if(!e)throw'Loading data file "'+r+'" failed.';e()}),o&&ir()}var Cr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(r,t={})=>{if(!(r=Ar.resolve(Cr.cwd(),r)))return{path:"",node:null};var e={follow_mount:!0,recurse_count:0};for(var n in e)void 0===t[n]&&(t[n]=e[n]);if(t.recurse_count>8)throw new Cr.ErrnoError(32);for(var o=Mr.normalizeArray(r.split("/").filter(r=>!!r),!1),a=Cr.root,i="/",s=0;s<o.length;s++){var u=s===o.length-1;if(u&&t.parent)break;if(a=Cr.lookupNode(a,o[s]),i=Mr.join2(i,o[s]),Cr.isMountpoint(a)&&(!u||u&&t.follow_mount)&&(a=a.mounted.root),!u||t.follow)for(var c=0;Cr.isLink(a.mode);){var l=Cr.readlink(i);if(i=Ar.resolve(Mr.dirname(i),l),a=Cr.lookupPath(i,{recurse_count:t.recurse_count}).node,c++>40)throw new Cr.ErrnoError(32)}}return{path:i,node:a}},getPath:r=>{for(var t;;){if(Cr.isRoot(r)){var e=r.mount.mountpoint;return t?"/"!==e[e.length-1]?e+"/"+t:e+t:e}t=t?r.name+"/"+t:r.name,r=r.parent}},hashName:(r,t)=>{for(var e=0,n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n)|0;return(r+e>>>0)%Cr.nameTable.length},hashAddNode:r=>{var t=Cr.hashName(r.parent.id,r.name);r.name_next=Cr.nameTable[t],Cr.nameTable[t]=r},hashRemoveNode:r=>{var t=Cr.hashName(r.parent.id,r.name);if(Cr.nameTable[t]===r)Cr.nameTable[t]=r.name_next;else for(var e=Cr.nameTable[t];e;){if(e.name_next===r){e.name_next=r.name_next;break}e=e.name_next}},lookupNode:(r,t)=>{var e=Cr.mayLookup(r);if(e)throw new Cr.ErrnoError(e,r);for(var n=Cr.hashName(r.id,t),o=Cr.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===r.id&&a===t)return o}return Cr.lookup(r,t)},createNode:(r,t,e,n)=>{var o=new Cr.FSNode(r,t,e,n);return Cr.hashAddNode(o),o},destroyNode:r=>{Cr.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768==(61440&r),isDir:r=>16384==(61440&r),isLink:r=>40960==(61440&r),isChrdev:r=>8192==(61440&r),isBlkdev:r=>24576==(61440&r),isFIFO:r=>4096==(61440&r),isSocket:r=>49152==(49152&r),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:r=>{var t=Cr.flagModes[r];if(void 0===t)throw new Error("Unknown file open mode: "+r);return t},flagsToPermissionString:r=>{var t=["r","w","rw"][3&r];return 512&r&&(t+="w"),t},nodePermissions:(r,t)=>Cr.ignorePermissions?0:(!t.includes("r")||292&r.mode)&&(!t.includes("w")||146&r.mode)&&(!t.includes("x")||73&r.mode)?0:2,mayLookup:r=>{var t=Cr.nodePermissions(r,"x");return t||(r.node_ops.lookup?0:2)},mayCreate:(r,t)=>{try{Cr.lookupNode(r,t);return 20}catch(e){}return Cr.nodePermissions(r,"wx")},mayDelete:(r,t,e)=>{var n;try{n=Cr.lookupNode(r,t)}catch(a){return a.errno}var o=Cr.nodePermissions(r,"wx");if(o)return o;if(e){if(!Cr.isDir(n.mode))return 54;if(Cr.isRoot(n)||Cr.getPath(n)===Cr.cwd())return 10}else if(Cr.isDir(n.mode))return 31;return 0},mayOpen:(r,t)=>r?Cr.isLink(r.mode)?32:Cr.isDir(r.mode)&&("r"!==Cr.flagsToPermissionString(t)||512&t)?31:Cr.nodePermissions(r,Cr.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(r=0,t=Cr.MAX_OPEN_FDS)=>{for(var e=r;e<=t;e++)if(!Cr.streams[e])return e;throw new Cr.ErrnoError(33)},getStream:r=>Cr.streams[r],createStream:(r,t,e)=>{Cr.FSStream||(Cr.FSStream=function(){},Cr.FSStream.prototype={object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}});var n=new Cr.FSStream;for(var o in r)n[o]=r[o];r=n;var a=Cr.nextfd(t,e);return r.fd=a,Cr.streams[a]=r,r},closeStream:r=>{Cr.streams[r]=null},chrdev_stream_ops:{open:r=>{var t=Cr.getDevice(r.node.rdev);r.stream_ops=t.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new Cr.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,t)=>r<<8|t,registerDevice:(r,t)=>{Cr.devices[r]={stream_ops:t}},getDevice:r=>Cr.devices[r],getMounts:r=>{for(var t=[],e=[r];e.length;){var n=e.pop();t.push(n),e.push.apply(e,n.mounts)}return t},syncfs:(r,t)=>{"function"==typeof r&&(t=r,r=!1),Cr.syncFSRequests++,Cr.syncFSRequests>1&&j("warning: "+Cr.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var e=Cr.getMounts(Cr.root.mount),n=0;function o(r){return Cr.syncFSRequests--,t(r)}function a(r){if(r)return a.errored?void 0:(a.errored=!0,o(r));++n>=e.length&&o(null)}e.forEach(t=>{if(!t.type.syncfs)return a(null);t.type.syncfs(t,r,a)})},mount:(r,t,e)=>{var n,o="/"===e,a=!e;if(o&&Cr.root)throw new Cr.ErrnoError(10);if(!o&&!a){var i=Cr.lookupPath(e,{follow_mount:!1});if(e=i.path,n=i.node,Cr.isMountpoint(n))throw new Cr.ErrnoError(10);if(!Cr.isDir(n.mode))throw new Cr.ErrnoError(54)}var s={type:r,opts:t,mountpoint:e,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?Cr.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:r=>{var t=Cr.lookupPath(r,{follow_mount:!1});if(!Cr.isMountpoint(t.node))throw new Cr.ErrnoError(28);var e=t.node,n=e.mounted,o=Cr.getMounts(n);Object.keys(Cr.nameTable).forEach(r=>{for(var t=Cr.nameTable[r];t;){var e=t.name_next;o.includes(t.mount)&&Cr.destroyNode(t),t=e}}),e.mounted=null;var a=e.mount.mounts.indexOf(n);e.mount.mounts.splice(a,1)},lookup:(r,t)=>r.node_ops.lookup(r,t),mknod:(r,t,e)=>{var n=Cr.lookupPath(r,{parent:!0}).node,o=Mr.basename(r);if(!o||"."===o||".."===o)throw new Cr.ErrnoError(28);var a=Cr.mayCreate(n,o);if(a)throw new Cr.ErrnoError(a);if(!n.node_ops.mknod)throw new Cr.ErrnoError(63);return n.node_ops.mknod(n,o,t,e)},create:(r,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,Cr.mknod(r,t,0)),mkdir:(r,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,Cr.mknod(r,t,0)),mkdirTree:(r,t)=>{for(var e=r.split("/"),n="",o=0;o<e.length;++o)if(e[o]){n+="/"+e[o];try{Cr.mkdir(n,t)}catch(a){if(20!=a.errno)throw a}}},mkdev:(r,t,e)=>(void 0===e&&(e=t,t=438),t|=8192,Cr.mknod(r,t,e)),symlink:(r,t)=>{if(!Ar.resolve(r))throw new Cr.ErrnoError(44);var e=Cr.lookupPath(t,{parent:!0}).node;if(!e)throw new Cr.ErrnoError(44);var n=Mr.basename(t),o=Cr.mayCreate(e,n);if(o)throw new Cr.ErrnoError(o);if(!e.node_ops.symlink)throw new Cr.ErrnoError(63);return e.node_ops.symlink(e,n,r)},rename:(r,t)=>{var e,n,o=Mr.dirname(r),a=Mr.dirname(t),i=Mr.basename(r),s=Mr.basename(t);if(e=Cr.lookupPath(r,{parent:!0}).node,n=Cr.lookupPath(t,{parent:!0}).node,!e||!n)throw new Cr.ErrnoError(44);if(e.mount!==n.mount)throw new Cr.ErrnoError(75);var u,c=Cr.lookupNode(e,i),l=Ar.relative(r,a);if("."!==l.charAt(0))throw new Cr.ErrnoError(28);if("."!==(l=Ar.relative(t,o)).charAt(0))throw new Cr.ErrnoError(55);try{u=Cr.lookupNode(n,s)}catch(h){}if(c!==u){var f=Cr.isDir(c.mode),d=Cr.mayDelete(e,i,f);if(d)throw new Cr.ErrnoError(d);if(d=u?Cr.mayDelete(n,s,f):Cr.mayCreate(n,s))throw new Cr.ErrnoError(d);if(!e.node_ops.rename)throw new Cr.ErrnoError(63);if(Cr.isMountpoint(c)||u&&Cr.isMountpoint(u))throw new Cr.ErrnoError(10);if(n!==e&&(d=Cr.nodePermissions(e,"w")))throw new Cr.ErrnoError(d);Cr.hashRemoveNode(c);try{e.node_ops.rename(c,n,s)}catch(h){throw h}finally{Cr.hashAddNode(c)}}},rmdir:r=>{var t=Cr.lookupPath(r,{parent:!0}).node,e=Mr.basename(r),n=Cr.lookupNode(t,e),o=Cr.mayDelete(t,e,!0);if(o)throw new Cr.ErrnoError(o);if(!t.node_ops.rmdir)throw new Cr.ErrnoError(63);if(Cr.isMountpoint(n))throw new Cr.ErrnoError(10);t.node_ops.rmdir(t,e),Cr.destroyNode(n)},readdir:r=>{var t=Cr.lookupPath(r,{follow:!0}).node;if(!t.node_ops.readdir)throw new Cr.ErrnoError(54);return t.node_ops.readdir(t)},unlink:r=>{var t=Cr.lookupPath(r,{parent:!0}).node;if(!t)throw new Cr.ErrnoError(44);var e=Mr.basename(r),n=Cr.lookupNode(t,e),o=Cr.mayDelete(t,e,!1);if(o)throw new Cr.ErrnoError(o);if(!t.node_ops.unlink)throw new Cr.ErrnoError(63);if(Cr.isMountpoint(n))throw new Cr.ErrnoError(10);t.node_ops.unlink(t,e),Cr.destroyNode(n)},readlink:r=>{var t=Cr.lookupPath(r).node;if(!t)throw new Cr.ErrnoError(44);if(!t.node_ops.readlink)throw new Cr.ErrnoError(28);return Ar.resolve(Cr.getPath(t.parent),t.node_ops.readlink(t))},stat:(r,t)=>{var e=Cr.lookupPath(r,{follow:!t}).node;if(!e)throw new Cr.ErrnoError(44);if(!e.node_ops.getattr)throw new Cr.ErrnoError(63);return e.node_ops.getattr(e)},lstat:r=>Cr.stat(r,!0),chmod:(r,t,e)=>{var n;"string"==typeof r?n=Cr.lookupPath(r,{follow:!e}).node:n=r;if(!n.node_ops.setattr)throw new Cr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:(r,t)=>{Cr.chmod(r,t,!0)},fchmod:(r,t)=>{var e=Cr.getStream(r);if(!e)throw new Cr.ErrnoError(8);Cr.chmod(e.node,t)},chown:(r,t,e,n)=>{var o;"string"==typeof r?o=Cr.lookupPath(r,{follow:!n}).node:o=r;if(!o.node_ops.setattr)throw new Cr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(r,t,e)=>{Cr.chown(r,t,e,!0)},fchown:(r,t,e)=>{var n=Cr.getStream(r);if(!n)throw new Cr.ErrnoError(8);Cr.chown(n.node,t,e)},truncate:(r,t)=>{if(t<0)throw new Cr.ErrnoError(28);var e;"string"==typeof r?e=Cr.lookupPath(r,{follow:!0}).node:e=r;if(!e.node_ops.setattr)throw new Cr.ErrnoError(63);if(Cr.isDir(e.mode))throw new Cr.ErrnoError(31);if(!Cr.isFile(e.mode))throw new Cr.ErrnoError(28);var n=Cr.nodePermissions(e,"w");if(n)throw new Cr.ErrnoError(n);e.node_ops.setattr(e,{size:t,timestamp:Date.now()})},ftruncate:(r,t)=>{var e=Cr.getStream(r);if(!e)throw new Cr.ErrnoError(8);if(0==(2097155&e.flags))throw new Cr.ErrnoError(28);Cr.truncate(e.node,t)},utime:(r,t,e)=>{var n=Cr.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,e)})},open:(r,t,e,n,o)=>{if(""===r)throw new Cr.ErrnoError(44);var a;if(e=void 0===e?438:e,e=64&(t="string"==typeof t?Cr.modeStringToFlags(t):t)?4095&e|32768:0,"object"==typeof r)a=r;else{r=Mr.normalize(r);try{a=Cr.lookupPath(r,{follow:!(131072&t)}).node}catch(l){}}var i=!1;if(64&t)if(a){if(128&t)throw new Cr.ErrnoError(20)}else a=Cr.mknod(r,e,0),i=!0;if(!a)throw new Cr.ErrnoError(44);if(Cr.isChrdev(a.mode)&&(t&=-513),65536&t&&!Cr.isDir(a.mode))throw new Cr.ErrnoError(54);if(!i){var u=Cr.mayOpen(a,t);if(u)throw new Cr.ErrnoError(u)}512&t&&Cr.truncate(a,0),t&=-131713;var c=Cr.createStream({node:a,path:Cr.getPath(a),flags:t,seekable:!0,position:0,stream_ops:a.stream_ops,ungotten:[],error:!1},n,o);return c.stream_ops.open&&c.stream_ops.open(c),!s.logReadFiles||1&t||(Cr.readFiles||(Cr.readFiles={}),r in Cr.readFiles||(Cr.readFiles[r]=1)),c},close:r=>{if(Cr.isClosed(r))throw new Cr.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(t){throw t}finally{Cr.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek:(r,t,e)=>{if(Cr.isClosed(r))throw new Cr.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new Cr.ErrnoError(70);if(0!=e&&1!=e&&2!=e)throw new Cr.ErrnoError(28);return r.position=r.stream_ops.llseek(r,t,e),r.ungotten=[],r.position},read:(r,t,e,n,o)=>{if(n<0||o<0)throw new Cr.ErrnoError(28);if(Cr.isClosed(r))throw new Cr.ErrnoError(8);if(1==(2097155&r.flags))throw new Cr.ErrnoError(8);if(Cr.isDir(r.node.mode))throw new Cr.ErrnoError(31);if(!r.stream_ops.read)throw new Cr.ErrnoError(28);var a=void 0!==o;if(a){if(!r.seekable)throw new Cr.ErrnoError(70)}else o=r.position;var i=r.stream_ops.read(r,t,e,n,o);return a||(r.position+=i),i},write:(r,t,e,n,o,a)=>{if(n<0||o<0)throw new Cr.ErrnoError(28);if(Cr.isClosed(r))throw new Cr.ErrnoError(8);if(0==(2097155&r.flags))throw new Cr.ErrnoError(8);if(Cr.isDir(r.node.mode))throw new Cr.ErrnoError(31);if(!r.stream_ops.write)throw new Cr.ErrnoError(28);r.seekable&&1024&r.flags&&Cr.llseek(r,0,2);var i=void 0!==o;if(i){if(!r.seekable)throw new Cr.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,t,e,n,o,a);return i||(r.position+=s),s},allocate:(r,t,e)=>{if(Cr.isClosed(r))throw new Cr.ErrnoError(8);if(t<0||e<=0)throw new Cr.ErrnoError(28);if(0==(2097155&r.flags))throw new Cr.ErrnoError(8);if(!Cr.isFile(r.node.mode)&&!Cr.isDir(r.node.mode))throw new Cr.ErrnoError(43);if(!r.stream_ops.allocate)throw new Cr.ErrnoError(138);r.stream_ops.allocate(r,t,e)},mmap:(r,t,e,n,o,a)=>{if(0!=(2&o)&&0==(2&a)&&2!=(2097155&r.flags))throw new Cr.ErrnoError(2);if(1==(2097155&r.flags))throw new Cr.ErrnoError(2);if(!r.stream_ops.mmap)throw new Cr.ErrnoError(43);return r.stream_ops.mmap(r,t,e,n,o,a)},msync:(r,t,e,n,o)=>r&&r.stream_ops.msync?r.stream_ops.msync(r,t,e,n,o):0,munmap:r=>0,ioctl:(r,t,e)=>{if(!r.stream_ops.ioctl)throw new Cr.ErrnoError(59);return r.stream_ops.ioctl(r,t,e)},readFile:(r,t={})=>{if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var e,n=Cr.open(r,t.flags),o=Cr.stat(r).size,a=new Uint8Array(o);return Cr.read(n,a,0,o,0),"utf8"===t.encoding?e=L(a,0):"binary"===t.encoding&&(e=a),Cr.close(n),e},writeFile:(r,t,e={})=>{e.flags=e.flags||577;var n=Cr.open(r,e.flags,e.mode);if("string"==typeof t){var o=new Uint8Array(W(t)+1),a=Y(t,o,0,o.length);Cr.write(n,o,0,a,void 0,e.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");Cr.write(n,t,0,t.byteLength,void 0,e.canOwn)}Cr.close(n)},cwd:()=>Cr.currentPath,chdir:r=>{var t=Cr.lookupPath(r,{follow:!0});if(null===t.node)throw new Cr.ErrnoError(44);if(!Cr.isDir(t.node.mode))throw new Cr.ErrnoError(54);var e=Cr.nodePermissions(t.node,"x");if(e)throw new Cr.ErrnoError(e);Cr.currentPath=t.path},createDefaultDirectories:()=>{Cr.mkdir("/tmp"),Cr.mkdir("/home"),Cr.mkdir("/home/web_user")},createDefaultDevices:()=>{Cr.mkdir("/dev"),Cr.registerDevice(Cr.makedev(1,3),{read:()=>0,write:(r,t,e,n,o)=>n}),Cr.mkdev("/dev/null",Cr.makedev(1,3)),Pr.register(Cr.makedev(5,0),Pr.default_tty_ops),Pr.register(Cr.makedev(6,0),Pr.default_tty1_ops),Cr.mkdev("/dev/tty",Cr.makedev(5,0)),Cr.mkdev("/dev/tty1",Cr.makedev(6,0));var r=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var r=new Uint8Array(1);return function(){return crypto.getRandomValues(r),r[0]}}if(E)try{var t=require("crypto");return function(){return t.randomBytes(1)[0]}}catch(e){}return function(){ur("randomDevice")}}();Cr.createDevice("/dev","random",r),Cr.createDevice("/dev","urandom",r),Cr.mkdir("/dev/shm"),Cr.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{Cr.mkdir("/proc");var r=Cr.mkdir("/proc/self");Cr.mkdir("/proc/self/fd"),Cr.mount({mount:()=>{var t=Cr.createNode(r,"fd",16895,73);return t.node_ops={lookup:(r,t)=>{var e=+t,n=Cr.getStream(e);if(!n)throw new Cr.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{s.stdin?Cr.createDevice("/dev","stdin",s.stdin):Cr.symlink("/dev/tty","/dev/stdin"),s.stdout?Cr.createDevice("/dev","stdout",null,s.stdout):Cr.symlink("/dev/tty","/dev/stdout"),s.stderr?Cr.createDevice("/dev","stderr",null,s.stderr):Cr.symlink("/dev/tty1","/dev/stderr");Cr.open("/dev/stdin",0),Cr.open("/dev/stdout",1),Cr.open("/dev/stderr",1)},ensureErrnoError:()=>{Cr.ErrnoError||(Cr.ErrnoError=function(r,t){this.node=t,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},Cr.ErrnoError.prototype=new Error,Cr.ErrnoError.prototype.constructor=Cr.ErrnoError,[44].forEach(r=>{Cr.genericErrors[r]=new Cr.ErrnoError(r),Cr.genericErrors[r].stack="<generic error, no stack>"}))},staticInit:()=>{Cr.ensureErrnoError(),Cr.nameTable=new Array(4096),Cr.mount(Tr,{},"/"),Cr.createDefaultDirectories(),Cr.createDefaultDevices(),Cr.createSpecialDirectories(),Cr.filesystems={MEMFS:Tr}},init:(r,t,e)=>{Cr.init.initialized=!0,Cr.ensureErrnoError(),s.stdin=r||s.stdin,s.stdout=t||s.stdout,s.stderr=e||s.stderr,Cr.createStandardStreams()},quit:()=>{Cr.init.initialized=!1;for(var r=0;r<Cr.streams.length;r++){var t=Cr.streams[r];t&&Cr.close(t)}},getMode:(r,t)=>{var e=0;return r&&(e|=365),t&&(e|=146),e},findObject:(r,t)=>{var e=Cr.analyzePath(r,t);return e.exists?e.object:null},analyzePath:(r,t)=>{try{r=(n=Cr.lookupPath(r,{follow:!t})).path}catch(o){}var e={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=Cr.lookupPath(r,{parent:!0});e.parentExists=!0,e.parentPath=n.path,e.parentObject=n.node,e.name=Mr.basename(r),n=Cr.lookupPath(r,{follow:!t}),e.exists=!0,e.path=n.path,e.object=n.node,e.name=n.node.name,e.isRoot="/"===n.path}catch(o){e.error=o.errno}return e},createPath:(r,t,e,n)=>{r="string"==typeof r?r:Cr.getPath(r);for(var o=t.split("/").reverse();o.length;){var a=o.pop();if(a){var i=Mr.join2(r,a);try{Cr.mkdir(i)}catch(s){}r=i}}return i},createFile:(r,t,e,n,o)=>{var a=Mr.join2("string"==typeof r?r:Cr.getPath(r),t),i=Cr.getMode(n,o);return Cr.create(a,i)},createDataFile:(r,t,e,n,o,a)=>{var i=t;r&&(r="string"==typeof r?r:Cr.getPath(r),i=t?Mr.join2(r,t):r);var s=Cr.getMode(n,o),u=Cr.create(i,s);if(e){if("string"==typeof e){for(var c=new Array(e.length),l=0,f=e.length;l<f;++l)c[l]=e.charCodeAt(l);e=c}Cr.chmod(u,146|s);var d=Cr.open(u,577);Cr.write(d,e,0,e.length,0,a),Cr.close(d),Cr.chmod(u,s)}return u},createDevice:(r,t,e,n)=>{var o=Mr.join2("string"==typeof r?r:Cr.getPath(r),t),a=Cr.getMode(!!e,!!n);Cr.createDevice.major||(Cr.createDevice.major=64);var i=Cr.makedev(Cr.createDevice.major++,0);return Cr.registerDevice(i,{open:r=>{r.seekable=!1},close:r=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(r,t,n,o,a)=>{for(var i=0,s=0;s<o;s++){var u;try{u=e()}catch(c){throw new Cr.ErrnoError(29)}if(void 0===u&&0===i)throw new Cr.ErrnoError(6);if(null==u)break;i++,t[n+s]=u}return i&&(r.node.timestamp=Date.now()),i},write:(r,t,e,o,a)=>{for(var i=0;i<o;i++)try{n(t[e+i])}catch(s){throw new Cr.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),i}}),Cr.mkdev(o,a,i)},forceLoadFile:r=>{if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!c)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=qr(c(r.url),!0),r.usedBytes=r.contents.length}catch(t){throw new Cr.ErrnoError(29)}},createLazyFile:(r,t,e,n,o)=>{function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(r){if(!(r>this.length-1||r<0)){var t=r%this.chunkSize,e=r/this.chunkSize|0;return this.getter(e)[t]}},a.prototype.setDataGetter=function(r){this.getter=r},a.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",e,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+e+". Status: "+r.status);var t,n=Number(r.getResponseHeader("Content-length")),o=(t=r.getResponseHeader("Accept-Ranges"))&&"bytes"===t,a=(t=r.getResponseHeader("Content-Encoding"))&&"gzip"===t,i=1048576;o||(i=n);var s=this;s.setDataGetter(r=>{var t=r*i,o=(r+1)*i-1;if(o=Math.min(o,n-1),void 0===s.chunks[r]&&(s.chunks[r]=((r,t)=>{if(r>t)throw new Error("invalid range ("+r+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",e,!1),n!==i&&o.setRequestHeader("Range","bytes="+r+"-"+t),"undefined"!=typeof Uint8Array&&(o.responseType="arraybuffer"),o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+e+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):qr(o.responseText||"",!0)})(t,o)),void 0===s.chunks[r])throw new Error("doXHR failed!");return s.chunks[r]}),!a&&n||(i=n=1,n=this.getter(0).length,i=n,k("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!_)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i=new a;Object.defineProperties(i,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:i}}else s={isDevice:!1,url:e};var u=Cr.createFile(r,t,s,n,o);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={};return Object.keys(u.stream_ops).forEach(r=>{var t=u.stream_ops[r];c[r]=function(){return Cr.forceLoadFile(u),t.apply(null,arguments)}}),c.read=((r,t,e,n,o)=>{Cr.forceLoadFile(u);var a=r.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)t[e+s]=a[o+s];else for(s=0;s<i;s++)t[e+s]=a.get(o+s);return i}),u.stream_ops=c,u},createPreloadedFile:(r,t,e,n,o,a,i,s,u,c)=>{var l=t?Ar.resolve(Mr.join2(r,t)):r;ar("cp "+l);function f(e){function f(e){c&&c(),s||Cr.createDataFile(r,t,e,n,o,u),a&&a(),sr()}Browser.handledByPreloadPlugin(e,l,f,()=>{i&&i(),sr()})||f(e)}ir(),"string"==typeof e?xr(e,r=>f(r),i):f(e)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(r,t,e)=>{t=t||(()=>{}),e=e||(()=>{});var n=Cr.indexedDB();try{var o=n.open(Cr.DB_NAME(),Cr.DB_VERSION)}catch(a){return e(a)}o.onupgradeneeded=(()=>{k("creating db"),o.result.createObjectStore(Cr.DB_STORE_NAME)}),o.onsuccess=(()=>{var n=o.result.transaction([Cr.DB_STORE_NAME],"readwrite"),a=n.objectStore(Cr.DB_STORE_NAME),i=0,s=0,u=r.length;function c(){0==s?t():e()}r.forEach(r=>{var t=a.put(Cr.analyzePath(r).object.contents,r);t.onsuccess=(()=>{++i+s==u&&c()}),t.onerror=(()=>{i+ ++s==u&&c()})}),n.onerror=e}),o.onerror=e},loadFilesFromDB:(r,t,e)=>{t=t||(()=>{}),e=e||(()=>{});var n=Cr.indexedDB();try{var o=n.open(Cr.DB_NAME(),Cr.DB_VERSION)}catch(a){return e(a)}o.onupgradeneeded=e,o.onsuccess=(()=>{var n=o.result;try{var i=n.transaction([Cr.DB_STORE_NAME],"readonly")}catch(a){return void e(a)}var s=i.objectStore(Cr.DB_STORE_NAME),u=0,c=0,l=r.length;function f(){0==c?t():e()}r.forEach(r=>{var t=s.get(r);t.onsuccess=(()=>{Cr.analyzePath(r).exists&&Cr.unlink(r),Cr.createDataFile(Mr.dirname(r),Mr.basename(r),t.result,!0,!0,!0),++u+c==l&&f()}),t.onerror=(()=>{u+ ++c==l&&f()})}),i.onerror=e}),o.onerror=e}},Rr={mappings:{},DEFAULT_POLLMASK:5,calculateAt:function(r,t,e){if("/"===t[0])return t;var n;if(-100===r)n=Cr.cwd();else{var o=Cr.getStream(r);if(!o)throw new Cr.ErrnoError(8);n=o.path}if(0==t.length){if(!e)throw new Cr.ErrnoError(44);return n}return Mr.join2(n,t)},doStat:function(r,t,e){try{var n=r(t)}catch(o){if(o&&o.node&&Mr.normalize(t)!==Mr.normalize(Cr.getPath(o.node)))return-54;throw o}return I[e>>2]=n.dev,I[e+4>>2]=0,I[e+8>>2]=n.ino,I[e+12>>2]=n.mode,I[e+16>>2]=n.nlink,I[e+20>>2]=n.uid,I[e+24>>2]=n.gid,I[e+28>>2]=n.rdev,I[e+32>>2]=0,dr=[n.size>>>0,(fr=n.size,+Math.abs(fr)>=1?fr>0?(0|Math.min(+Math.floor(fr/4294967296),4294967295))>>>0:~~+Math.ceil((fr-+(~~fr>>>0))/4294967296)>>>0:0)],I[e+40>>2]=dr[0],I[e+44>>2]=dr[1],I[e+48>>2]=4096,I[e+52>>2]=n.blocks,I[e+56>>2]=n.atime.getTime()/1e3|0,I[e+60>>2]=0,I[e+64>>2]=n.mtime.getTime()/1e3|0,I[e+68>>2]=0,I[e+72>>2]=n.ctime.getTime()/1e3|0,I[e+76>>2]=0,dr=[n.ino>>>0,(fr=n.ino,+Math.abs(fr)>=1?fr>0?(0|Math.min(+Math.floor(fr/4294967296),4294967295))>>>0:~~+Math.ceil((fr-+(~~fr>>>0))/4294967296)>>>0:0)],I[e+80>>2]=dr[0],I[e+84>>2]=dr[1],0},doMsync:function(r,t,e,n,o){var a=B.slice(r,r+e);Cr.msync(t,a,o,e,n)},doMkdir:function(r,t){return"/"===(r=Mr.normalize(r))[r.length-1]&&(r=r.substr(0,r.length-1)),Cr.mkdir(r,t,0),0},doMknod:function(r,t,e){switch(61440&t){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return Cr.mknod(r,t,e),0},doReadlink:function(r,t,e){if(e<=0)return-28;var n=Cr.readlink(r),o=Math.min(e,W(n)),a=O[t+o];return q(n,t,e+1),O[t+o]=a,o},doAccess:function(r,t){if(-8&t)return-28;var e=Cr.lookupPath(r,{follow:!0}).node;if(!e)return-44;var n="";return 4&t&&(n+="r"),2&t&&(n+="w"),1&t&&(n+="x"),n&&Cr.nodePermissions(e,n)?-2:0},doDup:function(r,t,e){var n=Cr.getStream(e);return n&&Cr.close(n),Cr.open(r,t,0,e,e).fd},doReadv:function(r,t,e,n){for(var o=0,a=0;a<e;a++){var i=I[t+8*a>>2],s=I[t+(8*a+4)>>2],u=Cr.read(r,O,i,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o},doWritev:function(r,t,e,n){for(var o=0,a=0;a<e;a++){var i=I[t+8*a>>2],s=I[t+(8*a+4)>>2],u=Cr.write(r,O,i,s,n);if(u<0)return-1;o+=u}return o},varargs:void 0,get:function(){return Rr.varargs+=4,I[Rr.varargs-4>>2]},getStr:function(r){return H(r)},getStreamFromFD:function(r){var t=Cr.getStream(r);if(!t)throw new Cr.ErrnoError(8);return t},get64:function(r,t){return r}};var zr={};function Or(){if(!Or.strings){var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:v||"./this.program"};for(var t in zr)void 0===zr[t]?delete r[t]:r[t]=zr[t];var e=[];for(var t in r)e.push(t+"="+r[t]);Or.strings=e}return Or.strings}function Br(r){return r%4==0&&(r%100!=0||r%400==0)}function Nr(r,t){for(var e=0,n=0;n<=t;e+=r[n++]);return e}var Ir=[31,29,31,30,31,30,31,31,30,31,30,31],Ur=[31,28,31,30,31,30,31,31,30,31,30,31];function Lr(r,t){for(var e=new Date(r.getTime());t>0;){var n=Br(e.getFullYear()),o=e.getMonth(),a=(n?Ir:Ur)[o];if(!(t>a-e.getDate()))return e.setDate(e.getDate()+t),e;t-=a-e.getDate()+1,e.setDate(1),o<11?e.setMonth(o+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1))}return e}function Hr(r,t,e,n){var o=I[n+40>>2],a={tm_sec:I[n>>2],tm_min:I[n+4>>2],tm_hour:I[n+8>>2],tm_mday:I[n+12>>2],tm_mon:I[n+16>>2],tm_year:I[n+20>>2],tm_wday:I[n+24>>2],tm_yday:I[n+28>>2],tm_isdst:I[n+32>>2],tm_gmtoff:I[n+36>>2],tm_zone:o?H(o):""},i=H(e),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)i=i.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"];function f(r,t,e){for(var n="number"==typeof r?r.toString():r||"";n.length<t;)n=e[0]+n;return n}function d(r,t){return f(r,t,"0")}function h(r,t){function e(r){return r<0?-1:r>0?1:0}var n;return 0===(n=e(r.getFullYear()-t.getFullYear()))&&0===(n=e(r.getMonth()-t.getMonth()))&&(n=e(r.getDate()-t.getDate())),n}function m(r){switch(r.getDay()){case 0:return new Date(r.getFullYear()-1,11,29);case 1:return r;case 2:return new Date(r.getFullYear(),0,3);case 3:return new Date(r.getFullYear(),0,2);case 4:return new Date(r.getFullYear(),0,1);case 5:return new Date(r.getFullYear()-1,11,31);case 6:return new Date(r.getFullYear()-1,11,30)}}function p(r){var t=Lr(new Date(r.tm_year+1900,0,1),r.tm_yday),e=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),o=m(e),a=m(n);return h(o,t)<=0?h(a,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var w={"%a":function(r){return c[r.tm_wday].substring(0,3)},"%A":function(r){return c[r.tm_wday]},"%b":function(r){return l[r.tm_mon].substring(0,3)},"%B":function(r){return l[r.tm_mon]},"%C":function(r){return d((r.tm_year+1900)/100|0,2)},"%d":function(r){return d(r.tm_mday,2)},"%e":function(r){return f(r.tm_mday,2," ")},"%g":function(r){return p(r).toString().substring(2)},"%G":function(r){return p(r)},"%H":function(r){return d(r.tm_hour,2)},"%I":function(r){var t=r.tm_hour;return 0==t?t=12:t>12&&(t-=12),d(t,2)},"%j":function(r){return d(r.tm_mday+Nr(Br(r.tm_year+1900)?Ir:Ur,r.tm_mon-1),3)},"%m":function(r){return d(r.tm_mon+1,2)},"%M":function(r){return d(r.tm_min,2)},"%n":function(){return"\n"},"%p":function(r){return r.tm_hour>=0&&r.tm_hour<12?"AM":"PM"},"%S":function(r){return d(r.tm_sec,2)},"%t":function(){return"\t"},"%u":function(r){return r.tm_wday||7},"%U":function(r){var t=new Date(r.tm_year+1900,0,1),e=0===t.getDay()?t:Lr(t,7-t.getDay()),n=new Date(r.tm_year+1900,r.tm_mon,r.tm_mday);if(h(e,n)<0){var o=Nr(Br(n.getFullYear())?Ir:Ur,n.getMonth()-1)-31,a=31-e.getDate()+o+n.getDate();return d(Math.ceil(a/7),2)}return 0===h(e,t)?"01":"00"},"%V":function(r){var t,e=new Date(r.tm_year+1900,0,4),n=new Date(r.tm_year+1901,0,4),o=m(e),a=m(n),i=Lr(new Date(r.tm_year+1900,0,1),r.tm_yday);return h(i,o)<0?"53":h(a,i)<=0?"01":(t=o.getFullYear()<r.tm_year+1900?r.tm_yday+32-o.getDate():r.tm_yday+1-o.getDate(),d(Math.ceil(t/7),2))},"%w":function(r){return r.tm_wday},"%W":function(r){var t=new Date(r.tm_year,0,1),e=1===t.getDay()?t:Lr(t,0===t.getDay()?1:7-t.getDay()+1),n=new Date(r.tm_year+1900,r.tm_mon,r.tm_mday);if(h(e,n)<0){var o=Nr(Br(n.getFullYear())?Ir:Ur,n.getMonth()-1)-31,a=31-e.getDate()+o+n.getDate();return d(Math.ceil(a/7),2)}return 0===h(e,t)?"01":"00"},"%y":function(r){return(r.tm_year+1900).toString().substring(2)},"%Y":function(r){return r.tm_year+1900},"%z":function(r){var t=r.tm_gmtoff,e=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(e?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(r){return r.tm_zone},"%%":function(){return"%"}};for(var u in w)i.includes(u)&&(i=i.replace(new RegExp(u,"g"),w[u](a)));var v=qr(i,!1);return v.length>t?0:(V(v,r),v.length-1)}var Yr=function(r,t,e,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=Cr.nextInode++,this.name=t,this.mode=e,this.node_ops={},this.stream_ops={},this.rdev=n};function qr(r,t,e){var n=e>0?e:W(r)+1,o=new Array(n),a=Y(r,o,0,o.length);return t&&(o.length=a),o}Object.defineProperties(Yr.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(r){r?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(r){r?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return Cr.isDir(this.mode)}},isDevice:{get:function(){return Cr.isChrdev(this.mode)}}}),Cr.FSNode=Yr,Cr.staticInit();var Wr,Gr={qa:function(r,t){return function(r,t){var e;if(0===r)e=Date.now();else{if(1!==r&&4!==r||!_r)return Er(28),-1;e=hr()}return I[t>>2]=e/1e3|0,I[t+4>>2]=e%1e3*1e3*1e3|0,0}(r,t)},k:function(r){return Vr(r+16)+16},q:function(r){var t=new kr(r),e=t.get_exception_info();return e.get_caught()||(e.set_caught(!0),Dr--),e.set_rethrown(!1),jr.push(t),function(r){r.add_ref()}(e),t.get_exception_ptr()},v:function(){Jr(0);var r=jr.pop();!function(r){if(r.release_ref()&&!r.get_rethrown()){var t=r.get_destructor();t&&yr(t)(r.excPtr),Fr(r.excPtr)}}(r.get_exception_info()),r.free(),Sr=0},b:function(){var r=Sr;if(!r)return F(0),0;var t=new br(r).get_type(),e=new kr;if(e.set_base_ptr(r),e.set_adjusted_ptr(r),!t)return F(0),0|e.ptr;for(var n=Array.prototype.slice.call(arguments),o=0;o<n.length;o++){var a=n[o];if(0===a||a===t)break;if(rt(a,t,e.get_adjusted_ptr_addr()))return F(a),0|e.ptr}return F(t),0|e.ptr},g:function(){var r=Sr;if(!r)return F(0),0;var t=new br(r).get_type(),e=new kr;if(e.set_base_ptr(r),e.set_adjusted_ptr(r),!t)return F(0),0|e.ptr;for(var n=Array.prototype.slice.call(arguments),o=0;o<n.length;o++){var a=n[o];if(0===a||a===t)break;if(rt(a,t,e.get_adjusted_ptr_addr()))return F(a),0|e.ptr}return F(t),0|e.ptr},B:function(){var r=Sr;if(!r)return F(0),0;var t=new br(r).get_type(),e=new kr;if(e.set_base_ptr(r),e.set_adjusted_ptr(r),!t)return F(0),0|e.ptr;for(var n=Array.prototype.slice.call(arguments),o=0;o<n.length;o++){var a=n[o];if(0===a||a===t)break;if(rt(a,t,e.get_adjusted_ptr_addr()))return F(a),0|e.ptr}return F(t),0|e.ptr},K:function(){var r=Sr;if(!r)return F(0),0;var t=new br(r).get_type(),e=new kr;if(e.set_base_ptr(r),e.set_adjusted_ptr(r),!t)return F(0),0|e.ptr;for(var n=Array.prototype.slice.call(arguments),o=0;o<n.length;o++){var a=n[o];if(0===a||a===t)break;if(rt(a,t,e.get_adjusted_ptr_addr()))return F(a),0|e.ptr}return F(t),0|e.ptr},m:Fr,V:function(){var r=jr.pop();r||ur("no exception to throw");var t=r.get_exception_info(),e=r.get_base_ptr();throw t.get_rethrown()?r.free():(jr.push(r),t.set_rethrown(!0),t.set_caught(!1),Dr++),Sr=e,e},s:function(r,t,e){throw new br(r).init(t,e),Sr=r,Dr++,r},na:function(){return Dr},c:function(r){var t=new kr(r),e=t.get_base_ptr();throw Sr||(Sr=e),t.free(),e},ya:function(r,t,e){try{var n=Rr.getStreamFromFD(r);return n.fd===t?-28:Rr.doDup(n.path,n.flags,t)}catch(o){if(void 0===Cr||!(o instanceof Cr.ErrnoError))throw o;return-o.errno}},I:function(r,t,e){Rr.varargs=e;try{var n=Rr.getStreamFromFD(r);switch(t){case 0:return(o=Rr.get())<0?-28:Cr.open(n.path,n.flags,0,o).fd;case 1:case 2:return 0;case 3:return n.flags;case 4:var o=Rr.get();return n.flags|=o,0;case 5:return o=Rr.get(),N[o+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return Er(28),-1;default:return-28}}catch(a){if(void 0===Cr||!(a instanceof Cr.ErrnoError))throw a;return-a.errno}},Ba:function(r,t,e,n){try{t=Rr.getStr(t);var o=256&n,a=4096&n;return n&=-4353,t=Rr.calculateAt(r,t,a),Rr.doStat(o?Cr.lstat:Cr.stat,t,e)}catch(i){if(void 0===Cr||!(i instanceof Cr.ErrnoError))throw i;return-i.errno}},xa:function(r,t){try{if(0===t)return-28;var e=Cr.cwd();return t<W(e)+1?-68:(q(e,r,t),r)}catch(n){if(void 0===Cr||!(n instanceof Cr.ErrnoError))throw n;return-n.errno}},Aa:function(r,t,e){Rr.varargs=e;try{var n=Rr.getStreamFromFD(r);switch(t){case 21509:case 21505:return n.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=Rr.get();return I[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=Rr.get(),Cr.ioctl(n,t,o);case 21523:case 21524:return n.tty?0:-59;default:ur("bad ioctl syscall "+t)}}catch(a){if(void 0===Cr||!(a instanceof Cr.ErrnoError))throw a;return-a.errno}},P:function(r,t){try{return r=Rr.getStr(r),Rr.doStat(Cr.lstat,r,t)}catch(e){if(void 0===Cr||!(e instanceof Cr.ErrnoError))throw e;return-e.errno}},R:function(r,t,e){Rr.varargs=e;try{var n=Rr.getStr(r),o=e?Rr.get():0;return Cr.open(n,t,o).fd}catch(a){if(void 0===Cr||!(a instanceof Cr.ErrnoError))throw a;return-a.errno}},ta:function(r,t,e){try{return r=Rr.getStr(r),Rr.doReadlink(r,t,e)}catch(n){if(void 0===Cr||!(n instanceof Cr.ErrnoError))throw n;return-n.errno}},ra:function(r,t){try{return r=Rr.getStr(r),t=Rr.getStr(t),Cr.rename(r,t),0}catch(e){if(void 0===Cr||!(e instanceof Cr.ErrnoError))throw e;return-e.errno}},sa:function(r){try{return r=Rr.getStr(r),Cr.rmdir(r),0}catch(t){if(void 0===Cr||!(t instanceof Cr.ErrnoError))throw t;return-t.errno}},ua:function(r,t){try{return r=Rr.getStr(r),Rr.doStat(Cr.stat,r,t)}catch(e){if(void 0===Cr||!(e instanceof Cr.ErrnoError))throw e;return-e.errno}},O:function(r){try{return r=Rr.getStr(r),Cr.unlink(r),0}catch(t){if(void 0===Cr||!(t instanceof Cr.ErrnoError))throw t;return-t.errno}},oa:function(){throw"longjmp"},Ca:function(r,t){var e=new Date(1e3*I[r>>2]);I[t>>2]=e.getUTCSeconds(),I[t+4>>2]=e.getUTCMinutes(),I[t+8>>2]=e.getUTCHours(),I[t+12>>2]=e.getUTCDate(),I[t+16>>2]=e.getUTCMonth(),I[t+20>>2]=e.getUTCFullYear()-1900,I[t+24>>2]=e.getUTCDay();var n=Date.UTC(e.getUTCFullYear(),0,1,0,0,0,0),o=(e.getTime()-n)/864e5|0;I[t+28>>2]=o},Da:function(r,t){var e=new Date(1e3*I[r>>2]);I[t>>2]=e.getSeconds(),I[t+4>>2]=e.getMinutes(),I[t+8>>2]=e.getHours(),I[t+12>>2]=e.getDate(),I[t+16>>2]=e.getMonth(),I[t+20>>2]=e.getFullYear()-1900,I[t+24>>2]=e.getDay();var n=new Date(e.getFullYear(),0,1),o=(e.getTime()-n.getTime())/864e5|0;I[t+28>>2]=o,I[t+36>>2]=-60*e.getTimezoneOffset();var a=new Date(e.getFullYear(),6,1).getTimezoneOffset(),i=n.getTimezoneOffset(),s=0|(a!=i&&e.getTimezoneOffset()==Math.min(i,a));I[t+32>>2]=s},Ea:function(r){var t=new Date(I[r+20>>2]+1900,I[r+16>>2],I[r+12>>2],I[r+8>>2],I[r+4>>2],I[r>>2],0),e=I[r+32>>2],n=t.getTimezoneOffset(),o=new Date(t.getFullYear(),0,1),a=new Date(t.getFullYear(),6,1).getTimezoneOffset(),i=o.getTimezoneOffset(),s=Math.min(i,a);if(e<0)I[r+32>>2]=Number(a!=i&&s==n);else if(e>0!=(s==n)){var u=Math.max(i,a),c=e>0?s:u;t.setTime(t.getTime()+6e4*(c-n))}I[r+24>>2]=t.getDay();var l=(t.getTime()-o.getTime())/864e5|0;return I[r+28>>2]=l,I[r>>2]=t.getSeconds(),I[r+4>>2]=t.getMinutes(),I[r+8>>2]=t.getHours(),I[r+12>>2]=t.getDate(),I[r+16>>2]=t.getMonth(),t.getTime()/1e3|0},Fa:function r(t,e,n){r.called||(r.called=!0,function(r,t,e){var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),i=o.getTimezoneOffset(),s=a.getTimezoneOffset(),u=Math.max(i,s);function c(r){var t=r.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}I[r>>2]=60*u,I[t>>2]=Number(i!=s);var l=c(o),f=c(a),d=G(l),h=G(f);s<i?(I[e>>2]=d,I[e+4>>2]=h):(I[e>>2]=h,I[e+4>>2]=d)}(t,e,n))},G:function(){ur("")},S:function r(){return void 0===r.start&&(r.start=Date.now()),1e3*(Date.now()-r.start)|0},Ia:function(r,t){return r-t},pa:function(r){B.length,ur("OOM")},va:function(r,t){var e=0;return Or().forEach(function(n,o){var a=t+e;I[r+4*o>>2]=a,function(r,t,e){for(var n=0;n<r.length;++n)O[t++>>0]=r.charCodeAt(n);e||(O[t>>0]=0)}(n,a),e+=n.length+1}),0},wa:function(r,t){var e=Or();I[r>>2]=e.length;var n=0;return e.forEach(function(r){n+=r.length+1}),I[t>>2]=n,0},Ga:function(r){bt(r)},J:function(r){try{var t=Rr.getStreamFromFD(r);return Cr.close(t),0}catch(e){if(void 0===Cr||!(e instanceof Cr.ErrnoError))throw e;return e.errno}},za:function(r,t,e,n){try{var o=Rr.getStreamFromFD(r),a=Rr.doReadv(o,t,e);return I[n>>2]=a,0}catch(i){if(void 0===Cr||!(i instanceof Cr.ErrnoError))throw i;return i.errno}},Y:function(r,t,e,n,o){try{var a=Rr.getStreamFromFD(r),i=4294967296*e+(t>>>0);return i<=-9007199254740992||i>=9007199254740992?-61:(Cr.llseek(a,i,n),dr=[a.position>>>0,(fr=a.position,+Math.abs(fr)>=1?fr>0?(0|Math.min(+Math.floor(fr/4294967296),4294967295))>>>0:~~+Math.ceil((fr-+(~~fr>>>0))/4294967296)>>>0:0)],I[o>>2]=dr[0],I[o+4>>2]=dr[1],a.getdents&&0===i&&0===n&&(a.getdents=null),0)}catch(s){if(void 0===Cr||!(s instanceof Cr.ErrnoError))throw s;return s.errno}},Q:function(r,t,e,n){try{var o=Rr.getStreamFromFD(r),a=Rr.doWritev(o,t,e);return I[n>>2]=a,0}catch(i){if(void 0===Cr||!(i instanceof Cr.ErrnoError))throw i;return i.errno}},a:function(){return M()},w:function(r,t){var e=$r();try{return yr(r)(t)}catch(n){if(Zr(e),n!==n+0&&"longjmp"!==n)throw n;Jr(1,0)}},L:function(r,t,e,n){var o=$r();try{return yr(r)(t,e,n)}catch(a){if(Zr(o),a!==a+0&&"longjmp"!==a)throw a;Jr(1,0)}},M:function(r,t,e,n){var o=$r();try{return yr(r)(t,e,n)}catch(a){if(Zr(o),a!==a+0&&"longjmp"!==a)throw a;Jr(1,0)}},r:function(r){var t=$r();try{return yr(r)()}catch(e){if(Zr(t),e!==e+0&&"longjmp"!==e)throw e;Jr(1,0)}},i:function(r,t){var e=$r();try{return yr(r)(t)}catch(n){if(Zr(e),n!==n+0&&"longjmp"!==n)throw n;Jr(1,0)}},d:function(r,t,e){var n=$r();try{return yr(r)(t,e)}catch(o){if(Zr(n),o!==o+0&&"longjmp"!==o)throw o;Jr(1,0)}},h:function(r,t,e,n){var o=$r();try{return yr(r)(t,e,n)}catch(a){if(Zr(o),a!==a+0&&"longjmp"!==a)throw a;Jr(1,0)}},j:function(r,t,e,n,o){var a=$r();try{return yr(r)(t,e,n,o)}catch(i){if(Zr(a),i!==i+0&&"longjmp"!==i)throw i;Jr(1,0)}},u:function(r,t,e,n,o,a){var i=$r();try{return yr(r)(t,e,n,o,a)}catch(s){if(Zr(i),s!==s+0&&"longjmp"!==s)throw s;Jr(1,0)}},x:function(r,t,e,n,o,a,i){var s=$r();try{return yr(r)(t,e,n,o,a,i)}catch(u){if(Zr(s),u!==u+0&&"longjmp"!==u)throw u;Jr(1,0)}},N:function(r,t,e,n,o,a,i,s){var u=$r();try{return yr(r)(t,e,n,o,a,i,s)}catch(c){if(Zr(u),c!==c+0&&"longjmp"!==c)throw c;Jr(1,0)}},La:function(r,t,e,n,o,a,i,s,u,c,l){var f=$r();try{return yr(r)(t,e,n,o,a,i,s,u,c,l)}catch(d){if(Zr(f),d!==d+0&&"longjmp"!==d)throw d;Jr(1,0)}},E:function(r,t,e,n,o,a,i,s,u,c,l,f){var d=$r();try{return yr(r)(t,e,n,o,a,i,s,u,c,l,f)}catch(h){if(Zr(d),h!==h+0&&"longjmp"!==h)throw h;Jr(1,0)}},T:function(r,t,e,n,o,a,i,s,u,c,l,f,d){var h=$r();try{return yr(r)(t,e,n,o,a,i,s,u,c,l,f,d)}catch(m){if(Zr(h),m!==m+0&&"longjmp"!==m)throw m;Jr(1,0)}},X:function(r,t,e,n,o,a,i,s,u){var c=$r();try{return vt(r,t,e,n,o,a,i,s,u)}catch(l){if(Zr(c),l!==l+0&&"longjmp"!==l)throw l;Jr(1,0)}},ia:function(r,t,e,n,o,a){var i=$r();try{return at(r,t,e,n,o,a)}catch(s){if(Zr(i),s!==s+0&&"longjmp"!==s)throw s;Jr(1,0)}},ha:function(r,t,e,n,o,a,i,s){var u=$r();try{return it(r,t,e,n,o,a,i,s)}catch(c){if(Zr(u),c!==c+0&&"longjmp"!==c)throw c;Jr(1,0)}},_:function(r,t,e,n){var o=$r();try{return pt(r,t,e,n)}catch(a){if(Zr(o),a!==a+0&&"longjmp"!==a)throw a;Jr(1,0)}},W:function(r,t,e,n,o){var a=$r();try{return gt(r,t,e,n,o)}catch(i){if(Zr(a),i!==i+0&&"longjmp"!==i)throw i;Jr(1,0)}},l:function(r){var t=$r();try{yr(r)()}catch(e){if(Zr(t),e!==e+0&&"longjmp"!==e)throw e;Jr(1,0)}},p:function(r,t){var e=$r();try{yr(r)(t)}catch(n){if(Zr(e),n!==n+0&&"longjmp"!==n)throw n;Jr(1,0)}},z:function(r,t,e){var n=$r();try{yr(r)(t,e)}catch(o){if(Zr(n),o!==o+0&&"longjmp"!==o)throw o;Jr(1,0)}},aa:function(r,t,e,n,o,a,i){var s=$r();try{ft(r,t,e,n,o,a,i)}catch(u){if(Zr(s),u!==u+0&&"longjmp"!==u)throw u;Jr(1,0)}},e:function(r,t,e){var n=$r();try{yr(r)(t,e)}catch(o){if(Zr(n),o!==o+0&&"longjmp"!==o)throw o;Jr(1,0)}},f:function(r,t,e,n){var o=$r();try{yr(r)(t,e,n)}catch(a){if(Zr(o),a!==a+0&&"longjmp"!==a)throw a;Jr(1,0)}},H:function(r,t,e,n,o,a,i,s,u,c,l,f){var d=$r();try{yr(r)(t,e,n,o,a,i,s,u,c,l,f)}catch(h){if(Zr(d),h!==h+0&&"longjmp"!==h)throw h;Jr(1,0)}},n:function(r,t,e,n,o){var a=$r();try{yr(r)(t,e,n,o)}catch(i){if(Zr(a),i!==i+0&&"longjmp"!==i)throw i;Jr(1,0)}},o:function(r,t,e,n,o,a){var i=$r();try{yr(r)(t,e,n,o,a)}catch(s){if(Zr(i),s!==s+0&&"longjmp"!==s)throw s;Jr(1,0)}},Ka:function(r,t,e,n,o,a,i){var s=$r();try{yr(r)(t,e,n,o,a,i)}catch(u){if(Zr(s),u!==u+0&&"longjmp"!==u)throw u;Jr(1,0)}},y:function(r,t,e,n,o,a,i,s){var u=$r();try{yr(r)(t,e,n,o,a,i,s)}catch(c){if(Zr(u),c!==c+0&&"longjmp"!==c)throw c;Jr(1,0)}},U:function(r,t,e,n,o,a,i,s,u){var c=$r();try{yr(r)(t,e,n,o,a,i,s,u)}catch(l){if(Zr(c),l!==l+0&&"longjmp"!==l)throw l;Jr(1,0)}},A:function(r,t,e,n,o,a,i,s,u,c,l){var f=$r();try{yr(r)(t,e,n,o,a,i,s,u,c,l)}catch(d){if(Zr(f),d!==d+0&&"longjmp"!==d)throw d;Jr(1,0)}},D:function(r,t,e,n,o,a,i,s,u,c,l,f,d,h,m,p){var w=$r();try{yr(r)(t,e,n,o,a,i,s,u,c,l,f,d,h,m,p)}catch(v){if(Zr(w),v!==v+0&&"longjmp"!==v)throw v;Jr(1,0)}},da:function(r,t,e,n,o,a,i){var s=$r();try{lt(r,t,e,n,o,a,i)}catch(u){if(Zr(s),u!==u+0&&"longjmp"!==u)throw u;Jr(1,0)}},ea:function(r,t,e,n,o,a,i,s){var u=$r();try{ct(r,t,e,n,o,a,i,s)}catch(c){if(Zr(u),c!==c+0&&"longjmp"!==c)throw c;Jr(1,0)}},ba:function(r,t,e,n,o,a,i,s,u){var c=$r();try{dt(r,t,e,n,o,a,i,s,u)}catch(l){if(Zr(c),l!==l+0&&"longjmp"!==l)throw l;Jr(1,0)}},ca:function(r,t,e,n,o,a,i,s,u,c,l,f){var d=$r();try{ht(r,t,e,n,o,a,i,s,u,c,l,f)}catch(h){if(Zr(d),h!==h+0&&"longjmp"!==h)throw h;Jr(1,0)}},ka:function(r,t,e,n,o,a,i,s){var u=$r();try{nt(r,t,e,n,o,a,i,s)}catch(c){if(Zr(u),c!==c+0&&"longjmp"!==c)throw c;Jr(1,0)}},fa:function(r,t,e,n,o,a,i,s,u){var c=$r();try{ut(r,t,e,n,o,a,i,s,u)}catch(l){if(Zr(c),l!==l+0&&"longjmp"!==l)throw l;Jr(1,0)}},ja:function(r,t,e,n,o,a,i,s,u,c){var l=$r();try{ot(r,t,e,n,o,a,i,s,u,c)}catch(f){if(Zr(l),f!==f+0&&"longjmp"!==f)throw f;Jr(1,0)}},$:function(r,t,e,n){var o=$r();try{mt(r,t,e,n)}catch(a){if(Zr(o),a!==a+0&&"longjmp"!==a)throw a;Jr(1,0)}},ga:function(r,t,e,n,o,a){var i=$r();try{st(r,t,e,n,o,a)}catch(s){if(Zr(i),s!==s+0&&"longjmp"!==s)throw s;Jr(1,0)}},Z:function(r,t,e,n,o,a,i){var s=$r();try{wt(r,t,e,n,o,a,i)}catch(u){if(Zr(s),u!==u+0&&"longjmp"!==u)throw u;Jr(1,0)}},la:function(r,t,e,n,o,a,i,s,u,c){var l=$r();try{et(r,t,e,n,o,a,i,s,u,c)}catch(f){if(Zr(l),f!==f+0&&"longjmp"!==f)throw f;Jr(1,0)}},t:function(r){return r},C:function(r){F(r)},Ja:Hr,ma:function(r,t,e,n){return Hr(r,t,e,n)},Ha:function(r){if(E){if(!r)return 1;var t=H(r);if(!t.length)return 0;var e=require("child_process").spawnSync(t,[],{shell:!0,stdio:"inherit"}),n=(r,t)=>r<<8|t;return null===e.status?n(0,(r=>{switch(r){case"SIGHUP":return 1;case"SIGINT":return 2;case"SIGQUIT":return 3;case"SIGFPE":return 8;case"SIGKILL":return 9;case"SIGALRM":return 14;case"SIGTERM":return 15}return 2})(e.signal)):n(e.status,0)}return r?(Er(52),-1):0},F:function(r){var t=Date.now()/1e3|0;return r&&(I[r>>2]=t),t}},Xr=(function(){var r={a:Gr};function t(r,t){var e,n,o=r.exports;s.asm=o,A=s.asm.Ma,e=A.buffer,z=e,s.HEAP8=O=new Int8Array(e),s.HEAP16=N=new Int16Array(e),s.HEAP32=I=new Int32Array(e),s.HEAPU8=B=new Uint8Array(e),s.HEAPU16=new Uint16Array(e),s.HEAPU32=new Uint32Array(e),s.HEAPF32=new Float32Array(e),s.HEAPF64=new Float64Array(e),K=s.asm.Qa,n=s.asm.Na,$.unshift(n),sr()}function e(r){t(r.instance)}function n(t){return function(){if(!D&&(y||_)){if("function"==typeof fetch&&!wr(cr))return fetch(cr,{credentials:"same-origin"}).then(function(r){if(!r.ok)throw"failed to load wasm binary file at '"+cr+"'";return r.arrayBuffer()}).catch(function(){return vr(cr)});if(l)return new Promise(function(r,t){l(cr,function(t){r(new Uint8Array(t))},t)})}return Promise.resolve().then(function(){return vr(cr)})}().then(function(t){return WebAssembly.instantiate(t,r)}).then(function(r){return r}).then(t,function(r){j("failed to asynchronously prepare wasm: "+r),ur(r)})}if(ir(),s.instantiateWasm)try{return s.instantiateWasm(r,t)}catch(o){return j("Module.instantiateWasm callback failed with error: "+o),!1}(D||"function"!=typeof WebAssembly.instantiateStreaming||pr(cr)||wr(cr)||"function"!=typeof fetch?n(e):fetch(cr,{credentials:"same-origin"}).then(function(t){return WebAssembly.instantiateStreaming(t,r).then(e,function(r){return j("wasm streaming compile failed: "+r),j("falling back to ArrayBuffer instantiation"),n(e)})})).catch(i)}(),s.___wasm_call_ctors=function(){return(s.___wasm_call_ctors=s.asm.Na).apply(null,arguments)},s._create_compile_result=function(){return(s._create_compile_result=s.asm.Oa).apply(null,arguments)},s._main=function(){return(s._main=s.asm.Pa).apply(null,arguments)},s._free=function(){return(Xr=s._free=s.asm.Ra).apply(null,arguments)}),Vr=s._malloc=function(){return(Vr=s._malloc=s.asm.Sa).apply(null,arguments)},Kr=s.___errno_location=function(){return(Kr=s.___errno_location=s.asm.Ta).apply(null,arguments)},Jr=s._setThrew=function(){return(Jr=s._setThrew=s.asm.Ua).apply(null,arguments)},$r=s.stackSave=function(){return($r=s.stackSave=s.asm.Va).apply(null,arguments)},Zr=s.stackRestore=function(){return(Zr=s.stackRestore=s.asm.Wa).apply(null,arguments)},Qr=s.stackAlloc=function(){return(Qr=s.stackAlloc=s.asm.Xa).apply(null,arguments)},rt=s.___cxa_can_catch=function(){return(rt=s.___cxa_can_catch=s.asm.Ya).apply(null,arguments)},tt=s.___cxa_is_pointer_type=function(){return(tt=s.___cxa_is_pointer_type=s.asm.Za).apply(null,arguments)},et=s.dynCall_vijjjj=function(){return(et=s.dynCall_vijjjj=s.asm._a).apply(null,arguments)},nt=s.dynCall_viijji=function(){return(nt=s.dynCall_viijji=s.asm.$a).apply(null,arguments)},ot=s.dynCall_viijjiii=function(){return(ot=s.dynCall_viijjiii=s.asm.ab).apply(null,arguments)},at=s.dynCall_iijj=function(){return(at=s.dynCall_iijj=s.asm.bb).apply(null,arguments)},it=s.dynCall_iijjii=function(){return(it=s.dynCall_iijjii=s.asm.cb).apply(null,arguments)},st=s.dynCall_vijj=function(){return(st=s.dynCall_vijj=s.asm.db).apply(null,arguments)},ut=s.dynCall_viijjii=function(){return(ut=s.dynCall_viijjii=s.asm.eb).apply(null,arguments)},ct=s.dynCall_viijjd=function(){return(ct=s.dynCall_viijjd=s.asm.fb).apply(null,arguments)},lt=s.dynCall_viijj=function(){return(lt=s.dynCall_viijj=s.asm.gb).apply(null,arguments)},ft=s.dynCall_vidjj=function(){return(ft=s.dynCall_vidjj=s.asm.hb).apply(null,arguments)},dt=s.dynCall_viijjdi=function(){return(dt=s.dynCall_viijjdi=s.asm.ib).apply(null,arguments)},ht=s.dynCall_viijjdjj=function(){return(ht=s.dynCall_viijjdjj=s.asm.jb).apply(null,arguments)},mt=s.dynCall_vij=function(){return(mt=s.dynCall_vij=s.asm.kb).apply(null,arguments)},pt=s.dynCall_jiii=function(){return(pt=s.dynCall_jiii=s.asm.lb).apply(null,arguments)},wt=s.dynCall_vijji=function(){return(wt=s.dynCall_vijji=s.asm.mb).apply(null,arguments)},vt=s.dynCall_iiiiijj=function(){return(vt=s.dynCall_iiiiijj=s.asm.nb).apply(null,arguments)},gt=s.dynCall_jiiii=function(){return(gt=s.dynCall_jiiii=s.asm.ob).apply(null,arguments)};function yt(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}s.cwrap=function(r,t,e,n){var o=(e=e||[]).every(function(r){return"number"===r});return"string"!==t&&o&&!n?C(r):function(){return R(r,t,e,arguments)}},s.UTF8ToString=H,s.FS=Cr;function _t(r){var t=s._main,e=(r=r||[]).length+1,n=Qr(4*(e+1));I[n>>2]=X(v);for(var o=1;o<e;o++)I[(n>>2)+o]=X(r[o-1]);I[(n>>2)+e]=0;try{var a=t(e,n);return bt(a,!0),a}catch(i){return function(r){if(r instanceof yt||"unwind"==r)return T;g(1,r)}(i)}finally{!0}}function Et(r){function t(){Wr||(Wr=!0,s.calledRun=!0,x||(!0,s.noFSInit||Cr.init.initialized||Cr.init(),Cr.ignorePermissions=!1,Pr.init(),gr($),gr(Z),a(s),s.onRuntimeInitialized&&s.onRuntimeInitialized(),kt&&_t(r),function(){if(s.postRun)for("function"==typeof s.postRun&&(s.postRun=[s.postRun]);s.postRun.length;)r=s.postRun.shift(),Q.unshift(r);var r;gr(Q)}()))}r=r||w,er>0||(!function(){if(s.preRun)for("function"==typeof s.preRun&&(s.preRun=[s.preRun]);s.preRun.length;)r=s.preRun.shift(),J.unshift(r);var r;gr(J)}(),er>0||(s.setStatus?(s.setStatus("Running..."),setTimeout(function(){setTimeout(function(){s.setStatus("")},1),t()},1)):t()))}function bt(r,t){T=r,tr()||!0,function(r){T=r,tr()||(s.onExit&&s.onExit(r),x=!0);g(r,new yt(r))}(r)}if(or=function r(){Wr||Et(),Wr||(or=r)},s.run=Et,s.preInit)for("function"==typeof s.preInit&&(s.preInit=[s.preInit]);s.preInit.length>0;)s.preInit.pop()();var kt=!0;return s.noInitialRun&&(kt=!1),Et(),t.ready}})();"object"==typeof exports&&"object"==typeof module?module.exports=a:"function"==typeof r&&r.amd?r([],function(){return a}):"object"==typeof exports&&(exports.startWerckmeisterJs=a);
491
491
  },{"path":"UUq2","fs":"rDCW","crypto":"mRF4","child_process":"rDCW","process":"pBGv","buffer":"dskh"}],"RSuL":[function(require,module,exports) {
492
492
  "use strict";function n(n,t){var a;if("undefined"==typeof Symbol||null==n[Symbol.iterator]){if(Array.isArray(n)||(a=e(n))||t&&n&&"number"==typeof n.length){a&&(n=a);var r=0,o=function(){};return{s:o,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,l=!1;return{s:function(){a=n[Symbol.iterator]()},n:function(){var n=a.next();return s=n.done,n},e:function(n){l=!0,i=n},f:function(){try{s||null==a.return||a.return()}finally{if(l)throw i}}}}function e(n,e){if(n){if("string"==typeof n)return t(n,e);var a=Object.prototype.toString.call(n).slice(8,-1);return"Object"===a&&n.constructor&&(a=n.constructor.name),"Map"===a||"Set"===a?Array.from(n):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?t(n,e):void 0}}function t(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,a=new Array(e);t<e;t++)a[t]=n[t];return a}function a(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function r(n,e){for(var t=0;t<e.length;t++){var a=e[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(n,a.key,a)}}function o(n,e,t){return e&&r(n.prototype,e),t&&r(n,t),n}var i=this&&this.__awaiter||function(n,e,t,a){return new(t||(t=Promise))(function(r,o){function i(n){try{l(a.next(n))}catch(e){o(e)}}function s(n){try{l(a.throw(n))}catch(e){o(e)}}function l(n){var e;n.done?r(n.value):(e=n.value,e instanceof t?e:new t(function(n){n(e)})).then(i,s)}l((a=a.apply(n,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.WerckmeisterCompiler=exports.CompilerError=void 0;var s=require("@werckmeister/compilerjs/werckmeister"),l=require("fs"),c=JSON.parse('[{"path": "chords/default.chords", "data": "------------------------------------------------------------------\\nX: \\t\\t\\tI=0\\t \\t\\tIII=4 \\t\\t\\tV=7\\nXmin: \\t\\tI=0 \\t\\tIII=3 \\t\\t\\tV=7\\nX-: \\t\\tI=0 \\t\\tIII=3 \\t\\t\\tV=7\\nX/7: \\t\\tI=0 \\t\\tIII=4 \\t\\t\\tV=7 \\t\\t\\tVII=-2\\nX-/7: \\t\\tI=0 \\t\\tIII=3 \\t\\t\\tV=7 \\t\\t\\tVII=-2\\nX/maj7: \\tI=0 \\tIII=4 \\t\\t\\tV=7 \\t\\t\\tVII=-1\\nX/5: \\t\\tI=0\\t \\t\\tIII=4 \\t\\t\\tV=-5\\nX-/5: \\t\\tI=0\\t \\t\\tIII=3 \\t\\t\\tV=-5\\nX/4: \\t\\tI=0\\t \\t\\tIII=4 \\tIV=-7\\tV=7\\nX-/4: \\t\\tI=0\\t \\t\\tIII=3 \\tIV=-7\\tV=7\\nX/3: \\t\\tI=0\\t \\t\\tIII=-8 \\t \\tV=7\\nX-/3: \\t\\tI=0\\t \\t\\tIII=-9 \\t \\tV=7\\nX/2: \\t\\tI=0\\t II=-10\\tIII=4 \\t \\tV=7\\nX-7b5/b5: \\tI=0 \\t\\tIII=3 \\t\\t\\tV=-6 \\t\\t\\tVII=10\\n------------------------------------------------------------------\\nXsus4: I=0 IV=5 V=7\\nX7sus4: I=0 IV=5 V=7 VII=10\\nX9sus4: I=0 II=2 IV=5 V=7 VII=10\\nXsus2: I=0 II=2 V=7\\n------------------------------------------------------------------\\nX6: I=0 \\t\\tIII=4 \\t\\t\\tV=7 VI=9\\nX-6: I=0 \\t\\tIII=3 \\t\\t\\tV=7 VI=9\\nX-6/9: I=0 II=2\\tIII=3 \\t\\t\\tV=7 VI=9\\n------------------------------------------------------------------\\nX7: \\t\\tI=0 \\t\\tIII=4 \\t\\t\\tV=7 \\t\\t\\tVII=10\\nXmin7: \\t\\tI=0 \\t\\tIII=3 \\t\\t\\tV=7 \\t\\t\\tVII=10\\nX-7: \\t\\tI=0 \\t\\tIII=3 \\t\\t\\tV=7 \\t\\t\\tVII=10\\nXmaj7: \\t\\tI=0 \\t\\tIII=4 \\t\\t\\tV=7 \\t\\t\\tVII=11\\nXmaj7b5:\\tI=0 \\t\\tIII=4 \\t\\t\\tV=6 \\t\\t\\tVII=11\\nX-7b5: \\tI=0 \\t\\tIII=3 \\t\\t\\tV=6 \\t\\t\\tVII=10\\nXmaj7#11: \\tI=0 \\t\\tIII=4 \\tIV=6\\t \\t\\t\\tVII=11\\nX7b5: \\t\\tI=0 \\t\\tIII=4 \\t\\t\\tV=6 \\t\\t\\tVII=10\\nX7#5: \\t\\tI=0 \\t\\tIII=4 \\t\\t\\tV=8 \\t\\t\\tVII=10\\nX07: \\t\\tI=0 \\t\\tIII=3 \\t\\t\\tV=6 \\t\\t\\tVII=9\\n-- II=3 and III=3 was intended\\nX7#5#9:\\t\\tI=0 II=3 III=3 \\tV=8 \\t\\t\\tVII=10\\n------------------------------------------------------------------\\nX2: \\t\\tI=0 III=2 \\t\\t\\tV=7 \\t\\t\\t\\nX9: \\t\\tI=0 II=2 III=4 \\t\\t\\tV=7 \\t\\t\\tVII=10\\n# to distinguish between Xb9 (Xflat and 9) and Xb9 (X and flat 9)\\n# we write Xflat9 for the latter. (same for 11 and 13)\\nXflat9: \\tI=0 II=1 III=4 \\t\\t\\tV=7 \\t\\t\\t\\nXmin9: \\t\\tI=0 II=2\\tIII=3 \\t\\t\\tV=7 \\t\\t\\tVII=10\\nX-9: \\t\\tI=0 II=2\\tIII=3 \\t\\t\\tV=7 \\t\\t\\tVII=10\\nXminAdd9:\\tI=0 II=2\\tIII=3 \\t\\t\\tV=7 \\t\\t\\t\\nX-add9:\\t\\tI=0 II=2\\tIII=3 \\t\\t\\tV=7 \\t\\t\\t\\n\\n\\nXmaj9: \\t\\tI=0 II=2\\tIII=4 \\t\\t\\tV=7 \\t\\t\\tVII=11\\n-- II=3 and III=3 was intended\\nX7#9: \\t\\tI=0 II=3\\tIII=4 \\t\\t\\tV=7 \\t\\t\\tVII=10\\nX7b9: I=0 II=1 III=4 \\t\\t\\tV=7 \\t\\t\\tVII=10\\nXmaj7b9: I=0 II=1 III=4 \\t\\t\\tV=7 \\t\\t\\tVII=11\\n------------------------------------------------------------------\\nX11: \\t\\tI=0 \\tIII=4 \\tIV=5\\tV=7 \\t\\t\\tVII=10\\nXflat11: I=0 \\tIII=3 \\tIV=4\\tV=7 \\t\\t\\t\\nXmin11:\\t\\tI=0 \\tIII=3 \\tIV=5\\tV=7 \\t\\t\\tVII=10\\nX-11:\\t\\tI=0 \\tIII=3 \\tIV=5\\tV=7 \\t\\t\\tVII=10\\nXmaj11:\\t\\tI=0 \\tIII=4 \\tIV=5\\tV=7 \\t\\t\\tVII=11\\n------------------------------------------------------------------\\nX13: \\t\\tI=0 \\tIII=4 \\t \\tV=7 \\tVI=9\\tVII=10\\nXflat13:\\tI=0 \\tIII=4 \\t \\t \\tVI=8\\t\\nXmin13:\\t\\tI=0 \\tIII=3 \\t\\t V=7 \\tVI=9\\tVII=10\\nX-13:\\t\\tI=0 \\tIII=3 \\t\\t V=7 \\tVI=9\\tVII=10\\nXmaj13:\\t\\tI=0 \\tIII=4 \\t\\t V=7 \\tVI=9\\tVII=11"}, {"path": "lua/com/com.lua", "data": "local _inspect = require \\"lua/com/inspect\\"\\n\\nlocal MidiSchluesselCOffset = 60\\nParameterValueNoTag = \'__noTagValue\'\\n\\nfunction istable(t) return type(t) == \'table\' end\\nfunction isnumber(t) return type(t) == \'number\' end\\nfunction inspect(x) return print(_inspect(x)) end\\nfunction dump(x) print(inspect(x)) end\\n\\n\\nfunction checkLegacyNamedParams(params, ...)\\n local args = table.pack(...)\\n for k, v in pairs(params) do\\n if contains(args, v) then\\n local msg = \\"Error: legacy named parameter with the argument \'\\" .. v .. \\"\'. \\"\\n msg = msg .. \\" Use this expression instead: _\\" .. v .. \\"=...\\" \\n error(msg)\\n end\\n end\\nend\\n\\n-- returns the minimum amount of semitones between the relative pitches x and y.\\n-- e.g.: from c(0) to b(11) = -1\\nfunction relpitchdiff(x, y)\\n x = x % 12\\n y = y % 12\\n if math.abs(x-y) < 6 then\\n return -(x-y)\\n end\\n if x < 6 then \\n x = x + 12 \\n end\\n if y < 6 then\\n y = y + 12\\n end\\n return -(x-y)\\nend\\n\\n-- [a, 1, b, 2, c, 3] => {a=1, b=2, c=3}\\n-- @deprecated use the native named parameter feature: _name=value\\nfunction tokeyvalue(args)\\n assert(#args % 2 == 0)\\n local result = {}\\n for i=1, #args, 2 do\\n result[ args[i] ] = args[i+1]\\n end\\n return result\\nend\\n\\nfunction toMidiPitch(pitch)\\n return MidiSchluesselCOffset + pitch.pitch + (pitch.octave * 12)\\nend\\n\\nfunction deepcopy(o, seen)\\n seen = seen or {}\\n if o == nil then return nil end\\n if seen[o] then return seen[o] end\\n \\n local no\\n if type(o) == \'table\' then\\n no = {}\\n seen[o] = no\\n \\n for k, v in next, o, nil do\\n no[deepcopy(k, seen)] = deepcopy(v, seen)\\n end\\n setmetatable(no, deepcopy(getmetatable(o), seen))\\n else -- number, string, boolean, etc\\n no = o\\n end\\n return no\\nend\\n\\nfunction contains(table, value)\\n if table == nil then\\n return false\\n end\\n for k, v in pairs(table) do\\n if v == value then\\n return true\\n end\\n end\\n return false\\nend\\n\\n-- https://stackoverflow.com/questions/1426954/split-string-in-lua#1426970\\nfunction split(pString, pPattern)\\n local Table = {} -- NOTE: use {n = 0} in Lua-5.0\\n local fpat = \\"(.-)\\" .. pPattern\\n local last_end = 1\\n local s, e, cap = pString:find(fpat, 1)\\n while s do\\n if s ~= 1 or cap ~= \\"\\" then\\n table.insert(Table,cap)\\n end\\n last_end = e+1\\n s, e, cap = pString:find(fpat, last_end)\\n end\\n if last_end <= #pString then\\n cap = pString:sub(last_end)\\n table.insert(Table, cap)\\n end\\n return Table\\n end"}, {"path": "lua/com/globals.lua", "data": "I = 1\\nII = 2\\nIII = 3\\nIV = 4\\nV = 5\\nVI = 6\\nVII = 7\\n\\nDegreeStringValues = {\\n I = I,\\n II = II,\\n III = III,\\n IV = IV,\\n V = V,\\n VI = VI,\\n VII = VII\\n}\\n\\nMajorScaleSemitones = {\\n I = 0,\\n II = 2,\\n III = 4,\\n IV = 5,\\n V = 7,\\n VI = 9,\\n VII = 11\\n}\\n\\nC = 0\\nCIS = 1\\nDES = 1\\nD = 2\\nDIS = 3\\nES = 3\\nE = 4\\nFES = 4\\nF = 5\\nFIS = 6\\nGES = 6\\nG = 7\\nGIS = 8\\nAS = 8\\nA = 9\\nAIS = 10\\nBES = 10\\nB = 11\\nCES = 11\\n"}, {"path": "lua/com/inspect.lua", "data": "local inspect ={\\n _VERSION = \'inspect.lua 3.1.0\',\\n _URL = \'http://github.com/kikito/inspect.lua\',\\n _DESCRIPTION = \'human-readable representations of tables\',\\n _LICENSE = [[\\n MIT LICENSE\\n\\n Copyright (c) 2013 Enrique Garc\\u00eda Cota\\n\\n Permission is hereby granted, free of charge, to any person obtaining a\\n copy of this software and associated documentation files (the\\n \\"Software\\"), to deal in the Software without restriction, including\\n without limitation the rights to use, copy, modify, merge, publish,\\n distribute, sublicense, and/or sell copies of the Software, and to\\n permit persons to whom the Software is furnished to do so, subject to\\n the following conditions:\\n\\n The above copyright notice and this permission notice shall be included\\n in all copies or substantial portions of the Software.\\n\\n THE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\n OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\\n IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\\n CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\\n TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\\n SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n ]]\\n}\\n\\nlocal tostring = tostring\\n\\ninspect.KEY = setmetatable({}, {__tostring = function() return \'inspect.KEY\' end})\\ninspect.METATABLE = setmetatable({}, {__tostring = function() return \'inspect.METATABLE\' end})\\n\\nlocal function rawpairs(t)\\n return next, t, nil\\nend\\n\\n-- Apostrophizes the string if it has quotes, but not aphostrophes\\n-- Otherwise, it returns a regular quoted string\\nlocal function smartQuote(str)\\n if str:match(\'\\"\') and not str:match(\\"\'\\") then\\n return \\"\'\\" .. str .. \\"\'\\"\\n end\\n return \'\\"\' .. str:gsub(\'\\"\', \'\\\\\\\\\\"\') .. \'\\"\'\\nend\\n\\n-- \\\\a => \'\\\\\\\\a\', \\\\0 => \'\\\\\\\\0\', 31 => \'\\\\31\'\\nlocal shortControlCharEscapes = {\\n [\\"\\\\a\\"] = \\"\\\\\\\\a\\", [\\"\\\\b\\"] = \\"\\\\\\\\b\\", [\\"\\\\f\\"] = \\"\\\\\\\\f\\", [\\"\\\\n\\"] = \\"\\\\\\\\n\\",\\n [\\"\\\\r\\"] = \\"\\\\\\\\r\\", [\\"\\\\t\\"] = \\"\\\\\\\\t\\", [\\"\\\\v\\"] = \\"\\\\\\\\v\\"\\n}\\nlocal longControlCharEscapes = {} -- \\\\a => nil, \\\\0 => \\\\000, 31 => \\\\031\\nfor i=0, 31 do\\n local ch = string.char(i)\\n if not shortControlCharEscapes[ch] then\\n shortControlCharEscapes[ch] = \\"\\\\\\\\\\"..i\\n longControlCharEscapes[ch] = string.format(\\"\\\\\\\\%03d\\", i)\\n end\\nend\\n\\nlocal function escape(str)\\n return (str:gsub(\\"\\\\\\\\\\", \\"\\\\\\\\\\\\\\\\\\")\\n :gsub(\\"(%c)%f[0-9]\\", longControlCharEscapes)\\n :gsub(\\"%c\\", shortControlCharEscapes))\\nend\\n\\nlocal function isIdentifier(str)\\n return type(str) == \'string\' and str:match( \\"^[_%a][_%a%d]*$\\" )\\nend\\n\\nlocal function isSequenceKey(k, sequenceLength)\\n return type(k) == \'number\'\\n and 1 <= k\\n and k <= sequenceLength\\n and math.floor(k) == k\\nend\\n\\nlocal defaultTypeOrders = {\\n [\'number\'] = 1, [\'boolean\'] = 2, [\'string\'] = 3, [\'table\'] = 4,\\n [\'function\'] = 5, [\'userdata\'] = 6, [\'thread\'] = 7\\n}\\n\\nlocal function sortKeys(a, b)\\n local ta, tb = type(a), type(b)\\n\\n -- strings and numbers are sorted numerically/alphabetically\\n if ta == tb and (ta == \'string\' or ta == \'number\') then return a < b end\\n\\n local dta, dtb = defaultTypeOrders[ta], defaultTypeOrders[tb]\\n -- Two default types are compared according to the defaultTypeOrders table\\n if dta and dtb then return defaultTypeOrders[ta] < defaultTypeOrders[tb]\\n elseif dta then return true -- default types before custom ones\\n elseif dtb then return false -- custom types after default ones\\n end\\n\\n -- custom types are sorted out alphabetically\\n return ta < tb\\nend\\n\\n-- For implementation reasons, the behavior of rawlen & # is \\"undefined\\" when\\n-- tables aren\'t pure sequences. So we implement our own # operator.\\nlocal function getSequenceLength(t)\\n local len = 1\\n local v = rawget(t,len)\\n while v ~= nil do\\n len = len + 1\\n v = rawget(t,len)\\n end\\n return len - 1\\nend\\n\\nlocal function getNonSequentialKeys(t)\\n local keys, keysLength = {}, 0\\n local sequenceLength = getSequenceLength(t)\\n for k,_ in rawpairs(t) do\\n if not isSequenceKey(k, sequenceLength) then\\n keysLength = keysLength + 1\\n keys[keysLength] = k\\n end\\n end\\n table.sort(keys, sortKeys)\\n return keys, keysLength, sequenceLength\\nend\\n\\nlocal function countTableAppearances(t, tableAppearances)\\n tableAppearances = tableAppearances or {}\\n\\n if type(t) == \'table\' then\\n if not tableAppearances[t] then\\n tableAppearances[t] = 1\\n for k,v in rawpairs(t) do\\n countTableAppearances(k, tableAppearances)\\n countTableAppearances(v, tableAppearances)\\n end\\n countTableAppearances(getmetatable(t), tableAppearances)\\n else\\n tableAppearances[t] = tableAppearances[t] + 1\\n end\\n end\\n\\n return tableAppearances\\nend\\n\\nlocal copySequence = function(s)\\n local copy, len = {}, #s\\n for i=1, len do copy[i] = s[i] end\\n return copy, len\\nend\\n\\nlocal function makePath(path, ...)\\n local keys = {...}\\n local newPath, len = copySequence(path)\\n for i=1, #keys do\\n newPath[len + i] = keys[i]\\n end\\n return newPath\\nend\\n\\nlocal function processRecursive(process, item, path, visited)\\n if item == nil then return nil end\\n if visited[item] then return visited[item] end\\n\\n local processed = process(item, path)\\n if type(processed) == \'table\' then\\n local processedCopy = {}\\n visited[item] = processedCopy\\n local processedKey\\n\\n for k,v in rawpairs(processed) do\\n processedKey = processRecursive(process, k, makePath(path, k, inspect.KEY), visited)\\n if processedKey ~= nil then\\n processedCopy[processedKey] = processRecursive(process, v, makePath(path, processedKey), visited)\\n end\\n end\\n\\n local mt = processRecursive(process, getmetatable(processed), makePath(path, inspect.METATABLE), visited)\\n if type(mt) ~= \'table\' then mt = nil end -- ignore not nil/table __metatable field\\n setmetatable(processedCopy, mt)\\n processed = processedCopy\\n end\\n return processed\\nend\\n\\n\\n\\n-------------------------------------------------------------------\\n\\nlocal Inspector = {}\\nlocal Inspector_mt = {__index = Inspector}\\n\\nfunction Inspector:puts(...)\\n local args = {...}\\n local buffer = self.buffer\\n local len = #buffer\\n for i=1, #args do\\n len = len + 1\\n buffer[len] = args[i]\\n end\\nend\\n\\nfunction Inspector:down(f)\\n self.level = self.level + 1\\n f()\\n self.level = self.level - 1\\nend\\n\\nfunction Inspector:tabify()\\n self:puts(self.newline, string.rep(self.indent, self.level))\\nend\\n\\nfunction Inspector:alreadyVisited(v)\\n return self.ids[v] ~= nil\\nend\\n\\nfunction Inspector:getId(v)\\n local id = self.ids[v]\\n if not id then\\n local tv = type(v)\\n id = (self.maxIds[tv] or 0) + 1\\n self.maxIds[tv] = id\\n self.ids[v] = id\\n end\\n return tostring(id)\\nend\\n\\nfunction Inspector:putKey(k)\\n if isIdentifier(k) then return self:puts(k) end\\n self:puts(\\"[\\")\\n self:putValue(k)\\n self:puts(\\"]\\")\\nend\\n\\nfunction Inspector:putTable(t)\\n if t == inspect.KEY or t == inspect.METATABLE then\\n self:puts(tostring(t))\\n elseif self:alreadyVisited(t) then\\n self:puts(\'<table \', self:getId(t), \'>\')\\n elseif self.level >= self.depth then\\n self:puts(\'{...}\')\\n else\\n if self.tableAppearances[t] > 1 then self:puts(\'<\', self:getId(t), \'>\') end\\n\\n local nonSequentialKeys, nonSequentialKeysLength, sequenceLength = getNonSequentialKeys(t)\\n local mt = getmetatable(t)\\n\\n self:puts(\'{\')\\n self:down(function()\\n local count = 0\\n for i=1, sequenceLength do\\n if count > 0 then self:puts(\',\') end\\n self:puts(\' \')\\n self:putValue(t[i])\\n count = count + 1\\n end\\n\\n for i=1, nonSequentialKeysLength do\\n local k = nonSequentialKeys[i]\\n if count > 0 then self:puts(\',\') end\\n self:tabify()\\n self:putKey(k)\\n self:puts(\' = \')\\n self:putValue(t[k])\\n count = count + 1\\n end\\n\\n if type(mt) == \'table\' then\\n if count > 0 then self:puts(\',\') end\\n self:tabify()\\n self:puts(\'<metatable> = \')\\n self:putValue(mt)\\n end\\n end)\\n\\n if nonSequentialKeysLength > 0 or type(mt) == \'table\' then -- result is multi-lined. Justify closing }\\n self:tabify()\\n elseif sequenceLength > 0 then -- array tables have one extra space before closing }\\n self:puts(\' \')\\n end\\n\\n self:puts(\'}\')\\n end\\nend\\n\\nfunction Inspector:putValue(v)\\n local tv = type(v)\\n\\n if tv == \'string\' then\\n self:puts(smartQuote(escape(v)))\\n elseif tv == \'number\' or tv == \'boolean\' or tv == \'nil\' or\\n tv == \'cdata\' or tv == \'ctype\' then\\n self:puts(tostring(v))\\n elseif tv == \'table\' then\\n self:putTable(v)\\n else\\n self:puts(\'<\', tv, \' \', self:getId(v), \'>\')\\n end\\nend\\n\\n-------------------------------------------------------------------\\n\\nfunction inspect.inspect(root, options)\\n options = options or {}\\n\\n local depth = options.depth or math.huge\\n local newline = options.newline or \'\\\\n\'\\n local indent = options.indent or \' \'\\n local process = options.process\\n\\n if process then\\n root = processRecursive(process, root, {}, {})\\n end\\n\\n local inspector = setmetatable({\\n depth = depth,\\n level = 0,\\n buffer = {},\\n ids = {},\\n maxIds = {},\\n newline = newline,\\n indent = indent,\\n tableAppearances = countTableAppearances(root)\\n }, Inspector_mt)\\n\\n inspector:putValue(root)\\n\\n return table.concat(inspector.buffer)\\nend\\n\\nsetmetatable(inspect, { __call = function(_, ...) return inspect.inspect(...) end })\\n\\nreturn inspect\\n"}, {"path": "lua/com/tests.lua", "data": "require \\"com/com\\"\\nrequire \\"com/globals\\"\\n\\nfunction testpitchdiff(a, b, expected)\\n local diff = relpitchdiff(a, b)\\n if diff ~= expected then\\n print(\\"pitchdiff: \\" .. a .. \\"-\\" .. b .. \\"~=\\" .. expected .. \\"(\\" .. diff .. \\")\\" )\\n end\\nend\\n\\ntestpitchdiff( 0, 0, 0)\\ntestpitchdiff( 0, 5, 5)\\ntestpitchdiff( 5, 0, -5)\\ntestpitchdiff( 0, 6, -6)\\ntestpitchdiff( 6, 0, 6)\\ntestpitchdiff( 7, 0, 5)\\ntestpitchdiff( 0, 7, -5)\\ntestpitchdiff( 7, 1, 6)\\ntestpitchdiff( 1, 7, -6)\\ntestpitchdiff( 7, 11, 4)\\ntestpitchdiff(11, 7, -4)\\ntestpitchdiff( 0, 10, -2)\\ntestpitchdiff(10, 0, 2)\\ntestpitchdiff( 5, 9, 4)\\ntestpitchdiff( 9, 5, -4)\\ntestpitchdiff( 5, 11, -6)\\ntestpitchdiff(11, 5, 6)\\ntestpitchdiff( 9, 11, 2)\\ntestpitchdiff(11, 9, -2)\\ntestpitchdiff(11, 1, 2)\\ntestpitchdiff( 1, 11, -2)\\ntestpitchdiff( 12, 24, 0)\\n\\n\\nx = tokeyvalue({\\"a\\", 100, \\"b\\", 200, \\"c\\", 300})\\nassert(x.a == 100)\\nassert(x.b == 200)\\nassert(x.c == 300)\\n\\n\\nassert( toMidiPitch({pitch=C, octave=0}) == 60)\\nassert( toMidiPitch({pitch=C, octave=1}) == 72)\\nassert( toMidiPitch({pitch=CIS, octave=1}) == 73)\\nassert( toMidiPitch({pitch=C, octave=-1}) == 48)"}, {"path": "lua/mods/_drumRudimentsRepository.lua", "data": "-- A definition of drum rudiments.\\n-- The actual rudiment duration dosen\'t matter. At the end, the sequence\\n-- will be ajdusted, so that it fits into the duration of the related event.\\n-- The relations between the different durations is what matters.\\n-- For example\\n-- A rudiment with four quarters, played over the duration of one eight:\\n-- every rudiment quarter will become eventually a 32th\\nR=\\"R\\"\\nL=\\"L\\"\\n\\nFlamType = \\"flam\\"\\nDragType = \\"drag\\"\\n\\n-- durations\\nlocal _4 = 1\\nlocal _8 = 1/2\\nlocal _16 = 1/4\\nlocal _32 = 1/8 \\nlocal _4t = _4 / 3\\nlocal _8t = _8 / 3\\nlocal _16t = _16 / 3\\nlocal _32t = _32 / 3\\n-- velocity factors\\nAccent = \\"accent\\"\\nUnaccented = \\"unaccented\\"\\nGraceNote = \\"grace note\\"\\n\\nlocal ac = Accent\\nlocal un = Unaccented\\n\\n\\n-- create a rudiment sequence event\\nlocal function Stroke(which, duration, velocityClass)\\n if velocityClass == nil then\\n velocityClass = Accent\\n end\\n return { which=which, duration=duration, velocityClass = velocityClass }\\nend\\n\\nlocal function Flam(which, duration, velocityClass)\\n if velocityClass == nil then\\n velocityClass = Accent\\n end\\n return { which=which, duration=duration, velocityClass = velocityClass, type = FlamType}\\nend\\n\\nlocal function Drag(which, duration, velocityClass)\\n if velocityClass == nil then\\n velocityClass = Accent\\n end\\n return { which=which, duration=duration, velocityClass = velocityClass, type = DragType}\\nend\\n\\nlocal S = Stroke\\n\\nlocal function Diddle(which, duration)\\n return {\\n S(which, duration, un), S(which, duration, un)\\n }\\nend\\n\\n-- returns L for R and R for L.\\nfunction Alt(which)\\n if which == L then\\n return R\\n elseif which == R then\\n return L\\n end\\n return nil\\nend\\n\\n-- alternates the \\"Hand\\" value (which).\\n-- \\"L\\" -> \\"R\\"\\n-- \\"R\\" -> \\"L\\"\\nfunction AlternateEvent(event)\\n local copy = deepcopy(event)\\n copy.which = Alt(event.which)\\n return copy\\nend\\n\\n-- Creates a alternating stroke sequence RL...n or LR...n.\\n-- @param startingEvent: the first event. All further created events are unaccented.\\n-- @param numberOfPerformances: the number of the total performances. One RL means one performance.\\nlocal function Alternate(startingEvent, numberOfPerformances)\\n if numberOfPerformances == nil then\\n numberOfPerformances = 1\\n end\\n local result = {startingEvent}\\n local which = startingEvent.which\\n for i = 0, (numberOfPerformances-1)*2, 1 do\\n which = Alt(which)\\n table.insert(result, S(which, startingEvent.duration, un))\\n end\\n return result\\nend\\n\\n-- Creates a sequence of variable args.\\n-- An argument can be either a array of events or a single event\\nlocal function Seq(...)\\n local args = table.pack(...)\\n local result = {}\\n for i=1,args.n do\\n local arg = args[i]\\n local isEvent = arg.which ~= nil\\n if isEvent then\\n table.insert(result, arg)\\n else\\n for key, event in pairs(arg) do\\n table.insert(result, event)\\n end\\n end\\n end\\n return result\\nend\\n\\nRudiments = {\\n [\\"singleStrokeRoll\\"] =\\n { S(R, _4), S(L, _4) },\\n [\\"doubleStrokeRoll\\"] =\\n { S(R, _4), S(R, _4), S(L, _4), S(L, _4) },\\n [\\"trippleStrokeRoll\\"] =\\n { S(R, _4), S(R, _4), S(R, _4), S(L, _4), S(L, _4), S(L, _4) },\\n [\\"fiveStrokeRoll\\"] =\\n { S(R, _32, un), S(R, _32, un), S(L, _32, un), S(L, _32, un), S(R, _8, ac) },\\n [\\"singleStrokeFour\\"] =\\n { S(R, _4t), S(L, _4t), S(R, _4t), S(L, _4) },\\n [\\"singleStrokeSeven\\"] =\\n { S(R, _8t), S(L, _8t), S(R, _8t), S(L, _8t), S(R, _8t), S(L, _8t), S(R, _4) },\\n [\\"multipleBounceRoll\\"] =\\n { S(R, _32, un), S(R, _32, un), S(R, _32, un), S(R, _32, un),\\n S(L, _32, un), S(L, _32, un), S(L, _32, un), S(L, _32, un)},\\n [\\"sixStrokeRoll\\"] =\\n Seq(S(R, _8, ac), Diddle(L, _16), Diddle(R, _16), S(L, _8, ac)),\\n [\\"sevenStrokeRoll\\"] =\\n Seq(Diddle(L, _16), Diddle(R, _16), Diddle(L, _16), S(R, _8, ac)),\\n [\\"nineStrokeRoll\\"] =\\n Seq(Diddle(R, _16), Diddle(L, _16), Diddle(R, _16), Diddle(L, _16), S(R, _8, ac)),\\n [\\"tenStrokeRoll\\"] =\\n Seq(Diddle(R, _16), Diddle(L, _16), Diddle(R, _16), Diddle(L, _16), S(R, _8, ac), S(L, _8, ac)),\\n [\\"elevenStrokeRoll\\"] =\\n Seq(Diddle(R, _16), Diddle(L, _16), Diddle(R, _16), Diddle(L, _16), Diddle(R, _16), S(L, _8, ac)),\\n [\\"thirteenStrokeRoll\\"] =\\n Seq(Diddle(R, _16), Diddle(L, _16), Diddle(R, _16), Diddle(L, _16), Diddle(R, _16), Diddle(L, _16), S(R, _8, ac)),\\n [\\"fifteenStrokeRoll\\"] =\\n Seq(Diddle(R, _16), Diddle(L, _16), Diddle(R, _16), Diddle(L, _16), Diddle(R, _16), Diddle(L, _16), Diddle(R, _16), S(L, _8, ac)),\\n [\\"seventeenStrokeRoll\\"] =\\n Seq(Diddle(R, _16), Diddle(L, _16), Diddle(R, _16), Diddle(L, _16), Diddle(R, _16), Diddle(L, _16), Diddle(R, _16), Diddle(L, _16), S(R, _8, ac)),\\n [\\"paradiddle\\"] =\\n Seq(Alternate(S(R, _16, ac)), Diddle(R, _16)),\\n [\\"doubleParadiddle\\"] =\\n Seq(Alternate(S(R, _16, ac), 2), Diddle(R, _16)),\\n [\\"trippleParadiddle\\"] =\\n Seq(Alternate(S(R, _16, ac), 3), Diddle(R, _16)),\\n [\\"paradiddlediddle\\"] =\\n Seq(Alternate(S(R, _16, ac)), Diddle(R, _16), Diddle(L, _16)),\\n [\\"flam\\"] =\\n Seq(Flam(R, _4)),\\n [\\"flamAccent\\"] =\\n Seq(Flam(R, _8, ac), S(L, _8, un), S(R, _8, un)),\\n [\\"flamTap\\"] =\\n Seq(Flam(R, _16, ac), S(R, _16, un)),\\n [\\"flamacue\\"] =\\n Seq(Flam(R, _16, un), S(L, _16, ac), S(R, _16, un), S(L, _16, un), Flam(R, _4, un)),\\n [\\"flamParadiddle\\"] =\\n Seq(Flam(R, _16, ac), S(L, _16, un), Diddle(R, _16)),\\n [\\"singleFlammedMill\\"] =\\n Seq(Flam(R, _16, ac), S(R, _16, un), S(L, _16, un), S(R, _16, un)),\\n [\\"pataflafla\\"] =\\n Seq(Flam(R, _16, ac), S(L, _16, un), Diddle(R, _16), Flam(L, _16, ac)),\\n [\\"swissArmytriplet\\"] =\\n Seq(Flam(R, _16t, ac), S(R, _16t, un), S(L, _16t, un)),\\n [\\"invertedFlamTap\\"] =\\n Seq(Flam(R, _16, ac), S(L, _16, un)),\\n [\\"flamDrag\\"] =\\n Seq(Flam(R, _8, ac), S(L, _16, un), S(L, _16, un), S(R, _8, un)),\\n [\\"drag\\"] =\\n Seq(Drag(R, _4, ac)),\\n [\\"singleDragTap\\"] =\\n Seq(Drag(R, _8, un), S(L, _8, ac)),\\n [\\"doubleDragTap\\"] =\\n Seq(Drag(R, _8, un), Drag(R, _8, un), S(L, _8, ac)),\\n [\\"lesson25\\"] =\\n Seq(Drag(R, _16, un), S(L, _16, un), S(R, _8, ac)),\\n [\\"singleDragadiddle\\"] =\\n Seq(Drag(R, _16, ac), S(L, _16, un), Diddle(R, _16)),\\n [\\"dragParadiddle1\\"] =\\n Seq(S(R, _8, ac), Drag(R, _16, un), S(L, _16, un), Diddle(R, _16)),\\n [\\"dragParadiddle2\\"] =\\n Seq(S(R, _8, ac), Drag(R, _8, un), Drag(R, _16, un), S(L, _16, un), Diddle(R, _16)),\\n [\\"singleRatamacue\\"] =\\n Seq(Drag(R, _8t, un), S(L, _8t, un), S(R, _8t, un), S(L, _8, ac)),\\n [\\"doubleRatamacue\\"] =\\n Seq(Drag(R, _8, un), Drag(R, _8t, un), S(L, _8t, un), S(R, _8t, un), S(L, _8, ac)),\\n [\\"trippleRatamacue\\"] =\\n Seq(Drag(R, _8, un), Drag(R, _8, un), Drag(R, _8t, un), S(L, _8t, un), S(R, _8t, un), S(L, _8, ac)) \\n}\\n"}, {"path": "lua/mods/_events.lua", "data": "\\nNote = {}\\n\\nfunction Note:new()\\n local o = {}\\n setmetatable(o, self)\\n self.__index = self\\n o.duration = 0\\n o.isTied = false\\n o.offset = 0\\n o.pitches = {}\\n o.type = \\"note\\"\\n o.velocity = 0\\n return o \\nend\\n\\nfunction Note:addPitch(pitch, octave)\\n table.insert(self.pitches, {pitch=pitch, octave=octave})\\nend\\n\\nfunction pitchCompare(a, b)\\n a = a.pitch + (a.octave * 12)\\n b = b.pitch + (b.octave * 12)\\n return a < b\\nend\\n\\nfunction pitchCompareReversed(a, b)\\n a = a.pitch + (a.octave * 12)\\n b = b.pitch + (b.octave * 12)\\n return a > b\\nend\\n"}, {"path": "lua/mods/drumRudiments.lua", "data": "-- <command name=\\"drumRudiments\\" where=\\"mod\\" using=\\"lua/mod/drumRudiments.lua\\">\\n-- <![CDATA[\\n-- Implements a collection of different drum rudiments. ([see Wikipedia](https://en.wikipedia.org/wiki/Drum_rudiment))\\n-- You can specify which notes are for `L` and `R` and performing duration.\\n-- This will be achieved by using an chord as source material.\\n-- The chord pitches will be used for `L` and `R`.\\n-- The length of the chord event defines over which time the rudiment will be peformed.\\n-- An event tag specifies which rudiment will be performed.\\n-- For example:\\n-- This plays one paradiddle over a length of 1 quarter\\n-- using `sn1` for R and `sn2` for L:\\n-- ```\\n-- /mod: drumRudiments/\\\\n\\n-- R L \\\\n\\n-- \\"paradiddle\\"@<\\"sn1\\" \\"sn2\\">4\\\\n\\n-- ```\\n-- Examples:\\n-- **a single paradiddle**\\n-- ```language=Werckmeister\\\\n\\n--using \\"lua/mods/drumRudiments.lua\\";\\\\n\\n--tempo: 150;\\\\n\\n--device: MyDevice midi 0;\\\\n\\n--instrumentDef:piano MyDevice _ch=0 _pc=118;\\\\n\\n--[\\\\n\\n--instrument: piano;\\\\n\\n--{\\\\n\\n-- /mod: drumRudiments/\\\\n\\n-- -- a paradiddle (RLRR) with c\' for R and c for L\\\\n\\n-- \\"paradiddle\\"@<c\' c>1\\\\n\\n--}\\\\n\\n--]\\\\n\\n-- ```\\n-- **repeating**\\n-- ```language=Werckmeister\\\\n\\n--using \\"lua/mods/drumRudiments.lua\\";\\\\n\\n--tempo: 120;\\\\n\\n--device: MyDevice midi 0;\\\\n\\n--instrumentDef:piano MyDevice _ch=0 _pc=118;\\\\n\\n--[\\\\n\\n--instrument: piano;\\\\n\\n--{\\\\n\\n-- /mod: drumRudiments/\\\\n\\n-- -- performs 4 paradiddles (RLRR LRLL RLRR LRLL) with c\' for R and c for L\\\\n\\n-- \\"4x paradiddle\\"@<c\' c>1\\\\n\\n--}\\\\n\\n--]\\\\n\\n-- ```\\n-- **orchestration**\\n-- If you want to orchestrate a rudiment over a drum set,\\n-- you are able to define more R & L notes. *(The total number of the notes has to be even.)*\\n-- ```language=Werckmeister\\\\n\\n--using \\"lua/mods/drumRudiments.lua\\";\\\\n\\n--tempo: 120;\\\\n\\n--device: MyDevice midi 0;\\\\n\\n--instrumentDef:piano MyDevice _ch=0 _pc=118;\\\\n\\n--[\\\\n\\n--instrument: piano;\\\\n\\n--{\\\\n\\n-- /mod: drumRudiments/\\\\n\\n-- -- performs 4 paradiddles (RLRR LRLL RLRR LRLL) with \\\\n\\n-- -- c\' for R1 and c for L1\\\\n\\n-- -- and c, for R2 and c,, for L2.\\\\n\\n-- -- The final sequence will be: c\'(R1) c(L1) c,(R2) c,,(R1) ... \\\\n\\n-- \\"4x paradiddle\\"@<c\' c c, c,,>1\\n--}\\\\n\\n--]\\\\n\\n-- ```\\n-- **Supported Rudiments**\\n--<ul style=\\"font-size: 0.9em;\\">\\n--<li>singleStrokeRoll</li>\\n--<li>doubleStrokeRoll</li>\\n--<li>trippleStrokeRoll</li>\\n--<li>fiveStrokeRoll</li>\\n--<li>singleStrokeFour</li>\\n--<li>singleStrokeSeven</li>\\n--<li>multipleBounceRoll</li>\\n--<li>sixStrokeRoll</li>\\n--<li>sevenStrokeRoll</li>\\n--<li>nineStrokeRoll</li>\\n--<li>tenStrokeRoll</li>\\n--<li>elevenStrokeRoll</li>\\n--<li>thirteenStrokeRoll</li>\\n--<li>fifteenStrokeRoll</li>\\n--<li>seventeenStrokeRoll</li>\\n--<li>paradiddle</li>\\n--<li>doubleParadiddle</li>\\n--<li>trippleParadiddle</li>\\n--<li>paradiddlediddle</li>\\n--<li>flam</li>\\n--<li>flamAccent</li>\\n--<li>flamTap</li>\\n--<li>flamacue</li>\\n--<li>flamParadiddle</li>\\n--<li>singleFlammedMill</li>\\n--<li>pataflafla</li>\\n--<li>swissArmytriplet</li>\\n--<li>invertedFlamTap</li>\\n--<li>flamDrag</li>\\n--<li>singleDragTap</li>\\n--<li>doubleDragTap</li>\\n--<li>lesson25</li>\\n--<li>singleDragadiddle</li>\\n--<li>dragParadiddle1</li>\\n--<li>dragParadiddle2</li>\\n--<li>singleRatamacue</li>\\n--<li>doubleRatamacue</li>\\n--<li>trippleRatamacue</li>\\n--</ul>\\n-- ]]>\\n-- </command>\\n-- <param name=\\"velocityFactorAccented\\" optional=\\"1\\" type=\\"0..1\\">The velocity factor for accented notes (Default=1)</param>\\n-- <param name=\\"velocityFactorUnaccented\\" optional=\\"1\\" type=\\"0..1\\">The velocity factor for unaccented notes (Default=0.7)</param>\\n-- <param name=\\"velocityFactorGraceNote\\" optional=\\"1\\" type=\\"0..1\\">The velocity factor for accented notes (Default=1)</param>\\n-- <param name=\\"flamOffset\\" optional=\\"1\\" type=\\"0..N\\">The offset in quartes when to perform the grace note before the actual note (Default=0.05)</param>\\n-- <param name=\\"dragOffset\\" optional=\\"1\\" type=\\"0..N\\">The offset in quartes when to perform the two grace notes before the actual note (Default=0.05)</param>\\n\\n\\n\\nrequire \\"lua/com/com\\"\\nrequire \\"_drumRudimentsRepository\\"\\nrequire \\"_events\\"\\n\\nparameters = {\\n { name=\\"velocityFactorAccented\\", default=\\"1\\" },\\n { name=\\"velocityFactorUnaccented\\", default=\\"0.7\\" },\\n { name=\\"velocityFactorGraceNote\\", default=\\"0.2\\" },\\n { name=\\"flamOffset\\", default=\\"0.05\\" },\\n { name=\\"dragOffset\\", default=\\"0.05\\" },\\n}\\n\\n\\nSupportedRepeatTags = {\\n [\\"2x\\"] = 2,\\n [\\"3x\\"] = 3,\\n [\\"4x\\"] = 4,\\n [\\"5x\\"] = 5,\\n [\\"6x\\"] = 6,\\n [\\"7x\\"] = 7,\\n [\\"8x\\"] = 8,\\n [\\"9x\\"] = 9,\\n [\\"10x\\"] = 10,\\n [\\"11x\\"] = 11,\\n [\\"12x\\"] = 12,\\n [\\"13x\\"] = 13,\\n [\\"14x\\"] = 14,\\n [\\"15x\\"] = 15,\\n [\\"16x\\"] = 16,\\n [\\"17x\\"] = 17,\\n [\\"18x\\"] = 18,\\n [\\"19x\\"] = 19,\\n [\\"20x\\"] = 20,\\n [\\"21x\\"] = 21,\\n [\\"22x\\"] = 22,\\n [\\"23x\\"] = 23,\\n [\\"24x\\"] = 24,\\n [\\"25x\\"] = 25,\\n [\\"26x\\"] = 26,\\n [\\"27x\\"] = 27,\\n [\\"28x\\"] = 28,\\n [\\"29x\\"] = 29,\\n [\\"30x\\"] = 30,\\n [\\"31x\\"] = 31,\\n [\\"32x\\"] = 32,\\n}\\n\\nlocal tiedEventCache = {\\n [\\"offset\\"] = 0,\\n [\\"duration\\"] = 0,\\n [\\"originEvent\\"] = nil\\n}\\n\\nlocal function newTiedEventCache(event)\\n tiedEventCache.duration = event.duration\\n tiedEventCache.originEvent = event\\nend\\n\\nlocal function isTiedEventCacheEmpty()\\n return tiedEventCache.originEvent == nil\\nend\\n\\nlocal function clearTiedEventCache()\\n tiedEventCache.originEvent = nil\\n tiedEventCache.duration = 0\\n tiedEventCache.offset = 0\\nend\\n\\nlocal function getPossibleRudimentEvent(events)\\n local firstEvent = events[1]\\n if not isTiedEventCacheEmpty() then\\n tiedEventCache.duration = tiedEventCache.duration + firstEvent.duration\\n tiedEventCache.offset = tiedEventCache.offset - firstEvent.duration\\n if firstEvent.isTied then\\n return nil\\n end\\n end\\n if not isTiedEventCacheEmpty() and not firstEvent.isTied then\\n firstEvent = tiedEventCache.originEvent\\n firstEvent.isTied = false\\n firstEvent.offset = tiedEventCache.offset\\n firstEvent.duration = tiedEventCache.duration\\n clearTiedEventCache()\\n end\\n return firstEvent\\nend\\n\\n\\nfunction perform(events, params, timeinfo)\\n local firstEvent = getPossibleRudimentEvent(events)\\n if (firstEvent == nil) then\\n return {}\\n end\\n if #events == 0 or #firstEvent.tags == 0 then\\n return events\\n end\\n if firstEvent.duration == 0 then\\n return events\\n end\\n local rudimentPerformer = RudimentPerformer:new()\\n rudimentPerformer.velocityFactorAccented = tonumber(params.velocityFactorAccented)\\n rudimentPerformer.velocityFactorUnaccented = tonumber(params.velocityFactorUnaccented)\\n rudimentPerformer.velocityFactorGraceNote = tonumber(params.velocityFactorGraceNote)\\n rudimentPerformer.flamOffset = tonumber(params.flamOffset)\\n rudimentPerformer.dragOffset = tonumber(params.dragOffset)\\n rudimentPerformer:setSourceEvent(firstEvent)\\n if rudimentPerformer.rudiment == nil then\\n return events\\n end\\n if firstEvent.isTied then\\n newTiedEventCache(firstEvent)\\n return {}\\n end\\n local rudimentEvents = rudimentPerformer:perform();\\n return rudimentEvents\\nend\\n\\nRudimentPerformer = {}\\nfunction RudimentPerformer:new(o)\\n local o = o or {}\\n setmetatable(o, self)\\n self.__index = self\\n self.idxL = 1\\n self.idxR = 1\\n self.offset = 0\\n self.velocityFactorAccented = 1\\n self.velocityFactorUnaccented = 0.7\\n self.velocityFactorGraceNote = 0.2\\n self.flamOffset = 0.05\\n self.dragOffset = 0.05\\n return o\\nend\\n\\nfunction RudimentPerformer:findRudimentName(tags)\\n for idx, tag in pairs(tags) do\\n local val = Rudiments[tag]\\n if val ~= nil then\\n return tag\\n end\\n end\\n return nil\\nend\\n\\nfunction RudimentPerformer:findRepeatTagValue(tags)\\n for idx, tag in pairs(tags) do\\n local val = SupportedRepeatTags[tag]\\n if val ~= nil then\\n return val\\n end\\n end\\n return nil\\nend\\n\\nfunction RudimentPerformer:setSourceEvent(event)\\n local rudimentName = self:findRudimentName(event.tags)\\n local source = event.pitches\\n self.offset = event.offset\\n self.rudiment = Rudiments[rudimentName]\\n if self.rudiment == nil then\\n return\\n end\\n if #source % 2 ~= 0 then\\n -- not enough events\\n error(\\"not enough chord pitches for rudiment \\" .. rudimentName)\\n end\\n local repeatCount = self:findRepeatTagValue(event.tags)\\n if repeatCount ~= nil then\\n self:repeat_(repeatCount)\\n end\\n self.duration = event.duration\\n self.ls = {}\\n self.rs = {}\\n self.velocity = event.velocity\\n for idx, pitch in pairs(source) do\\n if idx % 2 == 0 then\\n table.insert(self.ls, pitch)\\n else\\n table.insert(self.rs, pitch)\\n end\\n end\\nend\\n\\nfunction RudimentPerformer:repeat_(count)\\n local sequence = {}\\n for i=1,count do\\n local useAlternation = i % 2 == 1\\n for idx, rudimentEvent in pairs(self.rudiment) do\\n local event = rudimentEvent\\n if (useAlternation) then\\n event = AlternateEvent(event)\\n end\\n table.insert(sequence, event)\\n end\\n end\\n self.rudiment = sequence\\nend\\n\\nfunction RudimentPerformer:l()\\n local l = self.ls[self.idxL]\\n self.idxL = self.idxL + 1\\n if self.idxL > #self.ls then\\n self.idxL = 1\\n end\\n return l\\nend\\n\\nfunction RudimentPerformer:r()\\n local r = self.rs[self.idxR]\\n self.idxR = self.idxR + 1\\n if self.idxR > #self.ls then\\n self.idxR = 1\\n end\\n return r\\nend\\n\\nfunction RudimentPerformer:nextPitch(lOrR)\\n if lOrR == nil then\\n error(\\"invalid L R value for rudiment: nil\\")\\n end\\n if lOrR == L then\\n return self:l()\\n elseif lOrR == R then\\n return self:r()\\n end\\n error(\\"invalid L R value for rudiment: \\" .. lOrR)\\nend\\n\\n-- duration of the rudiment definition\\nfunction RudimentPerformer:defDuration()\\n local duration = 0\\n for idx, rudiment in pairs(self.rudiment) do\\n duration = duration + rudiment.duration\\n end\\n return duration\\nend\\n\\nfunction RudimentPerformer:getVelocityFactor(rudiment)\\n if rudiment.velocityClass == Accent then\\n return self.velocityFactorAccented\\n end\\n if rudiment.velocityClass == Unaccented then\\n return self.velocityFactorUnaccented\\n end\\n if rudiment.velocityClass == GraceNote then\\n return self.velocityFactorGraceNote\\n end\\n error(\\"no velocity value for class \\" .. rudiment.velocityClass)\\nend\\n\\nfunction RudimentPerformer:perform()\\n local events = {}\\n local offset = self.offset\\n local durationFactor = self.duration / self:defDuration()\\n for idx, rudiment in pairs(self.rudiment) do\\n local type = rudiment.type\\n local which = rudiment.which\\n local duration = rudiment.duration\\n local velocityFactor = self:getVelocityFactor(rudiment)\\n local note = Note:new()\\n note.duration = duration * durationFactor\\n note.velocity = self.velocity * velocityFactor\\n note.offset = offset\\n local pitch = self:nextPitch(which)\\n note:addPitch(pitch.pitch, pitch.octave)\\n if type == FlamType then\\n self:performFlam(events, note, Alt(which))\\n end\\n if type == DragType then\\n self:performDrag(events, note, Alt(which))\\n end \\n table.insert(events, note)\\n offset = offset + note.duration\\n end\\n return events\\nend\\n\\n\\nfunction RudimentPerformer:performFlam(events, note, which)\\n local flamDuration = self.flamOffset\\n local flam = Note:new()\\n local pitch = self:nextPitch(which)\\n flam:addPitch(pitch.pitch, pitch.octave)\\n flam.duration = flamDuration\\n flam.velocity = note.velocity * self.velocityFactorGraceNote\\n flam.offset = note.offset\\n note.offset = note.offset + flamDuration\\n note.duration = note.duration\\n table.insert(events, flam)\\nend\\n\\nfunction RudimentPerformer:performDrag(events, note, which)\\n local flamDuration = self.dragOffset\\n local pitch = self:nextPitch(which)\\n local flam = Note:new()\\n flam:addPitch(pitch.pitch, pitch.octave)\\n flam.duration = flamDuration\\n flam.velocity = note.velocity * self.velocityFactorGraceNote\\n flam.offset = note.offset\\n table.insert(events, flam)\\n\\n flam = Note:new()\\n flam:addPitch(pitch.pitch, pitch.octave)\\n flam.duration = flamDuration\\n flam.velocity = note.velocity * self.velocityFactorGraceNote\\n flam.offset = note.offset + flamDuration\\n table.insert(events, flam)\\n\\n note.offset = note.offset + flamDuration * 2\\n note.duration = note.duration\\n\\nend\\n"}, {"path": "lua/mods/guitarStroke.lua", "data": "-- <command name=\\"guitarStroke\\" where=\\"mod\\" using=\\"lua/mod/guitarStroke.lua\\">\\n-- <![CDATA[\\n-- Simulates guitar strokes as mini arpeggios.\\n-- *Note: the alternate mode works only if this mod is set via instrumentConf.*\\n-- ```\\n-- -- does not work: \\\\n\\n-- [ \\\\n\\n-- { \\\\n\\n-- /mod: guitarStroke _mode=alternate/\\\\n\\n-- } \\\\n\\n-- ] \\\\n\\n-- ```\\n-- ```\\n-- -- does work: \\\\n\\n-- instrumentConf: myInstrument mod guitarStroke _mode=alternate; \\\\n\\n-- ```\\n-- **Example**\\n-- ```language=Werckmeister\\\\n\\n--using \\"lua/mods/guitarStroke.lua\\";\\\\n\\n--tempo: 120;\\\\n\\n--device: MyDevice midi 0;\\\\n\\n--instrumentDef: piano MyDevice _ch=0 _pc=24;\\\\n\\n--instrumentConf: piano mod guitarStroke _mode=alternate _value=16; \\\\n\\n--[\\\\n\\n--instrument: piano;\\\\n\\n--{\\\\n\\n-- <c e g b>4 <c e g b>4 <c eb g bb>2 | <c eb g bb>2 <c eb g bb>2\\\\n\\n--}\\\\n\\n--]\\\\n\\n-- ```\\n-- ]]>\\n-- </command>\\n-- <param name=\\"direction\\" optional=\\"1\\" type=\\"[up,down]\\">Specifies the start direction of the stroke</param>\\n-- <param name=\\"value\\" optional=\\"1\\" type=\\"[1,2,4,8,...]\\">the duration of one arpeggio event. (Default=64)</param>\\n-- <param name=\\"mode\\" optional=\\"1\\" type=\\"[normal,alternate]\\">Perform only one stroke direction (normal) or alternates between up and down. (Default=normal)</param>\\n\\nrequire \\"lua/com/com\\"\\nrequire \\"_events\\"\\n\\n\\nparameters = {\\n -- can be up, down\\n { name=\\"direction\\", default=\\"up\\" },\\n -- can be 1, 2, 4, 8, 16, 32, 64, ...\\n { name=\\"value\\", default=\\"64\\" },\\n -- can be normal, alternate\\n { name=\\"mode\\", default=\\"normal\\" }\\n\\n}\\n\\nlocal direction = nil\\nlocal mode = nil\\n\\nfunction perform(eventsOrigin, params, timeinfo)\\n if #eventsOrigin > 2 then\\n return eventsOrigin\\n end\\n checkLegacyNamedParams(params, \\"direction\\", \\"mode\\", \\"value\\")\\n local directionParam = params.direction\\n local modeParam = params.mode\\n local value = params.value\\n value = tonumber(value)\\n local event = eventsOrigin[1]\\n local events = { }\\n local comparer = pitchCompare\\n \\n if mode == nil then\\n mode = modeParam\\n end\\n\\n if direction ==nil then\\n direction = directionParam\\n end\\n\\n if direction == \\"down\\" then\\n comparer = pitchCompareReversed\\n if mode == \\"alternate\\" then\\n direction = \\"up\\"\\n end\\n else\\n comparer = pitchCompare\\n if mode == \\"alternate\\" then\\n direction = \\"down\\"\\n end\\n end\\n\\n local duration = 1 / value\\n table.sort( event.pitches, comparer)\\n for i, pitch in pairs(event.pitches) do\\n local note = Note:new()\\n local newOffset = event.offset + (i-1) * duration\\n note.offset = newOffset\\n note.duration = event.duration - newOffset\\n note.isTied = event.isTied\\n note.velocity = event.velocity\\n note:addPitch(pitch.pitch, pitch.octave)\\n table.insert(events, note) \\n end\\n return events\\nend"}, {"path": "lua/mods/legato.lua", "data": "-- <command name=\\"legato\\" where=\\"mod\\" using=\\"lua/mod/legato.lua\\">\\n-- Performs every note legato. It is also possible to tag single notes.\\n-- If a tag is given, only the tagged notes are performed legato.\\n-- ```language=Werckmeister\\\\n\\n--using \\"lua/mods/legato.lua\\";\\\\n\\n--tempo: 140;\\\\n\\n--device: MyDevice midi 0;\\\\n\\n--instrumentDef:piano MyDevice _ch=0 _pc=0;\\\\n\\n--[\\\\n\\n--instrument: piano;\\\\n\\n--{\\\\n\\n-- /mod: legato _forTag=leg _amount=100/\\\\n\\n-- -- only the `d` will be performed legato. \\\\n\\n-- c \\"leg\\"@d e f\\\\n\\n--}\\\\n\\n--]\\\\n\\n-- ```\\n-- </command>\\n-- <param name=\\"forTag\\" optional=\\"1\\" type=\\"text\\">Specifies a tag name. If set only events with this tag name will be affected by the legato mod.</param>\\n-- <param name=\\"amount\\" optional=\\"1\\" type=\\"0..100\\">The ammount of the legato effect</param>\\n\\nrequire \\"lua/com/com\\"\\n\\nlocal defaultAmountValue = 50\\n\\nparameters = {\\n -- specify a tag name. If set only events with this tag name will be affected by the staccato mod. \\n { name=\\"forTag\\", default=ParameterValueNoTag },\\n -- the ammount of the staccato mod. Can be between 0 and 100\\n { name=\\"amount\\", default=\\"50\\" }\\n}\\n\\nfunction perform(events, params, timeinfo) \\n checkLegacyNamedParams(params, \\"forTag\\", \\"amount\\")\\n local tag = params.forTag\\n if tag == ParameterValueNoTag then\\n tag = nil\\n end\\n local amount = tonumber(params.amount)\\n local factor = 100 - ((amount/100) * 90)\\n factor = factor / 100\\n for i, event in pairs(events) do\\n if tag == nil or contains(event.tags, tag) then\\n event.duration = event.duration / factor\\n end\\n end\\n return events\\nend"}, {"path": "lua/mods/myArpeggio.lua", "data": "-- <command name=\\"myArpeggio\\" where=\\"mod\\" using=\\"lua/mod/myArpeggio.lua\\">\\n-- <![CDATA[\\n-- A simple arpeggio implementation.\\n-- **Example**\\n-- ```language=Werckmeister\\\\n\\n--using \\"lua/mods/myArpeggio.lua\\";\\\\n\\n--tempo: 120;\\\\n\\n--device: MyDevice midi 0;\\\\n\\n--instrumentDef: piano MyDevice _ch=0 _pc=0;\\\\n\\n--[\\\\n\\n--instrument: piano;\\\\n\\n--{\\\\n\\n-- /do: myArpeggio/ \\\\n\\n-- <c e g b>2 \\\\n\\n-- /do: myArpeggio _direction=down/ \\\\n\\n-- <c eb g bb>2 \\\\n\\n--}\\\\n\\n--]\\\\n\\n-- ```\\n-- ]]>\\n-- </command>\\n-- <param name=\\"style\\" optional=\\"1\\" type=\\"[normal,legato]\\">Performs the arpeggio normal or legato</param>\\n-- <param name=\\"direction\\" optional=\\"1\\" type=\\"[up,down]\\">the direction of the arpeggio. (Default=up)</param>\\n\\nrequire \\"lua/com/com\\"\\nrequire \\"_events\\"\\n\\n\\nparameters = {\\n -- can be legato, normal\\n { name=\\"style\\", default=\\"normal\\" },\\n -- can be up, down\\n { name=\\"direction\\", default=\\"up\\" }\\n}\\n\\nfunction perform(eventsOrigin, params, timeinfo)\\n checkLegacyNamedParams(params, \\"direction\\", \\"style\\")\\n local event = eventsOrigin[1]\\n local events = { }\\n local comparer = pitchCompare\\n local direction = params.direction\\n local style = params.style\\n\\n if direction == \\"down\\" then\\n comparer = pitchCompareReversed\\n end\\n local duration = event.duration / #event.pitches\\n table.sort( event.pitches, comparer)\\n for i, pitch in pairs(event.pitches) do\\n local note = Note:new()\\n note.duration = duration\\n if style == \\"legato\\" then\\n note.duration = event.duration\\n end\\n note.velocity = event.velocity\\n note.offset = (i-1) * duration\\n note.isTied = event.isTied\\n note:addPitch(pitch.pitch, pitch.octave)\\n table.insert(events, note) \\n end\\n return events\\nend"}, {"path": "lua/mods/staccato.lua", "data": "-- <command name=\\"staccato\\" where=\\"mod\\" using=\\"lua/mod/staccato.lua\\">\\n-- Performs every note staccato. It is also possible to tag single notes.\\n-- If a tag is given, only the tagged notes are performed staccato.\\n-- ```language=Werckmeister\\\\n\\n--using \\"lua/mods/staccato.lua\\";\\\\n\\n--tempo: 140;\\\\n\\n--device: MyDevice midi 0;\\\\n\\n--instrumentDef:piano MyDevice _ch=0 _pc=0;\\\\n\\n--[\\\\n\\n--instrument: piano;\\\\n\\n--{\\\\n\\n-- /mod: staccato _forTag=stac _amount=100/\\\\n\\n-- -- only the `d` will be performed staccato. \\\\n\\n-- c \\"stac\\"@d e f\\\\n\\n--}\\\\n\\n--]\\\\n\\n-- ``` \\n-- </command>\\n-- <param name=\\"forTag\\" optional=\\"1\\" type=\\"text\\">Specifies a tag name. If set only events with this tag name will be affected by the staccato mod.</param>\\n-- <param name=\\"amount\\" optional=\\"1\\" type=\\"0..100\\">The ammount of the staccato effect</param>\\n\\nrequire \\"lua/com/com\\"\\n\\n\\nparameters = {\\n -- specify a tag name. If set only events with this tag name will be affected by the staccato mod. \\n { name=\\"forTag\\", default=ParameterValueNoTag },\\n -- the ammount of the staccato mod. Can be between 0 and 100\\n { name=\\"amount\\", default=\\"50\\" }\\n}\\n\\nfunction perform(events, params, timeinfo)\\n checkLegacyNamedParams(params, \\"forTag\\", \\"amount\\")\\n local tag = params.forTag\\n if tag == ParameterValueNoTag then\\n tag = nil\\n end\\n local amount = tonumber(params.amount)\\n local factor = 100 - ((amount/100) * 90)\\n factor = factor / 100\\n for i, event in pairs(events) do\\n if tag == nil or contains(event.tags, tag) then\\n event.duration = event.duration * factor\\n end\\n end\\n return events\\nend"}, {"path": "lua/mods/swing.lua", "data": "-- <command name=\\"swing\\" where=\\"mod\\" using=\\"lua/mod/swing.lua\\">\\n-- Performs a swing groove.\\n-- ```language=Werckmeister\\\\n\\n--using \\"lua/mods/swing.lua\\";\\\\n\\n--tempo: 120;\\\\n\\n--device: MyDevice midi 0;\\\\n\\n--instrumentDef: piano MyDevice _ch=0 _pc=0;\\\\n\\n--[\\\\n\\n--instrument: piano;\\\\n\\n--{\\\\n\\n-- /mod: swing/\\\\n\\n-- c8 c c c c c c c\\n--}\\\\n\\n--]\\\\n\\n-- ```\\n-- </command>\\n-- <param name=\\"grid\\" optional=\\"1\\" type=\\"[8, 16]\\">Performs the swing offset either on 8th or 16th. (Default=8)</param>\\n-- <param name=\\"offset\\" optional=\\"1\\" type=\\"0..100\\">The ammount of the swing offset</param>\\n\\nrequire \\"lua/com/com\\"\\n\\nparameters = {\\n -- can be 8, 16\\n { name=\\"grid\\", default=\\"8\\" },\\n -- can be between 0 and 100\\n { name=\\"offset\\", default=\\"100\\" }\\n}\\n\\n\\nfunction compareQuarters(a, b)\\n return math.abs(a-b) <= 0.1\\nend\\n\\nfunction isLaidBack(timeinfo, grid)\\n local q = timeinfo.quarterPosition\\n q = q - math.floor(q)\\n if grid == 16 then\\n return compareQuarters(q, 0.25) or compareQuarters(q, 0.75)\\n end\\n return compareQuarters(q, 0.5)\\nend\\n\\nfunction offset(grid, offset)\\n if offset == nil then\\n offset = 100\\n end\\n offset = offset / 100\\n local max = 0.25\\n if grid == 16 then\\n max = 0.09\\n end\\n return offset * max\\nend\\n\\nfunction perform(events, params, timeinfo)\\n checkLegacyNamedParams(params, \\"grid\\", \\"offset\\")\\n local gridValue = tonumber(params.grid)\\n local offsetValue = tonumber(params.offset)\\n for i, event in pairs(events) do\\n if isLaidBack(timeinfo, gridValue) then\\n event.offset = offset(gridValue, offsetValue)\\n event.velocity = event.velocity\\n end\\n end\\n return events\\nend"}, {"path": "lua/voicings/config.lua", "data": "PitchRanges = {\\n contrabass = { min=28, max=55 },\\n bass = { min=40, max=60 },\\n baritone = { min=45, max=69 },\\n tenor = { min=48, max=72 },\\n alto = { min=53, max=77 },\\n mezzosoprano = { min=57, max=81 },\\n soprano = { min=60, max=84 }\\n}"}, {"path": "lua/voicings/guitar.lua", "data": "-- <command name=\\"guitar\\" where=\\"voicingStrategy\\" using=\\"lua/voicings/guitar.lua\\">\\n-- <![CDATA[\\n-- Tries to simulate the chord voicing of an guitar.\\n-- ```language=Werckmeister\\\\n\\n--using \\"lua/voicings/guitar.lua\\";\\\\n\\n--using \\"chords/default.chords\\";\\n--tempo: 120;\\\\n\\n--device: MyDevice midi 0;\\\\n\\n--instrumentDef:piano MyDevice _ch=0 _pc=0;\\\\n\\n--[\\\\n\\n--type: template;\\\\n\\n--name: myTemplate;\\\\n\\n--instrument: piano;\\\\n\\n--{\\\\n\\n-- /voicingStrategy: guitar/\\\\n\\n-- <I II III IV V VI VII>1\\\\n\\n--}\\\\n\\n--]\\\\n\\n--[\\\\n\\n--type: accomp;\\n--{\\\\n\\n-- C | F | G | C |\\\\n\\n--}\\\\n\\n--]\\\\n\\n-- ```\\n-- ]]>\\n-- </command>\\n-- <param name=\\"range\\" optional=\\"1\\" type=\\"[contrabass,bass,baritone,tenor,alto,mezzosoprano,soprano]\\">If given the strategy tries to keeps the range by shifting the octave of the chord.</param>\\n\\nrequire \\"lua/com/com\\"\\nrequire \\"lua/com/globals\\"\\nrequire \\"solvers/guitar\\"\\n\\nparameters = {\\n table.unpack(ASolverDefaultParameter)\\n}\\n\\nlocal solver = GuitarSolver:new()\\n\\nfunction solve(chord, degrees, params, timeinfo)\\n return solver:solve(chord, degrees, params)\\nend"}, {"path": "lua/voicings/simple.lua", "data": "-- <command name=\\"simple\\" where=\\"voicingStrategy\\" using=\\"lua/voicings/simple.lua\\">\\n-- <![CDATA[\\n-- The simple approach with no strategy.\\n-- ```language=Werckmeister\\\\n\\n--using \\"lua/voicings/simple.lua\\";\\\\n\\n--using \\"chords/default.chords\\";\\n--tempo: 120;\\\\n\\n--device: MyDevice midi 0;\\\\n\\n--instrumentDef:piano MyDevice _ch=0 _pc=0;\\\\n\\n--[\\\\n\\n--type: template;\\\\n\\n--name: myTemplate;\\\\n\\n--instrument: piano;\\\\n\\n--{\\\\n\\n-- /voicingStrategy: simple/\\\\n\\n-- <I II III IV V VI VII>1\\\\n\\n--}\\\\n\\n--]\\\\n\\n--[\\\\n\\n--type: accomp;\\n--{\\\\n\\n-- C | F | G | C |\\\\n\\n--}\\\\n\\n--]\\\\n\\n-- ```\\n-- ]]>\\n-- </command>\\n-- <param name=\\"range\\" optional=\\"1\\" type=\\"[contrabass,bass,baritone,tenor,alto,mezzosoprano,soprano]\\">If given the strategy tries to keeps the range by shifting the octave of the chord.</param>\\n\\nrequire \\"lua/com/com\\"\\nrequire \\"solvers/simple\\"\\nrequire \\"solvers/asolver\\"\\n\\nparameters = {\\n table.unpack(ASolverDefaultParameter)\\n}\\n\\nlocal solver = Simple:new()\\n\\nfunction solve(chord, degrees, parameters)\\n return solver:solve(chord, degrees, parameters)\\nend"}, {"path": "lua/voicings/voicelead.lua", "data": "-- <command name=\\"voicelead\\" where=\\"voicingStrategy\\" using=\\"lua/voicings/voicelead.lua\\">\\n-- <![CDATA[\\n-- Tries to simulates a voice leading approach:\\n-- the octaves of a chord are rearranged, so that the actual pitch distance between the previous chord is kept minimal.\\n-- ```language=Werckmeister\\\\n\\n--using \\"lua/voicings/voicelead.lua\\";\\\\n\\n--using \\"chords/default.chords\\";\\n--tempo: 120;\\\\n\\n--device: MyDevice midi 0;\\\\n\\n--instrumentDef:piano MyDevice _ch=0 _pc=0;\\\\n\\n--[\\\\n\\n--type: template;\\\\n\\n--name: myTemplate;\\\\n\\n--instrument: piano;\\\\n\\n--{\\\\n\\n-- /voicingStrategy: voicelead/\\\\n\\n-- <I II III IV V VI VII>1\\\\n\\n--}\\\\n\\n--]\\\\n\\n--[\\\\n\\n--type: accomp;\\n--{\\\\n\\n-- C | F | G | C |\\\\n\\n--}\\\\n\\n--]\\\\n\\n-- ```\\n-- ]]>\\n-- </command>\\n-- <param name=\\"range\\" optional=\\"1\\" type=\\"[contrabass,bass,baritone,tenor,alto,mezzosoprano,soprano]\\">If given the strategy tries to keeps the range by shifting the octave of the chord.</param>\\n\\nrequire \\"lua/com/com\\"\\nrequire \\"lua/com/globals\\"\\nrequire \\"solvers/voicelead\\"\\n\\nparameters = {\\n table.unpack(ASolverDefaultParameter)\\n}\\n\\nlocal solver = VoiceLeadSolver:new()\\n\\nfunction solve(chord, degrees, params)\\n return solver:solve(chord, degrees, params)\\nend"}, {"path": "lua/voicings/solvers/asolver.lua", "data": "require \\"config\\"\\nrequire \\"lua/com/com\\"\\n\\nNoRangeSet = \\"__noRangeSet\\"\\nNoImportantDegreesSet = \\"_noImportantDegreesSet\\"\\n\\nASolverDefaultParameter = {\\n -- can be contrabass, bass, baritone, tenor, alto, mezzosoprano, soprano\\n { name=\\"range\\", default=NoRangeSet },\\n { name=\\"importantDegrees\\", default=NoImportantDegreesSet },\\n { name=\\"importantDegree\\", default=NoImportantDegreesSet },\\n}\\nASolver = {}\\n\\nfunction ASolver:new(o)\\n local o = o or {}\\n setmetatable(o, self)\\n self.__index = self\\n return o\\nend\\n\\nfunction ASolver:checkForLegacyParameters(params)\\n checkLegacyNamedParams(params, \\"range\\", \\"importantDegrees\\", \\"importantDegree\\")\\nend\\n\\n-- returns the a degree def from the given degree def collection\\n-- if more than one degree def defined, it will return the first one\\nfunction ASolver:getDefaultDegreeDef(degreeValue, degrees)\\n local default = degrees[degreeValue]\\n if default == nil \\n then\\n return nil\\n end\\n return default[1]\\nend\\n\\n-- creates a absolute pitch using the given chord\\nfunction ASolver:createPitch(chord, degreeDef, octave)\\n if degreeDef == nil or degreeDef.degreeValue == nil\\n then\\n return nil\\n end\\n return { [\\"pitch\\"]= self:degreeToPitch(degreeDef, chord), [\\"octave\\"]=octave }\\nend\\n\\nfunction ASolver:degreeToPitch(degreeDef, chord)\\n return chord.rootPitch + degreeDef.degreeValue\\nend\\n\\nfunction ASolver:getAbsolutePitch(pitch)\\n return pitch.pitch + (pitch.octave * 12)\\nend\\n\\nfunction ASolver:_addImportantDegree(degrees, degreeVal, semitone)\\n local degreeInfo = self:getDefaultDegreeDef(degreeVal, degrees)\\n if degreeInfo==nil then\\n return\\n end\\n local degrObj = {\\n degreeValue= semitone,\\n octave= degreeInfo.octave\\n }\\n degrees[degreeVal] = {degrObj}\\nend\\n\\n-- set important degrees if defined in params\\n-- more informations about important degrees:\\n-- https://github.com/werckme/werckmeister/issues/123\\nfunction ASolver:_setImportantDegreesIfExists(params, degrees)\\n local strDegree = params.importantDegree\\n if (strDegree == nil or strDegree == NoImportantDegreesSet) then\\n strDegree = params.importantDegrees\\n if strDegree == nil or strDegree == NoImportantDegreesSet then\\n return\\n end\\n end\\n local strDegrees = split(strDegree, \\" \\")\\n for i, degree in pairs(strDegrees) do \\n local degreeVal = DegreeStringValues[degree]\\n if degreeVal ~= nil then\\n local semitone = MajorScaleSemitones[degree]\\n self:_addImportantDegree(degrees, degreeVal, semitone)\\n end\\n end\\nend\\n\\n-- solves degrees into absolute pitches\\n-- @param chord: the current cord informations\\n-- @param degrees: the current degree event including the semitone informations from \\n-- the chord definition eg.: { II= {degreeValue, octave} }\\n-- If the current chord has no information about a degree\\n-- the value is empty eg.: II= {} \\nfunction ASolver:solve(chord, degrees, params)\\n self:checkForLegacyParameters(params)\\n self:_setImportantDegreesIfExists(params, degrees)\\n local result = self:_solveImpl(chord, degrees, params)\\n if params.range ~= nil and params.range ~=NoRangeSet then\\n self:_keepRange(result, params.range)\\n end\\n return result\\nend\\n\\nfunction ASolver:_solveImpl(chord, degrees, args)\\n error(\\"this is an abstract function\\")\\nend\\n\\nfunction ASolver:_transpose(pitches, numOctaves)\\n for i, pitch in pairs(pitches) do\\n pitch.octave = pitch.octave + numOctaves\\n end\\nend\\n\\nfunction ASolver:_keepRange(pitches, strRange)\\n local destinationRange = PitchRanges[strRange]\\n if destinationRange == nil then\\n error(\\"strRange \\" .. strRange .. \\" not defined\\")\\n end\\n local nbUnder = 0\\n local nbOver = 0\\n local mindiff = math.maxinteger\\n local maxdiff = math.mininteger\\n for i, pitch in pairs(pitches) do\\n local midipitch = toMidiPitch(pitch)\\n if midipitch > destinationRange.max then\\n local diff = midipitch - destinationRange.max\\n if diff > maxdiff then\\n maxdiff = diff\\n end\\n nbOver = nbOver + 1\\n end\\n if midipitch < destinationRange.min then\\n local diff = destinationRange.min - midipitch\\n if diff < mindiff then\\n mindiff = diff\\n end\\n nbUnder = nbUnder + 1\\n end\\n end\\n if nbUnder > nbOver then\\n local octaves = math.ceil(mindiff/12)\\n self:_transpose(pitches, octaves)\\n end\\n if nbUnder < nbOver then\\n local octaves = -math.ceil(maxdiff/12)\\n self:_transpose(pitches, octaves)\\n end\\nend"}, {"path": "lua/voicings/solvers/config.lua", "data": "PitchRanges = {\\n contrabass = { min=28, max=55 },\\n bass = { min=40, max=60 },\\n baritone = { min=45, max=69 },\\n tenor = { min=48, max=72 },\\n alto = { min=53, max=77 },\\n mezzosoprano = { min=57, max=81 },\\n soprano = { min=60, max=84 }\\n}"}, {"path": "lua/voicings/solvers/guitar.lua", "data": "require \\"lua/voicings/solvers/asolver\\"\\nrequire \\"lua/com/globals\\"\\n\\n-- https://www.8notes.com \\n-- https://www.oolimo.de/gitarrenakkorde/find\\n-- https://www.scales-chords.com/chord/piano/\\nVoicingMatrix = {\\n [\\"1234567/bass\\"] = nil,\\n [\\"1010100\\"] = {I, V, I, III, I}, -- base\\n [\\"1100100\\"] = {I, V, I, II }, -- sus2\\n [\\"1001100\\"] = {I, V, I, IV, V }, -- sus4\\n [\\"1001101\\"] = {I, V, VII, IV, V}, -- 7sus4\\n [\\"1101101\\"] = {I, IV, VII, II, V}, -- 9sus4\\n [\\"1010110\\"] = {I, VI, III, V}, -- 6\\n [\\"1110110\\"] = {I, VI, III, V, II}, -- 6/9\\n [\\"1010101\\"] = {I, V, VII, III, I}, -- 7\\n [\\"1110101\\"] = {I, III, VII, II}, -- 9\\n [\\"1110100\\"] = {I, V, II, III}, -- add9\\n [\\"1011101\\"] = {I, IV, VII, III}, -- 11\\n [\\"1011001\\"] = {I, VII, III, IV}, -- 7#11\\n [\\"1010111\\"] = {I, V, VII, III, VI}, -- 13\\n [\\"1010101/7\\"] = {VII, V, I, III}, -- /7\\n [\\"1010100/5\\"] = {V, I, III, V}, -- /5\\n [\\"1011100/4\\"] = {IV, V, I, III}, -- /4\\n [\\"1010100/3\\"] = {III, V, I, III}, -- /3\\n [\\"1110100/2\\"] = {II, V, I, III}, -- /2\\n}\\n\\n\\n-- returns the degrees defined for a chord as a bit string.\\n-- e.g.: Xmaj\'s degrees are defined as I III V\\n-- 1234567\\n-- as bitstring = 1010100\\n-- if chord is a slash chord, the degree value will be appended as number.\\n-- e.g.: X/V = 1010100/5\\nfunction chordToHashString(chord)\\n bits = {}\\n slashAppendings = {}\\n local degree = chord.degrees\\n for i=1, 7 do\\n if degree[i] == nil then\\n bits[i] = 0\\n else\\n bits[i] = 1\\n if chord.degrees[i] < 0 then\\n table.insert(slashAppendings, i)\\n end\\n end\\n end\\n if #slashAppendings == 0 then\\n return table.concat(bits)\\n end\\n return table.concat(bits) .. \\"/\\" .. table.concat(slashAppendings)\\nend\\n\\nGuitarSolver = ASolver:new()\\n\\nfunction GuitarSolver:degreeToPitch(degreeDef, chord)\\n return chord.rootPitch + (degreeDef.degreeValue % 12)\\nend\\n\\nfunction GuitarSolver:_solveImpl(chord, degrees, params)\\n local d = function(degreeValue) return self:getDefaultDegreeDef(degreeValue, degrees) end\\n local strDegrees = chordToHashString(chord)\\n local voicing = VoicingMatrix[strDegrees]\\n if voicing == nil then\\n error(\\"no voicing found defined for \\" .. chord.strBase .. chord.strOptions .. \\" \\" .. strDegrees)\\n end\\n local result = {}\\n local octave = -1\\n local lastDegree = -1\\n for idx, degree in pairs(voicing) do\\n if degree <= lastDegree then \\n octave = octave + 1\\n end\\n lastDegree = degree\\n result[idx] = self:createPitch(chord, d(degree ), octave)\\n end\\n return result\\nend"}, {"path": "lua/voicings/solvers/simple.lua", "data": "require \\"lua/voicings/solvers/asolver\\"\\nrequire \\"lua/com/globals\\"\\n\\nSimple = ASolver:new()\\n\\nfunction Simple:degreeToPitch(degreeDef, chord)\\n return chord.rootPitch + degreeDef.degreeValue\\nend\\n\\nfunction Simple:_solveImpl(chord, degrees, parameters)\\n local pitches = {}\\n for degree, degreeDefs in pairs(degrees)\\n do\\n if isnumber(degree)\\n then\\n for idx, degreeDef in pairs(degreeDefs)\\n do\\n table.insert(pitches, self:createPitch(chord, degreeDef, degreeDef.octave))\\n end\\n end\\n end\\n return pitches\\nend"}, {"path": "lua/voicings/solvers/voicelead.lua", "data": "require \\"simple\\"\\nrequire \\"lua/com/globals\\"\\n\\nVoiceLeadSolver = Simple:new()\\n\\nfunction VoiceLeadSolver:getPitchWithMinDistance(pitch, pitches)\\n local min = math.maxinteger\\n local minPitch = nil\\n local relPitch = pitch.pitch % 12\\n for i, refpitch in pairs(pitches) do\\n local diff = relpitchdiff(refpitch.pitch, relPitch)\\n diff = math.abs(diff)\\n if (diff < min) then\\n minPitch = refpitch\\n min = diff\\n end\\n end\\n return minPitch\\nend\\n\\n-- changes the octave of pitch, so that the interval\\n-- between pitch and targetPitch is minimal\\nfunction VoiceLeadSolver:toPitchNextTo(pitch, targetPitch)\\n if targetPitch == nil then\\n return pitch\\n end\\n local diff = pitch.pitch - targetPitch.pitch\\n pitch.octave = targetPitch.octave\\n --print(pitch.pitch, targetPitch.pitch, diff)\\n if (diff > 6) then\\n pitch.octave = pitch.octave - 1\\n end\\n if (diff < -6) then\\n pitch.octave = pitch.octave + 1\\n end\\n return pitch\\nend\\n\\n\\n-- compare pitches with a reference and adjust octaves\\nfunction VoiceLeadSolver:adjustOctaves(pitches, reference)\\n for i, pitch in pairs(pitches) do\\n local min = self:getPitchWithMinDistance(pitch, reference) \\n self:toPitchNextTo(pitch, min)\\n end\\n return pitches\\nend\\n\\nfunction VoiceLeadSolver:_solveImpl(chord, degrees, params)\\n local pitches = Simple:_solveImpl(chord, degrees, params)\\n if #pitches < 2\\n then\\n return pitches\\n end\\n if self.previous ~= nil \\n then\\n pitches = self:adjustOctaves(pitches, self.previous)\\n end\\n return pitches\\nend\\n\\nfunction VoiceLeadSolver:solve(chord, degrees, params)\\n self:checkForLegacyParameters(params)\\n local result = self:_solveImpl(chord, degrees, params)\\n if params.range ~=nil and params.range ~=NoRangeSet then\\n self:_keepRange(result, params.range)\\n end\\n self.previous = result\\n return result\\nend"}, {"path": "pitchmaps/battery3.tight.pitchmap", "data": "\\"bd\\": c,,\\n\\"sn\\": d,,\\n\\"sng\\": g# --snare ghost notes\\n\\"ss\\": c#,, -- sidestick\\n\\"hc\\": d#,, -- handclap\\n\\"ht\\": f#,, -- hihat closed\\n\\"hf\\": g#,, -- hihat foot\\n\\"ho\\": bb,, -- hihat open\\n\\"ho1\\": g\' -- hihat half open1\\n\\"ho2\\": g#\' -- hihat half open2\\n\\"ho3\\": a\' -- hihat half open3\\n\\"cy\\": c#,\\n\\"hto\\": c,\\n\\"hto1\\": c,\\n\\"hto2\\": d,\\n\\"mto\\": b,,\\n\\"mto1\\": b,,\\n\\"mto2\\": a,,\\n\\"lto\\": g,,\\n\\"lto1\\": g,,\\n\\"lto2\\": f,,\\n\\"rdbell\\": f#,\\n\\"mtr\\": ab\'\\n\\"otr\\": a\'\\n-- r&l\\n\\"snl\\": d,,\\n\\"snr\\": e,,\\n\\"riml\\": c#,,\\n\\"rimr\\": d#,,\\n\\"htol\\": e,\\n\\"htor\\": f,\\n\\"mtol\\": c,\\n\\"mtor\\": d,\\n\\"ltol\\": b,,\\n\\"ltor\\": a,,\\n\\"ftol\\": g,,\\n\\"ftor\\": f,,\\n"}, {"path": "pitchmaps/defaultMIDI.pitchmap", "data": "\\"bd\\": c,,,,\\n\\"bd2\\": b,,,\\n\\"o\\": b,,,\\n\\"sn\\": d,,\\n\\"x\\": d,,\\n\\"sn2\\": e,,\\n\\"esn\\": e,, -- electric snare\\n\\"sng\\": d,, --snare ghost notes\\n\\"ss\\": c#,, -- sidestick\\n\\"hc\\": d#,, -- handclap\\n\\"ht\\": f#,, -- hihat closed\\n\\"h\\": f#,, -- hihat closed\\n\\"hf\\": g#,, -- hihat foot\\n\\"h,\\": g#,, -- hihat foot\\n\\"ho\\": bb,, -- hihat open\\n\\"h\'\\": bb,, -- hihat open\\n\\"ho1\\": bb,, -- hihat half open1\\n\\"ho2\\": bb,, -- hihat half open2\\n\\"ho3\\": bb,, -- hihat half open3\\n\\"cy\\": c#, -- crash cymbal\\n\\"spl\\": g, -- splash cymbal\\n\\"hto\\": c, -- high tom \\n\\"m\'\\": c, -- high tom \\n\\"hto1\\": c,\\n\\"hto2\\": d,\\n\\"mto\\": b,, -- middle tom\\n\\"m\\": b,, -- middle tom\\n\\"mto1\\": b,,\\n\\"mto2\\": a,,\\n\\"lto\\": g,, -- low tom\\n\\"m,\\": g,, -- low tom\\n\\"lto1\\": g,,\\n\\"lto2\\": f,,\\n\\"rcym1\\": d#, -- ride cymbal 1\\n\\"rcym2\\": b, -- ride cymbal 2\\n\\"rbell\\": f, -- ride bell\\n\\"mtr\\": ab\' -- muted triangle\\n\\"otr\\": a\' -- open triangle\\n\\"bo1\\": c --bongo 1\\n\\"bo2\\": c# --bongo 2\\n\\"tim1\\": f --timbale 1\\n\\"tim2\\": f# --timbale 2\\n\\"ago1\\": g --agogo 1\\n\\"ago2\\": g# --agogo 2\\n\\"cui1\\": f#\' -- cuica 1\\n\\"cui2\\": g\' -- cuica 2\\n\\"cwb\\": g#, -- cowbell\\n\\"cla\\": d#\' -- claves\\n\\"mcon\\":d -- mute high conga\\n\\"ocon\\":d# -- open conga\\n\\"lcon\\":e -- low conga\\n\\"tmb\\":f#, -- tambourine \\n\\n\\n\\"brsw\\": e,, -- brush swirl\\n\\"brtp\\": d,, -- brush tap\\n\\"brsp\\": d#,, -- brush slap"}, {"path": "pitchmaps/defaultMidiDrumMap.pitchmap", "data": "\\"bd\\": c,,,,\\n\\"sn\\": d,,\\n\\"sng\\": d,, --snare ghost notes\\n\\"ss\\": c#,, -- sidestick\\n\\"hc\\": d#,, -- handclap\\n\\"ht\\": f#,, -- hihat closed\\n\\"hf\\": g#,, -- hihat foot\\n\\"ho\\": bb,, -- hihat open\\n\\"ho1\\": bb,, -- hihat half open1\\n\\"ho2\\": bb,, -- hihat half open2\\n\\"ho2\\": bb,, -- hihat half open3\\n\\"cy\\": c#, -- crash cymal\\n\\"spl\\": g, -- splash cymal\\n\\"hto\\": c, -- high tom \\n\\"hto1\\": c,\\n\\"hto2\\": d,\\n\\"mto\\": b,, -- middle tom\\n\\"mto1\\": b,,\\n\\"mto2\\": a,,\\n\\"lto\\": g,, -- low tom\\n\\"lto1\\": g,,\\n\\"lto2\\": f,,\\n\\"rdbell\\": b,\\n\\"mtr\\": ab\' -- muted triangle\\n\\"otr\\": a\' -- open triangle\\n\\"bo1\\": c --bongo 1\\n\\"bo2\\": c# --bongo 2\\n\\"tim1\\": f --timbale 1\\n\\"tim2\\": f# --timbale 2\\n\\"ago1\\": g --agogo 1\\n\\"ago2\\": g# --agogo 2\\n\\"cui1\\": f#\' -- cuica 1\\n\\"cui2\\": g\' -- cuica 2\\n\\"cwb\\": g#, -- cowbell\\n\\"cla\\": d#\' -- claves\\n\\n\\"cr\\": c#, -- crash cymal\\n\\"t1\\": c, -- high tom \\n\\"t2\\": b,, -- middle tom\\n\\"t3\\": g,, -- low tom\\n\\"t4\\": f,,"}, {"path": "templates/bass.blues.template", "data": "[\\ntype: template;\\nname: bass.blues.normal; \\ninstrument: bass;\\n{\\n /do: swing _grid=8 _offset =60/\\n I,,,8 & I,,& VII,,,& V,,,& |\\n}\\n]"}, {"path": "templates/bass.bossanova.template", "data": "[\\ntype: template;\\nname: bass.bossanova.normal;\\ninstrument: bass; \\n{\\n \\\\fff\\n I,,4. V,,8 V,,4. I,,8 |\\n I,,4. V,,8 V,,4 I,,4 |\\n I,,4. V,,8 V,,4. I,,8 |\\n I,,4. V,,8 V,,4 I,,8 V,,8 |\\n} \\n] \\n"}, {"path": "templates/bass.country.template", "data": "[\\ntype: template;\\nname: bass.country.normal;\\ninstrument: bass; \\n{\\n I,,4. I,,8 V,,,4. V,,,8 |\\n} \\n] \\n\\n[\\ntype: template;\\nname: bass.country.ende;\\ninstrument: bass; \\n{\\n I,,1 |\\n} \\n] "}, {"path": "templates/bass.disco.template", "data": "[\\ntype: template;\\nname: bass.disco.normal;\\ninstrument: bass;\\n{\\n \\\\ffff\\n I,,8 I,16 I,16 I,,8 I,16 I,16 I,,8 I,16 I,16 I,,8 I,16 I,16 |\\n} \\n]\\n"}, {"path": "templates/bass.jazzSwing.template", "data": "-- tempo: 155\\n-- signature: 4/4\\n-- parts: normal\\n[\\ntype: template;\\nname: bass.jazzSwing.normal;\\ninstrument: bass; \\n{\\n I,,2 V,, | \\n I,, V,,,4 I,, |\\n}\\n\\n]\\n"}, {"path": "templates/bass.reggae.template", "data": "using \\"lua/mods/swing.lua\\";\\n\\n[\\ntype: template;\\nname: bass.reggae.normal;\\ninstrument: bass;\\n{\\n /do: swing _grid=8 _offset =30/\\n I,,16 r16 I,,8 r2 V,,,4 |\\n I,,16 r16 r8 I,,8 r4. V,,,4 |\\n I,,16 r16 I,,8 r2 V,,,4 |\\n I,,16 r16 I,,8 r2 V,,,4 |\\n}\\n]"}, {"path": "templates/bass.soca.template", "data": "[\\ntype: template;\\nname: bass.soca.normal;\\ninstrument: bass;\\n{\\n r8 r16 I,,32 r32 I,,8 I,,16 r \\n r8 r16 I,,32 r32 r16 I,,32 r V,,, r I,, r |\\n}\\n]"}, {"path": "templates/bossanova.template", "data": "using \\"lua/voicings/voicelead.lua\\";\\nusing \\"lua/voicings/simple.lua\\";\\nusing \\"lua/voicings/guitar.lua\\";\\nusing \\"lua/mods/guitarStroke.lua\\";\\n\\n[\\ntype: template;\\nname: bossanova.normal;\\ninstrument: drums;\\n{\\n \\"ht\\"8 !f\\"ht\\" \\"ht\\" !f\\"ht\\" \\"ht\\" \\"ht\\" \\"ht\\" !f\\"ht\\" |\\n} \\n{\\n \\\\fff\\n r4 \\"ss\\"8 r4 \\"ss\\"8 r4 | \\"ss\\"4. \\"ss\\"8 r4 \\"ss\\" |\\n} \\n{\\n \\"bd\\"4. \\"bd\\"8 \\"bd\\"4. \\"bd\\"8 |\\n} \\n]\\n\\n[\\ntype: template;\\nname: bossanova.normal;\\ninstrument: guitar; \\n{\\n /do: guitarStroke _value=32/\\n /voicingStrategy: guitar/\\n \\\\f\\n <I II III IV V VI VII>4 <I II III IV V VI VII>4 r8 <I II III IV V VI VII>8 r8 <I II III IV V VI VII>8 |\\n r8 <I II III IV V VI VII>8 r8 <I II III IV V VI VII>8 r4 <I II III IV V VI VII>4 |\\n <I II III IV V VI VII>4 <I II III IV V VI VII>4 r8 <I II III IV V VI VII>8 r8 <I II III IV V VI VII>8 |\\n r4 r8 <I II III IV V VI VII>8 r8 <I II III IV V VI VII>4. |\\n} \\n] \\n\\n[\\ntype: template;\\nname: bossanova.normal;\\ninstrument: piano; \\n{\\n -- /voicingStrategy: simple _range=tenor/\\n <VII, VII>4 <III, V,>8 <V, V>8 r8 <III, V,>8 r8 <V, V> | r8 <III, V,>8 r8 <V, V> r8 <III, V,> r8 <VII, VII> |\\n} \\n] \\n\\n[\\ntype: template;\\nname: bossanova.normal;\\ninstrument: bass; \\n{\\n \\\\fff\\n I,,4. V,,8 V,,4. I,,8 |\\n I,,4. V,,8 V,,4 I,,4 |\\n I,,4. V,,8 V,,4. I,,8 |\\n I,,4. V,,8 V,,4 I,,8 V,,8 |\\n} \\n] \\n"}, {"path": "templates/countryschlager1.template", "data": "using \\"lua/voicings/guitar.lua\\";\\nusing \\"lua/voicings/voicelead.lua\\";\\nusing \\"lua/mods/guitarStroke.lua\\";\\n\\n[\\ntype: template;\\nname: countryschlager1.normal;\\ninstrument: guitar; \\n{\\n /do: guitarStroke/\\n /voicingStrategy: guitar _range=tenor/\\n \\\\f\\n <I II III IV V VI VII>8 <I II III IV V VI VII>8 r8 \\n <I II III IV V VI VII>4 <I II III IV V VI VII>8 <I II III IV V VI VII>8 <I II III IV V VI VII>8 |\\n} \\n]\\n\\n[\\ntype: template;\\nname: countryschlager1.normal;\\ninstrument: slide; \\n{\\n \\\\f\\n /modOnce: bend from 0/\\n r1 |\\n r1 |\\n r1 |\\n <I\' II\' III\' IV\' V\' VI\' VII\'>1 |\\n r1 |\\n r1 |\\n r1 |\\n /modOnce: bend to 100/\\n <I\' II\' III\' IV\' V\' VI\' VII\'>1 |\\n} \\n] \\n\\n[\\ntype: template;\\nname: countryschlager1.normal;\\ninstrument: bass; \\n{\\n I,,4. I,,8 V,,,4. V,,,8 |\\n} \\n] \\n\\n[\\ntype: template;\\nname: countryschlager1.normal;\\ninstrument: drums;\\n{\\n \\"ht\\"8 !f\\"ht\\"8 \\"ht\\"8 !f\\"ht\\"8 \\"ht\\"8 !f\\"ht\\"8 \\"ht\\"8 !f\\"ht\\"8 |\\n} \\n{\\n r4 \\"sn\\" r \\"sn\\" |\\n}\\n{\\n \\"bd\\"4. \\"bd\\"8 \\"bd\\"4. \\"bd\\"8 |\\n \\"bd\\"4. \\"bd\\"8 \\"bd\\"4. \\"bd\\"8 |\\n \\"bd\\"4. \\"bd\\"8 \\"bd\\"8 !f\\"bd\\"8 r8 \\"bd\\"8 |\\n} \\n] \\n\\n[\\ntype: template;\\nname: countryschlager1.ende;\\ninstrument: guitar; \\n{\\n /do: guitarStroke _value=8/\\n <I II III IV V VI VII>1 |\\n} \\n] \\n\\n[\\ntype: template;\\nname: countryschlager1.ende;\\ninstrument: bass; \\n{\\n I,,1 |\\n} \\n] \\n\\n[\\ntype: template;\\nname: countryschlager1.ende;\\ninstrument: drums;\\n{\\n \\"cy\\"1 |\\n} \\n{\\n \\"bd\\"1|\\n} \\n]\\n\\n[\\ntype: template;\\nname: countryschlager1.ende;\\ninstrument: slide; \\n{\\n \\\\f\\n /modOnce: bend from 1/\\n <I\' II\' III\' IV\' V\' VI\' VII\'>1 |\\n} \\n] \\n"}, {"path": "templates/drums.bossanova.template", "data": "[\\ntype: template;\\nname: drums.bossanova.normal;\\ninstrument: drums;\\n{\\n \\"ht\\"8 !f\\"ht\\" \\"ht\\" !f\\"ht\\" \\"ht\\" \\"ht\\" \\"ht\\" !f\\"ht\\" |\\n} \\n{\\n \\\\fff\\n r4 \\"ss\\"8 r4 \\"ss\\"8 r4 | \\"ss\\"4. \\"ss\\"8 r4 \\"ss\\" |\\n} \\n{\\n \\"bd\\"4. \\"bd\\"8 \\"bd\\"4. \\"bd\\"8 |\\n} \\n]"}, {"path": "templates/drums.country.template", "data": "[\\ntype: template;\\nname: drums.country.normal;\\ninstrument: drums;\\n{\\n \\"ht\\"8 !f\\"ht\\"8 \\"ht\\"8 !f\\"ht\\"8 \\"ht\\"8 !f\\"ht\\"8 \\"ht\\"8 !f\\"ht\\"8 |\\n} \\n{\\n r4 \\"sn\\" r \\"sn\\" |\\n}\\n{\\n \\"bd\\"4. \\"bd\\"8 \\"bd\\"4. \\"bd\\"8 |\\n \\"bd\\"4. \\"bd\\"8 \\"bd\\"4. \\"bd\\"8 |\\n \\"bd\\"4. \\"bd\\"8 \\"bd\\"8 !f\\"bd\\"8 r8 \\"bd\\"8 |\\n} \\n] \\n\\n[\\ntype: template;\\nname: drums.country.cymbal;\\ninstrument: drums;\\n{\\n \\"cy\\"4 \\"ht\\"8 !f\\"ht\\"8 \\"ht\\"8 !f\\"ht\\"8 \\"ht\\"8 !f\\"ht\\"8 |\\n} \\n{\\n r4 \\"sn\\" r \\"sn\\" |\\n}\\n{\\n \\"bd\\"4. \\"bd\\"8 \\"bd\\"4. \\"bd\\"8 |\\n} \\n] \\n\\n[\\ntype: template;\\nname: drums.country.ende;\\ninstrument: drums;\\n{\\n \\"cy\\"1 |\\n} \\n{\\n \\"bd\\"1|\\n} \\n]"}, {"path": "templates/drums.disco.template", "data": "[\\ntype: template;\\nname: drums.disco.normal;\\ninstrument: drums;\\n{\\n r8 \\"ht\\"16 \\"ht\\"16 !ffff\\"sn\\"8 \\"ht\\"16 \\"ht\\"16 r8 \\"ht\\"16 \\"ht\\"16 !ffff\\"sn\\"8 \\"ht\\"16 \\"ht\\"16 |\\n r8 \\"ht\\"16 \\"ht\\"16 !ffff\\"sn\\"8 \\"ht\\"16 \\"ht\\"16 r8 \\"ht\\"16 \\"ht\\"16 !ffff\\"sn\\"8 !ffff<\\"sn\\" \\"ht\\">16 !fffff\\"sn\\"16 |\\n \\"cy\\"8 \\"ht\\"16 \\"ht\\"16 !ffff\\"sn\\"8 \\"ht\\"16 \\"ht\\"16 r8 \\"ht\\"16 \\"ht\\"16 !ffff\\"sn\\"8 \\"ht\\"16 \\"ht\\"16 |\\n r8 \\"ht\\"16 \\"ht\\"16 !ffff\\"sn\\"8 \\"ht\\"16 \\"ht\\"16 r8 \\"ht\\"16 \\"ht\\"16 !ffff\\"sn\\"8 <\\"sn\\" \\"ht\\">16 !fffff\\"sn\\"16 |\\n} \\n{\\n \\"bd\\"4 \\"bd\\" \\"bd\\" \\"bd\\" |\\n} \\n] \\n\\n[\\ntype: template;\\nname: drums.disco.solo;\\ninstrument: drums;\\n{\\n \\"bd\\"4 \\"bd\\" \\"bd\\" \\"bd\\" |\\n} \\n] \\n\\n[\\ntype: template;\\nname: drums.disco.solo2;\\ninstrument: drums;\\n{\\n \\"cy\\"8 \\"ht\\"16 \\"ht\\"16 !ffff\\"sn\\"8 \\"ht\\"16 \\"ht\\"16 r8 \\"ht\\"16 \\"ht\\"16 !ffff\\"sn\\"8 \\"ht\\"16 \\"ht\\"16 |\\n r8 \\"ht\\"16 \\"ht\\"16 !ffff\\"sn\\"8 \\"ht\\"16 \\"ht\\"16 r8 \\"ht\\"16 \\"ht\\"16 !ffff\\"sn\\"8 <\\"sn\\" \\"ht\\">16 !fffff\\"sn\\"16 |\\n} \\n{\\n \\"bd\\"4 \\"bd\\" \\"bd\\" \\"bd\\" |\\n} \\n] "}, {"path": "templates/drums.jazzSwing.template", "data": "-- tempo: 155\\n-- signature: 4/4\\n-- parts: normal, bridge\\n[\\ntype: template;\\nname: drums.jazzSwing.bridge;\\ninstrument: drumsBrushes; \\n{\\n (!ff\\"rcym1\\" r r)4 (\\"rcym1\\" r !p\\"rcym1\\") (!ff\\"rcym1\\" r r) (\\"rcym1\\" r !p\\"rcym1\\")\\n}\\n{\\n (r r \\"brtp\\")4 r4 (r r !p\\"brtp\\")4 r4 |\\n (r r !p\\"brtp\\")4 r4 (r r !p\\"brtp\\")4 r4 |\\n (r r !p\\"brtp\\")4 r4 (r r !p\\"brtp\\")4 r4 |\\n (r r !p\\"brtp\\")4 (r !pp\\"brtp\\"4 r) (r r !p\\"brtp\\")4 r4 |\\n}\\n{\\n \\\\pp\\n \\"bd2\\"4 (r r \\"bd2\\")4 r2 |\\n}\\n]\\n\\n[\\ntype: template;\\nname: drums.jazzSwing.normal;\\ninstrument: drumsBrushes; \\n{\\n \\\\pp\\n (\\"brtp\\" !pppp\\"brsw\\" r)4 (!ppp\\"brsp\\" r \\"brtp\\") (\\"brtp\\" !pppp\\"brsw\\" r) (!pp\\"brsp\\" r !p\\"brtp\\") \\n}\\n{\\n \\\\p\\n r4 \\"ht\\" r &\\n}\\n{\\n !pp\\"bd2\\"1 |\\n}\\n]"}, {"path": "templates/drums.purdie.template", "data": "[\\ntype: template;\\nname: drums.purdie.normal;\\ninstrument: drums; \\n{\\n \\\\p\\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t |\\n \\\\p\\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t |\\n \\\\p\\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t |\\n \\\\p\\"ho\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t |\\n\\n \\\\p\\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t |\\n \\\\p\\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t |\\n \\\\p\\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t r8t !pp\\"ho\\"8t !pp\\"ht\\"8t |\\n \\\\p\\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t |\\n\\n \\\\p\\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t |\\n \\\\p\\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t |\\n \\\\p\\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t |\\n \\\\f\\"ho\\"8t \\"ht\\"8t \\"bd\\"8t \\\\f\\"ho\\"8t \\"ht\\"8t r8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t |\\n}\\n{\\n r8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t \\\\ff\\"sn\\"8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t |\\n r8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t \\\\ff\\"sn\\"8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t | \\n r8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t \\\\ff\\"sn\\"8t !pppp\\"sng\\"8t r8t r8t !ppp\\"sn\\"8t !pp\\"sn\\"8t |\\n r8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t \\\\ff\\"sn\\"8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t |\\n\\n r8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t \\\\ff\\"sn\\"8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t |\\n r8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t \\\\ff\\"sn\\"8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t | \\n r8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t \\\\ff\\"sn\\"8t !pppp\\"sng\\"8t r8t r4t r8t | \\n r8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t \\\\ff\\"sn\\"8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t |\\n\\n r8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t \\\\ff\\"sn\\"8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t |\\n r8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t \\\\ff\\"sn\\"8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t | \\n r8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t \\\\ff\\"sn\\"8t !pppp\\"sng\\"8t r8t r8t !ppp\\"sn\\"8t !pp\\"sn\\"8t |\\n r8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t \\\\ff\\"sn\\"8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t | \\n}\\n{\\n \\"bd\\"4t r8t r4t \\"bd\\"8t r4t r8t \\"bd\\"4t r8t |\\n}\\n]"}, {"path": "templates/drums.reggae.template", "data": "using \\"lua/mods/swing.lua\\";\\n\\n\\n[\\ntype: template;\\nname: drums.reggae.normal;\\ninstrument: drums; \\n{\\n\\n}\\n{\\n /do: swing _grid=8 _offset =50/\\n !f\\"ht\\"4 &8 !p& \\"ht\\"4 &8 !p&|\\n !f\\"ht\\"4 \\"ht\\"8t & & \\"ht\\"4 &8 !p&|\\n !f\\"ht\\"4 !pp\\"ho1\\"4 \\"ht\\"4 &8 !p&|\\n}\\n{\\n r r \\"bd\\"4 r |\\n r r \\"sn\\"4 r |\\n}\\n]\\n\\n--\\n\\n[\\ntype: template;\\nname: drums.reggae.fill1;\\ninstrument: drums; \\n{\\n\\n}\\n{\\n /do: swing _grid=8 _offset =50/\\n !f\\"ht\\"4 !p\\"ho2\\"4 r2 |\\n}\\n{\\n /do: swing _grid=8 _offset =50/\\n r \\"hto1\\"64->\\"hto1\\"4. \\"mto1\\"8 \\"mto1\\"8t r \\"mto1\\" |\\n}\\n]\\n\\n[\\ntype: template;\\nname: drums.reggae.fill2;\\ninstrument: drums; \\n{\\n\\n}\\n{\\n /do: swing _grid=8 _offset =50/\\n !f\\"ht\\"4 \\"ht\\"4 r2 |\\n}\\n{\\n /do: swing _grid=16 _offset =50/\\n !f\\"tim1\\"32->!p\\"tim2\\"8t & & \\"hto1\\"4 r2 |\\n}\\n]\\n"}, {"path": "templates/drums.soca.template", "data": "[\\ntype: template;\\nname: drums.soca.normal;\\ninstrument: drums;\\n{\\n \\"ago1\\"16 & \\"ago2\\" & \\"ago1\\" & \\"ago2\\" & \\"ago1\\"16 & \\"ago2\\" & \\"ago1\\" & \\"ago2\\" & |\\n}\\n{\\n \\"cwb\\"8 & &16 & r \\"cwb\\" r16 \\"cwb\\" r \\"cwb\\" \\"cwb\\" r & r | \\n}\\n{\\n \\\\p\\n \\"ht\\"16 & \\"ho\\"8 \\"ht\\"16 & \\"ho\\"8 \\"ht\\"16 & \\"ho\\"8 \\"ht\\"16 & \\"ho\\"8 |\\n}\\n{\\n \\\\ffff\\n r8. \\"sn\\"16 r8 \\"sn\\" r8. \\"sn\\"16 r8 \\"sn\\" |\\n}\\n{\\n \\"bd\\"4 \\"bd\\" \\"bd\\" \\"bd\\" |\\n}\\n]\\n\\n[\\ntype: template;\\nname: drums.soca.bridge;\\ninstrument: drums;\\n{\\n \\"ago1\\"16 & \\"ago2\\" & \\"ago1\\" & \\"ago2\\" & \\"ago1\\"16 & \\"ago2\\" & \\"ago1\\" & \\"ago2\\" & |\\n}\\n{\\n \\"cwb\\"8 & &16 & r \\"cwb\\" r16 \\"cwb\\" r \\"cwb\\" \\"cwb\\" r & r | \\n}\\n{\\n \\\\fff\\n \\"mtr\\"16 & \\"otr\\"8 \\"mtr\\"16 & \\"otr\\"8 \\"mtr\\"16 & \\"otr\\"8 \\"mtr\\"16 & \\"otr\\"8 |\\n}\\n{\\n \\\\p\\n !ff\\"spl\\"16 \\"ht\\" \\"ho\\"8 \\"ht\\"16 & \\"ho\\"8 \\"ht\\"16 & \\"ho\\"8 \\"ht\\"16 & \\"ho\\"8 |\\n \\"ht\\"16 & \\"ho\\"8 \\"ht\\"16 & \\"ho\\"8 \\"ht\\"16 & \\"ho\\"8 \\"ht\\"16 & \\"ho\\"8 |\\n}\\n{\\n \\\\f\\n r4 r16 \\"bo1\\" \\"bo2\\" & r4 r16 \\"bo1\\" \\"bo2\\" & |\\n}\\n{\\n \\\\pp\\n r4 r16 \\"cla\\" r8 \\"cla\\" r16 \\"cla\\"16 r4 |\\n}\\n{\\n \\\\fffff\\n r8. \\"sn\\"16 r8 \\"sn\\" r8. \\"sn\\"16 r8 \\"sn\\" |\\n r8. \\"sn\\"16 r8 \\"sn\\" r4 r16 !fff\\"sn\\" !ffff& !fffff& |\\n}\\n{\\n \\"bd\\"4 \\"bd\\" \\"bd\\" \\"bd\\" |\\n}\\n]"}, {"path": "templates/ennio.template", "data": "[\\ntype: template;\\nname: ennio.normal;\\ninstrument: piano; \\n{\\n !ffffI,,4 <II, III, IV, V, VI, VII,> <II, III, IV, V, VI, VII,> !fffV,,, |\\n}\\n] \\n\\n"}, {"path": "templates/guitar.bossanova.template", "data": "[\\ntype: template;\\nname: guitar.bossanova.normal;\\ninstrument: guitar; \\n{\\n /voicingStrategy: simpleGuitar/\\n \\\\f\\n <I II III IV V VI VII>4 <I II III IV V VI VII>4 r8 <I II III IV V VI VII>8 r8 <I II III IV V VI VII>8 |\\n r8 <I II III IV V VI VII>8 r8 <I II III IV V VI VII>8 r4 <I II III IV V VI VII>4 |\\n <I II III IV V VI VII>4 <I II III IV V VI VII>4 r8 <I II III IV V VI VII>8 r8 <I II III IV V VI VII>8 |\\n r4 r8 <I II III IV V VI VII>8 r8 <I II III IV V VI VII>4. |\\n} \\n] "}, {"path": "templates/guitar.country.template", "data": "using \\"lua/voicings/guitar.lua\\";\\n\\n[\\ntype: template;\\nname: guitar.country.normal;\\ninstrument: guitar; \\n{\\n /voicingStrategy: guitar _range=mezzosoprano/\\n \\\\f\\n <I II III IV V VI VII>8 <I II III IV V VI VII>8 r8 \\n <I II III IV V VI VII>4 <I II III IV V VI VII>8 <I II III IV V VI VII>8 <I II III IV V VI VII>8 |\\n} \\n]\\n\\n[\\ntype: template;\\nname: guitar.country.ende;\\ninstrument: guitar; \\n{\\n <I II III IV V VI VII>1 |\\n} \\n] \\n"}, {"path": "templates/rhythm.bossanova.template", "data": "[\\ntype: template;\\nname: rhythm.bossanova.normal;\\ninstrument: rhythm; \\n{\\n \\\\f\\n <I II III IV V VI VII>4 <I II III IV V VI VII>4 r8 <I II III IV V VI VII>8 r8 <I II III IV V VI VII>8 |\\n r8 <I II III IV V VI VII>8 r8 <I II III IV V VI VII>8 r4 <I II III IV V VI VII>4 |\\n <I II III IV V VI VII>4 <I II III IV V VI VII>4 r8 <I II III IV V VI VII>8 r8 <I II III IV V VI VII>8 |\\n r4 r8 <I II III IV V VI VII>8 r8 <I II III IV V VI VII>4. |\\n} \\n] "}, {"path": "templates/rhythm.country.template", "data": "using \\"lua/voicings/guitar.lua\\";\\n\\n[\\ntype: template;\\nname: rhythm.country.normal;\\ninstrument: rhythm; \\n{\\n \\\\f\\n <I II III IV V VI VII>8 <I II III IV V VI VII>8 r8 \\n <I II III IV V VI VII>4 <I II III IV V VI VII>8 <I II III IV V VI VII>8 <I II III IV V VI VII>8 |\\n} \\n]\\n\\n[\\ntype: template;\\nname: rhythm.country.ende;\\ninstrument: rhythm; \\n{\\n /doOnce: arpeggio/\\n <I II III IV V VI VII>4~ <I II III IV V VI VII>2. |\\n} \\n] \\n"}, {"path": "templates/rhythm.jazzSwing.template", "data": "-- tempo: 155\\n-- signature: 4/4\\n-- parts: normal\\n[\\ntype: template;\\nname: rhythm.jazzSwing.normal;\\ninstrument: rhythm2; \\n{\\n \\\\f\\n <I,, V, VII, I III>1~ | &4 (r r &) r2 |\\n\\n (<V, VII, I III> r r)4 r <V, VII, I III>4 r |\\n \\n (<V, VII, I III> r I,,)4 r <V, VII, I III>4 r |\\n\\n <I,, V, VII, I III>1~ | &4 (r r &) r2 |\\n\\n (<V, VII, I III> r r)4 r <V, VII, I III>4 r |\\n\\n <V, VII, I III> r I,,4 (I,, r <V, VII, I III>~) (<V, VII, I III> r I,,) |\\n}\\n]\\n"}, {"path": "templates/rhythm.reggae.template", "data": "using \\"lua/mods/swing.lua\\";\\nusing \\"lua/mods/staccato.lua\\";\\n\\n[\\ntype: template;\\nname: rhythm.reggae.normal;\\ninstrument: rhythm;\\n{\\n \\\\f\\n /do: swing _grid=8 _offset =40/\\n r4 /modOnce: staccato _amount=100/ <I II III IV V VI VII>8 /modOnce: staccato _amount=40/ <I II III IV V VI VII>8 \\n r4 /modOnce: staccato _amount=100/ <I II III IV V VI VII>8 /modOnce: staccato _amount=40/ <I II III IV V VI VII>8 \\n |\\n\\n}\\n]"}]'),d=require("lodash"),p=function(){function n(e){a(this,n),this.module=e,this.blacklist=["/dev","/home","/proc","/tmp"]}return o(n,[{key:"resolve",value:function(n,e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.replace("./",n));case 1:case"end":return t.stop()}},t)}))}},{key:"ls",value:function(n){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,a,r,o,i,s;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.module.FS,a=t.analyzePath(n,!1),a.exists&&a.object&&a.object.isFolder){e.next=5;break}return e.abrupt("return",[]);case 5:r=[],o=a.object.contents,e.t0=regeneratorRuntime.keys(o);case 8:if((e.t1=e.t0()).done){e.next=18;break}if(i=e.t1.value,s=o[i],!this.blacklist.includes("".concat(a.parentPath).concat(i))){e.next=13;break}return e.abrupt("continue",8);case 13:if("_"!==i[0]&&"."!==i[0]){e.next=15;break}return e.abrupt("continue",8);case 15:r.push({name:i,isDirectory:s.isFolder}),e.next=8;break;case 18:return e.abrupt("return",r);case 19:case"end":return e.stop()}},e,this)}))}},{key:"getParentPath",value:function(n){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.module.FS,a=t.analyzePath(n,!1),e.abrupt("return",a.parentPath);case 3:case"end":return e.stop()}},e,this)}))}}]),n}(),u=function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";a(this,n),this.errorMessage=e};exports.CompilerError=u;var I=function(){function e(){var n=this;a(this,e),this.cwdFiles=[],this.module=s().then(function(e){return i(n,void 0,void 0,regeneratorRuntime.mark(function n(){return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.init(e);case 2:return n.abrupt("return",e);case 3:case"end":return n.stop()}},n,this)}))})}return o(e,[{key:"init",value:function(n){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.prepareModule(n),e.next=3,this.prepareFileSystem(n);case 3:case"end":return e.stop()}},e,this)}))}},{key:"getFileSystemInspector",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function n(){return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.t0=p,n.next=3,this.module;case 3:return n.t1=n.sent,n.abrupt("return",new n.t0(n.t1));case 5:case"end":return n.stop()}},n,this)}))}},{key:"prepareModule",value:function(n){this.createCompileResult=n.cwrap("create_compile_result","number",["string","number"])}},{key:"mkdir_p",value:function(n,e){for(var t=n.split("/"),a=[],r=0;r<t.length&&r!==t.length-1;++r){var o=t[r];a.push(o);var i=a.join("/");e.FS.analyzePath(i,!1).exists||e.FS.mkdir(i)}}},{key:"prepareFileSystem",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){var a,r,o,i,s;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:a=d.cloneDeep(c),r=e.FS,o=n(a);try{for(o.s();!(i=o.n()).done;){s=i.value;try{this.mkdir_p(s.path,e),r.writeFile(s.path,s.data)}catch(l){console.error(l)}}}catch(p){o.e(p)}finally{o.f()}case 4:case"end":return t.stop()}},t,this)}))}},{key:"writeFileToFS",value:function(n,e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.module;case 2:t.sent.FS.writeFile(n,e),this.cwdFiles.push(n);case 5:case"end":return t.stop()}},t,this)}))}},{key:"cleanCWD",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,a,r,o;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.module;case 2:t=e.sent.FS,a=n(this.cwdFiles);try{for(a.s();!(r=a.n()).done;)o=r.value,t.analyzePath(o,!1).exists&&t.unlink(o)}catch(i){a.e(i)}finally{a.f()}this.cwdFiles.splice(0,this.cwdFiles.length);case 6:case"end":return e.stop()}},e,this)}))}},{key:"compile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return i(this,void 0,void 0,regeneratorRuntime.mark(function a(){var r,o,i,s,l,c,d,p;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,this.cleanCWD();case 2:if(e&&0!==e.length){a.next=4;break}throw new u("no content to compile");case 4:return a.next=6,this.module;case 6:r=a.sent,o=0,i=null,s=n(e),a.prev=10,s.s();case 12:if((l=s.n()).done){a.next=21;break}if((c=l.value).path&&c.path.trim()){a.next=16;break}throw new u("sheet file has no path");case 16:return a.next=18,this.writeFileToFS(c.path,c.data);case 18:c.path.trim().endsWith(".sheet")&&(i=c);case 19:a.next=12;break;case 21:a.next=26;break;case 23:a.prev=23,a.t0=a.catch(10),s.e(a.t0);case 26:return a.prev=26,s.f(),a.finish(26);case 29:if(i){a.next=31;break}throw new u("missing main sheet file (.sheet)");case 31:if(o=this.createCompileResult(i.path,t),d=r.UTF8ToString(o),r._free(o),!(p=JSON.parse(d)).errorMessage){a.next=37;break}throw{error:p};case 37:return a.abrupt("return",p);case 38:case"end":return a.stop()}},a,this,[[10,23,26,29]])}))}}]),e}();exports.WerckmeisterCompiler=I;
493
493
  },{"@werckmeister/compilerjs/werckmeister":"ouOZ","fs":"rDCW","lodash":"B1iE"}],"X3ym":[function(require,module,exports) {