fable 3.0.121 → 3.0.123

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.
@@ -1,6 +1,6 @@
1
1
  "use strict";function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread();}function _nonIterableSpread(){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 _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter);}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2;}function _defineProperty2(obj,key,value){key=_toPropertyKey2(key);if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _classCallCheck2(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey2(descriptor.key),descriptor);}}function _createClass2(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey2(t){var i=_toPrimitive2(t,"string");return"symbol"==_typeof(i)?i:String(i);}function _toPrimitive2(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}(function(f){if((typeof exports==="undefined"?"undefined":_typeof(exports))==="object"&&typeof module!=="undefined"){module.exports=f();}else if(typeof define==="function"&&define.amd){define([],f);}else{var g;if(typeof window!=="undefined"){g=window;}else if(typeof global!=="undefined"){g=global;}else if(typeof self!=="undefined"){g=self;}else{g=this;}g.Fable=f();}})(function(){var define,module,exports;return function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a;}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r);},p,p.exports,r,e,n,t);}return n[i].exports;}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o;}return r;}()({1:[function(require,module,exports){'use strict';var eachOfLimit=require('async.util.eachoflimit');var withoutIndex=require('async.util.withoutindex');module.exports=function eachLimit(arr,limit,iterator,cb){return eachOfLimit(limit)(arr,withoutIndex(iterator),cb);};},{"async.util.eachoflimit":3,"async.util.withoutindex":14}],2:[function(require,module,exports){'use strict';module.exports=function(tasks){function makeCallback(index){function fn(){if(tasks.length){tasks[index].apply(null,arguments);}return fn.next();}fn.next=function(){return index<tasks.length-1?makeCallback(index+1):null;};return fn;}return makeCallback(0);};},{}],3:[function(require,module,exports){var once=require('async.util.once');var noop=require('async.util.noop');var onlyOnce=require('async.util.onlyonce');var keyIterator=require('async.util.keyiterator');module.exports=function eachOfLimit(limit){return function(obj,iterator,cb){cb=once(cb||noop);obj=obj||[];var nextKey=keyIterator(obj);if(limit<=0){return cb(null);}var done=false;var running=0;var errored=false;(function replenish(){if(done&&running<=0){return cb(null);}while(running<limit&&!errored){var key=nextKey();if(key===null){done=true;if(running<=0){cb(null);}return;}running+=1;iterator(obj[key],key,onlyOnce(function(err){running-=1;if(err){cb(err);errored=true;}else{replenish();}}));}})();};};},{"async.util.keyiterator":7,"async.util.noop":9,"async.util.once":10,"async.util.onlyonce":11}],4:[function(require,module,exports){'use strict';var setImmediate=require('async.util.setimmediate');var restParam=require('async.util.restparam');module.exports=function(fn){return restParam(function(args){var callback=args.pop();args.push(function(){var innerArgs=arguments;if(sync){setImmediate(function(){callback.apply(null,innerArgs);});}else{callback.apply(null,innerArgs);}});var sync=true;fn.apply(this,args);sync=false;});};},{"async.util.restparam":12,"async.util.setimmediate":13}],5:[function(require,module,exports){'use strict';module.exports=Array.isArray||function isArray(obj){return Object.prototype.toString.call(obj)==='[object Array]';};},{}],6:[function(require,module,exports){'use strict';var isArray=require('async.util.isarray');module.exports=function isArrayLike(arr){return isArray(arr)||// has a positive integer length property
2
2
  typeof arr.length==='number'&&arr.length>=0&&arr.length%1===0;};},{"async.util.isarray":5}],7:[function(require,module,exports){'use strict';var _keys=require('async.util.keys');var isArrayLike=require('async.util.isarraylike');module.exports=function keyIterator(coll){var i=-1;var len;var keys;if(isArrayLike(coll)){len=coll.length;return function next(){i++;return i<len?i:null;};}else{keys=_keys(coll);len=keys.length;return function next(){i++;return i<len?keys[i]:null;};}};},{"async.util.isarraylike":6,"async.util.keys":8}],8:[function(require,module,exports){'use strict';module.exports=Object.keys||function keys(obj){var _keys=[];for(var k in obj){if(obj.hasOwnProperty(k)){_keys.push(k);}}return _keys;};},{}],9:[function(require,module,exports){'use strict';module.exports=function noop(){};},{}],10:[function(require,module,exports){'use strict';module.exports=function once(fn){return function(){if(fn===null)return;fn.apply(this,arguments);fn=null;};};},{}],11:[function(require,module,exports){'use strict';module.exports=function only_once(fn){return function(){if(fn===null)throw new Error('Callback was already called.');fn.apply(this,arguments);fn=null;};};},{}],12:[function(require,module,exports){'use strict';module.exports=function restParam(func,startIndex){startIndex=startIndex==null?func.length-1:+startIndex;return function(){var length=Math.max(arguments.length-startIndex,0);var rest=new Array(length);for(var index=0;index<length;index++){rest[index]=arguments[index+startIndex];}switch(startIndex){case 0:return func.call(this,rest);case 1:return func.call(this,arguments[0],rest);}};};},{}],13:[function(require,module,exports){(function(setImmediate){(function(){'use strict';var _setImmediate=typeof setImmediate==='function'&&setImmediate;var fallback=function fallback(fn){setTimeout(fn,0);};module.exports=function setImmediate(fn){// not a direct alias for IE10 compatibility
3
- return(_setImmediate||fallback)(fn);};}).call(this);}).call(this,require("timers").setImmediate);},{"timers":121}],14:[function(require,module,exports){'use strict';module.exports=function withoutIndex(iterator){return function(value,index,callback){return iterator(value,callback);};};},{}],15:[function(require,module,exports){'use strict';var once=require('async.util.once');var noop=require('async.util.noop');var isArray=require('async.util.isarray');var restParam=require('async.util.restparam');var ensureAsync=require('async.util.ensureasync');var iterator=require('async.iterator');module.exports=function(tasks,cb){cb=once(cb||noop);if(!isArray(tasks))return cb(new Error('First argument to waterfall must be an array of functions'));if(!tasks.length)return cb();function wrapIterator(iterator){return restParam(function(err,args){if(err){cb.apply(null,[err].concat(args));}else{var next=iterator.next();if(next){args.push(wrapIterator(next));}else{args.push(cb);}ensureAsync(iterator).apply(null,args);}});}wrapIterator(iterator(tasks))();};},{"async.iterator":2,"async.util.ensureasync":4,"async.util.isarray":5,"async.util.noop":9,"async.util.once":10,"async.util.restparam":12}],16:[function(require,module,exports){'use strict';exports.byteLength=byteLength;exports.toByteArray=toByteArray;exports.fromByteArray=fromByteArray;var lookup=[];var revLookup=[];var Arr=typeof Uint8Array!=='undefined'?Uint8Array:Array;var code='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';for(var i=0,len=code.length;i<len;++i){lookup[i]=code[i];revLookup[code.charCodeAt(i)]=i;}// Support decoding URL-safe base64 strings, as Node.js does.
3
+ return(_setImmediate||fallback)(fn);};}).call(this);}).call(this,require("timers").setImmediate);},{"timers":122}],14:[function(require,module,exports){'use strict';module.exports=function withoutIndex(iterator){return function(value,index,callback){return iterator(value,callback);};};},{}],15:[function(require,module,exports){'use strict';var once=require('async.util.once');var noop=require('async.util.noop');var isArray=require('async.util.isarray');var restParam=require('async.util.restparam');var ensureAsync=require('async.util.ensureasync');var iterator=require('async.iterator');module.exports=function(tasks,cb){cb=once(cb||noop);if(!isArray(tasks))return cb(new Error('First argument to waterfall must be an array of functions'));if(!tasks.length)return cb();function wrapIterator(iterator){return restParam(function(err,args){if(err){cb.apply(null,[err].concat(args));}else{var next=iterator.next();if(next){args.push(wrapIterator(next));}else{args.push(cb);}ensureAsync(iterator).apply(null,args);}});}wrapIterator(iterator(tasks))();};},{"async.iterator":2,"async.util.ensureasync":4,"async.util.isarray":5,"async.util.noop":9,"async.util.once":10,"async.util.restparam":12}],16:[function(require,module,exports){'use strict';exports.byteLength=byteLength;exports.toByteArray=toByteArray;exports.fromByteArray=fromByteArray;var lookup=[];var revLookup=[];var Arr=typeof Uint8Array!=='undefined'?Uint8Array:Array;var code='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';for(var i=0,len=code.length;i<len;++i){lookup[i]=code[i];revLookup[code.charCodeAt(i)]=i;}// Support decoding URL-safe base64 strings, as Node.js does.
4
4
  // See: https://en.wikipedia.org/wiki/Base64#URL_applications
5
5
  revLookup['-'.charCodeAt(0)]=62;revLookup['_'.charCodeAt(0)]=63;function getLens(b64){var len=b64.length;if(len%4>0){throw new Error('Invalid string. Length must be a multiple of 4');}// Trim off extra bytes after placeholder bytes are found
6
6
  // See: https://github.com/beatgammit/base64-js/issues/42
@@ -494,7 +494,7 @@ else tmpNode=tmpNode.RightNode;// Call the actual action
494
494
  fAction(tmpNode.Datum,tmpNode.Hash,fIterator);};// Now kick off the iterator
495
495
  return fIterator();}// Seek a specific node, 0 is the index of the first node.
496
496
  },{key:"seek",value:function seek(pNodeIndex){if(!pNodeIndex)return false;if(this.length<1)return false;if(pNodeIndex>=this.length)return false;var tmpNode=this.head;for(var i=0;i<pNodeIndex;i++){tmpNode=tmpNode.RightNode;}return tmpNode;}}]);return LinkedList;}();module.exports=LinkedList;},{"./LinkedList-Node.js":23}],25:[function(require,module,exports){'use strict';var GetIntrinsic=require('get-intrinsic');var callBind=require('./');var $indexOf=callBind(GetIntrinsic('String.prototype.indexOf'));module.exports=function callBoundIntrinsic(name,allowMissing){var intrinsic=GetIntrinsic(name,!!allowMissing);if(typeof intrinsic==='function'&&$indexOf(name,'.prototype.')>-1){return callBind(intrinsic);}return intrinsic;};},{"./":26,"get-intrinsic":59}],26:[function(require,module,exports){'use strict';var bind=require('function-bind');var GetIntrinsic=require('get-intrinsic');var setFunctionLength=require('set-function-length');var $TypeError=require('es-errors/type');var $apply=GetIntrinsic('%Function.prototype.apply%');var $call=GetIntrinsic('%Function.prototype.call%');var $reflectApply=GetIntrinsic('%Reflect.apply%',true)||bind.call($call,$apply);var $defineProperty=GetIntrinsic('%Object.defineProperty%',true);var $max=GetIntrinsic('%Math.max%');if($defineProperty){try{$defineProperty({},'a',{value:1});}catch(e){// IE 8 has a broken defineProperty
497
- $defineProperty=null;}}module.exports=function callBind(originalFunction){if(typeof originalFunction!=='function'){throw new $TypeError('a function is required');}var func=$reflectApply(bind,$call,arguments);return setFunctionLength(func,1+$max(0,originalFunction.length-(arguments.length-1)),true);};var applyBind=function applyBind(){return $reflectApply(bind,$apply,arguments);};if($defineProperty){$defineProperty(module.exports,'apply',{value:applyBind});}else{module.exports.apply=applyBind;}},{"es-errors/type":42,"function-bind":58,"get-intrinsic":59,"set-function-length":97}],27:[function(require,module,exports){/*!
497
+ $defineProperty=null;}}module.exports=function callBind(originalFunction){if(typeof originalFunction!=='function'){throw new $TypeError('a function is required');}var func=$reflectApply(bind,$call,arguments);return setFunctionLength(func,1+$max(0,originalFunction.length-(arguments.length-1)),true);};var applyBind=function applyBind(){return $reflectApply(bind,$apply,arguments);};if($defineProperty){$defineProperty(module.exports,'apply',{value:applyBind});}else{module.exports.apply=applyBind;}},{"es-errors/type":42,"function-bind":58,"get-intrinsic":59,"set-function-length":98}],27:[function(require,module,exports){/*!
498
498
  * cookie
499
499
  * Copyright(c) 2012-2014 Roman Shtylman
500
500
  * Copyright(c) 2015 Douglas Christopher Wilson
@@ -648,7 +648,7 @@ var tmpConstructedBufferOutputString='';for(var i=0;i<tmpLineStrings.length;i++)
648
648
  tmpConstructedBufferOutputString+="".concat(tmpLineStrings[i],"\n");if(tmpObjectStrings[i]!==false){tmpConstructedBufferOutputString+="".concat(tmpObjectStrings[i],"\n");}}if(!this.fileWriter.write(tmpConstructedBufferOutputString,'utf8')){// If the streamwriter returns false, we need to wait for it to drain.
649
649
  this.fileWriter.once('drain',this.completeBufferFlushToLogFile.bind(this,tmpFlushComplete));}else{return this.completeBufferFlushToLogFile(tmpFlushComplete);}}}},{key:"write",value:function write(pLevel,pLogText,pObject){var tmpLogLine=_get(_getPrototypeOf(SimpleFlatFileLogger.prototype),"write",this).call(this,pLevel,pLogText,pObject);// Use a very simple array as the write buffer
650
650
  this.logLineStrings.push(tmpLogLine);// Write out the object on a separate line if it is passed in
651
- if(typeof pObject!=='undefined'){this.logObjectStrings.push(JSON.stringify(pObject,null,4));}else{this.logObjectStrings.push(false);}this.flushBufferToLogFile();}}]);return SimpleFlatFileLogger;}(libConsoleLog);module.exports=SimpleFlatFileLogger;},{"./Fable-Log-Logger-Console.js":48,"fs":19,"path":82}],50:[function(require,module,exports){/**
651
+ if(typeof pObject!=='undefined'){this.logObjectStrings.push(JSON.stringify(pObject,null,4));}else{this.logObjectStrings.push(false);}this.flushBufferToLogFile();}}]);return SimpleFlatFileLogger;}(libConsoleLog);module.exports=SimpleFlatFileLogger;},{"./Fable-Log-Logger-Console.js":48,"fs":19,"path":83}],50:[function(require,module,exports){/**
652
652
  * Fable Logging Service
653
653
  */var libFableServiceProviderBase=require('fable-serviceproviderbase').CoreServiceProviderBase;var FableLog=/*#__PURE__*/function(_libFableServiceProvi3){_inherits(FableLog,_libFableServiceProvi3);function FableLog(pSettings,pServiceHash){var _this9;_classCallCheck2(this,FableLog);_this9=_callSuper(this,FableLog,[pSettings,pServiceHash]);_this9.serviceType='Logging';var tmpSettings=_typeof(pSettings)==='object'?pSettings:{};_this9._Settings=tmpSettings;_this9._Providers=require('./Fable-Log-DefaultProviders-Node.js');_this9._StreamDefinitions=tmpSettings.hasOwnProperty('LogStreams')?tmpSettings.LogStreams:require('./Fable-Log-DefaultStreams.json');_this9.logStreams=[];// This object gets decorated for one-time instantiated providers that
654
654
  // have multiple outputs, such as bunyan.
@@ -683,7 +683,7 @@ module.exports.CoreServiceProviderBase=FableServiceProviderBase;},{}],52:[functi
683
683
  * @module Fable Settings
684
684
  */var libPrecedent=require('precedent');var FableSettingsTemplateProcessor=/*#__PURE__*/function(){function FableSettingsTemplateProcessor(pDependencies){_classCallCheck2(this,FableSettingsTemplateProcessor);// Use a no-dependencies templating engine to parse out environment variables
685
685
  this.templateProcessor=new libPrecedent();// TODO: Make the environment variable wrap expression demarcation characters configurable?
686
- this.templateProcessor.addPattern('${','}',function(pTemplateValue){var tmpTemplateValue=pTemplateValue.trim();var tmpSeparatorIndex=tmpTemplateValue.indexOf('|');var tmpDefaultValue=tmpSeparatorIndex>=0?tmpTemplateValue.substring(tmpSeparatorIndex+1):'';var tmpEnvironmentVariableName=tmpSeparatorIndex>-1?tmpTemplateValue.substring(0,tmpSeparatorIndex):tmpTemplateValue;if(process.env.hasOwnProperty(tmpEnvironmentVariableName)){return process.env[tmpEnvironmentVariableName];}else{return tmpDefaultValue;}});}_createClass2(FableSettingsTemplateProcessor,[{key:"parseSetting",value:function parseSetting(pString){return this.templateProcessor.parseString(pString);}}]);return FableSettingsTemplateProcessor;}();module.exports=FableSettingsTemplateProcessor;}).call(this);}).call(this,require('_process'));},{"_process":86,"precedent":83}],54:[function(require,module,exports){/**
686
+ this.templateProcessor.addPattern('${','}',function(pTemplateValue){var tmpTemplateValue=pTemplateValue.trim();var tmpSeparatorIndex=tmpTemplateValue.indexOf('|');var tmpDefaultValue=tmpSeparatorIndex>=0?tmpTemplateValue.substring(tmpSeparatorIndex+1):'';var tmpEnvironmentVariableName=tmpSeparatorIndex>-1?tmpTemplateValue.substring(0,tmpSeparatorIndex):tmpTemplateValue;if(process.env.hasOwnProperty(tmpEnvironmentVariableName)){return process.env[tmpEnvironmentVariableName];}else{return tmpDefaultValue;}});}_createClass2(FableSettingsTemplateProcessor,[{key:"parseSetting",value:function parseSetting(pString){return this.templateProcessor.parseString(pString);}}]);return FableSettingsTemplateProcessor;}();module.exports=FableSettingsTemplateProcessor;}).call(this);}).call(this,require('_process'));},{"_process":87,"precedent":84}],54:[function(require,module,exports){/**
687
687
  * Fable Settings Add-on
688
688
  *
689
689
  *
@@ -777,7 +777,7 @@ return true;}};module.exports=hasPropertyDescriptors;},{"get-intrinsic":59}],62:
777
777
  // if (typeof Symbol.prototype.toString !== 'function') { return false; }
778
778
  // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
779
779
  var symVal=42;obj[sym]=symVal;for(sym in obj){return false;}// eslint-disable-line no-restricted-syntax, no-unreachable-loop
780
- if(typeof Object.keys==='function'&&Object.keys(obj).length!==0){return false;}if(typeof Object.getOwnPropertyNames==='function'&&Object.getOwnPropertyNames(obj).length!==0){return false;}var syms=Object.getOwnPropertySymbols(obj);if(syms.length!==1||syms[0]!==sym){return false;}if(!Object.prototype.propertyIsEnumerable.call(obj,sym)){return false;}if(typeof Object.getOwnPropertyDescriptor==='function'){var descriptor=Object.getOwnPropertyDescriptor(obj,sym);if(descriptor.value!==symVal||descriptor.enumerable!==true){return false;}}return true;};},{}],65:[function(require,module,exports){'use strict';var call=Function.prototype.call;var $hasOwn=Object.prototype.hasOwnProperty;var bind=require('function-bind');/** @type {(o: {}, p: PropertyKey) => p is keyof o} */module.exports=bind.call(call,$hasOwn);},{"function-bind":58}],66:[function(require,module,exports){var http=require('http');var url=require('url');var https=module.exports;for(var key in http){if(http.hasOwnProperty(key))https[key]=http[key];}https.request=function(params,cb){params=validateParams(params);return http.request.call(this,params,cb);};https.get=function(params,cb){params=validateParams(params);return http.get.call(this,params,cb);};function validateParams(params){if(typeof params==='string'){params=url.parse(params);}if(!params.protocol){params.protocol='https:';}if(params.protocol!=='https:'){throw new Error('Protocol "'+params.protocol+'" not supported. Expected "https:"');}return params;}},{"http":101,"url":122}],67:[function(require,module,exports){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m;var eLen=nBytes*8-mLen-1;var eMax=(1<<eLen)-1;var eBias=eMax>>1;var nBits=-7;var i=isLE?nBytes-1:0;var d=isLE?-1:1;var s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8){}m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8){}if(e===0){e=1-eBias;}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity;}else{m=m+Math.pow(2,mLen);e=e-eBias;}return(s?-1:1)*m*Math.pow(2,e-mLen);};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c;var eLen=nBytes*8-mLen-1;var eMax=(1<<eLen)-1;var eBias=eMax>>1;var rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0;var i=isLE?0:nBytes-1;var d=isLE?1:-1;var s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax;}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2;}if(e+eBias>=1){value+=rt/c;}else{value+=rt*Math.pow(2,1-eBias);}if(value*c>=2){e++;c/=2;}if(e+eBias>=eMax){m=0;e=eMax;}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias;}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0;}}for(;mLen>=8;buffer[offset+i]=m&0xff,i+=d,m/=256,mLen-=8){}e=e<<mLen|m;eLen+=mLen;for(;eLen>0;buffer[offset+i]=e&0xff,i+=d,e/=256,eLen-=8){}buffer[offset+i-d]|=s*128;};},{}],68:[function(require,module,exports){if(typeof Object.create==='function'){// implementation from standard node.js 'util' module
780
+ if(typeof Object.keys==='function'&&Object.keys(obj).length!==0){return false;}if(typeof Object.getOwnPropertyNames==='function'&&Object.getOwnPropertyNames(obj).length!==0){return false;}var syms=Object.getOwnPropertySymbols(obj);if(syms.length!==1||syms[0]!==sym){return false;}if(!Object.prototype.propertyIsEnumerable.call(obj,sym)){return false;}if(typeof Object.getOwnPropertyDescriptor==='function'){var descriptor=Object.getOwnPropertyDescriptor(obj,sym);if(descriptor.value!==symVal||descriptor.enumerable!==true){return false;}}return true;};},{}],65:[function(require,module,exports){'use strict';var call=Function.prototype.call;var $hasOwn=Object.prototype.hasOwnProperty;var bind=require('function-bind');/** @type {(o: {}, p: PropertyKey) => p is keyof o} */module.exports=bind.call(call,$hasOwn);},{"function-bind":58}],66:[function(require,module,exports){var http=require('http');var url=require('url');var https=module.exports;for(var key in http){if(http.hasOwnProperty(key))https[key]=http[key];}https.request=function(params,cb){params=validateParams(params);return http.request.call(this,params,cb);};https.get=function(params,cb){params=validateParams(params);return http.get.call(this,params,cb);};function validateParams(params){if(typeof params==='string'){params=url.parse(params);}if(!params.protocol){params.protocol='https:';}if(params.protocol!=='https:'){throw new Error('Protocol "'+params.protocol+'" not supported. Expected "https:"');}return params;}},{"http":102,"url":123}],67:[function(require,module,exports){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m;var eLen=nBytes*8-mLen-1;var eMax=(1<<eLen)-1;var eBias=eMax>>1;var nBits=-7;var i=isLE?nBytes-1:0;var d=isLE?-1:1;var s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8){}m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8){}if(e===0){e=1-eBias;}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity;}else{m=m+Math.pow(2,mLen);e=e-eBias;}return(s?-1:1)*m*Math.pow(2,e-mLen);};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c;var eLen=nBytes*8-mLen-1;var eMax=(1<<eLen)-1;var eBias=eMax>>1;var rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0;var i=isLE?0:nBytes-1;var d=isLE?1:-1;var s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax;}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2;}if(e+eBias>=1){value+=rt/c;}else{value+=rt*Math.pow(2,1-eBias);}if(value*c>=2){e++;c/=2;}if(e+eBias>=eMax){m=0;e=eMax;}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias;}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0;}}for(;mLen>=8;buffer[offset+i]=m&0xff,i+=d,m/=256,mLen-=8){}e=e<<mLen|m;eLen+=mLen;for(;eLen>0;buffer[offset+i]=e&0xff,i+=d,e/=256,eLen-=8){}buffer[offset+i-d]|=s*128;};},{}],68:[function(require,module,exports){if(typeof Object.create==='function'){// implementation from standard node.js 'util' module
781
781
  module.exports=function inherits(ctor,superCtor){if(superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}});}};}else{// old school shim for old browsers
782
782
  module.exports=function inherits(ctor,superCtor){if(superCtor){ctor.super_=superCtor;var TempCtor=function TempCtor(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor();ctor.prototype.constructor=ctor;}};}},{}],69:[function(require,module,exports){// When a boxed property is passed in, it should have quotes of some
783
783
  // kind around it.
@@ -822,7 +822,9 @@ if(_typeof(pTranslation)!='object'){this.logError("Hash translation addTranslati
822
822
  * Manyfest simple logging shim (for browser and dependency-free running)
823
823
  */var logToConsole=function logToConsole(pLogLine,pLogObject){var tmpLogLine=typeof pLogLine==='string'?pLogLine:'';console.log("[Manyfest] ".concat(tmpLogLine));if(pLogObject)console.log(JSON.stringify(pLogObject));};module.exports=logToConsole;},{}],72:[function(require,module,exports){/**
824
824
  * @author <steven@velozo.com>
825
- */var libSimpleLog=require('./Manyfest-LogToConsole.js');/**
825
+ */var libSimpleLog=require('./Manyfest-LogToConsole.js');// This is for resolving functions mid-address
826
+ var libGetObjectValue=require('./Manyfest-ObjectAddress-GetValue.js');// TODO: Just until this is a fable service.
827
+ var _MockFable={DataFormat:require('./Manyfest-ObjectAddress-Parser.js')};/**
826
828
  * Object Address Resolver
827
829
  *
828
830
  * IMPORTANT NOTE: This code is intentionally more verbose than necessary, to
@@ -839,19 +841,36 @@ if(_typeof(pTranslation)!='object'){this.logError("Hash translation addTranslati
839
841
  *
840
842
  *
841
843
  * @class ManyfestObjectAddressResolverCheckAddressExists
842
- */var ManyfestObjectAddressResolverCheckAddressExists=/*#__PURE__*/function(){function ManyfestObjectAddressResolverCheckAddressExists(){_classCallCheck2(this,ManyfestObjectAddressResolverCheckAddressExists);}// Check if an address exists.
844
+ */var ManyfestObjectAddressResolverCheckAddressExists=/*#__PURE__*/function(){function ManyfestObjectAddressResolverCheckAddressExists(){_classCallCheck2(this,ManyfestObjectAddressResolverCheckAddressExists);this.getObjectValueClass=new libGetObjectValue(libSimpleLog,libSimpleLog);}// Check if an address exists.
843
845
  //
844
846
  // This is necessary because the getValueAtAddress function is ambiguous on
845
847
  // whether the element/property is actually there or not (it returns
846
848
  // undefined whether the property exists or not). This function checks for
847
849
  // existance and returns true or false dependent.
848
- _createClass2(ManyfestObjectAddressResolverCheckAddressExists,[{key:"checkAddressExists",value:function checkAddressExists(pObject,pAddress){// TODO: Should these throw an error?
850
+ _createClass2(ManyfestObjectAddressResolverCheckAddressExists,[{key:"checkAddressExists",value:function checkAddressExists(pObject,pAddress,pRootObject){// TODO: Should these throw an error?
849
851
  // Make sure pObject is an object
850
852
  if(_typeof(pObject)!='object')return false;// Make sure pAddress is a string
851
- if(typeof pAddress!='string')return false;// TODO: Make this work for things like SomeRootObject.Metadata["Some.People.Use.Bad.Object.Property.Names"]
852
- var tmpSeparatorIndex=pAddress.indexOf('.');// This is the terminal address string (no more dots so the RECUSION ENDS IN HERE somehow)
853
- if(tmpSeparatorIndex==-1){// Check if the address refers to a boxed property
854
- var tmpBracketStartIndex=pAddress.indexOf('[');var tmpBracketStopIndex=pAddress.indexOf(']');// Boxed elements look like this:
853
+ if(typeof pAddress!='string')return false;// Set the root object to the passed-in object if it isn't set yet. This is expected to be the root object.
854
+ // NOTE: This was added to support functions mid-stream
855
+ var tmpRootObject=typeof pRootObject=='undefined'?pObject:pRootObject;// DONE: Make this work for things like SomeRootObject.Metadata["Some.People.Use.Bad.Object.Property.Names"]
856
+ var tmpAddressPartBeginning=_MockFable.DataFormat.stringGetFirstSegment(pAddress);// This is the terminal address string (no more dots so the RECUSION ENDS IN HERE somehow)
857
+ if(tmpAddressPartBeginning.length==pAddress.length){// Check if the address refers to a boxed property
858
+ var tmpBracketStartIndex=pAddress.indexOf('[');var tmpBracketStopIndex=pAddress.indexOf(']');// Check if there is a function somewhere in the address... parenthesis start should only be in a function
859
+ var tmpFunctionStartIndex=pAddress.indexOf('(');// NOTE THAT FUNCTIONS MUST RESOLVE FIRST
860
+ // Functions look like this
861
+ // MyFunction()
862
+ // MyFunction(Some.Address)
863
+ // MyFunction(Some.Address,Some.Other.Address)
864
+ // MyFunction(Some.Address,Some.Other.Address,Some.Third.Address)
865
+ //
866
+ // This could be enhanced to allow purely numeric and string values to be passed to the function. For now,
867
+ // To heck with that. This is a simple function call.
868
+ //
869
+ // The requirements to detect a function are:
870
+ // 1) The start bracket is after character 0
871
+ if(tmpFunctionStartIndex>0// 2) The end bracket is after the start bracket
872
+ &&_MockFable.DataFormat.stringCountEnclosures(pAddress)>0){var tmpFunctionAddress=pAddress.substring(0,tmpFunctionStartIndex).trim();if(pObject.hasOwnProperty(tmpFunctionAddress)&&typeof pObject[tmpFunctionAddress]=='function'){return true;}else{// The address suggests it is a function, but it is not.
873
+ return false;}}// Boxed elements look like this:
855
874
  // MyValues[10]
856
875
  // MyValues['Name']
857
876
  // MyValues["Age"]
@@ -860,7 +879,7 @@ var tmpBracketStartIndex=pAddress.indexOf('[');var tmpBracketStopIndex=pAddress.
860
879
  // When we are passed SomeObject["Name"] this code below recurses as if it were SomeObject.Name
861
880
  // The requirements to detect a boxed element are:
862
881
  // 1) The start bracket is after character 0
863
- if(tmpBracketStartIndex>0// 2) The end bracket has something between them
882
+ else if(tmpBracketStartIndex>0// 2) The end bracket has something between them
864
883
  &&tmpBracketStopIndex>tmpBracketStartIndex// 3) There is data
865
884
  &&tmpBracketStopIndex-tmpBracketStartIndex>1){// The "Name" of the Object contained too the left of the bracket
866
885
  var tmpBoxedPropertyName=pAddress.substring(0,tmpBracketStartIndex).trim();// If the subproperty doesn't test as a proper Object, none of the rest of this is possible.
@@ -879,9 +898,31 @@ if(isNaN(tmpBoxedPropertyNumber)){// This isn't a number ... let's treat it as a
879
898
  tmpBoxedPropertyReference=this.cleanWrapCharacters('"',tmpBoxedPropertyReference);tmpBoxedPropertyReference=this.cleanWrapCharacters('`',tmpBoxedPropertyReference);tmpBoxedPropertyReference=this.cleanWrapCharacters("'",tmpBoxedPropertyReference);// Check if the property exists.
880
899
  return pObject[tmpBoxedPropertyName].hasOwnProperty(tmpBoxedPropertyReference);}else{// Use the new in operator to see if the element is in the array
881
900
  return tmpBoxedPropertyNumber in pObject[tmpBoxedPropertyName];}}else{// Check if the property exists
882
- return pObject.hasOwnProperty(pAddress);}}else{var tmpSubObjectName=pAddress.substring(0,tmpSeparatorIndex);var tmpNewAddress=pAddress.substring(tmpSeparatorIndex+1);// Test if the tmpNewAddress is an array or object
901
+ return pObject.hasOwnProperty(pAddress);}}else{var tmpSubObjectName=tmpAddressPartBeginning;var tmpNewAddress=pAddress.substring(tmpAddressPartBeginning.length+1);// Test if the tmpNewAddress is an array or object
883
902
  // Check if it's a boxed property
884
- var _tmpBracketStartIndex=tmpSubObjectName.indexOf('[');var _tmpBracketStopIndex=tmpSubObjectName.indexOf(']');// Boxed elements look like this:
903
+ var _tmpBracketStartIndex=tmpSubObjectName.indexOf('[');var _tmpBracketStopIndex=tmpSubObjectName.indexOf(']');// Check if there is a function somewhere in the address... parenthesis start should only be in a function
904
+ var _tmpFunctionStartIndex=tmpSubObjectName.indexOf('(');// NOTE THAT FUNCTIONS MUST RESOLVE FIRST
905
+ // Functions look like this
906
+ // MyFunction()
907
+ // MyFunction(Some.Address)
908
+ // MyFunction(Some.Address,Some.Other.Address)
909
+ // MyFunction(Some.Address,Some.Other.Address,Some.Third.Address)
910
+ //
911
+ // This could be enhanced to allow purely numeric and string values to be passed to the function. For now,
912
+ // To heck with that. This is a simple function call.
913
+ //
914
+ // The requirements to detect a function are:
915
+ // 1) The start bracket is after character 0
916
+ if(_tmpFunctionStartIndex>0// 2) The end bracket is after the start bracket
917
+ &&_MockFable.DataFormat.stringCountEnclosures(tmpSubObjectName)>0){var _tmpFunctionAddress=tmpSubObjectName.substring(0,_tmpFunctionStartIndex).trim();//tmpParentAddress = `${tmpParentAddress}${(tmpParentAddress.length > 0) ? '.' : ''}${tmpSubObjectName}`;
918
+ if(!_typeof(pObject[_tmpFunctionAddress])=='function'){// The address suggests it is a function, but it is not.
919
+ return false;}// Now see if the function has arguments.
920
+ // Implementation notes: * ARGUMENTS MUST SHARE THE SAME ROOT OBJECT CONTEXT *
921
+ var tmpFunctionArguments=_MockFable.DataFormat.stringGetSegments(_MockFable.DataFormat.stringGetEnclosureValueByIndex(tmpSubObjectName.substring(_tmpFunctionAddress.length),0),',');if(tmpFunctionArguments.length==0||tmpFunctionArguments[0]==''){// No arguments... just call the function (bound to the scope of the object it is contained withing)
922
+ return this.checkAddressExists(pObject[_tmpFunctionAddress].apply(pObject),tmpNewAddress,tmpRootObject);}else{var tmpArgumentValues=[];var _tmpRootObject=typeof pRootObject=='undefined'?pObject:pRootObject;// Now get the value for each argument
923
+ for(var i=0;i<tmpFunctionArguments.length;i++){// Resolve the values for each subsequent entry
924
+ // NOTE: This is where the resolves get really tricky. Recursion within recursion. Programming gom jabbar, yo.
925
+ tmpArgumentValues.push(this.getObjectValueClass.getValueAtAddress(_tmpRootObject,tmpFunctionArguments[i]));}return this.checkAddressExists(pObject[_tmpFunctionAddress].apply(pObject,tmpArgumentValues),tmpNewAddress,_tmpRootObject);}}// Boxed elements look like this:
885
926
  // MyValues[42]
886
927
  // MyValues['Color']
887
928
  // MyValues["Weight"]
@@ -890,7 +931,7 @@ var _tmpBracketStartIndex=tmpSubObjectName.indexOf('[');var _tmpBracketStopIndex
890
931
  // When we are passed SomeObject["Name"] this code below recurses as if it were SomeObject.Name
891
932
  // The requirements to detect a boxed element are:
892
933
  // 1) The start bracket is after character 0
893
- if(_tmpBracketStartIndex>0// 2) The end bracket has something between them
934
+ else if(_tmpBracketStartIndex>0// 2) The end bracket has something between them
894
935
  &&_tmpBracketStopIndex>_tmpBracketStartIndex// 3) There is data
895
936
  &&_tmpBracketStopIndex-_tmpBracketStartIndex>1){var _tmpBoxedPropertyName=tmpSubObjectName.substring(0,_tmpBracketStartIndex).trim();var _tmpBoxedPropertyReference=tmpSubObjectName.substring(_tmpBracketStartIndex+1,_tmpBracketStopIndex).trim();var _tmpBoxedPropertyNumber=parseInt(_tmpBoxedPropertyReference,10);// Guard: If the referrant is a number and the boxed property is not an array, or vice versa, return undefined.
896
937
  // This seems confusing to me at first read, so explaination:
@@ -913,12 +954,12 @@ return false;}//This is a bracketed value
913
954
  // otherwise we will try to reat it as a dynamic object property.
914
955
  if(isNaN(_tmpBoxedPropertyNumber)){// This isn't a number ... let's treat it as a dynanmic object property.
915
956
  _tmpBoxedPropertyReference=this.cleanWrapCharacters('"',_tmpBoxedPropertyReference);_tmpBoxedPropertyReference=this.cleanWrapCharacters('`',_tmpBoxedPropertyReference);_tmpBoxedPropertyReference=this.cleanWrapCharacters("'",_tmpBoxedPropertyReference);// Recurse directly into the subobject
916
- return this.checkAddressExists(pObject[_tmpBoxedPropertyName][_tmpBoxedPropertyReference],tmpNewAddress);}else{// We parsed a valid number out of the boxed property name, so recurse into the array
917
- return this.checkAddressExists(pObject[_tmpBoxedPropertyName][_tmpBoxedPropertyNumber],tmpNewAddress);}}// If there is an object property already named for the sub object, but it isn't an object
957
+ return this.checkAddressExists(pObject[_tmpBoxedPropertyName][_tmpBoxedPropertyReference],tmpNewAddress,tmpRootObject);}else{// We parsed a valid number out of the boxed property name, so recurse into the array
958
+ return this.checkAddressExists(pObject[_tmpBoxedPropertyName][_tmpBoxedPropertyNumber],tmpNewAddress,tmpRootObject);}}// If there is an object property already named for the sub object, but it isn't an object
918
959
  // then the system can't set the value in there. Error and abort!
919
960
  if(pObject.hasOwnProperty(tmpSubObjectName)&&_typeof(pObject[tmpSubObjectName])!=='object'){return false;}else if(pObject.hasOwnProperty(tmpSubObjectName)){// If there is already a subobject pass that to the recursive thingy
920
- return this.checkAddressExists(pObject[tmpSubObjectName],tmpNewAddress);}else{// Create a subobject and then pass that
921
- pObject[tmpSubObjectName]={};return this.checkAddressExists(pObject[tmpSubObjectName],tmpNewAddress);}}}}]);return ManyfestObjectAddressResolverCheckAddressExists;}();;module.exports=ManyfestObjectAddressResolverCheckAddressExists;},{"./Manyfest-LogToConsole.js":71}],73:[function(require,module,exports){/**
961
+ return this.checkAddressExists(pObject[tmpSubObjectName],tmpNewAddress,tmpRootObject);}else{// Create a subobject and then pass that
962
+ pObject[tmpSubObjectName]={};return this.checkAddressExists(pObject[tmpSubObjectName],tmpNewAddress,tmpRootObject);}}}}]);return ManyfestObjectAddressResolverCheckAddressExists;}();;module.exports=ManyfestObjectAddressResolverCheckAddressExists;},{"./Manyfest-LogToConsole.js":71,"./Manyfest-ObjectAddress-GetValue.js":74,"./Manyfest-ObjectAddress-Parser.js":75}],73:[function(require,module,exports){/**
922
963
  * @author <steven@velozo.com>
923
964
  */var libSimpleLog=require('./Manyfest-LogToConsole.js');var fCleanWrapCharacters=require('./Manyfest-CleanWrapCharacters.js');var fParseConditionals=require("../source/Manyfest-ParseConditionals.js");/**
924
965
  * Object Address Resolver - DeleteValue
@@ -1045,9 +1086,9 @@ if(pObject.hasOwnProperty(tmpSubObjectName)&&_typeof(pObject[tmpSubObjectName])!
1045
1086
  // Continue to manage the parent address for recursion
1046
1087
  tmpParentAddress="".concat(tmpParentAddress).concat(tmpParentAddress.length>0?'.':'').concat(tmpSubObjectName);return this.deleteValueAtAddress(pObject[tmpSubObjectName],tmpNewAddress,tmpParentAddress);}else{// Create a subobject and then pass that
1047
1088
  // Continue to manage the parent address for recursion
1048
- tmpParentAddress="".concat(tmpParentAddress).concat(tmpParentAddress.length>0?'.':'').concat(tmpSubObjectName);pObject[tmpSubObjectName]={};return this.deleteValueAtAddress(pObject[tmpSubObjectName],tmpNewAddress,tmpParentAddress);}}}}]);return ManyfestObjectAddressResolverDeleteValue;}();;module.exports=ManyfestObjectAddressResolverDeleteValue;},{"../source/Manyfest-ParseConditionals.js":77,"./Manyfest-CleanWrapCharacters.js":69,"./Manyfest-LogToConsole.js":71}],74:[function(require,module,exports){/**
1089
+ tmpParentAddress="".concat(tmpParentAddress).concat(tmpParentAddress.length>0?'.':'').concat(tmpSubObjectName);pObject[tmpSubObjectName]={};return this.deleteValueAtAddress(pObject[tmpSubObjectName],tmpNewAddress,tmpParentAddress);}}}}]);return ManyfestObjectAddressResolverDeleteValue;}();;module.exports=ManyfestObjectAddressResolverDeleteValue;},{"../source/Manyfest-ParseConditionals.js":78,"./Manyfest-CleanWrapCharacters.js":69,"./Manyfest-LogToConsole.js":71}],74:[function(require,module,exports){/**
1049
1090
  * @author <steven@velozo.com>
1050
- */var libSimpleLog=require('./Manyfest-LogToConsole.js');var fCleanWrapCharacters=require('./Manyfest-CleanWrapCharacters.js');var fParseConditionals=require("../source/Manyfest-ParseConditionals.js");/**
1091
+ */var libSimpleLog=require('./Manyfest-LogToConsole.js');var fCleanWrapCharacters=require('./Manyfest-CleanWrapCharacters.js');var fParseConditionals=require("../source/Manyfest-ParseConditionals.js");var _MockFable={DataFormat:require('./Manyfest-ObjectAddress-Parser.js')};/**
1051
1092
  * Object Address Resolver - GetValue
1052
1093
  *
1053
1094
  * IMPORTANT NOTE: This code is intentionally more verbose than necessary, to
@@ -1072,21 +1113,43 @@ this.logInfo=typeof pInfoLog=='function'?pInfoLog:libSimpleLog;this.logError=typ
1072
1113
  if(_typeof(pObject)!='object')return undefined;// Make sure pAddress (the address we are resolving) is a string
1073
1114
  if(typeof pAddress!='string')return undefined;// Stash the parent address for later resolution
1074
1115
  var tmpParentAddress="";if(typeof pParentAddress=='string'){tmpParentAddress=pParentAddress;}// Set the root object to the passed-in object if it isn't set yet. This is expected to be the root object.
1075
- var tmpRootObject=typeof pRootObject=='undefined'?pObject:pRootObject;// TODO: Make this work for things like SomeRootObject.Metadata["Some.People.Use.Bad.Object.Property.Names"]
1076
- var tmpSeparatorIndex=pAddress.indexOf('.');// Adding simple back-navigation in objects
1077
- if(tmpSeparatorIndex==0){// Given an address of "Bundle.Contract.IDContract...Project.IDProject" the ... would be interpreted as two back-navigations from IDContract.
1116
+ var tmpRootObject=typeof pRootObject=='undefined'?pObject:pRootObject;// DONE: Make this work for things like SomeRootObject.Metadata["Some.People.Use.Bad.Object.Property.Names"]
1117
+ var tmpAddressPartBeginning=_MockFable.DataFormat.stringGetFirstSegment(pAddress);// Adding simple back-navigation in objects
1118
+ if(tmpAddressPartBeginning==''){// Given an address of "Bundle.Contract.IDContract...Project.IDProject" the ... would be interpreted as two back-navigations from IDContract.
1078
1119
  // When the address is passed in, though, the first . is already eliminated. So we can count the dots.
1079
- var tmpParentAddressParts=tmpParentAddress.split('.');var tmpBackNavigationCount=0;// Count the number of dots
1120
+ var tmpParentAddressParts=_MockFable.DataFormat.stringGetSegments(tmpParentAddress);var tmpBackNavigationCount=0;// Count the number of dots
1080
1121
  for(var i=0;i<pAddress.length;i++){if(pAddress.charAt(i)!='.'){break;}tmpBackNavigationCount++;}var tmpParentAddressLength=tmpParentAddressParts.length-tmpBackNavigationCount;if(tmpParentAddressLength<0){// We are trying to back navigate more than we can.
1081
1122
  // TODO: Should this be undefined or should we bank out at the bottom and try to go forward?
1082
1123
  // This seems safest for now.
1083
1124
  return undefined;}else{// We are trying to back navigate to a parent object.
1084
1125
  // Recurse with the back-propagated parent address, and, the new address without the back-navigation dots.
1085
1126
  var tmpRecurseAddress=pAddress.slice(tmpBackNavigationCount);if(tmpParentAddressLength>0){tmpRecurseAddress="".concat(tmpParentAddressParts.slice(0,tmpParentAddressLength).join('.'),".").concat(tmpRecurseAddress);}this.logInfo("Back-navigation detected. Recursing back to address [".concat(tmpRecurseAddress,"]"));return this.getValueAtAddress(tmpRootObject,tmpRecurseAddress);}}// This is the terminal address string (no more dots so the RECUSION ENDS IN HERE somehow)
1086
- if(tmpSeparatorIndex==-1){// Check if the address refers to a boxed property
1127
+ if(tmpAddressPartBeginning.length==pAddress.length){// TODO: Optimize this by having these calls only happen when the previous fails.
1128
+ // TODO: Alternatively look for all markers in one pass?
1129
+ // Check if the address refers to a boxed property
1087
1130
  var tmpBracketStartIndex=pAddress.indexOf('[');var tmpBracketStopIndex=pAddress.indexOf(']');// Check for the Object Set Type marker.
1088
1131
  // Note this will not work with a bracket in the same address box set
1089
- var tmpObjectTypeMarkerIndex=pAddress.indexOf('{}');// Boxed elements look like this:
1132
+ var tmpObjectTypeMarkerIndex=pAddress.indexOf('{}');// Check if there is a function somewhere in the address... parenthesis start should only be in a function
1133
+ var tmpFunctionStartIndex=pAddress.indexOf('(');// NOTE THAT FUNCTIONS MUST RESOLVE FIRST
1134
+ // Functions look like this
1135
+ // MyFunction()
1136
+ // MyFunction(Some.Address)
1137
+ // MyFunction(Some.Address,Some.Other.Address)
1138
+ // MyFunction(Some.Address,Some.Other.Address,Some.Third.Address)
1139
+ //
1140
+ // This could be enhanced to allow purely numeric and string values to be passed to the function. For now,
1141
+ // To heck with that. This is a simple function call.
1142
+ //
1143
+ // The requirements to detect a function are:
1144
+ // 1) The start bracket is after character 0
1145
+ if(tmpFunctionStartIndex>0// 2) The end bracket is after the start bracket
1146
+ &&_MockFable.DataFormat.stringCountEnclosures(pAddress)>0){var tmpFunctionAddress=pAddress.substring(0,tmpFunctionStartIndex).trim();if(!_typeof(pObject[tmpFunctionAddress])=='function'){// The address suggests it is a function, but it is not.
1147
+ return false;}// Now see if the function has arguments.
1148
+ // Implementation notes: * ARGUMENTS MUST SHARE THE SAME ROOT OBJECT CONTEXT *
1149
+ var tmpFunctionArguments=_MockFable.DataFormat.stringGetSegments(_MockFable.DataFormat.stringGetEnclosureValueByIndex(pAddress.substring(tmpFunctionAddress.length),0),',');if(tmpFunctionArguments.length==0||tmpFunctionArguments[0]==''){// No arguments... just call the function (bound to the scope of the object it is contained withing)
1150
+ return pObject[tmpFunctionAddress].apply(pObject);}else{var tmpArgumentValues=[];var _tmpRootObject2=typeof pRootObject=='undefined'?pObject:pRootObject;// Now get the value for each argument
1151
+ for(var _i4=0;_i4<tmpFunctionArguments.length;_i4++){// Resolve the values for each subsequent entry
1152
+ tmpArgumentValues.push(this.getValueAtAddress(_tmpRootObject2,tmpFunctionArguments[_i4]));}return pObject[tmpFunctionAddress].apply(pObject,tmpArgumentValues);}}// Boxed elements look like this:
1090
1153
  // MyValues[10]
1091
1154
  // MyValues['Name']
1092
1155
  // MyValues["Age"]
@@ -1095,7 +1158,7 @@ var tmpObjectTypeMarkerIndex=pAddress.indexOf('{}');// Boxed elements look like
1095
1158
  // When we are passed SomeObject["Name"] this code below recurses as if it were SomeObject.Name
1096
1159
  // The requirements to detect a boxed element are:
1097
1160
  // 1) The start bracket is after character 0
1098
- if(tmpBracketStartIndex>0// 2) The end bracket has something between them
1161
+ else if(tmpBracketStartIndex>0// 2) The end bracket has something between them
1099
1162
  &&tmpBracketStopIndex>tmpBracketStartIndex// 3) There is data
1100
1163
  &&tmpBracketStopIndex-tmpBracketStartIndex>1){// The "Name" of the Object contained too the left of the bracket
1101
1164
  var tmpBoxedPropertyName=pAddress.substring(0,tmpBracketStartIndex).trim();// If the subproperty doesn't test as a proper Object, none of the rest of this is possible.
@@ -1117,14 +1180,36 @@ return pObject[tmpBoxedPropertyName][tmpBoxedPropertyReference];}else{return pOb
1117
1180
  else if(tmpBracketStartIndex>0// 2) The end bracket is after the start bracket
1118
1181
  &&tmpBracketStopIndex>tmpBracketStartIndex// 3) There is nothing in the brackets
1119
1182
  &&tmpBracketStopIndex-tmpBracketStartIndex==1){var _tmpBoxedPropertyName5=pAddress.substring(0,tmpBracketStartIndex).trim();if(!Array.isArray(pObject[_tmpBoxedPropertyName5])){// We asked for a set from an array but it isnt' an array.
1120
- return false;}var tmpInputArray=pObject[_tmpBoxedPropertyName5];var tmpOutputArray=[];for(var _i4=0;_i4<tmpInputArray.length;_i4++){// The filtering is complex but allows config-based metaprogramming directly from schema
1121
- var tmpKeepRecord=this.checkRecordFilters(pAddress,tmpInputArray[_i4]);if(tmpKeepRecord){tmpOutputArray.push(tmpInputArray[_i4]);}}return tmpOutputArray;}// The object has been flagged as an object set, so treat it as such
1183
+ return false;}var tmpInputArray=pObject[_tmpBoxedPropertyName5];var tmpOutputArray=[];for(var _i5=0;_i5<tmpInputArray.length;_i5++){// The filtering is complex but allows config-based metaprogramming directly from schema
1184
+ var tmpKeepRecord=this.checkRecordFilters(pAddress,tmpInputArray[_i5]);if(tmpKeepRecord){tmpOutputArray.push(tmpInputArray[_i5]);}}return tmpOutputArray;}// The object has been flagged as an object set, so treat it as such
1122
1185
  else if(tmpObjectTypeMarkerIndex>0){var tmpObjectPropertyName=pAddress.substring(0,tmpObjectTypeMarkerIndex).trim();if(_typeof(pObject[tmpObjectPropertyName])!='object'){// We asked for a set from an array but it isnt' an array.
1123
1186
  return false;}return pObject[tmpObjectPropertyName];}else{// Now is the point in recursion to return the value in the address
1124
- if(_typeof(pObject[pAddress])!=null){return pObject[pAddress];}else{return undefined;}}}else{var tmpSubObjectName=pAddress.substring(0,tmpSeparatorIndex);var tmpNewAddress=pAddress.substring(tmpSeparatorIndex+1);// BOXED ELEMENTS
1187
+ if(_typeof(pObject[pAddress])!=null){return pObject[pAddress];}else{return undefined;}}}else{//let tmpSubObjectName = pAddress.substring(0, tmpSeparatorIndex);
1188
+ //let tmpNewAddress = pAddress.substring(tmpSeparatorIndex+1);
1189
+ var tmpSubObjectName=tmpAddressPartBeginning;var tmpNewAddress=pAddress.substring(tmpAddressPartBeginning.length+1);// BOXED ELEMENTS
1125
1190
  // Test if the tmpNewAddress is an array or object
1126
1191
  // Check if it's a boxed property
1127
- var _tmpBracketStartIndex3=tmpSubObjectName.indexOf('[');var _tmpBracketStopIndex3=tmpSubObjectName.indexOf(']');// Boxed elements look like this:
1192
+ var _tmpBracketStartIndex3=tmpSubObjectName.indexOf('[');var _tmpBracketStopIndex3=tmpSubObjectName.indexOf(']');// Check if there is a function somewhere in the address... parenthesis start should only be in a function
1193
+ var _tmpFunctionStartIndex2=tmpSubObjectName.indexOf('(');// NOTE THAT FUNCTIONS MUST RESOLVE FIRST
1194
+ // Functions look like this
1195
+ // MyFunction()
1196
+ // MyFunction(Some.Address)
1197
+ // MyFunction(Some.Address,Some.Other.Address)
1198
+ // MyFunction(Some.Address,Some.Other.Address,Some.Third.Address)
1199
+ //
1200
+ // This could be enhanced to allow purely numeric and string values to be passed to the function. For now,
1201
+ // To heck with that. This is a simple function call.
1202
+ //
1203
+ // The requirements to detect a function are:
1204
+ // 1) The start bracket is after character 0
1205
+ if(_tmpFunctionStartIndex2>0// 2) The end bracket is after the start bracket
1206
+ &&_MockFable.DataFormat.stringCountEnclosures(tmpSubObjectName)>0){var _tmpFunctionAddress2=tmpSubObjectName.substring(0,_tmpFunctionStartIndex2).trim();tmpParentAddress="".concat(tmpParentAddress).concat(tmpParentAddress.length>0?'.':'').concat(tmpSubObjectName);if(!_typeof(pObject[_tmpFunctionAddress2])=='function'){// The address suggests it is a function, but it is not.
1207
+ return false;}// Now see if the function has arguments.
1208
+ // Implementation notes: * ARGUMENTS MUST SHARE THE SAME ROOT OBJECT CONTEXT *
1209
+ var _tmpFunctionArguments=_MockFable.DataFormat.stringGetSegments(_MockFable.DataFormat.stringGetEnclosureValueByIndex(tmpSubObjectName.substring(_tmpFunctionAddress2.length),0),',');if(_tmpFunctionArguments.length==0||_tmpFunctionArguments[0]==''){// No arguments... just call the function (bound to the scope of the object it is contained withing)
1210
+ return this.getValueAtAddress(pObject[_tmpFunctionAddress2].apply(pObject),tmpNewAddress,tmpParentAddress,tmpRootObject);}else{var _tmpArgumentValues=[];var _tmpRootObject3=typeof pRootObject=='undefined'?pObject:pRootObject;// Now get the value for each argument
1211
+ for(var _i6=0;_i6<_tmpFunctionArguments.length;_i6++){// Resolve the values for each subsequent entry
1212
+ _tmpArgumentValues.push(this.getValueAtAddress(_tmpRootObject3,_tmpFunctionArguments[_i6]));}return this.getValueAtAddress(pObject[_tmpFunctionAddress2].apply(pObject,_tmpArgumentValues),tmpNewAddress,tmpParentAddress,_tmpRootObject3);}}// Boxed elements look like this:
1128
1213
  // MyValues[42]
1129
1214
  // MyValues['Color']
1130
1215
  // MyValues["Weight"]
@@ -1133,7 +1218,7 @@ var _tmpBracketStartIndex3=tmpSubObjectName.indexOf('[');var _tmpBracketStopInde
1133
1218
  // When we are passed SomeObject["Name"] this code below recurses as if it were SomeObject.Name
1134
1219
  // The requirements to detect a boxed element are:
1135
1220
  // 1) The start bracket is after character 0
1136
- if(_tmpBracketStartIndex3>0// 2) The end bracket has something between them
1221
+ else if(_tmpBracketStartIndex3>0// 2) The end bracket has something between them
1137
1222
  &&_tmpBracketStopIndex3>_tmpBracketStartIndex3// 3) There is data
1138
1223
  &&_tmpBracketStopIndex3-_tmpBracketStartIndex3>1){var _tmpBoxedPropertyName6=tmpSubObjectName.substring(0,_tmpBracketStartIndex3).trim();var _tmpBoxedPropertyReference3=tmpSubObjectName.substring(_tmpBracketStartIndex3+1,_tmpBracketStopIndex3).trim();var _tmpBoxedPropertyNumber3=parseInt(_tmpBoxedPropertyReference3,10);// Guard: If the referrant is a number and the boxed property is not an array, or vice versa, return undefined.
1139
1224
  // This seems confusing to me at first read, so explaination:
@@ -1166,20 +1251,100 @@ else if(_tmpBracketStartIndex3>0// 2) The end bracket is after the start brac
1166
1251
  return false;}// We need to enumerate the array and grab the addresses from there.
1167
1252
  var tmpArrayProperty=pObject[_tmpBoxedPropertyName7];// Managing the parent address is a bit more complex here -- the box will be added for each element.
1168
1253
  tmpParentAddress="".concat(tmpParentAddress).concat(tmpParentAddress.length>0?'.':'').concat(_tmpBoxedPropertyName7);// The container object is where we have the "Address":SOMEVALUE pairs
1169
- var tmpContainerObject={};for(var _i5=0;_i5<tmpArrayProperty.length;_i5++){var tmpPropertyParentAddress="".concat(tmpParentAddress,"[").concat(_i5,"]");var tmpValue=this.getValueAtAddress(pObject[_tmpBoxedPropertyName7][_i5],tmpNewAddress,tmpPropertyParentAddress,tmpRootObject);tmpContainerObject["".concat(tmpPropertyParentAddress,".").concat(tmpNewAddress)]=tmpValue;}return tmpContainerObject;}// OBJECT SET
1254
+ var tmpContainerObject={};for(var _i7=0;_i7<tmpArrayProperty.length;_i7++){var tmpPropertyParentAddress="".concat(tmpParentAddress,"[").concat(_i7,"]");var tmpValue=this.getValueAtAddress(pObject[_tmpBoxedPropertyName7][_i7],tmpNewAddress,tmpPropertyParentAddress,tmpRootObject);tmpContainerObject["".concat(tmpPropertyParentAddress,".").concat(tmpNewAddress)]=tmpValue;}return tmpContainerObject;}// OBJECT SET
1170
1255
  // Note this will not work with a bracket in the same address box set
1171
1256
  var _tmpObjectTypeMarkerIndex2=pAddress.indexOf('{}');if(_tmpObjectTypeMarkerIndex2>0){var _tmpObjectPropertyName2=pAddress.substring(0,_tmpObjectTypeMarkerIndex2).trim();if(_typeof(pObject[_tmpObjectPropertyName2])!='object'){// We asked for a set from an array but it isnt' an array.
1172
1257
  return false;}// We need to enumerate the Object and grab the addresses from there.
1173
1258
  var tmpObjectProperty=pObject[_tmpObjectPropertyName2];var tmpObjectPropertyKeys=Object.keys(tmpObjectProperty);// Managing the parent address is a bit more complex here -- the box will be added for each element.
1174
1259
  tmpParentAddress="".concat(tmpParentAddress).concat(tmpParentAddress.length>0?'.':'').concat(_tmpObjectPropertyName2);// The container object is where we have the "Address":SOMEVALUE pairs
1175
- var _tmpContainerObject2={};for(var _i6=0;_i6<tmpObjectPropertyKeys.length;_i6++){var _tmpPropertyParentAddress2="".concat(tmpParentAddress,".").concat(tmpObjectPropertyKeys[_i6]);var _tmpValue2=this.getValueAtAddress(pObject[_tmpObjectPropertyName2][tmpObjectPropertyKeys[_i6]],tmpNewAddress,_tmpPropertyParentAddress2,tmpRootObject);// The filtering is complex but allows config-based metaprogramming directly from schema
1260
+ var _tmpContainerObject2={};for(var _i8=0;_i8<tmpObjectPropertyKeys.length;_i8++){var _tmpPropertyParentAddress2="".concat(tmpParentAddress,".").concat(tmpObjectPropertyKeys[_i8]);var _tmpValue2=this.getValueAtAddress(pObject[_tmpObjectPropertyName2][tmpObjectPropertyKeys[_i8]],tmpNewAddress,_tmpPropertyParentAddress2,tmpRootObject);// The filtering is complex but allows config-based metaprogramming directly from schema
1176
1261
  var _tmpKeepRecord2=this.checkRecordFilters(pAddress,_tmpValue2);if(_tmpKeepRecord2){_tmpContainerObject2["".concat(_tmpPropertyParentAddress2,".").concat(tmpNewAddress)]=_tmpValue2;}}return _tmpContainerObject2;}// If there is an object property already named for the sub object, but it isn't an object
1177
1262
  // then the system can't set the value in there. Error and abort!
1178
1263
  if(pObject.hasOwnProperty(tmpSubObjectName)&&_typeof(pObject[tmpSubObjectName])!=='object'){return undefined;}else if(pObject.hasOwnProperty(tmpSubObjectName)){// If there is already a subobject pass that to the recursive thingy
1179
1264
  // Continue to manage the parent address for recursion
1180
1265
  tmpParentAddress="".concat(tmpParentAddress).concat(tmpParentAddress.length>0?'.':'').concat(tmpSubObjectName);return this.getValueAtAddress(pObject[tmpSubObjectName],tmpNewAddress,tmpParentAddress,tmpRootObject);}else{// Create a subobject and then pass that
1181
1266
  // Continue to manage the parent address for recursion
1182
- tmpParentAddress="".concat(tmpParentAddress).concat(tmpParentAddress.length>0?'.':'').concat(tmpSubObjectName);pObject[tmpSubObjectName]={};return this.getValueAtAddress(pObject[tmpSubObjectName],tmpNewAddress,tmpParentAddress,tmpRootObject);}}}}]);return ManyfestObjectAddressResolverGetValue;}();;module.exports=ManyfestObjectAddressResolverGetValue;},{"../source/Manyfest-ParseConditionals.js":77,"./Manyfest-CleanWrapCharacters.js":69,"./Manyfest-LogToConsole.js":71}],75:[function(require,module,exports){/**
1267
+ tmpParentAddress="".concat(tmpParentAddress).concat(tmpParentAddress.length>0?'.':'').concat(tmpSubObjectName);pObject[tmpSubObjectName]={};return this.getValueAtAddress(pObject[tmpSubObjectName],tmpNewAddress,tmpParentAddress,tmpRootObject);}}}}]);return ManyfestObjectAddressResolverGetValue;}();;module.exports=ManyfestObjectAddressResolverGetValue;},{"../source/Manyfest-ParseConditionals.js":78,"./Manyfest-CleanWrapCharacters.js":69,"./Manyfest-LogToConsole.js":71,"./Manyfest-ObjectAddress-Parser.js":75}],75:[function(require,module,exports){// TODO: This is an inelegant solution to delay the rewrite of Manyfest.
1268
+ // Fable 3.0 has a service for data formatting that deals well with nested enclosures.
1269
+ // The Manyfest library predates fable 3.0 and the services structure of it, so the functions
1270
+ // are more or less pure javascript and as functional as they can be made to be.
1271
+ // Until we shift Manyfest to be a fable service, these three functions were pulled out of
1272
+ // fable to aid in parsing functions with nested enclosures.
1273
+ module.exports={/**
1274
+ * Count the number of segments in a string, respecting enclosures
1275
+ *
1276
+ * @param {string} pString
1277
+ * @param {string} pSeparator
1278
+ * @param {object} pEnclosureStartSymbolMap
1279
+ * @param {object} pEnclosureEndSymbolMap
1280
+ * @returns the count of segments in the string as a number
1281
+ */stringCountSegments:function stringCountSegments(pString,pSeparator,pEnclosureStartSymbolMap,pEnclosureEndSymbolMap){var tmpString=typeof pString=='string'?pString:'';var tmpSeparator=typeof pSeparator=='string'?pSeparator:'.';var tmpEnclosureStartSymbolMap=_typeof(pEnclosureStartSymbolMap)=='object'?pEnclosureStart:{'{':0,'[':1,'(':2};var tmpEnclosureEndSymbolMap=_typeof(pEnclosureEndSymbolMap)=='object'?pEnclosureEnd:{'}':0,']':1,')':2};if(pString.length<1){return 0;}var tmpSegmentCount=1;var tmpEnclosureStack=[];for(var i=0;i<tmpString.length;i++){// IF This is the start of a segment
1282
+ if(tmpString[i]==tmpSeparator// AND we are not in a nested portion of the string
1283
+ &&tmpEnclosureStack.length==0){// Increment the segment count
1284
+ tmpSegmentCount++;}// IF This is the start of an enclosure
1285
+ else if(tmpEnclosureStartSymbolMap.hasOwnProperty(tmpString[i])){// Add it to the stack!
1286
+ tmpEnclosureStack.push(tmpEnclosureStartSymbolMap[tmpString[i]]);}// IF This is the end of an enclosure
1287
+ else if(tmpEnclosureEndSymbolMap.hasOwnProperty(tmpString[i])// AND it matches the current nest level symbol
1288
+ &&tmpEnclosureEndSymbolMap[tmpString[i]]==tmpEnclosureStack[tmpEnclosureStack.length-1]){// Pop it off the stack!
1289
+ tmpEnclosureStack.pop();}}return tmpSegmentCount;},/**
1290
+ * Get the first segment in a string, respecting enclosures
1291
+ *
1292
+ * @param {string} pString
1293
+ * @param {string} pSeparator
1294
+ * @param {object} pEnclosureStartSymbolMap
1295
+ * @param {object} pEnclosureEndSymbolMap
1296
+ * @returns the first segment in the string as a string
1297
+ */stringGetFirstSegment:function stringGetFirstSegment(pString,pSeparator,pEnclosureStartSymbolMap,pEnclosureEndSymbolMap){var tmpString=typeof pString=='string'?pString:'';var tmpSeparator=typeof pSeparator=='string'?pSeparator:'.';var tmpEnclosureStartSymbolMap=_typeof(pEnclosureStartSymbolMap)=='object'?pEnclosureStart:{'{':0,'[':1,'(':2};var tmpEnclosureEndSymbolMap=_typeof(pEnclosureEndSymbolMap)=='object'?pEnclosureEnd:{'}':0,']':1,')':2};if(pString.length<1){return 0;}var tmpEnclosureStack=[];for(var i=0;i<tmpString.length;i++){// IF This is the start of a segment
1298
+ if(tmpString[i]==tmpSeparator// AND we are not in a nested portion of the string
1299
+ &&tmpEnclosureStack.length==0){// Return the segment
1300
+ return tmpString.substring(0,i);}// IF This is the start of an enclosure
1301
+ else if(tmpEnclosureStartSymbolMap.hasOwnProperty(tmpString[i])){// Add it to the stack!
1302
+ tmpEnclosureStack.push(tmpEnclosureStartSymbolMap[tmpString[i]]);}// IF This is the end of an enclosure
1303
+ else if(tmpEnclosureEndSymbolMap.hasOwnProperty(tmpString[i])// AND it matches the current nest level symbol
1304
+ &&tmpEnclosureEndSymbolMap[tmpString[i]]==tmpEnclosureStack[tmpEnclosureStack.length-1]){// Pop it off the stack!
1305
+ tmpEnclosureStack.pop();}}return tmpString;},/**
1306
+ * Get all segments in a string, respecting enclosures
1307
+ *
1308
+ * @param {string} pString
1309
+ * @param {string} pSeparator
1310
+ * @param {object} pEnclosureStartSymbolMap
1311
+ * @param {object} pEnclosureEndSymbolMap
1312
+ * @returns the first segment in the string as a string
1313
+ */stringGetSegments:function stringGetSegments(pString,pSeparator,pEnclosureStartSymbolMap,pEnclosureEndSymbolMap){var tmpString=typeof pString=='string'?pString:'';var tmpSeparator=typeof pSeparator=='string'?pSeparator:'.';var tmpEnclosureStartSymbolMap=_typeof(pEnclosureStartSymbolMap)=='object'?pEnclosureStart:{'{':0,'[':1,'(':2};var tmpEnclosureEndSymbolMap=_typeof(pEnclosureEndSymbolMap)=='object'?pEnclosureEnd:{'}':0,']':1,')':2};var tmpCurrentSegmentStart=0;var tmpSegmentList=[];if(pString.length<1){return tmpSegmentList;}var tmpEnclosureStack=[];for(var i=0;i<tmpString.length;i++){// IF This is the start of a segment
1314
+ if(tmpString[i]==tmpSeparator// AND we are not in a nested portion of the string
1315
+ &&tmpEnclosureStack.length==0){// Return the segment
1316
+ tmpSegmentList.push(tmpString.substring(tmpCurrentSegmentStart,i));tmpCurrentSegmentStart=i+1;}// IF This is the start of an enclosure
1317
+ else if(tmpEnclosureStartSymbolMap.hasOwnProperty(tmpString[i])){// Add it to the stack!
1318
+ tmpEnclosureStack.push(tmpEnclosureStartSymbolMap[tmpString[i]]);}// IF This is the end of an enclosure
1319
+ else if(tmpEnclosureEndSymbolMap.hasOwnProperty(tmpString[i])// AND it matches the current nest level symbol
1320
+ &&tmpEnclosureEndSymbolMap[tmpString[i]]==tmpEnclosureStack[tmpEnclosureStack.length-1]){// Pop it off the stack!
1321
+ tmpEnclosureStack.pop();}}if(tmpCurrentSegmentStart<tmpString.length){tmpSegmentList.push(tmpString.substring(tmpCurrentSegmentStart));}return tmpSegmentList;},/**
1322
+ * Count the number of enclosures in a string based on the start and end characters.
1323
+ *
1324
+ * If no start or end characters are specified, it will default to parentheses. If the string is not a string, it will return 0.
1325
+ *
1326
+ * @param {string} pString
1327
+ * @param {string} pEnclosureStart
1328
+ * @param {string} pEnclosureEnd
1329
+ * @returns the count of full in the string
1330
+ */stringCountEnclosures:function stringCountEnclosures(pString,pEnclosureStart,pEnclosureEnd){var tmpString=typeof pString=='string'?pString:'';var tmpEnclosureStart=typeof pEnclosureStart=='string'?pEnclosureStart:'(';var tmpEnclosureEnd=typeof pEnclosureEnd=='string'?pEnclosureEnd:')';var tmpEnclosureCount=0;var tmpEnclosureDepth=0;for(var i=0;i<tmpString.length;i++){// This is the start of an enclosure
1331
+ if(tmpString[i]==tmpEnclosureStart){if(tmpEnclosureDepth==0){tmpEnclosureCount++;}tmpEnclosureDepth++;}else if(tmpString[i]==tmpEnclosureEnd){tmpEnclosureDepth--;}}return tmpEnclosureCount;},/**
1332
+ * Get the value of the enclosure at the specified index.
1333
+ *
1334
+ * If the index is not a number, it will default to 0. If the string is not a string, it will return an empty string. If the enclosure is not found, it will return an empty string. If the enclosure
1335
+ *
1336
+ * @param {string} pString
1337
+ * @param {number} pEnclosureIndexToGet
1338
+ * @param {string} pEnclosureStart
1339
+ * @param {string}} pEnclosureEnd
1340
+ * @returns {string}
1341
+ */stringGetEnclosureValueByIndex:function stringGetEnclosureValueByIndex(pString,pEnclosureIndexToGet,pEnclosureStart,pEnclosureEnd){var tmpString=typeof pString=='string'?pString:'';var tmpEnclosureIndexToGet=typeof pEnclosureIndexToGet=='number'?pEnclosureIndexToGet:0;var tmpEnclosureStart=typeof pEnclosureStart=='string'?pEnclosureStart:'(';var tmpEnclosureEnd=typeof pEnclosureEnd=='string'?pEnclosureEnd:')';var tmpEnclosureCount=0;var tmpEnclosureDepth=0;var tmpMatchedEnclosureIndex=false;var tmpEnclosedValueStartIndex=0;var tmpEnclosedValueEndIndex=0;for(var i=0;i<tmpString.length;i++){// This is the start of an enclosure
1342
+ if(tmpString[i]==tmpEnclosureStart){tmpEnclosureDepth++;// Only count enclosures at depth 1, but still this parses both pairs of all of them.
1343
+ if(tmpEnclosureDepth==1){tmpEnclosureCount++;if(tmpEnclosureIndexToGet==tmpEnclosureCount-1){// This is the start of *the* enclosure
1344
+ tmpMatchedEnclosureIndex=true;tmpEnclosedValueStartIndex=i;}}}// This is the end of an enclosure
1345
+ else if(tmpString[i]==tmpEnclosureEnd){tmpEnclosureDepth--;// Again, only count enclosures at depth 1, but still this parses both pairs of all of them.
1346
+ if(tmpEnclosureDepth==0&&tmpMatchedEnclosureIndex&&tmpEnclosedValueEndIndex<=tmpEnclosedValueStartIndex){tmpEnclosedValueEndIndex=i;tmpMatchedEnclosureIndex=false;}}}if(tmpEnclosureCount<=tmpEnclosureIndexToGet){// Return an empty string if the enclosure is not found
1347
+ return'';}if(tmpEnclosedValueEndIndex>0&&tmpEnclosedValueEndIndex>tmpEnclosedValueStartIndex){return tmpString.substring(tmpEnclosedValueStartIndex+1,tmpEnclosedValueEndIndex);}else{return tmpString.substring(tmpEnclosedValueStartIndex+1);}}};},{}],76:[function(require,module,exports){/**
1183
1348
  * @author <steven@velozo.com>
1184
1349
  */var libSimpleLog=require('./Manyfest-LogToConsole.js');var fCleanWrapCharacters=require('./Manyfest-CleanWrapCharacters.js');/**
1185
1350
  * Object Address Resolver - SetValue
@@ -1268,7 +1433,7 @@ return this.setValueAtAddress(pObject[_tmpBoxedPropertyName8][_tmpBoxedPropertyN
1268
1433
  if(pObject.hasOwnProperty(tmpSubObjectName)&&_typeof(pObject[tmpSubObjectName])!=='object'){if(!pObject.hasOwnProperty('__ERROR'))pObject['__ERROR']={};// Put it in an error object so data isn't lost
1269
1434
  pObject['__ERROR'][pAddress]=pValue;return false;}else if(pObject.hasOwnProperty(tmpSubObjectName)){// If there is already a subobject pass that to the recursive thingy
1270
1435
  return this.setValueAtAddress(pObject[tmpSubObjectName],tmpNewAddress,pValue);}else{// Create a subobject and then pass that
1271
- pObject[tmpSubObjectName]={};return this.setValueAtAddress(pObject[tmpSubObjectName],tmpNewAddress,pValue);}}}}]);return ManyfestObjectAddressSetValue;}();;module.exports=ManyfestObjectAddressSetValue;},{"./Manyfest-CleanWrapCharacters.js":69,"./Manyfest-LogToConsole.js":71}],76:[function(require,module,exports){/**
1436
+ pObject[tmpSubObjectName]={};return this.setValueAtAddress(pObject[tmpSubObjectName],tmpNewAddress,pValue);}}}}]);return ManyfestObjectAddressSetValue;}();;module.exports=ManyfestObjectAddressSetValue;},{"./Manyfest-CleanWrapCharacters.js":69,"./Manyfest-LogToConsole.js":71}],77:[function(require,module,exports){/**
1272
1437
  * @author <steven@velozo.com>
1273
1438
  */var libSimpleLog=require('./Manyfest-LogToConsole.js');/**
1274
1439
  * Object Address Generation
@@ -1302,8 +1467,8 @@ this.logInfo=typeof pInfoLog=='function'?pInfoLog:libSimpleLog;this.logError=typ
1302
1467
  // This will return a mega set of key:value pairs with all possible schema
1303
1468
  // permutations and default values (when not an object) and everything else.
1304
1469
  _createClass2(ManyfestObjectAddressGeneration,[{key:"generateAddressses",value:function generateAddressses(pObject,pBaseAddress,pSchema){var tmpBaseAddress=typeof pBaseAddress=='string'?pBaseAddress:'';var tmpSchema=_typeof(pSchema)=='object'?pSchema:{};var tmpObjectType=_typeof(pObject);var tmpSchemaObjectEntry={Address:tmpBaseAddress,Hash:tmpBaseAddress,Name:tmpBaseAddress,// This is so scripts and UI controls can force a developer to opt-in.
1305
- InSchema:false};if(tmpObjectType=='object'&&pObject==null){tmpObjectType='null';}switch(tmpObjectType){case'string':tmpSchemaObjectEntry.DataType='String';tmpSchemaObjectEntry.Default=pObject;tmpSchema[tmpBaseAddress]=tmpSchemaObjectEntry;break;case'number':case'bigint':tmpSchemaObjectEntry.DataType='Number';tmpSchemaObjectEntry.Default=pObject;tmpSchema[tmpBaseAddress]=tmpSchemaObjectEntry;break;case'undefined':case'null':tmpSchemaObjectEntry.DataType='Any';tmpSchemaObjectEntry.Default=pObject;tmpSchema[tmpBaseAddress]=tmpSchemaObjectEntry;break;case'object':if(Array.isArray(pObject)){tmpSchemaObjectEntry.DataType='Array';if(tmpBaseAddress!=''){tmpSchema[tmpBaseAddress]=tmpSchemaObjectEntry;}for(var i=0;i<pObject.length;i++){this.generateAddressses(pObject[i],"".concat(tmpBaseAddress,"[").concat(i,"]"),tmpSchema);}}else{tmpSchemaObjectEntry.DataType='Object';if(tmpBaseAddress!=''){tmpSchema[tmpBaseAddress]=tmpSchemaObjectEntry;tmpBaseAddress+='.';}var tmpObjectProperties=Object.keys(pObject);for(var _i7=0;_i7<tmpObjectProperties.length;_i7++){this.generateAddressses(pObject[tmpObjectProperties[_i7]],"".concat(tmpBaseAddress).concat(tmpObjectProperties[_i7]),tmpSchema);}}break;case'symbol':case'function':// Symbols and functions neither recurse nor get added to the schema
1306
- break;}return tmpSchema;}}]);return ManyfestObjectAddressGeneration;}();;module.exports=ManyfestObjectAddressGeneration;},{"./Manyfest-LogToConsole.js":71}],77:[function(require,module,exports){// Given a string, parse out any conditional expressions and set whether or not to keep the record.
1470
+ InSchema:false};if(tmpObjectType=='object'&&pObject==null){tmpObjectType='null';}switch(tmpObjectType){case'string':tmpSchemaObjectEntry.DataType='String';tmpSchemaObjectEntry.Default=pObject;tmpSchema[tmpBaseAddress]=tmpSchemaObjectEntry;break;case'number':case'bigint':tmpSchemaObjectEntry.DataType='Number';tmpSchemaObjectEntry.Default=pObject;tmpSchema[tmpBaseAddress]=tmpSchemaObjectEntry;break;case'undefined':case'null':tmpSchemaObjectEntry.DataType='Any';tmpSchemaObjectEntry.Default=pObject;tmpSchema[tmpBaseAddress]=tmpSchemaObjectEntry;break;case'object':if(Array.isArray(pObject)){tmpSchemaObjectEntry.DataType='Array';if(tmpBaseAddress!=''){tmpSchema[tmpBaseAddress]=tmpSchemaObjectEntry;}for(var i=0;i<pObject.length;i++){this.generateAddressses(pObject[i],"".concat(tmpBaseAddress,"[").concat(i,"]"),tmpSchema);}}else{tmpSchemaObjectEntry.DataType='Object';if(tmpBaseAddress!=''){tmpSchema[tmpBaseAddress]=tmpSchemaObjectEntry;tmpBaseAddress+='.';}var tmpObjectProperties=Object.keys(pObject);for(var _i9=0;_i9<tmpObjectProperties.length;_i9++){this.generateAddressses(pObject[tmpObjectProperties[_i9]],"".concat(tmpBaseAddress).concat(tmpObjectProperties[_i9]),tmpSchema);}}break;case'symbol':case'function':// Symbols and functions neither recurse nor get added to the schema
1471
+ break;}return tmpSchema;}}]);return ManyfestObjectAddressGeneration;}();;module.exports=ManyfestObjectAddressGeneration;},{"./Manyfest-LogToConsole.js":71}],78:[function(require,module,exports){// Given a string, parse out any conditional expressions and set whether or not to keep the record.
1307
1472
  //
1308
1473
  // For instance:
1309
1474
  // 'files[]<<~?format,==,Thumbnail?~>>'
@@ -1316,8 +1481,18 @@ break;}return tmpSchema;}}]);return ManyfestObjectAddressGeneration;}();;module.
1316
1481
  // TODO: Consider making this an es6 class
1317
1482
  // Let's use indexOf since it is apparently the fastest.
1318
1483
  var _ConditionalStanzaStart='<<~?';var _ConditionalStanzaStartLength=_ConditionalStanzaStart.length;var _ConditionalStanzaEnd='?~>>';var _ConditionalStanzaEndLength=_ConditionalStanzaEnd.length;// Ugh dependency injection. Can't wait to make these all fable services.
1319
- var libObjectAddressCheckAddressExists=new(require('./Manyfest-ObjectAddress-CheckAddressExists.js'))();// Test the condition of a value in a record
1320
- var testCondition=function testCondition(pManyfest,pRecord,pSearchAddress,pSearchComparator,pValue){switch(pSearchComparator){case'TRUE':return pManyfest.getValueAtAddress(pRecord,pSearchAddress)===true;break;case'FALSE':return pManyfest.getValueAtAddress(pRecord,pSearchAddress)===false;break;case'LNGT':case'LENGTH_GREATER_THAN':switch(_typeof(pManyfest.getValueAtAddress(pRecord,pSearchAddress))){case'string':return pManyfest.getValueAtAddress(pRecord,pSearchAddress).length>pValue;break;case'object':return pManyfest.getValueAtAddress(pRecord,pSearchAddress).length>pValue;break;default:return false;break;}break;case'LNLT':case'LENGTH_LESS_THAN':switch(_typeof(pManyfest.getValueAtAddress(pRecord,pSearchAddress))){case'string':return pManyfest.getValueAtAddress(pRecord,pSearchAddress).length<pValue;break;case'object':return pManyfest.getValueAtAddress(pRecord,pSearchAddress).length<pValue;break;default:return false;break;}break;case'FALSE':return pManyfest.getValueAtAddress(pRecord,pSearchAddress)===false;break;case'EX':case'EXISTS':return libObjectAddressCheckAddressExists.checkAddressExists(pRecord,pSearchAddress);break;case'DNEX':case'DOES_NOT_EXIST':return!libObjectAddressCheckAddressExists.checkAddressExists(pRecord,pSearchAddress);break;case'!=':return pManyfest.getValueAtAddress(pRecord,pSearchAddress)!=pValue;break;case'<':return pManyfest.getValueAtAddress(pRecord,pSearchAddress)<pValue;break;case'>':return pManyfest.getValueAtAddress(pRecord,pSearchAddress)>pValue;break;case'<=':return pManyfest.getValueAtAddress(pRecord,pSearchAddress)<=pValue;break;case'>=':return pManyfest.getValueAtAddress(pRecord,pSearchAddress)>=pValue;break;case'===':return pManyfest.getValueAtAddress(pRecord,pSearchAddress)===pValue;break;case'==':default:return pManyfest.getValueAtAddress(pRecord,pSearchAddress)==pValue;break;}};var parseConditionals=function parseConditionals(pManyfest,pAddress,pRecord){var tmpKeepRecord=true;/*
1484
+ //let libObjectAddressCheckAddressExists = new (require('./Manyfest-ObjectAddress-CheckAddressExists.js'))();
1485
+ // Test the condition of a value in a record
1486
+ var testCondition=function testCondition(pManyfest,pRecord,pSearchAddress,pSearchComparator,pValue){switch(pSearchComparator){case'TRUE':return pManyfest.getValueAtAddress(pRecord,pSearchAddress)===true;break;case'FALSE':return pManyfest.getValueAtAddress(pRecord,pSearchAddress)===false;break;case'LNGT':case'LENGTH_GREATER_THAN':switch(_typeof(pManyfest.getValueAtAddress(pRecord,pSearchAddress))){case'string':return pManyfest.getValueAtAddress(pRecord,pSearchAddress).length>pValue;break;case'object':return pManyfest.getValueAtAddress(pRecord,pSearchAddress).length>pValue;break;default:return false;break;}break;case'LNLT':case'LENGTH_LESS_THAN':switch(_typeof(pManyfest.getValueAtAddress(pRecord,pSearchAddress))){case'string':return pManyfest.getValueAtAddress(pRecord,pSearchAddress).length<pValue;break;case'object':return pManyfest.getValueAtAddress(pRecord,pSearchAddress).length<pValue;break;default:return false;break;}break;// TODO: Welcome to dependency hell. This fixes itself when we move to fable services.
1487
+ // case 'EX':
1488
+ // case 'EXISTS':
1489
+ // return libObjectAddressCheckAddressExists.checkAddressExists(pRecord, pSearchAddress);
1490
+ // break;
1491
+ // case 'DNEX':
1492
+ // case 'DOES_NOT_EXIST':
1493
+ // return !libObjectAddressCheckAddressExists.checkAddressExists(pRecord, pSearchAddress);
1494
+ // break;
1495
+ case'!=':return pManyfest.getValueAtAddress(pRecord,pSearchAddress)!=pValue;break;case'<':return pManyfest.getValueAtAddress(pRecord,pSearchAddress)<pValue;break;case'>':return pManyfest.getValueAtAddress(pRecord,pSearchAddress)>pValue;break;case'<=':return pManyfest.getValueAtAddress(pRecord,pSearchAddress)<=pValue;break;case'>=':return pManyfest.getValueAtAddress(pRecord,pSearchAddress)>=pValue;break;case'===':return pManyfest.getValueAtAddress(pRecord,pSearchAddress)===pValue;break;case'==':default:return pManyfest.getValueAtAddress(pRecord,pSearchAddress)==pValue;break;}};var parseConditionals=function parseConditionals(pManyfest,pAddress,pRecord){var tmpKeepRecord=true;/*
1321
1496
  Algorithm is simple:
1322
1497
 
1323
1498
  1. Enuerate start points
@@ -1327,7 +1502,7 @@ var testCondition=function testCondition(pManyfest,pRecord,pSearchAddress,pSearc
1327
1502
  var tmpSearchAddress=tmpMagicComparisonPatternSet[0];// The copmparison expression (EXISTS as default)
1328
1503
  var tmpSearchComparator='EXISTS';if(tmpMagicComparisonPatternSet.length>1){tmpSearchComparator=tmpMagicComparisonPatternSet[1];}// The value to search for
1329
1504
  var tmpSearchValue=false;if(tmpMagicComparisonPatternSet.length>2){tmpSearchValue=tmpMagicComparisonPatternSet[2];}// Process the piece
1330
- tmpKeepRecord=tmpKeepRecord&&testCondition(pManyfest,pRecord,tmpSearchAddress,tmpSearchComparator,tmpSearchValue);tmpStartIndex=pAddress.indexOf(_ConditionalStanzaStart,tmpStopIndex+_ConditionalStanzaEndLength);}else{tmpStartIndex=-1;}}return tmpKeepRecord;};module.exports=parseConditionals;},{"./Manyfest-ObjectAddress-CheckAddressExists.js":72}],78:[function(require,module,exports){/**
1505
+ tmpKeepRecord=tmpKeepRecord&&testCondition(pManyfest,pRecord,tmpSearchAddress,tmpSearchComparator,tmpSearchValue);tmpStartIndex=pAddress.indexOf(_ConditionalStanzaStart,tmpStopIndex+_ConditionalStanzaEndLength);}else{tmpStartIndex=-1;}}return tmpKeepRecord;};module.exports=parseConditionals;},{}],79:[function(require,module,exports){/**
1331
1506
  * @author <steven@velozo.com>
1332
1507
  */var libSimpleLog=require('./Manyfest-LogToConsole.js');/**
1333
1508
  * Schema Manipulation Functions
@@ -1360,7 +1535,7 @@ if(tmpOldDescriptorAddress){tmpDescriptor=pManyfestSchemaDescriptors[tmpOldDescr
1360
1535
  tmpDescriptor={Hash:pInputAddress};}// Now re-add the descriptor to the manyfest schema
1361
1536
  pManyfestSchemaDescriptors[tmpNewDescriptorAddress]=tmpDescriptor;});return true;}},{key:"safeResolveAddressMappings",value:function safeResolveAddressMappings(pManyfestSchemaDescriptors,pAddressMapping){// This returns the descriptors as a new object, safely remapping without mutating the original schema Descriptors
1362
1537
  var tmpManyfestSchemaDescriptors=JSON.parse(JSON.stringify(pManyfestSchemaDescriptors));this.resolveAddressMappings(tmpManyfestSchemaDescriptors,pAddressMapping);return tmpManyfestSchemaDescriptors;}},{key:"mergeAddressMappings",value:function mergeAddressMappings(pManyfestSchemaDescriptorsDestination,pManyfestSchemaDescriptorsSource){if(_typeof(pManyfestSchemaDescriptorsSource)!='object'||_typeof(pManyfestSchemaDescriptorsDestination)!='object'){this.logError("Attempted to merge two schema descriptors but both were not objects.");return false;}var tmpSource=JSON.parse(JSON.stringify(pManyfestSchemaDescriptorsSource));var tmpNewManyfestSchemaDescriptors=JSON.parse(JSON.stringify(pManyfestSchemaDescriptorsDestination));// The first passed-in set of descriptors takes precedence.
1363
- var tmpDescriptorAddresses=Object.keys(tmpSource);tmpDescriptorAddresses.forEach(function(pDescriptorAddress){if(!tmpNewManyfestSchemaDescriptors.hasOwnProperty(pDescriptorAddress)){tmpNewManyfestSchemaDescriptors[pDescriptorAddress]=tmpSource[pDescriptorAddress];}});return tmpNewManyfestSchemaDescriptors;}}]);return ManyfestSchemaManipulation;}();module.exports=ManyfestSchemaManipulation;},{"./Manyfest-LogToConsole.js":71}],79:[function(require,module,exports){/**
1538
+ var tmpDescriptorAddresses=Object.keys(tmpSource);tmpDescriptorAddresses.forEach(function(pDescriptorAddress){if(!tmpNewManyfestSchemaDescriptors.hasOwnProperty(pDescriptorAddress)){tmpNewManyfestSchemaDescriptors[pDescriptorAddress]=tmpSource[pDescriptorAddress];}});return tmpNewManyfestSchemaDescriptors;}}]);return ManyfestSchemaManipulation;}();module.exports=ManyfestSchemaManipulation;},{"./Manyfest-LogToConsole.js":71}],80:[function(require,module,exports){/**
1364
1539
  * @author <steven@velozo.com>
1365
1540
  */var libFableServiceProviderBase=require('fable-serviceproviderbase');var libSimpleLog=require('./Manyfest-LogToConsole.js');var libHashTranslation=require('./Manyfest-HashTranslation.js');var libObjectAddressCheckAddressExists=require('./Manyfest-ObjectAddress-CheckAddressExists.js');var libObjectAddressGetValue=require('./Manyfest-ObjectAddress-GetValue.js');var libObjectAddressSetValue=require('./Manyfest-ObjectAddress-SetValue.js');var libObjectAddressDeleteValue=require('./Manyfest-ObjectAddress-DeleteValue.js');var libObjectAddressGeneration=require('./Manyfest-ObjectAddressGeneration.js');var libSchemaManipulation=require('./Manyfest-SchemaManipulation.js');var _DefaultConfiguration={Scope:'DEFAULT',Descriptors:{}};/**
1366
1541
  * Manyfest object address-based descriptions and manipulations.
@@ -1376,7 +1551,7 @@ var tmpNewOptions=JSON.parse(JSON.stringify(this.options));var tmpNewManyfest=ne
1376
1551
  tmpNewManyfest.hashTranslations.addTranslation(this.hashTranslations.translationTable);return tmpNewManyfest;}// Deserialize a Manifest from a string
1377
1552
  },{key:"deserialize",value:function deserialize(pManifestString){// TODO: Add guards for bad manifest string
1378
1553
  return this.loadManifest(JSON.parse(pManifestString));}// Load a manifest from an object
1379
- },{key:"loadManifest",value:function loadManifest(pManifest){if(_typeof(pManifest)!=='object'){this.logError("(".concat(this.scope,") Error loading manifest; expecting an object but parameter was type ").concat(_typeof(pManifest),"."));}var tmpManifest=_typeof(pManifest)=='object'?pManifest:{};var tmpDescriptorKeys=Object.keys(_DefaultConfiguration);for(var i=0;i<tmpDescriptorKeys.length;i++){if(!tmpManifest.hasOwnProperty(tmpDescriptorKeys[i])){tmpManifest[tmpDescriptorKeys[i]]=JSON.parse(JSON.stringify(_DefaultConfiguration[tmpDescriptorKeys[i]]));}}if(tmpManifest.hasOwnProperty('Scope')){if(typeof tmpManifest.Scope==='string'){this.scope=tmpManifest.Scope;}else{this.logError("(".concat(this.scope,") Error loading scope from manifest; expecting a string but property was type ").concat(_typeof(tmpManifest.Scope),"."),tmpManifest);}}else{this.logError("(".concat(this.scope,") Error loading scope from manifest object. Property \"Scope\" does not exist in the root of the object."),tmpManifest);}if(tmpManifest.hasOwnProperty('Descriptors')){if(_typeof(tmpManifest.Descriptors)==='object'){var tmpDescriptionAddresses=Object.keys(tmpManifest.Descriptors);for(var _i8=0;_i8<tmpDescriptionAddresses.length;_i8++){this.addDescriptor(tmpDescriptionAddresses[_i8],tmpManifest.Descriptors[tmpDescriptionAddresses[_i8]]);}}else{this.logError("(".concat(this.scope,") Error loading description object from manifest object. Expecting an object in 'Manifest.Descriptors' but the property was type ").concat(_typeof(tmpManifest.Descriptors),"."),tmpManifest);}}else{this.logError("(".concat(this.scope,") Error loading object description from manifest object. Property \"Descriptors\" does not exist in the root of the Manifest object."),tmpManifest);}if(tmpManifest.hasOwnProperty('HashTranslations')){if(_typeof(tmpManifest.HashTranslations)==='object'){for(var _i9=0;_i9<tmpManifest.HashTranslations.length;_i9++){// Each translation is
1554
+ },{key:"loadManifest",value:function loadManifest(pManifest){if(_typeof(pManifest)!=='object'){this.logError("(".concat(this.scope,") Error loading manifest; expecting an object but parameter was type ").concat(_typeof(pManifest),"."));}var tmpManifest=_typeof(pManifest)=='object'?pManifest:{};var tmpDescriptorKeys=Object.keys(_DefaultConfiguration);for(var i=0;i<tmpDescriptorKeys.length;i++){if(!tmpManifest.hasOwnProperty(tmpDescriptorKeys[i])){tmpManifest[tmpDescriptorKeys[i]]=JSON.parse(JSON.stringify(_DefaultConfiguration[tmpDescriptorKeys[i]]));}}if(tmpManifest.hasOwnProperty('Scope')){if(typeof tmpManifest.Scope==='string'){this.scope=tmpManifest.Scope;}else{this.logError("(".concat(this.scope,") Error loading scope from manifest; expecting a string but property was type ").concat(_typeof(tmpManifest.Scope),"."),tmpManifest);}}else{this.logError("(".concat(this.scope,") Error loading scope from manifest object. Property \"Scope\" does not exist in the root of the object."),tmpManifest);}if(tmpManifest.hasOwnProperty('Descriptors')){if(_typeof(tmpManifest.Descriptors)==='object'){var tmpDescriptionAddresses=Object.keys(tmpManifest.Descriptors);for(var _i10=0;_i10<tmpDescriptionAddresses.length;_i10++){this.addDescriptor(tmpDescriptionAddresses[_i10],tmpManifest.Descriptors[tmpDescriptionAddresses[_i10]]);}}else{this.logError("(".concat(this.scope,") Error loading description object from manifest object. Expecting an object in 'Manifest.Descriptors' but the property was type ").concat(_typeof(tmpManifest.Descriptors),"."),tmpManifest);}}else{this.logError("(".concat(this.scope,") Error loading object description from manifest object. Property \"Descriptors\" does not exist in the root of the Manifest object."),tmpManifest);}if(tmpManifest.hasOwnProperty('HashTranslations')){if(_typeof(tmpManifest.HashTranslations)==='object'){for(var _i11=0;_i11<tmpManifest.HashTranslations.length;_i11++){// Each translation is
1380
1555
  }}}}// Serialize the Manifest to a string
1381
1556
  },{key:"serialize",value:function serialize(){return JSON.stringify(this.getManifest());}},{key:"getManifest",value:function getManifest(){return{Scope:this.scope,Descriptors:JSON.parse(JSON.stringify(this.elementDescriptors)),HashTranslations:JSON.parse(JSON.stringify(this.hashTranslations.translationTable))};}// Add a descriptor to the manifest
1382
1557
  },{key:"addDescriptor",value:function addDescriptor(pAddress,pDescriptor){if(_typeof(pDescriptor)==='object'){// Add the Address into the Descriptor if it doesn't exist:
@@ -1425,7 +1600,7 @@ var tmpOverwriteProperties=typeof pOverwriteProperties=='undefined'?false:pOverw
1425
1600
  // The default filter function just returns true, populating everything.
1426
1601
  var tmpFilterFunction=typeof fFilter=='function'?fFilter:function(pDescriptor){return true;};this.elementAddresses.forEach(function(pAddress){var tmpDescriptor=_this16.getDescriptor(pAddress);// Check the filter function to see if this is an address we want to set the value for.
1427
1602
  if(tmpFilterFunction(tmpDescriptor)){// If we are overwriting properties OR the property does not exist
1428
- if(tmpOverwriteProperties||!_this16.checkAddressExists(tmpObject,pAddress)){_this16.setValueAtAddress(tmpObject,pAddress,_this16.getDefaultValue(tmpDescriptor));}}});return tmpObject;}}]);return Manyfest;}(libFableServiceProviderBase);;module.exports=Manyfest;},{"./Manyfest-HashTranslation.js":70,"./Manyfest-LogToConsole.js":71,"./Manyfest-ObjectAddress-CheckAddressExists.js":72,"./Manyfest-ObjectAddress-DeleteValue.js":73,"./Manyfest-ObjectAddress-GetValue.js":74,"./Manyfest-ObjectAddress-SetValue.js":75,"./Manyfest-ObjectAddressGeneration.js":76,"./Manyfest-SchemaManipulation.js":78,"fable-serviceproviderbase":51}],80:[function(require,module,exports){(function(global){(function(){var hasMap=typeof Map==='function'&&Map.prototype;var mapSizeDescriptor=Object.getOwnPropertyDescriptor&&hasMap?Object.getOwnPropertyDescriptor(Map.prototype,'size'):null;var mapSize=hasMap&&mapSizeDescriptor&&typeof mapSizeDescriptor.get==='function'?mapSizeDescriptor.get:null;var mapForEach=hasMap&&Map.prototype.forEach;var hasSet=typeof Set==='function'&&Set.prototype;var setSizeDescriptor=Object.getOwnPropertyDescriptor&&hasSet?Object.getOwnPropertyDescriptor(Set.prototype,'size'):null;var setSize=hasSet&&setSizeDescriptor&&typeof setSizeDescriptor.get==='function'?setSizeDescriptor.get:null;var setForEach=hasSet&&Set.prototype.forEach;var hasWeakMap=typeof WeakMap==='function'&&WeakMap.prototype;var weakMapHas=hasWeakMap?WeakMap.prototype.has:null;var hasWeakSet=typeof WeakSet==='function'&&WeakSet.prototype;var weakSetHas=hasWeakSet?WeakSet.prototype.has:null;var hasWeakRef=typeof WeakRef==='function'&&WeakRef.prototype;var weakRefDeref=hasWeakRef?WeakRef.prototype.deref:null;var booleanValueOf=Boolean.prototype.valueOf;var objectToString=Object.prototype.toString;var functionToString=Function.prototype.toString;var $match=String.prototype.match;var $slice=String.prototype.slice;var $replace=String.prototype.replace;var $toUpperCase=String.prototype.toUpperCase;var $toLowerCase=String.prototype.toLowerCase;var $test=RegExp.prototype.test;var $concat=Array.prototype.concat;var $join=Array.prototype.join;var $arrSlice=Array.prototype.slice;var $floor=Math.floor;var bigIntValueOf=typeof BigInt==='function'?BigInt.prototype.valueOf:null;var gOPS=Object.getOwnPropertySymbols;var symToString=typeof Symbol==='function'&&_typeof(Symbol.iterator)==='symbol'?Symbol.prototype.toString:null;var hasShammedSymbols=typeof Symbol==='function'&&_typeof(Symbol.iterator)==='object';// ie, `has-tostringtag/shams
1603
+ if(tmpOverwriteProperties||!_this16.checkAddressExists(tmpObject,pAddress)){_this16.setValueAtAddress(tmpObject,pAddress,_this16.getDefaultValue(tmpDescriptor));}}});return tmpObject;}}]);return Manyfest;}(libFableServiceProviderBase);;module.exports=Manyfest;},{"./Manyfest-HashTranslation.js":70,"./Manyfest-LogToConsole.js":71,"./Manyfest-ObjectAddress-CheckAddressExists.js":72,"./Manyfest-ObjectAddress-DeleteValue.js":73,"./Manyfest-ObjectAddress-GetValue.js":74,"./Manyfest-ObjectAddress-SetValue.js":76,"./Manyfest-ObjectAddressGeneration.js":77,"./Manyfest-SchemaManipulation.js":79,"fable-serviceproviderbase":51}],81:[function(require,module,exports){(function(global){(function(){var hasMap=typeof Map==='function'&&Map.prototype;var mapSizeDescriptor=Object.getOwnPropertyDescriptor&&hasMap?Object.getOwnPropertyDescriptor(Map.prototype,'size'):null;var mapSize=hasMap&&mapSizeDescriptor&&typeof mapSizeDescriptor.get==='function'?mapSizeDescriptor.get:null;var mapForEach=hasMap&&Map.prototype.forEach;var hasSet=typeof Set==='function'&&Set.prototype;var setSizeDescriptor=Object.getOwnPropertyDescriptor&&hasSet?Object.getOwnPropertyDescriptor(Set.prototype,'size'):null;var setSize=hasSet&&setSizeDescriptor&&typeof setSizeDescriptor.get==='function'?setSizeDescriptor.get:null;var setForEach=hasSet&&Set.prototype.forEach;var hasWeakMap=typeof WeakMap==='function'&&WeakMap.prototype;var weakMapHas=hasWeakMap?WeakMap.prototype.has:null;var hasWeakSet=typeof WeakSet==='function'&&WeakSet.prototype;var weakSetHas=hasWeakSet?WeakSet.prototype.has:null;var hasWeakRef=typeof WeakRef==='function'&&WeakRef.prototype;var weakRefDeref=hasWeakRef?WeakRef.prototype.deref:null;var booleanValueOf=Boolean.prototype.valueOf;var objectToString=Object.prototype.toString;var functionToString=Function.prototype.toString;var $match=String.prototype.match;var $slice=String.prototype.slice;var $replace=String.prototype.replace;var $toUpperCase=String.prototype.toUpperCase;var $toLowerCase=String.prototype.toLowerCase;var $test=RegExp.prototype.test;var $concat=Array.prototype.concat;var $join=Array.prototype.join;var $arrSlice=Array.prototype.slice;var $floor=Math.floor;var bigIntValueOf=typeof BigInt==='function'?BigInt.prototype.valueOf:null;var gOPS=Object.getOwnPropertySymbols;var symToString=typeof Symbol==='function'&&_typeof(Symbol.iterator)==='symbol'?Symbol.prototype.toString:null;var hasShammedSymbols=typeof Symbol==='function'&&_typeof(Symbol.iterator)==='object';// ie, `has-tostringtag/shams
1429
1604
  var toStringTag=typeof Symbol==='function'&&Symbol.toStringTag&&(_typeof(Symbol.toStringTag)===hasShammedSymbols?'object':'symbol')?Symbol.toStringTag:null;var isEnumerable=Object.prototype.propertyIsEnumerable;var gPO=(typeof Reflect==='function'?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype// eslint-disable-line no-proto
1430
1605
  ?function(O){return O.__proto__;// eslint-disable-line no-proto
1431
1606
  }:null);function addNumericSeparator(num,str){if(num===Infinity||num===-Infinity||num!==num||num&&num>-1000&&num<1000||$test.call(/e/,str)){return str;}var sepRegex=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof num==='number'){var _int=num<0?-$floor(-num):$floor(num);// trunc(num)
@@ -1442,7 +1617,7 @@ if(!has(obj,key)){continue;}// eslint-disable-line no-restricted-syntax, no-cont
1442
1617
  if(isArr&&String(Number(key))===key&&key<obj.length){continue;}// eslint-disable-line no-restricted-syntax, no-continue
1443
1618
  if(hasShammedSymbols&&symMap['$'+key]instanceof Symbol){// this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
1444
1619
  continue;// eslint-disable-line no-restricted-syntax, no-continue
1445
- }else if($test.call(/[^\w$]/,key)){xs.push(inspect(key,obj)+': '+inspect(obj[key],obj));}else{xs.push(key+': '+inspect(obj[key],obj));}}if(typeof gOPS==='function'){for(var j=0;j<syms.length;j++){if(isEnumerable.call(obj,syms[j])){xs.push('['+inspect(syms[j])+']: '+inspect(obj[syms[j]],obj));}}}return xs;}}).call(this);}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{});},{"./util.inspect":18}],81:[function(require,module,exports){var wrappy=require('wrappy');module.exports=wrappy(once);module.exports.strict=wrappy(onceStrict);once.proto=once(function(){Object.defineProperty(Function.prototype,'once',{value:function value(){return once(this);},configurable:true});Object.defineProperty(Function.prototype,'onceStrict',{value:function value(){return onceStrict(this);},configurable:true});});function once(fn){var f=function f(){if(f.called)return f.value;f.called=true;return f.value=fn.apply(this,arguments);};f.called=false;return f;}function onceStrict(fn){var f=function f(){if(f.called)throw new Error(f.onceError);f.called=true;return f.value=fn.apply(this,arguments);};var name=fn.name||'Function wrapped with `once`';f.onceError=name+" shouldn't be called more than once";f.called=false;return f;}},{"wrappy":124}],82:[function(require,module,exports){(function(process){(function(){// 'path' module extracted from Node.js v8.11.1 (only the posix part)
1620
+ }else if($test.call(/[^\w$]/,key)){xs.push(inspect(key,obj)+': '+inspect(obj[key],obj));}else{xs.push(key+': '+inspect(obj[key],obj));}}if(typeof gOPS==='function'){for(var j=0;j<syms.length;j++){if(isEnumerable.call(obj,syms[j])){xs.push('['+inspect(syms[j])+']: '+inspect(obj[syms[j]],obj));}}}return xs;}}).call(this);}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{});},{"./util.inspect":18}],82:[function(require,module,exports){var wrappy=require('wrappy');module.exports=wrappy(once);module.exports.strict=wrappy(onceStrict);once.proto=once(function(){Object.defineProperty(Function.prototype,'once',{value:function value(){return once(this);},configurable:true});Object.defineProperty(Function.prototype,'onceStrict',{value:function value(){return onceStrict(this);},configurable:true});});function once(fn){var f=function f(){if(f.called)return f.value;f.called=true;return f.value=fn.apply(this,arguments);};f.called=false;return f;}function onceStrict(fn){var f=function f(){if(f.called)throw new Error(f.onceError);f.called=true;return f.value=fn.apply(this,arguments);};var name=fn.name||'Function wrapped with `once`';f.onceError=name+" shouldn't be called more than once";f.called=false;return f;}},{"wrappy":125}],83:[function(require,module,exports){(function(process){(function(){// 'path' module extracted from Node.js v8.11.1 (only the posix part)
1446
1621
  // transplited with Babel
1447
1622
  // Copyright Joyent, Inc. and other Node contributors.
1448
1623
  //
@@ -1524,7 +1699,7 @@ if(startDot===-1)startDot=i;else if(preDotState!==1)preDotState=1;}else if(start
1524
1699
  // have a good chance at having a non-empty extension
1525
1700
  preDotState=-1;}}if(startDot===-1||end===-1||// We saw a non-dot character immediately before the dot
1526
1701
  preDotState===0||// The (right-most) trimmed path component is exactly '..'
1527
- preDotState===1&&startDot===end-1&&startDot===startPart+1){if(end!==-1){if(startPart===0&&isAbsolute)ret.base=ret.name=path.slice(1,end);else ret.base=ret.name=path.slice(startPart,end);}}else{if(startPart===0&&isAbsolute){ret.name=path.slice(1,startDot);ret.base=path.slice(1,end);}else{ret.name=path.slice(startPart,startDot);ret.base=path.slice(startPart,end);}ret.ext=path.slice(startDot,end);}if(startPart>0)ret.dir=path.slice(0,startPart-1);else if(isAbsolute)ret.dir='/';return ret;},sep:'/',delimiter:':',win32:null,posix:null};posix.posix=posix;module.exports=posix;}).call(this);}).call(this,require('_process'));},{"_process":86}],83:[function(require,module,exports){/**
1702
+ preDotState===1&&startDot===end-1&&startDot===startPart+1){if(end!==-1){if(startPart===0&&isAbsolute)ret.base=ret.name=path.slice(1,end);else ret.base=ret.name=path.slice(startPart,end);}}else{if(startPart===0&&isAbsolute){ret.name=path.slice(1,startDot);ret.base=path.slice(1,end);}else{ret.name=path.slice(startPart,startDot);ret.base=path.slice(startPart,end);}ret.ext=path.slice(startDot,end);}if(startPart>0)ret.dir=path.slice(0,startPart-1);else if(isAbsolute)ret.dir='/';return ret;},sep:'/',delimiter:':',win32:null,posix:null};posix.posix=posix;module.exports=posix;}).call(this);}).call(this,require('_process'));},{"_process":87}],84:[function(require,module,exports){/**
1528
1703
  * Precedent Meta-Templating
1529
1704
  *
1530
1705
  * @license MIT
@@ -1547,7 +1722,7 @@ preDotState===1&&startDot===end-1&&startDot===startPart+1){if(end!==-1){if(start
1547
1722
  * @param {string} pString - The string to parse
1548
1723
  * @param {object} pData - Data to pass in as the second argument
1549
1724
  * @return {string} The result from the parser
1550
- */},{key:"parseString",value:function parseString(pString,pData){return this.StringParser.parseString(pString,this.ParseTree,pData);}}]);return Precedent;}();module.exports=Precedent;},{"./StringParser.js":84,"./WordTree.js":85}],84:[function(require,module,exports){/**
1725
+ */},{key:"parseString",value:function parseString(pString,pData){return this.StringParser.parseString(pString,this.ParseTree,pData);}}]);return Precedent;}();module.exports=Precedent;},{"./StringParser.js":85,"./WordTree.js":86}],85:[function(require,module,exports){/**
1551
1726
  * String Parser
1552
1727
  * @author Steven Velozo <steven@velozo.com>
1553
1728
  * @description Parse a string, properly processing each matched token in the word tree.
@@ -1600,7 +1775,7 @@ this.resetOutputBuffer(pParserState);this.appendOutputBuffer(pCharacter,pParserS
1600
1775
  * @param {string} pString - The string to parse.
1601
1776
  * @param {Object} pParseTree - The parse tree to begin parsing from (usually root)
1602
1777
  * @param {Object} pData - The data to pass to the function as a second parameter
1603
- */},{key:"parseString",value:function parseString(pString,pParseTree,pData){var tmpParserState=this.newParserState(pParseTree);for(var i=0;i<pString.length;i++){this.parseCharacter(pString[i],tmpParserState,pData);}this.flushOutputBuffer(tmpParserState);return tmpParserState.Output;}}]);return StringParser;}();module.exports=StringParser;},{}],85:[function(require,module,exports){/**
1778
+ */},{key:"parseString",value:function parseString(pString,pParseTree,pData){var tmpParserState=this.newParserState(pParseTree);for(var i=0;i<pString.length;i++){this.parseCharacter(pString[i],tmpParserState,pData);}this.flushOutputBuffer(tmpParserState);return tmpParserState.Output;}}]);return StringParser;}();module.exports=StringParser;},{}],86:[function(require,module,exports){/**
1604
1779
  * Word Tree
1605
1780
  * @author Steven Velozo <steven@velozo.com>
1606
1781
  * @description Create a tree (directed graph) of Javascript objects, one character per object.
@@ -1627,7 +1802,7 @@ this.resetOutputBuffer(pParserState);this.appendOutputBuffer(pCharacter,pParserS
1627
1802
  * @param {function} fParser - The function to parse if this is the matched pattern, once the Pattern End is met. If this is a string, a simple replacement occurs.
1628
1803
  * @return {bool} True if adding the pattern was successful
1629
1804
  */},{key:"addPattern",value:function addPattern(pPatternStart,pPatternEnd,fParser){if(pPatternStart.length<1){return false;}if(typeof pPatternEnd==='string'&&pPatternEnd.length<1){return false;}var tmpLeaf=this.ParseTree;// Add the tree of leaves iteratively
1630
- for(var i=0;i<pPatternStart.length;i++){tmpLeaf=this.addChild(tmpLeaf,pPatternStart[i],i);}if(!tmpLeaf.hasOwnProperty('PatternEnd')){tmpLeaf.PatternEnd={};}var tmpPatternEnd=typeof pPatternEnd==='string'?pPatternEnd:pPatternStart;for(var _i10=0;_i10<tmpPatternEnd.length;_i10++){tmpLeaf=this.addEndChild(tmpLeaf,tmpPatternEnd[_i10],_i10);}tmpLeaf.PatternStartString=pPatternStart;tmpLeaf.PatternEndString=tmpPatternEnd;tmpLeaf.Parse=typeof fParser==='function'?fParser:typeof fParser==='string'?function(){return fParser;}:function(pData){return pData;};return true;}}]);return WordTree;}();module.exports=WordTree;},{}],86:[function(require,module,exports){// shim for using process in browser
1805
+ for(var i=0;i<pPatternStart.length;i++){tmpLeaf=this.addChild(tmpLeaf,pPatternStart[i],i);}if(!tmpLeaf.hasOwnProperty('PatternEnd')){tmpLeaf.PatternEnd={};}var tmpPatternEnd=typeof pPatternEnd==='string'?pPatternEnd:pPatternStart;for(var _i12=0;_i12<tmpPatternEnd.length;_i12++){tmpLeaf=this.addEndChild(tmpLeaf,tmpPatternEnd[_i12],_i12);}tmpLeaf.PatternStartString=pPatternStart;tmpLeaf.PatternEndString=tmpPatternEnd;tmpLeaf.Parse=typeof fParser==='function'?fParser:typeof fParser==='string'?function(){return fParser;}:function(pData){return pData;};return true;}}]);return WordTree;}();module.exports=WordTree;},{}],87:[function(require,module,exports){// shim for using process in browser
1631
1806
  var process=module.exports={};// cached from whatever global is present so that test runners that stub it
1632
1807
  // don't break things. But we need to wrap it in a try catch in case it is
1633
1808
  // wrapped in strict mode code which doesn't define any globals. It's inside a
@@ -1645,7 +1820,7 @@ return cachedClearTimeout.call(null,marker);}catch(e){// same as above but when
1645
1820
  // Some versions of I.E. have different rules for clearTimeout vs setTimeout
1646
1821
  return cachedClearTimeout.call(this,marker);}}}var queue=[];var draining=false;var currentQueue;var queueIndex=-1;function cleanUpNextTick(){if(!draining||!currentQueue){return;}draining=false;if(currentQueue.length){queue=currentQueue.concat(queue);}else{queueIndex=-1;}if(queue.length){drainQueue();}}function drainQueue(){if(draining){return;}var timeout=runTimeout(cleanUpNextTick);draining=true;var len=queue.length;while(len){currentQueue=queue;queue=[];while(++queueIndex<len){if(currentQueue){currentQueue[queueIndex].run();}}queueIndex=-1;len=queue.length;}currentQueue=null;draining=false;runClearTimeout(timeout);}process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1){for(var i=1;i<arguments.length;i++){args[i-1]=arguments[i];}}queue.push(new Item(fun,args));if(queue.length===1&&!draining){runTimeout(drainQueue);}};// v8 likes predictible objects
1647
1822
  function Item(fun,array){this.fun=fun;this.array=array;}Item.prototype.run=function(){this.fun.apply(null,this.array);};process.title='browser';process.browser=true;process.env={};process.argv=[];process.version='';// empty string to avoid regexp issues
1648
- process.versions={};function noop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.prependListener=noop;process.prependOnceListener=noop;process.listeners=function(name){return[];};process.binding=function(name){throw new Error('process.binding is not supported');};process.cwd=function(){return'/';};process.chdir=function(dir){throw new Error('process.chdir is not supported');};process.umask=function(){return 0;};},{}],87:[function(require,module,exports){(function(global){(function(){/*! https://mths.be/punycode v1.4.1 by @mathias */;(function(root){/** Detect free variables */var freeExports=_typeof(exports)=='object'&&exports&&!exports.nodeType&&exports;var freeModule=_typeof(module)=='object'&&module&&!module.nodeType&&module;var freeGlobal=_typeof(global)=='object'&&global;if(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal||freeGlobal.self===freeGlobal){root=freeGlobal;}/**
1823
+ process.versions={};function noop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.prependListener=noop;process.prependOnceListener=noop;process.listeners=function(name){return[];};process.binding=function(name){throw new Error('process.binding is not supported');};process.cwd=function(){return'/';};process.chdir=function(dir){throw new Error('process.chdir is not supported');};process.umask=function(){return 0;};},{}],88:[function(require,module,exports){(function(global){(function(){/*! https://mths.be/punycode v1.4.1 by @mathias */;(function(root){/** Detect free variables */var freeExports=_typeof(exports)=='object'&&exports&&!exports.nodeType&&exports;var freeModule=_typeof(module)=='object'&&module&&!module.nodeType&&module;var freeGlobal=_typeof(global)=='object'&&global;if(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal||freeGlobal.self===freeGlobal){root=freeGlobal;}/**
1649
1824
  * The `punycode` object.
1650
1825
  * @name punycode
1651
1826
  * @type Object
@@ -1800,7 +1975,7 @@ for/* no condition */(q=delta,k=base;;k+=base){t=k<=bias?tMin:k>=bias+tMax?tMax:
1800
1975
  if(typeof define=='function'&&_typeof(define.amd)=='object'&&define.amd){define('punycode',function(){return punycode;});}else if(freeExports&&freeModule){if(module.exports==freeExports){// in Node.js, io.js, or RingoJS v0.8.0+
1801
1976
  freeModule.exports=punycode;}else{// in Narwhal or RingoJS v0.7.0-
1802
1977
  for(key in punycode){punycode.hasOwnProperty(key)&&(freeExports[key]=punycode[key]);}}}else{// in Rhino or a web browser
1803
- root.punycode=punycode;}})(this);}).call(this);}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{});},{}],88:[function(require,module,exports){'use strict';var replace=String.prototype.replace;var percentTwenties=/%20/g;var Format={RFC1738:'RFC1738',RFC3986:'RFC3986'};module.exports={'default':Format.RFC3986,formatters:{RFC1738:function RFC1738(value){return replace.call(value,percentTwenties,'+');},RFC3986:function RFC3986(value){return String(value);}},RFC1738:Format.RFC1738,RFC3986:Format.RFC3986};},{}],89:[function(require,module,exports){'use strict';var stringify=require('./stringify');var parse=require('./parse');var formats=require('./formats');module.exports={formats:formats,parse:parse,stringify:stringify};},{"./formats":88,"./parse":90,"./stringify":91}],90:[function(require,module,exports){'use strict';var utils=require('./utils');var has=Object.prototype.hasOwnProperty;var isArray=Array.isArray;var defaults={allowDots:false,allowPrototypes:false,allowSparse:false,arrayLimit:20,charset:'utf-8',charsetSentinel:false,comma:false,decoder:utils.decode,delimiter:'&',depth:5,ignoreQueryPrefix:false,interpretNumericEntities:false,parameterLimit:1000,parseArrays:true,plainObjects:false,strictNullHandling:false};var interpretNumericEntities=function interpretNumericEntities(str){return str.replace(/&#(\d+);/g,function($0,numberStr){return String.fromCharCode(parseInt(numberStr,10));});};var parseArrayValue=function parseArrayValue(val,options){if(val&&typeof val==='string'&&options.comma&&val.indexOf(',')>-1){return val.split(',');}return val;};// This is what browsers will submit when the ✓ character occurs in an
1978
+ root.punycode=punycode;}})(this);}).call(this);}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{});},{}],89:[function(require,module,exports){'use strict';var replace=String.prototype.replace;var percentTwenties=/%20/g;var Format={RFC1738:'RFC1738',RFC3986:'RFC3986'};module.exports={'default':Format.RFC3986,formatters:{RFC1738:function RFC1738(value){return replace.call(value,percentTwenties,'+');},RFC3986:function RFC3986(value){return String(value);}},RFC1738:Format.RFC1738,RFC3986:Format.RFC3986};},{}],90:[function(require,module,exports){'use strict';var stringify=require('./stringify');var parse=require('./parse');var formats=require('./formats');module.exports={formats:formats,parse:parse,stringify:stringify};},{"./formats":89,"./parse":91,"./stringify":92}],91:[function(require,module,exports){'use strict';var utils=require('./utils');var has=Object.prototype.hasOwnProperty;var isArray=Array.isArray;var defaults={allowDots:false,allowPrototypes:false,allowSparse:false,arrayLimit:20,charset:'utf-8',charsetSentinel:false,comma:false,decoder:utils.decode,delimiter:'&',depth:5,ignoreQueryPrefix:false,interpretNumericEntities:false,parameterLimit:1000,parseArrays:true,plainObjects:false,strictNullHandling:false};var interpretNumericEntities=function interpretNumericEntities(str){return str.replace(/&#(\d+);/g,function($0,numberStr){return String.fromCharCode(parseInt(numberStr,10));});};var parseArrayValue=function parseArrayValue(val,options){if(val&&typeof val==='string'&&options.comma&&val.indexOf(',')>-1){return val.split(',');}return val;};// This is what browsers will submit when the ✓ character occurs in an
1804
1979
  // application/x-www-form-urlencoded body and the encoding of the page containing
1805
1980
  // the form is iso-8859-1, or when the submitted form has an accept-charset
1806
1981
  // attribute of iso-8859-1. Presumably also with other charsets that do not contain
@@ -1819,13 +1994,13 @@ if(!options.plainObjects&&has.call(Object.prototype,parent)){if(!options.allowPr
1819
1994
  var i=0;while(options.depth>0&&(segment=child.exec(key))!==null&&i<options.depth){i+=1;if(!options.plainObjects&&has.call(Object.prototype,segment[1].slice(1,-1))){if(!options.allowPrototypes){return;}}keys.push(segment[1]);}// If there's a remainder, just add whatever is left
1820
1995
  if(segment){keys.push('['+key.slice(segment.index)+']');}return parseObject(keys,val,options,valuesParsed);};var normalizeParseOptions=function normalizeParseOptions(opts){if(!opts){return defaults;}if(opts.decoder!==null&&opts.decoder!==undefined&&typeof opts.decoder!=='function'){throw new TypeError('Decoder has to be a function.');}if(typeof opts.charset!=='undefined'&&opts.charset!=='utf-8'&&opts.charset!=='iso-8859-1'){throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');}var charset=typeof opts.charset==='undefined'?defaults.charset:opts.charset;return{allowDots:typeof opts.allowDots==='undefined'?defaults.allowDots:!!opts.allowDots,allowPrototypes:typeof opts.allowPrototypes==='boolean'?opts.allowPrototypes:defaults.allowPrototypes,allowSparse:typeof opts.allowSparse==='boolean'?opts.allowSparse:defaults.allowSparse,arrayLimit:typeof opts.arrayLimit==='number'?opts.arrayLimit:defaults.arrayLimit,charset:charset,charsetSentinel:typeof opts.charsetSentinel==='boolean'?opts.charsetSentinel:defaults.charsetSentinel,comma:typeof opts.comma==='boolean'?opts.comma:defaults.comma,decoder:typeof opts.decoder==='function'?opts.decoder:defaults.decoder,delimiter:typeof opts.delimiter==='string'||utils.isRegExp(opts.delimiter)?opts.delimiter:defaults.delimiter,// eslint-disable-next-line no-implicit-coercion, no-extra-parens
1821
1996
  depth:typeof opts.depth==='number'||opts.depth===false?+opts.depth:defaults.depth,ignoreQueryPrefix:opts.ignoreQueryPrefix===true,interpretNumericEntities:typeof opts.interpretNumericEntities==='boolean'?opts.interpretNumericEntities:defaults.interpretNumericEntities,parameterLimit:typeof opts.parameterLimit==='number'?opts.parameterLimit:defaults.parameterLimit,parseArrays:opts.parseArrays!==false,plainObjects:typeof opts.plainObjects==='boolean'?opts.plainObjects:defaults.plainObjects,strictNullHandling:typeof opts.strictNullHandling==='boolean'?opts.strictNullHandling:defaults.strictNullHandling};};module.exports=function(str,opts){var options=normalizeParseOptions(opts);if(str===''||str===null||typeof str==='undefined'){return options.plainObjects?Object.create(null):{};}var tempObj=typeof str==='string'?parseValues(str,options):str;var obj=options.plainObjects?Object.create(null):{};// Iterate over the keys and setup the new object
1822
- var keys=Object.keys(tempObj);for(var i=0;i<keys.length;++i){var key=keys[i];var newObj=parseKeys(key,tempObj[key],options,typeof str==='string');obj=utils.merge(obj,newObj,options);}if(options.allowSparse===true){return obj;}return utils.compact(obj);};},{"./utils":92}],91:[function(require,module,exports){'use strict';var getSideChannel=require('side-channel');var utils=require('./utils');var formats=require('./formats');var has=Object.prototype.hasOwnProperty;var arrayPrefixGenerators={brackets:function brackets(prefix){return prefix+'[]';},comma:'comma',indices:function indices(prefix,key){return prefix+'['+key+']';},repeat:function repeat(prefix){return prefix;}};var isArray=Array.isArray;var push=Array.prototype.push;var pushToArray=function pushToArray(arr,valueOrArray){push.apply(arr,isArray(valueOrArray)?valueOrArray:[valueOrArray]);};var toISO=Date.prototype.toISOString;var defaultFormat=formats['default'];var defaults={addQueryPrefix:false,allowDots:false,charset:'utf-8',charsetSentinel:false,delimiter:'&',encode:true,encoder:utils.encode,encodeValuesOnly:false,format:defaultFormat,formatter:formats.formatters[defaultFormat],// deprecated
1997
+ var keys=Object.keys(tempObj);for(var i=0;i<keys.length;++i){var key=keys[i];var newObj=parseKeys(key,tempObj[key],options,typeof str==='string');obj=utils.merge(obj,newObj,options);}if(options.allowSparse===true){return obj;}return utils.compact(obj);};},{"./utils":93}],92:[function(require,module,exports){'use strict';var getSideChannel=require('side-channel');var utils=require('./utils');var formats=require('./formats');var has=Object.prototype.hasOwnProperty;var arrayPrefixGenerators={brackets:function brackets(prefix){return prefix+'[]';},comma:'comma',indices:function indices(prefix,key){return prefix+'['+key+']';},repeat:function repeat(prefix){return prefix;}};var isArray=Array.isArray;var push=Array.prototype.push;var pushToArray=function pushToArray(arr,valueOrArray){push.apply(arr,isArray(valueOrArray)?valueOrArray:[valueOrArray]);};var toISO=Date.prototype.toISOString;var defaultFormat=formats['default'];var defaults={addQueryPrefix:false,allowDots:false,charset:'utf-8',charsetSentinel:false,delimiter:'&',encode:true,encoder:utils.encode,encodeValuesOnly:false,format:defaultFormat,formatter:formats.formatters[defaultFormat],// deprecated
1823
1998
  indices:false,serializeDate:function serializeDate(date){return toISO.call(date);},skipNulls:false,strictNullHandling:false};var isNonNullishPrimitive=function isNonNullishPrimitive(v){return typeof v==='string'||typeof v==='number'||typeof v==='boolean'||_typeof(v)==='symbol'||typeof v==='bigint';};var sentinel={};var stringify=function stringify(object,prefix,generateArrayPrefix,commaRoundTrip,strictNullHandling,skipNulls,encoder,filter,sort,allowDots,serializeDate,format,formatter,encodeValuesOnly,charset,sideChannel){var obj=object;var tmpSc=sideChannel;var step=0;var findFlag=false;while((tmpSc=tmpSc.get(sentinel))!==void undefined&&!findFlag){// Where object last appeared in the ref tree
1824
1999
  var pos=tmpSc.get(object);step+=1;if(typeof pos!=='undefined'){if(pos===step){throw new RangeError('Cyclic object value');}else{findFlag=true;// Break while
1825
2000
  }}if(typeof tmpSc.get(sentinel)==='undefined'){step=0;}}if(typeof filter==='function'){obj=filter(prefix,obj);}else if(obj instanceof Date){obj=serializeDate(obj);}else if(generateArrayPrefix==='comma'&&isArray(obj)){obj=utils.maybeMap(obj,function(value){if(value instanceof Date){return serializeDate(value);}return value;});}if(obj===null){if(strictNullHandling){return encoder&&!encodeValuesOnly?encoder(prefix,defaults.encoder,charset,'key',format):prefix;}obj='';}if(isNonNullishPrimitive(obj)||utils.isBuffer(obj)){if(encoder){var keyValue=encodeValuesOnly?prefix:encoder(prefix,defaults.encoder,charset,'key',format);return[formatter(keyValue)+'='+formatter(encoder(obj,defaults.encoder,charset,'value',format))];}return[formatter(prefix)+'='+formatter(String(obj))];}var values=[];if(typeof obj==='undefined'){return values;}var objKeys;if(generateArrayPrefix==='comma'&&isArray(obj)){// we need to join elements in
1826
2001
  if(encodeValuesOnly&&encoder){obj=utils.maybeMap(obj,encoder);}objKeys=[{value:obj.length>0?obj.join(',')||null:void undefined}];}else if(isArray(filter)){objKeys=filter;}else{var keys=Object.keys(obj);objKeys=sort?keys.sort(sort):keys;}var adjustedPrefix=commaRoundTrip&&isArray(obj)&&obj.length===1?prefix+'[]':prefix;for(var j=0;j<objKeys.length;++j){var key=objKeys[j];var value=_typeof(key)==='object'&&typeof key.value!=='undefined'?key.value:obj[key];if(skipNulls&&value===null){continue;}var keyPrefix=isArray(obj)?typeof generateArrayPrefix==='function'?generateArrayPrefix(adjustedPrefix,key):adjustedPrefix:adjustedPrefix+(allowDots?'.'+key:'['+key+']');sideChannel.set(object,step);var valueSideChannel=getSideChannel();valueSideChannel.set(sentinel,sideChannel);pushToArray(values,stringify(value,keyPrefix,generateArrayPrefix,commaRoundTrip,strictNullHandling,skipNulls,generateArrayPrefix==='comma'&&encodeValuesOnly&&isArray(obj)?null:encoder,filter,sort,allowDots,serializeDate,format,formatter,encodeValuesOnly,charset,valueSideChannel));}return values;};var normalizeStringifyOptions=function normalizeStringifyOptions(opts){if(!opts){return defaults;}if(opts.encoder!==null&&typeof opts.encoder!=='undefined'&&typeof opts.encoder!=='function'){throw new TypeError('Encoder has to be a function.');}var charset=opts.charset||defaults.charset;if(typeof opts.charset!=='undefined'&&opts.charset!=='utf-8'&&opts.charset!=='iso-8859-1'){throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');}var format=formats['default'];if(typeof opts.format!=='undefined'){if(!has.call(formats.formatters,opts.format)){throw new TypeError('Unknown format option provided.');}format=opts.format;}var formatter=formats.formatters[format];var filter=defaults.filter;if(typeof opts.filter==='function'||isArray(opts.filter)){filter=opts.filter;}return{addQueryPrefix:typeof opts.addQueryPrefix==='boolean'?opts.addQueryPrefix:defaults.addQueryPrefix,allowDots:typeof opts.allowDots==='undefined'?defaults.allowDots:!!opts.allowDots,charset:charset,charsetSentinel:typeof opts.charsetSentinel==='boolean'?opts.charsetSentinel:defaults.charsetSentinel,delimiter:typeof opts.delimiter==='undefined'?defaults.delimiter:opts.delimiter,encode:typeof opts.encode==='boolean'?opts.encode:defaults.encode,encoder:typeof opts.encoder==='function'?opts.encoder:defaults.encoder,encodeValuesOnly:typeof opts.encodeValuesOnly==='boolean'?opts.encodeValuesOnly:defaults.encodeValuesOnly,filter:filter,format:format,formatter:formatter,serializeDate:typeof opts.serializeDate==='function'?opts.serializeDate:defaults.serializeDate,skipNulls:typeof opts.skipNulls==='boolean'?opts.skipNulls:defaults.skipNulls,sort:typeof opts.sort==='function'?opts.sort:null,strictNullHandling:typeof opts.strictNullHandling==='boolean'?opts.strictNullHandling:defaults.strictNullHandling};};module.exports=function(object,opts){var obj=object;var options=normalizeStringifyOptions(opts);var objKeys;var filter;if(typeof options.filter==='function'){filter=options.filter;obj=filter('',obj);}else if(isArray(options.filter)){filter=options.filter;objKeys=filter;}var keys=[];if(_typeof(obj)!=='object'||obj===null){return'';}var arrayFormat;if(opts&&opts.arrayFormat in arrayPrefixGenerators){arrayFormat=opts.arrayFormat;}else if(opts&&'indices'in opts){arrayFormat=opts.indices?'indices':'repeat';}else{arrayFormat='indices';}var generateArrayPrefix=arrayPrefixGenerators[arrayFormat];if(opts&&'commaRoundTrip'in opts&&typeof opts.commaRoundTrip!=='boolean'){throw new TypeError('`commaRoundTrip` must be a boolean, or absent');}var commaRoundTrip=generateArrayPrefix==='comma'&&opts&&opts.commaRoundTrip;if(!objKeys){objKeys=Object.keys(obj);}if(options.sort){objKeys.sort(options.sort);}var sideChannel=getSideChannel();for(var i=0;i<objKeys.length;++i){var key=objKeys[i];if(options.skipNulls&&obj[key]===null){continue;}pushToArray(keys,stringify(obj[key],key,generateArrayPrefix,commaRoundTrip,options.strictNullHandling,options.skipNulls,options.encode?options.encoder:null,options.filter,options.sort,options.allowDots,options.serializeDate,options.format,options.formatter,options.encodeValuesOnly,options.charset,sideChannel));}var joined=keys.join(options.delimiter);var prefix=options.addQueryPrefix===true?'?':'';if(options.charsetSentinel){if(options.charset==='iso-8859-1'){// encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
1827
2002
  prefix+='utf8=%26%2310003%3B&';}else{// encodeURIComponent('✓')
1828
- prefix+='utf8=%E2%9C%93&';}}return joined.length>0?prefix+joined:'';};},{"./formats":88,"./utils":92,"side-channel":98}],92:[function(require,module,exports){'use strict';var formats=require('./formats');var has=Object.prototype.hasOwnProperty;var isArray=Array.isArray;var hexTable=function(){var array=[];for(var i=0;i<256;++i){array.push('%'+((i<16?'0':'')+i.toString(16)).toUpperCase());}return array;}();var compactQueue=function compactQueue(queue){while(queue.length>1){var item=queue.pop();var obj=item.obj[item.prop];if(isArray(obj)){var compacted=[];for(var j=0;j<obj.length;++j){if(typeof obj[j]!=='undefined'){compacted.push(obj[j]);}}item.obj[item.prop]=compacted;}}};var arrayToObject=function arrayToObject(source,options){var obj=options&&options.plainObjects?Object.create(null):{};for(var i=0;i<source.length;++i){if(typeof source[i]!=='undefined'){obj[i]=source[i];}}return obj;};var merge=function merge(target,source,options){/* eslint no-param-reassign: 0 */if(!source){return target;}if(_typeof(source)!=='object'){if(isArray(target)){target.push(source);}else if(target&&_typeof(target)==='object'){if(options&&(options.plainObjects||options.allowPrototypes)||!has.call(Object.prototype,source)){target[source]=true;}}else{return[target,source];}return target;}if(!target||_typeof(target)!=='object'){return[target].concat(source);}var mergeTarget=target;if(isArray(target)&&!isArray(source)){mergeTarget=arrayToObject(target,options);}if(isArray(target)&&isArray(source)){source.forEach(function(item,i){if(has.call(target,i)){var targetItem=target[i];if(targetItem&&_typeof(targetItem)==='object'&&item&&_typeof(item)==='object'){target[i]=merge(targetItem,item,options);}else{target.push(item);}}else{target[i]=item;}});return target;}return Object.keys(source).reduce(function(acc,key){var value=source[key];if(has.call(acc,key)){acc[key]=merge(acc[key],value,options);}else{acc[key]=value;}return acc;},mergeTarget);};var assign=function assignSingleSource(target,source){return Object.keys(source).reduce(function(acc,key){acc[key]=source[key];return acc;},target);};var decode=function decode(str,decoder,charset){var strWithoutPlus=str.replace(/\+/g,' ');if(charset==='iso-8859-1'){// unescape never throws, no try...catch needed:
2003
+ prefix+='utf8=%E2%9C%93&';}}return joined.length>0?prefix+joined:'';};},{"./formats":89,"./utils":93,"side-channel":99}],93:[function(require,module,exports){'use strict';var formats=require('./formats');var has=Object.prototype.hasOwnProperty;var isArray=Array.isArray;var hexTable=function(){var array=[];for(var i=0;i<256;++i){array.push('%'+((i<16?'0':'')+i.toString(16)).toUpperCase());}return array;}();var compactQueue=function compactQueue(queue){while(queue.length>1){var item=queue.pop();var obj=item.obj[item.prop];if(isArray(obj)){var compacted=[];for(var j=0;j<obj.length;++j){if(typeof obj[j]!=='undefined'){compacted.push(obj[j]);}}item.obj[item.prop]=compacted;}}};var arrayToObject=function arrayToObject(source,options){var obj=options&&options.plainObjects?Object.create(null):{};for(var i=0;i<source.length;++i){if(typeof source[i]!=='undefined'){obj[i]=source[i];}}return obj;};var merge=function merge(target,source,options){/* eslint no-param-reassign: 0 */if(!source){return target;}if(_typeof(source)!=='object'){if(isArray(target)){target.push(source);}else if(target&&_typeof(target)==='object'){if(options&&(options.plainObjects||options.allowPrototypes)||!has.call(Object.prototype,source)){target[source]=true;}}else{return[target,source];}return target;}if(!target||_typeof(target)!=='object'){return[target].concat(source);}var mergeTarget=target;if(isArray(target)&&!isArray(source)){mergeTarget=arrayToObject(target,options);}if(isArray(target)&&isArray(source)){source.forEach(function(item,i){if(has.call(target,i)){var targetItem=target[i];if(targetItem&&_typeof(targetItem)==='object'&&item&&_typeof(item)==='object'){target[i]=merge(targetItem,item,options);}else{target.push(item);}}else{target[i]=item;}});return target;}return Object.keys(source).reduce(function(acc,key){var value=source[key];if(has.call(acc,key)){acc[key]=merge(acc[key],value,options);}else{acc[key]=value;}return acc;},mergeTarget);};var assign=function assignSingleSource(target,source){return Object.keys(source).reduce(function(acc,key){acc[key]=source[key];return acc;},target);};var decode=function decode(str,decoder,charset){var strWithoutPlus=str.replace(/\+/g,' ');if(charset==='iso-8859-1'){// unescape never throws, no try...catch needed:
1829
2004
  return strWithoutPlus.replace(/%[0-9a-f]{2}/gi,unescape);}// utf-8
1830
2005
  try{return decodeURIComponent(strWithoutPlus);}catch(e){return strWithoutPlus;}};var encode=function encode(str,defaultEncoder,charset,kind,format){// This code was originally written by Brian White (mscdex) for the io.js core querystring library.
1831
2006
  // It has been adapted here for stricter adherence to RFC 3986
@@ -1837,7 +2012,7 @@ if(str.length===0){return str;}var string=str;if(_typeof(str)==='symbol'){string
1837
2012
  ||c>=0x41&&c<=0x5A// a-z
1838
2013
  ||c>=0x61&&c<=0x7A// A-Z
1839
2014
  ||format===formats.RFC1738&&(c===0x28||c===0x29)// ( )
1840
- ){out+=string.charAt(i);continue;}if(c<0x80){out=out+hexTable[c];continue;}if(c<0x800){out=out+(hexTable[0xC0|c>>6]+hexTable[0x80|c&0x3F]);continue;}if(c<0xD800||c>=0xE000){out=out+(hexTable[0xE0|c>>12]+hexTable[0x80|c>>6&0x3F]+hexTable[0x80|c&0x3F]);continue;}i+=1;c=0x10000+((c&0x3FF)<<10|string.charCodeAt(i)&0x3FF);/* eslint operator-linebreak: [2, "before"] */out+=hexTable[0xF0|c>>18]+hexTable[0x80|c>>12&0x3F]+hexTable[0x80|c>>6&0x3F]+hexTable[0x80|c&0x3F];}return out;};var compact=function compact(value){var queue=[{obj:{o:value},prop:'o'}];var refs=[];for(var i=0;i<queue.length;++i){var item=queue[i];var obj=item.obj[item.prop];var keys=Object.keys(obj);for(var j=0;j<keys.length;++j){var key=keys[j];var val=obj[key];if(_typeof(val)==='object'&&val!==null&&refs.indexOf(val)===-1){queue.push({obj:obj,prop:key});refs.push(val);}}}compactQueue(queue);return value;};var isRegExp=function isRegExp(obj){return Object.prototype.toString.call(obj)==='[object RegExp]';};var isBuffer=function isBuffer(obj){if(!obj||_typeof(obj)!=='object'){return false;}return!!(obj.constructor&&obj.constructor.isBuffer&&obj.constructor.isBuffer(obj));};var combine=function combine(a,b){return[].concat(a,b);};var maybeMap=function maybeMap(val,fn){if(isArray(val)){var mapped=[];for(var i=0;i<val.length;i+=1){mapped.push(fn(val[i]));}return mapped;}return fn(val);};module.exports={arrayToObject:arrayToObject,assign:assign,combine:combine,compact:compact,decode:decode,encode:encode,isBuffer:isBuffer,isRegExp:isRegExp,maybeMap:maybeMap,merge:merge};},{"./formats":88}],93:[function(require,module,exports){// Copyright Joyent, Inc. and other Node contributors.
2015
+ ){out+=string.charAt(i);continue;}if(c<0x80){out=out+hexTable[c];continue;}if(c<0x800){out=out+(hexTable[0xC0|c>>6]+hexTable[0x80|c&0x3F]);continue;}if(c<0xD800||c>=0xE000){out=out+(hexTable[0xE0|c>>12]+hexTable[0x80|c>>6&0x3F]+hexTable[0x80|c&0x3F]);continue;}i+=1;c=0x10000+((c&0x3FF)<<10|string.charCodeAt(i)&0x3FF);/* eslint operator-linebreak: [2, "before"] */out+=hexTable[0xF0|c>>18]+hexTable[0x80|c>>12&0x3F]+hexTable[0x80|c>>6&0x3F]+hexTable[0x80|c&0x3F];}return out;};var compact=function compact(value){var queue=[{obj:{o:value},prop:'o'}];var refs=[];for(var i=0;i<queue.length;++i){var item=queue[i];var obj=item.obj[item.prop];var keys=Object.keys(obj);for(var j=0;j<keys.length;++j){var key=keys[j];var val=obj[key];if(_typeof(val)==='object'&&val!==null&&refs.indexOf(val)===-1){queue.push({obj:obj,prop:key});refs.push(val);}}}compactQueue(queue);return value;};var isRegExp=function isRegExp(obj){return Object.prototype.toString.call(obj)==='[object RegExp]';};var isBuffer=function isBuffer(obj){if(!obj||_typeof(obj)!=='object'){return false;}return!!(obj.constructor&&obj.constructor.isBuffer&&obj.constructor.isBuffer(obj));};var combine=function combine(a,b){return[].concat(a,b);};var maybeMap=function maybeMap(val,fn){if(isArray(val)){var mapped=[];for(var i=0;i<val.length;i+=1){mapped.push(fn(val[i]));}return mapped;}return fn(val);};module.exports={arrayToObject:arrayToObject,assign:assign,combine:combine,compact:compact,decode:decode,encode:encode,isBuffer:isBuffer,isRegExp:isRegExp,maybeMap:maybeMap,merge:merge};},{"./formats":89}],94:[function(require,module,exports){// Copyright Joyent, Inc. and other Node contributors.
1841
2016
  //
1842
2017
  // Permission is hereby granted, free of charge, to any person obtaining a
1843
2018
  // copy of this software and associated documentation files (the
@@ -1861,7 +2036,7 @@ if(str.length===0){return str;}var string=str;if(_typeof(str)==='symbol'){string
1861
2036
  // obj.hasOwnProperty(prop) will break.
1862
2037
  // See: https://github.com/joyent/node/issues/1707
1863
2038
  function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop);}module.exports=function(qs,sep,eq,options){sep=sep||'&';eq=eq||'=';var obj={};if(typeof qs!=='string'||qs.length===0){return obj;}var regexp=/\+/g;qs=qs.split(sep);var maxKeys=1000;if(options&&typeof options.maxKeys==='number'){maxKeys=options.maxKeys;}var len=qs.length;// maxKeys <= 0 means that we should not limit keys count
1864
- if(maxKeys>0&&len>maxKeys){len=maxKeys;}for(var i=0;i<len;++i){var x=qs[i].replace(regexp,'%20'),idx=x.indexOf(eq),kstr,vstr,k,v;if(idx>=0){kstr=x.substr(0,idx);vstr=x.substr(idx+1);}else{kstr=x;vstr='';}k=decodeURIComponent(kstr);v=decodeURIComponent(vstr);if(!hasOwnProperty(obj,k)){obj[k]=v;}else if(isArray(obj[k])){obj[k].push(v);}else{obj[k]=[obj[k],v];}}return obj;};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==='[object Array]';};},{}],94:[function(require,module,exports){// Copyright Joyent, Inc. and other Node contributors.
2039
+ if(maxKeys>0&&len>maxKeys){len=maxKeys;}for(var i=0;i<len;++i){var x=qs[i].replace(regexp,'%20'),idx=x.indexOf(eq),kstr,vstr,k,v;if(idx>=0){kstr=x.substr(0,idx);vstr=x.substr(idx+1);}else{kstr=x;vstr='';}k=decodeURIComponent(kstr);v=decodeURIComponent(vstr);if(!hasOwnProperty(obj,k)){obj[k]=v;}else if(isArray(obj[k])){obj[k].push(v);}else{obj[k]=[obj[k],v];}}return obj;};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==='[object Array]';};},{}],95:[function(require,module,exports){// Copyright Joyent, Inc. and other Node contributors.
1865
2040
  //
1866
2041
  // Permission is hereby granted, free of charge, to any person obtaining a
1867
2042
  // copy of this software and associated documentation files (the
@@ -1881,10 +2056,10 @@ if(maxKeys>0&&len>maxKeys){len=maxKeys;}for(var i=0;i<len;++i){var x=qs[i].repla
1881
2056
  // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
1882
2057
  // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
1883
2058
  // USE OR OTHER DEALINGS IN THE SOFTWARE.
1884
- 'use strict';var stringifyPrimitive=function stringifyPrimitive(v){switch(_typeof(v)){case'string':return v;case'boolean':return v?'true':'false';case'number':return isFinite(v)?v:'';default:return'';}};module.exports=function(obj,sep,eq,name){sep=sep||'&';eq=eq||'=';if(obj===null){obj=undefined;}if(_typeof(obj)==='object'){return map(objectKeys(obj),function(k){var ks=encodeURIComponent(stringifyPrimitive(k))+eq;if(isArray(obj[k])){return map(obj[k],function(v){return ks+encodeURIComponent(stringifyPrimitive(v));}).join(sep);}else{return ks+encodeURIComponent(stringifyPrimitive(obj[k]));}}).join(sep);}if(!name)return'';return encodeURIComponent(stringifyPrimitive(name))+eq+encodeURIComponent(stringifyPrimitive(obj));};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==='[object Array]';};function map(xs,f){if(xs.map)return xs.map(f);var res=[];for(var i=0;i<xs.length;i++){res.push(f(xs[i],i));}return res;}var objectKeys=Object.keys||function(obj){var res=[];for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))res.push(key);}return res;};},{}],95:[function(require,module,exports){'use strict';exports.decode=exports.parse=require('./decode');exports.encode=exports.stringify=require('./encode');},{"./decode":93,"./encode":94}],96:[function(require,module,exports){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ /* eslint-disable node/no-deprecated-api */var buffer=require('buffer');var Buffer=buffer.Buffer;// alternative to using Object.keys for old browsers
2059
+ 'use strict';var stringifyPrimitive=function stringifyPrimitive(v){switch(_typeof(v)){case'string':return v;case'boolean':return v?'true':'false';case'number':return isFinite(v)?v:'';default:return'';}};module.exports=function(obj,sep,eq,name){sep=sep||'&';eq=eq||'=';if(obj===null){obj=undefined;}if(_typeof(obj)==='object'){return map(objectKeys(obj),function(k){var ks=encodeURIComponent(stringifyPrimitive(k))+eq;if(isArray(obj[k])){return map(obj[k],function(v){return ks+encodeURIComponent(stringifyPrimitive(v));}).join(sep);}else{return ks+encodeURIComponent(stringifyPrimitive(obj[k]));}}).join(sep);}if(!name)return'';return encodeURIComponent(stringifyPrimitive(name))+eq+encodeURIComponent(stringifyPrimitive(obj));};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==='[object Array]';};function map(xs,f){if(xs.map)return xs.map(f);var res=[];for(var i=0;i<xs.length;i++){res.push(f(xs[i],i));}return res;}var objectKeys=Object.keys||function(obj){var res=[];for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))res.push(key);}return res;};},{}],96:[function(require,module,exports){'use strict';exports.decode=exports.parse=require('./decode');exports.encode=exports.stringify=require('./encode');},{"./decode":94,"./encode":95}],97:[function(require,module,exports){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ /* eslint-disable node/no-deprecated-api */var buffer=require('buffer');var Buffer=buffer.Buffer;// alternative to using Object.keys for old browsers
1885
2060
  function copyProps(src,dst){for(var key in src){dst[key]=src[key];}}if(Buffer.from&&Buffer.alloc&&Buffer.allocUnsafe&&Buffer.allocUnsafeSlow){module.exports=buffer;}else{// Copy properties from require('buffer')
1886
2061
  copyProps(buffer,exports);exports.Buffer=SafeBuffer;}function SafeBuffer(arg,encodingOrOffset,length){return Buffer(arg,encodingOrOffset,length);}SafeBuffer.prototype=Object.create(Buffer.prototype);// Copy static methods from Buffer
1887
- copyProps(Buffer,SafeBuffer);SafeBuffer.from=function(arg,encodingOrOffset,length){if(typeof arg==='number'){throw new TypeError('Argument must not be a number');}return Buffer(arg,encodingOrOffset,length);};SafeBuffer.alloc=function(size,fill,encoding){if(typeof size!=='number'){throw new TypeError('Argument must be a number');}var buf=Buffer(size);if(fill!==undefined){if(typeof encoding==='string'){buf.fill(fill,encoding);}else{buf.fill(fill);}}else{buf.fill(0);}return buf;};SafeBuffer.allocUnsafe=function(size){if(typeof size!=='number'){throw new TypeError('Argument must be a number');}return Buffer(size);};SafeBuffer.allocUnsafeSlow=function(size){if(typeof size!=='number'){throw new TypeError('Argument must be a number');}return buffer.SlowBuffer(size);};},{"buffer":20}],97:[function(require,module,exports){'use strict';var GetIntrinsic=require('get-intrinsic');var define=require('define-data-property');var hasDescriptors=require('has-property-descriptors')();var gOPD=require('gopd');var $TypeError=require('es-errors/type');var $floor=GetIntrinsic('%Math.floor%');/** @typedef {(...args: unknown[]) => unknown} Func */ /** @type {<T extends Func = Func>(fn: T, length: number, loose?: boolean) => T} */module.exports=function setFunctionLength(fn,length){if(typeof fn!=='function'){throw new $TypeError('`fn` is not a function');}if(typeof length!=='number'||length<0||length>0xFFFFFFFF||$floor(length)!==length){throw new $TypeError('`length` must be a positive 32-bit integer');}var loose=arguments.length>2&&!!arguments[2];var functionLengthIsConfigurable=true;var functionLengthIsWritable=true;if('length'in fn&&gOPD){var desc=gOPD(fn,'length');if(desc&&!desc.configurable){functionLengthIsConfigurable=false;}if(desc&&!desc.writable){functionLengthIsWritable=false;}}if(functionLengthIsConfigurable||functionLengthIsWritable||!loose){if(hasDescriptors){define(/** @type {Parameters<define>[0]} */fn,'length',length,true,true);}else{define(/** @type {Parameters<define>[0]} */fn,'length',length);}}return fn;};},{"define-data-property":36,"es-errors/type":42,"get-intrinsic":59,"gopd":60,"has-property-descriptors":61}],98:[function(require,module,exports){'use strict';var GetIntrinsic=require('get-intrinsic');var callBound=require('call-bind/callBound');var inspect=require('object-inspect');var $TypeError=require('es-errors/type');var $WeakMap=GetIntrinsic('%WeakMap%',true);var $Map=GetIntrinsic('%Map%',true);var $weakMapGet=callBound('WeakMap.prototype.get',true);var $weakMapSet=callBound('WeakMap.prototype.set',true);var $weakMapHas=callBound('WeakMap.prototype.has',true);var $mapGet=callBound('Map.prototype.get',true);var $mapSet=callBound('Map.prototype.set',true);var $mapHas=callBound('Map.prototype.has',true);/*
2062
+ copyProps(Buffer,SafeBuffer);SafeBuffer.from=function(arg,encodingOrOffset,length){if(typeof arg==='number'){throw new TypeError('Argument must not be a number');}return Buffer(arg,encodingOrOffset,length);};SafeBuffer.alloc=function(size,fill,encoding){if(typeof size!=='number'){throw new TypeError('Argument must be a number');}var buf=Buffer(size);if(fill!==undefined){if(typeof encoding==='string'){buf.fill(fill,encoding);}else{buf.fill(fill);}}else{buf.fill(0);}return buf;};SafeBuffer.allocUnsafe=function(size){if(typeof size!=='number'){throw new TypeError('Argument must be a number');}return Buffer(size);};SafeBuffer.allocUnsafeSlow=function(size){if(typeof size!=='number'){throw new TypeError('Argument must be a number');}return buffer.SlowBuffer(size);};},{"buffer":20}],98:[function(require,module,exports){'use strict';var GetIntrinsic=require('get-intrinsic');var define=require('define-data-property');var hasDescriptors=require('has-property-descriptors')();var gOPD=require('gopd');var $TypeError=require('es-errors/type');var $floor=GetIntrinsic('%Math.floor%');/** @typedef {(...args: unknown[]) => unknown} Func */ /** @type {<T extends Func = Func>(fn: T, length: number, loose?: boolean) => T} */module.exports=function setFunctionLength(fn,length){if(typeof fn!=='function'){throw new $TypeError('`fn` is not a function');}if(typeof length!=='number'||length<0||length>0xFFFFFFFF||$floor(length)!==length){throw new $TypeError('`length` must be a positive 32-bit integer');}var loose=arguments.length>2&&!!arguments[2];var functionLengthIsConfigurable=true;var functionLengthIsWritable=true;if('length'in fn&&gOPD){var desc=gOPD(fn,'length');if(desc&&!desc.configurable){functionLengthIsConfigurable=false;}if(desc&&!desc.writable){functionLengthIsWritable=false;}}if(functionLengthIsConfigurable||functionLengthIsWritable||!loose){if(hasDescriptors){define(/** @type {Parameters<define>[0]} */fn,'length',length,true,true);}else{define(/** @type {Parameters<define>[0]} */fn,'length',length);}}return fn;};},{"define-data-property":36,"es-errors/type":42,"get-intrinsic":59,"gopd":60,"has-property-descriptors":61}],99:[function(require,module,exports){'use strict';var GetIntrinsic=require('get-intrinsic');var callBound=require('call-bind/callBound');var inspect=require('object-inspect');var $TypeError=require('es-errors/type');var $WeakMap=GetIntrinsic('%WeakMap%',true);var $Map=GetIntrinsic('%Map%',true);var $weakMapGet=callBound('WeakMap.prototype.get',true);var $weakMapSet=callBound('WeakMap.prototype.set',true);var $weakMapHas=callBound('WeakMap.prototype.has',true);var $mapGet=callBound('Map.prototype.get',true);var $mapSet=callBound('Map.prototype.set',true);var $mapHas=callBound('Map.prototype.has',true);/*
1888
2063
  * This function traverses the list returning the node corresponding to the given key.
1889
2064
  *
1890
2065
  * That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list. By doing so, all the recently used nodes can be accessed relatively quickly.
@@ -1896,7 +2071,7 @@ key:key,next:objects.next,value:value};}};var listHas=function listHas(objects,k
1896
2071
  if($WeakMap&&key&&(_typeof(key)==='object'||typeof key==='function')){if($wm){return $weakMapGet($wm,key);}}else if($Map){if($m){return $mapGet($m,key);}}else{if($o){// eslint-disable-line no-lonely-if
1897
2072
  return listGet($o,key);}}},has:function has(key){if($WeakMap&&key&&(_typeof(key)==='object'||typeof key==='function')){if($wm){return $weakMapHas($wm,key);}}else if($Map){if($m){return $mapHas($m,key);}}else{if($o){// eslint-disable-line no-lonely-if
1898
2073
  return listHas($o,key);}}return false;},set:function set(key,value){if($WeakMap&&key&&(_typeof(key)==='object'||typeof key==='function')){if(!$wm){$wm=new $WeakMap();}$weakMapSet($wm,key,value);}else if($Map){if(!$m){$m=new $Map();}$mapSet($m,key,value);}else{if(!$o){// Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head
1899
- $o={key:{},next:null};}listSet($o,key,value);}}};return channel;};},{"call-bind/callBound":25,"es-errors/type":42,"get-intrinsic":59,"object-inspect":80}],99:[function(require,module,exports){(function(Buffer){(function(){/*! simple-concat. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */module.exports=function(stream,cb){var chunks=[];stream.on('data',function(chunk){chunks.push(chunk);});stream.once('end',function(){if(cb)cb(null,Buffer.concat(chunks));cb=null;});stream.once('error',function(err){if(cb)cb(err);cb=null;});};}).call(this);}).call(this,require("buffer").Buffer);},{"buffer":20}],100:[function(require,module,exports){(function(Buffer){(function(){/*! simple-get. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */module.exports=simpleGet;var concat=require('simple-concat');var decompressResponse=require('decompress-response');// excluded from browser build
2074
+ $o={key:{},next:null};}listSet($o,key,value);}}};return channel;};},{"call-bind/callBound":25,"es-errors/type":42,"get-intrinsic":59,"object-inspect":81}],100:[function(require,module,exports){(function(Buffer){(function(){/*! simple-concat. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */module.exports=function(stream,cb){var chunks=[];stream.on('data',function(chunk){chunks.push(chunk);});stream.once('end',function(){if(cb)cb(null,Buffer.concat(chunks));cb=null;});stream.once('error',function(err){if(cb)cb(err);cb=null;});};}).call(this);}).call(this,require("buffer").Buffer);},{"buffer":20}],101:[function(require,module,exports){(function(Buffer){(function(){/*! simple-get. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */module.exports=simpleGet;var concat=require('simple-concat');var decompressResponse=require('decompress-response');// excluded from browser build
1900
2075
  var http=require('http');var https=require('https');var once=require('once');var querystring=require('querystring');var url=require('url');var isStream=function isStream(o){return o!==null&&_typeof(o)==='object'&&typeof o.pipe==='function';};function simpleGet(opts,cb){opts=Object.assign({maxRedirects:10},typeof opts==='string'?{url:opts}:opts);cb=once(cb);if(opts.url){var _url$parse=url.parse(opts.url),hostname=_url$parse.hostname,port=_url$parse.port,_protocol=_url$parse.protocol,auth=_url$parse.auth,path=_url$parse.path;// eslint-disable-line node/no-deprecated-api
1901
2076
  delete opts.url;if(!hostname&&!port&&!_protocol&&!auth)opts.path=path;// Relative redirect
1902
2077
  else Object.assign(opts,{hostname:hostname,port:port,protocol:_protocol,auth:auth,path:path});// Absolute redirect
@@ -1908,13 +2083,13 @@ res.resume();// Discard response
1908
2083
  var redirectHost=url.parse(opts.url).hostname;// eslint-disable-line node/no-deprecated-api
1909
2084
  // If redirected host is different than original host, drop headers to prevent cookie leak (#73)
1910
2085
  if(redirectHost!==null&&redirectHost!==originalHost){delete opts.headers.cookie;delete opts.headers.authorization;}if(opts.method==='POST'&&[301,302].includes(res.statusCode)){opts.method='GET';// On 301/302 redirect, change POST to GET (see #35)
1911
- delete opts.headers['content-length'];delete opts.headers['content-type'];}if(opts.maxRedirects--===0)return cb(new Error('too many redirects'));else return simpleGet(opts,cb);}var tryUnzip=typeof decompressResponse==='function'&&opts.method!=='HEAD';cb(null,tryUnzip?decompressResponse(res):res);});req.on('timeout',function(){req.abort();cb(new Error('Request timed out'));});req.on('error',cb);if(isStream(body))body.on('error',cb).pipe(req);else req.end(body);return req;}simpleGet.concat=function(opts,cb){return simpleGet(opts,function(err,res){if(err)return cb(err);concat(res,function(err,data){if(err)return cb(err);if(opts.json){try{data=JSON.parse(data.toString());}catch(err){return cb(err,res,data);}}cb(null,res,data);});});};['get','post','put','patch','head','delete'].forEach(function(method){simpleGet[method]=function(opts,cb){if(typeof opts==='string')opts={url:opts};return simpleGet(Object.assign({method:method.toUpperCase()},opts),cb);};});}).call(this);}).call(this,require("buffer").Buffer);},{"buffer":20,"decompress-response":18,"http":101,"https":66,"once":81,"querystring":95,"simple-concat":99,"url":122}],101:[function(require,module,exports){(function(global){(function(){var ClientRequest=require('./lib/request');var response=require('./lib/response');var extend=require('xtend');var statusCodes=require('builtin-status-codes');var url=require('url');var http=exports;http.request=function(opts,cb){if(typeof opts==='string')opts=url.parse(opts);else opts=extend(opts);// Normally, the page is loaded from http or https, so not specifying a protocol
2086
+ delete opts.headers['content-length'];delete opts.headers['content-type'];}if(opts.maxRedirects--===0)return cb(new Error('too many redirects'));else return simpleGet(opts,cb);}var tryUnzip=typeof decompressResponse==='function'&&opts.method!=='HEAD';cb(null,tryUnzip?decompressResponse(res):res);});req.on('timeout',function(){req.abort();cb(new Error('Request timed out'));});req.on('error',cb);if(isStream(body))body.on('error',cb).pipe(req);else req.end(body);return req;}simpleGet.concat=function(opts,cb){return simpleGet(opts,function(err,res){if(err)return cb(err);concat(res,function(err,data){if(err)return cb(err);if(opts.json){try{data=JSON.parse(data.toString());}catch(err){return cb(err,res,data);}}cb(null,res,data);});});};['get','post','put','patch','head','delete'].forEach(function(method){simpleGet[method]=function(opts,cb){if(typeof opts==='string')opts={url:opts};return simpleGet(Object.assign({method:method.toUpperCase()},opts),cb);};});}).call(this);}).call(this,require("buffer").Buffer);},{"buffer":20,"decompress-response":18,"http":102,"https":66,"once":82,"querystring":96,"simple-concat":100,"url":123}],102:[function(require,module,exports){(function(global){(function(){var ClientRequest=require('./lib/request');var response=require('./lib/response');var extend=require('xtend');var statusCodes=require('builtin-status-codes');var url=require('url');var http=exports;http.request=function(opts,cb){if(typeof opts==='string')opts=url.parse(opts);else opts=extend(opts);// Normally, the page is loaded from http or https, so not specifying a protocol
1912
2087
  // will result in a (valid) protocol-relative url. However, this won't work if
1913
2088
  // the protocol is something else, like 'file:'
1914
2089
  var defaultProtocol=global.location.protocol.search(/^https?:$/)===-1?'http:':'';var protocol=opts.protocol||defaultProtocol;var host=opts.hostname||opts.host;var port=opts.port;var path=opts.path||'/';// Necessary for IPv6 addresses
1915
2090
  if(host&&host.indexOf(':')!==-1)host='['+host+']';// This may be a relative url. The browser should always be able to interpret it correctly.
1916
2091
  opts.url=(host?protocol+'//'+host:'')+(port?':'+port:'')+path;opts.method=(opts.method||'GET').toUpperCase();opts.headers=opts.headers||{};// Also valid opts.auth, opts.mode
1917
- var req=new ClientRequest(opts);if(cb)req.on('response',cb);return req;};http.get=function get(opts,cb){var req=http.request(opts,cb);req.end();return req;};http.ClientRequest=ClientRequest;http.IncomingMessage=response.IncomingMessage;http.Agent=function(){};http.Agent.defaultMaxSockets=4;http.globalAgent=new http.Agent();http.STATUS_CODES=statusCodes;http.METHODS=['CHECKOUT','CONNECT','COPY','DELETE','GET','HEAD','LOCK','M-SEARCH','MERGE','MKACTIVITY','MKCOL','MOVE','NOTIFY','OPTIONS','PATCH','POST','PROPFIND','PROPPATCH','PURGE','PUT','REPORT','SEARCH','SUBSCRIBE','TRACE','UNLOCK','UNSUBSCRIBE'];}).call(this);}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{});},{"./lib/request":103,"./lib/response":104,"builtin-status-codes":21,"url":122,"xtend":125}],102:[function(require,module,exports){(function(global){(function(){exports.fetch=isFunction(global.fetch)&&isFunction(global.ReadableStream);exports.writableStream=isFunction(global.WritableStream);exports.abortController=isFunction(global.AbortController);// The xhr request to example.com may violate some restrictive CSP configurations,
2092
+ var req=new ClientRequest(opts);if(cb)req.on('response',cb);return req;};http.get=function get(opts,cb){var req=http.request(opts,cb);req.end();return req;};http.ClientRequest=ClientRequest;http.IncomingMessage=response.IncomingMessage;http.Agent=function(){};http.Agent.defaultMaxSockets=4;http.globalAgent=new http.Agent();http.STATUS_CODES=statusCodes;http.METHODS=['CHECKOUT','CONNECT','COPY','DELETE','GET','HEAD','LOCK','M-SEARCH','MERGE','MKACTIVITY','MKCOL','MOVE','NOTIFY','OPTIONS','PATCH','POST','PROPFIND','PROPPATCH','PURGE','PUT','REPORT','SEARCH','SUBSCRIBE','TRACE','UNLOCK','UNSUBSCRIBE'];}).call(this);}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{});},{"./lib/request":104,"./lib/response":105,"builtin-status-codes":21,"url":123,"xtend":126}],103:[function(require,module,exports){(function(global){(function(){exports.fetch=isFunction(global.fetch)&&isFunction(global.ReadableStream);exports.writableStream=isFunction(global.WritableStream);exports.abortController=isFunction(global.AbortController);// The xhr request to example.com may violate some restrictive CSP configurations,
1918
2093
  // so if we're running in a browser that supports `fetch`, avoid calling getXHR()
1919
2094
  // and assume support for certain features below.
1920
2095
  var xhr;function getXHR(){// Cache the xhr value
@@ -1929,7 +2104,7 @@ exports.arraybuffer=exports.fetch||checkTypeSupport('arraybuffer');// These next
1929
2104
  exports.msstream=!exports.fetch&&checkTypeSupport('ms-stream');exports.mozchunkedarraybuffer=!exports.fetch&&checkTypeSupport('moz-chunked-arraybuffer');// If fetch is supported, then overrideMimeType will be supported too. Skip calling
1930
2105
  // getXHR().
1931
2106
  exports.overrideMimeType=exports.fetch||(getXHR()?isFunction(getXHR().overrideMimeType):false);function isFunction(value){return typeof value==='function';}xhr=null;// Help gc
1932
- }).call(this);}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{});},{}],103:[function(require,module,exports){(function(process,global,Buffer){(function(){var capability=require('./capability');var inherits=require('inherits');var response=require('./response');var stream=require('readable-stream');var IncomingMessage=response.IncomingMessage;var rStates=response.readyStates;function decideMode(preferBinary,useFetch){if(capability.fetch&&useFetch){return'fetch';}else if(capability.mozchunkedarraybuffer){return'moz-chunked-arraybuffer';}else if(capability.msstream){return'ms-stream';}else if(capability.arraybuffer&&preferBinary){return'arraybuffer';}else{return'text';}}var ClientRequest=module.exports=function(opts){var self=this;stream.Writable.call(self);self._opts=opts;self._body=[];self._headers={};if(opts.auth)self.setHeader('Authorization','Basic '+Buffer.from(opts.auth).toString('base64'));Object.keys(opts.headers).forEach(function(name){self.setHeader(name,opts.headers[name]);});var preferBinary;var useFetch=true;if(opts.mode==='disable-fetch'||'requestTimeout'in opts&&!capability.abortController){// If the use of XHR should be preferred. Not typically needed.
2107
+ }).call(this);}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{});},{}],104:[function(require,module,exports){(function(process,global,Buffer){(function(){var capability=require('./capability');var inherits=require('inherits');var response=require('./response');var stream=require('readable-stream');var IncomingMessage=response.IncomingMessage;var rStates=response.readyStates;function decideMode(preferBinary,useFetch){if(capability.fetch&&useFetch){return'fetch';}else if(capability.mozchunkedarraybuffer){return'moz-chunked-arraybuffer';}else if(capability.msstream){return'ms-stream';}else if(capability.arraybuffer&&preferBinary){return'arraybuffer';}else{return'text';}}var ClientRequest=module.exports=function(opts){var self=this;stream.Writable.call(self);self._opts=opts;self._body=[];self._headers={};if(opts.auth)self.setHeader('Authorization','Basic '+Buffer.from(opts.auth).toString('base64'));Object.keys(opts.headers).forEach(function(name){self.setHeader(name,opts.headers[name]);});var preferBinary;var useFetch=true;if(opts.mode==='disable-fetch'||'requestTimeout'in opts&&!capability.abortController){// If the use of XHR should be preferred. Not typically needed.
1933
2108
  useFetch=false;preferBinary=true;}else if(opts.mode==='prefer-streaming'){// If streaming is a high priority but binary compatibility and
1934
2109
  // the accuracy of the 'content-type' header aren't
1935
2110
  preferBinary=false;}else if(opts.mode==='allow-wrong-content-type'){// If streaming is more important than preserving the 'content-type' header
@@ -1946,7 +2121,7 @@ if(self._mode==='moz-chunked-arraybuffer'){xhr.onprogress=function(){self._onXHR
1946
2121
  * Even though the spec says it should be available in readyState 3,
1947
2122
  * accessing it throws an exception in IE8
1948
2123
  */function statusValid(xhr){try{var status=xhr.status;return status!==null&&status!==0;}catch(e){return false;}}ClientRequest.prototype._onXHRProgress=function(){var self=this;self._resetTimers(false);if(!statusValid(self._xhr)||self._destroyed)return;if(!self._response)self._connect();self._response._onXHRProgress(self._resetTimers.bind(self));};ClientRequest.prototype._connect=function(){var self=this;if(self._destroyed)return;self._response=new IncomingMessage(self._xhr,self._fetchResponse,self._mode,self._resetTimers.bind(self));self._response.on('error',function(err){self.emit('error',err);});self.emit('response',self._response);};ClientRequest.prototype._write=function(chunk,encoding,cb){var self=this;self._body.push(chunk);cb();};ClientRequest.prototype._resetTimers=function(done){var self=this;global.clearTimeout(self._socketTimer);self._socketTimer=null;if(done){global.clearTimeout(self._fetchTimer);self._fetchTimer=null;}else if(self._socketTimeout){self._socketTimer=global.setTimeout(function(){self.emit('timeout');},self._socketTimeout);}};ClientRequest.prototype.abort=ClientRequest.prototype.destroy=function(err){var self=this;self._destroyed=true;self._resetTimers(true);if(self._response)self._response._destroyed=true;if(self._xhr)self._xhr.abort();else if(self._fetchAbortController)self._fetchAbortController.abort();if(err)self.emit('error',err);};ClientRequest.prototype.end=function(data,encoding,cb){var self=this;if(typeof data==='function'){cb=data;data=undefined;}stream.Writable.prototype.end.call(self,data,encoding,cb);};ClientRequest.prototype.setTimeout=function(timeout,cb){var self=this;if(cb)self.once('timeout',cb);self._socketTimeout=timeout;self._resetTimers(false);};ClientRequest.prototype.flushHeaders=function(){};ClientRequest.prototype.setNoDelay=function(){};ClientRequest.prototype.setSocketKeepAlive=function(){};// Taken from http://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader%28%29-method
1949
- var unsafeHeaders=['accept-charset','accept-encoding','access-control-request-headers','access-control-request-method','connection','content-length','cookie','cookie2','date','dnt','expect','host','keep-alive','origin','referer','te','trailer','transfer-encoding','upgrade','via'];}).call(this);}).call(this,require('_process'),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{},require("buffer").Buffer);},{"./capability":102,"./response":104,"_process":86,"buffer":20,"inherits":68,"readable-stream":119}],104:[function(require,module,exports){(function(process,global,Buffer){(function(){var capability=require('./capability');var inherits=require('inherits');var stream=require('readable-stream');var rStates=exports.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4};var IncomingMessage=exports.IncomingMessage=function(xhr,response,mode,resetTimers){var self=this;stream.Readable.call(self);self._mode=mode;self.headers={};self.rawHeaders=[];self.trailers={};self.rawTrailers=[];// Fake the 'close' event, but only once 'end' fires
2124
+ var unsafeHeaders=['accept-charset','accept-encoding','access-control-request-headers','access-control-request-method','connection','content-length','cookie','cookie2','date','dnt','expect','host','keep-alive','origin','referer','te','trailer','transfer-encoding','upgrade','via'];}).call(this);}).call(this,require('_process'),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{},require("buffer").Buffer);},{"./capability":103,"./response":105,"_process":87,"buffer":20,"inherits":68,"readable-stream":120}],105:[function(require,module,exports){(function(process,global,Buffer){(function(){var capability=require('./capability');var inherits=require('inherits');var stream=require('readable-stream');var rStates=exports.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4};var IncomingMessage=exports.IncomingMessage=function(xhr,response,mode,resetTimers){var self=this;stream.Readable.call(self);self._mode=mode;self.headers={};self.rawHeaders=[];self.trailers={};self.rawTrailers=[];// Fake the 'close' event, but only once 'end' fires
1950
2125
  self.on('end',function(){// The nextTick is necessary to prevent the 'request' module from causing an infinite loop
1951
2126
  process.nextTick(function(){self.emit('close');});});if(mode==='fetch'){var read=function read(){reader.read().then(function(result){if(self._destroyed)return;resetTimers(result.done);if(result.done){self.push(null);return;}self.push(Buffer.from(result.value));read();})["catch"](function(err){resetTimers(true);if(!self._destroyed)self.emit('error',err);});};self._fetchResponse=response;self.url=response.url;self.statusCode=response.status;self.statusMessage=response.statusText;response.headers.forEach(function(header,key){self.headers[key.toLowerCase()]=header;self.rawHeaders.push(key,header);});if(capability.writableStream){var writable=new WritableStream({write:function write(chunk){resetTimers(false);return new Promise(function(resolve,reject){if(self._destroyed){reject();}else if(self.push(Buffer.from(chunk))){resolve();}else{self._resumeFetch=resolve;}});},close:function close(){resetTimers(true);if(!self._destroyed)self.push(null);},abort:function abort(err){resetTimers(true);if(!self._destroyed)self.emit('error',err);}});try{response.body.pipeTo(writable)["catch"](function(err){resetTimers(true);if(!self._destroyed)self.emit('error',err);});return;}catch(e){}// pipeTo method isn't defined. Can't find a better way to feature test this
1952
2127
  }// fallback for when writableStream or pipeTo aren't available
@@ -1954,13 +2129,13 @@ var reader=response.body.getReader();read();}else{self._xhr=xhr;self._pos=0;self
1954
2129
  }}};inherits(IncomingMessage,stream.Readable);IncomingMessage.prototype._read=function(){var self=this;var resolve=self._resumeFetch;if(resolve){self._resumeFetch=null;resolve();}};IncomingMessage.prototype._onXHRProgress=function(resetTimers){var self=this;var xhr=self._xhr;var response=null;switch(self._mode){case'text':response=xhr.responseText;if(response.length>self._pos){var newData=response.substr(self._pos);if(self._charset==='x-user-defined'){var buffer=Buffer.alloc(newData.length);for(var i=0;i<newData.length;i++)buffer[i]=newData.charCodeAt(i)&0xff;self.push(buffer);}else{self.push(newData,self._charset);}self._pos=response.length;}break;case'arraybuffer':if(xhr.readyState!==rStates.DONE||!xhr.response)break;response=xhr.response;self.push(Buffer.from(new Uint8Array(response)));break;case'moz-chunked-arraybuffer':// take whole
1955
2130
  response=xhr.response;if(xhr.readyState!==rStates.LOADING||!response)break;self.push(Buffer.from(new Uint8Array(response)));break;case'ms-stream':response=xhr.response;if(xhr.readyState!==rStates.LOADING)break;var reader=new global.MSStreamReader();reader.onprogress=function(){if(reader.result.byteLength>self._pos){self.push(Buffer.from(new Uint8Array(reader.result.slice(self._pos))));self._pos=reader.result.byteLength;}};reader.onload=function(){resetTimers(true);self.push(null);};// reader.onerror = ??? // TODO: this
1956
2131
  reader.readAsArrayBuffer(response);break;}// The ms-stream case handles end separately in reader.onload()
1957
- if(self._xhr.readyState===rStates.DONE&&self._mode!=='ms-stream'){resetTimers(true);self.push(null);}};}).call(this);}).call(this,require('_process'),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{},require("buffer").Buffer);},{"./capability":102,"_process":86,"buffer":20,"inherits":68,"readable-stream":119}],105:[function(require,module,exports){'use strict';function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype);subClass.prototype.constructor=subClass;subClass.__proto__=superClass;}var codes={};function createErrorType(code,message,Base){if(!Base){Base=Error;}function getMessage(arg1,arg2,arg3){if(typeof message==='string'){return message;}else{return message(arg1,arg2,arg3);}}var NodeError=/*#__PURE__*/function(_Base){_inheritsLoose(NodeError,_Base);function NodeError(arg1,arg2,arg3){return _Base.call(this,getMessage(arg1,arg2,arg3))||this;}return NodeError;}(Base);NodeError.prototype.name=Base.name;NodeError.prototype.code=code;codes[code]=NodeError;}// https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js
2132
+ if(self._xhr.readyState===rStates.DONE&&self._mode!=='ms-stream'){resetTimers(true);self.push(null);}};}).call(this);}).call(this,require('_process'),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{},require("buffer").Buffer);},{"./capability":103,"_process":87,"buffer":20,"inherits":68,"readable-stream":120}],106:[function(require,module,exports){'use strict';function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype);subClass.prototype.constructor=subClass;subClass.__proto__=superClass;}var codes={};function createErrorType(code,message,Base){if(!Base){Base=Error;}function getMessage(arg1,arg2,arg3){if(typeof message==='string'){return message;}else{return message(arg1,arg2,arg3);}}var NodeError=/*#__PURE__*/function(_Base){_inheritsLoose(NodeError,_Base);function NodeError(arg1,arg2,arg3){return _Base.call(this,getMessage(arg1,arg2,arg3))||this;}return NodeError;}(Base);NodeError.prototype.name=Base.name;NodeError.prototype.code=code;codes[code]=NodeError;}// https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js
1958
2133
  function oneOf(expected,thing){if(Array.isArray(expected)){var len=expected.length;expected=expected.map(function(i){return String(i);});if(len>2){return"one of ".concat(thing," ").concat(expected.slice(0,len-1).join(', '),", or ")+expected[len-1];}else if(len===2){return"one of ".concat(thing," ").concat(expected[0]," or ").concat(expected[1]);}else{return"of ".concat(thing," ").concat(expected[0]);}}else{return"of ".concat(thing," ").concat(String(expected));}}// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith
1959
2134
  function startsWith(str,search,pos){return str.substr(!pos||pos<0?0:+pos,search.length)===search;}// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith
1960
2135
  function endsWith(str,search,this_len){if(this_len===undefined||this_len>str.length){this_len=str.length;}return str.substring(this_len-search.length,this_len)===search;}// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes
1961
2136
  function includes(str,search,start){if(typeof start!=='number'){start=0;}if(start+search.length>str.length){return false;}else{return str.indexOf(search,start)!==-1;}}createErrorType('ERR_INVALID_OPT_VALUE',function(name,value){return'The value "'+value+'" is invalid for option "'+name+'"';},TypeError);createErrorType('ERR_INVALID_ARG_TYPE',function(name,expected,actual){// determiner: 'must be' or 'must not be'
1962
2137
  var determiner;if(typeof expected==='string'&&startsWith(expected,'not ')){determiner='must not be';expected=expected.replace(/^not /,'');}else{determiner='must be';}var msg;if(endsWith(name,' argument')){// For cases like 'first argument'
1963
- msg="The ".concat(name," ").concat(determiner," ").concat(oneOf(expected,'type'));}else{var type=includes(name,'.')?'property':'argument';msg="The \"".concat(name,"\" ").concat(type," ").concat(determiner," ").concat(oneOf(expected,'type'));}msg+=". Received type ".concat(_typeof(actual));return msg;},TypeError);createErrorType('ERR_STREAM_PUSH_AFTER_EOF','stream.push() after EOF');createErrorType('ERR_METHOD_NOT_IMPLEMENTED',function(name){return'The '+name+' method is not implemented';});createErrorType('ERR_STREAM_PREMATURE_CLOSE','Premature close');createErrorType('ERR_STREAM_DESTROYED',function(name){return'Cannot call '+name+' after a stream was destroyed';});createErrorType('ERR_MULTIPLE_CALLBACK','Callback called multiple times');createErrorType('ERR_STREAM_CANNOT_PIPE','Cannot pipe, not readable');createErrorType('ERR_STREAM_WRITE_AFTER_END','write after end');createErrorType('ERR_STREAM_NULL_VALUES','May not write null values to stream',TypeError);createErrorType('ERR_UNKNOWN_ENCODING',function(arg){return'Unknown encoding: '+arg;},TypeError);createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT','stream.unshift() after end event');module.exports.codes=codes;},{}],106:[function(require,module,exports){(function(process){(function(){// Copyright Joyent, Inc. and other Node contributors.
2138
+ msg="The ".concat(name," ").concat(determiner," ").concat(oneOf(expected,'type'));}else{var type=includes(name,'.')?'property':'argument';msg="The \"".concat(name,"\" ").concat(type," ").concat(determiner," ").concat(oneOf(expected,'type'));}msg+=". Received type ".concat(_typeof(actual));return msg;},TypeError);createErrorType('ERR_STREAM_PUSH_AFTER_EOF','stream.push() after EOF');createErrorType('ERR_METHOD_NOT_IMPLEMENTED',function(name){return'The '+name+' method is not implemented';});createErrorType('ERR_STREAM_PREMATURE_CLOSE','Premature close');createErrorType('ERR_STREAM_DESTROYED',function(name){return'Cannot call '+name+' after a stream was destroyed';});createErrorType('ERR_MULTIPLE_CALLBACK','Callback called multiple times');createErrorType('ERR_STREAM_CANNOT_PIPE','Cannot pipe, not readable');createErrorType('ERR_STREAM_WRITE_AFTER_END','write after end');createErrorType('ERR_STREAM_NULL_VALUES','May not write null values to stream',TypeError);createErrorType('ERR_UNKNOWN_ENCODING',function(arg){return'Unknown encoding: '+arg;},TypeError);createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT','stream.unshift() after end event');module.exports.codes=codes;},{}],107:[function(require,module,exports){(function(process){(function(){// Copyright Joyent, Inc. and other Node contributors.
1964
2139
  //
1965
2140
  // Permission is hereby granted, free of charge, to any person obtaining a
1966
2141
  // copy of this software and associated documentation files (the
@@ -2005,7 +2180,7 @@ enumerable:false,get:function get(){if(this._readableState===undefined||this._wr
2005
2180
  // has not been initialized yet
2006
2181
  if(this._readableState===undefined||this._writableState===undefined){return;}// backward compatibility, the user is explicitly
2007
2182
  // managing destroyed
2008
- this._readableState.destroyed=value;this._writableState.destroyed=value;}});}).call(this);}).call(this,require('_process'));},{"./_stream_readable":108,"./_stream_writable":110,"_process":86,"inherits":68}],107:[function(require,module,exports){// Copyright Joyent, Inc. and other Node contributors.
2183
+ this._readableState.destroyed=value;this._writableState.destroyed=value;}});}).call(this);}).call(this,require('_process'));},{"./_stream_readable":109,"./_stream_writable":111,"_process":87,"inherits":68}],108:[function(require,module,exports){// Copyright Joyent, Inc. and other Node contributors.
2009
2184
  //
2010
2185
  // Permission is hereby granted, free of charge, to any person obtaining a
2011
2186
  // copy of this software and associated documentation files (the
@@ -2028,7 +2203,7 @@ this._readableState.destroyed=value;this._writableState.destroyed=value;}});}).c
2028
2203
  // a passthrough stream.
2029
2204
  // basically just the most minimal sort of Transform stream.
2030
2205
  // Every written chunk gets output as-is.
2031
- 'use strict';module.exports=PassThrough;var Transform=require('./_stream_transform');require('inherits')(PassThrough,Transform);function PassThrough(options){if(!(this instanceof PassThrough))return new PassThrough(options);Transform.call(this,options);}PassThrough.prototype._transform=function(chunk,encoding,cb){cb(null,chunk);};},{"./_stream_transform":109,"inherits":68}],108:[function(require,module,exports){(function(process,global){(function(){// Copyright Joyent, Inc. and other Node contributors.
2206
+ 'use strict';module.exports=PassThrough;var Transform=require('./_stream_transform');require('inherits')(PassThrough,Transform);function PassThrough(options){if(!(this instanceof PassThrough))return new PassThrough(options);Transform.call(this,options);}PassThrough.prototype._transform=function(chunk,encoding,cb){cb(null,chunk);};},{"./_stream_transform":110,"inherits":68}],109:[function(require,module,exports){(function(process,global){(function(){// Copyright Joyent, Inc. and other Node contributors.
2032
2207
  //
2033
2208
  // Permission is hereby granted, free of charge, to any person obtaining a
2034
2209
  // copy of this software and associated documentation files (the
@@ -2280,7 +2455,7 @@ if(state.decoder)ret=state.buffer.join('');else if(state.buffer.length===1)ret=s
2280
2455
  ret=state.buffer.consume(n,state.decoder);}return ret;}function endReadable(stream){var state=stream._readableState;debug('endReadable',state.endEmitted);if(!state.endEmitted){state.ended=true;process.nextTick(endReadableNT,state,stream);}}function endReadableNT(state,stream){debug('endReadableNT',state.endEmitted,state.length);// Check that we didn't get one last unshift.
2281
2456
  if(!state.endEmitted&&state.length===0){state.endEmitted=true;stream.readable=false;stream.emit('end');if(state.autoDestroy){// In case of duplex streams we need a way to detect
2282
2457
  // if the writable side is ready for autoDestroy as well
2283
- var wState=stream._writableState;if(!wState||wState.autoDestroy&&wState.finished){stream.destroy();}}}}if(typeof Symbol==='function'){Readable.from=function(iterable,opts){if(from===undefined){from=require('./internal/streams/from');}return from(Readable,iterable,opts);};}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++){if(xs[i]===x)return i;}return-1;}}).call(this);}).call(this,require('_process'),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{});},{"../errors":105,"./_stream_duplex":106,"./internal/streams/async_iterator":111,"./internal/streams/buffer_list":112,"./internal/streams/destroy":113,"./internal/streams/from":115,"./internal/streams/state":117,"./internal/streams/stream":118,"_process":86,"buffer":20,"events":44,"inherits":68,"string_decoder/":120,"util":18}],109:[function(require,module,exports){// Copyright Joyent, Inc. and other Node contributors.
2458
+ var wState=stream._writableState;if(!wState||wState.autoDestroy&&wState.finished){stream.destroy();}}}}if(typeof Symbol==='function'){Readable.from=function(iterable,opts){if(from===undefined){from=require('./internal/streams/from');}return from(Readable,iterable,opts);};}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++){if(xs[i]===x)return i;}return-1;}}).call(this);}).call(this,require('_process'),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{});},{"../errors":106,"./_stream_duplex":107,"./internal/streams/async_iterator":112,"./internal/streams/buffer_list":113,"./internal/streams/destroy":114,"./internal/streams/from":116,"./internal/streams/state":118,"./internal/streams/stream":119,"_process":87,"buffer":20,"events":44,"inherits":68,"string_decoder/":121,"util":18}],110:[function(require,module,exports){// Copyright Joyent, Inc. and other Node contributors.
2284
2459
  //
2285
2460
  // Permission is hereby granted, free of charge, to any person obtaining a
2286
2461
  // copy of this software and associated documentation files (the
@@ -2366,7 +2541,7 @@ ts.needTransform=true;}};Transform.prototype._destroy=function(err,cb){Duplex.pr
2366
2541
  stream.push(data);// TODO(BridgeAR): Write a test for these two error cases
2367
2542
  // if there's nothing in the write buffer, then that means
2368
2543
  // that nothing more will ever be provided
2369
- if(stream._writableState.length)throw new ERR_TRANSFORM_WITH_LENGTH_0();if(stream._transformState.transforming)throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();return stream.push(null);}},{"../errors":105,"./_stream_duplex":106,"inherits":68}],110:[function(require,module,exports){(function(process,global){(function(){// Copyright Joyent, Inc. and other Node contributors.
2544
+ if(stream._writableState.length)throw new ERR_TRANSFORM_WITH_LENGTH_0();if(stream._transformState.transforming)throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();return stream.push(null);}},{"../errors":106,"./_stream_duplex":107,"inherits":68}],111:[function(require,module,exports){(function(process,global){(function(){// Copyright Joyent, Inc. and other Node contributors.
2370
2545
  //
2371
2546
  // Permission is hereby granted, free of charge, to any person obtaining a
2372
2547
  // copy of this software and associated documentation files (the
@@ -2501,7 +2676,7 @@ enumerable:false,get:function get(){if(this._writableState===undefined){return f
2501
2676
  // has not been initialized yet
2502
2677
  if(!this._writableState){return;}// backward compatibility, the user is explicitly
2503
2678
  // managing destroyed
2504
- this._writableState.destroyed=value;}});Writable.prototype.destroy=destroyImpl.destroy;Writable.prototype._undestroy=destroyImpl.undestroy;Writable.prototype._destroy=function(err,cb){cb(err);};}).call(this);}).call(this,require('_process'),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{});},{"../errors":105,"./_stream_duplex":106,"./internal/streams/destroy":113,"./internal/streams/state":117,"./internal/streams/stream":118,"_process":86,"buffer":20,"inherits":68,"util-deprecate":123}],111:[function(require,module,exports){(function(process){(function(){'use strict';var _Object$setPrototypeO;function _defineProperty(obj,key,value){key=_toPropertyKey(key);if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return _typeof(key)==="symbol"?key:String(key);}function _toPrimitive(input,hint){if(_typeof(input)!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(_typeof(res)!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.");}return(hint==="string"?String:Number)(input);}var finished=require('./end-of-stream');var kLastResolve=Symbol('lastResolve');var kLastReject=Symbol('lastReject');var kError=Symbol('error');var kEnded=Symbol('ended');var kLastPromise=Symbol('lastPromise');var kHandlePromise=Symbol('handlePromise');var kStream=Symbol('stream');function createIterResult(value,done){return{value:value,done:done};}function readAndResolve(iter){var resolve=iter[kLastResolve];if(resolve!==null){var data=iter[kStream].read();// we defer if data is null
2679
+ this._writableState.destroyed=value;}});Writable.prototype.destroy=destroyImpl.destroy;Writable.prototype._undestroy=destroyImpl.undestroy;Writable.prototype._destroy=function(err,cb){cb(err);};}).call(this);}).call(this,require('_process'),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{});},{"../errors":106,"./_stream_duplex":107,"./internal/streams/destroy":114,"./internal/streams/state":118,"./internal/streams/stream":119,"_process":87,"buffer":20,"inherits":68,"util-deprecate":124}],112:[function(require,module,exports){(function(process){(function(){'use strict';var _Object$setPrototypeO;function _defineProperty(obj,key,value){key=_toPropertyKey(key);if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return _typeof(key)==="symbol"?key:String(key);}function _toPrimitive(input,hint){if(_typeof(input)!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(_typeof(res)!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.");}return(hint==="string"?String:Number)(input);}var finished=require('./end-of-stream');var kLastResolve=Symbol('lastResolve');var kLastReject=Symbol('lastReject');var kError=Symbol('error');var kEnded=Symbol('ended');var kLastPromise=Symbol('lastPromise');var kHandlePromise=Symbol('handlePromise');var kStream=Symbol('stream');function createIterResult(value,done){return{value:value,done:done};}function readAndResolve(iter){var resolve=iter[kLastResolve];if(resolve!==null){var data=iter[kStream].read();// we defer if data is null
2505
2680
  // we can be expecting either 'end' or
2506
2681
  // 'error'
2507
2682
  if(data!==null){iter[kLastPromise]=null;iter[kLastResolve]=null;iter[kLastReject]=null;resolve(createIterResult(data,false));}}}function onReadable(iter){// we wait for the next tick, because it might
@@ -2523,7 +2698,7 @@ var data=this[kStream].read();if(data!==null){return Promise.resolve(createIterR
2523
2698
  // Readable class this is attached to
2524
2699
  return new Promise(function(resolve,reject){_this2[kStream].destroy(null,function(err){if(err){reject(err);return;}resolve(createIterResult(undefined,true));});});}),_Object$setPrototypeO),AsyncIteratorPrototype);var createReadableStreamAsyncIterator=function createReadableStreamAsyncIterator(stream){var _Object$create;var iterator=Object.create(ReadableStreamAsyncIteratorPrototype,(_Object$create={},_defineProperty(_Object$create,kStream,{value:stream,writable:true}),_defineProperty(_Object$create,kLastResolve,{value:null,writable:true}),_defineProperty(_Object$create,kLastReject,{value:null,writable:true}),_defineProperty(_Object$create,kError,{value:null,writable:true}),_defineProperty(_Object$create,kEnded,{value:stream._readableState.endEmitted,writable:true}),_defineProperty(_Object$create,kHandlePromise,{value:function value(resolve,reject){var data=iterator[kStream].read();if(data){iterator[kLastPromise]=null;iterator[kLastResolve]=null;iterator[kLastReject]=null;resolve(createIterResult(data,false));}else{iterator[kLastResolve]=resolve;iterator[kLastReject]=reject;}},writable:true}),_Object$create));iterator[kLastPromise]=null;finished(stream,function(err){if(err&&err.code!=='ERR_STREAM_PREMATURE_CLOSE'){var reject=iterator[kLastReject];// reject if we are waiting for data in the Promise
2525
2700
  // returned by next() and store the error
2526
- if(reject!==null){iterator[kLastPromise]=null;iterator[kLastResolve]=null;iterator[kLastReject]=null;reject(err);}iterator[kError]=err;return;}var resolve=iterator[kLastResolve];if(resolve!==null){iterator[kLastPromise]=null;iterator[kLastResolve]=null;iterator[kLastReject]=null;resolve(createIterResult(undefined,true));}iterator[kEnded]=true;});stream.on('readable',onReadable.bind(null,iterator));return iterator;};module.exports=createReadableStreamAsyncIterator;}).call(this);}).call(this,require('_process'));},{"./end-of-stream":114,"_process":86}],112:[function(require,module,exports){'use strict';function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;})),keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}return target;}function _defineProperty(obj,key,value){key=_toPropertyKey(key);if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return _typeof(key)==="symbol"?key:String(key);}function _toPrimitive(input,hint){if(_typeof(input)!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(_typeof(res)!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.");}return(hint==="string"?String:Number)(input);}var _require=require('buffer'),Buffer=_require.Buffer;var _require2=require('util'),inspect=_require2.inspect;var custom=inspect&&inspect.custom||'inspect';function copyBuffer(src,target,offset){Buffer.prototype.copy.call(src,target,offset);}module.exports=/*#__PURE__*/function(){function BufferList(){_classCallCheck(this,BufferList);this.head=null;this.tail=null;this.length=0;}_createClass(BufferList,[{key:"push",value:function push(v){var entry={data:v,next:null};if(this.length>0)this.tail.next=entry;else this.head=entry;this.tail=entry;++this.length;}},{key:"unshift",value:function unshift(v){var entry={data:v,next:this.head};if(this.length===0)this.tail=entry;this.head=entry;++this.length;}},{key:"shift",value:function shift(){if(this.length===0)return;var ret=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return ret;}},{key:"clear",value:function clear(){this.head=this.tail=null;this.length=0;}},{key:"join",value:function join(s){if(this.length===0)return'';var p=this.head;var ret=''+p.data;while(p=p.next)ret+=s+p.data;return ret;}},{key:"concat",value:function concat(n){if(this.length===0)return Buffer.alloc(0);var ret=Buffer.allocUnsafe(n>>>0);var p=this.head;var i=0;while(p){copyBuffer(p.data,ret,i);i+=p.data.length;p=p.next;}return ret;}// Consumes a specified amount of bytes or characters from the buffered data.
2701
+ if(reject!==null){iterator[kLastPromise]=null;iterator[kLastResolve]=null;iterator[kLastReject]=null;reject(err);}iterator[kError]=err;return;}var resolve=iterator[kLastResolve];if(resolve!==null){iterator[kLastPromise]=null;iterator[kLastResolve]=null;iterator[kLastReject]=null;resolve(createIterResult(undefined,true));}iterator[kEnded]=true;});stream.on('readable',onReadable.bind(null,iterator));return iterator;};module.exports=createReadableStreamAsyncIterator;}).call(this);}).call(this,require('_process'));},{"./end-of-stream":115,"_process":87}],113:[function(require,module,exports){'use strict';function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;})),keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}return target;}function _defineProperty(obj,key,value){key=_toPropertyKey(key);if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return _typeof(key)==="symbol"?key:String(key);}function _toPrimitive(input,hint){if(_typeof(input)!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(_typeof(res)!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.");}return(hint==="string"?String:Number)(input);}var _require=require('buffer'),Buffer=_require.Buffer;var _require2=require('util'),inspect=_require2.inspect;var custom=inspect&&inspect.custom||'inspect';function copyBuffer(src,target,offset){Buffer.prototype.copy.call(src,target,offset);}module.exports=/*#__PURE__*/function(){function BufferList(){_classCallCheck(this,BufferList);this.head=null;this.tail=null;this.length=0;}_createClass(BufferList,[{key:"push",value:function push(v){var entry={data:v,next:null};if(this.length>0)this.tail.next=entry;else this.head=entry;this.tail=entry;++this.length;}},{key:"unshift",value:function unshift(v){var entry={data:v,next:this.head};if(this.length===0)this.tail=entry;this.head=entry;++this.length;}},{key:"shift",value:function shift(){if(this.length===0)return;var ret=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return ret;}},{key:"clear",value:function clear(){this.head=this.tail=null;this.length=0;}},{key:"join",value:function join(s){if(this.length===0)return'';var p=this.head;var ret=''+p.data;while(p=p.next)ret+=s+p.data;return ret;}},{key:"concat",value:function concat(n){if(this.length===0)return Buffer.alloc(0);var ret=Buffer.allocUnsafe(n>>>0);var p=this.head;var i=0;while(p){copyBuffer(p.data,ret,i);i+=p.data.length;p=p.next;}return ret;}// Consumes a specified amount of bytes or characters from the buffered data.
2527
2702
  },{key:"consume",value:function consume(n,hasStrings){var ret;if(n<this.head.data.length){// `slice` is the same for buffers and strings.
2528
2703
  ret=this.head.data.slice(0,n);this.head.data=this.head.data.slice(n);}else if(n===this.head.data.length){// First chunk is a perfect match.
2529
2704
  ret=this.shift();}else{// Result spans more than one buffer.
@@ -2532,7 +2707,7 @@ ret=hasStrings?this._getString(n):this._getBuffer(n);}return ret;}},{key:"first"
2532
2707
  },{key:"_getBuffer",value:function _getBuffer(n){var ret=Buffer.allocUnsafe(n);var p=this.head;var c=1;p.data.copy(ret);n-=p.data.length;while(p=p.next){var buf=p.data;var nb=n>buf.length?buf.length:n;buf.copy(ret,ret.length-n,0,nb);n-=nb;if(n===0){if(nb===buf.length){++c;if(p.next)this.head=p.next;else this.head=this.tail=null;}else{this.head=p;p.data=buf.slice(nb);}break;}++c;}this.length-=c;return ret;}// Make sure the linked list only shows the minimal necessary information.
2533
2708
  },{key:custom,value:function value(_,options){return inspect(this,_objectSpread(_objectSpread({},options),{},{// Only inspect one level.
2534
2709
  depth:0,// It should not recurse.
2535
- customInspect:false}));}}]);return BufferList;}();},{"buffer":20,"util":18}],113:[function(require,module,exports){(function(process){(function(){'use strict';// undocumented cb() API, needed for core, not for public API
2710
+ customInspect:false}));}}]);return BufferList;}();},{"buffer":20,"util":18}],114:[function(require,module,exports){(function(process){(function(){'use strict';// undocumented cb() API, needed for core, not for public API
2536
2711
  function destroy(err,cb){var _this=this;var readableDestroyed=this._readableState&&this._readableState.destroyed;var writableDestroyed=this._writableState&&this._writableState.destroyed;if(readableDestroyed||writableDestroyed){if(cb){cb(err);}else if(err){if(!this._writableState){process.nextTick(emitErrorNT,this,err);}else if(!this._writableState.errorEmitted){this._writableState.errorEmitted=true;process.nextTick(emitErrorNT,this,err);}}return this;}// we set destroyed to true before firing error callbacks in order
2537
2712
  // to make it re-entrance safe in case destroy() is called within callbacks
2538
2713
  if(this._readableState){this._readableState.destroyed=true;}// if this is a duplex stream mark the writable part as destroyed as well
@@ -2541,15 +2716,15 @@ if(this._writableState){this._writableState.destroyed=true;}this._destroy(err||n
2541
2716
  // For now when you opt-in to autoDestroy we allow
2542
2717
  // the error to be emitted nextTick. In a future
2543
2718
  // semver major update we should change the default to this.
2544
- var rState=stream._readableState;var wState=stream._writableState;if(rState&&rState.autoDestroy||wState&&wState.autoDestroy)stream.destroy(err);else stream.emit('error',err);}module.exports={destroy:destroy,undestroy:undestroy,errorOrDestroy:errorOrDestroy};}).call(this);}).call(this,require('_process'));},{"_process":86}],114:[function(require,module,exports){// Ported from https://github.com/mafintosh/end-of-stream with
2719
+ var rState=stream._readableState;var wState=stream._writableState;if(rState&&rState.autoDestroy||wState&&wState.autoDestroy)stream.destroy(err);else stream.emit('error',err);}module.exports={destroy:destroy,undestroy:undestroy,errorOrDestroy:errorOrDestroy};}).call(this);}).call(this,require('_process'));},{"_process":87}],115:[function(require,module,exports){// Ported from https://github.com/mafintosh/end-of-stream with
2545
2720
  // permission from the author, Mathias Buus (@mafintosh).
2546
2721
  'use strict';var ERR_STREAM_PREMATURE_CLOSE=require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE;function once(callback){var called=false;return function(){if(called)return;called=true;for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}callback.apply(this,args);};}function noop(){}function isRequest(stream){return stream.setHeader&&typeof stream.abort==='function';}function eos(stream,opts,callback){if(typeof opts==='function')return eos(stream,null,opts);if(!opts)opts={};callback=once(callback||noop);var readable=opts.readable||opts.readable!==false&&stream.readable;var writable=opts.writable||opts.writable!==false&&stream.writable;var onlegacyfinish=function onlegacyfinish(){if(!stream.writable)onfinish();};var writableEnded=stream._writableState&&stream._writableState.finished;var onfinish=function onfinish(){writable=false;writableEnded=true;if(!readable)callback.call(stream);};var readableEnded=stream._readableState&&stream._readableState.endEmitted;var onend=function onend(){readable=false;readableEnded=true;if(!writable)callback.call(stream);};var onerror=function onerror(err){callback.call(stream,err);};var onclose=function onclose(){var err;if(readable&&!readableEnded){if(!stream._readableState||!stream._readableState.ended)err=new ERR_STREAM_PREMATURE_CLOSE();return callback.call(stream,err);}if(writable&&!writableEnded){if(!stream._writableState||!stream._writableState.ended)err=new ERR_STREAM_PREMATURE_CLOSE();return callback.call(stream,err);}};var onrequest=function onrequest(){stream.req.on('finish',onfinish);};if(isRequest(stream)){stream.on('complete',onfinish);stream.on('abort',onclose);if(stream.req)onrequest();else stream.on('request',onrequest);}else if(writable&&!stream._writableState){// legacy streams
2547
- stream.on('end',onlegacyfinish);stream.on('close',onlegacyfinish);}stream.on('end',onend);stream.on('finish',onfinish);if(opts.error!==false)stream.on('error',onerror);stream.on('close',onclose);return function(){stream.removeListener('complete',onfinish);stream.removeListener('abort',onclose);stream.removeListener('request',onrequest);if(stream.req)stream.req.removeListener('finish',onfinish);stream.removeListener('end',onlegacyfinish);stream.removeListener('close',onlegacyfinish);stream.removeListener('finish',onfinish);stream.removeListener('end',onend);stream.removeListener('error',onerror);stream.removeListener('close',onclose);};}module.exports=eos;},{"../../../errors":105}],115:[function(require,module,exports){module.exports=function(){throw new Error('Readable.from is not available in the browser');};},{}],116:[function(require,module,exports){// Ported from https://github.com/mafintosh/pump with
2722
+ stream.on('end',onlegacyfinish);stream.on('close',onlegacyfinish);}stream.on('end',onend);stream.on('finish',onfinish);if(opts.error!==false)stream.on('error',onerror);stream.on('close',onclose);return function(){stream.removeListener('complete',onfinish);stream.removeListener('abort',onclose);stream.removeListener('request',onrequest);if(stream.req)stream.req.removeListener('finish',onfinish);stream.removeListener('end',onlegacyfinish);stream.removeListener('close',onlegacyfinish);stream.removeListener('finish',onfinish);stream.removeListener('end',onend);stream.removeListener('error',onerror);stream.removeListener('close',onclose);};}module.exports=eos;},{"../../../errors":106}],116:[function(require,module,exports){module.exports=function(){throw new Error('Readable.from is not available in the browser');};},{}],117:[function(require,module,exports){// Ported from https://github.com/mafintosh/pump with
2548
2723
  // permission from the author, Mathias Buus (@mafintosh).
2549
2724
  'use strict';var eos;function once(callback){var called=false;return function(){if(called)return;called=true;callback.apply(void 0,arguments);};}var _require$codes=require('../../../errors').codes,ERR_MISSING_ARGS=_require$codes.ERR_MISSING_ARGS,ERR_STREAM_DESTROYED=_require$codes.ERR_STREAM_DESTROYED;function noop(err){// Rethrow the error if it exists to avoid swallowing it
2550
2725
  if(err)throw err;}function isRequest(stream){return stream.setHeader&&typeof stream.abort==='function';}function destroyer(stream,reading,writing,callback){callback=once(callback);var closed=false;stream.on('close',function(){closed=true;});if(eos===undefined)eos=require('./end-of-stream');eos(stream,{readable:reading,writable:writing},function(err){if(err)return callback(err);closed=true;callback();});var destroyed=false;return function(err){if(closed)return;if(destroyed)return;destroyed=true;// request.destroy just do .end - .abort is what we want
2551
- if(isRequest(stream))return stream.abort();if(typeof stream.destroy==='function')return stream.destroy();callback(err||new ERR_STREAM_DESTROYED('pipe'));};}function call(fn){fn();}function pipe(from,to){return from.pipe(to);}function popCallback(streams){if(!streams.length)return noop;if(typeof streams[streams.length-1]!=='function')return noop;return streams.pop();}function pipeline(){for(var _len=arguments.length,streams=new Array(_len),_key=0;_key<_len;_key++){streams[_key]=arguments[_key];}var callback=popCallback(streams);if(Array.isArray(streams[0]))streams=streams[0];if(streams.length<2){throw new ERR_MISSING_ARGS('streams');}var error;var destroys=streams.map(function(stream,i){var reading=i<streams.length-1;var writing=i>0;return destroyer(stream,reading,writing,function(err){if(!error)error=err;if(err)destroys.forEach(call);if(reading)return;destroys.forEach(call);callback(error);});});return streams.reduce(pipe);}module.exports=pipeline;},{"../../../errors":105,"./end-of-stream":114}],117:[function(require,module,exports){'use strict';var ERR_INVALID_OPT_VALUE=require('../../../errors').codes.ERR_INVALID_OPT_VALUE;function highWaterMarkFrom(options,isDuplex,duplexKey){return options.highWaterMark!=null?options.highWaterMark:isDuplex?options[duplexKey]:null;}function getHighWaterMark(state,options,duplexKey,isDuplex){var hwm=highWaterMarkFrom(options,isDuplex,duplexKey);if(hwm!=null){if(!(isFinite(hwm)&&Math.floor(hwm)===hwm)||hwm<0){var name=isDuplex?duplexKey:'highWaterMark';throw new ERR_INVALID_OPT_VALUE(name,hwm);}return Math.floor(hwm);}// Default value
2552
- return state.objectMode?16:16*1024;}module.exports={getHighWaterMark:getHighWaterMark};},{"../../../errors":105}],118:[function(require,module,exports){module.exports=require('events').EventEmitter;},{"events":44}],119:[function(require,module,exports){exports=module.exports=require('./lib/_stream_readable.js');exports.Stream=exports;exports.Readable=exports;exports.Writable=require('./lib/_stream_writable.js');exports.Duplex=require('./lib/_stream_duplex.js');exports.Transform=require('./lib/_stream_transform.js');exports.PassThrough=require('./lib/_stream_passthrough.js');exports.finished=require('./lib/internal/streams/end-of-stream.js');exports.pipeline=require('./lib/internal/streams/pipeline.js');},{"./lib/_stream_duplex.js":106,"./lib/_stream_passthrough.js":107,"./lib/_stream_readable.js":108,"./lib/_stream_transform.js":109,"./lib/_stream_writable.js":110,"./lib/internal/streams/end-of-stream.js":114,"./lib/internal/streams/pipeline.js":116}],120:[function(require,module,exports){// Copyright Joyent, Inc. and other Node contributors.
2726
+ if(isRequest(stream))return stream.abort();if(typeof stream.destroy==='function')return stream.destroy();callback(err||new ERR_STREAM_DESTROYED('pipe'));};}function call(fn){fn();}function pipe(from,to){return from.pipe(to);}function popCallback(streams){if(!streams.length)return noop;if(typeof streams[streams.length-1]!=='function')return noop;return streams.pop();}function pipeline(){for(var _len=arguments.length,streams=new Array(_len),_key=0;_key<_len;_key++){streams[_key]=arguments[_key];}var callback=popCallback(streams);if(Array.isArray(streams[0]))streams=streams[0];if(streams.length<2){throw new ERR_MISSING_ARGS('streams');}var error;var destroys=streams.map(function(stream,i){var reading=i<streams.length-1;var writing=i>0;return destroyer(stream,reading,writing,function(err){if(!error)error=err;if(err)destroys.forEach(call);if(reading)return;destroys.forEach(call);callback(error);});});return streams.reduce(pipe);}module.exports=pipeline;},{"../../../errors":106,"./end-of-stream":115}],118:[function(require,module,exports){'use strict';var ERR_INVALID_OPT_VALUE=require('../../../errors').codes.ERR_INVALID_OPT_VALUE;function highWaterMarkFrom(options,isDuplex,duplexKey){return options.highWaterMark!=null?options.highWaterMark:isDuplex?options[duplexKey]:null;}function getHighWaterMark(state,options,duplexKey,isDuplex){var hwm=highWaterMarkFrom(options,isDuplex,duplexKey);if(hwm!=null){if(!(isFinite(hwm)&&Math.floor(hwm)===hwm)||hwm<0){var name=isDuplex?duplexKey:'highWaterMark';throw new ERR_INVALID_OPT_VALUE(name,hwm);}return Math.floor(hwm);}// Default value
2727
+ return state.objectMode?16:16*1024;}module.exports={getHighWaterMark:getHighWaterMark};},{"../../../errors":106}],119:[function(require,module,exports){module.exports=require('events').EventEmitter;},{"events":44}],120:[function(require,module,exports){exports=module.exports=require('./lib/_stream_readable.js');exports.Stream=exports;exports.Readable=exports;exports.Writable=require('./lib/_stream_writable.js');exports.Duplex=require('./lib/_stream_duplex.js');exports.Transform=require('./lib/_stream_transform.js');exports.PassThrough=require('./lib/_stream_passthrough.js');exports.finished=require('./lib/internal/streams/end-of-stream.js');exports.pipeline=require('./lib/internal/streams/pipeline.js');},{"./lib/_stream_duplex.js":107,"./lib/_stream_passthrough.js":108,"./lib/_stream_readable.js":109,"./lib/_stream_transform.js":110,"./lib/_stream_writable.js":111,"./lib/internal/streams/end-of-stream.js":115,"./lib/internal/streams/pipeline.js":117}],121:[function(require,module,exports){// Copyright Joyent, Inc. and other Node contributors.
2553
2728
  //
2554
2729
  // Permission is hereby granted, free of charge, to any person obtaining a
2555
2730
  // copy of this software and associated documentation files (the
@@ -2603,13 +2778,13 @@ function utf8End(buf){var r=buf&&buf.length?this.write(buf):'';if(this.lastNeed)
2603
2778
  function utf16Text(buf,i){if((buf.length-i)%2===0){var r=buf.toString('utf16le',i);if(r){var c=r.charCodeAt(r.length-1);if(c>=0xD800&&c<=0xDBFF){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=buf[buf.length-2];this.lastChar[1]=buf[buf.length-1];return r.slice(0,-1);}}return r;}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=buf[buf.length-1];return buf.toString('utf16le',i,buf.length-1);}// For UTF-16LE we do not explicitly append special replacement characters if we
2604
2779
  // end on a partial character, we simply let v8 handle that.
2605
2780
  function utf16End(buf){var r=buf&&buf.length?this.write(buf):'';if(this.lastNeed){var end=this.lastTotal-this.lastNeed;return r+this.lastChar.toString('utf16le',0,end);}return r;}function base64Text(buf,i){var n=(buf.length-i)%3;if(n===0)return buf.toString('base64',i);this.lastNeed=3-n;this.lastTotal=3;if(n===1){this.lastChar[0]=buf[buf.length-1];}else{this.lastChar[0]=buf[buf.length-2];this.lastChar[1]=buf[buf.length-1];}return buf.toString('base64',i,buf.length-n);}function base64End(buf){var r=buf&&buf.length?this.write(buf):'';if(this.lastNeed)return r+this.lastChar.toString('base64',0,3-this.lastNeed);return r;}// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
2606
- function simpleWrite(buf){return buf.toString(this.encoding);}function simpleEnd(buf){return buf&&buf.length?this.write(buf):'';}},{"safe-buffer":96}],121:[function(require,module,exports){(function(setImmediate,clearImmediate){(function(){var nextTick=require('process/browser.js').nextTick;var apply=Function.prototype.apply;var slice=Array.prototype.slice;var immediateIds={};var nextImmediateId=0;// DOM APIs, for completeness
2781
+ function simpleWrite(buf){return buf.toString(this.encoding);}function simpleEnd(buf){return buf&&buf.length?this.write(buf):'';}},{"safe-buffer":97}],122:[function(require,module,exports){(function(setImmediate,clearImmediate){(function(){var nextTick=require('process/browser.js').nextTick;var apply=Function.prototype.apply;var slice=Array.prototype.slice;var immediateIds={};var nextImmediateId=0;// DOM APIs, for completeness
2607
2782
  exports.setTimeout=function(){return new Timeout(apply.call(setTimeout,window,arguments),clearTimeout);};exports.setInterval=function(){return new Timeout(apply.call(setInterval,window,arguments),clearInterval);};exports.clearTimeout=exports.clearInterval=function(timeout){timeout.close();};function Timeout(id,clearFn){this._id=id;this._clearFn=clearFn;}Timeout.prototype.unref=Timeout.prototype.ref=function(){};Timeout.prototype.close=function(){this._clearFn.call(window,this._id);};// Does not start the time, just sets up the members needed.
2608
2783
  exports.enroll=function(item,msecs){clearTimeout(item._idleTimeoutId);item._idleTimeout=msecs;};exports.unenroll=function(item){clearTimeout(item._idleTimeoutId);item._idleTimeout=-1;};exports._unrefActive=exports.active=function(item){clearTimeout(item._idleTimeoutId);var msecs=item._idleTimeout;if(msecs>=0){item._idleTimeoutId=setTimeout(function onTimeout(){if(item._onTimeout)item._onTimeout();},msecs);}};// That's not how node.js implements it but the exposed api is the same.
2609
2784
  exports.setImmediate=typeof setImmediate==="function"?setImmediate:function(fn){var id=nextImmediateId++;var args=arguments.length<2?false:slice.call(arguments,1);immediateIds[id]=true;nextTick(function onNextTick(){if(immediateIds[id]){// fn.call() is faster so we optimize for the common use-case
2610
2785
  // @see http://jsperf.com/call-apply-segu
2611
2786
  if(args){fn.apply(null,args);}else{fn.call(null);}// Prevent ids from leaking
2612
- exports.clearImmediate(id);}});return id;};exports.clearImmediate=typeof clearImmediate==="function"?clearImmediate:function(id){delete immediateIds[id];};}).call(this);}).call(this,require("timers").setImmediate,require("timers").clearImmediate);},{"process/browser.js":86,"timers":121}],122:[function(require,module,exports){/*
2787
+ exports.clearImmediate(id);}});return id;};exports.clearImmediate=typeof clearImmediate==="function"?clearImmediate:function(id){delete immediateIds[id];};}).call(this);}).call(this,require("timers").setImmediate,require("timers").clearImmediate);},{"process/browser.js":87,"timers":122}],123:[function(require,module,exports){/*
2613
2788
  * Copyright Joyent, Inc. and other Node contributors.
2614
2789
  *
2615
2790
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -2787,7 +2962,7 @@ if(psychotic){result.hostname=isAbsolute?'':srcPath.length?srcPath.shift():'';re
2787
2962
  * this especially happens in cases like
2788
2963
  * url.resolveObject('mailto:local1@domain1', 'local2@domain2')
2789
2964
  */var authInHost=result.host&&result.host.indexOf('@')>0?result.host.split('@'):false;if(authInHost){result.auth=authInHost.shift();result.hostname=authInHost.shift();result.host=result.hostname;}}mustEndAbs=mustEndAbs||result.host&&srcPath.length;if(mustEndAbs&&!isAbsolute){srcPath.unshift('');}if(srcPath.length>0){result.pathname=srcPath.join('/');}else{result.pathname=null;result.path=null;}// to support request.http
2790
- if(result.pathname!==null||result.search!==null){result.path=(result.pathname?result.pathname:'')+(result.search?result.search:'');}result.auth=relative.auth||result.auth;result.slashes=result.slashes||relative.slashes;result.href=result.format();return result;};Url.prototype.parseHost=function(){var host=this.host;var port=portPattern.exec(host);if(port){port=port[0];if(port!==':'){this.port=port.substr(1);}host=host.substr(0,host.length-port.length);}if(host){this.hostname=host;}};exports.parse=urlParse;exports.resolve=urlResolve;exports.resolveObject=urlResolveObject;exports.format=urlFormat;exports.Url=Url;},{"punycode":87,"qs":89}],123:[function(require,module,exports){(function(global){(function(){/**
2965
+ if(result.pathname!==null||result.search!==null){result.path=(result.pathname?result.pathname:'')+(result.search?result.search:'');}result.auth=relative.auth||result.auth;result.slashes=result.slashes||relative.slashes;result.href=result.format();return result;};Url.prototype.parseHost=function(){var host=this.host;var port=portPattern.exec(host);if(port){port=port[0];if(port!==':'){this.port=port.substr(1);}host=host.substr(0,host.length-port.length);}if(host){this.hostname=host;}};exports.parse=urlParse;exports.resolve=urlResolve;exports.resolveObject=urlResolveObject;exports.format=urlFormat;exports.Url=Url;},{"punycode":88,"qs":90}],124:[function(require,module,exports){(function(global){(function(){/**
2791
2966
  * Module exports.
2792
2967
  */module.exports=deprecate;/**
2793
2968
  * Mark that a method should not be used.
@@ -2812,12 +2987,12 @@ if(result.pathname!==null||result.search!==null){result.path=(result.pathname?re
2812
2987
  * @returns {Boolean}
2813
2988
  * @api private
2814
2989
  */function config(name){// accessing global.localStorage can trigger a DOMException in sandboxed iframes
2815
- try{if(!global.localStorage)return false;}catch(_){return false;}var val=global.localStorage[name];if(null==val)return false;return String(val).toLowerCase()==='true';}}).call(this);}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{});},{}],124:[function(require,module,exports){// Returns a wrapper function that returns a wrapped callback
2990
+ try{if(!global.localStorage)return false;}catch(_){return false;}var val=global.localStorage[name];if(null==val)return false;return String(val).toLowerCase()==='true';}}).call(this);}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{});},{}],125:[function(require,module,exports){// Returns a wrapper function that returns a wrapped callback
2816
2991
  // The wrapper function should do some stuff, and return a
2817
2992
  // presumably different callback function.
2818
2993
  // This makes sure that own properties are retained, so that
2819
2994
  // decorations and such are not lost along the way.
2820
- module.exports=wrappy;function wrappy(fn,cb){if(fn&&cb)return wrappy(fn)(cb);if(typeof fn!=='function')throw new TypeError('need wrapper function');Object.keys(fn).forEach(function(k){wrapper[k]=fn[k];});return wrapper;function wrapper(){var args=new Array(arguments.length);for(var i=0;i<args.length;i++){args[i]=arguments[i];}var ret=fn.apply(this,args);var cb=args[args.length-1];if(typeof ret==='function'&&ret!==cb){Object.keys(cb).forEach(function(k){ret[k]=cb[k];});}return ret;}}},{}],125:[function(require,module,exports){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){var target={};for(var i=0;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;}},{}],126:[function(require,module,exports){/**
2995
+ module.exports=wrappy;function wrappy(fn,cb){if(fn&&cb)return wrappy(fn)(cb);if(typeof fn!=='function')throw new TypeError('need wrapper function');Object.keys(fn).forEach(function(k){wrapper[k]=fn[k];});return wrapper;function wrapper(){var args=new Array(arguments.length);for(var i=0;i<args.length;i++){args[i]=arguments[i];}var ret=fn.apply(this,args);var cb=args[args.length-1];if(typeof ret==='function'&&ret!==cb){Object.keys(cb).forEach(function(k){ret[k]=cb[k];});}return ret;}}},{}],126:[function(require,module,exports){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){var target={};for(var i=0;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;}},{}],127:[function(require,module,exports){/**
2821
2996
  * Fable Application Services Support Library
2822
2997
  * @author <steven@velozo.com>
2823
2998
  */ // Pre-init services
@@ -2869,21 +3044,21 @@ this.servicesMap[tmpServiceType][tmpServiceHash]=pServiceInstance;// If this is
2869
3044
  if(!this.services.hasOwnProperty(tmpServiceType)){this.setDefaultServiceInstantiation(tmpServiceType,tmpServiceHash,false);}return pServiceInstance;}},{key:"setDefaultServiceInstantiation",value:function setDefaultServiceInstantiation(pServiceType,pServiceHash,pOverwriteService){// Overwrite services by default, unless told not to
2870
3045
  var tmpOverwriteService=typeof pOverwriteService==='undefined'?true:pOverwriteService;// Make sure the service exists
2871
3046
  if(this.servicesMap[pServiceType].hasOwnProperty(pServiceHash)){if(!this.hasOwnProperty(pServiceType)||tmpOverwriteService){this[pServiceType]=this.servicesMap[pServiceType][pServiceHash];}if(!this.services.hasOwnProperty(pServiceType)||tmpOverwriteService){this.services[pServiceType]=this.servicesMap[pServiceType][pServiceHash];}return true;}return false;}}]);return Fable;}(libFableServiceBase.CoreServiceProviderBase);// This is for backwards compatibility
2872
- function autoConstruct(pSettings){return new Fable(pSettings);}module.exports=Fable;module.exports["new"]=autoConstruct;module.exports.LogProviderBase=libFableLog.LogProviderBase;module.exports.ServiceProviderBase=libFableServiceBase;module.exports.CoreServiceProviderBase=libFableServiceBase.CoreServiceProviderBase;module.exports.precedent=libFableSettings.precedent;},{"./services/Fable-Service-Anticipate.js":127,"./services/Fable-Service-CSVParser.js":128,"./services/Fable-Service-DataFormat.js":129,"./services/Fable-Service-DataGeneration.js":131,"./services/Fable-Service-DateManipulation.js":132,"./services/Fable-Service-EnvironmentData.js":133,"./services/Fable-Service-FilePersistence.js":134,"./services/Fable-Service-Math.js":135,"./services/Fable-Service-MetaTemplate.js":136,"./services/Fable-Service-Operation.js":140,"./services/Fable-Service-ProgressTime.js":141,"./services/Fable-Service-ProgressTrackerSet.js":143,"./services/Fable-Service-RestClient.js":144,"./services/Fable-Service-Template.js":145,"./services/Fable-Service-Utility.js":146,"cachetrax":22,"fable-log":50,"fable-serviceproviderbase":51,"fable-settings":54,"fable-uuid":56,"manyfest":79}],127:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');var FableServiceAnticipate=/*#__PURE__*/function(_libFableServiceBase){_inherits(FableServiceAnticipate,_libFableServiceBase);function FableServiceAnticipate(pFable,pOptions,pServiceHash){var _this18;_classCallCheck2(this,FableServiceAnticipate);_this18=_callSuper(this,FableServiceAnticipate,[pFable,pOptions,pServiceHash]);_this18.serviceType='AsyncAnticipate';// The queue of operations waiting to run.
3047
+ function autoConstruct(pSettings){return new Fable(pSettings);}module.exports=Fable;module.exports["new"]=autoConstruct;module.exports.LogProviderBase=libFableLog.LogProviderBase;module.exports.ServiceProviderBase=libFableServiceBase;module.exports.CoreServiceProviderBase=libFableServiceBase.CoreServiceProviderBase;module.exports.precedent=libFableSettings.precedent;},{"./services/Fable-Service-Anticipate.js":128,"./services/Fable-Service-CSVParser.js":129,"./services/Fable-Service-DataFormat.js":130,"./services/Fable-Service-DataGeneration.js":132,"./services/Fable-Service-DateManipulation.js":133,"./services/Fable-Service-EnvironmentData.js":134,"./services/Fable-Service-FilePersistence.js":135,"./services/Fable-Service-Math.js":136,"./services/Fable-Service-MetaTemplate.js":137,"./services/Fable-Service-Operation.js":141,"./services/Fable-Service-ProgressTime.js":142,"./services/Fable-Service-ProgressTrackerSet.js":144,"./services/Fable-Service-RestClient.js":145,"./services/Fable-Service-Template.js":146,"./services/Fable-Service-Utility.js":147,"cachetrax":22,"fable-log":50,"fable-serviceproviderbase":51,"fable-settings":54,"fable-uuid":56,"manyfest":80}],128:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');var FableServiceAnticipate=/*#__PURE__*/function(_libFableServiceBase){_inherits(FableServiceAnticipate,_libFableServiceBase);function FableServiceAnticipate(pFable,pOptions,pServiceHash){var _this18;_classCallCheck2(this,FableServiceAnticipate);_this18=_callSuper(this,FableServiceAnticipate,[pFable,pOptions,pServiceHash]);_this18.serviceType='AsyncAnticipate';// The queue of operations waiting to run.
2873
3048
  _this18.operationQueue=[];_this18.erroredOperations=[];_this18.executingOperationCount=0;_this18.completedOperationCount=0;_this18.callDepth=0;_this18.maxOperations=1;_this18.lastError=undefined;_this18.waitingFunctions=[];return _this18;}_createClass2(FableServiceAnticipate,[{key:"checkQueue",value:function checkQueue(){// This could be combined with the last else if stanza but the logic for errors and non-errors would be blended and more complex to follow so keeping it unrolled.
2874
3049
  if(this.lastError){// If there are no operations left, and we have waiting functions, call them.
2875
3050
  for(var i=0;i<this.waitingFunctions.length;i++){//this.log.trace('Calling waiting function.')
2876
3051
  this.waitingFunctions[i](this.lastError);}// Reset our state
2877
3052
  this.lastError=undefined;this.waitingFunctions=[];}// This checks to see if we need to start any operations.
2878
3053
  else if(this.operationQueue.length>0&&this.executingOperationCount<this.maxOperations){var tmpOperation=this.operationQueue.shift();this.executingOperationCount+=1;tmpOperation(this.buildAnticipatorCallback());}else if(this.waitingFunctions.length>0&&this.executingOperationCount<1){// If there are no operations left, and we have waiting functions, call them.
2879
- for(var _i11=0;_i11<this.waitingFunctions.length;_i11++){//this.log.trace('Calling waiting function.')
2880
- this.waitingFunctions[_i11](this.lastError);}// Reset our state
3054
+ for(var _i13=0;_i13<this.waitingFunctions.length;_i13++){//this.log.trace('Calling waiting function.')
3055
+ this.waitingFunctions[_i13](this.lastError);}// Reset our state
2881
3056
  this.lastError=undefined;this.waitingFunctions=[];}}// Expects a function fAsynchronousFunction(fCallback)
2882
3057
  },{key:"anticipate",value:function anticipate(fAsynchronousFunction){//this.log.trace('Adding a function...')
2883
3058
  this.operationQueue.push(fAsynchronousFunction);this.checkQueue();}},{key:"buildAnticipatorCallback",value:function buildAnticipatorCallback(){// This uses closure-scoped state to track the callback state
2884
3059
  var tmpCallbackState={Called:false,Error:undefined,OperationSet:this};return hoistedCallback.bind(this);function hoistedCallback(pError){if(tmpCallbackState.Called){// If they call the callback twice, throw an error
2885
3060
  throw new Error("Anticipation async callback called twice...");}tmpCallbackState.Called=true;this.lastError=pError;tmpCallbackState.OperationSet.executingOperationCount-=1;tmpCallbackState.OperationSet.completedOperationCount+=1;tmpCallbackState.OperationSet.callDepth++;// TODO: Figure out a better pattern for chaining templates so the call stack doesn't get abused.
2886
- if(tmpCallbackState.OperationSet.callDepth>400){tmpCallbackState.OperationSet.callDepth=0;setTimeout(tmpCallbackState.OperationSet.checkQueue.bind(this),0);}else{tmpCallbackState.OperationSet.checkQueue();}}}},{key:"wait",value:function wait(fCallback){this.waitingFunctions.push(fCallback);this.checkQueue();}}]);return FableServiceAnticipate;}(libFableServiceBase);module.exports=FableServiceAnticipate;},{"fable-serviceproviderbase":51}],128:[function(require,module,exports){var libFableServiceProviderBase=require('fable-serviceproviderbase');/**
3061
+ if(tmpCallbackState.OperationSet.callDepth>400){tmpCallbackState.OperationSet.callDepth=0;setTimeout(tmpCallbackState.OperationSet.checkQueue.bind(this),0);}else{tmpCallbackState.OperationSet.checkQueue();}}}},{key:"wait",value:function wait(fCallback){this.waitingFunctions.push(fCallback);this.checkQueue();}}]);return FableServiceAnticipate;}(libFableServiceBase);module.exports=FableServiceAnticipate;},{"fable-serviceproviderbase":51}],129:[function(require,module,exports){var libFableServiceProviderBase=require('fable-serviceproviderbase');/**
2887
3062
  * Parsing CSVs. Why? Because it's a thing that needs to be done.
2888
3063
  *
2889
3064
  * 1. And the other node CSV parsers had issues with the really messy files we had.
@@ -2896,7 +3071,7 @@ if(tmpCallbackState.OperationSet.callDepth>400){tmpCallbackState.OperationSet.ca
2896
3071
  *
2897
3072
  * @class CSVParser
2898
3073
  */var CSVParser=/*#__PURE__*/function(_libFableServiceProvi7){_inherits(CSVParser,_libFableServiceProvi7);function CSVParser(pFable,pOptions,pServiceHash){var _this19;_classCallCheck2(this,CSVParser);_this19=_callSuper(this,CSVParser,[pFable,pOptions,pServiceHash]);_this19.serviceType='CSVParser';_this19.Header=[];_this19.HeaderFieldNames=[];_this19.Delimiter=',';_this19.QuoteCharacter='"';_this19.CleanCharacters=['\r'];_this19.HeaderLineIndex=0;_this19.HasHeader=true;_this19.HasSetHeader=false;_this19.EmitHeader=false;_this19.EmitJSON=true;_this19.EscapedQuoteString='&quot;';// Current Line Parsing State
2899
- _this19.CurrentLine='';_this19.CurrentRecord=[];_this19.InQuote=false;_this19.InEscapedQuote=false;_this19.LinesParsed=0;_this19.RowsEmitted=0;return _this19;}_createClass2(CSVParser,[{key:"marshalRowToJSON",value:function marshalRowToJSON(pRowArray){if(!Array.isArray(pRowArray)){return false;}for(var i=this.HeaderFieldNames.length;i<pRowArray.length;i++){this.HeaderFieldNames[i]="".concat(i);}var tmpObject={};for(var _i12=0;_i12<pRowArray.length;_i12++){tmpObject[this.HeaderFieldNames[_i12]]=pRowArray[_i12];}return tmpObject;}// Set the header data, for use in marshalling to JSON.
3074
+ _this19.CurrentLine='';_this19.CurrentRecord=[];_this19.InQuote=false;_this19.InEscapedQuote=false;_this19.LinesParsed=0;_this19.RowsEmitted=0;return _this19;}_createClass2(CSVParser,[{key:"marshalRowToJSON",value:function marshalRowToJSON(pRowArray){if(!Array.isArray(pRowArray)){return false;}for(var i=this.HeaderFieldNames.length;i<pRowArray.length;i++){this.HeaderFieldNames[i]="".concat(i);}var tmpObject={};for(var _i14=0;_i14<pRowArray.length;_i14++){tmpObject[this.HeaderFieldNames[_i14]]=pRowArray[_i14];}return tmpObject;}// Set the header data, for use in marshalling to JSON.
2900
3075
  },{key:"setHeader",value:function setHeader(pHeaderArray){this.Header=pHeaderArray;for(var i=0;i<this.Header.length;i++){if(typeof this.Header[i]=='undefined'){this.HeaderFieldNames[i]="".concat(i);}else{this.HeaderFieldNames[i]=this.Header[i].toString().trim();}}}},{key:"resetRowState",value:function resetRowState(){this.CurrentRecord=[];}},{key:"pushLine",value:function pushLine(){for(var i=0;i<this.CleanCharacters.length;i++){this.CurrentLine=this.CurrentLine.replace(this.CleanCharacters[i],'');}this.CurrentRecord.push(this.CurrentLine);this.CurrentLine='';}},{key:"emitRow",value:function emitRow(pFormatAsJSON){var tmpFormatAsJSON=typeof pFormatAsJSON=='undefined'?this.EmitJSON:pFormatAsJSON;this.RowsEmitted++;var tmpCompletedRecord=this.CurrentRecord;this.CurrentRecord=[];if(tmpFormatAsJSON){return this.marshalRowToJSON(tmpCompletedRecord);}else{return tmpCompletedRecord;}}},{key:"parseCSVLine",value:function parseCSVLine(pLineString){this.LinesParsed++;for(var i=0;i<pLineString.length;i++){if(!this.InQuote&&pLineString[i]==this.Delimiter){this.pushLine();}else if(pLineString[i]==this.QuoteCharacter){// If we are in the second part of an escaped quote, ignore it.
2901
3076
  if(this.InEscapedQuote){this.InEscapedQuote=false;}// If we aren't in a quote, enter quote
2902
3077
  else if(!this.InQuote){this.InQuote=true;}// We are in a quote, so peek forward to see if this is an "escaped" quote pair
@@ -2906,7 +3081,7 @@ if(!this.InQuote){// Push the last remaining column from the buffer to the curre
2906
3081
  this.pushLine();// Check to see if there is a header -- and if so, if this is the header row
2907
3082
  if(this.HasHeader&&!this.HasSetHeader&&this.RowsEmitted==this.HeaderLineIndex){this.HasSetHeader=true;// Override the format as json bit
2908
3083
  this.setHeader(this.emitRow(false));// No matter what, formatting this as JSON is silly and we don't want to go there anyway.
2909
- if(this.EmitHeader){return this.Header;}else{return false;}}else{return this.emitRow();}}else{return false;}}}]);return CSVParser;}(libFableServiceProviderBase);module.exports=CSVParser;},{"fable-serviceproviderbase":51}],129:[function(require,module,exports){var libFableServiceProviderBase=require('fable-serviceproviderbase');/**
3084
+ if(this.EmitHeader){return this.Header;}else{return false;}}else{return this.emitRow();}}else{return false;}}}]);return CSVParser;}(libFableServiceProviderBase);module.exports=CSVParser;},{"fable-serviceproviderbase":51}],130:[function(require,module,exports){var libFableServiceProviderBase=require('fable-serviceproviderbase');/**
2910
3085
  * Data Formatting and Translation Functions
2911
3086
  *
2912
3087
  * @class DataFormat
@@ -3065,6 +3240,54 @@ return'';}else{var tmpPadLength=pTargetLength-pString.length;if(tmpPadLength>tmp
3065
3240
  * @param {string} pMatch
3066
3241
  * @returns {string}
3067
3242
  */},{key:"stringAfterMatch",value:function stringAfterMatch(pString,pMatch){var tmpStringSplitLocation=pString.indexOf(pMatch);if(tmpStringSplitLocation<0||tmpStringSplitLocation+pMatch.length>=pString.length){return'';}return pString.substring(tmpStringSplitLocation+pMatch.length);}/**
3243
+ * Count the number of segments in a string, respecting enclosures
3244
+ *
3245
+ * @param {string} pString
3246
+ * @param {string} pSeparator
3247
+ * @param {object} pEnclosureStartSymbolMap
3248
+ * @param {object} pEnclosureEndSymbolMap
3249
+ * @returns the count of segments in the string as a number
3250
+ */},{key:"stringCountSegments",value:function stringCountSegments(pString,pSeparator,pEnclosureStartSymbolMap,pEnclosureEndSymbolMap){var tmpString=typeof pString=='string'?pString:'';var tmpSeparator=typeof pSeparator=='string'?pSeparator:'.';var tmpEnclosureStartSymbolMap=_typeof(pEnclosureStartSymbolMap)=='object'?pEnclosureStart:{'{':0,'[':1,'(':2};var tmpEnclosureEndSymbolMap=_typeof(pEnclosureEndSymbolMap)=='object'?pEnclosureEnd:{'}':0,']':1,')':2};if(pString.length<1){return 0;}var tmpSegmentCount=1;var tmpEnclosureStack=[];for(var i=0;i<tmpString.length;i++){// IF This is the start of a segment
3251
+ if(tmpString[i]==tmpSeparator// AND we are not in a nested portion of the string
3252
+ &&tmpEnclosureStack.length==0){// Increment the segment count
3253
+ tmpSegmentCount++;}// IF This is the start of an enclosure
3254
+ else if(tmpEnclosureStartSymbolMap.hasOwnProperty(tmpString[i])){// Add it to the stack!
3255
+ tmpEnclosureStack.push(tmpEnclosureStartSymbolMap[tmpString[i]]);}// IF This is the end of an enclosure
3256
+ else if(tmpEnclosureEndSymbolMap.hasOwnProperty(tmpString[i])// AND it matches the current nest level symbol
3257
+ &&tmpEnclosureEndSymbolMap[tmpString[i]]==tmpEnclosureStack[tmpEnclosureStack.length-1]){// Pop it off the stack!
3258
+ tmpEnclosureStack.pop();}}return tmpSegmentCount;}/**
3259
+ * Get all segments in a string, respecting enclosures
3260
+ *
3261
+ * @param {string} pString
3262
+ * @param {string} pSeparator
3263
+ * @param {object} pEnclosureStartSymbolMap
3264
+ * @param {object} pEnclosureEndSymbolMap
3265
+ * @returns the first segment in the string as a string
3266
+ */},{key:"stringGetSegments",value:function stringGetSegments(pString,pSeparator,pEnclosureStartSymbolMap,pEnclosureEndSymbolMap){var tmpString=typeof pString=='string'?pString:'';var tmpSeparator=typeof pSeparator=='string'?pSeparator:'.';var tmpEnclosureStartSymbolMap=_typeof(pEnclosureStartSymbolMap)=='object'?pEnclosureStart:{'{':0,'[':1,'(':2};var tmpEnclosureEndSymbolMap=_typeof(pEnclosureEndSymbolMap)=='object'?pEnclosureEnd:{'}':0,']':1,')':2};var tmpCurrentSegmentStart=0;var tmpSegmentList=[];if(pString.length<1){return tmpSegmentList;}var tmpEnclosureStack=[];for(var i=0;i<tmpString.length;i++){// IF This is the start of a segment
3267
+ if(tmpString[i]==tmpSeparator// AND we are not in a nested portion of the string
3268
+ &&tmpEnclosureStack.length==0){// Return the segment
3269
+ tmpSegmentList.push(tmpString.substring(tmpCurrentSegmentStart,i));tmpCurrentSegmentStart=i+1;}// IF This is the start of an enclosure
3270
+ else if(tmpEnclosureStartSymbolMap.hasOwnProperty(tmpString[i])){// Add it to the stack!
3271
+ tmpEnclosureStack.push(tmpEnclosureStartSymbolMap[tmpString[i]]);}// IF This is the end of an enclosure
3272
+ else if(tmpEnclosureEndSymbolMap.hasOwnProperty(tmpString[i])// AND it matches the current nest level symbol
3273
+ &&tmpEnclosureEndSymbolMap[tmpString[i]]==tmpEnclosureStack[tmpEnclosureStack.length-1]){// Pop it off the stack!
3274
+ tmpEnclosureStack.pop();}}if(tmpCurrentSegmentStart<tmpString.length){tmpSegmentList.push(tmpString.substring(tmpCurrentSegmentStart));}return tmpSegmentList;}/**
3275
+ * Get the first segment in a string, respecting enclosures
3276
+ *
3277
+ * @param {string} pString
3278
+ * @param {string} pSeparator
3279
+ * @param {object} pEnclosureStartSymbolMap
3280
+ * @param {object} pEnclosureEndSymbolMap
3281
+ * @returns the first segment in the string as a string
3282
+ */},{key:"stringGetFirstSegment",value:function stringGetFirstSegment(pString,pSeparator,pEnclosureStartSymbolMap,pEnclosureEndSymbolMap){var tmpString=typeof pString=='string'?pString:'';var tmpSeparator=typeof pSeparator=='string'?pSeparator:'.';var tmpEnclosureStartSymbolMap=_typeof(pEnclosureStartSymbolMap)=='object'?pEnclosureStart:{'{':0,'[':1,'(':2};var tmpEnclosureEndSymbolMap=_typeof(pEnclosureEndSymbolMap)=='object'?pEnclosureEnd:{'}':0,']':1,')':2};if(pString.length<1){return 0;}var tmpEnclosureStack=[];for(var i=0;i<tmpString.length;i++){// IF This is the start of a segment
3283
+ if(tmpString[i]==tmpSeparator// AND we are not in a nested portion of the string
3284
+ &&tmpEnclosureStack.length==0){// Return the segment
3285
+ return tmpString.substring(0,i);}// IF This is the start of an enclosure
3286
+ else if(tmpEnclosureStartSymbolMap.hasOwnProperty(tmpString[i])){// Add it to the stack!
3287
+ tmpEnclosureStack.push(tmpEnclosureStartSymbolMap[tmpString[i]]);}// IF This is the end of an enclosure
3288
+ else if(tmpEnclosureEndSymbolMap.hasOwnProperty(tmpString[i])// AND it matches the current nest level symbol
3289
+ &&tmpEnclosureEndSymbolMap[tmpString[i]]==tmpEnclosureStack[tmpEnclosureStack.length-1]){// Pop it off the stack!
3290
+ tmpEnclosureStack.pop();}}return tmpString;}/**
3068
3291
  * Count the number of enclosures in a string based on the start and end characters.
3069
3292
  *
3070
3293
  * If no start or end characters are specified, it will default to parentheses. If the string is not a string, it will return 0.
@@ -3099,10 +3322,10 @@ return'';}if(tmpEnclosedValueEndIndex>0&&tmpEnclosedValueEndIndex>tmpEnclosedVal
3099
3322
  * @param {number} pEnclosureEnd
3100
3323
  * @returns {string}
3101
3324
  */},{key:"stringRemoveEnclosureByIndex",value:function stringRemoveEnclosureByIndex(pString,pEnclosureIndexToRemove,pEnclosureStart,pEnclosureEnd){var tmpString=typeof pString=='string'?pString:'';var tmpEnclosureIndexToRemove=typeof pEnclosureIndexToRemove=='number'?pEnclosureIndexToRemove:0;var tmpEnclosureStart=typeof pEnclosureStart=='string'?pEnclosureStart:'(';var tmpEnclosureEnd=typeof pEnclosureEnd=='string'?pEnclosureEnd:')';var tmpEnclosureCount=0;var tmpEnclosureDepth=0;var tmpMatchedEnclosureIndex=false;var tmpEnclosureStartIndex=0;var tmpEnclosureEndIndex=0;for(var i=0;i<tmpString.length;i++){// This is the start of an enclosure
3102
- if(tmpString[i]==tmpEnclosureStart){tmpEnclosureDepth++;if(tmpEnclosureDepth==1){tmpEnclosureCount++;if(tmpEnclosureIndexToRemove==tmpEnclosureCount-1){tmpMatchedEnclosureIndex=true;tmpEnclosureStartIndex=i;}}}else if(tmpString[i]==tmpEnclosureEnd){tmpEnclosureDepth--;if(tmpEnclosureDepth==0&&tmpMatchedEnclosureIndex&&tmpEnclosureEndIndex<=tmpEnclosureStartIndex){tmpEnclosureEndIndex=i;tmpMatchedEnclosureIndex=false;}}}if(tmpEnclosureCount<=tmpEnclosureIndexToRemove){return tmpString;}var tmpReturnString='';if(tmpEnclosureStartIndex>1){tmpReturnString=tmpString.substring(0,tmpEnclosureStartIndex);}if(tmpString.length>tmpEnclosureEndIndex+1&&tmpEnclosureEndIndex>tmpEnclosureStartIndex){tmpReturnString+=tmpString.substring(tmpEnclosureEndIndex+1);}return tmpReturnString;}}]);return DataFormat;}(libFableServiceProviderBase);module.exports=DataFormat;},{"fable-serviceproviderbase":51}],130:[function(require,module,exports){module.exports={"DefaultIntegerMinimum":0,"DefaultIntegerMaximum":9999999,"DefaultNumericStringLength":10,"MonthSet":["January","February","March","April","May","June","July","August","September","October","November","December"],"WeekDaySet":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"ColorSet":["Red","Orange","Yellow","Green","Blue","Indigo","Violet","Pink","Purple","Turquoise","Gold","Lime","Maroon","Navy","Coral","Teal","Brown","White","Black","Sky","Berry","Grey","Straw","Silver","Sapphire"],"SurNameSet":["Smith","Johnson","Williams","Brown","Jones","Miller","Davis","Garcia","Rodriguez","Wilson","Martinez","Anderson","Taylor","Thomas","Hernandez","Moore","Martin","Jackson","Thompson","White","Lopez","Lee","Gonzalez","Harris","Clark","Lewis","Robinson","Walker","Perez","Hall","Young","Allen","Sanchez","Wright","King","Scott","Green","Baker","Adams","Nelson","Hill","Ramirez","Campbell","Mitchell","Roberts","Carter","Phillips","Evans","Turner","Torres","Parker","Collins","Edwards","Stewart","Flores","Morris","Nguyen","Murphy","Rivera","Cook","Rogers","Morgan","Peterson","Cooper","Reed","Bailey","Bell","Gomez","Kelly","Howard","Ward","Cox","Diaz","Richardson","Wood","Watson","Brooks","Bennett","Gray","James","Reyes","Cruz","Hughes","Price","Myers","Long","Foster","Sanders","Ross","Morales","Powell","Sullivan","Russell","Ortiz","Jenkins","Gutierrez","Perry","Butler","Barnes","Fisher"],"NameSet":["Mary","Patricia","Jennifer","Linda","Elizabeth","Barbara","Susan","Jessica","Sarah","Karen","Lisa","Nancy","Betty","Sandra","Margaret","Ashley","Kimberly","Emily","Donna","Michelle","Carol","Amanda","Melissa","Deborah","Stephanie","Dorothy","Rebecca","Sharon","Laura","Cynthia","Amy","Kathleen","Angela","Shirley","Brenda","Emma","Anna","Pamela","Nicole","Samantha","Katherine","Christine","Helen","Debra","Rachel","Carolyn","Janet","Maria","Catherine","Heather","Diane","Olivia","Julie","Joyce","Victoria","Ruth","Virginia","Lauren","Kelly","Christina","Joan","Evelyn","Judith","Andrea","Hannah","Megan","Cheryl","Jacqueline","Martha","Madison","Teresa","Gloria","Sara","Janice","Ann","Kathryn","Abigail","Sophia","Frances","Jean","Alice","Judy","Isabella","Julia","Grace","Amber","Denise","Danielle","Marilyn","Beverly","Charlotte","Natalie","Theresa","Diana","Brittany","Doris","Kayla","Alexis","Lori","Marie","James","Robert","John","Michael","David","William","Richard","Joseph","Thomas","Christopher","Charles","Daniel","Matthew","Anthony","Mark","Donald","Steven","Andrew","Paul","Joshua","Kenneth","Kevin","Brian","George","Timothy","Ronald","Jason","Edward","Jeffrey","Ryan","Jacob","Gary","Nicholas","Eric","Jonathan","Stephen","Larry","Justin","Scott","Brandon","Benjamin","Samuel","Gregory","Alexander","Patrick","Frank","Raymond","Jack","Dennis","Jerry","Tyler","Aaron","Jose","Adam","Nathan","Henry","Zachary","Douglas","Peter","Kyle","Noah","Ethan","Jeremy","Walter","Christian","Keith","Roger","Terry","Austin","Sean","Gerald","Carl","Harold","Dylan","Arthur","Lawrence","Jordan","Jesse","Bryan","Billy","Bruce","Gabriel","Joe","Logan","Alan","Juan","Albert","Willie","Elijah","Wayne","Randy","Vincent","Mason","Roy","Ralph","Bobby","Russell","Bradley","Philip","Eugene"]};},{}],131:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');var FableServiceDataGeneration=/*#__PURE__*/function(_libFableServiceBase2){_inherits(FableServiceDataGeneration,_libFableServiceBase2);function FableServiceDataGeneration(pFable,pOptions,pServiceHash){var _this21;_classCallCheck2(this,FableServiceDataGeneration);_this21=_callSuper(this,FableServiceDataGeneration,[pFable,pOptions,pServiceHash]);_this21.serviceType='DataGeneration';_this21.defaultData=require('./Fable-Service-DataGeneration-DefaultValues.json');return _this21;}// Return a random integer between pMinimum and pMaximum
3325
+ if(tmpString[i]==tmpEnclosureStart){tmpEnclosureDepth++;if(tmpEnclosureDepth==1){tmpEnclosureCount++;if(tmpEnclosureIndexToRemove==tmpEnclosureCount-1){tmpMatchedEnclosureIndex=true;tmpEnclosureStartIndex=i;}}}else if(tmpString[i]==tmpEnclosureEnd){tmpEnclosureDepth--;if(tmpEnclosureDepth==0&&tmpMatchedEnclosureIndex&&tmpEnclosureEndIndex<=tmpEnclosureStartIndex){tmpEnclosureEndIndex=i;tmpMatchedEnclosureIndex=false;}}}if(tmpEnclosureCount<=tmpEnclosureIndexToRemove){return tmpString;}var tmpReturnString='';if(tmpEnclosureStartIndex>1){tmpReturnString=tmpString.substring(0,tmpEnclosureStartIndex);}if(tmpString.length>tmpEnclosureEndIndex+1&&tmpEnclosureEndIndex>tmpEnclosureStartIndex){tmpReturnString+=tmpString.substring(tmpEnclosureEndIndex+1);}return tmpReturnString;}}]);return DataFormat;}(libFableServiceProviderBase);module.exports=DataFormat;},{"fable-serviceproviderbase":51}],131:[function(require,module,exports){module.exports={"DefaultIntegerMinimum":0,"DefaultIntegerMaximum":9999999,"DefaultNumericStringLength":10,"MonthSet":["January","February","March","April","May","June","July","August","September","October","November","December"],"WeekDaySet":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"ColorSet":["Red","Orange","Yellow","Green","Blue","Indigo","Violet","Pink","Purple","Turquoise","Gold","Lime","Maroon","Navy","Coral","Teal","Brown","White","Black","Sky","Berry","Grey","Straw","Silver","Sapphire"],"SurNameSet":["Smith","Johnson","Williams","Brown","Jones","Miller","Davis","Garcia","Rodriguez","Wilson","Martinez","Anderson","Taylor","Thomas","Hernandez","Moore","Martin","Jackson","Thompson","White","Lopez","Lee","Gonzalez","Harris","Clark","Lewis","Robinson","Walker","Perez","Hall","Young","Allen","Sanchez","Wright","King","Scott","Green","Baker","Adams","Nelson","Hill","Ramirez","Campbell","Mitchell","Roberts","Carter","Phillips","Evans","Turner","Torres","Parker","Collins","Edwards","Stewart","Flores","Morris","Nguyen","Murphy","Rivera","Cook","Rogers","Morgan","Peterson","Cooper","Reed","Bailey","Bell","Gomez","Kelly","Howard","Ward","Cox","Diaz","Richardson","Wood","Watson","Brooks","Bennett","Gray","James","Reyes","Cruz","Hughes","Price","Myers","Long","Foster","Sanders","Ross","Morales","Powell","Sullivan","Russell","Ortiz","Jenkins","Gutierrez","Perry","Butler","Barnes","Fisher"],"NameSet":["Mary","Patricia","Jennifer","Linda","Elizabeth","Barbara","Susan","Jessica","Sarah","Karen","Lisa","Nancy","Betty","Sandra","Margaret","Ashley","Kimberly","Emily","Donna","Michelle","Carol","Amanda","Melissa","Deborah","Stephanie","Dorothy","Rebecca","Sharon","Laura","Cynthia","Amy","Kathleen","Angela","Shirley","Brenda","Emma","Anna","Pamela","Nicole","Samantha","Katherine","Christine","Helen","Debra","Rachel","Carolyn","Janet","Maria","Catherine","Heather","Diane","Olivia","Julie","Joyce","Victoria","Ruth","Virginia","Lauren","Kelly","Christina","Joan","Evelyn","Judith","Andrea","Hannah","Megan","Cheryl","Jacqueline","Martha","Madison","Teresa","Gloria","Sara","Janice","Ann","Kathryn","Abigail","Sophia","Frances","Jean","Alice","Judy","Isabella","Julia","Grace","Amber","Denise","Danielle","Marilyn","Beverly","Charlotte","Natalie","Theresa","Diana","Brittany","Doris","Kayla","Alexis","Lori","Marie","James","Robert","John","Michael","David","William","Richard","Joseph","Thomas","Christopher","Charles","Daniel","Matthew","Anthony","Mark","Donald","Steven","Andrew","Paul","Joshua","Kenneth","Kevin","Brian","George","Timothy","Ronald","Jason","Edward","Jeffrey","Ryan","Jacob","Gary","Nicholas","Eric","Jonathan","Stephen","Larry","Justin","Scott","Brandon","Benjamin","Samuel","Gregory","Alexander","Patrick","Frank","Raymond","Jack","Dennis","Jerry","Tyler","Aaron","Jose","Adam","Nathan","Henry","Zachary","Douglas","Peter","Kyle","Noah","Ethan","Jeremy","Walter","Christian","Keith","Roger","Terry","Austin","Sean","Gerald","Carl","Harold","Dylan","Arthur","Lawrence","Jordan","Jesse","Bryan","Billy","Bruce","Gabriel","Joe","Logan","Alan","Juan","Albert","Willie","Elijah","Wayne","Randy","Vincent","Mason","Roy","Ralph","Bobby","Russell","Bradley","Philip","Eugene"]};},{}],132:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');var FableServiceDataGeneration=/*#__PURE__*/function(_libFableServiceBase2){_inherits(FableServiceDataGeneration,_libFableServiceBase2);function FableServiceDataGeneration(pFable,pOptions,pServiceHash){var _this21;_classCallCheck2(this,FableServiceDataGeneration);_this21=_callSuper(this,FableServiceDataGeneration,[pFable,pOptions,pServiceHash]);_this21.serviceType='DataGeneration';_this21.defaultData=require('./Fable-Service-DataGeneration-DefaultValues.json');return _this21;}// Return a random integer between pMinimum and pMaximum
3103
3326
  _createClass2(FableServiceDataGeneration,[{key:"randomIntegerBetween",value:function randomIntegerBetween(pMinimum,pMaximum){return Math.floor(Math.random()*(pMaximum-pMinimum))+pMinimum;}// Return a random integer up to the passed-in maximum
3104
3327
  },{key:"randomIntegerUpTo",value:function randomIntegerUpTo(pMaximum){return this.randomIntegerBetween(0,pMaximum);}// Return a random integer between 0 and 9999999
3105
- },{key:"randomInteger",value:function randomInteger(){return Math.floor(Math.random()*this.defaultData.DefaultIntegerMaximum);}},{key:"randomNumericString",value:function randomNumericString(pLength,pMaxNumber){var tmpLength=typeof pLength==='undefined'?10:pLength;var tmpMaxNumber=typeof pMaxNumber==='undefined'?9999999999:pMaxNumber;return this.services.DataFormat.stringPadStart(this.randomIntegerUpTo(tmpMaxNumber),pLength,'0');}},{key:"randomMonth",value:function randomMonth(){return this.defaultData.MonthSet[this.randomIntegerUpTo(this.defaultData.MonthSet.length-1)];}},{key:"randomDayOfWeek",value:function randomDayOfWeek(){return this.defaultData.WeekDaySet[this.randomIntegerUpTo(this.defaultData.WeekDaySet.length-1)];}},{key:"randomColor",value:function randomColor(){return this.defaultData.ColorSet[this.randomIntegerUpTo(this.defaultData.ColorSet.length-1)];}},{key:"randomName",value:function randomName(){return this.defaultData.NameSet[this.randomIntegerUpTo(this.defaultData.NameSet.length-1)];}},{key:"randomSurname",value:function randomSurname(){return this.defaultData.SurNameSet[this.randomIntegerUpTo(this.defaultData.SurNameSet.length-1)];}}]);return FableServiceDataGeneration;}(libFableServiceBase);module.exports=FableServiceDataGeneration;},{"./Fable-Service-DataGeneration-DefaultValues.json":130,"fable-serviceproviderbase":51}],132:[function(require,module,exports){var libFableServiceProviderBase=require('fable-serviceproviderbase');/**
3328
+ },{key:"randomInteger",value:function randomInteger(){return Math.floor(Math.random()*this.defaultData.DefaultIntegerMaximum);}},{key:"randomNumericString",value:function randomNumericString(pLength,pMaxNumber){var tmpLength=typeof pLength==='undefined'?10:pLength;var tmpMaxNumber=typeof pMaxNumber==='undefined'?9999999999:pMaxNumber;return this.services.DataFormat.stringPadStart(this.randomIntegerUpTo(tmpMaxNumber),pLength,'0');}},{key:"randomMonth",value:function randomMonth(){return this.defaultData.MonthSet[this.randomIntegerUpTo(this.defaultData.MonthSet.length-1)];}},{key:"randomDayOfWeek",value:function randomDayOfWeek(){return this.defaultData.WeekDaySet[this.randomIntegerUpTo(this.defaultData.WeekDaySet.length-1)];}},{key:"randomColor",value:function randomColor(){return this.defaultData.ColorSet[this.randomIntegerUpTo(this.defaultData.ColorSet.length-1)];}},{key:"randomName",value:function randomName(){return this.defaultData.NameSet[this.randomIntegerUpTo(this.defaultData.NameSet.length-1)];}},{key:"randomSurname",value:function randomSurname(){return this.defaultData.SurNameSet[this.randomIntegerUpTo(this.defaultData.SurNameSet.length-1)];}}]);return FableServiceDataGeneration;}(libFableServiceBase);module.exports=FableServiceDataGeneration;},{"./Fable-Service-DataGeneration-DefaultValues.json":131,"fable-serviceproviderbase":51}],133:[function(require,module,exports){var libFableServiceProviderBase=require('fable-serviceproviderbase');/**
3106
3329
  * Date management a la Moment using days.js
3107
3330
  *
3108
3331
  * @class DateManipulation
@@ -3117,7 +3340,7 @@ _this22.plugin_advancedFormat=require('dayjs/plugin/advancedFormat');_this22.day
3117
3340
  // You would do the following:
3118
3341
  // const localeDE = require('dayjs/locale/de');
3119
3342
  // _Fable.Dates.dayJS.locale('de');
3120
- return _this22;}return _createClass2(DateManipulation);}(libFableServiceProviderBase);module.exports=DateManipulation;},{"dayjs":28,"dayjs/plugin/advancedFormat":29,"dayjs/plugin/isoWeek":30,"dayjs/plugin/relativeTime":31,"dayjs/plugin/timezone":32,"dayjs/plugin/utc":33,"dayjs/plugin/weekOfYear":34,"dayjs/plugin/weekday":35,"fable-serviceproviderbase":51}],133:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');var FableServiceEnvironmentData=/*#__PURE__*/function(_libFableServiceBase3){_inherits(FableServiceEnvironmentData,_libFableServiceBase3);function FableServiceEnvironmentData(pFable,pOptions,pServiceHash){var _this23;_classCallCheck2(this,FableServiceEnvironmentData);_this23=_callSuper(this,FableServiceEnvironmentData,[pFable,pOptions,pServiceHash]);_this23.serviceType='EnvironmentData';_this23.Environment="node.js";return _this23;}return _createClass2(FableServiceEnvironmentData);}(libFableServiceBase);module.exports=FableServiceEnvironmentData;},{"fable-serviceproviderbase":51}],134:[function(require,module,exports){(function(process){(function(){var libFableServiceBase=require('fable-serviceproviderbase');var libFS=require('fs');var libPath=require('path');var libReadline=require('readline');var FableServiceFilePersistence=/*#__PURE__*/function(_libFableServiceBase4){_inherits(FableServiceFilePersistence,_libFableServiceBase4);function FableServiceFilePersistence(pFable,pOptions,pServiceHash){var _this24;_classCallCheck2(this,FableServiceFilePersistence);_this24=_callSuper(this,FableServiceFilePersistence,[pFable,pOptions,pServiceHash]);_this24.serviceType='FilePersistence';if(!_this24.options.hasOwnProperty('Mode')){_this24.options.Mode=parseInt('0777',8)&~process.umask();}_this24.libFS=libFS;_this24.libPath=libPath;_this24.libReadline=libReadline;return _this24;}_createClass2(FableServiceFilePersistence,[{key:"joinPath",value:function joinPath(){return libPath.resolve.apply(libPath,arguments);}},{key:"existsSync",value:function existsSync(pPath){return libFS.existsSync(pPath);}},{key:"exists",value:function exists(pPath,fCallback){var tmpFileExists=this.existsSync(pPath);;return fCallback(null,tmpFileExists);}},{key:"appendFileSync",value:function appendFileSync(pFileName,pAppendContent,pOptions){var tmpOptions=typeof pOptions==='undefined'?'utf8':pOptions;return libFS.appendFileSync(pFileName,pAppendContent,tmpOptions);}},{key:"deleteFileSync",value:function deleteFileSync(pFileName){return libFS.unlinkSync(pFileName);}},{key:"deleteFolderSync",value:function deleteFolderSync(pFileName){return libFS.rmdirSync(pFileName);}},{key:"readFileSync",value:function readFileSync(pFilePath,pOptions){var tmpOptions=typeof pOptions==='undefined'?'utf8':pOptions;return libFS.readFileSync(pFilePath,tmpOptions);}},{key:"readFile",value:function readFile(pFilePath,pOptions,fCallback){var tmpOptions=typeof pOptions==='undefined'?'utf8':pOptions;return libFS.readFile(pFilePath,tmpOptions,fCallback);}},{key:"writeFileSync",value:function writeFileSync(pFileName,pFileContent,pOptions){var tmpOptions=typeof pOptions==='undefined'?'utf8':pOptions;return libFS.writeFileSync(pFileName,pFileContent,tmpOptions);}},{key:"writeFileSyncFromObject",value:function writeFileSyncFromObject(pFileName,pObject){return this.writeFileSync(pFileName,JSON.stringify(pObject,null,4));}},{key:"writeFileSyncFromArray",value:function writeFileSyncFromArray(pFileName,pFileArray){if(!Array.isArray(pFileArray)){this.log.error("File Persistence Service attempted to write ".concat(pFileName," from array but the expected array was not an array (it was a ").concat(_typeof(pFileArray),")."));return Error('Attempted to write ${pFileName} from array but the expected array was not an array (it was a ${typeof(pFileArray)}).');}else{for(var i=0;i<pFileArray.length;i++){return this.appendFileSync(pFileName,"".concat(pFileArray[i],"\n"));}}}},{key:"writeFile",value:function writeFile(pFileName,pFileContent,pOptions,fCallback){var tmpOptions=typeof pOptions==='undefined'?'utf8':pOptions;return libFS.writeFile(pFileName,pFileContent,tmpOptions,fCallback);}},{key:"lineReaderFactory",value:function lineReaderFactory(pFilePath,fOnLine,fOnComplete,fOnError){var tmpLineReader={};if(typeof pFilePath!='string'){return false;}tmpLineReader.filePath=pFilePath;tmpLineReader.fileStream=libFS.createReadStream(tmpLineReader.filePath);tmpLineReader.reader=libReadline.createInterface({input:tmpLineReader.fileStream,crlfDelay:Infinity});if(typeof fOnError==='function'){tmpLineReader.reader.on('error',fOnError);}tmpLineReader.reader.on('line',typeof fOnLine==='function'?fOnLine:function(){});if(typeof fOnComplete==='function'){tmpLineReader.reader.on('close',fOnComplete);}return tmpLineReader;}// Folder management
3343
+ return _this22;}return _createClass2(DateManipulation);}(libFableServiceProviderBase);module.exports=DateManipulation;},{"dayjs":28,"dayjs/plugin/advancedFormat":29,"dayjs/plugin/isoWeek":30,"dayjs/plugin/relativeTime":31,"dayjs/plugin/timezone":32,"dayjs/plugin/utc":33,"dayjs/plugin/weekOfYear":34,"dayjs/plugin/weekday":35,"fable-serviceproviderbase":51}],134:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');var FableServiceEnvironmentData=/*#__PURE__*/function(_libFableServiceBase3){_inherits(FableServiceEnvironmentData,_libFableServiceBase3);function FableServiceEnvironmentData(pFable,pOptions,pServiceHash){var _this23;_classCallCheck2(this,FableServiceEnvironmentData);_this23=_callSuper(this,FableServiceEnvironmentData,[pFable,pOptions,pServiceHash]);_this23.serviceType='EnvironmentData';_this23.Environment="node.js";return _this23;}return _createClass2(FableServiceEnvironmentData);}(libFableServiceBase);module.exports=FableServiceEnvironmentData;},{"fable-serviceproviderbase":51}],135:[function(require,module,exports){(function(process){(function(){var libFableServiceBase=require('fable-serviceproviderbase');var libFS=require('fs');var libPath=require('path');var libReadline=require('readline');var FableServiceFilePersistence=/*#__PURE__*/function(_libFableServiceBase4){_inherits(FableServiceFilePersistence,_libFableServiceBase4);function FableServiceFilePersistence(pFable,pOptions,pServiceHash){var _this24;_classCallCheck2(this,FableServiceFilePersistence);_this24=_callSuper(this,FableServiceFilePersistence,[pFable,pOptions,pServiceHash]);_this24.serviceType='FilePersistence';if(!_this24.options.hasOwnProperty('Mode')){_this24.options.Mode=parseInt('0777',8)&~process.umask();}_this24.libFS=libFS;_this24.libPath=libPath;_this24.libReadline=libReadline;return _this24;}_createClass2(FableServiceFilePersistence,[{key:"joinPath",value:function joinPath(){return libPath.resolve.apply(libPath,arguments);}},{key:"existsSync",value:function existsSync(pPath){return libFS.existsSync(pPath);}},{key:"exists",value:function exists(pPath,fCallback){var tmpFileExists=this.existsSync(pPath);;return fCallback(null,tmpFileExists);}},{key:"appendFileSync",value:function appendFileSync(pFileName,pAppendContent,pOptions){var tmpOptions=typeof pOptions==='undefined'?'utf8':pOptions;return libFS.appendFileSync(pFileName,pAppendContent,tmpOptions);}},{key:"deleteFileSync",value:function deleteFileSync(pFileName){return libFS.unlinkSync(pFileName);}},{key:"deleteFolderSync",value:function deleteFolderSync(pFileName){return libFS.rmdirSync(pFileName);}},{key:"readFileSync",value:function readFileSync(pFilePath,pOptions){var tmpOptions=typeof pOptions==='undefined'?'utf8':pOptions;return libFS.readFileSync(pFilePath,tmpOptions);}},{key:"readFile",value:function readFile(pFilePath,pOptions,fCallback){var tmpOptions=typeof pOptions==='undefined'?'utf8':pOptions;return libFS.readFile(pFilePath,tmpOptions,fCallback);}},{key:"writeFileSync",value:function writeFileSync(pFileName,pFileContent,pOptions){var tmpOptions=typeof pOptions==='undefined'?'utf8':pOptions;return libFS.writeFileSync(pFileName,pFileContent,tmpOptions);}},{key:"writeFileSyncFromObject",value:function writeFileSyncFromObject(pFileName,pObject){return this.writeFileSync(pFileName,JSON.stringify(pObject,null,4));}},{key:"writeFileSyncFromArray",value:function writeFileSyncFromArray(pFileName,pFileArray){if(!Array.isArray(pFileArray)){this.log.error("File Persistence Service attempted to write ".concat(pFileName," from array but the expected array was not an array (it was a ").concat(_typeof(pFileArray),")."));return Error('Attempted to write ${pFileName} from array but the expected array was not an array (it was a ${typeof(pFileArray)}).');}else{for(var i=0;i<pFileArray.length;i++){return this.appendFileSync(pFileName,"".concat(pFileArray[i],"\n"));}}}},{key:"writeFile",value:function writeFile(pFileName,pFileContent,pOptions,fCallback){var tmpOptions=typeof pOptions==='undefined'?'utf8':pOptions;return libFS.writeFile(pFileName,pFileContent,tmpOptions,fCallback);}},{key:"lineReaderFactory",value:function lineReaderFactory(pFilePath,fOnLine,fOnComplete,fOnError){var tmpLineReader={};if(typeof pFilePath!='string'){return false;}tmpLineReader.filePath=pFilePath;tmpLineReader.fileStream=libFS.createReadStream(tmpLineReader.filePath);tmpLineReader.reader=libReadline.createInterface({input:tmpLineReader.fileStream,crlfDelay:Infinity});if(typeof fOnError==='function'){tmpLineReader.reader.on('error',fOnError);}tmpLineReader.reader.on('line',typeof fOnLine==='function'?fOnLine:function(){});if(typeof fOnComplete==='function'){tmpLineReader.reader.on('close',fOnComplete);}return tmpLineReader;}// Folder management
3121
3344
  },{key:"makeFolderRecursive",value:function makeFolderRecursive(pParameters,fCallback){var _this25=this;var tmpParameters=pParameters;if(typeof pParameters=='string'){tmpParameters={Path:pParameters};}else if(_typeof(pParameters)!=='object'){fCallback(new Error('Parameters object or string not properly passed to recursive folder create.'));return false;}if(typeof tmpParameters.Path!=='string'){fCallback(new Error('Parameters object needs a path to run the folder create operation.'));return false;}if(!tmpParameters.hasOwnProperty('Mode')){tmpParameters.Mode=this.options.Mode;}// Check if we are just starting .. if so, build the initial state for our recursive function
3122
3345
  if(typeof tmpParameters.CurrentPathIndex==='undefined'){// Build the tools to start recursing
3123
3346
  tmpParameters.ActualPath=libPath.normalize(tmpParameters.Path);tmpParameters.ActualPathParts=tmpParameters.ActualPath.split(libPath.sep);tmpParameters.CurrentPathIndex=0;tmpParameters.CurrentPath='';}else{// This is not our first run, so we will continue the recursion.
@@ -3127,7 +3350,7 @@ tmpParameters.CurrentPathIndex++;}// Check if the path is fully complete
3127
3350
  if(tmpParameters.CurrentPathIndex>=tmpParameters.ActualPathParts.length){return fCallback(null);}// Check if the path exists (and is a folder)
3128
3351
  libFS.open(tmpParameters.CurrentPath+libPath.sep+tmpParameters.ActualPathParts[tmpParameters.CurrentPathIndex],'r',function(pError,pFileDescriptor){if(pFileDescriptor){libFS.closeSync(pFileDescriptor);}if(pError&&pError.code=='ENOENT'){/* Path doesn't exist, create it */libFS.mkdir(tmpParameters.CurrentPath+libPath.sep+tmpParameters.ActualPathParts[tmpParameters.CurrentPathIndex],tmpParameters.Mode,function(pCreateError){if(!pCreateError){// We have now created our folder and there was no error -- continue.
3129
3352
  return _this25.makeFolderRecursive(tmpParameters,fCallback);}else if(pCreateError.code=='EEXIST'){// The folder exists -- our dev might be running this in parallel/async/whatnot.
3130
- return _this25.makeFolderRecursive(tmpParameters,fCallback);}else{console.log(pCreateError.code);return fCallback(pCreateError);}});}else{return _this25.makeFolderRecursive(tmpParameters,fCallback);}});}}]);return FableServiceFilePersistence;}(libFableServiceBase);module.exports=FableServiceFilePersistence;}).call(this);}).call(this,require('_process'));},{"_process":86,"fable-serviceproviderbase":51,"fs":19,"path":82,"readline":19}],135:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');/**
3353
+ return _this25.makeFolderRecursive(tmpParameters,fCallback);}else{console.log(pCreateError.code);return fCallback(pCreateError);}});}else{return _this25.makeFolderRecursive(tmpParameters,fCallback);}});}}]);return FableServiceFilePersistence;}(libFableServiceBase);module.exports=FableServiceFilePersistence;}).call(this);}).call(this,require('_process'));},{"_process":87,"fable-serviceproviderbase":51,"fs":19,"path":83,"readline":19}],136:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');/**
3131
3354
  * Arbitrary Precision Math Operations
3132
3355
  * @author Steven Velozo <steven@velozo.com>
3133
3356
  * @description Simple functions that perform arbitrary precision math operations and return string resultant values. Wraps big.js
@@ -3142,7 +3365,7 @@ return _this25.makeFolderRecursive(tmpParameters,fCallback);}else{console.log(pC
3142
3365
  roundHalfUp 1 ROUND_HALF_UP Rounds towards nearest neighbour. (_If equidistant, rounds away from zero._)
3143
3366
  roundHalfEven 2 ROUND_HALF_EVEN Rounds towards nearest neighbour. (_If equidistant, rounds towards even neighbour._)
3144
3367
  roundUp 3 ROUND_UP Rounds positively away from zero. (_Always round up._)
3145
- */_createClass2(FableServiceMath,[{key:"roundDown",get:function get(){return this.fable.Utility.bigNumber.roundDown;}},{key:"roundHalfUp",get:function get(){return this.fable.Utility.bigNumber.roundHalfUp;}},{key:"roundHalfEven",get:function get(){return this.fable.Utility.bigNumber.roundHalfEven;}},{key:"roundUp",get:function get(){return this.fable.Utility.bigNumber.roundUp;}},{key:"parsePrecise",value:function parsePrecise(pValue,pNonNumberValue){var tmpNumber;try{tmpNumber=new this.fable.Utility.bigNumber(pValue);}catch(pError){this.log.warn("Error parsing number (type ".concat(_typeof(pValue),"): ").concat(pError));tmpNumber=typeof pNonNumberValue==='undefined'?"0.0":pNonNumberValue;}return tmpNumber.toString();}},{key:"percentagePrecise",value:function percentagePrecise(pIs,pOf){var tmpLeftValue=isNaN(pIs)?0:pIs;var tmpRightValue=isNaN(pOf)?0:pOf;if(tmpRightValue==0){return'0';}var tmpLeftArbitraryValue=new this.fable.Utility.bigNumber(tmpLeftValue);var tmpResult=tmpLeftArbitraryValue.div(tmpRightValue);tmpResult=tmpResult.times(100);return tmpResult.toString();}},{key:"roundPrecise",value:function roundPrecise(pValue,pDecimals,pRoundingMethod){var tmpValue=isNaN(pValue)?0:pValue;var tmpDecimals=isNaN(pDecimals)?0:pDecimals;var tmpRoundingMethod=typeof pRoundingMethod==='undefined'?this.roundHalfUp:pRoundingMethod;var tmpArbitraryValue=new this.fable.Utility.bigNumber(tmpValue);var tmpResult=tmpArbitraryValue.round(tmpDecimals,tmpRoundingMethod);return tmpResult.toString();}},{key:"toFixedPrecise",value:function toFixedPrecise(pValue,pDecimals,pRoundingMethod){var tmpValue=isNaN(pValue)?0:pValue;var tmpDecimals=isNaN(pDecimals)?0:pDecimals;var tmpRoundingMethod=typeof pRoundingMethod==='undefined'?this.roundHalfUp:pRoundingMethod;var tmpArbitraryValue=new this.fable.Utility.bigNumber(tmpValue);var tmpResult=tmpArbitraryValue.toFixed(tmpDecimals,tmpRoundingMethod);return tmpResult.toString();}},{key:"addPrecise",value:function addPrecise(pLeftValue,pRightValue){var tmpLeftValue=isNaN(pLeftValue)?0:pLeftValue;var tmpRightValue=isNaN(pRightValue)?0:pRightValue;var tmpLeftArbitraryValue=new this.fable.Utility.bigNumber(tmpLeftValue);var tmpResult=tmpLeftArbitraryValue.plus(tmpRightValue);return tmpResult.toString();}},{key:"subtractPrecise",value:function subtractPrecise(pLeftValue,pRightValue){var tmpLeftValue=isNaN(pLeftValue)?0:pLeftValue;var tmpRightValue=isNaN(pRightValue)?0:pRightValue;var tmpLeftArbitraryValue=new this.fable.Utility.bigNumber(tmpLeftValue);var tmpResult=tmpLeftArbitraryValue.minus(tmpRightValue);return tmpResult.toString();}},{key:"powerPrecise",value:function powerPrecise(pLeftValue,pRightValue){var tmpLeftValue=isNaN(pLeftValue)?0:pLeftValue;var tmpRightValue=isNaN(pRightValue)?0:pRightValue;var tmpLeftArbitraryValue=new this.fable.Utility.bigNumber(tmpLeftValue);var tmpResult=tmpLeftArbitraryValue.pow(tmpRightValue);return tmpResult.toString();}},{key:"multiplyPrecise",value:function multiplyPrecise(pLeftValue,pRightValue){var tmpLeftValue=isNaN(pLeftValue)?0:pLeftValue;var tmpRightValue=isNaN(pRightValue)?0:pRightValue;var tmpLeftArbitraryValue=new this.fable.Utility.bigNumber(tmpLeftValue);var tmpResult=tmpLeftArbitraryValue.times(tmpRightValue);return tmpResult.toString();}},{key:"dividePrecise",value:function dividePrecise(pLeftValue,pRightValue){var tmpLeftValue=isNaN(pLeftValue)?0:pLeftValue;var tmpRightValue=isNaN(pRightValue)?0:pRightValue;var tmpLeftArbitraryValue=new this.fable.Utility.bigNumber(tmpLeftValue);var tmpResult=tmpLeftArbitraryValue.div(tmpRightValue);return tmpResult.toString();}},{key:"modPrecise",value:function modPrecise(pLeftValue,pRightValue){var tmpLeftValue=isNaN(pLeftValue)?0:pLeftValue;var tmpRightValue=isNaN(pRightValue)?0:pRightValue;var tmpLeftArbitraryValue=new this.fable.Utility.bigNumber(tmpLeftValue);var tmpResult=tmpLeftArbitraryValue.mod(tmpRightValue);return tmpResult.toString();}},{key:"sqrtPrecise",value:function sqrtPrecise(pValue){var tmpValue=isNaN(pValue)?0:pValue;var tmpLeftArbitraryValue=new this.fable.Utility.bigNumber(tmpValue);var tmpResult=tmpLeftArbitraryValue.sqrt();return tmpResult.toString();}},{key:"absPrecise",value:function absPrecise(pValue){var tmpValue=isNaN(pValue)?0:pValue;var tmpLeftArbitraryValue=new this.fable.Utility.bigNumber(tmpValue);var tmpResult=tmpLeftArbitraryValue.abs();return tmpResult.toString();}},{key:"comparePrecise",value:function comparePrecise(pLeftValue,pRightValue){var tmpLeftValue=isNaN(pLeftValue)?0:pLeftValue;var tmpRightValue=isNaN(pRightValue)?0:pRightValue;var tmpLeftArbitraryValue=new this.fable.Utility.bigNumber(tmpLeftValue);return tmpLeftArbitraryValue.cmp(tmpRightValue);}},{key:"gtPrecise",value:function gtPrecise(pLeftValue,pRightValue){var tmpLeftValue=isNaN(pLeftValue)?0:pLeftValue;var tmpRightValue=isNaN(pRightValue)?0:pRightValue;var tmpLeftArbitraryValue=new this.fable.Utility.bigNumber(tmpLeftValue);return tmpLeftArbitraryValue.gt(tmpRightValue);}},{key:"gtePrecise",value:function gtePrecise(pLeftValue,pRightValue){var tmpLeftValue=isNaN(pLeftValue)?0:pLeftValue;var tmpRightValue=isNaN(pRightValue)?0:pRightValue;var tmpLeftArbitraryValue=new this.fable.Utility.bigNumber(tmpLeftValue);return tmpLeftArbitraryValue.gte(tmpRightValue);}},{key:"ltPrecise",value:function ltPrecise(pLeftValue,pRightValue){var tmpLeftValue=isNaN(pLeftValue)?0:pLeftValue;var tmpRightValue=isNaN(pRightValue)?0:pRightValue;var tmpLeftArbitraryValue=new this.fable.Utility.bigNumber(tmpLeftValue);return tmpLeftArbitraryValue.lt(tmpRightValue);}},{key:"ltePrecise",value:function ltePrecise(pLeftValue,pRightValue){var tmpLeftValue=isNaN(pLeftValue)?0:pLeftValue;var tmpRightValue=isNaN(pRightValue)?0:pRightValue;var tmpLeftArbitraryValue=new this.fable.Utility.bigNumber(tmpLeftValue);return tmpLeftArbitraryValue.lt(tmpRightValue);}}]);return FableServiceMath;}(libFableServiceBase);module.exports=FableServiceMath;},{"fable-serviceproviderbase":51}],136:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');/**
3368
+ */_createClass2(FableServiceMath,[{key:"roundDown",get:function get(){return this.fable.Utility.bigNumber.roundDown;}},{key:"roundHalfUp",get:function get(){return this.fable.Utility.bigNumber.roundHalfUp;}},{key:"roundHalfEven",get:function get(){return this.fable.Utility.bigNumber.roundHalfEven;}},{key:"roundUp",get:function get(){return this.fable.Utility.bigNumber.roundUp;}},{key:"parsePrecise",value:function parsePrecise(pValue,pNonNumberValue){var tmpNumber;try{tmpNumber=new this.fable.Utility.bigNumber(pValue);}catch(pError){this.log.warn("Error parsing number (type ".concat(_typeof(pValue),"): ").concat(pError));tmpNumber=typeof pNonNumberValue==='undefined'?"0.0":pNonNumberValue;}return tmpNumber.toString();}},{key:"percentagePrecise",value:function percentagePrecise(pIs,pOf){var tmpLeftValue=isNaN(pIs)?0:pIs;var tmpRightValue=isNaN(pOf)?0:pOf;if(tmpRightValue==0){return'0';}var tmpLeftArbitraryValue=new this.fable.Utility.bigNumber(tmpLeftValue);var tmpResult=tmpLeftArbitraryValue.div(tmpRightValue);tmpResult=tmpResult.times(100);return tmpResult.toString();}},{key:"roundPrecise",value:function roundPrecise(pValue,pDecimals,pRoundingMethod){var tmpValue=isNaN(pValue)?0:pValue;var tmpDecimals=isNaN(pDecimals)?0:pDecimals;var tmpRoundingMethod=typeof pRoundingMethod==='undefined'?this.roundHalfUp:pRoundingMethod;var tmpArbitraryValue=new this.fable.Utility.bigNumber(tmpValue);var tmpResult=tmpArbitraryValue.round(tmpDecimals,tmpRoundingMethod);return tmpResult.toString();}},{key:"toFixedPrecise",value:function toFixedPrecise(pValue,pDecimals,pRoundingMethod){var tmpValue=isNaN(pValue)?0:pValue;var tmpDecimals=isNaN(pDecimals)?0:pDecimals;var tmpRoundingMethod=typeof pRoundingMethod==='undefined'?this.roundHalfUp:pRoundingMethod;var tmpArbitraryValue=new this.fable.Utility.bigNumber(tmpValue);var tmpResult=tmpArbitraryValue.toFixed(tmpDecimals,tmpRoundingMethod);return tmpResult.toString();}},{key:"addPrecise",value:function addPrecise(pLeftValue,pRightValue){var tmpLeftValue=isNaN(pLeftValue)?0:pLeftValue;var tmpRightValue=isNaN(pRightValue)?0:pRightValue;var tmpLeftArbitraryValue=new this.fable.Utility.bigNumber(tmpLeftValue);var tmpResult=tmpLeftArbitraryValue.plus(tmpRightValue);return tmpResult.toString();}},{key:"subtractPrecise",value:function subtractPrecise(pLeftValue,pRightValue){var tmpLeftValue=isNaN(pLeftValue)?0:pLeftValue;var tmpRightValue=isNaN(pRightValue)?0:pRightValue;var tmpLeftArbitraryValue=new this.fable.Utility.bigNumber(tmpLeftValue);var tmpResult=tmpLeftArbitraryValue.minus(tmpRightValue);return tmpResult.toString();}},{key:"powerPrecise",value:function powerPrecise(pLeftValue,pRightValue){var tmpLeftValue=isNaN(pLeftValue)?0:pLeftValue;var tmpRightValue=isNaN(pRightValue)?0:pRightValue;var tmpLeftArbitraryValue=new this.fable.Utility.bigNumber(tmpLeftValue);var tmpResult=tmpLeftArbitraryValue.pow(tmpRightValue);return tmpResult.toString();}},{key:"multiplyPrecise",value:function multiplyPrecise(pLeftValue,pRightValue){var tmpLeftValue=isNaN(pLeftValue)?0:pLeftValue;var tmpRightValue=isNaN(pRightValue)?0:pRightValue;var tmpLeftArbitraryValue=new this.fable.Utility.bigNumber(tmpLeftValue);var tmpResult=tmpLeftArbitraryValue.times(tmpRightValue);return tmpResult.toString();}},{key:"dividePrecise",value:function dividePrecise(pLeftValue,pRightValue){var tmpLeftValue=isNaN(pLeftValue)?0:pLeftValue;var tmpRightValue=isNaN(pRightValue)?0:pRightValue;var tmpLeftArbitraryValue=new this.fable.Utility.bigNumber(tmpLeftValue);var tmpResult=tmpLeftArbitraryValue.div(tmpRightValue);return tmpResult.toString();}},{key:"modPrecise",value:function modPrecise(pLeftValue,pRightValue){var tmpLeftValue=isNaN(pLeftValue)?0:pLeftValue;var tmpRightValue=isNaN(pRightValue)?0:pRightValue;var tmpLeftArbitraryValue=new this.fable.Utility.bigNumber(tmpLeftValue);var tmpResult=tmpLeftArbitraryValue.mod(tmpRightValue);return tmpResult.toString();}},{key:"sqrtPrecise",value:function sqrtPrecise(pValue){var tmpValue=isNaN(pValue)?0:pValue;var tmpLeftArbitraryValue=new this.fable.Utility.bigNumber(tmpValue);var tmpResult=tmpLeftArbitraryValue.sqrt();return tmpResult.toString();}},{key:"absPrecise",value:function absPrecise(pValue){var tmpValue=isNaN(pValue)?0:pValue;var tmpLeftArbitraryValue=new this.fable.Utility.bigNumber(tmpValue);var tmpResult=tmpLeftArbitraryValue.abs();return tmpResult.toString();}},{key:"comparePrecise",value:function comparePrecise(pLeftValue,pRightValue){var tmpLeftValue=isNaN(pLeftValue)?0:pLeftValue;var tmpRightValue=isNaN(pRightValue)?0:pRightValue;var tmpLeftArbitraryValue=new this.fable.Utility.bigNumber(tmpLeftValue);return tmpLeftArbitraryValue.cmp(tmpRightValue);}},{key:"gtPrecise",value:function gtPrecise(pLeftValue,pRightValue){var tmpLeftValue=isNaN(pLeftValue)?0:pLeftValue;var tmpRightValue=isNaN(pRightValue)?0:pRightValue;var tmpLeftArbitraryValue=new this.fable.Utility.bigNumber(tmpLeftValue);return tmpLeftArbitraryValue.gt(tmpRightValue);}},{key:"gtePrecise",value:function gtePrecise(pLeftValue,pRightValue){var tmpLeftValue=isNaN(pLeftValue)?0:pLeftValue;var tmpRightValue=isNaN(pRightValue)?0:pRightValue;var tmpLeftArbitraryValue=new this.fable.Utility.bigNumber(tmpLeftValue);return tmpLeftArbitraryValue.gte(tmpRightValue);}},{key:"ltPrecise",value:function ltPrecise(pLeftValue,pRightValue){var tmpLeftValue=isNaN(pLeftValue)?0:pLeftValue;var tmpRightValue=isNaN(pRightValue)?0:pRightValue;var tmpLeftArbitraryValue=new this.fable.Utility.bigNumber(tmpLeftValue);return tmpLeftArbitraryValue.lt(tmpRightValue);}},{key:"ltePrecise",value:function ltePrecise(pLeftValue,pRightValue){var tmpLeftValue=isNaN(pLeftValue)?0:pLeftValue;var tmpRightValue=isNaN(pRightValue)?0:pRightValue;var tmpLeftArbitraryValue=new this.fable.Utility.bigNumber(tmpLeftValue);return tmpLeftArbitraryValue.lt(tmpRightValue);}}]);return FableServiceMath;}(libFableServiceBase);module.exports=FableServiceMath;},{"fable-serviceproviderbase":51}],137:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');/**
3146
3369
  * Precedent Meta-Templating
3147
3370
  * @author Steven Velozo <steven@velozo.com>
3148
3371
  * @description Process text stream trie and postfix tree, parsing out meta-template expression functions.
@@ -3159,7 +3382,7 @@ return _this25.makeFolderRecursive(tmpParameters,fCallback);}else{console.log(pC
3159
3382
  * @param {string} pString - The string to parse
3160
3383
  * @param {object} pData - Data to pass in as the second argument
3161
3384
  * @return {string} The result from the parser
3162
- */},{key:"parseString",value:function parseString(pString,pData,fCallback){if(this.LogNoisiness>4){this.fable.log.trace("Metatemplate parsing template string [".concat(pString,"] where the callback is a ").concat(_typeof(fCallback)),{TemplateData:pData});}return this.StringParser.parseString(pString,this.ParseTree,pData,fCallback);}}]);return FableServiceMetaTemplate;}(libFableServiceBase);module.exports=FableServiceMetaTemplate;},{"./Fable-Service-MetaTemplate/MetaTemplate-StringParser.js":137,"./Fable-Service-MetaTemplate/MetaTemplate-WordTree.js":138,"fable-serviceproviderbase":51}],137:[function(require,module,exports){/**
3385
+ */},{key:"parseString",value:function parseString(pString,pData,fCallback){if(this.LogNoisiness>4){this.fable.log.trace("Metatemplate parsing template string [".concat(pString,"] where the callback is a ").concat(_typeof(fCallback)),{TemplateData:pData});}return this.StringParser.parseString(pString,this.ParseTree,pData,fCallback);}}]);return FableServiceMetaTemplate;}(libFableServiceBase);module.exports=FableServiceMetaTemplate;},{"./Fable-Service-MetaTemplate/MetaTemplate-StringParser.js":138,"./Fable-Service-MetaTemplate/MetaTemplate-WordTree.js":139,"fable-serviceproviderbase":51}],138:[function(require,module,exports){/**
3163
3386
  * String Parser
3164
3387
  * @author Steven Velozo <steven@velozo.com>
3165
3388
  * @description Parse a string, properly processing each matched token in the word tree.
@@ -3241,8 +3464,8 @@ return fCallback();}/**
3241
3464
  * @param {function} fCallback - The callback function to call when the parse is complete
3242
3465
  */},{key:"parseString",value:function parseString(pString,pParseTree,pData,fCallback){var _this29=this;if(typeof fCallback!=='function'){var tmpParserState=this.newParserState(pParseTree);for(var i=0;i<pString.length;i++){// TODO: This is not fast.
3243
3466
  this.parseCharacter(pString[i],tmpParserState,pData,fCallback);}this.flushOutputBuffer(tmpParserState);return tmpParserState.Output;}else{// This is the async mode
3244
- var _tmpParserState=this.newParserState(pParseTree);_tmpParserState.Asynchronous=true;var tmpAnticipate=this.fable.instantiateServiceProviderWithoutRegistration('Anticipate');var _loop=function _loop(_i13){tmpAnticipate.anticipate(function(fCallback){_this29.parseCharacterAsync(pString[_i13],_tmpParserState,pData,fCallback);});};for(var _i13=0;_i13<pString.length;_i13++){_loop(_i13);}tmpAnticipate.wait(function(pError){// Flush the remaining data
3245
- _this29.flushOutputBuffer(_tmpParserState);return fCallback(pError,_tmpParserState.Output);});}}}]);return StringParser;}();module.exports=StringParser;},{}],138:[function(require,module,exports){/**
3467
+ var _tmpParserState=this.newParserState(pParseTree);_tmpParserState.Asynchronous=true;var tmpAnticipate=this.fable.instantiateServiceProviderWithoutRegistration('Anticipate');var _loop=function _loop(_i15){tmpAnticipate.anticipate(function(fCallback){_this29.parseCharacterAsync(pString[_i15],_tmpParserState,pData,fCallback);});};for(var _i15=0;_i15<pString.length;_i15++){_loop(_i15);}tmpAnticipate.wait(function(pError){// Flush the remaining data
3468
+ _this29.flushOutputBuffer(_tmpParserState);return fCallback(pError,_tmpParserState.Output);});}}}]);return StringParser;}();module.exports=StringParser;},{}],139:[function(require,module,exports){/**
3246
3469
  * Word Tree
3247
3470
  * @author Steven Velozo <steven@velozo.com>
3248
3471
  * @description Create a tree (directed graph) of Javascript objects, one character per object.
@@ -3269,7 +3492,7 @@ _this29.flushOutputBuffer(_tmpParserState);return fCallback(pError,_tmpParserSta
3269
3492
  * @param {function} fParser - The function to parse if this is the matched pattern, once the Pattern End is met. If this is a string, a simple replacement occurs.
3270
3493
  * @return {bool} True if adding the pattern was successful
3271
3494
  */},{key:"addPattern",value:function addPattern(pPatternStart,pPatternEnd,fParser){if(pPatternStart.length<1){return false;}if(typeof pPatternEnd==='string'&&pPatternEnd.length<1){return false;}var tmpLeaf=this.ParseTree;// Add the tree of leaves iteratively
3272
- for(var i=0;i<pPatternStart.length;i++){tmpLeaf=this.addChild(tmpLeaf,pPatternStart[i],i);}if(!tmpLeaf.hasOwnProperty('PatternEnd')){tmpLeaf.PatternEnd={};}var tmpPatternEnd=typeof pPatternEnd==='string'?pPatternEnd:pPatternStart;for(var _i14=0;_i14<tmpPatternEnd.length;_i14++){tmpLeaf=this.addEndChild(tmpLeaf,tmpPatternEnd[_i14],_i14);}tmpLeaf.PatternStartString=pPatternStart;tmpLeaf.PatternEndString=tmpPatternEnd;tmpLeaf.Parse=typeof fParser==='function'?fParser:typeof fParser==='string'?function(){return fParser;}:function(pData){return pData;};return tmpLeaf;}/** Add a Pattern to the Parse Tree
3495
+ for(var i=0;i<pPatternStart.length;i++){tmpLeaf=this.addChild(tmpLeaf,pPatternStart[i],i);}if(!tmpLeaf.hasOwnProperty('PatternEnd')){tmpLeaf.PatternEnd={};}var tmpPatternEnd=typeof pPatternEnd==='string'?pPatternEnd:pPatternStart;for(var _i16=0;_i16<tmpPatternEnd.length;_i16++){tmpLeaf=this.addEndChild(tmpLeaf,tmpPatternEnd[_i16],_i16);}tmpLeaf.PatternStartString=pPatternStart;tmpLeaf.PatternEndString=tmpPatternEnd;tmpLeaf.Parse=typeof fParser==='function'?fParser:typeof fParser==='string'?function(){return fParser;}:function(pData){return pData;};return tmpLeaf;}/** Add a Pattern to the Parse Tree
3273
3496
  * @method addPatternAsync
3274
3497
  * @param {Object} pPatternStart - The starting string for the pattern (e.g. "${")
3275
3498
  * @param {string} pPatternEnd - The ending string for the pattern (e.g. "}")
@@ -3282,7 +3505,7 @@ for(var i=0;i<pPatternStart.length;i++){tmpLeaf=this.addChild(tmpLeaf,pPatternSt
3282
3505
  * @param {function} fParser - The function to parse if this is the matched pattern, once the Pattern End is met. If this is a string, a simple replacement occurs.
3283
3506
  * @return {bool} True if adding the pattern was successful
3284
3507
  */},{key:"addPatternBoth",value:function addPatternBoth(pPatternStart,pPatternEnd,fParser,fParserAsync){var tmpLeaf=this.addPattern(pPatternStart,pPatternEnd,fParser);if(tmpLeaf){tmpLeaf.isAsync=true;tmpLeaf.isBoth=true;// When a leaf has both async and non-async versions of the functions, we store the async in fParserAsync.
3285
- tmpLeaf.ParseAsync=fParserAsync;}}}]);return WordTree;}();module.exports=WordTree;},{}],139:[function(require,module,exports){module.exports={"Metadata":{"UUID":false,"Hash":false,"Name":"","Summary":"","Version":0},"Status":{"Completed":false,"StepCount":0},"Steps":[],"Errors":[],"Log":[]};},{}],140:[function(require,module,exports){var _require3=require('big.js'),PE=_require3.PE;var libFableServiceBase=require('fable-serviceproviderbase');var _OperationStatePrototypeString=JSON.stringify(require('./Fable-Service-Operation-DefaultSettings.js'));var FableOperation=/*#__PURE__*/function(_libFableServiceBase7){_inherits(FableOperation,_libFableServiceBase7);function FableOperation(pFable,pOptions,pServiceHash){var _this30;_classCallCheck2(this,FableOperation);_this30=_callSuper(this,FableOperation,[pFable,pOptions,pServiceHash]);// Timestamps will just be the long ints
3508
+ tmpLeaf.ParseAsync=fParserAsync;}}}]);return WordTree;}();module.exports=WordTree;},{}],140:[function(require,module,exports){module.exports={"Metadata":{"UUID":false,"Hash":false,"Name":"","Summary":"","Version":0},"Status":{"Completed":false,"StepCount":0},"Steps":[],"Errors":[],"Log":[]};},{}],141:[function(require,module,exports){var _require3=require('big.js'),PE=_require3.PE;var libFableServiceBase=require('fable-serviceproviderbase');var _OperationStatePrototypeString=JSON.stringify(require('./Fable-Service-Operation-DefaultSettings.js'));var FableOperation=/*#__PURE__*/function(_libFableServiceBase7){_inherits(FableOperation,_libFableServiceBase7);function FableOperation(pFable,pOptions,pServiceHash){var _this30;_classCallCheck2(this,FableOperation);_this30=_callSuper(this,FableOperation,[pFable,pOptions,pServiceHash]);// Timestamps will just be the long ints
3286
3509
  _this30.timeStamps={};_this30.serviceType='PhasedOperation';_this30.state=JSON.parse(_OperationStatePrototypeString);_this30.stepMap={};_this30.stepFunctions={};// Match the service instantiation to the operation.
3287
3510
  _this30.state.Metadata.Hash=_this30.Hash;_this30.state.Metadata.UUID=_this30.UUID;_this30.state.Metadata.Name=typeof _this30.options.Name=='string'?_this30.options.Name:"Unnamed Operation ".concat(_this30.state.Metadata.UUID);_this30.name=_this30.state.Metadata.Name;_this30.progressTrackerSet=_this30.fable.instantiateServiceProviderWithoutRegistration('ProgressTrackerSet');_this30.state.OverallProgressTracker=_this30.progressTrackerSet.createProgressTracker("Overall-".concat(_this30.state.Metadata.UUID));// This is here to use the pass-through logging functions in the operation itself.
3288
3511
  _this30.log=_assertThisInitialized(_this30);return _this30;}_createClass2(FableOperation,[{key:"execute",value:function execute(fExecutionCompleteCallback){var _this31=this;// TODO: Should the same operation be allowed to execute more than one time?
@@ -3297,9 +3520,9 @@ tmpAnticipate.wait(function(pError){if(pError){_this31.fable.log.error("Operatio
3297
3520
  },{key:"addStep",value:function addStep(fStepFunction,pStepMetadata,pStepName,pStepDescription,pGUIDStep){var tmpStep={};// GUID is optional
3298
3521
  tmpStep.GUIDStep=typeof pGUIDStep!=='undefined'?pGUIDStep:"STEP-".concat(this.state.Steps.length,"-").concat(this.fable.DataGeneration.randomNumericString());// Name is optional
3299
3522
  tmpStep.Name=typeof pStepName!=='undefined'?pStepName:"Step [".concat(tmpStep.GUIDStep,"]");tmpStep.Description=typeof pStepDescription!=='undefined'?pStepDescription:"Step execution of ".concat(tmpStep.Name,".");tmpStep.ProgressTracker=this.progressTrackerSet.createProgressTracker(tmpStep.GUIDStep);tmpStep.Metadata=_typeof(pStepMetadata)==='object'?pStepMetadata:{};// There is an array of steps, in the Operation State itself ... push a step there
3300
- this.state.Steps.push(tmpStep);this.stepMap[tmpStep.GUIDStep]=tmpStep;this.stepFunctions[tmpStep.GUIDStep]=typeof fStepFunction=='function'?fStepFunction:function(fDone){return fDone();};this.state.Status.StepCount++;return tmpStep;}},{key:"setStepTotalOperations",value:function setStepTotalOperations(pGUIDStep,pTotalOperationCount){if(!this.stepMap.hasOwnProperty(pGUIDStep)){return new Error("Step [".concat(pGUIDStep,"] does not exist in operation [").concat(this.state.Metadata.UUID,"] ").concat(this.state.Metadata.Name," when attempting to set total operations to ").concat(pTotalOperationCount,"."));}this.progressTrackerSet.setProgressTrackerTotalOperations(this.stepMap[pGUIDStep].ProgressTracker.Hash,pTotalOperationCount);}},{key:"writeOperationLog",value:function writeOperationLog(pLogLevel,pLogText,pLogObject){this.state.Log.push("[".concat(new Date().toUTCString(),"]-[").concat(pLogLevel,"]: ").concat(pLogText));if(_typeof(pLogObject)=='object'){this.state.Log.push(JSON.stringify(pLogObject));}}},{key:"writeOperationErrors",value:function writeOperationErrors(pLogText,pLogObject){this.state.Errors.push("".concat(pLogText));if(_typeof(pLogObject)=='object'){this.state.Errors.push(JSON.stringify(pLogObject));}}},{key:"trace",value:function trace(pLogText,pLogObject){this.writeOperationLog('TRACE',pLogText,pLogObject);this.fable.log.trace(pLogText,pLogObject);}},{key:"debug",value:function debug(pLogText,pLogObject){this.writeOperationLog('DEBUG',pLogText,pLogObject);this.fable.log.debug(pLogText,pLogObject);}},{key:"info",value:function info(pLogText,pLogObject){this.writeOperationLog('INFO',pLogText,pLogObject);this.fable.log.info(pLogText,pLogObject);}},{key:"warn",value:function warn(pLogText,pLogObject){this.writeOperationLog('WARN',pLogText,pLogObject);this.fable.log.warn(pLogText,pLogObject);}},{key:"error",value:function error(pLogText,pLogObject){this.writeOperationLog('ERROR',pLogText,pLogObject);this.writeOperationErrors(pLogText,pLogObject);this.fable.log.error(pLogText,pLogObject);}},{key:"fatal",value:function fatal(pLogText,pLogObject){this.writeOperationLog('FATAL',pLogText,pLogObject);this.writeOperationErrors(pLogText,pLogObject);this.fable.log.fatal(pLogText,pLogObject);}}]);return FableOperation;}(libFableServiceBase);module.exports=FableOperation;},{"./Fable-Service-Operation-DefaultSettings.js":139,"big.js":17,"fable-serviceproviderbase":51}],141:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');var FableServiceProgressTime=/*#__PURE__*/function(_libFableServiceBase8){_inherits(FableServiceProgressTime,_libFableServiceBase8);function FableServiceProgressTime(pFable,pOptions,pServiceHash){var _this32;_classCallCheck2(this,FableServiceProgressTime);_this32=_callSuper(this,FableServiceProgressTime,[pFable,pOptions,pServiceHash]);_this32.serviceType='ProgressTime';_this32.timeStamps={};return _this32;}_createClass2(FableServiceProgressTime,[{key:"formatTimeDuration",value:function formatTimeDuration(pTimeDurationInMilliseconds){var tmpTimeDuration=typeof pTimeDurationInMilliseconds=='number'?pTimeDurationInMilliseconds:0;if(pTimeDurationInMilliseconds<0){return'unknown';}var tmpTimeDurationString='';if(tmpTimeDuration>3600000){tmpTimeDurationString+=Math.floor(tmpTimeDuration/3600000)+'h ';tmpTimeDuration=tmpTimeDuration%3600000;}if(tmpTimeDuration>60000){tmpTimeDurationString+=Math.floor(tmpTimeDuration/60000)+'m ';tmpTimeDuration=tmpTimeDuration%60000;}if(tmpTimeDuration>1000){tmpTimeDurationString+=Math.floor(tmpTimeDuration/1000)+'s ';tmpTimeDuration=tmpTimeDuration%1000;}tmpTimeDurationString+=Math.round(tmpTimeDuration)+'ms';return tmpTimeDurationString;}},{key:"createTimeStamp",value:function createTimeStamp(pTimeStampHash){var tmpTimeStampHash=typeof pTimeStampHash=='string'?pTimeStampHash:'Default';this.timeStamps[tmpTimeStampHash]=+new Date();return this.timeStamps[tmpTimeStampHash];}},{key:"getTimeStampValue",value:function getTimeStampValue(pTimeStampHash){var tmpTimeStampHash=typeof pTimeStampHash=='string'?pTimeStampHash:'Default';return this.timeStamps.hasOwnProperty(tmpTimeStampHash)?this.timeStamps[tmpTimeStampHash]:-1;}},{key:"updateTimeStampValue",value:function updateTimeStampValue(pTimeStampHash,pReferenceTime){var tmpTimeStampHash=typeof pTimeStampHash=='string'?pTimeStampHash:'Default';var tmpReferenceTime=false;// This function allows the user to pass in either a reference time in ms, or, a hash of a timestamp.
3523
+ this.state.Steps.push(tmpStep);this.stepMap[tmpStep.GUIDStep]=tmpStep;this.stepFunctions[tmpStep.GUIDStep]=typeof fStepFunction=='function'?fStepFunction:function(fDone){return fDone();};this.state.Status.StepCount++;return tmpStep;}},{key:"setStepTotalOperations",value:function setStepTotalOperations(pGUIDStep,pTotalOperationCount){if(!this.stepMap.hasOwnProperty(pGUIDStep)){return new Error("Step [".concat(pGUIDStep,"] does not exist in operation [").concat(this.state.Metadata.UUID,"] ").concat(this.state.Metadata.Name," when attempting to set total operations to ").concat(pTotalOperationCount,"."));}this.progressTrackerSet.setProgressTrackerTotalOperations(this.stepMap[pGUIDStep].ProgressTracker.Hash,pTotalOperationCount);}},{key:"writeOperationLog",value:function writeOperationLog(pLogLevel,pLogText,pLogObject){this.state.Log.push("[".concat(new Date().toUTCString(),"]-[").concat(pLogLevel,"]: ").concat(pLogText));if(_typeof(pLogObject)=='object'){this.state.Log.push(JSON.stringify(pLogObject));}}},{key:"writeOperationErrors",value:function writeOperationErrors(pLogText,pLogObject){this.state.Errors.push("".concat(pLogText));if(_typeof(pLogObject)=='object'){this.state.Errors.push(JSON.stringify(pLogObject));}}},{key:"trace",value:function trace(pLogText,pLogObject){this.writeOperationLog('TRACE',pLogText,pLogObject);this.fable.log.trace(pLogText,pLogObject);}},{key:"debug",value:function debug(pLogText,pLogObject){this.writeOperationLog('DEBUG',pLogText,pLogObject);this.fable.log.debug(pLogText,pLogObject);}},{key:"info",value:function info(pLogText,pLogObject){this.writeOperationLog('INFO',pLogText,pLogObject);this.fable.log.info(pLogText,pLogObject);}},{key:"warn",value:function warn(pLogText,pLogObject){this.writeOperationLog('WARN',pLogText,pLogObject);this.fable.log.warn(pLogText,pLogObject);}},{key:"error",value:function error(pLogText,pLogObject){this.writeOperationLog('ERROR',pLogText,pLogObject);this.writeOperationErrors(pLogText,pLogObject);this.fable.log.error(pLogText,pLogObject);}},{key:"fatal",value:function fatal(pLogText,pLogObject){this.writeOperationLog('FATAL',pLogText,pLogObject);this.writeOperationErrors(pLogText,pLogObject);this.fable.log.fatal(pLogText,pLogObject);}}]);return FableOperation;}(libFableServiceBase);module.exports=FableOperation;},{"./Fable-Service-Operation-DefaultSettings.js":140,"big.js":17,"fable-serviceproviderbase":51}],142:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');var FableServiceProgressTime=/*#__PURE__*/function(_libFableServiceBase8){_inherits(FableServiceProgressTime,_libFableServiceBase8);function FableServiceProgressTime(pFable,pOptions,pServiceHash){var _this32;_classCallCheck2(this,FableServiceProgressTime);_this32=_callSuper(this,FableServiceProgressTime,[pFable,pOptions,pServiceHash]);_this32.serviceType='ProgressTime';_this32.timeStamps={};return _this32;}_createClass2(FableServiceProgressTime,[{key:"formatTimeDuration",value:function formatTimeDuration(pTimeDurationInMilliseconds){var tmpTimeDuration=typeof pTimeDurationInMilliseconds=='number'?pTimeDurationInMilliseconds:0;if(pTimeDurationInMilliseconds<0){return'unknown';}var tmpTimeDurationString='';if(tmpTimeDuration>3600000){tmpTimeDurationString+=Math.floor(tmpTimeDuration/3600000)+'h ';tmpTimeDuration=tmpTimeDuration%3600000;}if(tmpTimeDuration>60000){tmpTimeDurationString+=Math.floor(tmpTimeDuration/60000)+'m ';tmpTimeDuration=tmpTimeDuration%60000;}if(tmpTimeDuration>1000){tmpTimeDurationString+=Math.floor(tmpTimeDuration/1000)+'s ';tmpTimeDuration=tmpTimeDuration%1000;}tmpTimeDurationString+=Math.round(tmpTimeDuration)+'ms';return tmpTimeDurationString;}},{key:"createTimeStamp",value:function createTimeStamp(pTimeStampHash){var tmpTimeStampHash=typeof pTimeStampHash=='string'?pTimeStampHash:'Default';this.timeStamps[tmpTimeStampHash]=+new Date();return this.timeStamps[tmpTimeStampHash];}},{key:"getTimeStampValue",value:function getTimeStampValue(pTimeStampHash){var tmpTimeStampHash=typeof pTimeStampHash=='string'?pTimeStampHash:'Default';return this.timeStamps.hasOwnProperty(tmpTimeStampHash)?this.timeStamps[tmpTimeStampHash]:-1;}},{key:"updateTimeStampValue",value:function updateTimeStampValue(pTimeStampHash,pReferenceTime){var tmpTimeStampHash=typeof pTimeStampHash=='string'?pTimeStampHash:'Default';var tmpReferenceTime=false;// This function allows the user to pass in either a reference time in ms, or, a hash of a timestamp.
3301
3524
  if(typeof pReferenceTime=='string'){tmpReferenceTime=this.timeStamps.hasOwnProperty(tmpReference)?this.timeStamps[tmpReference]:false;}else if(typeof pReferenceTime=='number'){tmpReferenceTime=pReferenceTime;}else{tmpReferenceTime=+new Date();}if(this.timeStamps.hasOwnProperty(tmpTimeStampHash)&&tmpReferenceTime){this.timeStamps[tmpTimeStampHash]=tmpReferenceTime;return this.timeStamps[tmpTimeStampHash];}else{return-1;}}},{key:"removeTimeStamp",value:function removeTimeStamp(pTimeStampHash){var tmpTimeStampHash=typeof pTimeStampHash=='string'?pTimeStampHash:'Default';if(this.timeStamps.hasOwnProperty(tmpTimeStampHash)){delete this.timeStamps[tmpTimeStampHash];return true;}else{return false;}}},{key:"getTimeStampDelta",value:function getTimeStampDelta(pTimeStampHash,pReferenceTime){var tmpTimeStampHash=typeof pTimeStampHash=='string'?pTimeStampHash:'Default';var tmpReferenceTime=false;// This function allows the user to pass in either a reference time in ms, or, a hash of a timestamp.
3302
- if(typeof pReferenceTime=='string'){tmpReferenceTime=this.timeStamps.hasOwnProperty(tmpReference)?this.timeStamps[tmpReference]:false;}else if(typeof pReferenceTime=='number'){tmpReferenceTime=pReferenceTime;}else{tmpReferenceTime=+new Date();}if(this.timeStamps.hasOwnProperty(tmpTimeStampHash)&&tmpReferenceTime){return tmpReferenceTime-this.timeStamps[tmpTimeStampHash];}else{return-1;}}},{key:"getDurationBetweenTimestamps",value:function getDurationBetweenTimestamps(pTimeStampHashStart,pTimeStampHashEnd){var tmpTimeStampHashStart=typeof pTimeStampHashStart=='string'?pTimeStampHashStart:'Default';var tmpTimeStampHashEnd=typeof pTimeStampHashEnd=='string'?pTimeStampHashEnd:'Default';if(this.timeStamps.hasOwnProperty(tmpTimeStampHashStart)&&this.timeStamps.hasOwnProperty(tmpTimeStampHashEnd)){return this.timeStamps[tmpTimeStampHashEnd]-this.timeStamps[tmpTimeStampHashStart];}else{return-1;}}},{key:"getTimeStampDeltaMessage",value:function getTimeStampDeltaMessage(pTimeStampHash,pMessage,pReferenceTime){var tmpTimeStampHash=typeof pTimeStampHash=='string'?pTimeStampHash:'Default';var tmpMessage=typeof pMessage!=='undefined'?pMessage:"Elapsed for ".concat(tmpTimeStampHash,": ");var tmpOperationTime=this.getTimeStampDelta(tmpTimeStampHash,pReferenceTime);return"".concat(tmpMessage," ").concat(this.formatTimeDuration(tmpOperationTime));}},{key:"logTimeStampDelta",value:function logTimeStampDelta(pTimeStampHash,pMessage,pReferenceTime){this.fable.log.info(this.getTimeStampDeltaMessage(pTimeStampHash,pMessage,pReferenceTime));}}]);return FableServiceProgressTime;}(libFableServiceBase);module.exports=FableServiceProgressTime;},{"fable-serviceproviderbase":51}],142:[function(require,module,exports){var ProgressTracker=/*#__PURE__*/function(){function ProgressTracker(pProgressTrackerSet,pProgressTrackerHash){_classCallCheck2(this,ProgressTracker);this.progressTrackerSet=pProgressTrackerSet;this.progressTrackerHash=pProgressTrackerHash;this.data=this.progressTrackerSet.getProgressTrackerData(this.progressTrackerHash);}_createClass2(ProgressTracker,[{key:"updateProgressTracker",value:function updateProgressTracker(pProgressAmount){return this.progressTrackerSet.updateProgressTracker(this.progressTrackerHash,pProgressAmount);}},{key:"incrementProgressTracker",value:function incrementProgressTracker(pProgressIncrementAmount){return this.progressTrackerSet.incrementProgressTracker(this.progressTrackerHash,pProgressIncrementAmount);}},{key:"setProgressTrackerTotalOperations",value:function setProgressTrackerTotalOperations(pTotalOperationCount){return this.progressTrackerSet.setProgressTrackerTotalOperations(this.progressTrackerHash,pTotalOperationCount);}},{key:"getProgressTrackerStatusString",value:function getProgressTrackerStatusString(){return this.progressTrackerSet.getProgressTrackerStatusString(this.progressTrackerHash);}}]);return ProgressTracker;}();module.exports=ProgressTracker;},{}],143:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');var libProgressTrackerClass=require('./Fable-Service-ProgressTracker/ProgressTracker.js');var FableServiceProgressTrackerSet=/*#__PURE__*/function(_libFableServiceBase9){_inherits(FableServiceProgressTrackerSet,_libFableServiceBase9);function FableServiceProgressTrackerSet(pFable,pOptions,pServiceHash){var _this33;_classCallCheck2(this,FableServiceProgressTrackerSet);_this33=_callSuper(this,FableServiceProgressTrackerSet,[pFable,pOptions,pServiceHash]);_this33.serviceType='ProgressTrackerSet';_this33.progressTrackers={};// Create an internal PorgressTime service to track timestamps
3525
+ if(typeof pReferenceTime=='string'){tmpReferenceTime=this.timeStamps.hasOwnProperty(tmpReference)?this.timeStamps[tmpReference]:false;}else if(typeof pReferenceTime=='number'){tmpReferenceTime=pReferenceTime;}else{tmpReferenceTime=+new Date();}if(this.timeStamps.hasOwnProperty(tmpTimeStampHash)&&tmpReferenceTime){return tmpReferenceTime-this.timeStamps[tmpTimeStampHash];}else{return-1;}}},{key:"getDurationBetweenTimestamps",value:function getDurationBetweenTimestamps(pTimeStampHashStart,pTimeStampHashEnd){var tmpTimeStampHashStart=typeof pTimeStampHashStart=='string'?pTimeStampHashStart:'Default';var tmpTimeStampHashEnd=typeof pTimeStampHashEnd=='string'?pTimeStampHashEnd:'Default';if(this.timeStamps.hasOwnProperty(tmpTimeStampHashStart)&&this.timeStamps.hasOwnProperty(tmpTimeStampHashEnd)){return this.timeStamps[tmpTimeStampHashEnd]-this.timeStamps[tmpTimeStampHashStart];}else{return-1;}}},{key:"getTimeStampDeltaMessage",value:function getTimeStampDeltaMessage(pTimeStampHash,pMessage,pReferenceTime){var tmpTimeStampHash=typeof pTimeStampHash=='string'?pTimeStampHash:'Default';var tmpMessage=typeof pMessage!=='undefined'?pMessage:"Elapsed for ".concat(tmpTimeStampHash,": ");var tmpOperationTime=this.getTimeStampDelta(tmpTimeStampHash,pReferenceTime);return"".concat(tmpMessage," ").concat(this.formatTimeDuration(tmpOperationTime));}},{key:"logTimeStampDelta",value:function logTimeStampDelta(pTimeStampHash,pMessage,pReferenceTime){this.fable.log.info(this.getTimeStampDeltaMessage(pTimeStampHash,pMessage,pReferenceTime));}}]);return FableServiceProgressTime;}(libFableServiceBase);module.exports=FableServiceProgressTime;},{"fable-serviceproviderbase":51}],143:[function(require,module,exports){var ProgressTracker=/*#__PURE__*/function(){function ProgressTracker(pProgressTrackerSet,pProgressTrackerHash){_classCallCheck2(this,ProgressTracker);this.progressTrackerSet=pProgressTrackerSet;this.progressTrackerHash=pProgressTrackerHash;this.data=this.progressTrackerSet.getProgressTrackerData(this.progressTrackerHash);}_createClass2(ProgressTracker,[{key:"updateProgressTracker",value:function updateProgressTracker(pProgressAmount){return this.progressTrackerSet.updateProgressTracker(this.progressTrackerHash,pProgressAmount);}},{key:"incrementProgressTracker",value:function incrementProgressTracker(pProgressIncrementAmount){return this.progressTrackerSet.incrementProgressTracker(this.progressTrackerHash,pProgressIncrementAmount);}},{key:"setProgressTrackerTotalOperations",value:function setProgressTrackerTotalOperations(pTotalOperationCount){return this.progressTrackerSet.setProgressTrackerTotalOperations(this.progressTrackerHash,pTotalOperationCount);}},{key:"getProgressTrackerStatusString",value:function getProgressTrackerStatusString(){return this.progressTrackerSet.getProgressTrackerStatusString(this.progressTrackerHash);}}]);return ProgressTracker;}();module.exports=ProgressTracker;},{}],144:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');var libProgressTrackerClass=require('./Fable-Service-ProgressTracker/ProgressTracker.js');var FableServiceProgressTrackerSet=/*#__PURE__*/function(_libFableServiceBase9){_inherits(FableServiceProgressTrackerSet,_libFableServiceBase9);function FableServiceProgressTrackerSet(pFable,pOptions,pServiceHash){var _this33;_classCallCheck2(this,FableServiceProgressTrackerSet);_this33=_callSuper(this,FableServiceProgressTrackerSet,[pFable,pOptions,pServiceHash]);_this33.serviceType='ProgressTrackerSet';_this33.progressTrackers={};// Create an internal PorgressTime service to track timestamps
3303
3526
  _this33.progressTimes=_this33.fable.instantiateServiceProviderWithoutRegistration('ProgressTime');// This timestamp is used and updated by *all* progress trackers.
3304
3527
  _this33.progressTimes.createTimeStamp('CurrentTime');return _this33;}_createClass2(FableServiceProgressTrackerSet,[{key:"getProgressTracker",value:function getProgressTracker(pProgressTrackerHash){var tmpProgressTrackerHash=typeof pProgressTrackerHash=='string'?pProgressTrackerHash:'Default';if(!this.progressTrackers.hasOwnProperty(tmpProgressTrackerHash)){this.fable.log.warn("ProgressTracker ".concat(tmpProgressTrackerHash," does not exist! Creating a new tracker..."));this.createProgressTracker(tmpProgressTrackerHash,100);}return new libProgressTrackerClass(this,pProgressTrackerHash);}},{key:"getProgressTrackerData",value:function getProgressTrackerData(pProgressTrackerHash){var tmpProgressTrackerHash=typeof pProgressTrackerHash=='string'?pProgressTrackerHash:'Default';if(!this.progressTrackers.hasOwnProperty(tmpProgressTrackerHash)){this.fable.log.warn("ProgressTracker ".concat(tmpProgressTrackerHash," does not exist! Creating a new tracker..."));this.createProgressTracker(tmpProgressTrackerHash,100);}return this.progressTrackers[tmpProgressTrackerHash];}},{key:"createProgressTracker",value:function createProgressTracker(pProgressTrackerHash,pTotalOperations){var tmpProgressTrackerHash=typeof pProgressTrackerHash=='string'?pProgressTrackerHash:'Default';var tmpTotalOperations=typeof pTotalOperations=='number'?pTotalOperations:100;var tmpProgressTracker={Hash:tmpProgressTrackerHash,StartTimeHash:"".concat(tmpProgressTrackerHash,"-Start"),StartTimeStamp:-1,CurrentTimeStamp:-1,EndTimeHash:"".concat(tmpProgressTrackerHash,"-End"),EndTimeStamp:-1,PercentComplete:-1,// If this is set to true, PercentComplete will be calculated as CurrentCount / TotalCount even if it goes over 100%
3305
3528
  AllowTruePercentComplete:false,ElapsedTime:-1,AverageOperationTime:-1,EstimatedCompletionTime:-1,TotalCount:tmpTotalOperations,CurrentCount:-1};if(this.progressTrackers.hasOwnProperty(tmpProgressTrackerHash)){this.fable.log.warn("ProgressTracker ".concat(tmpProgressTrackerHash," already exists! Overwriting with a new tracker..."));this.progressTimes.removeTimeStamp(tmpProgressTracker.StartTimeHash);this.progressTimes.removeTimeStamp(tmpProgressTracker.EndTimeHash);}this.progressTrackers[tmpProgressTrackerHash]=tmpProgressTracker;return tmpProgressTracker;}},{key:"setProgressTrackerTotalOperations",value:function setProgressTrackerTotalOperations(pProgressTrackerHash,pTotalOperations){var tmpProgressTrackerHash=typeof pProgressTrackerHash=='string'?pProgressTrackerHash:'Default';var tmpTotalOperations=typeof pTotalOperations=='number'?pTotalOperations:100;if(!this.progressTrackers.hasOwnProperty(tmpProgressTrackerHash)){this.fable.log.warn("Attempted to set the total operations of ProgressTracker ".concat(tmpProgressTrackerHash," but it does not exist! Creating a new tracker..."));this.createProgressTracker(tmpProgressTrackerHash,tmpTotalOperations);}this.progressTrackers[tmpProgressTrackerHash].TotalCount=tmpTotalOperations;return this.progressTrackers[tmpProgressTrackerHash];}},{key:"startProgressTracker",value:function startProgressTracker(pProgressTrackerHash){var tmpProgressTrackerHash=typeof pProgressTrackerHash=='string'?pProgressTrackerHash:'Default';// This is the only method to lazily create ProgressTrackers now
@@ -3322,7 +3545,7 @@ this.solveProgressTrackerStatus(tmpProgressTrackerHash);if(!this.progressTracker
3322
3545
  if(tmpProgressTracker.StartTimeStamp<1){return"ProgressTracker ".concat(tmpProgressTracker.Hash," has not been started yet.");}// 2. Started, but no operations completed
3323
3546
  if(tmpProgressTracker.CurrentCount<1&&tmpProgressTracker.EndTimeStamp<1){return"ProgressTracker ".concat(tmpProgressTracker.Hash," has no completed operations. ").concat(this.progressTimes.formatTimeDuration(tmpProgressTracker.ElapsedTime)," have elapsed since it was started.");}// 3. Started, some operations completed
3324
3547
  else if(tmpProgressTracker.EndTimeStamp<1){return"ProgressTracker ".concat(tmpProgressTracker.Hash," is ").concat(tmpProgressTracker.PercentComplete.toFixed(3),"% completed - ").concat(tmpProgressTracker.CurrentCount," / ").concat(tmpProgressTracker.TotalCount," operations over ").concat(this.progressTimes.formatTimeDuration(tmpProgressTracker.ElapsedTime)," (median ").concat(this.progressTimes.formatTimeDuration(tmpProgressTracker.AverageOperationTime)," per). Estimated completion: ").concat(this.progressTimes.formatTimeDuration(tmpProgressTracker.EstimatedCompletionTime));}// 4. Done
3325
- else{return"ProgressTracker ".concat(tmpProgressTracker.Hash," is done. ").concat(tmpProgressTracker.CurrentCount," / ").concat(tmpProgressTracker.TotalCount," operations were completed in ").concat(this.progressTimes.formatTimeDuration(tmpProgressTracker.ElapsedTime)," (median ").concat(this.progressTimes.formatTimeDuration(tmpProgressTracker.AverageOperationTime)," per).");}}}},{key:"logProgressTrackerStatus",value:function logProgressTrackerStatus(pProgressTrackerHash){this.fable.log.info(this.getProgressTrackerStatusString(pProgressTrackerHash));}}]);return FableServiceProgressTrackerSet;}(libFableServiceBase);module.exports=FableServiceProgressTrackerSet;},{"./Fable-Service-ProgressTracker/ProgressTracker.js":142,"fable-serviceproviderbase":51}],144:[function(require,module,exports){(function(Buffer){(function(){var libFableServiceBase=require('fable-serviceproviderbase');var libSimpleGet=require('simple-get');var libCookie=require('cookie');var FableServiceRestClient=/*#__PURE__*/function(_libFableServiceBase10){_inherits(FableServiceRestClient,_libFableServiceBase10);function FableServiceRestClient(pFable,pOptions,pServiceHash){var _this34;_classCallCheck2(this,FableServiceRestClient);_this34=_callSuper(this,FableServiceRestClient,[pFable,pOptions,pServiceHash]);_this34.TraceLog=false;if(_this34.options.TraceLog||_this34.fable.TraceLog){_this34.TraceLog=true;}_this34.dataFormat=_this34.fable.services.DataFormat;_this34.serviceType='RestClient';_this34.cookie=false;// This is a function that can be overridden, to allow the management
3548
+ else{return"ProgressTracker ".concat(tmpProgressTracker.Hash," is done. ").concat(tmpProgressTracker.CurrentCount," / ").concat(tmpProgressTracker.TotalCount," operations were completed in ").concat(this.progressTimes.formatTimeDuration(tmpProgressTracker.ElapsedTime)," (median ").concat(this.progressTimes.formatTimeDuration(tmpProgressTracker.AverageOperationTime)," per).");}}}},{key:"logProgressTrackerStatus",value:function logProgressTrackerStatus(pProgressTrackerHash){this.fable.log.info(this.getProgressTrackerStatusString(pProgressTrackerHash));}}]);return FableServiceProgressTrackerSet;}(libFableServiceBase);module.exports=FableServiceProgressTrackerSet;},{"./Fable-Service-ProgressTracker/ProgressTracker.js":143,"fable-serviceproviderbase":51}],145:[function(require,module,exports){(function(Buffer){(function(){var libFableServiceBase=require('fable-serviceproviderbase');var libSimpleGet=require('simple-get');var libCookie=require('cookie');var FableServiceRestClient=/*#__PURE__*/function(_libFableServiceBase10){_inherits(FableServiceRestClient,_libFableServiceBase10);function FableServiceRestClient(pFable,pOptions,pServiceHash){var _this34;_classCallCheck2(this,FableServiceRestClient);_this34=_callSuper(this,FableServiceRestClient,[pFable,pOptions,pServiceHash]);_this34.TraceLog=false;if(_this34.options.TraceLog||_this34.fable.TraceLog){_this34.TraceLog=true;}_this34.dataFormat=_this34.fable.services.DataFormat;_this34.serviceType='RestClient';_this34.cookie=false;// This is a function that can be overridden, to allow the management
3326
3549
  // of the request options before they are passed to the request library.
3327
3550
  _this34.prepareRequestOptions=function(pOptions){return pOptions;};return _this34;}_createClass2(FableServiceRestClient,[{key:"simpleGet",get:function get(){return libSimpleGet;}},{key:"prepareCookies",value:function prepareCookies(pRequestOptions){if(this.cookie){var tmpCookieObject=this.cookie;if(!pRequestOptions.hasOwnProperty('headers')){pRequestOptions.headers={};}var tmpCookieKeys=Object.keys(tmpCookieObject);if(tmpCookieKeys.length>0){// Only grab the first for now.
3328
3551
  pRequestOptions.headers.cookie=libCookie.serialize(tmpCookieKeys[0],tmpCookieObject[tmpCookieKeys[0]]);}}return pRequestOptions;}},{key:"preRequest",value:function preRequest(pOptions){// Validate the options object
@@ -3335,7 +3558,7 @@ if(!tmpDataBuffer){tmpDataBuffer=Buffer.from(pChunk);}else{tmpDataBuffer=Buffer.
3335
3558
  {
3336
3559
  tmpOptions.headers['Content-Type'] = 'application/json';
3337
3560
  }
3338
- */tmpOptions.RequestStartTime=this.fable.log.getTimeStamp();if(this.TraceLog){this.fable.log.debug("Beginning ".concat(tmpOptions.method," JSON request to ").concat(tmpOptions.url," at ").concat(tmpOptions.RequestStartTime));}return libSimpleGet(tmpOptions,function(pError,pResponse){if(pError){return fCallback(pError,pResponse);}if(_this37.TraceLog){var tmpConnectTime=_this37.fable.log.getTimeStamp();_this37.fable.log.debug("--> JSON ".concat(tmpOptions.method," connected in ").concat(_this37.dataFormat.formatTimeDelta(tmpOptions.RequestStartTime,tmpConnectTime),"ms code ").concat(pResponse.statusCode));}var tmpJSONData='';pResponse.on('data',function(pChunk){if(_this37.TraceLog){var tmpChunkTime=_this37.fable.log.getTimeStamp();_this37.fable.log.debug("--> JSON ".concat(tmpOptions.method," data chunk size ").concat(pChunk.length,"b received in ").concat(_this37.dataFormat.formatTimeDelta(tmpOptions.RequestStartTime,tmpChunkTime),"ms"));}tmpJSONData+=pChunk;});pResponse.on('end',function(){if(_this37.TraceLog){var tmpCompletionTime=_this37.fable.log.getTimeStamp();_this37.fable.log.debug("==> JSON ".concat(tmpOptions.method," completed - received in ").concat(_this37.dataFormat.formatTimeDelta(tmpOptions.RequestStartTime,tmpCompletionTime),"ms"));}return fCallback(pError,pResponse,JSON.parse(tmpJSONData));});});}},{key:"getJSON",value:function getJSON(pOptionsOrURL,fCallback){var tmpRequestOptions=_typeof(pOptionsOrURL)=='object'?pOptionsOrURL:{};if(typeof pOptionsOrURL=='string'){tmpRequestOptions.url=pOptionsOrURL;}tmpRequestOptions.method='GET';return this.executeJSONRequest(tmpRequestOptions,fCallback);}},{key:"putJSON",value:function putJSON(pOptions,fCallback){if(_typeof(pOptions.body)!='object'){return fCallback(new Error("PUT JSON Error Invalid options object"));}pOptions.method='PUT';return this.executeJSONRequest(pOptions,fCallback);}},{key:"postJSON",value:function postJSON(pOptions,fCallback){if(_typeof(pOptions.body)!='object'){return fCallback(new Error("POST JSON Error Invalid options object"));}pOptions.method='POST';return this.executeJSONRequest(pOptions,fCallback);}},{key:"patchJSON",value:function patchJSON(pOptions,fCallback){if(_typeof(pOptions.body)!='object'){return fCallback(new Error("PATCH JSON Error Invalid options object"));}pOptions.method='PATCH';return this.executeJSONRequest(pOptions,fCallback);}},{key:"headJSON",value:function headJSON(pOptions,fCallback){if(_typeof(pOptions.body)!='object'){return fCallback(new Error("HEAD JSON Error Invalid options object"));}pOptions.method='HEAD';return this.executeJSONRequest(pOptions,fCallback);}},{key:"delJSON",value:function delJSON(pOptions,fCallback){pOptions.method='DELETE';return this.executeJSONRequest(pOptions,fCallback);}},{key:"getRawText",value:function getRawText(pOptionsOrURL,fCallback){var tmpRequestOptions=_typeof(pOptionsOrURL)=='object'?pOptionsOrURL:{};if(typeof pOptionsOrURL=='string'){tmpRequestOptions.url=pOptionsOrURL;}tmpRequestOptions.method='GET';return this.executeChunkedRequest(tmpRequestOptions,fCallback);}}]);return FableServiceRestClient;}(libFableServiceBase);module.exports=FableServiceRestClient;}).call(this);}).call(this,require("buffer").Buffer);},{"buffer":20,"cookie":27,"fable-serviceproviderbase":51,"simple-get":100}],145:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');var FableServiceTemplate=/*#__PURE__*/function(_libFableServiceBase11){_inherits(FableServiceTemplate,_libFableServiceBase11);// Underscore and lodash have a behavior, _.template, which compiles a
3561
+ */tmpOptions.RequestStartTime=this.fable.log.getTimeStamp();if(this.TraceLog){this.fable.log.debug("Beginning ".concat(tmpOptions.method," JSON request to ").concat(tmpOptions.url," at ").concat(tmpOptions.RequestStartTime));}return libSimpleGet(tmpOptions,function(pError,pResponse){if(pError){return fCallback(pError,pResponse);}if(_this37.TraceLog){var tmpConnectTime=_this37.fable.log.getTimeStamp();_this37.fable.log.debug("--> JSON ".concat(tmpOptions.method," connected in ").concat(_this37.dataFormat.formatTimeDelta(tmpOptions.RequestStartTime,tmpConnectTime),"ms code ").concat(pResponse.statusCode));}var tmpJSONData='';pResponse.on('data',function(pChunk){if(_this37.TraceLog){var tmpChunkTime=_this37.fable.log.getTimeStamp();_this37.fable.log.debug("--> JSON ".concat(tmpOptions.method," data chunk size ").concat(pChunk.length,"b received in ").concat(_this37.dataFormat.formatTimeDelta(tmpOptions.RequestStartTime,tmpChunkTime),"ms"));}tmpJSONData+=pChunk;});pResponse.on('end',function(){if(_this37.TraceLog){var tmpCompletionTime=_this37.fable.log.getTimeStamp();_this37.fable.log.debug("==> JSON ".concat(tmpOptions.method," completed - received in ").concat(_this37.dataFormat.formatTimeDelta(tmpOptions.RequestStartTime,tmpCompletionTime),"ms"));}return fCallback(pError,pResponse,JSON.parse(tmpJSONData));});});}},{key:"getJSON",value:function getJSON(pOptionsOrURL,fCallback){var tmpRequestOptions=_typeof(pOptionsOrURL)=='object'?pOptionsOrURL:{};if(typeof pOptionsOrURL=='string'){tmpRequestOptions.url=pOptionsOrURL;}tmpRequestOptions.method='GET';return this.executeJSONRequest(tmpRequestOptions,fCallback);}},{key:"putJSON",value:function putJSON(pOptions,fCallback){if(_typeof(pOptions.body)!='object'){return fCallback(new Error("PUT JSON Error Invalid options object"));}pOptions.method='PUT';return this.executeJSONRequest(pOptions,fCallback);}},{key:"postJSON",value:function postJSON(pOptions,fCallback){if(_typeof(pOptions.body)!='object'){return fCallback(new Error("POST JSON Error Invalid options object"));}pOptions.method='POST';return this.executeJSONRequest(pOptions,fCallback);}},{key:"patchJSON",value:function patchJSON(pOptions,fCallback){if(_typeof(pOptions.body)!='object'){return fCallback(new Error("PATCH JSON Error Invalid options object"));}pOptions.method='PATCH';return this.executeJSONRequest(pOptions,fCallback);}},{key:"headJSON",value:function headJSON(pOptions,fCallback){if(_typeof(pOptions.body)!='object'){return fCallback(new Error("HEAD JSON Error Invalid options object"));}pOptions.method='HEAD';return this.executeJSONRequest(pOptions,fCallback);}},{key:"delJSON",value:function delJSON(pOptions,fCallback){pOptions.method='DELETE';return this.executeJSONRequest(pOptions,fCallback);}},{key:"getRawText",value:function getRawText(pOptionsOrURL,fCallback){var tmpRequestOptions=_typeof(pOptionsOrURL)=='object'?pOptionsOrURL:{};if(typeof pOptionsOrURL=='string'){tmpRequestOptions.url=pOptionsOrURL;}tmpRequestOptions.method='GET';return this.executeChunkedRequest(tmpRequestOptions,fCallback);}}]);return FableServiceRestClient;}(libFableServiceBase);module.exports=FableServiceRestClient;}).call(this);}).call(this,require("buffer").Buffer);},{"buffer":20,"cookie":27,"fable-serviceproviderbase":51,"simple-get":101}],146:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');var FableServiceTemplate=/*#__PURE__*/function(_libFableServiceBase11){_inherits(FableServiceTemplate,_libFableServiceBase11);// Underscore and lodash have a behavior, _.template, which compiles a
3339
3562
  // string-based template with code snippets into simple executable pieces,
3340
3563
  // with the added twist of returning a precompiled function ready to go.
3341
3564
  //
@@ -3355,7 +3578,7 @@ _this38.renderFunction=false;_this38.templateString=false;return _this38;}_creat
3355
3578
  // underscore code until this is rewritten using precedent.
3356
3579
  this.TemplateSource="__p+='"+pTemplateText.replace(this.Matchers.Escaper,function(pMatch){return"\\".concat(_this39.templateEscapes[pMatch]);}).replace(this.Matchers.Interpolate||this.Matchers.GuaranteedNonMatch,function(pMatch,pCode){return"'+\n(".concat(decodeURIComponent(pCode),")+\n'");}).replace(this.Matchers.Evaluate||this.Matchers.GuaranteedNonMatch,function(pMatch,pCode){return"';\n".concat(decodeURIComponent(pCode),"\n;__p+='");})+"';\n";this.TemplateSource="with(pTemplateDataObject||{}){\n".concat(this.TemplateSource,"}\n");this.TemplateSource="var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n".concat(this.TemplateSource,"return __p;\n");this.renderFunction=new Function('pTemplateDataObject',this.TemplateSource);if(typeof pData!='undefined'){return this.renderFunction(pData);}// Provide the compiled function source as a convenience for build time
3357
3580
  // precompilation.
3358
- this.TemplateSourceCompiled='function(obj){\n'+this.TemplateSource+'}';return this.templateFunction();}}]);return FableServiceTemplate;}(libFableServiceBase);module.exports=FableServiceTemplate;},{"fable-serviceproviderbase":51}],146:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');// TODO: These are still pretty big -- consider the smaller polyfills
3581
+ this.TemplateSourceCompiled='function(obj){\n'+this.TemplateSource+'}';return this.templateFunction();}}]);return FableServiceTemplate;}(libFableServiceBase);module.exports=FableServiceTemplate;},{"fable-serviceproviderbase":51}],147:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');// TODO: These are still pretty big -- consider the smaller polyfills
3359
3582
  var libAsyncWaterfall=require('async.waterfall');var libAsyncEachLimit=require('async.eachlimit');var libBigNumber=require('big.js');var FableServiceUtility=/*#__PURE__*/function(_libFableServiceBase12){_inherits(FableServiceUtility,_libFableServiceBase12);// Underscore and lodash have a behavior, _.template, which compiles a
3360
3583
  // string-based template with code snippets into simple executable pieces,
3361
3584
  // with the added twist of returning a precompiled function ready to go.
@@ -3391,4 +3614,4 @@ var tmpChunkSize=typeof pChunkSize=='number'?pChunkSize:0;var tmpChunkCache=type
3391
3614
  // This *is* meant to be a simple, small, and fast way to convert ISO strings to dates in engines
3392
3615
  // with ultra limited JS capabilities where those don't work.
3393
3616
  },{key:"isoStringToDate",value:function isoStringToDate(pISOString){if(!this.fable.hasOwnProperty('Dates')){this.fable.instantiateServiceProvider('Dates');}var tmpDate=false;try{tmpDate=this.fable.Dates.dayJS.utc(pISOString);}catch(pError){// TODO: Should this throw? Doubtful.
3394
- this.fable.log.error("Could not parse date string ".concat(pISOString," with dayJS."));return false;}if(tmpDate){return tmpDate.toDate();}else{return false;}}}]);return FableServiceUtility;}(libFableServiceBase);module.exports=FableServiceUtility;},{"async.eachlimit":1,"async.waterfall":15,"big.js":17,"fable-serviceproviderbase":51}]},{},[126])(126);});
3617
+ this.fable.log.error("Could not parse date string ".concat(pISOString," with dayJS."));return false;}if(tmpDate){return tmpDate.toDate();}else{return false;}}}]);return FableServiceUtility;}(libFableServiceBase);module.exports=FableServiceUtility;},{"async.eachlimit":1,"async.waterfall":15,"big.js":17,"fable-serviceproviderbase":51}]},{},[127])(127);});