pict 1.0.257 → 1.0.259

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 (116) hide show
  1. package/dist/pict.compatible.js +499 -105
  2. package/dist/pict.compatible.js.map +1 -1
  3. package/dist/pict.compatible.min.js +2 -2
  4. package/dist/pict.compatible.min.js.map +1 -1
  5. package/dist/pict.js +490 -96
  6. package/dist/pict.js.map +1 -1
  7. package/dist/pict.min.js +2 -2
  8. package/dist/pict.min.js.map +1 -1
  9. package/package.json +6 -4
  10. package/source/Pict-Meadow-EntityProvider.js +104 -0
  11. package/source/Pict.js +3 -0
  12. package/source/templates/Pict-Template-Data.js +9 -0
  13. package/source/templates/Pict-Template-DataValueByKey.js +9 -0
  14. package/source/templates/Pict-Template-Entity.js +16 -6
  15. package/source/templates/Pict-Template-Template.js +23 -4
  16. package/source/templates/Pict-Template-TemplateByReference.js +25 -6
  17. package/source/templates/Pict-Template-TemplateFromMap.js +22 -2
  18. package/source/templates/Pict-Template-TemplateSet.js +22 -3
  19. package/source/templates/Pict-Template-TemplateSetFromMap.js +21 -2
  20. package/source/templates/Pict-Template-TemplateSetWithPayload.js +20 -1
  21. package/source/templates/Pict-Template-TemplateValueSet.js +22 -3
  22. package/source/templates/Pict-Template-View.js +8 -1
  23. package/source/templates/data/Pict-Template-DataEncodeJavascriptString.js +50 -0
  24. package/source/templates/data/Pict-Template-DataJson.js +11 -2
  25. package/source/templates/data/Pict-Template-DateOnlyFormat.js +9 -0
  26. package/source/templates/data/Pict-Template-DateTimeFormat.js +9 -0
  27. package/source/templates/data/Pict-Template-Digits.js +9 -0
  28. package/source/templates/data/Pict-Template-Dollars.js +9 -0
  29. package/source/templates/data/Pict-Template-HtmlCommentEnd.js +11 -2
  30. package/source/templates/data/Pict-Template-HtmlCommentStart.js +11 -2
  31. package/source/templates/data/Pict-Template-Join.js +9 -0
  32. package/source/templates/data/Pict-Template-JoinUnique.js +9 -0
  33. package/source/templates/data/Pict-Template-PascalCaseIdentifier.js +9 -0
  34. package/source/templates/data/Pict-Template-PluckJoinUnique.js +9 -0
  35. package/source/templates/data-generation/Pict-Template-RandomNumber.js +9 -0
  36. package/source/templates/data-generation/Pict-Template-RandomNumberString.js +9 -0
  37. package/source/templates/debugging/Pict-Template-Breakpoint.js +9 -0
  38. package/source/templates/debugging/Pict-Template-DataValueTree.js +10 -0
  39. package/source/templates/debugging/Pict-Template-LogStatement.js +9 -0
  40. package/source/templates/debugging/Pict-Template-LogValue.js +9 -0
  41. package/source/templates/debugging/Pict-Template-LogValueTree.js +9 -0
  42. package/source/templates/logic/Pict-Template-NotEmpty.js +11 -4
  43. package/source/templates/logic/Pict-Template-TemplateIf.js +54 -41
  44. package/source/templates/logic/Pict-Template-TemplateIfAbsolute.js +54 -41
  45. package/test/Pict_entityprovider_tests.js +89 -0
  46. package/test/Pict_template_tests.js +10 -0
  47. package/types/source/Pict-Meadow-EntityProvider.d.ts +1 -0
  48. package/types/source/Pict-Meadow-EntityProvider.d.ts.map +1 -1
  49. package/types/source/Pict.d.ts +2 -56
  50. package/types/source/Pict.d.ts.map +1 -1
  51. package/types/source/templates/Pict-Template-Data.d.ts +0 -1
  52. package/types/source/templates/Pict-Template-Data.d.ts.map +1 -1
  53. package/types/source/templates/Pict-Template-DataValueByKey.d.ts +0 -1
  54. package/types/source/templates/Pict-Template-DataValueByKey.d.ts.map +1 -1
  55. package/types/source/templates/Pict-Template-Entity.d.ts +0 -1
  56. package/types/source/templates/Pict-Template-Entity.d.ts.map +1 -1
  57. package/types/source/templates/Pict-Template-Template.d.ts +0 -2
  58. package/types/source/templates/Pict-Template-Template.d.ts.map +1 -1
  59. package/types/source/templates/Pict-Template-TemplateByReference.d.ts +0 -2
  60. package/types/source/templates/Pict-Template-TemplateByReference.d.ts.map +1 -1
  61. package/types/source/templates/Pict-Template-TemplateFromMap.d.ts +0 -2
  62. package/types/source/templates/Pict-Template-TemplateFromMap.d.ts.map +1 -1
  63. package/types/source/templates/Pict-Template-TemplateSet.d.ts +0 -2
  64. package/types/source/templates/Pict-Template-TemplateSet.d.ts.map +1 -1
  65. package/types/source/templates/Pict-Template-TemplateSetFromMap.d.ts +0 -2
  66. package/types/source/templates/Pict-Template-TemplateSetFromMap.d.ts.map +1 -1
  67. package/types/source/templates/Pict-Template-TemplateSetWithPayload.d.ts +0 -2
  68. package/types/source/templates/Pict-Template-TemplateSetWithPayload.d.ts.map +1 -1
  69. package/types/source/templates/Pict-Template-TemplateValueSet.d.ts +0 -2
  70. package/types/source/templates/Pict-Template-TemplateValueSet.d.ts.map +1 -1
  71. package/types/source/templates/Pict-Template-View.d.ts +0 -1
  72. package/types/source/templates/Pict-Template-View.d.ts.map +1 -1
  73. package/types/source/templates/data/Pict-Template-DataEncodeJavascriptString.d.ts +13 -0
  74. package/types/source/templates/data/Pict-Template-DataEncodeJavascriptString.d.ts.map +1 -0
  75. package/types/source/templates/data/Pict-Template-DataJson.d.ts +2 -3
  76. package/types/source/templates/data/Pict-Template-DataJson.d.ts.map +1 -1
  77. package/types/source/templates/data/Pict-Template-DateOnlyFormat.d.ts +0 -1
  78. package/types/source/templates/data/Pict-Template-DateOnlyFormat.d.ts.map +1 -1
  79. package/types/source/templates/data/Pict-Template-DateTimeFormat.d.ts +0 -1
  80. package/types/source/templates/data/Pict-Template-DateTimeFormat.d.ts.map +1 -1
  81. package/types/source/templates/data/Pict-Template-Digits.d.ts +0 -1
  82. package/types/source/templates/data/Pict-Template-Digits.d.ts.map +1 -1
  83. package/types/source/templates/data/Pict-Template-Dollars.d.ts +0 -1
  84. package/types/source/templates/data/Pict-Template-Dollars.d.ts.map +1 -1
  85. package/types/source/templates/data/Pict-Template-HtmlCommentEnd.d.ts +2 -3
  86. package/types/source/templates/data/Pict-Template-HtmlCommentEnd.d.ts.map +1 -1
  87. package/types/source/templates/data/Pict-Template-HtmlCommentStart.d.ts +2 -3
  88. package/types/source/templates/data/Pict-Template-HtmlCommentStart.d.ts.map +1 -1
  89. package/types/source/templates/data/Pict-Template-Join.d.ts +0 -1
  90. package/types/source/templates/data/Pict-Template-Join.d.ts.map +1 -1
  91. package/types/source/templates/data/Pict-Template-JoinUnique.d.ts +0 -1
  92. package/types/source/templates/data/Pict-Template-JoinUnique.d.ts.map +1 -1
  93. package/types/source/templates/data/Pict-Template-PascalCaseIdentifier.d.ts +0 -1
  94. package/types/source/templates/data/Pict-Template-PascalCaseIdentifier.d.ts.map +1 -1
  95. package/types/source/templates/data/Pict-Template-PluckJoinUnique.d.ts +0 -1
  96. package/types/source/templates/data/Pict-Template-PluckJoinUnique.d.ts.map +1 -1
  97. package/types/source/templates/data-generation/Pict-Template-RandomNumber.d.ts +0 -1
  98. package/types/source/templates/data-generation/Pict-Template-RandomNumber.d.ts.map +1 -1
  99. package/types/source/templates/data-generation/Pict-Template-RandomNumberString.d.ts +0 -1
  100. package/types/source/templates/data-generation/Pict-Template-RandomNumberString.d.ts.map +1 -1
  101. package/types/source/templates/debugging/Pict-Template-Breakpoint.d.ts +0 -1
  102. package/types/source/templates/debugging/Pict-Template-Breakpoint.d.ts.map +1 -1
  103. package/types/source/templates/debugging/Pict-Template-DataValueTree.d.ts +0 -1
  104. package/types/source/templates/debugging/Pict-Template-DataValueTree.d.ts.map +1 -1
  105. package/types/source/templates/debugging/Pict-Template-LogStatement.d.ts +0 -1
  106. package/types/source/templates/debugging/Pict-Template-LogStatement.d.ts.map +1 -1
  107. package/types/source/templates/debugging/Pict-Template-LogValue.d.ts +0 -1
  108. package/types/source/templates/debugging/Pict-Template-LogValue.d.ts.map +1 -1
  109. package/types/source/templates/debugging/Pict-Template-LogValueTree.d.ts +0 -1
  110. package/types/source/templates/debugging/Pict-Template-LogValueTree.d.ts.map +1 -1
  111. package/types/source/templates/logic/Pict-Template-NotEmpty.d.ts +0 -1
  112. package/types/source/templates/logic/Pict-Template-NotEmpty.d.ts.map +1 -1
  113. package/types/source/templates/logic/Pict-Template-TemplateIf.d.ts +0 -2
  114. package/types/source/templates/logic/Pict-Template-TemplateIf.d.ts.map +1 -1
  115. package/types/source/templates/logic/Pict-Template-TemplateIfAbsolute.d.ts +0 -2
  116. package/types/source/templates/logic/Pict-Template-TemplateIfAbsolute.d.ts.map +1 -1
@@ -752,7 +752,7 @@ return[this._HexLookup[pBuffer[i++]],this._HexLookup[pBuffer[i++]],this._HexLook
752
752
  tmpRandomBytes[6]=tmpRandomBytes[6]&0x0f|0x40;tmpRandomBytes[8]=tmpRandomBytes[8]&0x3f|0x80;return this.bytesToUUID(tmpRandomBytes);}// Simple random UUID generation
753
753
  },{key:"generateRandom",value:function generateRandom(){var tmpUUID='';for(var i=0;i<this._UUIDLength;i++){tmpUUID+=this._UUIDRandomDictionary.charAt(Math.floor(Math.random()*(this._UUIDRandomDictionary.length-1)));}return tmpUUID;}// Adapted from node-uuid (https://github.com/kelektiv/node-uuid)
754
754
  },{key:"getUUID",value:function getUUID(){if(this._UUIDModeRandom){return this.generateRandom();}else{return this.generateUUIDv4();}}}]);}(libFableServiceProviderBase);// This is for backwards compatibility
755
- function autoConstruct(pSettings){return new FableUUID(pSettings);}module.exports=FableUUID;module.exports.new=autoConstruct;},{"../package.json":64,"./Fable-UUID-Random.js":65,"fable-serviceproviderbase":59}],67:[function(require,module,exports){module.exports={"name":"fable","version":"3.1.10","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":true,"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.41"},"dependencies":{"async.eachlimit":"^0.5.2","async.waterfall":"^0.5.2","big.js":"^6.2.2","cachetrax":"^1.0.4","cookie":"^0.6.0","data-arithmatic":"^1.0.7","dayjs":"^1.11.13","fable-log":"^3.0.16","fable-serviceproviderbase":"^3.0.15","fable-settings":"^3.0.12","fable-uuid":"^3.0.11","manyfest":"^1.0.38","simple-get":"^4.0.1"}};},{}],68:[function(require,module,exports){/**
755
+ function autoConstruct(pSettings){return new FableUUID(pSettings);}module.exports=FableUUID;module.exports.new=autoConstruct;},{"../package.json":64,"./Fable-UUID-Random.js":65,"fable-serviceproviderbase":59}],67:[function(require,module,exports){module.exports={"name":"fable","version":"3.1.11","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":true,"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.41"},"dependencies":{"async.eachlimit":"^0.5.2","async.waterfall":"^0.5.2","big.js":"^6.2.2","cachetrax":"^1.0.4","cookie":"^0.6.0","data-arithmatic":"^1.0.7","dayjs":"^1.11.13","fable-log":"^3.0.16","fable-serviceproviderbase":"^3.0.15","fable-settings":"^3.0.12","fable-uuid":"^3.0.11","manyfest":"^1.0.38","simple-get":"^4.0.1"}};},{}],68:[function(require,module,exports){/**
756
756
  * Fable Application Services Support Library
757
757
  * @author <steven@velozo.com>
758
758
  */// Pre-init services
@@ -1101,6 +1101,33 @@ tmpEnclosureStack.push(tmpEnclosureStartSymbolMap[tmpString[i]]);}// IF This is
1101
1101
  else if(tmpString[i]in tmpEnclosureEndSymbolMap// AND it matches the current nest level symbol
1102
1102
  &&tmpEnclosureEndSymbolMap[tmpString[i]]==tmpEnclosureStack[tmpEnclosureStack.length-1]){// Pop it off the stack!
1103
1103
  tmpEnclosureStack.pop();}}return tmpString;}/**
1104
+ * Encodes a string using encodeURIComponent, returning the encoded string.
1105
+ * If the input is not a string, returns the input unchanged.
1106
+ *
1107
+ * @param {string} pString - The string to encode.
1108
+ * @returns {string|*} The encoded string, or the original input if it is not a string.
1109
+ */},{key:"stringEncodeURIComponent",value:function stringEncodeURIComponent(pString){if(typeof pString!=='string'){return pString;}return encodeURIComponent(pString);}/**
1110
+ * Safely decodes a URI component string using decodeURIComponent.
1111
+ * If the input is not a string or decoding fails, returns the original input.
1112
+ *
1113
+ * @param {string} pString - The string to decode.
1114
+ * @returns {string} The decoded string, or the original input if decoding fails.
1115
+ */},{key:"stringDecodeURIComponent",value:function stringDecodeURIComponent(pString){if(typeof pString!=='string'){return pString;}try{return decodeURIComponent(pString);}catch(e){this.fable.Log.error("Failed to decode URI component: ".concat(pString),e);return pString;// Return the original string if decoding fails
1116
+ }}/**
1117
+ * Encodes a string so that it can be safely embedded in JavaScript code.
1118
+ * Escapes special characters such as quotes, backslashes, and newlines.
1119
+ *
1120
+ * @param {string} pString - The input string to encode.
1121
+ * @returns {string} The encoded string with special characters escaped.
1122
+ */},{key:"stringEncodeForJavascript",value:function stringEncodeForJavascript(pString){if(typeof pString!=='string'){return pString;}return pString.replace(this._Regex_matcherJavascriptEncode,function(pMatch){switch(pMatch){case'"':return'\\"';case'\'':return'\\\'';case'\\':return'\\\\';case'\n':return'\\n';case'\r':return'\\r';default:return pMatch;// Return the original character if no encoding is needed
1123
+ }});}/**
1124
+ * Decodes a JavaScript-escaped string by replacing common escape sequences
1125
+ * (such as \" \\n \\r \\' and \\\\) with their actual character representations.
1126
+ *
1127
+ * @param {string} pString - The string to decode. If not a string, the input is returned as-is.
1128
+ * @returns {string} The decoded string with escape sequences replaced, or the original input if not a string.
1129
+ */},{key:"stringDecodeForJavascript",value:function stringDecodeForJavascript(pString){if(typeof pString!=='string'){return pString;}return pString.replace(this._Regex_matcherJavascriptDecode,function(pMatch){switch(pMatch){case'\\"':return'"';case'\\\'':return'\'';case'\\\\':return'\\';case'\\n':return'\n';case'\\r':return'\r';default:return pMatch;// Return the original character if no decoding is needed
1130
+ }});}/**
1104
1131
  * Count the number of enclosures in a string based on the start and end characters.
1105
1132
  *
1106
1133
  * If no start or end characters are specified, it will default to parentheses. If the string is not a string, it will return 0.
@@ -4941,7 +4968,7 @@ try{if(!global.localStorage)return false;}catch(_){return false;}var val=global.
4941
4968
  // presumably different callback function.
4942
4969
  // This makes sure that own properties are retained, so that
4943
4970
  // decorations and such are not lost along the way.
4944
- module.exports=wrappy;function wrappy(fn,cb){if(fn&&cb)return wrappy(fn)(cb);if(typeof fn!=='function')throw new TypeError('need wrapper function');Object.keys(fn).forEach(function(k){wrapper[k]=fn[k];});return wrapper;function wrapper(){var args=new Array(arguments.length);for(var i=0;i<args.length;i++){args[i]=arguments[i];}var ret=fn.apply(this,args);var cb=args[args.length-1];if(typeof ret==='function'&&ret!==cb){Object.keys(cb).forEach(function(k){ret[k]=cb[k];});}return ret;}}},{}],190:[function(require,module,exports){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){var target={};for(var i=0;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;}},{}],191:[function(require,module,exports){module.exports={"name":"pict","version":"1.0.257","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":true,"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.27.0","@types/jquery":"^3.5.32","eslint":"^9.27.0","globals":"^16.1.0","quackage":"^1.0.41"},"dependencies":{"cachetrax":"^1.0.4","fable":"^3.1.10","pict-application":"^1.0.25","pict-provider":"^1.0.3","pict-template":"^1.0.10","pict-view":"^1.0.60","typescript":"^5.8.3"}};},{}],192:[function(require,module,exports){// This assumes Pict has been required in the browser. Delcare these as globals so linter can do its job.
4971
+ module.exports=wrappy;function wrappy(fn,cb){if(fn&&cb)return wrappy(fn)(cb);if(typeof fn!=='function')throw new TypeError('need wrapper function');Object.keys(fn).forEach(function(k){wrapper[k]=fn[k];});return wrapper;function wrapper(){var args=new Array(arguments.length);for(var i=0;i<args.length;i++){args[i]=arguments[i];}var ret=fn.apply(this,args);var cb=args[args.length-1];if(typeof ret==='function'&&ret!==cb){Object.keys(cb).forEach(function(k){ret[k]=cb[k];});}return ret;}}},{}],190:[function(require,module,exports){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){var target={};for(var i=0;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;}},{}],191:[function(require,module,exports){module.exports={"name":"pict","version":"1.0.259","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":true,"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.27.0","@types/jquery":"^3.5.32","@types/sinon":"^17.0.4","eslint":"^9.27.0","globals":"^16.2.0","quackage":"^1.0.41","sinon":"^20.0.0"},"dependencies":{"cachetrax":"^1.0.4","fable":"^3.1.11","pict-application":"^1.0.25","pict-provider":"^1.0.3","pict-template":"^1.0.10","pict-view":"^1.0.60","typescript":"^5.8.3"}};},{}],192:[function(require,module,exports){// This assumes Pict has been required in the browser. Delcare these as globals so linter can do its job.
4945
4972
  /* global Pict, _Pict: writeable *//**
4946
4973
  * Simple function to load a pict Application
4947
4974
  *
@@ -5118,7 +5145,19 @@ this.recordSetCache[pEntity].maxAge=10000;this.recordSetCache[pEntity].maxLength
5118
5145
  if(!('Entity'in pEntityInformation)||typeof pEntityInformation.Entity!='string'){this.log.warn("EntityBundleRequest failed to parse entity request because the entity stanza did not contain an Entity string.");return fCallback();}if(!('Destination'in pEntityInformation)||typeof pEntityInformation.Destination!='string'){this.log.warn("EntityBundleRequest failed to parse entity request because the entity stanza did not contain a Destination string.");return fCallback();}if(!('Filter'in pEntityInformation)||typeof pEntityInformation.Filter!='string'){pEntityInformation.Filter='';}if(!('FilterData'in pEntityInformation)||_typeof(pEntityInformation.FilterData)!='object'){pEntityInformation.FilterData={};}if(!('RecordStartCursor'in pEntityInformation)||typeof pEntityInformation.RecordStartCursor!='number'){pEntityInformation.RecordStartCursor=0;}if(!('PageSize'in pEntityInformation)||typeof pEntityInformation.PageSize!='number'){pEntityInformation.PageSize=100;}var tmpRecordStartCursor=null;var tmpRecordCount=null;if(pEntityInformation.RecordCount){tmpRecordStartCursor=pEntityInformation.RecordStartCursor;tmpRecordCount=pEntityInformation.RecordCount;}// Parse the filter template
5119
5146
  var tmpFilterString=this.fable.parseTemplate(pEntityInformation.Filter,pEntityInformation.FilterData);// Create a callback function to handle receiving the record set
5120
5147
  var fRecordFetchComplete=function fRecordFetchComplete(pError,pRecordSet){if(pError){_this75.log.error("EntityBundleRequest request Error getting entity set for [".concat(pEntityInformation.Entity,"] with filter [").concat(tmpFilterString,"]: ").concat(pError),pError);return fCallback(pError,'');}_this75.log.trace("EntityBundleRequest found ".concat(pRecordSet.length," records for ").concat(pEntityInformation.Entity," filtered to [").concat(tmpFilterString,"]"));// Now assign it back to the destination; because this is not view specific it doesn't use the manifests from them (to deal with scope overlap with subgrids).
5121
- if(pEntityInformation.SingleRecord){if(pRecordSet.length>1){_this75.log.warn("EntityBundleRequest found more than one record for ".concat(pEntityInformation.Entity," filtered to [").concat(tmpFilterString,"] but SingleRecord is true; setting the first record."));}if(pRecordSet.length<1){_this75.fable.manifest.setValueByHash(_this75.fable,pEntityInformation.Destination,false);}_this75.fable.manifest.setValueByHash(_this75.fable,pEntityInformation.Destination,pRecordSet[0]);}else{_this75.fable.manifest.setValueByHash(_this75.fable,pEntityInformation.Destination,pRecordSet);}return fCallback();};if(tmpRecordCount){this.getEntitySetPage(pEntityInformation.Entity,tmpFilterString,tmpRecordStartCursor,tmpRecordCount,fRecordFetchComplete);}else{this.getEntitySet(pEntityInformation.Entity,tmpFilterString,fRecordFetchComplete);}}},{key:"gatherCustomDataSet",value:function gatherCustomDataSet(pCustomRequestInformation,fCallback){var _this76=this;// First sanity check the pCustomRequestInformation
5148
+ if(pEntityInformation.SingleRecord){if(pRecordSet.length>1){_this75.log.warn("EntityBundleRequest found more than one record for ".concat(pEntityInformation.Entity," filtered to [").concat(tmpFilterString,"] but SingleRecord is true; setting the first record."));}if(pRecordSet.length<1){_this75.fable.manifest.setValueByHash(_this75.fable,pEntityInformation.Destination,false);}_this75.fable.manifest.setValueByHash(_this75.fable,pEntityInformation.Destination,pRecordSet[0]);}else{_this75.fable.manifest.setValueByHash(_this75.fable,pEntityInformation.Destination,pRecordSet);}return fCallback();};if(tmpRecordCount){this.getEntitySetPage(pEntityInformation.Entity,tmpFilterString,tmpRecordStartCursor,tmpRecordCount,fRecordFetchComplete);}else{this.getEntitySet(pEntityInformation.Entity,tmpFilterString,fRecordFetchComplete);}}},{key:"mapJoin",value:function mapJoin(pCustomRequestInformation,fCallback){/*
5149
+ {
5150
+ "Type": "MapJoin",
5151
+ "DestinationRecordSetAddress": "Record.CoreEntities",
5152
+ "DestinationJoinValue": "IDBook",
5153
+ "JoinJoinValueLHS": "IDBook",
5154
+ "Joins": "Record.BookAuthorJoins",
5155
+ "JoinJoinValueRHS": "IDAuthor",
5156
+ "JoinRecordSetAddress": "Record.Authors",
5157
+ "JoinValue": "IDAuthor",
5158
+ "RecordDestinationAddress": "Authors"
5159
+ }
5160
+ */var tmpDestinationEntities=this.fable.manifest.getValueByHash(this.fable,pCustomRequestInformation.DestinationRecordSetAddress);if(!Array.isArray(tmpDestinationEntities)){return fCallback(new Error("EntityBundleRequest failed to map join because the destination [".concat(pCustomRequestInformation.DestinationRecordSetAddress,"] did not return an array.")));}var tmpJoinEntities=this.fable.manifest.getValueByHash(this.fable,pCustomRequestInformation.Joins);if(!Array.isArray(tmpJoinEntities)){return fCallback(new Error("EntityBundleRequest failed to map join because the join [".concat(pCustomRequestInformation.Joins,"] did not return an array.")));}var tmpSourceEntities=this.fable.manifest.getValueByHash(this.fable,pCustomRequestInformation.JoinRecordSetAddress);if(!Array.isArray(tmpSourceEntities)){return fCallback(new Error("EntityBundleRequest failed to map join because the source [".concat(pCustomRequestInformation.JoinRecordSetAddress,"] did not return an array.")));}var tmpLHSJoinKey=pCustomRequestInformation.JoinJoinValueLHS||pCustomRequestInformation.DestinationJoinValue;var tmpRHSJoinKey=pCustomRequestInformation.JoinJoinValueRHS||pCustomRequestInformation.JoinValue;var tmpDestinationLookup={};var tmpSourceLookup={};var tmpJoinMap={};var _iterator3=_createForOfIteratorHelper(tmpDestinationEntities),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var _tmpDestinationEntity=_step3.value;var tmpDestinationJoinValue=_tmpDestinationEntity[pCustomRequestInformation.DestinationJoinValue];tmpDestinationLookup[tmpDestinationJoinValue]=_tmpDestinationEntity;}}catch(err){_iterator3.e(err);}finally{_iterator3.f();}var _iterator4=_createForOfIteratorHelper(tmpSourceEntities),_step4;try{for(_iterator4.s();!(_step4=_iterator4.n()).done;){var _tmpSourceEntity=_step4.value;var tmpSourceJoinValue=_tmpSourceEntity[pCustomRequestInformation.JoinValue];tmpSourceLookup[tmpSourceJoinValue]=_tmpSourceEntity;}}catch(err){_iterator4.e(err);}finally{_iterator4.f();}var _iterator5=_createForOfIteratorHelper(tmpJoinEntities),_step5;try{for(_iterator5.s();!(_step5=_iterator5.n()).done;){var tmpJoinEntity=_step5.value;var _tmpLHSJoinValue=tmpJoinEntity[tmpLHSJoinKey];var _tmpRHSJoinValue=tmpJoinEntity[tmpRHSJoinKey];tmpJoinMap[_tmpLHSJoinValue]=tmpJoinMap[_tmpLHSJoinValue]||new Set();tmpJoinMap[_tmpLHSJoinValue].add(_tmpRHSJoinValue);}}catch(err){_iterator5.e(err);}finally{_iterator5.f();}for(var _i58=0,_Object$keys=Object.keys(tmpJoinMap);_i58<_Object$keys.length;_i58++){var tmpLHSJoinValue=_Object$keys[_i58];var tmpRHSJoinValues=Array.from(tmpJoinMap[tmpLHSJoinValue]);var tmpDestinationEntity=tmpDestinationLookup[tmpLHSJoinValue];if(!tmpDestinationEntity){this.log.error("EntityBundleRequest failed to map join because the LHS join value [".concat(tmpLHSJoinValue,"] was not found in the destination lookup."));continue;}for(var _i59=0,_tmpRHSJoinValues=tmpRHSJoinValues;_i59<_tmpRHSJoinValues.length;_i59++){var tmpRHSJoinValue=_tmpRHSJoinValues[_i59];var tmpSourceEntity=tmpSourceLookup[tmpRHSJoinValue];if(!tmpSourceEntity){this.log.error("EntityBundleRequest failed to map join because the RHS join value [".concat(tmpRHSJoinValue,"] was not found in the source lookup."));continue;}tmpDestinationEntity[pCustomRequestInformation.RecordDestinationAddress]=tmpDestinationEntity[pCustomRequestInformation.RecordDestinationAddress]||[];tmpDestinationEntity[pCustomRequestInformation.RecordDestinationAddress].push(tmpSourceEntity);}}fCallback(null,tmpDestinationEntities);}},{key:"gatherCustomDataSet",value:function gatherCustomDataSet(pCustomRequestInformation,fCallback){var _this76=this;// First sanity check the pCustomRequestInformation
5122
5161
  if(!('URL'in pCustomRequestInformation)||typeof pCustomRequestInformation.URL!='string'){this.log.warn("EntityBundleRequest failed to parse custom data request because the stanza did not contain a URL string.");return fCallback();}if(!('URLData'in pCustomRequestInformation)||_typeof(pCustomRequestInformation.URLData)!='object'){pCustomRequestInformation.URLData={};}// Parse the filter template
5123
5162
  var tmpURLTemplateString=this.fable.parseTemplate(pCustomRequestInformation.URL,pCustomRequestInformation.URLData);if(tmpURLTemplateString==''){// We may want to continue, but for now let's say nah and nope out.
5124
5163
  this.log.warn("EntityBundleRequest failed to parse custom data request because the entity Filter did not return a string for FilterBy");}var tmpURLPrefix='';// This will only be true if the "Host" is set.
@@ -5131,16 +5170,23 @@ if(pCustomRequestInformation.Destination){_this76.fable.manifest.setValueByHash(
5131
5170
  * @param {Object} pEntitiesBundleDescription - The entity bundle description object.
5132
5171
  *
5133
5172
  * @return {Promise<any>} - Returns a promise that resolves when the data has been gathered.
5134
- */},{key:"gatherDataFromServer",value:function gatherDataFromServer(pEntitiesBundleDescription,fCallback){var _this77=this;if(!Array.isArray(pEntitiesBundleDescription)){this.log.error("EntityBundleRequest failed to parse entity bundle request because the input was not an array.");return Promise.reject(new Error('EntityBundleRequest failed to parse entity bundle request because the input was not an array.'));}var tmpAnticipate=this.fable.newAnticipate();var _loop3=function _loop3(){var tmpEntityBundleEntry=pEntitiesBundleDescription[i];tmpAnticipate.anticipate(function(fNext){try{switch(tmpEntityBundleEntry.Type){case'Custom':return _this77.gatherCustomDataSet(tmpEntityBundleEntry,fNext);// This is the default case, for a meadow entity set or single entity
5173
+ */},{key:"gatherDataFromServer",value:function gatherDataFromServer(pEntitiesBundleDescription,fCallback){var _this77=this;if(!Array.isArray(pEntitiesBundleDescription)){this.log.error("EntityBundleRequest failed to parse entity bundle request because the input was not an array.");return Promise.reject(new Error('EntityBundleRequest failed to parse entity bundle request because the input was not an array.'));}var tmpAnticipate=this.fable.newAnticipate();var _loop3=function _loop3(){var tmpEntityBundleEntry=pEntitiesBundleDescription[i];tmpAnticipate.anticipate(function(fNext){try{switch(tmpEntityBundleEntry.Type){case'Custom':return _this77.gatherCustomDataSet(tmpEntityBundleEntry,fNext);case'MapJoin':return _this77.mapJoin(tmpEntityBundleEntry,fNext);// This is the default case, for a meadow entity set or single entity
5135
5174
  case'MeadowEntity':default:return _this77.gatherEntitySet(tmpEntityBundleEntry,fNext);}}catch(pError){_this77.log.error("EntityBundleRequest error gathering entity set: ".concat(pError),pError);}return fNext();});};for(var i=0;i<pEntitiesBundleDescription.length;i++){_loop3();}tmpAnticipate.wait(function(pError){//FIXME: should we be ignoring this error? rejecting here is unsafe since the result isn't guaranteed to be handled, so will crash stuff currently
5136
5175
  if(pError){_this77.log.error("EntityBundleRequest error gathering entity set: ".concat(pError),pError);return fCallback(pError);}return fCallback();});}},{key:"getEntity",value:function getEntity(pEntity,pIDRecord,fCallback){this.initializeCache(pEntity);// Discard anything from the cache that has expired or is over size.
5137
- this.recordCache[pEntity].prune(function(){var _this78=this;var tmpPossibleRecord=this.recordCache[pEntity].read(pIDRecord);if(tmpPossibleRecord){return fCallback(null,tmpPossibleRecord);}var tmpOptions={url:"".concat(this.options.urlPrefix).concat(pEntity,"/").concat(pIDRecord)};tmpOptions=this.prepareRequestOptions(tmpOptions);return this.restClient.getJSON(tmpOptions,function(pError,pResponse,pBody){if(pBody){_this78.recordCache[pEntity].put(pBody,pIDRecord);}return fCallback(pError,pBody);});}.bind(this));}},{key:"getEntitySetPage",value:function getEntitySetPage(pEntity,pMeadowFilterExpression,pRecordStartCursor,pRecordCount,fCallback){var tmpURL="".concat(this.options.urlPrefix).concat(pEntity,"s/FilteredTo/").concat(pMeadowFilterExpression,"/").concat(pRecordStartCursor,"/").concat(pRecordCount);return this.restClient.getJSON(tmpURL,function(pDownloadError,pDownloadResponse,pDownloadBody){return fCallback(pDownloadError,pDownloadBody);}.bind(this));}},{key:"getEntitySetRecordCount",value:function getEntitySetRecordCount(pEntity,pMeadowFilterExpression,fCallback){var tmpURL="".concat(this.options.urlPrefix).concat(pEntity,"s/Count/FilteredTo/").concat(pMeadowFilterExpression);return this.restClient.getJSON(tmpURL,function(pError,pResponse,pBody){if(pError){this.log.error("Error getting entity count of [".concat(pEntity,"] filtered to [").concat(pMeadowFilterExpression,"] from url [").concat(tmpURL,"]: ").concat(pError));return fCallback(pError);}var tmpRecordCount=0;if(pBody.Count){tmpRecordCount=pBody.Count;}return fCallback(pError,tmpRecordCount);}.bind(this));}},{key:"getEntitySet",value:function getEntitySet(pEntity,pMeadowFilterExpression,fCallback){// TODO: Should we test for too many record IDs here by string length in pMeadowFilterExpression?
5176
+ this.recordCache[pEntity].prune(function(){var _this78=this;var tmpPossibleRecord=this.recordCache[pEntity].read(pIDRecord);if(tmpPossibleRecord){return fCallback(null,tmpPossibleRecord);}var tmpOptions={url:"".concat(this.options.urlPrefix).concat(pEntity,"/").concat(pIDRecord)};tmpOptions=this.prepareRequestOptions(tmpOptions);return this.restClient.getJSON(tmpOptions,function(pError,pResponse,pBody){/*
5177
+ * FIXME: This breaks entity reads for nonexistent records. Putting this back for now until we can audit and fix all the places that may rely on this.
5178
+ if (pResponse && pResponse.statusCode && pResponse.statusCode >= 400)
5179
+ {
5180
+ this.log.error(`Error getting entity [${pEntity}] with ID [${pIDRecord}] from url [${tmpOptions.url}]: ${pResponse.statusCode} ${pResponse.statusMessage}`);
5181
+ return fCallback(new Error(`Error getting entity [${pEntity}] with ID [${pIDRecord}] from url [${tmpOptions.url}]: ${pResponse.statusCode} ${JSON.stringify(pBody || {})}`));
5182
+ }
5183
+ */if(pBody){_this78.recordCache[pEntity].put(pBody,pIDRecord);}return fCallback(pError,pBody);});}.bind(this));}},{key:"getEntitySetPage",value:function getEntitySetPage(pEntity,pMeadowFilterExpression,pRecordStartCursor,pRecordCount,fCallback){var tmpURL="".concat(this.options.urlPrefix).concat(pEntity,"s/FilteredTo/").concat(pMeadowFilterExpression,"/").concat(pRecordStartCursor,"/").concat(pRecordCount);return this.restClient.getJSON(tmpURL,function(pDownloadError,pDownloadResponse,pDownloadBody){if(pDownloadResponse&&pDownloadResponse.statusCode&&pDownloadResponse.statusCode>=400){this.log.error("Error getting entity set of [".concat(pEntity,"] filtered to [").concat(pMeadowFilterExpression,"] from url [").concat(tmpURL,"]: ").concat(pDownloadResponse.statusCode," ").concat(pDownloadResponse.statusMessage));return fCallback(new Error("Error getting entity set of [".concat(pEntity,"] filtered to [").concat(pMeadowFilterExpression,"] from url [").concat(tmpURL,"]: ").concat(pDownloadResponse.statusCode," ").concat(JSON.stringify(pDownloadBody||{}))));}return fCallback(pDownloadError,pDownloadBody);}.bind(this));}},{key:"getEntitySetRecordCount",value:function getEntitySetRecordCount(pEntity,pMeadowFilterExpression,fCallback){var tmpURL="".concat(this.options.urlPrefix).concat(pEntity,"s/Count/FilteredTo/").concat(pMeadowFilterExpression);return this.restClient.getJSON(tmpURL,function(pError,pResponse,pBody){if(pResponse&&pResponse.statusCode&&pResponse.statusCode>=400){this.log.error("Error getting entity count of [".concat(pEntity,"] filtered to [").concat(pMeadowFilterExpression,"] from url [").concat(tmpURL,"]: ").concat(pResponse.statusCode," ").concat(pResponse.statusMessage));return fCallback(new Error("Error getting entity count of [".concat(pEntity,"] filtered to [").concat(pMeadowFilterExpression,"] from url [").concat(tmpURL,"]: ").concat(pResponse.statusCode," ").concat(JSON.stringify(pBody||{}))));}if(pError){this.log.error("Error getting entity count of [".concat(pEntity,"] filtered to [").concat(pMeadowFilterExpression,"] from url [").concat(tmpURL,"]: ").concat(pError));return fCallback(pError);}var tmpRecordCount=0;if(pBody.Count){tmpRecordCount=pBody.Count;}return fCallback(pError,tmpRecordCount);}.bind(this));}},{key:"getEntitySet",value:function getEntitySet(pEntity,pMeadowFilterExpression,fCallback){// TODO: Should we test for too many record IDs here by string length in pMeadowFilterExpression?
5138
5184
  // FBL~ID${pDestinationEntity}~INN~${tmpIDRecordsCommaSeparated}
5139
5185
  // If the list is mega-long we can parse it and break it into chunks.
5140
5186
  this.initializeCache(pEntity);// Discard anything from the cache that has expired or is over size.
5141
5187
  this.recordSetCache[pEntity].prune(function(){var _this79=this;var tmpPossibleRecords=this.recordSetCache[pEntity].read(pMeadowFilterExpression);if(tmpPossibleRecords){return fCallback(null,tmpPossibleRecords);}return this.getEntitySetRecordCount(pEntity,pMeadowFilterExpression,function(pRecordCountError,pRecordCount){if(pRecordCountError){return fCallback(pRecordCountError);}var tmpRecordCount=pRecordCount;if(isNaN(pRecordCount)){_this79.log.error("Entity count did not return a number for [".concat(pEntity,"] filtered to [").concat(pMeadowFilterExpression,"]... something is fatally wrong from the server accessed in getEntitySet call."));return fCallback(new Error('Entity count did not return a number in getEntitySet.'));}var tmpDownloadURIFragments=[];var tmpDownloadBatchSize=_this79.options.downloadBatchSize;for(var i=0;i<tmpRecordCount/tmpDownloadBatchSize;i++){// Generate each of the URI fragments to download
5142
5188
  tmpDownloadURIFragments.push("".concat(_this79.options.urlPrefix).concat(pEntity,"s/FilteredTo/").concat(pMeadowFilterExpression,"/").concat(i*tmpDownloadBatchSize,"/").concat(tmpDownloadBatchSize));}var tmpEntitySet=[];// Now run these in series (it's possible to parallelize the requests but they would not be in server order)
5143
- _this79.fable.Utility.eachLimit(tmpDownloadURIFragments,1,function(pURIFragment,fDownloadCallback){_this79.restClient.getJSON(pURIFragment,function(pDownloadError,pDownloadResponse,pDownloadBody){tmpEntitySet=tmpEntitySet.concat(pDownloadBody);// Should we be caching each record?
5189
+ _this79.fable.Utility.eachLimit(tmpDownloadURIFragments,1,function(pURIFragment,fDownloadCallback){_this79.restClient.getJSON(pURIFragment,function(pDownloadError,pDownloadResponse,pDownloadBody){if(pDownloadResponse&&pDownloadResponse.statusCode&&pDownloadResponse.statusCode>=400){_this79.log.error("Error getting entity set of [".concat(pEntity,"] filtered to [").concat(pMeadowFilterExpression,"] from url [").concat(pURIFragment,"]: ").concat(pDownloadResponse.statusCode," ").concat(pDownloadResponse.statusMessage));return fDownloadCallback(new Error("Error getting entity set of [".concat(pEntity,"] filtered to [").concat(pMeadowFilterExpression,"] from url [").concat(pURIFragment,"]: ").concat(pDownloadResponse.statusCode," ").concat(JSON.stringify(pDownloadBody||{}))));}tmpEntitySet=tmpEntitySet.concat(pDownloadBody);// Should we be caching each record?
5144
5190
  return fDownloadCallback(pDownloadError);});},function(pFullDownloadError){if(tmpEntitySet){_this79.recordSetCache[pEntity].put(tmpEntitySet,pMeadowFilterExpression);}return fCallback(pFullDownloadError,tmpEntitySet);});});}.bind(this));}}]);}(libFableServiceBase);module.exports=PictMeadowEntityProvider;},{"fable":68}],198:[function(require,module,exports){var libFableServiceBase=require('fable').ServiceProviderBase;var PictTemplateProvider=/*#__PURE__*/function(_libFableServiceBase23){/**
5145
5191
  * @param {Object} pFable - The Fable Framework instance
5146
5192
  * @param {Object} pOptions - The options for the service
@@ -5213,7 +5259,7 @@ if(!(pTemplateHash in this.templates)){this.checkDefaultTemplateHash(pTemplateHa
5213
5259
  * Pict management object.
5214
5260
  */var Pict=/*#__PURE__*/function(_libFable){/**
5215
5261
  * @param {Object<String, any>} pSettings - The settings for the Pict instance.
5216
- */function Pict(pSettings){var _this81;_classCallCheck2(this,Pict);_this81=_callSuper(this,Pict,[pSettings]);/** @type {any} */_this81.settings;_this81.isBrowser=new Function("try {return (this===window);} catch(pError) {return false;}");/** @type {Object} */_this81._PackageFable=_this81._Package;_this81._Package=libPackage;_this81.browserAddress="window._Pict";if("BrowserAddress"in _this81.settings){_this81.browserAddress=_this81.settings.BrowserAddress;}_this81.children=[];/** @type {import('pict-application')} */_this81.PictApplication=null;// shim types from fable until we export types properly
5262
+ */function Pict(pSettings){var _this81;_classCallCheck2(this,Pict);_this81=_callSuper(this,Pict,[pSettings]);/** @type {any} */_this81.settings;_this81.isBrowser=new Function("try {return (this===window);} catch(pError) {return false;}");/** @type {Object} */_this81._PackageFable=_this81._Package;/** @type {Record<string, any>} */_this81._Package=libPackage;_this81.browserAddress="window._Pict";if("BrowserAddress"in _this81.settings){_this81.browserAddress=_this81.settings.BrowserAddress;}_this81.children=[];/** @type {import('pict-application')} */_this81.PictApplication=null;// shim types from fable until we export types properly
5217
5263
  /** @type {any} */_this81.log;//NOTE: This needs to come before any other providers which may instantiate a rest client so we don't proliferate them
5218
5264
  _this81.instantiateServiceProvider("RestClient");/**
5219
5265
  * The templateProvider provides a basic key->template mapping with default fallback capabilities
@@ -5313,7 +5359,7 @@ if("default_configuration"in pApplicationPrototype){tmpOptions=this.fable.Utilit
5313
5359
  */},{key:"initializePictTemplateEngine",value:function initializePictTemplateEngine(){if(!this._DefaultPictTemplatesInitialized){// Just looking up data in the application state template expression
5314
5360
  //{~Data:AppData.Some.Value.to.Render~}
5315
5361
  //{~D:AppData.Some.Value.to.Render~}
5316
- this.addTemplate(require("./templates/Pict-Template-Data.js"));this.addTemplate(require("./templates/Pict-Template-TemplateByReference.js"));this.addTemplate(require("./templates/Pict-Template-DataValueByKey.js"));this.addTemplate(require("./templates/Pict-Template-View.js"));// HTML Comment Start and End based on truthiness ... if the value is false, the comment shows up.
5362
+ this.addTemplate(require("./templates/Pict-Template-Data.js"));this.addTemplate(require("./templates/Pict-Template-TemplateByReference.js"));this.addTemplate(require("./templates/Pict-Template-DataValueByKey.js"));this.addTemplate(require("./templates/Pict-Template-View.js"));this.addTemplate(require("./templates/data/Pict-Template-DataEncodeJavascriptString.js"));// HTML Comment Start and End based on truthiness ... if the value is false, the comment shows up.
5317
5363
  // {~HtmlCommentStart:Some.Address~} gives you "<!--"
5318
5364
  // {~HCS:Some.Address~} gives you "<!--"
5319
5365
  this.addTemplate(require("./templates/data/Pict-Template-HtmlCommentStart.js"));// {~HtmlCommentEnd:Some.Address~} gives you "-->"
@@ -5373,7 +5419,7 @@ if(!tmpTemplateString){tmpTemplateString="";}return this.parseTemplate(tmpTempla
5373
5419
  *
5374
5420
  * @return {String?} The parsed template string, or undefined if a callback was provided
5375
5421
  */},{key:"parseTemplateSet",value:function parseTemplateSet(pTemplateString,pDataSet,fCallback,pContextArray){var _this83=this;// TODO: This will need streaming -- for now janky old string append does the trick
5376
- var tmpValue="";if(typeof fCallback=="function"){if(Array.isArray(pDataSet)||_typeof(pDataSet)=="object"){this.Utility.eachLimit(pDataSet,1,function(pRecord,fRecordTemplateCallback){return _this83.parseTemplate(pTemplateString,pRecord,function(pError,pTemplateResult){tmpValue+=pTemplateResult;return fRecordTemplateCallback();});},function(pError){return fCallback(pError,tmpValue);});}else{return fCallback(Error("Pict: Template Set: pDataSet is not an array or object."),"");}}else{if(Array.isArray(pDataSet)||_typeof(pDataSet)=="object"){if(Array.isArray(pDataSet)){for(var i=0;i<pDataSet.length;i++){tmpValue+=this.parseTemplate(pTemplateString,pDataSet[i],null,pContextArray);}}else{var tmpKeys=Object.keys(pDataSet);for(var _i58=0;_i58<tmpKeys.length;_i58++){tmpValue+=this.parseTemplate(pTemplateString,pDataSet[tmpKeys[_i58]],null,pContextArray);}}return tmpValue;}else{return"";}}}/**
5422
+ var tmpValue="";if(typeof fCallback=="function"){if(Array.isArray(pDataSet)||_typeof(pDataSet)=="object"){this.Utility.eachLimit(pDataSet,1,function(pRecord,fRecordTemplateCallback){return _this83.parseTemplate(pTemplateString,pRecord,function(pError,pTemplateResult){tmpValue+=pTemplateResult;return fRecordTemplateCallback();});},function(pError){return fCallback(pError,tmpValue);});}else{return fCallback(Error("Pict: Template Set: pDataSet is not an array or object."),"");}}else{if(Array.isArray(pDataSet)||_typeof(pDataSet)=="object"){if(Array.isArray(pDataSet)){for(var i=0;i<pDataSet.length;i++){tmpValue+=this.parseTemplate(pTemplateString,pDataSet[i],null,pContextArray);}}else{var tmpKeys=Object.keys(pDataSet);for(var _i60=0;_i60<tmpKeys.length;_i60++){tmpValue+=this.parseTemplate(pTemplateString,pDataSet[tmpKeys[_i60]],null,pContextArray);}}return tmpValue;}else{return"";}}}/**
5377
5423
  * Parse a template set by hash.
5378
5424
  *
5379
5425
  * @param {String} pTemplateHash - The hash of the template to parse
@@ -5393,7 +5439,7 @@ if(!tmpTemplateString){tmpTemplateString="";}return this.parseTemplateSet(tmpTem
5393
5439
  *
5394
5440
  * @return {String?} The parsed template string, or undefined if a callback was provided
5395
5441
  */},{key:"parseTemplateSetWithPayload",value:function parseTemplateSetWithPayload(pTemplateString,pDataSet,pPayload,fCallback,pContextArray){var _this84=this;// TODO: This will need streaming -- for now janky old string append does the trick
5396
- var tmpValue="";if(typeof fCallback=="function"){if(Array.isArray(pDataSet)||_typeof(pDataSet)=="object"){this.Utility.eachLimit(pDataSet,1,function(pRecord,fRecordTemplateCallback){return _this84.parseTemplate(pTemplateString,{Data:pRecord,Payload:pPayload},function(pError,pTemplateResult){tmpValue+=pTemplateResult;return fRecordTemplateCallback();});},function(pError){return fCallback(pError,tmpValue);});}else{return fCallback(Error("Pict: Template Set: pDataSet is not an array or object."),"");}}else{if(Array.isArray(pDataSet)||_typeof(pDataSet)=="object"){if(Array.isArray(pDataSet)){for(var i=0;i<pDataSet.length;i++){tmpValue+=this.parseTemplate(pTemplateString,{Data:pDataSet[i],Payload:pPayload},null,pContextArray);}}else{var tmpKeys=Object.keys(pDataSet);for(var _i59=0;_i59<tmpKeys.length;_i59++){tmpValue+=this.parseTemplate(pTemplateString,{Data:pDataSet[tmpKeys[_i59]],Payload:pPayload},null,pContextArray);}}return tmpValue;}else{return"";}}}/**
5442
+ var tmpValue="";if(typeof fCallback=="function"){if(Array.isArray(pDataSet)||_typeof(pDataSet)=="object"){this.Utility.eachLimit(pDataSet,1,function(pRecord,fRecordTemplateCallback){return _this84.parseTemplate(pTemplateString,{Data:pRecord,Payload:pPayload},function(pError,pTemplateResult){tmpValue+=pTemplateResult;return fRecordTemplateCallback();});},function(pError){return fCallback(pError,tmpValue);});}else{return fCallback(Error("Pict: Template Set: pDataSet is not an array or object."),"");}}else{if(Array.isArray(pDataSet)||_typeof(pDataSet)=="object"){if(Array.isArray(pDataSet)){for(var i=0;i<pDataSet.length;i++){tmpValue+=this.parseTemplate(pTemplateString,{Data:pDataSet[i],Payload:pPayload},null,pContextArray);}}else{var tmpKeys=Object.keys(pDataSet);for(var _i61=0;_i61<tmpKeys.length;_i61++){tmpValue+=this.parseTemplate(pTemplateString,{Data:pDataSet[tmpKeys[_i61]],Payload:pPayload},null,pContextArray);}}return tmpValue;}else{return"";}}}/**
5397
5443
  * Parse a template set by hash.
5398
5444
  *
5399
5445
  * @param {String} pTemplateHash - The hash of the template to parse
@@ -5405,7 +5451,7 @@ var tmpValue="";if(typeof fCallback=="function"){if(Array.isArray(pDataSet)||_ty
5405
5451
  * @return {String?} The parsed template string, or undefined if a callback was provided
5406
5452
  */},{key:"parseTemplateSetWithPayloadByHash",value:function parseTemplateSetWithPayloadByHash(pTemplateHash,pDataSet,pPayload,fCallback,pContextArray){var tmpTemplateString=this.TemplateProvider.getTemplate(pTemplateHash);// TODO: Unsure if returning empty is always the right behavior -- if it isn't we will use config to set the behavior
5407
5453
  if(!tmpTemplateString){tmpTemplateString="";}return this.parseTemplateSetWithPayload(tmpTemplateString,pDataSet,pPayload,fCallback,pContextArray);}}]);}(libFable);module.exports=Pict;module.exports.PictApplicationClass=require("pict-application");module.exports.PictViewClass=require("pict-view");module.exports.PictProviderClass=require("pict-provider");module.exports.PictTemplateClass=require("pict-template");module.exports.EnvironmentLog=require("./environments/Pict-Environment-Log.js");module.exports.EnvironmentObject=require("./environments/Pict-Environment-Object.js");// This is to help understand the type of enivironement we're executing in
5408
- module.exports.isBrowser=new Function("try {return (this===window);} catch(pError) {return false;}");module.exports.safeOnDocumentReady=require("./Pict-Browser-SafeOnDocumentReady.js");module.exports.safeLoadPictApplication=require("./Pict-Browser-SafeLoad.js");},{"../package.json":191,"./Pict-Browser-SafeLoad.js":192,"./Pict-Browser-SafeOnDocumentReady.js":193,"./Pict-CSS.js":194,"./Pict-Content-Assignment.js":195,"./Pict-DataProvider.js":196,"./Pict-Meadow-EntityProvider.js":197,"./Pict-Template-Provider.js":198,"./environments/Pict-Environment-Log.js":200,"./environments/Pict-Environment-Object.js":201,"./templates/Pict-Template-Data.js":202,"./templates/Pict-Template-DataValueByKey.js":203,"./templates/Pict-Template-Entity.js":204,"./templates/Pict-Template-Self.js":205,"./templates/Pict-Template-Template.js":206,"./templates/Pict-Template-TemplateByReference.js":207,"./templates/Pict-Template-TemplateFromMap.js":208,"./templates/Pict-Template-TemplateSet.js":209,"./templates/Pict-Template-TemplateSetFromMap.js":210,"./templates/Pict-Template-TemplateSetWithPayload.js":211,"./templates/Pict-Template-TemplateValueSet.js":212,"./templates/Pict-Template-View.js":213,"./templates/data-generation/Pict-Template-RandomNumber.js":214,"./templates/data-generation/Pict-Template-RandomNumberString.js":215,"./templates/data/Pict-Template-DataJson.js":216,"./templates/data/Pict-Template-DateOnlyFormat.js":217,"./templates/data/Pict-Template-DateOnlyYMD.js":218,"./templates/data/Pict-Template-DateTimeFormat.js":219,"./templates/data/Pict-Template-DateTimeYMD.js":220,"./templates/data/Pict-Template-Digits.js":221,"./templates/data/Pict-Template-Dollars.js":222,"./templates/data/Pict-Template-HtmlCommentEnd.js":223,"./templates/data/Pict-Template-HtmlCommentStart.js":224,"./templates/data/Pict-Template-Join.js":225,"./templates/data/Pict-Template-JoinUnique.js":226,"./templates/data/Pict-Template-PascalCaseIdentifier.js":227,"./templates/data/Pict-Template-PluckJoinUnique.js":228,"./templates/debugging/Pict-Template-Breakpoint.js":229,"./templates/debugging/Pict-Template-DataValueTree.js":230,"./templates/debugging/Pict-Template-LogStatement.js":231,"./templates/debugging/Pict-Template-LogValue.js":232,"./templates/debugging/Pict-Template-LogValueTree.js":233,"./templates/logic/Pict-Template-NotEmpty.js":234,"./templates/logic/Pict-Template-TemplateIf.js":236,"./templates/logic/Pict-Template-TemplateIfAbsolute.js":237,"fable":68,"pict-application":139,"pict-provider":141,"pict-template":143,"pict-view":145}],200:[function(require,module,exports){/**
5454
+ module.exports.isBrowser=new Function("try {return (this===window);} catch(pError) {return false;}");module.exports.safeOnDocumentReady=require("./Pict-Browser-SafeOnDocumentReady.js");module.exports.safeLoadPictApplication=require("./Pict-Browser-SafeLoad.js");},{"../package.json":191,"./Pict-Browser-SafeLoad.js":192,"./Pict-Browser-SafeOnDocumentReady.js":193,"./Pict-CSS.js":194,"./Pict-Content-Assignment.js":195,"./Pict-DataProvider.js":196,"./Pict-Meadow-EntityProvider.js":197,"./Pict-Template-Provider.js":198,"./environments/Pict-Environment-Log.js":200,"./environments/Pict-Environment-Object.js":201,"./templates/Pict-Template-Data.js":202,"./templates/Pict-Template-DataValueByKey.js":203,"./templates/Pict-Template-Entity.js":204,"./templates/Pict-Template-Self.js":205,"./templates/Pict-Template-Template.js":206,"./templates/Pict-Template-TemplateByReference.js":207,"./templates/Pict-Template-TemplateFromMap.js":208,"./templates/Pict-Template-TemplateSet.js":209,"./templates/Pict-Template-TemplateSetFromMap.js":210,"./templates/Pict-Template-TemplateSetWithPayload.js":211,"./templates/Pict-Template-TemplateValueSet.js":212,"./templates/Pict-Template-View.js":213,"./templates/data-generation/Pict-Template-RandomNumber.js":214,"./templates/data-generation/Pict-Template-RandomNumberString.js":215,"./templates/data/Pict-Template-DataEncodeJavascriptString.js":216,"./templates/data/Pict-Template-DataJson.js":217,"./templates/data/Pict-Template-DateOnlyFormat.js":218,"./templates/data/Pict-Template-DateOnlyYMD.js":219,"./templates/data/Pict-Template-DateTimeFormat.js":220,"./templates/data/Pict-Template-DateTimeYMD.js":221,"./templates/data/Pict-Template-Digits.js":222,"./templates/data/Pict-Template-Dollars.js":223,"./templates/data/Pict-Template-HtmlCommentEnd.js":224,"./templates/data/Pict-Template-HtmlCommentStart.js":225,"./templates/data/Pict-Template-Join.js":226,"./templates/data/Pict-Template-JoinUnique.js":227,"./templates/data/Pict-Template-PascalCaseIdentifier.js":228,"./templates/data/Pict-Template-PluckJoinUnique.js":229,"./templates/debugging/Pict-Template-Breakpoint.js":230,"./templates/debugging/Pict-Template-DataValueTree.js":231,"./templates/debugging/Pict-Template-LogStatement.js":232,"./templates/debugging/Pict-Template-LogValue.js":233,"./templates/debugging/Pict-Template-LogValueTree.js":234,"./templates/logic/Pict-Template-NotEmpty.js":235,"./templates/logic/Pict-Template-TemplateIf.js":237,"./templates/logic/Pict-Template-TemplateIfAbsolute.js":238,"fable":68,"pict-application":139,"pict-provider":141,"pict-template":143,"pict-view":145}],200:[function(require,module,exports){/**
5409
5455
  * Pict browser shim loader
5410
5456
  * @author <steven@velozo.com>
5411
5457
  *
@@ -5507,11 +5553,27 @@ return this.contentMap[pAddress];}this.pict.log.warn("Mock read from Address ".c
5507
5553
  * @param {Object} pFable - The Fable Framework instance
5508
5554
  * @param {Object} pOptions - The options for the service
5509
5555
  * @param {String} pServiceHash - The hash of the service
5510
- */function PictTemplateProviderData(pFable,pOptions,pServiceHash){var _this85;_classCallCheck2(this,PictTemplateProviderData);_this85=_callSuper(this,PictTemplateProviderData,[pFable,pOptions,pServiceHash]);/** @type {any} */_this85.log;_this85.addPattern('{~Data:','~}');_this85.addPattern('{~D:','~}');return _this85;}_inherits(PictTemplateProviderData,_libPictTemplate);return _createClass2(PictTemplateProviderData,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpRecord=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"]"));}var tmpDefaultValue='';if(tmpHash.indexOf(':')>-1){tmpDefaultValue=tmpHash.split(':')[1];tmpHash=tmpHash.split(':')[0];}var tmpValue='';if(tmpHash!=null){tmpValue=this.resolveStateFromAddress(tmpHash,tmpRecord,pContextArray);}if(tmpValue==null||tmpValue=='undefined'||typeof tmpValue=='undefined'||tmpValue===''){return tmpDefaultValue;}return tmpValue;}}]);}(libPictTemplate);module.exports=PictTemplateProviderData;},{"pict-template":143}],203:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDataValueByKey=/*#__PURE__*/function(_libPictTemplate2){/**
5556
+ */function PictTemplateProviderData(pFable,pOptions,pServiceHash){var _this85;_classCallCheck2(this,PictTemplateProviderData);_this85=_callSuper(this,PictTemplateProviderData,[pFable,pOptions,pServiceHash]);/** @type {any} */_this85.log;_this85.addPattern('{~Data:','~}');_this85.addPattern('{~D:','~}');return _this85;}/**
5557
+ * Render a template expression, returning a string with the resulting content.
5558
+ *
5559
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5560
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5561
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5562
+ *
5563
+ * @return {string} The rendered template
5564
+ */_inherits(PictTemplateProviderData,_libPictTemplate);return _createClass2(PictTemplateProviderData,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpRecord=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"]"));}var tmpDefaultValue='';if(tmpHash.indexOf(':')>-1){tmpDefaultValue=tmpHash.split(':')[1];tmpHash=tmpHash.split(':')[0];}var tmpValue='';if(tmpHash!=null){tmpValue=this.resolveStateFromAddress(tmpHash,tmpRecord,pContextArray);}if(tmpValue==null||tmpValue=='undefined'||typeof tmpValue=='undefined'||tmpValue===''){return tmpDefaultValue;}return tmpValue;}}]);}(libPictTemplate);module.exports=PictTemplateProviderData;},{"pict-template":143}],203:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDataValueByKey=/*#__PURE__*/function(_libPictTemplate2){/**
5511
5565
  * @param {Object} pFable - The Fable Framework instance
5512
5566
  * @param {Object} pOptions - The options for the service
5513
5567
  * @param {String} pServiceHash - The hash of the service
5514
- */function PictTemplateProviderDataValueByKey(pFable,pOptions,pServiceHash){var _this86;_classCallCheck2(this,PictTemplateProviderDataValueByKey);_this86=_callSuper(this,PictTemplateProviderDataValueByKey,[pFable,pOptions,pServiceHash]);/** @type {any} */_this86.log;_this86.addPattern('{~DataValueByKey:','~}');_this86.addPattern('{~DVBK:','~}');return _this86;}_inherits(PictTemplateProviderDataValueByKey,_libPictTemplate2);return _createClass2(PictTemplateProviderDataValueByKey,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpRecord=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"]"));}var tmpHashArray=tmpHash.split(':');if(tmpHashArray.length<2){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"] failed because there were not two stanzas in the expression [").concat(pTemplateHash,"]"));return'';}var tmpDefaultValue='';if(tmpHashArray.length>2){tmpDefaultValue=tmpHashArray[2];}var tmpValueObject=this.resolveStateFromAddress(tmpHashArray[0],tmpRecord,pContextArray);var tmpValueAddress=this.resolveStateFromAddress(tmpHashArray[1],tmpRecord,pContextArray);var tmpValue=this.pict.manifest.getValueByHash(tmpValueObject,tmpValueAddress);if(tmpValue==null||tmpValue=='undefined'||typeof tmpValue=='undefined'){return tmpDefaultValue;}return tmpValue;}}]);}(libPictTemplate);module.exports=PictTemplateProviderDataValueByKey;},{"pict-template":143}],204:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderEntity=/*#__PURE__*/function(_libPictTemplate3){/**
5568
+ */function PictTemplateProviderDataValueByKey(pFable,pOptions,pServiceHash){var _this86;_classCallCheck2(this,PictTemplateProviderDataValueByKey);_this86=_callSuper(this,PictTemplateProviderDataValueByKey,[pFable,pOptions,pServiceHash]);/** @type {any} */_this86.log;_this86.addPattern('{~DataValueByKey:','~}');_this86.addPattern('{~DVBK:','~}');return _this86;}/**
5569
+ * Render a template expression, returning a string with the resulting content.
5570
+ *
5571
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5572
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5573
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5574
+ *
5575
+ * @return {string} The rendered template
5576
+ */_inherits(PictTemplateProviderDataValueByKey,_libPictTemplate2);return _createClass2(PictTemplateProviderDataValueByKey,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpRecord=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"]"));}var tmpHashArray=tmpHash.split(':');if(tmpHashArray.length<2){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"] failed because there were not two stanzas in the expression [").concat(pTemplateHash,"]"));return'';}var tmpDefaultValue='';if(tmpHashArray.length>2){tmpDefaultValue=tmpHashArray[2];}var tmpValueObject=this.resolveStateFromAddress(tmpHashArray[0],tmpRecord,pContextArray);var tmpValueAddress=this.resolveStateFromAddress(tmpHashArray[1],tmpRecord,pContextArray);var tmpValue=this.pict.manifest.getValueByHash(tmpValueObject,tmpValueAddress);if(tmpValue==null||tmpValue=='undefined'||typeof tmpValue=='undefined'){return tmpDefaultValue;}return tmpValue;}}]);}(libPictTemplate);module.exports=PictTemplateProviderDataValueByKey;},{"pict-template":143}],204:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderEntity=/*#__PURE__*/function(_libPictTemplate3){/**
5515
5577
  * @param {Object} pFable - The Fable Framework instance
5516
5578
  * @param {Object} pOptions - The options for the service
5517
5579
  * @param {String} pServiceHash - The hash of the service
@@ -5524,12 +5586,21 @@ return this.contentMap[pAddress];}this.pict.log.warn("Mock read from Address ".c
5524
5586
  *
5525
5587
  * @return {string} The rendered template
5526
5588
  */_inherits(PictTemplateProviderEntity,_libPictTemplate3);return _createClass2(PictTemplateProviderEntity,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){// TODO: Better messaging
5527
- this.log.error("Pict: Entity Render [".concat(pTemplateHash,"]: Render called in a non-asynchronous fashion. This should not happen."));return'';}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fEntityRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fEntityRender]::[".concat(tmpHash,"]"));}var tmpEntity=false;/** @type {string|number} */var tmpEntityID='';var tmpEntityTemplate=false;// This expression requires 2 parts -- a third is optional, and, if present, is the template to render to.
5528
- var tmpAddressParts=tmpHash.split('^');if(tmpAddressParts.length<2){this.log.warn("Pict: Entity Render: Entity or entity ID not resolved for [".concat(tmpHash,"]"));return tmpCallback(Error("Pict: Entity Render: Entity or entity ID not resolved for [".concat(tmpHash,"]")),'');}tmpEntity=tmpAddressParts[0].trim();tmpEntityID=tmpAddressParts[1].trim();tmpEntityTemplate=tmpAddressParts[2].trim();if(!isNaN(Number(tmpEntityID))){try{tmpEntityID=parseInt(String(tmpEntityID));}catch(_unused){this.log.warn("Pict: Entity Render: Could not parse entity ID.");tmpEntityID=0;}}else{// This is an address, so we need to get the value at the address
5589
+ this.log.error("Pict: Entity Render [".concat(pTemplateHash,"]: Render called in a non-asynchronous fashion. This should not happen."));return'';}/**
5590
+ * Render a template expression, deliver a string with the resulting content to a callback function.
5591
+ *
5592
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5593
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5594
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5595
+ * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
5596
+ *
5597
+ * @return {void}
5598
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fEntityRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fEntityRender]::[".concat(tmpHash,"]"));}var tmpEntity;/** @type {string|number} */var tmpEntityID='';var tmpEntityTemplate;// This expression requires 2 parts -- a third is optional, and, if present, is the template to render to.
5599
+ var tmpAddressParts=tmpHash.split('^');if(tmpAddressParts.length<2){this.log.warn("Pict: Entity Render: Entity or entity ID not resolved for [".concat(tmpHash,"]"));return tmpCallback(null,'');}tmpEntity=tmpAddressParts[0].trim();tmpEntityID=tmpAddressParts[1].trim();tmpEntityTemplate=tmpAddressParts[2].trim();if(!isNaN(Number(tmpEntityID))){try{tmpEntityID=parseInt(String(tmpEntityID));}catch(_unused){this.log.warn("Pict: Entity Render: Could not parse entity ID.");tmpEntityID=0;}}else{// This is an address, so we need to get the value at the address
5529
5600
  tmpEntityID=this.resolveStateFromAddress(String(tmpEntityID),tmpData,pContextArray);}// No Entity or EntityID
5530
- if(!tmpEntity||!tmpEntityID){this.log.warn("Pict: Entity Render: Entity or entity ID not resolved for [".concat(tmpHash,"] Entity: ").concat(tmpEntity," ID: ").concat(tmpEntityID));return tmpCallback(Error("Pict: Entity Render: Entity or entity ID not resolved for [".concat(tmpHash,"] Entity: ").concat(tmpEntity," ID: ").concat(tmpEntityID)),'');}if(this.pict.LogNoisiness>3){this.log.trace("Pict: Entity Render: Entity [".concat(tmpEntity,"] with ID [").concat(tmpEntityID,"] as template [").concat(tmpEntityTemplate,"] from [").concat(tmpHash,"]"));}// Now try to get the entity
5601
+ if(!tmpEntity||!tmpEntityID){this.log.warn("Pict: Entity Render: Entity or entity ID not resolved for [".concat(tmpHash,"] Entity: ").concat(tmpEntity," ID: ").concat(tmpEntityID));return tmpCallback(null,'');}if(this.pict.LogNoisiness>3){this.log.trace("Pict: Entity Render: Entity [".concat(tmpEntity,"] with ID [").concat(tmpEntityID,"] as template [").concat(tmpEntityTemplate,"] from [").concat(tmpHash,"]"));}// Now try to get the entity
5531
5602
  this.pict.EntityProvider.getEntity(tmpEntity,tmpEntityID,function(pError,pRecord){if(pError){this.log.error("Pict: Entity Render: Error getting entity [".concat(tmpEntity,"] with ID [").concat(tmpEntityID,"] for [").concat(tmpHash,"]: ").concat(pError),pError);return tmpCallback(pError,'');}// Now render the template
5532
- if(tmpEntityTemplate){return this.pict.parseTemplateByHash(tmpEntityTemplate,pRecord,tmpCallback,pContextArray);}else{return tmpCallback(null,'');}}.bind(this));}}]);}(libPictTemplate);module.exports=PictTemplateProviderEntity;},{"pict-template":143}],205:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderSelf=/*#__PURE__*/function(_libPictTemplate4){/**
5603
+ if(tmpEntityTemplate){this.pict.parseTemplateByHash(tmpEntityTemplate,pRecord,tmpCallback,pContextArray);}else{tmpCallback(null,'');}}.bind(this));}}]);}(libPictTemplate);module.exports=PictTemplateProviderEntity;},{"pict-template":143}],205:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderSelf=/*#__PURE__*/function(_libPictTemplate4){/**
5533
5604
  * @param {Object} pFable - The Fable Framework instance
5534
5605
  * @param {Object} pOptions - The options for the service
5535
5606
  * @param {String} pServiceHash - The hash of the service
@@ -5545,85 +5616,204 @@ if(tmpEntityTemplate){return this.pict.parseTemplateByHash(tmpEntityTemplate,pRe
5545
5616
  * @param {Object} pFable - The Fable Framework instance
5546
5617
  * @param {Object} pOptions - The options for the service
5547
5618
  * @param {String} pServiceHash - The hash of the service
5548
- */function PictTemplateProviderTemplate(pFable,pOptions,pServiceHash){var _this89;_classCallCheck2(this,PictTemplateProviderTemplate);_this89=_callSuper(this,PictTemplateProviderTemplate,[pFable,pOptions,pServiceHash]);/** @type {any} */_this89.log;_this89.addPattern('{~Template:','~}');_this89.addPattern('{~T:','~}');return _this89;}_inherits(PictTemplateProviderTemplate,_libPictTemplate5);return _createClass2(PictTemplateProviderTemplate,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
5619
+ */function PictTemplateProviderTemplate(pFable,pOptions,pServiceHash){var _this89;_classCallCheck2(this,PictTemplateProviderTemplate);_this89=_callSuper(this,PictTemplateProviderTemplate,[pFable,pOptions,pServiceHash]);/** @type {any} */_this89.log;_this89.addPattern('{~Template:','~}');_this89.addPattern('{~T:','~}');return _this89;}/**
5620
+ * Render a template expression, returning a string with the resulting content.
5621
+ *
5622
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5623
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5624
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5625
+ *
5626
+ * @return {string} The rendered template
5627
+ */_inherits(PictTemplateProviderTemplate,_libPictTemplate5);return _createClass2(PictTemplateProviderTemplate,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
5549
5628
  var tmpHashTemplateSeparator=tmpHash.indexOf(':');tmpTemplateHash=tmpHash.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpHash.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateHash=tmpHash;}// No template hash
5550
- if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]");}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
5551
- return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),null,pContextArray);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
5629
+ if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return'';}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
5630
+ return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),null,pContextArray);}}/**
5631
+ * Render a template expression, deliver a string with the resulting content to a callback function.
5632
+ *
5633
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5634
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5635
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5636
+ * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
5637
+ *
5638
+ * @return {void}
5639
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
5552
5640
  var tmpHashTemplateSeparator=tmpHash.indexOf(':');tmpTemplateHash=tmpHash.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpHash.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateHash=tmpHash;}// No template hash
5553
- if(!tmpTemplateHash){this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render Async: TemplateHash not resolved for [".concat(tmpHash,"]");}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
5641
+ if(!tmpTemplateHash){this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
5554
5642
  // The async portion of this is a mind bender because of how entry can happen dynamically from templates
5555
- return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplate;},{"pict-template":143}],207:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplate=/*#__PURE__*/function(_libPictTemplate6){/**
5643
+ this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplate;},{"pict-template":143}],207:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplate=/*#__PURE__*/function(_libPictTemplate6){/**
5556
5644
  * @param {Object} pFable - The Fable Framework instance
5557
5645
  * @param {Object} pOptions - The options for the service
5558
5646
  * @param {String} pServiceHash - The hash of the service
5559
- */function PictTemplateProviderTemplate(pFable,pOptions,pServiceHash){var _this90;_classCallCheck2(this,PictTemplateProviderTemplate);_this90=_callSuper(this,PictTemplateProviderTemplate,[pFable,pOptions,pServiceHash]);/** @type {any} */_this90.log;_this90.addPattern('{~TemplateByReference:','~}');_this90.addPattern('{~TBR:','~}');return _this90;}_inherits(PictTemplateProviderTemplate,_libPictTemplate6);return _createClass2(PictTemplateProviderTemplate,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateRender]::[".concat(tmpHash,"]"));}var tmpTemplateHashReferenceLocation;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
5647
+ */function PictTemplateProviderTemplate(pFable,pOptions,pServiceHash){var _this90;_classCallCheck2(this,PictTemplateProviderTemplate);_this90=_callSuper(this,PictTemplateProviderTemplate,[pFable,pOptions,pServiceHash]);/** @type {any} */_this90.log;_this90.addPattern('{~TemplateByReference:','~}');_this90.addPattern('{~TBR:','~}');return _this90;}/**
5648
+ * Render a template expression, returning a string with the resulting content.
5649
+ *
5650
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5651
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5652
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5653
+ *
5654
+ * @return {string} The rendered template
5655
+ */_inherits(PictTemplateProviderTemplate,_libPictTemplate6);return _createClass2(PictTemplateProviderTemplate,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateRender]::[".concat(tmpHash,"]"));}var tmpTemplateHashReferenceLocation;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
5560
5656
  var tmpHashTemplateSeparator=tmpHash.indexOf(':');tmpTemplateHashReferenceLocation=tmpHash.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpHash.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateHashReferenceLocation=tmpHash;}// No template hash
5561
- if(!tmpTemplateHashReferenceLocation){this.log.warn("Pict: Template Render: TemplateHashReferenceLocation not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: TemplateHashReferenceLocation not resolved for [".concat(tmpHash,"]");}// Now look up the template by the reference
5657
+ if(!tmpTemplateHashReferenceLocation){this.log.warn("Pict: Template Render: TemplateHashReferenceLocation not resolved for [".concat(tmpHash,"]"));return'';}// Now look up the template by the reference
5562
5658
  var tmpTemplateHash=this.resolveStateFromAddress(tmpTemplateHashReferenceLocation,pRecord,pContextArray);// No template hash
5563
- if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]");}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
5564
- return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),null,pContextArray);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateHashReferenceLocation;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
5659
+ if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return'';}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
5660
+ return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),null,pContextArray);}}/**
5661
+ * Render a template expression, deliver a string with the resulting content to a callback function.
5662
+ *
5663
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5664
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5665
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5666
+ * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
5667
+ *
5668
+ * @return {void}
5669
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateHashReferenceLocation;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
5565
5670
  var tmpHashTemplateSeparator=tmpHash.indexOf(':');tmpTemplateHashReferenceLocation=tmpHash.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpHash.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateHashReferenceLocation=tmpHash;}// No template hash
5566
- if(!tmpTemplateHashReferenceLocation){this.log.warn("Pict: Template Render Async: TemplateHashReferenceLocation not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render Async: TemplateHashReferenceLocation not resolved for [".concat(tmpHash,"]");}// Now look up the template by the reference
5671
+ if(!tmpTemplateHashReferenceLocation){this.log.warn("Pict: Template Render Async: TemplateHashReferenceLocation not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now look up the template by the reference
5567
5672
  var tmpTemplateHash=this.resolveStateFromAddress(tmpTemplateHashReferenceLocation,pRecord,pContextArray);// No template hash
5568
- if(!tmpTemplateHash){this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render Async: TemplateHash not resolved for [".concat(tmpHash,"]");}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
5673
+ if(!tmpTemplateHash){this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
5569
5674
  // The async portion of this is a mind bender because of how entry can happen dynamically from templates
5570
- return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplate;},{"pict-template":143}],208:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateFromMap=/*#__PURE__*/function(_libPictTemplate7){/**
5675
+ this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplate;},{"pict-template":143}],208:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateFromMap=/*#__PURE__*/function(_libPictTemplate7){/**
5571
5676
  * @param {Object} pFable - The Fable Framework instance
5572
5677
  * @param {Object} pOptions - The options for the service
5573
5678
  * @param {String} pServiceHash - The hash of the service
5574
- */function PictTemplateProviderTemplateFromMap(pFable,pOptions,pServiceHash){var _this91;_classCallCheck2(this,PictTemplateProviderTemplateFromMap);_this91=_callSuper(this,PictTemplateProviderTemplateFromMap,[pFable,pOptions,pServiceHash]);/** @type {any} */_this91.log;_this91.addPattern('{~TFM:','~}');_this91.addPattern('{~TemplateFromMap:','~}');return _this91;}_inherits(PictTemplateProviderTemplateFromMap,_libPictTemplate7);return _createClass2(PictTemplateProviderTemplateFromMap,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRender]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfMap;var tmpAddressOfKey;// This is a 3 part hash with the map address and the key address both
5679
+ */function PictTemplateProviderTemplateFromMap(pFable,pOptions,pServiceHash){var _this91;_classCallCheck2(this,PictTemplateProviderTemplateFromMap);_this91=_callSuper(this,PictTemplateProviderTemplateFromMap,[pFable,pOptions,pServiceHash]);/** @type {any} */_this91.log;_this91.addPattern('{~TFM:','~}');_this91.addPattern('{~TemplateFromMap:','~}');return _this91;}/**
5680
+ * Render a template expression, returning a string with the resulting content.
5681
+ *
5682
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5683
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5684
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5685
+ *
5686
+ * @return {string} The rendered template
5687
+ */_inherits(PictTemplateProviderTemplateFromMap,_libPictTemplate7);return _createClass2(PictTemplateProviderTemplateFromMap,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRender]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfMap;var tmpAddressOfKey;// This is a 3 part hash with the map address and the key address both
5575
5688
  var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<3){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return'';}tmpTemplateFromMapHash=tmpTemplateHashPart[0];tmpAddressOfMap=tmpTemplateHashPart[1];tmpAddressOfKey=tmpTemplateHashPart[2];// No TemplateFromMap hash
5576
5689
  if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return'';}// Now resolve the data
5577
5690
  var tmpMap=this.resolveStateFromAddress(tmpAddressOfMap,tmpData,pContextArray);var tmpKey=this.resolveStateFromAddress(tmpAddressOfKey,tmpData,pContextArray);if(!tmpMap){this.log.warn("Pict: TemplateFromMap Render: Map not resolved for [".concat(tmpHash,"]"));return'';}tmpData=tmpMap[tmpKey];if(!tmpData){// No address was provided, just render the TemplateFromMap with what this TemplateFromMap has.
5578
- return this.pict.parseTemplateByHash(tmpTemplateFromMapHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateFromMapHash,tmpData,null,pContextArray);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfMap;var tmpAddressOfKey;// This is a 3 part hash with the map address and the key address both
5691
+ return this.pict.parseTemplateByHash(tmpTemplateFromMapHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateFromMapHash,tmpData,null,pContextArray);}}/**
5692
+ * Render a template expression, deliver a string with the resulting content to a callback function.
5693
+ *
5694
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5695
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5696
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5697
+ * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
5698
+ *
5699
+ * @return {void}
5700
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfMap;var tmpAddressOfKey;// This is a 3 part hash with the map address and the key address both
5579
5701
  var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<3){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return fCallback(null,'');}tmpTemplateFromMapHash=tmpTemplateHashPart[0];tmpAddressOfMap=tmpTemplateHashPart[1];tmpAddressOfKey=tmpTemplateHashPart[2];// No TemplateFromMap hash
5580
5702
  if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
5581
5703
  var tmpMap=this.resolveStateFromAddress(tmpAddressOfMap,tmpData,pContextArray);var tmpKey=this.resolveStateFromAddress(tmpAddressOfKey,tmpData,pContextArray);if(!tmpMap){this.log.warn("Pict: TemplateFromMap Render: Map not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}tmpData=tmpMap[tmpKey];if(!tmpData){// No address was provided, just render the TemplateFromMap with what this TemplateFromMap has.
5582
5704
  // The async portion of this is a mind bender because of how entry can happen dynamically from TemplateFromMaps
5583
- return this.pict.parseTemplateByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateFromMap;},{"pict-template":143}],209:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateSet=/*#__PURE__*/function(_libPictTemplate8){/**
5705
+ this.pict.parseTemplateByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{this.pict.parseTemplateByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateFromMap;},{"pict-template":143}],209:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateSet=/*#__PURE__*/function(_libPictTemplate8){/**
5584
5706
  * @param {Object} pFable - The Fable Framework instance
5585
5707
  * @param {Object} pOptions - The options for the service
5586
5708
  * @param {String} pServiceHash - The hash of the service
5587
- */function PictTemplateProviderTemplateSet(pFable,pOptions,pServiceHash){var _this92;_classCallCheck2(this,PictTemplateProviderTemplateSet);_this92=_callSuper(this,PictTemplateProviderTemplateSet,[pFable,pOptions,pServiceHash]);/** @type {any} */_this92.log;_this92.addPattern('{~TemplateSet:','~}');_this92.addPattern('{~TS:','~}');return _this92;}_inherits(PictTemplateProviderTemplateSet,_libPictTemplate8);return _createClass2(PictTemplateProviderTemplateSet,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateSetRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateSetRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
5709
+ */function PictTemplateProviderTemplateSet(pFable,pOptions,pServiceHash){var _this92;_classCallCheck2(this,PictTemplateProviderTemplateSet);_this92=_callSuper(this,PictTemplateProviderTemplateSet,[pFable,pOptions,pServiceHash]);/** @type {any} */_this92.log;_this92.addPattern('{~TemplateSet:','~}');_this92.addPattern('{~TS:','~}');return _this92;}/**
5710
+ * Render a template expression, returning a string with the resulting content.
5711
+ *
5712
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5713
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5714
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5715
+ *
5716
+ * @return {string} The rendered template
5717
+ */_inherits(PictTemplateProviderTemplateSet,_libPictTemplate8);return _createClass2(PictTemplateProviderTemplateSet,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateSetRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateSetRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
5588
5718
  var tmpHashTemplateSeparator=tmpHash.indexOf(':');tmpTemplateHash=tmpHash.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpHash.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateHash=tmpHash;}// No template hash
5589
- if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]");}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
5590
- return this.pict.parseTemplateSetByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateSetByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),null,pContextArray);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateSetRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateSetRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfData;// This is a 3 part hash with the map address and the key address both
5719
+ if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return'';}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
5720
+ return this.pict.parseTemplateSetByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateSetByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),null,pContextArray);}}/**
5721
+ * Render a template expression, deliver a string with the resulting content to a callback function.
5722
+ *
5723
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5724
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5725
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5726
+ * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
5727
+ *
5728
+ * @return {void}
5729
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateSetRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateSetRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfData;// This is a 3 part hash with the map address and the key address both
5591
5730
  var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<2){this.log.trace("PICT TemplateFromMap [fTemplateRenderAsync]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return fCallback(null,'');}tmpTemplateFromMapHash=tmpTemplateHashPart[0];tmpAddressOfData=tmpTemplateHashPart[1];// No TemplateFromMap hash
5592
5731
  if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
5593
5732
  tmpData=this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray);if(!tmpData){// No address was provided, just render the template with what this template has.
5594
5733
  // The async portion of this is a mind bender because of how entry can happen dynamically from templates
5595
- return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSet;},{"pict-template":143}],210:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateSetFromMap=/*#__PURE__*/function(_libPictTemplate9){/**
5734
+ this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSet;},{"pict-template":143}],210:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateSetFromMap=/*#__PURE__*/function(_libPictTemplate9){/**
5596
5735
  * @param {Object} pFable - The Fable Framework instance
5597
5736
  * @param {Object} pOptions - The options for the service
5598
5737
  * @param {String} pServiceHash - The hash of the service
5599
- */function PictTemplateProviderTemplateSetFromMap(pFable,pOptions,pServiceHash){var _this93;_classCallCheck2(this,PictTemplateProviderTemplateSetFromMap);_this93=_callSuper(this,PictTemplateProviderTemplateSetFromMap,[pFable,pOptions,pServiceHash]);/** @type {any} */_this93.log;_this93.addPattern('{~TSFM:','~}');_this93.addPattern('{~TemplateSetFromMap:','~}');return _this93;}_inherits(PictTemplateProviderTemplateSetFromMap,_libPictTemplate9);return _createClass2(PictTemplateProviderTemplateSetFromMap,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRender]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfMap;var tmpAddressOfKey;// This is a 3 part hash with the map address and the key address both
5738
+ */function PictTemplateProviderTemplateSetFromMap(pFable,pOptions,pServiceHash){var _this93;_classCallCheck2(this,PictTemplateProviderTemplateSetFromMap);_this93=_callSuper(this,PictTemplateProviderTemplateSetFromMap,[pFable,pOptions,pServiceHash]);/** @type {any} */_this93.log;_this93.addPattern('{~TSFM:','~}');_this93.addPattern('{~TemplateSetFromMap:','~}');return _this93;}/**
5739
+ * Render a template expression, returning a string with the resulting content.
5740
+ *
5741
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5742
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5743
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5744
+ *
5745
+ * @return {string} The rendered template
5746
+ */_inherits(PictTemplateProviderTemplateSetFromMap,_libPictTemplate9);return _createClass2(PictTemplateProviderTemplateSetFromMap,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRender]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfMap;var tmpAddressOfKey;// This is a 3 part hash with the map address and the key address both
5600
5747
  var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<3){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return'';}tmpTemplateFromMapHash=tmpTemplateHashPart[0];tmpAddressOfMap=tmpTemplateHashPart[1];tmpAddressOfKey=tmpTemplateHashPart[2];// No TemplateFromMap hash
5601
5748
  if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return'';}// Now resolve the data
5602
5749
  var tmpMap=this.resolveStateFromAddress(tmpAddressOfMap,tmpData,pContextArray);var tmpKey=this.resolveStateFromAddress(tmpAddressOfKey,tmpData,pContextArray);if(!tmpMap){this.log.warn("Pict: TemplateFromMap Render: Map not resolved for [".concat(tmpHash,"]"));return'';}tmpData=tmpMap[tmpKey];if(!tmpData){// No address was provided, just render the TemplateFromMap with what this TemplateFromMap has.
5603
- return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,null,pContextArray);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfMap;var tmpAddressOfKey;// This is a 3 part hash with the map address and the key address both
5750
+ return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,null,pContextArray);}}/**
5751
+ * Render a template expression, deliver a string with the resulting content to a callback function.
5752
+ *
5753
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5754
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5755
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5756
+ * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
5757
+ *
5758
+ * @return {void}
5759
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfMap;var tmpAddressOfKey;// This is a 3 part hash with the map address and the key address both
5604
5760
  var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<3){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return fCallback(null,'');}tmpTemplateFromMapHash=tmpTemplateHashPart[0];tmpAddressOfMap=tmpTemplateHashPart[1];tmpAddressOfKey=tmpTemplateHashPart[2];// No TemplateFromMap hash
5605
5761
  if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMapSet Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
5606
5762
  var tmpMap=this.resolveStateFromAddress(tmpAddressOfMap,tmpData,pContextArray);var tmpKey=this.resolveStateFromAddress(tmpAddressOfKey,tmpData,pContextArray);if(!tmpMap){this.log.warn("Pict: TemplateFromMapSet Render: Map not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}tmpData=tmpMap[tmpKey];if(!tmpData){// No address was provided, just render the TemplateFromMap with what this TemplateFromMap has.
5607
5763
  // The async portion of this is a mind bender because of how entry can happen dynamically from TemplateFromMaps
5608
- return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSetFromMap;},{"pict-template":143}],211:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateSetWithPayload=/*#__PURE__*/function(_libPictTemplate10){/**
5764
+ this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSetFromMap;},{"pict-template":143}],211:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateSetWithPayload=/*#__PURE__*/function(_libPictTemplate10){/**
5609
5765
  * @param {Object} pFable - The Fable Framework instance
5610
5766
  * @param {Object} pOptions - The options for the service
5611
5767
  * @param {String} pServiceHash - The hash of the service
5612
- */function PictTemplateProviderTemplateSetWithPayload(pFable,pOptions,pServiceHash){var _this94;_classCallCheck2(this,PictTemplateProviderTemplateSetWithPayload);_this94=_callSuper(this,PictTemplateProviderTemplateSetWithPayload,[pFable,pOptions,pServiceHash]);/** @type {any} */_this94.log;_this94.addPattern('{~TemplateSetWithPayload:','~}');_this94.addPattern('{~TSWP:','~}');return _this94;}_inherits(PictTemplateProviderTemplateSetWithPayload,_libPictTemplate10);return _createClass2(PictTemplateProviderTemplateSetWithPayload,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(tmpHash,"] with record:"),pRecord);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpAddressOfPayload;// This is just a simple 3 part hash (template, address of set, address of payload)
5613
- var tmpTemplateHashes=tmpHash.trim().split(':');if(tmpTemplateHashes.length<3){this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return"";}tmpTemplateHash=tmpTemplateHashes[0];tmpAddressOfData=tmpTemplateHashes[1];tmpAddressOfPayload=tmpTemplateHashes[2];var tmpData=this.resolveStateFromAddress(tmpAddressOfData,pRecord,pContextArray);if(!tmpData){tmpData=pRecord;}if(!tmpData){tmpData={};}var tmpPayloadData=this.resolveStateFromAddress(tmpAddressOfPayload,pRecord,pContextArray);if(!tmpPayloadData){tmpPayloadData=pRecord;}if(!tmpPayloadData){tmpPayloadData={};}return this.pict.parseTemplateSetWithPayloadByHash(tmpTemplateHash,tmpData,tmpPayloadData,null,pContextArray);}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateSetWithPayloadRenderAsync]::[".concat(tmpHash,"]"));}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateSetWithPayloadRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpAddressOfPayload;// This is just a simple 3 part hash (template, address of set, address of payload)
5614
- var tmpTemplateHashes=tmpHash.trim().split(':');if(tmpTemplateHashes.length<3){this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return"";}tmpTemplateHash=tmpTemplateHashes[0];tmpAddressOfData=tmpTemplateHashes[1];tmpAddressOfPayload=tmpTemplateHashes[2];var tmpData=this.resolveStateFromAddress(tmpAddressOfData,pRecord,pContextArray);if(!tmpData){tmpData=pRecord;}if(!tmpData){tmpData={};}var tmpPayloadData=this.resolveStateFromAddress(tmpAddressOfPayload,pRecord,pContextArray);if(!tmpPayloadData){tmpPayloadData=pRecord;}if(!tmpPayloadData){tmpPayloadData={};}return this.pict.parseTemplateSetWithPayloadByHash(tmpTemplateHash,tmpData,tmpPayloadData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSetWithPayload;},{"pict-template":143}],212:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateValueSet=/*#__PURE__*/function(_libPictTemplate11){/**
5768
+ */function PictTemplateProviderTemplateSetWithPayload(pFable,pOptions,pServiceHash){var _this94;_classCallCheck2(this,PictTemplateProviderTemplateSetWithPayload);_this94=_callSuper(this,PictTemplateProviderTemplateSetWithPayload,[pFable,pOptions,pServiceHash]);/** @type {any} */_this94.log;_this94.addPattern('{~TemplateSetWithPayload:','~}');_this94.addPattern('{~TSWP:','~}');return _this94;}/**
5769
+ * Render a template expression, returning a string with the resulting content.
5770
+ *
5771
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5772
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5773
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5774
+ *
5775
+ * @return {string} The rendered template
5776
+ */_inherits(PictTemplateProviderTemplateSetWithPayload,_libPictTemplate10);return _createClass2(PictTemplateProviderTemplateSetWithPayload,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(tmpHash,"] with record:"),pRecord);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpAddressOfPayload;// This is just a simple 3 part hash (template, address of set, address of payload)
5777
+ var tmpTemplateHashes=tmpHash.trim().split(':');if(tmpTemplateHashes.length<3){this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return"";}tmpTemplateHash=tmpTemplateHashes[0];tmpAddressOfData=tmpTemplateHashes[1];tmpAddressOfPayload=tmpTemplateHashes[2];var tmpData=this.resolveStateFromAddress(tmpAddressOfData,pRecord,pContextArray);if(!tmpData){tmpData=pRecord;}if(!tmpData){tmpData={};}var tmpPayloadData=this.resolveStateFromAddress(tmpAddressOfPayload,pRecord,pContextArray);if(!tmpPayloadData){tmpPayloadData=pRecord;}if(!tmpPayloadData){tmpPayloadData={};}return this.pict.parseTemplateSetWithPayloadByHash(tmpTemplateHash,tmpData,tmpPayloadData,null,pContextArray);}/**
5778
+ * Render a template expression, deliver a string with the resulting content to a callback function.
5779
+ *
5780
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5781
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5782
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5783
+ * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
5784
+ *
5785
+ * @return {void}
5786
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateSetWithPayloadRenderAsync]::[".concat(tmpHash,"]"));}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateSetWithPayloadRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpAddressOfPayload;// This is just a simple 3 part hash (template, address of set, address of payload)
5787
+ var tmpTemplateHashes=tmpHash.trim().split(':');if(tmpTemplateHashes.length<3){this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return fCallback(null,'');}tmpTemplateHash=tmpTemplateHashes[0];tmpAddressOfData=tmpTemplateHashes[1];tmpAddressOfPayload=tmpTemplateHashes[2];var tmpData=this.resolveStateFromAddress(tmpAddressOfData,pRecord,pContextArray);if(!tmpData){tmpData=pRecord;}if(!tmpData){tmpData={};}var tmpPayloadData=this.resolveStateFromAddress(tmpAddressOfPayload,pRecord,pContextArray);if(!tmpPayloadData){tmpPayloadData=pRecord;}if(!tmpPayloadData){tmpPayloadData={};}return this.pict.parseTemplateSetWithPayloadByHash(tmpTemplateHash,tmpData,tmpPayloadData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSetWithPayload;},{"pict-template":143}],212:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateValueSet=/*#__PURE__*/function(_libPictTemplate11){/**
5615
5788
  * @param {Object} pFable - The Fable Framework instance
5616
5789
  * @param {Object} pOptions - The options for the service
5617
5790
  * @param {String} pServiceHash - The hash of the service
5618
- */function PictTemplateProviderTemplateValueSet(pFable,pOptions,pServiceHash){var _this95;_classCallCheck2(this,PictTemplateProviderTemplateValueSet);_this95=_callSuper(this,PictTemplateProviderTemplateValueSet,[pFable,pOptions,pServiceHash]);/** @type {any} */_this95.log;_this95.addPattern('{~TemplateValueSet:','~}');_this95.addPattern('{~TVS:','~}');return _this95;}_inherits(PictTemplateProviderTemplateValueSet,_libPictTemplate11);return _createClass2(PictTemplateProviderTemplateValueSet,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateValueSetRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateValueSetRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
5791
+ */function PictTemplateProviderTemplateValueSet(pFable,pOptions,pServiceHash){var _this95;_classCallCheck2(this,PictTemplateProviderTemplateValueSet);_this95=_callSuper(this,PictTemplateProviderTemplateValueSet,[pFable,pOptions,pServiceHash]);/** @type {any} */_this95.log;_this95.addPattern('{~TemplateValueSet:','~}');_this95.addPattern('{~TVS:','~}');return _this95;}/**
5792
+ * Render a template expression, returning a string with the resulting content.
5793
+ *
5794
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5795
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5796
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5797
+ *
5798
+ * @return {string} The rendered template
5799
+ */_inherits(PictTemplateProviderTemplateValueSet,_libPictTemplate11);return _createClass2(PictTemplateProviderTemplateValueSet,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateValueSetRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateValueSetRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
5619
5800
  var tmpHashTemplateSeparator=tmpHash.indexOf(':');tmpTemplateHash=tmpHash.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpHash.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateHash=tmpHash;}// No template hash
5620
- if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]");}tmpData=this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray);var tmpDataValueSet=[];if(Array.isArray(tmpData)){for(var i=0;i<tmpData.length;i++){tmpDataValueSet.push({Value:tmpData[i],Key:i});}}else if(_typeof(tmpData)==='object'){var tmpValueKeys=Object.keys(tmpData);for(var _i60=0;_i60<tmpValueKeys.length;_i60++){tmpDataValueSet.push({Value:tmpData[tmpValueKeys[_i60]],Key:tmpValueKeys[_i60]});}}else{tmpDataValueSet.push({Value:tmpData});}tmpData=tmpDataValueSet;if(!tmpData){// No address was provided, just render the template with what this template has.
5621
- return this.pict.parseTemplateSetByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateSetByHash(tmpTemplateHash,tmpData,null,pContextArray);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateValueSetRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateValueSetRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfData;// This is a 3 part hash with the map address and the key address both
5801
+ if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return'';}tmpData=this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray);var tmpDataValueSet=[];if(Array.isArray(tmpData)){for(var i=0;i<tmpData.length;i++){tmpDataValueSet.push({Value:tmpData[i],Key:i});}}else if(_typeof(tmpData)==='object'){var tmpValueKeys=Object.keys(tmpData);for(var _i62=0;_i62<tmpValueKeys.length;_i62++){tmpDataValueSet.push({Value:tmpData[tmpValueKeys[_i62]],Key:tmpValueKeys[_i62]});}}else{tmpDataValueSet.push({Value:tmpData});}tmpData=tmpDataValueSet;if(!tmpData){// No address was provided, just render the template with what this template has.
5802
+ return this.pict.parseTemplateSetByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateSetByHash(tmpTemplateHash,tmpData,null,pContextArray);}}/**
5803
+ * Render a template expression, deliver a string with the resulting content to a callback function.
5804
+ *
5805
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5806
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5807
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5808
+ * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
5809
+ *
5810
+ * @return {void}
5811
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateValueSetRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateValueSetRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfData;// This is a 3 part hash with the map address and the key address both
5622
5812
  var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<2){this.log.trace("PICT TemplateFromMap [fTemplateRenderAsync]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return fCallback(null,'');}tmpTemplateFromMapHash=tmpTemplateHashPart[0];tmpAddressOfData=tmpTemplateHashPart[1];// No TemplateFromMap hash
5623
5813
  if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
5624
- tmpData=this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray);var tmpDataValueSet=[];if(Array.isArray(tmpData)){for(var i=0;i<tmpData.length;i++){tmpDataValueSet.push({Value:tmpData[i],Key:i});}}else if(_typeof(tmpData)==='object'){var tmpValueKeys=Object.keys(tmpData);for(var _i61=0;_i61<tmpValueKeys.length;_i61++){tmpDataValueSet.push({Value:tmpData[tmpValueKeys[_i61]],Key:tmpData[tmpValueKeys[_i61]]});}}else{tmpDataValueSet.push({Value:tmpData});}tmpData=tmpDataValueSet;if(!tmpData){// No address was provided, just render the template with what this template has.
5814
+ tmpData=this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray);var tmpDataValueSet=[];if(Array.isArray(tmpData)){for(var i=0;i<tmpData.length;i++){tmpDataValueSet.push({Value:tmpData[i],Key:i});}}else if(_typeof(tmpData)==='object'){var tmpValueKeys=Object.keys(tmpData);for(var _i63=0;_i63<tmpValueKeys.length;_i63++){tmpDataValueSet.push({Value:tmpData[tmpValueKeys[_i63]],Key:tmpData[tmpValueKeys[_i63]]});}}else{tmpDataValueSet.push({Value:tmpData});}tmpData=tmpDataValueSet;if(!tmpData){// No address was provided, just render the template with what this template has.
5625
5815
  // The async portion of this is a mind bender because of how entry can happen dynamically from templates
5626
- return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateValueSet;},{"pict-template":143}],213:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderView=/*#__PURE__*/function(_libPictTemplate12){/**
5816
+ this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateValueSet;},{"pict-template":143}],213:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderView=/*#__PURE__*/function(_libPictTemplate12){/**
5627
5817
  * @param {Object} pFable - The Fable Framework instance
5628
5818
  * @param {Object} pOptions - The options for the service
5629
5819
  * @param {String} pServiceHash - The hash of the service
@@ -5637,36 +5827,86 @@ return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(
5637
5827
  * @return {string} The rendered template
5638
5828
  */_inherits(PictTemplateProviderView,_libPictTemplate12);return _createClass2(PictTemplateProviderView,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpViewHash=pTemplateHash.trim();if(!(tmpViewHash in this.pict.views)){this.log.warn("Pict: View Template Render: View not found for [".concat(tmpViewHash,"]"));return'';}var tmpRenderGUID=this.pict.getUUID();var tmpView=this.pict.views[tmpViewHash];tmpView.render('__Virtual',"__TemplateOutputCache.".concat(tmpRenderGUID),pRecord);var tmpResult=this.pict.__TemplateOutputCache[tmpRenderGUID];// TODO: Uncomment this when we like how it's working
5639
5829
  //delete this.pict.__TemplateOutputCache[tmpRenderGUID];
5640
- return tmpResult;}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var _this97=this;var tmpViewHash=pTemplateHash.trim();if(!(tmpViewHash in this.pict.views)){this.log.warn("Pict: View Template Render: View not found for [".concat(tmpViewHash,"]"));return'';}var tmpRenderGUID=this.pict.getUUID();var tmpView=this.pict.views[tmpViewHash];return tmpView.renderAsync('__Virtual',"__TemplateOutputCache.".concat(tmpRenderGUID),pRecord,function(pError,pResult){if(pError){_this97.log.warn("Pict: View Template Render: Error rendering view [".concat(tmpViewHash,"]"),pError);return fCallback(pError,'');}var tmpResult=_this97.pict.__TemplateOutputCache[tmpRenderGUID];// TODO: Uncomment this when we like how it's working
5830
+ return tmpResult;}/**
5831
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5832
+ * @param {any} pRecord - The json object to be used as the Record for the template
5833
+ * @param {(pError?: Error, pResult?: string) => void} fCallback - The callback function to call with the result
5834
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5835
+ * @return {void}
5836
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var _this97=this;var tmpViewHash=pTemplateHash.trim();if(!(tmpViewHash in this.pict.views)){this.log.warn("Pict: View Template Render: View not found for [".concat(tmpViewHash,"]"));return fCallback(null,'');}var tmpRenderGUID=this.pict.getUUID();var tmpView=this.pict.views[tmpViewHash];return tmpView.renderAsync('__Virtual',"__TemplateOutputCache.".concat(tmpRenderGUID),pRecord,function(pError,pResult){if(pError){_this97.log.warn("Pict: View Template Render: Error rendering view [".concat(tmpViewHash,"]"),pError);return fCallback(pError,'');}var tmpResult=_this97.pict.__TemplateOutputCache[tmpRenderGUID];// TODO: Uncomment this when we like how it's working
5641
5837
  //delete this.pict.__TemplateOutputCache[tmpRenderGUID];
5642
5838
  return fCallback(null,tmpResult);});}}]);}(libPictTemplate);module.exports=PictTemplateProviderView;},{"pict-template":143}],214:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderRandomNumber=/*#__PURE__*/function(_libPictTemplate13){/**
5643
5839
  * @param {Object} pFable - The Fable Framework instance
5644
5840
  * @param {Object} pOptions - The options for the service
5645
5841
  * @param {String} pServiceHash - The hash of the service
5646
- */function PictTemplateProviderRandomNumber(pFable,pOptions,pServiceHash){var _this98;_classCallCheck2(this,PictTemplateProviderRandomNumber);_this98=_callSuper(this,PictTemplateProviderRandomNumber,[pFable,pOptions,pServiceHash]);/** @type {any} */_this98.log;_this98.addPattern('{~RandomNumber:','~}');_this98.addPattern('{~RN:','~}');return _this98;}_inherits(PictTemplateProviderRandomNumber,_libPictTemplate13);return _createClass2(PictTemplateProviderRandomNumber,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fRandomNumber]::[".concat(tmpHash,"]"));}var tmpMinimumNumber=0;var tmpMaxNumber=9999999;if(tmpHash.length>0){var tmpHashParts=tmpHash.split(',');if(tmpHashParts.length>0){try{tmpMinimumNumber=parseInt(tmpHashParts[0]);}catch(_unused2){tmpMinimumNumber=0;}}if(tmpHashParts.length>1){try{tmpMaxNumber=parseInt(tmpHashParts[1]);}catch(_unused3){tmpMaxNumber=9999999;}}}return this.fable.DataGeneration.randomIntegerBetween(tmpMinimumNumber,tmpMaxNumber);}}]);}(libPictTemplate);module.exports=PictTemplateProviderRandomNumber;},{"pict-template":143}],215:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderRandomNumberString=/*#__PURE__*/function(_libPictTemplate14){/**
5842
+ */function PictTemplateProviderRandomNumber(pFable,pOptions,pServiceHash){var _this98;_classCallCheck2(this,PictTemplateProviderRandomNumber);_this98=_callSuper(this,PictTemplateProviderRandomNumber,[pFable,pOptions,pServiceHash]);/** @type {any} */_this98.log;_this98.addPattern('{~RandomNumber:','~}');_this98.addPattern('{~RN:','~}');return _this98;}/**
5843
+ * Render a template expression, returning a string with the resulting content.
5844
+ *
5845
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5846
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5847
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5848
+ *
5849
+ * @return {string} The rendered template
5850
+ */_inherits(PictTemplateProviderRandomNumber,_libPictTemplate13);return _createClass2(PictTemplateProviderRandomNumber,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fRandomNumber]::[".concat(tmpHash,"]"));}var tmpMinimumNumber=0;var tmpMaxNumber=9999999;if(tmpHash.length>0){var tmpHashParts=tmpHash.split(',');if(tmpHashParts.length>0){try{tmpMinimumNumber=parseInt(tmpHashParts[0]);}catch(_unused2){tmpMinimumNumber=0;}}if(tmpHashParts.length>1){try{tmpMaxNumber=parseInt(tmpHashParts[1]);}catch(_unused3){tmpMaxNumber=9999999;}}}return this.fable.DataGeneration.randomIntegerBetween(tmpMinimumNumber,tmpMaxNumber);}}]);}(libPictTemplate);module.exports=PictTemplateProviderRandomNumber;},{"pict-template":143}],215:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderRandomNumberString=/*#__PURE__*/function(_libPictTemplate14){/**
5647
5851
  * @param {Object} pFable - The Fable Framework instance
5648
5852
  * @param {Object} pOptions - The options for the service
5649
5853
  * @param {String} pServiceHash - The hash of the service
5650
- */function PictTemplateProviderRandomNumberString(pFable,pOptions,pServiceHash){var _this99;_classCallCheck2(this,PictTemplateProviderRandomNumberString);_this99=_callSuper(this,PictTemplateProviderRandomNumberString,[pFable,pOptions,pServiceHash]);/** @type {any} */_this99.log;_this99.addPattern('{~RandomNumberString:','~}');_this99.addPattern('{~RNS:','~}');return _this99;}_inherits(PictTemplateProviderRandomNumberString,_libPictTemplate14);return _createClass2(PictTemplateProviderRandomNumberString,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fRandomNumberString]::[".concat(tmpHash,"]"));}var tmpStringLength=4;var tmpMaxNumber=9999;if(tmpHash.length>0){var tmpHashParts=tmpHash.split(',');if(tmpHashParts.length>0){try{tmpStringLength=parseInt(tmpHashParts[0]);}catch(_unused4){tmpStringLength=4;}}if(tmpHashParts.length>1){try{tmpMaxNumber=parseInt(tmpHashParts[1]);}catch(_unused5){tmpMaxNumber=9999;}}}return this.fable.DataGeneration.randomNumericString(tmpStringLength,tmpMaxNumber);}}]);}(libPictTemplate);module.exports=PictTemplateProviderRandomNumberString;},{"pict-template":143}],216:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDollars=/*#__PURE__*/function(_libPictTemplate15){/**
5854
+ */function PictTemplateProviderRandomNumberString(pFable,pOptions,pServiceHash){var _this99;_classCallCheck2(this,PictTemplateProviderRandomNumberString);_this99=_callSuper(this,PictTemplateProviderRandomNumberString,[pFable,pOptions,pServiceHash]);/** @type {any} */_this99.log;_this99.addPattern('{~RandomNumberString:','~}');_this99.addPattern('{~RNS:','~}');return _this99;}/**
5855
+ * Render a template expression, returning a string with the resulting content.
5856
+ *
5857
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5858
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5859
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5860
+ *
5861
+ * @return {string} The rendered template
5862
+ */_inherits(PictTemplateProviderRandomNumberString,_libPictTemplate14);return _createClass2(PictTemplateProviderRandomNumberString,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fRandomNumberString]::[".concat(tmpHash,"]"));}var tmpStringLength=4;var tmpMaxNumber=9999;if(tmpHash.length>0){var tmpHashParts=tmpHash.split(',');if(tmpHashParts.length>0){try{tmpStringLength=parseInt(tmpHashParts[0]);}catch(_unused4){tmpStringLength=4;}}if(tmpHashParts.length>1){try{tmpMaxNumber=parseInt(tmpHashParts[1]);}catch(_unused5){tmpMaxNumber=9999;}}}return this.fable.DataGeneration.randomNumericString(tmpStringLength,tmpMaxNumber);}}]);}(libPictTemplate);module.exports=PictTemplateProviderRandomNumberString;},{"pict-template":143}],216:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDataEncodeJavascriptString=/*#__PURE__*/function(_libPictTemplate15){/**
5651
5863
  * @param {Object} pFable - The Fable Framework instance
5652
5864
  * @param {Object} pOptions - The options for the service
5653
5865
  * @param {String} pServiceHash - The hash of the service
5654
- */function PictTemplateProviderDollars(pFable,pOptions,pServiceHash){var _this100;_classCallCheck2(this,PictTemplateProviderDollars);_this100=_callSuper(this,PictTemplateProviderDollars,[pFable,pOptions,pServiceHash]);/** @type {any} */_this100.log;_this100.addPattern('{~DataJson:','~}');_this100.addPattern('{~DJ:','~}');return _this100;}_inherits(PictTemplateProviderDollars,_libPictTemplate15);return _createClass2(PictTemplateProviderDollars,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataJson]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataJson]::[".concat(tmpHash,"]"));}var tmpDataToStringify=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);if(!tmpDataToStringify){tmpDataToStringify=pRecord;}return JSON.stringify(tmpDataToStringify);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDollars;},{"pict-template":143}],217:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateOnlyFormat=/*#__PURE__*/function(_libPictTemplate16){/**
5866
+ */function PictTemplateProviderDataEncodeJavascriptString(pFable,pOptions,pServiceHash){var _this100;_classCallCheck2(this,PictTemplateProviderDataEncodeJavascriptString);_this100=_callSuper(this,PictTemplateProviderDataEncodeJavascriptString,[pFable,pOptions,pServiceHash]);/** @type {any} */_this100.log;_this100.addPattern('{~DataEncodeJavascriptString:','~}');_this100.addPattern('{~DEJS:','~}');return _this100;}/**
5867
+ * Render a template expression, returning a string with the resulting content.
5868
+ *
5869
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5870
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5871
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5872
+ *
5873
+ * @return {string} The rendered template
5874
+ */_inherits(PictTemplateProviderDataEncodeJavascriptString,_libPictTemplate15);return _createClass2(PictTemplateProviderDataEncodeJavascriptString,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataJson]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataJson]::[".concat(tmpHash,"]"));}var tmpDataToEncode=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);return this.pict.DataFormat.stringEncodeForJavascript(tmpDataToEncode);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDataEncodeJavascriptString;},{"pict-template":143}],217:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJSONOutput=/*#__PURE__*/function(_libPictTemplate16){/**
5875
+ * @param {Object} pFable - The Fable Framework instance
5876
+ * @param {Object} pOptions - The options for the service
5877
+ * @param {String} pServiceHash - The hash of the service
5878
+ */function PictTemplateProviderJSONOutput(pFable,pOptions,pServiceHash){var _this101;_classCallCheck2(this,PictTemplateProviderJSONOutput);_this101=_callSuper(this,PictTemplateProviderJSONOutput,[pFable,pOptions,pServiceHash]);/** @type {any} */_this101.log;_this101.addPattern('{~DataJson:','~}');_this101.addPattern('{~DJ:','~}');return _this101;}/**
5879
+ * Render a template expression, returning a string with the resulting content.
5880
+ *
5881
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5882
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5883
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5884
+ *
5885
+ * @return {string} The rendered template
5886
+ */_inherits(PictTemplateProviderJSONOutput,_libPictTemplate16);return _createClass2(PictTemplateProviderJSONOutput,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataJson]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataJson]::[".concat(tmpHash,"]"));}var tmpDataToStringify=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);if(!tmpDataToStringify){tmpDataToStringify=pRecord;}return JSON.stringify(tmpDataToStringify);}}]);}(libPictTemplate);module.exports=PictTemplateProviderJSONOutput;},{"pict-template":143}],218:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateOnlyFormat=/*#__PURE__*/function(_libPictTemplate17){/**
5655
5887
  * @param {import('fable')} pFable - The Fable Framework instance
5656
5888
  * @param {any} pOptions - The options for the service
5657
5889
  * @param {String} pServiceHash - The hash of the service
5658
- */function PictTemplateProviderDateOnlyFormat(pFable,pOptions,pServiceHash){var _this101;_classCallCheck2(this,PictTemplateProviderDateOnlyFormat);_this101=_callSuper(this,PictTemplateProviderDateOnlyFormat,[pFable,pOptions,pServiceHash]);/** @type {any} */_this101.options;/** @type {any} */_this101.log;_this101.addPattern('{~DateOnlyFormat:','~}');return _this101;}_inherits(PictTemplateProviderDateOnlyFormat,_libPictTemplate16);return _createClass2(PictTemplateProviderDateOnlyFormat,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValueSet=tmpHash.split('^');if(tmpDateValueSet.length<2){this.log.error("PICT Template [fDateOnlyFormat]::[".concat(tmpHash,"] did not have a valid format string and date."));return'';}var tmpDateValue=this.resolveStateFromAddress(tmpDateValueSet[0],tmpData,pContextArray);if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDateOnlyFormat]::[".concat(tmpHash,"] with data:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDateOnlyFormat]::[".concat(tmpHash,"]"));}// TODO: Modularize this
5890
+ */function PictTemplateProviderDateOnlyFormat(pFable,pOptions,pServiceHash){var _this102;_classCallCheck2(this,PictTemplateProviderDateOnlyFormat);_this102=_callSuper(this,PictTemplateProviderDateOnlyFormat,[pFable,pOptions,pServiceHash]);/** @type {any} */_this102.options;/** @type {any} */_this102.log;_this102.addPattern('{~DateOnlyFormat:','~}');return _this102;}/**
5891
+ * Render a template expression, returning a string with the resulting content.
5892
+ *
5893
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5894
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5895
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5896
+ *
5897
+ * @return {string} The rendered template
5898
+ */_inherits(PictTemplateProviderDateOnlyFormat,_libPictTemplate17);return _createClass2(PictTemplateProviderDateOnlyFormat,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValueSet=tmpHash.split('^');if(tmpDateValueSet.length<2){this.log.error("PICT Template [fDateOnlyFormat]::[".concat(tmpHash,"] did not have a valid format string and date."));return'';}var tmpDateValue=this.resolveStateFromAddress(tmpDateValueSet[0],tmpData,pContextArray);if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDateOnlyFormat]::[".concat(tmpHash,"] with data:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDateOnlyFormat]::[".concat(tmpHash,"]"));}// TODO: Modularize this
5659
5899
  var tmpDayJS=this.fable.Dates.dayJS.utc(tmpDateValue).tz('UTC');return tmpDayJS.format(tmpDateValueSet[1]);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDateOnlyFormat;/*
5660
5900
  # DEAR DEAD CODE DIARY:
5661
5901
 
5662
5902
  ```javascript
5663
5903
 
5664
5904
  ```
5665
- */},{"pict-template":143}],218:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateOnlyYMD=/*#__PURE__*/function(_libPictTemplate17){/**
5905
+ */},{"pict-template":143}],219:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateOnlyYMD=/*#__PURE__*/function(_libPictTemplate18){/**
5666
5906
  * @param {Object} pFable - The Fable Framework instance
5667
5907
  * @param {Object} pOptions - The options for the service
5668
5908
  * @param {String} pServiceHash - The hash of the service
5669
- */function PictTemplateProviderDateOnlyYMD(pFable,pOptions,pServiceHash){var _this102;_classCallCheck2(this,PictTemplateProviderDateOnlyYMD);_this102=_callSuper(this,PictTemplateProviderDateOnlyYMD,[pFable,pOptions,pServiceHash]);/** @type {any} */_this102.options;/** @type {any} */_this102.log;_this102.addPattern('{~DateOnlyYMD:','~}');return _this102;}/**
5909
+ */function PictTemplateProviderDateOnlyYMD(pFable,pOptions,pServiceHash){var _this103;_classCallCheck2(this,PictTemplateProviderDateOnlyYMD);_this103=_callSuper(this,PictTemplateProviderDateOnlyYMD,[pFable,pOptions,pServiceHash]);/** @type {any} */_this103.options;/** @type {any} */_this103.log;_this103.addPattern('{~DateOnlyYMD:','~}');return _this103;}/**
5670
5910
  * Render a template expression, returning a string with the resulting content.
5671
5911
  *
5672
5912
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
@@ -5674,15 +5914,23 @@ var tmpDayJS=this.fable.Dates.dayJS.utc(tmpDateValue).tz('UTC');return tmpDayJS.
5674
5914
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5675
5915
  *
5676
5916
  * @return {string} The rendered template
5677
- */_inherits(PictTemplateProviderDateOnlyYMD,_libPictTemplate17);return _createClass2(PictTemplateProviderDateOnlyYMD,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDateTimeYMD]::[".concat(tmpHash,"] with data:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDateTimeYMD]::[".concat(tmpHash,"]"));}// TODO: Modularize this
5917
+ */_inherits(PictTemplateProviderDateOnlyYMD,_libPictTemplate18);return _createClass2(PictTemplateProviderDateOnlyYMD,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDateTimeYMD]::[".concat(tmpHash,"] with data:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDateTimeYMD]::[".concat(tmpHash,"]"));}// TODO: Modularize this
5678
5918
  var tmpDayJS=this.fable.Dates.dayJS.utc(tmpDateValue).tz('UTC');//FIXME: this is kind of wacked out; -62167219200000 is the unix ms timestamp for 0000-01-01 00:00:00 UTC
5679
5919
  // not even sure showing negative is right; showing the era is probably better (BCE vs CE)
5680
- var prefix=tmpDayJS.valueOf()<-62167219200000?'-':'';return prefix+tmpDayJS.format('YYYY-MM-DD');}}]);}(libPictTemplate);module.exports=PictTemplateProviderDateOnlyYMD;},{"pict-template":143}],219:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateTimeFormat=/*#__PURE__*/function(_libPictTemplate18){/**
5920
+ var prefix=tmpDayJS.valueOf()<-62167219200000?'-':'';return prefix+tmpDayJS.format('YYYY-MM-DD');}}]);}(libPictTemplate);module.exports=PictTemplateProviderDateOnlyYMD;},{"pict-template":143}],220:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateTimeFormat=/*#__PURE__*/function(_libPictTemplate19){/**
5681
5921
  * @param {Object} pFable - The Fable Framework instance
5682
5922
  * @param {Object} pOptions - The options for the service
5683
5923
  * @param {String} pServiceHash - The hash of the service
5684
- */function PictTemplateProviderDateTimeFormat(pFable,pOptions,pServiceHash){var _this103;_classCallCheck2(this,PictTemplateProviderDateTimeFormat);_this103=_callSuper(this,PictTemplateProviderDateTimeFormat,[pFable,pOptions,pServiceHash]);/** @type {any} */_this103.options;/** @type {any} */_this103.log;_this103.addPattern('{~DateTimeFormat:','~}');_this103.addPattern('{~DateFormat:','~}');// for backwards compatibility
5685
- return _this103;}_inherits(PictTemplateProviderDateTimeFormat,_libPictTemplate18);return _createClass2(PictTemplateProviderDateTimeFormat,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValueSet=tmpHash.split('^');if(tmpDateValueSet.length<2){this.log.error("PICT Template [fDateTimeFormat]::[".concat(tmpHash,"] did not have a valid format string and date."));return'';}var tmpDateValue=this.resolveStateFromAddress(tmpDateValueSet[0],tmpData,pContextArray);if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDateTimeFormat]::[".concat(tmpHash,"] with data:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDateTimeFormat]::[".concat(tmpHash,"]"));}// TODO: Modularize this
5924
+ */function PictTemplateProviderDateTimeFormat(pFable,pOptions,pServiceHash){var _this104;_classCallCheck2(this,PictTemplateProviderDateTimeFormat);_this104=_callSuper(this,PictTemplateProviderDateTimeFormat,[pFable,pOptions,pServiceHash]);/** @type {any} */_this104.options;/** @type {any} */_this104.log;_this104.addPattern('{~DateTimeFormat:','~}');_this104.addPattern('{~DateFormat:','~}');// for backwards compatibility
5925
+ return _this104;}/**
5926
+ * Render a template expression, returning a string with the resulting content.
5927
+ *
5928
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5929
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5930
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5931
+ *
5932
+ * @return {string} The rendered template
5933
+ */_inherits(PictTemplateProviderDateTimeFormat,_libPictTemplate19);return _createClass2(PictTemplateProviderDateTimeFormat,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValueSet=tmpHash.split('^');if(tmpDateValueSet.length<2){this.log.error("PICT Template [fDateTimeFormat]::[".concat(tmpHash,"] did not have a valid format string and date."));return'';}var tmpDateValue=this.resolveStateFromAddress(tmpDateValueSet[0],tmpData,pContextArray);if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDateTimeFormat]::[".concat(tmpHash,"] with data:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDateTimeFormat]::[".concat(tmpHash,"]"));}// TODO: Modularize this
5686
5934
  var tmpDayJS=this.fable.Dates.dayJS.utc(tmpDateValue);try{// Try to cast the day to be a specific timezone if one is set for the app
5687
5935
  if(this.options.Timezone){tmpDayJS=tmpDayJS.tz(this.options.Timezone);}else{try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(pError.message||pError,")"));}}}catch(_unused6){//this.log.error(`Error casting date passed timezone using tz .. casting to the browser guess which is [${this.fable.Dates.dayJS.tz.guess()}].`);
5688
5936
  // Day.js will try to guess the user's timezone for us
@@ -5692,12 +5940,12 @@ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.
5692
5940
  ```javascript
5693
5941
 
5694
5942
  ```
5695
- */},{"pict-template":143}],220:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateTimeYMD=/*#__PURE__*/function(_libPictTemplate19){/**
5943
+ */},{"pict-template":143}],221:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateTimeYMD=/*#__PURE__*/function(_libPictTemplate20){/**
5696
5944
  * @param {Object} pFable - The Fable Framework instance
5697
5945
  * @param {Object} pOptions - The options for the service
5698
5946
  * @param {String} pServiceHash - The hash of the service
5699
- */function PictTemplateProviderDateTimeYMD(pFable,pOptions,pServiceHash){var _this104;_classCallCheck2(this,PictTemplateProviderDateTimeYMD);_this104=_callSuper(this,PictTemplateProviderDateTimeYMD,[pFable,pOptions,pServiceHash]);/** @type {any} */_this104.options;/** @type {any} */_this104.log;_this104.addPattern('{~DateTimeYMD:','~}');_this104.addPattern('{~DateYMD:','~}');// for backwards compatibility
5700
- return _this104;}/**
5947
+ */function PictTemplateProviderDateTimeYMD(pFable,pOptions,pServiceHash){var _this105;_classCallCheck2(this,PictTemplateProviderDateTimeYMD);_this105=_callSuper(this,PictTemplateProviderDateTimeYMD,[pFable,pOptions,pServiceHash]);/** @type {any} */_this105.options;/** @type {any} */_this105.log;_this105.addPattern('{~DateTimeYMD:','~}');_this105.addPattern('{~DateYMD:','~}');// for backwards compatibility
5948
+ return _this105;}/**
5701
5949
  * Render a template expression, returning a string with the resulting content.
5702
5950
  *
5703
5951
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
@@ -5705,111 +5953,257 @@ return _this104;}/**
5705
5953
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5706
5954
  *
5707
5955
  * @return {string} The rendered template
5708
- */_inherits(PictTemplateProviderDateTimeYMD,_libPictTemplate19);return _createClass2(PictTemplateProviderDateTimeYMD,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDateTimeYMD]::[".concat(tmpHash,"] with data:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDateTimeYMD]::[".concat(tmpHash,"]"));}// TODO: Modularize this
5956
+ */_inherits(PictTemplateProviderDateTimeYMD,_libPictTemplate20);return _createClass2(PictTemplateProviderDateTimeYMD,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDateTimeYMD]::[".concat(tmpHash,"] with data:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDateTimeYMD]::[".concat(tmpHash,"]"));}// TODO: Modularize this
5709
5957
  var tmpDayJS=this.fable.Dates.dayJS.utc(tmpDateValue);try{// Try to cast the day to be a specific timezone if one is set for the app
5710
5958
  if(this.options.Timezone){tmpDayJS=tmpDayJS.tz(this.options.Timezone);}else{try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(pError.message||pError,")"));}}}catch(_unused7){//this.log.error(`Error casting timezone using tz .. casting to the browser guess which is [${this.fable.Dates.dayJS.tz.guess()}].`);
5711
5959
  // Day.js will try to guess the user's timezone for us
5712
- try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(pError.message||pError,")"));}}return tmpDayJS.format('YYYY-MM-DD');}}]);}(libPictTemplate);module.exports=PictTemplateProviderDateTimeYMD;},{"pict-template":143}],221:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDigits=/*#__PURE__*/function(_libPictTemplate20){/**
5960
+ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(pError.message||pError,")"));}}return tmpDayJS.format('YYYY-MM-DD');}}]);}(libPictTemplate);module.exports=PictTemplateProviderDateTimeYMD;},{"pict-template":143}],222:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDigits=/*#__PURE__*/function(_libPictTemplate21){/**
5713
5961
  * @param {Object} pFable - The Fable Framework instance
5714
5962
  * @param {Object} pOptions - The options for the service
5715
5963
  * @param {String} pServiceHash - The hash of the service
5716
- */function PictTemplateProviderDigits(pFable,pOptions,pServiceHash){var _this105;_classCallCheck2(this,PictTemplateProviderDigits);_this105=_callSuper(this,PictTemplateProviderDigits,[pFable,pOptions,pServiceHash]);/** @type {any} */_this105.options;/** @type {any} */_this105.log;_this105.addPattern('{~Digits:','~}');return _this105;}_inherits(PictTemplateProviderDigits,_libPictTemplate20);return _createClass2(PictTemplateProviderDigits,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDigits]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDigits]::[".concat(tmpHash,"]"));}var tmpColumnData=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);return this.fable.DataFormat.formatterAddCommasToNumber(this.fable.DataFormat.formatterRoundNumber(tmpColumnData,2));}}]);}(libPictTemplate);module.exports=PictTemplateProviderDigits;},{"pict-template":143}],222:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDollars=/*#__PURE__*/function(_libPictTemplate21){/**
5964
+ */function PictTemplateProviderDigits(pFable,pOptions,pServiceHash){var _this106;_classCallCheck2(this,PictTemplateProviderDigits);_this106=_callSuper(this,PictTemplateProviderDigits,[pFable,pOptions,pServiceHash]);/** @type {any} */_this106.options;/** @type {any} */_this106.log;_this106.addPattern('{~Digits:','~}');return _this106;}/**
5965
+ * Render a template expression, returning a string with the resulting content.
5966
+ *
5967
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5968
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5969
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5970
+ *
5971
+ * @return {string} The rendered template
5972
+ */_inherits(PictTemplateProviderDigits,_libPictTemplate21);return _createClass2(PictTemplateProviderDigits,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDigits]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDigits]::[".concat(tmpHash,"]"));}var tmpColumnData=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);return this.fable.DataFormat.formatterAddCommasToNumber(this.fable.DataFormat.formatterRoundNumber(tmpColumnData,2));}}]);}(libPictTemplate);module.exports=PictTemplateProviderDigits;},{"pict-template":143}],223:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDollars=/*#__PURE__*/function(_libPictTemplate22){/**
5717
5973
  * @param {Object} pFable - The Fable Framework instance
5718
5974
  * @param {Object} pOptions - The options for the service
5719
5975
  * @param {String} pServiceHash - The hash of the service
5720
- */function PictTemplateProviderDollars(pFable,pOptions,pServiceHash){var _this106;_classCallCheck2(this,PictTemplateProviderDollars);_this106=_callSuper(this,PictTemplateProviderDollars,[pFable,pOptions,pServiceHash]);/** @type {any} */_this106.options;/** @type {any} */_this106.log;_this106.addPattern('{~Dollars:','~}');return _this106;}_inherits(PictTemplateProviderDollars,_libPictTemplate21);return _createClass2(PictTemplateProviderDollars,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDollars]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDollars]::[".concat(tmpHash,"]"));}var tmpColumnData=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);return this.fable.DataFormat.formatterDollars(tmpColumnData);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDollars;},{"pict-template":143}],223:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderData=/*#__PURE__*/function(_libPictTemplate22){/**
5976
+ */function PictTemplateProviderDollars(pFable,pOptions,pServiceHash){var _this107;_classCallCheck2(this,PictTemplateProviderDollars);_this107=_callSuper(this,PictTemplateProviderDollars,[pFable,pOptions,pServiceHash]);/** @type {any} */_this107.options;/** @type {any} */_this107.log;_this107.addPattern('{~Dollars:','~}');return _this107;}/**
5977
+ * Render a template expression, returning a string with the resulting content.
5978
+ *
5979
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5980
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5981
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5982
+ *
5983
+ * @return {string} The rendered template
5984
+ */_inherits(PictTemplateProviderDollars,_libPictTemplate22);return _createClass2(PictTemplateProviderDollars,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDollars]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDollars]::[".concat(tmpHash,"]"));}var tmpColumnData=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);return this.fable.DataFormat.formatterDollars(tmpColumnData);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDollars;},{"pict-template":143}],224:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderHTMLCommandEnd=/*#__PURE__*/function(_libPictTemplate23){/**
5721
5985
  * @param {Object} pFable - The Fable Framework instance
5722
5986
  * @param {Object} pOptions - The options for the service
5723
5987
  * @param {String} pServiceHash - The hash of the service
5724
- */function PictTemplateProviderData(pFable,pOptions,pServiceHash){var _this107;_classCallCheck2(this,PictTemplateProviderData);_this107=_callSuper(this,PictTemplateProviderData,[pFable,pOptions,pServiceHash]);/** @type {any} */_this107.log;_this107.addPattern('{~HtmlCommentEnd:','~}');_this107.addPattern('{~HCE:','~}');return _this107;}_inherits(PictTemplateProviderData,_libPictTemplate22);return _createClass2(PictTemplateProviderData,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpRecord=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"]"));}var tmpValue=false;if(tmpHash!=null){tmpValue=this.resolveStateFromAddress(tmpHash,tmpRecord,pContextArray);}if(!tmpValue){return' -->';}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderData;},{"pict-template":143}],224:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderData=/*#__PURE__*/function(_libPictTemplate23){/**
5988
+ */function PictTemplateProviderHTMLCommandEnd(pFable,pOptions,pServiceHash){var _this108;_classCallCheck2(this,PictTemplateProviderHTMLCommandEnd);_this108=_callSuper(this,PictTemplateProviderHTMLCommandEnd,[pFable,pOptions,pServiceHash]);/** @type {any} */_this108.log;_this108.addPattern('{~HtmlCommentEnd:','~}');_this108.addPattern('{~HCE:','~}');return _this108;}/**
5989
+ * Render a template expression, returning a string with the resulting content.
5990
+ *
5991
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5992
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5993
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5994
+ *
5995
+ * @return {string} The rendered template
5996
+ */_inherits(PictTemplateProviderHTMLCommandEnd,_libPictTemplate23);return _createClass2(PictTemplateProviderHTMLCommandEnd,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpRecord=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"]"));}var tmpValue=false;if(tmpHash!=null){tmpValue=this.resolveStateFromAddress(tmpHash,tmpRecord,pContextArray);}if(!tmpValue){return' -->';}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderHTMLCommandEnd;},{"pict-template":143}],225:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderHTMLCommandStart=/*#__PURE__*/function(_libPictTemplate24){/**
5725
5997
  * @param {Object} pFable - The Fable Framework instance
5726
5998
  * @param {Object} pOptions - The options for the service
5727
5999
  * @param {String} pServiceHash - The hash of the service
5728
- */function PictTemplateProviderData(pFable,pOptions,pServiceHash){var _this108;_classCallCheck2(this,PictTemplateProviderData);_this108=_callSuper(this,PictTemplateProviderData,[pFable,pOptions,pServiceHash]);/** @type {any} */_this108.log;_this108.addPattern('{~HtmlCommentStart:','~}');_this108.addPattern('{~HCS:','~}');return _this108;}_inherits(PictTemplateProviderData,_libPictTemplate23);return _createClass2(PictTemplateProviderData,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpRecord=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"]"));}var tmpValue=false;if(tmpHash!=null){tmpValue=this.resolveStateFromAddress(tmpHash,tmpRecord,pContextArray);}if(!tmpValue){return'<!-- ';}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderData;},{"pict-template":143}],225:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJoin=/*#__PURE__*/function(_libPictTemplate24){/**
6000
+ */function PictTemplateProviderHTMLCommandStart(pFable,pOptions,pServiceHash){var _this109;_classCallCheck2(this,PictTemplateProviderHTMLCommandStart);_this109=_callSuper(this,PictTemplateProviderHTMLCommandStart,[pFable,pOptions,pServiceHash]);/** @type {any} */_this109.log;_this109.addPattern('{~HtmlCommentStart:','~}');_this109.addPattern('{~HCS:','~}');return _this109;}/**
6001
+ * Render a template expression, returning a string with the resulting content.
6002
+ *
6003
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6004
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6005
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6006
+ *
6007
+ * @return {string} The rendered template
6008
+ */_inherits(PictTemplateProviderHTMLCommandStart,_libPictTemplate24);return _createClass2(PictTemplateProviderHTMLCommandStart,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpRecord=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"]"));}var tmpValue=false;if(tmpHash!=null){tmpValue=this.resolveStateFromAddress(tmpHash,tmpRecord,pContextArray);}if(!tmpValue){return'<!-- ';}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderHTMLCommandStart;},{"pict-template":143}],226:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJoin=/*#__PURE__*/function(_libPictTemplate25){/**
5729
6009
  * @param {Object} pFable - The Fable Framework instance
5730
6010
  * @param {Object} pOptions - The options for the service
5731
6011
  * @param {String} pServiceHash - The hash of the service
5732
- */function PictTemplateProviderJoin(pFable,pOptions,pServiceHash){var _this109;_classCallCheck2(this,PictTemplateProviderJoin);_this109=_callSuper(this,PictTemplateProviderJoin,[pFable,pOptions,pServiceHash]);/** @type {any} */_this109.options;/** @type {any} */_this109.log;_this109.addPattern('{~Join:','~}');_this109.addPattern('{~J:','~}');return _this109;}_inherits(PictTemplateProviderJoin,_libPictTemplate24);return _createClass2(PictTemplateProviderJoin,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash;var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Join [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Join [fDataRender]::[".concat(tmpHash,"]"));}var tmpDataAddresses=tmpHash.split('^');if(tmpDataAddresses.length<2){return'';}// Get the separator string
5733
- var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];for(var i=0;i<tmpDataAddresses.length;i++){var tmpValueSet=this.resolveStateFromAddress(tmpDataAddresses[i],tmpData,pContextArray);if(tmpValueSet&&Array.isArray(tmpValueSet)){for(var j=0;j<tmpValueSet.length;j++){tmpValueList.push(tmpValueSet[j]);}}else if(tmpValueSet){tmpValueList.push(tmpValueSet);}}return tmpValueList.join(tmpSeparator);}}]);}(libPictTemplate);module.exports=PictTemplateProviderJoin;},{"pict-template":143}],226:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJoinUnique=/*#__PURE__*/function(_libPictTemplate25){/**
6012
+ */function PictTemplateProviderJoin(pFable,pOptions,pServiceHash){var _this110;_classCallCheck2(this,PictTemplateProviderJoin);_this110=_callSuper(this,PictTemplateProviderJoin,[pFable,pOptions,pServiceHash]);/** @type {any} */_this110.options;/** @type {any} */_this110.log;_this110.addPattern('{~Join:','~}');_this110.addPattern('{~J:','~}');return _this110;}/**
6013
+ * Render a template expression, returning a string with the resulting content.
6014
+ *
6015
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6016
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6017
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6018
+ *
6019
+ * @return {string} The rendered template
6020
+ */_inherits(PictTemplateProviderJoin,_libPictTemplate25);return _createClass2(PictTemplateProviderJoin,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash;var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Join [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Join [fDataRender]::[".concat(tmpHash,"]"));}var tmpDataAddresses=tmpHash.split('^');if(tmpDataAddresses.length<2){return'';}// Get the separator string
6021
+ var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];for(var i=0;i<tmpDataAddresses.length;i++){var tmpValueSet=this.resolveStateFromAddress(tmpDataAddresses[i],tmpData,pContextArray);if(tmpValueSet&&Array.isArray(tmpValueSet)){for(var j=0;j<tmpValueSet.length;j++){tmpValueList.push(tmpValueSet[j]);}}else if(tmpValueSet){tmpValueList.push(tmpValueSet);}}return tmpValueList.join(tmpSeparator);}}]);}(libPictTemplate);module.exports=PictTemplateProviderJoin;},{"pict-template":143}],227:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJoinUnique=/*#__PURE__*/function(_libPictTemplate26){/**
5734
6022
  * @param {Object} pFable - The Fable Framework instance
5735
6023
  * @param {Object} pOptions - The options for the service
5736
6024
  * @param {String} pServiceHash - The hash of the service
5737
- */function PictTemplateProviderJoinUnique(pFable,pOptions,pServiceHash){var _this110;_classCallCheck2(this,PictTemplateProviderJoinUnique);_this110=_callSuper(this,PictTemplateProviderJoinUnique,[pFable,pOptions,pServiceHash]);/** @type {any} */_this110.options;/** @type {any} */_this110.log;_this110.addPattern('{~JoinUnique:','~}');_this110.addPattern('{~JU:','~}');return _this110;}_inherits(PictTemplateProviderJoinUnique,_libPictTemplate25);return _createClass2(PictTemplateProviderJoinUnique,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash;var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Join Unique [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Join Unique [fDataRender]::[".concat(tmpHash,"]"));}var tmpDataAddresses=tmpHash.split('^');if(tmpDataAddresses.length<2){return'';}// Get the separator string
5738
- var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];var tmpValueMap={};for(var i=0;i<tmpDataAddresses.length;i++){var tmpValueSet=this.resolveStateFromAddress(tmpDataAddresses[i],tmpData,pContextArray);if(tmpValueSet&&Array.isArray(tmpValueSet)){for(var j=0;j<tmpValueSet.length;j++){if(!(tmpValueSet[j]in tmpValueMap)){tmpValueMap[tmpValueSet[j]]=true;tmpValueList.push(tmpValueSet[j]);}}}else if(tmpValueSet){if(!(tmpValueSet in tmpValueMap)){tmpValueMap[tmpValueSet]=true;tmpValueList.push(tmpValueSet);}}}return tmpValueList.join(tmpSeparator);}}]);}(libPictTemplate);module.exports=PictTemplateProviderJoinUnique;},{"pict-template":143}],227:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderPascalCaseIdentifier=/*#__PURE__*/function(_libPictTemplate26){/**
6025
+ */function PictTemplateProviderJoinUnique(pFable,pOptions,pServiceHash){var _this111;_classCallCheck2(this,PictTemplateProviderJoinUnique);_this111=_callSuper(this,PictTemplateProviderJoinUnique,[pFable,pOptions,pServiceHash]);/** @type {any} */_this111.options;/** @type {any} */_this111.log;_this111.addPattern('{~JoinUnique:','~}');_this111.addPattern('{~JU:','~}');return _this111;}/**
6026
+ * Render a template expression, returning a string with the resulting content.
6027
+ *
6028
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6029
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6030
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6031
+ *
6032
+ * @return {string} The rendered template
6033
+ */_inherits(PictTemplateProviderJoinUnique,_libPictTemplate26);return _createClass2(PictTemplateProviderJoinUnique,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash;var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Join Unique [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Join Unique [fDataRender]::[".concat(tmpHash,"]"));}var tmpDataAddresses=tmpHash.split('^');if(tmpDataAddresses.length<2){return'';}// Get the separator string
6034
+ var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];var tmpValueMap={};for(var i=0;i<tmpDataAddresses.length;i++){var tmpValueSet=this.resolveStateFromAddress(tmpDataAddresses[i],tmpData,pContextArray);if(tmpValueSet&&Array.isArray(tmpValueSet)){for(var j=0;j<tmpValueSet.length;j++){if(!(tmpValueSet[j]in tmpValueMap)){tmpValueMap[tmpValueSet[j]]=true;tmpValueList.push(tmpValueSet[j]);}}}else if(tmpValueSet){if(!(tmpValueSet in tmpValueMap)){tmpValueMap[tmpValueSet]=true;tmpValueList.push(tmpValueSet);}}}return tmpValueList.join(tmpSeparator);}}]);}(libPictTemplate);module.exports=PictTemplateProviderJoinUnique;},{"pict-template":143}],228:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderPascalCaseIdentifier=/*#__PURE__*/function(_libPictTemplate27){/**
5739
6035
  * @param {Object} pFable - The Fable Framework instance
5740
6036
  * @param {Object} pOptions - The options for the service
5741
6037
  * @param {String} pServiceHash - The hash of the service
5742
- */function PictTemplateProviderPascalCaseIdentifier(pFable,pOptions,pServiceHash){var _this111;_classCallCheck2(this,PictTemplateProviderPascalCaseIdentifier);_this111=_callSuper(this,PictTemplateProviderPascalCaseIdentifier,[pFable,pOptions,pServiceHash]);/** @type {any} */_this111.options;/** @type {any} */_this111.log;_this111.addPattern('{~PascalCaseIdentifier:','~}');return _this111;}_inherits(PictTemplateProviderPascalCaseIdentifier,_libPictTemplate26);return _createClass2(PictTemplateProviderPascalCaseIdentifier,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fPascalCaseIdentifier]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fPascalCaseIdentifier]::[".concat(tmpHash,"]"));}var tmpValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);if(tmpValue==null||tmpValue=='undefined'||typeof tmpValue=='undefined'){return'';}return this.pict.DataFormat.cleanNonAlphaCharacters(this.pict.DataFormat.capitalizeEachWord(tmpValue));}}]);}(libPictTemplate);module.exports=PictTemplateProviderPascalCaseIdentifier;/*
6038
+ */function PictTemplateProviderPascalCaseIdentifier(pFable,pOptions,pServiceHash){var _this112;_classCallCheck2(this,PictTemplateProviderPascalCaseIdentifier);_this112=_callSuper(this,PictTemplateProviderPascalCaseIdentifier,[pFable,pOptions,pServiceHash]);/** @type {any} */_this112.options;/** @type {any} */_this112.log;_this112.addPattern('{~PascalCaseIdentifier:','~}');return _this112;}/**
6039
+ * Render a template expression, returning a string with the resulting content.
6040
+ *
6041
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6042
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6043
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6044
+ *
6045
+ * @return {string} The rendered template
6046
+ */_inherits(PictTemplateProviderPascalCaseIdentifier,_libPictTemplate27);return _createClass2(PictTemplateProviderPascalCaseIdentifier,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fPascalCaseIdentifier]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fPascalCaseIdentifier]::[".concat(tmpHash,"]"));}var tmpValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);if(tmpValue==null||tmpValue=='undefined'||typeof tmpValue=='undefined'){return'';}return this.pict.DataFormat.cleanNonAlphaCharacters(this.pict.DataFormat.capitalizeEachWord(tmpValue));}}]);}(libPictTemplate);module.exports=PictTemplateProviderPascalCaseIdentifier;/*
5743
6047
  # DEAR DEAD CODE DIARY:
5744
6048
 
5745
6049
  ```javascript
5746
6050
 
5747
6051
  ```
5748
- */},{"pict-template":143}],228:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderPluckJoinUnique=/*#__PURE__*/function(_libPictTemplate27){/**
6052
+ */},{"pict-template":143}],229:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderPluckJoinUnique=/*#__PURE__*/function(_libPictTemplate28){/**
5749
6053
  * @param {Object} pFable - The Fable Framework instance
5750
6054
  * @param {Object} pOptions - The options for the service
5751
6055
  * @param {String} pServiceHash - The hash of the service
5752
- */function PictTemplateProviderPluckJoinUnique(pFable,pOptions,pServiceHash){var _this112;_classCallCheck2(this,PictTemplateProviderPluckJoinUnique);_this112=_callSuper(this,PictTemplateProviderPluckJoinUnique,[pFable,pOptions,pServiceHash]);/** @type {any} */_this112.options;/** @type {any} */_this112.log;_this112.addPattern('{~PluckJoinUnique:','~}');_this112.addPattern('{~PJU:','~}');return _this112;}_inherits(PictTemplateProviderPluckJoinUnique,_libPictTemplate27);return _createClass2(PictTemplateProviderPluckJoinUnique,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash;var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Pluck Join Unique [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Pluck Join Unique [fDataRender]::[".concat(tmpHash,"]"));}var tmpDataAddresses=tmpHash.split('^');if(tmpDataAddresses.length<3){return'';}// Get the separator string
6056
+ */function PictTemplateProviderPluckJoinUnique(pFable,pOptions,pServiceHash){var _this113;_classCallCheck2(this,PictTemplateProviderPluckJoinUnique);_this113=_callSuper(this,PictTemplateProviderPluckJoinUnique,[pFable,pOptions,pServiceHash]);/** @type {any} */_this113.options;/** @type {any} */_this113.log;_this113.addPattern('{~PluckJoinUnique:','~}');_this113.addPattern('{~PJU:','~}');return _this113;}/**
6057
+ * Render a template expression, returning a string with the resulting content.
6058
+ *
6059
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6060
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6061
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6062
+ *
6063
+ * @return {string} The rendered template
6064
+ */_inherits(PictTemplateProviderPluckJoinUnique,_libPictTemplate28);return _createClass2(PictTemplateProviderPluckJoinUnique,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash;var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Pluck Join Unique [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Pluck Join Unique [fDataRender]::[".concat(tmpHash,"]"));}var tmpDataAddresses=tmpHash.split('^');if(tmpDataAddresses.length<3){return'';}// Get the separator string
5753
6065
  var tmpSeparator=tmpDataAddresses.shift();var tmpAddress=tmpDataAddresses.shift();var tmpValueList=[];var tmpValueMap={};for(var i=0;i<tmpDataAddresses.length;i++){var tmpValueSet=this.resolveStateFromAddress(tmpDataAddresses[i],tmpData,pContextArray);if(tmpValueSet&&Array.isArray(tmpValueSet)){// This one only works on arrays of objects.
5754
- for(var j=0;j<tmpValueSet.length;j++){if(tmpValueSet[j]===null||_typeof(tmpValueSet)!=='object'){continue;}var tmpValue=this.pict.manifest.getValueByHash(tmpValueSet[j],tmpAddress);if(!(tmpValue in tmpValueMap)){tmpValueMap[tmpValue]=true;tmpValueList.push(tmpValue);}}}else if(tmpValueSet){if(!(tmpValueSet in tmpValueMap)){tmpValueMap[tmpValueSet]=true;tmpValueList.push(tmpValueSet);}}}return tmpValueList.join(tmpSeparator);}}]);}(libPictTemplate);module.exports=PictTemplateProviderPluckJoinUnique;},{"pict-template":143}],229:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderBreakpoint=/*#__PURE__*/function(_libPictTemplate28){/**
6066
+ for(var j=0;j<tmpValueSet.length;j++){if(tmpValueSet[j]===null||_typeof(tmpValueSet)!=='object'){continue;}var tmpValue=this.pict.manifest.getValueByHash(tmpValueSet[j],tmpAddress);if(!(tmpValue in tmpValueMap)){tmpValueMap[tmpValue]=true;tmpValueList.push(tmpValue);}}}else if(tmpValueSet){if(!(tmpValueSet in tmpValueMap)){tmpValueMap[tmpValueSet]=true;tmpValueList.push(tmpValueSet);}}}return tmpValueList.join(tmpSeparator);}}]);}(libPictTemplate);module.exports=PictTemplateProviderPluckJoinUnique;},{"pict-template":143}],230:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderBreakpoint=/*#__PURE__*/function(_libPictTemplate29){/**
5755
6067
  * @param {Object} pFable - The Fable Framework instance
5756
6068
  * @param {Object} pOptions - The options for the service
5757
6069
  * @param {String} pServiceHash - The hash of the service
5758
- */function PictTemplateProviderBreakpoint(pFable,pOptions,pServiceHash){var _this113;_classCallCheck2(this,PictTemplateProviderBreakpoint);_this113=_callSuper(this,PictTemplateProviderBreakpoint,[pFable,pOptions,pServiceHash]);/** @type {any} */_this113.log;_this113.addPattern('{~Breakpoint','~}');return _this113;}_inherits(PictTemplateProviderBreakpoint,_libPictTemplate28);return _createClass2(PictTemplateProviderBreakpoint,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpError=new Error("PICT Template Breakpoint: ".concat(tmpHash));this.log.trace("PICT Template Breakpoint: ".concat(tmpHash),tmpError.stack);//throw tmpError;
6070
+ */function PictTemplateProviderBreakpoint(pFable,pOptions,pServiceHash){var _this114;_classCallCheck2(this,PictTemplateProviderBreakpoint);_this114=_callSuper(this,PictTemplateProviderBreakpoint,[pFable,pOptions,pServiceHash]);/** @type {any} */_this114.log;_this114.addPattern('{~Breakpoint','~}');return _this114;}/**
6071
+ * Render a template expression, returning a string with the resulting content.
6072
+ *
6073
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6074
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6075
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6076
+ *
6077
+ * @return {string} The rendered template
6078
+ */_inherits(PictTemplateProviderBreakpoint,_libPictTemplate29);return _createClass2(PictTemplateProviderBreakpoint,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpError=new Error("PICT Template Breakpoint: ".concat(tmpHash));this.log.trace("PICT Template Breakpoint: ".concat(tmpHash),tmpError.stack);//throw tmpError;
5759
6079
  debugger;// eslint-disable-line no-debugger
5760
- return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderBreakpoint;},{"pict-template":143}],230:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDataValueTree=/*#__PURE__*/function(_libPictTemplate29){/**
6080
+ return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderBreakpoint;},{"pict-template":143}],231:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDataValueTree=/*#__PURE__*/function(_libPictTemplate30){/**
5761
6081
  * @param {Object} pFable - The Fable Framework instance
5762
6082
  * @param {Object} pOptions - The options for the service
5763
6083
  * @param {String} pServiceHash - The hash of the service
5764
- */function PictTemplateProviderDataValueTree(pFable,pOptions,pServiceHash){var _this114;_classCallCheck2(this,PictTemplateProviderDataValueTree);_this114=_callSuper(this,PictTemplateProviderDataValueTree,[pFable,pOptions,pServiceHash]);/** @type {any} */_this114.log;_this114.addPattern('{~DataTree:','~}');_this114.addPattern('{~DT:','~}');return _this114;}_inherits(PictTemplateProviderDataValueTree,_libPictTemplate29);return _createClass2(PictTemplateProviderDataValueTree,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpData=_typeof(pRecord)==='object'?pRecord:{};tmpData.TemplateHash=pTemplateHash.trim();tmpData.ValueTreeParameters=tmpData.TemplateHash.split('^');if(tmpData.ValueTreeParameters.length<1){return'';}tmpData.ResolvedValue=this.resolveStateFromAddress(tmpData.ValueTreeParameters[0],tmpData,pContextArray);tmpData.ResolvedValueType=_typeof(tmpData.ResolvedValue);try{tmpData.TreeMaxDepth=tmpData.ValueTreeParameters.length<2?1:parseInt(tmpData.ValueTreeParameters[1]);}catch(_unused8){tmpData.TreeMaxDepth=1;}var tmpPictObjectWrapTemplate=this.pict.TemplateProvider.getTemplate('PICT-Object-Wrap');if(!tmpPictObjectWrapTemplate){// This template is here because it is a default template. Users can override this template by providing their own as PICT-Object-Wrap
6084
+ */function PictTemplateProviderDataValueTree(pFable,pOptions,pServiceHash){var _this115;_classCallCheck2(this,PictTemplateProviderDataValueTree);_this115=_callSuper(this,PictTemplateProviderDataValueTree,[pFable,pOptions,pServiceHash]);/** @type {any} */_this115.log;_this115.addPattern('{~DataTree:','~}');_this115.addPattern('{~DT:','~}');return _this115;}/**
6085
+ * Render a template expression, returning a string with the resulting content.
6086
+ *
6087
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6088
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6089
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6090
+ *
6091
+ * @return {string} The rendered template
6092
+ */_inherits(PictTemplateProviderDataValueTree,_libPictTemplate30);return _createClass2(PictTemplateProviderDataValueTree,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpData=_typeof(pRecord)==='object'?pRecord:{};tmpData.TemplateHash=pTemplateHash.trim();tmpData.ValueTreeParameters=tmpData.TemplateHash.split('^');if(tmpData.ValueTreeParameters.length<1){return'';}tmpData.ResolvedValue=this.resolveStateFromAddress(tmpData.ValueTreeParameters[0],tmpData,pContextArray);tmpData.ResolvedValueType=_typeof(tmpData.ResolvedValue);try{tmpData.TreeMaxDepth=tmpData.ValueTreeParameters.length<2?1:parseInt(tmpData.ValueTreeParameters[1]);}catch(_unused8){tmpData.TreeMaxDepth=1;}var tmpPictObjectWrapTemplate=this.pict.TemplateProvider.getTemplate('PICT-Object-Wrap');if(!tmpPictObjectWrapTemplate){// This template is here because it is a default template. Users can override this template by providing their own as PICT-Object-Wrap
5765
6093
  tmpPictObjectWrapTemplate="<div class=\"PICT PICTObjectSet\">{~D:Record.ObjectValueTree~}</div>";}if(tmpData.ResolvedValueType=='object'){tmpData.ObjectValueTree=this.dataValueTreeObjectSet(tmpData.ResolvedValue,tmpData.ResolvedValue,0,tmpData.TreeMaxDepth,pContextArray);}else{this.log.trace("PICT Template Log Value Tree: [".concat(tmpData.TemplateHash,"] resolved data is not an object."),tmpData.ResolvedValue);tmpData.ObjectValueTree=tmpData.ResolveValue;}return this.pict.parseTemplate(tmpPictObjectWrapTemplate,tmpData,null,pContextArray);}},{key:"dataValueTreeObjectSet",value:function dataValueTreeObjectSet(pObject,pRootObject,pCurrentDepth,pMaxDepth,pContextArray){var tmpTemplateResult='';if(_typeof(pObject)!=='object'){return tmpTemplateResult;}var tmpObjectValueKeys=Object.keys(pObject);var tmpPictObjectBranchTemplate=this.pict.TemplateProvider.getTemplate('PICT-Object-Branch');if(!tmpPictObjectBranchTemplate){// This template is here because it is a default template. Users can override this template by providing their own as PICT-Object-Branch
5766
- tmpPictObjectBranchTemplate="\n<div class=\"PICTObjectBranchDepth_{~D:Record.CurrentDepth~}\"><div class=\"PICTObjectBranch\">{~D:Record.BranchKey~}</div><div class=\"PICTObjectBranchValue\">{~D:Record.BranchValue~}</div></div>\n";}for(var i=0;i<tmpObjectValueKeys.length;i++){var tmpBranchType=_typeof(pObject[tmpObjectValueKeys[i]]);var tmpBranchValue='';switch(tmpBranchType){case'object':if(pCurrentDepth+1>pMaxDepth){tmpBranchValue='...';}else{tmpBranchValue=this.dataValueTreeObjectSet(pObject[tmpObjectValueKeys[i]],pRootObject,pCurrentDepth+1,pMaxDepth,pContextArray);}break;default:tmpBranchValue=pObject[tmpObjectValueKeys[i]];break;}var tmpDataValue={AppData:this.pict.AppData,Bundle:this.pict.Bundle,RootContainer:pRootObject,Container:pObject,BranchEntryCount:tmpObjectValueKeys.length,BranchIndex:i,BranchKey:tmpObjectValueKeys[i],BranchValue:tmpBranchValue,BranchDataType:tmpBranchType,CurrentDepth:pCurrentDepth,MaxDepth:pMaxDepth};tmpTemplateResult+=this.pict.parseTemplate(tmpPictObjectBranchTemplate,tmpDataValue,null,pContextArray);}return tmpTemplateResult;}}]);}(libPictTemplate);module.exports=PictTemplateProviderDataValueTree;},{"pict-template":143}],231:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogStatement=/*#__PURE__*/function(_libPictTemplate30){/**
6094
+ tmpPictObjectBranchTemplate="\n<div class=\"PICTObjectBranchDepth_{~D:Record.CurrentDepth~}\"><div class=\"PICTObjectBranch\">{~D:Record.BranchKey~}</div><div class=\"PICTObjectBranchValue\">{~D:Record.BranchValue~}</div></div>\n";}for(var i=0;i<tmpObjectValueKeys.length;i++){var tmpBranchType=_typeof(pObject[tmpObjectValueKeys[i]]);var tmpBranchValue='';switch(tmpBranchType){case'object':if(pCurrentDepth+1>pMaxDepth){tmpBranchValue='...';}else{tmpBranchValue=this.dataValueTreeObjectSet(pObject[tmpObjectValueKeys[i]],pRootObject,pCurrentDepth+1,pMaxDepth,pContextArray);}break;default:tmpBranchValue=pObject[tmpObjectValueKeys[i]];break;}var tmpDataValue={AppData:this.pict.AppData,Bundle:this.pict.Bundle,RootContainer:pRootObject,Container:pObject,BranchEntryCount:tmpObjectValueKeys.length,BranchIndex:i,BranchKey:tmpObjectValueKeys[i],BranchValue:tmpBranchValue,BranchDataType:tmpBranchType,CurrentDepth:pCurrentDepth,MaxDepth:pMaxDepth};tmpTemplateResult+=this.pict.parseTemplate(tmpPictObjectBranchTemplate,tmpDataValue,null,pContextArray);}return tmpTemplateResult;}}]);}(libPictTemplate);module.exports=PictTemplateProviderDataValueTree;},{"pict-template":143}],232:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogStatement=/*#__PURE__*/function(_libPictTemplate31){/**
5767
6095
  * @param {Object} pFable - The Fable Framework instance
5768
6096
  * @param {Object} pOptions - The options for the service
5769
6097
  * @param {String} pServiceHash - The hash of the service
5770
- */function PictTemplateProviderLogStatement(pFable,pOptions,pServiceHash){var _this115;_classCallCheck2(this,PictTemplateProviderLogStatement);_this115=_callSuper(this,PictTemplateProviderLogStatement,[pFable,pOptions,pServiceHash]);/** @type {any} */_this115.log;_this115.addPattern('{~LogStatement:','~}');_this115.addPattern('{~LS:','~}');return _this115;}_inherits(PictTemplateProviderLogStatement,_libPictTemplate30);return _createClass2(PictTemplateProviderLogStatement,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();this.log.trace("PICT Template Log Message: ".concat(tmpHash));return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderLogStatement;},{"pict-template":143}],232:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogValue=/*#__PURE__*/function(_libPictTemplate31){/**
6098
+ */function PictTemplateProviderLogStatement(pFable,pOptions,pServiceHash){var _this116;_classCallCheck2(this,PictTemplateProviderLogStatement);_this116=_callSuper(this,PictTemplateProviderLogStatement,[pFable,pOptions,pServiceHash]);/** @type {any} */_this116.log;_this116.addPattern('{~LogStatement:','~}');_this116.addPattern('{~LS:','~}');return _this116;}/**
6099
+ * Render a template expression, returning a string with the resulting content.
6100
+ *
6101
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6102
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6103
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6104
+ *
6105
+ * @return {string} The rendered template
6106
+ */_inherits(PictTemplateProviderLogStatement,_libPictTemplate31);return _createClass2(PictTemplateProviderLogStatement,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();this.log.trace("PICT Template Log Message: ".concat(tmpHash));return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderLogStatement;},{"pict-template":143}],233:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogValue=/*#__PURE__*/function(_libPictTemplate32){/**
5771
6107
  * @param {Object} pFable - The Fable Framework instance
5772
6108
  * @param {Object} pOptions - The options for the service
5773
6109
  * @param {String} pServiceHash - The hash of the service
5774
- */function PictTemplateProviderLogValue(pFable,pOptions,pServiceHash){var _this116;_classCallCheck2(this,PictTemplateProviderLogValue);_this116=_callSuper(this,PictTemplateProviderLogValue,[pFable,pOptions,pServiceHash]);/** @type {any} */_this116.log;_this116.addPattern('{~LogValue:','~}');_this116.addPattern('{~LV:','~}');return _this116;}_inherits(PictTemplateProviderLogValue,_libPictTemplate31);return _createClass2(PictTemplateProviderLogValue,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);var tmpValueType=_typeof(tmpValue);if(tmpValue==null||tmpValueType=='undefined'){this.log.trace("PICT Template Log Value: [".concat(tmpHash,"] is ").concat(tmpValueType,"."));}else if(tmpValueType=='object'){this.log.trace("PICT Template Log Value: [".concat(tmpHash,"] is an object."),tmpValue);}else{this.log.trace("PICT Template Log Value: [".concat(tmpHash,"] is a ").concat(tmpValueType," = [").concat(tmpValue,"]"));}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderLogValue;},{"pict-template":143}],233:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogValueTree=/*#__PURE__*/function(_libPictTemplate32){/**
6110
+ */function PictTemplateProviderLogValue(pFable,pOptions,pServiceHash){var _this117;_classCallCheck2(this,PictTemplateProviderLogValue);_this117=_callSuper(this,PictTemplateProviderLogValue,[pFable,pOptions,pServiceHash]);/** @type {any} */_this117.log;_this117.addPattern('{~LogValue:','~}');_this117.addPattern('{~LV:','~}');return _this117;}/**
6111
+ * Render a template expression, returning a string with the resulting content.
6112
+ *
6113
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6114
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6115
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6116
+ *
6117
+ * @return {string} The rendered template
6118
+ */_inherits(PictTemplateProviderLogValue,_libPictTemplate32);return _createClass2(PictTemplateProviderLogValue,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);var tmpValueType=_typeof(tmpValue);if(tmpValue==null||tmpValueType=='undefined'){this.log.trace("PICT Template Log Value: [".concat(tmpHash,"] is ").concat(tmpValueType,"."));}else if(tmpValueType=='object'){this.log.trace("PICT Template Log Value: [".concat(tmpHash,"] is an object."),tmpValue);}else{this.log.trace("PICT Template Log Value: [".concat(tmpHash,"] is a ").concat(tmpValueType," = [").concat(tmpValue,"]"));}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderLogValue;},{"pict-template":143}],234:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogValueTree=/*#__PURE__*/function(_libPictTemplate33){/**
5775
6119
  * @param {Object} pFable - The Fable Framework instance
5776
6120
  * @param {Object} pOptions - The options for the service
5777
6121
  * @param {String} pServiceHash - The hash of the service
5778
- */function PictTemplateProviderLogValueTree(pFable,pOptions,pServiceHash){var _this117;_classCallCheck2(this,PictTemplateProviderLogValueTree);_this117=_callSuper(this,PictTemplateProviderLogValueTree,[pFable,pOptions,pServiceHash]);/** @type {any} */_defineProperty2(_this117,"logValueTreeObjectSet",function(pObject,pBaseAddress,pRootObject,pCurrentDepth,pMaxDepth){var tmpTemplateResult='';if(_typeof(pObject)!=='object'){return tmpTemplateResult;}var tmpObjectValueKeys=Object.keys(pObject);for(var i=0;i<tmpObjectValueKeys.length;i++){var tmpBranchType=_typeof(pObject[tmpObjectValueKeys[i]]);var tmpBranchValue='';switch(tmpBranchType){case'object':tmpBranchValue='...';break;default:tmpBranchValue=pObject[tmpObjectValueKeys[i]];break;}_this117.log.trace("[".concat(pBaseAddress,".").concat(tmpObjectValueKeys[i],"] (").concat(tmpBranchType,"): ").concat(tmpBranchValue));if(pCurrentDepth+1>pMaxDepth){return'';}else if(tmpBranchType=='object'){tmpBranchValue=_this117.logValueTreeObjectSet(pObject[tmpObjectValueKeys[i]],"".concat(pBaseAddress,".").concat(tmpObjectValueKeys[i]),pRootObject,pCurrentDepth+1,pMaxDepth);}}return'';});_this117.log;_this117.addPattern('{~LogValueTree:','~}');_this117.addPattern('{~LVT:','~}');return _this117;}_inherits(PictTemplateProviderLogValueTree,_libPictTemplate32);return _createClass2(PictTemplateProviderLogValueTree,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpData=_typeof(pRecord)==='object'?pRecord:{};tmpData.TemplateHash=pTemplateHash.trim();tmpData.ValueTreeParameters=tmpData.TemplateHash.split('^');if(tmpData.ValueTreeParameters.length<1){return'';}tmpData.ResolvedValue=this.resolveStateFromAddress(tmpData.ValueTreeParameters[0],tmpData,pContextArray);tmpData.ResolvedValueType=_typeof(tmpData.ResolvedValue);try{tmpData.TreeMaxDepth=tmpData.ValueTreeParameters.length<2?1:parseInt(tmpData.ValueTreeParameters[1]);}catch(_unused9){tmpData.TreeMaxDepth=1;}if(tmpData.ResolvedValueType=='object'){this.logValueTreeObjectSet(tmpData.ResolvedValue,tmpData.ValueTreeParameters[0],tmpData.ResolvedValue,0,tmpData.TreeMaxDepth);}else{this.log.trace("PICT Template Log Value Tree: [".concat(tmpData.TemplateHash,"] resolved data is not an object."),tmpData.ResolvedValue);}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderLogValueTree;},{"pict-template":143}],234:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderNotEmpty=/*#__PURE__*/function(_libPictTemplate33){/**
6122
+ */function PictTemplateProviderLogValueTree(pFable,pOptions,pServiceHash){var _this118;_classCallCheck2(this,PictTemplateProviderLogValueTree);_this118=_callSuper(this,PictTemplateProviderLogValueTree,[pFable,pOptions,pServiceHash]);/** @type {any} */_defineProperty2(_this118,"logValueTreeObjectSet",function(pObject,pBaseAddress,pRootObject,pCurrentDepth,pMaxDepth){var tmpTemplateResult='';if(_typeof(pObject)!=='object'){return tmpTemplateResult;}var tmpObjectValueKeys=Object.keys(pObject);for(var i=0;i<tmpObjectValueKeys.length;i++){var tmpBranchType=_typeof(pObject[tmpObjectValueKeys[i]]);var tmpBranchValue='';switch(tmpBranchType){case'object':tmpBranchValue='...';break;default:tmpBranchValue=pObject[tmpObjectValueKeys[i]];break;}_this118.log.trace("[".concat(pBaseAddress,".").concat(tmpObjectValueKeys[i],"] (").concat(tmpBranchType,"): ").concat(tmpBranchValue));if(pCurrentDepth+1>pMaxDepth){return'';}else if(tmpBranchType=='object'){tmpBranchValue=_this118.logValueTreeObjectSet(pObject[tmpObjectValueKeys[i]],"".concat(pBaseAddress,".").concat(tmpObjectValueKeys[i]),pRootObject,pCurrentDepth+1,pMaxDepth);}}return'';});_this118.log;_this118.addPattern('{~LogValueTree:','~}');_this118.addPattern('{~LVT:','~}');return _this118;}/**
6123
+ * Render a template expression, returning a string with the resulting content.
6124
+ *
6125
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6126
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6127
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6128
+ *
6129
+ * @return {string} The rendered template
6130
+ */_inherits(PictTemplateProviderLogValueTree,_libPictTemplate33);return _createClass2(PictTemplateProviderLogValueTree,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpData=_typeof(pRecord)==='object'?pRecord:{};tmpData.TemplateHash=pTemplateHash.trim();tmpData.ValueTreeParameters=tmpData.TemplateHash.split('^');if(tmpData.ValueTreeParameters.length<1){return'';}tmpData.ResolvedValue=this.resolveStateFromAddress(tmpData.ValueTreeParameters[0],tmpData,pContextArray);tmpData.ResolvedValueType=_typeof(tmpData.ResolvedValue);try{tmpData.TreeMaxDepth=tmpData.ValueTreeParameters.length<2?1:parseInt(tmpData.ValueTreeParameters[1]);}catch(_unused9){tmpData.TreeMaxDepth=1;}if(tmpData.ResolvedValueType=='object'){this.logValueTreeObjectSet(tmpData.ResolvedValue,tmpData.ValueTreeParameters[0],tmpData.ResolvedValue,0,tmpData.TreeMaxDepth);}else{this.log.trace("PICT Template Log Value Tree: [".concat(tmpData.TemplateHash,"] resolved data is not an object."),tmpData.ResolvedValue);}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderLogValueTree;},{"pict-template":143}],235:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderNotEmpty=/*#__PURE__*/function(_libPictTemplate34){/**
5779
6131
  * @param {Object} pFable - The Fable Framework instance
5780
6132
  * @param {Object} pOptions - The options for the service
5781
6133
  * @param {String} pServiceHash - The hash of the service
5782
- */function PictTemplateProviderNotEmpty(pFable,pOptions,pServiceHash){var _this118;_classCallCheck2(this,PictTemplateProviderNotEmpty);_this118=_callSuper(this,PictTemplateProviderNotEmpty,[pFable,pOptions,pServiceHash]);/** @type {any} */_this118.log;_this118.addPattern('{~NotEmpty:','~}');_this118.addPattern('{~NE:','~}');return _this118;}_inherits(PictTemplateProviderNotEmpty,_libPictTemplate33);return _createClass2(PictTemplateProviderNotEmpty,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fNotEmptyRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>2){this.log.trace("PICT Template [fNotEmptyRender]::[".concat(tmpHash,"]"));}var tmpHashParts=tmpHash.split('^');// For now just check truthiness. Not sure if this is grand.
5783
- if(this.resolveStateFromAddress(tmpHashParts[0],tmpData,pContextArray)){return tmpHashParts[1];}else{return'';}}}]);}(libPictTemplate);module.exports=PictTemplateProviderNotEmpty;},{"pict-template":143}],235:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateIfBase=/*#__PURE__*/function(_libPictTemplate34){/**
6134
+ */function PictTemplateProviderNotEmpty(pFable,pOptions,pServiceHash){var _this119;_classCallCheck2(this,PictTemplateProviderNotEmpty);_this119=_callSuper(this,PictTemplateProviderNotEmpty,[pFable,pOptions,pServiceHash]);/** @type {any} */_this119.log;_this119.addPattern('{~NotEmpty:','~}');_this119.addPattern('{~NE:','~}');return _this119;}/**
6135
+ * Render a template expression, returning a string with the resulting content.
6136
+ *
6137
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6138
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6139
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6140
+ *
6141
+ * @return {string} The rendered template
6142
+ */_inherits(PictTemplateProviderNotEmpty,_libPictTemplate34);return _createClass2(PictTemplateProviderNotEmpty,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fNotEmptyRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>2){this.log.trace("PICT Template [fNotEmptyRender]::[".concat(tmpHash,"]"));}var tmpHashParts=tmpHash.split('^');// For now just check truthiness. Not sure if this is grand.
6143
+ if(this.resolveStateFromAddress(tmpHashParts[0],tmpData,pContextArray)){return tmpHashParts[1];}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderNotEmpty;},{"pict-template":143}],236:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateIfBase=/*#__PURE__*/function(_libPictTemplate35){/**
5784
6144
  * @param {Object} pFable - The Fable Framework instance
5785
6145
  * @param {Object} pOptions - The options for the service
5786
6146
  * @param {String} pServiceHash - The hash of the service
5787
- */function PictTemplateProviderTemplateIfBase(pFable,pOptions,pServiceHash){_classCallCheck2(this,PictTemplateProviderTemplateIfBase);return _callSuper(this,PictTemplateProviderTemplateIfBase,[pFable,pOptions,pServiceHash]);}_inherits(PictTemplateProviderTemplateIfBase,_libPictTemplate34);return _createClass2(PictTemplateProviderTemplateIfBase,[{key:"compareValues",value:function compareValues(pValueLeft,pOperator,pValueRight){switch(pOperator){case'TRUE':return pValueLeft===true;case'FALSE':return pValueLeft===false;case'LNGT':case'LENGTH_GREATER_THAN':switch(_typeof(pValueLeft)){case'string':return pValueLeft.length>pValueRight;case'object':return pValueLeft.length>pValueRight;default:return false;}case'LNLT':case'LENGTH_LESS_THAN':switch(_typeof(pValueLeft)){case'string':return pValueLeft.length<pValueRight;case'object':return pValueLeft.length<pValueRight;default:return false;}case'!=':return pValueLeft!=pValueRight;case'<':return pValueLeft<pValueRight;case'>':return pValueLeft>pValueRight;case'<=':return pValueLeft<=pValueRight;case'>=':return pValueLeft>=pValueRight;case'===':return pValueLeft===pValueRight;case'==':return pValueLeft==pValueRight;default:return false;}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateIfBase;},{"pict-template":143}],236:[function(require,module,exports){var libPictTemplateIf=require('./Pict-Template-TemplateIf-Base.js');var PictTemplateProviderTemplateIf=/*#__PURE__*/function(_libPictTemplateIf){/**
6147
+ */function PictTemplateProviderTemplateIfBase(pFable,pOptions,pServiceHash){_classCallCheck2(this,PictTemplateProviderTemplateIfBase);return _callSuper(this,PictTemplateProviderTemplateIfBase,[pFable,pOptions,pServiceHash]);}_inherits(PictTemplateProviderTemplateIfBase,_libPictTemplate35);return _createClass2(PictTemplateProviderTemplateIfBase,[{key:"compareValues",value:function compareValues(pValueLeft,pOperator,pValueRight){switch(pOperator){case'TRUE':return pValueLeft===true;case'FALSE':return pValueLeft===false;case'LNGT':case'LENGTH_GREATER_THAN':switch(_typeof(pValueLeft)){case'string':return pValueLeft.length>pValueRight;case'object':return pValueLeft.length>pValueRight;default:return false;}case'LNLT':case'LENGTH_LESS_THAN':switch(_typeof(pValueLeft)){case'string':return pValueLeft.length<pValueRight;case'object':return pValueLeft.length<pValueRight;default:return false;}case'!=':return pValueLeft!=pValueRight;case'<':return pValueLeft<pValueRight;case'>':return pValueLeft>pValueRight;case'<=':return pValueLeft<=pValueRight;case'>=':return pValueLeft>=pValueRight;case'===':return pValueLeft===pValueRight;case'==':return pValueLeft==pValueRight;default:return false;}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateIfBase;},{"pict-template":143}],237:[function(require,module,exports){var libPictTemplateIf=require('./Pict-Template-TemplateIf-Base.js');var PictTemplateProviderTemplateIf=/*#__PURE__*/function(_libPictTemplateIf){/**
5788
6148
  * @param {Object} pFable - The Fable Framework instance
5789
6149
  * @param {Object} pOptions - The options for the service
5790
6150
  * @param {String} pServiceHash - The hash of the service
5791
- */function PictTemplateProviderTemplateIf(pFable,pOptions,pServiceHash){var _this119;_classCallCheck2(this,PictTemplateProviderTemplateIf);_this119=_callSuper(this,PictTemplateProviderTemplateIf,[pFable,pOptions,pServiceHash]);/** @type {any} */_this119.log;_this119.addPattern('{~TemplateIf:','~}');_this119.addPattern('{~TIf:','~}');return _this119;}_inherits(PictTemplateProviderTemplateIf,_libPictTemplateIf);return _createClass2(PictTemplateProviderTemplateIf,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpComparisonOperation;var tmpHashParts=tmpHash.split(':');if(tmpHashParts.length<3){this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]"));return"Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]");}tmpTemplateHash=tmpHashParts[0];tmpAddressOfData=tmpHashParts[1];tmpComparisonOperation=tmpHashParts[2];// No template hash
5792
- if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]");}// No comparison operation
5793
- if(!tmpComparisonOperation){this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]");}// Now try to break the comparison into three parts...
5794
- var tmpComparisonParts=tmpComparisonOperation.split('^');if(tmpComparisonParts.length<3){this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]"));return"Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]");}// Now look up the data at the comparison location
5795
- try{var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray),tmpComparisonParts[1],this.resolveStateFromAddress(tmpComparisonParts[2],tmpData,pContextArray));if(!tmpComparisonResult){return'';}else{if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
5796
- return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),null,pContextArray);}}}catch(pError){this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError),pError);return"Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpComparisonOperation;var tmpHashParts=tmpHash.split(':');if(tmpHashParts.length<3){this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]")));}tmpTemplateHash=tmpHashParts[0];tmpAddressOfData=tmpHashParts[1];tmpComparisonOperation=tmpHashParts[2];// No template hash
5797
- if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]")));}// No comparison operation
5798
- if(!tmpComparisonOperation){this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]")));}// Now try to break the comparison into three parts...
5799
- var tmpComparisonParts=tmpComparisonOperation.split('^');if(tmpComparisonParts.length<3){this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]")));}// Now look up the data at the comparison location
6151
+ */function PictTemplateProviderTemplateIf(pFable,pOptions,pServiceHash){var _this120;_classCallCheck2(this,PictTemplateProviderTemplateIf);_this120=_callSuper(this,PictTemplateProviderTemplateIf,[pFable,pOptions,pServiceHash]);/** @type {any} */_this120.log;_this120.addPattern('{~TemplateIf:','~}');_this120.addPattern('{~TIf:','~}');return _this120;}/**
6152
+ * Render a template expression, returning a string with the resulting content.
6153
+ *
6154
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6155
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6156
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6157
+ *
6158
+ * @return {string} The rendered template
6159
+ */_inherits(PictTemplateProviderTemplateIf,_libPictTemplateIf);return _createClass2(PictTemplateProviderTemplateIf,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpComparisonOperation;var tmpHashParts=tmpHash.split(':');if(tmpHashParts.length<3){this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]"));return'';}tmpTemplateHash=tmpHashParts[0];tmpAddressOfData=tmpHashParts[1];tmpComparisonOperation=tmpHashParts[2];// No template hash
6160
+ if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return'';}// No comparison operation
6161
+ if(!tmpComparisonOperation){this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]"));return'';}// Now try to break the comparison into three parts...
6162
+ var tmpComparisonParts=tmpComparisonOperation.split('^');if(tmpComparisonParts.length<3){this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]"));return'';}// Now look up the data at the comparison location
6163
+ try{var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray),tmpComparisonParts[1],this.resolveStateFromAddress(tmpComparisonParts[2],tmpData,pContextArray));if(!tmpComparisonResult){return'';}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
6164
+ return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),null,pContextArray);}}catch(pError){this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError),pError);return'';}}/**
6165
+ * Render a template expression, deliver a string with the resulting content to a callback function.
6166
+ *
6167
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6168
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6169
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6170
+ * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
6171
+ *
6172
+ * @return {void}
6173
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpComparisonOperation;var tmpHashParts=tmpHash.split(':');if(tmpHashParts.length<3){this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]"));return tmpCallback(null,'');}tmpTemplateHash=tmpHashParts[0];tmpAddressOfData=tmpHashParts[1];tmpComparisonOperation=tmpHashParts[2];// No template hash
6174
+ if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return tmpCallback(null,'');}// No comparison operation
6175
+ if(!tmpComparisonOperation){this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]"));return tmpCallback(null,'');}// Now try to break the comparison into three parts...
6176
+ var tmpComparisonParts=tmpComparisonOperation.split('^');if(tmpComparisonParts.length<3){this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]"));return tmpCallback(null,'');}// Now look up the data at the comparison location
5800
6177
  try{// This is the only thing that's different from the absolute value function above. Collapse these.
5801
- var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray),tmpComparisonParts[1],this.resolveStateFromAddress(tmpComparisonParts[2],tmpData,pContextArray));if(!tmpComparisonResult){return tmpCallback(null,'');}else{if(!tmpAddressOfData){return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}catch(pError){this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError),pError);return tmpCallback(pError,'');}}}]);}(libPictTemplateIf);module.exports=PictTemplateProviderTemplateIf;},{"./Pict-Template-TemplateIf-Base.js":235}],237:[function(require,module,exports){var libPictTemplateIf=require('./Pict-Template-TemplateIf-Base.js');var PictTemplateProviderTemplateIfAbsolute=/*#__PURE__*/function(_libPictTemplateIf2){/**
6178
+ var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray),tmpComparisonParts[1],this.resolveStateFromAddress(tmpComparisonParts[2],tmpData,pContextArray));if(!tmpComparisonResult){return tmpCallback(null,'');}if(!tmpAddressOfData){this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}catch(pError){this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError),pError);return tmpCallback(pError,'');}}}]);}(libPictTemplateIf);module.exports=PictTemplateProviderTemplateIf;},{"./Pict-Template-TemplateIf-Base.js":236}],238:[function(require,module,exports){var libPictTemplateIf=require('./Pict-Template-TemplateIf-Base.js');var PictTemplateProviderTemplateIfAbsolute=/*#__PURE__*/function(_libPictTemplateIf2){/**
5802
6179
  * @param {Object} pFable - The Fable Framework instance
5803
6180
  * @param {Object} pOptions - The options for the service
5804
6181
  * @param {String} pServiceHash - The hash of the service
5805
- */function PictTemplateProviderTemplateIfAbsolute(pFable,pOptions,pServiceHash){var _this120;_classCallCheck2(this,PictTemplateProviderTemplateIfAbsolute);_this120=_callSuper(this,PictTemplateProviderTemplateIfAbsolute,[pFable,pOptions,pServiceHash]);/** @type {any} */_this120.log;_this120.addPattern('{~TemplateIfAbsolute:','~}');_this120.addPattern('{~TIfAbs:','~}');return _this120;}_inherits(PictTemplateProviderTemplateIfAbsolute,_libPictTemplateIf2);return _createClass2(PictTemplateProviderTemplateIfAbsolute,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpComparisonOperation;var tmpHashParts=tmpHash.split(':');if(tmpHashParts.length<3){this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]"));return"Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]");}tmpTemplateHash=tmpHashParts[0];tmpAddressOfData=tmpHashParts[1];tmpComparisonOperation=tmpHashParts[2];// No template hash
5806
- if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]");}// No comparison operation
5807
- if(!tmpComparisonOperation){this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]");}// Now try to break the comparison into three parts...
5808
- var tmpComparisonParts=tmpComparisonOperation.split('^');if(tmpComparisonParts.length<3){this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]"));return"Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]");}// Now look up the data at the comparison location
5809
- try{var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray),tmpComparisonParts[1],tmpComparisonParts[2]);if(!tmpComparisonResult){return'';}else{if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
5810
- return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),null,pContextArray);}}}catch(pError){this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError),pError);return"Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpComparisonOperation;var tmpHashParts=tmpHash.split(':');if(tmpHashParts.length<3){this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]")));}tmpTemplateHash=tmpHashParts[0];tmpAddressOfData=tmpHashParts[1];tmpComparisonOperation=tmpHashParts[2];// No template hash
5811
- if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]")));}// No comparison operation
5812
- if(!tmpComparisonOperation){this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]")));}// Now try to break the comparison into three parts...
5813
- var tmpComparisonParts=tmpComparisonOperation.split('^');if(tmpComparisonParts.length<3){this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]")));}// Now look up the data at the comparison location
5814
- try{var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray),tmpComparisonParts[1],tmpComparisonParts[2]);if(!tmpComparisonResult){return tmpCallback(null,'');}else{if(!tmpAddressOfData){return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}catch(pError){this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError),pError);return tmpCallback(pError,'');}}}]);}(libPictTemplateIf);module.exports=PictTemplateProviderTemplateIfAbsolute;},{"./Pict-Template-TemplateIf-Base.js":235}]},{},[199])(199);});
6182
+ */function PictTemplateProviderTemplateIfAbsolute(pFable,pOptions,pServiceHash){var _this121;_classCallCheck2(this,PictTemplateProviderTemplateIfAbsolute);_this121=_callSuper(this,PictTemplateProviderTemplateIfAbsolute,[pFable,pOptions,pServiceHash]);/** @type {any} */_this121.log;_this121.addPattern('{~TemplateIfAbsolute:','~}');_this121.addPattern('{~TIfAbs:','~}');return _this121;}/**
6183
+ * Render a template expression, returning a string with the resulting content.
6184
+ *
6185
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6186
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6187
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6188
+ *
6189
+ * @return {string} The rendered template
6190
+ */_inherits(PictTemplateProviderTemplateIfAbsolute,_libPictTemplateIf2);return _createClass2(PictTemplateProviderTemplateIfAbsolute,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpComparisonOperation;var tmpHashParts=tmpHash.split(':');if(tmpHashParts.length<3){this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]"));return'';}tmpTemplateHash=tmpHashParts[0];tmpAddressOfData=tmpHashParts[1];tmpComparisonOperation=tmpHashParts[2];// No template hash
6191
+ if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return'';}// No comparison operation
6192
+ if(!tmpComparisonOperation){this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]"));return'';}// Now try to break the comparison into three parts...
6193
+ var tmpComparisonParts=tmpComparisonOperation.split('^');if(tmpComparisonParts.length<3){this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]"));return'';}// Now look up the data at the comparison location
6194
+ try{var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray),tmpComparisonParts[1],tmpComparisonParts[2]);if(!tmpComparisonResult){return'';}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
6195
+ return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),null,pContextArray);}}catch(pError){this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError),pError);return'';}}/**
6196
+ * Render a template expression, deliver a string with the resulting content to a callback function.
6197
+ *
6198
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6199
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6200
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6201
+ * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
6202
+ *
6203
+ * @return {void}
6204
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpComparisonOperation;var tmpHashParts=tmpHash.split(':');if(tmpHashParts.length<3){this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]"));return tmpCallback(null,'');}tmpTemplateHash=tmpHashParts[0];tmpAddressOfData=tmpHashParts[1];tmpComparisonOperation=tmpHashParts[2];// No template hash
6205
+ if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return tmpCallback(null,'');}// No comparison operation
6206
+ if(!tmpComparisonOperation){this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]"));return tmpCallback(null,'');}// Now try to break the comparison into three parts...
6207
+ var tmpComparisonParts=tmpComparisonOperation.split('^');if(tmpComparisonParts.length<3){this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]"));return tmpCallback(null,'');}// Now look up the data at the comparison location
6208
+ try{var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray),tmpComparisonParts[1],tmpComparisonParts[2]);if(!tmpComparisonResult){return tmpCallback(null,'');}if(!tmpAddressOfData){this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}catch(pError){this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError),pError);return tmpCallback(pError,'');}}}]);}(libPictTemplateIf);module.exports=PictTemplateProviderTemplateIfAbsolute;},{"./Pict-Template-TemplateIf-Base.js":236}]},{},[199])(199);});
5815
6209
  //# sourceMappingURL=pict.compatible.js.map