retold-remote 0.0.1

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.
Files changed (41) hide show
  1. package/LICENSE +21 -0
  2. package/css/retold-remote.css +83 -0
  3. package/html/codejar.js +511 -0
  4. package/html/index.html +23 -0
  5. package/package.json +68 -0
  6. package/server.js +43 -0
  7. package/source/Pict-Application-RetoldRemote-Configuration.json +7 -0
  8. package/source/Pict-Application-RetoldRemote.js +622 -0
  9. package/source/Pict-RetoldRemote-Bundle.js +14 -0
  10. package/source/cli/RetoldRemote-CLI-Program.js +15 -0
  11. package/source/cli/RetoldRemote-CLI-Run.js +3 -0
  12. package/source/cli/RetoldRemote-Server-Setup.js +257 -0
  13. package/source/cli/commands/RetoldRemote-Command-Serve.js +87 -0
  14. package/source/providers/Pict-Provider-GalleryFilterSort.js +597 -0
  15. package/source/providers/Pict-Provider-GalleryNavigation.js +819 -0
  16. package/source/providers/Pict-Provider-RetoldRemote.js +273 -0
  17. package/source/providers/Pict-Provider-RetoldRemoteIcons.js +640 -0
  18. package/source/providers/Pict-Provider-RetoldRemoteTheme.js +879 -0
  19. package/source/server/RetoldRemote-MediaService.js +536 -0
  20. package/source/server/RetoldRemote-PathRegistry.js +121 -0
  21. package/source/server/RetoldRemote-ThumbnailCache.js +89 -0
  22. package/source/server/RetoldRemote-ToolDetector.js +78 -0
  23. package/source/views/PictView-Remote-Gallery.js +1437 -0
  24. package/source/views/PictView-Remote-ImageViewer.js +363 -0
  25. package/source/views/PictView-Remote-Layout.js +420 -0
  26. package/source/views/PictView-Remote-MediaViewer.js +530 -0
  27. package/source/views/PictView-Remote-SettingsPanel.js +318 -0
  28. package/source/views/PictView-Remote-TopBar.js +206 -0
  29. package/web-application/codejar.js +511 -0
  30. package/web-application/css/retold-remote.css +83 -0
  31. package/web-application/index.html +23 -0
  32. package/web-application/js/pict.min.js +12 -0
  33. package/web-application/js/pict.min.js.map +1 -0
  34. package/web-application/retold-remote.compatible.js +5764 -0
  35. package/web-application/retold-remote.compatible.js.map +1 -0
  36. package/web-application/retold-remote.compatible.min.js +120 -0
  37. package/web-application/retold-remote.compatible.min.js.map +1 -0
  38. package/web-application/retold-remote.js +5763 -0
  39. package/web-application/retold-remote.js.map +1 -0
  40. package/web-application/retold-remote.min.js +120 -0
  41. package/web-application/retold-remote.min.js.map +1 -0
@@ -0,0 +1,12 @@
1
+ "use strict";function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach(function(t){_defineProperty2(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function _defineProperty2(e,t,r){return(t=_toPropertyKey2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPropertyKey2(e){var t=_toPrimitive2(e,"string");return"symbol"==typeof t?t:t+""}function _toPrimitive2(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Pict=e()}}(function(){return function e(t,r,i){function n(o,a){if(!r[o]){if(!t[o]){var c="function"==typeof require&&require;if(!a&&c)return c(o,!0);if(s)return s(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var h=r[o]={exports:{}};t[o][0].call(h.exports,function(e){return n(t[o][1][e]||e)},h,h.exports,e,t,r,i)}return r[o].exports}for(var s="function"==typeof require&&require,o=0;o<i.length;o++)n(i[o]);return n}({1:[function(e,t,r){var i=e("async.util.eachoflimit"),n=e("async.util.withoutindex");t.exports=function(e,t,r,s){return i(t)(e,n(r),s)}},{"async.util.eachoflimit":3,"async.util.withoutindex":14}],2:[function(e,t,r){t.exports=function(e){return function t(r){function i(){return e.length&&e[r].apply(null,arguments),i.next()}return i.next=function(){return r<e.length-1?t(r+1):null},i}(0)}},{}],3:[function(e,t,r){var i=e("async.util.once"),n=e("async.util.noop"),s=e("async.util.onlyonce"),o=e("async.util.keyiterator");t.exports=function(e){return function(t,r,a){a=i(a||n);var c=o(t=t||[]);if(e<=0)return a(null);var l=!1,h=0,u=!1;!function i(){if(l&&h<=0)return a(null);for(;h<e&&!u;){var n=c();if(null===n)return l=!0,void(h<=0&&a(null));h+=1,r(t[n],n,s(function(e){h-=1,e?(a(e),u=!0):i()}))}}()}}},{"async.util.keyiterator":7,"async.util.noop":9,"async.util.once":10,"async.util.onlyonce":11}],4:[function(e,t,r){var i=e("async.util.setimmediate"),n=e("async.util.restparam");t.exports=function(e){return n(function(t){var r=t.pop();t.push(function(){var e=arguments;n?i(function(){r.apply(null,e)}):r.apply(null,e)});var n=!0;e.apply(this,t),n=!1})}},{"async.util.restparam":12,"async.util.setimmediate":13}],5:[function(e,t,r){t.exports=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],6:[function(e,t,r){var i=e("async.util.isarray");t.exports=function(e){return i(e)||"number"==typeof e.length&&e.length>=0&&e.length%1==0}},{"async.util.isarray":5}],7:[function(e,t,r){var i=e("async.util.keys"),n=e("async.util.isarraylike");t.exports=function(e){var t,r,s=-1;return n(e)?(t=e.length,function(){return++s<t?s:null}):(r=i(e),t=r.length,function(){return++s<t?r[s]:null})}},{"async.util.isarraylike":6,"async.util.keys":8}],8:[function(e,t,r){t.exports=Object.keys||function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t}},{}],9:[function(e,t,r){t.exports=function(){}},{}],10:[function(e,t,r){t.exports=function(e){return function(){null!==e&&(e.apply(this,arguments),e=null)}}},{}],11:[function(e,t,r){t.exports=function(e){return function(){if(null===e)throw new Error("Callback was already called.");e.apply(this,arguments),e=null}}},{}],12:[function(e,t,r){t.exports=function(e,t){return t=null==t?e.length-1:+t,function(){for(var r=Math.max(arguments.length-t,0),i=new Array(r),n=0;n<r;n++)i[n]=arguments[n+t];switch(t){case 0:return e.call(this,i);case 1:return e.call(this,arguments[0],i)}}}},{}],13:[function(e,t,r){(function(e){(function(){var r="function"==typeof e&&e,i=function(e){setTimeout(e,0)};t.exports=function(e){return(r||i)(e)}}).call(this)}).call(this,e("timers").setImmediate)},{timers:187}],14:[function(e,t,r){t.exports=function(e){return function(t,r,i){return e(t,i)}}},{}],15:[function(e,t,r){var i=e("async.util.once"),n=e("async.util.noop"),s=e("async.util.isarray"),o=e("async.util.restparam"),a=e("async.util.ensureasync"),c=e("async.iterator");t.exports=function(e,t){if(t=i(t||n),!s(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();!function e(r){return o(function(i,n){if(i)t.apply(null,[i].concat(n));else{var s=r.next();s?n.push(e(s)):n.push(t),a(r).apply(null,n)}})}(c(e))()}},{"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(e,t,r){r.byteLength=function(e){var t=c(e),r=t[0],i=t[1];return 3*(r+i)/4-i},r.toByteArray=function(e){var t,r,i=c(e),o=i[0],a=i[1],l=new s(function(e,t,r){return 3*(t+r)/4-r}(0,o,a)),h=0,u=a>0?o-4:o;for(r=0;r<u;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],l[h++]=t>>16&255,l[h++]=t>>8&255,l[h++]=255&t;2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,l[h++]=255&t);1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,l[h++]=t>>8&255,l[h++]=255&t);return l},r.fromByteArray=function(e){for(var t,r=e.length,n=r%3,s=[],o=16383,a=0,c=r-n;a<c;a+=o)s.push(h(e,a,a+o>c?c:a+o));1===n?(t=e[r-1],s.push(i[t>>2]+i[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],s.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"="));return s.join("")};for(var i=[],n=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)i[a]=o[a],n[o.charCodeAt(a)]=a;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e){return i[e>>18&63]+i[e>>12&63]+i[e>>6&63]+i[63&e]}function h(e,t,r){for(var i,n=[],s=t;s<r;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),n.push(l(i));return n.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},{}],17:[function(e,t,r){!function(e){var r,i=1e6,n=1e6,s="[big.js] ",o=s+"Invalid ",a=o+"decimal places",c=o+"rounding mode",l=s+"Division by zero",h={},u=void 0,p=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function d(e,t,r,i){var n=e.c;if(r===u&&(r=e.constructor.RM),0!==r&&1!==r&&2!==r&&3!==r)throw Error(c);if(t<1)i=3===r&&(i||!!n[0])||0===t&&(1===r&&n[0]>=5||2===r&&(n[0]>5||5===n[0]&&(i||n[1]!==u))),n.length=1,i?(e.e=e.e-t+1,n[0]=1):n[0]=e.e=0;else if(t<n.length){if(i=1===r&&n[t]>=5||2===r&&(n[t]>5||5===n[t]&&(i||n[t+1]!==u||1&n[t-1]))||3===r&&(i||!!n[0]),n.length=t,i)for(;++n[--t]>9;)if(n[t]=0,0===t){++e.e,n.unshift(1);break}for(t=n.length;!n[--t];)n.pop()}return e}function f(e,t,r){var i=e.e,n=e.c.join(""),s=n.length;if(t)n=n.charAt(0)+(s>1?"."+n.slice(1):"")+(i<0?"e":"e+")+i;else if(i<0){for(;++i;)n="0"+n;n="0."+n}else if(i>0)if(++i>s)for(i-=s;i--;)n+="0";else i<s&&(n=n.slice(0,i)+"."+n.slice(i));else s>1&&(n=n.charAt(0)+"."+n.slice(1));return e.s<0&&r?"-"+n:n}h.abs=function(){var e=new this.constructor(this);return e.s=1,e},h.cmp=function(e){var t,r=this,i=r.c,n=(e=new r.constructor(e)).c,s=r.s,o=e.s,a=r.e,c=e.e;if(!i[0]||!n[0])return i[0]?s:n[0]?-o:0;if(s!=o)return s;if(t=s<0,a!=c)return a>c^t?1:-1;for(o=(a=i.length)<(c=n.length)?a:c,s=-1;++s<o;)if(i[s]!=n[s])return i[s]>n[s]^t?1:-1;return a==c?0:a>c^t?1:-1},h.div=function(e){var t=this,r=t.constructor,n=t.c,s=(e=new r(e)).c,o=t.s==e.s?1:-1,c=r.DP;if(c!==~~c||c<0||c>i)throw Error(a);if(!s[0])throw Error(l);if(!n[0])return e.s=o,e.c=[e.e=0],e;var h,p,f,g,m,y=s.slice(),b=h=s.length,v=n.length,T=n.slice(0,h),P=T.length,S=e,A=S.c=[],w=0,E=c+(S.e=t.e-e.e)+1;for(S.s=o,o=E<0?0:E,y.unshift(0);P++<h;)T.push(0);do{for(f=0;f<10;f++){if(h!=(P=T.length))g=h>P?1:-1;else for(m=-1,g=0;++m<h;)if(s[m]!=T[m]){g=s[m]>T[m]?1:-1;break}if(!(g<0))break;for(p=P==h?s:y;P;){if(T[--P]<p[P]){for(m=P;m&&!T[--m];)T[m]=9;--T[m],T[P]+=10}T[P]-=p[P]}for(;!T[0];)T.shift()}A[w++]=g?f:++f,T[0]&&g?T[P]=n[b]||0:T=[n[b]]}while((b++<v||T[0]!==u)&&o--);return A[0]||1==w||(A.shift(),S.e--,E--),w>E&&d(S,E,r.RM,T[0]!==u),S},h.eq=function(e){return 0===this.cmp(e)},h.gt=function(e){return this.cmp(e)>0},h.gte=function(e){return this.cmp(e)>-1},h.lt=function(e){return this.cmp(e)<0},h.lte=function(e){return this.cmp(e)<1},h.minus=h.sub=function(e){var t,r,i,n,s=this,o=s.constructor,a=s.s,c=(e=new o(e)).s;if(a!=c)return e.s=-c,s.plus(e);var l=s.c.slice(),h=s.e,u=e.c,p=e.e;if(!l[0]||!u[0])return u[0]?e.s=-c:l[0]?e=new o(s):e.s=1,e;if(a=h-p){for((n=a<0)?(a=-a,i=l):(p=h,i=u),i.reverse(),c=a;c--;)i.push(0);i.reverse()}else for(r=((n=l.length<u.length)?l:u).length,a=c=0;c<r;c++)if(l[c]!=u[c]){n=l[c]<u[c];break}if(n&&(i=l,l=u,u=i,e.s=-e.s),(c=(r=u.length)-(t=l.length))>0)for(;c--;)l[t++]=0;for(c=t;r>a;){if(l[--r]<u[r]){for(t=r;t&&!l[--t];)l[t]=9;--l[t],l[r]+=10}l[r]-=u[r]}for(;0===l[--c];)l.pop();for(;0===l[0];)l.shift(),--p;return l[0]||(e.s=1,l=[p=0]),e.c=l,e.e=p,e},h.mod=function(e){var t,r=this,i=r.constructor,n=r.s,s=(e=new i(e)).s;if(!e.c[0])throw Error(l);return r.s=e.s=1,t=1==e.cmp(r),r.s=n,e.s=s,t?new i(r):(n=i.DP,s=i.RM,i.DP=i.RM=0,r=r.div(e),i.DP=n,i.RM=s,this.minus(r.times(e)))},h.neg=function(){var e=new this.constructor(this);return e.s=-e.s,e},h.plus=h.add=function(e){var t,r,i,n=this,s=n.constructor;if(e=new s(e),n.s!=e.s)return e.s=-e.s,n.minus(e);var o=n.e,a=n.c,c=e.e,l=e.c;if(!a[0]||!l[0])return l[0]||(a[0]?e=new s(n):e.s=n.s),e;if(a=a.slice(),t=o-c){for(t>0?(c=o,i=l):(t=-t,i=a),i.reverse();t--;)i.push(0);i.reverse()}for(a.length-l.length<0&&(i=l,l=a,a=i),t=l.length,r=0;t;a[t]%=10)r=(a[--t]=a[t]+l[t]+r)/10|0;for(r&&(a.unshift(r),++c),t=a.length;0===a[--t];)a.pop();return e.c=a,e.e=c,e},h.pow=function(e){var t=this,r=new t.constructor("1"),i=r,s=e<0;if(e!==~~e||e<-1e6||e>n)throw Error(o+"exponent");for(s&&(e=-e);1&e&&(i=i.times(t)),e>>=1;)t=t.times(t);return s?r.div(i):i},h.prec=function(e,t){if(e!==~~e||e<1||e>i)throw Error(o+"precision");return d(new this.constructor(this),e,t)},h.round=function(e,t){if(e===u)e=0;else if(e!==~~e||e<-i||e>i)throw Error(a);return d(new this.constructor(this),e+this.e+1,t)},h.sqrt=function(){var e,t,r,i=this,n=i.constructor,o=i.s,a=i.e,c=new n("0.5");if(!i.c[0])return new n(i);if(o<0)throw Error(s+"No square root");0===(o=Math.sqrt(+f(i,!0,!0)))||o===1/0?((t=i.c.join("")).length+a&1||(t+="0"),a=((a+1)/2|0)-(a<0||1&a),e=new n(((o=Math.sqrt(t))==1/0?"5e":(o=o.toExponential()).slice(0,o.indexOf("e")+1))+a)):e=new n(o+""),a=e.e+(n.DP+=4);do{r=e,e=c.times(r.plus(i.div(r)))}while(r.c.slice(0,a).join("")!==e.c.slice(0,a).join(""));return d(e,(n.DP-=4)+e.e+1,n.RM)},h.times=h.mul=function(e){var t,r=this,i=r.constructor,n=r.c,s=(e=new i(e)).c,o=n.length,a=s.length,c=r.e,l=e.e;if(e.s=r.s==e.s?1:-1,!n[0]||!s[0])return e.c=[e.e=0],e;for(e.e=c+l,o<a&&(t=n,n=s,s=t,l=o,o=a,a=l),t=new Array(l=o+a);l--;)t[l]=0;for(c=a;c--;){for(a=0,l=o+c;l>c;)a=t[l]+s[c]*n[l-c-1]+a,t[l--]=a%10,a=a/10|0;t[l]=a}for(a?++e.e:t.shift(),c=t.length;!t[--c];)t.pop();return e.c=t,e},h.toExponential=function(e,t){var r=this,n=r.c[0];if(e!==u){if(e!==~~e||e<0||e>i)throw Error(a);for(r=d(new r.constructor(r),++e,t);r.c.length<e;)r.c.push(0)}return f(r,!0,!!n)},h.toFixed=function(e,t){var r=this,n=r.c[0];if(e!==u){if(e!==~~e||e<0||e>i)throw Error(a);for(e=e+(r=d(new r.constructor(r),e+r.e+1,t)).e+1;r.c.length<e;)r.c.push(0)}return f(r,!1,!!n)},h.toJSON=h.toString=function(){var e=this,t=e.constructor;return f(e,e.e<=t.NE||e.e>=t.PE,!!e.c[0])},h.toNumber=function(){var e=+f(this,!0,!0);if(!0===this.constructor.strict&&!this.eq(e.toString()))throw Error(s+"Imprecise conversion");return e},h.toPrecision=function(e,t){var r=this,n=r.constructor,s=r.c[0];if(e!==u){if(e!==~~e||e<1||e>i)throw Error(o+"precision");for(r=d(new n(r),e,t);r.c.length<e;)r.c.push(0)}return f(r,e<=r.e||r.e<=n.NE||r.e>=n.PE,!!s)},h.valueOf=function(){var e=this,t=e.constructor;if(!0===t.strict)throw Error(s+"valueOf disallowed");return f(e,e.e<=t.NE||e.e>=t.PE,!0)},r=function e(){function t(r){var i=this;if(!(i instanceof t))return r===u&&0===arguments.length?e():new t(r);if(r instanceof t)i.s=r.s,i.e=r.e,i.c=r.c.slice();else{if("string"!=typeof r){if(!0===t.strict&&"bigint"!=typeof r)throw TypeError(o+"value");r=0===r&&1/r<0?"-0":String(r)}!function(e,t){var r,i,n;if(!p.test(t))throw Error(o+"number");e.s="-"==t.charAt(0)?(t=t.slice(1),-1):1,(r=t.indexOf("."))>-1&&(t=t.replace(".",""));(i=t.search(/e/i))>0?(r<0&&(r=i),r+=+t.slice(i+1),t=t.substring(0,i)):r<0&&(r=t.length);for(n=t.length,i=0;i<n&&"0"==t.charAt(i);)++i;if(i==n)e.c=[e.e=0];else{for(;n>0&&"0"==t.charAt(--n););for(e.e=r-i-1,e.c=[],r=0;i<=n;)e.c[r++]=+t.charAt(i++)}}(i,r)}i.constructor=t}return t.prototype=h,t.DP=20,t.RM=1,t.NE=-7,t.PE=21,t.strict=false,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}(),r.default=r.Big=r,void 0!==t&&t.exports?t.exports=r:e.Big=r}(this)},{}],18:[function(e,t,r){},{}],19:[function(e,t,r){arguments[4][18][0].apply(r,arguments)},{dup:18}],20:[function(e,t,r){(function(t){(function(){var t=e("base64-js"),i=e("ieee754");r.Buffer=o,r.SlowBuffer=function(e){+e!=e&&(e=0);return o.alloc(+e)},r.INSPECT_MAX_BYTES=50;var n=2147483647;function s(e){if(e>n)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=o.prototype,t}function o(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return a(e,t,r)}function a(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!o.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|p(e,t),i=s(r),n=i.write(e,t);n!==r&&(i=i.slice(0,n));return i}(e,t);if(ArrayBuffer.isView(e))return h(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(B(e,ArrayBuffer)||e&&B(e.buffer,ArrayBuffer))return function(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var i;i=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r);return i.__proto__=o.prototype,i}(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=e.valueOf&&e.valueOf();if(null!=i&&i!==e)return o.from(i,t,r);var n=function(e){if(o.isBuffer(e)){var t=0|u(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||U(e.length)?s(0):h(e);if("Buffer"===e.type&&Array.isArray(e.data))return h(e.data)}(e);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return c(e),s(e<0?0:0|u(e))}function h(e){for(var t=e.length<0?0:0|u(e.length),r=s(t),i=0;i<t;i+=1)r[i]=255&e[i];return r}function u(e){if(e>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|e}function p(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||B(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return V(e).length;default:if(n)return i?-1:F(e).length;t=(""+t).toLowerCase(),n=!0}}function d(e,t,r){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return D(this,t,r);case"utf8":case"utf-8":return w(this,t,r);case"ascii":return x(this,t,r);case"latin1":case"binary":return C(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function f(e,t,r){var i=e[t];e[t]=e[r],e[r]=i}function g(e,t,r,i,n){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),U(r=+r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof t&&(t=o.from(t,i)),o.isBuffer(t))return 0===t.length?-1:m(e,t,r,i,n);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,i,n);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,i,n){var s,o=1,a=e.length,c=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;o=2,a/=2,c/=2,r/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(n){var h=-1;for(s=r;s<a;s++)if(l(e,s)===l(t,-1===h?0:s-h)){if(-1===h&&(h=s),s-h+1===c)return h*o}else-1!==h&&(s-=s-h),h=-1}else for(r+c>a&&(r=a-c),s=r;s>=0;s--){for(var u=!0,p=0;p<c;p++)if(l(e,s+p)!==l(t,p)){u=!1;break}if(u)return s}return-1}function y(e,t,r,i){r=Number(r)||0;var n=e.length-r;i?(i=Number(i))>n&&(i=n):i=n;var s=t.length;i>s/2&&(i=s/2);for(var o=0;o<i;++o){var a=parseInt(t.substr(2*o,2),16);if(U(a))return o;e[r+o]=a}return o}function b(e,t,r,i){return _(F(t,e.length-r),e,r,i)}function v(e,t,r,i){return _(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,i)}function T(e,t,r,i){return v(e,t,r,i)}function P(e,t,r,i){return _(V(t),e,r,i)}function S(e,t,r,i){return _(function(e,t){for(var r,i,n,s=[],o=0;o<e.length&&!((t-=2)<0);++o)i=(r=e.charCodeAt(o))>>8,n=r%256,s.push(n),s.push(i);return s}(t,e.length-r),e,r,i)}function A(e,r,i){return 0===r&&i===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,i))}function w(e,t,r){r=Math.min(e.length,r);for(var i=[],n=t;n<r;){var s,o,a,c,l=e[n],h=null,u=l>239?4:l>223?3:l>191?2:1;if(n+u<=r)switch(u){case 1:l<128&&(h=l);break;case 2:128==(192&(s=e[n+1]))&&(c=(31&l)<<6|63&s)>127&&(h=c);break;case 3:s=e[n+1],o=e[n+2],128==(192&s)&&128==(192&o)&&(c=(15&l)<<12|(63&s)<<6|63&o)>2047&&(c<55296||c>57343)&&(h=c);break;case 4:s=e[n+1],o=e[n+2],a=e[n+3],128==(192&s)&&128==(192&o)&&128==(192&a)&&(c=(15&l)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&c<1114112&&(h=c)}null===h?(h=65533,u=1):h>65535&&(h-=65536,i.push(h>>>10&1023|55296),h=56320|1023&h),i.push(h),n+=u}return function(e){var t=e.length;if(t<=E)return String.fromCharCode.apply(String,e);var r="",i=0;for(;i<t;)r+=String.fromCharCode.apply(String,e.slice(i,i+=E));return r}(i)}r.kMaxLength=n,o.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),o.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),o.poolSize=8192,o.from=function(e,t,r){return a(e,t,r)},o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,o.alloc=function(e,t,r){return function(e,t,r){return c(e),e<=0?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)}(e,t,r)},o.allocUnsafe=function(e){return l(e)},o.allocUnsafeSlow=function(e){return l(e)},o.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==o.prototype},o.compare=function(e,t){if(B(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),B(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,i=t.length,n=0,s=Math.min(r,i);n<s;++n)if(e[n]!==t[n]){r=e[n],i=t[n];break}return r<i?-1:i<r?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var i=o.allocUnsafe(t),n=0;for(r=0;r<e.length;++r){var s=e[r];if(B(s,Uint8Array)&&(s=o.from(s)),!o.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,n),n+=s.length}return i},o.byteLength=p,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)f(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)f(this,t,t+3),f(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)f(this,t,t+7),f(this,t+1,t+6),f(this,t+2,t+5),f(this,t+3,t+4);return this},o.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?w(this,0,e):d.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},o.prototype.compare=function(e,t,r,i,n){if(B(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),t<0||r>e.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&t>=r)return 0;if(i>=n)return-1;if(t>=r)return 1;if(this===e)return 0;for(var s=(n>>>=0)-(i>>>=0),a=(r>>>=0)-(t>>>=0),c=Math.min(s,a),l=this.slice(i,n),h=e.slice(t,r),u=0;u<c;++u)if(l[u]!==h[u]){s=l[u],a=h[u];break}return s<a?-1:a<s?1:0},o.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},o.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},o.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)},o.prototype.write=function(e,t,r,i){if(void 0===t)i="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)i=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var n=this.length-t;if((void 0===r||r>n)&&(r=n),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return y(this,e,t,r);case"utf8":case"utf-8":return b(this,e,t,r);case"ascii":return v(this,e,t,r);case"latin1":case"binary":return T(this,e,t,r);case"base64":return P(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var E=4096;function x(e,t,r){var i="";r=Math.min(e.length,r);for(var n=t;n<r;++n)i+=String.fromCharCode(127&e[n]);return i}function C(e,t,r){var i="";r=Math.min(e.length,r);for(var n=t;n<r;++n)i+=String.fromCharCode(e[n]);return i}function D(e,t,r){var i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);for(var n="",s=t;s<r;++s)n+=L(e[s]);return n}function R(e,t,r){for(var i=e.slice(t,r),n="",s=0;s<i.length;s+=2)n+=String.fromCharCode(i[s]+256*i[s+1]);return n}function k(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,r,i,n,s){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<s)throw new RangeError('"value" argument is out of bounds');if(r+i>e.length)throw new RangeError("Index out of range")}function j(e,t,r,i,n,s){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function O(e,t,r,n,s){return t=+t,r>>>=0,s||j(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function I(e,t,r,n,s){return t=+t,r>>>=0,s||j(e,0,r,8),i.write(e,t,r,n,52,8),r+8}o.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var i=this.subarray(e,t);return i.__proto__=o.prototype,i},o.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);for(var i=this[e],n=1,s=0;++s<t&&(n*=256);)i+=this[e+s]*n;return i},o.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);for(var i=this[e+--t],n=1;t>0&&(n*=256);)i+=this[e+--t]*n;return i},o.prototype.readUInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);for(var i=this[e],n=1,s=0;++s<t&&(n*=256);)i+=this[e+s]*n;return i>=(n*=128)&&(i-=Math.pow(2,8*t)),i},o.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);for(var i=t,n=1,s=this[e+--i];i>0&&(n*=256);)s+=this[e+--i]*n;return s>=(n*=128)&&(s-=Math.pow(2,8*t)),s},o.prototype.readInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||k(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(e,t){e>>>=0,t||k(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return e>>>=0,t||k(e,4,this.length),i.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||k(e,4,this.length),i.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||k(e,8,this.length),i.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||k(e,8,this.length),i.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,r,i){(e=+e,t>>>=0,r>>>=0,i)||N(this,e,t,r,Math.pow(2,8*r)-1,0);var n=1,s=0;for(this[t]=255&e;++s<r&&(n*=256);)this[t+s]=e/n&255;return t+r},o.prototype.writeUIntBE=function(e,t,r,i){(e=+e,t>>>=0,r>>>=0,i)||N(this,e,t,r,Math.pow(2,8*r)-1,0);var n=r-1,s=1;for(this[t+n]=255&e;--n>=0&&(s*=256);)this[t+n]=e/s&255;return t+r},o.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeIntLE=function(e,t,r,i){if(e=+e,t>>>=0,!i){var n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}var s=0,o=1,a=0;for(this[t]=255&e;++s<r&&(o*=256);)e<0&&0===a&&0!==this[t+s-1]&&(a=1),this[t+s]=(e/o|0)-a&255;return t+r},o.prototype.writeIntBE=function(e,t,r,i){if(e=+e,t>>>=0,!i){var n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}var s=r-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o|0)-a&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeFloatLE=function(e,t,r){return O(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return O(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return I(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return I(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,i){if(!o.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<r&&(i=r),i===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-r&&(i=e.length-t+r);var n=i-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,i);else if(this===e&&r<t&&t<i)for(var s=n-1;s>=0;--s)e[s+t]=this[s+r];else Uint8Array.prototype.set.call(e,this.subarray(r,i),t);return n},o.prototype.fill=function(e,t,r,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!o.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===e.length){var n=e.charCodeAt(0);("utf8"===i&&n<128||"latin1"===i)&&(e=n)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var s;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(s=t;s<r;++s)this[s]=e;else{var a=o.isBuffer(e)?e:o.from(e,i),c=a.length;if(0===c)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(s=0;s<r-t;++s)this[s+t]=a[s%c]}return this};var M=/[^+/0-9A-Za-z-_]/g;function L(e){return e<16?"0"+e.toString(16):e.toString(16)}function F(e,t){var r;t=t||1/0;for(var i=e.length,n=null,s=[],o=0;o<i;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===i){(t-=3)>-1&&s.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(t-=3)>-1&&s.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function V(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(M,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function _(e,t,r,i){for(var n=0;n<i&&!(n+r>=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function B(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function U(e){return e!=e}}).call(this)}).call(this,e("buffer").Buffer)},{"base64-js":16,buffer:20,ieee754:114}],21:[function(e,t,r){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],22:[function(e,t,r){const i=e("fable-serviceproviderbase"),n=e("./LinkedList.js");t.exports=class extends i{constructor(e,t,r){void 0===e?super({}):super(e,t,r),this.serviceType="ObjectCache",this._HashMap={},this._RecordMap={},this._List=new n,this.maxLength=0,this.maxAge=0}get RecordMap(){return this._RecordMap}put(e,t){if(this._HashMap.hasOwnProperty(t))return this._HashMap[t].Datum=e,this._RecordMap[t]=e,this._HashMap[t].Datum;let r=this._List.push(e,t);return this._HashMap[r.Hash]=r,this._RecordMap[t]=e,this.maxLength>0&&this._List.length>this.maxLength&&(r=this._List.pop(),delete this._RecordMap[r.Hash],delete this._HashMap[r.Hash]),r.Metadata.Created=+new Date,r.Datum}read(e){return!!this._HashMap.hasOwnProperty(e)&&this._HashMap[e].Datum}touch(e){if(!this._HashMap.hasOwnProperty(e))return!1;let t=this._List.remove(this._HashMap[e]);return delete this._RecordMap[e],delete this._HashMap[e],this.put(t.Datum,t.Hash)}expire(e){if(!this._HashMap.hasOwnProperty(e))return!1;let t=this._HashMap[e];return t=this._List.remove(t),delete this._RecordMap[t.Hash],delete this._HashMap[t.Hash],t}pruneBasedOnExpiration(e,t){let r=void 0===t?[]:t;if(this.maxAge<1)return e(r);let i=+new Date,n=Object.keys(this._HashMap);for(let e=0;e<n.length;e++)i-this._HashMap[n[e]].Metadata.Created>=this.maxAge&&r.push(this.expire(n[e]));e(r)}pruneBasedOnLength(e,t){let r=void 0===t?[]:t;if(this.maxLength>0)for(;this._List.length>this.maxLength;)r.push(this._List.pop());return e(r)}pruneCustom(e,t,r){let i=void 0===r?[]:r,n=Object.keys(this._HashMap);for(let e=0;e<n.length;e++){let r=this._HashMap[n[e]];t(r.Datum,r.Hash,r)&&i.push(this.expire(n[e]))}e(i)}prune(e){let t=[];if(this._List.length<1)return e(t);this.pruneBasedOnExpiration(r=>{this.pruneBasedOnLength(e,t)},t)}getNode(e){return!!this._HashMap.hasOwnProperty(e)&&this._HashMap[e]}}},{"./LinkedList.js":24,"fable-serviceproviderbase":59}],23:[function(e,t,r){t.exports=class{constructor(){this.Hash=!1,this.Datum=!1,this.Metadata={},this.LeftNode=!1,this.RightNode=!1,this.__ISNODE=!0}}},{}],24:[function(e,t,r){const i=e("./LinkedList-Node.js");t.exports=class{constructor(){this.totalNodes=0,this.length=0,this.head=!1,this.tail=!1}initializeNode(e,t){if(void 0===e)return!1;this.totalNodes++;let r=void 0!==t?t:"NODE[".concat(this.totalNodes,"]"),n=new i;return n.Hash=r,n.Datum=e,n}append(e,t){let r=this.initializeNode(e,t);return!!r&&(this.length++,1==this.length?(this.head=r,this.tail=r,r):(this.tail.RightNode=r,r.LeftNode=this.tail,this.tail=r,r))}push(e,t){return this.append(e,t)}prepend(e,t){let r=this.initializeNode(e,t);return!!r&&(this.length++,1==this.length?(this.head=r,this.tail=r,r):(this.head.LeftNode=r,r.RightNode=this.head,this.head=r,r))}remove(e){return void 0!==e&&(!!e.__ISNODE&&(this.length--,this.length<1?(this.head=!1,this.tail=!1,e):e.LeftNode&&e.RightNode?(e.LeftNode.RightNode=e.RightNode,e.RightNode.LeftNode=e.LeftNode,e.RightNode=!1,e.LeftNode=!1,e):e.LeftNode?(e.LeftNode.RightNode=!1,this.tail=e.LeftNode,e.LeftNode=!1,e):(e.RightNode.LeftNode=!1,this.head=e.RightNode,e.RightNode=!1,e)))}pop(){return this.remove(this.head)}each(e,t){if(this.length<1)return t();let r=!1,i=n=>{if(n)return t(n);if(r){if(!r.RightNode)return t();r=r.RightNode}else r=this.head;e(r.Datum,r.Hash,i)};return i()}seek(e){if(!e)return!1;if(this.length<1)return!1;if(e>=this.length)return!1;let t=this.head;for(let r=0;r<e;r++)t=t.RightNode;return t}}},{"./LinkedList-Node.js":23}],25:[function(e,t,r){var i=e("function-bind"),n=e("./functionApply"),s=e("./functionCall"),o=e("./reflectApply");t.exports=o||i.call(s,n)},{"./functionApply":26,"./functionCall":27,"./reflectApply":29,"function-bind":103}],26:[function(e,t,r){t.exports=Function.prototype.apply},{}],27:[function(e,t,r){t.exports=Function.prototype.call},{}],28:[function(e,t,r){var i=e("function-bind"),n=e("es-errors/type"),s=e("./functionCall"),o=e("./actualApply");t.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new n("a function is required");return o(i,s,e)}},{"./actualApply":25,"./functionCall":27,"es-errors/type":47,"function-bind":103}],29:[function(e,t,r){t.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},{}],30:[function(e,t,r){var i=e("get-intrinsic"),n=e("call-bind-apply-helpers"),s=n([i("%String.prototype.indexOf%")]);t.exports=function(e,t){var r=i(e,!!t);return"function"==typeof r&&s(e,".prototype.")>-1?n([r]):r}},{"call-bind-apply-helpers":28,"get-intrinsic":104}],31:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.parseCookie=h,r.parse=h,r.stringifyCookie=function(e,t){const r=(null==t?void 0:t.encode)||encodeURIComponent,s=[];for(const t of Object.keys(e)){const o=e[t];if(void 0===o)continue;if(!i.test(t))throw new TypeError("cookie name is invalid: ".concat(t));const a=r(o);if(!n.test(a))throw new TypeError("cookie val is invalid: ".concat(o));s.push("".concat(t,"=").concat(a))}return s.join("; ")},r.stringifySetCookie=u,r.serialize=u,r.parseSetCookie=function(e,t){const r=(null==t?void 0:t.decode)||g,i=e.length,n=p(e,0,i),s=d(e,0,n),o=-1===s?{name:"",value:r(f(e,0,n))}:{name:f(e,0,s),value:r(f(e,s+1,n))};let c=n+1;for(;c<i;){const t=p(e,c,i),r=d(e,c,t),n=f(e,c,-1===r?t:r),s=-1===r?void 0:f(e,r+1,t);switch(n.toLowerCase()){case"httponly":o.httpOnly=!0;break;case"secure":o.secure=!0;break;case"partitioned":o.partitioned=!0;break;case"domain":o.domain=s;break;case"path":o.path=s;break;case"max-age":s&&a.test(s)&&(o.maxAge=Number(s));break;case"expires":if(!s)break;const e=new Date(s);Number.isFinite(e.valueOf())&&(o.expires=e);break;case"priority":if(!s)break;const t=s.toLowerCase();"low"!==t&&"medium"!==t&&"high"!==t||(o.priority=t);break;case"samesite":if(!s)break;const r=s.toLowerCase();"lax"!==r&&"strict"!==r&&"none"!==r||(o.sameSite=r)}c=t+1}return o},r.stringifySetCookie=u,r.serialize=u;const i=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,n=/^[\u0021-\u003A\u003C-\u007E]*$/,s=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,o=/^[\u0020-\u003A\u003D-\u007E]*$/,a=/^-?\d+$/,c=Object.prototype.toString,l=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function h(e,t){const r=new l,i=e.length;if(i<2)return r;const n=(null==t?void 0:t.decode)||g;let s=0;do{const t=d(e,s,i);if(-1===t)break;const o=p(e,s,i);if(t>o){s=e.lastIndexOf(";",t-1)+1;continue}const a=f(e,s,t);void 0===r[a]&&(r[a]=n(f(e,t+1,o))),s=o+1}while(s<i);return r}function u(e,t,r){const a="object"==typeof e?e:_objectSpread2(_objectSpread2({},r),{},{name:e,value:String(t)}),l="object"==typeof t?t:r,h=(null==l?void 0:l.encode)||encodeURIComponent;if(!i.test(a.name))throw new TypeError("argument name is invalid: ".concat(a.name));const u=a.value?h(a.value):"";if(!n.test(u))throw new TypeError("argument val is invalid: ".concat(a.value));let p=a.name+"="+u;if(void 0!==a.maxAge){if(!Number.isInteger(a.maxAge))throw new TypeError("option maxAge is invalid: ".concat(a.maxAge));p+="; Max-Age="+a.maxAge}if(a.domain){if(!s.test(a.domain))throw new TypeError("option domain is invalid: ".concat(a.domain));p+="; Domain="+a.domain}if(a.path){if(!o.test(a.path))throw new TypeError("option path is invalid: ".concat(a.path));p+="; Path="+a.path}if(a.expires){if(d=a.expires,"[object Date]"!==c.call(d)||!Number.isFinite(a.expires.valueOf()))throw new TypeError("option expires is invalid: ".concat(a.expires));p+="; Expires="+a.expires.toUTCString()}var d;if(a.httpOnly&&(p+="; HttpOnly"),a.secure&&(p+="; Secure"),a.partitioned&&(p+="; Partitioned"),a.priority){switch("string"==typeof a.priority?a.priority.toLowerCase():void 0){case"low":p+="; Priority=Low";break;case"medium":p+="; Priority=Medium";break;case"high":p+="; Priority=High";break;default:throw new TypeError("option priority is invalid: ".concat(a.priority))}}if(a.sameSite){switch("string"==typeof a.sameSite?a.sameSite.toLowerCase():a.sameSite){case!0:case"strict":p+="; SameSite=Strict";break;case"lax":p+="; SameSite=Lax";break;case"none":p+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid: ".concat(a.sameSite))}}return p}function p(e,t,r){const i=e.indexOf(";",t);return-1===i?r:i}function d(e,t,r){const i=e.indexOf("=",t);return i<r?i:-1}function f(e,t,r){let i=t,n=r;do{const t=e.charCodeAt(i);if(32!==t&&9!==t)break}while(++i<n);for(;n>i;){const t=e.charCodeAt(n-1);if(32!==t&&9!==t)break;n--}return e.slice(i,n)}function g(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch(t){return e}}},{}],32:[function(e,t,r){var i,n;i=this,n=function(){var e=6e4,t=36e5,r="millisecond",i="second",n="minute",s="hour",o="day",a="week",c="month",l="quarter",h="year",u="date",p="Invalid Date",d=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},m=function(e,t,r){var i=String(e);return!i||i.length>=t?e:""+Array(t+1-i.length).join(r)+e},y={s:m,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),i=Math.floor(r/60),n=r%60;return(t<=0?"+":"-")+m(i,2,"0")+":"+m(n,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var i=12*(r.year()-t.year())+(r.month()-t.month()),n=t.clone().add(i,c),s=r-n<0,o=t.clone().add(i+(s?-1:1),c);return+(-(i+(r-n)/(s?n-o:o-n))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:h,w:a,d:o,D:u,h:s,m:n,s:i,ms:r,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",v={};v[b]=g;var T="$isDayjsObject",P=function(e){return e instanceof E||!(!e||!e[T])},S=function e(t,r,i){var n;if(!t)return b;if("string"==typeof t){var s=t.toLowerCase();v[s]&&(n=s),r&&(v[s]=r,n=s);var o=t.split("-");if(!n&&o.length>1)return e(o[0])}else{var a=t.name;v[a]=t,n=a}return!i&&n&&(b=n),n||!i&&b},A=function(e,t){if(P(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new E(r)},w=y;w.l=S,w.i=P,w.w=function(e,t){return A(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=S(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[T]=!0}var m=g.prototype;return m.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(w.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var i=t.match(d);if(i){var n=i[2]-1||0,s=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],n,i[3]||1,i[4]||0,i[5]||0,i[6]||0,s)):new Date(i[1],n,i[3]||1,i[4]||0,i[5]||0,i[6]||0,s)}}return new Date(t)}(e),this.init()},m.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},m.$utils=function(){return w},m.isValid=function(){return!(this.$d.toString()===p)},m.isSame=function(e,t){var r=A(e);return this.startOf(t)<=r&&r<=this.endOf(t)},m.isAfter=function(e,t){return A(e)<this.startOf(t)},m.isBefore=function(e,t){return this.endOf(t)<A(e)},m.$g=function(e,t,r){return w.u(e)?this[t]:this.set(r,e)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(e,t){var r=this,l=!!w.u(t)||t,p=w.p(e),d=function(e,t){var i=w.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return l?i:i.endOf(o)},f=function(e,t){return w.w(r.toDate()[e].apply(r.toDate("s"),(l?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},g=this.$W,m=this.$M,y=this.$D,b="set"+(this.$u?"UTC":"");switch(p){case h:return l?d(1,0):d(31,11);case c:return l?d(1,m):d(0,m+1);case a:var v=this.$locale().weekStart||0,T=(g<v?g+7:g)-v;return d(l?y-T:y+(6-T),m);case o:case u:return f(b+"Hours",0);case s:return f(b+"Minutes",1);case n:return f(b+"Seconds",2);case i:return f(b+"Milliseconds",3);default:return this.clone()}},m.endOf=function(e){return this.startOf(e,!1)},m.$set=function(e,t){var a,l=w.p(e),p="set"+(this.$u?"UTC":""),d=(a={},a[o]=p+"Date",a[u]=p+"Date",a[c]=p+"Month",a[h]=p+"FullYear",a[s]=p+"Hours",a[n]=p+"Minutes",a[i]=p+"Seconds",a[r]=p+"Milliseconds",a)[l],f=l===o?this.$D+(t-this.$W):t;if(l===c||l===h){var g=this.clone().set(u,1);g.$d[d](f),g.init(),this.$d=g.set(u,Math.min(this.$D,g.daysInMonth())).$d}else d&&this.$d[d](f);return this.init(),this},m.set=function(e,t){return this.clone().$set(e,t)},m.get=function(e){return this[w.p(e)]()},m.add=function(r,l){var u,p=this;r=Number(r);var d=w.p(l),f=function(e){var t=A(p);return w.w(t.date(t.date()+Math.round(e*r)),p)};if(d===c)return this.set(c,this.$M+r);if(d===h)return this.set(h,this.$y+r);if(d===o)return f(1);if(d===a)return f(7);var g=(u={},u[n]=e,u[s]=t,u[i]=1e3,u)[d]||1,m=this.$d.getTime()+r*g;return w.w(m,this)},m.subtract=function(e,t){return this.add(-1*e,t)},m.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||p;var i=e||"YYYY-MM-DDTHH:mm:ssZ",n=w.z(this),s=this.$H,o=this.$m,a=this.$M,c=r.weekdays,l=r.months,h=r.meridiem,u=function(e,r,n,s){return e&&(e[r]||e(t,i))||n[r].slice(0,s)},d=function(e){return w.s(s%12||12,e,"0")},g=h||function(e,t,r){var i=e<12?"AM":"PM";return r?i.toLowerCase():i};return i.replace(f,function(e,i){return i||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return w.s(t.$y,4,"0");case"M":return a+1;case"MM":return w.s(a+1,2,"0");case"MMM":return u(r.monthsShort,a,l,3);case"MMMM":return u(l,a);case"D":return t.$D;case"DD":return w.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return u(r.weekdaysMin,t.$W,c,2);case"ddd":return u(r.weekdaysShort,t.$W,c,3);case"dddd":return c[t.$W];case"H":return String(s);case"HH":return w.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return g(s,o,!0);case"A":return g(s,o,!1);case"m":return String(o);case"mm":return w.s(o,2,"0");case"s":return String(t.$s);case"ss":return w.s(t.$s,2,"0");case"SSS":return w.s(t.$ms,3,"0");case"Z":return n}return null}(e)||n.replace(":","")})},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,u,p){var d,f=this,g=w.p(u),m=A(r),y=(m.utcOffset()-this.utcOffset())*e,b=this-m,v=function(){return w.m(f,m)};switch(g){case h:d=v()/12;break;case c:d=v();break;case l:d=v()/3;break;case a:d=(b-y)/6048e5;break;case o:d=(b-y)/864e5;break;case s:d=b/t;break;case n:d=b/e;break;case i:d=b/1e3;break;default:d=b}return p?d:w.a(d)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return v[this.$L]},m.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),i=S(e,t,!0);return i&&(r.$L=i),r},m.clone=function(){return w.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},g}(),x=E.prototype;return A.prototype=x,[["$ms",r],["$s",i],["$m",n],["$H",s],["$W",o],["$M",c],["$y",h],["$D",u]].forEach(function(e){x[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),A.extend=function(e,t){return e.$i||(e(t,E,A),e.$i=!0),A},A.locale=S,A.isDayjs=P,A.unix=function(e){return A(1e3*e)},A.en=v[b],A.Ls=v,A.p={},A},"object"==typeof r&&void 0!==t?t.exports=n():(i="undefined"!=typeof globalThis?globalThis:i||self).dayjs=n()},{}],33:[function(e,t,r){var i,n;i=this,n=function(){return function(e,t){var r=t.prototype,i=r.format;r.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return i.bind(this)(e);var n=this.$utils(),s=(e||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(e){switch(e){case"Q":return Math.ceil((t.$M+1)/3);case"Do":return r.ordinal(t.$D);case"gggg":return t.weekYear();case"GGGG":return t.isoWeekYear();case"wo":return r.ordinal(t.week(),"W");case"w":case"ww":return n.s(t.week(),"w"===e?1:2,"0");case"W":case"WW":return n.s(t.isoWeek(),"W"===e?1:2,"0");case"k":case"kk":return n.s(String(0===t.$H?24:t.$H),"k"===e?1:2,"0");case"X":return Math.floor(t.$d.getTime()/1e3);case"x":return t.$d.getTime();case"z":return"["+t.offsetName()+"]";case"zzz":return"["+t.offsetName("long")+"]";default:return e}});return i.bind(this)(s)}}},"object"==typeof r&&void 0!==t?t.exports=n():(i="undefined"!=typeof globalThis?globalThis:i||self).dayjs_plugin_advancedFormat=n()},{}],34:[function(e,t,r){var i,n;i=this,n=function(){var e="day";return function(t,r,i){var n=function(t){return t.add(4-t.isoWeekday(),e)},s=r.prototype;s.isoWeekYear=function(){return n(this).year()},s.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var r,s,o,a=n(this),c=(r=this.isoWeekYear(),o=4-(s=(this.$u?i.utc:i)().year(r).startOf("year")).isoWeekday(),s.isoWeekday()>4&&(o+=7),s.add(o,e));return a.diff(c,"week")+1},s.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var o=s.startOf;s.startOf=function(e,t){var r=this.$utils(),i=!!r.u(t)||t;return"isoweek"===r.p(e)?i?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):o.bind(this)(e,t)}}},"object"==typeof r&&void 0!==t?t.exports=n():(i="undefined"!=typeof globalThis?globalThis:i||self).dayjs_plugin_isoWeek=n()},{}],35:[function(e,t,r){var i,n;i=this,n=function(){return function(e,t,r){e=e||{};var i=t.prototype,n={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function s(e,t,r,n){return i.fromToBase(e,t,r,n)}r.en.relativeTime=n,i.fromToBase=function(t,i,s,o,a){for(var c,l,h,u=s.$locale().relativeTime||n,p=e.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],d=p.length,f=0;f<d;f+=1){var g=p[f];g.d&&(c=o?r(t).diff(s,g.d,!0):s.diff(t,g.d,!0));var m=(e.rounding||Math.round)(Math.abs(c));if(h=c>0,m<=g.r||!g.r){m<=1&&f>0&&(g=p[f-1]);var y=u[g.l];a&&(m=a(""+m)),l="string"==typeof y?y.replace("%d",m):y(m,i,g.l,h);break}}if(i)return l;var b=h?u.future:u.past;return"function"==typeof b?b(l):b.replace("%s",l)},i.to=function(e,t){return s(e,t,this,!0)},i.from=function(e,t){return s(e,t,this)};var o=function(e){return e.$u?r.utc():r()};i.toNow=function(e){return this.to(o(this),e)},i.fromNow=function(e){return this.from(o(this),e)}}},"object"==typeof r&&void 0!==t?t.exports=n():(i="undefined"!=typeof globalThis?globalThis:i||self).dayjs_plugin_relativeTime=n()},{}],36:[function(e,t,r){var i,n;i=this,n=function(){var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(r,i,n){var s,o=function(e,r,i){void 0===i&&(i={});var n=new Date(e),s=function(e,r){void 0===r&&(r={});var i=r.timeZoneName||"short",n=e+"|"+i,s=t[n];return s||(s=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:i}),t[n]=s),s}(r,i);return s.formatToParts(n)},a=function(t,r){for(var i=o(t,r),s=[],a=0;a<i.length;a+=1){var c=i[a],l=c.type,h=c.value,u=e[l];u>=0&&(s[u]=parseInt(h,10))}var p=s[3],d=24===p?0:p,f=s[0]+"-"+s[1]+"-"+s[2]+" "+d+":"+s[4]+":"+s[5]+":000",g=+t;return(n.utc(f).valueOf()-(g-=g%1e3))/6e4},c=i.prototype;c.tz=function(e,t){void 0===e&&(e=s);var r,i=this.utcOffset(),o=this.toDate(),a=o.toLocaleString("en-US",{timeZone:e}),c=Math.round((o-new Date(a))/1e3/60),l=15*-Math.round(o.getTimezoneOffset()/15)-c;if(Number(l)){if(r=n(a,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(l,!0),t){var h=r.utcOffset();r=r.add(i-h,"minute")}}else r=this.utcOffset(0,t);return r.$x.$timezone=e,r},c.offsetName=function(e){var t=this.$x.$timezone||n.tz.guess(),r=o(this.valueOf(),t,{timeZoneName:e}).find(function(e){return"timezonename"===e.type.toLowerCase()});return r&&r.value};var l=c.startOf;c.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return l.call(this,e,t);var r=n(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return l.call(r,e,t).tz(this.$x.$timezone,!0)},n.tz=function(e,t,r){var i=r&&t,o=r||t||s,c=a(+n(),o);if("string"!=typeof e)return n(e).tz(o);var l=function(e,t,r){var i=e-60*t*1e3,n=a(i,r);if(t===n)return[i,t];var s=a(i-=60*(n-t)*1e3,r);return n===s?[i,n]:[e-60*Math.min(n,s)*1e3,Math.max(n,s)]}(n.utc(e,i).valueOf(),c,o),h=l[0],u=l[1],p=n(h).utcOffset(u);return p.$x.$timezone=o,p},n.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},n.tz.setDefault=function(e){s=e}}},"object"==typeof r&&void 0!==t?t.exports=n():(i="undefined"!=typeof globalThis?globalThis:i||self).dayjs_plugin_timezone=n()},{}],37:[function(e,t,r){var i,n;i=this,n=function(){var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(i,n,s){var o=n.prototype;s.utc=function(e){return new n({date:e,utc:!0,args:arguments})},o.utc=function(t){var r=s(this.toDate(),{locale:this.$L,utc:!0});return t?r.add(this.utcOffset(),e):r},o.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var a=o.parse;o.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),a.call(this,e)};var c=o.init;o.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else c.call(this)};var l=o.utcOffset;o.utcOffset=function(i,n){var s=this.$utils().u;if(s(i))return this.$u?0:s(this.$offset)?l.call(this):this.$offset;if("string"==typeof i&&(i=function(e){void 0===e&&(e="");var i=e.match(t);if(!i)return null;var n=(""+i[0]).match(r)||["-",0,0],s=n[0],o=60*+n[1]+ +n[2];return 0===o?0:"+"===s?o:-o}(i),null===i))return this;var o=Math.abs(i)<=16?60*i:i;if(0===o)return this.utc(n);var a=this.clone();if(n)return a.$offset=o,a.$u=!1,a;var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(a=this.local().add(o+c,e)).$offset=o,a.$x.$localOffset=c,a};var h=o.format;o.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,t)},o.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var u=o.toDate;o.toDate=function(e){return"s"===e&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():u.call(this)};var p=o.diff;o.diff=function(e,t,r){if(e&&this.$u===e.$u)return p.call(this,e,t,r);var i=this.local(),n=s(e).local();return p.call(i,n,t,r)}}},"object"==typeof r&&void 0!==t?t.exports=n():(i="undefined"!=typeof globalThis?globalThis:i||self).dayjs_plugin_utc=n()},{}],38:[function(e,t,r){var i,n;i=this,n=function(){var e="week",t="year";return function(r,i,n){var s=i.prototype;s.week=function(r){if(void 0===r&&(r=null),null!==r)return this.add(7*(r-this.week()),"day");var i=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var s=n(this).startOf(t).add(1,t).date(i),o=n(this).endOf(e);if(s.isBefore(o))return 1}var a=n(this).startOf(t).date(i).startOf(e).subtract(1,"millisecond"),c=this.diff(a,e,!0);return c<0?n(this).startOf("week").week():Math.ceil(c)},s.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}},"object"==typeof r&&void 0!==t?t.exports=n():(i="undefined"!=typeof globalThis?globalThis:i||self).dayjs_plugin_weekOfYear=n()},{}],39:[function(e,t,r){var i;i=this,"object"==typeof r&&void 0!==t?t.exports=function(e,t){t.prototype.weekday=function(e){var t=this.$locale().weekStart||0,r=this.$W,i=(r<t?r+7:r)-t;return this.$utils().u(e)?i:this.subtract(i,"day").add(e,"day")}}:(i="undefined"!=typeof globalThis?globalThis:i||self).dayjs_plugin_weekday=function(e,t){t.prototype.weekday=function(e){var t=this.$locale().weekStart||0,r=this.$W,i=(r<t?r+7:r)-t;return this.$utils().u(e)?i:this.subtract(i,"day").add(e,"day")}}},{}],40:[function(e,t,r){var i,n=e("call-bind-apply-helpers"),s=e("gopd");try{i=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var o=!!i&&s&&s(Object.prototype,"__proto__"),a=Object,c=a.getPrototypeOf;t.exports=o&&"function"==typeof o.get?n([o.get]):"function"==typeof c&&function(e){return c(null==e?e:a(e))}},{"call-bind-apply-helpers":28,gopd:109}],41:[function(e,t,r){var i=Object.defineProperty||!1;if(i)try{i({},"a",{value:1})}catch(e){i=!1}t.exports=i},{}],42:[function(e,t,r){t.exports=EvalError},{}],43:[function(e,t,r){t.exports=Error},{}],44:[function(e,t,r){t.exports=RangeError},{}],45:[function(e,t,r){t.exports=ReferenceError},{}],46:[function(e,t,r){t.exports=SyntaxError},{}],47:[function(e,t,r){t.exports=TypeError},{}],48:[function(e,t,r){t.exports=URIError},{}],49:[function(e,t,r){t.exports=Object},{}],50:[function(e,t,r){var i,n="object"==typeof Reflect?Reflect:null,s=n&&"function"==typeof n.apply?n.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};i=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}t.exports=a,t.exports.once=function(e,t){return new Promise(function(r,i){function n(r){e.removeListener(t,s),i(r)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",n),r([].slice.call(arguments))}y(e,t,s,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&y(e,"error",t,r)}(e,n,{once:!0})})},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var c=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function h(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function u(e,t,r,i){var n,s,o,a;if(l(r),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),o=s[t]),void 0===o)o=s[t]=r,++e._eventsCount;else if("function"==typeof o?o=s[t]=i?[r,o]:[o,r]:i?o.unshift(r):o.push(r),(n=h(e))>0&&o.length>n&&!o.warned){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=o.length,a=c,console&&console.warn&&console.warn(a)}return e}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,r){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},n=p.bind(i);return n.listener=r,i.wrapFn=n,n}function f(e,t,r){var i=e._events;if(void 0===i)return[];var n=i[t];return void 0===n?[]:"function"==typeof n?r?[n.listener||n]:[n]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(n):m(n,n.length)}function g(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function m(e,t){for(var r=new Array(t),i=0;i<t;++i)r[i]=e[i];return r}function y(e,t,r,i){if("function"==typeof e.on)i.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function n(s){i.once&&e.removeEventListener(t,n),r(s)})}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return h(this)},a.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,n=this._events;if(void 0!==n)i=i&&void 0===n.error;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var c=n[e];if(void 0===c)return!1;if("function"==typeof c)s(c,this,t);else{var l=c.length,h=m(c,l);for(r=0;r<l;++r)s(h[r],this,t)}return!0},a.prototype.addListener=function(e,t){return u(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return u(this,e,t,!0)},a.prototype.once=function(e,t){return l(t),this.on(e,d(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,d(this,e,t)),this},a.prototype.removeListener=function(e,t){var r,i,n,s,o;if(l(t),void 0===(i=this._events))return this;if(void 0===(r=i[e]))return this;if(r===t||r.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(n=-1,s=r.length-1;s>=0;s--)if(r[s]===t||r[s].listener===t){o=r[s].listener,n=s;break}if(n<0)return this;0===n?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,n),1===r.length&&(i[e]=r[0]),void 0!==i.removeListener&&this.emit("removeListener",e,o||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,r,i;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var n,s=Object.keys(r);for(i=0;i<s.length;++i)"removeListener"!==(n=s[i])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},a.prototype.listeners=function(e){return f(this,e,!0)},a.prototype.rawListeners=function(e){return f(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},a.prototype.listenerCount=g,a.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},{}],51:[function(e,t,r){t.exports={name:"fable-log",version:"3.0.17",description:"A simple logging wrapper.",main:"source/Fable-Log.js",scripts:{start:"node source/Fable-Log.js",coverage:"./node_modules/.bin/nyc --reporter=lcov --reporter=text-lcov ./node_modules/mocha/bin/_mocha -- -u tdd -R spec",test:"./node_modules/.bin/mocha -u tdd -R spec",tests:"npx mocha -u tdd --exit -R spec --grep"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},browser:{"./source/Fable-Log-DefaultProviders-Node.js":"./source/Fable-Log-DefaultProviders-Web.js"},repository:{type:"git",url:"https://github.com/stevenvelozo/fable-log.git"},keywords:["logging"],author:"Steven Velozo <steven@velozo.com> (http://velozo.com/)",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/fable-log/issues"},homepage:"https://github.com/stevenvelozo/fable-log",devDependencies:{quackage:"^1.0.51"},dependencies:{"fable-serviceproviderbase":"^3.0.17"}}},{}],52:[function(e,t,r){const i=e("fable-serviceproviderbase").CoreServiceProviderBase;t.exports=class extends i{constructor(e,t){super(e,t),this._Settings="object"==typeof e?e:{},this.serviceType="Logging-Provider",this.loggerUUID=this.generateInsecureUUID(),this.levels=["trace","debug","info","warn","error","fatal"]}generateInsecureUUID(){let e=(new Date).getTime();return"LOGSTREAM-xxxxxx-yxxxxx".replace(/[xy]/g,t=>{let r=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?r:3&r|8).toString(16)})}initialize(){}trace(e,t){this.write("trace",e,t)}debug(e,t){this.write("debug",e,t)}info(e,t){this.write("info",e,t)}warn(e,t){this.write("warn",e,t)}error(e,t){this.write("error",e,t)}fatal(e,t){this.write("fatal",e,t)}write(e,t,r){return!0}}},{"fable-serviceproviderbase":59}],53:[function(e,t,r){t.exports=(()=>{let t={};return t.console=e("./Fable-Log-Logger-Console.js"),t.default=t.console,t})()},{"./Fable-Log-Logger-Console.js":55}],54:[function(e,t,r){t.exports=[{loggertype:"console",streamtype:"console",level:"trace"}]},{}],55:[function(e,t,r){let i=e("./Fable-Log-BaseLogger.js");t.exports=class extends i{constructor(e,t){super(e),this._ShowTimeStamps=!("showtimestamps"in this._Settings)||1==this._Settings.showtimestamps,this._FormattedTimeStamps=!("formattedtimestamps"in this._Settings)||1==this._Settings.formattedtimestamps,this._ContextMessage="Context"in this._Settings?"(".concat(this._Settings.Context,")"):"Product"in t._Settings?"(".concat(t._Settings.Product,")"):"Unnamed_Log_Context",this._OutputLogLinesToConsole=!("outputloglinestoconsole"in this._Settings)||this._Settings.outputloglinestoconsole,this._OutputObjectsToConsole=!("outputobjectstoconsole"in this._Settings)||this._Settings.outputobjectstoconsole,this.prefixCache={};for(let e=0;e<=this.levels.length;e++)this.prefixCache[this.levels[e]]="[".concat(this.levels[e],"] ").concat(this._ContextMessage,": "),this._ShowTimeStamps&&(this.prefixCache[this.levels[e]]=" "+this.prefixCache[this.levels[e]])}write(e,t,r){let i="";this._ShowTimeStamps&&this._FormattedTimeStamps?i=(new Date).toISOString():this._ShowTimeStamps&&(i=+new Date);let n="".concat(i).concat(this.prefixCache[e]).concat(t);return this._OutputLogLinesToConsole&&console.log(n),this._OutputObjectsToConsole&&void 0!==r&&console.log(JSON.stringify(r,null,2)),n}}},{"./Fable-Log-BaseLogger.js":52}],56:[function(e,t,r){const i=e("./Fable-Log-Logger-Console.js"),n=e("fs"),s=e("path");t.exports=class extends i{constructor(e,t){super(e,t),this.logFileRawPath=this._Settings.hasOwnProperty("path")?this._Settings.path:"./".concat(this._ContextMessage,".log"),this.logFilePath=s.normalize(this.logFileRawPath),this.logFileStreamOptions=this._Settings.hasOwnProperty("fileStreamoptions")?this._Settings.fileStreamOptions:{flags:"a",encoding:"utf8"},this.fileWriter=n.createWriteStream(this.logFilePath,this.logFileStreamOptions),this.activelyWriting=!1,this.logLineStrings=[],this.logObjectStrings=[],this.defaultWriteCompleteCallback=()=>{},this.defaultBufferFlushCallback=()=>{}}closeWriter(e){let t="function"==typeof e?e:()=>{};if(this.fileWriter)return this.fileWriter.end("\n"),this.fileWriter.once("finish",t.bind(this))}completeBufferFlushToLogFile(e){this.activelyWriting=!1;let t="function"==typeof e?e:this.defaultBufferFlushCallback;if(!(this.logLineStrings.length>0))return t();this.flushBufferToLogFile(t)}flushBufferToLogFile(e){if(!this.activelyWriting){this.activelyWriting=!0;let t="function"==typeof e?e:this.defaultBufferFlushCallback,r=this.logLineStrings,i=this.logObjectStrings;this.logLineStrings=[],this.logObjectStrings=[];let n="";for(let e=0;e<r.length;e++)n+="".concat(r[e],"\n"),!1!==i[e]&&(n+="".concat(i[e],"\n"));if(this.fileWriter.write(n,"utf8"))return this.completeBufferFlushToLogFile(t);this.fileWriter.once("drain",this.completeBufferFlushToLogFile.bind(this,t))}}write(e,t,r){let i=super.write(e,t,r);this.logLineStrings.push(i),void 0!==r?this.logObjectStrings.push(JSON.stringify(r,null,4)):this.logObjectStrings.push(!1),this.flushBufferToLogFile()}}},{"./Fable-Log-Logger-Console.js":55,fs:19,path:138}],57:[function(e,t,r){const i=e("fable-serviceproviderbase").CoreServiceProviderBase,n=e("../package.json");t.exports=class extends i{constructor(t,r){super(t,r),this.serviceType="Logging",this._Package=n;let i="object"==typeof t?t:{};this._Settings=i,this._Providers=e("./Fable-Log-DefaultProviders-Node.js"),this._StreamDefinitions="LogStreams"in i?i.LogStreams:e("./Fable-Log-DefaultStreams.json"),this.logStreams=[],this.logProviders={},this.activeLogStreams={},this.logStreamsTrace=[],this.logStreamsDebug=[],this.logStreamsInfo=[],this.logStreamsWarn=[],this.logStreamsError=[],this.logStreamsFatal=[],this.datumDecorator=e=>e,this.uuid="string"==typeof i.Product?i.Product:"Default"}addLogger(e,t){if(e.loggerUUID in this.activeLogStreams)return!1;switch(this.logStreams.push(e),this.activeLogStreams[e.loggerUUID]=!0,t){case"trace":this.logStreamsTrace.push(e);case"debug":this.logStreamsDebug.push(e);case"info":this.logStreamsInfo.push(e);case"warn":this.logStreamsWarn.push(e);case"error":this.logStreamsError.push(e);case"fatal":this.logStreamsFatal.push(e)}return!0}setDatumDecorator(e){this.datumDecorator="function"==typeof e?e:e=>e}trace(e,t){const r=this.datumDecorator(t);for(let t=0;t<this.logStreamsTrace.length;t++)this.logStreamsTrace[t].trace(e,r)}debug(e,t){const r=this.datumDecorator(t);for(let t=0;t<this.logStreamsDebug.length;t++)this.logStreamsDebug[t].debug(e,r)}info(e,t){const r=this.datumDecorator(t);for(let t=0;t<this.logStreamsInfo.length;t++)this.logStreamsInfo[t].info(e,r)}warn(e,t){const r=this.datumDecorator(t);for(let t=0;t<this.logStreamsWarn.length;t++)this.logStreamsWarn[t].warn(e,r)}error(e,t){const r=this.datumDecorator(t);for(let t=0;t<this.logStreamsError.length;t++)this.logStreamsError[t].error(e,r)}fatal(e,t){const r=this.datumDecorator(t);for(let t=0;t<this.logStreamsFatal.length;t++)this.logStreamsFatal[t].fatal(e,r)}initialize(){for(let e=0;e<this._StreamDefinitions.length;e++){let t=Object.assign({loggertype:"default",streamtype:"console",level:"info"},this._StreamDefinitions[e]);t.loggertype in this._Providers?this.addLogger(new this._Providers[t.loggertype](t,this),t.level):console.log("Error initializing log stream: bad loggertype in stream definition ".concat(JSON.stringify(t)))}for(let e=0;e<this.logStreams.length;e++)this.logStreams[e].initialize()}logTime(e,t){let r=void 0!==e?e:"Time",i=new Date;this.info("".concat(r," ").concat(i," (epoch ").concat(+i,")"),t)}getTimeStamp(){return+new Date}getTimeDelta(e){return+new Date-e}logTimeDelta(e,t,r){let i=void 0!==t?t:"Time Measurement",n=+new Date;this.info("".concat(i," logged at (epoch ").concat(+n,") took (").concat(e,"ms)"),r)}logTimeDeltaHuman(e,t,r){let i=void 0!==t?t:"Time Measurement",n=+new Date,s=parseInt(e%1e3),o=parseInt(e/1e3%60),a=parseInt(e/6e4%60),c=parseInt(e/36e5);s=s<10?"00"+s:s<100?"0"+s:s,o=o<10?"0"+o:o,a=a<10?"0"+a:a,c=c<10?"0"+c:c,this.info("".concat(i," logged at (epoch ").concat(+n,") took (").concat(e,"ms) or (").concat(c,":").concat(a,":").concat(o,".").concat(s,")"),r)}logTimeDeltaRelative(e,t,r){this.logTimeDelta(this.getTimeDelta(e),t,r)}logTimeDeltaRelativeHuman(e,t,r){this.logTimeDeltaHuman(this.getTimeDelta(e),t,r)}},t.exports.LogProviderBase=e("./Fable-Log-BaseLogger.js"),t.exports.LogProviderConsole=e("./Fable-Log-Logger-Console.js"),t.exports.LogProviderFlatfile=e("./Fable-Log-Logger-SimpleFlatFile.js")},{"../package.json":51,"./Fable-Log-BaseLogger.js":52,"./Fable-Log-DefaultProviders-Node.js":53,"./Fable-Log-DefaultStreams.json":54,"./Fable-Log-Logger-Console.js":55,"./Fable-Log-Logger-SimpleFlatFile.js":56,"fable-serviceproviderbase":59}],58:[function(e,t,r){t.exports={name:"fable-serviceproviderbase",version:"3.0.18",description:"Simple base classes for fable services.",main:"source/Fable-ServiceProviderBase.js",scripts:{start:"node source/Fable-ServiceProviderBase.js",test:"npx mocha -u tdd -R spec",tests:"npx mocha -u tdd --exit -R spec --grep",coverage:"npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec",build:"npx quack build",types:"tsc -p ./tsconfig.build.json",check:"tsc -p . --noEmit"},types:"types/source/Fable-ServiceProviderBase.d.ts",mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},repository:{type:"git",url:"https://github.com/stevenvelozo/fable-serviceproviderbase.git"},keywords:["entity","behavior"],author:"Steven Velozo <steven@velozo.com> (http://velozo.com/)",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/fable-serviceproviderbase/issues"},homepage:"https://github.com/stevenvelozo/fable-serviceproviderbase",devDependencies:{"@types/mocha":"^10.0.10",fable:"^3.1.55",quackage:"^1.0.51",typescript:"^5.9.3"}}},{}],59:[function(e,t,r){const i=e("../package.json");class n{constructor(e,t,r){this.fable,this.UUID,this.options,this.services,this.servicesMap,"object"==typeof e&&e.isFable?this.connectFable(e):this.fable=!1,this._PackageFableServiceProvider=i,this.fable?(this.UUID=e.getUUID(),this.options="object"==typeof t?t:{}):(this.options="object"!=typeof e||e.isFable?"object"==typeof t?t:{}:e,this.UUID="CORE-SVC-".concat(Math.floor(89999*Math.random()+1e4))),this.serviceType="Unknown-".concat(this.UUID),this.Hash="string"==typeof r?r:this.fable||"string"!=typeof t?"".concat(this.UUID):t}connectFable(e){if("object"!=typeof e||!e.isFable){let t="Fable Service Provider Base: Cannot connect to Fable, invalid Fable object passed in. The pFable parameter was a [".concat(typeof e,"].}");return console.log(t),new Error(t)}return this.fable||(this.fable=e),this.log||(this.log=this.fable.Logging),this.services||(this.services=this.fable.services),this.servicesMap||(this.servicesMap=this.fable.servicesMap),!0}}_defineProperty2(n,"isFableService",!0),t.exports=n,t.exports.CoreServiceProviderBase=n},{"../package.json":58}],60:[function(e,t,r){t.exports={name:"fable-settings",version:"3.0.15",description:"A simple, tolerant configuration chain.",main:"source/Fable-Settings.js",scripts:{start:"node source/Fable-Settings.js",coverage:"./node_modules/.bin/nyc --reporter=lcov --reporter=text-lcov ./node_modules/mocha/bin/_mocha -- -u tdd -R spec",test:"./node_modules/.bin/mocha -u tdd -R spec",build:"./node_modules/.bin/gulp build","docker-dev-build-image":"docker build ./ -f Dockerfile_LUXURYCode -t retold/fable-settings:local","docker-dev-run":'docker run -it -d --name retold-fable-settings-dev -p 30003:8080 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/fable-settings" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" retold/fable-settings:local'},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},repository:{type:"git",url:"https://github.com/stevenvelozo/fable-settings.git"},keywords:["configuration"],author:"Steven Velozo <steven@velozo.com> (http://velozo.com/)",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/fable-settings/issues"},homepage:"https://github.com/stevenvelozo/fable-settings",devDependencies:{quackage:"^1.0.51"},dependencies:{"fable-serviceproviderbase":"^3.0.17",precedent:"^1.0.15"}}},{}],61:[function(e,t,r){t.exports={Product:"ApplicationNameHere",ProductVersion:"0.0.0",ConfigFile:!1,LogStreams:[{level:"trace"}]}},{}],62:[function(e,t,r){(function(r){(function(){const i=e("precedent");t.exports=class{constructor(e){this.templateProcessor=new i,this.templateProcessor.addPattern("${","}",e=>{let t=e.trim(),i=t.indexOf("|");const n=i>=0?t.substring(i+1):"";let s=i>-1?t.substring(0,i):t;return s in r.env?r.env[s]:n})}parseSetting(e){return this.templateProcessor.parseString(e)}}}).call(this)}).call(this,e("_process"))},{_process:150,precedent:147}],63:[function(e,t,r){const i=e("fable-serviceproviderbase").CoreServiceProviderBase,n=e("./Fable-Settings-TemplateProcessor.js");class s extends i{constructor(t,r){super(t,r),this.serviceType="SettingsManager",this._Package=e("../package.json"),this.settingsTemplateProcessor=new n,this._configureEnvTemplating(t),this.default=this.buildDefaultSettings();let i=this.merge(t,this.buildDefaultSettings());if(this.base=JSON.parse(JSON.stringify(i)),i.DefaultConfigFile)try{i=this.merge(e(i.DefaultConfigFile),i)}catch(e){console.log("Fable-Settings Warning: Default configuration file specified but there was a problem loading it. Falling back to base."),console.log(" Loading Exception: "+e)}if(i.ConfigFile)try{i=this.merge(e(i.ConfigFile),i)}catch(e){console.log("Fable-Settings Warning: Configuration file specified but there was a problem loading it. Falling back to base."),console.log(" Loading Exception: "+e)}this.settings=i}buildDefaultSettings(){return JSON.parse(JSON.stringify(e("./Fable-Settings-Default")))}_configureEnvTemplating(e){this._PerformEnvTemplating=!e||!0!==e.NoEnvReplacement}_resolveEnv(e){for(const t in e)"object"==typeof e[t]?this._resolveEnv(e[t]):"string"==typeof e[t]&&(e[t]=this.settingsTemplateProcessor.parseSetting(e[t]))}_isObject(e){return"object"==typeof e&&!Array.isArray(e)}_deepMergeObjects(e,t){if(t&&this._isObject(t))return Object.keys(t).forEach(r=>{const i=t[r];if(this._isObject(i)){const t=e[r];if(t&&this._isObject(t))return void this._deepMergeObjects(t,i)}e[r]=i}),e}merge(e,t){let r="object"==typeof e?e:{},i="object"==typeof t?t:this.settings,n=JSON.parse(JSON.stringify(r));return i=this._deepMergeObjects(i,n),this._PerformEnvTemplating&&this._resolveEnv(i),this._configureEnvTemplating(i),i}fill(e){let t="object"==typeof e?e:{},r=JSON.parse(JSON.stringify(t));return this.settings=this._deepMergeObjects(r,this.settings),this.settings}}t.exports=s,t.exports.new=function(e){return new s(e)}},{"../package.json":60,"./Fable-Settings-Default":61,"./Fable-Settings-TemplateProcessor.js":62,"fable-serviceproviderbase":59}],64:[function(e,t,r){t.exports={name:"fable-uuid",version:"3.0.12",description:"A simple UUID Generator.",main:"source/Fable-UUID.js",scripts:{start:"node source/Fable-UUID.js",coverage:"./node_modules/.bin/nyc --reporter=lcov --reporter=text-lcov ./node_modules/mocha/bin/_mocha -- -u tdd -R spec",test:"./node_modules/.bin/mocha -u tdd -R spec",build:"./node_modules/.bin/gulp build","docker-dev-build-image":"docker build ./ -f Dockerfile_LUXURYCode -t retold/fable-uuid:local","docker-dev-run":'docker run -it -d --name retold-fable-uuid-dev -p 30002:8080 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/fable-uuid" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" retold/fable-uuid:local'},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},repository:{type:"git",url:"https://github.com/stevenvelozo/fable-uuid.git"},keywords:["logging"],author:"Steven Velozo <steven@velozo.com> (http://velozo.com/)",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/fable-uuid/issues"},browser:{"./source/Fable-UUID-Random.js":"./source/Fable-UUID-Random-Browser.js"},homepage:"https://github.com/stevenvelozo/fable-uuid",devDependencies:{quackage:"^1.0.51"},dependencies:{"fable-serviceproviderbase":"^3.0.17"}}},{}],65:[function(e,t,r){t.exports=class{constructor(){this.getRandomValues="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)}generateWhatWGBytes(){let e=new Uint8Array(16);return this.getRandomValues(e),e}generateRandomBytes(){let e=new Uint8Array(16);for(let t,r=0;r<16;r++)3&r||(t=4294967296*Math.random()),e[r]=t>>>((3&r)<<3)&255;return e}generate(){return this.getRandomValues?this.generateWhatWGBytes():this.generateRandomBytes()}}},{}],66:[function(e,t,r){const i=e("fable-serviceproviderbase").CoreServiceProviderBase,n=e("./Fable-UUID-Random.js"),s=e("../package.json");class o extends i{constructor(e,t){super(e,t),this.serviceType="UUID",this._Package=s,this._UUIDModeRandom="object"==typeof e&&"UUIDModeRandom"in e&&1==e.UUIDModeRandom,this._UUIDLength="object"==typeof e&&"UUIDLength"in e?e.UUIDLength+0:8,this._UUIDRandomDictionary="object"==typeof e&&"UUIDDictionary"in e?e.UUIDDictionary+0:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",this.randomByteGenerator=new n,this._HexLookup=[];for(let e=0;e<256;++e)this._HexLookup[e]=(e+256).toString(16).substr(1)}bytesToUUID(e){let t=0;return[this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],"-",this._HexLookup[e[t++]],this._HexLookup[e[t++]],"-",this._HexLookup[e[t++]],this._HexLookup[e[t++]],"-",this._HexLookup[e[t++]],this._HexLookup[e[t++]],"-",this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]]].join("")}generateUUIDv4(){new Array(16);var e=this.randomByteGenerator.generate();return e[6]=15&e[6]|64,e[8]=63&e[8]|128,this.bytesToUUID(e)}generateRandom(){let e="";for(let t=0;t<this._UUIDLength;t++)e+=this._UUIDRandomDictionary.charAt(Math.floor(Math.random()*(this._UUIDRandomDictionary.length-1)));return e}getUUID(){return this._UUIDModeRandom?this.generateRandom():this.generateUUIDv4()}}t.exports=o,t.exports.new=function(e){return new o(e)}},{"../package.json":64,"./Fable-UUID-Random.js":65,"fable-serviceproviderbase":59}],67:[function(e,t,r){t.exports={name:"fable",version:"3.1.58",description:"A service dependency injection, configuration and logging library.",main:"source/Fable.js",scripts:{start:"node source/Fable.js",coverage:"./node_modules/.bin/nyc --reporter=lcov --reporter=text-lcov ./node_modules/mocha/bin/_mocha -- -u tdd -R spec",test:"./node_modules/.bin/mocha -u tdd -R spec",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t fable-image:local","docker-dev-run":'docker run -it -d --name fable-dev -p 30001:8080 -p 38086:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/fable" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" fable-image:local',"docker-dev-shell":"docker exec -it fable-dev /bin/bash",tests:"./node_modules/mocha/bin/_mocha -u tdd --exit -R spec --grep"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},browser:{"./source/service/Fable-Service-EnvironmentData.js":"./source/service/Fable-Service-EnvironmentData-Web.js","./source/service/Fable-Service-FilePersistence.js":"./source/service/Fable-Service-FilePersistence-Web.js"},repository:{type:"git",url:"https://github.com/stevenvelozo/fable.git"},keywords:["entity","behavior"],author:"Steven Velozo <steven@velozo.com> (http://velozo.com/)",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/fable/issues"},homepage:"https://github.com/stevenvelozo/fable",devDependencies:{quackage:"^1.0.51"},dependencies:{"async.eachlimit":"^0.5.2","async.waterfall":"^0.5.2","big.js":"^7.0.1",cachetrax:"^1.0.5",cookie:"^1.1.1","data-arithmatic":"^1.0.7",dayjs:"^1.11.19","fable-log":"^3.0.17","fable-serviceproviderbase":"^3.0.18","fable-settings":"^3.0.15","fable-uuid":"^3.0.12",manyfest:"^1.0.46","simple-get":"^4.0.1"}}},{}],68:[function(e,t,r){const i=e("fable-settings"),n=e("fable-uuid"),s=e("fable-log"),o=e("../package.json"),a=e("fable-serviceproviderbase");class c extends a.CoreServiceProviderBase{constructor(t){super(t),this.serviceType="ServiceManager",this._Package=o,this.serviceTypes=[],this.servicesMap={},this.services={},this.serviceClasses={},this.extraServiceInitialization=!1,this.LogNoisiness=0,this.SettingsManager=new i(t),this.SettingsManager=this.SettingsManager,this.UUID=new n(this.SettingsManager.settings),this.Logging=new s(this.SettingsManager.settings),this.Logging.initialize(),this.ServiceManager=this,this.serviceManager=this,this.connectFable(this),this.connectPreinitServiceProviderInstance(this.UUID),this.connectPreinitServiceProviderInstance(this.Logging),this.connectPreinitServiceProviderInstance(this.SettingsManager),this.addAndInstantiateServiceType("EnvironmentData",e("./services/Fable-Service-EnvironmentData.js")),this.addServiceType("Template",e("./services/Fable-Service-Template.js")),this.addServiceType("MetaTemplate",e("./services/Fable-Service-MetaTemplate.js")),this.addServiceType("Anticipate",e("./services/Fable-Service-Anticipate.js")),this.addAndInstantiateServiceType("Dates",e("./services/Fable-Service-DateManipulation.js")),this.addAndInstantiateServiceType("DataFormat",e("./services/Fable-Service-DataFormat.js")),this.addAndInstantiateServiceType("DataGeneration",e("./services/Fable-Service-DataGeneration.js")),this.addAndInstantiateServiceType("Utility",e("./services/Fable-Service-Utility.js")),this.addAndInstantiateServiceType("Logic",e("./services/Fable-Service-Logic.js")),this.addAndInstantiateServiceType("Math",e("./services/Fable-Service-Math.js")),this.addServiceType("ExpressionParser",e("./services/Fable-Service-ExpressionParser.js")),this.addServiceType("RestClient",e("./services/Fable-Service-RestClient.js")),this.addServiceType("Manifest",e("manyfest")),this.addServiceType("ObjectCache",e("cachetrax")),this.addAndInstantiateServiceType("ProgressTime",e("./services/Fable-Service-ProgressTime.js")),this.addServiceType("ProgressTrackerSet",e("./services/Fable-Service-ProgressTrackerSet.js")),this.addServiceType("Operation",e("./services/Fable-Service-Operation.js")),this.addServiceType("CSVParser",e("./services/Fable-Service-CSVParser.js")),this.addServiceType("FilePersistence",e("./services/Fable-Service-FilePersistence.js"))}get isFable(){return!0}get settings(){return this.SettingsManager.settings}get settingsManager(){return this.SettingsManager}getUUID(){return this.UUID.getUUID()}newAnticipate(){return this.instantiateServiceProviderWithoutRegistration("Anticipate")}newManyfest(e){return this.instantiateServiceProviderWithoutRegistration("Manifest",e)}addServiceType(e,t){return e in this.servicesMap||(this.servicesMap[e]={},this.serviceTypes.push(e)),"function"==typeof t&&t.isFableService?this.serviceClasses[e]=t:(this.log.error("Attempted to add service type [".concat(e,"] with an invalid class. Using base service class, which will not crash but won't provide meaningful services.")),this.serviceClasses[e]=a),this.serviceClasses[e]}addServiceTypeIfNotExists(e,t){return e in this.servicesMap?this.serviceClasses[e]:this.addServiceType(e,t)}addAndInstantiateServiceType(e,t){return this.addServiceType(e,t),this.instantiateServiceProvider(e,{},"".concat(e,"-Default"))}addAndInstantiateServiceTypeIfNotExists(e,t){return this.addServiceTypeIfNotExists(e,t),e in this.servicesMap&&e in this.fable?this[e]:this.instantiateServiceProvider(e,{},"".concat(e,"-Default"))}addAndInstantiateSingletonService(e,t,r){return this.addServiceTypeIfNotExists(e,r),e in this.servicesMap&&e in this.fable?this[e]:this.instantiateServiceProvider(e,{},"".concat(e,"-Default"))}instantiateServiceProviderFromPrototype(e,t,r,i){let n=new i(this,t,r);return this.extraServiceInitialization&&(n=this.extraServiceInitialization(n)),this.servicesMap[e][n.Hash]=n,e in this.services||this.setDefaultServiceInstantiation(e,n.Hash),n}instantiateServiceProvider(e,t,r){let i=this.instantiateServiceProviderWithoutRegistration(e,t,r);return this.servicesMap[e][i.Hash]=i,e in this.services||this.setDefaultServiceInstantiation(e,i.Hash),i}instantiateServiceProviderIfNotExists(e,t,r){return e in this.services?this.services[e]:this.instantiateServiceProvider(e,t,r)}instantiateServiceProviderWithoutRegistration(e,t,r){let i=new this.serviceClasses[e](this,t,r);return this.extraServiceInitialization&&(i=this.extraServiceInitialization(i)),i}connectPreinitServiceProviderInstance(e){let t=e.serviceType,r=e.Hash;return e.connectFable(this),t in this.servicesMap||(this.servicesMap[t]={}),this.servicesMap[t][r]=e,t in this.services||this.setDefaultServiceInstantiation(t,r,!1),e}setDefaultServiceInstantiation(e,t,r){let i=void 0===r||r;return t in this.servicesMap[e]&&(e in this&&!i||(this[e]=this.servicesMap[e][t]),e in this.services&&!i||(this.services[e]=this.servicesMap[e][t]),!0)}static generateFileNameDateStamp(e){const t=e||new Date,r=t.getFullYear(),i=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),s=String(t.getHours()).padStart(2,"0"),o=String(t.getMinutes()).padStart(2,"0"),a=String(t.getSeconds()).padStart(2,"0");return"".concat(r,"-").concat(i,"-").concat(n,"-").concat(s,"-").concat(o,"-").concat(a)}}t.exports=c,t.exports.new=function(e){return new c(e)},t.exports.LogProviderBase=s.LogProviderBase,t.exports.ServiceProviderBase=a,t.exports.CoreServiceProviderBase=a.CoreServiceProviderBase,t.exports.precedent=i.precedent},{"../package.json":67,"./services/Fable-Service-Anticipate.js":69,"./services/Fable-Service-CSVParser.js":70,"./services/Fable-Service-DataFormat.js":71,"./services/Fable-Service-DataGeneration.js":73,"./services/Fable-Service-DateManipulation.js":74,"./services/Fable-Service-EnvironmentData.js":75,"./services/Fable-Service-ExpressionParser.js":76,"./services/Fable-Service-FilePersistence.js":87,"./services/Fable-Service-Logic.js":88,"./services/Fable-Service-Math.js":89,"./services/Fable-Service-MetaTemplate.js":90,"./services/Fable-Service-Operation.js":94,"./services/Fable-Service-ProgressTime.js":95,"./services/Fable-Service-ProgressTrackerSet.js":97,"./services/Fable-Service-RestClient.js":98,"./services/Fable-Service-Template.js":99,"./services/Fable-Service-Utility.js":100,cachetrax:22,"fable-log":57,"fable-serviceproviderbase":59,"fable-settings":63,"fable-uuid":66,manyfest:127}],69:[function(e,t,r){const i=e("fable-serviceproviderbase");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.serviceType="AsyncAnticipate",this.operationQueue=[],this.erroredOperations=[],this.executingOperationCount=0,this.completedOperationCount=0,this.callDepth=0,this.maxOperations=1,this.lastError=void 0,this.waitingFunctions=[]}checkQueue(){if(this.lastError){for(let e=0;e<this.waitingFunctions.length;e++)this.waitingFunctions[e](this.lastError);this.lastError=void 0,this.waitingFunctions=[]}else if(this.operationQueue.length>0&&this.executingOperationCount<this.maxOperations){let e=this.operationQueue.shift();this.executingOperationCount+=1,e(this.buildAnticipatorCallback())}else if(this.waitingFunctions.length>0&&this.executingOperationCount<1){for(let e=0;e<this.waitingFunctions.length;e++)this.waitingFunctions[e](this.lastError);this.lastError=void 0,this.waitingFunctions=[]}}anticipate(e){this.operationQueue.push(e),this.checkQueue()}buildAnticipatorCallback(){let e={Called:!1,Error:void 0,OperationSet:this};return function(t){if(e.Called)throw new Error("Anticipation async callback called twice...");e.Called=!0,this.lastError=t,e.OperationSet.executingOperationCount-=1,e.OperationSet.completedOperationCount+=1,e.OperationSet.callDepth++,e.OperationSet.callDepth>400?(e.OperationSet.callDepth=0,setTimeout(e.OperationSet.checkQueue.bind(this),0)):e.OperationSet.checkQueue()}.bind(this)}wait(e){this.waitingFunctions.push(e),this.checkQueue()}}},{"fable-serviceproviderbase":59}],70:[function(e,t,r){const i=e("fable-serviceproviderbase");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.serviceType="CSVParser",this.Header=[],this.HeaderFieldNames=[],this.Delimiter=",",this.QuoteCharacter='"',this.CleanCharacters=["\r"],this.HeaderLineIndex=0,this.HasHeader=!0,this.HasSetHeader=!1,this.EmitHeader=!1,this.EmitJSON=!0,this.EscapedQuoteString="&quot;",this.CurrentLine="",this.CurrentRecord=[],this.InQuote=!1,this.InEscapedQuote=!1,this.LinesParsed=0,this.RowsEmitted=0}marshalRowToJSON(e){if(!Array.isArray(e))return!1;for(let t=this.HeaderFieldNames.length;t<e.length;t++)this.HeaderFieldNames[t]="".concat(t);let t={};for(let r=0;r<e.length;r++)t[this.HeaderFieldNames[r]]=e[r];return t}setHeader(e){this.Header=e;for(let e=0;e<this.Header.length;e++)void 0===this.Header[e]?this.HeaderFieldNames[e]="".concat(e):this.HeaderFieldNames[e]=this.Header[e].toString().trim()}resetRowState(){this.CurrentRecord=[]}pushLine(){for(let e=0;e<this.CleanCharacters.length;e++)this.CurrentLine=this.CurrentLine.replace(this.CleanCharacters[e],"");this.CurrentRecord.push(this.CurrentLine),this.CurrentLine=""}emitRow(e){let t=void 0===e?this.EmitJSON:e;this.RowsEmitted++;let r=this.CurrentRecord;return this.CurrentRecord=[],t?this.marshalRowToJSON(r):r}parseCSVLine(e){this.LinesParsed++;for(let t=0;t<e.length;t++)this.InQuote||e[t]!=this.Delimiter?e[t]==this.QuoteCharacter?this.InEscapedQuote?this.InEscapedQuote=!1:this.InQuote?t<e.length&&e[t+1]==this.QuoteCharacter?(this.CurrentLine+=this.EscapedQuoteString,this.InEscapedQuote=!0):this.InQuote=!1:this.InQuote=!0:this.CurrentLine+=e[t]:this.pushLine();return!this.InQuote&&(this.pushLine(),this.HasHeader&&!this.HasSetHeader&&this.RowsEmitted==this.HeaderLineIndex?(this.HasSetHeader=!0,this.setHeader(this.emitRow(!1)),!!this.EmitHeader&&this.Header):this.emitRow())}}},{"fable-serviceproviderbase":59}],71:[function(e,t,r){const i=e("fable-serviceproviderbase");t.exports=class extends i{constructor(e,t,r){super(e,t,r),_defineProperty2(this,"stringPadStart",function(e,t,r){let i=e.toString();return this.stringGeneratePaddingString(i,t,r)+i}),_defineProperty2(this,"stringPadEnd",function(e,t,r){let i=e.toString();return i+this.stringGeneratePaddingString(i,t,r)}),this.serviceType="DataArithmatic",this._Regex_formatterInsertCommas=/.{1,3}/g,this._Regex_formatterAddCommasToNumber=/^([-+]?)(0?)(\d+)(.?)(\d+)$/g,this._Regex_formatterDollarsRemoveCommas=/,/gi,this._Regex_formatterCleanNonAlphaChar=/[^a-zA-Z]/gi,this._Regex_formatterCapitalizeEachWord=/([a-zA-Z]+)/g,this._Regex_matcherHTMLEntities=/&(#?[a-zA-Z0-9]+);/g,this._Value_MoneySign_Currency="$",this._Value_NaN_Currency="--",this._Value_GroupSeparator_Number=",",this._Value_Prefix_StringHash="HSH",this._Value_Clean_formatterCleanNonAlpha="",this._UseEngineStringStartsWith="function"==typeof String.prototype.startsWith,this._UseEngineStringEndsWith="function"==typeof String.prototype.endsWith,this._SanitizeObjectKeyRegex=/[^a-zA-Z0-9_]/gi,this._SanitizeObjectKeyReplacement="_",this._SanitizeObjectKeyInvalid="INVALID"}stringReverse(e){return e.split("").reverse().join("")}stringStartsWith(e,t,r){return this._UseEngineStringStartsWith?e.startsWith(t,r):this.stringStartsWith_Polyfill.call(e,t,r)}stringStartsWith_Polyfill(e,t){return this.slice(t||0,e.length)===e}stringEndsWith(e,t,r){return this._UseEngineStringEndsWith?e.endsWith(t,r):this.stringEndsWith_Polyfill.call(e,t,r)}stringEndsWith_Polyfill(e,t){return t<this.length?t|=0:t=this.length,this.substr(t-e.length,e.length)===e}insecureStringHash(e){let t=0,r=e.length,i=0;for(;i<r;)t=(t<<5)-t+e.charCodeAt(i++)|0;return"".concat(this._Value_Prefix_StringHash).concat(t)}capitalizeEachWord(e){return e.replace(this._Regex_formatterCapitalizeEachWord,e=>e.charAt(0).toUpperCase()+e.substr(1))}resolveHtmlEntities(e){return"string"!=typeof e?e:e.replace(this._Regex_matcherHTMLEntities,(e,t)=>{switch(t){case"comma":return",";case"amp":return"&";case"lt":return"<";case"gt":return">";case"times":return"×";case"divide":return"÷";case"plus":return"+";case"minus":return"-";case"infin":return"∞";case"ang":return"∠";case"quot":return'"';case"apos":return"'";case"nbsp":return" ";case"copy":return"©";case"reg":return"®";case"trade":return"™";case"euro":return"€";default:if(!t.startsWith("#"))return e}const r=parseInt(t.substring(1),10);return String.fromCharCode(r)})}concatenateStrings(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.joinStrings("",...t)}concatenateStringsInternal(){const e=[...arguments],t=this.fable.Utility.flattenArrayOfSolverInputs(e);return this.concatenateStrings(...t)}joinStrings(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return r.filter(e=>"string"==typeof e||"number"==typeof e).join(e)}joinStringsInternal(){const[e,...t]=arguments,r=this.fable.Utility.flattenArrayOfSolverInputs(t);return this.joinStrings(e,...r)}concatenateStringsRaw(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.joinStringsRaw("",...t)}concatenateStringsRawInternal(e){const t=[...arguments],r=this.fable.Utility.flattenArrayOfSolverInputs(t);return this.concatenateStringsRaw(...r)}joinStringsRaw(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return r.map(String).join(e)}joinStringsRawInternal(){const[e,...t]=arguments,r=this.fable.Utility.flattenArrayOfSolverInputs(t);return this.joinStringsRaw(e,...r)}cleanEnclosureWrapCharacters(e,t){return t.startsWith(e)&&t.endsWith(e)?t.substring(1,t.length-1):t}cleanNonAlphaCharacters(e){return"string"==typeof e&&""!=e?e.replace(this._Regex_formatterCleanNonAlphaChar,this._Value_Clean_formatterCleanNonAlpha):""}sanitizeObjectKey(e){return"string"!=typeof e||e.length<1?this._SanitizeObjectKeyInvalid:e.replace(this._SanitizeObjectKeyRegex,this._SanitizeObjectKeyReplacement)}formatterInsertCommas(e){let t=this.stringReverse(e).match(this._Regex_formatterInsertCommas).join(",");return this.stringReverse(t)}processAddCommasToNumberRegex(e,t,r,i,n,s){return t+(n?this.formatterInsertCommas(i)+n+s:this.formatterInsertCommas(i+s))}formatterAddCommasToNumber(e){return e.toString().replace(this._Regex_formatterAddCommasToNumber,this.processAddCommasToNumberRegex.bind(this))}formatterDollars(e,t,r){if(isNaN(e))return this._Value_NaN_Currency;if(null==e)return this._Value_NaN_Currency;let i=this.fable.Math.parsePrecise(e),n=void 0===t?2:t,s=this.fable.Math.toFixedPrecise(i,n,r);return"$".concat(this.formatterAddCommasToNumber(s))}formatterRoundNumber(e,t){let r=void 0===t?2:t;if(isNaN(e)){return(0).toFixed(r)}if(null==e)return"";let i=this.fable.Utility.bigNumber(e).toFixed(r);if(isNaN(i)){return(0).toFixed(r)}return i}stringGeneratePaddingString(e,t,r){let i=t|0,n=String(void 0!==r?r:" ");if(e.length>t)return"";{let r=t-e.length;return r>n.length&&(n+=n.repeat(i/n.length)),n.slice(0,r)}}formatTimeSpan(e){if("number"!=typeof e)return"";let t=parseInt(e%1e3),r=parseInt(e/1e3%60),i=parseInt(e/6e4%60),n=parseInt(e/36e5);return"".concat(this.stringPadStart(n,2,"0"),":").concat(this.stringPadStart(i,2,"0"),":").concat(this.stringPadStart(r,2,"0"),".").concat(this.stringPadStart(t,3,"0"))}formatTimeDelta(e,t){return"number"!=typeof e||"number"!=typeof t?"":this.formatTimeSpan(t-e)}getMonthFromDate(e){return["January","February","March","April","May","June","July","August","September","October","November","December"][e.getMonth()]}getMonthAbbreviatedFromDate(e){return["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.getMonth()]}formatMonthDayYearFromDate(e,t){let r=void 0!==t&&t,i=e.getMonth()+1,n=e.getDate(),s=e.getFullYear();return r&&(i=this.stringPadStart(i,2,"0"),n=this.stringPadStart(n,2,"0"),s=this.stringPadStart(s,4,"0")),"".concat(i,"/").concat(n,"/").concat(s)}formatSortableStringFromDate(e){return e.getFullYear()+this.stringPadStart(e.getMonth(),2,"0")+this.stringPadStart(e.getDate(),2,"0")}stringBeforeMatch(e,t){return e.split(t)[0]}stringAfterMatch(e,t){let r=e.indexOf(t);return r<0||r+t.length>=e.length?"":e.substring(r+t.length)}stringCountSegments(e,t,r,i){let n="string"==typeof e?e:"",s="string"==typeof t?t:".",o="object"==typeof r?pEnclosureStart:{"{":0,"[":1,"(":2},a="object"==typeof i?pEnclosureEnd:{"}":0,"]":1,")":2};if(e.length<1)return 0;let c=1,l=[];for(let e=0;e<n.length;e++)n[e]==s&&0==l.length?c++:n[e]in o?l.push(o[n[e]]):n[e]in a&&a[n[e]]==l[l.length-1]&&l.pop();return c}stringGetSegments(e,t,r,i){let n="string"==typeof e?e:"",s="string"==typeof t?t:".",o="object"==typeof r?pEnclosureStart:{"{":0,"[":1,"(":2,'"':3,"'":4},a="object"==typeof i?pEnclosureEnd:{"}":0,"]":1,")":2,'"':3,"'":4},c=0,l=[];if(e.length<1)return l;let h=[];for(let e=0;e<n.length;e++)n[e]==s&&0==h.length?(l.push(n.substring(c,e)),c=e+1):n[e]in o?h.push(o[n[e]]):n[e]in a&&a[n[e]]==h[h.length-1]&&h.pop();return c<n.length&&l.push(n.substring(c)),l}stringGetFirstSegment(e,t,r,i){let n="string"==typeof e?e:"",s="string"==typeof t?t:".",o="object"==typeof r?pEnclosureStart:{"{":0,"[":1,"(":2},a="object"==typeof i?pEnclosureEnd:{"}":0,"]":1,")":2};if(e.length<1)return 0;let c=[];for(let e=0;e<n.length;e++){if(n[e]==s&&0==c.length)return n.substring(0,e);n[e]in o?c.push(o[n[e]]):n[e]in a&&a[n[e]]==c[c.length-1]&&c.pop()}return n}stringEncodeURIComponent(e){return"string"!=typeof e?e:encodeURIComponent(e)}stringDecodeURIComponent(e){if("string"!=typeof e)return e;try{return decodeURIComponent(e)}catch(t){return this.fable.Log.error("Failed to decode URI component: ".concat(e),t),e}}stringEncodeForJavascript(e){return"string"!=typeof e?e:e.replace(this._Regex_matcherJavascriptEncode,e=>{switch(e){case'"':return'\\"';case"'":return"\\'";case"\\":return"\\\\";case"\n":return"\\n";case"\r":return"\\r";default:return e}})}stringDecodeForJavascript(e){return"string"!=typeof e?e:e.replace(this._Regex_matcherJavascriptDecode,e=>{switch(e){case'\\"':return'"';case"\\'":return"'";case"\\\\":return"\\";case"\\n":return"\n";case"\\r":return"\r";default:return e}})}stringCountEnclosures(e,t,r){let i="string"==typeof e?e:"",n="string"==typeof t?t:"(",s="string"==typeof r?r:")",o=0,a=0;for(let e=0;e<i.length;e++)i[e]==n?(0==a&&o++,a++):i[e]==s&&a--;return o}stringGetEnclosureValueByIndex(e,t,r,i){let n="string"==typeof e?e:"",s="number"==typeof t?t:0,o="string"==typeof r?r:"(",a="string"==typeof i?i:")",c=0,l=0,h=!1,u=0,p=0;for(let e=0;e<n.length;e++)n[e]==o?(l++,1==l&&(c++,s==c-1&&(h=!0,u=e))):n[e]==a&&(l--,0==l&&h&&p<=u&&(p=e,h=!1));return c<=s?"":p>0&&p>u?n.substring(u+1,p):n.substring(u+1)}stringRemoveEnclosureByIndex(e,t,r,i){let n="string"==typeof e?e:"",s="number"==typeof t?t:0,o="string"==typeof r?r:"(",a="string"==typeof i?i:")",c=0,l=0,h=!1,u=0,p=0;for(let e=0;e<n.length;e++)n[e]==o?(l++,1==l&&(c++,s==c-1&&(h=!0,u=e))):n[e]==a&&(l--,0==l&&h&&p<=u&&(p=e,h=!1));if(c<=s)return n;let d="";return u>1&&(d=n.substring(0,u)),n.length>p+1&&p>u&&(d+=n.substring(p+1)),d}}},{"fable-serviceproviderbase":59}],72:[function(e,t,r){t.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"]}},{}],73:[function(e,t,r){const i=e("fable-serviceproviderbase");t.exports=class extends i{constructor(t,r,i){super(t,r,i),this.serviceType="DataGeneration",this.defaultData=e("./Fable-Service-DataGeneration-DefaultValues.json")}randomIntegerBetween(e,t){try{let r=parseInt(e,10),i=parseInt(t,10);return Math.floor(Math.random()*(i-r))+r}catch(r){return this.fable.log.error("Error in randomIntegerBetween",r,{Minimum:e,Maximum:t}),NaN}}randomIntegerUpTo(e){return this.randomIntegerBetween(0,e)}randomInteger(){return Math.floor(Math.random()*this.defaultData.DefaultIntegerMaximum)}randomFloatBetween(e,t){try{let r=parseFloat(e),i=parseFloat(t);return this.fable.Math.addPrecise(this.fable.Math.multiplyPrecise(Math.random(),this.fable.Math.subtractPrecise(i,r)),r)}catch(r){return this.fable.log.error("Error in randomFloatBetween",r,{Minimum:e,Maximum:t}),NaN}}randomFloatUpTo(e){return this.randomFloatBetween(0,e)}randomFloat(){return Math.random()}randomNumericString(e,t){let r=void 0===t?9999999999:t;return this.services.DataFormat.stringPadStart(this.randomIntegerUpTo(r),e,"0")}randomMonth(){return this.defaultData.MonthSet[this.randomIntegerUpTo(this.defaultData.MonthSet.length-1)]}randomDayOfWeek(){return this.defaultData.WeekDaySet[this.randomIntegerUpTo(this.defaultData.WeekDaySet.length-1)]}randomColor(){return this.defaultData.ColorSet[this.randomIntegerUpTo(this.defaultData.ColorSet.length-1)]}randomName(){return this.defaultData.NameSet[this.randomIntegerUpTo(this.defaultData.NameSet.length-1)]}randomSurname(){return this.defaultData.SurNameSet[this.randomIntegerUpTo(this.defaultData.SurNameSet.length-1)]}}},{"./Fable-Service-DataGeneration-DefaultValues.json":72,"fable-serviceproviderbase":59}],74:[function(e,t,r){const i=e("fable-serviceproviderbase");t.exports=class extends i{constructor(t,r,i){super(t,r,i),this.serviceType="Dates",this.dayJS=e("dayjs"),this.plugin_weekOfYear=e("dayjs/plugin/weekOfYear"),this.dayJS.extend(this.plugin_weekOfYear),this.plugin_weekday=e("dayjs/plugin/weekday"),this.dayJS.extend(this.plugin_weekday),this.plugin_isoWeek=e("dayjs/plugin/isoWeek"),this.dayJS.extend(this.plugin_isoWeek),this.plugin_timezone=e("dayjs/plugin/timezone"),this.dayJS.extend(this.plugin_timezone),this.plugin_relativetime=e("dayjs/plugin/relativeTime"),this.dayJS.extend(this.plugin_relativetime),this.plugin_utc=e("dayjs/plugin/utc"),this.dayJS.extend(this.plugin_utc),this.plugin_advancedFormat=e("dayjs/plugin/advancedFormat"),this.dayJS.extend(this.plugin_advancedFormat)}dateMillisecondDifference(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e||""===e)return NaN;if((r||1==r||"1"==r)&&(null==t||""===t))return NaN;let i=this.dayJS(e);return this.dayJS(t).diff(i,"millisecond")}dateSecondDifference(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e||""===e)return NaN;if((r||1==r||"1"==r)&&(null==t||""===t))return NaN;let i=this.dayJS(e);return this.dayJS(t).diff(i,"second")}dateMinuteDifference(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e||""===e)return NaN;if((r||1==r||"1"==r)&&(null==t||""===t))return NaN;let i=this.dayJS(e);return this.dayJS(t).diff(i,"minute")}dateHourDifference(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e||""===e)return NaN;if((r||1==r||"1"==r)&&(null==t||""===t))return NaN;let i=this.dayJS(e);return this.dayJS(t).diff(i,"hour")}dateDayDifference(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e||""===e)return NaN;if((r||1==r||"1"==r)&&(null==t||""===t))return NaN;let i=this.dayJS(e);return this.dayJS(t).diff(i,"day")}dateWeekDifference(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e||""===e)return NaN;if((r||1==r||"1"==r)&&(null==t||""===t))return NaN;let i=this.dayJS(e);return this.dayJS(t).diff(i,"week")}dateMonthDifference(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e||""===e)return NaN;if((r||1==r||"1"==r)&&(null==t||""===t))return NaN;let i=this.dayJS(e);return this.dayJS(t).diff(i,"month")}dateYearDifference(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e||""===e)return NaN;if((r||1==r||"1"==r)&&(null==t||""===t))return NaN;let i=this.dayJS(e);return this.dayJS(t).diff(i,"year")}dateAddMilliseconds(e,t){return this.dateMath(e,t,"millisecond","add")}dateAddSeconds(e,t){return this.dateMath(e,t,"second","add")}dateAddMinutes(e,t){return this.dateMath(e,t,"minute","add")}dateAddHours(e,t){return this.dateMath(e,t,"hour","add")}dateAddDays(e,t){return this.dateMath(e,t,"day","add")}dateAddWeeks(e,t){return this.dateMath(e,t,"week","add")}dateAddMonths(e,t){return this.dateMath(e,t,"month","add")}dateAddYears(e,t){return this.dateMath(e,t,"year","add")}dateMath(e,t,r,i){try{let n=this.dayJS.utc(e);return"add"===i?n=n.add(t,r):"subtract"===i&&(n=n.subtract(t,r)),this.dayJS.utc(n).toISOString()}catch(e){return}}dateFromParts(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;try{return this.dayJS.utc().year(e).month(t-1).date(r).hour(i).minute(n).second(s).millisecond(o).toISOString()}catch(e){return}}}},{dayjs:32,"dayjs/plugin/advancedFormat":33,"dayjs/plugin/isoWeek":34,"dayjs/plugin/relativeTime":35,"dayjs/plugin/timezone":36,"dayjs/plugin/utc":37,"dayjs/plugin/weekOfYear":38,"dayjs/plugin/weekday":39,"fable-serviceproviderbase":59}],75:[function(e,t,r){const i=e("fable-serviceproviderbase");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.serviceType="EnvironmentData",this.Environment="node.js"}}},{"fable-serviceproviderbase":59}],76:[function(e,t,r){const i=e("fable-serviceproviderbase");t.exports=class extends i{constructor(t,r,i){super(t,r,i),this.fable,this.log,this.tokenMap=e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-TokenMap.json"),this.tokenMaxPrecedence=4,this.tokenRadix={};let n=Object.keys(this.tokenMap);for(let e=0;e<n.length;e++){let t=n[e],r=this.tokenMap[t];r.Token=t,r.Length=t.length;let i=r.Token[0];i in this.tokenRadix||(this.tokenRadix[i]={TokenCount:0,Literal:!1,TokenKeys:[],TokenMap:{}}),this.tokenRadix[i].TokenCount++,t==i&&(this.tokenRadix[i].Literal=!0),this.tokenRadix[i].TokenMap[r.Token]=r,this.tokenRadix[i].TokenKeys.push(t),this.tokenRadix[i].TokenKeys.sort((e,t)=>t.length-e.length),this.tokenMaxPrecedence<r.Precedence&&(this.tokenMaxPrecedence=r.Precedence)}this.functionMap=e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-FunctionMap.json"),this.serviceType="ExpressionParser",this.fable.addServiceTypeIfNotExists("ExpressionParser-Tokenizer",e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-ExpressionTokenizer.js")),this.fable.addServiceTypeIfNotExists("ExpressionParser-TokenizerDirectiveMutation",e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-ExpressionTokenizer-DirectiveMutation.js")),this.fable.addServiceTypeIfNotExists("ExpressionParser-Linter",e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-Linter.js")),this.fable.addServiceTypeIfNotExists("ExpressionParser-Postfix",e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-Postfix.js")),this.fable.addServiceTypeIfNotExists("ExpressionParser-ValueMarshal",e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-ValueMarshal.js")),this.fable.addServiceTypeIfNotExists("ExpressionParser-Solver",e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-SolvePostfixedExpression.js")),this.fable.addServiceTypeIfNotExists("ExpressionParser-Messaging",e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-Messaging.js")),this.Tokenizer=this.fable.instantiateServiceProviderWithoutRegistration("ExpressionParser-Tokenizer"),this.Tokenizer.TokenizerDirectiveMutation=this.fable.instantiateServiceProviderWithoutRegistration("ExpressionParser-TokenizerDirectiveMutation"),this.Linter=this.fable.instantiateServiceProviderWithoutRegistration("ExpressionParser-Linter"),this.Postfix=this.fable.instantiateServiceProviderWithoutRegistration("ExpressionParser-Postfix"),this.ValueMarshal=this.fable.instantiateServiceProviderWithoutRegistration("ExpressionParser-ValueMarshal"),this.Solver=this.fable.instantiateServiceProviderWithoutRegistration("ExpressionParser-Solver"),this.Messaging=this.fable.instantiateServiceProviderWithoutRegistration("ExpressionParser-Messaging"),this.Tokenizer.connectExpressionParser(this),this.Linter.connectExpressionParser(this),this.Postfix.connectExpressionParser(this),this.ValueMarshal.connectExpressionParser(this),this.Solver.connectExpressionParser(this),this.Messaging.connectExpressionParser(this),this.GenericManifest=this.fable.newManyfest(),this.LogNoisiness="LogNoisiness"in this.fable?this.fable.LogNoisiness:0}tokenize(e,t){return this.Tokenizer.tokenize(e,t)}lintTokenizedExpression(e,t){return this.Linter.lintTokenizedExpression(e,t)}buildPostfixedSolveList(e,t){return this.Postfix.buildPostfixedSolveList(e,t)}substituteValuesInTokenizedObjects(e,t,r,i){return this.ValueMarshal.substituteValuesInTokenizedObjects(e,t,r,i)}solvePostfixedExpression(e,t,r,i){return this.Solver.solvePostfixedExpression(e,t,r,i)}addSolverFunction(e,t,r){let i=(e||"").trim().toLowerCase();this.functionMap.hasOwnProperty(i)&&this.log.warn("PictDynamicFormsInformary: Function ".concat(i," already exists in the solver, overwriting with address [").concat(t,"].")),this.functionMap[i]={Name:r||"Autogenerated function ".concat(i),Address:t}}_prepareDirectiveParameters(e,t,r,i,n){const s=[];for(let o=0;o<e.length;o++){const a=e[o];let c=this.fable.Math.parsePrecise(a,NaN);if(isNaN(c)&&"string"==typeof a&&a.length>0){const e=this.fable.ExpressionParser.Postfix.getTokenContainerObject(a,"Token.Symbol");this.substituteValuesInTokenizedObjects([e],i,r,n),e.Resolved&&(c=e.Value)}isNaN(c)&&t.length>o&&(c=t[o]),s.push(c)}return s}solve(e,t,r,i,n){let s="object"==typeof r?r:{},o="object"==typeof t?t:{},a="object"==typeof n?n:{};this.tokenize(e,s),this.lintTokenizedExpression(s.RawTokens,s),this.buildPostfixedSolveList(s.RawTokens,s);const c="object"==typeof i?i:this.fable.newManyfest();if("SERIES"==s.SolverDirectives.Code){const[e,t,r]=this._prepareDirectiveParameters([s.SolverDirectives.Step,s.SolverDirectives.From,s.SolverDirectives.To],["1"],s,o,c);if(isNaN(t)||isNaN(r))return s.ExpressionParserLog.push("ExpressionParser.solve detected invalid SERIES directive parameters. FROM, TO must be numeric."),this.log.warn(s.ExpressionParserLog[s.ExpressionParserLog.length-1]),null;if(0==this.fable.Math.comparePrecise(t,r))return s.ExpressionParserLog.push("ExpressionParser.solve detected invalid SERIES directive parameters. FROM and TO cannot be equal."),this.log.warn(s.ExpressionParserLog[s.ExpressionParserLog.length-1]),null;if(0==this.fable.Math.comparePrecise(e,"0"))return s.ExpressionParserLog.push("ExpressionParser.solve detected invalid SERIES directive parameters. STEP cannot be zero."),this.log.warn(s.ExpressionParserLog[s.ExpressionParserLog.length-1]),null;if(this.fable.Math.comparePrecise(t,r)<0){if(this.fable.Math.comparePrecise(e,"0")<0)return s.ExpressionParserLog.push("ExpressionParser.solve detected invalid SERIES directive parameters. STEP must be positive when FROM < TO."),this.log.warn(s.ExpressionParserLog[s.ExpressionParserLog.length-1]),null}else if(this.fable.Math.comparePrecise(e,"0")>0)return s.ExpressionParserLog.push("ExpressionParser.solve detected invalid SERIES directive parameters. STEP must be negative when FROM >= TO."),this.log.warn(s.ExpressionParserLog[s.ExpressionParserLog.length-1]),null;let i=parseInt(this.fable.Math.floorPrecise(this.fable.Math.dividePrecise(this.fable.Math.subtractPrecise(r,t),e))),n=[];for(let r=0;r<=i;r++){const i=this.fable.Math.addPrecise(t,this.fable.Math.multiplyPrecise(e,r.toString())),l=0==r?"false":this.fable.Math.addPrecise(t,this.fable.Math.multiplyPrecise(e,(r-1).toString()));let h=Object.assign({},o);h.n=i,h.prev_n=l,h.stepIndex=r;let u=this.substituteValuesInTokenizedObjects(s.PostfixTokenObjects,h,s,c);n.push(this.solvePostfixedExpression(s.PostfixSolveList,a,s,c));for(let e=0;e<u.length;e++)u[e].Resolved=!1}let l=s.PostfixedAssignmentAddress;return"="===s.OriginalRawTokens[1]&&"string"==typeof s.OriginalRawTokens[0]&&s.OriginalRawTokens[0].length>0&&(l=s.OriginalRawTokens[0]),c.setValueByHash(a,l,n),n}if("MAP"==s.SolverDirectives.Code){const e=s.SolverDirectives.Values,t=s.SolverDirectives.ValueKeys;let r=[];for(let r=0;r<t.length;r++){const i=e[t[r]];i.Value=c.getValueByHash(o,i.Address)}if(t.length<1||null==e[t[0]].Value||!Array.isArray(e[t[0]].Value))return s.ExpressionParserLog.push("ExpressionParser.solve detected invalid MAP directive parameters. The first variable's address must resolve to an array."),void this.log.warn(s.ExpressionParserLog[s.ExpressionParserLog.length-1]);let i=e[t[0]].Value;for(let n=0;n<i.length;n++){let i=Object.assign({},o);i.stepIndex=n;for(let r=0;r<t.length;r++){const s=t[r];!Array.isArray(e[s].Value)||e[s].Value.length<=n?i[s]=0:i[s]=e[s].Value[n];const o="prev_".concat(s);!Array.isArray(e[s].Value)||e[s].Value.length<=n?i[o]=0:i[o]=0==n?"false":e[s].Value[n-1]}let l=this.substituteValuesInTokenizedObjects(s.PostfixTokenObjects,i,s,c);r.push(this.solvePostfixedExpression(s.PostfixSolveList,a,s,c));for(let e=0;e<l.length;e++)l[e].Resolved=!1}let n=s.PostfixedAssignmentAddress;return"="===s.OriginalRawTokens[1]&&"string"==typeof s.OriginalRawTokens[0]&&s.OriginalRawTokens[0].length>0&&(n=s.OriginalRawTokens[0]),c.setValueByHash(a,n,r),r}if("MONTECARLO"==s.SolverDirectives.Code){const[e]=this._prepareDirectiveParameters([s.SolverDirectives.SampleCount],["1"],s,o,c);if(isNaN(e))return s.ExpressionParserLog.push("ExpressionParser.solve detected invalid MONTECARLO directive parameters. SAMPLECOUNT must be numeric."),this.log.warn(s.ExpressionParserLog[s.ExpressionParserLog.length-1]),null;let t=JSON.parse(JSON.stringify(s.SolverDirectives));t.Samples=[];let r=Object.keys(t.Values);for(let e=0;e<r.length;e++){let i=r[e],n=t.Values[i];n.Distribution={},n.ValueSequence=[];const s=[];for(let e=0;e<n.Points.length;e++){let t=n.Points[e],r=this.fable.Math.parsePrecise(t,NaN);isNaN(r)&&"string"==typeof t&&t.length>0?(r=c.getValueByHash(o,t),r&&null!=r&&s.push(r)):s.push(t)}s.sort((e,t)=>this.fable.Math.comparePrecise(e,t)),n.ResolvedPoints=s,n.FirstPoint=n.ResolvedPoints[0],n.DomainRangeStart=n.FirstPoint,n.ResolvedPoints.length<2?n.LastPoint=n.FirstPoint:(n.LastPoint=this.fable.Math.parsePrecise(n.ResolvedPoints[n.ResolvedPoints.length-1],NaN),isNaN(n.LastPoint)&&(n.LastPoint=n.FirstPoint)),n.DomainLength=this.fable.Math.subtractPrecise(n.LastPoint,n.FirstPoint)}for(let i=0;i<=Number(e)-1;i++){let e=Object.assign({},o);e.stepIndex=i;for(let i=0;i<r.length;i++){let n=r[i],s=t.Values[n],o=this.fable.Math.generateValueFromEasingDescription(s);e[r[i]]=o,s.ValueSequence.push(o);let a=s.DistributionRoundPrecision||0,c=this.fable.Math.roundPrecise(o,a);c in s.Distribution||(s.Distribution[c]=0),s.Distribution[c]=s.Distribution[c]+1}let n=this.substituteValuesInTokenizedObjects(s.PostfixTokenObjects,e,s,c);t.Samples.push(this.solvePostfixedExpression(s.PostfixSolveList,a,s,c));for(let e=0;e<n.length;e++)n[e].Resolved=!1}let i=s.PostfixedAssignmentAddress;return"="===s.OriginalRawTokens[1]&&"string"==typeof s.OriginalRawTokens[0]&&s.OriginalRawTokens[0].length>0&&(i=s.OriginalRawTokens[0]),c.setValueByHash(a,i,t),t}return this.substituteValuesInTokenizedObjects(s.PostfixTokenObjects,o,s,i),this.solvePostfixedExpression(s.PostfixSolveList,a,s,i)}}},{"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-ExpressionTokenizer-DirectiveMutation.js":78,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-ExpressionTokenizer.js":79,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-FunctionMap.json":80,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-Linter.js":81,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-Messaging.js":82,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-Postfix.js":83,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-SolvePostfixedExpression.js":84,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-TokenMap.json":85,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-ValueMarshal.js":86,"fable-serviceproviderbase":59}],77:[function(e,t,r){const i=e("fable-serviceproviderbase");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParserOperationBase",this.numberTest=/^-{0,1}\d*\.{0,1}\d+$/,this.ExpressionParser=!1}connectExpressionParser(e){this.ExpressionParser=e}getTokenType(e){return e in this.ExpressionParser.tokenMap?"Token.".concat(this.ExpressionParser.tokenMap[e].Type):e.length>2&&"{"===e[0]&&"}"===e[e.length-1]?"Token.StateAddress":e.length>1&&'"'===e[0]&&'"'===e[e.length-1]?"Token.String":this.numberTest.test(e)?"Token.Constant":"Token.Symbol"}getTokenContainerObject(e,t){return{Token:e,Type:void 0===t?this.getTokenType(e):t,Descriptor:e in this.ExpressionParser.tokenMap&&this.ExpressionParser.tokenMap[e]}}}},{"fable-serviceproviderbase":59}],78:[function(e,t,r){const i=e("./Fable-Service-ExpressionParser-Base.js");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParser-TokenizerDirectiveMutation",this.directiveTypes={SOLVE:{Name:"Solve Expression",Code:"SOLVE"},SERIES:{Name:"Series",Code:"SERIES",From:null,To:null,Step:null},MONTECARLO:{Name:"Monte Carlo Simulation",SampleCount:"1",Code:"MONTECARLO",Values:{}},MAP:{Name:"Map",Code:"MAP",Values:{},ValueKeys:[]}},this.defaultDirective=this.directiveTypes.SOLVE}parseSeriesDirective(e){let t=JSON.parse(JSON.stringify(this.directiveTypes.SERIES));for(let r=0;r<e.length;r++){switch(e[r].toUpperCase()){case"FROM":r+1<e.length&&(t.From=e[r+1]);break;case"TO":r+1<e.length&&(t.To=e[r+1]);break;case"STEP":r+1<e.length&&(t.Step=e[r+1])}}return t}parseMonteCarloDirective(e){let t=JSON.parse(JSON.stringify(this.directiveTypes.MONTECARLO));for(let r=0;r<e.length;r++){switch(e[r].toUpperCase()){case"SAMPLECOUNT":r+1<e.length&&(t.SampleCount=e[r+1]),r+=1;break;case"VARIABLE":case"VAR":case"V":if(r+1<e.length){let i=e[r+1];"string"==typeof i&&i.length>0&&(t.Values[i]={Token:i,Easing:"Linear",Points:[]})}r+=1;break;case"POINT":case"PT":case"P":if(e.length<r+2)continue;let i=2,n=e[r+1];if(n in t.Values){let s=e[r+2];if("-"==s||"+"==s){if(e.length<r+3)continue;s+=e[r+3],i=3}let o=this.fable.Math.parsePrecise(s,NaN);isNaN(o)||t.Values[n].Points.push(o)}r+=i;break;case"EASING":if(e.length<r+2)continue;n=e[r+1];let s=e[r+2].toUpperCase();n in t.Values&&(t.Values[n].Easing=s),r+=2}}return t}parseMapDirective(e){let t=JSON.parse(JSON.stringify(this.directiveTypes.MAP));for(let r=0;r<e.length;r++){switch(e[r].toUpperCase()){case"VARIABLE":case"VAR":case"V":if(r+3<e.length&&"FROM"==e[r+2].toUpperCase()){let i=e[r+1];"string"==typeof i&&i.length>0&&(t.ValueKeys.push(i),t.Values[i]={Token:i,Address:e[r+3]}),r+=3}}}return t}parseDirectives(e){let t="object"==typeof e?e:{ExpressionParserLog:[]};if(t.SolverDirectives=this.defaultDirective,t.SolverDirectiveTokens=[],t.RawTokens.length<2)return t.ExpressionParserLog.push("ExpressionParser.tokenizeDirectiveMutation postprocessor received insufficient tokens to process directives."),this.log.warn(t.ExpressionParserLog[t.ExpressionParserLog.length-1]),t.SolverDirectives;for(let e=0;e<t.RawTokens.length;e++){let r=t.RawTokens[e].toUpperCase();if(r in this.directiveTypes&&(0===e||"="===t.RawTokens[e-1]||"?="===t.RawTokens[e-1])){t.SolverDirectives.Type=this.directiveTypes[r],t.ExpressionParserLog.push("ExpressionParser.tokenizeDirectiveMutation identified solver directive: ".concat(r));let i=e,n=-1;for(let e=i+1;e<t.RawTokens.length;e++)if(":"===t.RawTokens[e]){n=e;break}if(-1===n){t.ExpressionParserLog.push("ExpressionParser.tokenizeDirectiveMutation could not find the end of the directive token set for directive: ".concat(r)),this.log.warn(t.ExpressionParserLog[t.ExpressionParserLog.length-1]);continue}switch(t.SolverDirectiveTokens=t.RawTokens.slice(i,n),t.RawTokens.splice(0,n+1),r){case"SERIES":t.SolverDirectives=this.parseSeriesDirective(t.SolverDirectiveTokens);break;case"MONTECARLO":t.SolverDirectives=this.parseMonteCarloDirective(t.SolverDirectiveTokens);break;case"MAP":t.SolverDirectives=this.parseMapDirective(t.SolverDirectiveTokens)}}}return t.SolverDirectives}}},{"./Fable-Service-ExpressionParser-Base.js":77}],79:[function(e,t,r){const i=e("./Fable-Service-ExpressionParser-Base.js");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParser-Tokenizer"}tokenize(e,t){let r="object"==typeof t?t:{ExpressionParserLog:[]};if(r.RawExpression=e,r.SolverDirectives={},r.RawTokens=[],r.ExpressionParserLog=[],"string"!=typeof e)return this.log.warn("ExpressionParser.tokenize was passed a non-string expression."),r.RawTokens;let i=!1,n="";for(let t=0;t<e.length;t++){let s=e[t];if(" "!==s&&"\t"!==s||"StateAddress"===i||"String"===i)if("StateAddress"!==i||"}"===s)if("String"!==i||'"'===s)if("StateAddress"!==i||"}"!==s)if("String"!==i||'"'!==s)if("}"!=s)if("{"!=s)if("String"===i||'"'!=s){if(s in this.ExpressionParser.tokenRadix){let o=this.ExpressionParser.tokenRadix[s];if(1==o.TokenCount&&o.Literal){n.length>0&&r.RawTokens.push(n),n="",i=!1,r.RawTokens.push(s);continue}for(let s=0;s<o.TokenKeys.length;s++){let a=o.TokenKeys[s];if(e.substr(t,a.length)==a){n.length>0&&r.RawTokens.push(a),n="",i=!1,r.RawTokens.push(a),t+=a.length-1;break}}continue}i="Value",n+=s}else n.length>0&&r.RawTokens.push(n),n="",i="String",n=s;else n.length>0&&r.RawTokens.push(n),n="",i="StateAddress",n=s;else n.length>0&&r.RawTokens.push(n),n="",i=!1,r.ExpressionParserLog.push("ExpressionParser.tokenize found a closing brace without an opening brace in the expression: ".concat(e," at character index ").concat(t)),this.log.warn(r.ExpressionParserLog[r.ExpressionParserLog.length-1]);else n+=s,r.RawTokens.push(n),n="",i=!1;else n+=s,r.RawTokens.push(n),n="",i=!1;else n+=s;else n+=s;else n.length>0&&r.RawTokens.push(n),n="",i=!1}return i&&n.length>0&&r.RawTokens.push(n),r.OriginalRawTokens=Array.from(r.RawTokens),this.TokenizerDirectiveMutation.parseDirectives(r),r.RawTokens}}},{"./Fable-Service-ExpressionParser-Base.js":77}],80:[function(e,t,r){t.exports={sqrt:{Name:"Square Root",Address:"fable.Math.sqrtPrecise"},percent:{Name:"Compute Percent (in IS over OF format)",Address:"fable.Math.percentagePrecise"},compare:{Name:"Compare",Address:"fable.Math.comparePrecise"},abs:{Name:"Absolute Value",Address:"fable.Math.absPrecise"},floor:{Name:"Floor Value",Address:"fable.Math.floorPrecise"},ceil:{Name:"Ceiling Value",Address:"fable.Math.ceilPrecise"},rad:{Name:"Degrees to Radians",Address:"fable.Math.radPrecise"},pi:{Name:"Pi",Address:"fable.Math.piPrecise"},euler:{Name:"Euler",Address:"fable.Math.eulerPrecise"},log:{Name:"Logarithm",Address:"fable.Math.logPrecise"},exp:{Name:"Eulers Number to the Power Of N",Address:"fable.Math.expPrecise"},sin:{Name:"Sine",Address:"fable.Math.sin"},cos:{Name:"Cosine",Address:"fable.Math.cos"},tan:{Name:"Tangent",Address:"fable.Math.tan"},count:{Name:"Count Set Elements",Address:"fable.Math.countSetElements"},countset:{Name:"Count Set Elements",Address:"fable.Math.countSetElements"},sortset:{Name:"Sort Set",Address:"fable.Math.sortSetPrecise"},bucketset:{Name:"Bucket Set",Address:"fable.Math.bucketSetPrecise"},sorthistogram:{Name:"Sort Histogram",Address:"fable.Math.sortHistogramPrecise"},sorthistogrambykeys:{Name:"Sort Histogram by Keys",Address:"fable.Math.sortHistogramByKeys"},max:{Name:"Maximum",Address:"fable.Math.maxPrecise"},min:{Name:"Minimum",Address:"fable.Math.minPrecise"},sum:{Name:"Sum",Address:"fable.Math.sumPrecise"},avg:{Name:"Average",Address:"fable.Math.averagePrecise"},mean:{Name:"Mean",Address:"fable.Math.meanPrecise"},median:{Name:"Median",Address:"fable.Math.medianPrecise"},mode:{Name:"Mode",Address:"fable.Math.modePrecise"},var:{Name:"Variance (Sample)",Address:"fable.Math.variancePrecise"},vara:{Name:"Variance (Sample)",Address:"fable.Math.variancePrecise"},varp:{Name:"Variance (Population)",Address:"fable.Math.populationVariancePrecise"},stdev:{Name:"Standard Deviation (Sample)",Address:"fable.Math.standardDeviationPrecise"},stdeva:{Name:"Standard Deviation (Sample)",Address:"fable.Math.standardDeviationPrecise"},stdevp:{Name:"Standard Deviation (Population)",Address:"fable.Math.populationStandardDeviationPrecise"},round:{Name:"Round",Address:"fable.Math.roundPrecise"},tofixed:{Name:"To Fixed",Address:"fable.Math.toFixedPrecise"},cumulativesummation:{Name:"Sum each value in a Histogram or Value Map cumulatively, creating or setting a property with the result on each row",Address:"fable.Math.cumulativeSummation"},subtractingsummation:{Name:"Subtract each subsequent value in a Histogram or Value Map cumulatively (by default from the first row), creating or setting a property with the result on each row.",Address:"fable.Math.subtractingSummation"},iterativeseries:{Name:"Perform an Iterative Series of Mathematical Operations on Set Elements",Address:"fable.Math.iterativeSeries"},countsetelements:{Name:"Count Set Elements in a Histogram or Value Map",Address:"fable.Math.countSetElements"},getvalue:{Name:"Get Value from Application State or Services (AppData, etc.)",Address:"fable.Utility.getInternalValueByHash"},setvalue:{Name:"Set Value to Application State or Services (AppData, etc.)",Address:"fable.Utility.setInternalValueByHash"},objectkeystoarray:{Name:"Get Array of an Object's keys",Address:"fable.Utility.objectKeysToArray"},objectvaluestoarray:{Name:"Get Array of an Object's values",Address:"fable.Utility.objectValuesToArray"},generatearrayofobjectsfromsets:{Name:"Generate Array of Objects from Sets",Address:"fable.Utility.generateArrayOfObjectsFromSets"},objectvaluessortbyexternalobjectarray:{Name:"Get Array of an Object's values sorted by an external array",Address:"fable.Utility.objectValuesSortByExternalArray"},setkeystoarray:{Name:"Get Array of an Object's keys",Address:"fable.Utility.objectKeysToArray"},setvaluestoarray:{Name:"Get Array of an Object's values",Address:"fable.Utility.objectValuesToArray"},histogramkeystoarray:{Name:"Get Array of an Object's keys",Address:"fable.Utility.objectKeysToArray"},histogramvaluestoarray:{Name:"Get Array of an Object's values",Address:"fable.Utility.objectValuesToArray"},createarrayfromabsolutevalues:{Name:"Create Array from Absolute Values",Address:"fable.Utility.createArrayFromAbsoluteValues"},flatten:{Name:"flatten an array of values",Address:"fable.Utility.flattenArrayOfSolverInputs"},findfirstvaluebyexactmatch:{Name:"find + map on array of objects",Address:"fable.Utility.findFirstValueByExactMatchInternal"},findfirstvaluebystringincludes:{Name:"find + map on array of objects",Address:"fable.Utility.findFirstValueByStringIncludesInternal"},match:{Name:"Implementation of sheets MATCH() function",Address:"fable.Utility.findIndexInternal"},resolvehtmlentities:{Name:"resolve HTML entities",Address:"fable.DataFormat.resolveHtmlEntities"},concat:{Name:"concatenate an array of values and output a string",Address:"fable.DataFormat.concatenateStringsInternal"},concatraw:{Name:"concatenate an array of values and output a string",Address:"fable.DataFormat.concatenateStringsRawInternal"},arrayconcat:{Name:"concatenate two or more arrays generating a single output array",Address:"fable.Utility.concatenateArrays"},join:{Name:"join an array of values and output a string",Address:"fable.DataFormat.joinStringsInternal"},joinraw:{Name:"join an array of values and output a string",Address:"fable.DataFormat.joinStringsRawInternal"},if:{Name:"perform a conditional operator on two values, and choose one of two outcomes based on the result",Address:"fable.Logic.checkIf"},when:{Name:"perform a 'truthy' check on one value, and return one of two outcomes based on the result",Address:"fable.Logic.when"},entryinset:{Name:"Entry in Set",Address:"fable.Math.entryInSet"},smallestinset:{Name:"Smallest in Set",Address:"fable.Math.smallestInSet"},largestinset:{Name:"Largest in Set",Address:"fable.Math.largestInSet"},aggregationhistogram:{Name:"Generate a Histogram by Exact Value Aggregation",Address:"fable.Math.histogramAggregationByExactValueFromInternalState"},aggregationhistogrambyobject:{Name:"Generate a Histogram by Exact Value Aggregation from Object Property",Address:"fable.Math.histogramAggregationByExactValue"},distributionhistogram:{Name:"Generate a Histogram Based on Value Distribution",Address:"fable.Math.histogramDistributionByExactValueFromInternalState"},distributionhistogrambyobject:{Name:"Generate a Histogram Based on Value Distribution from Object Property",Address:"fable.Math.histogramDistributionByExactValue"},setconcatenate:{Name:"Set Concatenate",Address:"fable.Math.setConcatenate"},getvaluearray:{Name:"Get Value Array from Application State or Services (AppData, etc.)",Address:"fable.Utility.createValueArrayByHashParametersFromInternal"},getvalueobject:{Name:"Get Value Object from Application State or Services (AppData, etc.)",Address:"fable.Utility.createValueObjectByHashParametersFromInternal"},cleanvaluearray:{Name:"Clean Value Array",Address:"fable.Math.cleanValueArray"},cleanvalueobject:{Name:"Clean Value Object",Address:"fable.Math.cleanValueObject"},polynomialregression:{Name:"Perform an nth degree Polynomial Regression on a Set of X and Y Values",Address:"fable.Math.polynomialRegression"},randominteger:{Name:"Random Integer",Address:"fable.DataGeneration.randomInteger"},randomintegerbetween:{Name:"Random Integer Between Two Numbers",Address:"fable.DataGeneration.randomIntegerBetween"},randomintegerupto:{Name:"Random Integer",Address:"fable.DataGeneration.randomIntegerUpTo"},randomfloat:{Name:"Random Float",Address:"fable.DataGeneration.randomFloat"},randomfloatbetween:{Name:"Random Float",Address:"fable.DataGeneration.randomFloatBetween"},randomfloatupto:{Name:"Random Float",Address:"fable.DataGeneration.randomFloatUpTo"},datemilliseconddifference:{Name:"Date Difference in Milliseconds",Address:"fable.Dates.dateMillisecondDifference"},dateseconddifference:{Name:"Date Difference in Seconds",Address:"fable.Dates.dateSecondDifference"},dateminutedifference:{Name:"Date Difference in Minutes",Address:"fable.Dates.dateMinuteDifference"},datehourdifference:{Name:"Date Difference in Hours",Address:"fable.Dates.dateHourDifference"},datedaydifference:{Name:"Date Difference in Days",Address:"fable.Dates.dateDayDifference"},dateweekdifference:{Name:"Date Difference in Weeks",Address:"fable.Dates.dateWeekDifference"},datemonthdifference:{Name:"Date Difference in Months",Address:"fable.Dates.dateMonthDifference"},dateyeardifference:{Name:"Date Difference in Years",Address:"fable.Dates.dateYearDifference"},datemathadd:{Name:"Date Math Add",Address:"fable.Dates.dateMath"},dateaddmilliseconds:{Name:"Date Add Milliseconds",Address:"fable.Dates.dateAddMilliseconds"},dateaddseconds:{Name:"Date Add Seconds",Address:"fable.Dates.dateAddSeconds"},dateaddminutes:{Name:"Date Add Minutes",Address:"fable.Dates.dateAddMinutes"},dateaddhours:{Name:"Date Add Hours",Address:"fable.Dates.dateAddHours"},dateadddays:{Name:"Date Add Days",Address:"fable.Dates.dateAddDays"},dateaddweeks:{Name:"Date Add Weeks",Address:"fable.Dates.dateAddWeeks"},dateaddmonths:{Name:"Date Add Months",Address:"fable.Dates.dateAddMonths"},dateaddyears:{Name:"Date Add Years",Address:"fable.Dates.dateAddYears"},datefromparts:{Name:"Date From Parts",Address:"fable.Dates.dateFromParts"},slice:{Name:"Slice Array",Address:"fable.Utility.slice"},createvalueobjectbyhashes:{Name:"Create Value Object by Hashes",Address:"fable.Utility.createValueObjectByHashes"},polynomialregression:{Name:"Perform an nth degree Polynomial Regression on a Set of X and Y Values",Address:"fable.Math.polynomialRegression"},leastsquares:{Name:"Perform a Least Squares Regression on a Set of Independent Variable Vectors and a Dependent Variable Vector",Address:"fable.Math.leastSquares"},linest:{Name:"Perform a Least Squares Regression on a Set of Independent Variable Vectors and a Dependent Variable Vector",Address:"fable.Math.leastSquares"},matrixtranspose:{Name:"Transpose a Matrix",Address:"fable.Math.matrixTranspose"},matrixmultiply:{Name:"Multiply Two Matrices",Address:"fable.Math.matrixMultiply"},matrixvectormultiply:{Name:"Multiply a Matrix by a Vector",Address:"fable.Math.matrixVectorMultiply"},matrixinverse:{Name:"Inverse a Matrix",Address:"fable.Math.matrixInverse"},gaussianelimination:{Name:"Solve a System of Linear Equations using Gaussian Elimination",Address:"fable.Math.gaussianElimination"},predict:{Name:"Predict Y Values from X Values using a Regression Model",Address:"fable.Math.predictFromRegressionModel"},stringcountsegments:{Name:"Count Segments in a String",Address:"fable.DataFormat.stringCountSegments"},stringgetsegments:{Name:"Get Segments from a String",Address:"fable.DataFormat.stringGetSegments"},bezierpoint:{Name:"Evaluate a Point on a Cubic Bezier Curve at Parameter t",Address:"fable.Math.bezierPoint"},beziercurvefit:{Name:"Fit a Cubic Bezier Curve to a Set of Data Points",Address:"fable.Math.bezierCurveFit"}}},{}],81:[function(e,t,r){const i=e("./Fable-Service-ExpressionParser-Base.js");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParser-Linter"}lintTokenizedExpression(e,t){let r="object"==typeof t?t:{ExpressionParserLog:[]};if(r.LinterResults=[],!Array.isArray(e))return r.ExpressionParserLog.push("ERROR: ExpressionParser.lintTokenizedExpression was passed a non-array tokenized expression."),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),e;if(e.length<1)return r.ExpressionParserLog.push("ERROR: ExpressionParser.lintTokenizedExpression was passed an empty tokenized expression."),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),e;let i=0,n=!1;for(let t=0;t<e.length;t++)"("!==e[t]||n||i++,")"!==e[t]||n||i--,"{"===e[t]&&(n=!0),"}"===e[t]&&(n=!1),i<0&&(r.ExpressionParserLog.push("ERROR: ExpressionParser.lintTokenizedExpression found an unbalanced parenthesis in the tokenized expression at token index ".concat(t)),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]));i>0&&(r.ExpressionParserLog.push("WARNING: ExpressionParser.lintTokenizedExpression found an unbalanced parenthesis in the tokenized expression (ended without closing last set of parenthesis) -- appropriate closing parenthesis will be added."),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.warn(r.ExpressionParserLog[r.ExpressionParserLog.length-1])),n=!1;for(let t=0;t<e.length;t++)"{"===e[t]&&(n=!0),"}"===e[t]&&n&&(n=!1),"}"!==e[t]||n||(r.ExpressionParserLog.push('ERROR: ExpressionParser.lintTokenizedExpression found an unbalanced closing squiggly brace "}" in the tokenized expression at token index '.concat(t)),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1])),n&&(r.ExpressionParserLog.push("WARNING: ExpressionParser.lintTokenizedExpression found an open squiggly brace in the tokenized expression at index ".concat(t)),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.warn(r.ExpressionParserLog[r.ExpressionParserLog.length-1]));let s=0,o=!1;for(let t=0;t<e.length;t++)this.ExpressionParser.tokenMap[e[t]]&&"Assignment"===this.ExpressionParser.tokenMap[e[t]].Type&&(s++,o=t,s>1&&(r.ExpressionParserLog.push("ERROR: ExpressionParser.lintTokenizedExpression found multiple equality assignments in the tokenized expression; equality assignment #".concat(s," operator '").concat(e[t],"' at token index ").concat(t,".")),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1])));s<1&&(r.ExpressionParserLog.push("WARNING: ExpressionParser.lintTokenizedExpression found no equality assignment in the tokenized expression. One called Result will be added automatically."),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1])),1===s&&3===e.length&&("Token.StateAddress"!==this.getTokenType(e[0])&&"Token.Symbol"!==this.getTokenType(e[2])||(r.ExpressionParserLog.push("WARNING: ExpressionParser.lintTokenizedExpression found a single equality assignment in the tokenized expression with no assignable address on the left side of the assignment."),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.warn(r.ExpressionParserLog[r.ExpressionParserLog.length-1])));let a=!1;for(let t=0;t<e.length-1;t++)e[t]in this.ExpressionParser.tokenMap&&"Parenthesis"!=this.ExpressionParser.tokenMap[e[t]].Type&&!a?a=!0:e[t]in this.ExpressionParser.tokenMap&&"Parenthesis"!=this.ExpressionParser.tokenMap[e[t]].Type?"+"!==e[t]&&"-"!==e[t]&&(r.ExpressionParserLog.push("ERROR: ExpressionParser.lintTokenizedExpression found an ".concat(e[t]," operator adjacent to another operator in the tokenized expression at token index ").concat(t)),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1])):a=!1;return r.LinterResults}}},{"./Fable-Service-ExpressionParser-Base.js":77}],82:[function(e,t,r){const{PE:i}=e("big.js"),n=e("./Fable-Service-ExpressionParser-Base.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParser-Messaging"}getOperationVirtualSymbolName(e){return e&&"VirtualSymbolName"in e?e.VirtualSymbolName:"Token.VirtualSymbol"===e.Type?e.Token:"NO_VIRTUAL_SYMBOL_NAME_FOUND"}getVirtualTokenValue(e,t){let r=this.getOperationVirtualSymbolName(e);if(("Token.Symbol"==e.Type||"Token.Constant"==e.Type)&&e.Value)return e.Value.toString();let i="VirtualSymbols"in t?t.VirtualSymbols:{};if(this.ExpressionParser.GenericManifest.checkAddressExists(i,r)){let e=this.ExpressionParser.GenericManifest.getValueAtAddress(i,r);return"object"==typeof e?"{".concat(Object.keys(e).length," values}"):Array.isArray(e)?"[".concat(Object.keys(e).length," values]"):e}return"NO_VALUE_FOUND"}getTokenAddressString(e){return pExpression.Token}getTokenSymbolString(e){return e.Token}getOperationSymbolMessage(e){if(!e)return"INVALID_OPERATION";let t=this.getOperationVirtualSymbolName(e),r=this.getTokenSymbolString(e.LeftValue),i=this.getTokenSymbolString(e.Operation),n=this.getTokenSymbolString(e.RightValue),s=t.substring(0,3);return"="===i?"".concat(t," = ").concat(r):"VFE"===s?"".concat(t," = ").concat(i,"(").concat(r,")"):"".concat(t," = ").concat(r," ").concat(i," ").concat(n)}getOperationValueMessage(e,t){if(!e)return"INVALID_OPERATION";let r=this.getOperationVirtualSymbolName(e),i=this.getVirtualTokenValue(e.LeftValue,t),n=this.getTokenSymbolString(e.Operation),s=this.getVirtualTokenValue(e.RightValue,t),o=r.substring(0,3);return"="===n?"".concat(r," = ").concat(i):"VFE"===o?"".concat(r," = ").concat(n,"(").concat(i,")"):"".concat(r," = ").concat(i," ").concat(n," ").concat(s)}getOperationOutcomeMessage(e,t){if(!e)return"INVALID_TOKEN";let r=this.getOperationVirtualSymbolName(e),i=this.getVirtualTokenValue(e,t);return"".concat(r," = ").concat(i)}logFunctionOutcome(e){if("object"!=typeof e)return void this.log.error("Solver results object was not an object. Cannot log outcome.");let t="PostfixedAssignmentAddress"in e?e.PostfixedAssignmentAddress:"NO_ASSIGNMENT_ADDRESS_FOUND",r="RawExpression"in e?e.RawExpression:"NO_EXPRESSION_FOUND",i="RawResult"in e?e.RawResult:"NO_RESULT_FOUND";this.log.info("Solved f(".concat(t,") = {").concat(r,"}"));for(let t=0;t<e.PostfixSolveList.length;t++){let r=e.PostfixSolveList[t],i=this.getOperationSymbolMessage(r);this.log.info("".concat(t," Symbols: ").concat(i));let n=this.getOperationValueMessage(r,e);this.log.info("".concat(t," Values: ").concat(n));let s=this.getOperationOutcomeMessage(r,e);this.log.info("".concat(t," Outcome: ").concat(s))}this.log.info("{".concat(r,"} = ").concat(i))}logFunctionSolve(e){if("object"==typeof e)if("PostfixSolveList"in e&&Array.isArray(e.PostfixSolveList)){for(let t=0;t<e.PostfixSolveList.length;t++){let r=e.PostfixSolveList[t];console.log("".concat(t,": ").concat(r.VirtualSymbolName," = (").concat(r.LeftValue.Token,"::").concat(r.LeftValue.Value,") ").concat(r.Operation.Token," (").concat(r.RightValue.Token,"::").concat(r.RightValue.Value,") "))}this.logFunctionOutcome(e)}else this.log.error("Solver results object did not contain a PostfixSolveList array. Cannot log the solve.");else this.log.error("Solver results object was not an object. Cannot log the solve.")}}},{"./Fable-Service-ExpressionParser-Base.js":77,"big.js":17}],83:[function(e,t,r){const i=e("./Fable-Service-ExpressionParser-Base.js");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParser-Postfix"}getPosfixSolveListOperation(e,t,r,i,n){let s={VirtualSymbolName:e.VirtualSymbolName,Operation:e,LeftValue:t,RightValue:r};Array.isArray(i);return s.LeftValue.VirtualSymbolName?"LeftVirtualSymbolName"in s.Operation?s.LeftValue=this.getTokenContainerObject(s.Operation.LeftVirtualSymbolName,"Token.VirtualSymbol"):s.LeftValue=this.getTokenContainerObject(s.LeftValue.VirtualSymbolName,"Token.VirtualSymbol"):s.LeftValue.VirtualSymbolName=s.VirtualSymbolName,s.RightValue.VirtualSymbolName?"RightVirtualSymbolName"in s.Operation?s.RightValue=this.getTokenContainerObject(s.Operation.RightVirtualSymbolName,"Token.VirtualSymbol"):s.RightValue=this.getTokenContainerObject(s.RightValue.VirtualSymbolName,"Token.VirtualSymbol"):s.RightValue.VirtualSymbolName=s.VirtualSymbolName,s.Operation.Parsed=!0,s}buildPostfixedSolveList(e,t){let r="object"==typeof t?t:{ExpressionParserLog:[]};if(r.PostfixedAssignmentAddress="Result",r.PostfixedAssignmentOperator=this.ExpressionParser.tokenMap["="],r.PostfixTokenObjects=[],r.PostfixSolveList=[],e.length<3)return r.ExpressionParserLog.push("ERROR: ExpressionParser.buildPostfixedSolveList was passed a tokenized expression with less than three tokens."),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),r.PostfixTokenObjects;let i=-1;for(let t=0;t<e.length;t++)if(this.ExpressionParser.tokenMap[e[t]]&&"Assignment"===this.ExpressionParser.tokenMap[e[t]].Type){if(!(i<0))return r.ExpressionParserLog.push("ERROR: ExpressionParser.buildPostfixedSolveList found multiple assignment operators in the tokenized expression; assignment operator '".concat(e[t],"' #").concat(i," at token index ").concat(t,".")),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),r.PostfixTokenObjects;i=t,r.PostfixedAssignmentOperator=this.ExpressionParser.tokenMap[e[t]]}-1==i?r.ExpressionParserLog.push("WARNING: ExpressionParser.buildPostfixedSolveList found no equality assignment in the tokenized expression; defaulting to Result"):i>1?(r.ExpressionParserLog.push("WARNING: ExpressionParser.buildPostfixedSolveList found an equality assignment in the tokenized expression at an unexpected location (token index ".concat(i,"); the expression cannot be parsed.")),this.log.warn(r.ExpressionParserLog[r.ExpressionParserLog.length-1])):0===i||(r.PostfixedAssignmentAddress=e[0]);for(let t=i+1;t<e.length;t++)r.PostfixTokenObjects.push(this.getTokenContainerObject(e[t]));let n=0,s=0,o=[];o.push("SolveSet_".concat(s,"_D_").concat(n));for(let e=0;e<r.PostfixTokenObjects.length;e++)"("===r.PostfixTokenObjects[e].Token?(r.PostfixTokenObjects[e].Depth=n,r.PostfixTokenObjects[e].VirtualSymbolName="Pr_".concat(s,"_D_").concat(n),e>0&&"Token.Symbol"===r.PostfixTokenObjects[e-1].Type&&(r.PostfixTokenObjects[e-1].Type="Token.Function"),r.PostfixTokenObjects[e].SolveLayerStack=o[o.length-1],o.push(r.PostfixTokenObjects[e].VirtualSymbolName),s++,n++):")"===r.PostfixTokenObjects[e].Token?(n--,r.PostfixTokenObjects[e].Depth=n,n<0&&(r.ExpressionParserLog.push("ERROR: ExpressionParser.buildPostfixedSolveList found a closing parenthesis at token index ".concat(e," with no corresponding opening parenthesis.")),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1])),r.PostfixTokenObjects[e].VirtualSymbolName=o.pop(),r.PostfixTokenObjects[e].SolveLayerStack=o[o.length-1]):(r.PostfixTokenObjects[e].Depth=n,r.PostfixTokenObjects[e].SolveLayerStack=o[o.length-1]);let a={},c=0;for(let e=0;e<r.PostfixTokenObjects.length;e++)r.PostfixTokenObjects[e].SolveLayerStack in a||(a[r.PostfixTokenObjects[e].SolveLayerStack]=[]),a[r.PostfixTokenObjects[e].SolveLayerStack].push(r.PostfixTokenObjects[e]),r.PostfixTokenObjects[e].Depth>c&&(c=r.PostfixTokenObjects[e].Depth);let l=Object.keys(a),h=0;l.sort((e,t)=>a[e][0].Depth<a[t][0].Depth?1:a[e][0].Depth>a[t][0].Depth?-1:0),r.PostfixLayerstackMap={};const u=["+","-"],p=["Token.Operator","Token.Assignment"];for(let e=0;e<l.length;e++){let t=a[l[e]];for(let e=0;e<=this.ExpressionParser.tokenMaxPrecedence;e++)for(let i=0;i<t.length;i++){const n=t[i];if(u.includes(n.Token)&&(0==i||p.includes(t[i-1].Type))&&(n.Descriptor=JSON.parse(JSON.stringify(n.Descriptor)),n.Descriptor.Precedence=1),"Token.Operator"===t[i].Type&&n.Descriptor.Precedence===e){if(1===t.length)return r.ExpressionParserLog.push("ERROR: ExpressionParser.buildPostfixedSolveList found a single operator in a solve layer expression at token index ".concat(i)),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),r.PostfixSolveList;if(0!=i||"-"!=n.Token&&"+"!=n.Token){if(0==i&&("+"!=n.Token||"-"!=n.Token))return r.ExpressionParserLog.push("ERROR: ExpressionParser.buildPostfixedSolveList found an operator at the beginning of a solve layer expression at token index ".concat(i)),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),r.PostfixSolveList;if(i==t.length-1)return r.ExpressionParserLog.push("ERROR: ExpressionParser.buildPostfixedSolveList found an operator at the end of a solve layer expression at token index ".concat(i)),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),r.PostfixSolveList;if(i>0&&"-"==n.Token&&("Token.Operator"===t[i-1].Type||"("===t[i-1].Token))n.VirtualSymbolName="VNLO_".concat(h),h++;else{if(0==i&&"+"==n.Token)continue;if(i>0&&"+"==n.Token&&("Token.Operator"===t[i-1].Type||"("===t[i-1].Token))continue;if(("Token.Operator"===t[i-1].Type||"Token.Operator"===t[i+1].Type)&&"-"!=t[i+1].Token&&"+"!=t[i+1].Token)return r.ExpressionParserLog.push("ERROR: ExpressionParser.buildPostfixedSolveList found an operator at token index ".concat(i," that is not surrounded by two values.")),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),r.PostfixSolveList;n.VirtualSymbolName="V_".concat(h),r.PostfixLayerstackMap[n.SolveLayerStack]=n.VirtualSymbolName,h++}}else n.VirtualSymbolName="VNLO_".concat(h),r.PostfixLayerstackMap[n.SolveLayerStack]=n.VirtualSymbolName,h++}else if("Token.Function"===t[i].Type&&0===e){let e=t[i];e.VirtualSymbolName="VFE_".concat(h),h++,r.PostfixLayerstackMap[e.SolveLayerStack]=e.VirtualSymbolName}}}let d=[];for(let e=0;e<r.PostfixTokenObjects.length;e++){let t=r.PostfixTokenObjects[e];if("Token.Parenthesis"===t.Type)if(t.ParenthesisStack=t.VirtualSymbolName,0==e){t.IsFunction=!1;let e=r.PostfixLayerstackMap[t.VirtualSymbolName];e||(e="VP_".concat(h),h++),t.VirtualSymbolName=e,d.push(t)}else if("("===t.Token){if("Token.Function"===r.PostfixTokenObjects[e-1].Type){t.IsFunction=!0,t.Function=r.PostfixTokenObjects[e-1];let i=r.PostfixLayerstackMap[t.VirtualSymbolName];i||(i="VFP_".concat(h),h++),t.VirtualSymbolName=i}else{t.IsFunction=!1;let e=r.PostfixLayerstackMap[t.VirtualSymbolName];e||(e="VP_".concat(h),h++),t.VirtualSymbolName=e}d.push(t)}else if(")"===t.Token){let i=d.pop();if(!i){r.ExpressionParserLog.push("ERROR: ExpressionParser.buildPostfixedSolveList found a closing parenthesis at token index ".concat(e," with no corresponding opening parenthesis."));continue}i.IsFunction?(t.IsFunction=!0,t.VirtualSymbolName=i.Function.VirtualSymbolName):(t.IsFunction=!1,t.VirtualSymbolName=i.VirtualSymbolName)}}for(let e=0;e<l.length;e++){let t=[],i=!1,n=a[l[e]];for(let e=0;e<n.length;e++){let s=n[e];if("Token.Operator"===s.Type&&(i=s),"Token.Function"===s.Type)s.PreviousOperator=i;else if("Token.Parenthesis"===s.Type&&"("===s.Token&&s.IsFunction)t.push(s),s.Function.PreviousOperator&&(s.PreviousOperator=s.Function.PreviousOperator);else if("Token.Parenthesis"===s.Type&&"("===s.Token)s.PreviousOperator=i,t.push(s);else if("Token.Parenthesis"===s.Type&&")"===s.Token){let i=t.pop();if(e<n.length-1)for(let t=e+1;t<n.length;t++)if("Token.Operator"===n[t].Type){i.NextOperator=n[t];break}if(!i){r.ExpressionParserLog.push("ERROR: ExpressionParser.buildPostfixedSolveList found a closing parenthesis at token index ".concat(e," with no corresponding opening parenthesis."));continue}i.PreviousOperator&&i.NextOperator&&(i.PreviousOperator.Descriptor.Precedence<=i.NextOperator.Descriptor.Precedence?i.NextOperator.LeftVirtualSymbolName=i.PreviousOperator.VirtualSymbolName:i.PreviousOperator.RightVirtualSymbolName=i.NextOperator.VirtualSymbolName)}else"SolveLayerStack"in s||(t.length>0?s.SolveLayerStack=t[t.length-1].SolveLayerStack:s.SolveLayerStack="Expression_Root")}}for(let e=0;e<l.length;e++){let t=!1,r=!1,i=a[l[e]];for(let e=i.length-1;e>=0;e--){let n=i[e];"Token.Operator"===n.Type&&(r?n.Descriptor.Precedence>t?(n.RightVirtualSymbolName=r.VirtualSymbolName,r=n):n.Descriptor.Precedence<t&&(r=n):r=n,t=n.Descriptor.Precedence)}let n=[],s=!1;for(let e=i.length-1;e>=0;e--){let r=i[e];if("Token.Operator"===r.Type){if(s)if(r.Descriptor.Precedence>t){if(n.length>0)for(let e=n.length-1;e>=0;e--)if(n[e].Descriptor.Precedence>=r.Descriptor.Precedence){n[e].LeftVirtualSymbolName=r.VirtualSymbolName,n.slice(e,1);break}s=r}else r.Descriptor.Precedence<t&&(n.push(s),s=r);else s=r;t=r.Descriptor.Precedence}}}for(let e=0;e<l.length;e++){let t=a[l[e]];if(1===t.length){let e=this.getTokenContainerObject("=");if(e.VirtualSymbolName=r.PostfixLayerstackMap[t[0].SolveLayerStack],!e.VirtualSymbolName)for(let i=0;i<r.PostfixTokenObjects.length;i++)if(r.PostfixTokenObjects[i].ParenthesisStack===t[0].SolveLayerStack){e.VirtualSymbolName=r.PostfixTokenObjects[i].VirtualSymbolName;break}e.VirtualSymbolName||(e.VirtualSymbolName="V_SingleValue_".concat(h),h++),r.PostfixSolveList.push(this.getPosfixSolveListOperation(e,t[0],this.getTokenContainerObject("0.0")));continue}for(let e=0;e<=this.ExpressionParser.tokenMaxPrecedence;e++)for(let i=0;i<t.length;i++)if("Token.Operator"===t[i].Type&&t[i].Descriptor.Precedence===e){let e=t[i];if(0==i&&"-"==e.Token){let n=this.getTokenContainerObject("*");n.VirtualSymbolName=e.VirtualSymbolName,r.PostfixSolveList.push(this.getPosfixSolveListOperation(n,this.getTokenContainerObject("-1.0"),t[i+1]))}else if(i>0&&"-"==e.Token&&("Token.Operator"===t[i-1].Type||"("===t[i-1].Token)){let n=this.getTokenContainerObject("*");n.VirtualSymbolName=e.VirtualSymbolName,r.PostfixSolveList.push(this.getPosfixSolveListOperation(n,this.getTokenContainerObject("-1.0"),t[i+1]))}else{if(0==i&&"+"==e.Token)continue;if(i>0&&"+"==e.Token&&("Token.Operator"===t[i-1].Type||"("===t[i-1].Token))continue;r.PostfixSolveList.push(this.getPosfixSolveListOperation(e,t[i-1],t[i+1],t,i))}}else if("Token.Function"===t[i].Type&&0===e){let e=t[i];r.PostfixSolveList.push(this.getPosfixSolveListOperation(e,t[i+1],this.getTokenContainerObject("0.0")))}}let f="PostfixedAssignmentOperator"in r?this.getTokenContainerObject(r.PostfixedAssignmentOperator.Token):this.getTokenContainerObject("=");f.VirtualSymbolName=r.PostfixedAssignmentAddress;let g=this.getTokenContainerObject("Result","Token.LastResult"),m=this.getPosfixSolveListOperation(f,g,this.getTokenContainerObject("SolverMarshal","Token.SolverMarshal"));return r.PostfixSolveList.push(m),r.PostfixSolveList}}},{"./Fable-Service-ExpressionParser-Base.js":77}],84:[function(e,t,r){const i=e("./Fable-Service-ExpressionParser-Base.js"),n=e("../Fable-SetConcatArray.js");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParser-Solver"}solvePostfixedExpression(e,t,r,i){let s="object"==typeof r?r:{ExpressionParserLog:[]},o="object"==typeof i?i:this.fable.newManyfest(),a="object"==typeof t?t:{},c="fable"in s;if(c||(s.fable=this.fable),!Array.isArray(e))return s.ExpressionParserLog.push("ERROR: ExpressionParser.solvePostfixedExpression was passed a non-array postfixed expression."),this.log.error(s.ExpressionParserLog[s.ExpressionParserLog.length-1]),!1;if(e.length<1)return s.ExpressionParserLog.push("ERROR: ExpressionParser.solvePostfixedExpression was passed an empty postfixed expression."),this.log.error(s.ExpressionParserLog[s.ExpressionParserLog.length-1]),!1;s.VirtualSymbols={};for(let t=0;t<e.length;t++){if("Token.SolverInstruction"===e[t].Operation.Type)continue;let r={ExpressionStep:e[t],ExpressionStepIndex:t,ResultsObject:s,Manifest:o};if("Token.LastResult"===r.ExpressionStep.LeftValue.Type&&(r.ExpressionStep.LeftValue.Value=s.LastResult),"Token.LastResult"===r.ExpressionStep.RightValue.Type&&(r.ExpressionStep.RightValue.Value=s.LastResult),"Token.VirtualSymbol"===r.ExpressionStep.LeftValue.Type&&(r.ExpressionStep.LeftValue.Value=o.getValueAtAddress(s.VirtualSymbols,r.ExpressionStep.LeftValue.Token)),"Token.VirtualSymbol"===r.ExpressionStep.RightValue.Type&&(r.ExpressionStep.RightValue.Value=o.getValueAtAddress(s.VirtualSymbols,r.ExpressionStep.RightValue.Token)),"Token.Parenthesis"===r.ExpressionStep.LeftValue.Type&&(r.ExpressionStep.LeftValue.Value=o.getValueAtAddress(s.VirtualSymbols,r.ExpressionStep.LeftValue.VirtualSymbolName)),"Token.Parenthesis"===r.ExpressionStep.RightValue.Type&&(r.ExpressionStep.RightValue.Value=o.getValueAtAddress(s.VirtualSymbols,r.ExpressionStep.RightValue.VirtualSymbolName)),"Token.Constant"!==r.ExpressionStep.LeftValue.Type||"Value"in r.ExpressionStep.LeftValue||(r.ExpressionStep.LeftValue.Value=r.ExpressionStep.LeftValue.Token),"Token.Constant"!==r.ExpressionStep.RightValue.Type||"Value"in r.ExpressionStep.RightValue||(r.ExpressionStep.RightValue.Value=r.ExpressionStep.RightValue.Token),r.ExpressionStep.Operation.Type="Operator"){let e,i=!1;if(r.ExpressionStep.Operation.Token in this.ExpressionParser.tokenMap?e="ResultsObject.".concat(r.ExpressionStep.Operation.Descriptor.Function):r.ExpressionStep.Operation.Token.toLowerCase()in this.ExpressionParser.functionMap&&(i=!0,e="ResultsObject.".concat(this.ExpressionParser.functionMap[r.ExpressionStep.Operation.Token.toLowerCase()].Address)),i)try{let t;const i=o.getValueAtAddress(r,e);if("function"==typeof i){let s=null;e.includes(".")&&(s=o.getValueAtAddress(r,e.split(".").slice(0,-1).join(".")));let a=r.ExpressionStep.LeftValue.Value;a=a instanceof n?a.values:[a],t=i.apply(s,a)}o.setValueAtAddress(s.VirtualSymbols,r.ExpressionStep.VirtualSymbolName,t),s.LastResult=o.getValueAtAddress(s.VirtualSymbols,r.ExpressionStep.VirtualSymbolName)}catch(e){return s.ExpressionParserLog.push("ERROR: ExpressionParser.solvePostfixedExpression failed to solve step ".concat(t," with function ").concat(r.ExpressionStep.Operation.Token,": ").concat(e)),this.log.error(s.ExpressionParserLog[s.ExpressionParserLog.length-1],{Stack:e.stack}),!1}else try{o.setValueAtAddress(s.VirtualSymbols,r.ExpressionStep.VirtualSymbolName,o.getValueAtAddress(r,"".concat(e,"(ExpressionStep.LeftValue.Value,ExpressionStep.RightValue.Value)"))),s.LastResult=o.getValueAtAddress(s.VirtualSymbols,r.ExpressionStep.VirtualSymbolName)}catch(e){return s.ExpressionParserLog.push("ERROR: ExpressionParser.solvePostfixedExpression failed to solve step ".concat(t," with function ").concat(r.ExpressionStep.Operation.Token,": ").concat(e)),this.log.error(s.ExpressionParserLog[s.ExpressionParserLog.length-1],{Stack:e.stack}),!1}s.SolverFinalVirtualSymbol=r.ExpressionStep.VirtualSymbolName}}let l=o.getValueAtAddress(s,"VirtualSymbols.".concat(s.SolverFinalVirtualSymbol));for(let t=0;t<e.length;t++)"Token.SolverMarshal"===e[t].RightValue.Type&&(o.setValueAtAddress(s.VirtualSymbols,e[t].VirtualSymbolName,l),e[t].Operation.Descriptor.OnlyEmpty?this.fable.Utility.addressIsNullOrEmpty(a,e[t].VirtualSymbolName)&&o.setValueByHash(a,e[t].VirtualSymbolName,l):o.setValueByHash(a,e[t].VirtualSymbolName,l));return s.RawResult=l,c||delete s.fable,"object"==typeof l?l:void 0!==l?l.toString():l}}},{"../Fable-SetConcatArray.js":101,"./Fable-Service-ExpressionParser-Base.js":77}],85:[function(e,t,r){t.exports={"=":{Name:"Assign Value",Token:"=",Function:"fable.Math.assignValue",Precedence:0,Type:"Assignment"},":":{Name:"Expression Begin",Token:":",Function:"fable.Math.expressionBegin",Precedence:0,Type:"Assignment"},"?=":{Name:"Null or Empty Coalescing Assign Value",Token:"?=",Function:"fable.Math.assignValue",OnlyEmpty:!0,Precedence:0,Type:"Assignment"},"(":{Name:"Left Parenthesis",Token:"(",Precedence:0,Type:"Parenthesis"},")":{Name:"Right Parenthesis",Token:")",Precedence:0,Type:"Parenthesis"},",":{Name:"Set Concatenate",Token:",",Function:"fable.Math.setConcatenate",Precedence:5,Type:"Operator"},"*":{Name:"Multiply",Token:"*",Function:"fable.Math.multiplyPrecise",Precedence:3,Type:"Operator"},"/":{Name:"Divide",Token:"/",Function:"fable.Math.dividePrecise",Precedence:3,Type:"Operator"},"^":{Name:"Exponent",Token:"^",Function:"fable.Math.powerPrecise",Precedence:2,Type:"Operator"},"%":{Name:"Modulus",Token:"%",Function:"fable.Math.modPrecise",Precedence:3,Type:"Operator"},"+":{Name:"Add",Token:"+",Function:"fable.Math.addPrecise",Precedence:4,Type:"Operator"},"-":{Name:"Subtract",Token:"-",Function:"fable.Math.subtractPrecise",Precedence:4,Type:"Operator"}}},{}],86:[function(e,t,r){const i=e("./Fable-Service-ExpressionParser-Base.js");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParser-ValueMarshal"}substituteValuesInTokenizedObjects(e,t,r,i){let n="object"==typeof r?r:{ExpressionParserLog:[]};if(!Array.isArray(e))return n.ExpressionParserLog.push("ERROR: ExpressionParser.substituteValuesInTokenizedObjects was passed a non-array tokenized object list."),this.log.error(n.ExpressionParserLog[n.ExpressionParserLog.length-1]),e;if("object"!=typeof t)return n.ExpressionParserLog.push("ERROR: ExpressionParser.substituteValuesInTokenizedObjects either was passed no data source, or was passed a non-object data source."),this.log.error(n.ExpressionParserLog[n.ExpressionParserLog.length-1]),e;let s=t,o="object"==typeof i?i:this.fable.newManyfest(i);for(let t=0;t<e.length;t++){if("object"!=typeof e[t]){n.ExpressionParserLog.push("WARNING: ExpressionParser.substituteValuesInTokenizedObjects found a non-object tokenized object at index ".concat(t)),this.log.warn(n.ExpressionParserLog[n.ExpressionParserLog.length-1]);continue}let r=e[t];if("Token.Symbol"===e[t].Type&&!r.Resolved){let e=o.getValueByHash(s,r.Token);if(null==e){r.Value=e,r.Resolve=!0,n.ExpressionParserLog.push("WARNING: ExpressionParser.substituteValuesInTokenizedObjects found no value for the symbol hash or address ".concat(r.Token," at index ").concat(t)),this.LogNoisiness>1&&this.log.warn(n.ExpressionParserLog[n.ExpressionParserLog.length-1]);continue}if(n.ExpressionParserLog.push("INFO: ExpressionParser.substituteValuesInTokenizedObjects found a value [".concat(e,"] for the state address ").concat(r.Token," at index ").concat(t)),this.LogNoisiness>1&&this.log.info(n.ExpressionParserLog[n.ExpressionParserLog.length-1]),"object"==typeof e)r.Resolved=!0,r.Value=e;else try{const t=new this.fable.Utility.bigNumber(e);r.Resolved=!0,r.Value=t.toString()}catch(i){r.Resolved=!0,r.Value=e,n.ExpressionParserLog.push("INFO: ExpressionParser.substituteValuesInTokenizedObjects found a non-numeric value for the state address ".concat(r.Token," at index ").concat(t,"; using raw value."))}}if("Token.StateAddress"===e[t].Type&&!r.Resolved){let e=r.Token;e.startsWith("{")&&e.endsWith("}")&&(e=e.substring(1,e.length-1));let i=o.getValueAtAddress(s,e);if(null==i){n.ExpressionParserLog.push("WARNING: ExpressionParser.substituteValuesInTokenizedObjects found no value for the state address ".concat(r.Token," at index ").concat(t));continue}try{let e=new this.fable.Utility.bigNumber(i);r.Resolved=!0,r.Value=e.toString()}catch(e){r.Resolved=!0,r.Value=i,n.ExpressionParserLog.push("INFO: ExpressionParser.substituteValuesInTokenizedObjects found a non-numeric value for the state address ".concat(r.Token," at index ").concat(t,"; using raw value."))}}if("Token.String"!==e[t].Type||r.Resolved||(n.ExpressionParserLog.push("INFO: ExpressionParser.substituteValuesInTokenizedObjects found a value [".concat(r.Token,"] for the string ").concat(r.Token," at index ").concat(t)),this.LogNoisiness>1&&this.log.info(n.ExpressionParserLog[n.ExpressionParserLog.length-1]),r.Resolved=!0,r.Value=r.Token.substring(1,r.Token.length-1)),"Token.Constant"===e[t].Type&&!r.Resolved){n.ExpressionParserLog.push("INFO: ExpressionParser.substituteValuesInTokenizedObjects found a value [".concat(r.Token,"] for the constant ").concat(r.Token," at index ").concat(t)),this.LogNoisiness>1&&this.log.info(n.ExpressionParserLog[n.ExpressionParserLog.length-1]);try{let e=new this.fable.Utility.bigNumber(r.Token);r.Resolved=!0,r.Value=e.toString()}catch(e){n.ExpressionParserLog.push("ERROR: ExpressionParser.substituteValuesInTokenizedObjects found a non-numeric value for the state address ".concat(r.Token," at index ").concat(t)),r.Resolved=!1}}}return e}}},{"./Fable-Service-ExpressionParser-Base.js":77}],87:[function(e,t,r){(function(r){(function(){const i=e("fable-serviceproviderbase"),n=e("fs"),s=e("path"),o=e("readline");t.exports=class extends i{constructor(e,t,i){super(e,t,i),this.serviceType="FilePersistence","Mode"in this.options||(this.options.Mode=parseInt("0777",8)&~r.umask()),this.libFS=n,this.libPath=s,this.libReadline=o}joinPath(){return s.resolve(...arguments)}resolvePath(){return s.resolve(...arguments)}existsSync(e){return n.existsSync(e)}exists(e,t){return t(null,this.existsSync(e))}deleteFileSync(e){return n.unlinkSync(e)}deleteFolderSync(e){return n.rmdirSync(e)}readFileSync(e,t){let r=void 0===t?"utf8":t;return n.readFileSync(e,r)}readFile(e,t,r){let i=void 0===t?"utf8":t;return n.readFile(e,i,r)}readFileCSV(e,t,r,i,n){let s=this.fable.instantiateServiceProviderWithoutRegistration("CSVParser",t),o="function"==typeof r?r:e=>{this.fable.log.trace("CSV Reader received line ".concat(e))},a="function"==typeof i?i:()=>{this.fable.log.info("CSV Read of ".concat(e," complete."))},c="function"==typeof n?n:t=>{this.fable.log.error("CSV Read of ".concat(e," Error: ").concat(t),t)};return this.lineReaderFactory(e,e=>{let t=s.parseCSVLine(e);t&&o(t,e)},a,c)}appendFileSync(e,t,r){let i=void 0===r?"utf8":r;return n.appendFileSync(e,t,i)}writeFileSync(e,t,r){let i=void 0===r?"utf8":r;return n.writeFileSync(e,t,i)}writeFileSyncFromObject(e,t){return this.writeFileSync(e,JSON.stringify(t,null,4))}writeFileSyncFromArray(e,t){if(!Array.isArray(t))return this.log.error("File Persistence Service attempted to write ".concat(e," from array but the expected array was not an array (it was a ").concat(typeof t,").")),Error("Attempted to write ${pFileName} from array but the expected array was not an array (it was a ${typeof(pFileArray)}).");for(let r=0;r<t.length;r++)return this.appendFileSync(e,"".concat(t[r],"\n"))}writeFile(e,t,r,i){let s=void 0===r?"utf8":r;return n.writeFile(e,t,s,i)}lineReaderFactory(e,t,r,i){let s={};return"string"==typeof e&&(s.filePath=e,s.fileStream=n.createReadStream(s.filePath),s.reader=o.createInterface({input:s.fileStream,crlfDelay:1/0}),"function"==typeof i&&s.reader.on("error",i),s.reader.on("line","function"==typeof t?t:()=>{}),"function"==typeof r&&s.reader.on("close",r),s)}makeFolderRecursive(e,t){let r=e;if("string"==typeof e)r={Path:e};else if("object"!=typeof e)return t(new Error("Parameters object or string not properly passed to recursive folder create.")),!1;return"string"!=typeof r.Path?(t(new Error("Parameters object needs a path to run the folder create operation.")),!1):("Mode"in r||(r.Mode=this.options.Mode),void 0===r.CurrentPathIndex?(r.ActualPath=s.normalize(r.Path),r.ActualPathParts=r.ActualPath.split(s.sep),r.CurrentPathIndex=0,r.CurrentPath=""):(r.CurrentPath==s.sep?r.CurrentPath=r.CurrentPath+r.ActualPathParts[r.CurrentPathIndex]:r.CurrentPath=r.CurrentPath+s.sep+r.ActualPathParts[r.CurrentPathIndex],r.CurrentPathIndex++),r.CurrentPathIndex>=r.ActualPathParts.length?t(null):void n.open(r.CurrentPath+s.sep+r.ActualPathParts[r.CurrentPathIndex],"r",(e,i)=>{if(i&&n.closeSync(i),!e||"ENOENT"!=e.code)return this.makeFolderRecursive(r,t);n.mkdir(r.CurrentPath+s.sep+r.ActualPathParts[r.CurrentPathIndex],r.Mode,e=>e?"EEXIST"==e.code?this.makeFolderRecursive(r,t):(console.log(e.code),t(e)):this.makeFolderRecursive(r,t))}))}}}).call(this)}).call(this,e("_process"))},{_process:150,"fable-serviceproviderbase":59,fs:19,path:138,readline:19}],88:[function(e,t,r){const i=e("fable-serviceproviderbase");t.exports=class extends i{constructor(e,t,r){super(e,t,r)}checkIf(e,t,r,i,n){let s=this.fable.Math.parsePrecise(e,null),o=this.fable.Math.parsePrecise(r,null),a=!1;if(null===s||null===o)switch(void 0===n&&(n=""),t){case"<":case"LT":a=e<r;break;case"<=":case"LTE":a=e<=r;break;case">":case"GT":a=e>r;break;case">=":case"GTE":a=e>=r;break;case"==":a=e==r;break;case"===":a=e===r;break;default:this.fable.log.warn("[FableServiceLogic.checkIf] Invalid comparison operator: ".concat(t)),a=e==r}else switch(void 0===n&&(n="0"),t){case"<":case"LT":a=this.fable.Math.ltPrecise(s,o);break;case"<=":case"LTE":a=this.fable.Math.ltePrecise(s,o);break;case">":case"GT":a=this.fable.Math.gtPrecise(s,o);break;case">=":case"GTE":a=this.fable.Math.gtePrecise(s,o);break;case"==":a=0==this.fable.Math.comparePreciseWithin(s,o,"0.000001");break;case"===":a=0==this.fable.Math.comparePrecise(s,o);break;default:this.fable.log.warn("[FableServiceLogic.checkIf] Invalid comparison operator: ".concat(t)),a=e==r?i:n}return a?i:n}when(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e?Array.isArray(e)&&e.length<1||"object"==typeof e&&Object.keys(e).length<1?r:t:r}}},{"fable-serviceproviderbase":59}],89:[function(e,t,r){const i=e("fable-serviceproviderbase"),n=e("./Fable-SetConcatArray.js");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.serviceType="Math",this.pi="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679",this.euler="2.7182818284590452353602874713526624977572470936999595749669676277240766303535475945713821785251664",this.errorReturnValue=NaN,this.bigNumber=this.fable.Utility.bigNumber,this.ln2Cache=new Map}get roundDown(){return this.bigNumber.roundDown}get roundHalfUp(){return this.bigNumber.roundHalfUp}get roundHalfEven(){return this.bigNumber.roundHalfEven}get roundUp(){return this.bigNumber.roundUp}parsePrecise(e,t){let r;try{r=new this.bigNumber(e)}catch(e){r=void 0===t?"0.0":t}return r?r.toString():r}assignValue(e){return e}expressionBegin(e){return e}percentagePrecise(e,t){let r=isNaN(e)?0:e,i=isNaN(t)?0:t;if(0==i)return"0";let n=new this.bigNumber(r).div(i);return n=n.times(100),n.toString()}setConcatenate(e,t){return new n(e,t)}roundPrecise(e,t,r){let i=!1===e||isNaN(e)?0:e,n=isNaN(t)?0:parseInt(t,10),s=void 0===r?this.roundHalfUp:parseInt(r,10);try{return new this.bigNumber(i).round(n,s).toString()}catch(e){return this.errorReturnValue}}toFixedPrecise(e,t,r){let i=!1===e||isNaN(e)?0:e,n=isNaN(t)?0:parseInt(t,10),s=void 0===r?this.roundHalfUp:r;try{return new this.bigNumber(i).toFixed(n,s).toString()}catch(e){return this.errorReturnValue}}addPrecise(e,t){let r=isNaN(e)?0:e,i=isNaN(t)?0:t;return new this.bigNumber(r).plus(i).toString()}subtractPrecise(e,t){let r=isNaN(e)?0:e,i=isNaN(t)?0:t;return new this.bigNumber(r).minus(i).toString()}powerPrecise(e,t){let r,i=isNaN(e)?0:e,n=isNaN(t)?0:parseInt(t);if(n==Number(t)){r=new this.bigNumber(i).pow(n)}else r=Math.pow(i,Number(t));return r.toString()}multiplyPrecise(e,t){let r=isNaN(e)?0:e,i=isNaN(t)?0:t;return new this.bigNumber(r).times(i).toString()}dividePrecise(e,t){let r=isNaN(e)?0:e,i=isNaN(t)?0:t;return new this.bigNumber(r).div(i).toString()}modPrecise(e,t){let r=isNaN(e)?0:e,i=isNaN(t)?0:t;return new this.bigNumber(r).mod(i).toString()}sqrtPrecise(e){let t=isNaN(e)?0:e;return new this.bigNumber(t).sqrt().toString()}absPrecise(e){let t=isNaN(e)?0:e;return new this.bigNumber(t).abs().toString()}floorPrecise(e){let t=isNaN(e)?0:e;return Math.floor(t).toString()}ceilPrecise(e){let t=isNaN(e)?0:e;return Math.ceil(t).toString()}comparePrecise(e,t){let r=isNaN(e)?0:e,i=isNaN(t)?0:t;return new this.bigNumber(r).cmp(i)}comparePreciseWithin(e,t,r){let i=isNaN(e)?0:e,n=isNaN(t)?0:t,s=new this.bigNumber(i);return s.minus(n).abs().lte(r)?0:s.lt(n)?-1:1}gtPrecise(e,t){let r=isNaN(e)?0:e,i=isNaN(t)?0:t;return new this.bigNumber(r).gt(i)}gtePrecise(e,t){let r=isNaN(e)?0:e,i=isNaN(t)?0:t;return new this.bigNumber(r).gte(i)}ltPrecise(e,t){let r=isNaN(e)?0:e,i=isNaN(t)?0:t;return new this.bigNumber(r).lt(i)}ltePrecise(e,t){let r=isNaN(e)?0:e,i=isNaN(t)?0:t;return new this.bigNumber(r).lte(i)}radPrecise(e){let t=isNaN(e)?0:e;return new this.bigNumber(t).times(Math.PI).div(180).toString()}piPrecise(e){return void 0===e?this.pi:this.roundPrecise(this.pi,e)}eulerPrecise(e){return void 0===e?this.euler:this.roundPrecise(this.euler,e)}sin(e){let t=isNaN(e)?0:e;return Math.sin(t)}cos(e){let t=isNaN(e)?0:e;return Math.cos(t)}tan(e){let t=isNaN(e)?0:e;return Math.tan(t)}countSetElements(e){return Array.isArray(e)?e.length:"object"==typeof e?Object.keys(e).length:e?1:0}sortSetPrecise(e){let t=[];if(Array.isArray(e))for(let r=0;r<e.length;r++)t.push(this.parsePrecise(e[r],NaN));else if("object"==typeof e){let r=Object.keys(e);for(let i=0;i<r.length;i++)t.push(this.parsePrecise(e[r[i]],NaN))}return t.sort((e,t)=>this.comparePrecise(e,t)),t}bucketSetPrecise(e,t){let r={},i=this.parsePrecise(t,NaN);if(Array.isArray(e))for(let t=0;t<e.length;t++){let n=this.parsePrecise(e[t],NaN).toString();isNaN(i)||(n=this.dividePrecise(e[t],i)),n in r||(r[n]=0),r[n]=r[n]+1}else if("object"==typeof e){let t=Object.keys(e);for(let n=0;n<t.length;n++){let s=this.parsePrecise(e[t[n]],NaN).toString();isNaN(i)||(s=this.dividePrecise(e[n],i)),s in r||(r[s]=0),r[s]=r[s]+1}}return r}histogramPrecise(e){return this.bucketSetPrecise(e)}sortHistogramPrecise(e){let t={},r=Object.keys(e);r.sort((t,r)=>e[t]-e[r]);for(let i=0;i<r.length;i++)t[r[i]]=e[r[i]];return t}sortHistogramByKeys(e,t){let r={},i=Object.keys(e),n=void 0!==t&&t;i.sort(),n&&(i=i.reverse());for(let t=0;t<i.length;t++)r[i[t]]=e[i[t]];return r}cleanValueArray(e,t){let r=void 0!==t&&t;if(!Array.isArray(e))return[];let i=[];for(let t=0;t<e.length;t++){let n=this.parsePrecise(e[t],NaN);isNaN(n)||r&&"0"==n||i.push(n)}return i}arbitraryNaturalLogOfTwo(e){const t=0|e,r=new this.bigNumber(t);if(this.ln2Cache.has(t))return this.ln2Cache.get(t);const i=new this.bigNumber(2),n=i.minus(1).div(i.plus(1)),s=n.mul(n);let o=new this.bigNumber(0),a=n,c=1;const l=this.powerPrecise(10,-r.add(8));for(let e=0;e<2e5&&(o=o.plus(a.div(c)),a=a.mul(s),c+=2,!a.abs().div(c).lt(l));e++);const h=o.mul(2);return this.ln2Cache.set(t,h),h}arbitraryNaturalLog(e,t){let r=new this.bigNumber(e),i=new this.bigNumber(t);if(r.lte(0))throw new Error("ln undefined for non-positive values.");if(r.eq(1))return new this.bigNumber(0);const n=new this.bigNumber(2);let s=0,o=r;const a=new this.bigNumber("1.5"),c=new this.bigNumber("0.75");for(;o.gt(a);)o=o.div(n),s+=1;for(;o.lt(c);)o=o.mul(n),s-=1;const l=o.minus(1).div(o.plus(1)),h=l.mul(l);let u=new this.bigNumber(0),p=l,d=1;const f=this.powerPrecise(10,-i.add(6));for(let e=0;e<2e5&&(u=u.plus(p.div(d)),p=p.mul(h),d+=2,!p.abs().div(d).lt(f));e++);const g=u.mul(2),m=this.arbitraryNaturalLogOfTwo(i);return g.plus(m.mul(s))}logPrecise(e,t,r){let i=void 0===t?this.bigNumber(10):this.bigNumber(t);const n=void 0===r?9:r,s=n+8,o=this.bigNumber.DP,a=this.bigNumber.RM;this.bigNumber.DP=s,this.bigNumber.RM=1;const c=this.bigNumber(e),l=this.bigNumber(i);if(c.lte(0))return this.log.error("Fable logPrecise Error: Number must be greater than 0; number was ".concat(e,".")),NaN;if(l.lte(0)||l.eq(1))return this.log.error("Fable logPrecise Error: Base must be greater than 0 and not equal to 1 -- base ".concat(Base," was passed in.")),NaN;const h=this.arbitraryNaturalLog(c,n),u=this.arbitraryNaturalLog(l,n);let p=h.div(u).toFixed(n);return this.bigNumber.DP=o,this.bigNumber.RM=a,p}expPrecise(e,t){let r=isNaN(e)?this.bigNumber(1):this.bigNumber(e);const i=void 0===t?9:parseInt(t,10),n=this.bigNumber.DP;this.bigNumber.DP=i+10;const s=new this.bigNumber("0.693147180559945309417232121458176568"),o=new this.bigNumber("709.782712893384"),a=new this.bigNumber("-744.4400719213812");if(r.gt(o))return this.bigNumber.DP=n,NaN;if(r.lt(a))return this.bigNumber.DP=n,new this.bigNumber(0);let c;try{c=r.div(s).round(0,0)}catch(t){return this.log.error("Fable expPrecise Error: Rounding error during range reduction for value of ".concat(e,". Error: ").concat(t)),this.bigNumber.DP=n,NaN}const l=r.minus(c.times(s)),h=new this.bigNumber(10).pow(-(i+2));let u=new this.bigNumber(1),p=new this.bigNumber(1),d=1;for(;u=u.times(l).div(d),!u.abs().lt(h);)if(p=p.plus(u),d++,d>2e3){this.log.warn("Fable expPrecise warning: Taylor series failed to converge after 2000 iterations for value of ".concat(e,"."));break}const f=new this.bigNumber(2),g=c.abs().toNumber();let m=0===g?new this.bigNumber(1):f.pow(g);const y=c.gte(0)?p.times(m):p.div(m);return this.bigNumber.DP=n,y.round(i).toString()}cleanValueObject(e){if("object"!=typeof e)return{};let t={},r=Object.keys(e);for(let i=0;i<r.length;i++){let n=this.parsePrecise(e[r[i]],NaN);isNaN(n)||(t[r[i]]=n)}return t}histogramDistributionByExactValue(e,t,r){if(!Array.isArray(e))return e;if(!t)return{};let i={};for(let n=0;n<e.length;n++){let s=this.fable.Utility.getValueByHash(e[n],t,r).toString();s in i||(i[s]=0),i[s]=i[s]+1}return i}histogramDistributionByExactValueFromInternalState(e,t){if(!e)return{};let r=this.fable.Utility.getInternalValueByHash(e);return this.histogramDistributionByExactValue(r,t)}histogramAggregationByExactValue(e,t,r,i){if(!Array.isArray(e))return e;if(!t||!r)return{};let n={};for(let s=0;s<e.length;s++){let o=this.fable.Utility.getValueByHash(e[s],t,i);if(void 0===typeof o)continue;let a=this.parsePrecise(this.fable.Utility.getValueByHash(e[s],r,i),NaN);o in n||(n[o]=0),isNaN(a)||(n[o]=this.addPrecise(n[o],a))}return n}histogramAggregationByExactValueFromInternalState(e,t,r){if(!e)return{};let i=this.fable.Utility.getInternalValueByHash(e);return this.histogramAggregationByExactValue(i,t,r)}entryInSet(e,t,r){const i="number"==typeof r?r:parseInt(r);if(!Array.isArray(e))return e;if(!t)return!1;if(isNaN(i)||i>=e.length)return!1;let n=e.toSorted((e,r)=>this.comparePrecise(e[t],r[t]));return n[i<0?n.length+i:i]}smallestInSet(e,t){return this.entryInSet(e,t,0)}largestInSet(e,t){return this.entryInSet(e,t,-1)}cumulativeSummation(e,t,r,i){return this.iterativeSeries(e,t,r,"1.0","add","0.0",!0,i)}subtractingSummation(e,t,r,i,n){let s=!0;return null==i&&(s=!1),this.iterativeSeries(e,t,r,"1.0","subtract",i,s,n)}iterativeSeries(e,t,r,i,n,s,o,a){if(!Array.isArray(e))return e;if(!t||!r)return e;let c,l,h=void 0!==o&&o;i&&""!==i&&(c=this.parsePrecise(i)),isNaN(c)&&(c=this.parsePrecise("1.0")),(s||""!==s)&&(l=this.parsePrecise(s)),(isNaN(l)||null==s)&&(l="");for(let i=0;i<e.length;i++){let s=this.parsePrecise(this.fable.Utility.getValueByHash(e[i],t,a)),o=!1;if(""===l&&s&&!isNaN(l)&&(l=s,o=!0),isNaN(s))this.fable.Utility.setValueByHash(e[i],r,l,a);else{if(s=this.multiplyPrecise(s,c),!o||h)switch(n){case"+":case"add":case"plus":case"addition":l=this.addPrecise(l,s);break;case"-":case"sub":case"minus":case"subtract":l=this.subtractPrecise(l,s);break;case"*":case"mul":case"times":case"multiply":l=this.multiplyPrecise(l,s);break;case"-":case"div":case"over":case"divide":l=this.dividePrecise(l,s)}this.fable.Utility.setValueByHash(e[i],r,l,a)}}return e}maxPrecise(e){let t=NaN;if(Array.isArray(e))for(let r=0;r<e.length;r++)if(t){let i=this.parsePrecise(e[r],NaN);this.gtPrecise(i,t)&&(t=i)}else t=this.parsePrecise(e[r],NaN);else if("object"==typeof e){let r=Object.keys(e);for(let i=0;i<r.length;i++)if(t){let n=this.parsePrecise(e[r[i]],NaN);this.gtPrecise(n,t)&&(t=n)}else t=this.parsePrecise(e[r[i]],NaN)}return t}minPrecise(e){let t=NaN;if(Array.isArray(e))for(let r=0;r<e.length;r++)if(t){let i=this.parsePrecise(e[r],NaN);!isNaN(i)&&this.ltPrecise(i,t)&&(t=i)}else t=this.parsePrecise(e[r],NaN);else if("object"==typeof e){let r=Object.keys(e);for(let i=0;i<r.length;i++)if(t){let n=this.parsePrecise(e[r[i]],NaN);!isNaN(n)&&this.ltPrecise(n,t)&&(t=n)}else t=this.parsePrecise(e[r[i]],NaN)}return t}sumPrecise(e){let t="0.0";if(Array.isArray(e))for(let r=0;r<e.length;r++){let i=this.parsePrecise(e[r],NaN);isNaN(i)||(t=this.addPrecise(t,i))}else if("object"==typeof e){let r=Object.keys(e);for(let i=0;i<r.length;i++){let n=this.parsePrecise(e[r[i]],NaN);isNaN(n)||(t=this.addPrecise(t,n))}}return t}meanPrecise(e){let t=this.sumPrecise(e),r=this.countSetElements(e);return 0==r?"0.0":this.dividePrecise(t,r)}averagePrecise(e){return this.meanPrecise(e)}medianPrecise(e){let t=this.countSetElements(e);if(0==t)return"0.0";let r=this.sortSetPrecise(e),i=Math.floor(t/2);if(t%2==1)return r[i];{let e=r[i-1],t=r[i];return this.dividePrecise(this.addPrecise(e,t),2)}}modePrecise(e){let t=this.bucketSetPrecise(e),r=0,i=Object.keys(t),n=[];for(let e=0;e<i.length;e++)t[i[e]]>r?(r=t[i[e]],n=[i[e]]):t[i[e]]==r&&n.push(i[e]);return n}variancePrecise(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e;Array.isArray(r)||"object"!=typeof r||(r=Object.keys(r).map(e=>r[e]));const i=this.meanPrecise(r),n=r.reduce((e,t)=>{const r=this.subtractPrecise(t,i),n=this.multiplyPrecise(r,r);return this.addPrecise(e,n)},"0.0");return this.dividePrecise(n,t?r.length:r.length-1)}populationVariancePrecise(e){return this.variancePrecise(e,!0)}standardDeviationPrecise(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.sqrtPrecise(this.variancePrecise(e,t))}populationStandardDeviationPrecise(e){return this.standardDeviationPrecise(e,!0)}polynomialRegression(e,t){const r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,i=[],n=t;for(let t=0;t<e.length;++t){const n=[];for(let i=0;i<=r;i++)n.push(this.powerPrecise(e[t],i));i.push(n)}const s=this.matrixTranspose(i),o=this.matrixMultiply(s,i),a=this.matrixMultiply(s,n.map(e=>[e])),c=this.matrixInverse(o);return this.matrixMultiply(c,a).map(e=>e[0])}leastSquares(e,t){const r=Array.isArray(e)?Array.isArray(e[0])?this.matrixTranspose(e):e.map(e=>[e]):[[e]],i=Array.isArray(t)?t:[t];if(1===r.length)return[i[0],"0.0"];const n=r.map(e=>[1,...e]),s=this.matrixTranspose(n),o=this.matrixMultiply(s,n),a=this.matrixVectorMultiply(s,i);return this.gaussianElimination(o,a)}matrixTranspose(e){return e[0].map((t,r)=>e.map(e=>e[r]))}matrixMultiply(e,t){const r=Array(e.length).fill(0).map(()=>Array(t[0].length).fill(0));for(let i=0;i<e.length;++i)for(let n=0;n<t[0].length;++n)for(let s=0;s<t.length;++s)r[i][n]=this.addPrecise(r[i][n],this.multiplyPrecise(e[i][s],t[s][n]));return r}matrixVectorMultiply(e,t){const r=Array(e.length).fill(0);for(let i=0;i<e.length;++i)for(let n=0;n<e[0].length;++n)r[i]=this.addPrecise(r[i],this.multiplyPrecise(e[i][n],t[n]));return r}matrixInverse(e){const t=e.length,r=e.map((e,t)=>e.map((e,r)=>t===r?1:0)),i=e.map((e,t)=>e.concat(r[t]));for(let e=0;e<t;++e){let r=e;for(let n=e+1;n<t;++n)this.gtPrecise(this.absPrecise(i[n][e]),this.absPrecise(i[r][e]))&&(r=n);[i[e],i[r]]=[i[r],i[e]];const n=i[e][e];for(let r=0;r<2*t;++r)i[e][r]=this.dividePrecise(i[e][r],n);for(let r=0;r<t;++r){if(r===e)continue;const n=i[r][e];for(let s=0;s<2*t;++s)i[r][s]=this.subtractPrecise(i[r][s],this.multiplyPrecise(n,i[e][s]))}}return i.map(e=>e.slice(t))}gaussianElimination(e,t){const r=e.length,i=e.map((e,r)=>[...e,t[r]]);for(let e=0;e<r;++e){let t=e;for(let n=e+1;n<r;++n)this.gtPrecise(this.absPrecise(i[n][e]),this.absPrecise(i[t][e]))&&(t=n);const n=i[e];i[e]=i[t],i[t]=n;const s=i[e][e];if(0==this.comparePrecise(s,0))throw new Error("Matrix not invertible");for(let t=e;t<=r;++t)i[e][t]=this.dividePrecise(i[e][t],s);for(let t=0;t<r;++t){if(t===e)continue;const n=i[t][e];for(let s=e;s<=r;++s)i[t][s]=this.subtractPrecise(i[t][s],this.multiplyPrecise(n,i[e][s]))}}return i.map(e=>e[r])}generateValueFromEasingDescription(e){e.Easing;{let t=e.DomainLength;if(0==this.comparePrecise(t,0))return this.parsePrecise(e.DomainRangeStart);let r=Math.random(),i=this.multiplyPrecise(r,t);return this.addPrecise(e.DomainRangeStart,i)}}predictFromRegressionModel(e,t){let r=t;return Array.isArray(t)||(r=[t]),e.slice(1).reduce((e,t,i)=>this.addPrecise(e,this.multiplyPrecise(t,r[i])),e[0])}bezierPoint(e,t,r,i,n){let s=this.parsePrecise(n,0),o=this.subtractPrecise(1,s),a=this.multiplyPrecise(this.powerPrecise(o,3),e),c=this.multiplyPrecise(this.multiplyPrecise(this.multiplyPrecise(3,this.powerPrecise(o,2)),s),t),l=this.multiplyPrecise(this.multiplyPrecise(this.multiplyPrecise(3,o),this.powerPrecise(s,2)),r),h=this.multiplyPrecise(this.powerPrecise(s,3),i);return this.addPrecise(this.addPrecise(a,c),this.addPrecise(l,h))}bezierCurveFit(e,t){if(!Array.isArray(e)||!Array.isArray(t))return this.log.warn("bezierCurveFit: pXValues and pYValues must be arrays"),[[0,0],[0,0],[0,0],[0,0]];let r=Math.min(e.length,t.length);if(r<2)return this.log.warn("bezierCurveFit: need at least 2 data points"),[[0,0],[0,0],[0,0],[0,0]];let i=this.parsePrecise(e[0],0),n=this.parsePrecise(t[0],0),s=this.parsePrecise(e[r-1],0),o=this.parsePrecise(t[r-1],0);if(2===r){let e=this.addPrecise(i,this.dividePrecise(this.subtractPrecise(s,i),3)),t=this.addPrecise(n,this.dividePrecise(this.subtractPrecise(o,n),3)),r=this.addPrecise(i,this.multiplyPrecise(this.dividePrecise(this.subtractPrecise(s,i),3),2)),a=this.addPrecise(n,this.multiplyPrecise(this.dividePrecise(this.subtractPrecise(o,n),3),2));return[[i.toString(),n.toString()],[e.toString(),t.toString()],[r.toString(),a.toString()],[s.toString(),o.toString()]]}let a=[0];for(let i=1;i<r;i++){let r=this.subtractPrecise(e[i],e[i-1]),n=this.subtractPrecise(t[i],t[i-1]),s=this.sqrtPrecise(this.addPrecise(this.multiplyPrecise(r,r),this.multiplyPrecise(n,n)));a.push(this.addPrecise(a[i-1],s))}let c=a[r-1],l=[];for(let e=0;e<r;e++)0==this.comparePrecise(c,0)?l.push(this.dividePrecise(e,r-1)):l.push(this.dividePrecise(a[e],c));let h=0,u=0,p=0,d=0,f=0,g=0,m=0;for(let a=0;a<r;a++){let r=l[a],c=this.subtractPrecise(1,r),y=this.multiplyPrecise(this.multiplyPrecise(3,this.powerPrecise(c,2)),r),b=this.multiplyPrecise(this.multiplyPrecise(3,c),this.powerPrecise(r,2));h=this.addPrecise(h,this.multiplyPrecise(y,y)),u=this.addPrecise(u,this.multiplyPrecise(y,b)),p=this.addPrecise(p,this.multiplyPrecise(b,b));let v=this.powerPrecise(c,3),T=this.powerPrecise(r,3),P=this.subtractPrecise(this.subtractPrecise(e[a],this.multiplyPrecise(v,i)),this.multiplyPrecise(T,s)),S=this.subtractPrecise(this.subtractPrecise(t[a],this.multiplyPrecise(v,n)),this.multiplyPrecise(T,o));d=this.addPrecise(d,this.multiplyPrecise(y,P)),f=this.addPrecise(f,this.multiplyPrecise(b,P)),g=this.addPrecise(g,this.multiplyPrecise(y,S)),m=this.addPrecise(m,this.multiplyPrecise(b,S))}let y,b,v,T,P=this.subtractPrecise(this.multiplyPrecise(h,p),this.multiplyPrecise(u,u));return this.comparePrecise(this.absPrecise(P),"1e-20")<0?(y=this.addPrecise(i,this.dividePrecise(this.subtractPrecise(s,i),3)),b=this.addPrecise(n,this.dividePrecise(this.subtractPrecise(o,n),3)),v=this.addPrecise(i,this.multiplyPrecise(this.dividePrecise(this.subtractPrecise(s,i),3),2)),T=this.addPrecise(n,this.multiplyPrecise(this.dividePrecise(this.subtractPrecise(o,n),3),2))):(y=this.dividePrecise(this.subtractPrecise(this.multiplyPrecise(p,d),this.multiplyPrecise(u,f)),P),b=this.dividePrecise(this.subtractPrecise(this.multiplyPrecise(p,g),this.multiplyPrecise(u,m)),P),v=this.dividePrecise(this.subtractPrecise(this.multiplyPrecise(h,f),this.multiplyPrecise(u,d)),P),T=this.dividePrecise(this.subtractPrecise(this.multiplyPrecise(h,m),this.multiplyPrecise(u,g)),P)),[[i.toString(),n.toString()],[y.toString(),b.toString()],[v.toString(),T.toString()],[s.toString(),o.toString()]]}}},{"./Fable-SetConcatArray.js":101,"fable-serviceproviderbase":59}],90:[function(e,t,r){const i=e("fable-serviceproviderbase"),n=e("./Fable-Service-MetaTemplate/MetaTemplate-WordTree.js"),s=e("./Fable-Service-MetaTemplate/MetaTemplate-StringParser.js");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.serviceType="MetaTemplate",this.WordTree=new n,this.StringParser=new s(this.fable),this.ParseTree=this.WordTree.ParseTree}addPattern(e,t,r,i){return this.WordTree.addPattern(e,t,r,i)}addPatternBoth(e,t,r,i,n){return this.WordTree.addPatternBoth(e,t,r,i,n)}parseString(e,t,r,i,n,s){return this.LogNoisiness>4&&this.fable.log.trace("Metatemplate parsing template string [".concat(e,"] where the callback is a ").concat(typeof r),{TemplateData:t}),this.StringParser.parseString(e,this.ParseTree,t,r,i,n,s)}}},{"./Fable-Service-MetaTemplate/MetaTemplate-StringParser.js":91,"./Fable-Service-MetaTemplate/MetaTemplate-WordTree.js":92,"fable-serviceproviderbase":59}],91:[function(e,t,r){t.exports=class{constructor(e){this.fable=e}newParserState(e){return{ParseTree:e,Asynchronous:!1,Output:"",OutputBuffer:"",Pattern:{},PatternMatch:!1,PatternMatchEnd:!1}}appendOutputBuffer(e,t){t.OutputBuffer+=e}flushOutputBuffer(e){e.Output+=e.OutputBuffer,e.OutputBuffer=""}resetOutputBuffer(e){return this.flushOutputBuffer(e),e.Pattern=!1,e.PatternStartNode=!1,e.StartPatternMatchComplete=!1,e.EndPatternMatchBegan=!1,e.PatternMatch=!1,!0}parseCharacter(e,t,r,i,n,s){if(t.PatternMatch)if(!t.StartPatternMatchComplete&&e in t.Pattern)t.Pattern=t.Pattern[e],this.appendOutputBuffer(e,t);else if(t.EndPatternMatchBegan){if(e in t.Pattern.PatternEnd){t.Pattern=t.Pattern.PatternEnd[e],this.appendOutputBuffer(e,t);let o="ParserContext"in t.Pattern&&t.Pattern.ParserContext;return t.OutputBuffer=o?t.Pattern.Parse.call(o,t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r,i,n,s):t.Pattern.Parse(t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r,i,n,s),this.resetOutputBuffer(t)}e in t.PatternStartNode.PatternEnd?(t.Pattern=t.PatternStartNode.PatternEnd[e],this.appendOutputBuffer(e,t)):(t.EndPatternMatchBegan=!1,this.appendOutputBuffer(e,t))}else if("PatternEnd"in t.Pattern){if(t.StartPatternMatchComplete||(t.StartPatternMatchComplete=!0,t.PatternStartNode=t.Pattern),this.appendOutputBuffer(e,t),e in t.Pattern.PatternEnd&&(t.EndPatternMatchBegan=!0,t.Pattern=t.Pattern.PatternEnd[e],"Parse"in t.Pattern)){let e="ParserContext"in t.Pattern&&t.Pattern.ParserContext;return t.OutputBuffer=e?t.Pattern.Parse.call(e,t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r,i,n,s):t.Pattern.Parse(t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r,i,n,s),this.resetOutputBuffer(t)}}else this.resetOutputBuffer(t);if(!t.PatternMatch){if(e in t.ParseTree)return this.resetOutputBuffer(t),this.appendOutputBuffer(e,t),t.Pattern=t.ParseTree[e],t.PatternMatch=!0,!0;this.appendOutputBuffer(e,t)}return!1}executePatternAsync(e,t,r,i,n,s){if(e.Pattern.isAsync){let o="ParserContext"in e.Pattern&&e.Pattern.ParserContext;return o?e.Pattern.ParseAsync.call(o,e.OutputBuffer.substr(e.Pattern.PatternStartString.length,e.OutputBuffer.length-(e.Pattern.PatternStartString.length+e.Pattern.PatternEndString.length)),t,(t,i)=>(t&&this.fable.log.info("Precedent ERROR: Async template error happened parsing ".concat(e.Pattern.PatternStart," ... ").concat(e.Pattern.PatternEnd,": ").concat(t)),e.OutputBuffer=i,this.resetOutputBuffer(e),r()),i,n,s):e.Pattern.ParseAsync(e.OutputBuffer.substr(e.Pattern.PatternStartString.length,e.OutputBuffer.length-(e.Pattern.PatternStartString.length+e.Pattern.PatternEndString.length)),t,(t,i)=>(t&&this.fable.log.info("Precedent ERROR: Async template error happened parsing ".concat(e.Pattern.PatternStart," ... ").concat(e.Pattern.PatternEnd,": ").concat(t)),e.OutputBuffer=i,this.resetOutputBuffer(e),r()),i,n,s)}{let o="ParserContext"in e.Pattern&&e.Pattern.ParserContext;return e.OutputBuffer=o?e.Pattern.Parse.call(o,e.OutputBuffer.substr(e.Pattern.PatternStartString.length,e.OutputBuffer.length-(e.Pattern.PatternStartString.length+e.Pattern.PatternEndString.length)),t,i,n,s):e.Pattern.Parse(e.OutputBuffer.substr(e.Pattern.PatternStartString.length,e.OutputBuffer.length-(e.Pattern.PatternStartString.length+e.Pattern.PatternEndString.length)),t,i,n,s),this.resetOutputBuffer(e),r()}}parseCharacterAsync(e,t,r,i,n,s,o){if(t.PatternMatch)if(!t.StartPatternMatchComplete&&e in t.Pattern)t.Pattern=t.Pattern[e],this.appendOutputBuffer(e,t);else if(t.EndPatternMatchBegan)if(e in t.Pattern.PatternEnd){if(t.Pattern=t.Pattern.PatternEnd[e],this.appendOutputBuffer(e,t),"Parse"in t.Pattern)return this.executePatternAsync(t,r,i,n,s,o)}else e in t.PatternStartNode.PatternEnd?(t.Pattern=t.PatternStartNode.PatternEnd[e],this.appendOutputBuffer(e,t)):(t.EndPatternMatchBegan=!1,this.appendOutputBuffer(e,t));else if("PatternEnd"in t.Pattern){if(t.StartPatternMatchComplete||(t.StartPatternMatchComplete=!0,t.PatternStartNode=t.Pattern),this.appendOutputBuffer(e,t),e in t.Pattern.PatternEnd&&(t.EndPatternMatchBegan=!0,t.Pattern=t.Pattern.PatternEnd[e],"Parse"in t.Pattern))return this.executePatternAsync(t,r,i,n,s,o)}else this.resetOutputBuffer(t);else e in t.ParseTree?(this.resetOutputBuffer(t),this.appendOutputBuffer(e,t),t.Pattern=t.ParseTree[e],t.PatternMatch=!0):this.appendOutputBuffer(e,t);return i()}parseString(e,t,r,i,n,s,o){let a=Array.isArray(n)?n:[],c=Array.from(a);if(c.push(r),"function"!=typeof i){let i=this.newParserState(t);for(var l=0;l<e.length;l++)this.parseCharacter(e[l],i,r,c,s,o);return this.flushOutputBuffer(i),i.Output}{let n=this.newParserState(t);n.Asynchronous=!0;let a=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");for(let t=0;t<e.length;t++)a.anticipate(i=>{this.parseCharacterAsync(e[t],n,r,i,c,s,o)});a.wait(e=>(this.flushOutputBuffer(n),i(e,n.Output)))}}}},{}],92:[function(e,t,r){t.exports=class{constructor(){this.ParseTree={}}addChild(e,t){return t in e||(e[t]={}),e[t]}addEndChild(e,t){return"PatternEnd"in e||(e.PatternEnd={}),e.PatternEnd[t]={},e.PatternEnd[t]}addPatternBoth(e,t,r,i,n){if(e.length<1)return!1;if("string"==typeof t&&t.length<1)return!1;let s=this.ParseTree;for(var o=0;o<e.length;o++)s=this.addChild(s,e[o],o);"PatternEnd"in s||(s.PatternEnd={});let a="string"==typeof t?t:e;for(let e=0;e<a.length;e++)s=this.addEndChild(s,a[e],e);return s.PatternStartString=e,s.PatternEndString=a,s.Parse="function"==typeof r?r:"string"==typeof r?(e,t)=>r:(e,t)=>e,s.ParseAsync="function"==typeof i?i:"string"==typeof i?(e,t,r)=>r(null,i):(e,t,r)=>r(null,s.Parse(e,t)),n&&(s.ParserContext=n),s.isAsync=!0,s}addPattern(e,t,r,i){return this.addPatternBoth(e,t,r,null,i)}}},{}],93:[function(e,t,r){t.exports={Metadata:{UUID:!1,Hash:!1,Name:"",Summary:"",Version:0},Status:{Completed:!1,StepCount:1},Steps:[],Errors:[],Log:[]}},{}],94:[function(e,t,r){const{PE:i}=e("big.js"),n=e("fable-serviceproviderbase"),s=JSON.stringify(e("./Fable-Service-Operation-DefaultSettings.js"));t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.timeStamps={},this.serviceType="PhasedOperation",this.state=JSON.parse(s),this.stepMap={},this.stepFunctions={},this.state.Metadata.Hash=this.Hash,this.state.Metadata.UUID=this.UUID,this.state.Metadata.Name="string"==typeof this.options.Name?this.options.Name:"Unnamed Operation ".concat(this.state.Metadata.UUID),this.name=this.state.Metadata.Name,this.progressTrackerSet=this.fable.instantiateServiceProviderWithoutRegistration("ProgressTrackerSet"),this.state.OverallProgressTracker=this.progressTrackerSet.createProgressTracker("Overall-".concat(this.state.Metadata.UUID)),this.log=this}execute(e){if(this.state.OverallProgressTracker.StartTimeStamp>0)return e(new Error("Operation [".concat(this.state.Metadata.UUID,"] ").concat(this.state.Metadata.Name," has already been executed!")));let t=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");this.progressTrackerSet.setProgressTrackerTotalOperations(this.state.OverallProgressTracker.Hash,this.state.Status.StepCount),this.progressTrackerSet.startProgressTracker(this.state.OverallProgressTracker.Hash),this.info("Operation [".concat(this.state.Metadata.UUID,"] ").concat(this.state.Metadata.Name," starting..."));for(let e=0;e<this.state.Steps.length;e++)t.anticipate(function(t){return this.fable.log.info("Step #".concat(e," [").concat(this.state.Steps[e].GUIDStep,"] ").concat(this.state.Steps[e].Name," starting...")),this.progressTrackerSet.startProgressTracker(this.state.Steps[e].ProgressTracker.Hash),t()}.bind(this)),t.anticipate(this.stepFunctions[this.state.Steps[e].GUIDStep].bind({log:this,fable:this.fable,options:this.state.Steps[e].Metadata,metadata:this.state.Steps[e].Metadata,ProgressTracker:this.progressTrackerSet.getProgressTracker(this.state.Steps[e].ProgressTracker.Hash),logProgressTrackerStatus:function(){return this.log.info("Step #".concat(e," [").concat(this.state.Steps[e].GUIDStep,"]: ").concat(this.progressTrackerSet.getProgressTrackerStatusString(this.state.Steps[e].ProgressTracker.Hash)))}.bind(this),OperationState:this.state,StepState:this.state.Steps[e]})),t.anticipate(function(t){this.progressTrackerSet.endProgressTracker(this.state.Steps[e].ProgressTracker.Hash);let r=this.progressTrackerSet.getProgressTrackerStatusString(this.state.Steps[e].ProgressTracker.Hash);this.fable.log.info("Step #".concat(e," [").concat(this.state.Steps[e].GUIDStep,"] ").concat(this.state.Steps[e].Name," complete.")),this.fable.log.info("Step #".concat(e," [").concat(this.state.Steps[e].GUIDStep,"] ").concat(this.state.Steps[e].Name," ").concat(r,".")),this.progressTrackerSet.incrementProgressTracker(this.state.OverallProgressTracker.Hash,1);let i=this.progressTrackerSet.getProgressTrackerStatusString(this.state.OverallProgressTracker.Hash);return this.fable.log.info("Operation [".concat(this.state.Metadata.UUID,"] ").concat(i,".")),t()}.bind(this));t.wait(t=>{if(t)return this.fable.log.error("Operation [".concat(this.state.Metadata.UUID,"] ").concat(this.state.Metadata.Name," had an error: ").concat(t),t),e(t);this.info("Operation [".concat(this.state.Metadata.UUID,"] ").concat(this.state.Metadata.Name," complete."));let r=this.progressTrackerSet.getProgressTrackerStatusString(this.state.OverallProgressTracker.Hash);return this.progressTrackerSet.endProgressTracker(this.state.OverallProgressTracker.Hash),this.fable.log.info("Operation [".concat(this.state.Metadata.UUID,"] ").concat(r,".")),e()})}addStep(e,t,r,i,n){let s={};return s.GUIDStep=void 0!==n?n:"STEP-".concat(this.state.Steps.length,"-").concat(this.fable.DataGeneration.randomNumericString()),s.Name=void 0!==r?r:"Step [".concat(s.GUIDStep,"]"),s.Description=void 0!==i?i:"Step execution of ".concat(s.Name,"."),s.ProgressTracker=this.progressTrackerSet.createProgressTracker(s.GUIDStep),s.Metadata="object"==typeof t?t:{},this.state.Steps.push(s),this.stepMap[s.GUIDStep]=s,this.stepFunctions[s.GUIDStep]="function"==typeof e?e:function(e){return e()},this.state.Status.StepCount++,s}setStepTotalOperations(e,t){if(!(e in this.stepMap))return new Error("Step [".concat(e,"] does not exist in operation [").concat(this.state.Metadata.UUID,"] ").concat(this.state.Metadata.Name," when attempting to set total operations to ").concat(t,"."));this.progressTrackerSet.setProgressTrackerTotalOperations(this.stepMap[e].ProgressTracker.Hash,t)}writeOperationLog(e,t,r){this.state.Log.push("[".concat((new Date).toUTCString(),"]-[").concat(e,"]: ").concat(t)),"object"==typeof r&&this.state.Log.push(JSON.stringify(r))}writeOperationErrors(e,t){this.state.Errors.push("".concat(e)),"object"==typeof t&&this.state.Errors.push(JSON.stringify(t))}trace(e,t){this.writeOperationLog("TRACE",e,t),this.fable.log.trace(e,t)}debug(e,t){this.writeOperationLog("DEBUG",e,t),this.fable.log.debug(e,t)}info(e,t){this.writeOperationLog("INFO",e,t),this.fable.log.info(e,t)}warn(e,t){this.writeOperationLog("WARN",e,t),this.fable.log.warn(e,t)}error(e,t){this.writeOperationLog("ERROR",e,t),this.writeOperationErrors(e,t),this.fable.log.error(e,t)}fatal(e,t){this.writeOperationLog("FATAL",e,t),this.writeOperationErrors(e,t),this.fable.log.fatal(e,t)}}},{"./Fable-Service-Operation-DefaultSettings.js":93,"big.js":17,"fable-serviceproviderbase":59}],95:[function(e,t,r){const i=e("fable-serviceproviderbase");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.serviceType="ProgressTime",this.timeStamps={}}formatTimeDuration(e){let t="number"==typeof e?e:0;if(e<0)return"unknown";let r="";return t>36e5&&(r+=Math.floor(t/36e5)+"h ",t%=36e5),t>6e4&&(r+=Math.floor(t/6e4)+"m ",t%=6e4),t>1e3&&(r+=Math.floor(t/1e3)+"s ",t%=1e3),r+=Math.round(t)+"ms",r}createTimeStamp(e){let t="string"==typeof e?e:"Default";return this.timeStamps[t]=+new Date,this.timeStamps[t]}getTimeStampValue(e){let t="string"==typeof e?e:"Default";return t in this.timeStamps?this.timeStamps[t]:-1}updateTimeStampValue(e,t){let r="string"==typeof e?e:"Default",i=!1;return i="string"==typeof t?tmpReference in this.timeStamps&&this.timeStamps[tmpReference]:"number"==typeof t?t:+new Date,r in this.timeStamps&&i?(this.timeStamps[r]=i,this.timeStamps[r]):-1}removeTimeStamp(e){let t="string"==typeof e?e:"Default";return t in this.timeStamps&&(delete this.timeStamps[t],!0)}getTimeStampDelta(e,t){let r="string"==typeof e?e:"Default",i=!1;return i="string"==typeof t?tmpReference in this.timeStamps&&this.timeStamps[tmpReference]:"number"==typeof t?t:+new Date,r in this.timeStamps&&i?i-this.timeStamps[r]:-1}getDurationBetweenTimestamps(e,t){let r="string"==typeof e?e:"Default",i="string"==typeof t?t:"Default";return r in this.timeStamps&&i in this.timeStamps?this.timeStamps[i]-this.timeStamps[r]:-1}getTimeStampDeltaMessage(e,t,r){let i="string"==typeof e?e:"Default",n=void 0!==t?t:"Elapsed for ".concat(i,": "),s=this.getTimeStampDelta(i,r);return"".concat(n," ").concat(this.formatTimeDuration(s))}logTimeStampDelta(e,t,r){this.fable.log.info(this.getTimeStampDeltaMessage(e,t,r))}}},{"fable-serviceproviderbase":59}],96:[function(e,t,r){t.exports=class{constructor(e,t){this.progressTrackerSet=e,this.progressTrackerHash=t,this.data=this.progressTrackerSet.getProgressTrackerData(this.progressTrackerHash)}updateProgressTracker(e){return this.progressTrackerSet.updateProgressTracker(this.progressTrackerHash,e)}incrementProgressTracker(e){return this.progressTrackerSet.incrementProgressTracker(this.progressTrackerHash,e)}setProgressTrackerTotalOperations(e){return this.progressTrackerSet.setProgressTrackerTotalOperations(this.progressTrackerHash,e)}getProgressTrackerStatusString(){return this.progressTrackerSet.getProgressTrackerStatusString(this.progressTrackerHash)}}},{}],97:[function(e,t,r){const i=e("fable-serviceproviderbase"),n=e("./Fable-Service-ProgressTracker/ProgressTracker.js");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.serviceType="ProgressTrackerSet",this.progressTrackers={},this.progressTimes=this.fable.instantiateServiceProviderWithoutRegistration("ProgressTime"),this.progressTimes.createTimeStamp("CurrentTime")}getProgressTracker(e){let t="string"==typeof e?e:"Default";return t in this.progressTrackers||(this.fable.log.warn("ProgressTracker ".concat(t," does not exist! Creating a new tracker...")),this.createProgressTracker(t,100)),new n(this,e)}getProgressTrackerData(e){let t="string"==typeof e?e:"Default";return t in this.progressTrackers||(this.fable.log.warn("ProgressTracker ".concat(t," does not exist! Creating a new tracker...")),this.createProgressTracker(t,100)),this.progressTrackers[t]}createProgressTracker(e,t){let r="string"==typeof e?e:"Default",i="number"==typeof t?t:100,n={Hash:r,StartTimeHash:"".concat(r,"-Start"),StartTimeStamp:-1,CurrentTimeStamp:-1,EndTimeHash:"".concat(r,"-End"),EndTimeStamp:-1,PercentComplete:-1,AllowTruePercentComplete:!1,ElapsedTime:-1,AverageOperationTime:-1,EstimatedCompletionTime:-1,TotalCount:i,CurrentCount:-1};return r in this.progressTrackers&&(this.fable.log.warn("ProgressTracker ".concat(r," already exists! Overwriting with a new tracker...")),this.progressTimes.removeTimeStamp(n.StartTimeHash),this.progressTimes.removeTimeStamp(n.EndTimeHash)),this.progressTrackers[r]=n,n}setProgressTrackerTotalOperations(e,t){let r="string"==typeof e?e:"Default",i="number"==typeof t?t:100;return r in this.progressTrackers||(this.fable.log.warn("Attempted to set the total operations of ProgressTracker ".concat(r," but it does not exist! Creating a new tracker...")),this.createProgressTracker(r,i)),this.progressTrackers[r].TotalCount=i,this.progressTrackers[r]}startProgressTracker(e){let t="string"==typeof e?e:"Default";t in this.progressTrackers||this.createProgressTracker(t,100);let r=this.progressTrackers[t];return this.progressTimes.createTimeStamp(this.progressTrackers[t].StartTimeHash),r.StartTimeStamp=this.progressTimes.getTimeStampValue(this.progressTrackers[t].StartTimeHash),r.CurrentCount<0&&(r.CurrentCount=0),this.solveProgressTrackerStatus(t)}endProgressTracker(e){let t="string"==typeof e?e:"Default";if(!(t in this.progressTrackers))return this.fable.log.error("Attempted to end ProgressTracker ".concat(t," that does not exist!")),!1;let r=this.progressTrackers[t];return this.progressTimes.createTimeStamp(this.progressTrackers[t].EndTimeHash),r.EndTimeStamp=this.progressTimes.getTimeStampValue(this.progressTrackers[t].EndTimeHash),this.solveProgressTrackerStatus(t)}solveProgressTrackerStatus(e){let t="string"==typeof e?e:"Default";if(!(t in this.progressTrackers))return this.fable.log.error("Attempted to solve ProgressTracker ".concat(t," that does not exist!")),!1;let r=this.progressTrackers[t];return(r.TotalCount<1||isNaN(r.TotalCount))&&(this.fable.log.error("ProgressTracker ".concat(r.Hash," has an invalid total count of operations (").concat(r.TotalCount,"! Setting it to the default of 100...")),r.TotalCount=100),r.CurrentCount<1?r.PercentComplete=0:r.PercentComplete=r.CurrentCount/r.TotalCount*100,!r.AllowTruePercentComplete&&r.PercentComplete>100&&(r.PercentComplete=100),this.progressTimes.updateTimeStampValue("CurrentTime"),r.CurrentTimeStamp=this.progressTimes.getTimeStampValue("CurrentTime"),r.ElapsedTime=r.CurrentTimeStamp-r.StartTimeStamp,r.EndTimeStamp>0&&(r.ElapsedTime=r.EndTimeStamp-r.StartTimeStamp),r.CurrentCount>0?r.AverageOperationTime=(r.CurrentTimeStamp-r.StartTimeStamp)/r.CurrentCount:r.AverageOperationTime=-1,r.AverageOperationTime>0?r.EstimatedCompletionTime=Math.max(r.TotalCount-r.CurrentCount,0)*r.AverageOperationTime:r.EstimatedCompletionTime=-1,r}updateProgressTracker(e,t){let r="string"==typeof e?e:"Default",i=parseInt(t);return isNaN(i)?(this.fable.log.warn("Attempted to update ProgressTracker ".concat(r," with an invalid number of operations!")),!1):(r in this.progressTrackers||this.createProgressTracker(100,r),this.progressTrackers[r].CurrentCount=i,this.solveProgressTrackerStatus(r))}incrementProgressTracker(e,t){let r="string"==typeof e?e:"Default",i=parseInt(t);return isNaN(i)&&(i=1),r in this.progressTrackers?(this.progressTrackers[r].StartTimeStamp<1&&(this.fable.log.warn("Attempted to increment ProgressTracker ".concat(r," but it was not started.. starting now.")),this.startProgressTracker(r)),this.progressTrackers[r].CurrentCount=this.progressTrackers[r].CurrentCount+i,this.solveProgressTrackerStatus(r)):(this.fable.log.warn("Attempted to increment ProgressTracker ".concat(r," but it did not exist.")),!1)}getProgressTrackerCompletedOperationCountString(e){let t="string"==typeof e?e:"Default";const r=this.progressTrackers[t];return r.CurrentCount<0?"none":r.CurrentCount<1?"0":"".concat(r.CurrentCount)}getProgressTrackerPercentCompleteString(e){let t="string"==typeof e?e:"Default";if(this.solveProgressTrackerStatus(t),t in this.progressTrackers){const e=this.progressTrackers[t];return e.StartTimeStamp<1||e.CurrentCount<1?"0%":(e.EndTimeStamp,"".concat(e.PercentComplete.toFixed(3),"%"))}return"ProgressTracker ".concat(t," does not exist! No stats to display.")}getProgressTrackerStatusString(e){let t="string"==typeof e?e:"Default";if(this.solveProgressTrackerStatus(t),t in this.progressTrackers){const e=this.progressTrackers[t];return e.StartTimeStamp<1?"ProgressTracker ".concat(e.Hash," has not been started yet."):e.CurrentCount<1&&e.EndTimeStamp<1?"ProgressTracker ".concat(e.Hash," has no completed operations. ").concat(this.progressTimes.formatTimeDuration(e.ElapsedTime)," have elapsed since it was started."):e.EndTimeStamp<1?"ProgressTracker ".concat(e.Hash," is ").concat(e.PercentComplete.toFixed(3),"% completed - ").concat(e.CurrentCount," / ").concat(e.TotalCount," operations over ").concat(this.progressTimes.formatTimeDuration(e.ElapsedTime)," (median ").concat(this.progressTimes.formatTimeDuration(e.AverageOperationTime)," per). Estimated completion: ").concat(this.progressTimes.formatTimeDuration(e.EstimatedCompletionTime)):"ProgressTracker ".concat(e.Hash," is done. ").concat(e.CurrentCount," / ").concat(e.TotalCount," operations were completed in ").concat(this.progressTimes.formatTimeDuration(e.ElapsedTime)," (median ").concat(this.progressTimes.formatTimeDuration(e.AverageOperationTime)," per).")}return"ProgressTracker ".concat(t," does not exist! No stats to display.")}logProgressTrackerStatus(e){this.fable.log.info(this.getProgressTrackerStatusString(e))}}},{"./Fable-Service-ProgressTracker/ProgressTracker.js":96,"fable-serviceproviderbase":59}],98:[function(e,t,r){(function(r){(function(){const i=e("fable-serviceproviderbase"),n=e("simple-get"),s=e("cookie");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.TraceLog=!1,(this.options.TraceLog||this.fable.TraceLog)&&(this.TraceLog=!0),this.dataFormat=this.fable.services.DataFormat,this.serviceType="RestClient",this.cookie=!1,this.prepareRequestOptions=e=>e}get simpleGet(){return n}prepareCookies(e){if(this.cookie){let t=this.cookie;"headers"in e||(e.headers={});let r=Object.keys(t);r.length>0&&(e.headers.cookie=s.serialize(r[0],t[r[0]]))}return e}preRequest(e){let t=this.prepareCookies(e);return"RestClientURLPrefix"in this.fable.settings&&(t.url=this.fable.settings.RestClientURLPrefix+t.url),this.prepareRequestOptions(t)}executeChunkedRequest(e,t){let r=this.preRequest(e);return r.RequestStartTime=this.fable.log.getTimeStamp(),this.TraceLog&&this.fable.log.debug("Beginning ".concat(r.method," request to ").concat(r.url," at ").concat(r.RequestStartTime)),n(r,(e,i)=>{if(e)return t(e,i);if(this.TraceLog){let e=this.fable.log.getTimeStamp();this.fable.log.debug("--\x3e ".concat(r.method," connected in ").concat(this.dataFormat.formatTimeDelta(r.RequestStartTime,e),"ms code ").concat(i.statusCode))}let n="";i.on("data",e=>{if(this.TraceLog){let t=this.fable.log.getTimeStamp();this.fable.log.debug("--\x3e ".concat(r.method," data chunk size ").concat(e.length,"b received in ").concat(this.dataFormat.formatTimeDelta(r.RequestStartTime,t),"ms"))}n+=e}),i.on("end",()=>{if(this.TraceLog){let e=this.fable.log.getTimeStamp();this.fable.log.debug("==> ".concat(r.method," completed data size ").concat(n.length,"b received in ").concat(this.dataFormat.formatTimeDelta(r.RequestStartTime,e),"ms"))}return t(e,i,n)})})}executeChunkedRequestBinary(e,t){let i=this.preRequest(e);return i.RequestStartTime=this.fable.log.getTimeStamp(),this.TraceLog&&this.fable.log.debug("Beginning ".concat(i.method," request to ").concat(i.url," at ").concat(i.RequestStartTime)),i.json=!1,i.encoding=null,n(i,(e,n)=>{if(e)return t(e,n);if(this.TraceLog){let e=this.fable.log.getTimeStamp();this.fable.log.debug("--\x3e ".concat(i.method," connected in ").concat(this.dataFormat.formatTimeDelta(i.RequestStartTime,e),"ms code ").concat(n.statusCode))}let s=!1;n.on("data",e=>{if(this.TraceLog){let t=this.fable.log.getTimeStamp();this.fable.log.debug("--\x3e ".concat(i.method," data chunk size ").concat(e.length,"b received in ").concat(this.dataFormat.formatTimeDelta(i.RequestStartTime,t),"ms"))}s=s?r.concat([s,e]):r.from(e)}),n.on("end",()=>{if(this.TraceLog){let e=this.fable.log.getTimeStamp();this.fable.log.debug("==> ".concat(i.method," completed data size ").concat(s.length,"b received in ").concat(this.dataFormat.formatTimeDelta(i.RequestStartTime,e),"ms"))}return t(e,n,s)})})}executeJSONRequest(e,t){e.json=!0;let r=this.preRequest(e);return"headers"in r||(r.headers={}),r.RequestStartTime=this.fable.log.getTimeStamp(),this.TraceLog&&this.fable.log.debug("Beginning ".concat(r.method," JSON request to ").concat(r.url," at ").concat(r.RequestStartTime)),n(r,(e,i)=>{if(e)return t(e,i);if(this.TraceLog){let e=this.fable.log.getTimeStamp();this.fable.log.debug("--\x3e JSON ".concat(r.method," connected in ").concat(this.dataFormat.formatTimeDelta(r.RequestStartTime,e),"ms code ").concat(i.statusCode))}let n="";i.on("data",e=>{if(this.TraceLog){let t=this.fable.log.getTimeStamp();this.fable.log.debug("--\x3e JSON ".concat(r.method," data chunk size ").concat(e.length,"b received in ").concat(this.dataFormat.formatTimeDelta(r.RequestStartTime,t),"ms"))}n+=e}),i.on("end",()=>{if(this.TraceLog){let e=this.fable.log.getTimeStamp();this.fable.log.debug("==> JSON ".concat(r.method," completed - received in ").concat(this.dataFormat.formatTimeDelta(r.RequestStartTime,e),"ms"))}return t(e,i,JSON.parse(n))})})}getJSON(e,t){let r="object"==typeof e?e:{};return"string"==typeof e&&(r.url=e),r.method="GET",this.executeJSONRequest(r,t)}putJSON(e,t){return"object"!=typeof e.body?t(new Error("PUT JSON Error Invalid options object")):(e.method="PUT",this.executeJSONRequest(e,t))}postJSON(e,t){return"object"!=typeof e.body?t(new Error("POST JSON Error Invalid options object")):(e.method="POST",this.executeJSONRequest(e,t))}patchJSON(e,t){return"object"!=typeof e.body?t(new Error("PATCH JSON Error Invalid options object")):(e.method="PATCH",this.executeJSONRequest(e,t))}headJSON(e,t){return"object"!=typeof e.body?t(new Error("HEAD JSON Error Invalid options object")):(e.method="HEAD",this.executeJSONRequest(e,t))}delJSON(e,t){return e.method="DELETE",this.executeJSONRequest(e,t)}getRawText(e,t){let r="object"==typeof e?e:{};return"string"==typeof e&&(r.url=e),r.method="GET",this.executeChunkedRequest(r,t)}}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:20,cookie:31,"fable-serviceproviderbase":59,"simple-get":166}],99:[function(e,t,r){const i=e("fable-serviceproviderbase");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.serviceType="Template",this.Matchers={Evaluate:/<%([\s\S]+?)%>/g,Interpolate:/<%=([\s\S]+?)%>/g,Escaper:/\\|'|\r|\n|\t|\u2028|\u2029/g,Unescaper:/\\(\\|'|r|n|t|u2028|u2029)/g,GuaranteedNonMatch:/.^/},this.templateEscapes={"\\":"\\","'":"'",r:"\r","\r":"r",n:"\n","\n":"n",t:"\t","\t":"t",u2028:"\u2028","\u2028":"u2028",u2029:"\u2029","\u2029":"u2029"},this.renderFunction=!1,this.templateString=!1}renderTemplate(e){return this.renderFunction(e)}templateFunction(){return this.renderTemplate.bind(this)}buildTemplateFunction(e,t){return this.TemplateSource="__p+='"+e.replace(this.Matchers.Escaper,e=>"\\".concat(this.templateEscapes[e])).replace(this.Matchers.Interpolate||this.Matchers.GuaranteedNonMatch,(e,t)=>"'+\n(".concat(decodeURIComponent(t),")+\n'")).replace(this.Matchers.Evaluate||this.Matchers.GuaranteedNonMatch,(e,t)=>"';\n".concat(decodeURIComponent(t),"\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),void 0!==t?this.renderFunction(t):(this.TemplateSourceCompiled="function(obj){\n"+this.TemplateSource+"}",this.templateFunction())}}},{"fable-serviceproviderbase":59}],100:[function(e,t,r){const i=e("fable-serviceproviderbase"),n=e("async.waterfall"),s=e("async.eachlimit"),o=e("big.js");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.templates={},this.waterfall=n,this.eachLimit=s,this.bigNumber=o}extend(e){for(let t=0;t<(arguments.length<=1?0:arguments.length-1);t++){let r=t+1<1||arguments.length<=t+1?void 0:arguments[t+1];if("object"==typeof r){let t=Object.keys(r);for(let i=0;i<t.length;i++)e[t[i]]=r[t[i]]}}return e}template(e,t){return this.fable.instantiateServiceProviderWithoutRegistration("Template").buildTemplateFunction(e,t)}buildHashedTemplate(e,t,r){let i=this.fable.instantiateServiceProvider("Template",{},e);return this.templates[e]=i.buildTemplateFunction(t,r),this.templates[e]}chunk(e,t,r){let i=[...e],n="number"==typeof t?t:0,s=void 0!==r?r:[];if(n<=0)return s;for(;i.length;)s.push(i.splice(0,n));return s}getInternalValueByHash(e){return this.getValueByHash(this.fable,e)}setInternalValueByHash(e,t){return this.setValueByHash(this.fable,e,t)}getValueByHash(e,t,r){let i=r;return void 0===i&&(this.manifest||(this.manifest=this.fable.newManyfest()),i=this.manifest),i.getValueByHash(e,t)}setValueByHash(e,t,r,i){let n=i;return void 0===n&&(this.manifest||(this.manifest=this.fable.newManyfest()),n=this.manifest),n.setValueByHash(e,t,r)}createValueArrayByHashes(e,t,r){let i=r;if(void 0===i&&(this.manifest||(this.manifest=this.fable.newManyfest()),i=this.manifest),!Array.isArray(t))return[];let n=[];for(let r=0;r<t.length;r++)n.push(i.getValueByHash(e,t[r]));return n}slice(e,t,r){if(!Array.isArray(e))return this.fable.log.error("Fable.Math.slice called with non-array value",{pValueArray:e}),[];const i=Number(this.fable.Math.parsePrecise(t,"0")),n=Number(this.fable.Math.parsePrecise(r,e.length.toString()));return e.slice(i,n)}createValueArrayByHashesFromInternal(e,t){return this.createValueArrayByHashes(this.fable,e,t)}createValueArrayByHashParametersFromInternal(){if(arguments.length<2)return[];let e=Array.prototype.slice.call(arguments);return this.createValueArrayByHashes(this.fable,e)}createValueObjectByHashes(e,t,r){let i=r;if(void 0===i&&(this.manifest||(this.manifest=this.fable.newManyfest()),i=this.manifest),!Array.isArray(t))return{};let n={};for(let r=0;r<t.length;r++)n[t[r]]=i.getValueByHash(e,t[r]);return n}createValueObjectByHashesFromInternal(e,t){return this.createValueObjectByHashes(this.fable,e,t)}createValueObjectByHashParametersFromInternal(){let e=Array.prototype.slice.call(arguments);return this.createValueObjectByHashes(this.fable,e)}addressIsNullOrEmpty(e,t){if(this.manifest||(this.manifest=this.fable.newManyfest()),!this.manifest.checkAddressExists(e,t))return!0;let r=this.manifest.getValueByHash(e,t);return null===r||""===r}objectKeysToArray(e){return Object.keys(e)}objectValuesToArray(e){if("object"!=typeof e||null===e)return[];let t=Object.keys(e),r=[];for(let i=0;i<t.length;i++)r.push(e[t[i]]);return r}objectValuesSortByExternalArray(e,t,r,i){let n="boolean"==typeof r?r:"number"==typeof r&&1==r||"string"==typeof r&&"1"==r,s=this.fable.newManyfest(),o=i;"string"!=typeof o&&(o="label");let a=[];for(let r=0;r<e.length;r++)a.push({Value:e[r],SortValue:s.getValueByHash(t[r],o),SortObject:t[r]});return a.sort((e,t)=>e.SortValue<t.SortValue?n?1:-1:e.SortValue>t.SortValue?n?-1:1:0).map(e=>e.Value)}isoStringToDate(e){"Dates"in this.fable||this.fable.instantiateServiceProvider("Dates");let t=!1;try{t=this.fable.Dates.dayJS.utc(e)}catch(t){return this.fable.log.error("Could not parse date string ".concat(e," with dayJS.")),!1}return!!t&&t.toDate()}findFirstValueByStringIncludes(e,t,r,i){if(this.manifest||(this.manifest=this.fable.newManyfest()),Array.isArray(e))for(let n=0;n<e.length;n++){let s=this.manifest.getValueByHash(e[n],t);if(s&&s.includes(r))return this.manifest.getValueByHash(e[n],i)}}findFirstValueByStringIncludesInternal(e,t,r,i){if(this.manifest||(this.manifest=this.fable.newManyfest()),"string"!=typeof e)return;let n=this.manifest.getValueByHash(this.fable,e);return this.findFirstValueByStringIncludes(n,t,r,i)}findFirstValueByExactMatch(e,t,r,i){if(this.manifest||(this.manifest=this.fable.newManyfest()),Array.isArray(e))for(let n=0;n<e.length;n++){let s=this.manifest.getValueByHash(e[n],t);if(s&&s==r)return this.manifest.getValueByHash(e[n],i)}}findFirstValueByExactMatchInternal(e,t,r,i){if(this.manifest||(this.manifest=this.fable.newManyfest()),"string"!=typeof e)return;let n=this.manifest.getValueByHash(this.fable,e);return this.findFirstValueByExactMatch(n,t,r,i)}findIndexInternal(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"1",i=t;if("string"==typeof t&&(this.manifest||(this.manifest=this.fable.newManyfest()),i=this.manifest.getValueByHash(this.fable,t)),!Array.isArray(i))return this.fable.log.error("findIndexInternal called with non-array search array."),-1;const n=null!==this.fable.Math.parsePrecise(e,null);let s;s=0===Number(r)?n?t=>0===this.fable.Math.comparePrecise(t,e):t=>t===e:-1===Number(r)?n?t=>this.fable.Math.ltePrecise(t,e):t=>t<=e:n?t=>this.fable.Math.gtePrecise(t,e):t=>t>=e;for(let e=0;e<i.length;e++)if(s(i[e]))return e;return-1}flattenArrayOfSolverInputs(e){if(!Array.isArray(e)&&("object"==typeof e&&(e=Object.values(e)),!e))return[];return e.flatMap(e=>Array.isArray(e)?e:"object"==typeof e?Object.values(e):[e])}generateArrayOfObjectsFromSets(){let e=[];if(arguments.length%2!=0)return e;let t=[],r=[];for(let e=0;e<arguments.length;e+=2)t.push(arguments[e]),r.push(this.objectValuesToArray(arguments[e+1]));for(let i=0;i<r.length;i++){let n=r[i],s=t[i];if(Array.isArray(n))for(let t=0;t<n.length;t++){e.length<=t&&e.push({});let r=e[t];r&&(r[s]=n[t])}}return e}createArrayFromAbsoluteValues(){let e=[];for(let t=0;t<arguments.length;t++)e.push(arguments[t]);return e}concatenateArrays(){let e=[];for(let t=0;t<arguments.length;++t){let r=arguments[t];Array.isArray(r)?e=e.concat(r):this.fable.log.error("Fable.Service.Utility.concatenateArrays called with non-array argument",{index:t,value:r})}return e}}},{"async.eachlimit":1,"async.waterfall":15,"big.js":17,"fable-serviceproviderbase":59}],101:[function(e,t,r){class i{constructor(e,t){this.values=e instanceof i?e.values.concat([t]):t instanceof i?[e].concat(t.values):[e,t]}}t.exports=i},{}],102:[function(e,t,r){var i=Object.prototype.toString,n=Math.max,s=function(e,t){for(var r=[],i=0;i<e.length;i+=1)r[i]=e[i];for(var n=0;n<t.length;n+=1)r[n+e.length]=t[n];return r};t.exports=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==i.apply(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var r,o=function(e,t){for(var r=[],i=t||0,n=0;i<e.length;i+=1,n+=1)r[n]=e[i];return r}(arguments,1),a=n(0,t.length-o.length),c=[],l=0;l<a;l++)c[l]="$"+l;if(r=Function("binder","return function ("+function(e,t){for(var r="",i=0;i<e.length;i+=1)r+=e[i],i+1<e.length&&(r+=t);return r}(c,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof r){var i=t.apply(this,s(o,arguments));return Object(i)===i?i:this}return t.apply(e,s(o,arguments))}),t.prototype){var h=function(){};h.prototype=t.prototype,r.prototype=new h,h.prototype=null}return r}},{}],103:[function(e,t,r){var i=e("./implementation");t.exports=Function.prototype.bind||i},{"./implementation":102}],104:[function(e,t,r){var i,n=e("es-object-atoms"),s=e("es-errors"),o=e("es-errors/eval"),a=e("es-errors/range"),c=e("es-errors/ref"),l=e("es-errors/syntax"),h=e("es-errors/type"),u=e("es-errors/uri"),p=e("math-intrinsics/abs"),d=e("math-intrinsics/floor"),f=e("math-intrinsics/max"),g=e("math-intrinsics/min"),m=e("math-intrinsics/pow"),y=e("math-intrinsics/round"),b=e("math-intrinsics/sign"),v=Function,T=function(e){try{return v('"use strict"; return ('+e+").constructor;")()}catch(e){}},P=e("gopd"),S=e("es-define-property"),A=function(){throw new h},w=P?function(){try{return A}catch(e){try{return P(arguments,"callee").get}catch(e){return A}}}():A,E=e("has-symbols")(),x=e("get-proto"),C=e("get-proto/Object.getPrototypeOf"),D=e("get-proto/Reflect.getPrototypeOf"),R=e("call-bind-apply-helpers/functionApply"),k=e("call-bind-apply-helpers/functionCall"),N={},j="undefined"!=typeof Uint8Array&&x?x(Uint8Array):i,O={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?i:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?i:ArrayBuffer,"%ArrayIteratorPrototype%":E&&x?x([][Symbol.iterator]()):i,"%AsyncFromSyncIteratorPrototype%":i,"%AsyncFunction%":N,"%AsyncGenerator%":N,"%AsyncGeneratorFunction%":N,"%AsyncIteratorPrototype%":N,"%Atomics%":"undefined"==typeof Atomics?i:Atomics,"%BigInt%":"undefined"==typeof BigInt?i:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?i:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?i:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?i:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":s,"%eval%":eval,"%EvalError%":o,"%Float16Array%":"undefined"==typeof Float16Array?i:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?i:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?i:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?i:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":N,"%Int8Array%":"undefined"==typeof Int8Array?i:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?i:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?i:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":E&&x?x(x([][Symbol.iterator]())):i,"%JSON%":"object"==typeof JSON?JSON:i,"%Map%":"undefined"==typeof Map?i:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&E&&x?x((new Map)[Symbol.iterator]()):i,"%Math%":Math,"%Number%":Number,"%Object%":n,"%Object.getOwnPropertyDescriptor%":P,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?i:Promise,"%Proxy%":"undefined"==typeof Proxy?i:Proxy,"%RangeError%":a,"%ReferenceError%":c,"%Reflect%":"undefined"==typeof Reflect?i:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?i:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&E&&x?x((new Set)[Symbol.iterator]()):i,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?i:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":E&&x?x(""[Symbol.iterator]()):i,"%Symbol%":E?Symbol:i,"%SyntaxError%":l,"%ThrowTypeError%":w,"%TypedArray%":j,"%TypeError%":h,"%Uint8Array%":"undefined"==typeof Uint8Array?i:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?i:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?i:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?i:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?i:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?i:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?i:WeakSet,"%Function.prototype.call%":k,"%Function.prototype.apply%":R,"%Object.defineProperty%":S,"%Object.getPrototypeOf%":C,"%Math.abs%":p,"%Math.floor%":d,"%Math.max%":f,"%Math.min%":g,"%Math.pow%":m,"%Math.round%":y,"%Math.sign%":b,"%Reflect.getPrototypeOf%":D};if(x)try{null.error}catch(e){var I=x(x(e));O["%Error.prototype%"]=I}var M=function e(t){var r;if("%AsyncFunction%"===t)r=T("async function () {}");else if("%GeneratorFunction%"===t)r=T("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=T("async function* () {}");else if("%AsyncGenerator%"===t){var i=e("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if("%AsyncIteratorPrototype%"===t){var n=e("%AsyncGenerator%");n&&x&&(r=x(n.prototype))}return O[t]=r,r},L={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},F=e("function-bind"),V=e("hasown"),_=F.call(k,Array.prototype.concat),B=F.call(R,Array.prototype.splice),U=F.call(k,String.prototype.replace),H=F.call(k,String.prototype.slice),z=F.call(k,RegExp.prototype.exec),J=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,W=/\\(\\)?/g,q=function(e,t){var r,i=e;if(V(L,i)&&(i="%"+(r=L[i])[0]+"%"),V(O,i)){var n=O[i];if(n===N&&(n=M(i)),void 0===n&&!t)throw new h("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:i,value:n}}throw new l("intrinsic "+e+" does not exist!")};t.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new h("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new h('"allowMissing" argument must be a boolean');if(null===z(/^%?[^%]*%?$/,e))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=H(e,0,1),r=H(e,-1);if("%"===t&&"%"!==r)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new l("invalid intrinsic syntax, expected opening `%`");var i=[];return U(e,J,function(e,t,r,n){i[i.length]=r?U(n,W,"$1"):t||e}),i}(e),i=r.length>0?r[0]:"",n=q("%"+i+"%",t),s=n.name,o=n.value,a=!1,c=n.alias;c&&(i=c[0],B(r,_([0,1],c)));for(var u=1,p=!0;u<r.length;u+=1){var d=r[u],f=H(d,0,1),g=H(d,-1);if(('"'===f||"'"===f||"`"===f||'"'===g||"'"===g||"`"===g)&&f!==g)throw new l("property names with quotes must have matching quotes");if("constructor"!==d&&p||(a=!0),V(O,s="%"+(i+="."+d)+"%"))o=O[s];else if(null!=o){if(!(d in o)){if(!t)throw new h("base intrinsic for "+e+" exists, but the property is not available.");return}if(P&&u+1>=r.length){var m=P(o,d);o=(p=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:o[d]}else p=V(o,d),o=o[d];p&&!a&&(O[s]=o)}}return o}},{"call-bind-apply-helpers/functionApply":26,"call-bind-apply-helpers/functionCall":27,"es-define-property":41,"es-errors":43,"es-errors/eval":42,"es-errors/range":44,"es-errors/ref":45,"es-errors/syntax":46,"es-errors/type":47,"es-errors/uri":48,"es-object-atoms":49,"function-bind":103,"get-proto":107,"get-proto/Object.getPrototypeOf":105,"get-proto/Reflect.getPrototypeOf":106,gopd:109,"has-symbols":110,hasown:112,"math-intrinsics/abs":128,"math-intrinsics/floor":129,"math-intrinsics/max":131,"math-intrinsics/min":132,"math-intrinsics/pow":133,"math-intrinsics/round":134,"math-intrinsics/sign":135}],105:[function(e,t,r){var i=e("es-object-atoms");t.exports=i.getPrototypeOf||null},{"es-object-atoms":49}],106:[function(e,t,r){t.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},{}],107:[function(e,t,r){var i=e("./Reflect.getPrototypeOf"),n=e("./Object.getPrototypeOf"),s=e("dunder-proto/get");t.exports=i?function(e){return i(e)}:n?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return n(e)}:s?function(e){return s(e)}:null},{"./Object.getPrototypeOf":105,"./Reflect.getPrototypeOf":106,"dunder-proto/get":40}],108:[function(e,t,r){t.exports=Object.getOwnPropertyDescriptor},{}],109:[function(e,t,r){var i=e("./gOPD");if(i)try{i([],"length")}catch(e){i=null}t.exports=i},{"./gOPD":108}],110:[function(e,t,r){var i="undefined"!=typeof Symbol&&Symbol,n=e("./shams");t.exports=function(){return"function"==typeof i&&("function"==typeof Symbol&&("symbol"==typeof i("foo")&&("symbol"==typeof Symbol("bar")&&n())))}},{"./shams":111}],111:[function(e,t,r){t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var i in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var s=Object.getOwnPropertyDescriptor(e,t);if(42!==s.value||!0!==s.enumerable)return!1}return!0}},{}],112:[function(e,t,r){var i=Function.prototype.call,n=Object.prototype.hasOwnProperty,s=e("function-bind");t.exports=s.call(i,n)},{"function-bind":103}],113:[function(e,t,r){var i=e("http"),n=e("url"),s=t.exports;for(var o in i)i.hasOwnProperty(o)&&(s[o]=i[o]);function a(e){if("string"==typeof e&&(e=n.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}s.request=function(e,t){return e=a(e),i.request.call(this,e,t)},s.get=function(e,t){return e=a(e),i.get.call(this,e,t)}},{http:167,url:188}],114:[function(e,t,r){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */r.read=function(e,t,r,i,n){var s,o,a=8*n-i-1,c=(1<<a)-1,l=c>>1,h=-7,u=r?n-1:0,p=r?-1:1,d=e[t+u];for(u+=p,s=d&(1<<-h)-1,d>>=-h,h+=a;h>0;s=256*s+e[t+u],u+=p,h-=8);for(o=s&(1<<-h)-1,s>>=-h,h+=i;h>0;o=256*o+e[t+u],u+=p,h-=8);if(0===s)s=1-l;else{if(s===c)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,i),s-=l}return(d?-1:1)*o*Math.pow(2,s-i)},r.write=function(e,t,r,i,n,s){var o,a,c,l=8*s-n-1,h=(1<<l)-1,u=h>>1,p=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:s-1,f=i?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=h):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+u>=1?p/c:p*Math.pow(2,1-u))*c>=2&&(o++,c/=2),o+u>=h?(a=0,o=h):o+u>=1?(a=(t*c-1)*Math.pow(2,n),o+=u):(a=t*Math.pow(2,u-1)*Math.pow(2,n),o=0));n>=8;e[r+d]=255&a,d+=f,a/=256,n-=8);for(o=o<<n|a,l+=n;l>0;e[r+d]=255&o,d+=f,o/=256,l-=8);e[r+d-f]|=128*g}},{}],115:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},{}],116:[function(e,t,r){t.exports=(e,t)=>t.startsWith(e)&&t.endsWith(e)?t.substring(1,t.length-1):t},{}],117:[function(e,t,r){let i=e("./Manyfest-LogToConsole.js");t.exports=class{constructor(e,t){this.logInfo="function"==typeof e?e:i,this.logError="function"==typeof t?t:i,this.translationTable={}}translationCount(){return Object.keys(this.translationTable).length}addTranslation(e){if("object"!=typeof e)return this.logError("Hash translation addTranslation expected a translation be type object but was passed in ".concat(typeof e)),!1;Object.keys(e).forEach(t=>{"string"!=typeof e[t]?this.logError("Hash translation addTranslation expected a translation destination hash for [".concat(t,"] to be a string but the referrant was a ").concat(typeof e[t])):this.translationTable[t]=e[t]})}removeTranslationHash(e){delete this.translationTable[e]}removeTranslation(e){if("string"==typeof e)return this.removeTranslationHash(e),!0;if("object"==typeof e){return Object.keys(e).forEach(e=>{this.removeTranslation(e)}),!0}return this.logError("Hash translation removeTranslation expected either a string or an object but the passed-in translation was type ".concat(typeof e)),!1}clearTranslations(){this.translationTable={}}translate(e){return e in this.translationTable?this.translationTable[e]:e}}},{"./Manyfest-LogToConsole.js":118}],118:[function(e,t,r){t.exports=(e,t)=>{let r="string"==typeof e?e:"";console.log("[Manyfest] ".concat(r)),t&&console.log(JSON.stringify(t))}},{}],119:[function(e,t,r){const i=e("./Manyfest-LogToConsole.js"),n=e("./Manyfest-ObjectAddress-GetValue.js"),s=e("./Manyfest-CleanWrapCharacters.js");let o={DataFormat:e("./Manyfest-ObjectAddress-Parser.js")};t.exports=class{constructor(e,t){this.logInfo="function"==typeof e?e:i,this.logError="function"==typeof t?t:i,this.getObjectValueClass=new n(this.logInfo,this.logError),this.cleanWrapCharacters=s}checkAddressExists(e,t,r){if("object"!=typeof e)return!1;if("string"!=typeof t)return!1;let n=void 0===r?e:r,s=o.DataFormat.stringGetFirstSegment(t);if(s.length==t.length){let r=t.indexOf("["),i=t.indexOf("]"),n=t.indexOf("(");if(n>0&&o.DataFormat.stringCountEnclosures(t)>0){let r=t.substring(0,n).trim();return r in e&&"function"==typeof e[r]}if(r>0&&i>r&&i-r>1){let n=t.substring(0,r).trim();if("object"!=typeof e[n])return!1;let s=t.substring(r+1,i).trim(),o=parseInt(s,10);return Array.isArray(e[n])!=isNaN(o)&&(isNaN(o)?(s=this.cleanWrapCharacters('"',s),s=this.cleanWrapCharacters("`",s),s=this.cleanWrapCharacters("'",s),s in e[n]):o in e[n])}return t in e}{let r=s,a=t.substring(s.length+1),c=r.indexOf("["),l=r.indexOf("]"),h=r.indexOf("(");if(h>0&&o.DataFormat.stringCountEnclosures(r)>0){let s=r.substring(0,h).trim();if("function"!=typeof e[s])return!1;let c=o.DataFormat.stringGetSegments(o.DataFormat.stringGetEnclosureValueByIndex(r.substring(s.length),0),",");if(0==c.length||""==c[0]){if(!(s in e))return i("Function ".concat(s," does not exist (address [").concat(t,"])")),!1;try{return this.checkAddressExists(e[s].apply(e),a,n)}catch(e){return i("Error calling function ".concat(s," (address [").concat(t,"]): ").concat(e.message)),!1}}else{let r=[];for(let e=0;e<c.length;e++)r.push(this.getObjectValueClass.getValueAtAddress(n,c[e]));if(!(s in e))return i("Function ".concat(s," does not exist (address [").concat(t,"])")),!1;try{return this.checkAddressExists(e[s].apply(e,r),a,n)}catch(e){return i("Error calling function ".concat(s," (address [").concat(t,"]): ").concat(e.message)),!1}}}else if(c>0&&l>c&&l-c>1){let t=r.substring(0,c).trim(),i=r.substring(c+1,l).trim(),s=parseInt(i,10);return Array.isArray(e[t])!=isNaN(s)&&(isNaN(s)?(i=this.cleanWrapCharacters('"',i),i=this.cleanWrapCharacters("`",i),i=this.cleanWrapCharacters("'",i),this.checkAddressExists(e[t][i],a,n)):this.checkAddressExists(e[t][s],a,n))}return(!(r in e)||"object"==typeof e[r])&&(r in e&&this.checkAddressExists(e[r],a,n))}}}},{"./Manyfest-CleanWrapCharacters.js":116,"./Manyfest-LogToConsole.js":118,"./Manyfest-ObjectAddress-GetValue.js":121,"./Manyfest-ObjectAddress-Parser.js":122}],120:[function(e,t,r){let i=e("./Manyfest-LogToConsole.js"),n=e("./Manyfest-CleanWrapCharacters.js"),s=e("../source/Manyfest-ParseConditionals.js"),o={DataFormat:e("./Manyfest-ObjectAddress-Parser.js")};t.exports=class{constructor(e,t){this.logInfo="function"==typeof e?e:i,this.logError="function"==typeof t?t:i,this.cleanWrapCharacters=n}checkRecordFilters(e,t){return s(this,e,t)}deleteValueAtAddress(e,t,r){if("object"!=typeof e)return;if("string"!=typeof t)return;let i="";"string"==typeof r&&(i=r);let n=o.DataFormat.stringGetFirstSegment(t);if(n.length==t.length){let r=t.indexOf("["),i=t.indexOf("]"),n=t.indexOf("{}");if(r>0&&i>r&&i-r>1){let n=t.substring(0,r).trim();if("object"!=typeof e[n])return!1;let s=t.substring(r+1,i).trim(),o=parseInt(s,10);return Array.isArray(e[n])!=isNaN(o)&&(isNaN(o)?(s=this.cleanWrapCharacters('"',s),s=this.cleanWrapCharacters("`",s),s=this.cleanWrapCharacters("'",s),delete e[n][s],!0):(delete e[n][o],!0))}if(r>0&&i>r&&i-r==1){let i=t.substring(0,r).trim();if(!Array.isArray(e[i]))return!1;let n=e[i];for(let e=n.length-1;e>=0;e--){this.checkRecordFilters(t,n[e])&&n.splice(e,1)}return!0}if(n>0){let r=t.substring(0,n).trim();return"object"==typeof e[r]&&(delete e[r],!0)}return delete e[t],!0}{let r=n,s=t.substring(n.length+1),o=r.indexOf("["),a=r.indexOf("]");if(o>0&&a>o&&a-o>1){let t=r.substring(0,o).trim(),n=r.substring(o+1,a).trim(),c=parseInt(n,10);return Array.isArray(e[t])!=isNaN(c)&&("object"==typeof e[t]&&(isNaN(c)?(n=this.cleanWrapCharacters('"',n),n=this.cleanWrapCharacters("`",n),n=this.cleanWrapCharacters("'",n),i="".concat(i).concat(i.length>0?".":"").concat(r),this.deleteValueAtAddress(e[t][n],s,i)):(i="".concat(i).concat(i.length>0?".":"").concat(r),this.deleteValueAtAddress(e[t][c],s,i))))}if(o>0&&a>o&&a-o==1){let r=t.substring(0,o).trim();if(!Array.isArray(e[r]))return!1;let n=e[r];i="".concat(i).concat(i.length>0?".":"").concat(r);let a={};for(let t=0;t<n.length;t++){let n="".concat(i,"[").concat(t,"]"),o=this.deleteValueAtAddress(e[r][t],s,n);a["".concat(n,".").concat(s)]=o}return a}let c=t.indexOf("{}");if(c>0){let r=t.substring(0,c).trim();if("object"!=typeof e[r])return!1;let n=e[r],o=Object.keys(n);i="".concat(i).concat(i.length>0?".":"").concat(r);let a={};for(let n=0;n<o.length;n++){let c="".concat(i,".").concat(o[n]),l=this.deleteValueAtAddress(e[r][o[n]],s,c);this.checkRecordFilters(t,l)&&(a["".concat(c,".").concat(s)]=l)}return a}return r in e&&"object"!=typeof e[r]?void 0:r in e?(i="".concat(i).concat(i.length>0?".":"").concat(r),this.deleteValueAtAddress(e[r],s,i)):(i="".concat(i).concat(i.length>0?".":"").concat(r),e[r]={},this.deleteValueAtAddress(e[r],s,i))}}}},{"../source/Manyfest-ParseConditionals.js":125,"./Manyfest-CleanWrapCharacters.js":116,"./Manyfest-LogToConsole.js":118,"./Manyfest-ObjectAddress-Parser.js":122}],121:[function(e,t,r){let i=e("./Manyfest-LogToConsole.js"),n=e("./Manyfest-CleanWrapCharacters.js"),s=e("../source/Manyfest-ParseConditionals.js"),o={DataFormat:e("./Manyfest-ObjectAddress-Parser.js")};t.exports=class{constructor(e,t){this.logInfo="function"==typeof e?e:i,this.logError="function"==typeof t?t:i,this.cleanWrapCharacters=n}checkRecordFilters(e,t){return s(this,e,t)}getValueAtAddress(e,t,r,i){if("object"!=typeof e)return;if(null===e)return;if("string"!=typeof t)return;let n="";"string"==typeof r&&(n=r);let s=void 0===i?e:i,a=o.DataFormat.stringGetFirstSegment(t);if(""==a){let e=o.DataFormat.stringGetSegments(n),r=0;for(let e=0;e<t.length&&"."==t.charAt(e);e++)r++;let i=e.length-r;if(i<0)return;{let n=t.slice(r);return i>0&&(n="".concat(e.slice(0,i).join("."),".").concat(n)),this.logInfo("Back-navigation detected. Recursing back to address [".concat(n,"]")),this.getValueAtAddress(s,n)}}if(a.length!=t.length){let r=a,i=t.substring(a.length+1),c=r.indexOf("["),l=r.indexOf("]"),h=r.indexOf("(");if(h>0&&o.DataFormat.stringCountEnclosures(r)>0){let a=r.substring(0,h).trim();if(n="".concat(n).concat(n.length>0?".":"").concat(r),"function"!=typeof e[a])return!1;let c=o.DataFormat.stringGetSegments(o.DataFormat.stringGetEnclosureValueByIndex(r.substring(a.length),0),",");if(0==c.length||""==c[0]){if(!(a in e))return console.log("Function ".concat(a," does not exist (address [").concat(t,"])")),!1;try{return this.getValueAtAddress(e[a].apply(e),i,n,s)}catch(e){return console.log("Error in getValueAtAddress calling function ".concat(a," (address [").concat(t,"]): ").concat(e.message)),!1}}else{let r=[];for(let e=0;e<c.length;e++)!(c[e].length>=2)||'"'!=c[e].charAt(0)&&"'"!=c[e].charAt(0)&&"`"!=c[e].charAt(0)||'"'!=c[e].charAt(c[e].length-1)&&"'"!=c[e].charAt(c[e].length-1)&&"`"!=c[e].charAt(c[e].length-1)?r.push(this.getValueAtAddress(s,c[e])):r.push(c[e].substring(1,c[e].length-1));if(!(a in e))return console.log("Function ".concat(a," does not exist (address [").concat(t,"])")),!1;try{return this.getValueAtAddress(e[a].apply(e,r),i,n,s)}catch(e){return console.log("Error in getValueAtAddress calling function ".concat(a," (address [").concat(t,"]): ").concat(e.message)),!1}}}else{if(c>0&&l>c&&l-c>1){let t=r.substring(0,c).trim(),o=r.substring(c+1,l).trim(),a=parseInt(o,10);if(Array.isArray(e[t])==isNaN(a))return;if("object"!=typeof e[t])return;return isNaN(a)?(o=this.cleanWrapCharacters('"',o),o=this.cleanWrapCharacters("`",o),o=this.cleanWrapCharacters("'",o),n="".concat(n).concat(n.length>0?".":"").concat(r),this.getValueAtAddress(e[t][o],i,n,s)):(n="".concat(n).concat(n.length>0?".":"").concat(r),this.getValueAtAddress(e[t][a],i,n,s))}if(c>0&&l>c&&l-c==1){let r=t.substring(0,c).trim();if(!Array.isArray(e[r]))return!1;let o=e[r];n="".concat(n).concat(n.length>0?".":"").concat(r);let a={};for(let t=0;t<o.length;t++){let o="".concat(n,"[").concat(t,"]"),c=this.getValueAtAddress(e[r][t],i,o,s);a["".concat(o,".").concat(i)]=c}return a}}let u=t.indexOf("{}");if(u>0){let r=t.substring(0,u).trim();if("object"!=typeof e[r])return!1;let o=e[r],a=Object.keys(o);n="".concat(n).concat(n.length>0?".":"").concat(r);let c={};for(let o=0;o<a.length;o++){let l="".concat(n,".").concat(a[o]),h=this.getValueAtAddress(e[r][a[o]],i,l,s);this.checkRecordFilters(t,h)&&(c["".concat(l,".").concat(i)]=h)}return c}return r in e&&"object"!=typeof e[r]?void 0:r in e?(n="".concat(n).concat(n.length>0?".":"").concat(r),this.getValueAtAddress(e[r],i,n,s)):(n="".concat(n).concat(n.length>0?".":"").concat(r),e[r]={},this.getValueAtAddress(e[r],i,n,s))}{let r=t.indexOf("["),i=t.indexOf("]"),n=t.indexOf("{}"),a=t.indexOf("(");if(!(a>0&&o.DataFormat.stringCountEnclosures(t)>0)){if(r>0&&i>r&&i-r>1){let n=t.substring(0,r).trim();if("object"!=typeof e[n])return;let s=t.substring(r+1,i).trim(),o=parseInt(s,10);if(Array.isArray(e[n])==isNaN(o))return;return isNaN(o)?(s=this.cleanWrapCharacters('"',s),s=this.cleanWrapCharacters("`",s),s=this.cleanWrapCharacters("'",s),e[n][s]):e[n][o]}if(r>0&&i>r&&i-r==1){let i=t.substring(0,r).trim();if(!Array.isArray(e[i]))return!1;let n=e[i],s=[];for(let e=0;e<n.length;e++){this.checkRecordFilters(t,n[e])&&s.push(n[e])}return s}if(n>0){let r=t.substring(0,n).trim();return"object"==typeof e[r]&&e[r]}return void 0!==e[t]?e[t]:void 0}{let r=t.substring(0,a).trim();if("function"!=typeof e[r])return!1;let i=o.DataFormat.stringGetSegments(o.DataFormat.stringGetEnclosureValueByIndex(t.substring(r.length),0),",");if(0==i.length||""==i[0]){if(!(r in e))return console.log("Function ".concat(r," does not exist (address [").concat(t,"])")),!1;try{return e[r].apply(e)}catch(e){return console.log("Error in getValueAtAddress calling function ".concat(r," (address [").concat(t,"]): ").concat(e.message)),!1}}else{let n=[];for(let e=0;e<i.length;e++)!(i[e].length>=2)||'"'!=i[e].charAt(0)&&"'"!=i[e].charAt(0)&&"`"!=i[e].charAt(0)||'"'!=i[e].charAt(i[e].length-1)&&"'"!=i[e].charAt(i[e].length-1)&&"`"!=i[e].charAt(i[e].length-1)?n.push(this.getValueAtAddress(s,i[e])):n.push(i[e].substring(1,i[e].length-1));if(!(r in e))return console.log("Function ".concat(r," does not exist (address [").concat(t,"])")),!1;try{return e[r].apply(e,n)}catch(e){return console.log("Error in getValueAtAddress calling function ".concat(r," (address [").concat(t,"]): ").concat(e.message)),!1}}}}}}},{"../source/Manyfest-ParseConditionals.js":125,"./Manyfest-CleanWrapCharacters.js":116,"./Manyfest-LogToConsole.js":118,"./Manyfest-ObjectAddress-Parser.js":122}],122:[function(e,t,r){const i={"{":0,"[":1,"(":2},n={"}":0,"]":1,")":2};t.exports={stringCountSegments:(e,t,r,s)=>{let o="string"==typeof e?e:"",a="string"==typeof t?t:".",c="object"==typeof r?r:i,l="object"==typeof s?s:n;if(o.length<1)return 0;let h=1,u=[];for(let e=0;e<o.length;e++)o[e]==a&&0==u.length?h++:o[e]in c?u.push(c[o[e]]):o[e]in l&&l[o[e]]==u[u.length-1]&&u.pop();return h},stringGetFirstSegment:(e,t,r,s)=>{let o="string"==typeof e?e:"",a="string"==typeof t?t:".",c="object"==typeof r?r:i,l="object"==typeof s?s:n;if(o.length<1)return"";let h=[];for(let e=0;e<o.length;e++){if(o[e]==a&&0==h.length)return o.substring(0,e);o[e]in c?h.push(c[o[e]]):o[e]in l&&l[o[e]]==h[h.length-1]&&h.pop()}return o},stringGetSegments:(e,t,r,s)=>{let o="string"==typeof e?e:"",a="string"==typeof t?t:".",c="object"==typeof r?r:i,l="object"==typeof s?s:n,h=0,u=[];if(o.length<1)return u;let p=[];for(let e=0;e<o.length;e++)o[e]==a&&0==p.length?(u.push(o.substring(h,e)),h=e+1):o[e]in c?p.push(c[o[e]]):o[e]in l&&l[o[e]]==p[p.length-1]&&p.pop();return h<o.length&&u.push(o.substring(h)),u},stringCountEnclosures:(e,t,r)=>{let i="string"==typeof e?e:"",n="string"==typeof t?t:"(",s="string"==typeof r?r:")",o=0,a=0;for(let e=0;e<i.length;e++)i[e]==n?(0==a&&o++,a++):i[e]==s&&a--;return o},stringGetEnclosureValueByIndex:(e,t,r,i)=>{let n="string"==typeof e?e:"",s="number"==typeof t?t:0,o="string"==typeof r?r:"(",a="string"==typeof i?i:")",c=0,l=0,h=!1,u=0,p=0;for(let e=0;e<n.length;e++)n[e]==o?(l++,1==l&&(c++,s==c-1&&(h=!0,u=e))):n[e]==a&&(l--,0==l&&h&&p<=u&&(p=e,h=!1));return c<=s?"":p>0&&p>u?n.substring(u+1,p):n.substring(u+1)}}},{}],123:[function(e,t,r){let i=e("./Manyfest-LogToConsole.js"),n=e("./Manyfest-CleanWrapCharacters.js"),s={DataFormat:e("./Manyfest-ObjectAddress-Parser.js")};t.exports=class{constructor(e,t){this.logInfo="function"==typeof e?e:i,this.logError="function"==typeof t?t:i,this.cleanWrapCharacters=n}setValueAtAddress(e,t,r){if("object"!=typeof e)return!1;if("string"!=typeof t)return!1;let i=s.DataFormat.stringGetFirstSegment(t);if(i.length==t.length){let i=t.indexOf("["),n=t.indexOf("]");if(i>0&&n>i&&n-i>1){let s=t.substring(0,i).trim(),o=t.substring(i+1,n).trim(),a=parseInt(o,10),c=!isNaN(a);if(null==e[s]&&(e[s]=c?[]:{}),"object"!=typeof e[s])return!1;if(Array.isArray(e[s])==isNaN(a))return!1;if(isNaN(a))return o=this.cleanWrapCharacters('"',o),o=this.cleanWrapCharacters("`",o),o=this.cleanWrapCharacters("'",o),o in e[s]||(e[s][o]={}),e[s][o]=r,!0;for(;e[s].length<a+1;)e[s].push({});return e[s][a]=r,!0}return e[t]=r,!0}{let n=i,s=t.substring(i.length+1),o=n.indexOf("["),a=n.indexOf("]");if(o>0&&a>o&&a-o>1){let t=n.substring(0,o).trim(),i=n.substring(o+1,a).trim(),c=parseInt(i,10),l=!isNaN(c);if(null==e[t]&&(e[t]=l?[]:{}),Array.isArray(e[t])!=l)return!1;if(isNaN(c))return i=this.cleanWrapCharacters('"',i),i=this.cleanWrapCharacters("`",i),i=this.cleanWrapCharacters("'",i),i in e[t]||(e[t][i]={}),this.setValueAtAddress(e[t][i],s,r);for(;e[t].length<c+1;)e[t].push({});return this.setValueAtAddress(e[t][c],s,r)}return n in e&&"object"!=typeof e[n]?("__ERROR"in e||(e.__ERROR={}),e.__ERROR[t]=r,!1):(n in e||(e[n]={}),this.setValueAtAddress(e[n],s,r))}}}},{"./Manyfest-CleanWrapCharacters.js":116,"./Manyfest-LogToConsole.js":118,"./Manyfest-ObjectAddress-Parser.js":122}],124:[function(e,t,r){let i=e("./Manyfest-LogToConsole.js");t.exports=class{constructor(e,t){this.logInfo="function"==typeof e?e:i,this.logError="function"==typeof t?t:i}generateAddressses(e,t,r){let i="string"==typeof t?t:"",n="object"==typeof r?r:{},s=typeof e,o={Address:i,Hash:i,Name:i,InSchema:!1};switch("object"==s&&null==e&&(s="undefined"),s){case"string":o.DataType="String",o.Default=e,n[i]=o;break;case"number":case"bigint":o.DataType="Number",o.Default=e,n[i]=o;break;case"undefined":o.DataType="Any",o.Default=e,n[i]=o;break;case"object":if(Array.isArray(e)){o.DataType="Array",""!=i&&(n[i]=o);for(let t=0;t<e.length;t++)this.generateAddressses(e[t],"".concat(i,"[").concat(t,"]"),n)}else{o.DataType="Object",""!=i&&(n[i]=o,i+=".");let t=Object.keys(e);for(let r=0;r<t.length;r++)this.generateAddressses(e[t[r]],"".concat(i).concat(t[r]),n)}}return n}}},{"./Manyfest-LogToConsole.js":118}],125:[function(e,t,r){const i="<<~?",n="?~>>",s=(e,t,r,i,n)=>{switch(i){case"TRUE":return!0===e.getValueAtAddress(t,r);case"FALSE":return!1===e.getValueAtAddress(t,r);case"LNGT":case"LENGTH_GREATER_THAN":switch(typeof e.getValueAtAddress(t,r)){case"string":case"object":return e.getValueAtAddress(t,r).length>n;default:return!1}break;case"LNLT":case"LENGTH_LESS_THAN":switch(typeof e.getValueAtAddress(t,r)){case"string":case"object":return e.getValueAtAddress(t,r).length<n;default:return!1}break;case"!=":return e.getValueAtAddress(t,r)!=n;case"<":return e.getValueAtAddress(t,r)<n;case">":return e.getValueAtAddress(t,r)>n;case"<=":return e.getValueAtAddress(t,r)<=n;case">=":return e.getValueAtAddress(t,r)>=n;case"===":return e.getValueAtAddress(t,r)===n;default:return e.getValueAtAddress(t,r)==n}};t.exports=(e,t,r)=>{let o=!0,a=t.indexOf(i);for(;-1!=a;){let c=t.indexOf(n,a+4);if(-1!=c){let n=t.substring(a+4,c).split(","),l=n[0],h="EXISTS";n.length>1&&(h=n[1]);let u=!1;n.length>2&&(u=n[2]),o=o&&s(e,r,l,h,u),a=t.indexOf(i,c+4)}else a=-1}return o}},{}],126:[function(e,t,r){let i=e("./Manyfest-LogToConsole.js");t.exports=class{constructor(e,t){this.logInfo="function"==typeof e?e:i,this.logError="function"==typeof t?t:i}resolveAddressMappings(e,t){if("object"!=typeof e)return this.logError("Attempted to resolve address mapping but the descriptor was not an object."),!1;if("object"!=typeof t)return!0;let r=Object.keys(e),i={};return r.forEach(t=>{"Hash"in e[t]&&(i[e[t].Hash]=t)}),Object.keys(t).forEach(r=>{let n,s=t[r],o=null;r in e?o=r:r in i&&(o=i[r]),o?(n=e[o],delete e[o]):n={Hash:r},e[s]=n}),!0}safeResolveAddressMappings(e,t){let r=JSON.parse(JSON.stringify(e));return this.resolveAddressMappings(r,t),r}mergeAddressMappings(e,t){if("object"!=typeof t||"object"!=typeof e)return this.logError("Attempted to merge two schema descriptors but both were not objects."),!1;let r=JSON.parse(JSON.stringify(t)),i=JSON.parse(JSON.stringify(e));return Object.keys(r).forEach(e=>{e in i||(i[e]=r[e])}),i}}},{"./Manyfest-LogToConsole.js":118}],127:[function(e,t,r){const i=e("fable-serviceproviderbase");let n=e("./Manyfest-LogToConsole.js"),s=e("./Manyfest-HashTranslation.js"),o=e("./Manyfest-ObjectAddress-CheckAddressExists.js"),a=e("./Manyfest-ObjectAddress-GetValue.js"),c=e("./Manyfest-ObjectAddress-SetValue.js"),l=e("./Manyfest-ObjectAddress-DeleteValue.js"),h=e("./Manyfest-ObjectAddressGeneration.js"),u=e("./Manyfest-SchemaManipulation.js");const p={Scope:"DEFAULT",Descriptors:{}};class d extends i{constructor(e,t,r){void 0===e?super({}):super(e,t,r),this.fable,this.options,this.Hash,this.UUID,this.serviceType="Manifest",this.logInfo=n,this.logError=n,this.objectAddressCheckAddressExists=new o(this.logInfo,this.logError),this.objectAddressGetValue=new a(this.logInfo,this.logError),this.objectAddressSetValue=new c(this.logInfo,this.logError),this.objectAddressDeleteValue=new l(this.logInfo,this.logError),"defaultValues"in this.options||(this.options.defaultValues={String:"",Number:0,Float:0,Integer:0,PreciseNumber:"0.0",Boolean:!1,Binary:0,DateTime:0,Array:[],Object:{},Null:null}),"strict"in this.options||(this.options.strict=!1),this.scope=void 0,this.elementAddresses=void 0,this.elementHashes=void 0,this.elementDescriptors=void 0,this.reset(),"object"==typeof this.options&&this.loadManifest(this.options),this.schemaManipulations=new u(this.logInfo,this.logError),this.objectAddressGeneration=new h(this.logInfo,this.logError),this.hashTranslations=new s(this.logInfo,this.logError),this.numberRegex=/^[+-]?(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?$/}reset(){this.scope="DEFAULT",this.elementAddresses=[],this.elementHashes={},this.elementDescriptors={}}clone(){let e=JSON.parse(JSON.stringify(this.options)),t=new d(this.fable,e,this.Hash);t.logInfo=this.logInfo,t.logError=this.logError;const{Scope:r,Descriptors:i,HashTranslations:n}=this.getManifest();t.scope=r,t.elementDescriptors=i,t.elementAddresses=Object.keys(i);for(let e=0;e<t.elementAddresses.length;e++){let r=t.elementAddresses[e],i=t.elementDescriptors[r];t.elementHashes[r]=r,"Hash"in i&&(t.elementHashes[i.Hash]=r)}return t.hashTranslations.addTranslation(this.hashTranslations.translationTable),t}deserialize(e){return this.loadManifest(JSON.parse(e)),this}loadManifest(e){"object"!=typeof e&&this.logError("(".concat(this.scope,") Error loading manifest; expecting an object but parameter was type ").concat(typeof e,"."));let t="object"==typeof e?e:{},r=Object.keys(p);for(let e=0;e<r.length;e++)r[e]in t||(t[r[e]]=JSON.parse(JSON.stringify(p[r[e]])));if("Scope"in t?"string"==typeof t.Scope?this.scope=t.Scope:this.logError("(".concat(this.scope,") Error loading scope from manifest; expecting a string but property was type ").concat(typeof t.Scope,"."),t):this.logError("(".concat(this.scope,') Error loading scope from manifest object. Property "Scope" does not exist in the root of the object.'),t),"Descriptors"in t)if("object"==typeof t.Descriptors){let e=Object.keys(t.Descriptors);for(let r=0;r<e.length;r++)this.addDescriptor(e[r],t.Descriptors[e[r]])}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 t.Descriptors,"."),t);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.'),t);"HashTranslations"in t&&"object"==typeof t.HashTranslations&&this.hashTranslations.addTranslation(t.HashTranslations)}serialize(){return JSON.stringify(this.getManifest())}getManifest(){return{Scope:this.scope,Descriptors:JSON.parse(JSON.stringify(this.elementDescriptors)),HashTranslations:JSON.parse(JSON.stringify(this.hashTranslations.translationTable))}}addDescriptor(e,t){return"object"==typeof t?("Address"in t||(t.Address=e),e in this.elementDescriptors||this.elementAddresses.push(e),this.elementDescriptors[e]=t,this.elementHashes[e]=e,"Hash"in t?this.elementHashes[t.Hash]=e:t.Hash=e,!0):(this.logError("(".concat(this.scope,") Error loading object descriptor for address '").concat(e,"' from manifest object. Expecting an object but property was type ").concat(typeof t,".")),!1)}getDescriptorByHash(e){return this.getDescriptor(this.resolveHashAddress(e))}getDescriptor(e){return this.elementDescriptors[e]}eachDescriptor(e){let t=Object.keys(this.elementDescriptors);for(let r=0;r<t.length;r++)e(this.elementDescriptors[t[r]])}checkAddressExistsByHash(e,t){return this.checkAddressExists(e,this.resolveHashAddress(t))}checkAddressExists(e,t){return this.objectAddressCheckAddressExists.checkAddressExists(e,t)}resolveHashAddress(e){let t,r=e in this.elementHashes,i=e in this.hashTranslations.translationTable;return t=r&&!i?this.elementHashes[e]:i&&this.hashTranslations.translate(e)in this.elementHashes?this.elementHashes[this.hashTranslations.translate(e)]:i?this.hashTranslations.translate(e):e,t}getValueByHash(e,t){let r=this.getValueAtAddress(e,this.resolveHashAddress(t));return void 0===r&&(r=this.getDefaultValue(this.getDescriptorByHash(t))),r}lintAddress(e){if("string"!=typeof e)return"";let t=e.trim();return t.endsWith(".")&&!t.endsWith("..")&&(t=t.slice(0,-1)),t}getValueAtAddress(e,t){let r=this.lintAddress(t);if(""==r)return void this.logError("(".concat(this.scope,") Error getting value at address; address is an empty string."),e);let i=this.objectAddressGetValue.getValueAtAddress(e,r);return void 0===i&&(i=this.getDefaultValue(this.getDescriptor(r))),i}setValueByHash(e,t,r){return this.setValueAtAddress(e,this.resolveHashAddress(t),r)}setValueAtAddress(e,t,r){let i=this.lintAddress(t);return this.objectAddressSetValue.setValueAtAddress(e,i,r)}deleteValueByHash(e,t){return this.deleteValueAtAddress(e,this.resolveHashAddress(t))}deleteValueAtAddress(e,t){let r=this.lintAddress(t);return this.objectAddressDeleteValue.deleteValueAtAddress(e,r)}validate(e){let t={Error:null,Errors:[],MissingElements:[]};"object"!=typeof e&&(t.Error=!0,t.Errors.push("Expected passed in object to be type object but was passed in ".concat(typeof e)));let r=(e,r)=>{t.Error=!0,t.Errors.push('Element at address "'.concat(e,'" ').concat(r,"."))};for(let i=0;i<this.elementAddresses.length;i++){let n=this.getDescriptor(this.elementAddresses[i]),s=this.checkAddressExists(e,n.Address),o=this.getValueAtAddress(e,n.Address);if(void 0!==o&&s||(t.MissingElements.push(n.Address),(n.Required||this.options.strict)&&r(n.Address,"is flagged REQUIRED but is not set in the object")),n.DataType){let e=typeof o;switch(n.DataType.toString().trim().toLowerCase()){case"string":"string"!=e&&r(n.Address,"has a DataType ".concat(n.DataType," but is of the type ").concat(e));break;case"precisenumber":"string"!=e?r(n.Address,"has a DataType ".concat(n.DataType," but is of the type ").concat(e)):this.numberRegex.test(o)||r(n.Address,"has a DataType ".concat(n.DataType," but is not a valid number"));break;case"number":case"float":"number"!=e&&r(n.Address,"has a DataType ".concat(n.DataType," but is of the type ").concat(e));break;case"integer":if("number"!=e)r(n.Address,"has a DataType ".concat(n.DataType," but is of the type ").concat(e));else{o.toString().indexOf(".")>-1&&r(n.Address,"has a DataType ".concat(n.DataType," but has a decimal point in the number."))}break;case"boolean":"boolean"!=e&&r(n.Address,"has a DataType ".concat(n.DataType," but is of the type ").concat(e));break;case"datetime":"Invalid Date"==new Date(o).toString()&&r(n.Address,"has a DataType ".concat(n.DataType," but is not parsable as a Date by Javascript"));break;default:"string"!=e&&r(n.Address,"has a DataType ".concat(n.DataType," (which auto-converted to String because it was unrecognized) but is of the type ").concat(e))}}}return t}getDefaultValue(e){if("object"==typeof e){if("Default"in e)return e.Default;{let t="DataType"in e?e.DataType:"String";if(t in this.options.defaultValues){let e=this.options.defaultValues[t];return"object"==typeof e&&null!==e?JSON.parse(JSON.stringify(e)):e}return null}}}populateDefaults(e,t){return this.populateObject(e,t,e=>"Default"in e)}populateObject(e,t,r){let i="object"==typeof e?e:{},n=void 0!==t&&t,s="function"==typeof r?r:e=>!0;return this.elementAddresses.forEach(e=>{let t=this.getDescriptor(e);s(t)&&(!n&&this.checkAddressExists(i,e)||this.setValueAtAddress(i,e,this.getDefaultValue(t)))}),i}}t.exports=d},{"./Manyfest-HashTranslation.js":117,"./Manyfest-LogToConsole.js":118,"./Manyfest-ObjectAddress-CheckAddressExists.js":119,"./Manyfest-ObjectAddress-DeleteValue.js":120,"./Manyfest-ObjectAddress-GetValue.js":121,"./Manyfest-ObjectAddress-SetValue.js":123,"./Manyfest-ObjectAddressGeneration.js":124,"./Manyfest-SchemaManipulation.js":126,"fable-serviceproviderbase":59}],128:[function(e,t,r){t.exports=Math.abs},{}],129:[function(e,t,r){t.exports=Math.floor},{}],130:[function(e,t,r){t.exports=Number.isNaN||function(e){return e!=e}},{}],131:[function(e,t,r){t.exports=Math.max},{}],132:[function(e,t,r){t.exports=Math.min},{}],133:[function(e,t,r){t.exports=Math.pow},{}],134:[function(e,t,r){t.exports=Math.round},{}],135:[function(e,t,r){var i=e("./isNaN");t.exports=function(e){return i(e)||0===e?e:e<0?-1:1}},{"./isNaN":130}],136:[function(e,t,r){(function(r){(function(){var i="function"==typeof Map&&Map.prototype,n=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,s=i&&n&&"function"==typeof n.get?n.get:null,o=i&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=a&&c&&"function"==typeof c.get?c.get:null,h=a&&Set.prototype.forEach,u="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,d="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,f=Boolean.prototype.valueOf,g=Object.prototype.toString,m=Function.prototype.toString,y=String.prototype.match,b=String.prototype.slice,v=String.prototype.replace,T=String.prototype.toUpperCase,P=String.prototype.toLowerCase,S=RegExp.prototype.test,A=Array.prototype.concat,w=Array.prototype.join,E=Array.prototype.slice,x=Math.floor,C="function"==typeof BigInt?BigInt.prototype.valueOf:null,D=Object.getOwnPropertySymbols,R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,k="function"==typeof Symbol&&"object"==typeof Symbol.iterator,N="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===k||"symbol")?Symbol.toStringTag:null,j=Object.prototype.propertyIsEnumerable,O=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function I(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||S.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var i=e<0?-x(-e):x(e);if(i!==e){var n=String(i),s=b.call(t,n.length+1);return v.call(n,r,"$&_")+"."+v.call(v.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(t,r,"$&_")}var M=e("./util.inspect"),L=M.custom,F=W(L)?L:null,V={__proto__:null,double:'"',single:"'"},_={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function B(e,t,r){var i=r.quoteStyle||t,n=V[i];return n+e+n}function U(e){return v.call(String(e),/"/g,"&quot;")}function H(e){return!N||!("object"==typeof e&&(N in e||void 0!==e[N]))}function z(e){return"[object Array]"===G(e)&&H(e)}function J(e){return"[object RegExp]"===G(e)&&H(e)}function W(e){if(k)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!R)return!1;try{return R.call(e),!0}catch(e){}return!1}t.exports=function e(t,i,n,a){var c=i||{};if($(c,"quoteStyle")&&!$(V,c.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if($(c,"maxStringLength")&&("number"==typeof c.maxStringLength?c.maxStringLength<0&&c.maxStringLength!==1/0:null!==c.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var g=!$(c,"customInspect")||c.customInspect;if("boolean"!=typeof g&&"symbol"!==g)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if($(c,"indent")&&null!==c.indent&&"\t"!==c.indent&&!(parseInt(c.indent,10)===c.indent&&c.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if($(c,"numericSeparator")&&"boolean"!=typeof c.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var T=c.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return Y(t,c);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var S=String(t);return T?I(t,S):S}if("bigint"==typeof t){var x=String(t)+"n";return T?I(t,x):x}var D=void 0===c.depth?5:c.depth;if(void 0===n&&(n=0),n>=D&&D>0&&"object"==typeof t)return z(t)?"[Array]":"[Object]";var L=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=w.call(Array(e.indent+1)," ")}return{base:r,prev:w.call(Array(t+1),r)}}(c,n);if(void 0===a)a=[];else if(K(a,t)>=0)return"[Circular]";function _(t,r,i){if(r&&(a=E.call(a)).push(r),i){var s={depth:c.depth};return $(c,"quoteStyle")&&(s.quoteStyle=c.quoteStyle),e(t,s,n+1,a)}return e(t,c,n+1,a)}if("function"==typeof t&&!J(t)){var q=function(e){if(e.name)return e.name;var t=y.call(m.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),Q=re(t,_);return"[Function"+(q?": "+q:" (anonymous)")+"]"+(Q.length>0?" { "+w.call(Q,", ")+" }":"")}if(W(t)){var ie=k?v.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):R.call(t);return"object"!=typeof t||k?ie:X(ie)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var ne="<"+P.call(String(t.nodeName)),se=t.attributes||[],oe=0;oe<se.length;oe++)ne+=" "+se[oe].name+"="+B(U(se[oe].value),"double",c);return ne+=">",t.childNodes&&t.childNodes.length&&(ne+="..."),ne+="</"+P.call(String(t.nodeName))+">"}if(z(t)){if(0===t.length)return"[]";var ae=re(t,_);return L&&!function(e){for(var t=0;t<e.length;t++)if(K(e[t],"\n")>=0)return!1;return!0}(ae)?"["+te(ae,L)+"]":"[ "+w.call(ae,", ")+" ]"}if(function(e){return"[object Error]"===G(e)&&H(e)}(t)){var ce=re(t,_);return"cause"in Error.prototype||!("cause"in t)||j.call(t,"cause")?0===ce.length?"["+String(t)+"]":"{ ["+String(t)+"] "+w.call(ce,", ")+" }":"{ ["+String(t)+"] "+w.call(A.call("[cause]: "+_(t.cause),ce),", ")+" }"}if("object"==typeof t&&g){if(F&&"function"==typeof t[F]&&M)return M(t,{depth:D-n});if("symbol"!==g&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!s||!e||"object"!=typeof e)return!1;try{s.call(e);try{l.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var le=[];return o&&o.call(t,function(e,r){le.push(_(r,t,!0)+" => "+_(e,t))}),ee("Map",s.call(t),le,L)}if(function(e){if(!l||!e||"object"!=typeof e)return!1;try{l.call(e);try{s.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var he=[];return h&&h.call(t,function(e){he.push(_(e,t))}),ee("Set",l.call(t),he,L)}if(function(e){if(!u||!e||"object"!=typeof e)return!1;try{u.call(e,u);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Z("WeakMap");if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{u.call(e,u)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Z("WeakSet");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{return d.call(e),!0}catch(e){}return!1}(t))return Z("WeakRef");if(function(e){return"[object Number]"===G(e)&&H(e)}(t))return X(_(Number(t)));if(function(e){if(!e||"object"!=typeof e||!C)return!1;try{return C.call(e),!0}catch(e){}return!1}(t))return X(_(C.call(t)));if(function(e){return"[object Boolean]"===G(e)&&H(e)}(t))return X(f.call(t));if(function(e){return"[object String]"===G(e)&&H(e)}(t))return X(_(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&t===globalThis||void 0!==r&&t===r)return"{ [object globalThis] }";if(!function(e){return"[object Date]"===G(e)&&H(e)}(t)&&!J(t)){var ue=re(t,_),pe=O?O(t)===Object.prototype:t instanceof Object||t.constructor===Object,de=t instanceof Object?"":"null prototype",fe=!pe&&N&&Object(t)===t&&N in t?b.call(G(t),8,-1):de?"Object":"",ge=(pe||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fe||de?"["+w.call(A.call([],fe||[],de||[]),": ")+"] ":"");return 0===ue.length?ge+"{}":L?ge+"{"+te(ue,L)+"}":ge+"{ "+w.call(ue,", ")+" }"}return String(t)};var q=Object.prototype.hasOwnProperty||function(e){return e in this};function $(e,t){return q.call(e,t)}function G(e){return g.call(e)}function K(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}function Y(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,i="... "+r+" more character"+(r>1?"s":"");return Y(b.call(e,0,t.maxStringLength),t)+i}var n=_[t.quoteStyle||"single"];return n.lastIndex=0,B(v.call(v.call(e,n,"\\$1"),/[\x00-\x1f]/g,Q),"single",t)}function Q(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+T.call(t.toString(16))}function X(e){return"Object("+e+")"}function Z(e){return e+" { ? }"}function ee(e,t,r,i){return e+" ("+t+") {"+(i?te(r,i):w.call(r,", "))+"}"}function te(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+w.call(e,","+r)+"\n"+t.prev}function re(e,t){var r=z(e),i=[];if(r){i.length=e.length;for(var n=0;n<e.length;n++)i[n]=$(e,n)?t(e[n],e):""}var s,o="function"==typeof D?D(e):[];if(k){s={};for(var a=0;a<o.length;a++)s["$"+o[a]]=o[a]}for(var c in e)$(e,c)&&(r&&String(Number(c))===c&&c<e.length||k&&s["$"+c]instanceof Symbol||(S.call(/[^\w$]/,c)?i.push(t(c,e)+": "+t(e[c],e)):i.push(c+": "+t(e[c],e))));if("function"==typeof D)for(var l=0;l<o.length;l++)j.call(e,o[l])&&i.push("["+t(o[l])+"]: "+t(e[o[l]],e));return i}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./util.inspect":18}],137:[function(e,t,r){var i=e("wrappy");function n(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function s(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}t.exports=i(n),t.exports.strict=i(s),n.proto=n(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return n(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return s(this)},configurable:!0})})},{wrappy:190}],138:[function(e,t,r){(function(e){(function(){function r(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function i(e,t){for(var r,i="",n=0,s=-1,o=0,a=0;a<=e.length;++a){if(a<e.length)r=e.charCodeAt(a);else{if(47===r)break;r=47}if(47===r){if(s===a-1||1===o);else if(s!==a-1&&2===o){if(i.length<2||2!==n||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){var c=i.lastIndexOf("/");if(c!==i.length-1){-1===c?(i="",n=0):n=(i=i.slice(0,c)).length-1-i.lastIndexOf("/"),s=a,o=0;continue}}else if(2===i.length||1===i.length){i="",n=0,s=a,o=0;continue}t&&(i.length>0?i+="/..":i="..",n=2)}else i.length>0?i+="/"+e.slice(s+1,a):i=e.slice(s+1,a),n=a-s-1;s=a,o=0}else 46===r&&-1!==o?++o:o=-1}return i}var n={resolve:function(){for(var t,n="",s=!1,o=arguments.length-1;o>=-1&&!s;o--){var a;o>=0?a=arguments[o]:(void 0===t&&(t=e.cwd()),a=t),r(a),0!==a.length&&(n=a+"/"+n,s=47===a.charCodeAt(0))}return n=i(n,!s),s?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(e){if(r(e),0===e.length)return".";var t=47===e.charCodeAt(0),n=47===e.charCodeAt(e.length-1);return 0!==(e=i(e,!t)).length||t||(e="."),e.length>0&&n&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return r(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var i=arguments[t];r(i),i.length>0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":n.normalize(e)},relative:function(e,t){if(r(e),r(t),e===t)return"";if((e=n.resolve(e))===(t=n.resolve(t)))return"";for(var i=1;i<e.length&&47===e.charCodeAt(i);++i);for(var s=e.length,o=s-i,a=1;a<t.length&&47===t.charCodeAt(a);++a);for(var c=t.length-a,l=o<c?o:c,h=-1,u=0;u<=l;++u){if(u===l){if(c>l){if(47===t.charCodeAt(a+u))return t.slice(a+u+1);if(0===u)return t.slice(a+u)}else o>l&&(47===e.charCodeAt(i+u)?h=u:0===u&&(h=0));break}var p=e.charCodeAt(i+u);if(p!==t.charCodeAt(a+u))break;47===p&&(h=u)}var d="";for(u=i+h+1;u<=s;++u)u!==s&&47!==e.charCodeAt(u)||(0===d.length?d+="..":d+="/..");return d.length>0?d+t.slice(a+h):(a+=h,47===t.charCodeAt(a)&&++a,t.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(r(e),0===e.length)return".";for(var t=e.charCodeAt(0),i=47===t,n=-1,s=!0,o=e.length-1;o>=1;--o)if(47===(t=e.charCodeAt(o))){if(!s){n=o;break}}else s=!1;return-1===n?i?"/":".":i&&1===n?"//":e.slice(0,n)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');r(e);var i,n=0,s=-1,o=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,c=-1;for(i=e.length-1;i>=0;--i){var l=e.charCodeAt(i);if(47===l){if(!o){n=i+1;break}}else-1===c&&(o=!1,c=i+1),a>=0&&(l===t.charCodeAt(a)?-1===--a&&(s=i):(a=-1,s=c))}return n===s?s=c:-1===s&&(s=e.length),e.slice(n,s)}for(i=e.length-1;i>=0;--i)if(47===e.charCodeAt(i)){if(!o){n=i+1;break}}else-1===s&&(o=!1,s=i+1);return-1===s?"":e.slice(n,s)},extname:function(e){r(e);for(var t=-1,i=0,n=-1,s=!0,o=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===n&&(s=!1,n=a+1),46===c?-1===t?t=a:1!==o&&(o=1):-1!==t&&(o=-1);else if(!s){i=a+1;break}}return-1===t||-1===n||0===o||1===o&&t===n-1&&t===i+1?"":e.slice(t,n)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var r=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+i:r+e+i:i}("/",e)},parse:function(e){r(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var i,n=e.charCodeAt(0),s=47===n;s?(t.root="/",i=1):i=0;for(var o=-1,a=0,c=-1,l=!0,h=e.length-1,u=0;h>=i;--h)if(47!==(n=e.charCodeAt(h)))-1===c&&(l=!1,c=h+1),46===n?-1===o?o=h:1!==u&&(u=1):-1!==o&&(u=-1);else if(!l){a=h+1;break}return-1===o||-1===c||0===u||1===u&&o===c-1&&o===a+1?-1!==c&&(t.base=t.name=0===a&&s?e.slice(1,c):e.slice(a,c)):(0===a&&s?(t.name=e.slice(1,o),t.base=e.slice(1,c)):(t.name=e.slice(a,o),t.base=e.slice(a,c)),t.ext=e.slice(o,c)),a>0?t.dir=e.slice(0,a-1):s&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,t.exports=n}).call(this)}).call(this,e("_process"))},{_process:150}],139:[function(e,t,r){t.exports={name:"pict-application",version:"1.0.32",description:"Application base class for a pict view-based application",main:"source/Pict-Application.js",scripts:{test:"npx mocha -u tdd -R spec",start:"node source/Pict-Application.js",coverage:"npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-application-image:local","docker-dev-run":'docker run -it -d --name pict-application-dev -p 30001:8080 -p 38086:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-application" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-application-image:local',"docker-dev-shell":"docker exec -it pict-application-dev /bin/bash",tests:"npx mocha -u tdd --exit -R spec --grep",lint:"eslint source/**",types:"tsc -p ."},types:"types/source/Pict-Application.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-application.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-application/issues"},homepage:"https://github.com/stevenvelozo/pict-application#readme",devDependencies:{"@eslint/js":"^9.28.0","browser-env":"^3.3.0",eslint:"^9.28.0",pict:"^1.0.348","pict-provider":"^1.0.10","pict-view":"^1.0.66",quackage:"^1.0.51",typescript:"^5.9.3"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},dependencies:{"fable-serviceproviderbase":"^3.0.18"}}},{}],140:[function(e,t,r){const i=e("fable-serviceproviderbase"),n=e("../package.json"),s={Name:"DefaultPictApplication",MainViewportViewIdentifier:"Default-View",MainViewportRenderableHash:!1,MainViewportDestinationAddress:!1,MainViewportDefaultDataAddress:!1,AutoSolveAfterInitialize:!0,AutoRenderMainViewportViewAfterInitialize:!0,AutoRenderViewsAfterInitialize:!1,AutoLoginAfterInitialize:!1,AutoLoadDataAfterLogin:!1,ConfigurationOnlyViews:[],Manifests:{},IdentifierAddressPrefix:"PICT-"};t.exports=class extends i{constructor(e,t,r){let i="object"==typeof e.settings.PictApplicationConfiguration?e.settings.PictApplicationConfiguration:{};super(e,Object.assign({},JSON.parse(JSON.stringify(s)),i,t),r),this.options,this.log,this.fable,this.UUID,this.Hash,this.servicesMap,this.serviceType="PictApplication",this._Package=n,this.pict=this.fable,this.AppData=this.fable.AppData,this.Bundle=this.fable.Bundle,this.initializeTimestamp,this.lastSolvedTimestamp,this.lastLoginTimestamp,this.lastMarshalFromViewsTimestamp,this.lastMarshalToViewsTimestamp,this.lastAutoRenderTimestamp,this.lastLoadDataTimestamp;let o=Object.keys(this.options.Manifests);if(o.length>0)for(let e=0;e<o.length;e++){let t=o[e];this.fable.instantiateServiceProvider("Manifest",this.options.Manifests[t],t)}}onPreSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onPreSolve:")),!0}onPreSolveAsync(e){return this.onPreSolve(),e()}onBeforeSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeSolve:")),!0}onBeforeSolveAsync(e){return this.onBeforeSolve(),e()}onSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onSolve:")),!0}onSolveAsync(e){return this.onSolve(),e()}solve(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing solve() function..."));let e=Object.keys(this.pict.providers),t=[];for(let r=0;r<e.length;r++){let i=this.pict.providers[e[r]];i.options.AutoSolveWithApp&&t.push(i)}t.sort((e,t)=>e.options.AutoSolveOrdinal-t.options.AutoSolveOrdinal);for(let e=0;e<t.length;e++)t[e].solve(t[e]);this.onBeforeSolve();let r=Object.keys(this.pict.views),i=[];for(let e=0;e<r.length;e++){let t=this.pict.views[r[e]];t.options.AutoInitialize&&i.push(t)}i.sort((e,t)=>e.options.AutoInitializeOrdinal-t.options.AutoInitializeOrdinal);for(let e=0;e<i.length;e++)i[e].solve();return this.onSolve(),this.onAfterSolve(),this.lastSolvedTimestamp=this.fable.log.getTimeStamp(),!0}solveAsync(e){let t=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");t.anticipate(this.onBeforeSolveAsync.bind(this));let r="function"==typeof e&&e;r||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),r=e=>{e&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync Auto Callback Error: ").concat(e),e)});let i=Object.keys(this.pict.providers),n=[];for(let e=0;e<i.length;e++){let t=this.pict.providers[i[e]];t.options.AutoSolveWithApp&&n.push(t)}n.sort((e,t)=>e.options.AutoSolveOrdinal-t.options.AutoSolveOrdinal);for(let e=0;e<n.length;e++)t.anticipate(n[e].solveAsync.bind(n[e]));let s=Object.keys(this.pict.views),o=[];for(let e=0;e<s.length;e++){let t=this.pict.views[s[e]];t.options.AutoSolveWithApp&&o.push(t)}o.sort((e,t)=>e.options.AutoSolveOrdinal-t.options.AutoSolveOrdinal);for(let e=0;e<o.length;e++)t.anticipate(o[e].solveAsync.bind(o[e]));t.anticipate(this.onSolveAsync.bind(this)),t.anticipate(this.onAfterSolveAsync.bind(this)),t.wait(e=>(this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync() complete.")),this.lastSolvedTimestamp=this.fable.log.getTimeStamp(),r(e)))}onAfterSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterSolve:")),!0}onAfterSolveAsync(e){return this.onAfterSolve(),e()}onBeforeLoginAsync(e){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeLoginAsync:")),e()}onLoginAsync(e){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onLoginAsync:")),e()}loginAsync(e){const t=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");let r=e;"function"!=typeof r&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loginAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),r=e=>{e&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loginAsync Auto Callback Error: ").concat(e),e)}),t.anticipate(this.onBeforeLoginAsync.bind(this)),t.anticipate(this.onLoginAsync.bind(this)),t.anticipate(this.onAfterLoginAsync.bind(this)),this.options.AutoLoadDataAfterLogin&&t.anticipate(e=>{if(!this.isLoggedIn())return e();this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto loading data after login...")),this.loadDataAsync(t=>{e(t)})}),t.wait(e=>(this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loginAsync() complete.")),this.lastLoginTimestamp=this.fable.log.getTimeStamp(),r(e)))}isLoggedIn(){return!0}onAfterLoginAsync(e){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterLoginAsync:")),e()}onBeforeLoadDataAsync(e){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeLoadDataAsync:")),e()}onLoadDataAsync(e){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onLoadDataAsync:")),e()}loadDataAsync(e){const t=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");let r=e;"function"!=typeof r&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loadDataAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),r=e=>{e&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loadDataAsync Auto Callback Error: ").concat(e),e)}),t.anticipate(this.onBeforeLoadDataAsync.bind(this));let i=Object.keys(this.pict.providers),n=[];for(let e=0;e<i.length;e++){let t=this.pict.providers[i[e]];t.options.AutoLoadDataWithApp&&n.push(t)}n.sort((e,t)=>e.options.AutoLoadDataOrdinal-t.options.AutoLoadDataOrdinal);for(const e of n)t.anticipate(e.onBeforeLoadDataAsync.bind(e));t.anticipate(this.onLoadDataAsync.bind(this));for(const e of n)t.anticipate(e.onLoadDataAsync.bind(e));t.anticipate(this.onAfterLoadDataAsync.bind(this));for(const e of n)t.anticipate(e.onAfterLoadDataAsync.bind(e));t.wait(e=>(this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loadDataAsync() complete.")),this.lastLoadDataTimestamp=this.fable.log.getTimeStamp(),r(e)))}onAfterLoadDataAsync(e){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterLoadDataAsync:")),e()}onBeforeSaveDataAsync(e){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeSaveDataAsync:")),e()}onSaveDataAsync(e){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onSaveDataAsync:")),e()}saveDataAsync(e){const t=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");let r=e;"function"!=typeof r&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," saveDataAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),r=e=>{e&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," saveDataAsync Auto Callback Error: ").concat(e),e)}),t.anticipate(this.onBeforeSaveDataAsync.bind(this));let i=Object.keys(this.pict.providers),n=[];for(let e=0;e<i.length;e++){let t=this.pict.providers[i[e]];t.options.AutoSaveDataWithApp&&n.push(t)}n.sort((e,t)=>e.options.AutoSaveDataOrdinal-t.options.AutoSaveDataOrdinal);for(const e of n)t.anticipate(e.onBeforeSaveDataAsync.bind(e));t.anticipate(this.onSaveDataAsync.bind(this));for(const e of n)t.anticipate(e.onSaveDataAsync.bind(e));t.anticipate(this.onAfterSaveDataAsync.bind(this));for(const e of n)t.anticipate(e.onAfterSaveDataAsync.bind(e));t.wait(e=>(this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," saveDataAsync() complete.")),this.lastSaveDataTimestamp=this.fable.log.getTimeStamp(),r(e)))}onAfterSaveDataAsync(e){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterSaveDataAsync:")),e()}onBeforeInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeInitialize:")),!0}onBeforeInitializeAsync(e){return this.onBeforeInitialize(),e()}onInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onInitialize:")),!0}onInitializeAsync(e){return this.onInitialize(),e()}initialize(){if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initialize:")),this.initializeTimestamp)return this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initialize called but initialization is already completed. Aborting.")),!1;{if(this.onBeforeInitialize(),"ConfigurationOnlyViews"in this.options)for(let e=0;e<this.options.ConfigurationOnlyViews.length;e++){let t=void 0===this.options.ConfigurationOnlyViews[e].ViewIdentifier?"AutoView-".concat(this.fable.getUUID()):this.options.ConfigurationOnlyViews[e].ViewIdentifier;this.log.info("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," adding configuration only view: ").concat(t)),this.pict.addView(t,this.options.ConfigurationOnlyViews[e])}this.onInitialize();let e=Object.keys(this.pict.providers),t=[];for(let r=0;r<e.length;r++){let i=this.pict.providers[e[r]];i.options.AutoInitialize&&t.push(i)}t.sort((e,t)=>e.options.AutoInitializeOrdinal-t.options.AutoInitializeOrdinal);for(let e=0;e<t.length;e++)t[e].initialize();let r=Object.keys(this.pict.views),i=[];for(let e=0;e<r.length;e++){let t=this.pict.views[r[e]];t.options.AutoInitialize&&i.push(t)}i.sort((e,t)=>e.options.AutoInitializeOrdinal-t.options.AutoInitializeOrdinal);for(let e=0;e<i.length;e++)i[e].initialize();return this.onAfterInitialize(),this.options.AutoSolveAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto solving after initialization...")),this.solve()),this.options.AutoRenderMainViewportViewAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto rendering after initialization...")),this.render()),this.initializeTimestamp=this.fable.log.getTimeStamp(),this.onCompletionOfInitialize(),!0}}initializeAsync(e){this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync:"));let t="function"==typeof e&&e;if(t||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),t=e=>{e&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync Auto Callback Error: ").concat(e),e)}),this.initializeTimestamp)return this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," async initialize called but initialization is already completed. Aborting.")),this.onCompletionOfInitializeAsync(t);{let e=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");if(this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning initialization...")),"ConfigurationOnlyViews"in this.options)for(let e=0;e<this.options.ConfigurationOnlyViews.length;e++){let t=void 0===this.options.ConfigurationOnlyViews[e].ViewIdentifier?"AutoView-".concat(this.fable.getUUID()):this.options.ConfigurationOnlyViews[e].ViewIdentifier;this.log.info("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," adding configuration only view: ").concat(t)),this.pict.addView(t,this.options.ConfigurationOnlyViews[e])}e.anticipate(this.onBeforeInitializeAsync.bind(this)),e.anticipate(this.onInitializeAsync.bind(this));let r=Object.keys(this.pict.providers),i=[];for(let e=0;e<r.length;e++){let t=this.pict.providers[r[e]];t.options.AutoInitialize&&i.push(t)}i.sort((e,t)=>e.options.AutoInitializeOrdinal-t.options.AutoInitializeOrdinal);for(let t=0;t<i.length;t++)e.anticipate(i[t].initializeAsync.bind(i[t]));let n=Object.keys(this.pict.views),s=[];for(let e=0;e<n.length;e++){let t=this.pict.views[n[e]];t.options.AutoInitialize&&s.push(t)}s.sort((e,t)=>e.options.AutoInitializeOrdinal-t.options.AutoInitializeOrdinal);for(let t=0;t<s.length;t++){let r=s[t];e.anticipate(r.initializeAsync.bind(r))}e.anticipate(this.onAfterInitializeAsync.bind(this)),this.options.AutoLoginAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto login (asynchronously) after initialization...")),e.anticipate(this.loginAsync.bind(this))),this.options.AutoSolveAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto solving (asynchronously) after initialization...")),e.anticipate(this.solveAsync.bind(this))),this.options.AutoRenderMainViewportViewAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto rendering (asynchronously) after initialization...")),e.anticipate(this.renderMainViewportAsync.bind(this))),e.wait(e=>(e&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync Error: ").concat(e.message||e),{stack:e.stack}),this.initializeTimestamp=this.fable.log.getTimeStamp(),this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initialization complete.")),t()))}}onAfterInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterInitialize:")),!0}onAfterInitializeAsync(e){return this.onAfterInitialize(),e()}onCompletionOfInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onCompletionOfInitialize:")),!0}onCompletionOfInitializeAsync(e){return this.onCompletionOfInitialize(),e()}onBeforeMarshalFromViews(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeMarshalFromViews:")),!0}onBeforeMarshalFromViewsAsync(e){return this.onBeforeMarshalFromViews(),e()}onMarshalFromViews(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onMarshalFromViews:")),!0}onMarshalFromViewsAsync(e){return this.onMarshalFromViews(),e()}marshalFromViews(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing marshalFromViews() function...")),this.onBeforeMarshalFromViews();let e=Object.keys(this.pict.views),t=[];for(let r=0;r<e.length;r++){let i=this.pict.views[e[r]];t.push(i)}for(let e=0;e<t.length;e++)t[e].marshalFromView();return this.onMarshalFromViews(),this.onAfterMarshalFromViews(),this.lastMarshalFromViewsTimestamp=this.fable.log.getTimeStamp(),!0}marshalFromViewsAsync(e){let t=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),r="function"==typeof e&&e;r||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),r=e=>{e&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewsAsync Auto Callback Error: ").concat(e),e)}),t.anticipate(this.onBeforeMarshalFromViewsAsync.bind(this));let i=Object.keys(this.pict.views),n=[];for(let e=0;e<i.length;e++){let t=this.pict.views[i[e]];n.push(t)}for(let e=0;e<n.length;e++)t.anticipate(n[e].marshalFromViewAsync.bind(n[e]));t.anticipate(this.onMarshalFromViewsAsync.bind(this)),t.anticipate(this.onAfterMarshalFromViewsAsync.bind(this)),t.wait(e=>(this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewsAsync() complete.")),this.lastMarshalFromViewsTimestamp=this.fable.log.getTimeStamp(),r(e)))}onAfterMarshalFromViews(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterMarshalFromViews:")),!0}onAfterMarshalFromViewsAsync(e){return this.onAfterMarshalFromViews(),e()}onBeforeMarshalToViews(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeMarshalToViews:")),!0}onBeforeMarshalToViewsAsync(e){return this.onBeforeMarshalToViews(),e()}onMarshalToViews(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onMarshalToViews:")),!0}onMarshalToViewsAsync(e){return this.onMarshalToViews(),e()}marshalToViews(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing marshalToViews() function...")),this.onBeforeMarshalToViews();let e=Object.keys(this.pict.views),t=[];for(let r=0;r<e.length;r++){let i=this.pict.views[e[r]];t.push(i)}for(let e=0;e<t.length;e++)t[e].marshalToView();return this.onMarshalToViews(),this.onAfterMarshalToViews(),this.lastMarshalToViewsTimestamp=this.fable.log.getTimeStamp(),!0}marshalToViewsAsync(e){let t=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),r="function"==typeof e&&e;r||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),r=e=>{e&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewsAsync Auto Callback Error: ").concat(e),e)}),t.anticipate(this.onBeforeMarshalToViewsAsync.bind(this));let i=Object.keys(this.pict.views),n=[];for(let e=0;e<i.length;e++){let t=this.pict.views[i[e]];n.push(t)}for(let e=0;e<n.length;e++)t.anticipate(n[e].marshalToViewAsync.bind(n[e]));t.anticipate(this.onMarshalToViewsAsync.bind(this)),t.anticipate(this.onAfterMarshalToViewsAsync.bind(this)),t.wait(e=>(this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewsAsync() complete.")),this.lastMarshalToViewsTimestamp=this.fable.log.getTimeStamp(),r(e)))}onAfterMarshalToViews(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterMarshalToViews:")),!0}onAfterMarshalToViewsAsync(e){return this.onAfterMarshalToViews(),e()}onBeforeRender(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeRender:")),!0}onBeforeRenderAsync(e){return this.onBeforeRender(),e()}render(e,t,r,i){let n="string"!=typeof e?this.options.MainViewportViewIdentifier:e,s="string"!=typeof t?this.options.MainViewportRenderableHash:t,o="string"!=typeof r?this.options.MainViewportDestinationAddress:r,a="string"!=typeof i?this.options.MainViewportDefaultDataAddress:i;this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," VIEW Renderable[").concat(s,"] Destination[").concat(o,"] TemplateDataAddress[").concat(a,"] render:")),this.onBeforeRender();let c="string"==typeof n&&this.servicesMap.PictView[n];return c?(this.onRender(),c.render(s,o,a),this.onAfterRender(),!0):(this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," could not render from View ").concat(n," because it is not a valid view.")),!1)}onRender(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onRender:")),!0}onRenderAsync(e){return this.onRender(),e()}renderAsync(e,t,r,i,n){let s="string"!=typeof e?this.options.MainViewportViewIdentifier:e,o="string"!=typeof t?this.options.MainViewportRenderableHash:t,a="string"!=typeof r?this.options.MainViewportDestinationAddress:r,c="string"!=typeof i?this.options.MainViewportDefaultDataAddress:i,l="function"==typeof n?n:"function"==typeof i?i:"function"==typeof r?r:"function"==typeof t?t:"function"==typeof e&&e;l||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),l=e=>{e&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync Auto Callback Error: ").concat(e),e)}),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," VIEW Renderable[").concat(o,"] Destination[").concat(a,"] TemplateDataAddress[").concat(c,"] renderAsync:"));let h=this.fable.newAnticipate();h.anticipate(this.onBeforeRenderAsync.bind(this));let u="string"==typeof s&&this.servicesMap.PictView[s];if(!u){let e="PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," could not asynchronously render from View ").concat(s," because it is not a valid view.");return this.pict.LogNoisiness>3&&this.log.error(e),l(new Error(e))}return h.anticipate(this.onRenderAsync.bind(this)),h.anticipate(e=>{u.renderAsync.call(u,o,a,c,e)}),h.anticipate(this.onAfterRenderAsync.bind(this)),h.wait(l)}onAfterRender(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterRender:")),!0}onAfterRenderAsync(e){return this.onAfterRender(),e()}renderMainViewport(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderMainViewport:")),this.render()}renderMainViewportAsync(e){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderMainViewportAsync:")),this.renderAsync(e)}renderAutoViews(){this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning renderAutoViews..."));let e=Object.keys(this.pict.views);e.sort((e,t)=>this.pict.views[e].options.AutoRenderOrdinal-this.pict.views[t].options.AutoRenderOrdinal);for(let t=0;t<e.length;t++){let r=this.pict.views[e[t]];r.options.AutoRender&&r.render()}this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync complete."))}renderAutoViewsAsync(e){let t=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),r="function"==typeof e&&e;r||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),r=e=>{e&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync Auto Callback Error: ").concat(e),e)}),this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning renderAutoViewsAsync..."));let i=Object.keys(this.pict.views);i.sort((e,t)=>this.pict.views[e].options.AutoRenderOrdinal-this.pict.views[t].options.AutoRenderOrdinal);for(let e=0;e<i.length;e++){let r=this.pict.views[i[e]];r.options.AutoRender&&t.anticipate(r.renderAsync.bind(r))}t.wait(e=>(this.lastAutoRenderTimestamp=this.fable.log.getTimeStamp(),this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync complete.")),r(e)))}get isPictApplication(){return!0}}},{"../package.json":139,"fable-serviceproviderbase":59}],141:[function(e,t,r){t.exports={name:"pict-provider",version:"1.0.10",description:"Pict Provider Base Class",main:"source/Pict-Provider.js",scripts:{start:"node source/Pict-Provider.js",test:"npx mocha -u tdd -R spec",tests:"npx mocha -u tdd --exit -R spec --grep",coverage:"npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-provider-image:local","docker-dev-run":'docker run -it -d --name pict-provider-dev -p 24125:8080 -p 30027:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-provider" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-provider-image:local',"docker-dev-shell":"docker exec -it pict-provider-dev /bin/bash",lint:"eslint source/**",types:"tsc -p ."},types:"types/source/Pict-Provider.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-provider.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-provider/issues"},homepage:"https://github.com/stevenvelozo/pict-provider#readme",devDependencies:{"@eslint/js":"^9.39.1",eslint:"^9.39.1",pict:"^1.0.348",quackage:"^1.0.51",typescript:"^5.9.3"},dependencies:{"fable-serviceproviderbase":"^3.0.18"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]}}},{}],142:[function(e,t,r){const i=e("fable-serviceproviderbase"),n=e("../package.json"),s={ProviderIdentifier:!1,AutoInitialize:!0,AutoInitializeOrdinal:0,AutoLoadDataWithApp:!0,AutoSolveWithApp:!0,AutoSolveOrdinal:0,Manifests:{},Templates:[]};t.exports=class extends i{constructor(e,t,r){super(e,Object.assign({},JSON.parse(JSON.stringify(s)),t),r),this.fable,this.pict,this.log,this.options,this.UUID,this.Hash,this.options.ProviderIdentifier||(this.options.ProviderIdentifier="AutoProviderID-".concat(this.fable.getUUID())),this.serviceType="PictProvider",this._Package=n,this.pict=this.fable,this.AppData=this.pict.AppData,this.Bundle=this.pict.Bundle,this.initializeTimestamp=!1,this.lastSolvedTimestamp=!1;for(let e=0;e<this.options.Templates.length;e++){let t=this.options.Templates[e];t.hasOwnProperty("Postfix")&&t.hasOwnProperty("Template")?(t.Source||(t.Source="PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," options object.")),this.pict.TemplateProvider.addDefaultTemplate(t.Prefix,t.Postfix,t.Template,t.Source)):this.log.error("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," could not load Default Template ").concat(e," in the options array."),t)}}onBeforeInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onBeforeInitialize:")),!0}onBeforeInitializeAsync(e){return this.onBeforeInitialize(),e()}onInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onInitialize:")),!0}onInitializeAsync(e){return this.onInitialize(),e()}initialize(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow PROVIDER [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialize:")),this.initializeTimestamp?(this.log.warn("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialize called but initialization is already completed. Aborting.")),!1):(this.onBeforeInitialize(),this.onInitialize(),this.onAfterInitialize(),this.initializeTimestamp=this.pict.log.getTimeStamp(),!0)}initializeAsync(e){if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow PROVIDER [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initializeAsync:")),this.initializeTimestamp)return this.log.warn("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," async initialize called but initialization is already completed. Aborting.")),e();{let t=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate");this.pict.LogNoisiness>0&&this.log.info("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," beginning initialization...")),t.anticipate(this.onBeforeInitializeAsync.bind(this)),t.anticipate(this.onInitializeAsync.bind(this)),t.anticipate(this.onAfterInitializeAsync.bind(this)),t.wait(t=>(this.initializeTimestamp=this.pict.log.getTimeStamp(),t?this.log.error("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialization failed: ").concat(t.message||t),{Stack:t.stack}):this.pict.LogNoisiness>0&&this.log.info("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialization complete.")),e()))}}onAfterInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onAfterInitialize:")),!0}onAfterInitializeAsync(e){return this.onAfterInitialize(),e()}onPreRender(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onPreRender:")),!0}onPreRenderAsync(e){return this.onPreRender(),e()}render(){return this.onPreRender()}renderAsync(e){return this.onPreRender(),e()}onPreSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onPreSolve:")),!0}onPreSolveAsync(e){return this.onPreSolve(),e()}solve(){return this.onPreSolve()}solveAsync(e){return this.onPreSolve(),e()}onBeforeLoadDataAsync(e){return e()}onLoadDataAsync(e){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onLoadDataAsync:")),e()}onAfterLoadDataAsync(e){return e()}onBeforeSaveDataAsync(e){return e()}onSaveDataAsync(e){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onSaveDataAsync:")),e()}onAfterSaveDataAsync(e){return e()}}},{"../package.json":141,"fable-serviceproviderbase":59}],143:[function(e,t,r){t.exports={name:"pict-template",version:"1.0.14",description:"Pict Template Base Class",main:"source/Pict-Template.js",scripts:{start:"node source/Pict-Template.js",test:"npx mocha -u tdd -R spec",tests:"npx mocha -u tdd --exit -R spec --grep",coverage:"npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec",build:"npx quack build",types:"tsc -p ."},types:"types/source/Pict-Template.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-view.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-view/issues"},homepage:"https://github.com/stevenvelozo/pict-view#readme",devDependencies:{pict:"^1.0.348",quackage:"^1.0.51",typescript:"^5.9.3"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},dependencies:{"fable-serviceproviderbase":"^3.0.18"}}},{}],144:[function(e,t,r){const i=e("fable-serviceproviderbase"),n=e("../package.json");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.fable,this.pict=this.fable,this.serviceType="PictTemplate",this._Package=n}render(e,t,r,i,n){return""}renderAsync(e,t,r,i,n,s){return r(null,this.render(e,t,i,n,s))}addPattern(e,t){return this.pict.MetaTemplate.addPatternBoth(e,t,this.render,this.renderAsync,this)}resolveStateFromAddress(e,t,r,i,n,s){return this.pict.resolveStateFromAddress(e,t,r,i,n,s)}},t.exports.template_hash="Default"},{"../package.json":143,"fable-serviceproviderbase":59}],145:[function(e,t,r){t.exports={name:"pict-view",version:"1.0.66",description:"Pict View Base Class",main:"source/Pict-View.js",scripts:{test:"mocha -u tdd -R spec",tests:"mocha -u tdd -R spec -g",start:"node source/Pict-View.js",coverage:"nyc --reporter=lcov --reporter=text-lcov npm test",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-view-image:local","docker-dev-run":'docker run -it -d --name pict-view-dev -p 30001:8080 -p 38086:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-view" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-view-image:local',"docker-dev-shell":"docker exec -it pict-view-dev /bin/bash",types:"tsc -p .",lint:"eslint source/**"},types:"types/source/Pict-View.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-view.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-view/issues"},homepage:"https://github.com/stevenvelozo/pict-view#readme",devDependencies:{"@eslint/js":"^9.39.1","browser-env":"^3.3.0",eslint:"^9.39.1",pict:"^1.0.348",quackage:"^1.0.51",typescript:"^5.9.3"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},dependencies:{fable:"^3.1.57","fable-serviceproviderbase":"^3.0.18"}}},{}],146:[function(e,t,r){const i=e("fable-serviceproviderbase"),n=e("../package.json"),s={DefaultRenderable:!1,DefaultDestinationAddress:!1,DefaultTemplateRecordAddress:!1,ViewIdentifier:!1,AutoInitialize:!0,AutoInitializeOrdinal:0,AutoRender:!0,AutoRenderOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0,CSSHash:!1,CSS:!1,CSSProvider:!1,CSSPriority:500,Templates:[],DefaultTemplates:[],Renderables:[],Manifests:{}};t.exports=class extends i{constructor(e,t,r){super(e,Object.assign({},JSON.parse(JSON.stringify(s)),t),r),this.fable,this.options,this.UUID,this.Hash,this.log;const i=this.Hash===this.UUID;this.UUID="V-".concat(this.UUID),i&&(this.Hash=this.UUID),this.options.ViewIdentifier||(this.options.ViewIdentifier="AutoViewID-".concat(this.fable.getUUID())),this.serviceType="PictView",this._Package=n,this.pict=this.fable,this.AppData=this.pict.AppData,this.Bundle=this.pict.Bundle,this.initializeTimestamp=!1,this.lastSolvedTimestamp=!1,this.lastRenderedTimestamp=!1,this.lastMarshalFromViewTimestamp=!1,this.lastMarshalToViewTimestamp=!1,this.pict.instantiateServiceProviderIfNotExists("TransactionTracking");for(let e=0;e<this.options.Templates.length;e++){let t=this.options.Templates[e];"Hash"in t&&"Template"in t?(t.Source||(t.Source="PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," options object.")),this.pict.TemplateProvider.addTemplate(t.Hash,t.Template,t.Source)):this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not load Template ").concat(e," in the options array."),t)}for(let e=0;e<this.options.DefaultTemplates.length;e++){let t=this.options.DefaultTemplates[e];"Postfix"in t&&"Template"in t?(t.Source||(t.Source="PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," options object.")),this.pict.TemplateProvider.addDefaultTemplate(t.Prefix,t.Postfix,t.Template,t.Source)):this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not load Default Template ").concat(e," in the options array."),t)}if(this.options.CSS){let e=this.options.CSSHash?this.options.CSSHash:"View-".concat(this.options.ViewIdentifier),t=this.options.CSSProvider?this.options.CSSProvider:e;this.pict.CSSMap.addCSS(e,this.options.CSS,t,this.options.CSSPriority)}this.renderables={};for(let e=0;e<this.options.Renderables.length;e++){let t=this.options.Renderables[e];this.addRenderable(t)}}addRenderable(e,t,r,i,n){let s;if("object"==typeof e)s=e;else{s={RenderableHash:e,TemplateHash:t,DefaultTemplateRecordAddress:r,ContentDestinationAddress:i,RenderMethod:"string"!=typeof n?n:"replace"}}"string"!=typeof s.RenderableHash||"string"!=typeof s.TemplateHash?this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not load Renderable; RenderableHash or TemplateHash are invalid."),s):(this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," adding renderable [").concat(s.RenderableHash,"] pointed to template ").concat(s.TemplateHash,".")),this.renderables[s.RenderableHash]=s)}onBeforeInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeInitialize:")),!0}onBeforeInitializeAsync(e){return this.onBeforeInitialize(),e()}onInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onInitialize:")),!0}onInitializeAsync(e){return this.onInitialize(),e()}initialize(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialize:")),this.initializeTimestamp?(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialize called but initialization is already completed. Aborting.")),!1):(this.onBeforeInitialize(),this.onInitialize(),this.onAfterInitialize(),this.initializeTimestamp=this.pict.log.getTimeStamp(),!0)}initializeAsync(e){if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initializeAsync:")),this.initializeTimestamp)return this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," async initialize called but initialization is already completed. Aborting.")),e();{let t=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate");this.pict.LogNoisiness>0&&this.log.info("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," beginning initialization...")),t.anticipate(this.onBeforeInitializeAsync.bind(this)),t.anticipate(this.onInitializeAsync.bind(this)),t.anticipate(this.onAfterInitializeAsync.bind(this)),t.wait(t=>(t&&this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialization failed: ").concat(t.message||t),{stack:t.stack}),this.initializeTimestamp=this.pict.log.getTimeStamp(),this.pict.LogNoisiness>0&&this.log.info("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialization complete.")),e()))}}onAfterInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterInitialize:")),!0}onAfterInitializeAsync(e){return this.onAfterInitialize(),e()}onBeforeRender(e){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeRender:")),!0}onBeforeRenderAsync(e,t){return this.onBeforeRender(t),e()}onBeforeProject(e){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeProject:")),!0}onBeforeProjectAsync(e,t){return this.onBeforeProject(t),e()}buildRenderOptions(e,t,r){let i={Valid:!0};return i.RenderableHash="string"==typeof e?e:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable,i.RenderableHash||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not find a suitable RenderableHash ").concat(i.RenderableHash," (param ").concat(e,"because it is not a valid renderable.")),i.Valid=!1),i.Renderable=this.renderables[i.RenderableHash],i.Renderable||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(i.RenderableHash," (param ").concat(e,") because it does not exist.")),i.Valid=!1),i.DestinationAddress="string"==typeof t?t:"string"==typeof i.Renderable.ContentDestinationAddress?i.Renderable.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress&&this.options.DefaultDestinationAddress,i.DestinationAddress||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(i.RenderableHash," (param ").concat(e,") because it does not have a valid destination address (param ").concat(t,").")),i.Valid=!1),"object"==typeof r?(i.RecordAddress="Passed in as object",i.Record=r):(i.RecordAddress="string"==typeof r?r:"string"==typeof i.Renderable.DefaultTemplateRecordAddress?i.Renderable.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress,i.Record="string"==typeof i.RecordAddress?this.pict.DataProvider.getDataByAddress(i.RecordAddress):void 0),i}assignRenderContent(e,t,r){return this.pict.ContentAssignment.projectContent(e.RenderMethod,t,r,e.TestAddress)}render(e,t,r,i){return this.renderWithScope(this,e,t,r,i)}renderWithScope(e,t,r,i,n){let s,o,a,c="string"==typeof t?t:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable;return c?("__Virtual"==c?s={RenderableHash:"__Virtual",TemplateHash:this.renderables[this.options.DefaultRenderable].TemplateHash,ContentDestinationAddress:"string"==typeof r?r:"string"==typeof s.ContentDestinationAddress?s.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,RenderMethod:"virtual-assignment",TransactionHash:n&&n.TransactionHash,RootRenderableViewHash:n&&n.RootRenderableViewHash}:(s=Object.assign({},this.renderables[c]),s.ContentDestinationAddress="string"==typeof r?r:"string"==typeof s.ContentDestinationAddress?s.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null),s.TransactionHash||(s.TransactionHash="ViewRender-V-".concat(this.options.ViewIdentifier,"-R-").concat(c,"-U-").concat(this.pict.getUUID()),s.RootRenderableViewHash=this.Hash,this.pict.TransactionTracking.registerTransaction(s.TransactionHash)),s?s.ContentDestinationAddress?("object"==typeof i?(a=i,o="Passed in as object"):(o="string"==typeof i?i:"string"==typeof s.DefaultTemplateRecordAddress?s.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress,a="string"==typeof o?this.pict.DataProvider.getDataByAddress(o):void 0),this.onBeforeRender(s),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(c,"] Destination[").concat(s.ContentDestinationAddress,"] TemplateRecordAddress[").concat(o,"] render:")),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Render of Renderable[").concat(c,"] to Destination [").concat(s.ContentDestinationAddress,"]...")),s.Content=this.pict.parseTemplateByHash(s.TemplateHash,a,null,[this],e,{RootRenderable:"object"==typeof n?n:s}),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Assigning Renderable[").concat(c,"] content length ").concat(s.Content.length," to Destination [").concat(s.ContentDestinationAddress,"] using render method [").concat(s.RenderMethod,"].")),this.onBeforeProject(s),this.onProject(s),"virtual-assignment"!==s.RenderMethod&&(this.onAfterProject(s),this.onAfterRender(s)),!0):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(c," (param ").concat(t,") because it does not have a valid destination address.")),!1):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(c," (param ").concat(t,") because it does not exist.")),!1)):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(c," (param ").concat(t,") because it is not a valid renderable.")),!1)}renderAsync(e,t,r,i,n){return this.renderWithScopeAsync(this,e,t,r,i,n)}renderWithScopeAsync(e,t,r,i,n,s){let o,a,c,l="string"==typeof t?t:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable,h="function"==typeof s?s:"function"==typeof i?i:"function"==typeof r?r:"function"==typeof t?t:"function"==typeof n?n:null;if(h||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),h=e=>{e&&this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync Auto Callback Error: ").concat(e),e)}),!l)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(l," (param ").concat(t,"because it is not a valid renderable.")),h(new Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(l," (param ").concat(t,"because it is not a valid renderable.")));if("__Virtual"==l?o={RenderableHash:"__Virtual",TemplateHash:this.renderables[this.options.DefaultRenderable].TemplateHash,ContentDestinationAddress:"string"==typeof r?r:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,RenderMethod:"virtual-assignment",TransactionHash:n&&"function"!=typeof n&&n.TransactionHash,RootRenderableViewHash:n&&"function"!=typeof n&&n.RootRenderableViewHash}:(o=Object.assign({},this.renderables[l]),o.ContentDestinationAddress="string"==typeof r?r:"string"==typeof o.ContentDestinationAddress?o.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null),o.TransactionHash||(o.TransactionHash="ViewRender-V-".concat(this.options.ViewIdentifier,"-R-").concat(l,"-U-").concat(this.pict.getUUID()),o.RootRenderableViewHash=this.Hash,this.pict.TransactionTracking.registerTransaction(o.TransactionHash)),!o)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(l," (param ").concat(t,") because it does not exist.")),h(new Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(l," (param ").concat(t,") because it does not exist.")));if(!o.ContentDestinationAddress)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(l," (param ").concat(t,") because it does not have a valid destination address.")),h(new Error("Could not render ".concat(l)));"object"==typeof i?(c=i,a="Passed in as object"):(a="string"==typeof i?i:"string"==typeof o.DefaultTemplateRecordAddress?o.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress,c="string"==typeof a?this.pict.DataProvider.getDataByAddress(a):void 0),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(l,"] Destination[").concat(o.ContentDestinationAddress,"] TemplateRecordAddress[").concat(a,"] renderAsync:")),this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Asynchronous Render (callback-style)..."));let u=this.fable.newAnticipate();u.anticipate(e=>{this.onBeforeRenderAsync(e,o)}),u.anticipate(r=>{this.pict.parseTemplateByHash(o.TemplateHash,c,(e,i)=>e?(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render (asynchronously) ").concat(l," (param ").concat(t,") because it did not parse the template."),e),r(e)):(o.Content=i,r()),[this],e,{RootRenderable:"object"==typeof n?n:o})}),u.anticipate(e=>{this.onBeforeProjectAsync(e,o)}),u.anticipate(e=>{this.onProjectAsync(e,o)}),"virtual-assignment"!==o.RenderMethod&&(u.anticipate(e=>{this.onAfterProjectAsync(e,o)}),u.anticipate(e=>{this.onAfterRenderAsync(e,o)})),u.wait(h)}renderDefaultAsync(e){this.renderAsync(e)}basicRender(e,t,r){return this.basicRenderWithScope(this,e,t,r)}basicRenderWithScope(e,t,r,i){let n=this.buildRenderOptions(t,r,i);return n.Valid?(this.assignRenderContent(n.Renderable,n.DestinationAddress,this.pict.parseTemplateByHash(n.Renderable.TemplateHash,n.Record,null,[this],e,{RootRenderable:n.Renderable})),!0):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(n.RenderableHash," because it is not valid.")),!1)}basicRenderAsync(e,t,r,i){return this.basicRenderWithScopeAsync(this,e,t,r,i)}basicRenderWithScopeAsync(e,t,r,i,n){let s="function"==typeof n?n:"function"==typeof i?i:"function"==typeof r?r:"function"==typeof t?t:null;s||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," basicRenderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),s=e=>{e&&this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," basicRenderAsync Auto Callback Error: ").concat(e),e)});const o=this.buildRenderOptions(t,r,i);if(!o.Valid){let e="PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(o.RenderableHash," because it is not valid.");return this.log.error(e),s(new Error(e))}this.pict.parseTemplateByHash(o.Renderable.TemplateHash,o.Record,(e,t)=>e?(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render (asynchronously) ").concat(o.RenderableHash," because it did not parse the template."),e),s(e)):(this.assignRenderContent(o.Renderable,o.DestinationAddress,t),s()),[this],e,{RootRenderable:o.Renderable})}onProject(e){this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onProject:")),"virtual-assignment"===e.RenderMethod&&this.pict.TransactionTracking.pushToTransactionQueue(e.TransactionHash,{ViewHash:this.Hash,Renderable:e},"Deferred-Post-Content-Assignment"),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Assigning Renderable[").concat(e.RenderableHash,"] content length ").concat(e.Content.length," to Destination [").concat(e.ContentDestinationAddress,"] using Async render method ").concat(e.RenderMethod,".")),this.pict.ContentAssignment.projectContent(e.RenderMethod,e.ContentDestinationAddress,e.Content,e.TestAddress),this.lastRenderedTimestamp=this.pict.log.getTimeStamp()}onProjectAsync(e,t){return this.onProject(t),e()}onAfterRender(e){if(this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRender:")),e&&e.RootRenderableViewHash===this.Hash){const t=this.pict.TransactionTracking.clearTransactionQueue(e.TransactionHash)||[];for(const r of t){const t=this.pict.views[r.Data.ViewHash];t?(t.onAfterProject(),t.onAfterRender(r.Data.Renderable)):this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRender: Could not find view for transaction hash ").concat(e.TransactionHash," and ViewHash ").concat(r.Data.ViewHash,"."))}}return!0}onAfterRenderAsync(e,t){this.onAfterRender(t);const r=this.fable.newAnticipate();if(t&&t.RootRenderableViewHash===this.Hash){const e=this.pict.TransactionTracking.clearTransactionQueue(t.TransactionHash)||[];for(const i of e){const e=this.pict.views[i.Data.ViewHash];e?(r.anticipate(e.onAfterProjectAsync.bind(e)),r.anticipate(t=>{e.onAfterRenderAsync(t,i.Data.Renderable)})):this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRenderAsync: Could not find view for transaction hash ").concat(t.TransactionHash," and ViewHash ").concat(i.Data.ViewHash,"."))}}return r.wait(e)}onAfterProject(e){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterProject:")),!0}onAfterProjectAsync(e,t){return e()}onBeforeSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeSolve:")),!0}onBeforeSolveAsync(e){return this.onBeforeSolve(),e()}onSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onSolve:")),!0}onSolveAsync(e){return this.onSolve(),e()}solve(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeSolve(),this.onSolve(),this.onAfterSolve(),this.lastSolvedTimestamp=this.pict.log.getTimeStamp(),!0}solveAsync(e){let t=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),r="function"==typeof e?e:null;r||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),r=e=>{e&&this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync Auto Callback Error: ").concat(e),e)}),t.anticipate(this.onBeforeSolveAsync.bind(this)),t.anticipate(this.onSolveAsync.bind(this)),t.anticipate(this.onAfterSolveAsync.bind(this)),t.wait(e=>(this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," solveAsync() complete.")),this.lastSolvedTimestamp=this.pict.log.getTimeStamp(),r(e)))}onAfterSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterSolve:")),!0}onAfterSolveAsync(e){return this.onAfterSolve(),e()}onBeforeMarshalFromView(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeMarshalFromView:")),!0}onBeforeMarshalFromViewAsync(e){return this.onBeforeMarshalFromView(),e()}onMarshalFromView(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onMarshalFromView:")),!0}onMarshalFromViewAsync(e){return this.onMarshalFromView(),e()}marshalFromView(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeMarshalFromView(),this.onMarshalFromView(),this.onAfterMarshalFromView(),this.lastMarshalFromViewTimestamp=this.pict.log.getTimeStamp(),!0}marshalFromViewAsync(e){let t=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),r="function"==typeof e?e:null;r||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),r=e=>{e&&this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewAsync Auto Callback Error: ").concat(e),e)}),t.anticipate(this.onBeforeMarshalFromViewAsync.bind(this)),t.anticipate(this.onMarshalFromViewAsync.bind(this)),t.anticipate(this.onAfterMarshalFromViewAsync.bind(this)),t.wait(e=>(this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," marshalFromViewAsync() complete.")),this.lastMarshalFromViewTimestamp=this.pict.log.getTimeStamp(),r(e)))}onAfterMarshalFromView(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterMarshalFromView:")),!0}onAfterMarshalFromViewAsync(e){return this.onAfterMarshalFromView(),e()}onBeforeMarshalToView(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeMarshalToView:")),!0}onBeforeMarshalToViewAsync(e){return this.onBeforeMarshalToView(),e()}onMarshalToView(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onMarshalToView:")),!0}onMarshalToViewAsync(e){return this.onMarshalToView(),e()}marshalToView(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeMarshalToView(),this.onMarshalToView(),this.onAfterMarshalToView(),this.lastMarshalToViewTimestamp=this.pict.log.getTimeStamp(),!0}marshalToViewAsync(e){let t=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),r="function"==typeof e?e:null;r||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),r=e=>{e&&this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewAsync Auto Callback Error: ").concat(e),e)}),t.anticipate(this.onBeforeMarshalToViewAsync.bind(this)),t.anticipate(this.onMarshalToViewAsync.bind(this)),t.anticipate(this.onAfterMarshalToViewAsync.bind(this)),t.wait(e=>(this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," marshalToViewAsync() complete.")),this.lastMarshalToViewTimestamp=this.pict.log.getTimeStamp(),r(e)))}onAfterMarshalToView(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterMarshalToView:")),!0}onAfterMarshalToViewAsync(e){return this.onAfterMarshalToView(),e()}get isPictView(){return!0}}},{"../package.json":145,"fable-serviceproviderbase":59}],147:[function(e,t,r){
2
+ /**
3
+ * Precedent Meta-Templating
4
+ *
5
+ * @license MIT
6
+ *
7
+ * @author Steven Velozo <steven@velozo.com>
8
+ *
9
+ * @description Process text streams, parsing out meta-template expressions.
10
+ */
11
+ var i=e("./WordTree.js"),n=e("./StringParser.js");t.exports=class{constructor(){this.WordTree=new i,this.StringParser=new n,this.ParseTree=this.WordTree.ParseTree}addPattern(e,t,r){return this.WordTree.addPattern(e,t,r)}parseString(e,t){return this.StringParser.parseString(e,this.ParseTree,t)}}},{"./StringParser.js":148,"./WordTree.js":149}],148:[function(e,t,r){t.exports=class{constructor(){}newParserState(e){return{ParseTree:e,Asynchronous:!1,Output:"",OutputBuffer:"",Pattern:{},PatternMatch:!1,PatternMatchEnd:!1}}appendOutputBuffer(e,t){t.OutputBuffer+=e}flushOutputBuffer(e){e.Output+=e.OutputBuffer,e.OutputBuffer=""}resetOutputBuffer(e){return this.flushOutputBuffer(e),e.Pattern=!1,e.PatternStartNode=!1,e.StartPatternMatchComplete=!1,e.EndPatternMatchBegan=!1,e.PatternMatch=!1,!0}parseCharacter(e,t,r){if(t.PatternMatch)if(!t.StartPatternMatchComplete&&t.Pattern.hasOwnProperty(e))t.Pattern=t.Pattern[e],this.appendOutputBuffer(e,t);else if(t.EndPatternMatchBegan)if(t.Pattern.PatternEnd.hasOwnProperty(e)){if(t.Pattern=t.Pattern.PatternEnd[e],this.appendOutputBuffer(e,t),t.Pattern.hasOwnProperty("Parse"))return t.OutputBuffer=t.Pattern.Parse(t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r),this.resetOutputBuffer(t)}else t.PatternStartNode.PatternEnd.hasOwnProperty(e)?(t.Pattern=t.PatternStartNode.PatternEnd[e],this.appendOutputBuffer(e,t)):(t.EndPatternMatchBegan=!1,this.appendOutputBuffer(e,t));else if(t.Pattern.hasOwnProperty("PatternEnd")){if(t.StartPatternMatchComplete||(t.StartPatternMatchComplete=!0,t.PatternStartNode=t.Pattern),this.appendOutputBuffer(e,t),t.Pattern.PatternEnd.hasOwnProperty(e)&&(t.EndPatternMatchBegan=!0,t.Pattern=t.Pattern.PatternEnd[e],t.Pattern.hasOwnProperty("Parse")))return t.OutputBuffer=t.Pattern.Parse(t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r),this.resetOutputBuffer(t)}else this.resetOutputBuffer(t);if(!t.PatternMatch){if(t.ParseTree.hasOwnProperty(e))return this.resetOutputBuffer(t),this.appendOutputBuffer(e,t),t.Pattern=t.ParseTree[e],t.PatternMatch=!0,!0;this.appendOutputBuffer(e,t)}return!1}parseString(e,t,r){let i=this.newParserState(t);for(var n=0;n<e.length;n++)this.parseCharacter(e[n],i,r);return this.flushOutputBuffer(i),i.Output}}},{}],149:[function(e,t,r){t.exports=class{constructor(){this.ParseTree={}}addChild(e,t){return e.hasOwnProperty(t)||(e[t]={}),e[t]}addEndChild(e,t){return e.hasOwnProperty("PatternEnd")||(e.PatternEnd={}),e.PatternEnd[t]={},e.PatternEnd[t]}addPattern(e,t,r){if(e.length<1)return!1;if("string"==typeof t&&t.length<1)return!1;let i=this.ParseTree;for(var n=0;n<e.length;n++)i=this.addChild(i,e[n],n);i.hasOwnProperty("PatternEnd")||(i.PatternEnd={});let s="string"==typeof t?t:e;for(let e=0;e<s.length;e++)i=this.addEndChild(i,s[e],e);return i.PatternStartString=e,i.PatternEndString=s,i.Parse="function"==typeof r?r:"string"==typeof r?()=>r:e=>e,!0}}},{}],150:[function(e,t,r){var i,n,s=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(e){if(i===setTimeout)return setTimeout(e,0);if((i===o||!i)&&setTimeout)return i=setTimeout,setTimeout(e,0);try{return i(e,0)}catch(t){try{return i.call(null,e,0)}catch(t){return i.call(this,e,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:o}catch(e){i=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var l,h=[],u=!1,p=-1;function d(){u&&l&&(u=!1,l.length?h=l.concat(h):p=-1,h.length&&f())}function f(){if(!u){var e=c(d);u=!0;for(var t=h.length;t;){for(l=h,h=[];++p<t;)l&&l[p].run();p=-1,t=h.length}l=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function m(){}s.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];h.push(new g(e,t)),1!==h.length||u||c(f)},g.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=m,s.addListener=m,s.once=m,s.off=m,s.removeListener=m,s.removeAllListeners=m,s.emit=m,s.prependListener=m,s.prependOnceListener=m,s.listeners=function(e){return[]},s.binding=function(e){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(e){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},{}],151:[function(e,t,r){(function(e){(function(){!function(i){var n="object"==typeof r&&r&&!r.nodeType&&r,s="object"==typeof t&&t&&!t.nodeType&&t,o="object"==typeof e&&e;o.global!==o&&o.window!==o&&o.self!==o||(i=o);var a,c,l=2147483647,h=36,u=/^xn--/,p=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=Math.floor,m=String.fromCharCode;function y(e){throw new RangeError(f[e])}function b(e,t){for(var r=e.length,i=[];r--;)i[r]=t(e[r]);return i}function v(e,t){var r=e.split("@"),i="";return r.length>1&&(i=r[0]+"@",e=r[1]),i+b((e=e.replace(d,".")).split("."),t).join(".")}function T(e){for(var t,r,i=[],n=0,s=e.length;n<s;)(t=e.charCodeAt(n++))>=55296&&t<=56319&&n<s?56320==(64512&(r=e.charCodeAt(n++)))?i.push(((1023&t)<<10)+(1023&r)+65536):(i.push(t),n--):i.push(t);return i}function P(e){return b(e,function(e){var t="";return e>65535&&(t+=m((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=m(e)}).join("")}function S(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:h}function A(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function w(e,t,r){var i=0;for(e=r?g(e/700):e>>1,e+=g(e/t);e>455;i+=h)e=g(e/35);return g(i+36*e/(e+38))}function E(e){var t,r,i,n,s,o,a,c,u,p,d=[],f=e.length,m=0,b=128,v=72;for((r=e.lastIndexOf("-"))<0&&(r=0),i=0;i<r;++i)e.charCodeAt(i)>=128&&y("not-basic"),d.push(e.charCodeAt(i));for(n=r>0?r+1:0;n<f;){for(s=m,o=1,a=h;n>=f&&y("invalid-input"),((c=S(e.charCodeAt(n++)))>=h||c>g((l-m)/o))&&y("overflow"),m+=c*o,!(c<(u=a<=v?1:a>=v+26?26:a-v));a+=h)o>g(l/(p=h-u))&&y("overflow"),o*=p;v=w(m-s,t=d.length+1,0==s),g(m/t)>l-b&&y("overflow"),b+=g(m/t),m%=t,d.splice(m++,0,b)}return P(d)}function x(e){var t,r,i,n,s,o,a,c,u,p,d,f,b,v,P,S=[];for(f=(e=T(e)).length,t=128,r=0,s=72,o=0;o<f;++o)(d=e[o])<128&&S.push(m(d));for(i=n=S.length,n&&S.push("-");i<f;){for(a=l,o=0;o<f;++o)(d=e[o])>=t&&d<a&&(a=d);for(a-t>g((l-r)/(b=i+1))&&y("overflow"),r+=(a-t)*b,t=a,o=0;o<f;++o)if((d=e[o])<t&&++r>l&&y("overflow"),d==t){for(c=r,u=h;!(c<(p=u<=s?1:u>=s+26?26:u-s));u+=h)P=c-p,v=h-p,S.push(m(A(p+P%v,0))),c=g(P/v);S.push(m(A(c,0))),s=w(r,b,i==n),r=0,++i}++r,++t}return S.join("")}if(a={version:"1.4.1",ucs2:{decode:T,encode:P},decode:E,encode:x,toASCII:function(e){return v(e,function(e){return p.test(e)?"xn--"+x(e):e})},toUnicode:function(e){return v(e,function(e){return u.test(e)?E(e.slice(4).toLowerCase()):e})}},n&&s)if(t.exports==n)s.exports=a;else for(c in a)a.hasOwnProperty(c)&&(n[c]=a[c]);else i.punycode=a}(this)}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],152:[function(e,t,r){var i=String.prototype.replace,n=/%20/g,s="RFC1738",o="RFC3986";t.exports={default:o,formatters:{RFC1738:function(e){return i.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:s,RFC3986:o}},{}],153:[function(e,t,r){var i=e("./stringify"),n=e("./parse"),s=e("./formats");t.exports={formats:s,parse:n,stringify:i}},{"./formats":152,"./parse":154,"./stringify":155}],154:[function(e,t,r){var i=e("./utils"),n=Object.prototype.hasOwnProperty,s=Array.isArray,o={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:i.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},a=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},c=function(e,t,r){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},l=function(e,t,r,s){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,l=r.depth>0&&/(\[[^[\]]*])/.exec(o),h=l?o.slice(0,l.index):o,u=[];if(h){if(!r.plainObjects&&n.call(Object.prototype,h)&&!r.allowPrototypes)return;u.push(h)}for(var p=0;r.depth>0&&null!==(l=a.exec(o))&&p<r.depth;){if(p+=1,!r.plainObjects&&n.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}if(l){if(!0===r.strictDepth)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");u.push("["+o.slice(l.index)+"]")}return function(e,t,r,n){var s=0;if(e.length>0&&"[]"===e[e.length-1]){var o=e.slice(0,-1).join("");s=Array.isArray(t)&&t[o]?t[o].length:0}for(var a=n?t:c(t,r,s),l=e.length-1;l>=0;--l){var h,u=e[l];if("[]"===u&&r.parseArrays)h=r.allowEmptyArrays&&(""===a||r.strictNullHandling&&null===a)?[]:i.combine([],a);else{h=r.plainObjects?{__proto__:null}:{};var p="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,d=r.decodeDotInKeys?p.replace(/%2E/g,"."):p,f=parseInt(d,10);r.parseArrays||""!==d?!isNaN(f)&&u!==d&&String(f)===d&&f>=0&&r.parseArrays&&f<=r.arrayLimit?(h=[])[f]=a:"__proto__"!==d&&(h[d]=a):h={0:a}}a=h}return a}(u,t,r,s)}};t.exports=function(e,t){var r=function(e){if(!e)return o;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var t=void 0===e.charset?o.charset:e.charset,r=void 0===e.duplicates?o.duplicates:e.duplicates;if("combine"!==r&&"first"!==r&&"last"!==r)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||o.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:o.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:o.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:o.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:o.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:o.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:o.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:o.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:o.decoder,delimiter:"string"==typeof e.delimiter||i.isRegExp(e.delimiter)?e.delimiter:o.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:o.depth,duplicates:r,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:o.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:o.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:o.strictDepth,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:o.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}}(t);if(""===e||null==e)return r.plainObjects?{__proto__:null}:{};for(var h="string"==typeof e?function(e,t){var r={__proto__:null},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;l=l.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var h=t.parameterLimit===1/0?void 0:t.parameterLimit,u=l.split(t.delimiter,t.throwOnLimitExceeded?h+1:h);if(t.throwOnLimitExceeded&&u.length>h)throw new RangeError("Parameter limit exceeded. Only "+h+" parameter"+(1===h?"":"s")+" allowed.");var p,d=-1,f=t.charset;if(t.charsetSentinel)for(p=0;p<u.length;++p)0===u[p].indexOf("utf8=")&&("utf8=%E2%9C%93"===u[p]?f="utf-8":"utf8=%26%2310003%3B"===u[p]&&(f="iso-8859-1"),d=p,p=u.length);for(p=0;p<u.length;++p)if(p!==d){var g,m,y=u[p],b=y.indexOf("]="),v=-1===b?y.indexOf("="):b+1;-1===v?(g=t.decoder(y,o.decoder,f,"key"),m=t.strictNullHandling?null:""):(g=t.decoder(y.slice(0,v),o.decoder,f,"key"),m=i.maybeMap(c(y.slice(v+1),t,s(r[g])?r[g].length:0),function(e){return t.decoder(e,o.decoder,f,"value")})),m&&t.interpretNumericEntities&&"iso-8859-1"===f&&(m=a(String(m))),y.indexOf("[]=")>-1&&(m=s(m)?[m]:m);var T=n.call(r,g);T&&"combine"===t.duplicates?r[g]=i.combine(r[g],m):T&&"last"!==t.duplicates||(r[g]=m)}return r}(e,r):e,u=r.plainObjects?{__proto__:null}:{},p=Object.keys(h),d=0;d<p.length;++d){var f=p[d],g=l(f,h[f],r,"string"==typeof e);u=i.merge(u,g,r)}return!0===r.allowSparse?u:i.compact(u)}},{"./utils":156}],155:[function(e,t,r){var i=e("side-channel"),n=e("./utils"),s=e("./formats"),o=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},c=Array.isArray,l=Array.prototype.push,h=function(e,t){l.apply(e,c(t)?t:[t])},u=Date.prototype.toISOString,p=s.default,d={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:n.encode,encodeValuesOnly:!1,filter:void 0,format:p,formatter:s.formatters[p],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},f={},g=function e(t,r,s,o,a,l,u,p,g,m,y,b,v,T,P,S,A,w){for(var E,x=t,C=w,D=0,R=!1;void 0!==(C=C.get(f))&&!R;){var k=C.get(t);if(D+=1,void 0!==k){if(k===D)throw new RangeError("Cyclic object value");R=!0}void 0===C.get(f)&&(D=0)}if("function"==typeof m?x=m(r,x):x instanceof Date?x=v(x):"comma"===s&&c(x)&&(x=n.maybeMap(x,function(e){return e instanceof Date?v(e):e})),null===x){if(l)return g&&!S?g(r,d.encoder,A,"key",T):r;x=""}if("string"==typeof(E=x)||"number"==typeof E||"boolean"==typeof E||"symbol"==typeof E||"bigint"==typeof E||n.isBuffer(x))return g?[P(S?r:g(r,d.encoder,A,"key",T))+"="+P(g(x,d.encoder,A,"value",T))]:[P(r)+"="+P(String(x))];var N,j=[];if(void 0===x)return j;if("comma"===s&&c(x))S&&g&&(x=n.maybeMap(x,g)),N=[{value:x.length>0?x.join(",")||null:void 0}];else if(c(m))N=m;else{var O=Object.keys(x);N=y?O.sort(y):O}var I=p?String(r).replace(/\./g,"%2E"):String(r),M=o&&c(x)&&1===x.length?I+"[]":I;if(a&&c(x)&&0===x.length)return M+"[]";for(var L=0;L<N.length;++L){var F=N[L],V="object"==typeof F&&F&&void 0!==F.value?F.value:x[F];if(!u||null!==V){var _=b&&p?String(F).replace(/\./g,"%2E"):String(F),B=c(x)?"function"==typeof s?s(M,_):M:M+(b?"."+_:"["+_+"]");w.set(t,D);var U=i();U.set(f,w),h(j,e(V,B,s,o,a,l,u,p,"comma"===s&&S&&c(x)?null:g,m,y,b,v,T,P,S,A,U))}}return j};t.exports=function(e,t){var r,n=e,l=function(e){if(!e)return d;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||d.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=s.default;if(void 0!==e.format){if(!o.call(s.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var i,n=s.formatters[r],l=d.filter;if(("function"==typeof e.filter||c(e.filter))&&(l=e.filter),i=e.arrayFormat in a?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":d.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var h=void 0===e.allowDots?!0===e.encodeDotInKeys||d.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:d.addQueryPrefix,allowDots:h,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:d.allowEmptyArrays,arrayFormat:i,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:d.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?d.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:d.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:d.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:d.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:d.encodeValuesOnly,filter:l,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:d.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:d.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:d.strictNullHandling}}(t);"function"==typeof l.filter?n=(0,l.filter)("",n):c(l.filter)&&(r=l.filter);var u=[];if("object"!=typeof n||null===n)return"";var p=a[l.arrayFormat],f="comma"===p&&l.commaRoundTrip;r||(r=Object.keys(n)),l.sort&&r.sort(l.sort);for(var m=i(),y=0;y<r.length;++y){var b=r[y],v=n[b];l.skipNulls&&null===v||h(u,g(v,b,p,f,l.allowEmptyArrays,l.strictNullHandling,l.skipNulls,l.encodeDotInKeys,l.encode?l.encoder:null,l.filter,l.sort,l.allowDots,l.serializeDate,l.format,l.formatter,l.encodeValuesOnly,l.charset,m))}var T=u.join(l.delimiter),P=!0===l.addQueryPrefix?"?":"";return l.charsetSentinel&&("iso-8859-1"===l.charset?P+="utf8=%26%2310003%3B&":P+="utf8=%E2%9C%93&"),T.length>0?P+T:""}},{"./formats":152,"./utils":156,"side-channel":164}],156:[function(e,t,r){var i=e("./formats"),n=Object.prototype.hasOwnProperty,s=Array.isArray,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e,t){for(var r=t&&t.plainObjects?{__proto__:null}:{},i=0;i<e.length;++i)void 0!==e[i]&&(r[i]=e[i]);return r},c=1024;t.exports={arrayToObject:a,assign:function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],i=0;i<t.length;++i)for(var n=t[i],o=n.obj[n.prop],a=Object.keys(o),c=0;c<a.length;++c){var l=a[c],h=o[l];"object"==typeof h&&null!==h&&-1===r.indexOf(h)&&(t.push({obj:o,prop:l}),r.push(h))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(s(r)){for(var i=[],n=0;n<r.length;++n)void 0!==r[n]&&i.push(r[n]);t.obj[t.prop]=i}}}(t),e},decode:function(e,t,r){var i=e.replace(/\+/g," ");if("iso-8859-1"===r)return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch(e){return i}},encode:function(e,t,r,n,s){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===r)return escape(a).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var l="",h=0;h<a.length;h+=c){for(var u=a.length>=c?a.slice(h,h+c):a,p=[],d=0;d<u.length;++d){var f=u.charCodeAt(d);45===f||46===f||95===f||126===f||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||s===i.RFC1738&&(40===f||41===f)?p[p.length]=u.charAt(d):f<128?p[p.length]=o[f]:f<2048?p[p.length]=o[192|f>>6]+o[128|63&f]:f<55296||f>=57344?p[p.length]=o[224|f>>12]+o[128|f>>6&63]+o[128|63&f]:(d+=1,f=65536+((1023&f)<<10|1023&u.charCodeAt(d)),p[p.length]=o[240|f>>18]+o[128|f>>12&63]+o[128|f>>6&63]+o[128|63&f])}l+=p.join("")}return l},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(s(e)){for(var r=[],i=0;i<e.length;i+=1)r.push(t(e[i]));return r}return t(e)},merge:function e(t,r,i){if(!r)return t;if("object"!=typeof r&&"function"!=typeof r){if(s(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(i&&(i.plainObjects||i.allowPrototypes)||!n.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var o=t;return s(t)&&!s(r)&&(o=a(t,i)),s(t)&&s(r)?(r.forEach(function(r,s){if(n.call(t,s)){var o=t[s];o&&"object"==typeof o&&r&&"object"==typeof r?t[s]=e(o,r,i):t.push(r)}else t[s]=r}),t):Object.keys(r).reduce(function(t,s){var o=r[s];return n.call(t,s)?t[s]=e(t[s],o,i):t[s]=o,t},o)}}},{"./formats":152}],157:[function(e,t,r){function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,s){t=t||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var a=/\+/g;e=e.split(t);var c=1e3;s&&"number"==typeof s.maxKeys&&(c=s.maxKeys);var l=e.length;c>0&&l>c&&(l=c);for(var h=0;h<l;++h){var u,p,d,f,g=e[h].replace(a,"%20"),m=g.indexOf(r);m>=0?(u=g.substr(0,m),p=g.substr(m+1)):(u=g,p=""),d=decodeURIComponent(u),f=decodeURIComponent(p),i(o,d)?n(o[d])?o[d].push(f):o[d]=[o[d],f]:o[d]=f}return o};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],158:[function(e,t,r){var i=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,r,a){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?s(o(e),function(o){var a=encodeURIComponent(i(o))+r;return n(e[o])?s(e[o],function(e){return a+encodeURIComponent(i(e))}).join(t):a+encodeURIComponent(i(e[o]))}).join(t):a?encodeURIComponent(i(a))+r+encodeURIComponent(i(e)):""};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function s(e,t){if(e.map)return e.map(t);for(var r=[],i=0;i<e.length;i++)r.push(t(e[i],i));return r}var o=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},{}],159:[function(e,t,r){r.decode=r.parse=e("./decode"),r.encode=r.stringify=e("./encode")},{"./decode":157,"./encode":158}],160:[function(e,t,r){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var i=e("buffer"),n=i.Buffer;function s(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=i:(s(i,r),r.Buffer=o),o.prototype=Object.create(n.prototype),s(n,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=n(e);return void 0!==t?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},{buffer:20}],161:[function(e,t,r){var i=e("object-inspect"),n=e("es-errors/type"),s=function(e,t,r){for(var i,n=e;null!=(i=n.next);n=i)if(i.key===t)return n.next=i.next,r||(i.next=e.next,e.next=i),i};t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new n("Side channel does not contain "+i(e))},delete:function(t){var r=e&&e.next,i=function(e,t){if(e)return s(e,t,!0)}(e,t);return i&&r&&r===i&&(e=void 0),!!i},get:function(t){return function(e,t){if(e){var r=s(e,t);return r&&r.value}}(e,t)},has:function(t){return function(e,t){return!!e&&!!s(e,t)}(e,t)},set:function(t,r){e||(e={next:void 0}),function(e,t,r){var i=s(e,t);i?i.value=r:e.next={key:t,next:e.next,value:r}}(e,t,r)}};return t}},{"es-errors/type":47,"object-inspect":136}],162:[function(e,t,r){var i=e("get-intrinsic"),n=e("call-bound"),s=e("object-inspect"),o=e("es-errors/type"),a=i("%Map%",!0),c=n("Map.prototype.get",!0),l=n("Map.prototype.set",!0),h=n("Map.prototype.has",!0),u=n("Map.prototype.delete",!0),p=n("Map.prototype.size",!0);t.exports=!!a&&function(){var e,t={assert:function(e){if(!t.has(e))throw new o("Side channel does not contain "+s(e))},delete:function(t){if(e){var r=u(e,t);return 0===p(e)&&(e=void 0),r}return!1},get:function(t){if(e)return c(e,t)},has:function(t){return!!e&&h(e,t)},set:function(t,r){e||(e=new a),l(e,t,r)}};return t}},{"call-bound":30,"es-errors/type":47,"get-intrinsic":104,"object-inspect":136}],163:[function(e,t,r){var i=e("get-intrinsic"),n=e("call-bound"),s=e("object-inspect"),o=e("side-channel-map"),a=e("es-errors/type"),c=i("%WeakMap%",!0),l=n("WeakMap.prototype.get",!0),h=n("WeakMap.prototype.set",!0),u=n("WeakMap.prototype.has",!0),p=n("WeakMap.prototype.delete",!0);t.exports=c?function(){var e,t,r={assert:function(e){if(!r.has(e))throw new a("Side channel does not contain "+s(e))},delete:function(r){if(c&&r&&("object"==typeof r||"function"==typeof r)){if(e)return p(e,r)}else if(o&&t)return t.delete(r);return!1},get:function(r){return c&&r&&("object"==typeof r||"function"==typeof r)&&e?l(e,r):t&&t.get(r)},has:function(r){return c&&r&&("object"==typeof r||"function"==typeof r)&&e?u(e,r):!!t&&t.has(r)},set:function(r,i){c&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new c),h(e,r,i)):o&&(t||(t=o()),t.set(r,i))}};return r}:o},{"call-bound":30,"es-errors/type":47,"get-intrinsic":104,"object-inspect":136,"side-channel-map":162}],164:[function(e,t,r){var i=e("es-errors/type"),n=e("object-inspect"),s=e("side-channel-list"),o=e("side-channel-map"),a=e("side-channel-weakmap")||o||s;t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new i("Side channel does not contain "+n(e))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,r){e||(e=a()),e.set(t,r)}};return t}},{"es-errors/type":47,"object-inspect":136,"side-channel-list":161,"side-channel-map":162,"side-channel-weakmap":163}],165:[function(e,t,r){(function(e){(function(){/*! simple-concat. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */t.exports=function(t,r){var i=[];t.on("data",function(e){i.push(e)}),t.once("end",function(){r&&r(null,e.concat(i)),r=null}),t.once("error",function(e){r&&r(e),r=null})}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:20}],166:[function(e,t,r){(function(r){(function(){/*! simple-get. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */t.exports=u;const i=e("simple-concat"),n=e("decompress-response"),s=e("http"),o=e("https"),a=e("once"),c=e("querystring"),l=e("url"),h=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;function u(e,t){if(e=Object.assign({maxRedirects:10},"string"==typeof e?{url:e}:e),t=a(t),e.url){const{hostname:t,port:r,protocol:i,auth:n,path:s}=l.parse(e.url);delete e.url,t||r||i||n?Object.assign(e,{hostname:t,port:r,protocol:i,auth:n,path:s}):e.path=s}const i={"accept-encoding":"gzip, deflate"};let p;e.headers&&Object.keys(e.headers).forEach(t=>i[t.toLowerCase()]=e.headers[t]),e.headers=i,e.body?p=e.json&&!h(e.body)?JSON.stringify(e.body):e.body:e.form&&(p="string"==typeof e.form?e.form:c.stringify(e.form),e.headers["content-type"]="application/x-www-form-urlencoded"),p&&(e.method||(e.method="POST"),h(p)||(e.headers["content-length"]=r.byteLength(p)),e.json&&!e.form&&(e.headers["content-type"]="application/json")),delete e.body,delete e.form,e.json&&(e.headers.accept="application/json"),e.method&&(e.method=e.method.toUpperCase());const d=e.hostname,f=("https:"===e.protocol?o:s).request(e,r=>{if(!1!==e.followRedirects&&r.statusCode>=300&&r.statusCode<400&&r.headers.location){e.url=r.headers.location,delete e.headers.host,r.resume();const i=l.parse(e.url).hostname;return null!==i&&i!==d&&(delete e.headers.cookie,delete e.headers.authorization),"POST"===e.method&&[301,302].includes(r.statusCode)&&(e.method="GET",delete e.headers["content-length"],delete e.headers["content-type"]),0===e.maxRedirects--?t(new Error("too many redirects")):u(e,t)}const i="function"==typeof n&&"HEAD"!==e.method;t(null,i?n(r):r)});return f.on("timeout",()=>{f.abort(),t(new Error("Request timed out"))}),f.on("error",t),h(p)?p.on("error",t).pipe(f):f.end(p),f}u.concat=(e,t)=>u(e,(r,n)=>{if(r)return t(r);i(n,(r,i)=>{if(r)return t(r);if(e.json)try{i=JSON.parse(i.toString())}catch(r){return t(r,n,i)}t(null,n,i)})}),["get","post","put","patch","head","delete"].forEach(e=>{u[e]=(t,r)=>("string"==typeof t&&(t={url:t}),u(Object.assign({method:e.toUpperCase()},t),r))})}).call(this)}).call(this,e("buffer").Buffer)},{buffer:20,"decompress-response":18,http:167,https:113,once:137,querystring:159,"simple-concat":165,url:188}],167:[function(e,t,r){(function(t){(function(){var i=e("./lib/request"),n=e("./lib/response"),s=e("xtend"),o=e("builtin-status-codes"),a=e("url"),c=r;c.request=function(e,r){e="string"==typeof e?a.parse(e):s(e);var n=-1===t.location.protocol.search(/^https?:$/)?"http:":"",o=e.protocol||n,c=e.hostname||e.host,l=e.port,h=e.path||"/";c&&-1!==c.indexOf(":")&&(c="["+c+"]"),e.url=(c?o+"//"+c:"")+(l?":"+l:"")+h,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var u=new i(e);return r&&u.on("response",r),u},c.get=function(e,t){var r=c.request(e,t);return r.end(),r},c.ClientRequest=i,c.IncomingMessage=n.IncomingMessage,c.Agent=function(){},c.Agent.defaultMaxSockets=4,c.globalAgent=new c.Agent,c.STATUS_CODES=o,c.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,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/request":169,"./lib/response":170,"builtin-status-codes":21,url:188,xtend:191}],168:[function(e,t,r){(function(e){(function(){var t;function i(){if(void 0!==t)return t;if(e.XMLHttpRequest){t=new e.XMLHttpRequest;try{t.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){t=null}}else t=null;return t}function n(e){var t=i();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function s(e){return"function"==typeof e}r.fetch=s(e.fetch)&&s(e.ReadableStream),r.writableStream=s(e.WritableStream),r.abortController=s(e.AbortController),r.arraybuffer=r.fetch||n("arraybuffer"),r.msstream=!r.fetch&&n("ms-stream"),r.mozchunkedarraybuffer=!r.fetch&&n("moz-chunked-arraybuffer"),r.overrideMimeType=r.fetch||!!i()&&s(i().overrideMimeType),t=null}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],169:[function(e,t,r){(function(r,i,n){(function(){var s=e("./capability"),o=e("inherits"),a=e("./response"),c=e("readable-stream"),l=a.IncomingMessage,h=a.readyStates;var u=t.exports=function(e){var t,r=this;c.Writable.call(r),r._opts=e,r._body=[],r._headers={},e.auth&&r.setHeader("Authorization","Basic "+n.from(e.auth).toString("base64")),Object.keys(e.headers).forEach(function(t){r.setHeader(t,e.headers[t])});var i=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!s.abortController)i=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!s.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}r._mode=function(e,t){return s.fetch&&t?"fetch":s.mozchunkedarraybuffer?"moz-chunked-arraybuffer":s.msstream?"ms-stream":s.arraybuffer&&e?"arraybuffer":"text"}(t,i),r._fetchTimer=null,r._socketTimeout=null,r._socketTimer=null,r.on("finish",function(){r._onFinish()})};o(u,c.Writable),u.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===p.indexOf(r)&&(this._headers[r]={name:e,value:t})},u.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},u.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},u.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&0!==t.timeout&&e.setTimeout(t.timeout);var n=e._headers,o=null;"GET"!==t.method&&"HEAD"!==t.method&&(o=new Blob(e._body,{type:(n["content-type"]||{}).value||""}));var a=[];if(Object.keys(n).forEach(function(e){var t=n[e].name,r=n[e].value;Array.isArray(r)?r.forEach(function(e){a.push([t,e])}):a.push([t,r])}),"fetch"===e._mode){var c=null;if(s.abortController){var l=new AbortController;c=l.signal,e._fetchAbortController=l,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=i.setTimeout(function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()},t.requestTimeout))}i.fetch(e._opts.url,{method:e._opts.method,headers:a,body:o||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:c}).then(function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()},function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)})}else{var u=e._xhr=new i.XMLHttpRequest;try{u.open(e._opts.method,e._opts.url,!0)}catch(t){return void r.nextTick(function(){e.emit("error",t)})}"responseType"in u&&(u.responseType=e._mode),"withCredentials"in u&&(u.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in u&&u.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(u.timeout=t.requestTimeout,u.ontimeout=function(){e.emit("requestTimeout")}),a.forEach(function(e){u.setRequestHeader(e[0],e[1])}),e._response=null,u.onreadystatechange=function(){switch(u.readyState){case h.LOADING:case h.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(u.onprogress=function(){e._onXHRProgress()}),u.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{u.send(o)}catch(t){return void r.nextTick(function(){e.emit("error",t)})}}}},u.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},u.prototype._connect=function(){var e=this;e._destroyed||(e._response=new l(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",function(t){e.emit("error",t)}),e.emit("response",e._response))},u.prototype._write=function(e,t,r){this._body.push(e),r()},u.prototype._resetTimers=function(e){var t=this;i.clearTimeout(t._socketTimer),t._socketTimer=null,e?(i.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=i.setTimeout(function(){t.emit("timeout")},t._socketTimeout))},u.prototype.abort=u.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},u.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),c.Writable.prototype.end.call(this,e,t,r)},u.prototype.setTimeout=function(e,t){var r=this;t&&r.once("timeout",t),r._socketTimeout=e,r._resetTimers(!1)},u.prototype.flushHeaders=function(){},u.prototype.setNoDelay=function(){},u.prototype.setSocketKeepAlive=function(){};var p=["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,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":168,"./response":170,_process:150,buffer:20,inherits:115,"readable-stream":185}],170:[function(e,t,r){(function(t,i,n){(function(){var s=e("./capability"),o=e("inherits"),a=e("readable-stream"),c=r.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},l=r.IncomingMessage=function(e,r,i,o){var c=this;if(a.Readable.call(c),c._mode=i,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",function(){t.nextTick(function(){c.emit("close")})}),"fetch"===i){if(c._fetchResponse=r,c.url=r.url,c.statusCode=r.status,c.statusMessage=r.statusText,r.headers.forEach(function(e,t){c.headers[t.toLowerCase()]=e,c.rawHeaders.push(t,e)}),s.writableStream){var l=new WritableStream({write:function(e){return o(!1),new Promise(function(t,r){c._destroyed?r():c.push(n.from(e))?t():c._resumeFetch=t})},close:function(){o(!0),c._destroyed||c.push(null)},abort:function(e){o(!0),c._destroyed||c.emit("error",e)}});try{return void r.body.pipeTo(l).catch(function(e){o(!0),c._destroyed||c.emit("error",e)})}catch(f){}}var h=r.body.getReader();function d(){h.read().then(function(e){c._destroyed||(o(e.done),e.done?c.push(null):(c.push(n.from(e.value)),d()))}).catch(function(e){o(!0),c._destroyed||c.emit("error",e)})}d()}else{if(c._xhr=e,c._pos=0,c.url=e.responseURL,c.statusCode=e.status,c.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach(function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===c.headers[r]&&(c.headers[r]=[]),c.headers[r].push(t[2])):void 0!==c.headers[r]?c.headers[r]+=", "+t[2]:c.headers[r]=t[2],c.rawHeaders.push(t[1],t[2])}}),c._charset="x-user-defined",!s.overrideMimeType){var u=c.rawHeaders["mime-type"];if(u){var p=u.match(/;\s*charset=([^;])(;|$)/);p&&(c._charset=p[1].toLowerCase())}c._charset||(c._charset="utf-8")}}};o(l,a.Readable),l.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},l.prototype._onXHRProgress=function(e){var t=this,r=t._xhr,s=null;switch(t._mode){case"text":if((s=r.responseText).length>t._pos){var o=s.substr(t._pos);if("x-user-defined"===t._charset){for(var a=n.alloc(o.length),l=0;l<o.length;l++)a[l]=255&o.charCodeAt(l);t.push(a)}else t.push(o,t._charset);t._pos=s.length}break;case"arraybuffer":if(r.readyState!==c.DONE||!r.response)break;s=r.response,t.push(n.from(new Uint8Array(s)));break;case"moz-chunked-arraybuffer":if(s=r.response,r.readyState!==c.LOADING||!s)break;t.push(n.from(new Uint8Array(s)));break;case"ms-stream":if(s=r.response,r.readyState!==c.LOADING)break;var h=new i.MSStreamReader;h.onprogress=function(){h.result.byteLength>t._pos&&(t.push(n.from(new Uint8Array(h.result.slice(t._pos)))),t._pos=h.result.byteLength)},h.onload=function(){e(!0),t.push(null)},h.readAsArrayBuffer(s)}t._xhr.readyState===c.DONE&&"ms-stream"!==t._mode&&(e(!0),t.push(null))}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":168,_process:150,buffer:20,inherits:115,"readable-stream":185}],171:[function(e,t,r){var i={};function n(e,t,r){r||(r=Error);var n=function(e){var r,i;function n(r,i,n){return e.call(this,function(e,r,i){return"string"==typeof t?t:t(e,r,i)}(r,i,n))||this}return i=e,(r=n).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i,n}(r);n.prototype.name=r.name,n.prototype.code=e,i[e]=n}function s(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(e){return String(e)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(e,t,r){var i,n,o,a;if("string"==typeof t&&(n="not ",t.substr(!o||o<0?0:+o,n.length)===n)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))a="The ".concat(e," ").concat(i," ").concat(s(t,"type"));else{var c=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(c," ").concat(i," ").concat(s(t,"type"))}return a+=". Received type ".concat(typeof r)},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=i},{}],172:[function(e,t,r){(function(r){(function(){var i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=l;var n=e("./_stream_readable"),s=e("./_stream_writable");e("inherits")(l,n);for(var o=i(s.prototype),a=0;a<o.length;a++){var c=o[a];l.prototype[c]||(l.prototype[c]=s.prototype[c])}function l(e){if(!(this instanceof l))return new l(e);n.call(this,e),s.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",h)))}function h(){this._writableState.ended||r.nextTick(u,this)}function u(e){e.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this)}).call(this,e("_process"))},{"./_stream_readable":174,"./_stream_writable":176,_process:150,inherits:115}],173:[function(e,t,r){t.exports=n;var i=e("./_stream_transform");function n(e){if(!(this instanceof n))return new n(e);i.call(this,e)}e("inherits")(n,i),n.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":175,inherits:115}],174:[function(e,t,r){(function(r,i){(function(){var n;t.exports=E,E.ReadableState=w;e("events").EventEmitter;var s=function(e,t){return e.listeners(t).length},o=e("./internal/streams/stream"),a=e("buffer").Buffer,c=(void 0!==i?i:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var l,h=e("util");l=h&&h.debuglog?h.debuglog("stream"):function(){};var u,p,d,f=e("./internal/streams/buffer_list"),g=e("./internal/streams/destroy"),m=e("./internal/streams/state").getHighWaterMark,y=e("../errors").codes,b=y.ERR_INVALID_ARG_TYPE,v=y.ERR_STREAM_PUSH_AFTER_EOF,T=y.ERR_METHOD_NOT_IMPLEMENTED,P=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e("inherits")(E,o);var S=g.errorOrDestroy,A=["error","close","destroy","pause","resume"];function w(t,r,i){n=n||e("./_stream_duplex"),t=t||{},"boolean"!=typeof i&&(i=r instanceof n),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=m(this,t,"readableHighWaterMark",i),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(u||(u=e("string_decoder/").StringDecoder),this.decoder=new u(t.encoding),this.encoding=t.encoding)}function E(t){if(n=n||e("./_stream_duplex"),!(this instanceof E))return new E(t);var r=this instanceof n;this._readableState=new w(t,this,r),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function x(e,t,r,i,n){l("readableAddChunk",t);var s,o=e._readableState;if(null===t)o.reading=!1,function(e,t){if(l("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?k(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,N(e)))}(e,o);else if(n||(s=function(e,t){var r;i=t,a.isBuffer(i)||i instanceof c||"string"==typeof t||void 0===t||e.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],t));var i;return r}(o,t)),s)S(e,s);else if(o.objectMode||t&&t.length>0)if("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),i)o.endEmitted?S(e,new P):C(e,o,t,!0);else if(o.ended)S(e,new v);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?C(e,o,t,!1):j(e,o)):C(e,o,t,!1)}else i||(o.reading=!1,j(e,o));return!o.ended&&(o.length<o.highWaterMark||0===o.length)}function C(e,t,r,i){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&k(e)),j(e,t)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),E.prototype.destroy=g.destroy,E.prototype._undestroy=g.undestroy,E.prototype._destroy=function(e,t){t(e)},E.prototype.push=function(e,t){var r,i=this._readableState;return i.objectMode?r=!0:"string"==typeof e&&((t=t||i.defaultEncoding)!==i.encoding&&(e=a.from(e,t),t=""),r=!0),x(this,e,t,!1,r)},E.prototype.unshift=function(e){return x(this,e,null,!0,!1)},E.prototype.isPaused=function(){return!1===this._readableState.flowing},E.prototype.setEncoding=function(t){u||(u=e("string_decoder/").StringDecoder);var r=new u(t);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var i=this._readableState.buffer.head,n="";null!==i;)n+=r.write(i.data),i=i.next;return this._readableState.buffer.clear(),""!==n&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var D=1073741824;function R(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=D?e=D:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function k(e){var t=e._readableState;l("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(l("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(N,e))}function N(e){var t=e._readableState;l("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,F(e)}function j(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(O,e,t))}function O(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(l("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function I(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function M(e){l("readable nexttick read 0"),e.read(0)}function L(e,t){l("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),F(e),t.flowing&&!t.reading&&e.read(0)}function F(e){var t=e._readableState;for(l("flow",t.flowing);t.flowing&&null!==e.read(););}function V(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function _(e){var t=e._readableState;l("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(B,t,e))}function B(e,t){if(l("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function U(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}E.prototype.read=function(e){l("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return l("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?_(this):k(this),null;if(0===(e=R(e,t))&&t.ended)return 0===t.length&&_(this),null;var i,n=t.needReadable;return l("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&l("length less than watermark",n=!0),t.ended||t.reading?l("reading or ended",n=!1):n&&(l("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=R(r,t))),null===(i=e>0?V(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&_(this)),null!==i&&this.emit("data",i),i},E.prototype._read=function(e){S(this,new T("_read()"))},E.prototype.pipe=function(e,t){var i=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,l("pipe count=%d opts=%j",n.pipesCount,t);var o=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?c:m;function a(t,r){l("onunpipe"),t===i&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,l("cleanup"),e.removeListener("close",f),e.removeListener("finish",g),e.removeListener("drain",h),e.removeListener("error",d),e.removeListener("unpipe",a),i.removeListener("end",c),i.removeListener("end",m),i.removeListener("data",p),u=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function c(){l("onend"),e.end()}n.endEmitted?r.nextTick(o):i.once("end",o),e.on("unpipe",a);var h=function(e){return function(){var t=e._readableState;l("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,F(e))}}(i);e.on("drain",h);var u=!1;function p(t){l("ondata");var r=e.write(t);l("dest.write",r),!1===r&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==U(n.pipes,e))&&!u&&(l("false write response, pause",n.awaitDrain),n.awaitDrain++),i.pause())}function d(t){l("onerror",t),m(),e.removeListener("error",d),0===s(e,"error")&&S(e,t)}function f(){e.removeListener("finish",g),m()}function g(){l("onfinish"),e.removeListener("close",f),m()}function m(){l("unpipe"),i.unpipe(e)}return i.on("data",p),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",d),e.once("close",f),e.once("finish",g),e.emit("pipe",i),n.flowing||(l("pipe resume"),i.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=U(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},E.prototype.on=function(e,t){var i=o.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,l("on readable",n.length,n.reading),n.length?k(this):n.reading||r.nextTick(M,this))),i},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var i=o.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(I,this),i},E.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(I,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(l("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(L,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;for(var n in e.on("end",function(){if(l("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(n){(l("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n)||(r.objectMode||n&&n.length)&&(t.push(n)||(i=!0,e.pause()))}),e)void 0===this[n]&&"function"==typeof e[n]&&(this[n]=function(t){return function(){return e[t].apply(e,arguments)}}(n));for(var s=0;s<A.length;s++)e.on(A[s],this.emit.bind(this,A[s]));return this._read=function(t){l("wrapped _read",t),i&&(i=!1,e.resume())},this},"function"==typeof Symbol&&(E.prototype[Symbol.asyncIterator]=function(){return void 0===p&&(p=e("./internal/streams/async_iterator")),p(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),E._fromList=V,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(E.from=function(t,r){return void 0===d&&(d=e("./internal/streams/from")),d(E,t,r)})}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":171,"./_stream_duplex":172,"./internal/streams/async_iterator":177,"./internal/streams/buffer_list":178,"./internal/streams/destroy":179,"./internal/streams/from":181,"./internal/streams/state":183,"./internal/streams/stream":184,_process:150,buffer:20,events:50,inherits:115,"string_decoder/":186,util:18}],175:[function(e,t,r){t.exports=h;var i=e("../errors").codes,n=i.ERR_METHOD_NOT_IMPLEMENTED,s=i.ERR_MULTIPLE_CALLBACK,o=i.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=i.ERR_TRANSFORM_WITH_LENGTH_0,c=e("./_stream_duplex");function l(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(null===i)return this.emit("error",new s);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),i(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function h(e){if(!(this instanceof h))return new h(e);c.call(this,e),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",u)}function u(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?p(this,null,null):this._flush(function(t,r){p(e,t,r)})}function p(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new a;if(e._transformState.transforming)throw new o;return e.push(null)}e("inherits")(h,c),h.prototype.push=function(e,t){return this._transformState.needTransform=!1,c.prototype.push.call(this,e,t)},h.prototype._transform=function(e,t,r){r(new n("_transform()"))},h.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},h.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},h.prototype._destroy=function(e,t){c.prototype._destroy.call(this,e,function(e){t(e)})}},{"../errors":171,"./_stream_duplex":172,inherits:115}],176:[function(e,t,r){(function(r,i){(function(){function n(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var i=e.entry;e.entry=null;for(;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}(t,e)}}var s;t.exports=E,E.WritableState=w;var o={deprecate:e("util-deprecate")},a=e("./internal/streams/stream"),c=e("buffer").Buffer,l=(void 0!==i?i:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var h,u=e("./internal/streams/destroy"),p=e("./internal/streams/state").getHighWaterMark,d=e("../errors").codes,f=d.ERR_INVALID_ARG_TYPE,g=d.ERR_METHOD_NOT_IMPLEMENTED,m=d.ERR_MULTIPLE_CALLBACK,y=d.ERR_STREAM_CANNOT_PIPE,b=d.ERR_STREAM_DESTROYED,v=d.ERR_STREAM_NULL_VALUES,T=d.ERR_STREAM_WRITE_AFTER_END,P=d.ERR_UNKNOWN_ENCODING,S=u.errorOrDestroy;function A(){}function w(t,i,o){s=s||e("./_stream_duplex"),t=t||{},"boolean"!=typeof o&&(o=i instanceof s),this.objectMode=!!t.objectMode,o&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=p(this,t,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var i=e._writableState,n=i.sync,s=i.writecb;if("function"!=typeof s)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(i),t)!function(e,t,i,n,s){--t.pendingcb,i?(r.nextTick(s,n),r.nextTick(N,e,t),e._writableState.errorEmitted=!0,S(e,n)):(s(n),e._writableState.errorEmitted=!0,S(e,n),N(e,t))}(e,i,n,t,s);else{var o=R(i)||e.destroyed;o||i.corked||i.bufferProcessing||!i.bufferedRequest||D(e,i),n?r.nextTick(C,e,i,o,s):C(e,i,o,s)}}(i,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function E(t){var r=this instanceof(s=s||e("./_stream_duplex"));if(!r&&!h.call(E,this))return new E(t);this._writableState=new w(t,this,r),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function x(e,t,r,i,n,s,o){t.writelen=i,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(n,t.onwrite):e._write(n,s,t.onwrite),t.sync=!1}function C(e,t,r,i){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,i(),N(e,t)}function D(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,s=new Array(i),o=t.corkedRequestsFree;o.entry=r;for(var a=0,c=!0;r;)s[a]=r,r.isBuf||(c=!1),r=r.next,a+=1;s.allBuffers=c,x(e,t,!0,t.length,s,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new n(t),t.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,h=r.encoding,u=r.callback;if(x(e,t,!1,t.objectMode?1:l.length,l,h,u),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function R(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function k(e,t){e._final(function(r){t.pendingcb--,r&&S(e,r),t.prefinished=!0,e.emit("prefinish"),N(e,t)})}function N(e,t){var i=R(t);if(i&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,r.nextTick(k,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return i}e("inherits")(E,a),w.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(w.prototype,"buffer",{get:o.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(E,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||this===E&&(e&&e._writableState instanceof w)}})):h=function(e){return e instanceof this},E.prototype.pipe=function(){S(this,new y)},E.prototype.write=function(e,t,i){var n,s=this._writableState,o=!1,a=!s.objectMode&&(n=e,c.isBuffer(n)||n instanceof l);return a&&!c.isBuffer(e)&&(e=function(e){return c.from(e)}(e)),"function"==typeof t&&(i=t,t=null),a?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof i&&(i=A),s.ending?function(e,t){var i=new T;S(e,i),r.nextTick(t,i)}(this,i):(a||function(e,t,i,n){var s;return null===i?s=new v:"string"==typeof i||t.objectMode||(s=new f("chunk",["string","Buffer"],i)),!s||(S(e,s),r.nextTick(n,s),!1)}(this,s,e,i))&&(s.pendingcb++,o=function(e,t,r,i,n,s){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,r));return t}(t,i,n);i!==o&&(r=!0,n="buffer",i=o)}var a=t.objectMode?1:i.length;t.length+=a;var l=t.length<t.highWaterMark;l||(t.needDrain=!0);if(t.writing||t.corked){var h=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},h?h.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else x(e,t,!1,a,i,n,s);return l}(this,s,a,e,t,i)),o},E.prototype.cork=function(){this._writableState.corked++},E.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||D(this,e))},E.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new P(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,r){r(new g("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,i){var n=this._writableState;return"function"==typeof e?(i=e,e=null,t=null):"function"==typeof t&&(i=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,i){t.ending=!0,N(e,t),i&&(t.finished?r.nextTick(i):e.once("finish",i));t.ended=!0,e.writable=!1}(this,n,i),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=u.destroy,E.prototype._undestroy=u.undestroy,E.prototype._destroy=function(e,t){t(e)}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":171,"./_stream_duplex":172,"./internal/streams/destroy":179,"./internal/streams/state":183,"./internal/streams/stream":184,_process:150,buffer:20,inherits:115,"util-deprecate":189}],177:[function(e,t,r){(function(r){(function(){var i;function n(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=e("./end-of-stream"),o=Symbol("lastResolve"),a=Symbol("lastReject"),c=Symbol("error"),l=Symbol("ended"),h=Symbol("lastPromise"),u=Symbol("handlePromise"),p=Symbol("stream");function d(e,t){return{value:e,done:t}}function f(e){var t=e[o];if(null!==t){var r=e[p].read();null!==r&&(e[h]=null,e[o]=null,e[a]=null,t(d(r,!1)))}}function g(e){r.nextTick(f,e)}var m=Object.getPrototypeOf(function(){}),y=Object.setPrototypeOf((n(i={get stream(){return this[p]},next:function(){var e=this,t=this[c];if(null!==t)return Promise.reject(t);if(this[l])return Promise.resolve(d(void 0,!0));if(this[p].destroyed)return new Promise(function(t,i){r.nextTick(function(){e[c]?i(e[c]):t(d(void 0,!0))})});var i,n=this[h];if(n)i=new Promise(function(e,t){return function(r,i){e.then(function(){t[l]?r(d(void 0,!0)):t[u](r,i)},i)}}(n,this));else{var s=this[p].read();if(null!==s)return Promise.resolve(d(s,!1));i=new Promise(this[u])}return this[h]=i,i}},Symbol.asyncIterator,function(){return this}),n(i,"return",function(){var e=this;return new Promise(function(t,r){e[p].destroy(null,function(e){e?r(e):t(d(void 0,!0))})})}),i),m);t.exports=function(e){var t,r=Object.create(y,(n(t={},p,{value:e,writable:!0}),n(t,o,{value:null,writable:!0}),n(t,a,{value:null,writable:!0}),n(t,c,{value:null,writable:!0}),n(t,l,{value:e._readableState.endEmitted,writable:!0}),n(t,u,{value:function(e,t){var i=r[p].read();i?(r[h]=null,r[o]=null,r[a]=null,e(d(i,!1))):(r[o]=e,r[a]=t)},writable:!0}),t));return r[h]=null,s(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[a];return null!==t&&(r[h]=null,r[o]=null,r[a]=null,t(e)),void(r[c]=e)}var i=r[o];null!==i&&(r[h]=null,r[o]=null,r[a]=null,i(d(void 0,!0))),r[l]=!0}),e.on("readable",g.bind(null,r)),r}}).call(this)}).call(this,e("_process"))},{"./end-of-stream":180,_process:150}],178:[function(e,t,r){function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach(function(t){s(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function s(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,a(i.key),i)}}function a(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var c=e("buffer").Buffer,l=e("util").inspect,h=l&&l.custom||"inspect";function u(e,t,r){c.prototype.copy.call(e,t,r)}t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r,i;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return c.alloc(0);for(var t=c.allocUnsafe(e>>>0),r=this.head,i=0;r;)u(r.data,t,i),i+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,i=t.data;for(e-=i.length;t=t.next;){var n=t.data,s=e>n.length?n.length:e;if(s===n.length?i+=n:i+=n.slice(0,e),0===(e-=s)){s===n.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=n.slice(s));break}++r}return this.length-=r,i}},{key:"_getBuffer",value:function(e){var t=c.allocUnsafe(e),r=this.head,i=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var n=r.data,s=e>n.length?n.length:e;if(n.copy(t,t.length-e,0,s),0===(e-=s)){s===n.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=n.slice(s));break}++i}return this.length-=i,t}},{key:h,value:function(e,t){return l(this,n(n({},t),{},{depth:0,customInspect:!1}))}}])&&o(t.prototype,r),i&&o(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}()},{buffer:20,util:18}],179:[function(e,t,r){(function(e){(function(){function r(e,t){n(e,t),i(e)}function i(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function n(e,t){e.emit("error",t)}t.exports={destroy:function(t,s){var o=this,a=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return a||c?(s?s(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(n,this,t)):e.nextTick(n,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!s&&t?o._writableState?o._writableState.errorEmitted?e.nextTick(i,o):(o._writableState.errorEmitted=!0,e.nextTick(r,o,t)):e.nextTick(r,o,t):s?(e.nextTick(i,o),s(t)):e.nextTick(i,o)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,i=e._writableState;r&&r.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this)}).call(this,e("_process"))},{_process:150}],180:[function(e,t,r){var i=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function n(){}t.exports=function e(t,r,s){if("function"==typeof r)return e(t,null,r);r||(r={}),s=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];e.apply(this,i)}}}(s||n);var o=r.readable||!1!==r.readable&&t.readable,a=r.writable||!1!==r.writable&&t.writable,c=function(){t.writable||h()},l=t._writableState&&t._writableState.finished,h=function(){a=!1,l=!0,o||s.call(t)},u=t._readableState&&t._readableState.endEmitted,p=function(){o=!1,u=!0,a||s.call(t)},d=function(e){s.call(t,e)},f=function(){var e;return o&&!u?(t._readableState&&t._readableState.ended||(e=new i),s.call(t,e)):a&&!l?(t._writableState&&t._writableState.ended||(e=new i),s.call(t,e)):void 0},g=function(){t.req.on("finish",h)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?a&&!t._writableState&&(t.on("end",c),t.on("close",c)):(t.on("complete",h),t.on("abort",f),t.req?g():t.on("request",g)),t.on("end",p),t.on("finish",h),!1!==r.error&&t.on("error",d),t.on("close",f),function(){t.removeListener("complete",h),t.removeListener("abort",f),t.removeListener("request",g),t.req&&t.req.removeListener("finish",h),t.removeListener("end",c),t.removeListener("close",c),t.removeListener("finish",h),t.removeListener("end",p),t.removeListener("error",d),t.removeListener("close",f)}}},{"../../../errors":171}],181:[function(e,t,r){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],182:[function(e,t,r){var i;var n=e("../../../errors").codes,s=n.ERR_MISSING_ARGS,o=n.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function c(e){e()}function l(e,t){return e.pipe(t)}t.exports=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var h,u=function(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new s("streams");var p=r.map(function(t,n){var s=n<r.length-1;return function(t,r,n,s){s=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(s);var a=!1;t.on("close",function(){a=!0}),void 0===i&&(i=e("./end-of-stream")),i(t,{readable:r,writable:n},function(e){if(e)return s(e);a=!0,s()});var c=!1;return function(e){if(!a&&!c)return c=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void s(e||new o("pipe"))}}(t,s,n>0,function(e){h||(h=e),e&&p.forEach(c),s||(p.forEach(c),u(h))})});return r.reduce(l)}},{"../../../errors":171,"./end-of-stream":180}],183:[function(e,t,r){var i=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,r,n){var s=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,n,r);if(null!=s){if(!isFinite(s)||Math.floor(s)!==s||s<0)throw new i(n?r:"highWaterMark",s);return Math.floor(s)}return e.objectMode?16:16384}}},{"../../../errors":171}],184:[function(e,t,r){t.exports=e("events").EventEmitter},{events:50}],185:[function(e,t,r){(r=t.exports=e("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"),r.finished=e("./lib/internal/streams/end-of-stream.js"),r.pipeline=e("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":172,"./lib/_stream_passthrough.js":173,"./lib/_stream_readable.js":174,"./lib/_stream_transform.js":175,"./lib/_stream_writable.js":176,"./lib/internal/streams/end-of-stream.js":180,"./lib/internal/streams/pipeline.js":182}],186:[function(e,t,r){var i=e("safe-buffer").Buffer,n=i.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(i.isEncoding===n||!n(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=l,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=h,this.end=u,t=3;break;default:return this.write=p,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function h(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function u(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function p(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}r.StringDecoder=s,s.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},s.prototype.text=function(e,t){var r=function(e,t,r){var i=t.length-1;if(i<r)return 0;var n=o(t[i]);if(n>=0)return n>0&&(e.lastNeed=n-1),n;if(--i<r||-2===n)return 0;if(n=o(t[i]),n>=0)return n>0&&(e.lastNeed=n-2),n;if(--i<r||-2===n)return 0;if(n=o(t[i]),n>=0)return n>0&&(2===n?n=0:e.lastNeed=n-3),n;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":160}],187:[function(e,t,r){(function(t,i){(function(){var n=e("process/browser.js").nextTick,s=Function.prototype.apply,o=Array.prototype.slice,a={},c=0;function l(e,t){this._id=e,this._clearFn=t}r.setTimeout=function(){return new l(s.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new l(s.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(e){e.close()},l.prototype.unref=l.prototype.ref=function(){},l.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},r.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},r._unrefActive=r.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},r.setImmediate="function"==typeof t?t:function(e){var t=c++,i=!(arguments.length<2)&&o.call(arguments,1);return a[t]=!0,n(function(){a[t]&&(i?e.apply(null,i):e.call(null),r.clearImmediate(t))}),t},r.clearImmediate="function"==typeof i?i:function(e){delete a[e]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":150,timers:187}],188:[function(e,t,r){var i=e("punycode/");function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var s=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),h=["%","/","?",";","#"].concat(l),u=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=e("qs");function b(e,t,r){if(e&&"object"==typeof e&&e instanceof n)return e;var i=new n;return i.parse(e,t,r),i}n.prototype.parse=function(e,t,r){if("string"!=typeof e)throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),o=-1!==n&&n<e.indexOf("#")?"?":"#",c=e.split(o);c[0]=c[0].replace(/\\/g,"/");var b=e=c.join(o);if(b=b.trim(),!r&&1===e.split("#").length){var v=a.exec(b);if(v)return this.path=b,this.href=b,this.pathname=v[1],v[2]?(this.search=v[2],this.query=t?y.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var T=s.exec(b);if(T){var P=(T=T[0]).toLowerCase();this.protocol=P,b=b.substr(T.length)}if(r||T||b.match(/^\/\/[^@/]+@[^@/]+/)){var S="//"===b.substr(0,2);!S||T&&g[T]||(b=b.substr(2),this.slashes=!0)}if(!g[T]&&(S||T&&!m[T])){for(var A,w,E=-1,x=0;x<u.length;x++){-1!==(C=b.indexOf(u[x]))&&(-1===E||C<E)&&(E=C)}-1!==(w=-1===E?b.lastIndexOf("@"):b.lastIndexOf("@",E))&&(A=b.slice(0,w),b=b.slice(w+1),this.auth=decodeURIComponent(A)),E=-1;for(x=0;x<h.length;x++){var C;-1!==(C=b.indexOf(h[x]))&&(-1===E||C<E)&&(E=C)}-1===E&&(E=b.length),this.host=b.slice(0,E),b=b.slice(E),this.parseHost(),this.hostname=this.hostname||"";var D="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!D)for(var R=this.hostname.split(/\./),k=(x=0,R.length);x<k;x++){var N=R[x];if(N&&!N.match(p)){for(var j="",O=0,I=N.length;O<I;O++)N.charCodeAt(O)>127?j+="x":j+=N[O];if(!j.match(p)){var M=R.slice(0,x),L=R.slice(x+1),F=N.match(d);F&&(M.push(F[1]),L.unshift(F[2])),L.length&&(b="/"+L.join(".")+b),this.hostname=M.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),D||(this.hostname=i.toASCII(this.hostname));var V=this.port?":"+this.port:"",_=this.hostname||"";this.host=_+V,this.href+=this.host,D&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!f[P])for(x=0,k=l.length;x<k;x++){var B=l[x];if(-1!==b.indexOf(B)){var U=encodeURIComponent(B);U===B&&(U=escape(B)),b=b.split(B).join(U)}}var H=b.indexOf("#");-1!==H&&(this.hash=b.substr(H),b=b.slice(0,H));var z=b.indexOf("?");if(-1!==z?(this.search=b.substr(z),this.query=b.substr(z+1),t&&(this.query=y.parse(this.query)),b=b.slice(0,z)):t&&(this.search="",this.query={}),b&&(this.pathname=b),m[P]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){V=this.pathname||"";var J=this.search||"";this.path=V+J}return this.href=this.format(),this},n.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",i=this.hash||"",n=!1,s="";this.host?n=e+this.host:this.hostname&&(n=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(n+=":"+this.port)),this.query&&"object"==typeof this.query&&Object.keys(this.query).length&&(s=y.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var o=this.search||s&&"?"+s||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||m[t])&&!1!==n?(n="//"+(n||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):n||(n=""),i&&"#"!==i.charAt(0)&&(i="#"+i),o&&"?"!==o.charAt(0)&&(o="?"+o),t+n+(r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(o=o.replace("#","%23"))+i},n.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},n.prototype.resolveObject=function(e){if("string"==typeof e){var t=new n;t.parse(e,!1,!0),e=t}for(var r=new n,i=Object.keys(this),s=0;s<i.length;s++){var o=i[s];r[o]=this[o]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var a=Object.keys(e),c=0;c<a.length;c++){var l=a[c];"protocol"!==l&&(r[l]=e[l])}return m[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!m[e.protocol]){for(var h=Object.keys(e),u=0;u<h.length;u++){var p=h[u];r[p]=e[p]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||g[e.protocol])r.pathname=e.pathname;else{for(var d=(e.pathname||"").split("/");d.length&&!(e.host=d.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),r.pathname=d.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var f=r.pathname||"",y=r.search||"";r.path=f+y}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var b=r.pathname&&"/"===r.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),T=v||b||r.host&&e.pathname,P=T,S=r.pathname&&r.pathname.split("/")||[],A=(d=e.pathname&&e.pathname.split("/")||[],r.protocol&&!m[r.protocol]);if(A&&(r.hostname="",r.port=null,r.host&&(""===S[0]?S[0]=r.host:S.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===d[0]?d[0]=e.host:d.unshift(e.host)),e.host=null),T=T&&(""===d[0]||""===S[0])),v)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,S=d;else if(d.length)S||(S=[]),S.pop(),S=S.concat(d),r.search=e.search,r.query=e.query;else if(null!=e.search){if(A)r.host=S.shift(),r.hostname=r.host,(D=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=D.shift(),r.hostname=D.shift(),r.host=r.hostname);return r.search=e.search,r.query=e.query,null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!S.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var w=S.slice(-1)[0],E=(r.host||e.host||S.length>1)&&("."===w||".."===w)||""===w,x=0,C=S.length;C>=0;C--)"."===(w=S[C])?S.splice(C,1):".."===w?(S.splice(C,1),x++):x&&(S.splice(C,1),x--);if(!T&&!P)for(;x--;x)S.unshift("..");!T||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),E&&"/"!==S.join("/").substr(-1)&&S.push("");var D,R=""===S[0]||S[0]&&"/"===S[0].charAt(0);A&&(r.hostname=R?"":S.length?S.shift():"",r.host=r.hostname,(D=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=D.shift(),r.hostname=D.shift(),r.host=r.hostname));return(T=T||r.host&&S.length)&&!R&&S.unshift(""),S.length>0?r.pathname=S.join("/"):(r.pathname=null,r.path=null),null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var e=this.host,t=o.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},r.parse=b,r.resolve=function(e,t){return b(e,!1,!0).resolve(t)},r.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},r.format=function(e){return"string"==typeof e&&(e=b(e)),e instanceof n?e.format():n.prototype.format.call(e)},r.Url=n},{"punycode/":151,qs:153}],189:[function(e,t,r){(function(e){(function(){function r(t){try{if(!e.localStorage)return!1}catch(e){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(e,t){if(r("noDeprecation"))return e;var i=!1;return function(){if(!i){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],190:[function(e,t,r){t.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach(function(e){i[e]=t[e]}),i;function i(){for(var e=new Array(arguments.length),r=0;r<e.length;r++)e[r]=arguments[r];var i=t.apply(this,e),n=e[e.length-1];return"function"==typeof i&&i!==n&&Object.keys(n).forEach(function(e){i[e]=n[e]}),i}}},{}],191:[function(e,t,r){t.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var n in r)i.call(r,n)&&(e[n]=r[n])}return e};var i=Object.prototype.hasOwnProperty},{}],192:[function(e,t,r){t.exports={name:"pict",version:"1.0.350",description:"Pict browser library.",main:"source/Pict.js",scripts:{start:"node source/Pict.js",test:"npx mocha -u tdd -R spec",tests:"npx mocha -u tdd --exit -R spec --grep",coverage:"npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-image:local","docker-dev-run":'docker run -it -d --name pict-dev -p 37447:8080 -p 19506:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-image:local',"docker-dev-shell":"docker exec -it pict-dev /bin/bash",lint:"eslint source/**/*.js test/**/*.js",types:"tsc -p ."},types:"types/source/Pict.d.ts",mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},repository:{type:"git",url:"git+https://stevenvelozo@github.com/stevenvelozo/pict.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict/issues"},homepage:"https://github.com/stevenvelozo/pict#readme",devDependencies:{"@eslint/js":"^9.39.1","@types/jquery":"^3.5.33","@types/sinon":"^17.0.4",eslint:"^9.39.1",globals:"^16.5.0",quackage:"^1.0.51",sinon:"^20.0.0",typescript:"^5.9.3"},dependencies:{cachetrax:"^1.0.5",fable:"^3.1.58","pict-application":"^1.0.32","pict-provider":"^1.0.10","pict-template":"^1.0.14","pict-view":"^1.0.66"}}},{}],193:[function(e,t,r){t.exports=function(e,t){let r=void 0===t?0:t;e&&"object"==typeof e.default_configuration&&"pict_configuration"in e.default_configuration?window._Pict=new Pict(e.default_configuration.pict_configuration):window._Pict=new Pict,window._Pict.LogNoisiness=r;let i="DefaultApplication",n={};"default_configuration"in e&&(n=e.default_configuration,"Hash"in n&&"string"==typeof n.Hash&&(i=n.Hash)),_Pict.log.info("Loading the pict application [".concat(i,"] and associated views.")),_Pict.addApplication(i,n,e),_Pict.PictApplication.initializeAsync(function(e){e&&console.log("Error initializing the pict application: "+e),_Pict.log.info("Loading the Application and associated views.")})}},{}],194:[function(e,t,r){t.exports=function(e){document?"loading"!=document.readyState?e():document.addEventListener?document.addEventListener("DOMContentLoaded",function(){e()}):document.attachEvent("onreadystatechange",function(){"complete"==document.readyState&&e()}):console.log("No document object found; no initialization happening.")}},{}],195:[function(e,t,r){const i=e("fable").ServiceProviderBase,n="#PICT-CSS";t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.options,this.services,this.fable,void 0===this.options.CSSElementAddress&&(this.options.CSSElementAddress=n),this.inlineCSSMap={},this.fable.addSolverFunction(this.fable.expressionParser,"createcsscolorrgbfromnumeric",this.createCssColorRGBFromNumeric.bind(this),"Create a CSS color from RGB components")}addCSS(e,t,r,i){let n=void 0!==r?r:1e3,s="string"==typeof i?i:"Unknown";this.inlineCSSMap[e]={Hash:e,Content:t,Provider:s,Priority:n}}removeCSS(e){delete this.inlineCSSMap[e]}createCssColorRGBFromNumeric(e,t,r){let i=parseFloat(e),n=parseFloat(t),s=parseFloat(r);if(isNaN(i)||isNaN(n)||isNaN(s))return"#000000";if(i<=1&&n<=1&&s<=1)i=Math.round(255*i),n=Math.round(255*n),s=Math.round(255*s);else if(i<=255&&n<=255&&s<=255)i=Math.round(i),n=Math.round(n),s=Math.round(s);else{let e=Math.max(Math.max(i,n),s);i=Math.round(i/e*255),n=Math.round(n/e*255),s=Math.round(s/e*255)}i=Math.abs(i),n=Math.abs(n),s=Math.abs(s);let o=i.toString(16).padStart(2,"0"),a=n.toString(16).padStart(2,"0"),c=s.toString(16).padStart(2,"0");return"#".concat(o).concat(a).concat(c)}generateCSS(){let e="",t=Object.keys(this.inlineCSSMap);t.sort((e,t)=>this.inlineCSSMap[e].Priority-this.inlineCSSMap[t].Priority);for(let r=0;r<t.length;r++){let i=this.inlineCSSMap[t[r]],n=i.Hash;i.Hash!=i.Provider&&(n="".concat(n," from ").concat(i.Provider)),e+="/* ".concat(n," */\n").concat(i.Content,"\n")}return e}injectCSS(){this.services.ContentAssignment.assignContent(this.options.CSSElementAddress,this.generateCSS())}}},{fable:68}],196:[function(e,t,r){const i=e("fable").ServiceProviderBase;t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.fable,this.serviceType="PictContentAssignment",this.manifest=e.newManyfest(),this.inBrowser=!1,this.hasDocument=!1,"object"==typeof window&&(this.inBrowser=!0,void 0!==window.document&&"function"==typeof window.document.querySelectorAll&&(this.hasDocument=!0)),this.hasJquery=!1,this.jQuery=!1,this.inBrowser&&void 0!==window.jQuery&&(this.hasJquery=!0),this.customAssignFunction=null,this.customPrependFunction=null,this.customAppendFunction=null,this.customInsertBeforeFunction=null,this.customInsertAfterFunction=null,this.customReadFunction=null,this.customGetElementFunction=null,this.customReadAttributeFunction=null,this.customSetAttributeFunction=null,this.customRemoveAttributeFunction=null,this.customReadClassFunction=null,this.customSetClassFunction=null,this.customRemoveClassFunction=null}getElement(e){if(this.customGetElementFunction)return this.customGetElementFunction(e);if(this.hasJquery){let t=window.jQuery(e);if(0==t.length)return[];let r=[];for(let e=0;e<t.length;e++)r.push(t[e]);return r}if(this.inBrowser&&this.hasDocument){const t=window.document.querySelectorAll(e);let r=[];for(let e=0;e<t.length;e++)r.push(t[e]);return r}return this.log.trace("PICT Content GET ELEMENT for [".concat(e,"] will return empty because none of the browser methods are available")),[]}assignContent(e,t){if(this.customAssignFunction)return this.customAssignFunction(e,t);if(this.hasJquery){const r=window.jQuery(e);for(let e=0;e<r.length;e++){const i=r[e];switch(i.tagName){case"INPUT":i instanceof HTMLInputElement&&"checkbox"==i.type&&(i.checked=Boolean(t));case"SELECT":case"TEXTAREA":(i instanceof HTMLInputElement||i instanceof HTMLSelectElement||i instanceof HTMLTextAreaElement)&&(i.value=String(t));break;case"SCRIPT":i instanceof HTMLScriptElement&&(i.text=String(t));break;default:i.innerHTML=String(t)}}}else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++){const i=r[e];switch(r[e].tagName){case"INPUT":i instanceof HTMLInputElement&&"checkbox"==i.type&&(i.checked=Boolean(t));case"SELECT":case"TEXTAREA":(i instanceof HTMLInputElement||i instanceof HTMLSelectElement||i instanceof HTMLTextAreaElement)&&(i.value=String(t));break;case"SCRIPT":i instanceof HTMLScriptElement&&(i.text=String(t));break;default:i.innerHTML=String(t)}}}else this.log.trace("PICT Content ASSIGN to [".concat(e,"]:"),t)}appendContent(e,t){if(this.customAppendFunction)return this.customAppendFunction(e,t);if(this.hasJquery){window.jQuery(e).append(t)}else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)r[e].insertAdjacentHTML("beforeend",t)}else this.log.trace("PICT Content APPEND to [".concat(e,"]:"),t)}insertContentBefore(e,t){if(this.customInsertBeforeFunction)return this.customInsertBeforeFunction(e,t);if(this.hasJquery)window.jQuery(t).insertBefore(e);else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)r[e].insertAdjacentHTML("beforebegin",t)}else this.log.trace("PICT Content INSERT BEFORE [".concat(e,"]:"),t)}insertContentAfter(e,t){if(this.customInsertAfterFunction)return this.customInsertAfterFunction(e,t);if(this.hasJquery)window.jQuery(t).insertAfter(e);else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)r[e].insertAdjacentHTML("afterend",t)}else this.log.trace("PICT Content INSERT AFTER [".concat(e,"]:"),t)}prependContent(e,t){if(this.customAppendFunction)return this.customPrependFunction(e,t);if(this.hasJquery){window.jQuery(e).prepend(t)}else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)r[e].insertAdjacentHTML("afterbegin",t)}else this.log.trace("PICT Content PREPEND in [".concat(e,"]:"),t)}projectContent(e,t,r,i){switch(e){case"virtual-assignment":return this.manifest.setValueByHash(this.fable,t,r);case"append":return this.appendContent(t,r);case"prepend":return this.prependContent(t,r);case"append_once":{let e="string"==typeof i?i:t;if(this.getElement(e).length<1)return this.appendContent(t,r);break}default:return this.assignContent(t,r)}}readContent(e){if(this.customReadFunction)return this.customReadFunction(e);if(this.hasJquery){const t=window.jQuery(e);switch(t.prop("tagName")){case"INPUT":if("checkbox"==t.attr("type"))return t.prop("checked");case"SELECT":case"TEXTAREA":return t.val();case"SCRIPT":return t.text();default:return t.html()}}else{if(!this.inBrowser||!this.hasDocument)return this.log.trace("PICT Content READ from [".concat(e,"]...")),"";{let t="string"==typeof e?window.document.querySelectorAll(e):[e];if(t.length<1)return null;if(1==t.length){const e=t[0];switch(e.tagName){case"INPUT":if(e instanceof HTMLInputElement&&"checkbox"==e.type)return e.checked;case"SELECT":case"TEXTAREA":if(e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement)return e.value;case"SCRIPT":if(e instanceof HTMLScriptElement)return e.text;default:return e.innerHTML}}}}}addClass(e,t){if(this.customSetClassFunction)return this.customSetClassFunction(e,t);if(this.hasJquery){window.jQuery(e).addClass(t)}else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)if(Array.isArray(t))for(const i of t)r[e].classList.add(i);else r[e].classList.add(t)}else this.log.trace("PICT Content ADDCLASS to [".concat(e,"]:"),t)}removeClass(e,t){if(this.customRemoveClassFunction)return this.customRemoveClassFunction(e,t);if(this.hasJquery){window.jQuery(e).removeClass(t)}else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)if(Array.isArray(t))for(const i of t)r[e].classList.remove(i);else r[e].classList.remove(t)}else this.log.trace("PICT Content REMOVECLASS from [".concat(e,"]:"),t)}readAttribute(e,t){if(this.customReadAttributeFunction)return this.customReadAttributeFunction(e,t);if(this.hasJquery){return window.jQuery(e).attr(t)}if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)r[e].getAttribute(t);return r}this.log.trace("PICT Content READATTRIBUTE from [".concat(e,"]:"),t)}setAttribute(e,t,r){if(this.customSetAttributeFunction)return this.customSetAttributeFunction(e,t,r);if(this.hasJquery){window.jQuery(e).attr(t,r)}else if(this.inBrowser&&this.hasDocument){const i="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<i.length;e++)i[e].setAttribute(t,r)}else this.log.trace("PICT Content SETATTRIBUTE for [".concat(e,"] ATTRIBUTE [").concat(t,"]:"),r)}removeAttribute(e,t){if(this.customRemoveAttributeFunction)return this.customRemoveAttributeFunction(e,t);if(this.hasJquery){window.jQuery(e).removeAttr(t)}else if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)r[e].removeAttribute(t)}else this.log.trace("PICT Content REMOVEATTRIBUTE for [".concat(e,"] ATTRIBUTE [").concat(t,"]"))}hasClass(e,t){if(this.customReadClassFunction)return this.customReadClassFunction(e,t);if(this.hasJquery){return window.jQuery(e).hasClass(t)}if(this.inBrowser&&this.hasDocument){const r="string"==typeof e?window.document.querySelectorAll(e):[e];for(let e=0;e<r.length;e++)if(r[e].classList.contains(t))return!0;return!1}return this.log.trace("PICT Content HASCLASS for [".concat(e,"] CLASS [").concat(t,"]:")),!1}toggleClass(e,t){this.hasClass(e,t)?this.removeClass(e,t):this.addClass(e,t)}}},{fable:68}],197:[function(e,t,r){const i=e("fable").ServiceProviderBase;t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.fable,this.serviceType="PictDataProvider"}getDataByAddress(e,t){let r=void 0===t?{}:t;const i={Fable:this.fable,Pict:this.fable,AppData:this.fable.AppData,Bundle:this.fable.Bundle,Record:r};return this.fable.manifest.getValueByHash(i,e)}}},{fable:68}],198:[function(e,t,r){const i=e("fable").ServiceProviderBase;t.exports=class extends i{constructor(e,t,r){var i;super(e,t,r),this.options,this.fable,this.log,this.serviceType="PictMeadowProvider",this.fable.settings.PictDefaultURLPrefix?this.options.urlPrefix=this.fable.settings.PictDefaultURLPrefix:this.options.urlPrefix||(this.options.urlPrefix="/1.0/"),this.options.downloadBatchSize||("number"==typeof this.fable.settings.PictDefaultDownloadBatchSize?this.options.downloadBatchSize=this.fable.settings.PictDefaultDownloadBatchSize:this.options.downloadBatchSize=100),this.restClient=null!==(i=this.fable.RestClient)&&void 0!==i?i:this.fable.instantiateServiceProviderWithoutRegistration("RestClient"),this.recordCache={},this.recordSetCache={},this.entityColumnTranslations={CreatingIDUser:"User",UpdatingIDUser:"User",DeletingIDUser:"User"},this.prepareRequestOptions=e=>e}initializeCache(e){e in this.recordCache||(this.recordCache[e]=this.fable.instantiateServiceProviderWithoutRegistration("ObjectCache"),this.recordCache[e].maxAge=3e4,this.recordCache[e].maxLength=1e4,this.fable.Bundle[e]=this.recordCache[e].RecordMap),e in this.recordSetCache||(this.recordSetCache[e]=this.fable.instantiateServiceProviderWithoutRegistration("ObjectCache"),this.recordSetCache[e].maxAge=1e4,this.recordSetCache[e].maxLength=100)}gatherEntitySetCount(e,t,r){return e.CountOnly=!0,this.gatherEntitySet(e,t,r)}gatherEntitySet(e,t,r){if(!("Entity"in e)||"string"!=typeof e.Entity)return this.log.warn("EntityBundleRequest failed to parse entity request because the entity stanza did not contain an Entity string."),r();if(!("Destination"in e)||"string"!=typeof e.Destination)return this.log.warn("EntityBundleRequest failed to parse entity request because the entity stanza did not contain a Destination string."),r();"Filter"in e&&"string"==typeof e.Filter||(e.Filter=""),"FilterData"in e&&"object"==typeof e.FilterData||(e.FilterData={}),t.StepData=e.FilterData,"RecordStartCursor"in e&&"number"==typeof e.RecordStartCursor||(e.RecordStartCursor=0),"PageSize"in e&&"number"==typeof e.PageSize||(e.PageSize=1e4),"AllRecords"in e&&"boolean"==typeof e.AllRecords||(e.AllRecords=!1);let i=null,n=null;e.PageSize&&(i=e.RecordStartCursor,n=e.PageSize);const s=this.fable.parseTemplate(e.Filter,t),o=(o,a)=>o?(this.log.error("EntityBundleRequest request Error getting entity set for [".concat(e.Entity,"] with filter [").concat(s,"]: ").concat(o),o),r(o,"")):(e.CountOnly?(this.log.trace("EntityBundleRequest counted ".concat(a," records for ").concat(e.Entity," filtered to [").concat(s,"]").concat(e.CountOnly||e.AllRecords?"":" [".concat(i,"/").concat(n,"]"))),this.fable.manifest.setValueByHash(t,e.Destination,a)):e.SingleRecord?(this.log.trace("EntityBundleRequest found ".concat(a.length," records for ").concat(e.Entity," filtered to [").concat(s,"]").concat(e.CountOnly||e.AllRecords?"":" [".concat(i,"/").concat(n,"]"))),a.length>1&&this.log.warn("EntityBundleRequest found more than one record for ".concat(e.Entity," filtered to [").concat(s,"] but SingleRecord is true; setting the first record.")),a.length<1&&this.fable.manifest.setValueByHash(t,e.Destination,!1),this.fable.manifest.setValueByHash(t,e.Destination,a[0])):(this.log.trace("EntityBundleRequest found ".concat(a.length," records for ").concat(e.Entity," filtered to [").concat(s,"]").concat(e.CountOnly||e.AllRecords?"":" [".concat(i,"/").concat(n,"]"))),this.fable.manifest.setValueByHash(t,e.Destination,a)),r());e.CountOnly?this.getEntitySetRecordCount(e.Entity,s,o):n&&!e.AllRecords?this.getEntitySetPage(e.Entity,s,i,n,o):this.getEntitySet(e.Entity,s,o)}mapJoinSingleDestination(e,t,r){const i=this.fable.manifest.getValueByHash(r,t.JoinRecordSetAddress);if(!Array.isArray(i))throw new Error("EntityBundleRequest failed to map join because the source [".concat(t.JoinRecordSetAddress,"] did not return an array."));const n={};for(const e of i){n[e[t.JoinValue]]=e}for(const r of i)if(r)if(t.BucketBy||t.BucketByTemplate){const i=[];if(t.BucketBy){const e=Array.isArray(t.BucketBy)?t.BucketBy:[t.BucketBy];for(const t of e){const e=this.fable.manifest.getValueByHash(r,t);i.push(e)}}else{const e=Array.isArray(t.BucketByTemplate)?t.BucketByTemplate:[t.BucketByTemplate];for(const t of e){const e=this.fable.parseTemplate(t,r);e&&i.push(e)}}if(i.length<1)this.fable.LogNoisiness>0&&this.log.warn("EntityBundleRequest failed to map join because no bucket values were found.",{pCustomRequestInformation:t,tmpSourceEntity:r});else{const n="".concat(t.RecordDestinationAddress,".").concat(i.join("."));if(t.SingleRecord)this.fable.manifest.setValueByHash(e,n,r);else{let t=this.fable.manifest.getValueByHash(e,n,r);t||(t=[],this.fable.manifest.setValueByHash(e,n,t)),t.push(r)}}}else t.SingleRecord?(e[t.RecordDestinationAddress]&&this.fable.LogNoisiness>1&&this.fable.log.warn("EntityBundleRequest found more than one record for [".concat(t.RecordDestinationAddress,"] in mapJoin mapped as SingleRecord.")),e[t.RecordDestinationAddress]=r):(e[t.RecordDestinationAddress]=e[t.RecordDestinationAddress]||[],e[t.RecordDestinationAddress].push(r));else this.log.error("EntityBundleRequest failed to map join because the source entity was not found in the source lookup.");return[e]}mapJoin(e,t){const r=e.DestinationRecordAddress?this.fable.manifest.getValueByHash(t,e.DestinationRecordAddress):null,i=e.DestinationRecordSetAddress?this.fable.manifest.getValueByHash(t,e.DestinationRecordSetAddress):null;if(!Array.isArray(i)&&!r)throw new Error("EntityBundleRequest failed to map join because the destination [".concat(e.DestinationRecordSetAddress,"] did not return an array."));if(r)return this.mapJoinSingleDestination(r,e,t);const n=this.fable.manifest.getValueByHash(t,e.Joins);if(!Array.isArray(n))throw new Error("EntityBundleRequest failed to map join because the join [".concat(e.Joins,"] did not return an array."));const s=this.fable.manifest.getValueByHash(t,e.JoinRecordSetAddress);if(!Array.isArray(s))throw new Error("EntityBundleRequest failed to map join because the source [".concat(e.JoinRecordSetAddress,"] did not return an array."));const o=e.JoinJoinValueLHS||e.DestinationJoinValue,a=e.JoinJoinValueRHS||e.JoinValue,c={},l={},h={};for(const t of i||[]){c[t[e.DestinationJoinValue]]=t}for(const t of s){l[t[e.JoinValue]]=t}for(const e of n){const t=e[o],r=e[a];h[t]=h[t]||new Set,h[t].add(r)}for(const t of Object.keys(h)){const r=Array.from(h[t]),i=c[t];if(i)for(const t of r){const r=l[t];if(r)if(e.BucketBy||e.BucketByTemplate){const t=[];if(e.BucketBy){const i=Array.isArray(e.BucketBy)?e.BucketBy:[e.BucketBy];for(const e of i){const i=this.fable.manifest.getValueByHash(r,e);t.push(i)}}else{const i=Array.isArray(e.BucketByTemplate)?e.BucketByTemplate:[e.BucketByTemplate];for(const e of i){const i=this.fable.parseTemplate(e,r);t.push(i)}}i[e.RecordDestinationAddress]||(i[e.RecordDestinationAddress]={});const n="".concat(e.RecordDestinationAddress,".").concat(t.join("."));if(e.SingleRecord)this.fable.manifest.setValueByHash(i,n,r);else{let e=this.fable.manifest.getValueByHash(i,n,r);e||(e=[],this.fable.manifest.setValueByHash(i,n,e)),e.push(r)}}else e.SingleRecord?(i[e.RecordDestinationAddress]&&this.fable.LogNoisiness>1&&this.fable.log.warn("EntityBundleRequest found more than one record for [".concat(e.RecordDestinationAddress,"] in mapJoin mapped as SingleRecord.")),i[e.RecordDestinationAddress]=r):(i[e.RecordDestinationAddress]=i[e.RecordDestinationAddress]||[],i[e.RecordDestinationAddress].push(r));else this.log.error("EntityBundleRequest failed to map join because the RHS join value [".concat(t,"] was not found in the source lookup."))}else this.log.error("EntityBundleRequest failed to map join because the LHS join value [".concat(t,"] was not found in the destination lookup."))}return i}projectDataset(e,t){let r=this.fable.manifest.getValueByHash(t,e.InputRecordsetAddress);if(null==typeof r||"object"!=typeof r)throw new Error("EntityBundleRequest failed to project dataset because the input recordset [".concat(e.InputRecordsetAddress,"] did not return an valid object."));Array.isArray(r)||(r=[r]);let i=this.fable.manifest.getValueByHash(t,e.OutputRecordsetAddress);i||(i=[],this.fable.manifest.setValueByHash(t,e.OutputRecordsetAddress,i));for(const n of r){let r,s=i;"object"==typeof e.OutputRecordsetAddressMapping&&(r=this._resolveOutputRecordsetAddressMapping(e,t,n),r&&(s=this.fable.manifest.getValueByHash(t,r),s||(s=[],this.fable.manifest.setValueByHash(t,r,s))),s&&Array.isArray(s)||(s=i));const o=this.fable.parseTemplate(e.RecordPrototypeAddress,Object.assign({InputRecord:n},t)),a=this.fable.manifest.getValueByHash(Object.assign({InputRecord:n,OutputRecordset:s},t),o);let c={};Array.isArray(a)&&a.length>0?c=a[0]:s.push(c);let l=e.RecordFieldMapping[r]||e.RecordFieldMapping.Default;if(l||(l=e.RecordFieldMapping[Object.keys(e.RecordFieldMapping)[0]]),!l)throw new Error("EntityBundleRequest failed to project dataset because the record field mapping for [".concat(r,"] did not return a mapping."));for(const e of Object.keys(l)){const r=l[e],i=this.fable.manifest.getValueByHash(Object.assign({InputRecord:n},t),e);this.fable.manifest.setValueByHash(Object.assign({OutputRecord:c},t),r,i)}}}_resolveOutputRecordsetAddressMapping(e,t,r){const i=Object.assign({InputRecord:r},t);for(const t of Object.keys(e.OutputRecordsetAddressMapping)){const[r,n,s]=t.split(","),o=this.fable.manifest.getValueByHash(i,r);if(o){if("AnyContains"===n){if(!Array.isArray(o)){this.log.error("EntityBundleRequest failed to project dataset because the LHS address [".concat(r,"] did not return an array."));continue}for(const r of o)if(String(r).includes(s))return e.OutputRecordsetAddressMapping[t]}}else this.fable.LogNoisiness>0&&this.log.warn("EntityBundleRequest failed to project dataset because the LHS address [".concat(r,"] did not return a value."))}return null}gatherCustomDataSet(e,t,r){if(!("URL"in e)||"string"!=typeof e.URL)return this.log.warn("EntityBundleRequest failed to parse custom data request because the stanza did not contain a URL string."),r();"URLData"in e&&"object"==typeof e.URLData||(e.URLData={}),t.StepData=e.URLData;const i=this.fable.parseTemplate(e.URL,t);""==i&&this.log.warn("EntityBundleRequest failed to parse custom data request because the entity Filter did not return a string for FilterBy");let n="";const s=!!e.Host&&e.Host,o=e.Protocol?e.Protocol:"https",a=!!e.Port&&e.Port;s?(n="".concat(o,"://").concat(s),a&&(n+=":".concat(a))):n=this.fable.EntityProvider.options.urlPrefix;let c={url:"".concat(n).concat(i)};return c=this.fable.EntityProvider.prepareRequestOptions(c),this.fable.EntityProvider.restClient.getJSON(c,(n,s,o)=>n?(this.log.error("EntityBundleRequest request Error getting data set for [".concat(e.Entity,"] with filter [").concat(i,"]: ").concat(n),n),r(n,"")):(this.log.trace("EntityBundleRequest completed request for ".concat(e.Entity," filtered to [").concat(i,"]")),e.Destination&&this.fable.manifest.setValueByHash(t,e.Destination,o),r()))}processBundle(e){if(!Array.isArray(e))throw this.log.error("EntityBundleRequest failed to parse entity bundle request because the input was not an array."),new Error("EntityBundleRequest failed to parse entity bundle request because the input was not an array.");const t=[];let r={};for(const i of e)try{switch(i.Type){case"SetStateAddress":t.push(r),r=this.fable.manifest.getValueByHash(this.fable,i.StateAddress),void 0===r&&(r={},this.fable.manifest.setValueByHash(this.fable,i.StateAddress,r));break;case"PopState":t.length>0?r=t.pop():this.log.warn("EntityBundleRequest encountered a PopState without a matching SetStateAddress.");break;case"MapJoin":this.mapJoin(i,this.prepareState(r,i));break;case"ProjectDataset":this.projectDataset(i,this.prepareState(r,i));break;default:this.log.error("EntityBundleRequest encountered an unsupported type [".concat(i.Type,"] in the entity bundle description."))}}catch(e){this.log.error("EntityBundleRequest error gathering entity set: ".concat(e),{Stack:e.stack})}}gatherDataFromServer(e,t){if(!Array.isArray(e))return this.log.error("EntityBundleRequest failed to parse entity bundle request because the input was not an array."),t(new Error("EntityBundleRequest failed to parse entity bundle request because the input was not an array."));let r=this.fable.newAnticipate();const i=[];let n={};for(let t=0;t<e.length;t++){let s=e[t];r.anticipate(e=>{try{switch(s.Type){case"SetStateAddress":return i.push(n),n=this.fable.manifest.getValueByHash(this.fable,s.StateAddress),void 0===n&&(n={},this.fable.manifest.setValueByHash(this.fable,s.StateAddress,n)),e();case"PopState":return i.length>0?n=i.pop():this.log.warn("EntityBundleRequest encountered a PopState without a matching SetStateAddress."),e();case"Custom":return this.gatherCustomDataSet(s,this.prepareState(n,s),e);case"MapJoin":return this.mapJoin(s,this.prepareState(n,s)),e();case"ProjectDataset":return this.projectDataset(s,this.prepareState(n,s)),e();case"MeadowEntityCount":return this.gatherEntitySetCount(s,this.prepareState(n,s),e);default:return this.gatherEntitySet(s,this.prepareState(n,s),e)}}catch(t){return this.log.error("EntityBundleRequest error gathering entity set: ".concat(t),{Stack:t.stack}),e()}})}r.wait(e=>e?(this.log.error("EntityBundleRequest error gathering entity set: ".concat(e),{Stack:e.stack}),t(e)):t())}prepareState(e,t){return{State:e,AppData:this.fable.AppData,Bundle:this.fable.Bundle,Pict:this.fable,Fable:this.fable,StepConfiguration:t}}getEntity(e,t,r){this.initializeCache(e),this.recordCache[e].prune(function(){let i=this.recordCache[e].read(t);if(i)return r(null,i);let n={url:"".concat(this.options.urlPrefix).concat(e,"/").concat(t)};return n=this.prepareRequestOptions(n),this.restClient.getJSON(n,(i,n,s)=>(s&&this.recordCache[e].put(s,t),r(i,s)))}.bind(this))}cacheConnectedEntityRecords(e,t,r,i,n){if(!Array.isArray(e)||e.length<1)return n();if(!Array.isArray(t)||t.length<1)return n();const s=this.fable.newAnticipate(),o=r||[];for(let r=0;r<t.length;r++){const i=t[r],n=o[r]||i.replace(/^ID/,""),a=("ID".concat(n),new Set);this.initializeCache(n);for(const t of e){const e=t[i];if(e){this.recordCache[n].read(e)||a.add(e)}}a.size>0&&s.anticipate(function(e){const t=Array.from(a),r="FBL~ID".concat(n,"~INN~").concat(t.join(","));this.getEntitySet(n,r,(r,i)=>r?(this.log.error("cacheConnectedEntityRecords error getting connected entity records for [".concat(n,"] with IDs [").concat(t.join(","),"]: ").concat(r),{Stack:r.stack}),e(r)):e())}.bind(this))}s.wait(e=>e?(this.log.error("cacheConnectedEntityRecords error gathering connected entity records: ".concat(e),{Stack:e.stack}),n(e)):n())}cacheIndividualEntityRecords(e,t){this.initializeCache(e);const r=t;if("object"==typeof r&&Array.isArray(r)&&r.length>0){let t="ID".concat(e);if(t in r[0])for(let i=0;i<r.length;i++){const n=r[i],s=n[t];s&&this.recordCache[e].put(n,s)}}}getEntitySetPage(e,t,r,i,n){const s=t?"/FilteredTo/".concat(t):"",o="".concat(this.options.urlPrefix).concat(e,"s").concat(s,"/").concat(r,"/").concat(i);return this.restClient.getJSON(o,function(s,a,c){return a&&a.statusCode&&a.statusCode>=400?(this.log.error("Error getting entity set of [".concat(e,"] filtered to [").concat(t,"] [").concat(r,"/").concat(i,"] from url [").concat(o,"]: ").concat(a.statusCode," ").concat(a.statusMessage)),n(new Error("Error getting entity set of [".concat(e,"] filtered to [").concat(t,"] [").concat(r,"/").concat(i,"] from url [").concat(o,"]: ").concat(a.statusCode," ").concat(JSON.stringify(c||{}))))):(this.cacheIndividualEntityRecords(e,c),n(s,c))}.bind(this))}getEntitySetRecordCount(e,t,r){const i=t?"/FilteredTo/".concat(t):"",n="".concat(this.options.urlPrefix).concat(e,"s/Count").concat(i);return this.restClient.getJSON(n,function(i,s,o){if(s&&s.statusCode&&s.statusCode>=400)return this.log.error("Error getting entity count of [".concat(e,"] filtered to [").concat(t,"] from url [").concat(n,"]: ").concat(s.statusCode," ").concat(s.statusMessage)),r(new Error("Error getting entity count of [".concat(e,"] filtered to [").concat(t,"] from url [").concat(n,"]: ").concat(s.statusCode," ").concat(JSON.stringify(o||{}))));if(i)return this.log.error("Error getting entity count of [".concat(e,"] filtered to [").concat(t,"] from url [").concat(n,"]: ").concat(i)),r(i);let a=0;return o.Count&&(a=o.Count),r(i,a)}.bind(this))}getEntitySetWithAutoCaching(e,t,r){let i=this.fable.newAnticipate(),n={Entity:e,MeadowFilterExpression:t,EntitySet:null};i.anticipate(function(r){this.getEntitySet(e,t,(i,s)=>i?(this.log.error("getEntitySetWithAutoCaching error getting entity set for [".concat(e,"] filtered to [").concat(t,"]: ").concat(i),{Stack:i.stack}),r(i)):(n.EntitySet=s,r()))}.bind(this)),i.anticipate(function(r){if("object"==typeof n.EntitySet&&Array.isArray(n.EntitySet)&&n.EntitySet.length>0){const i=n.EntitySet[0],s=[],o=[];for(const e of Object.keys(i))if(e.startsWith("ID")&&e.length>2){s.push(e);const t=e.substring(2);o.push(t)}else e in this.entityColumnTranslations&&(s.push(e),o.push(this.entityColumnTranslations[e]));return s.length>0?this.cacheConnectedEntityRecords(n.EntitySet,s,o,!1,i=>i?(this.log.error("getEntitySetWithAutoCaching error caching connected entity records for [".concat(e,"] filtered to [").concat(t,"]: ").concat(i),{Stack:i.stack}),r(i)):r()):r()}return r()}.bind(this)),i.wait(function(i){return i?(this.log.error("getEntitySetWithAutoCaching error gathering entity set for [".concat(e,"] filtered to [").concat(t,"]: ").concat(i),{Stack:i.stack}),r(i)):r(null,n.EntitySet)}.bind(this))}getEntitySet(e,t,r){this.initializeCache(e),this.recordSetCache[e].prune(function(){let i=this.recordSetCache[e].read(t);return i?r(null,i):this.getEntitySetRecordCount(e,t,(i,n)=>{if(i)return r(i);let s=n;if(isNaN(n))return this.log.error("Entity count did not return a number for [".concat(e,"] filtered to [").concat(t,"]... something is fatally wrong from the server accessed in getEntitySet call.")),r(new Error("Entity count did not return a number in getEntitySet."));let o=[],a=this.options.downloadBatchSize;const c=t?"/FilteredTo/".concat(t):"";for(let t=0;t<s/a;t++)o.push("".concat(this.options.urlPrefix).concat(e,"s").concat(c,"/").concat(t*a,"/").concat(a));let l=[];this.fable.Utility.eachLimit(o,1,(r,i)=>{this.restClient.getJSON(r,(n,s,o)=>s&&s.statusCode&&s.statusCode>=400?(this.log.error("Error getting entity set of [".concat(e,"] filtered to [").concat(t,"] from url [").concat(r,"]: ").concat(s.statusCode," ").concat(s.statusMessage)),i(new Error("Error getting entity set of [".concat(e,"] filtered to [").concat(t,"] from url [").concat(r,"]: ").concat(s.statusCode," ").concat(JSON.stringify(o||{}))))):(l=l.concat(o),i(n)))},i=>(l&&this.recordSetCache[e].put(l,t),this.cacheIndividualEntityRecords(e,l),r(i,l)))})}.bind(this))}formatUrl(e){return"".concat(this.options.urlPrefix).concat(e)}createEntity(e,t,r){let i={url:this.formatUrl(e),body:t};this.restClient.postJSON(i,(t,i,n)=>(t?this.log.error("Error creating ".concat(e," record: ").concat(t.message)):this.log.info("Created ".concat(e," record ID ").concat(n["ID".concat(e)])),r(t,n)))}updateEntity(e,t,r){let i={url:this.formatUrl(e),body:t};this.restClient.putJSON(i,(t,i,n)=>(t?this.log.error("Error updating ".concat(e," record: ").concat(t.message)):this.log.info("Updated ".concat(e," record ID ").concat(n["ID".concat(e)])),r(t,n)))}upsertEntity(e,t,r){let i={url:this.formatUrl("".concat(e,"/Upsert")),body:t};this.restClient.putJSON(i,(t,i,n)=>(t?this.log.error("Error upserting ".concat(e," record: ").concat(t.message)):this.log.info("Upserted ".concat(e," record ID ").concat(n["ID".concat(e)])),r(t,n)))}upsertEntities(e,t,r){let i={url:this.formatUrl("".concat(e,"/Upserts")),body:t};this.restClient.putJSON(i,(t,i,n)=>(t?this.log.error("Error upserting ".concat(e," records: ").concat(t.message)):this.log.info("Upserted multiple ".concat(e," records (count: ").concat(n.length,")")),r(t,n)))}deleteEntity(e,t,r){let i={url:this.formatUrl("".concat(e,"/").concat(t))};this.restClient.delJSON(i,(i,n,s)=>(i?this.log.error("Error deleting ".concat(e," record ID ").concat(t,": ").concat(i.message)):this.log.info("Deleted ".concat(e," record ID ").concat(t)),r(i,s)))}}},{fable:68}],199:[function(e,t,r){const i=e("fable").ServiceProviderBase;class n extends i{constructor(e,t,r){super(e,t,r),this.log,this.UUID,this.Hash,this.serviceType="PictTemplateAudit",this.auditLog=[]}prepareAuditing(){this._installWrappers()}_installWrappers(){let e=this.fable,t=this;this._originalParseTemplate=e.parseTemplate.bind(e),this._originalParseTemplateByHash=e.parseTemplateByHash.bind(e),this._originalParseTemplateSet=e.parseTemplateSet.bind(e),this._originalParseTemplateSetByHash=e.parseTemplateSetByHash.bind(e),this._originalParseTemplateSetWithPayload=e.parseTemplateSetWithPayload.bind(e),this._originalParseTemplateSetWithPayloadByHash=e.parseTemplateSetWithPayloadByHash.bind(e),e.parseTemplate=function(r,i,n,s,o,a){if(!e.TemplateDebug)return t._originalParseTemplate(r,i,n,s,o,a);let c=t.prepareState(a,r.substring(0,80)),l=c.state,h=t.beginAudit(l,c.identifier,"parseTemplate",i);if("function"==typeof n){let e=function(e,r){return t.endAudit(l,h),n(e,r)};return t._originalParseTemplate(r,i,e,s,o,l)}{let e=t._originalParseTemplate(r,i,null,s,o,l);return t.endAudit(l,h),e}},e.parseTemplateByHash=function(r,i,n,s,o,a){if(!e.TemplateDebug)return t._originalParseTemplateByHash(r,i,n,s,o,a);let c=t.setHashHint(a,r);return t._originalParseTemplateByHash(r,i,n,s,o,c)},e.parseTemplateSet=function(r,i,n,s,o,a){if(!e.TemplateDebug)return t._originalParseTemplateSet(r,i,n,s,o,a);let c=t.prepareState(a,r.substring(0,80)),l=c.state,h=t.beginAudit(l,c.identifier,"parseTemplateSet",i);if("function"==typeof n){let e=function(e,r){return t.endAudit(l,h),n(e,r)};return t._originalParseTemplateSet(r,i,e,s,o,l)}{let e=t._originalParseTemplateSet(r,i,null,s,o,l);return t.endAudit(l,h),e}},e.parseTemplateSetByHash=function(r,i,n,s,o,a){if(!e.TemplateDebug)return t._originalParseTemplateSetByHash(r,i,n,s,o,a);let c=t.setHashHint(a,r);return t._originalParseTemplateSetByHash(r,i,n,s,o,c)},e.parseTemplateSetWithPayload=function(r,i,n,s,o,a,c){if(!e.TemplateDebug)return t._originalParseTemplateSetWithPayload(r,i,n,s,o,a,c);let l=t.prepareState(c,r.substring(0,80)),h=l.state,u=t.beginAudit(h,l.identifier,"parseTemplateSetWithPayload",i);if("function"==typeof s){let e=function(e,r){return t.endAudit(h,u),s(e,r)};return t._originalParseTemplateSetWithPayload(r,i,n,e,o,a,h)}{let e=t._originalParseTemplateSetWithPayload(r,i,n,null,o,a,h);return t.endAudit(h,u),e}},e.parseTemplateSetWithPayloadByHash=function(r,i,n,s,o,a,c){if(!e.TemplateDebug)return t._originalParseTemplateSetWithPayloadByHash(r,i,n,s,o,a,c);let l=t.setHashHint(c,r);return t._originalParseTemplateSetWithPayloadByHash(r,i,n,s,o,a,l)}}unwrapTemplateFunctions(){let e=this.fable;this._originalParseTemplate&&"function"==typeof this._originalParseTemplate&&(e.parseTemplate=this._originalParseTemplate,this._originalParseTemplate=null),this._originalParseTemplateByHash&&"function"==typeof this._originalParseTemplateByHash&&(e.parseTemplateByHash=this._originalParseTemplateByHash,this._originalParseTemplateByHash=null),this._originalParseTemplateSet&&"function"==typeof this._originalParseTemplateSet&&(e.parseTemplateSet=this._originalParseTemplateSet,this._originalParseTemplateSet=null),this._originalParseTemplateSetByHash&&"function"==typeof this._originalParseTemplateSetByHash&&(e.parseTemplateSetByHash=this._originalParseTemplateSetByHash,this._originalParseTemplateSetByHash=null),this._originalParseTemplateSetWithPayload&&"function"==typeof this._originalParseTemplateSetWithPayload&&(e.parseTemplateSetWithPayload=this._originalParseTemplateSetWithPayload,this._originalParseTemplateSetWithPayload=null)}beginAudit(e,t,r,i){if(!this.fable.TemplateDebug)return null;let n={TemplateHash:t,Entrypoint:r,StartTime:Date.now(),FinishTime:null,Duration:null,DataSize:"object"==typeof i&&null!==i?JSON.stringify(i).length:0,StackTrace:null,ChildTemplates:[]};this.fable.TemplateDebugStack&&(n.StackTrace=(new Error).stack),e&&e._TemplateAuditParent?e._TemplateAuditParent.ChildTemplates.push(n):this.auditLog.push(n);let s=e&&e._TemplateAuditParent?e._TemplateAuditParent:null;return e&&(e._TemplateAuditParent=n),{AuditNode:n,PreviousParent:s}}endAudit(e,t){t&&(t.AuditNode.FinishTime=Date.now(),t.AuditNode.Duration=t.AuditNode.FinishTime-t.AuditNode.StartTime,e&&(e._TemplateAuditParent=t.PreviousParent))}prepareState(e,t){let r=e;this.fable.TemplateDebug&&!r&&(r={});let i=t;return r&&r._TemplateAuditHashHint&&(i=r._TemplateAuditHashHint,delete r._TemplateAuditHashHint),{state:r,identifier:i}}setHashHint(e,t){let r=e;return this.fable.TemplateDebug&&(r||(r={}),r._TemplateAuditHashHint=t),r}clear(){this.auditLog=[]}getSummary(){let e=0,t=0,r=0,i=(n,s)=>{e++,t+=n.Duration||0,s>r&&(r=s);for(let e=0;e<n.ChildTemplates.length;e++)i(n.ChildTemplates[e],s+1)};for(let e=0;e<this.auditLog.length;e++)i(this.auditLog[e],0);return{RootCalls:this.auditLog.length,TotalCalls:e,TotalDuration:t,MaxDepth:r}}}t.exports=n,n.default_configuration={}},{fable:68}],200:[function(e,t,r){const i=e("fable").ServiceProviderBase;t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.UUID,this.Hash,this.serviceType="PictTemplateProvider",this.templates={},this.templateSources={},this.defaultTemplates=[],this.loadTemplateFunction=()=>null}addTemplate(e,t,r){this.templates[e]=t,this.templateSources[e]="string"==typeof r?r:"Direct addTemplate('".concat(e,"') function load into PictTemplateProvider [").concat(this.UUID,"]::[").concat(this.Hash,"]")}addDefaultTemplate(e,t,r,i){let n={prefix:e,postfix:t,template:r,source:"string"==typeof i?i:"Direct addDefaultTemplate('".concat(e,"','").concat(t,"',..) function load into PictTemplateProvider [").concat(this.UUID,"]::[").concat(this.Hash,"]")};"string"!=typeof r&&this.log.error("PictTemplateProvider.addDefaultTemplate: pTemplate is not a string."),this.defaultTemplates.push(n)}checkDefaultTemplateHash(e){for(let t=0;t<this.defaultTemplates.length;t++)if(e.indexOf(this.defaultTemplates[t].postfix)==e.length-this.defaultTemplates[t].postfix.length&&0==e.indexOf(this.defaultTemplates[t].prefix))return this.templates[e]=this.defaultTemplates[t].template,this.templateSources[e]="Auto created in checkDefaultTemplateHash('".concat(e,"') function by PictTemplateProvider [").concat(this.UUID,"]::[").concat(this.Hash,"] from [").concat(this.defaultTemplates[t].prefix,"]...[").concat(this.defaultTemplates[t].postfix,"]"),this.templates[e];return null}getTemplate(e){return e in this.templates||this.loadTemplate(e),e in this.templates||this.checkDefaultTemplateHash(e),e in this.templates?this.templates[e]:null}loadTemplate(e){let t=this.loadTemplateFunction(e);return t&&(this.templates[e]=t.template,this.templateSources[e]="Loaded in loadTemplate('".concat(e,"') function by PictTemplateProvider [").concat(this.UUID,"]::[").concat(this.Hash,"] from [").concat(t.source,"]")),t}}},{fable:68}],201:[function(e,t,r){const i=e("./services/Fable-Service-TransactionTracking.js"),n=e("fable"),s=e("../package.json"),o=e("./providers/Provider-Filter-Manager.js"),a=e("./providers/Provider-DataBroker.js"),c=e("./Pict-Template-Provider.js"),l=e("./Pict-Template-Audit.js"),h=e("./Pict-Content-Assignment.js"),u=e("./Pict-DataProvider.js"),p=e("./Pict-CSS.js"),d=e("./Pict-Meadow-EntityProvider.js");t.exports=class extends n{constructor(t){super(t),this.settings,this.services,this.servicesMap,this.isBrowser=new Function("try {return (this===window);} catch(pError) {return false;}"),this._PackageFable=this._Package,this._Package=s,this.browserAddress="window._Pict","BrowserAddress"in this.settings&&(this.browserAddress=this.settings.BrowserAddress),this.children=[],this.PictApplication=null,this.log,this.instantiateServiceProvider("RestClient"),this.TemplateProvider=null,this.addAndInstantiateServiceType("TemplateProvider",c),this.TemplateAudit=null,this.addAndInstantiateServiceType("TemplateAudit",l),this.EntityProvider=null,this.addAndInstantiateServiceType("EntityProvider",d),this.DataProvider=null,this.addAndInstantiateServiceType("DataProvider",u),this.addServiceTypeIfNotExists("TransactionTracking",i),this.ContentAssignment=null,this.expressionParser=this.instantiateServiceProvider("ExpressionParser"),this.addAndInstantiateServiceType("ContentAssignment",h),this.CSSMap=null,this.addAndInstantiateServiceType("CSSMap",p),this.addServiceType("PictTemplate",e("pict-template")),this.instantiateServiceProvider("MetaTemplate"),this.instantiateServiceProvider("DataGeneration"),this.manifest=this.instantiateServiceProvider("Manifest"),this.AppData={},"DefaultAppData"in this.fable.settings&&(this.AppData=this.fable.settings.DefaultAppData),this.TempData={},this.Bundle={},"DefaultBundle"in this.fable.settings&&(this.Bundle=this.fable.settings.DefaultBundle),this.LogNoisiness=0,this.LogControlFlow=!1,this.LogControlFlowWatchAddressList=[],this.TemplateDebug=!1,this.TemplateDebugStack=!1,this.settings.Manifests&&this.loadManifestSet(this.settings.Manifests),this._DefaultPictTemplatesInitialized=!1,this.initializePictTemplateEngine(),this.addServiceType("PictView",e("pict-view")),this.addServiceType("PictProvider",e("pict-provider")),this.addServiceType("PictApplication",e("pict-application")),this.providers=this.servicesMap.PictProvider,this.views=this.servicesMap.PictView,this.addProvider("FilterManager",{},o),this.addProvider("DataBroker",{},a)}loadManifestSet(e){if("object"!=typeof e)return void this.log.warn("PICT [".concat(this.UUID,"] could not load Manifest Set; pManifestSet was not an object."));let t=Object.keys(e);if(t.length>0)for(let r=0;r<t.length;r++){let i=t[r];this.instantiateServiceProvider("Manifest",e[i],i)}}addTemplate(e){if("function"!=typeof e)return this.log.warn("PICT [".concat(this.UUID,"] could not add Template; pTemplatePrototype was not a class it was ").concat(typeof e,".")),null;let t=e.template_hash;return this.LogNoisiness>1&&this.log.info("PICT-ControlFlow addTemplate [".concat(t,"]")),this.instantiateServiceProviderFromPrototype("PictTemplate",{},t,e)}addView(e,t,r){let i="object"==typeof t?t:{},n="string"==typeof e?e:this.fable.getUUID(),s=r;if(this.LogControlFlow&&(this.LogNoisiness>1?this.log.info("PICT-ControlFlow addView [".concat(n,"]:"),{Options:i}):this.log.info("PICT-ControlFlow addView [".concat(n,"]"))),s){const e=s.default_configuration;return e&&(i=this.fable.Utility.extend({},JSON.parse(JSON.stringify(e)),i)),this.instantiateServiceProviderFromPrototype("PictView",i,n,s)}return this.instantiateServiceProvider("PictView",i,n)}addViewSingleton(e,t,r){return e in this.views?this.views[e]:this.addView(e,t,r)}addProviderSingleton(e,t,r){return e in this.providers?this.providers[e]:this.addProvider(e,t,r)}newTransactionTracker(){return this.instantiateServiceProviderWithoutRegistration("TransactionTracking")}addSolverFunction(e,t,r,i){let n=(t||"").trim().toLowerCase(),s=e;return s&&"object"==typeof s&&s.functionMap||(s=this.expressionParser),s.functionMap.hasOwnProperty(n)&&this.log.warn("Pict: Function ".concat(n," already exists in the solver, overwriting with address [").concat(r,"].")),s.functionMap[n]={Name:i||"Autogenerated PICT function ".concat(n),Address:r},s.functionMap[n]}addProvider(e,t,r){let i="object"==typeof t?t:{},n="string"==typeof e?e:this.fable.getUUID();return this.LogControlFlow&&(this.LogNoisiness>1?this.log.info("PICT-ControlFlow addProvider [".concat(n,"]:"),{Options:i}):this.log.info("PICT-ControlFlow addProvider [".concat(n,"]"))),void 0!==r?("default_configuration"in r&&(i=this.fable.Utility.extend({},r.default_configuration,i)),this.instantiateServiceProviderFromPrototype("PictProvider",i,n,r)):this.instantiateServiceProvider("PictProvider",i,n)}addApplication(e,t,r){let i="object"==typeof t?t:{},n="string"==typeof e?e:this.fable.getUUID();return this.LogControlFlow&&(this.LogNoisiness>1?this.log.info("PICT-ControlFlow addApplication [".concat(n,"]:"),{Options:i}):this.log.info("PICT-ControlFlow addApplication [".concat(n,"]"))),void 0!==r?("default_configuration"in r&&(i=this.fable.Utility.extend({},r.default_configuration,i)),this.instantiateServiceProviderFromPrototype("PictApplication",i,n,r)):this.instantiateServiceProvider("PictApplication",i,n)}initializePictTemplateEngine(){this._DefaultPictTemplatesInitialized||(this.addTemplate(e("./templates/Pict-Template-Data.js")),this.addTemplate(e("./templates/Pict-Template-DataWithTemplateFallback.js")),this.addTemplate(e("./templates/Pict-Template-DataWithAbsoluteFallback.js")),this.addTemplate(e("./templates/Pict-Template-TemplateByReference.js")),this.addTemplate(e("./templates/Pict-Template-TemplateFromAddress.js")),this.addTemplate(e("./templates/Pict-Template-TemplateByTypes.js")),this.addTemplate(e("./templates/Pict-Template-DataValueByKey.js")),this.addTemplate(e("./templates/Pict-Template-View.js")),this.addTemplate(e("./templates/data/Pict-Template-DataEncodeJavascriptString.js")),this.addTemplate(e("./templates/data/Pict-Template-HtmlCommentStart.js")),this.addTemplate(e("./templates/data/Pict-Template-HtmlCommentEnd.js")),this.addTemplate(e("./templates/Pict-Template-Self.js")),this.addTemplate(e("./templates/Pict-Template-Entity.js")),this.addTemplate(e("./templates/Pict-Template-Template.js")),this.addTemplate(e("./templates/Pict-Template-TemplateByDataAddress.js")),this.addTemplate(e("./templates/Pict-Template-SolveByReference.js")),this.addTemplate(e("./templates/Pict-Template-Solve.js")),this.addTemplate(e("./templates/Pict-Template-TemplateSet.js")),this.addTemplate(e("./templates/Pict-Template-TemplateValueSet.js")),this.addTemplate(e("./templates/Pict-Template-TemplateSetWithPayload.js")),this.addTemplate(e("./templates/Pict-Template-TemplateFromMap.js")),this.addTemplate(e("./templates/Pict-Template-TemplateSetFromMap.js")),this.addTemplate(e("./templates/logic/Pict-Template-TemplateIf.js")),this.addTemplate(e("./templates/logic/Pict-Template-TemplateIfAbsolute.js")),this.addTemplate(e("./templates/logic/Pict-Template-NotEmpty.js")),this.addTemplate(e("./templates/data/Pict-Template-DataJson.js")),this.addTemplate(e("./templates/data/Pict-Template-PascalCaseIdentifier.js")),this.addTemplate(e("./templates/data/Pict-Template-DateOnlyFormat.js")),this.addTemplate(e("./templates/data/Pict-Template-DateOnlyYMD.js")),this.addTemplate(e("./templates/data/Pict-Template-DateTimeFormat.js")),this.addTemplate(e("./templates/data/Pict-Template-DateTimeYMD.js")),this.addTemplate(e("./templates/data/Pict-Template-Digits.js")),this.addTemplate(e("./templates/data/Pict-Template-Dollars.js")),this.addTemplate(e("./templates/data/Pict-Template-Join.js")),this.addTemplate(e("./templates/data/Pict-Template-JoinUnique.js")),this.addTemplate(e("./templates/data/Pict-Template-PluckJoinUnique.js")),this.addTemplate(e("./templates/data-generation/Pict-Template-RandomNumber.js")),this.addTemplate(e("./templates/data-generation/Pict-Template-RandomNumberString.js")),this.addTemplate(e("./templates/debugging/Pict-Template-Breakpoint.js")),this.addTemplate(e("./templates/debugging/Pict-Template-LogStatement.js")),this.addTemplate(e("./templates/debugging/Pict-Template-LogValue.js")),this.addTemplate(e("./templates/debugging/Pict-Template-LogValueTree.js")),this.addTemplate(e("./templates/debugging/Pict-Template-DataValueTree.js")),this._DefaultPictTemplatesInitialized=!0)}resolveStateFromAddress(e,t,r,i,n,s){let o=Array.isArray(r)?r:[this],a=n||this,c="object"==typeof i&&null!=i?i:{};return c.Fable=this,c.Pict=this,c.AppData=this.AppData,c.TempData=this.TempData,c.Bundle=this.Bundle,c.Context=o,c.Record=t,c.Scope=a,c.__State=s,this.manifest.getValueByHash(c,e)}setStateValueAtAddress(e,t,r,i,n){let s=Array.isArray(i)?i:[this],o=n||this;const a={Fable:this.fable,Pict:this,AppData:this.AppData,TempData:this.TempData,Bundle:this.Bundle,Context:s,Record:t,Scope:o};return this.manifest.setValueByHash(a,e,r)}parseTemplate(e,t,r,i,n,s){let o,a="object"==typeof t?t:{},c=Array.isArray(i)?i:[this],l=n||this;if(this.LogControlFlow&&(o=this.fable.getUUID(),this.log.info("PICT-ControlFlow parseTemplate ".concat(o," [").concat(e.substring(0,50).replace("\n","\\n"),"...").concat(e.length,"] (fCallback: ").concat(typeof r,") with data size [").concat(JSON.stringify(a).length,"]")),this.LogNoisiness>1&&this.log.info("PICT-ControlFlow parseTemplate ".concat(o," template:\n").concat(e)),this.LogControlFlowWatchAddressList.length>0))for(let e=0;e<this.LogControlFlowWatchAddressList.length;e++)this.log.info("PICT-ControlFlow parseTemplate ".concat(o," Watch Value: [").concat(this.LogControlFlowWatchAddressList[e],"]=>[").concat(this.resolveStateFromAddress(this.LogControlFlowWatchAddressList[e],a),"]"));if("function"!=typeof r){let t=this.MetaTemplate.parseString(e,a,null,c,l,s);return this.LogControlFlow&&this.LogNoisiness>1&&this.log.info("PICT-ControlFlow parseTemplate ".concat(o," Template Return Value:\n").concat(t)),t}this.MetaTemplate.parseString(e,a,(e,t)=>(this.LogControlFlow&&this.LogNoisiness>1&&this.log.info("PICT-ControlFlow parseTemplate ".concat(o," Template Async Return Value:\n").concat(t)),r(e,t)),c,l,s)}parseTemplateByHash(e,t,r,i,n,s){let o=this.TemplateProvider.getTemplate(e);return o||(o=""),this.parseTemplate(o,t,r,i,n,s)}parseTemplateSet(e,t,r,i,n,s){let o="";if("function"!=typeof r){if(Array.isArray(t)||"object"==typeof t){if(Array.isArray(t))for(let r=0;r<t.length;r++)o+=this.parseTemplate(e,t[r],null,i,n,s);else{let r=Object.keys(t);for(let a=0;a<r.length;a++)o+=this.parseTemplate(e,t[r[a]],null,i,n,s)}return o}return""}if(!Array.isArray(t)&&"object"!=typeof t)return r(Error("Pict: Template Set: pDataSet is not an array or object."),"");this.Utility.eachLimit(t,1,(t,r)=>this.parseTemplate(e,t,(e,t)=>(o+=t,r()),i,n,s),e=>r(e,o))}parseTemplateSetByHash(e,t,r,i,n,s){let o=this.TemplateProvider.getTemplate(e);return o||(o=""),this.parseTemplateSet(o,t,r,i,n,s)}parseTemplateSetWithPayload(e,t,r,i,n,s,o){let a="";if("function"!=typeof i){if(Array.isArray(t)||"object"==typeof t){if(Array.isArray(t))for(let i=0;i<t.length;i++)a+=this.parseTemplate(e,{Data:t[i],Payload:r},null,n,s,o);else{let i=Object.keys(t);for(let c=0;c<i.length;c++)a+=this.parseTemplate(e,{Data:t[i[c]],Payload:r},null,n,s,o)}return a}return""}if(!Array.isArray(t)&&"object"!=typeof t)return i(Error("Pict: Template Set: pDataSet is not an array or object."),"");this.Utility.eachLimit(t,1,(t,i)=>this.parseTemplate(e,{Data:t,Payload:r},(e,t)=>(a+=t,i()),n,s,o),e=>i(e,a))}parseTemplateSetWithPayloadByHash(e,t,r,i,n,s,o){let a=this.TemplateProvider.getTemplate(e);return a||(a=""),this.parseTemplateSetWithPayload(a,t,r,i,n,s,o)}},t.exports.ServiceProviderBase=e("fable-serviceproviderbase"),t.exports.PictApplicationClass=e("pict-application"),t.exports.PictViewClass=e("pict-view"),t.exports.PictProviderClass=e("pict-provider"),t.exports.PictTemplateClass=e("pict-template"),t.exports.EnvironmentLog=e("./environments/Pict-Environment-Log.js"),t.exports.EnvironmentObject=e("./environments/Pict-Environment-Object.js"),t.exports.FilterClauseBase=e("./filters/FilterClauseBase.js"),t.exports.FilterClauseLocal=e("./filters/FilterClauseLocal.js"),t.exports.FilterClauseInternalJoin=e("./filters/FilterClauseInternalJoin.js"),t.exports.FilterClauseExternalJoin=e("./filters/FilterClauseExternalJoin.js"),t.exports.isBrowser=new Function("try {return (this===window);} catch(pError) {return false;}"),t.exports.safeOnDocumentReady=e("./Pict-Browser-SafeOnDocumentReady.js"),t.exports.safeLoadPictApplication=e("./Pict-Browser-SafeLoad.js")},{"../package.json":192,"./Pict-Browser-SafeLoad.js":193,"./Pict-Browser-SafeOnDocumentReady.js":194,"./Pict-CSS.js":195,"./Pict-Content-Assignment.js":196,"./Pict-DataProvider.js":197,"./Pict-Meadow-EntityProvider.js":198,"./Pict-Template-Audit.js":199,"./Pict-Template-Provider.js":200,"./environments/Pict-Environment-Log.js":202,"./environments/Pict-Environment-Object.js":203,"./filters/FilterClauseBase.js":205,"./filters/FilterClauseExternalJoin.js":206,"./filters/FilterClauseInternalJoin.js":207,"./filters/FilterClauseLocal.js":208,"./providers/Provider-DataBroker.js":209,"./providers/Provider-Filter-Manager.js":210,"./services/Fable-Service-TransactionTracking.js":211,"./templates/Pict-Template-Data.js":212,"./templates/Pict-Template-DataValueByKey.js":213,"./templates/Pict-Template-DataWithAbsoluteFallback.js":214,"./templates/Pict-Template-DataWithTemplateFallback.js":215,"./templates/Pict-Template-Entity.js":216,"./templates/Pict-Template-Self.js":217,"./templates/Pict-Template-Solve.js":218,"./templates/Pict-Template-SolveByReference.js":219,"./templates/Pict-Template-Template.js":220,"./templates/Pict-Template-TemplateByDataAddress.js":221,"./templates/Pict-Template-TemplateByReference.js":222,"./templates/Pict-Template-TemplateByTypes.js":223,"./templates/Pict-Template-TemplateFromAddress.js":224,"./templates/Pict-Template-TemplateFromMap.js":225,"./templates/Pict-Template-TemplateSet.js":226,"./templates/Pict-Template-TemplateSetFromMap.js":227,"./templates/Pict-Template-TemplateSetWithPayload.js":228,"./templates/Pict-Template-TemplateValueSet.js":229,"./templates/Pict-Template-View.js":230,"./templates/data-generation/Pict-Template-RandomNumber.js":231,"./templates/data-generation/Pict-Template-RandomNumberString.js":232,"./templates/data/Pict-Template-DataEncodeJavascriptString.js":233,"./templates/data/Pict-Template-DataJson.js":234,"./templates/data/Pict-Template-DateOnlyFormat.js":235,"./templates/data/Pict-Template-DateOnlyYMD.js":236,"./templates/data/Pict-Template-DateTimeFormat.js":237,"./templates/data/Pict-Template-DateTimeYMD.js":238,"./templates/data/Pict-Template-Digits.js":239,"./templates/data/Pict-Template-Dollars.js":240,"./templates/data/Pict-Template-HtmlCommentEnd.js":241,"./templates/data/Pict-Template-HtmlCommentStart.js":242,"./templates/data/Pict-Template-Join.js":243,"./templates/data/Pict-Template-JoinUnique.js":244,"./templates/data/Pict-Template-PascalCaseIdentifier.js":245,"./templates/data/Pict-Template-PluckJoinUnique.js":246,"./templates/debugging/Pict-Template-Breakpoint.js":247,"./templates/debugging/Pict-Template-DataValueTree.js":248,"./templates/debugging/Pict-Template-LogStatement.js":249,"./templates/debugging/Pict-Template-LogValue.js":250,"./templates/debugging/Pict-Template-LogValueTree.js":251,"./templates/logic/Pict-Template-NotEmpty.js":252,"./templates/logic/Pict-Template-TemplateIf.js":254,"./templates/logic/Pict-Template-TemplateIfAbsolute.js":255,fable:68,"fable-serviceproviderbase":59,"pict-application":140,"pict-provider":142,"pict-template":144,"pict-view":146}],202:[function(e,t,r){t.exports=class{constructor(e,t){this.contentMap="object"==typeof t?t:{},this.pict=e,this.truncateContentLength=256,this.storeEventLog=!0,this.eventLog={},this.eventLog.GetElement=[],this.eventLog.Read=[],this.eventLog.Prepend=[],this.eventLog.Append=[],this.eventLog.Assign=[],this.pict.ContentAssignment.customGetElementFunction=this.customGetElementFunction.bind(this),this.pict.ContentAssignment.customReadFunction=this.customReadFunction.bind(this),this.pict.ContentAssignment.customAppendFunction=this.customAppendFunction.bind(this),this.pict.ContentAssignment.customPrependFunction=this.customPrependFunction.bind(this),this.pict.ContentAssignment.customAssignFunction=this.customAssignFunction.bind(this),this.pict.ContentAssignment.customReadAttributeFunction=this.customReadAttributeFunction.bind(this),this.pict.ContentAssignment.customSetAttributeFunction=this.customSetAttributeFunction.bind(this)}createEventLogEntry(e,t){let r=void 0===t?"":t;return{TimeStamp:this.pict.log.getTimeStamp(),Hash:e,Content:r}}customGetElementFunction(e){return this.storeEventLog&&this.eventLog.GetElement.push(this.createEventLogEntry(e)),this.pict.log.info("Mocking an GET of Address -> [".concat(e,"]")),""}customReadFunction(e){return this.storeEventLog&&this.eventLog.Read.push(this.createEventLogEntry(e)),this.pict.log.info("Mocking an READ from Address -> [".concat(e,"]")),e in this.contentMap?this.contentMap[e]:(this.pict.log.warn("Mock read from Address ".concat(e," did not find a value in the content map.")),"")}customAppendFunction(e,t){return this.storeEventLog&&this.eventLog.Append.push(this.createEventLogEntry(e,t)),t.length>this.truncateContentLength?this.pict.log.info("Mocking an APPEND to Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:t.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an APPEND to Address -> [".concat(e,"]"),{Content:t}),""}customPrependFunction(e,t){return this.storeEventLog&&this.eventLog.Prepend.push(this.createEventLogEntry(e,t)),t.length>this.truncateContentLength?this.pict.log.info("Mocking an PREPEND to Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:t.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an PREPEND to Address -> [".concat(e,"]"),{Content:t}),""}customAssignFunction(e,t){return this.storeEventLog&&this.eventLog.Assign.push(this.createEventLogEntry(e,t)),t.length>this.truncateContentLength?this.pict.log.info("Mocking an ASSIGN to Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:t.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an ASSIGN to Address -> [".concat(e,"]"),{Content:t}),""}customReadAttributeFunction(e,t){return this.pict.log.info("Mocking an READ ATTRIBUTE from Address -> [".concat(e,"]"),{Attribute:t}),""}customSetAttributeFunction(e,t,r){return r.length>this.truncateContentLength?this.pict.log.info("Mocking an SET ATTRIBUTE to Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Attribute:t,Content:r.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an SET ATTRIBUTE to Address -> [".concat(e,"]"),{Attribute:t,Content:r}),""}}},{}],203:[function(e,t,r){t.exports=class{constructor(e,t){this.contentMap="object"==typeof t?t:{},this.contentMap._ATTRIBUTE_MAP={},this.contentMap._CLASS_MAP={},this.pict=e,this.truncateContentLength=256,this.storeEventLog=!0,this.eventLog={},this.eventLog.GetElement=[],this.eventLog.Read=[],this.eventLog.Prepend=[],this.eventLog.Append=[],this.eventLog.Assign=[],this.eventLog.ReadAttribute=[],this.eventLog.SetAttribute=[],this.eventLog.RemoveAttribute=[],this.eventLog.ReadClass=[],this.eventLog.SetClass=[],this.eventLog.RemoveClass=[],this.pict.ContentAssignment.customGetElementFunction=this.customGetElementFunction.bind(this),this.pict.ContentAssignment.customReadFunction=this.customReadFunction.bind(this),this.pict.ContentAssignment.customAppendFunction=this.customAppendFunction.bind(this),this.pict.ContentAssignment.customPrependFunction=this.customPrependFunction.bind(this),this.pict.ContentAssignment.customAssignFunction=this.customAssignFunction.bind(this),this.pict.ContentAssignment.customReadAttributeFunction=this.customReadAttributeFunction.bind(this),this.pict.ContentAssignment.customSetAttributeFunction=this.customSetAttributeFunction.bind(this),this.pict.ContentAssignment.customRemoveAttributeFunction=this.customRemoveAttributeFunction.bind(this),this.pict.ContentAssignment.customReadClassFunction=this.customReadClassFunction.bind(this),this.pict.ContentAssignment.customSetClassFunction=this.customSetClassFunction.bind(this),this.pict.ContentAssignment.customRemoveClassFunction=this.customRemoveClassFunction.bind(this)}createEventLogEntry(e,t){let r=void 0===t?"":t;return{TimeStamp:this.pict.log.getTimeStamp(),Hash:e,Content:r}}customGetElementFunction(e){return this.storeEventLog&&this.eventLog.GetElement.push(this.createEventLogEntry(e)),this.pict.log.info("Mocking an GET of Address -> [".concat(e,"]")),""}customReadFunction(e){return this.storeEventLog&&this.eventLog.Read.push(this.createEventLogEntry(e)),this.pict.log.info("Mocking an READ from Address -> [".concat(e,"]")),e in this.contentMap?this.contentMap[e]:(this.pict.log.warn("Mock read from Address ".concat(e," did not find a value in the content map.")),"")}customAppendFunction(e,t){return this.contentMap[e]=void 0===this.contentMap[e]?t:this.contentMap[e]+t,this.storeEventLog&&this.eventLog.Append.push(this.createEventLogEntry(e,t)),t.length>this.truncateContentLength?this.pict.log.info("Mocking an APPEND to Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:t.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an APPEND to Address -> [".concat(e,"]"),{Content:t}),""}customPrependFunction(e,t){return this.contentMap[e]=void 0===this.contentMap[e]?t:t+this.contentMap[e],this.storeEventLog&&this.eventLog.Prepend.push(this.createEventLogEntry(e,t)),t.length>this.truncateContentLength?this.pict.log.info("Mocking an PREPEND to Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:t.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an PREPEND to Address -> [".concat(e,"]"),{Content:t}),""}customAssignFunction(e,t){return this.contentMap[e]=t,this.storeEventLog&&this.eventLog.Prepend.push(this.createEventLogEntry(e,t)),t.length>this.truncateContentLength?this.pict.log.info("Mocking an ASSIGN to Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:t.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an ASSIGN to Address -> [".concat(e,"]"),{Content:t}),""}initializeAttributeMapLocation(e,t){e in this.contentMap._ATTRIBUTE_MAP||(this.contentMap._ATTRIBUTE_MAP[e]={}),t in this.contentMap._ATTRIBUTE_MAP[e]||(this.contentMap._ATTRIBUTE_MAP[e][t]=!1)}initializeClassMapLocation(e){e in this.contentMap._CLASS_MAP||(this.contentMap._CLASS_MAP[e]=[])}customReadAttributeFunction(e,t){this.initializeAttributeMapLocation(e,t);let r=this.contentMap._ATTRIBUTE_MAP[e][t];return this.storeEventLog&&this.eventLog.Assign.push(this.createEventLogEntry(e,t)),r.length>this.truncateContentLength?this.pict.log.info("Mocking an ATTRIBUTE READ for Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:r.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an ATTRIBUTE READ for Address -> [".concat(e,"]::[").concat(t,"]"),{Content:r}),r}customSetAttributeFunction(e,t,r){return this.initializeAttributeMapLocation(e,t),this.contentMap._ATTRIBUTE_MAP[e][t]=r,this.storeEventLog&&this.eventLog.Assign.push(this.createEventLogEntry(e,t)),r.length>this.truncateContentLength?this.pict.log.info("Mocking an ATTRIBUTE SET for Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:r.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an ATTRIBUTE SET for Address -> [".concat(e,"]::[").concat(t,"]"),{Content:r}),r}customRemoveAttributeFunction(e,t){this.initializeAttributeMapLocation(e,t);let r=this.contentMap._ATTRIBUTE_MAP[e][t];return this.storeEventLog&&this.eventLog.Assign.push(this.createEventLogEntry(e,t)),r.length>this.truncateContentLength?this.pict.log.info("Mocking an ATTRIBUTE REMOVE for Address -> [".concat(e,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:r.substring(0,this.truncateContentLength)}):this.pict.log.info("Mocking an ATTRIBUTE REMOVE for Address -> [".concat(e,"]::[").concat(t,"]"),{Content:r}),delete this.contentMap._ATTRIBUTE_MAP[e][t],!0}customReadClassFunction(e,t){this.initializeClassMapLocation(e);const r=this.contentMap._CLASS_MAP[e].indexOf(t)>-1;return this.storeEventLog&&this.eventLog.Assign.push(this.createEventLogEntry(e,t)),this.pict.log.info("Mocking an CLASS READ for Address -> [".concat(e,"]::[").concat(t,"]"),{Content:r}),r}customSetClassFunction(e,t){this.initializeClassMapLocation(e);let r=this.contentMap._CLASS_MAP[e];return-1==this.contentMap._CLASS_MAP[e].indexOf(t)&&this.contentMap._CLASS_MAP[e].push(t),this.storeEventLog&&this.eventLog.Assign.push(this.createEventLogEntry(e,t)),this.pict.log.info("Mocking an CLASS SET for Address -> [".concat(e,"]::[").concat(t,"]"),{Content:r.join(" ")}),r}customRemoveClassFunction(e,t){this.initializeClassMapLocation(e);let r=this.contentMap._CLASS_MAP[e];return this.contentMap._CLASS_MAP[e].splice(t),this.storeEventLog&&this.eventLog.Assign.push(this.createEventLogEntry(e,t)),this.pict.log.info("Mocking an CLASS REMOVE for Address -> [".concat(e,"]::[").concat(t,"]"),{Content:r.join(" ")}),r}}},{}],204:[function(e,t,r){t.exports=class{constructor(e){this.fable=e,this.pict=e,this.log=e.log}generateMeadowFilterStanzas(e){const t=[];e.UserFilters=[];for(const r of e.FilterConfiguration||[]){if(!1===r.Enabled){this.pict.LogNoisiness>1&&this.log.info("Skipping disabled filter configuration: ".concat(r.Type),{FilterConfig:r});continue}const i={GUID:this.pict.getUUID(),Filters:[]},n=Array.isArray(r.Values)?r.Values:null==r.Value||""==r.Value||"ExternalJoinDateMatch"==r.Type&&0==r.Value?[]:[r.Value];let s;switch(r.Type){case"ExternalJoinSelectedValue":case"ExternalJoinSelectedValueList":s=[r.ExternalFilterTableLookupColumn||"ID".concat(r.ExternalFilterByTable)];case"ExternalJoinMatch":case"ExternalJoinStringMatch":case"ExternalJoinDateMatch":case"ExternalJoinNumericMatch":s||(s=r.ExternalFilterByColumns||(r.ExternalFilterByColumn?[r.ExternalFilterByColumn]:["Name"]));for(const e of s)for(const t of n){const n={Index:-1,Entity:r.ExternalFilterByTable,Instruction:"FBVOR",Field:e};r.ExactMatch||void 0===r.ExactMatch&&("ExternalJoinNumericMatch"==r.Type||"ExternalJoinDateMatch"==r.Type||"ExternalJoinSelectedValue"==r.Type||"ExternalJoinSelectedValueList"==r.Type)?(n.Operator="EQ",n.Value=t):(n.Operator="LK",n.Value="%25".concat(t,"%25")),i.Filters.push(n)}if(!r.JoinTable){this.log.error("".concat(r.Type," filter missing JoinTable, cannot filter join table."),{FilterConfig:r});break}if(!r.JoinTableExternalConnectionColumn){this.log.error("".concat(r.Type," filter missing JoinTableExternalConnectionColumn, cannot filter join table [").concat(r.JoinTable,"]."));break}if(i.Filters.length>0){if(i.Filters.push({Index:0,Fulcrum:!0,Entity:r.JoinTable,Instruction:"FBL",Field:r.JoinTableExternalConnectionColumn,Operator:"INN",ValueTemplate:"{~PJU:,^".concat(r.ExternalFilterByTableConnectionColumn||r.JoinTableExternalConnectionColumn,"^Record.State[Step-1]~}")}),r.PolyJoinRemoteType&&i.Filters.push({Index:0,Fulcrum:!0,Entity:r.JoinTable,Instruction:"FBV",Field:r.PolyJoinRemoteColumn||"RemoteType",Operator:"EQ",ValueTemplate:r.PolyJoinRemoteType}),!r.CoreConnectionColumn){this.log.error("".concat(r.Type," filter missing CoreConnectionColumn, cannot filter core table [").concat(e.Entity,"]."));break}i.JoinConfig={CoreEntity:e.Entity,Instruction:"FBLOR",Fields:[r.CoreConnectionColumn],Operator:"INN",ValueTemplate:"{~PJU:,^".concat(r.JoinTableCoreConnectionColumn,"^Record.State[Step0]~}")}}break;case"ExternalJoinStringRange":case"ExternalJoinNumericRange":case"ExternalJoinDateRange":case"ExternalJoinRange":if(!r.Values||null==r.Values.Start&&null==r.Values.End)break;if("ExternalJoinDateRange"==r.Type&&!(r.Values.Start&&"0"!=r.Values.Start||r.Values.End&&"0"!=r.Values.End))break;for(const e of r.ExternalFilterByColumns||(r.ExternalFilterByColumn?[r.ExternalFilterByColumn]:["Name"])){const t=r.Values&&r.Values.Start&&("ExternalJoinDateRange"!=r.Type||"0"!=r.Values.Start),n=r.Values&&r.Values.End&&("ExternalJoinDateRange"!=r.Type||"0"!=r.Values.End);t&&i.Filters.push({Index:-1,Entity:r.ExternalFilterByTable,Instruction:"FBVOR",OpenParen:!0,OpenParenOr:!0,CloseParen:!n,Field:e,Operator:r.StartExclusive?"GT":"GE",Value:r.Values.Start}),n&&i.Filters.push({Index:-1,Entity:r.ExternalFilterByTable,Instruction:"FBV",OpenParen:!t,OpenParenOr:!t,CloseParen:!0,Field:e,Operator:r.EndExclusive?"LT":"LE",Value:r.Values.End})}if(!r.JoinTable){this.log.error("".concat(r.Type," filter missing JoinTable, cannot filter join table."),{FilterConfig:r});break}if(!r.JoinTableExternalConnectionColumn){this.log.error("".concat(r.Type," filter missing JoinTableExternalConnectionColumn, cannot filter join table [").concat(r.JoinTable,"]."));break}if(i.Filters.length>0){if(i.Filters.push({Index:0,Fulcrum:!0,Entity:r.JoinTable,Instruction:"FBL",Field:r.JoinTableExternalConnectionColumn,Operator:"INN",ValueTemplate:"{~PJU:,^".concat(r.ExternalFilterByTableConnectionColumn||r.JoinTableExternalConnectionColumn,"^Record.State[Step-1]~}")}),r.PolyJoinRemoteType&&i.Filters.push({Index:0,Fulcrum:!0,Entity:r.JoinTable,Instruction:"FBV",Field:r.PolyJoinRemoteColumn||"RemoteType",Operator:"EQ",ValueTemplate:r.PolyJoinRemoteType}),!r.CoreConnectionColumn){this.log.error("".concat(r.Type," filter missing CoreConnectionColumn, cannot filter core table [").concat(e.Entity,"]."));break}if(!r.JoinTableCoreConnectionColumn){this.log.error("".concat(r.Type," filter missing JoinTableCoreConnectionColumn, cannot filter core table [").concat(e.Entity,"]."));break}i.JoinConfig={CoreEntity:e.Entity,Instruction:"FBLOR",Fields:[r.CoreConnectionColumn],Operator:"INN",ValueTemplate:"{~PJU:,^".concat(r.JoinTableCoreConnectionColumn,"^Record.State[Step0]~}")}}break;case"StringRange":case"DateRange":case"NumericRange":case"Range":if(!r.Values||null==r.Values.Start&&null==r.Values.End)break;if("DateRange"==r.Type&&!(r.Values.Start&&"0"!=r.Values.Start||r.Values.End&&"0"!=r.Values.End))break;for(const t of r.FilterByColumns||(r.FilterByColumn?[r.FilterByColumn]:["Name"])){const n=r.Values&&r.Values.Start&&("DateRange"!=r.Type||"0"!=r.Values.Start),s=r.Values&&r.Values.End&&("DateRange"!=r.Type||"0"!=r.Values.End);n&&i.Filters.push({Index:0,CoreEntity:!0,Entity:e.Entity,Instruction:"FBVOR",Field:t,OpenParen:!0,OpenParenOr:!0,CloseParen:!s,Operator:r.StartExclusive?"GT":"GE",Value:r.Values.Start}),s&&i.Filters.push({Index:0,CoreEntity:!0,Entity:e.Entity,Instruction:"FBV",OpenParen:!n,OpenParenOr:!n,CloseParen:!0,Field:t,Operator:r.EndExclusive?"LT":"LE",Value:r.Values.End})}break;case"StringMatch":case"DateMatch":case"NumericMatch":case"Match":for(const t of r.FilterByColumns||(r.FilterByColumn?[r.FilterByColumn]:["Name"]))for(const s of n){const n={Index:0,CoreEntity:!0,Entity:e.Entity,Instruction:"FBVOR",Field:t};r.ExactMatch||void 0===r.ExactMatch&&("NumericMatch"==r.Type||"DateMatch"==r.Type)?(n.Operator="EQ",n.Value=s):(n.Operator="LK",n.Value="%25".concat(s,"%25")),i.Filters.push(n)}break;case"InternalJoinStringRange":case"InternalJoinNumericRange":case"InternalJoinDateRange":case"InternalJoinRange":if(!r.Values||null==r.Values.Start&&null==r.Values.End)break;if("InternalJoinDateRange"==r.Type&&!(r.Values.Start&&"0"!=r.Values.Start||r.Values.End&&"0"!=r.Values.End))break;for(const e of r.ExternalFilterByColumns||(r.ExternalFilterByColumn?[r.ExternalFilterByColumn]:["Name"])){const t=r.Values&&r.Values.Start&&("InternalJoinDateRange"!=r.Type||"0"!=r.Values.Start),n=r.Values&&r.Values.End&&("InternalJoinDateRange"!=r.Type||"0"!=r.Values.End);t&&i.Filters.push({Index:0,Entity:r.RemoteTable,Instruction:"FBVOR",Field:e,OpenParen:!0,OpenParenOr:!0,CloseParen:!n,Operator:r.StartExclusive?"GT":"GE",Value:r.Values.Start}),n&&i.Filters.push({Index:0,Entity:r.RemoteTable,Instruction:"FBV",OpenParen:!t,OpenParenOr:!t,CloseParen:!0,Field:e,Operator:r.EndExclusive?"LT":"LE",Value:r.Values.End})}if(i.Filters.length>0){if(!r.JoinInternalConnectionColumn){this.log.error("".concat(r.Type," filter missing JoinInternalConnectionColumn, cannot filter core table [").concat(e.Entity,"]."));break}i.JoinConfig={Instruction:"FBLOR",CoreEntity:e.Entity,Fields:[r.JoinInternalConnectionColumn],Operator:"INN",ValueTemplate:"{~PJU:,^".concat(r.JoinExternalConnectionColumn,"^Record.State[Step0]~}")}}break;case"InternalJoinSelectedValue":case"InternalJoinSelectedValueList":s=[r.ExternalFilterTableLookupColumn||"ID".concat(r.RemoteTable)];case"InternalJoinMatch":case"InternalJoinStringMatch":case"InternalJoinDateMatch":case"InternalJoinNumericMatch":s||(s=r.ExternalFilterByColumns||(r.ExternalFilterByColumn?[r.ExternalFilterByColumn]:["Name"]));for(const e of s)for(const t of n){const n={Index:0,Entity:r.RemoteTable,Instruction:"FBVOR",Field:e};r.ExactMatch||void 0===r.ExactMatch&&("InternalJoinNumericMatch"==r.Type||"InternalJoinDateMatch"==r.Type||"InternalJoinSelectedValue"==r.Type||"InternalJoinSelectedValueList"==r.Type)?(n.Operator="EQ",n.Value=t):(n.Operator="LK",n.Value="%25".concat(t,"%25")),i.Filters.push(n)}if(i.Filters.length>0){if(!r.JoinInternalConnectionColumn){this.log.error("".concat(r.Type," filter missing JoinInternalConnectionColumn, cannot filter core table [").concat(e.Entity,"]."));break}i.JoinConfig={Instruction:"FBLOR",CoreEntity:e.Entity,Fields:[r.JoinInternalConnectionColumn],Operator:"INN",ValueTemplate:"{~PJU:,^".concat(r.JoinExternalConnectionColumn,"^Record.State[Step0]~}")}}break;case"RawFilter":if(!r.Value){this.log.warn("RawFilter configuration missing Value, not adding filter.",{FilterConfig:r});break}e.UserFilters.push(r.Value);break;default:this.log.warn("Unknown filter type ".concat(r.Type," in filter configuration."),{FilterConfig:r})}i.Filters.length>0&&t.push(i)}e.PreparedFilters=t}linkPreparedFilters(e){const t=[];for(const r of e.PreparedFilters||[])if(r.JoinConfig){const e=r.Filters,i=r.JoinConfig;for(const t of i.Fields||[]){const n={Index:1,CoreEntity:!0,Entity:r.JoinConfig.CoreEntity,Instruction:r.JoinConfig.Instruction||"FBVOR",Field:t,Operator:i.Operator,Value:i.Value,ValueTemplate:i.ValueTemplate};e.push(n)}t.push(e)}else t.push(r.Filters);return t}normalizeMeadowFilterStanzas(e){let t=0;for(const r of e.PreparedFilters){const e=new Set;r.Filters.sort((e,t)=>e.Index-t.Index);for(const t of r.Filters)t.CoreEntity||e.add(t.Index);t+=e.size}let r=-t-1;for(const t of e.PreparedFilters){let e=null;for(const i of t.Filters)i.Index!==e&&(++r,e=i.Index),i.ComputedIndex=r;for(const e of t.Filters)e.ValueTemplate&&(e.ValueTemplate=e.ValueTemplate.replace(/\[([^\]]+)\]/g,e=>{var r;const i=e.substring(5,e.length-1),n=null===(r=t.Filters.find(e=>e.Index==i))||void 0===r?void 0:r.ComputedIndex;if(null==n)throw new Error("Filter index ".concat(i," not found in group filters."));return e.replace(i,n)}))}}compileMeadowFilterStanzas(e){const t=[];e.Filter||(e.Filter="".concat(e.Entity||"Unknown","-").concat(this.pict.getUUID())),t.push({Type:"SetStateAddress",StateAddress:"Bundle[".concat(e.Filter,"]")});const r={},i=[],n=[],s=[];let o;const a=[];for(const a of e.PreparedFilters){for(const e of a.Filters)if(e.CoreEntity){o=e.Entity;const t="".concat(a.GUID,"-").concat(e.ComputedIndex);s.find(e=>e==t)||s.push(t),n[t]||(n[t]={Stanzas:[],ComputedIndex:e.ComputedIndex,Entity:e.Entity}),n[t].Stanzas.push(this._compileSimpleFilterToString(e))}else{const t="".concat(a.GUID,"-").concat(e.ComputedIndex);i.find(e=>e==t)||i.push(t),r[t]||(r[t]={Stanzas:[],ComputedIndex:e.ComputedIndex,Entity:e.Entity}),r[t].Stanzas.push(this._compileSimpleFilterToString(e))}for(const e of i)r[e].Stanzas=r[e].Stanzas.filter(e=>e.length>0),r[e].Stanzas.length>0&&t.push({Type:"MeadowEntity",AllRecords:!0,Entity:r[e].Entity,Filter:r[e].Stanzas.join("~"),Destination:"State[Step".concat(r[e].ComputedIndex,"]")})}for(const e of s)n[e].Stanzas=n[e].Stanzas.filter(e=>e.length>0),n[e].Stanzas.length>0&&a.push(["FOP~0~(~0",...n[e].Stanzas,"FCP~0~)~0"].join("~"));o||(o=e.Entity);const c={Type:"Count"===e.Mode?"MeadowEntityCount":"MeadowEntity",Entity:o,Filter:a.join("~"),AllRecords:void 0===e.PageSize,RecordStartCursor:e.RecordOffset,PageSize:e.PageSize,Destination:e.ResultDestinationAddress};if(e.UserFilters.length>0){let t="",r="";for(const i of e.UserFilters){let n,s=i;if("Count"===e.Mode)s=this._sanitizeFilterForCount(i);else if([s,n]=this._extractSortsFromFilter(i),n&&(t.length>0&&(t+="~"),t+=n),!s)continue;s&&(r.length>0&&(r+="~"),r+="FOP~0~(~0~",r+=s,r+="~FCP~0~)~0")}c.Filter&&(r.length>0&&(r+="~"),r+="FOP~0~(~0~",r+=c.Filter,r+="~FCP~0~)~0"),t&&(r.length>0&&(r+="~"),r+=t),c.Filter=r}t.push(c),e.BundleConfig=t}_sanitizeFilterForCount(e){if(!e||"string"!=typeof e)return e;let t=e.split("~");for(let e=0;e<t.length;e+=4)"FSF"===t[e]&&(t=t.slice(0,e).concat(t.slice(e+4)),e-=4);return t.join("~")}_extractSortsFromFilter(e){if(!e||"string"!=typeof e)return[e,""];let t=[],r=e.split("~");for(let e=0;e<r.length;e+=4)"FSF"===r[e]&&(t.push(r.slice(e,e+4).join("~")),r=r.slice(0,e).concat(r.slice(e+4)),e-=4);return[r.join("~"),t.join("~")]}_compileSimpleFilterToString(e){let t="".concat(e.Instruction);return t+="~".concat(e.Field),t+="~".concat(e.Operator),e.ValueTemplate?t+="~".concat(e.ValueTemplate):t+="~".concat(e.Value||""),e.OpenParen&&(t="".concat(e.OpenParenOr?"FOPOR":"FOP","~0~(~0~").concat(t)),e.CloseParen&&(t="".concat(t,"~FCP~0~)~0")),t}}},{}],205:[function(e,t,r){t.exports=class{constructor(e){this.fable=e,this.pict=e,this.log=e.log,this._type="None",this.values=[]}set type(e){this._type=e,e.includes("Range")?("object"!=typeof this.values||null===this.values||Array.isArray(this.values))&&(this.values={Start:void 0,End:void 0}):Array.isArray(this.values)||(this.values=[])}get type(){return this._type}generateFilterClauseConfig(){return{Type:"None"}}}},{}],206:[function(e,t,r){const i=e("./FilterClauseBase.js");t.exports=class extends i{constructor(e){super(e),this.type="ExternalJoinMatch",this.values=[],this.exactMatch,this.startExclusive,this.endExclusive,this.externalFilterByColumn,this.externalFilterByColumns,this.coreConnectionColumn="",this.joinTable="",this.joinTableExternalConnectionColumn="",this.joinTableCoreConnectionColumn="",this.externalFilterByTable="",this.externalFilterTableLookupColumn="",this.externalFilterByTableConnectionColumn="",this.polyJoinRemoteType="",this.polyJoinRemoteColumn=""}generateFilterClauseConfig(){switch(this.type){case"ExternalJoinMatch":case"ExternalJoinStringMatch":case"ExternalJoinDateMatch":case"ExternalJoinNumericMatch":return{Type:this.type,Values:Array.isArray(this.values)?this.values:[],ExactMatch:this.exactMatch,ExternalFilterByColumn:this.externalFilterByColumn,ExternalFilterByColumns:this.externalFilterByColumns,CoreConnectionColumn:this.coreConnectionColumn,JoinTable:this.joinTable,JoinTableExternalConnectionColumn:this.joinTableExternalConnectionColumn,JoinTableCoreConnectionColumn:this.joinTableCoreConnectionColumn,ExternalFilterByTable:this.externalFilterByTable,ExternalFilterByTableConnectionColumn:this.externalFilterByTableConnectionColumn,PolyJoinRemoteType:this.polyJoinRemoteType,PolyJoinRemoteColumn:this.polyJoinRemoteColumn};case"ExternalJoinRange":case"ExternalJoinStringRange":case"ExternalJoinDateRange":case"ExternalJoinNumericRange":return{Type:this.type,Values:Array.isArray(this.values)?{Start:void 0,End:void 0}:Object.assign({},this.values),StartExclusive:this.startExclusive,EndExclusive:this.endExclusive,ExternalFilterByColumn:this.externalFilterByColumn,ExternalFilterByColumns:this.externalFilterByColumns,CoreConnectionColumn:this.coreConnectionColumn,JoinTable:this.joinTable,JoinTableExternalConnectionColumn:this.joinTableExternalConnectionColumn,JoinTableCoreConnectionColumn:this.joinTableCoreConnectionColumn,ExternalFilterByTable:this.externalFilterByTable,ExternalFilterByTableConnectionColumn:this.externalFilterByTableConnectionColumn,PolyJoinRemoteType:this.polyJoinRemoteType,PolyJoinRemoteColumn:this.polyJoinRemoteColumn};case"ExternalJoinSelectedValue":case"ExternalJoinSelectedValueList":return{Type:this.type,Values:Array.isArray(this.values)?{Start:void 0,End:void 0}:Object.assign({},this.values),StartExclusive:this.startExclusive,EndExclusive:this.endExclusive,ExternalFilterByColumn:this.externalFilterByColumn,ExternalFilterByColumns:this.externalFilterByColumns,CoreConnectionColumn:this.coreConnectionColumn,JoinTable:this.joinTable,JoinTableExternalConnectionColumn:this.joinTableExternalConnectionColumn,JoinTableCoreConnectionColumn:this.joinTableCoreConnectionColumn,ExternalFilterByTable:this.externalFilterByTable,ExternalFilterTableLookupColumn:this.externalFilterTableLookupColumn,ExternalFilterByTableConnectionColumn:this.externalFilterByTableConnectionColumn,PolyJoinRemoteType:this.polyJoinRemoteType,PolyJoinRemoteColumn:this.polyJoinRemoteColumn};default:throw new Error("Unsupported filter type: ".concat(this.type))}}}},{"./FilterClauseBase.js":205}],207:[function(e,t,r){const i=e("./FilterClauseBase.js");t.exports=class extends i{constructor(e){super(e),this.type="None",this.values=[],this.exactMatch,this.startExclusive,this.endExclusive,this.remoteTable="",this.externalFilterByColumn,this.externalFilterByColumns,this.externalFilterTableLookupColumn,this.joinExternalConnectionColumn="",this.joinInternalConnectionColumn=""}generateFilterClauseConfig(){switch(this._type){case"InternalJoinMatch":case"InternalJoinStringMatch":case"InternalJoinDateMatch":case"InternalJoinNumericMatch":return{Type:this._type,Values:Array.isArray(this.values)?this.values:[],ExactMatch:this.exactMatch,RemoteTable:this.remoteTable,ExternalFilterByColumn:this.externalFilterByColumn,ExternalFilterByColumns:this.externalFilterByColumns,JoinExternalConnectionColumn:this.joinExternalConnectionColumn,JoinInternalConnectionColumn:this.joinInternalConnectionColumn};case"InternalJoinSelectedValue":case"InternalJoinSelectedValueList":return{Type:this._type,Values:Array.isArray(this.values)?this.values:[],ExactMatch:this.exactMatch,RemoteTable:this.remoteTable,ExternalFilterByColumn:this.externalFilterByColumn,ExternalFilterByColumns:this.externalFilterByColumns,ExternalFilterTableLookupColumn:this.externalFilterTableLookupColumn,JoinExternalConnectionColumn:this.joinExternalConnectionColumn,JoinInternalConnectionColumn:this.joinInternalConnectionColumn};case"InternalJoinRange":case"InternalJoinStringRange":case"InternalJoinDateRange":case"InternalJoinNumericRange":return{Type:this._type,Values:Array.isArray(this.values)?{Start:void 0,End:void 0}:Object.assign({},this.values),StartExclusive:this.startExclusive,EndExclusive:this.endExclusive,RemoteTable:this.remoteTable,ExternalFilterByColumn:this.externalFilterByColumn,ExternalFilterByColumns:this.externalFilterByColumns,JoinExternalConnectionColumn:this.joinExternalConnectionColumn,JoinInternalConnectionColumn:this.joinInternalConnectionColumn};default:throw new Error("Unsupported filter type: ".concat(this.type))}}}},{"./FilterClauseBase.js":205}],208:[function(e,t,r){const i=e("./FilterClauseBase.js");t.exports=class extends i{constructor(e){super(e),this._type="Match",this.filterByColumn,this.exactMatch,this.startExclusive,this.endExclusive}generateFilterClauseConfig(){switch(this._type){case"Match":case"StringMatch":case"DateMatch":case"NumericMatch":return{Type:this._type,Values:Array.isArray(this.values)?this.values:[],ExactMatch:this.exactMatch,FilterByColumn:this.filterByColumn};case"Range":case"StringRange":case"DateRange":case"NumericRange":return{Type:this._type,Values:Array.isArray(this.values)?{Start:void 0,End:void 0}:Object.assign({},this.values),StartExclusive:this.startExclusive,EndExclusive:this.endExclusive,FilterByColumn:this.filterByColumn};default:throw new Error("Unsupported filter type: ".concat(this.type))}}}},{"./FilterClauseBase.js":205}],209:[function(e,t,r){const i=e("pict-provider"),n={ProviderIdentifier:"Pict-Provider-DataBroker",AutoInitialize:!0,AutoInitializeOrdinal:0};t.exports=class extends i{constructor(e,t,r){super(e,Object.assign({},n,t),r),this.options,this.pict,this.marshalDestination="AppData"}getValue(e){return this.getValueByHash(e)}getValueByHash(e){return this.pict.manifest.getValueByHash(this.getMarshalDestinationObject(),e)}setValue(e,t){return this.setValueByHash(e,t)}setValueByHash(e,t){return this.pict.manifest.setValueByHash(this.getMarshalDestinationObject(),e,t)}get marshalDestination(){return this._marshalDestination}set marshalDestination(e){this._marshalDestination=e}get marshalDestinationObject(){const e=this.marshalDestination;if(!e)throw new Error("Attempt to access marshal destination object with no marshal destination set.");let t=this.pict.resolveStateFromAddress(e);if(!t&&(this.log.error("Data Broker bootstrapping missing object at marshal destination address: ".concat(e)),this.pict.setStateValueAtAddress(e,null,{}),t=this.pict.resolveStateFromAddress(e),!t))throw new Error("Attempt to access marshal destination object with no marshal destination set.");return t}getMarshalDestinationObject(){return this.marshalDestinationObject}resolveMarshalDestinationObject(e){const t=e||this.marshalDestination;if(!t)throw new Error("Attempt to resolve marshal destination object with no marshal destination set.");let r;return e?(r=this.pict.resolveStateFromAddress(e),r||(this.log.error("Data Broker bootstrapping missing object at marshal destination address: ".concat(t)),this.pict.setStateValueAtAddress(t,null,{}))):r=this.getMarshalDestinationObject(),r}},t.exports.default_configuration=n},{"pict-provider":142}],210:[function(e,t,r){const i=e("pict-provider"),n=e("../filters/Filter.js"),s={ProviderIdentifier:"Pict-RecordSet-FilterManager",AutoInitialize:!0,AutoInitializeOrdinal:0};t.exports=class extends i{constructor(e,t,r){super(e,Object.assign({},s,t),r),this.options,this.pict,this.filters={},this.filterCriteria={}}addFilter(e,t){if(!e||"string"!=typeof e)return void this.log.error("Invalid filter hash provided. It must be a non-empty string.");if(!t||"object"!=typeof t||!t.Type)return void this.log.error("Invalid filter configuration provided. It must be an object with a Type property.");const r=JSON.parse(JSON.stringify(t));r.Hash&&r.Hash!==e&&this.log.warn("Filter configuration hash mismatch: provided ".concat(r.Hash,", expected ").concat(e,". Overriding with provided hash.")),r.Hash=e,this.filters[r.Hash]=r}addFilterCriteria(e,t){if(!e||"string"!=typeof e)return void this.log.error("Invalid filter criteria hash provided. It must be a non-empty string.");if(!t||!Array.isArray(t))return void this.log.error("Invalid filter criteria configuration provided. It must be an array of filter clauses.");const r=JSON.parse(JSON.stringify(t));this.filterCriteria[e]=r}getFilter(e){return this.filters[e]}getFilterCriteria(e){return this.filterCriteria[e]}loadRecordsByFilter(e,t,r){return this.loadRecordsByFilterUsingProvider(this.pict.EntityProvider,e,t,r)}loadRecordsByFilterUsingProvider(e,t,r,i){if(!e||"function"!=typeof e.gatherDataFromServer)return i(new Error("loadRecordsByFilter: Missing or invalid EntityProvider."));const s=JSON.parse(JSON.stringify(r));s.Mode="Records",s.FilterConfiguration=t;const o=new n(this.pict);o.generateMeadowFilterStanzas(s),o.linkPreparedFilters(s),o.normalizeMeadowFilterStanzas(s),o.compileMeadowFilterStanzas(s),e.gatherDataFromServer(s.BundleConfig,i)}loadRecordPageByFilter(e,t,r,i,n){return this.loadRecordPageByFilterUsingProvider(this.pict.EntityProvider,e,t,r,i,n)}loadRecordPageByFilterUsingProvider(e,t,r,i,s,o){if(!e||"function"!=typeof e.gatherDataFromServer)return o(new Error("loadRecordPageByFilter: Missing or invalid EntityProvider."));const a="function"==typeof i?i:"function"==typeof s?s:o;let c="function"==typeof i?0:parseInt(String(i));(isNaN(c)||c<0)&&(c=0);let l="function"==typeof s?0:parseInt(String(s));(isNaN(l)||l<0)&&(l=1e4);const h=JSON.parse(JSON.stringify(r));h.Mode="Records",h.RecordOffset=c,h.PageSize=l,h.FilterConfiguration=t;const u=new n(this.pict);u.generateMeadowFilterStanzas(h),u.linkPreparedFilters(h),u.normalizeMeadowFilterStanzas(h),u.compileMeadowFilterStanzas(h),e.gatherDataFromServer(h.BundleConfig,a)}countRecordsByFilter(e,t,r){return this.countRecordsByFilterUsingProivider(this.pict.EntityProvider,e,t,r)}countRecordsByFilterUsingProivider(e,t,r,i){const s=JSON.parse(JSON.stringify(r));s.Mode="Count",s.FilterConfiguration=t;const o=new n(this.pict);o.generateMeadowFilterStanzas(s),o.linkPreparedFilters(s),o.normalizeMeadowFilterStanzas(s),o.compileMeadowFilterStanzas(s),e.gatherDataFromServer(s.BundleConfig,i)}executeFilter(e,t,r){return this.executeFilterUsingProvider(this.pict.EntityProvider,e,t,r)}executeFilterUsingProvider(e,t,r,i){if(!e||"function"!=typeof e.gatherDataFromServer)return i(new Error("executeFilter: Missing or invalid EntityProvider."));const n=this.pict.resolveStateFromAddress(t);if(!Array.isArray(n))return i(new Error("Filter configuration at address ".concat(t," is not an array.")));const s=this.pict.resolveStateFromAddress(r);return s&&"object"==typeof s?this.loadRecordsByFilterUsingProvider(e,n,s,i):i(new Error("Filter experience at address ".concat(r," is not an object.")))}executeFilterPage(e,t,r,i,n){return this.executeFilterPageUsingProvider(this.pict.EntityProvider,e,t,r,i,n)}executeFilterPageUsingProvider(e,t,r,i,n,s){const o="function"==typeof i?i:"function"==typeof n?n:s,a=this.pict.resolveStateFromAddress(t);if(!Array.isArray(a))return o(new Error("Filter configuration at address ".concat(t," is not an array.")));const c=this.pict.resolveStateFromAddress(r);return c&&"object"==typeof c?this.loadRecordPageByFilterUsingProvider(e,a,c,i,n,s):o(new Error("Filter experience at address ".concat(r," is not an object.")))}executeFilterCount(e,t,r){return this.executeFilterCountUsingProvider(this.pict.EntityProvider,e,t,r)}executeFilterCountUsingProvider(e,t,r,i){const n=this.pict.resolveStateFromAddress(t);if(!Array.isArray(n))return i(new Error("Filter configuration at address ".concat(t," is not an array.")));const s=this.pict.resolveStateFromAddress(r);return s&&"object"==typeof s?this.countRecordsByFilterUsingProivider(e,n,s,i):i(new Error("Filter experience at address ".concat(r," is not an object.")))}},t.exports.default_configuration=s},{"../filters/Filter.js":204,"pict-provider":142}],211:[function(e,t,r){const i=e("fable-serviceproviderbase");class n extends i{constructor(e,t,r){super(e,t,r),this.fable,this.log,this.UUID,this.transactionMap={}}get transactions(){return this.transactionMap}logToTransaction(e,t,r){let i=this.transactionMap[e];null==i&&(this.log.warn("TransactionTracking logToTransaction key [".concat(e,"] does not exist; auto creating...")),i=this.registerTransaction(e));let n="string"==typeof r?r:"General";return this.transactionMap[e].Log.push({TimeStamp:new Date,Category:n,Message:t}),!0}registerTransaction(e){return null!=this.transactionMap[e]||(this.transactionMap[e]={TransactionKey:e,Events:{},Log:[],TransactionQueue:[]}),this.transactionMap[e]}pushToTransactionQueue(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Entry",i=this.transactionMap[e];return null==i&&(this.log.warn("TransactionTracking pushToTransactionQueue key [".concat(e,"] does not exist; auto creating...")),i=this.registerTransaction(e)),i.TransactionQueue.push({Timestamp:Date.now(),Data:t,Type:r}),this.logToTransaction(e,"Pushed data to transaction queue","Queue"),i.TransactionQueue.length}checkTransactionQueue(e){let t=this.transactionMap[e];return null==t&&(this.log.warn("TransactionTracking checkTransactionQueue key [".concat(e,"] does not exist; auto creating...")),t=this.registerTransaction(e)),null==t.TransactionQueue&&(t.TransactionQueue=[]),this.logToTransaction(e,"Checked transaction queue","Queue"),t.TransactionQueue}getTransactionQueue(e){return this.checkTransactionQueue(e).map(e=>e.Data)}clearTransactionQueue(e){let t=this.transactionMap[e];if(null==t)return void this.log.warn("TransactionTracking clearTransactionQueue key [".concat(e,"] does not exist; skipping..."));const r=t.TransactionQueue;return t.TransactionQueue=[],this.logToTransaction(e,"Cleared transaction queue","Queue"),r}checkEvent(e,t,r){let i="string"==typeof r?r:"",n=this.transactionMap[e];return null==n&&(this.log.warn("TransactionTracking checkTransactionEvent event [".concat(t,"]->[").concat(i,"] key [").concat(e,"] does not exist; auto creating...")),n=this.registerTransaction(e)),null==n.Events[t]&&(n.Events[t]={}),i in n.Events[t]?(this.logToTransaction(e,"Event [".concat(t,"]->[").concat(i,"] already exists in transaction [").concat(e,"]"),"Event"),!1):(this.logToTransaction(e,"Event [".concat(t,"]->[").concat(i,"] registered in transaction [").concat(e,"]"),"Event"),n.Events[t][i]=!0,!0)}}t.exports=n,n.default_configuration={}},{"fable-serviceproviderbase":59}],212:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~Data:","~}"),this.addPattern("{~D:","~}")}render(e,t,r,i,n){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDataRender]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDataRender]::[".concat(s,"]"));let a="";s.indexOf(":")>-1&&(a=s.split(":")[1],s=s.split(":")[0]);let c="";return null!=s&&(c=this.resolveStateFromAddress(s,o,r,null,i,n)),null==c||"undefined"==c||void 0===c||""===c?a:c}}},{"pict-template":144}],213:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~DataValueByKey:","~}"),this.addPattern("{~DVBK:","~}")}render(e,t,r,i,n){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDataRender]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDataRender]::[".concat(s,"]"));let a=s.split(":");if(a.length<2)return this.log.trace("PICT Template [fDataRender]::[".concat(s,"] failed because there were not two stanzas in the expression [").concat(e,"]")),"";let c="";a.length>2&&(c=a[2]);let l=this.resolveStateFromAddress(a[0],o,r,null,i,n),h=this.resolveStateFromAddress(a[1],o,r,null,i,n),u=this.pict.manifest.getValueByHash(l,h);return null==u||"undefined"==u||void 0===u?c:u}}},{"pict-template":144}],214:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~DataWithAbsoluteFallback:","~}"),this.addPattern("{~DWAF:","~}")}render(e,t,r,i,n){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT DataWithAbsoluteFallback [fDataRender]::[".concat(s,"] with tmpRecord:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithAbsoluteFallback [fDataRender]::[".concat(s,"]"));let a="";s.indexOf(":")>-1&&(a=s.split(":")[1],s=s.split(":")[0]);let c="";return null!=s&&(c=this.resolveStateFromAddress(s,o,r,null,i,n),c&&"undefined"!==c)?(this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithAbsoluteFallback [fDataRender]::[".concat(s,"] - Found value: ").concat(c)),c):a}renderAsync(e,t,r,i,n,s){let o=e.trim(),a="object"==typeof t?t:{},c="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT DataWithAbsoluteFallback [fDataRender]::[".concat(o,"] with tmpRecord:"),a):this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithAbsoluteFallback [fDataRender]::[".concat(o,"]"));let l="";o.indexOf(":")>-1&&(l=o.split(":")[1],o=o.split(":")[0]);let h="";return null!=o&&(h=this.resolveStateFromAddress(o,a,i,null,n,s),h&&"undefined"!==h)?(this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithAbsoluteFallback [fDataRender]::[".concat(o,"] - Found value: ").concat(h)),c(null,h)):c(null,l)}}},{"pict-template":144}],215:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~DataWithTemplateFallback:","~}"),this.addPattern("{~DWTF:","~}")}render(e,t,r,i,n){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(s,"] with tmpRecord:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(s,"]"));let a="";s.indexOf(":")>-1&&(a=s.split(":")[1],s=s.split(":")[0]);let c="";if(null!=s&&(c=this.resolveStateFromAddress(s,o,r,null,i,n),c&&"undefined"!==c))return this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(s,"] - Found value: ").concat(c)),c;const l=this.pict.parseTemplateByHash(a,o,null,r,i,n);return null==l||""===l?(this.log.warn("PICT DataWithTemplateFallback [fDataRender]::[".concat(s,"] - No fallback template found at address: ").concat(a)),""):(this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(s,"] - Using fallback template from address: ").concat(a)),l)}renderAsync(e,t,r,i,n,s){let o=e.trim(),a="object"==typeof t?t:{},c="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(o,"] with tmpRecord:"),a):this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(o,"]"));let l="";o.indexOf(":")>-1&&(l=o.split(":")[1],o=o.split(":")[0]);let h="";if(null!=o&&(h=this.resolveStateFromAddress(o,a,i,null,n,s),h&&"undefined"!==h))return this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(o,"] - Found value: ").concat(h)),c(null,h);this.pict.parseTemplateByHash(l,a,(e,t)=>e?c(e,""):null==t||""===t?(this.log.warn("PICT DataWithTemplateFallback [fDataRender]::[".concat(o,"] - No fallback template found at address: ").concat(l)),c(null,"")):(this.pict.LogNoisiness>3&&this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(o,"] - Using fallback template from address: ").concat(l)),c(null,t)),i,n,s)}}},{"pict-template":144}],216:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~E:","~}"),this.addPattern("{~Entity:","~}")}render(e,t,r,i,n){return this.log.error("Pict: Entity Render [".concat(e,"]: Render called in a non-asynchronous fashion. This should not happen.")),""}renderAsync(e,t,r,i,n,s){let o,a=e.trim(),c="object"==typeof t?t:{},l="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fEntityRender]::[".concat(a,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fEntityRender]::[".concat(a,"]"));let h,u="",p=a.split("^");if(p.length<2)return this.log.warn("Pict: Entity Render: Entity or entity ID not resolved for [".concat(a,"]")),l(null,"");if(o=p[0].trim(),u=p[1].trim(),h=p[2].trim(),isNaN(Number(u)))u=this.resolveStateFromAddress(String(u),c,i,null,n,s);else try{u=parseInt(String(u))}catch(e){this.log.warn("Pict: Entity Render: Could not parse entity ID."),u=0}if(!o||!u)return this.log.warn("Pict: Entity Render: Entity or entity ID not resolved for [".concat(a,"] Entity: ").concat(o," ID: ").concat(u)),l(null,"");this.pict.LogNoisiness>3&&this.log.trace("Pict: Entity Render: Entity [".concat(o,"] with ID [").concat(u,"] as template [").concat(h,"] from [").concat(a,"]")),this.pict.EntityProvider.getEntity(o,u,function(e,t){if(e)return this.log.error("Pict: Entity Render: Error getting entity [".concat(o,"] with ID [").concat(u,"] for [").concat(a,"]: ").concat(e),e),l(e,"");h?this.pict.parseTemplateByHash(h,t,l,i,n,s):l(null,"")}.bind(this))}}},{"pict-template":144}],217:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.addPattern("{~Pict","~}"),this.addPattern("{~P","~}"),this.addPattern("{~p","~}")}render(e,t,r,i,n){return this.pict.browserAddress}}},{"pict-template":144}],218:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~Solve:","~}"),this.addPattern("{~S:","~}")}render(e,t,r,i,n){const[s,o,a]=e.trim().split(":",3),c="object"==typeof t?t:{};if(this.pict.LogNoisiness>4?this.log.trace("PICT Solve [fTemplateRender]::[".concat(e,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT Solve [fTemplateRender]::[".concat(e,"]")),!s)return this.pict.LogNoisiness>2&&this.log.warn("Pict: Solve: Equation not found for [".concat(s,"]")),"";const l=o&&this.pict.resolveStateFromAddress(o,c,r,null,i,n)||c,h=a&&this.pict.resolveStateFromAddress(a,c,r,null,i,n)||this.pict.manifest;return this.fable.instantiateServiceProviderIfNotExists("ExpressionParser").solve(s,l,{},h,l)}}},{"pict-template":144}],219:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~SolveByReference:","~}"),this.addPattern("{~SBR:","~}")}render(e,t,r,i,n){const[s,o,a]=e.trim().split(":",3),c="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT SolveByReference [fTemplateRender]::[".concat(e,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT SolveByReference [fTemplateRender]::[".concat(e,"]"));const l=this.pict.resolveStateFromAddress(s,c,r,null,i,n);if(!l)return this.pict.LogNoisiness>2&&this.log.warn("Pict: SolveByReference: Equation not found for [".concat(s,"]")),"";const h=o&&this.pict.resolveStateFromAddress(o,c,r,null,i,n)||c,u=a&&this.pict.resolveStateFromAddress(a,c,r,null,i,n)||this.pict.manifest;return this.fable.instantiateServiceProviderIfNotExists("ExpressionParser").solve(l,h,{},u,h)}}},{"pict-template":144}],220:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~Template:","~}"),this.addPattern("{~T:","~}")}render(e,t,r,i,n){let s,o,a=e.trim(),c="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRender]::[".concat(a,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRender]::[".concat(a,"]"));let l=a.indexOf(":");return s=a.substring(0,l),l>-1?o=a.substring(l+1):s=a,s?o?this.pict.parseTemplateByHash(s,this.resolveStateFromAddress(o,c,r,null,i,n),null,r,i,n):this.pict.parseTemplateByHash(s,t,null,r,i,n):(this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(a,"]")),"")}renderAsync(e,t,r,i,n,s){let o,a,c=e.trim(),l="object"==typeof t?t:{},h="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(c,"]"));let u=c.indexOf(":");if(o=c.substring(0,u),u>-1?a=c.substring(u+1):o=c,!o)return this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(c,"]")),r(null,"");a?this.pict.parseTemplateByHash(o,this.resolveStateFromAddress(a,l,i,null,n,s),(e,t)=>e?h(e,""):h(null,t),i,n,s):this.pict.parseTemplateByHash(o,t,(e,t)=>e?h(e,""):h(null,t),i,n,s)}}},{"pict-template":144}],221:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateByDataAddress:","~}"),this.addPattern("{~TBDA:","~}")}render(e,t,r,i,n){let s,o,a=e.trim(),c="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT TemplateByDataAddress [fTemplateRender]::[".concat(a,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT TemplateByDataAddress [fTemplateRender]::[".concat(a,"]"));let l=a.indexOf(":");if(s=a.substring(0,l),l>-1?o=a.substring(l+1):s=a,!s)return this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(a,"]")),"";let h=this.pict.resolveStateFromAddress(s,t,r,null,i,n);return h||(this.pict.LogNoisiness>2&&this.log.warn("Pict: Template Render: Template not found for [".concat(s,"]")),h=""),o?this.pict.parseTemplate(h,this.resolveStateFromAddress(o,c,r,null,i,n),null,r,i,n):this.pict.parseTemplate(h,t,null,r,i,n)}renderAsync(e,t,r,i,n,s){let o,a,c=e.trim(),l="object"==typeof t?t:{},h="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT TemplateByDataAddress [fTemplateRenderAsync]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT TemplateByDataAddress [fTemplateRenderAsync]::[".concat(c,"]"));let u=c.indexOf(":");if(o=c.substring(0,u),u>-1?a=c.substring(u+1):o=c,!o)return this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(c,"]")),h(null,"");let p=this.pict.resolveStateFromAddress(o,t,i,null,n,s)||"";p||(this.pict.LogNoisiness>2&&this.log.warn("Pict: Template Render: Template not found for [".concat(o,"]")),p=""),a?this.pict.parseTemplate(p,this.resolveStateFromAddress(a,l,i,null,n,s),(e,t)=>e?h(e,""):h(null,t),i,n,s):this.pict.parseTemplate(p,t,(e,t)=>e?h(e,""):h(null,t),i,n,s)}}},{"pict-template":144}],222:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateByReference:","~}"),this.addPattern("{~TBR:","~}")}render(e,t,r,i,n){let s,o,a=e.trim(),c="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRender]::[".concat(a,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRender]::[".concat(a,"]"));let l=a.indexOf(":");if(s=a.substring(0,l),l>-1?o=a.substring(l+1):s=a,!s)return this.log.warn("Pict: Template Render: TemplateHashReferenceLocation not resolved for [".concat(a,"]")),"";let h=this.resolveStateFromAddress(s,t,r,null,i,n);return h?o?this.pict.parseTemplateByHash(h,this.resolveStateFromAddress(o,c,r,null,i,n),null,r,i,n):this.pict.parseTemplateByHash(h,t,null,r,i,n):(this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(a,"]")),"")}renderAsync(e,t,r,i,n,s){let o,a,c=e.trim(),l="object"==typeof t?t:{},h="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(c,"]"));let u=c.indexOf(":");if(o=c.substring(0,u),u>-1?a=c.substring(u+1):o=c,!o)return this.log.warn("Pict: Template Render Async: TemplateHashReferenceLocation not resolved for [".concat(c,"]")),r(null,"");let p=this.resolveStateFromAddress(o,t,i,null,n,s);if(!p)return this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(c,"]")),r(null,"");a?this.pict.parseTemplateByHash(p,this.resolveStateFromAddress(a,l,i,null,n,s),(e,t)=>e?h(e,""):h(null,t),i,n,s):this.pict.parseTemplateByHash(p,t,(e,t)=>e?h(e,""):h(null,t),i,n,s)}}},{"pict-template":144}],223:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateByType:","~}"),this.addPattern("{~TBT:","~}")}render(e,t,r,i,n){let s,o,a,c,l,h=e.trim(),u="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRender]::[".concat(h,"] with tmpData:"),u):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRender]::[".concat(h,"]"));let p=h.trim().split(":");if(p.length<3)return"";if(s=p[0],o=p[1].split(","),a=p[2],p.length>3&&(c=p[3]),p.length>4&&(l=p[4]),!a)return"";let d=t;c&&(d=this.resolveStateFromAddress(c,u,r,null,i,n));const f=this.resolveStateFromAddress(s,u,r,null,i,n);let g=typeof f;if("object"==g&&Array.isArray(f)&&(g="array"),-1===o.indexOf(g)){if(!l)return"";a=l}return this.pict.parseTemplateByHash(a,d,null,r,i,n)}renderAsync(e,t,r,i,n,s){let o,a,c,l,h,u=e.trim(),p="object"==typeof t?t:{},d="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(u,"] with tmpData:"),p):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(u,"]"));let f=u.trim().split(":");if(f.length<3)return r(null,"");if(o=f[0],a=f[1].split(","),c=f[2],f.length>3&&(l=f[3]),f.length>4&&(h=f[4]),!c)return r(null,"");let g=t;l&&(g=this.resolveStateFromAddress(l,p,i,null,n,s));const m=this.resolveStateFromAddress(o,p,i,null,n,s);let y=typeof m;if("object"==y&&Array.isArray(m)&&(y="array"),-1===a.indexOf(y)){if(!h)return r(null,"");c=h}this.pict.parseTemplateByHash(c,g,(e,t)=>e?d(e,""):d(null,t),i,n,s)}}},{"pict-template":144}],224:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateFromAddress:","~}"),this.addPattern("{~TFA:","~}")}render(e,t,r,i,n){let s,o,a=e.trim(),c="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRender]::[".concat(a,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRender]::[".concat(a,"]"));let l=a.indexOf(":");if(s=a.substring(0,l),l>-1?o=a.substring(l+1):s=a,!s)return this.log.warn("Pict: Template Render: TemplateHashReferenceLocation not resolved for [".concat(a,"]")),"";let h=this.resolveStateFromAddress(s,t,r,null,i,n);return h?o?this.pict.parseTemplate(h,this.resolveStateFromAddress(o,c,r,null,i,n),null,r,i,n):this.pict.parseTemplate(h,t,null,r,i,n):(this.log.warn("Pict: Template Render: Template not resolved for [".concat(a,"]")),"")}renderAsync(e,t,r,i,n,s){let o,a,c=e.trim(),l="object"==typeof t?t:{},h="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(c,"]"));let u=c.indexOf(":");if(o=c.substring(0,u),u>-1?a=c.substring(u+1):o=c,!o)return this.log.warn("Pict: Template Render Async: TemplateHashReferenceLocation not resolved for [".concat(c,"]")),r(null,"");let p=this.resolveStateFromAddress(o,t,i,null,n,s);if(!p)return this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(c,"]")),r(null,"");a?this.pict.parseTemplate(p,this.resolveStateFromAddress(a,l,i,null,n,s),(e,t)=>e?h(e,""):h(null,t),i,n,s):this.pict.parseTemplate(p,t,(e,t)=>e?h(e,""):h(null,t),i,n,s)}}},{"pict-template":144}],225:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TFM:","~}"),this.addPattern("{~TemplateFromMap:","~}")}render(e,t,r,i,n){let s,o,a,c=e.trim(),l="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT TemplateFromMap [fTemplateFromMapRender]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT TemplateFromMap [fTemplateFromMapRender]::[".concat(c,"]"));let h=c.split(":");if(h.length<3)return this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(c,"] failed because there were not three stanzas in the expression [").concat(e,"]")),"";if(s=h[0],o=h[1],a=h[2],!s)return this.log.warn("Pict: TemplateFromMap Render: TemplateFromMapHash not resolved for [".concat(c,"]")),"";let u=this.resolveStateFromAddress(o,l,r,null,i,n),p=this.resolveStateFromAddress(a,l,r,null,i,n);return u?(l=u[p],l?this.pict.parseTemplateByHash(s,l,null,r,i,n):this.pict.parseTemplateByHash(s,t,null,r,i,n)):(this.log.warn("Pict: TemplateFromMap Render: Map not resolved for [".concat(c,"]")),"")}renderAsync(e,t,r,i,n,s){let o,a,c,l=e.trim(),h="object"==typeof t?t:{},u="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(l,"] with tmpData:"),h):this.pict.LogNoisiness>0&&this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(l,"]"));let p=l.split(":");if(p.length<3)return this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(l,"] failed because there were not three stanzas in the expression [").concat(e,"]")),r(null,"");if(o=p[0],a=p[1],c=p[2],!o)return this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(l,"]")),r(null,"");let d=this.resolveStateFromAddress(a,h,i,null,n,s),f=this.resolveStateFromAddress(c,h,i,null,n,s);if(!d)return this.log.warn("Pict: TemplateFromMap Render: Map not resolved for [".concat(l,"]")),r(null,"");h=d[f],h?this.pict.parseTemplateByHash(o,h,(e,t)=>e?u(e,""):u(null,t),i,n,s):this.pict.parseTemplateByHash(o,t,(e,t)=>e?u(e,""):u(null,t),i,n,s)}}},{"pict-template":144}],226:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateSet:","~}"),this.addPattern("{~TS:","~}")}render(e,t,r,i,n){let s,o,a=e.trim(),c="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateSetRender]::[".concat(a,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateSetRender]::[".concat(a,"]"));let l=a.indexOf(":");return s=a.substring(0,l),l>-1?o=a.substring(l+1):s=a,s?o?this.pict.parseTemplateSetByHash(s,this.resolveStateFromAddress(o,c,r,null,i,n),null,r,i,n):this.pict.parseTemplateSetByHash(s,t,null,r,i,n):(this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(a,"]")),"")}renderAsync(e,t,r,i,n,s){let o,a,c=e.trim(),l="object"==typeof t?t:{},h="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateSetRenderAsync]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateSetRenderAsync]::[".concat(c,"]"));let u=c.split(":");return u.length<2?(this.log.trace("PICT TemplateFromMap [fTemplateRenderAsync]::[".concat(c,"] failed because there were not three stanzas in the expression [").concat(e,"]")),r(null,"")):(o=u[0],a=u[1],o?(l=this.resolveStateFromAddress(a,l,i,null,n,s),void(l?this.pict.parseTemplateSetByHash(o,l,(e,t)=>e?h(e,""):h(null,t),i,n,s):this.pict.parseTemplateSetByHash(o,t,(e,t)=>e?h(e,""):h(null,t),i,n,s))):(this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(c,"]")),r(null,"")))}}},{"pict-template":144}],227:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TSFM:","~}"),this.addPattern("{~TemplateSetFromMap:","~}")}render(e,t,r,i,n){let s,o,a,c=e.trim(),l="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRender]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRender]::[".concat(c,"]"));let h=c.split(":");if(h.length<3)return this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(c,"] failed because there were not three stanzas in the expression [").concat(e,"]")),"";if(s=h[0],o=h[1],a=h[2],!s)return this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(c,"]")),"";let u=this.resolveStateFromAddress(o,l,r,null,i,n),p=this.resolveStateFromAddress(a,l,r,null,i,n);return u?(l=u[p],l?this.pict.parseTemplateSetByHash(s,l,null,r,i,n):this.pict.parseTemplateSetByHash(s,t,null,r,i,n)):(this.log.warn("Pict: TemplateFromMap Render: Map not resolved for [".concat(c,"]")),"")}renderAsync(e,t,r,i,n,s){let o,a,c,l=e.trim(),h="object"==typeof t?t:{},u="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRenderAsync]::[".concat(l,"] with tmpData:"),h):this.pict.LogNoisiness>0&&this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRenderAsync]::[".concat(l,"]"));let p=l.split(":");if(p.length<3)return this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(l,"] failed because there were not three stanzas in the expression [").concat(e,"]")),r(null,"");if(o=p[0],a=p[1],c=p[2],!o)return this.log.warn("Pict: TemplateFromMapSet Render Async: TemplateFromMapHash not resolved for [".concat(l,"]")),r(null,"");let d=this.resolveStateFromAddress(a,h,i,null,n,s),f=this.resolveStateFromAddress(c,h,i,null,n,s);if(!d)return this.log.warn("Pict: TemplateFromMapSet Render: Map not resolved for [".concat(l,"]")),r(null,"");h=d[f],h?this.pict.parseTemplateSetByHash(o,h,(e,t)=>e?u(e,""):u(null,t),i,n,s):this.pict.parseTemplateSetByHash(o,t,(e,t)=>e?u(e,""):u(null,t),i,n,s)}}},{"pict-template":144}],228:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateSetWithPayload:","~}"),this.addPattern("{~TSWP:","~}")}render(e,t,r,i,n){let s,o,a,c=e.trim();this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(c,"] with record:"),t):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(c,"]"));let l=c.trim().split(":");if(l.length<3)return this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(c,"] failed because there were not three stanzas in the expression [").concat(e,"]")),"";s=l[0],o=l[1],a=l[2];let h=this.resolveStateFromAddress(o,t,r,null,i,n);h||(h=t),h||(h={});let u=this.resolveStateFromAddress(a,t,r,null,i,n);return u||(u=t),u||(u={}),this.pict.parseTemplateSetWithPayloadByHash(s,h,u,null,r,i,n)}renderAsync(e,t,r,i,n,s){let o,a,c,l=e.trim(),h="function"==typeof r?r:()=>"";(this.pict.LogNoisiness>4||this.pict.LogNoisiness>0)&&this.log.trace("PICT Template [fTemplateSetWithPayloadRenderAsync]::[".concat(l,"]"));let u=l.trim().split(":");if(u.length<3)return this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(l,"] failed because there were not three stanzas in the expression [").concat(e,"]")),r(null,"");o=u[0],a=u[1],c=u[2];let p=this.resolveStateFromAddress(a,t,i,null,n,s);p||(p=t),p||(p={});let d=this.resolveStateFromAddress(c,t,i,null,n,s);d||(d=t),d||(d={}),this.pict.parseTemplateSetWithPayloadByHash(o,p,d,(e,t)=>e?h(e,""):h(null,t),i,n,s)}}},{"pict-template":144}],229:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateValueSet:","~}"),this.addPattern("{~TVS:","~}")}render(e,t,r,i,n){let s,o,a=e.trim(),c="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateValueSetRender]::[".concat(a,"] with tmpData:"),c):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateValueSetRender]::[".concat(a,"]"));let l=a.indexOf(":");if(s=a.substring(0,l),l>-1?o=a.substring(l+1):s=a,!s)return this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(a,"]")),"";c=this.resolveStateFromAddress(o,c,r,null,i,n);let h=[];if(Array.isArray(c))for(let e=0;e<c.length;e++)h.push({Value:c[e],Key:e});else if("object"==typeof c){let e=Object.keys(c);for(let t=0;t<e.length;t++)h.push({Value:c[e[t]],Key:e[t]})}else h.push({Value:c});return c=h,c?this.pict.parseTemplateSetByHash(s,c,null,r,i,n):this.pict.parseTemplateSetByHash(s,t,null,r,i,n)}renderAsync(e,t,r,i,n,s){let o,a,c=e.trim(),l="object"==typeof t?t:{},h="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateValueSetRenderAsync]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateValueSetRenderAsync]::[".concat(c,"]"));let u=c.split(":");if(u.length<2)return this.log.trace("PICT TemplateFromMap [fTemplateRenderAsync]::[".concat(c,"] failed because there were not three stanzas in the expression [").concat(e,"]")),r(null,"");if(o=u[0],a=u[1],!o)return this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(c,"]")),r(null,"");l=this.resolveStateFromAddress(a,l,i,null,n,s);let p=[];if(Array.isArray(l))for(let e=0;e<l.length;e++)p.push({Value:l[e],Key:e});else if("object"==typeof l){let e=Object.keys(l);for(let t=0;t<e.length;t++)p.push({Value:l[e[t]],Key:l[e[t]]})}else p.push({Value:l});l=p,l?this.pict.parseTemplateSetByHash(o,l,(e,t)=>e?h(e,""):h(null,t),i,n,s):this.pict.parseTemplateSetByHash(o,t,(e,t)=>e?h(e,""):h(null,t),i,n,s)}}},{"pict-template":144}],230:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~V:","~}"),this.addPattern("{~View:","~}"),"__TemplateOutputCache"in this.pict||(this.pict.__TemplateOutputCache={})}render(e,t,r,i,n){const s=e.trim();if(!(s in this.pict.views))return this.log.warn("Pict: View Template Render: View not found for [".concat(s,"]")),"";let o=this.pict.getUUID();return this.pict.views[s].render("__Virtual","__TemplateOutputCache.".concat(o),t,n?n.RootRenderable:void 0),this.pict.__TemplateOutputCache[o]}renderAsync(e,t,r,i,n,s){const o=e.trim();if(!(o in this.pict.views))return this.log.warn("Pict: View Template Render: View not found for [".concat(o,"]")),r(null,"");let a=this.pict.getUUID();return this.pict.views[o].renderAsync("__Virtual","__TemplateOutputCache.".concat(a),t,s?s.RootRenderable:void 0,(e,t)=>{if(e)return this.log.warn("Pict: View Template Render: Error rendering view [".concat(o,"]"),e),r(e,"");let i=this.pict.__TemplateOutputCache[a];return r(null,i)})}}},{"pict-template":144}],231:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~RandomNumber:","~}"),this.addPattern("{~RN:","~}")}render(e,t,r,i,n){let s=e.trim();this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fRandomNumber]::[".concat(s,"]"));let o=0,a=9999999;if(s.length>0){let e=s.split(",");if(e.length>0)try{o=parseInt(e[0])}catch(e){o=0}if(e.length>1)try{a=parseInt(e[1])}catch(e){a=9999999}}return this.fable.DataGeneration.randomIntegerBetween(o,a)}}},{"pict-template":144}],232:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~RandomNumberString:","~}"),this.addPattern("{~RNS:","~}")}render(e,t,r,i,n){let s=e.trim();this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fRandomNumberString]::[".concat(s,"]"));let o=4,a=9999;if(s.length>0){let e=s.split(",");if(e.length>0)try{o=parseInt(e[0])}catch(e){o=4}if(e.length>1)try{a=parseInt(e[1])}catch(e){a=9999}}return this.fable.DataGeneration.randomNumericString(o,a)}}},{"pict-template":144}],233:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~DataEncodeJavascriptString:","~}"),this.addPattern("{~DEJS:","~}")}render(e,t,r,i,n){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDataJson]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDataJson]::[".concat(s,"]"));let a=this.resolveStateFromAddress(s,o,r,null,i,n);return this.pict.DataFormat.stringEncodeForJavascript(a)}}},{"pict-template":144}],234:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~DataJson:","~}"),this.addPattern("{~DJ:","~}")}render(e,t,r,i,n){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDataJson]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDataJson]::[".concat(s,"]"));let a=this.resolveStateFromAddress(s,o,r,null,i,n);return a||(a=t),JSON.stringify(a)}}},{"pict-template":144}],235:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~DateOnlyFormat:","~}")}render(e,t,r,i,n){let s=e.trim(),o="object"==typeof t?t:{},a=s.split("^");if(a.length<2)return this.log.error("PICT Template [fDateOnlyFormat]::[".concat(s,"] did not have a valid format string and date.")),"";let c=this.resolveStateFromAddress(a[0],o,r,null,i,n);return this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDateOnlyFormat]::[".concat(s,"] with data:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDateOnlyFormat]::[".concat(s,"]")),this.fable.Dates.dayJS.utc(c).format(a[1])}}},{"pict-template":144}],236:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~DateOnlyYMD:","~}")}render(e,t,r,i,n){let s=e.trim(),o="object"==typeof t?t:{},a=this.resolveStateFromAddress(s,o,r,null,i,n);this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDateTimeYMD]::[".concat(s,"] with data:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDateTimeYMD]::[".concat(s,"]"));return""+this.fable.Dates.dayJS.utc(a).format("YYYY-MM-DD")}}},{"pict-template":144}],237:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~DateTimeFormat:","~}"),this.addPattern("{~DateFormat:","~}")}render(e,t,r,i,n){let s=e.trim(),o="object"==typeof t?t:{},a=s.split("^");if(a.length<2)return this.log.error("PICT Template [fDateTimeFormat]::[".concat(s,"] did not have a valid format string and date.")),"";let c=this.resolveStateFromAddress(a[0],o,r,null,i,n);this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDateTimeFormat]::[".concat(s,"] with data:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDateTimeFormat]::[".concat(s,"]"));let l=this.fable.Dates.dayJS.utc(c);try{if(this.pict.options.Timezone)l=l.tz(this.pict.options.Timezone);else try{l=l.tz(this.fable.Dates.dayJS.tz.guess())}catch(e){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(e.message||e,")"))}}catch(e){try{l=l.tz(this.fable.Dates.dayJS.tz.guess())}catch(e){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(e.message||e,")"))}}return l.format(a[1])}}},{"pict-template":144}],238:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~DateTimeYMD:","~}"),this.addPattern("{~DateYMD:","~}")}render(e,t,r,i,n){let s=e.trim(),o="object"==typeof t?t:{},a=this.resolveStateFromAddress(s,o,r,null,i,n);this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDateTimeYMD]::[".concat(s,"] with data:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDateTimeYMD]::[".concat(s,"]"));let c=this.fable.Dates.dayJS.utc(a);try{if(this.pict.options.Timezone)c=c.tz(this.pict.options.Timezone);else try{c=c.tz(this.fable.Dates.dayJS.tz.guess())}catch(e){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(e.message||e,")"))}}catch(e){try{c=c.tz(this.fable.Dates.dayJS.tz.guess())}catch(e){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(e.message||e,")"))}}return c.format("YYYY-MM-DD")}}},{"pict-template":144}],239:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~Digits:","~}")}render(e,t,r,i,n){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDigits]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDigits]::[".concat(s,"]"));let a=this.resolveStateFromAddress(s,o,r,null,i,n);return this.fable.DataFormat.formatterAddCommasToNumber(this.fable.DataFormat.formatterRoundNumber(a,2))}}},{"pict-template":144}],240:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~Dollars:","~}")}render(e,t,r,i,n){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDollars]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDollars]::[".concat(s,"]"));let a=this.resolveStateFromAddress(s,o,r,null,i,n);return this.fable.DataFormat.formatterDollars(a)}}},{"pict-template":144}],241:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~HtmlCommentEnd:","~}"),this.addPattern("{~HCE:","~}")}render(e,t,r,i,n){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDataRender]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDataRender]::[".concat(s,"]"));let a=!1;const[c,l]=s.split(":");null!=c&&(a=this.resolveStateFromAddress(c,o,r,null,i,n));const h=null!=l&&("1"===l||"true"===l.toLowerCase()||"t"===l.toLowerCase());return Boolean(a)==h?" --\x3e":""}}},{"pict-template":144}],242:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~HtmlCommentStart:","~}"),this.addPattern("{~HCS:","~}")}render(e,t,r,i,n){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fDataRender]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fDataRender]::[".concat(s,"]"));let a=!1;const[c,l]=s.split(":");null!=c&&(a=this.resolveStateFromAddress(c,o,r,null,i,n));const h=null!=l&&("1"===l||"true"===l.toLowerCase()||"t"===l.toLowerCase());return Boolean(a)==h?"\x3c!-- ":""}}},{"pict-template":144}],243:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~Join:","~}"),this.addPattern("{~J:","~}")}render(e,t,r,i,n){let s=e,o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Join [fDataRender]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Join [fDataRender]::[".concat(s,"]"));let a=s.split("^");if(a.length<2)return"";let c=a.shift(),l=[];for(let e=0;e<a.length;e++){let t=this.resolveStateFromAddress(a[e],o,r,null,i,n);if(t&&Array.isArray(t))for(let e=0;e<t.length;e++)l.push(t[e]);else t&&l.push(t)}return l.join(c)}}},{"pict-template":144}],244:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~JoinUnique:","~}"),this.addPattern("{~JU:","~}")}render(e,t,r,i,n){let s=e,o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Join Unique [fDataRender]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Join Unique [fDataRender]::[".concat(s,"]"));let a=s.split("^");if(a.length<2)return"";let c=a.shift(),l=[],h={};for(let e=0;e<a.length;e++){let t=this.resolveStateFromAddress(a[e],o,r,null,i,n);if(t&&Array.isArray(t))for(let e=0;e<t.length;e++)t[e]in h||(h[t[e]]=!0,l.push(t[e]));else t&&(t in h||(h[t]=!0,l.push(t)))}return l.join(c)}}},{"pict-template":144}],245:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~PascalCaseIdentifier:","~}")}render(e,t,r,i,n){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fPascalCaseIdentifier]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Template [fPascalCaseIdentifier]::[".concat(s,"]"));let a=this.resolveStateFromAddress(s,o,r,null,i,n);return null==a||"undefined"==a||void 0===a?"":this.pict.DataFormat.cleanNonAlphaCharacters(this.pict.DataFormat.capitalizeEachWord(a))}}},{"pict-template":144}],246:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.options,this.log,this.addPattern("{~PluckJoinUnique:","~}"),this.addPattern("{~PJU:","~}")}render(e,t,r,i,n){let s=e,o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Pluck Join Unique [fDataRender]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>3&&this.log.trace("PICT Pluck Join Unique [fDataRender]::[".concat(s,"]"));let a=s.split("^");if(a.length<3)return"";let c=a.shift(),l=a.shift(),h=[],u={};for(let e=0;e<a.length;e++){let t=this.resolveStateFromAddress(a[e],o,r,null,i,n);if(t&&Array.isArray(t))for(let e=0;e<t.length;e++){if(null===t[e]||"object"!=typeof t)continue;let r=this.pict.manifest.getValueByHash(t[e],l);r in u||(u[r]=!0,h.push(r))}else t&&(t in u||(u[t]=!0,h.push(t)))}return h.join(c)}}},{"pict-template":144}],247:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~Breakpoint","~}")}render(e,t,r,i,n){let s=e.trim(),o=new Error("PICT Template Breakpoint: ".concat(s));return this.log.trace("PICT Template Breakpoint: ".concat(s),o.stack),""}}},{"pict-template":144}],248:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~DataTree:","~}"),this.addPattern("{~DT:","~}")}render(e,t,r,i,n){let s="object"==typeof t?t:{};if(s.TemplateHash=e.trim(),s.ValueTreeParameters=s.TemplateHash.split("^"),s.ValueTreeParameters.length<1)return"";s.ResolvedValue=this.resolveStateFromAddress(s.ValueTreeParameters[0],s,r,null,i,n),s.ResolvedValueType=typeof s.ResolvedValue;try{s.TreeMaxDepth=s.ValueTreeParameters.length<2?1:parseInt(s.ValueTreeParameters[1])}catch(e){s.TreeMaxDepth=1}let o=this.pict.TemplateProvider.getTemplate("PICT-Object-Wrap");return o||(o='<div class="PICT PICTObjectSet">{~D:Record.ObjectValueTree~}</div>'),"object"==s.ResolvedValueType?s.ObjectValueTree=this.dataValueTreeObjectSet(s.ResolvedValue,s.ResolvedValue,0,s.TreeMaxDepth,r,i):(this.log.trace("PICT Template Log Value Tree: [".concat(s.TemplateHash,"] resolved data is not an object."),s.ResolvedValue),s.ObjectValueTree=s.ResolveValue),this.pict.parseTemplate(o,s,null,r,i,n)}dataValueTreeObjectSet(e,t,r,i,n,s,o){let a="";if("object"!=typeof e)return a;let c=Object.keys(e),l=this.pict.TemplateProvider.getTemplate("PICT-Object-Branch");l||(l='\n<div class="PICTObjectBranchDepth_{~D:Record.CurrentDepth~}"><div class="PICTObjectBranch">{~D:Record.BranchKey~}</div><div class="PICTObjectBranchValue">{~D:Record.BranchValue~}</div></div>\n');for(let h=0;h<c.length;h++){let u=typeof e[c[h]],p="";if("object"===u)p=r+1>i?"...":this.dataValueTreeObjectSet(e[c[h]],t,r+1,i,n,s);else p=e[c[h]];let d={AppData:this.pict.AppData,Bundle:this.pict.Bundle,RootContainer:t,Container:e,BranchEntryCount:c.length,BranchIndex:h,BranchKey:c[h],BranchValue:p,BranchDataType:u,CurrentDepth:r,MaxDepth:i};a+=this.pict.parseTemplate(l,d,null,n,s,o)}return a}}},{"pict-template":144}],249:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~LogStatement:","~}"),this.addPattern("{~LS:","~}")}render(e,t,r,i,n){let s=e.trim();return this.log.trace("PICT Template Log Message: ".concat(s)),""}}},{"pict-template":144}],250:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~LogValue:","~}"),this.addPattern("{~LV:","~}")}render(e,t,r,i,n){let s=e.trim(),o="object"==typeof t?t:{},a=this.resolveStateFromAddress(s,o,r,null,i,n),c=typeof a;return null==a||"undefined"==c?this.log.trace("PICT Template Log Value: [".concat(s,"] is ").concat(c,".")):"object"==c?this.log.trace("PICT Template Log Value: [".concat(s,"] is an object."),a):this.log.trace("PICT Template Log Value: [".concat(s,"] is a ").concat(c," = [").concat(a,"]")),""}}},{"pict-template":144}],251:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),_defineProperty2(this,"logValueTreeObjectSet",(e,t,r,i,n)=>{if("object"!=typeof e)return"";let s=Object.keys(e);for(let o=0;o<s.length;o++){let a=typeof e[s[o]],c="";if("object"===a)c="...";else c=e[s[o]];if(this.log.trace("[".concat(t,".").concat(s[o],"] (").concat(a,"): ").concat(c)),i+1>n)return"";"object"==a&&(c=this.logValueTreeObjectSet(e[s[o]],"".concat(t,".").concat(s[o]),r,i+1,n))}return""}),this.log,this.addPattern("{~LogValueTree:","~}"),this.addPattern("{~LVT:","~}")}render(e,t,r,i,n){let s="object"==typeof t?t:{};if(s.TemplateHash=e.trim(),s.ValueTreeParameters=s.TemplateHash.split("^"),s.ValueTreeParameters.length<1)return"";s.ResolvedValue=this.resolveStateFromAddress(s.ValueTreeParameters[0],s,r,null,i,n),s.ResolvedValueType=typeof s.ResolvedValue;try{s.TreeMaxDepth=s.ValueTreeParameters.length<2?1:parseInt(s.ValueTreeParameters[1])}catch(e){s.TreeMaxDepth=1}return"object"==s.ResolvedValueType?this.logValueTreeObjectSet(s.ResolvedValue,s.ValueTreeParameters[0],s.ResolvedValue,0,s.TreeMaxDepth):this.log.trace("PICT Template Log Value Tree: [".concat(s.TemplateHash,"] resolved data is not an object."),s.ResolvedValue),""}}},{"pict-template":144}],252:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~NotEmpty:","~}"),this.addPattern("{~NE:","~}")}render(e,t,r,i,n){let s=e.trim(),o="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fNotEmptyRender]::[".concat(s,"] with tmpData:"),o):this.pict.LogNoisiness>2&&this.log.trace("PICT Template [fNotEmptyRender]::[".concat(s,"]"));let a=s.split("^");return this.resolveStateFromAddress(a[0],o,r,null,i,n)?a[1]:""}}},{"pict-template":144}],253:[function(e,t,r){const i=e("pict-template");t.exports=class extends i{constructor(e,t,r){super(e,t,r)}compareValues(e,t,r){switch(t){case"TRUE":return!0===e;case"FALSE":return!1===e;case"LNGT":case"LENGTH_GREATER_THAN":switch(typeof e){case"string":case"object":return e.length>r;default:return!1}case"LNLT":case"LENGTH_LESS_THAN":switch(typeof e){case"string":case"object":return e.length<r;default:return!1}case"!==":return e!==r;case"!=":return e!=r;case"<":return e<r;case">":return e>r;case"<=":return e<=r;case">=":return e>=r;case"===":return e===r;case"==":return e==r;default:return!1}}}},{"pict-template":144}],254:[function(e,t,r){const i=e("./Pict-Template-TemplateIf-Base.js");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateIf:","~}"),this.addPattern("{~TIf:","~}")}render(e,t,r,i,n){let s,o,a,c=e.trim(),l="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(c,"]"));let h=c.split(":");if(h.length<3)return this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(c,"]")),"";if(s=h[0],o=h[1],a=h[2],!s)return this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(c,"]")),"";if(!a)return this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(c,"]")),"";let u=a.split("^");if(u.length<3)return this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(c,"]")),"";try{return this.compareValues(this.resolveStateFromAddress(u[0],l,r,null,i,n),u[1],this.resolveStateFromAddress(u[2],l,r,null,i,n))?o?this.pict.parseTemplateByHash(s,this.resolveStateFromAddress(o,l,r,null,i,n),null,r,i,n):this.pict.parseTemplateByHash(s,t,null,r,i,n):""}catch(e){return this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(c,"]: ").concat(e),e),""}}renderAsync(e,t,r,i,n,s){let o,a,c,l=e.trim(),h="object"==typeof t?t:{},u="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(l,"] with tmpData:"),h):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(l,"]"));let p=l.split(":");if(p.length<3)return this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(l,"]")),u(null,"");if(o=p[0],a=p[1],c=p[2],!o)return this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(l,"]")),u(null,"");if(!c)return this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(l,"]")),u(null,"");let d=c.split("^");if(d.length<3)return this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(l,"]")),u(null,"");try{if(!this.compareValues(this.resolveStateFromAddress(d[0],h,i,null,n,s),d[1],this.resolveStateFromAddress(d[2],h,i,null,n,s)))return u(null,"");a?this.pict.parseTemplateByHash(o,this.resolveStateFromAddress(a,h,i,null,n,s),(e,t)=>e?u(e,""):u(null,t),i,n,s):this.pict.parseTemplateByHash(o,t,(e,t)=>e?u(e,""):u(null,t),i,n,s)}catch(e){return this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(l,"]: ").concat(e),e),u(e,"")}}}},{"./Pict-Template-TemplateIf-Base.js":253}],255:[function(e,t,r){const i=e("./Pict-Template-TemplateIf-Base.js");t.exports=class extends i{constructor(e,t,r){super(e,t,r),this.log,this.addPattern("{~TemplateIfAbsolute:","~}"),this.addPattern("{~TIfAbs:","~}")}render(e,t,r,i,n){let s,o,a,c=e.trim(),l="object"==typeof t?t:{};this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(c,"] with tmpData:"),l):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(c,"]"));let h=c.split(":");if(h.length<3)return this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(c,"]")),"";if(s=h[0],o=h[1],a=h[2],!s)return this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(c,"]")),"";if(!a)return this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(c,"]")),"";let u=a.split("^");if(u.length<3)return this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(c,"]")),"";try{return this.compareValues(this.resolveStateFromAddress(u[0],l,r,null,i,n),u[1],u[2])?o?this.pict.parseTemplateByHash(s,this.resolveStateFromAddress(o,l,r,null,i,n),null,r,i,n):this.pict.parseTemplateByHash(s,t,null,r,i,n):""}catch(e){return this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(c,"]: ").concat(e),e),""}}renderAsync(e,t,r,i,n,s){let o,a,c,l=e.trim(),h="object"==typeof t?t:{},u="function"==typeof r?r:()=>"";this.pict.LogNoisiness>4?this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(l,"] with tmpData:"),h):this.pict.LogNoisiness>0&&this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(l,"]"));let p=l.split(":");if(p.length<3)return this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(l,"]")),u(null,"");if(o=p[0],a=p[1],c=p[2],!o)return this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(l,"]")),u(null,"");if(!c)return this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(l,"]")),u(null,"");let d=c.split("^");if(d.length<3)return this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(l,"]")),u(null,"");try{if(!this.compareValues(this.resolveStateFromAddress(d[0],h,i,null,n,s),d[1],d[2]))return u(null,"");a?this.pict.parseTemplateByHash(o,this.resolveStateFromAddress(a,h,i,null,n,s),(e,t)=>e?u(e,""):u(null,t),i,n,s):this.pict.parseTemplateByHash(o,t,(e,t)=>e?u(e,""):u(null,t),i,n,s)}catch(e){return this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(l,"]: ").concat(e),e),u(e,"")}}}},{"./Pict-Template-TemplateIf-Base.js":253}]},{},[201])(201)});
12
+ //# sourceMappingURL=pict.min.js.map