babel-runtime-named-params
Advanced tools
Comparing version 0.9.18 to 0.9.19
/* | ||
** babel-runtime-named-params -- Babel Run-Time for Named Function Parameters | ||
** Copyright (c) 2018-2019 Dr. Ralf S. Engelschall <rse@engelschall.com> | ||
** Copyright (c) 2018-2021 Dr. Ralf S. Engelschall <rse@engelschall.com> | ||
** | ||
@@ -5,0 +5,0 @@ ** Permission is hereby granted, free of charge, to any person obtaining |
/* | ||
** babel-runtime-named-params -- Babel Run-Time for Named Function Parameters | ||
** Copyright (c) 2018-2019 Dr. Ralf S. Engelschall <rse@engelschall.com> | ||
** Copyright (c) 2018-2021 Dr. Ralf S. Engelschall <rse@engelschall.com> | ||
** | ||
@@ -27,3 +27,3 @@ ** Permission is hereby granted, free of charge, to any person obtaining | ||
(function (global){ | ||
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).funcParams=t()}}(function(){return function(){return function t(e,n,r){function i(s,u){if(!n[s]){if(!e[s]){var a="function"==typeof _dereq_&&_dereq_;if(!u&&a)return a(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[s]={exports:{}};e[s][0].call(l.exports,function(t){return i(e[s][1][t]||t)},l,l.exports,t,e,n,r)}return n[s].exports}for(var o="function"==typeof _dereq_&&_dereq_,s=0;s<r.length;s++)i(r[s]);return i}}()({1:[function(t,e,n){(function(r){!function(t){"object"==typeof n&&void 0!==e?e.exports=t():("undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:this).CacheLRU=t()}(function(){return function e(n,r,i){function o(u,a){if(!r[u]){if(!n[u]){var c="function"==typeof t&&t;if(!a&&c)return c(u,!0);if(s)return s(u,!0);var l=new Error("Cannot find module '"+u+"'");throw l.code="MODULE_NOT_FOUND",l}var h=r[u]={exports:{}};n[u][0].call(h.exports,function(t){return o(n[u][1][t]||t)},h,h.exports,e,n,r,i)}return r[u].exports}for(var s="function"==typeof t&&t,u=0;u<i.length;u++)o(i[u]);return o}({1:[function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=function(){function t(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._index={},this._LRU={newer:null},this._MRU={older:null},this._LRU.newer=this._MRU,this._MRU.older=this._LRU,this._cur=0,this._max=1/0,this._dispose=function(){},this}return function(t,e,n){e&&r(t.prototype,e)}(t,[{key:"limit",value:function(t){var e=this._max;return arguments.length>0&&(this._max=t,this._purge()),e}},{key:"dispose",value:function(t){return this._dispose=t,this}},{key:"length",value:function(){return this._cur}},{key:"keys",value:function(){return this.each(function(t,e){this.push(e)},[])}},{key:"values",value:function(){return this.each(function(t){this.push(t)},[])}},{key:"each",value:function(t,e){arguments<2&&(e=this);for(var n=0,r=this._MRU.older;r!==this._LRU;)t.call(e,r.val,r.key,n++),r=r.older;return e}},{key:"has",value:function(t){return void 0!==this._index[t]}},{key:"peek",value:function(t){var e=this._index[t];if(void 0!==e){if(!(e.expires<Date.now()))return e.val;this.del(e.key)}}},{key:"touch",value:function(t){var e=this._index[t];if(void 0===e)throw new Error("touch: no such item");return this._promote(e),this}},{key:"get",value:function(t){var e=this._index[t];if(void 0!==e){if(!(e.expires<Date.now()))return this._promote(e),e.val;this.del(e.key)}}},{key:"set",value:function(t,e,n){arguments.length<3&&(n=1/0),n+=Date.now();var r=this._index[t];if(void 0===r)r={older:null,newer:null,key:t,val:e,expires:n},this._index[t]=r,this._attach(r),this._cur++,this._purge();else{var i=r.val;r.val=e,this._promote(r),this._dispose.call(void 0,r.key,i,"set")}return this}},{key:"del",value:function(t){var e=this._index[t];if(void 0===e)throw new Error("del: no such item");return delete this._index[t],this._detach(e),this._cur--,this._dispose.call(void 0,t,e.val,"del"),this}},{key:"clear",value:function(){for(;this._cur>0;)this.del(this._LRU.newer.key);return this}},{key:"_purge",value:function(){for(;this._cur>this._max;)this.del(this._LRU.newer.key)}},{key:"_promote",value:function(t){this._detach(t),this._attach(t)}},{key:"_detach",value:function(t){t.older.newer=t.newer,t.newer.older=t.older,t.older=null,t.newer=null}},{key:"_attach",value:function(t){t.older=this._MRU.older,t.newer=this._MRU,t.newer.older=t,t.older.newer=t}}]),t}();e.exports=i},{}]},{},[1])(1)})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(t,e,n){(function(r){!function(t){"object"==typeof n&&void 0!==e?e.exports=t():("undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:this).Tokenizr=t()}(function(){return function e(n,r,i){function o(u,a){if(!r[u]){if(!n[u]){var c="function"==typeof t&&t;if(!a&&c)return c(u,!0);if(s)return s(u,!0);var l=new Error("Cannot find module '"+u+"'");throw l.code="MODULE_NOT_FOUND",l}var h=r[u]={exports:{}};n[u][0].call(h.exports,function(t){return o(n[u][1][t]||t)},h,h.exports,e,n,r,i)}return r[u].exports}for(var s="function"==typeof t&&t,u=0;u<i.length;u++)o(i[u]);return o}({1:[function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function o(t){var e="function"==typeof Map?new Map:void 0;return(o=function(t){if(null===t||!function(t){return-1!==Function.toString.call(t).indexOf("[native code]")}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){return(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&s(i,n.prototype),i}).apply(null,arguments)}(t,arguments,u(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),s(n,t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function l(t,e,n){return e&&c(t.prototype,e),n&&c(t,n),t}var h=function(t,e){var n=t.length,r=e-20;r<0&&(r=0);var i=e+20;i>n&&(i=n);var o=function(t){return t.charCodeAt(0).toString(16).toUpperCase()},s=function(t,e,n){return t.substr(e,n).replace(/\\/g,"\\\\").replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,function(t){return"\\x0"+o(t)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(t){return"\\x"+o(t)}).replace(/[\u0100-\u0FFF]/g,function(t){return"\\u0"+o(t)}).replace(/[\u1000-\uFFFF]/g,function(t){return"\\u"+o(t)})};return{prologTrunc:r>0,prologText:s(t,r,e-r),tokenText:s(t,e,1),epilogText:s(t,e+1,i-(e+1)),epilogTrunc:i<n}},f=function(){function t(e,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;a(this,t),this.type=e,this.value=n,this.text=r,this.pos=i,this.line=o,this.column=s}return l(t,[{key:"toString",value:function(){return"<type: ".concat(this.type,", ")+"value: ".concat(JSON.stringify(this.value),", ")+"text: ".concat(JSON.stringify(this.text),", ")+"pos: ".concat(this.pos,", ")+"line: ".concat(this.line,", ")+"column: ".concat(this.column,">")}},{key:"isA",value:function(t,e){return t===this.type&&(2!==arguments.length||e===this.value)}}]),t}(),p=function(t){function e(t,n,r,o,s){var c;return a(this,e),(c=i(this,u(e).call(this,t))).name="ParsingError",c.message=t,c.pos=n,c.line=r,c.column=o,c.input=s,c}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,o(Error)),l(e,[{key:"toString",value:function(){for(var t=h(this.input,this.pos),e="line ".concat(this.line," (column ").concat(this.column,"): "),n="",r=0;r<e.length+t.prologText.length;r++)n+=" ";return"Parsing Error: "+this.message+"\n"+e+t.prologText+t.tokenText+t.epilogText+"\n"+n+"^"}}]),e}(),_=function(){function t(e){a(this,t),this._tokenizr=e,this._data={},this._repeat=!1,this._reject=!1,this._ignore=!1,this._match=null}return l(t,[{key:"data",value:function(t,e){var n=this._data[t];return 2===arguments.length&&(this._data[t]=e),n}},{key:"info",value:function(){return{line:this._tokenizr._line,column:this._tokenizr._column,pos:this._tokenizr._pos,len:this._match[0].length}}},{key:"push",value:function(){var t;return(t=this._tokenizr).push.apply(t,arguments),this}},{key:"pop",value:function(){var t;return(t=this._tokenizr).pop.apply(t,arguments)}},{key:"state",value:function(){var t,e;return arguments.length>0?((e=this._tokenizr).state.apply(e,arguments),this):(t=this._tokenizr).state.apply(t,arguments)}},{key:"tag",value:function(){var t;return(t=this._tokenizr).tag.apply(t,arguments),this}},{key:"tagged",value:function(){var t;return(t=this._tokenizr).tagged.apply(t,arguments)}},{key:"untag",value:function(){var t;return(t=this._tokenizr).untag.apply(t,arguments),this}},{key:"repeat",value:function(){return this._tokenizr._log(" REPEAT"),this._repeat=!0,this}},{key:"reject",value:function(){return this._tokenizr._log(" REJECT"),this._reject=!0,this}},{key:"ignore",value:function(){return this._tokenizr._log(" IGNORE"),this._ignore=!0,this}},{key:"accept",value:function(t,e){return arguments.length<2&&(e=this._match[0]),this._tokenizr._log(" ACCEPT: type: ".concat(t,", value: ")+"".concat(JSON.stringify(e)," (").concat(r(e),'), text: "').concat(this._match[0],'"')),this._tokenizr._pending.push(new f(t,e,this._match[0],this._tokenizr._pos,this._tokenizr._line,this._tokenizr._column)),this}},{key:"stop",value:function(){return this._tokenizr._stopped=!0,this}}]),t}(),g=function(){function t(){a(this,t),this._before=null,this._after=null,this._finish=null,this._rules=[],this._debug=!1,this.reset()}return l(t,[{key:"reset",value:function(){return this._input="",this._len=0,this._eof=!1,this._pos=0,this._line=1,this._column=1,this._state=["default"],this._tag={},this._transaction=[],this._pending=[],this._stopped=!1,this._ctx=new _(this),this}},{key:"error",value:function(t){return new p(t,this._pos,this._line,this._column,this._input)}},{key:"debug",value:function(t){return this._debug=t,this}},{key:"_log",value:function(t){this._debug&&console.log("tokenizr: ".concat(t))}},{key:"input",value:function(t){if("string"!=typeof t)throw new Error('parameter "input" not a String');return this.reset(),this._input=t,this._len=t.length,this}},{key:"push",value:function(t){if(1!==arguments.length)throw new Error("invalid number of arguments");if("string"!=typeof t)throw new Error('parameter "state" not a String');return this._log(" STATE (PUSH): "+"old: <".concat(this._state[this._state.length-1],">, ")+"new: <".concat(t,">")),this._state.push(t),this}},{key:"pop",value:function(){if(0!==arguments.length)throw new Error("invalid number of arguments");if(this._state.length<2)throw new Error("no more custom states to pop");return this._log(" STATE (POP): "+"old: <".concat(this._state[this._state.length-1],">, ")+"new: <".concat(this._state[this._state.length-2],">")),this._state.pop()}},{key:"state",value:function(t){if(1===arguments.length){if("string"!=typeof t)throw new Error('parameter "state" not a String');return this._log(" STATE (SET): "+"old: <".concat(this._state[this._state.length-1],">, ")+"new: <".concat(t,">")),this._state[this._state.length-1]=t,this}if(0===arguments.length)return this._state[this._state.length-1];throw new Error("invalid number of arguments")}},{key:"tag",value:function(t){if(1!==arguments.length)throw new Error("invalid number of arguments");if("string"!=typeof t)throw new Error('parameter "tag" not a String');return this._log(" TAG (ADD): ".concat(t)),this._tag[t]=!0,this}},{key:"tagged",value:function(t){if(1!==arguments.length)throw new Error("invalid number of arguments");if("string"!=typeof t)throw new Error('parameter "tag" not a String');return!0===this._tag[t]}},{key:"untag",value:function(t){if(1!==arguments.length)throw new Error("invalid number of arguments");if("string"!=typeof t)throw new Error('parameter "tag" not a String');return this._log(" TAG (DEL): ".concat(t)),delete this._tag[t],this}},{key:"before",value:function(t){return this._before=t,this}},{key:"after",value:function(t){return this._after=t,this}},{key:"finish",value:function(t){return this._finish=t,this}},{key:"rule",value:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unknown";if(2===arguments.length&&"function"==typeof e){var o=[t,e];e=o[0],n=o[1],t="*"}else if(3===arguments.length&&"function"==typeof e){var s=[t,e,n];e=s[0],n=s[1],i=s[2],t="*"}if("string"!=typeof t)throw new Error('parameter "state" not a String');if(!("object"===r(e)&&e instanceof RegExp))throw new Error('parameter "pattern" not a RegExp');if("function"!=typeof n)throw new Error('parameter "action" not a Function');if("string"!=typeof i)throw new Error('parameter "name" not a String');t=t.split(/\s*,\s*/g).map(function(t){var e=t.split(/\s+/g),n=e.filter(function(t){return null===t.match(/^#/)}),r=e.filter(function(t){return null!==t.match(/^#/)}).map(function(t){return t.replace(/^#/,"")});if(1!==n.length)throw new Error("exactly one state required");return{state:n[0],tags:r}});var u="g";try{"boolean"==typeof new RegExp("","y").sticky&&(u="y")}catch(t){}return"boolean"==typeof e.multiline&&e.multiline&&(u+="m"),"boolean"==typeof e.dotAll&&e.dotAll&&(u+="s"),"boolean"==typeof e.ignoreCase&&e.ignoreCase&&(u+="i"),"boolean"==typeof e.unicode&&e.unicode&&(u+="u"),e=new RegExp(e.source,u),this._log("rule: configure rule (state: ".concat(t,", pattern: ").concat(e.source,")")),this._rules.push({state:t,pattern:e,action:n,name:i}),this}},{key:"_progress",value:function(t,e){for(var n=this._line,r=this._column,i=this._input,o=t;o<e;o++){var s=i.charAt(o);"\r"===s?this._column=1:"\n"===s?(this._line++,this._column=1):"\t"===s?this._column+=8-this._column%8:this._column++}this._log(" PROGRESS: characters: ".concat(e-t,", ")+"from: <line ".concat(n,", column ").concat(r,">, ")+"to: <line ".concat(this._line,", column ").concat(this._column,">"))}},{key:"_tokenize",value:function(){var t=this,e=function(){t._eof||(null!==t._finish&&t._finish.call(t._ctx,t._ctx),t._eof=!0,t._pending.push(new f("EOF","","",t._pos,t._line,t._column)))};if(!(this._stopped||this._pos>=this._len)){for(var n=!0;n;){if(n=!1,this._debug){var r=h(this._input,this._pos),i=Object.keys(this._tag).map(function(t){return"#".concat(t)}).join(" ");this._log("INPUT: state: <".concat(this._state[this._state.length-1],">, tags: <").concat(i,">, text: ")+(r.prologTrunc?"...":'"')+"".concat(r.prologText,"<").concat(r.tokenText,">").concat(r.epilogText)+(r.epilogTrunc?"...":'"')+", at: <line ".concat(this._line,", column ").concat(this._column,">"))}for(var o=0;o<this._rules.length;o++){if(this._debug){var s=this._rules[o].state.map(function(t){var e=t.state;return t.tags.length>0&&(e+=" "+t.tags.map(function(t){return"#".concat(t)}).join(" ")),e}).join(", ");this._log(" RULE: state(s): <".concat(s,">, ")+"pattern: ".concat(this._rules[o].pattern.source))}var u=!1,a=this._rules[o].state.map(function(t){return t.state}),c=a.indexOf("*");if(c<0&&(c=a.indexOf(this._state[this._state.length-1])),c>=0){u=!0;var l=this._rules[o].state[c].tags;(l=l.filter(function(e){return!t._tag[e]})).length>0&&(u=!1)}if(u){this._rules[o].pattern.lastIndex=this._pos;var p=this._rules[o].pattern.exec(this._input);if(this._rules[o].pattern.lastIndex=this._pos,null!==(p=this._rules[o].pattern.exec(this._input))&&p.index===this._pos){if(this._debug&&this._log(" MATCHED: "+JSON.stringify(p)),this._ctx._match=p,this._ctx._repeat=!1,this._ctx._reject=!1,this._ctx._ignore=!1,null!==this._before&&this._before.call(this._ctx,this._ctx,p,this._rules[o]),this._rules[o].action.call(this._ctx,this._ctx,p),null!==this._after&&this._after.call(this._ctx,this._ctx,p,this._rules[o]),this._ctx._reject)continue;if(this._ctx._repeat){n=!0;break}if(this._ctx._ignore){if(this._progress(this._pos,this._rules[o].pattern.lastIndex),this._pos=this._rules[o].pattern.lastIndex,this._pos>=this._len)return void e();n=!0;break}if(this._pending.length>0)return this._progress(this._pos,this._rules[o].pattern.lastIndex),this._pos=this._rules[o].pattern.lastIndex,void(this._pos>=this._len&&e());throw new Error('action of pattern "'+this._rules[o].pattern.source+'" neither rejected nor accepted any token(s)')}}}}throw this.error("token not recognized")}e()}},{key:"token",value:function(){if(0===this._pending.length&&this._tokenize(),this._pending.length>0){var t=this._pending.shift();return this._transaction.length>0&&this._transaction[0].push(t),this._log("TOKEN: ".concat(t.toString())),t}return null}},{key:"tokens",value:function(){for(var t,e=[];null!==(t=this.token());)e.push(t);return e}},{key:"peek",value:function(t){void 0===t&&(t=0);for(var e=0;e<this._pending.length+t;e++)this._tokenize();if(t>=this._pending.length)throw new Error("not enough tokens available for peek operation");return this._log("PEEK: ".concat(this._pending[t].toString())),this._pending[t]}},{key:"skip",value:function(t){void 0===t&&(t=1);for(var e=0;e<this._pending.length+t;e++)this._tokenize();if(t>this._pending.length)throw new Error("not enough tokens available for skip operation");for(;t-- >0;)this.token();return this}},{key:"consume",value:function(t,e){for(var n=this,i=0;i<this._pending.length+1;i++)this._tokenize();if(0===this._pending.length)throw new Error("not enough tokens available for consume operation");var o=this.token();this._log("CONSUME: ".concat(o.toString()));var s=function(){throw new p("expected: <type: ".concat(t,", value: ").concat(JSON.stringify(e)," (").concat(r(e),")>, ")+"found: <type: ".concat(o.type,", value: ").concat(JSON.stringify(o.value)," (").concat(r(o.value),")>"),o.pos,o.line,o.column,n._input)};return 2!==arguments.length||o.isA(t,e)?o.isA(t)||s():s(JSON.stringify(e),r(e)),o}},{key:"begin",value:function(){return this._log("BEGIN: level ".concat(this._transaction.length)),this._transaction.unshift([]),this}},{key:"depth",value:function(){if(0===this._transaction.length)throw new Error("cannot determine depth -- no active transaction");return this._transaction[0].length}},{key:"commit",value:function(){if(0===this._transaction.length)throw new Error("cannot commit transaction -- no active transaction");return this._transaction.shift(),this._log("COMMIT: level ".concat(this._transaction.length)),this}},{key:"rollback",value:function(){if(0===this._transaction.length)throw new Error("cannot rollback transaction -- no active transaction");return this._pending=this._transaction[0].concat(this._pending),this._transaction.shift(),this._log("ROLLBACK: level ".concat(this._transaction.length)),this}},{key:"alternatives",value:function(){for(var t=null,e=[],n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o=0;o<r.length;o++)try{this.begin(),t=r[o].call(this),this.commit();break}catch(t){this._log("EXCEPTION: ".concat(t.toString())),e.push({ex:t,depth:this.depth()}),this.rollback();continue}if(null===t&&e.length>0)throw(e=e.sort(function(t,e){return t.depth-e.depth}))[0].ex;return t}}]),t}();g.Token=f,g.ParsingError=p,g.ActionContext=_,e.exports=g},{}]},{},[1])(1)})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=t("tokenizr"),o=new(t("cache-lru"));e.exports=function(t){var e,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];try{e=t.toString()}catch(t){e="function () {}"}var s=e;if(n){var u=o.get(s);if("object"===r(u)&&u instanceof Array)return u}e=(e=(e=e.replace(/^\s*class\s.*?constructor/,"").replace(/^\s*class\s.*/,"function () {}").replace(/^\s*([a-zA-Z_$][a-zA-Z0-9_$]*)(\s*=>)/,"($1)$2").replace(/\r?\n/g," ").replace(/ {2,}/g," ")).replace(/`(?:\\`|[^\r\n])*?`/g,"").replace(/'(?:\\'|[^\r\n])*?'/g,"").replace(/"(?:\\"|[^\r\n])*?"/g,"").replace(/\/\*(?:.|[\r\n])*?\*\//g,"").replace(/\/\/[^\r\n]*\r?\n/g,"")).replace(/^.*?\(/,"(");var a=new i,c=0;a.rule(/\(/,function(t,e){0===c?t.ignore():t.accept(),c++}),a.rule(/\)/,function(t,e){0==--c?(t.ignore(),t.stop()):t.accept()}),a.rule(/(?:.|[ \t\r\n]+)/,function(t,e){t.accept()}),a.input(e),e="",a.tokens().forEach(function(t){e+=t.value}),(a=new i).rule(/\(/,function(t,e){t.ignore(),t.push("parenthesis")}),a.rule("parenthesis",/\)/,function(t,e){t.ignore(),t.pop()}),a.rule("parenthesis",/[^)]+?/,function(t,e){t.ignore()}),a.rule(/\{/,function(t,e){t.ignore(),t.push("braces")}),a.rule("braces",/\}/,function(t,e){t.ignore(),t.pop()}),a.rule("braces",/[^}]+?/,function(t,e){t.ignore()}),a.rule(/\[/,function(t,e){t.ignore(),t.push("brackets")}),a.rule("brackets",/\]/,function(t,e){t.ignore(),t.pop()}),a.rule("brackets",/[^\]]+?/,function(t,e){t.ignore()}),a.rule(/(?:.|[ \t\r\n]+)/,function(t,e){t.accept()}),a.input(e),e="",a.tokens().forEach(function(t){e+=t.value});var l=[];return""!==(e=e.replace(/^\s+$/,""))&&e.split(/\s*,\s*/).forEach(function(t){t=t.replace(/=.*$/,"").replace(/^\s+/,"").replace(/\s+$/,""),l.push(t)}),n&&o.set(s,l),l}},{"cache-lru":1,tokenizr:2}]},{},[3])(3)}); | ||
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).funcParams=t()}}(function(){return function(){return function t(e,n,r){function i(s,u){if(!n[s]){if(!e[s]){var a="function"==typeof _dereq_&&_dereq_;if(!u&&a)return a(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[s]={exports:{}};e[s][0].call(l.exports,function(t){return i(e[s][1][t]||t)},l,l.exports,t,e,n,r)}return n[s].exports}for(var o="function"==typeof _dereq_&&_dereq_,s=0;s<r.length;s++)i(r[s]);return i}}()({1:[function(t,e,n){(function(r){!function(t){"object"==typeof n&&void 0!==e?e.exports=t():("undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:this).CacheLRU=t()}(function(){return function e(n,r,i){function o(u,a){if(!r[u]){if(!n[u]){var c="function"==typeof t&&t;if(!a&&c)return c(u,!0);if(s)return s(u,!0);var l=new Error("Cannot find module '"+u+"'");throw l.code="MODULE_NOT_FOUND",l}var h=r[u]={exports:{}};n[u][0].call(h.exports,function(t){return o(n[u][1][t]||t)},h,h.exports,e,n,r,i)}return r[u].exports}for(var s="function"==typeof t&&t,u=0;u<i.length;u++)o(i[u]);return o}({1:[function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=function(){function t(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._index={},this._LRU={newer:null},this._MRU={older:null},this._LRU.newer=this._MRU,this._MRU.older=this._LRU,this._cur=0,this._max=1/0,this._dispose=function(){},this}return function(t,e,n){e&&r(t.prototype,e)}(t,[{key:"limit",value:function(t){var e=this._max;return arguments.length>0&&(this._max=t,this._purge()),e}},{key:"dispose",value:function(t){return this._dispose=t,this}},{key:"length",value:function(){return this._cur}},{key:"keys",value:function(){return this.each(function(t,e){this.push(e)},[])}},{key:"values",value:function(){return this.each(function(t){this.push(t)},[])}},{key:"each",value:function(t,e){arguments<2&&(e=this);for(var n=0,r=this._MRU.older;r!==this._LRU;)t.call(e,r.val,r.key,n++),r=r.older;return e}},{key:"has",value:function(t){var e=this._index[t];return void 0!==e&&e.expires>=Date.now()}},{key:"peek",value:function(t){var e=this._index[t];if(void 0!==e){if(!(e.expires<Date.now()))return e.val;this.del(e.key)}}},{key:"touch",value:function(t){var e=this._index[t];if(void 0===e)throw new Error("touch: no such item");return this._promote(e),this}},{key:"get",value:function(t){var e=this._index[t];if(void 0!==e){if(!(e.expires<Date.now()))return this._promote(e),e.val;this.del(e.key)}}},{key:"set",value:function(t,e,n){arguments.length<3&&(n=1/0),n+=Date.now();var r=this._index[t];if(void 0===r)r={older:null,newer:null,key:t,val:e,expires:n},this._index[t]=r,this._attach(r),this._cur++,this._purge();else{var i=r.val;r.val=e,this._promote(r),this._dispose.call(void 0,r.key,i,"set")}return this}},{key:"del",value:function(t){var e=this._index[t];if(void 0===e)throw new Error("del: no such item");return delete this._index[t],this._detach(e),this._cur--,this._dispose.call(void 0,t,e.val,"del"),this}},{key:"clear",value:function(){for(;this._cur>0;)this.del(this._LRU.newer.key);return this}},{key:"_purge",value:function(){for(;this._cur>this._max;)this.del(this._LRU.newer.key)}},{key:"_promote",value:function(t){this._detach(t),this._attach(t)}},{key:"_detach",value:function(t){t.older.newer=t.newer,t.newer.older=t.older,t.older=null,t.newer=null}},{key:"_attach",value:function(t){t.older=this._MRU.older,t.newer=this._MRU,t.newer.older=t,t.older.newer=t}}]),t}();e.exports=i},{}]},{},[1])(1)})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(t,e,n){(function(r){!function(t){"object"==typeof n&&void 0!==e?e.exports=t():("undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:this).Tokenizr=t()}(function(){return function e(n,r,i){function o(u,a){if(!r[u]){if(!n[u]){var c="function"==typeof t&&t;if(!a&&c)return c(u,!0);if(s)return s(u,!0);var l=new Error("Cannot find module '"+u+"'");throw l.code="MODULE_NOT_FOUND",l}var h=r[u]={exports:{}};n[u][0].call(h.exports,function(t){return o(n[u][1][t]||t)},h,h.exports,e,n,r,i)}return r[u].exports}for(var s="function"==typeof t&&t,u=0;u<i.length;u++)o(i[u]);return o}({1:[function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t){var e="function"==typeof Map?new Map:void 0;return(i=function(t){if(null===t||!function(t){return-1!==Function.toString.call(t).indexOf("[native code]")}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){return(o()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&s(i,n.prototype),i}).apply(null,arguments)}(t,arguments,u(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),s(n,t)})(t)}function o(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function l(t,e,n){return e&&c(t.prototype,e),n&&c(t,n),t}var h=function(t,e){var n=t.length,r=e-20;r<0&&(r=0);var i=e+20;i>n&&(i=n);var o=function(t){return t.charCodeAt(0).toString(16).toUpperCase()},s=function(t,e,n){return t.substr(e,n).replace(/\\/g,"\\\\").replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,function(t){return"\\x0"+o(t)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(t){return"\\x"+o(t)}).replace(/[\u0100-\u0FFF]/g,function(t){return"\\u0"+o(t)}).replace(/[\u1000-\uFFFF]/g,function(t){return"\\u"+o(t)})};return{prologTrunc:r>0,prologText:s(t,r,e-r),tokenText:s(t,e,1),epilogText:s(t,e+1,i-(e+1)),epilogTrunc:i<n}},f=function(){function t(e,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;a(this,t),this.type=e,this.value=n,this.text=r,this.pos=i,this.line=o,this.column=s}return l(t,[{key:"toString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(t,e){return e};return"".concat(t("type",this.type)," ")+"(value: ".concat(t("value",JSON.stringify(this.value)),", ")+"text: ".concat(t("text",JSON.stringify(this.text)),", ")+"pos: ".concat(t("pos",this.pos),", ")+"line: ".concat(t("line",this.line),", ")+"column: ".concat(t("column",this.column),")")}},{key:"isA",value:function(t,e){return t===this.type&&(2!==arguments.length||e===this.value)}}]),t}(),p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(n,i(Error));var e=function(t){var e=o();return function(){var n,i=u(t);if(e){var o=u(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,n)}}(n);function n(t,r,i,o,s){var u;return a(this,n),(u=e.call(this,t)).name="ParsingError",u.message=t,u.pos=r,u.line=i,u.column=o,u.input=s,u}return l(n,[{key:"toString",value:function(){for(var t=h(this.input,this.pos),e="line ".concat(this.line," (column ").concat(this.column,"): "),n="",r=0;r<e.length+t.prologText.length;r++)n+=" ";return"Parsing Error: "+this.message+"\n"+e+t.prologText+t.tokenText+t.epilogText+"\n"+n+"^"}}]),n}(),_=function(){function t(e){a(this,t),this._tokenizr=e,this._data={},this._repeat=!1,this._reject=!1,this._ignore=!1,this._match=null}return l(t,[{key:"data",value:function(t,e){var n=this._data[t];return 2===arguments.length&&(this._data[t]=e),n}},{key:"info",value:function(){return{line:this._tokenizr._line,column:this._tokenizr._column,pos:this._tokenizr._pos,len:this._match[0].length}}},{key:"push",value:function(){var t;return(t=this._tokenizr).push.apply(t,arguments),this}},{key:"pop",value:function(){var t;return(t=this._tokenizr).pop.apply(t,arguments)}},{key:"state",value:function(){var t,e;return arguments.length>0?((e=this._tokenizr).state.apply(e,arguments),this):(t=this._tokenizr).state.apply(t,arguments)}},{key:"tag",value:function(){var t;return(t=this._tokenizr).tag.apply(t,arguments),this}},{key:"tagged",value:function(){var t;return(t=this._tokenizr).tagged.apply(t,arguments)}},{key:"untag",value:function(){var t;return(t=this._tokenizr).untag.apply(t,arguments),this}},{key:"repeat",value:function(){return this._tokenizr._log(" REPEAT"),this._repeat=!0,this}},{key:"reject",value:function(){return this._tokenizr._log(" REJECT"),this._reject=!0,this}},{key:"ignore",value:function(){return this._tokenizr._log(" IGNORE"),this._ignore=!0,this}},{key:"accept",value:function(t,e){return arguments.length<2&&(e=this._match[0]),this._tokenizr._log(" ACCEPT: type: ".concat(t,", value: ")+"".concat(JSON.stringify(e)," (").concat(r(e),'), text: "').concat(this._match[0],'"')),this._tokenizr._pending.push(new f(t,e,this._match[0],this._tokenizr._pos,this._tokenizr._line,this._tokenizr._column)),this}},{key:"stop",value:function(){return this._tokenizr._stopped=!0,this}}]),t}(),g=function(){function t(){a(this,t),this._before=null,this._after=null,this._finish=null,this._rules=[],this._debug=!1,this.reset()}return l(t,[{key:"reset",value:function(){return this._input="",this._len=0,this._eof=!1,this._pos=0,this._line=1,this._column=1,this._state=["default"],this._tag={},this._transaction=[],this._pending=[],this._stopped=!1,this._ctx=new _(this),this}},{key:"error",value:function(t){return new p(t,this._pos,this._line,this._column,this._input)}},{key:"debug",value:function(t){return this._debug=t,this}},{key:"_log",value:function(t){this._debug&&console.log("tokenizr: ".concat(t))}},{key:"input",value:function(t){if("string"!=typeof t)throw new Error('parameter "input" not a String');return this.reset(),this._input=t,this._len=t.length,this}},{key:"push",value:function(t){if(1!==arguments.length)throw new Error("invalid number of arguments");if("string"!=typeof t)throw new Error('parameter "state" not a String');return this._log(" STATE (PUSH): "+"old: <".concat(this._state[this._state.length-1],">, ")+"new: <".concat(t,">")),this._state.push(t),this}},{key:"pop",value:function(){if(0!==arguments.length)throw new Error("invalid number of arguments");if(this._state.length<2)throw new Error("no more custom states to pop");return this._log(" STATE (POP): "+"old: <".concat(this._state[this._state.length-1],">, ")+"new: <".concat(this._state[this._state.length-2],">")),this._state.pop()}},{key:"state",value:function(t){if(1===arguments.length){if("string"!=typeof t)throw new Error('parameter "state" not a String');return this._log(" STATE (SET): "+"old: <".concat(this._state[this._state.length-1],">, ")+"new: <".concat(t,">")),this._state[this._state.length-1]=t,this}if(0===arguments.length)return this._state[this._state.length-1];throw new Error("invalid number of arguments")}},{key:"tag",value:function(t){if(1!==arguments.length)throw new Error("invalid number of arguments");if("string"!=typeof t)throw new Error('parameter "tag" not a String');return this._log(" TAG (ADD): ".concat(t)),this._tag[t]=!0,this}},{key:"tagged",value:function(t){if(1!==arguments.length)throw new Error("invalid number of arguments");if("string"!=typeof t)throw new Error('parameter "tag" not a String');return!0===this._tag[t]}},{key:"untag",value:function(t){if(1!==arguments.length)throw new Error("invalid number of arguments");if("string"!=typeof t)throw new Error('parameter "tag" not a String');return this._log(" TAG (DEL): ".concat(t)),delete this._tag[t],this}},{key:"before",value:function(t){return this._before=t,this}},{key:"after",value:function(t){return this._after=t,this}},{key:"finish",value:function(t){return this._finish=t,this}},{key:"rule",value:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unknown";if(2===arguments.length&&"function"==typeof e){var o=[t,e];e=o[0],n=o[1],t="*"}else if(3===arguments.length&&"function"==typeof e){var s=[t,e,n];e=s[0],n=s[1],i=s[2],t="*"}if("string"!=typeof t)throw new Error('parameter "state" not a String');if(!("object"===r(e)&&e instanceof RegExp))throw new Error('parameter "pattern" not a RegExp');if("function"!=typeof n)throw new Error('parameter "action" not a Function');if("string"!=typeof i)throw new Error('parameter "name" not a String');t=t.split(/\s*,\s*/g).map(function(t){var e=t.split(/\s+/g),n=e.filter(function(t){return null===t.match(/^#/)}),r=e.filter(function(t){return null!==t.match(/^#/)}).map(function(t){return t.replace(/^#/,"")});if(1!==n.length)throw new Error("exactly one state required");return{state:n[0],tags:r}});var u="g";try{"boolean"==typeof new RegExp("","y").sticky&&(u="y")}catch(t){}return"boolean"==typeof e.multiline&&e.multiline&&(u+="m"),"boolean"==typeof e.dotAll&&e.dotAll&&(u+="s"),"boolean"==typeof e.ignoreCase&&e.ignoreCase&&(u+="i"),"boolean"==typeof e.unicode&&e.unicode&&(u+="u"),e=new RegExp(e.source,u),this._log("rule: configure rule (state: ".concat(t,", pattern: ").concat(e.source,")")),this._rules.push({state:t,pattern:e,action:n,name:i}),this}},{key:"_progress",value:function(t,e){for(var n=this._line,r=this._column,i=this._input,o=t;o<e;o++){var s=i.charAt(o);"\r"===s?this._column=1:"\n"===s?(this._line++,this._column=1):"\t"===s?this._column+=8-this._column%8:this._column++}this._log(" PROGRESS: characters: ".concat(e-t,", ")+"from: <line ".concat(n,", column ").concat(r,">, ")+"to: <line ".concat(this._line,", column ").concat(this._column,">"))}},{key:"_tokenize",value:function(){var t=this,e=function(){t._eof||(null!==t._finish&&t._finish.call(t._ctx,t._ctx),t._eof=!0,t._pending.push(new f("EOF","","",t._pos,t._line,t._column)))};if(!(this._stopped||this._pos>=this._len)){for(var n=!0;n;){if(n=!1,this._debug){var r=h(this._input,this._pos),i=Object.keys(this._tag).map(function(t){return"#".concat(t)}).join(" ");this._log("INPUT: state: <".concat(this._state[this._state.length-1],">, tags: <").concat(i,">, text: ")+(r.prologTrunc?"...":'"')+"".concat(r.prologText,"<").concat(r.tokenText,">").concat(r.epilogText)+(r.epilogTrunc?"...":'"')+", at: <line ".concat(this._line,", column ").concat(this._column,">"))}for(var o=0;o<this._rules.length;o++){if(this._debug){var s=this._rules[o].state.map(function(t){var e=t.state;return t.tags.length>0&&(e+=" "+t.tags.map(function(t){return"#".concat(t)}).join(" ")),e}).join(", ");this._log(" RULE: state(s): <".concat(s,">, ")+"pattern: ".concat(this._rules[o].pattern.source))}var u=!1,a=this._rules[o].state.map(function(t){return t.state}),c=a.indexOf("*");if(c<0&&(c=a.indexOf(this._state[this._state.length-1])),c>=0){u=!0;var l=this._rules[o].state[c].tags;(l=l.filter(function(e){return!t._tag[e]})).length>0&&(u=!1)}if(u){this._rules[o].pattern.lastIndex=this._pos;var p=this._rules[o].pattern.exec(this._input);if(this._rules[o].pattern.lastIndex=this._pos,null!==(p=this._rules[o].pattern.exec(this._input))&&p.index===this._pos){if(this._debug&&this._log(" MATCHED: "+JSON.stringify(p)),this._ctx._match=p,this._ctx._repeat=!1,this._ctx._reject=!1,this._ctx._ignore=!1,null!==this._before&&this._before.call(this._ctx,this._ctx,p,this._rules[o]),this._rules[o].action.call(this._ctx,this._ctx,p),null!==this._after&&this._after.call(this._ctx,this._ctx,p,this._rules[o]),this._ctx._reject)continue;if(this._ctx._repeat){n=!0;break}if(this._ctx._ignore){if(this._progress(this._pos,this._rules[o].pattern.lastIndex),this._pos=this._rules[o].pattern.lastIndex,this._pos>=this._len)return void e();n=!0;break}if(this._pending.length>0)return this._progress(this._pos,this._rules[o].pattern.lastIndex),this._pos=this._rules[o].pattern.lastIndex,void(this._pos>=this._len&&e());throw new Error('action of pattern "'+this._rules[o].pattern.source+'" neither rejected nor accepted any token(s)')}}}}throw this.error("token not recognized")}e()}},{key:"token",value:function(){if(0===this._pending.length&&this._tokenize(),this._pending.length>0){var t=this._pending.shift();return this._transaction.length>0&&this._transaction[0].push(t),this._log("TOKEN: ".concat(t.toString())),t}return null}},{key:"tokens",value:function(){for(var t,e=[];null!==(t=this.token());)e.push(t);return e}},{key:"peek",value:function(t){void 0===t&&(t=0);for(var e=0;e<this._pending.length+t;e++)this._tokenize();if(t>=this._pending.length)throw new Error("not enough tokens available for peek operation");return this._log("PEEK: ".concat(this._pending[t].toString())),this._pending[t]}},{key:"skip",value:function(t){void 0===t&&(t=1);for(var e=0;e<this._pending.length+t;e++)this._tokenize();if(t>this._pending.length)throw new Error("not enough tokens available for skip operation");for(;t-- >0;)this.token();return this}},{key:"consume",value:function(t,e){for(var n=this,i=0;i<this._pending.length+1;i++)this._tokenize();if(0===this._pending.length)throw new Error("not enough tokens available for consume operation");var o=this.token();this._log("CONSUME: ".concat(o.toString()));var s=function(){throw new p("expected: <type: ".concat(t,", value: ").concat(JSON.stringify(e)," (").concat(r(e),")>, ")+"found: <type: ".concat(o.type,", value: ").concat(JSON.stringify(o.value)," (").concat(r(o.value),")>"),o.pos,o.line,o.column,n._input)};return 2!==arguments.length||o.isA(t,e)?o.isA(t)||s():s(JSON.stringify(e),r(e)),o}},{key:"begin",value:function(){return this._log("BEGIN: level ".concat(this._transaction.length)),this._transaction.unshift([]),this}},{key:"depth",value:function(){if(0===this._transaction.length)throw new Error("cannot determine depth -- no active transaction");return this._transaction[0].length}},{key:"commit",value:function(){if(0===this._transaction.length)throw new Error("cannot commit transaction -- no active transaction");var t=this._transaction.shift();return this._transaction.length>0&&(this._transaction[0]=this._transaction[0].concat(t)),this._log("COMMIT: level ".concat(this._transaction.length)),this}},{key:"rollback",value:function(){if(0===this._transaction.length)throw new Error("cannot rollback transaction -- no active transaction");var t=this._transaction.shift();return this._pending=t.concat(this._pending),this._log("ROLLBACK: level ".concat(this._transaction.length)),this}},{key:"alternatives",value:function(){for(var t=null,e=[],n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o=0;o<r.length;o++)try{this.begin(),t=r[o].call(this),this.commit();break}catch(t){this._log("EXCEPTION: ".concat(t.toString())),e.push({ex:t,depth:this.depth()}),this.rollback();continue}if(null===t&&e.length>0)throw(e=e.sort(function(t,e){return t.depth-e.depth}))[0].ex;return t}}]),t}();g.Token=f,g.ParsingError=p,g.ActionContext=_,e.exports=g},{}]},{},[1])(1)})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=t("tokenizr"),o=new(t("cache-lru"));e.exports=function(t){var e,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];try{e=t.toString()}catch(t){e="function () {}"}var s=e;if(n){var u=o.get(s);if("object"===r(u)&&u instanceof Array)return u}e=(e=(e=e.replace(/^\s*class\s.*?constructor/,"").replace(/^\s*class\s.*/,"function () {}").replace(/^\s*([a-zA-Z_$][a-zA-Z0-9_$]*)(\s*=>)/,"($1)$2").replace(/\r?\n/g," ").replace(/ {2,}/g," ")).replace(/`(?:\\`|[^\r\n])*?`/g,"").replace(/'(?:\\'|[^\r\n])*?'/g,"").replace(/"(?:\\"|[^\r\n])*?"/g,"").replace(/\/\*(?:.|[\r\n])*?\*\//g,"").replace(/\/\/[^\r\n]*\r?\n/g,"")).replace(/^.*?\(/,"(");var a=new i,c=0;a.rule(/\(/,function(t,e){0===c?t.ignore():t.accept(),c++}),a.rule(/\)/,function(t,e){0==--c?(t.ignore(),t.stop()):t.accept()}),a.rule(/(?:.|[ \t\r\n]+)/,function(t,e){t.accept()}),a.input(e),e="",a.tokens().forEach(function(t){e+=t.value}),(a=new i).rule(/\(/,function(t,e){t.ignore(),t.push("parenthesis")}),a.rule("parenthesis",/\)/,function(t,e){t.ignore(),t.pop()}),a.rule("parenthesis",/[^)]+?/,function(t,e){t.ignore()}),a.rule(/\{/,function(t,e){t.ignore(),t.push("braces")}),a.rule("braces",/\}/,function(t,e){t.ignore(),t.pop()}),a.rule("braces",/[^}]+?/,function(t,e){t.ignore()}),a.rule(/\[/,function(t,e){t.ignore(),t.push("brackets")}),a.rule("brackets",/\]/,function(t,e){t.ignore(),t.pop()}),a.rule("brackets",/[^\]]+?/,function(t,e){t.ignore()}),a.rule(/(?:.|[ \t\r\n]+)/,function(t,e){t.accept()}),a.input(e),e="",a.tokens().forEach(function(t){e+=t.value});var l=[];return""!==(e=e.replace(/^\s+$/,""))&&e.split(/\s*,\s*/).forEach(function(t){t=t.replace(/=.*$/,"").replace(/^\s+/,"").replace(/\s+$/,""),l.push(t)}),n&&o.set(s,l),l}},{"cache-lru":1,tokenizr:2}]},{},[3])(3)}); | ||
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) | ||
@@ -30,0 +30,0 @@ },{}],2:[function(_dereq_,module,exports){ |
/* | ||
** babel-runtime-named-params -- Babel Run-Time for Named Function Parameters | ||
** Copyright (c) 2018-2019 Dr. Ralf S. Engelschall <rse@engelschall.com> | ||
** Copyright (c) 2018-2021 Dr. Ralf S. Engelschall <rse@engelschall.com> | ||
** | ||
@@ -30,3 +30,3 @@ ** Permission is hereby granted, free of charge, to any person obtaining | ||
** babel-runtime-named-params -- Babel Run-Time for Named Function Parameters | ||
** Copyright (c) 2018-2019 Dr. Ralf S. Engelschall <rse@engelschall.com> | ||
** Copyright (c) 2018-2021 Dr. Ralf S. Engelschall <rse@engelschall.com> | ||
** | ||
@@ -33,0 +33,0 @@ ** Permission is hereby granted, free of charge, to any person obtaining |
@@ -5,3 +5,3 @@ { | ||
"description": "Babel Run-Time for Named Function Parameters", | ||
"version": "0.9.18", | ||
"version": "0.9.19", | ||
"license": "MIT", | ||
@@ -24,3 +24,3 @@ "author": { | ||
"devDependencies": { | ||
"grunt": "1.0.4", | ||
"grunt": "1.3.0", | ||
"grunt-cli": "1.3.2", | ||
@@ -30,21 +30,20 @@ "grunt-contrib-clean": "2.0.0", | ||
"grunt-mocha-test": "0.13.3", | ||
"grunt-eslint": "22.0.0", | ||
"babel-eslint": "10.0.3", | ||
"grunt-eslint": "23.0.0", | ||
"babel-eslint": "10.1.0", | ||
"envify": "4.1.0", | ||
"uglifyify": "5.0.2", | ||
"babelify": "10.0.0", | ||
"eslint": "6.8.0", | ||
"eslint-config-standard": "14.1.0", | ||
"eslint-plugin-standard": "4.0.1", | ||
"eslint": "7.17.0", | ||
"eslint-config-standard": "16.0.2", | ||
"eslint-plugin-promise": "4.2.1", | ||
"eslint-plugin-import": "2.19.1", | ||
"eslint-plugin-node": "10.0.0", | ||
"@babel/core": "7.7.7", | ||
"@babel/preset-env": "7.7.7", | ||
"@babel/plugin-transform-runtime": "7.7.6", | ||
"browserify-header": "1.0.1", | ||
"browserify-derequire": "1.0.1" | ||
"eslint-plugin-import": "2.22.1", | ||
"eslint-plugin-node": "11.1.0", | ||
"@babel/core": "7.12.10", | ||
"@babel/preset-env": "7.12.11", | ||
"@babel/plugin-transform-runtime": "7.12.10", | ||
"browserify-header": "1.1.0", | ||
"browserify-derequire": "1.1.1" | ||
}, | ||
"dependencies" : { | ||
"func-params": "0.9.16" | ||
"func-params": "0.9.17" | ||
}, | ||
@@ -51,0 +50,0 @@ "engines": { |
@@ -38,3 +38,3 @@ | ||
Copyright (c) 2018-2019 Dr. Ralf S. Engelschall (http://engelschall.com/) | ||
Copyright (c) 2018-2021 Dr. Ralf S. Engelschall (http://engelschall.com/) | ||
@@ -41,0 +41,0 @@ Permission is hereby granted, free of charge, to any person obtaining |
/* | ||
** babel-runtime-named-params -- Babel Run-Time for Named Function Parameters | ||
** Copyright (c) 2018-2019 Dr. Ralf S. Engelschall <rse@engelschall.com> | ||
** Copyright (c) 2018-2021 Dr. Ralf S. Engelschall <rse@engelschall.com> | ||
** | ||
@@ -5,0 +5,0 @@ ** Permission is hereby granted, free of charge, to any person obtaining |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
48626
20
427
+ Addedcache-lru@1.1.11(transitive)
+ Addedfunc-params@0.9.17(transitive)
+ Addedtokenizr@1.6.3(transitive)
- Removedcache-lru@1.1.10(transitive)
- Removedfunc-params@0.9.16(transitive)
- Removedtokenizr@1.5.5(transitive)
Updatedfunc-params@0.9.17