pict 1.0.292 → 1.0.294

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 (110) hide show
  1. package/dist/pict.compatible.js +432 -285
  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 +312 -166
  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 +4 -4
  10. package/source/Pict-DataProvider.js +1 -1
  11. package/source/Pict-Meadow-EntityProvider.js +1 -1
  12. package/source/Pict-Record-Projection.js +1 -1
  13. package/source/Pict.js +24 -7
  14. package/source/filters/Filter.js +8 -0
  15. package/source/providers/Provider-Filter-Manager.js +78 -4
  16. package/source/services/Fable-Service-TransactionTracking.js +1 -1
  17. package/source/templates/Pict-Template-Data.js +3 -2
  18. package/source/templates/Pict-Template-DataValueByKey.js +4 -3
  19. package/source/templates/Pict-Template-DataWithTemplateFallback.js +8 -6
  20. package/source/templates/Pict-Template-Entity.js +6 -4
  21. package/source/templates/Pict-Template-Self.js +2 -1
  22. package/source/templates/Pict-Template-SolveByReference.js +5 -4
  23. package/source/templates/Pict-Template-Template.js +9 -7
  24. package/source/templates/Pict-Template-TemplateByDataAddress.js +11 -9
  25. package/source/templates/Pict-Template-TemplateByReference.js +11 -9
  26. package/source/templates/Pict-Template-TemplateFromMap.js +12 -10
  27. package/source/templates/Pict-Template-TemplateSet.js +9 -7
  28. package/source/templates/Pict-Template-TemplateSetFromMap.js +12 -10
  29. package/source/templates/Pict-Template-TemplateSetWithPayload.js +10 -8
  30. package/source/templates/Pict-Template-TemplateValueSet.js +10 -8
  31. package/source/templates/Pict-Template-View-RetainingScope.js +8 -4
  32. package/source/templates/Pict-Template-View.js +7 -4
  33. package/source/templates/data/Pict-Template-DataEncodeJavascriptString.js +3 -2
  34. package/source/templates/data/Pict-Template-DataJson.js +3 -2
  35. package/source/templates/data/Pict-Template-DateOnlyFormat.js +3 -2
  36. package/source/templates/data/Pict-Template-DateOnlyYMD.js +3 -2
  37. package/source/templates/data/Pict-Template-DateTimeFormat.js +3 -2
  38. package/source/templates/data/Pict-Template-DateTimeYMD.js +3 -2
  39. package/source/templates/data/Pict-Template-Digits.js +3 -2
  40. package/source/templates/data/Pict-Template-Dollars.js +3 -2
  41. package/source/templates/data/Pict-Template-HtmlCommentEnd.js +3 -2
  42. package/source/templates/data/Pict-Template-HtmlCommentStart.js +3 -2
  43. package/source/templates/data/Pict-Template-Join.js +3 -2
  44. package/source/templates/data/Pict-Template-JoinUnique.js +3 -2
  45. package/source/templates/data/Pict-Template-PascalCaseIdentifier.js +3 -2
  46. package/source/templates/data/Pict-Template-PluckJoinUnique.js +3 -2
  47. package/source/templates/data-generation/Pict-Template-RandomNumber.js +2 -1
  48. package/source/templates/data-generation/Pict-Template-RandomNumberString.js +2 -1
  49. package/source/templates/debugging/Pict-Template-Breakpoint.js +2 -1
  50. package/source/templates/debugging/Pict-Template-DataValueTree.js +7 -5
  51. package/source/templates/debugging/Pict-Template-LogStatement.js +2 -1
  52. package/source/templates/debugging/Pict-Template-LogValue.js +3 -2
  53. package/source/templates/debugging/Pict-Template-LogValueTree.js +3 -2
  54. package/source/templates/logic/Pict-Template-NotEmpty.js +3 -2
  55. package/source/templates/logic/Pict-Template-TemplateIf.js +13 -11
  56. package/source/templates/logic/Pict-Template-TemplateIfAbsolute.js +11 -9
  57. package/types/source/Pict-DataProvider.d.ts +2 -2
  58. package/types/source/Pict-DataProvider.d.ts.map +1 -1
  59. package/types/source/Pict-Meadow-EntityProvider.d.ts +2 -2
  60. package/types/source/Pict-Meadow-EntityProvider.d.ts.map +1 -1
  61. package/types/source/Pict-Record-Projection.d.ts +2 -2
  62. package/types/source/Pict-Record-Projection.d.ts.map +1 -1
  63. package/types/source/Pict.d.ts +14 -7
  64. package/types/source/Pict.d.ts.map +1 -1
  65. package/types/source/filters/Filter.d.ts.map +1 -1
  66. package/types/source/providers/Provider-Filter-Manager.d.ts +52 -2
  67. package/types/source/providers/Provider-Filter-Manager.d.ts.map +1 -1
  68. package/types/source/services/Fable-Service-TransactionTracking.d.ts +2 -2
  69. package/types/source/services/Fable-Service-TransactionTracking.d.ts.map +1 -1
  70. package/types/source/templates/Pict-Template-Data.d.ts.map +1 -1
  71. package/types/source/templates/Pict-Template-DataValueByKey.d.ts.map +1 -1
  72. package/types/source/templates/Pict-Template-DataWithTemplateFallback.d.ts.map +1 -1
  73. package/types/source/templates/Pict-Template-Entity.d.ts.map +1 -1
  74. package/types/source/templates/Pict-Template-Self.d.ts.map +1 -1
  75. package/types/source/templates/Pict-Template-SolveByReference.d.ts.map +1 -1
  76. package/types/source/templates/Pict-Template-Template.d.ts.map +1 -1
  77. package/types/source/templates/Pict-Template-TemplateByDataAddress.d.ts.map +1 -1
  78. package/types/source/templates/Pict-Template-TemplateByReference.d.ts.map +1 -1
  79. package/types/source/templates/Pict-Template-TemplateFromMap.d.ts.map +1 -1
  80. package/types/source/templates/Pict-Template-TemplateSet.d.ts.map +1 -1
  81. package/types/source/templates/Pict-Template-TemplateSetFromMap.d.ts.map +1 -1
  82. package/types/source/templates/Pict-Template-TemplateSetWithPayload.d.ts.map +1 -1
  83. package/types/source/templates/Pict-Template-TemplateValueSet.d.ts.map +1 -1
  84. package/types/source/templates/Pict-Template-View-RetainingScope.d.ts.map +1 -1
  85. package/types/source/templates/Pict-Template-View.d.ts.map +1 -1
  86. package/types/source/templates/data/Pict-Template-DataEncodeJavascriptString.d.ts.map +1 -1
  87. package/types/source/templates/data/Pict-Template-DataJson.d.ts.map +1 -1
  88. package/types/source/templates/data/Pict-Template-DateOnlyFormat.d.ts.map +1 -1
  89. package/types/source/templates/data/Pict-Template-DateOnlyYMD.d.ts.map +1 -1
  90. package/types/source/templates/data/Pict-Template-DateTimeFormat.d.ts.map +1 -1
  91. package/types/source/templates/data/Pict-Template-DateTimeYMD.d.ts.map +1 -1
  92. package/types/source/templates/data/Pict-Template-Digits.d.ts.map +1 -1
  93. package/types/source/templates/data/Pict-Template-Dollars.d.ts.map +1 -1
  94. package/types/source/templates/data/Pict-Template-HtmlCommentEnd.d.ts.map +1 -1
  95. package/types/source/templates/data/Pict-Template-HtmlCommentStart.d.ts.map +1 -1
  96. package/types/source/templates/data/Pict-Template-Join.d.ts.map +1 -1
  97. package/types/source/templates/data/Pict-Template-JoinUnique.d.ts.map +1 -1
  98. package/types/source/templates/data/Pict-Template-PascalCaseIdentifier.d.ts.map +1 -1
  99. package/types/source/templates/data/Pict-Template-PluckJoinUnique.d.ts.map +1 -1
  100. package/types/source/templates/data-generation/Pict-Template-RandomNumber.d.ts.map +1 -1
  101. package/types/source/templates/data-generation/Pict-Template-RandomNumberString.d.ts.map +1 -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 +2 -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.map +1 -1
  106. package/types/source/templates/debugging/Pict-Template-LogValue.d.ts.map +1 -1
  107. package/types/source/templates/debugging/Pict-Template-LogValueTree.d.ts.map +1 -1
  108. package/types/source/templates/logic/Pict-Template-NotEmpty.d.ts.map +1 -1
  109. package/types/source/templates/logic/Pict-Template-TemplateIf.d.ts.map +1 -1
  110. package/types/source/templates/logic/Pict-Template-TemplateIfAbsolute.d.ts.map +1 -1
@@ -751,7 +751,7 @@ return[this._HexLookup[pBuffer[i++]],this._HexLookup[pBuffer[i++]],this._HexLook
751
751
  tmpRandomBytes[6]=tmpRandomBytes[6]&0x0f|0x40;tmpRandomBytes[8]=tmpRandomBytes[8]&0x3f|0x80;return this.bytesToUUID(tmpRandomBytes);}// Simple random UUID generation
752
752
  },{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)
753
753
  },{key:"getUUID",value:function getUUID(){if(this._UUIDModeRandom){return this.generateRandom();}else{return this.generateUUIDv4();}}}]);}(libFableServiceProviderBase);// This is for backwards compatibility
754
- 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.17","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.42"},"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.41","simple-get":"^4.0.1"}};},{}],68:[function(require,module,exports){/**
754
+ 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.18","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.42"},"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.41","simple-get":"^4.0.1"}};},{}],68:[function(require,module,exports){/**
755
755
  * Fable Application Services Support Library
756
756
  * @author <steven@velozo.com>
757
757
  */// Pre-init services
@@ -1940,8 +1940,9 @@ var tmpHistogramValueSet=Object.keys(tmpHistogram);var tmpModeValueSet=[];for(va
1940
1940
  * @param {function} fCallback - The callback function to call when a pattern is matched
1941
1941
  * @param {array} pDataContext - The history of data objects already passed in
1942
1942
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
1943
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
1943
1944
  * @return {string} The result from the parser
1944
- */},{key:"parseString",value:function parseString(pString,pData,fCallback,pDataContext,pScope){if(this.LogNoisiness>4){this.fable.log.trace("Metatemplate parsing template string [".concat(pString,"] where the callback is a ").concat(_typeof(fCallback)),{TemplateData:pData});}return this.StringParser.parseString(pString,this.ParseTree,pData,fCallback,pDataContext,pScope);}}]);}(libFableServiceBase);module.exports=FableServiceMetaTemplate;},{"./Fable-Service-MetaTemplate/MetaTemplate-StringParser.js":90,"./Fable-Service-MetaTemplate/MetaTemplate-WordTree.js":91,"fable-serviceproviderbase":59}],90:[function(require,module,exports){/**
1945
+ */},{key:"parseString",value:function parseString(pString,pData,fCallback,pDataContext,pScope,pState){if(this.LogNoisiness>4){this.fable.log.trace("Metatemplate parsing template string [".concat(pString,"] where the callback is a ").concat(_typeof(fCallback)),{TemplateData:pData});}return this.StringParser.parseString(pString,this.ParseTree,pData,fCallback,pDataContext,pScope,pState);}}]);}(libFableServiceBase);module.exports=FableServiceMetaTemplate;},{"./Fable-Service-MetaTemplate/MetaTemplate-StringParser.js":90,"./Fable-Service-MetaTemplate/MetaTemplate-WordTree.js":91,"fable-serviceproviderbase":59}],90:[function(require,module,exports){/**
1945
1946
  * String Parser
1946
1947
  * @author Steven Velozo <steven@velozo.com>
1947
1948
  * @description Parse a string, properly processing each matched token in the word tree.
@@ -1973,29 +1974,37 @@ pParserState.Pattern=false;pParserState.PatternStartNode=false;pParserState.Star
1973
1974
  * @param {string} pCharacter - The character to append
1974
1975
  * @param {Object} pParserState - The state object for the current parsing task
1975
1976
  * @param {any} pData - The data available to the template
1976
- * @param {any} pDataContext - The history of data objects/context already passed in
1977
+ * @param {Array<any>} pDataContext - The history of data objects/context already passed in
1977
1978
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
1979
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
1978
1980
  * @private
1979
- */},{key:"parseCharacter",value:function parseCharacter(pCharacter,pParserState,pData,pDataContext,pScope){// If we are already in a pattern match traversal
1981
+ */},{key:"parseCharacter",value:function parseCharacter(pCharacter,pParserState,pData,pDataContext,pScope,pState){// If we are already in a pattern match traversal
1980
1982
  if(pParserState.PatternMatch){// If the pattern is still matching the start and we haven't passed the buffer
1981
1983
  if(!pParserState.StartPatternMatchComplete&&pCharacter in pParserState.Pattern){pParserState.Pattern=pParserState.Pattern[pCharacter];this.appendOutputBuffer(pCharacter,pParserState);}else if(pParserState.EndPatternMatchBegan){if(pCharacter in pParserState.Pattern.PatternEnd){// This leaf has a PatternEnd tree, so we will wait until that end is met.
1982
1984
  pParserState.Pattern=pParserState.Pattern.PatternEnd[pCharacter];// Flush the output buffer.
1983
1985
  this.appendOutputBuffer(pCharacter,pParserState);// If this last character is the end of the pattern, parse it.
1984
1986
  // Run the function
1985
- var tmpFunctionContext='ParserContext'in pParserState.Pattern?pParserState.Pattern.ParserContext:false;if(tmpFunctionContext){pParserState.OutputBuffer=pParserState.Pattern.Parse.call(tmpFunctionContext,pParserState.OutputBuffer.substr(pParserState.Pattern.PatternStartString.length,pParserState.OutputBuffer.length-(pParserState.Pattern.PatternStartString.length+pParserState.Pattern.PatternEndString.length)),pData,pDataContext,pScope);}else{pParserState.OutputBuffer=pParserState.Pattern.Parse(pParserState.OutputBuffer.substr(pParserState.Pattern.PatternStartString.length,pParserState.OutputBuffer.length-(pParserState.Pattern.PatternStartString.length+pParserState.Pattern.PatternEndString.length)),pData,pDataContext,pScope);}return this.resetOutputBuffer(pParserState);}else if(pCharacter in pParserState.PatternStartNode.PatternEnd){// We broke out of the end -- see if this is a new start of the end.
1987
+ var tmpFunctionContext='ParserContext'in pParserState.Pattern?pParserState.Pattern.ParserContext:false;if(tmpFunctionContext){pParserState.OutputBuffer=pParserState.Pattern.Parse.call(tmpFunctionContext,pParserState.OutputBuffer.substr(pParserState.Pattern.PatternStartString.length,pParserState.OutputBuffer.length-(pParserState.Pattern.PatternStartString.length+pParserState.Pattern.PatternEndString.length)),pData,pDataContext,pScope,pState);}else{pParserState.OutputBuffer=pParserState.Pattern.Parse(pParserState.OutputBuffer.substr(pParserState.Pattern.PatternStartString.length,pParserState.OutputBuffer.length-(pParserState.Pattern.PatternStartString.length+pParserState.Pattern.PatternEndString.length)),pData,pDataContext,pScope,pState);}return this.resetOutputBuffer(pParserState);}else if(pCharacter in pParserState.PatternStartNode.PatternEnd){// We broke out of the end -- see if this is a new start of the end.
1986
1988
  pParserState.Pattern=pParserState.PatternStartNode.PatternEnd[pCharacter];this.appendOutputBuffer(pCharacter,pParserState);}else{pParserState.EndPatternMatchBegan=false;this.appendOutputBuffer(pCharacter,pParserState);}}else if('PatternEnd'in pParserState.Pattern){if(!pParserState.StartPatternMatchComplete){pParserState.StartPatternMatchComplete=true;pParserState.PatternStartNode=pParserState.Pattern;}this.appendOutputBuffer(pCharacter,pParserState);if(pCharacter in pParserState.Pattern.PatternEnd){// This is the first character of the end pattern.
1987
1989
  pParserState.EndPatternMatchBegan=true;// This leaf has a PatternEnd tree, so we will wait until that end is met.
1988
1990
  pParserState.Pattern=pParserState.Pattern.PatternEnd[pCharacter];// If this last character is the end of the pattern, parse it.
1989
1991
  if('Parse'in pParserState.Pattern){// Run the t*mplate function
1990
- var _tmpFunctionContext='ParserContext'in pParserState.Pattern?pParserState.Pattern.ParserContext:false;if(_tmpFunctionContext){pParserState.OutputBuffer=pParserState.Pattern.Parse.call(_tmpFunctionContext,pParserState.OutputBuffer.substr(pParserState.Pattern.PatternStartString.length,pParserState.OutputBuffer.length-(pParserState.Pattern.PatternStartString.length+pParserState.Pattern.PatternEndString.length)),pData,pDataContext,pScope);}else{pParserState.OutputBuffer=pParserState.Pattern.Parse(pParserState.OutputBuffer.substr(pParserState.Pattern.PatternStartString.length,pParserState.OutputBuffer.length-(pParserState.Pattern.PatternStartString.length+pParserState.Pattern.PatternEndString.length)),pData,pDataContext,pScope);}return this.resetOutputBuffer(pParserState);}}}else{// We are in a pattern start but didn't match one; reset and start trying again from this character.
1992
+ var _tmpFunctionContext='ParserContext'in pParserState.Pattern?pParserState.Pattern.ParserContext:false;if(_tmpFunctionContext){pParserState.OutputBuffer=pParserState.Pattern.Parse.call(_tmpFunctionContext,pParserState.OutputBuffer.substr(pParserState.Pattern.PatternStartString.length,pParserState.OutputBuffer.length-(pParserState.Pattern.PatternStartString.length+pParserState.Pattern.PatternEndString.length)),pData,pDataContext,pScope,pState);}else{pParserState.OutputBuffer=pParserState.Pattern.Parse(pParserState.OutputBuffer.substr(pParserState.Pattern.PatternStartString.length,pParserState.OutputBuffer.length-(pParserState.Pattern.PatternStartString.length+pParserState.Pattern.PatternEndString.length)),pData,pDataContext,pScope,pState);}return this.resetOutputBuffer(pParserState);}}}else{// We are in a pattern start but didn't match one; reset and start trying again from this character.
1991
1993
  this.resetOutputBuffer(pParserState);}}// If we aren't in a pattern match or pattern, and this isn't the start of a new pattern (RAW mode)....
1992
1994
  if(!pParserState.PatternMatch){// This may be the start of a new pattern....
1993
1995
  if(pCharacter in pParserState.ParseTree){// ... assign the root node as the matched node.
1994
- this.resetOutputBuffer(pParserState);this.appendOutputBuffer(pCharacter,pParserState);pParserState.Pattern=pParserState.ParseTree[pCharacter];pParserState.PatternMatch=true;return true;}else{this.appendOutputBuffer(pCharacter,pParserState);}}return false;}},{key:"executePatternAsync",value:function executePatternAsync(pParserState,pData,fCallback,pDataContext,pScope){var _this33=this;// ... this is the end of a pattern, cut off the end tag and parse it.
1996
+ this.resetOutputBuffer(pParserState);this.appendOutputBuffer(pCharacter,pParserState);pParserState.Pattern=pParserState.ParseTree[pCharacter];pParserState.PatternMatch=true;return true;}else{this.appendOutputBuffer(pCharacter,pParserState);}}return false;}/**
1997
+ * @param {Object} pParserState - The state object for the current parsing task
1998
+ * @param {Object} pData - The data to pass to the function as a second parameter
1999
+ * @param {function} fCallback - The callback function to call when the parse is complete
2000
+ * @param {array} pDataContext - The history of data objects/context already passed in
2001
+ * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
2002
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
2003
+ */},{key:"executePatternAsync",value:function executePatternAsync(pParserState,pData,fCallback,pDataContext,pScope,pState){var _this33=this;// ... this is the end of a pattern, cut off the end tag and parse it.
1995
2004
  // Trim the start and end tags off the output buffer now
1996
2005
  if(pParserState.Pattern.isAsync){// Run the function
1997
- var tmpFunctionContext='ParserContext'in pParserState.Pattern?pParserState.Pattern.ParserContext:false;if(tmpFunctionContext){return pParserState.Pattern.ParseAsync.call(tmpFunctionContext,pParserState.OutputBuffer.substr(pParserState.Pattern.PatternStartString.length,pParserState.OutputBuffer.length-(pParserState.Pattern.PatternStartString.length+pParserState.Pattern.PatternEndString.length)),pData,function(pError,pAsyncOutput){if(pError){_this33.fable.log.info("Precedent ERROR: Async template error happened parsing ".concat(pParserState.Pattern.PatternStart," ... ").concat(pParserState.Pattern.PatternEnd,": ").concat(pError));}pParserState.OutputBuffer=pAsyncOutput;_this33.resetOutputBuffer(pParserState);return fCallback();},pDataContext,pScope);}else{return pParserState.Pattern.ParseAsync(pParserState.OutputBuffer.substr(pParserState.Pattern.PatternStartString.length,pParserState.OutputBuffer.length-(pParserState.Pattern.PatternStartString.length+pParserState.Pattern.PatternEndString.length)),pData,function(pError,pAsyncOutput){if(pError){_this33.fable.log.info("Precedent ERROR: Async template error happened parsing ".concat(pParserState.Pattern.PatternStart," ... ").concat(pParserState.Pattern.PatternEnd,": ").concat(pError));}pParserState.OutputBuffer=pAsyncOutput;_this33.resetOutputBuffer(pParserState);return fCallback();},pDataContext,pScope);}}else{// Run the t*mplate function
1998
- var _tmpFunctionContext2='ParserContext'in pParserState.Pattern?pParserState.Pattern.ParserContext:false;if(_tmpFunctionContext2){pParserState.OutputBuffer=pParserState.Pattern.Parse.call(_tmpFunctionContext2,pParserState.OutputBuffer.substr(pParserState.Pattern.PatternStartString.length,pParserState.OutputBuffer.length-(pParserState.Pattern.PatternStartString.length+pParserState.Pattern.PatternEndString.length)),pData,pDataContext,pScope);}else{pParserState.OutputBuffer=pParserState.Pattern.Parse(pParserState.OutputBuffer.substr(pParserState.Pattern.PatternStartString.length,pParserState.OutputBuffer.length-(pParserState.Pattern.PatternStartString.length+pParserState.Pattern.PatternEndString.length)),pData,pDataContext,pScope);}this.resetOutputBuffer(pParserState);return fCallback();}}/**
2006
+ var tmpFunctionContext='ParserContext'in pParserState.Pattern?pParserState.Pattern.ParserContext:false;if(tmpFunctionContext){return pParserState.Pattern.ParseAsync.call(tmpFunctionContext,pParserState.OutputBuffer.substr(pParserState.Pattern.PatternStartString.length,pParserState.OutputBuffer.length-(pParserState.Pattern.PatternStartString.length+pParserState.Pattern.PatternEndString.length)),pData,function(pError,pAsyncOutput){if(pError){_this33.fable.log.info("Precedent ERROR: Async template error happened parsing ".concat(pParserState.Pattern.PatternStart," ... ").concat(pParserState.Pattern.PatternEnd,": ").concat(pError));}pParserState.OutputBuffer=pAsyncOutput;_this33.resetOutputBuffer(pParserState);return fCallback();},pDataContext,pScope,pState);}else{return pParserState.Pattern.ParseAsync(pParserState.OutputBuffer.substr(pParserState.Pattern.PatternStartString.length,pParserState.OutputBuffer.length-(pParserState.Pattern.PatternStartString.length+pParserState.Pattern.PatternEndString.length)),pData,function(pError,pAsyncOutput){if(pError){_this33.fable.log.info("Precedent ERROR: Async template error happened parsing ".concat(pParserState.Pattern.PatternStart," ... ").concat(pParserState.Pattern.PatternEnd,": ").concat(pError));}pParserState.OutputBuffer=pAsyncOutput;_this33.resetOutputBuffer(pParserState);return fCallback();},pDataContext,pScope,pState);}}else{// Run the t*mplate function
2007
+ var _tmpFunctionContext2='ParserContext'in pParserState.Pattern?pParserState.Pattern.ParserContext:false;if(_tmpFunctionContext2){pParserState.OutputBuffer=pParserState.Pattern.Parse.call(_tmpFunctionContext2,pParserState.OutputBuffer.substr(pParserState.Pattern.PatternStartString.length,pParserState.OutputBuffer.length-(pParserState.Pattern.PatternStartString.length+pParserState.Pattern.PatternEndString.length)),pData,pDataContext,pScope,pState);}else{pParserState.OutputBuffer=pParserState.Pattern.Parse(pParserState.OutputBuffer.substr(pParserState.Pattern.PatternStartString.length,pParserState.OutputBuffer.length-(pParserState.Pattern.PatternStartString.length+pParserState.Pattern.PatternEndString.length)),pData,pDataContext,pScope,pState);}this.resetOutputBuffer(pParserState);return fCallback();}}/**
1999
2008
  * Parse a character in the buffer.
2000
2009
  * @method parseCharacterAsync
2001
2010
  * @param {string} pCharacter - The character to append
@@ -2004,17 +2013,18 @@ var _tmpFunctionContext2='ParserContext'in pParserState.Pattern?pParserState.Pat
2004
2013
  * @param {function} fCallback - The callback function to call when the parse is complete
2005
2014
  * @param {array} pDataContext - The history of data objects/context already passed in
2006
2015
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
2016
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
2007
2017
  * @private
2008
- */},{key:"parseCharacterAsync",value:function parseCharacterAsync(pCharacter,pParserState,pData,fCallback,pDataContext,pScope){// If we are already in a pattern match traversal
2018
+ */},{key:"parseCharacterAsync",value:function parseCharacterAsync(pCharacter,pParserState,pData,fCallback,pDataContext,pScope,pState){// If we are already in a pattern match traversal
2009
2019
  if(pParserState.PatternMatch){// If the pattern is still matching the start and we haven't passed the buffer
2010
2020
  if(!pParserState.StartPatternMatchComplete&&pCharacter in pParserState.Pattern){pParserState.Pattern=pParserState.Pattern[pCharacter];this.appendOutputBuffer(pCharacter,pParserState);}else if(pParserState.EndPatternMatchBegan){if(pCharacter in pParserState.Pattern.PatternEnd){// This leaf has a PatternEnd tree, so we will wait until that end is met.
2011
2021
  pParserState.Pattern=pParserState.Pattern.PatternEnd[pCharacter];// Flush the output buffer.
2012
2022
  this.appendOutputBuffer(pCharacter,pParserState);// If this last character is the end of the pattern, parse it.
2013
- if('Parse'in pParserState.Pattern){return this.executePatternAsync(pParserState,pData,fCallback,pDataContext,pScope);}}else if(pCharacter in pParserState.PatternStartNode.PatternEnd){// We broke out of the end -- see if this is a new start of the end.
2023
+ if('Parse'in pParserState.Pattern){return this.executePatternAsync(pParserState,pData,fCallback,pDataContext,pScope,pState);}}else if(pCharacter in pParserState.PatternStartNode.PatternEnd){// We broke out of the end -- see if this is a new start of the end.
2014
2024
  pParserState.Pattern=pParserState.PatternStartNode.PatternEnd[pCharacter];this.appendOutputBuffer(pCharacter,pParserState);}else{pParserState.EndPatternMatchBegan=false;this.appendOutputBuffer(pCharacter,pParserState);}}else if('PatternEnd'in pParserState.Pattern){if(!pParserState.StartPatternMatchComplete){pParserState.StartPatternMatchComplete=true;pParserState.PatternStartNode=pParserState.Pattern;}this.appendOutputBuffer(pCharacter,pParserState);if(pCharacter in pParserState.Pattern.PatternEnd){// This is the first character of the end pattern.
2015
2025
  pParserState.EndPatternMatchBegan=true;// This leaf has a PatternEnd tree, so we will wait until that end is met.
2016
2026
  pParserState.Pattern=pParserState.Pattern.PatternEnd[pCharacter];// If this last character is the end of the pattern, parse it.
2017
- if('Parse'in pParserState.Pattern){return this.executePatternAsync(pParserState,pData,fCallback,pDataContext,pScope);}}}else{// We are in a pattern start but didn't match one; reset and start trying again from this character.
2027
+ if('Parse'in pParserState.Pattern){return this.executePatternAsync(pParserState,pData,fCallback,pDataContext,pScope,pState);}}}else{// We are in a pattern start but didn't match one; reset and start trying again from this character.
2018
2028
  this.resetOutputBuffer(pParserState);}}// If we aren't in a pattern match or pattern, and this isn't the start of a new pattern (RAW mode)....
2019
2029
  else{// This may be the start of a new pattern....
2020
2030
  if(pCharacter in pParserState.ParseTree){// ... assign the root node as the matched node.
@@ -2029,10 +2039,11 @@ return fCallback();}/**
2029
2039
  * @param {function} fCallback - The callback function to call when the parse is complete
2030
2040
  * @param {array} pDataContext - The history of data objects/context already passed in
2031
2041
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
2032
- */},{key:"parseString",value:function parseString(pString,pParseTree,pData,fCallback,pDataContext,pScope){var _this34=this;// TODO: There is danger here if a template function attempts to functionally recurse and doesn't pass this in.
2042
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
2043
+ */},{key:"parseString",value:function parseString(pString,pParseTree,pData,fCallback,pDataContext,pScope,pState){var _this34=this;// TODO: There is danger here if a template function attempts to functionally recurse and doesn't pass this in.
2033
2044
  var tmpPreviousDataContext=Array.isArray(pDataContext)?pDataContext:[];var tmpDataContext=Array.from(tmpPreviousDataContext);tmpDataContext.push(pData);if(typeof fCallback!=='function'){var tmpParserState=this.newParserState(pParseTree);for(var i=0;i<pString.length;i++){// TODO: This is not fast.
2034
- this.parseCharacter(pString[i],tmpParserState,pData,tmpDataContext,pScope);}this.flushOutputBuffer(tmpParserState);return tmpParserState.Output;}else{// This is the async mode
2035
- var _tmpParserState=this.newParserState(pParseTree);_tmpParserState.Asynchronous=true;var tmpAnticipate=this.fable.instantiateServiceProviderWithoutRegistration('Anticipate');var _loop=function _loop(_i21){tmpAnticipate.anticipate(function(fCallback){_this34.parseCharacterAsync(pString[_i21],_tmpParserState,pData,fCallback,tmpDataContext,pScope);});};for(var _i21=0;_i21<pString.length;_i21++){_loop(_i21);}tmpAnticipate.wait(function(pError){// Flush the remaining data
2045
+ this.parseCharacter(pString[i],tmpParserState,pData,tmpDataContext,pScope,pState);}this.flushOutputBuffer(tmpParserState);return tmpParserState.Output;}else{// This is the async mode
2046
+ var _tmpParserState=this.newParserState(pParseTree);_tmpParserState.Asynchronous=true;var tmpAnticipate=this.fable.instantiateServiceProviderWithoutRegistration('Anticipate');var _loop=function _loop(_i21){tmpAnticipate.anticipate(function(fCallback){_this34.parseCharacterAsync(pString[_i21],_tmpParserState,pData,fCallback,tmpDataContext,pScope,pState);});};for(var _i21=0;_i21<pString.length;_i21++){_loop(_i21);}tmpAnticipate.wait(function(pError){// Flush the remaining data
2036
2047
  _this34.flushOutputBuffer(_tmpParserState);return fCallback(pError,_tmpParserState.Output);});}}}]);}();module.exports=StringParser;},{}],91:[function(require,module,exports){/**
2037
2048
  * Word Tree
2038
2049
  * @author Steven Velozo <steven@velozo.com>
@@ -3501,7 +3512,7 @@ return fCallback();}}},{key:"onAfterInitialize",value:function onAfterInitialize
3501
3512
  * @param {(pError?: Error) => void} fCallback - The callback to call after the data load.
3502
3513
  */},{key:"onSaveDataAsync",value:function onSaveDataAsync(fCallback){if(this.pict.LogNoisiness>3){this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onSaveDataAsync:"));}return fCallback();}/**
3503
3514
  * @param {(pError?: Error) => void} fCallback - The callback to call after the data post-load.
3504
- */},{key:"onAfterSaveDataAsync",value:function onAfterSaveDataAsync(fCallback){return fCallback();}}]);}(libFableServiceBase);module.exports=PictProvider;},{"../package.json":140,"fable-serviceproviderbase":59}],142:[function(require,module,exports){module.exports={"name":"pict-template","version":"1.0.12","description":"Pict Template Base Class","main":"source/Pict-Template.js","scripts":{"start":"node source/Pict-Template.js","test":"npx mocha -u tdd -R spec","tests":"npx mocha -u tdd --exit -R spec --grep","coverage":"npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec","build":"npx quack build","types":"tsc -p ."},"types":"types/source/Pict-Template.d.ts","repository":{"type":"git","url":"git+https://github.com/stevenvelozo/pict-view.git"},"author":"steven velozo <steven@velozo.com>","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/pict-view/issues"},"homepage":"https://github.com/stevenvelozo/pict-view#readme","devDependencies":{"pict":"^1.0.275","quackage":"^1.0.42","typescript":"^5.8.3"},"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"]},"dependencies":{"fable-serviceproviderbase":"^3.0.15"}};},{}],143:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');var libPackage=require('../package.json');/** @typedef {import('pict') & {
3515
+ */},{key:"onAfterSaveDataAsync",value:function onAfterSaveDataAsync(fCallback){return fCallback();}}]);}(libFableServiceBase);module.exports=PictProvider;},{"../package.json":140,"fable-serviceproviderbase":59}],142:[function(require,module,exports){module.exports={"name":"pict-template","version":"1.0.13","description":"Pict Template Base Class","main":"source/Pict-Template.js","scripts":{"start":"node source/Pict-Template.js","test":"npx mocha -u tdd -R spec","tests":"npx mocha -u tdd --exit -R spec --grep","coverage":"npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec","build":"npx quack build","types":"tsc -p ."},"types":"types/source/Pict-Template.d.ts","repository":{"type":"git","url":"git+https://github.com/stevenvelozo/pict-view.git"},"author":"steven velozo <steven@velozo.com>","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/pict-view/issues"},"homepage":"https://github.com/stevenvelozo/pict-view#readme","devDependencies":{"pict":"^1.0.293","quackage":"^1.0.42","typescript":"^5.8.3"},"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"]},"dependencies":{"fable-serviceproviderbase":"^3.0.15"}};},{}],143:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');var libPackage=require('../package.json');/** @typedef {import('pict') & {
3505
3516
  * [key: string]: any, // represent services for now as a workaround
3506
3517
  * }} Pict *//**
3507
3518
  * @class PictTemplateExpression
@@ -3517,9 +3528,10 @@ return fCallback();}}},{key:"onAfterInitialize",value:function onAfterInitialize
3517
3528
  * @param {any} pRecord - The json object to be used as the Record for the template render
3518
3529
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
3519
3530
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
3531
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
3520
3532
  *
3521
3533
  * @return {string} The rendered template
3522
- */_inherits(PictTemplateExpression,_libFableServiceBase15);return _createClass2(PictTemplateExpression,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){return'';}/**
3534
+ */_inherits(PictTemplateExpression,_libFableServiceBase15);return _createClass2(PictTemplateExpression,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){return'';}/**
3523
3535
  * Render a template expression, deliver a string with the resulting content to a callback function.
3524
3536
  *
3525
3537
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
@@ -3527,9 +3539,10 @@ return fCallback();}}},{key:"onAfterInitialize",value:function onAfterInitialize
3527
3539
  * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
3528
3540
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
3529
3541
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
3542
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
3530
3543
  *
3531
3544
  * @return {void}
3532
- */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope){return fCallback(null,this.render(pTemplateHash,pRecord,pContextArray,pScope));}/**
3545
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope,pState){return fCallback(null,this.render(pTemplateHash,pRecord,pContextArray,pScope,pState));}/**
3533
3546
  * Provide a match criteria for a template expression. Anything between these two values is returned as the template hash.
3534
3547
  *
3535
3548
  * @param {string} pMatchStart - The string pattern to start a match in the template trie
@@ -3544,23 +3557,27 @@ return fCallback();}}},{key:"onAfterInitialize",value:function onAfterInitialize
3544
3557
  * @param {Array<any>} [pContextArray] - The context array to resolve (optional)
3545
3558
  * @param {Record<string, any>} [pRootDataObject] - The root data object to resolve (optional)
3546
3559
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
3560
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
3547
3561
  *
3548
3562
  * @return {any} The value at the given address, or undefined
3549
- */},{key:"resolveStateFromAddress",value:function resolveStateFromAddress(pAddress,pRecord,pContextArray,pRootDataObject,pScope){return this.pict.resolveStateFromAddress(pAddress,pRecord,pContextArray,pRootDataObject,pScope);}}]);}(libFableServiceBase);module.exports=PictTemplateExpression;module.exports.template_hash='Default';},{"../package.json":142,"fable-serviceproviderbase":59}],144:[function(require,module,exports){module.exports={"name":"pict-view","version":"1.0.62","description":"Pict View Base Class","main":"source/Pict-View.js","scripts":{"test":"mocha -u tdd -R spec","start":"node source/Pict-View.js","coverage":"nyc --reporter=lcov --reporter=text-lcov npm test","build":"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-view-image:local","docker-dev-run":"docker run -it -d --name pict-view-dev -p 30001:8080 -p 38086:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/pict-view\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" pict-view-image:local","docker-dev-shell":"docker exec -it pict-view-dev /bin/bash","types":"tsc -p .","lint":"eslint source/**"},"types":"types/source/Pict-View.d.ts","repository":{"type":"git","url":"git+https://github.com/stevenvelozo/pict-view.git"},"author":"steven velozo <steven@velozo.com>","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/pict-view/issues"},"homepage":"https://github.com/stevenvelozo/pict-view#readme","devDependencies":{"@eslint/js":"^9.28.0","browser-env":"^3.3.0","eslint":"^9.28.0","pict":"^1.0.275","quackage":"^1.0.42","typescript":"^5.8.3"},"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"]},"dependencies":{"fable":"^3.1.14","fable-serviceproviderbase":"^3.0.15"}};},{}],145:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');var libPackage=require('../package.json');var defaultPictViewSettings={DefaultRenderable:false,DefaultDestinationAddress:false,DefaultTemplateRecordAddress:false,ViewIdentifier:false,// If this is set to true, when the App initializes this will.
3563
+ */},{key:"resolveStateFromAddress",value:function resolveStateFromAddress(pAddress,pRecord,pContextArray,pRootDataObject,pScope,pState){return this.pict.resolveStateFromAddress(pAddress,pRecord,pContextArray,pRootDataObject,pScope,pState);}}]);}(libFableServiceBase);module.exports=PictTemplateExpression;module.exports.template_hash='Default';},{"../package.json":142,"fable-serviceproviderbase":59}],144:[function(require,module,exports){module.exports={"name":"pict-view","version":"1.0.63","description":"Pict View Base Class","main":"source/Pict-View.js","scripts":{"test":"mocha -u tdd -R spec","tests":"mocha -u tdd -R spec -g","start":"node source/Pict-View.js","coverage":"nyc --reporter=lcov --reporter=text-lcov npm test","build":"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-view-image:local","docker-dev-run":"docker run -it -d --name pict-view-dev -p 30001:8080 -p 38086:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/pict-view\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" pict-view-image:local","docker-dev-shell":"docker exec -it pict-view-dev /bin/bash","types":"tsc -p .","lint":"eslint source/**"},"types":"types/source/Pict-View.d.ts","repository":{"type":"git","url":"git+https://github.com/stevenvelozo/pict-view.git"},"author":"steven velozo <steven@velozo.com>","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/pict-view/issues"},"homepage":"https://github.com/stevenvelozo/pict-view#readme","devDependencies":{"@eslint/js":"^9.28.0","browser-env":"^3.3.0","eslint":"^9.28.0","pict":"^1.0.292","quackage":"^1.0.42","typescript":"^5.8.3"},"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"]},"dependencies":{"fable":"^3.1.18","fable-serviceproviderbase":"^3.0.15"}};},{}],145:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');var libPackage=require('../package.json');var defaultPictViewSettings={DefaultRenderable:false,DefaultDestinationAddress:false,DefaultTemplateRecordAddress:false,ViewIdentifier:false,// If this is set to true, when the App initializes this will.
3550
3564
  // After the App initializes, initialize will be called as soon as it's added.
3551
3565
  AutoInitialize:true,AutoInitializeOrdinal:0,// If this is set to true, when the App autorenders (on load) this will.
3552
3566
  // After the App initializes, render will be called as soon as it's added.
3553
3567
  AutoRender:true,AutoRenderOrdinal:0,AutoSolveWithApp:true,AutoSolveOrdinal:0,CSSHash:false,CSS:false,CSSProvider:false,CSSPriority:500,Templates:[],DefaultTemplates:[],Renderables:[],Manifests:{}};/** @typedef {(error?: Error) => void} ErrorCallback *//** @typedef {number | boolean} PictTimestamp *//**
3554
- * @typedef {'replace' | 'append' | 'prepend' | 'append_once'} RenderMethod
3568
+ * @typedef {'replace' | 'append' | 'prepend' | 'append_once' | 'virtual-assignment'} RenderMethod
3555
3569
  *//**
3556
3570
  * @typedef {Object} Renderable
3557
3571
  *
3558
3572
  * @property {string} RenderableHash - A unique hash for the renderable.
3559
- * @property {string} TemplateHash] - The hash of the template to use for rendering this renderable.
3573
+ * @property {string} TemplateHash - The hash of the template to use for rendering this renderable.
3560
3574
  * @property {string} [DefaultTemplateRecordAddress] - The default address for resolving the data record for this renderable.
3561
3575
  * @property {string} [ContentDestinationAddress] - The default address (DOM CSS selector) for rendering the content of this renderable.
3562
- * @property {RenderMethod} [RenderMethod=replace] - The method to use when projecting the renderable to the DOM ('replace', 'append', 'prepend', 'append_once').
3576
+ * @property {RenderMethod} [RenderMethod=replace] - The method to use when projecting the renderable to the DOM ('replace', 'append', 'prepend', 'append_once', 'virtual-assignment').
3563
3577
  * @property {string} [TestAddress] - The address to use for testing the renderable.
3578
+ * @property {string} [TransactionHash] - The transaction hash for the root renderable.
3579
+ * @property {string} [RootRenderableViewHash] - The hash of the root renderable.
3580
+ * @property {string} [Content] - The rendered content for this renderable, if applicable.
3564
3581
  *//**
3565
3582
  * Represents a view in the Pict ecosystem.
3566
3583
  */var PictView=/*#__PURE__*/function(_libFableServiceBase16){/**
@@ -3570,8 +3587,8 @@ AutoRender:true,AutoRenderOrdinal:0,AutoSolveWithApp:true,AutoSolveOrdinal:0,CSS
3570
3587
  */function PictView(pFable,pOptions,pServiceHash){var _this64;_classCallCheck2(this,PictView);// Intersect default options, parent constructor, service information
3571
3588
  var tmpOptions=Object.assign({},JSON.parse(JSON.stringify(defaultPictViewSettings)),pOptions);_this64=_callSuper(this,PictView,[pFable,tmpOptions,pServiceHash]);//FIXME: add types to fable and ancillaries
3572
3589
  /** @type {any} */_this64.fable;/** @type {any} */_this64.options;/** @type {String} */_this64.UUID;/** @type {String} */_this64.Hash;/** @type {any} */_this64.log;if(!_this64.options.ViewIdentifier){_this64.options.ViewIdentifier="AutoViewID-".concat(_this64.fable.getUUID());}_this64.serviceType='PictView';/** @type {Record<string, any>} */_this64._Package=libPackage;// Convenience and consistency naming
3573
- /** @type {import('pict') & { log: any, instantiateServiceProviderWithoutRegistration: (hash: String) => any }} */_this64.pict=_this64.fable;// Wire in the essential Pict application state
3574
- _this64.AppData=_this64.pict.AppData;_this64.Bundle=_this64.pict.Bundle;/** @type {PictTimestamp} */_this64.initializeTimestamp=false;/** @type {PictTimestamp} */_this64.lastSolvedTimestamp=false;/** @type {PictTimestamp} */_this64.lastRenderedTimestamp=false;/** @type {PictTimestamp} */_this64.lastMarshalFromViewTimestamp=false;/** @type {PictTimestamp} */_this64.lastMarshalToViewTimestamp=false;// Load all templates from the array in the options
3590
+ /** @type {import('pict') & { log: any, instantiateServiceProviderWithoutRegistration: (hash: String) => any, instantiateServiceProviderIfNotExists: (hash: string) => any, TransactionTracking: import('pict/types/source/services/Fable-Service-TransactionTracking') }} */_this64.pict=_this64.fable;// Wire in the essential Pict application state
3591
+ _this64.AppData=_this64.pict.AppData;_this64.Bundle=_this64.pict.Bundle;/** @type {PictTimestamp} */_this64.initializeTimestamp=false;/** @type {PictTimestamp} */_this64.lastSolvedTimestamp=false;/** @type {PictTimestamp} */_this64.lastRenderedTimestamp=false;/** @type {PictTimestamp} */_this64.lastMarshalFromViewTimestamp=false;/** @type {PictTimestamp} */_this64.lastMarshalToViewTimestamp=false;_this64.pict.instantiateServiceProviderIfNotExists('TransactionTracking');// Load all templates from the array in the options
3575
3592
  // Templates are in the form of {Hash:'Some-Template-Hash',Template:'Template content',Source:'TemplateSource'}
3576
3593
  for(var i=0;i<_this64.options.Templates.length;i++){var tmpTemplate=_this64.options.Templates[i];if(!('Hash'in tmpTemplate)||!('Template'in tmpTemplate)){_this64.log.error("PictView [".concat(_this64.UUID,"]::[").concat(_this64.Hash,"] ").concat(_this64.options.ViewIdentifier," could not load Template ").concat(i," in the options array."),tmpTemplate);}else{if(!tmpTemplate.Source){tmpTemplate.Source="PictView [".concat(_this64.UUID,"]::[").concat(_this64.Hash,"] ").concat(_this64.options.ViewIdentifier," options object.");}_this64.pict.TemplateProvider.addTemplate(tmpTemplate.Hash,tmpTemplate.Template,tmpTemplate.Source);}}// Load all default templates from the array in the options
3577
3594
  // Templates are in the form of {Prefix:'',Postfix:'-List-Row',Template:'Template content',Source:'TemplateSourceString'}
@@ -3581,7 +3598,7 @@ if(_this64.options.CSS){var tmpCSSHash=_this64.options.CSSHash?_this64.options.C
3581
3598
  // They look as such: {Identifier:'ContentEntry', TemplateHash:'Content-Entry-Section-Main', ContentDestinationAddress:'#ContentSection', RecordAddress:'AppData.Content.DefaultText', ManifestTransformation:'ManyfestHash', ManifestDestinationAddress:'AppData.Content.DataToTransformContent'}
3582
3599
  // The only parts that are necessary are Identifier and Template
3583
3600
  // A developer can then do render('ContentEntry') and it just kinda works. Or they can override the ContentDestinationAddress
3584
- /** @type {Object<String, Renderable>} */_this64.renderables={};for(var _i58=0;_i58<_this64.options.Renderables.length;_i58++){/** @type {Renderable} */var tmpRenderable=_this64.options.Renderables[_i58];_this64.addRenderable(tmpRenderable);}return _this64;}/**
3601
+ /** @type {Record<String, Renderable>} */_this64.renderables={};for(var _i58=0;_i58<_this64.options.Renderables.length;_i58++){/** @type {Renderable} */var tmpRenderable=_this64.options.Renderables[_i58];_this64.addRenderable(tmpRenderable);}return _this64;}/**
3585
3602
  * Adds a renderable to the view.
3586
3603
  *
3587
3604
  * @param {string | Renderable} pRenderableHash - The hash of the renderable, or a renderable object.
@@ -3618,14 +3635,23 @@ return fCallback();}}},{key:"onAfterInitialize",value:function onAfterInitialize
3618
3635
  * Lifecycle hook that triggers before the view is rendered.
3619
3636
  *
3620
3637
  * @param {Renderable} pRenderable - The renderable that will be rendered.
3621
- * @param {string} pRenderDestinationAddress - The address where the renderable will be rendered.
3622
- * @param {any} pRecord - The record (data) that will be used to render the renderable.
3623
- */},{key:"onBeforeRender",value:function onBeforeRender(pRenderable,pRenderDestinationAddress,pRecord){// Overload this to mess with stuff before the content gets generated from the template
3638
+ */},{key:"onBeforeRender",value:function onBeforeRender(pRenderable){// Overload this to mess with stuff before the content gets generated from the template
3624
3639
  if(this.pict.LogNoisiness>3){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeRender:"));}return true;}/**
3625
3640
  * Lifecycle hook that triggers before the view is rendered (async flow).
3626
3641
  *
3627
3642
  * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.
3628
- */},{key:"onBeforeRenderAsync",value:function onBeforeRenderAsync(fCallback){return fCallback();}/**
3643
+ * @param {Renderable} pRenderable - The renderable that will be rendered.
3644
+ */},{key:"onBeforeRenderAsync",value:function onBeforeRenderAsync(fCallback,pRenderable){this.onBeforeRender(pRenderable);return fCallback();}/**
3645
+ * Lifecycle hook that triggers before the view is projected into the DOM.
3646
+ *
3647
+ * @param {Renderable} pRenderable - The renderable that will be projected.
3648
+ */},{key:"onBeforeProject",value:function onBeforeProject(pRenderable){// Overload this to mess with stuff before the content gets generated from the template
3649
+ if(this.pict.LogNoisiness>3){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeProject:"));}return true;}/**
3650
+ * Lifecycle hook that triggers before the view is projected into the DOM (async flow).
3651
+ *
3652
+ * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.
3653
+ * @param {Renderable} pRenderable - The renderable that will be projected.
3654
+ */},{key:"onBeforeProjectAsync",value:function onBeforeProjectAsync(fCallback,pRenderable){this.onBeforeProject(pRenderable);return fCallback();}/**
3629
3655
  * Builds the render options for a renderable.
3630
3656
  *
3631
3657
  * For DRY purposes on the three flavors of render.
@@ -3646,45 +3672,48 @@ if(this.pict.LogNoisiness>3){this.log.trace("PictView [".concat(this.UUID,"]::["
3646
3672
  */},{key:"assignRenderContent",value:function assignRenderContent(pRenderable,pRenderDestinationAddress,pContent){return this.pict.ContentAssignment.projectContent(pRenderable.RenderMethod,pRenderDestinationAddress,pContent,pRenderable.TestAddress);}/**
3647
3673
  * Render a renderable from this view.
3648
3674
  *
3649
- * @param {string} [pRenderable] - The hash of the renderable to render.
3675
+ * @param {string} [pRenderableHash] - The hash of the renderable to render.
3650
3676
  * @param {string} [pRenderDestinationAddress] - The address where the renderable will be rendered.
3651
3677
  * @param {string|object} [pTemplateRecordAddress] - The address where the data for the template is stored.
3678
+ * @param {Renderable} [pRootRenderable] - The root renderable for the render operation, if applicable.
3652
3679
  * @return {boolean}
3653
- */},{key:"render",value:function render(pRenderable,pRenderDestinationAddress,pTemplateRecordAddress){return this.renderWithScope(this,pRenderable,pRenderDestinationAddress,pTemplateRecordAddress);}/**
3680
+ */},{key:"render",value:function render(pRenderableHash,pRenderDestinationAddress,pTemplateRecordAddress,pRootRenderable){return this.renderWithScope(this,pRenderableHash,pRenderDestinationAddress,pTemplateRecordAddress,pRootRenderable);}/**
3654
3681
  * Render a renderable from this view, providing a specifici scope for the template.
3655
3682
  *
3656
3683
  * @param {any} pScope - The scope to use for the template rendering.
3657
- * @param {string} [pRenderable] - The hash of the renderable to render.
3684
+ * @param {string} [pRenderableHash] - The hash of the renderable to render.
3658
3685
  * @param {string} [pRenderDestinationAddress] - The address where the renderable will be rendered.
3659
3686
  * @param {string|object} [pTemplateRecordAddress] - The address where the data for the template is stored.
3687
+ * @param {Renderable} [pRootRenderable] - The root renderable for the render operation, if applicable.
3660
3688
  * @return {boolean}
3661
- */},{key:"renderWithScope",value:function renderWithScope(pScope,pRenderable,pRenderDestinationAddress,pTemplateRecordAddress){var tmpRenderableHash=typeof pRenderable==='string'?pRenderable:typeof this.options.DefaultRenderable=='string'?this.options.DefaultRenderable:false;if(!tmpRenderableHash){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderableHash," (param ").concat(pRenderable,") because it is not a valid renderable."));return false;}var tmpRenderable;if(tmpRenderableHash=='__Virtual'){tmpRenderable={RenderableHash:'__Virtual',TemplateHash:this.renderables[this.options.DefaultRenderable].TemplateHash,DestinationAddress:pRenderDestinationAddress,RenderMethod:'virtual-assignment'};}else{tmpRenderable=this.renderables[tmpRenderableHash];}if(!tmpRenderable){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderableHash," (param ").concat(pRenderable,") because it does not exist."));return false;}var tmpRenderDestinationAddress=typeof pRenderDestinationAddress==='string'?pRenderDestinationAddress:typeof tmpRenderable.ContentDestinationAddress==='string'?tmpRenderable.ContentDestinationAddress:typeof this.options.DefaultDestinationAddress==='string'?this.options.DefaultDestinationAddress:false;if(!tmpRenderDestinationAddress){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderableHash," (param ").concat(pRenderable,") because it does not have a valid destination address."));return false;}var tmpRecordAddress;var tmpRecord;if(_typeof(pTemplateRecordAddress)==='object'){tmpRecord=pTemplateRecordAddress;tmpRecordAddress='Passed in as object';}else{tmpRecordAddress=typeof pTemplateRecordAddress==='string'?pTemplateRecordAddress:typeof tmpRenderable.DefaultTemplateRecordAddress==='string'?tmpRenderable.DefaultTemplateRecordAddress:typeof this.options.DefaultTemplateRecordAddress==='string'?this.options.DefaultTemplateRecordAddress:false;tmpRecord=typeof tmpRecordAddress==='string'?this.pict.DataProvider.getDataByAddress(tmpRecordAddress):undefined;}// Execute the developer-overridable pre-render behavior
3662
- this.onBeforeRender(tmpRenderable,tmpRenderDestinationAddress,tmpRecord);if(this.pict.LogControlFlow){this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(tmpRenderableHash,"] Destination[").concat(tmpRenderDestinationAddress,"] TemplateRecordAddress[").concat(tmpRecordAddress,"] render:"));}if(this.pict.LogNoisiness>0){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Render of Renderable[").concat(tmpRenderableHash,"] to Destination [").concat(tmpRenderDestinationAddress,"]..."));}// Generate the content output from the template and data
3663
- var tmpContent=this.pict.parseTemplateByHash(tmpRenderable.TemplateHash,tmpRecord,null,[this],pScope);if(this.pict.LogNoisiness>0){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Assigning Renderable[").concat(tmpRenderableHash,"] content length ").concat(tmpContent.length," to Destination [").concat(tmpRenderDestinationAddress,"] using render method [").concat(tmpRenderable.RenderMethod,"]."));}// Assign the content to the destination address
3664
- this.pict.ContentAssignment.projectContent(tmpRenderable.RenderMethod,tmpRenderDestinationAddress,tmpContent,tmpRenderable.TestAddress);// Execute the developer-overridable post-render behavior
3665
- this.onAfterRender(tmpRenderable,tmpRenderDestinationAddress,tmpRecord,tmpContent);this.lastRenderedTimestamp=this.pict.log.getTimeStamp();return true;}/**
3689
+ */},{key:"renderWithScope",value:function renderWithScope(pScope,pRenderableHash,pRenderDestinationAddress,pTemplateRecordAddress,pRootRenderable){var tmpRenderableHash=typeof pRenderableHash==='string'?pRenderableHash:typeof this.options.DefaultRenderable=='string'?this.options.DefaultRenderable:false;if(!tmpRenderableHash){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderableHash," (param ").concat(pRenderableHash,") because it is not a valid renderable."));return false;}/** @type {Renderable} */var tmpRenderable;if(tmpRenderableHash=='__Virtual'){tmpRenderable={RenderableHash:'__Virtual',TemplateHash:this.renderables[this.options.DefaultRenderable].TemplateHash,ContentDestinationAddress:typeof pRenderDestinationAddress==='string'?pRenderDestinationAddress:typeof tmpRenderable.ContentDestinationAddress==='string'?tmpRenderable.ContentDestinationAddress:typeof this.options.DefaultDestinationAddress==='string'?this.options.DefaultDestinationAddress:null,RenderMethod:'virtual-assignment',TransactionHash:pRootRenderable&&pRootRenderable.TransactionHash,RootRenderableViewHash:pRootRenderable&&pRootRenderable.RootRenderableViewHash};}else{tmpRenderable=Object.assign({},this.renderables[tmpRenderableHash]);tmpRenderable.ContentDestinationAddress=typeof pRenderDestinationAddress==='string'?pRenderDestinationAddress:typeof tmpRenderable.ContentDestinationAddress==='string'?tmpRenderable.ContentDestinationAddress:typeof this.options.DefaultDestinationAddress==='string'?this.options.DefaultDestinationAddress:null;}if(!tmpRenderable.TransactionHash){tmpRenderable.TransactionHash="ViewRender-V-".concat(this.options.ViewIdentifier,"-R-").concat(tmpRenderableHash,"-U-").concat(this.pict.getUUID());tmpRenderable.RootRenderableViewHash=this.Hash;this.pict.TransactionTracking.registerTransaction(tmpRenderable.TransactionHash);}if(!tmpRenderable){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderableHash," (param ").concat(pRenderableHash,") because it does not exist."));return false;}if(!tmpRenderable.ContentDestinationAddress){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderableHash," (param ").concat(pRenderableHash,") because it does not have a valid destination address."));return false;}var tmpRecordAddress;var tmpRecord;if(_typeof(pTemplateRecordAddress)==='object'){tmpRecord=pTemplateRecordAddress;tmpRecordAddress='Passed in as object';}else{tmpRecordAddress=typeof pTemplateRecordAddress==='string'?pTemplateRecordAddress:typeof tmpRenderable.DefaultTemplateRecordAddress==='string'?tmpRenderable.DefaultTemplateRecordAddress:typeof this.options.DefaultTemplateRecordAddress==='string'?this.options.DefaultTemplateRecordAddress:false;tmpRecord=typeof tmpRecordAddress==='string'?this.pict.DataProvider.getDataByAddress(tmpRecordAddress):undefined;}// Execute the developer-overridable pre-render behavior
3690
+ this.onBeforeRender(tmpRenderable);if(this.pict.LogControlFlow){this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(tmpRenderableHash,"] Destination[").concat(tmpRenderable.ContentDestinationAddress,"] TemplateRecordAddress[").concat(tmpRecordAddress,"] render:"));}if(this.pict.LogNoisiness>0){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Render of Renderable[").concat(tmpRenderableHash,"] to Destination [").concat(tmpRenderable.ContentDestinationAddress,"]..."));}// Generate the content output from the template and data
3691
+ tmpRenderable.Content=this.pict.parseTemplateByHash(tmpRenderable.TemplateHash,tmpRecord,null,[this],pScope,{RootRenderable:_typeof(pRootRenderable)==='object'?pRootRenderable:tmpRenderable});if(this.pict.LogNoisiness>0){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Assigning Renderable[").concat(tmpRenderableHash,"] content length ").concat(tmpRenderable.Content.length," to Destination [").concat(tmpRenderable.ContentDestinationAddress,"] using render method [").concat(tmpRenderable.RenderMethod,"]."));}this.onBeforeProject(tmpRenderable);this.onProject(tmpRenderable);if(tmpRenderable.RenderMethod!=='virtual-assignment'){this.onAfterProject(tmpRenderable);// Execute the developer-overridable post-render behavior
3692
+ this.onAfterRender(tmpRenderable);}return true;}/**
3666
3693
  * Render a renderable from this view.
3667
3694
  *
3668
3695
  * @param {string|ErrorCallback} [pRenderableHash] - The hash of the renderable to render.
3669
3696
  * @param {string|ErrorCallback} [pRenderDestinationAddress] - The address where the renderable will be rendered.
3670
3697
  * @param {string|object|ErrorCallback} [pTemplateRecordAddress] - The address where the data for the template is stored.
3698
+ * @param {Renderable|ErrorCallback} [pRootRenderable] - The root renderable for the render operation, if applicable.
3671
3699
  * @param {ErrorCallback} [fCallback] - The callback to call when the async operation is complete.
3672
3700
  *
3673
3701
  * @return {void}
3674
- */},{key:"renderAsync",value:function renderAsync(pRenderableHash,pRenderDestinationAddress,pTemplateRecordAddress,fCallback){return this.renderWithScopeAsync(this,pRenderableHash,pRenderDestinationAddress,pTemplateRecordAddress,fCallback);}/**
3702
+ */},{key:"renderAsync",value:function renderAsync(pRenderableHash,pRenderDestinationAddress,pTemplateRecordAddress,pRootRenderable,fCallback){return this.renderWithScopeAsync(this,pRenderableHash,pRenderDestinationAddress,pTemplateRecordAddress,pRootRenderable,fCallback);}/**
3675
3703
  * Render a renderable from this view.
3676
3704
  *
3677
3705
  * @param {any} pScope - The scope to use for the template rendering.
3678
3706
  * @param {string|ErrorCallback} [pRenderableHash] - The hash of the renderable to render.
3679
3707
  * @param {string|ErrorCallback} [pRenderDestinationAddress] - The address where the renderable will be rendered.
3680
3708
  * @param {string|object|ErrorCallback} [pTemplateRecordAddress] - The address where the data for the template is stored.
3709
+ * @param {Renderable|ErrorCallback} [pRootRenderable] - The root renderable for the render operation, if applicable.
3681
3710
  * @param {ErrorCallback} [fCallback] - The callback to call when the async operation is complete.
3682
3711
  *
3683
3712
  * @return {void}
3684
- */},{key:"renderWithScopeAsync",value:function renderWithScopeAsync(pScope,pRenderableHash,pRenderDestinationAddress,pTemplateRecordAddress,fCallback){var _this66=this;var tmpRenderableHash=typeof pRenderableHash==='string'?pRenderableHash:typeof this.options.DefaultRenderable=='string'?this.options.DefaultRenderable:false;// Allow the callback to be passed in as the last parameter no matter what
3685
- /** @type {ErrorCallback} */var tmpCallback=typeof fCallback==='function'?fCallback:typeof pTemplateRecordAddress==='function'?pTemplateRecordAddress:typeof pRenderDestinationAddress==='function'?pRenderDestinationAddress:typeof pRenderableHash==='function'?pRenderableHash:null;if(!tmpCallback){this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions."));tmpCallback=function tmpCallback(pError){if(pError){_this66.log.error("PictView [".concat(_this66.UUID,"]::[").concat(_this66.Hash,"] ").concat(_this66.options.Name," renderAsync Auto Callback Error: ").concat(pError),pError);}};}if(!tmpRenderableHash){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(tmpRenderableHash," (param ").concat(pRenderableHash,"because it is not a valid renderable."));return tmpCallback(new Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(tmpRenderableHash," (param ").concat(pRenderableHash,"because it is not a valid renderable.")));}var tmpRenderable;if(tmpRenderableHash=='__Virtual'){tmpRenderable={RenderableHash:'__Virtual',TemplateHash:this.renderables[this.options.DefaultRenderable].TemplateHash,DestinationAddress:pRenderDestinationAddress,RenderMethod:'virtual-assignment'};}else{tmpRenderable=this.renderables[tmpRenderableHash];}if(!tmpRenderable){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderableHash," (param ").concat(pRenderableHash,") because it does not exist."));return tmpCallback(new Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderableHash," (param ").concat(pRenderableHash,") because it does not exist.")));}var tmpRenderDestinationAddress=typeof pRenderDestinationAddress==='string'?pRenderDestinationAddress:typeof tmpRenderable.ContentDestinationAddress==='string'?tmpRenderable.ContentDestinationAddress:typeof this.options.DefaultDestinationAddress==='string'?this.options.DefaultDestinationAddress:false;if(!tmpRenderDestinationAddress){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderableHash," (param ").concat(pRenderableHash,") because it does not have a valid destination address."));return tmpCallback(new Error("Could not render ".concat(tmpRenderableHash)));}var tmpRecordAddress;var tmpRecord;if(_typeof(pTemplateRecordAddress)==='object'){tmpRecord=pTemplateRecordAddress;tmpRecordAddress='Passed in as object';}else{tmpRecordAddress=typeof pTemplateRecordAddress==='string'?pTemplateRecordAddress:typeof tmpRenderable.DefaultTemplateRecordAddress==='string'?tmpRenderable.DefaultTemplateRecordAddress:typeof this.options.DefaultTemplateRecordAddress==='string'?this.options.DefaultTemplateRecordAddress:false;tmpRecord=typeof tmpRecordAddress==='string'?this.pict.DataProvider.getDataByAddress(tmpRecordAddress):undefined;}if(this.pict.LogControlFlow){this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(tmpRenderableHash,"] Destination[").concat(tmpRenderDestinationAddress,"] TemplateRecordAddress[").concat(tmpRecordAddress,"] renderAsync:"));}if(this.pict.LogNoisiness>2){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Asynchronous Render (callback-style)..."));}var tmpAnticipate=this.fable.newAnticipate();tmpAnticipate.anticipate(function(fOnBeforeRenderCallback){_this66.onBeforeRender(tmpRenderable,tmpRenderDestinationAddress,tmpRecord);_this66.onBeforeRenderAsync(fOnBeforeRenderCallback);});var tmpContent;tmpAnticipate.anticipate(function(fAsyncTemplateCallback){// Render the template (asynchronously)
3686
- _this66.pict.parseTemplateByHash(tmpRenderable.TemplateHash,tmpRecord,function(pError,pContent){if(pError){_this66.log.error("PictView [".concat(_this66.UUID,"]::[").concat(_this66.Hash,"] ").concat(_this66.options.ViewIdentifier," could not render (asynchronously) ").concat(tmpRenderableHash," (param ").concat(pRenderableHash,") because it did not parse the template."),pError);return fAsyncTemplateCallback(pError);}tmpContent=pContent;if(_this66.pict.LogNoisiness>0){_this66.log.trace("PictView [".concat(_this66.UUID,"]::[").concat(_this66.Hash,"] ").concat(_this66.options.ViewIdentifier," Assigning Renderable[").concat(tmpRenderableHash,"] content length ").concat(pContent.length," to Destination [").concat(tmpRenderDestinationAddress,"] using Async render method ").concat(tmpRenderable.RenderMethod,"."));}_this66.pict.ContentAssignment.projectContent(tmpRenderable.RenderMethod,tmpRenderDestinationAddress,pContent,tmpRenderable.TestAddress);// Execute the developer-overridable asynchronous post-render behavior
3687
- _this66.lastRenderedTimestamp=_this66.pict.log.getTimeStamp();return fAsyncTemplateCallback();},[_this66],pScope);});tmpAnticipate.anticipate(function(fOnAfterRenderCallback){_this66.onAfterRender(tmpRenderable,tmpRenderDestinationAddress,tmpRecord,tmpContent);_this66.onAfterRenderAsync(fOnAfterRenderCallback);});tmpAnticipate.wait(tmpCallback);}/**
3713
+ */},{key:"renderWithScopeAsync",value:function renderWithScopeAsync(pScope,pRenderableHash,pRenderDestinationAddress,pTemplateRecordAddress,pRootRenderable,fCallback){var _this66=this;var tmpRenderableHash=typeof pRenderableHash==='string'?pRenderableHash:typeof this.options.DefaultRenderable=='string'?this.options.DefaultRenderable:false;// Allow the callback to be passed in as the last parameter no matter what
3714
+ /** @type {ErrorCallback} */var tmpCallback=typeof fCallback==='function'?fCallback:typeof pTemplateRecordAddress==='function'?pTemplateRecordAddress:typeof pRenderDestinationAddress==='function'?pRenderDestinationAddress:typeof pRenderableHash==='function'?pRenderableHash:typeof pRootRenderable==='function'?pRootRenderable:null;if(!tmpCallback){this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions."));tmpCallback=function tmpCallback(pError){if(pError){_this66.log.error("PictView [".concat(_this66.UUID,"]::[").concat(_this66.Hash,"] ").concat(_this66.options.Name," renderAsync Auto Callback Error: ").concat(pError),pError);}};}if(!tmpRenderableHash){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(tmpRenderableHash," (param ").concat(pRenderableHash,"because it is not a valid renderable."));return tmpCallback(new Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(tmpRenderableHash," (param ").concat(pRenderableHash,"because it is not a valid renderable.")));}/** @type {Renderable} */var tmpRenderable;if(tmpRenderableHash=='__Virtual'){tmpRenderable={RenderableHash:'__Virtual',TemplateHash:this.renderables[this.options.DefaultRenderable].TemplateHash,ContentDestinationAddress:typeof pRenderDestinationAddress==='string'?pRenderDestinationAddress:typeof this.options.DefaultDestinationAddress==='string'?this.options.DefaultDestinationAddress:null,RenderMethod:'virtual-assignment',TransactionHash:pRootRenderable&&typeof pRootRenderable!=='function'&&pRootRenderable.TransactionHash,RootRenderableViewHash:pRootRenderable&&typeof pRootRenderable!=='function'&&pRootRenderable.RootRenderableViewHash};}else{tmpRenderable=Object.assign({},this.renderables[tmpRenderableHash]);tmpRenderable.ContentDestinationAddress=typeof pRenderDestinationAddress==='string'?pRenderDestinationAddress:typeof tmpRenderable.ContentDestinationAddress==='string'?tmpRenderable.ContentDestinationAddress:typeof this.options.DefaultDestinationAddress==='string'?this.options.DefaultDestinationAddress:null;}if(!tmpRenderable.TransactionHash){tmpRenderable.TransactionHash="ViewRender-V-".concat(this.options.ViewIdentifier,"-R-").concat(tmpRenderableHash,"-U-").concat(this.pict.getUUID());tmpRenderable.RootRenderableViewHash=this.Hash;this.pict.TransactionTracking.registerTransaction(tmpRenderable.TransactionHash);}if(!tmpRenderable){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderableHash," (param ").concat(pRenderableHash,") because it does not exist."));return tmpCallback(new Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderableHash," (param ").concat(pRenderableHash,") because it does not exist.")));}if(!tmpRenderable.ContentDestinationAddress){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderableHash," (param ").concat(pRenderableHash,") because it does not have a valid destination address."));return tmpCallback(new Error("Could not render ".concat(tmpRenderableHash)));}var tmpRecordAddress;var tmpRecord;if(_typeof(pTemplateRecordAddress)==='object'){tmpRecord=pTemplateRecordAddress;tmpRecordAddress='Passed in as object';}else{tmpRecordAddress=typeof pTemplateRecordAddress==='string'?pTemplateRecordAddress:typeof tmpRenderable.DefaultTemplateRecordAddress==='string'?tmpRenderable.DefaultTemplateRecordAddress:typeof this.options.DefaultTemplateRecordAddress==='string'?this.options.DefaultTemplateRecordAddress:false;tmpRecord=typeof tmpRecordAddress==='string'?this.pict.DataProvider.getDataByAddress(tmpRecordAddress):undefined;}if(this.pict.LogControlFlow){this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(tmpRenderableHash,"] Destination[").concat(tmpRenderable.ContentDestinationAddress,"] TemplateRecordAddress[").concat(tmpRecordAddress,"] renderAsync:"));}if(this.pict.LogNoisiness>2){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Asynchronous Render (callback-style)..."));}var tmpAnticipate=this.fable.newAnticipate();tmpAnticipate.anticipate(function(fOnBeforeRenderCallback){_this66.onBeforeRenderAsync(fOnBeforeRenderCallback,tmpRenderable);});tmpAnticipate.anticipate(function(fAsyncTemplateCallback){// Render the template (asynchronously)
3715
+ _this66.pict.parseTemplateByHash(tmpRenderable.TemplateHash,tmpRecord,function(pError,pContent){if(pError){_this66.log.error("PictView [".concat(_this66.UUID,"]::[").concat(_this66.Hash,"] ").concat(_this66.options.ViewIdentifier," could not render (asynchronously) ").concat(tmpRenderableHash," (param ").concat(pRenderableHash,") because it did not parse the template."),pError);return fAsyncTemplateCallback(pError);}tmpRenderable.Content=pContent;return fAsyncTemplateCallback();},[_this66],pScope,{RootRenderable:_typeof(pRootRenderable)==='object'?pRootRenderable:tmpRenderable});});tmpAnticipate.anticipate(function(fNext){_this66.onBeforeProjectAsync(fNext,tmpRenderable);});tmpAnticipate.anticipate(function(fNext){_this66.onProjectAsync(fNext,tmpRenderable);});if(tmpRenderable.RenderMethod!=='virtual-assignment'){tmpAnticipate.anticipate(function(fNext){_this66.onAfterProjectAsync(fNext,tmpRenderable);});// Execute the developer-overridable post-render behavior
3716
+ tmpAnticipate.anticipate(function(fNext){_this66.onAfterRenderAsync(fNext,tmpRenderable);});}tmpAnticipate.wait(tmpCallback);}/**
3688
3717
  * Renders the default renderable.
3689
3718
  *
3690
3719
  * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.
@@ -3698,7 +3727,7 @@ this.renderAsync(fCallback);}/**
3698
3727
  * @param {string} [pRenderableHash] - The hash of the renderable to render.
3699
3728
  * @param {string} [pRenderDestinationAddress] - The address where the renderable will be rendered.
3700
3729
  * @param {string|object} [pTemplateRecordAddress] - The address of (or actual obejct) where the data for the template is stored.
3701
- */},{key:"basicRenderWithScope",value:function basicRenderWithScope(pScope,pRenderableHash,pRenderDestinationAddress,pTemplateRecordAddress){var tmpRenderOptions=this.buildRenderOptions(pRenderableHash,pRenderDestinationAddress,pTemplateRecordAddress);if(tmpRenderOptions.Valid){this.assignRenderContent(tmpRenderOptions.Renderable,tmpRenderOptions.DestinationAddress,this.pict.parseTemplateByHash(tmpRenderOptions.Renderable.TemplateHash,tmpRenderOptions.Record,null,[this],pScope));return true;}else{this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(tmpRenderOptions.RenderableHash," because it is not valid."));return false;}}/**
3730
+ */},{key:"basicRenderWithScope",value:function basicRenderWithScope(pScope,pRenderableHash,pRenderDestinationAddress,pTemplateRecordAddress){var tmpRenderOptions=this.buildRenderOptions(pRenderableHash,pRenderDestinationAddress,pTemplateRecordAddress);if(tmpRenderOptions.Valid){this.assignRenderContent(tmpRenderOptions.Renderable,tmpRenderOptions.DestinationAddress,this.pict.parseTemplateByHash(tmpRenderOptions.Renderable.TemplateHash,tmpRenderOptions.Record,null,[this],pScope,{RootRenderable:tmpRenderOptions.Renderable}));return true;}else{this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(tmpRenderOptions.RenderableHash," because it is not valid."));return false;}}/**
3702
3731
  * @param {string|ErrorCallback} [pRenderableHash] - The hash of the renderable to render.
3703
3732
  * @param {string|ErrorCallback} [pRenderDestinationAddress] - The address where the renderable will be rendered.
3704
3733
  * @param {string|Object|ErrorCallback} [pTemplateRecordAddress] - The address of (or actual obejct) where the data for the template is stored.
@@ -3713,18 +3742,36 @@ this.renderAsync(fCallback);}/**
3713
3742
  /** @type {ErrorCallback} */var tmpCallback=typeof fCallback==='function'?fCallback:typeof pTemplateRecordAddress==='function'?pTemplateRecordAddress:typeof pRenderDestinationAddress==='function'?pRenderDestinationAddress:typeof pRenderableHash==='function'?pRenderableHash:null;if(!tmpCallback){this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," basicRenderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions."));tmpCallback=function tmpCallback(pError){if(pError){_this67.log.error("PictView [".concat(_this67.UUID,"]::[").concat(_this67.Hash,"] ").concat(_this67.options.Name," basicRenderAsync Auto Callback Error: ").concat(pError),pError);}};}var tmpRenderOptions=this.buildRenderOptions(pRenderableHash,pRenderDestinationAddress,pTemplateRecordAddress);if(tmpRenderOptions.Valid){this.pict.parseTemplateByHash(tmpRenderOptions.Renderable.TemplateHash,tmpRenderOptions.Record,/**
3714
3743
  * @param {Error} [pError] - The error that occurred during template parsing.
3715
3744
  * @param {string} [pContent] - The content that was rendered from the template.
3716
- */function(pError,pContent){if(pError){_this67.log.error("PictView [".concat(_this67.UUID,"]::[").concat(_this67.Hash,"] ").concat(_this67.options.ViewIdentifier," could not render (asynchronously) ").concat(tmpRenderOptions.RenderableHash," because it did not parse the template."),pError);return tmpCallback(pError);}_this67.assignRenderContent(tmpRenderOptions.Renderable,tmpRenderOptions.DestinationAddress,pContent);return tmpCallback();},[this],pScope);}else{var tmpErrorMessage="PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(tmpRenderOptions.RenderableHash," because it is not valid.");this.log.error(tmpErrorMessage);return tmpCallback(new Error(tmpErrorMessage));}}/**
3745
+ */function(pError,pContent){if(pError){_this67.log.error("PictView [".concat(_this67.UUID,"]::[").concat(_this67.Hash,"] ").concat(_this67.options.ViewIdentifier," could not render (asynchronously) ").concat(tmpRenderOptions.RenderableHash," because it did not parse the template."),pError);return tmpCallback(pError);}_this67.assignRenderContent(tmpRenderOptions.Renderable,tmpRenderOptions.DestinationAddress,pContent);return tmpCallback();},[this],pScope,{RootRenderable:tmpRenderOptions.Renderable});}else{var tmpErrorMessage="PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(tmpRenderOptions.RenderableHash," because it is not valid.");this.log.error(tmpErrorMessage);return tmpCallback(new Error(tmpErrorMessage));}}/**
3746
+ * @param {Renderable} pRenderable - The renderable that was rendered.
3747
+ */},{key:"onProject",value:function onProject(pRenderable){if(this.pict.LogNoisiness>3){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onProject:"));}if(pRenderable.RenderMethod==='virtual-assignment'){this.pict.TransactionTracking.pushToTransactionQueue(pRenderable.TransactionHash,{ViewHash:this.Hash,Renderable:pRenderable},'Deferred-Post-Content-Assignment');}if(this.pict.LogNoisiness>0){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Assigning Renderable[").concat(pRenderable.RenderableHash,"] content length ").concat(pRenderable.Content.length," to Destination [").concat(pRenderable.ContentDestinationAddress,"] using Async render method ").concat(pRenderable.RenderMethod,"."));}// Assign the content to the destination address
3748
+ this.pict.ContentAssignment.projectContent(pRenderable.RenderMethod,pRenderable.ContentDestinationAddress,pRenderable.Content,pRenderable.TestAddress);this.lastRenderedTimestamp=this.pict.log.getTimeStamp();}/**
3749
+ * Lifecycle hook that triggers after the view is projected into the DOM (async flow).
3750
+ *
3751
+ * @param {(error?: Error, content?: string) => void} fCallback - The callback to call when the async operation is complete.
3752
+ * @param {Renderable} pRenderable - The renderable that is being projected.
3753
+ */},{key:"onProjectAsync",value:function onProjectAsync(fCallback,pRenderable){this.onProject(pRenderable);return fCallback();}/**
3717
3754
  * Lifecycle hook that triggers after the view is rendered.
3718
3755
  *
3719
3756
  * @param {Renderable} pRenderable - The renderable that was rendered.
3720
- * @param {string} pRenderDestinationAddress - The address where the renderable was rendered.
3721
- * @param {any} pRecord - The record (data) that was used by the renderable.
3722
- * @param {string} pContent - The content that was rendered.
3723
- */},{key:"onAfterRender",value:function onAfterRender(pRenderable,pRenderDestinationAddress,pRecord,pContent){if(this.pict.LogNoisiness>3){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRender:"));}return true;}/**
3757
+ */},{key:"onAfterRender",value:function onAfterRender(pRenderable){if(this.pict.LogNoisiness>3){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRender:"));}if(pRenderable&&pRenderable.RootRenderableViewHash===this.Hash){var tmpTransactionQueue=this.pict.TransactionTracking.clearTransactionQueue(pRenderable.TransactionHash)||[];var _iterator=_createForOfIteratorHelper(tmpTransactionQueue),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var tmpEvent=_step.value;var tmpView=this.pict.views[tmpEvent.Data.ViewHash];if(!tmpView){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRender: Could not find view for transaction hash ").concat(pRenderable.TransactionHash," and ViewHash ").concat(tmpEvent.Data.ViewHash,"."));continue;}tmpView.onAfterProject();// Execute the developer-overridable post-render behavior
3758
+ tmpView.onAfterRender(tmpEvent.Data.Renderable);}}catch(err){_iterator.e(err);}finally{_iterator.f();}}return true;}/**
3724
3759
  * Lifecycle hook that triggers after the view is rendered (async flow).
3725
3760
  *
3726
3761
  * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.
3727
- */},{key:"onAfterRenderAsync",value:function onAfterRenderAsync(fCallback){return fCallback();}/* -------------------------------------------------------------------------- *//* Code Section: Solver *//* -------------------------------------------------------------------------- *//**
3762
+ * @param {Renderable} pRenderable - The renderable that was rendered.
3763
+ */},{key:"onAfterRenderAsync",value:function onAfterRenderAsync(fCallback,pRenderable){var _this68=this;this.onAfterRender(pRenderable);var tmpAnticipate=this.fable.newAnticipate();if(pRenderable&&pRenderable.RootRenderableViewHash===this.Hash){var queue=this.pict.TransactionTracking.clearTransactionQueue(pRenderable.TransactionHash)||[];var _iterator2=_createForOfIteratorHelper(queue),_step2;try{var _loop3=function _loop3(){var event=_step2.value;/** @type {PictView} */var tmpView=_this68.pict.views[event.Data.ViewHash];if(!tmpView){_this68.log.error("PictView [".concat(_this68.UUID,"]::[").concat(_this68.Hash,"] ").concat(_this68.options.ViewIdentifier," onAfterRenderAsync: Could not find view for transaction hash ").concat(pRenderable.TransactionHash," and ViewHash ").concat(event.Data.ViewHash,"."));return 1;// continue
3764
+ }tmpAnticipate.anticipate(tmpView.onAfterProjectAsync.bind(tmpView));tmpAnticipate.anticipate(function(fNext){tmpView.onAfterRenderAsync(fNext,event.Data.Renderable);});// Execute the developer-overridable post-render behavior
3765
+ };for(_iterator2.s();!(_step2=_iterator2.n()).done;){if(_loop3())continue;}}catch(err){_iterator2.e(err);}finally{_iterator2.f();}}return tmpAnticipate.wait(fCallback);}/**
3766
+ * Lifecycle hook that triggers after the view is projected into the DOM.
3767
+ *
3768
+ * @param {Renderable} pRenderable - The renderable that was projected.
3769
+ */},{key:"onAfterProject",value:function onAfterProject(pRenderable){if(this.pict.LogNoisiness>3){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterProject:"));}return true;}/**
3770
+ * Lifecycle hook that triggers after the view is projected into the DOM (async flow).
3771
+ *
3772
+ * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.
3773
+ * @param {Renderable} pRenderable - The renderable that was projected.
3774
+ */},{key:"onAfterProjectAsync",value:function onAfterProjectAsync(fCallback,pRenderable){return fCallback();}/* -------------------------------------------------------------------------- *//* Code Section: Solver *//* -------------------------------------------------------------------------- *//**
3728
3775
  * Lifecycle hook that triggers before the view is solved.
3729
3776
  */},{key:"onBeforeSolve",value:function onBeforeSolve(){if(this.pict.LogNoisiness>3){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeSolve:"));}return true;}/**
3730
3777
  * Lifecycle hook that triggers before the view is solved (async flow).
@@ -3744,7 +3791,7 @@ this.renderAsync(fCallback);}/**
3744
3791
  * Performs view solving and triggers lifecycle hooks (async flow).
3745
3792
  *
3746
3793
  * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.
3747
- */},{key:"solveAsync",value:function solveAsync(fCallback){var _this68=this;var tmpAnticipate=this.pict.instantiateServiceProviderWithoutRegistration('Anticipate');/** @type {ErrorCallback} */var tmpCallback=typeof fCallback==='function'?fCallback:null;if(!tmpCallback){this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync was called without a valid callback. A callback will be generated but this could lead to race conditions."));tmpCallback=function tmpCallback(pError){if(pError){_this68.log.error("PictView [".concat(_this68.UUID,"]::[").concat(_this68.Hash,"] ").concat(_this68.options.Name," solveAsync Auto Callback Error: ").concat(pError),pError);}};}tmpAnticipate.anticipate(this.onBeforeSolveAsync.bind(this));tmpAnticipate.anticipate(this.onSolveAsync.bind(this));tmpAnticipate.anticipate(this.onAfterSolveAsync.bind(this));tmpAnticipate.wait(function(pError){if(_this68.pict.LogNoisiness>2){_this68.log.trace("PictView [".concat(_this68.UUID,"]::[").concat(_this68.Hash,"] ").concat(_this68.options.ViewIdentifier," solveAsync() complete."));}_this68.lastSolvedTimestamp=_this68.pict.log.getTimeStamp();return tmpCallback(pError);});}/**
3794
+ */},{key:"solveAsync",value:function solveAsync(fCallback){var _this69=this;var tmpAnticipate=this.pict.instantiateServiceProviderWithoutRegistration('Anticipate');/** @type {ErrorCallback} */var tmpCallback=typeof fCallback==='function'?fCallback:null;if(!tmpCallback){this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync was called without a valid callback. A callback will be generated but this could lead to race conditions."));tmpCallback=function tmpCallback(pError){if(pError){_this69.log.error("PictView [".concat(_this69.UUID,"]::[").concat(_this69.Hash,"] ").concat(_this69.options.Name," solveAsync Auto Callback Error: ").concat(pError),pError);}};}tmpAnticipate.anticipate(this.onBeforeSolveAsync.bind(this));tmpAnticipate.anticipate(this.onSolveAsync.bind(this));tmpAnticipate.anticipate(this.onAfterSolveAsync.bind(this));tmpAnticipate.wait(function(pError){if(_this69.pict.LogNoisiness>2){_this69.log.trace("PictView [".concat(_this69.UUID,"]::[").concat(_this69.Hash,"] ").concat(_this69.options.ViewIdentifier," solveAsync() complete."));}_this69.lastSolvedTimestamp=_this69.pict.log.getTimeStamp();return tmpCallback(pError);});}/**
3748
3795
  * Lifecycle hook that triggers after the view is solved.
3749
3796
  */},{key:"onAfterSolve",value:function onAfterSolve(){if(this.pict.LogNoisiness>3){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterSolve:"));}return true;}/**
3750
3797
  * Lifecycle hook that triggers after the view is solved (async flow).
@@ -3772,7 +3819,7 @@ this.renderAsync(fCallback);}/**
3772
3819
  * Marshals data from the view (async flow).
3773
3820
  *
3774
3821
  * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.
3775
- */},{key:"marshalFromViewAsync",value:function marshalFromViewAsync(fCallback){var _this69=this;var tmpAnticipate=this.pict.instantiateServiceProviderWithoutRegistration('Anticipate');/** @type {ErrorCallback} */var tmpCallback=typeof fCallback==='function'?fCallback:null;if(!tmpCallback){this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions."));tmpCallback=function tmpCallback(pError){if(pError){_this69.log.error("PictView [".concat(_this69.UUID,"]::[").concat(_this69.Hash,"] ").concat(_this69.options.Name," marshalFromViewAsync Auto Callback Error: ").concat(pError),pError);}};}tmpAnticipate.anticipate(this.onBeforeMarshalFromViewAsync.bind(this));tmpAnticipate.anticipate(this.onMarshalFromViewAsync.bind(this));tmpAnticipate.anticipate(this.onAfterMarshalFromViewAsync.bind(this));tmpAnticipate.wait(function(pError){if(_this69.pict.LogNoisiness>2){_this69.log.trace("PictView [".concat(_this69.UUID,"]::[").concat(_this69.Hash,"] ").concat(_this69.options.ViewIdentifier," marshalFromViewAsync() complete."));}_this69.lastMarshalFromViewTimestamp=_this69.pict.log.getTimeStamp();return tmpCallback(pError);});}/**
3822
+ */},{key:"marshalFromViewAsync",value:function marshalFromViewAsync(fCallback){var _this70=this;var tmpAnticipate=this.pict.instantiateServiceProviderWithoutRegistration('Anticipate');/** @type {ErrorCallback} */var tmpCallback=typeof fCallback==='function'?fCallback:null;if(!tmpCallback){this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions."));tmpCallback=function tmpCallback(pError){if(pError){_this70.log.error("PictView [".concat(_this70.UUID,"]::[").concat(_this70.Hash,"] ").concat(_this70.options.Name," marshalFromViewAsync Auto Callback Error: ").concat(pError),pError);}};}tmpAnticipate.anticipate(this.onBeforeMarshalFromViewAsync.bind(this));tmpAnticipate.anticipate(this.onMarshalFromViewAsync.bind(this));tmpAnticipate.anticipate(this.onAfterMarshalFromViewAsync.bind(this));tmpAnticipate.wait(function(pError){if(_this70.pict.LogNoisiness>2){_this70.log.trace("PictView [".concat(_this70.UUID,"]::[").concat(_this70.Hash,"] ").concat(_this70.options.ViewIdentifier," marshalFromViewAsync() complete."));}_this70.lastMarshalFromViewTimestamp=_this70.pict.log.getTimeStamp();return tmpCallback(pError);});}/**
3776
3823
  * Lifecycle hook that triggers after data is marshaled from the view.
3777
3824
  */},{key:"onAfterMarshalFromView",value:function onAfterMarshalFromView(){if(this.pict.LogNoisiness>3){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterMarshalFromView:"));}return true;}/**
3778
3825
  * Lifecycle hook that triggers after data is marshaled from the view (async flow).
@@ -3798,7 +3845,7 @@ this.renderAsync(fCallback);}/**
3798
3845
  * Marshals data into the view (async flow).
3799
3846
  *
3800
3847
  * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.
3801
- */},{key:"marshalToViewAsync",value:function marshalToViewAsync(fCallback){var _this70=this;var tmpAnticipate=this.pict.instantiateServiceProviderWithoutRegistration('Anticipate');/** @type {ErrorCallback} */var tmpCallback=typeof fCallback==='function'?fCallback:null;if(!tmpCallback){this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions."));tmpCallback=function tmpCallback(pError){if(pError){_this70.log.error("PictView [".concat(_this70.UUID,"]::[").concat(_this70.Hash,"] ").concat(_this70.options.Name," marshalToViewAsync Auto Callback Error: ").concat(pError),pError);}};}tmpAnticipate.anticipate(this.onBeforeMarshalToViewAsync.bind(this));tmpAnticipate.anticipate(this.onMarshalToViewAsync.bind(this));tmpAnticipate.anticipate(this.onAfterMarshalToViewAsync.bind(this));tmpAnticipate.wait(function(pError){if(_this70.pict.LogNoisiness>2){_this70.log.trace("PictView [".concat(_this70.UUID,"]::[").concat(_this70.Hash,"] ").concat(_this70.options.ViewIdentifier," marshalToViewAsync() complete."));}_this70.lastMarshalToViewTimestamp=_this70.pict.log.getTimeStamp();return tmpCallback(pError);});}/**
3848
+ */},{key:"marshalToViewAsync",value:function marshalToViewAsync(fCallback){var _this71=this;var tmpAnticipate=this.pict.instantiateServiceProviderWithoutRegistration('Anticipate');/** @type {ErrorCallback} */var tmpCallback=typeof fCallback==='function'?fCallback:null;if(!tmpCallback){this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions."));tmpCallback=function tmpCallback(pError){if(pError){_this71.log.error("PictView [".concat(_this71.UUID,"]::[").concat(_this71.Hash,"] ").concat(_this71.options.Name," marshalToViewAsync Auto Callback Error: ").concat(pError),pError);}};}tmpAnticipate.anticipate(this.onBeforeMarshalToViewAsync.bind(this));tmpAnticipate.anticipate(this.onMarshalToViewAsync.bind(this));tmpAnticipate.anticipate(this.onAfterMarshalToViewAsync.bind(this));tmpAnticipate.wait(function(pError){if(_this71.pict.LogNoisiness>2){_this71.log.trace("PictView [".concat(_this71.UUID,"]::[").concat(_this71.Hash,"] ").concat(_this71.options.ViewIdentifier," marshalToViewAsync() complete."));}_this71.lastMarshalToViewTimestamp=_this71.pict.log.getTimeStamp();return tmpCallback(pError);});}/**
3802
3849
  * Lifecycle hook that triggers after data is marshaled into the view.
3803
3850
  */},{key:"onAfterMarshalToView",value:function onAfterMarshalToView(){if(this.pict.LogNoisiness>3){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterMarshalToView:"));}return true;}/**
3804
3851
  * Lifecycle hook that triggers after data is marshaled into the view (async flow).
@@ -5106,7 +5153,7 @@ try{if(!global.localStorage)return false;}catch(_){return false;}var val=global.
5106
5153
  // presumably different callback function.
5107
5154
  // This makes sure that own properties are retained, so that
5108
5155
  // decorations and such are not lost along the way.
5109
- 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.292","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.42","sinon":"^20.0.0","typescript":"^5.8.3"},"dependencies":{"cachetrax":"^1.0.4","fable":"^3.1.17","pict-application":"^1.0.27","pict-provider":"^1.0.6","pict-template":"^1.0.12","pict-view":"^1.0.62"}};},{}],192:[function(require,module,exports){// This assumes Pict has been required in the browser. Delcare these as globals so linter can do its job.
5156
+ 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.294","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.42","sinon":"^20.0.0","typescript":"^5.8.3"},"dependencies":{"cachetrax":"^1.0.4","fable":"^3.1.18","pict-application":"^1.0.27","pict-provider":"^1.0.6","pict-template":"^1.0.13","pict-view":"^1.0.63"}};},{}],192:[function(require,module,exports){// This assumes Pict has been required in the browser. Delcare these as globals so linter can do its job.
5110
5157
  /* global Pict, _Pict: writeable *//**
5111
5158
  * Simple function to load a pict Application
5112
5159
  *
@@ -5121,57 +5168,57 @@ if(pPictApplication&&_typeof(pPictApplication['default_configuration'])==='objec
5121
5168
  if(document.readyState!='loading')fCallback();// Modern browsers have event listener capabilities
5122
5169
  else if(document.addEventListener)document.addEventListener('DOMContentLoaded',function(){fCallback();});//@ts-ignore IE <= 8 and ... other abominations
5123
5170
  else document.attachEvent('onreadystatechange',function(){if(document.readyState=='complete')fCallback();});};},{}],194:[function(require,module,exports){var libFableServiceBase=require('fable').ServiceProviderBase;var defaultConfiguration={// This is the address for the <script /> tag that contains the CSS.
5124
- CSSElementAddress:'#PICT-CSS'};var PictCSS=/*#__PURE__*/function(_libFableServiceBase17){function PictCSS(pFable,pOptions,pServiceHash){var _this71;_classCallCheck2(this,PictCSS);_this71=_callSuper(this,PictCSS,[pFable,pOptions,pServiceHash]);/** @type {any} */_this71.options;/** @type {{ ContentAssignment: import('./Pict-Content-Assignment') }} */_this71.services;// No merging of options necessary
5125
- if(typeof _this71.options.CSSElementAddress==='undefined'){_this71.options.CSSElementAddress=defaultConfiguration.CSSElementAddress;}_this71.inlineCSSMap={};return _this71;}// Add a CSS fragment to the CSS map (each view can have its own CSS fragment)
5171
+ CSSElementAddress:'#PICT-CSS'};var PictCSS=/*#__PURE__*/function(_libFableServiceBase17){function PictCSS(pFable,pOptions,pServiceHash){var _this72;_classCallCheck2(this,PictCSS);_this72=_callSuper(this,PictCSS,[pFable,pOptions,pServiceHash]);/** @type {any} */_this72.options;/** @type {{ ContentAssignment: import('./Pict-Content-Assignment') }} */_this72.services;// No merging of options necessary
5172
+ if(typeof _this72.options.CSSElementAddress==='undefined'){_this72.options.CSSElementAddress=defaultConfiguration.CSSElementAddress;}_this72.inlineCSSMap={};return _this72;}// Add a CSS fragment to the CSS map (each view can have its own CSS fragment)
5126
5173
  // Hash is shared across all views, so if 10 views all load the "My-Table-View" fragment, it will only be loaded once.
5127
- _inherits(PictCSS,_libFableServiceBase17);return _createClass2(PictCSS,[{key:"addCSS",value:function addCSS(pHash,pContent,pPriority,pProvider){var tmpPriority=typeof pPriority!=='undefined'?pPriority:1000;var tmpProvidor=typeof pProvider==='string'?pProvider:'Unknown';this.inlineCSSMap[pHash]={Hash:pHash,Content:pContent,Provider:tmpProvidor,Priority:tmpPriority};}},{key:"removeCSS",value:function removeCSS(pHash){delete this.inlineCSSMap[pHash];}},{key:"generateCSS",value:function generateCSS(){var _this72=this;var tmpCSS='';var tmpCSSHashes=Object.keys(this.inlineCSSMap);// Sort the hashes by Priority
5128
- tmpCSSHashes.sort(function(a,b){return _this72.inlineCSSMap[a].Priority-_this72.inlineCSSMap[b].Priority;});for(var i=0;i<tmpCSSHashes.length;i++){var tmpCSSFragment=this.inlineCSSMap[tmpCSSHashes[i]];var tmpCSSComment=tmpCSSFragment.Hash;if(tmpCSSFragment.Hash!=tmpCSSFragment.Provider){tmpCSSComment="".concat(tmpCSSComment," from ").concat(tmpCSSFragment.Provider);}tmpCSS+="/* ".concat(tmpCSSComment," */\n").concat(tmpCSSFragment.Content,"\n");}return tmpCSS;}// Inject the CSS into the magic DOM element for it
5174
+ _inherits(PictCSS,_libFableServiceBase17);return _createClass2(PictCSS,[{key:"addCSS",value:function addCSS(pHash,pContent,pPriority,pProvider){var tmpPriority=typeof pPriority!=='undefined'?pPriority:1000;var tmpProvidor=typeof pProvider==='string'?pProvider:'Unknown';this.inlineCSSMap[pHash]={Hash:pHash,Content:pContent,Provider:tmpProvidor,Priority:tmpPriority};}},{key:"removeCSS",value:function removeCSS(pHash){delete this.inlineCSSMap[pHash];}},{key:"generateCSS",value:function generateCSS(){var _this73=this;var tmpCSS='';var tmpCSSHashes=Object.keys(this.inlineCSSMap);// Sort the hashes by Priority
5175
+ tmpCSSHashes.sort(function(a,b){return _this73.inlineCSSMap[a].Priority-_this73.inlineCSSMap[b].Priority;});for(var i=0;i<tmpCSSHashes.length;i++){var tmpCSSFragment=this.inlineCSSMap[tmpCSSHashes[i]];var tmpCSSComment=tmpCSSFragment.Hash;if(tmpCSSFragment.Hash!=tmpCSSFragment.Provider){tmpCSSComment="".concat(tmpCSSComment," from ").concat(tmpCSSFragment.Provider);}tmpCSS+="/* ".concat(tmpCSSComment," */\n").concat(tmpCSSFragment.Content,"\n");}return tmpCSS;}// Inject the CSS into the magic DOM element for it
5129
5176
  },{key:"injectCSS",value:function injectCSS(){this.services.ContentAssignment.assignContent(this.options.CSSElementAddress,this.generateCSS());}}]);}(libFableServiceBase);module.exports=PictCSS;},{"fable":68}],195:[function(require,module,exports){var libFableServiceBase=require('fable').ServiceProviderBase;/**
5130
5177
  * Class for moving content around in the DOM.
5131
5178
  */var PictContentAssignment=/*#__PURE__*/function(_libFableServiceBase18){/**
5132
5179
  * @param {import('fable')} pFable - The Fable library instance.
5133
5180
  * @param {any} [pOptions] - The options for the service.
5134
5181
  * @param {string} [pServiceHash] - The hash of services.
5135
- */function PictContentAssignment(pFable,pOptions,pServiceHash){var _this73;_classCallCheck2(this,PictContentAssignment);_this73=_callSuper(this,PictContentAssignment,[pFable,pOptions,pServiceHash]);/** @type {any} */_this73.log;/** @type {any} */_this73.fable;_this73.serviceType='PictContentAssignment';_this73.manifest=pFable.newManyfest();// Check to see if we are running in a browser
5136
- _this73.inBrowser=false;_this73.hasDocument=false;if((typeof window==="undefined"?"undefined":_typeof(window))=='object'){_this73.inBrowser=true;// Now check that the browser has a document object
5137
- if(typeof window.document!='undefined'&&typeof window.document.querySelectorAll=='function'){_this73.hasDocument=true;}}// If we're in a browser, check to see if jQuery is available.
5138
- _this73.hasJquery=false;_this73.jQuery=false;if(_this73.inBrowser&&typeof window.jQuery!=='undefined'){_this73.hasJquery=true;}/**
5182
+ */function PictContentAssignment(pFable,pOptions,pServiceHash){var _this74;_classCallCheck2(this,PictContentAssignment);_this74=_callSuper(this,PictContentAssignment,[pFable,pOptions,pServiceHash]);/** @type {any} */_this74.log;/** @type {any} */_this74.fable;_this74.serviceType='PictContentAssignment';_this74.manifest=pFable.newManyfest();// Check to see if we are running in a browser
5183
+ _this74.inBrowser=false;_this74.hasDocument=false;if((typeof window==="undefined"?"undefined":_typeof(window))=='object'){_this74.inBrowser=true;// Now check that the browser has a document object
5184
+ if(typeof window.document!='undefined'&&typeof window.document.querySelectorAll=='function'){_this74.hasDocument=true;}}// If we're in a browser, check to see if jQuery is available.
5185
+ _this74.hasJquery=false;_this74.jQuery=false;if(_this74.inBrowser&&typeof window.jQuery!=='undefined'){_this74.hasJquery=true;}/**
5139
5186
  * Set this to override the default mechanism for setting the content of a DOM element.
5140
5187
  *
5141
5188
  * @type {Function}
5142
5189
  * @param {string|HTMLElement} pAddress - The address of the element (a CSS selector), or the element itself.
5143
5190
  * @param {string} pContent - The content to set.
5144
- */_this73.customAssignFunction=null;/**
5191
+ */_this74.customAssignFunction=null;/**
5145
5192
  * Set this to override the default mechanism for prepend content to a DOM element.
5146
5193
  *
5147
5194
  * @type {Function}
5148
5195
  * @param {string|HTMLElement} pAddress - The address of the element (a CSS selector), or the element itself.
5149
5196
  * @param {string} pContent - The content to prepend.
5150
- */_this73.customPrependFunction=null;/**
5197
+ */_this74.customPrependFunction=null;/**
5151
5198
  * Set this to override the default mechanism for appending content to a DOM element.
5152
5199
  *
5153
5200
  * @type {Function}
5154
5201
  * @param {string|HTMLElement} pAddress - The address of the element (a CSS selector), or the element itself.
5155
5202
  * @param {string} pContent - The content to append.
5156
- */_this73.customAppendFunction=null;/**
5203
+ */_this74.customAppendFunction=null;/**
5157
5204
  * Set this to override the default mechanism for reading content from the DOM.
5158
5205
  *
5159
5206
  * @type {Function}
5160
5207
  * @param {string|HTMLElement} pAddress - The address of the element (a CSS selector), or the element itself.
5161
5208
  * @return {string} - The content of the element.
5162
- */_this73.customReadFunction=null;/**
5209
+ */_this74.customReadFunction=null;/**
5163
5210
  * Set this to override the default mechanism for getting elements.
5164
5211
  *
5165
5212
  * @type {Function}
5166
5213
  * @param {string|HTMLElement} pAddress - The address of the element (a CSS selector), or the element itself.
5167
5214
  * @return {Array<any>} - The matched elements.
5168
- */_this73.customGetElementFunction=null;// API Consumers can also craft their own attribute read function
5169
- _this73.customReadAttributeFunction=null;// API Consumers can also craft their own attribute set function
5170
- _this73.customSetAttributeFunction=null;// API Consumers can also craft their own attribute remove function
5171
- _this73.customRemoveAttributeFunction=null;// API Consumers can also craft their own class read function
5172
- _this73.customReadClassFunction=null;// API Consumers can also craft their own class set function
5173
- _this73.customSetClassFunction=null;// API Consumers can also craft their own class remove function
5174
- _this73.customRemoveClassFunction=null;return _this73;}/**
5215
+ */_this74.customGetElementFunction=null;// API Consumers can also craft their own attribute read function
5216
+ _this74.customReadAttributeFunction=null;// API Consumers can also craft their own attribute set function
5217
+ _this74.customSetAttributeFunction=null;// API Consumers can also craft their own attribute remove function
5218
+ _this74.customRemoveAttributeFunction=null;// API Consumers can also craft their own class read function
5219
+ _this74.customReadClassFunction=null;// API Consumers can also craft their own class set function
5220
+ _this74.customSetClassFunction=null;// API Consumers can also craft their own class remove function
5221
+ _this74.customRemoveClassFunction=null;return _this74;}/**
5175
5222
  * Get an element from the DOM.
5176
5223
  *
5177
5224
  * @param {string} pAddress - The address of the element.
@@ -5233,14 +5280,14 @@ this.log.trace("PICT Content READ from [".concat(pAddress,"]..."));return'';}}/*
5233
5280
  * @param {string|string[]} pClass - The class to add.
5234
5281
  */},{key:"addClass",value:function addClass(pAddress,pClass){if(this.customSetClassFunction){return this.customSetClassFunction(pAddress,pClass);}else if(this.hasJquery){// Get the element
5235
5282
  //FIXME: this is silly, but it makes the type system happy - it picks a different overload for each case
5236
- var tmpTargetElement=typeof pAddress==='string'?window.jQuery(pAddress):window.jQuery(pAddress);tmpTargetElement.addClass(pClass);}else if(this.inBrowser&&this.hasDocument){var tmpTargetElementSet=typeof pAddress==='string'?window.document.querySelectorAll(pAddress):[pAddress];for(var i=0;i<tmpTargetElementSet.length;i++){if(Array.isArray(pClass)){var _iterator=_createForOfIteratorHelper(pClass),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var tmpClass=_step.value;tmpTargetElementSet[i].classList.add(tmpClass);}}catch(err){_iterator.e(err);}finally{_iterator.f();}}else{tmpTargetElementSet[i].classList.add(pClass);}}}else{this.log.trace("PICT Content ADDCLASS to [".concat(pAddress,"]:"),pClass);}}/**
5283
+ var tmpTargetElement=typeof pAddress==='string'?window.jQuery(pAddress):window.jQuery(pAddress);tmpTargetElement.addClass(pClass);}else if(this.inBrowser&&this.hasDocument){var tmpTargetElementSet=typeof pAddress==='string'?window.document.querySelectorAll(pAddress):[pAddress];for(var i=0;i<tmpTargetElementSet.length;i++){if(Array.isArray(pClass)){var _iterator3=_createForOfIteratorHelper(pClass),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var tmpClass=_step3.value;tmpTargetElementSet[i].classList.add(tmpClass);}}catch(err){_iterator3.e(err);}finally{_iterator3.f();}}else{tmpTargetElementSet[i].classList.add(pClass);}}}else{this.log.trace("PICT Content ADDCLASS to [".concat(pAddress,"]:"),pClass);}}/**
5237
5284
  * Remove a class from an element.
5238
5285
  *
5239
5286
  * @param {string|HTMLElement} pAddress - The address of the element (a CSS selector), or the element itself.
5240
5287
  * @param {string|string[]} pClass - The class to remove.
5241
5288
  */},{key:"removeClass",value:function removeClass(pAddress,pClass){if(this.customRemoveClassFunction){return this.customRemoveClassFunction(pAddress,pClass);}else if(this.hasJquery){// Get the element
5242
5289
  //FIXME: this is silly, but it makes the type system happy - it picks a different overload for each case
5243
- var tmpTargetElement=typeof pAddress==='string'?window.jQuery(pAddress):window.jQuery(pAddress);tmpTargetElement.removeClass(pClass);}else if(this.inBrowser&&this.hasDocument){var tmpTargetElementSet=typeof pAddress==='string'?window.document.querySelectorAll(pAddress):[pAddress];for(var i=0;i<tmpTargetElementSet.length;i++){if(Array.isArray(pClass)){var _iterator2=_createForOfIteratorHelper(pClass),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var tmpClass=_step2.value;tmpTargetElementSet[i].classList.remove(tmpClass);}}catch(err){_iterator2.e(err);}finally{_iterator2.f();}}else{tmpTargetElementSet[i].classList.remove(pClass);}}}else{this.log.trace("PICT Content REMOVECLASS from [".concat(pAddress,"]:"),pClass);}}/**
5290
+ var tmpTargetElement=typeof pAddress==='string'?window.jQuery(pAddress):window.jQuery(pAddress);tmpTargetElement.removeClass(pClass);}else if(this.inBrowser&&this.hasDocument){var tmpTargetElementSet=typeof pAddress==='string'?window.document.querySelectorAll(pAddress):[pAddress];for(var i=0;i<tmpTargetElementSet.length;i++){if(Array.isArray(pClass)){var _iterator4=_createForOfIteratorHelper(pClass),_step4;try{for(_iterator4.s();!(_step4=_iterator4.n()).done;){var tmpClass=_step4.value;tmpTargetElementSet[i].classList.remove(tmpClass);}}catch(err){_iterator4.e(err);}finally{_iterator4.f();}}else{tmpTargetElementSet[i].classList.remove(pClass);}}}else{this.log.trace("PICT Content REMOVECLASS from [".concat(pAddress,"]:"),pClass);}}/**
5244
5291
  * Read an attribute from an element.
5245
5292
  *
5246
5293
  * @param {string|HTMLElement} pAddress - The address of the element (a CSS selector), or the element itself.
@@ -5267,11 +5314,11 @@ var tmpTargetElement=typeof pAddress==='string'?window.jQuery(pAddress):window.j
5267
5314
  *
5268
5315
  * @return {boolean} - Whether the element has the class. If multiple elements are matched, returns true if any have the class.
5269
5316
  */},{key:"hasClass",value:function hasClass(pAddress,pClass){if(this.customReadClassFunction){return this.customReadClassFunction(pAddress,pClass);}if(this.hasJquery){//FIXME: this is silly, but it makes the type system happy - it picks a different overload for each case
5270
- var tmpTargetElement=typeof pAddress==='string'?window.jQuery(pAddress):window.jQuery(pAddress);return tmpTargetElement.hasClass(pClass);}else if(this.inBrowser&&this.hasDocument){var tmpTargetElementSet=typeof pAddress==='string'?window.document.querySelectorAll(pAddress):[pAddress];for(var i=0;i<tmpTargetElementSet.length;i++){if(tmpTargetElementSet[i].classList.contains(pClass)){return true;}}return false;}else{this.log.trace("PICT Content HASCLASS for [".concat(pAddress,"] CLASS [").concat(pClass,"]:"));return false;}}}]);}(libFableServiceBase);module.exports=PictContentAssignment;},{"fable":68}],196:[function(require,module,exports){var libFableServiceBase=require('fable').ServiceProviderBase;var PictDataProvider=/*#__PURE__*/function(_libFableServiceBase19){function PictDataProvider(pFable,pOptions,pServiceHash){var _this74;_classCallCheck2(this,PictDataProvider);_this74=_callSuper(this,PictDataProvider,[pFable,pOptions,pServiceHash]);/** @type {import('fable') & import('pict')} */_this74.fable;_this74.serviceType='PictDataProvider';return _this74;}/**
5317
+ var tmpTargetElement=typeof pAddress==='string'?window.jQuery(pAddress):window.jQuery(pAddress);return tmpTargetElement.hasClass(pClass);}else if(this.inBrowser&&this.hasDocument){var tmpTargetElementSet=typeof pAddress==='string'?window.document.querySelectorAll(pAddress):[pAddress];for(var i=0;i<tmpTargetElementSet.length;i++){if(tmpTargetElementSet[i].classList.contains(pClass)){return true;}}return false;}else{this.log.trace("PICT Content HASCLASS for [".concat(pAddress,"] CLASS [").concat(pClass,"]:"));return false;}}}]);}(libFableServiceBase);module.exports=PictContentAssignment;},{"fable":68}],196:[function(require,module,exports){var libFableServiceBase=require('fable').ServiceProviderBase;var PictDataProvider=/*#__PURE__*/function(_libFableServiceBase19){function PictDataProvider(pFable,pOptions,pServiceHash){var _this75;_classCallCheck2(this,PictDataProvider);_this75=_callSuper(this,PictDataProvider,[pFable,pOptions,pServiceHash]);/** @type {import('fable') & import('./Pict')} */_this75.fable;_this75.serviceType='PictDataProvider';return _this75;}/**
5271
5318
  * @param {string} pAddress - The address of the data to retrieve
5272
5319
  * @param {object} [pData] - (optional) The record to provide to the address resolver
5273
- */_inherits(PictDataProvider,_libFableServiceBase19);return _createClass2(PictDataProvider,[{key:"getDataByAddress",value:function getDataByAddress(pAddress,pData){var tmpData=typeof pData==='undefined'?{}:pData;var tmpAddressSpace={Fable:this.fable,Pict:this.fable,AppData:this.fable.AppData,Bundle:this.fable.Bundle,Record:tmpData};return this.fable.manifest.getValueByHash(tmpAddressSpace,pAddress);}}]);}(libFableServiceBase);module.exports=PictDataProvider;},{"fable":68}],197:[function(require,module,exports){var libFableServiceBase=require('fable').ServiceProviderBase;var PictMeadowEntityProvider=/*#__PURE__*/function(_libFableServiceBase20){function PictMeadowEntityProvider(pFable,pOptions,pServiceHash){var _this75$fable$RestCli;var _this75;_classCallCheck2(this,PictMeadowEntityProvider);_this75=_callSuper(this,PictMeadowEntityProvider,[pFable,pOptions,pServiceHash]);/** @type {any} */_this75.options;/** @type {import('pict') & { settings: any } & { newAnticipate: any }} */_this75.fable;/** @type {any} */_this75.log;_this75.serviceType='PictMeadowProvider';if(_this75.fable.settings.PictDefaultURLPrefix){_this75.options.urlPrefix=_this75.fable.settings.PictDefaultURLPrefix;}else if(!_this75.options.urlPrefix){_this75.options.urlPrefix='/1.0/';}if(!_this75.options.downloadBatchSize){if(typeof _this75.fable.settings.PictDefaultDownloadBatchSize==='number'){_this75.options.downloadBatchSize=_this75.fable.settings.PictDefaultDownloadBatchSize;}else{_this75.options.downloadBatchSize=100;}}//@ts-ignore - FIXME - remove once we have fable types
5274
- _this75.restClient=(_this75$fable$RestCli=_this75.fable.RestClient)!==null&&_this75$fable$RestCli!==void 0?_this75$fable$RestCli:_this75.fable.instantiateServiceProviderWithoutRegistration('RestClient');/** @type {Record<string, import('cachetrax')>} */_this75.recordCache={};/** @type {Record<string, import('cachetrax')>} */_this75.recordSetCache={};_this75.prepareRequestOptions=function(pOptions){return pOptions;};return _this75;}_inherits(PictMeadowEntityProvider,_libFableServiceBase20);return _createClass2(PictMeadowEntityProvider,[{key:"initializeCache",value:function initializeCache(pEntity){// This should not be happening as often as it's happening.
5320
+ */_inherits(PictDataProvider,_libFableServiceBase19);return _createClass2(PictDataProvider,[{key:"getDataByAddress",value:function getDataByAddress(pAddress,pData){var tmpData=typeof pData==='undefined'?{}:pData;var tmpAddressSpace={Fable:this.fable,Pict:this.fable,AppData:this.fable.AppData,Bundle:this.fable.Bundle,Record:tmpData};return this.fable.manifest.getValueByHash(tmpAddressSpace,pAddress);}}]);}(libFableServiceBase);module.exports=PictDataProvider;},{"fable":68}],197:[function(require,module,exports){var libFableServiceBase=require('fable').ServiceProviderBase;var PictMeadowEntityProvider=/*#__PURE__*/function(_libFableServiceBase20){function PictMeadowEntityProvider(pFable,pOptions,pServiceHash){var _this76$fable$RestCli;var _this76;_classCallCheck2(this,PictMeadowEntityProvider);_this76=_callSuper(this,PictMeadowEntityProvider,[pFable,pOptions,pServiceHash]);/** @type {any} */_this76.options;/** @type {import('./Pict') & { settings: any } & { newAnticipate: any }} */_this76.fable;/** @type {any} */_this76.log;_this76.serviceType='PictMeadowProvider';if(_this76.fable.settings.PictDefaultURLPrefix){_this76.options.urlPrefix=_this76.fable.settings.PictDefaultURLPrefix;}else if(!_this76.options.urlPrefix){_this76.options.urlPrefix='/1.0/';}if(!_this76.options.downloadBatchSize){if(typeof _this76.fable.settings.PictDefaultDownloadBatchSize==='number'){_this76.options.downloadBatchSize=_this76.fable.settings.PictDefaultDownloadBatchSize;}else{_this76.options.downloadBatchSize=100;}}//@ts-ignore - FIXME - remove once we have fable types
5321
+ _this76.restClient=(_this76$fable$RestCli=_this76.fable.RestClient)!==null&&_this76$fable$RestCli!==void 0?_this76$fable$RestCli:_this76.fable.instantiateServiceProviderWithoutRegistration('RestClient');/** @type {Record<string, import('cachetrax')>} */_this76.recordCache={};/** @type {Record<string, import('cachetrax')>} */_this76.recordSetCache={};_this76.prepareRequestOptions=function(pOptions){return pOptions;};return _this76;}_inherits(PictMeadowEntityProvider,_libFableServiceBase20);return _createClass2(PictMeadowEntityProvider,[{key:"initializeCache",value:function initializeCache(pEntity){// This should not be happening as often as it's happening.
5275
5322
  if(!(pEntity in this.recordCache)){//@ts-ignore - FIXME - remove once we have fable types
5276
5323
  this.recordCache[pEntity]=this.fable.instantiateServiceProviderWithoutRegistration('ObjectCache');// TODO: Make this a configuration?
5277
5324
  // For now cache for 30 seconds.
@@ -5279,14 +5326,14 @@ this.recordCache[pEntity].maxAge=30000;this.recordCache[pEntity].maxLength=10000
5279
5326
  if(!(pEntity in this.recordSetCache)){//@ts-ignore - FIXME - remove once we have fable types
5280
5327
  this.recordSetCache[pEntity]=this.fable.instantiateServiceProviderWithoutRegistration('ObjectCache');// TODO: Make this a configuration?
5281
5328
  // For now cache for 10 seconds.
5282
- this.recordSetCache[pEntity].maxAge=10000;this.recordSetCache[pEntity].maxLength=100;}}},{key:"gatherEntitySetCount",value:function gatherEntitySetCount(pEntityInformation,pContext,fCallback){pEntityInformation.CountOnly=true;return this.gatherEntitySet(pEntityInformation,pContext,fCallback);}},{key:"gatherEntitySet",value:function gatherEntitySet(pEntityInformation,pContext,fCallback){var _this76=this;// First sanity check the pEntityInformation
5329
+ this.recordSetCache[pEntity].maxAge=10000;this.recordSetCache[pEntity].maxLength=100;}}},{key:"gatherEntitySetCount",value:function gatherEntitySetCount(pEntityInformation,pContext,fCallback){pEntityInformation.CountOnly=true;return this.gatherEntitySet(pEntityInformation,pContext,fCallback);}},{key:"gatherEntitySet",value:function gatherEntitySet(pEntityInformation,pContext,fCallback){var _this77=this;// First sanity check the pEntityInformation
5283
5330
  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={};}pContext.StepData=pEntityInformation.FilterData;if(!('RecordStartCursor'in pEntityInformation)||typeof pEntityInformation.RecordStartCursor!='number'){pEntityInformation.RecordStartCursor=0;}//TODO: consider ChunkSize for cases when AllRecords is set and we want to control the to-server page size
5284
5331
  if(!('PageSize'in pEntityInformation)||typeof pEntityInformation.PageSize!='number'){//TODO: this is a safety measure to try and not break things when we release this pict version; should be a lower value
5285
5332
  pEntityInformation.PageSize=10000;}if(!('AllRecords'in pEntityInformation)||typeof pEntityInformation.AllRecords!='boolean'){pEntityInformation.AllRecords=false;}var tmpRecordStartCursor=null;var tmpPageSize=null;if(pEntityInformation.PageSize){tmpRecordStartCursor=pEntityInformation.RecordStartCursor;tmpPageSize=pEntityInformation.PageSize;}// Parse the filter template
5286
5333
  var tmpFilterString=this.fable.parseTemplate(pEntityInformation.Filter,pContext);// Create a callback function to handle receiving the record set
5287
- var fRecordFetchComplete=function fRecordFetchComplete(pError,pRecordSet){if(pError){_this76.log.error("EntityBundleRequest request Error getting entity set for [".concat(pEntityInformation.Entity,"] with filter [").concat(tmpFilterString,"]: ").concat(pError),pError);return fCallback(pError,'');}if(pEntityInformation.CountOnly){_this76.log.trace("EntityBundleRequest counted ".concat(pRecordSet," records for ").concat(pEntityInformation.Entity," filtered to [").concat(tmpFilterString,"]").concat(!pEntityInformation.CountOnly&&!pEntityInformation.AllRecords?" [".concat(tmpRecordStartCursor,"/").concat(tmpPageSize,"]"):''));_this76.fable.manifest.setValueByHash(pContext,pEntityInformation.Destination,pRecordSet);}// 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).
5288
- else if(pEntityInformation.SingleRecord){_this76.log.trace("EntityBundleRequest found ".concat(pRecordSet.length," records for ").concat(pEntityInformation.Entity," filtered to [").concat(tmpFilterString,"]").concat(!pEntityInformation.CountOnly&&!pEntityInformation.AllRecords?" [".concat(tmpRecordStartCursor,"/").concat(tmpPageSize,"]"):''));if(pRecordSet.length>1){_this76.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){_this76.fable.manifest.setValueByHash(pContext,pEntityInformation.Destination,false);}_this76.fable.manifest.setValueByHash(pContext,pEntityInformation.Destination,pRecordSet[0]);}else{_this76.log.trace("EntityBundleRequest found ".concat(pRecordSet.length," records for ").concat(pEntityInformation.Entity," filtered to [").concat(tmpFilterString,"]").concat(!pEntityInformation.CountOnly&&!pEntityInformation.AllRecords?" [".concat(tmpRecordStartCursor,"/").concat(tmpPageSize,"]"):''));_this76.fable.manifest.setValueByHash(pContext,pEntityInformation.Destination,pRecordSet);}return fCallback();};if(pEntityInformation.CountOnly){this.getEntitySetRecordCount(pEntityInformation.Entity,tmpFilterString,fRecordFetchComplete);}else if(tmpPageSize&&!pEntityInformation.AllRecords){this.getEntitySetPage(pEntityInformation.Entity,tmpFilterString,tmpRecordStartCursor,tmpPageSize,fRecordFetchComplete);}else{this.getEntitySet(pEntityInformation.Entity,tmpFilterString,fRecordFetchComplete);}}},{key:"mapJoinSingleDestination",value:function mapJoinSingleDestination(pDestinationEntity,pCustomRequestInformation,pContext){var tmpSourceEntities=this.fable.manifest.getValueByHash(pContext,pCustomRequestInformation.JoinRecordSetAddress);if(!Array.isArray(tmpSourceEntities)){throw new Error("EntityBundleRequest failed to map join because the source [".concat(pCustomRequestInformation.JoinRecordSetAddress,"] did not return an array."));}var tmpSourceLookup={};var _iterator3=_createForOfIteratorHelper(tmpSourceEntities),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var tmpSourceEntity=_step3.value;var tmpSourceJoinValue=tmpSourceEntity[pCustomRequestInformation.JoinValue];tmpSourceLookup[tmpSourceJoinValue]=tmpSourceEntity;}}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;if(!_tmpSourceEntity){this.log.error("EntityBundleRequest failed to map join because the source entity was not found in the source lookup.");continue;}if(pCustomRequestInformation.BucketBy||pCustomRequestInformation.BucketByTemplate){var tmpBucketValues=[];if(pCustomRequestInformation.BucketBy){var tmpBucketByKeys=Array.isArray(pCustomRequestInformation.BucketBy)?pCustomRequestInformation.BucketBy:[pCustomRequestInformation.BucketBy];var _iterator5=_createForOfIteratorHelper(tmpBucketByKeys),_step5;try{for(_iterator5.s();!(_step5=_iterator5.n()).done;){var tmpBucketByKey=_step5.value;var tmpBucketValue=this.fable.manifest.getValueByHash(_tmpSourceEntity,tmpBucketByKey);tmpBucketValues.push(tmpBucketValue);}}catch(err){_iterator5.e(err);}finally{_iterator5.f();}}else{var tmpBucketByTemplates=Array.isArray(pCustomRequestInformation.BucketByTemplate)?pCustomRequestInformation.BucketByTemplate:[pCustomRequestInformation.BucketByTemplate];var _iterator6=_createForOfIteratorHelper(tmpBucketByTemplates),_step6;try{for(_iterator6.s();!(_step6=_iterator6.n()).done;){var tmpBucketByTemplate=_step6.value;var _tmpBucketValue=this.fable.parseTemplate(tmpBucketByTemplate,_tmpSourceEntity);if(_tmpBucketValue){tmpBucketValues.push(_tmpBucketValue);}}}catch(err){_iterator6.e(err);}finally{_iterator6.f();}}if(tmpBucketValues.length<1){if(this.fable.LogNoisiness>0){this.log.warn("EntityBundleRequest failed to map join because no bucket values were found.",{pCustomRequestInformation:pCustomRequestInformation,tmpSourceEntity:_tmpSourceEntity});}}else{var tmpBucketAddress="".concat(pCustomRequestInformation.RecordDestinationAddress,".").concat(tmpBucketValues.join('.'));if(pCustomRequestInformation.SingleRecord){//TODO: warn if there is a collision?
5289
- this.fable.manifest.setValueByHash(pDestinationEntity,tmpBucketAddress,_tmpSourceEntity);}else{var tmpBucketArray=this.fable.manifest.getValueByHash(pDestinationEntity,tmpBucketAddress,_tmpSourceEntity);if(!tmpBucketArray){tmpBucketArray=[];this.fable.manifest.setValueByHash(pDestinationEntity,tmpBucketAddress,tmpBucketArray);}tmpBucketArray.push(_tmpSourceEntity);}}}else if(pCustomRequestInformation.SingleRecord){if(pDestinationEntity[pCustomRequestInformation.RecordDestinationAddress]&&this.fable.LogNoisiness>1){this.fable.log.warn("EntityBundleRequest found more than one record for [".concat(pCustomRequestInformation.RecordDestinationAddress,"] in mapJoin mapped as SingleRecord."));}pDestinationEntity[pCustomRequestInformation.RecordDestinationAddress]=_tmpSourceEntity;}else{pDestinationEntity[pCustomRequestInformation.RecordDestinationAddress]=pDestinationEntity[pCustomRequestInformation.RecordDestinationAddress]||[];pDestinationEntity[pCustomRequestInformation.RecordDestinationAddress].push(_tmpSourceEntity);}}}catch(err){_iterator4.e(err);}finally{_iterator4.f();}return[pDestinationEntity];}},{key:"mapJoin",value:function mapJoin(pCustomRequestInformation,pContext){var tmpSingleDestinationEntity=pCustomRequestInformation.DestinationRecordAddress?this.fable.manifest.getValueByHash(pContext,pCustomRequestInformation.DestinationRecordAddress):null;var tmpDestinationEntities=pCustomRequestInformation.DestinationRecordSetAddress?this.fable.manifest.getValueByHash(pContext,pCustomRequestInformation.DestinationRecordSetAddress):null;if(!Array.isArray(tmpDestinationEntities)&&!tmpSingleDestinationEntity){throw new Error("EntityBundleRequest failed to map join because the destination [".concat(pCustomRequestInformation.DestinationRecordSetAddress,"] did not return an array."));}if(tmpSingleDestinationEntity){return this.mapJoinSingleDestination(tmpSingleDestinationEntity,pCustomRequestInformation,pContext);}var tmpJoinEntities=this.fable.manifest.getValueByHash(pContext,pCustomRequestInformation.Joins);if(!Array.isArray(tmpJoinEntities)){throw new Error("EntityBundleRequest failed to map join because the join [".concat(pCustomRequestInformation.Joins,"] did not return an array."));}var tmpSourceEntities=this.fable.manifest.getValueByHash(pContext,pCustomRequestInformation.JoinRecordSetAddress);if(!Array.isArray(tmpSourceEntities)){throw 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 _iterator7=_createForOfIteratorHelper(tmpDestinationEntities||[]),_step7;try{for(_iterator7.s();!(_step7=_iterator7.n()).done;){var _tmpDestinationEntity=_step7.value;var tmpDestinationJoinValue=_tmpDestinationEntity[pCustomRequestInformation.DestinationJoinValue];tmpDestinationLookup[tmpDestinationJoinValue]=_tmpDestinationEntity;}}catch(err){_iterator7.e(err);}finally{_iterator7.f();}var _iterator8=_createForOfIteratorHelper(tmpSourceEntities),_step8;try{for(_iterator8.s();!(_step8=_iterator8.n()).done;){var _tmpSourceEntity2=_step8.value;var tmpSourceJoinValue=_tmpSourceEntity2[pCustomRequestInformation.JoinValue];tmpSourceLookup[tmpSourceJoinValue]=_tmpSourceEntity2;}}catch(err){_iterator8.e(err);}finally{_iterator8.f();}var _iterator9=_createForOfIteratorHelper(tmpJoinEntities),_step9;try{for(_iterator9.s();!(_step9=_iterator9.n()).done;){var tmpJoinEntity=_step9.value;var _tmpLHSJoinValue=tmpJoinEntity[tmpLHSJoinKey];var _tmpRHSJoinValue=tmpJoinEntity[tmpRHSJoinKey];tmpJoinMap[_tmpLHSJoinValue]=tmpJoinMap[_tmpLHSJoinValue]||new Set();tmpJoinMap[_tmpLHSJoinValue].add(_tmpRHSJoinValue);}}catch(err){_iterator9.e(err);}finally{_iterator9.f();}for(var _i62=0,_Object$keys=Object.keys(tmpJoinMap);_i62<_Object$keys.length;_i62++){var tmpLHSJoinValue=_Object$keys[_i62];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 _i63=0,_tmpRHSJoinValues=tmpRHSJoinValues;_i63<_tmpRHSJoinValues.length;_i63++){var tmpRHSJoinValue=_tmpRHSJoinValues[_i63];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;}if(pCustomRequestInformation.BucketBy||pCustomRequestInformation.BucketByTemplate){var tmpBucketValues=[];if(pCustomRequestInformation.BucketBy){var tmpBucketByKeys=Array.isArray(pCustomRequestInformation.BucketBy)?pCustomRequestInformation.BucketBy:[pCustomRequestInformation.BucketBy];var _iterator0=_createForOfIteratorHelper(tmpBucketByKeys),_step0;try{for(_iterator0.s();!(_step0=_iterator0.n()).done;){var tmpBucketByKey=_step0.value;var tmpBucketValue=this.fable.manifest.getValueByHash(tmpSourceEntity,tmpBucketByKey);tmpBucketValues.push(tmpBucketValue);}}catch(err){_iterator0.e(err);}finally{_iterator0.f();}}else{var tmpBucketByTemplates=Array.isArray(pCustomRequestInformation.BucketByTemplate)?pCustomRequestInformation.BucketByTemplate:[pCustomRequestInformation.BucketByTemplate];var _iterator1=_createForOfIteratorHelper(tmpBucketByTemplates),_step1;try{for(_iterator1.s();!(_step1=_iterator1.n()).done;){var tmpBucketByTemplate=_step1.value;var _tmpBucketValue2=this.fable.parseTemplate(tmpBucketByTemplate,tmpSourceEntity);tmpBucketValues.push(_tmpBucketValue2);}}catch(err){_iterator1.e(err);}finally{_iterator1.f();}}if(!tmpDestinationEntity[pCustomRequestInformation.RecordDestinationAddress]){tmpDestinationEntity[pCustomRequestInformation.RecordDestinationAddress]={};}var tmpBucketAddress="".concat(pCustomRequestInformation.RecordDestinationAddress,".").concat(tmpBucketValues.join('.'));if(pCustomRequestInformation.SingleRecord){//TODO: warn if there is a collision?
5334
+ var fRecordFetchComplete=function fRecordFetchComplete(pError,pRecordSet){if(pError){_this77.log.error("EntityBundleRequest request Error getting entity set for [".concat(pEntityInformation.Entity,"] with filter [").concat(tmpFilterString,"]: ").concat(pError),pError);return fCallback(pError,'');}if(pEntityInformation.CountOnly){_this77.log.trace("EntityBundleRequest counted ".concat(pRecordSet," records for ").concat(pEntityInformation.Entity," filtered to [").concat(tmpFilterString,"]").concat(!pEntityInformation.CountOnly&&!pEntityInformation.AllRecords?" [".concat(tmpRecordStartCursor,"/").concat(tmpPageSize,"]"):''));_this77.fable.manifest.setValueByHash(pContext,pEntityInformation.Destination,pRecordSet);}// 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).
5335
+ else if(pEntityInformation.SingleRecord){_this77.log.trace("EntityBundleRequest found ".concat(pRecordSet.length," records for ").concat(pEntityInformation.Entity," filtered to [").concat(tmpFilterString,"]").concat(!pEntityInformation.CountOnly&&!pEntityInformation.AllRecords?" [".concat(tmpRecordStartCursor,"/").concat(tmpPageSize,"]"):''));if(pRecordSet.length>1){_this77.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){_this77.fable.manifest.setValueByHash(pContext,pEntityInformation.Destination,false);}_this77.fable.manifest.setValueByHash(pContext,pEntityInformation.Destination,pRecordSet[0]);}else{_this77.log.trace("EntityBundleRequest found ".concat(pRecordSet.length," records for ").concat(pEntityInformation.Entity," filtered to [").concat(tmpFilterString,"]").concat(!pEntityInformation.CountOnly&&!pEntityInformation.AllRecords?" [".concat(tmpRecordStartCursor,"/").concat(tmpPageSize,"]"):''));_this77.fable.manifest.setValueByHash(pContext,pEntityInformation.Destination,pRecordSet);}return fCallback();};if(pEntityInformation.CountOnly){this.getEntitySetRecordCount(pEntityInformation.Entity,tmpFilterString,fRecordFetchComplete);}else if(tmpPageSize&&!pEntityInformation.AllRecords){this.getEntitySetPage(pEntityInformation.Entity,tmpFilterString,tmpRecordStartCursor,tmpPageSize,fRecordFetchComplete);}else{this.getEntitySet(pEntityInformation.Entity,tmpFilterString,fRecordFetchComplete);}}},{key:"mapJoinSingleDestination",value:function mapJoinSingleDestination(pDestinationEntity,pCustomRequestInformation,pContext){var tmpSourceEntities=this.fable.manifest.getValueByHash(pContext,pCustomRequestInformation.JoinRecordSetAddress);if(!Array.isArray(tmpSourceEntities)){throw new Error("EntityBundleRequest failed to map join because the source [".concat(pCustomRequestInformation.JoinRecordSetAddress,"] did not return an array."));}var tmpSourceLookup={};var _iterator5=_createForOfIteratorHelper(tmpSourceEntities),_step5;try{for(_iterator5.s();!(_step5=_iterator5.n()).done;){var tmpSourceEntity=_step5.value;var tmpSourceJoinValue=tmpSourceEntity[pCustomRequestInformation.JoinValue];tmpSourceLookup[tmpSourceJoinValue]=tmpSourceEntity;}}catch(err){_iterator5.e(err);}finally{_iterator5.f();}var _iterator6=_createForOfIteratorHelper(tmpSourceEntities),_step6;try{for(_iterator6.s();!(_step6=_iterator6.n()).done;){var _tmpSourceEntity=_step6.value;if(!_tmpSourceEntity){this.log.error("EntityBundleRequest failed to map join because the source entity was not found in the source lookup.");continue;}if(pCustomRequestInformation.BucketBy||pCustomRequestInformation.BucketByTemplate){var tmpBucketValues=[];if(pCustomRequestInformation.BucketBy){var tmpBucketByKeys=Array.isArray(pCustomRequestInformation.BucketBy)?pCustomRequestInformation.BucketBy:[pCustomRequestInformation.BucketBy];var _iterator7=_createForOfIteratorHelper(tmpBucketByKeys),_step7;try{for(_iterator7.s();!(_step7=_iterator7.n()).done;){var tmpBucketByKey=_step7.value;var tmpBucketValue=this.fable.manifest.getValueByHash(_tmpSourceEntity,tmpBucketByKey);tmpBucketValues.push(tmpBucketValue);}}catch(err){_iterator7.e(err);}finally{_iterator7.f();}}else{var tmpBucketByTemplates=Array.isArray(pCustomRequestInformation.BucketByTemplate)?pCustomRequestInformation.BucketByTemplate:[pCustomRequestInformation.BucketByTemplate];var _iterator8=_createForOfIteratorHelper(tmpBucketByTemplates),_step8;try{for(_iterator8.s();!(_step8=_iterator8.n()).done;){var tmpBucketByTemplate=_step8.value;var _tmpBucketValue=this.fable.parseTemplate(tmpBucketByTemplate,_tmpSourceEntity);if(_tmpBucketValue){tmpBucketValues.push(_tmpBucketValue);}}}catch(err){_iterator8.e(err);}finally{_iterator8.f();}}if(tmpBucketValues.length<1){if(this.fable.LogNoisiness>0){this.log.warn("EntityBundleRequest failed to map join because no bucket values were found.",{pCustomRequestInformation:pCustomRequestInformation,tmpSourceEntity:_tmpSourceEntity});}}else{var tmpBucketAddress="".concat(pCustomRequestInformation.RecordDestinationAddress,".").concat(tmpBucketValues.join('.'));if(pCustomRequestInformation.SingleRecord){//TODO: warn if there is a collision?
5336
+ this.fable.manifest.setValueByHash(pDestinationEntity,tmpBucketAddress,_tmpSourceEntity);}else{var tmpBucketArray=this.fable.manifest.getValueByHash(pDestinationEntity,tmpBucketAddress,_tmpSourceEntity);if(!tmpBucketArray){tmpBucketArray=[];this.fable.manifest.setValueByHash(pDestinationEntity,tmpBucketAddress,tmpBucketArray);}tmpBucketArray.push(_tmpSourceEntity);}}}else if(pCustomRequestInformation.SingleRecord){if(pDestinationEntity[pCustomRequestInformation.RecordDestinationAddress]&&this.fable.LogNoisiness>1){this.fable.log.warn("EntityBundleRequest found more than one record for [".concat(pCustomRequestInformation.RecordDestinationAddress,"] in mapJoin mapped as SingleRecord."));}pDestinationEntity[pCustomRequestInformation.RecordDestinationAddress]=_tmpSourceEntity;}else{pDestinationEntity[pCustomRequestInformation.RecordDestinationAddress]=pDestinationEntity[pCustomRequestInformation.RecordDestinationAddress]||[];pDestinationEntity[pCustomRequestInformation.RecordDestinationAddress].push(_tmpSourceEntity);}}}catch(err){_iterator6.e(err);}finally{_iterator6.f();}return[pDestinationEntity];}},{key:"mapJoin",value:function mapJoin(pCustomRequestInformation,pContext){var tmpSingleDestinationEntity=pCustomRequestInformation.DestinationRecordAddress?this.fable.manifest.getValueByHash(pContext,pCustomRequestInformation.DestinationRecordAddress):null;var tmpDestinationEntities=pCustomRequestInformation.DestinationRecordSetAddress?this.fable.manifest.getValueByHash(pContext,pCustomRequestInformation.DestinationRecordSetAddress):null;if(!Array.isArray(tmpDestinationEntities)&&!tmpSingleDestinationEntity){throw new Error("EntityBundleRequest failed to map join because the destination [".concat(pCustomRequestInformation.DestinationRecordSetAddress,"] did not return an array."));}if(tmpSingleDestinationEntity){return this.mapJoinSingleDestination(tmpSingleDestinationEntity,pCustomRequestInformation,pContext);}var tmpJoinEntities=this.fable.manifest.getValueByHash(pContext,pCustomRequestInformation.Joins);if(!Array.isArray(tmpJoinEntities)){throw new Error("EntityBundleRequest failed to map join because the join [".concat(pCustomRequestInformation.Joins,"] did not return an array."));}var tmpSourceEntities=this.fable.manifest.getValueByHash(pContext,pCustomRequestInformation.JoinRecordSetAddress);if(!Array.isArray(tmpSourceEntities)){throw 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 _iterator9=_createForOfIteratorHelper(tmpDestinationEntities||[]),_step9;try{for(_iterator9.s();!(_step9=_iterator9.n()).done;){var _tmpDestinationEntity=_step9.value;var tmpDestinationJoinValue=_tmpDestinationEntity[pCustomRequestInformation.DestinationJoinValue];tmpDestinationLookup[tmpDestinationJoinValue]=_tmpDestinationEntity;}}catch(err){_iterator9.e(err);}finally{_iterator9.f();}var _iterator0=_createForOfIteratorHelper(tmpSourceEntities),_step0;try{for(_iterator0.s();!(_step0=_iterator0.n()).done;){var _tmpSourceEntity2=_step0.value;var tmpSourceJoinValue=_tmpSourceEntity2[pCustomRequestInformation.JoinValue];tmpSourceLookup[tmpSourceJoinValue]=_tmpSourceEntity2;}}catch(err){_iterator0.e(err);}finally{_iterator0.f();}var _iterator1=_createForOfIteratorHelper(tmpJoinEntities),_step1;try{for(_iterator1.s();!(_step1=_iterator1.n()).done;){var tmpJoinEntity=_step1.value;var _tmpLHSJoinValue=tmpJoinEntity[tmpLHSJoinKey];var _tmpRHSJoinValue=tmpJoinEntity[tmpRHSJoinKey];tmpJoinMap[_tmpLHSJoinValue]=tmpJoinMap[_tmpLHSJoinValue]||new Set();tmpJoinMap[_tmpLHSJoinValue].add(_tmpRHSJoinValue);}}catch(err){_iterator1.e(err);}finally{_iterator1.f();}for(var _i62=0,_Object$keys=Object.keys(tmpJoinMap);_i62<_Object$keys.length;_i62++){var tmpLHSJoinValue=_Object$keys[_i62];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 _i63=0,_tmpRHSJoinValues=tmpRHSJoinValues;_i63<_tmpRHSJoinValues.length;_i63++){var tmpRHSJoinValue=_tmpRHSJoinValues[_i63];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;}if(pCustomRequestInformation.BucketBy||pCustomRequestInformation.BucketByTemplate){var tmpBucketValues=[];if(pCustomRequestInformation.BucketBy){var tmpBucketByKeys=Array.isArray(pCustomRequestInformation.BucketBy)?pCustomRequestInformation.BucketBy:[pCustomRequestInformation.BucketBy];var _iterator10=_createForOfIteratorHelper(tmpBucketByKeys),_step10;try{for(_iterator10.s();!(_step10=_iterator10.n()).done;){var tmpBucketByKey=_step10.value;var tmpBucketValue=this.fable.manifest.getValueByHash(tmpSourceEntity,tmpBucketByKey);tmpBucketValues.push(tmpBucketValue);}}catch(err){_iterator10.e(err);}finally{_iterator10.f();}}else{var tmpBucketByTemplates=Array.isArray(pCustomRequestInformation.BucketByTemplate)?pCustomRequestInformation.BucketByTemplate:[pCustomRequestInformation.BucketByTemplate];var _iterator11=_createForOfIteratorHelper(tmpBucketByTemplates),_step11;try{for(_iterator11.s();!(_step11=_iterator11.n()).done;){var tmpBucketByTemplate=_step11.value;var _tmpBucketValue2=this.fable.parseTemplate(tmpBucketByTemplate,tmpSourceEntity);tmpBucketValues.push(_tmpBucketValue2);}}catch(err){_iterator11.e(err);}finally{_iterator11.f();}}if(!tmpDestinationEntity[pCustomRequestInformation.RecordDestinationAddress]){tmpDestinationEntity[pCustomRequestInformation.RecordDestinationAddress]={};}var tmpBucketAddress="".concat(pCustomRequestInformation.RecordDestinationAddress,".").concat(tmpBucketValues.join('.'));if(pCustomRequestInformation.SingleRecord){//TODO: warn if there is a collision?
5290
5337
  this.fable.manifest.setValueByHash(tmpDestinationEntity,tmpBucketAddress,tmpSourceEntity);}else{var tmpBucketArray=this.fable.manifest.getValueByHash(tmpDestinationEntity,tmpBucketAddress,tmpSourceEntity);if(!tmpBucketArray){tmpBucketArray=[];this.fable.manifest.setValueByHash(tmpDestinationEntity,tmpBucketAddress,tmpBucketArray);}tmpBucketArray.push(tmpSourceEntity);}}else if(pCustomRequestInformation.SingleRecord){if(tmpDestinationEntity[pCustomRequestInformation.RecordDestinationAddress]&&this.fable.LogNoisiness>1){this.fable.log.warn("EntityBundleRequest found more than one record for [".concat(pCustomRequestInformation.RecordDestinationAddress,"] in mapJoin mapped as SingleRecord."));}tmpDestinationEntity[pCustomRequestInformation.RecordDestinationAddress]=tmpSourceEntity;}else{tmpDestinationEntity[pCustomRequestInformation.RecordDestinationAddress]=tmpDestinationEntity[pCustomRequestInformation.RecordDestinationAddress]||[];tmpDestinationEntity[pCustomRequestInformation.RecordDestinationAddress].push(tmpSourceEntity);}}}return tmpDestinationEntities;}/**
5291
5338
  * ExampleConfig:
5292
5339
  * {
@@ -5331,56 +5378,56 @@ this.fable.manifest.setValueByHash(tmpDestinationEntity,tmpBucketAddress,tmpSour
5331
5378
  * }
5332
5379
  * }
5333
5380
  * }
5334
- */},{key:"projectDataset",value:function projectDataset(pConfiguration,pContext){var tmpInputRecordset=this.fable.manifest.getValueByHash(pContext,pConfiguration.InputRecordsetAddress);if(!Array.isArray(tmpInputRecordset)){throw new Error("EntityBundleRequest failed to project dataset because the input recordset [".concat(pConfiguration.InputRecordsetAddress,"] did not return an array."));}var tmpDefaultOutputRecordset=this.fable.manifest.getValueByHash(pContext,pConfiguration.OutputRecordsetAddress);if(!tmpDefaultOutputRecordset){tmpDefaultOutputRecordset=[];this.fable.manifest.setValueByHash(pContext,pConfiguration.OutputRecordsetAddress,tmpDefaultOutputRecordset);}var _iterator10=_createForOfIteratorHelper(tmpInputRecordset),_step10;try{for(_iterator10.s();!(_step10=_iterator10.n()).done;){var tmpInputRecord=_step10.value;var tmpOutputRecordset=tmpDefaultOutputRecordset;var tmpOutputRecordsetAddressOverride=void 0;if(_typeof(pConfiguration.OutputRecordsetAddressMapping)==='object'){tmpOutputRecordsetAddressOverride=this._resolveOutputRecordsetAddressMapping(pConfiguration,pContext,tmpInputRecord);if(tmpOutputRecordsetAddressOverride){tmpOutputRecordset=this.fable.manifest.getValueByHash(pContext,tmpOutputRecordsetAddressOverride);if(!tmpOutputRecordset){tmpOutputRecordset=[];this.fable.manifest.setValueByHash(pContext,tmpOutputRecordsetAddressOverride,tmpOutputRecordset);}}if(!tmpOutputRecordset||!Array.isArray(tmpOutputRecordset)){tmpOutputRecordset=tmpDefaultOutputRecordset;}}var tmpPrototypeAddress=this.fable.parseTemplate(pConfiguration.RecordPrototypeAddress,Object.assign({InputRecord:tmpInputRecord},pContext));var tmpRecordPrototype=this.fable.manifest.getValueByHash(Object.assign({InputRecord:tmpInputRecord,OutputRecordset:tmpOutputRecordset},pContext),tmpPrototypeAddress);var tmpOutputRecord={};if(Array.isArray(tmpRecordPrototype)&&tmpRecordPrototype.length>0){tmpOutputRecord=tmpRecordPrototype[0];}else{tmpOutputRecordset.push(tmpOutputRecord);}var tmpRecordFieldMapping=pConfiguration.RecordFieldMapping[tmpOutputRecordsetAddressOverride]||pConfiguration.RecordFieldMapping.Default;if(!tmpRecordFieldMapping){tmpRecordFieldMapping=pConfiguration.RecordFieldMapping[Object.keys(pConfiguration.RecordFieldMapping)[0]];}if(!tmpRecordFieldMapping){throw new Error("EntityBundleRequest failed to project dataset because the record field mapping for [".concat(tmpOutputRecordsetAddressOverride,"] did not return a mapping."));}for(var _i64=0,_Object$keys2=Object.keys(tmpRecordFieldMapping);_i64<_Object$keys2.length;_i64++){var tmpInputFieldAddress=_Object$keys2[_i64];var tmpOutputFieldAddress=tmpRecordFieldMapping[tmpInputFieldAddress];var tmpInputFieldValue=this.fable.manifest.getValueByHash(Object.assign({InputRecord:tmpInputRecord},pContext),tmpInputFieldAddress);this.fable.manifest.setValueByHash(Object.assign({OutputRecord:tmpOutputRecord},pContext),tmpOutputFieldAddress,tmpInputFieldValue);}}}catch(err){_iterator10.e(err);}finally{_iterator10.f();}}},{key:"_resolveOutputRecordsetAddressMapping",value:function _resolveOutputRecordsetAddressMapping(pConfiguration,pContext,pInputRecord){var tmpAddressSpace=Object.assign({InputRecord:pInputRecord},pContext);for(var _i65=0,_Object$keys3=Object.keys(pConfiguration.OutputRecordsetAddressMapping);_i65<_Object$keys3.length;_i65++){var tmpRule=_Object$keys3[_i65];var _tmpRule$split=tmpRule.split(','),_tmpRule$split2=_slicedToArray(_tmpRule$split,3),tmpLHSAddress=_tmpRule$split2[0],tmpOperator=_tmpRule$split2[1],tmpMatchValue=_tmpRule$split2[2];var tmpLHS=this.fable.manifest.getValueByHash(tmpAddressSpace,tmpLHSAddress);if(!tmpLHS){if(this.fable.LogNoisiness>0){this.log.warn("EntityBundleRequest failed to project dataset because the LHS address [".concat(tmpLHSAddress,"] did not return a value."));}continue;}switch(tmpOperator){case'AnyContains':if(!Array.isArray(tmpLHS)){//TODO: consider making this use objects as well?
5335
- this.log.error("EntityBundleRequest failed to project dataset because the LHS address [".concat(tmpLHSAddress,"] did not return an array."));continue;}var _iterator11=_createForOfIteratorHelper(tmpLHS),_step11;try{for(_iterator11.s();!(_step11=_iterator11.n()).done;){var tmpLHSValue=_step11.value;if(String(tmpLHSValue).includes(tmpMatchValue)){return pConfiguration.OutputRecordsetAddressMapping[tmpRule];}}}catch(err){_iterator11.e(err);}finally{_iterator11.f();}}}return null;}},{key:"gatherCustomDataSet",value:function gatherCustomDataSet(pCustomRequestInformation,pContext,fCallback){var _this77=this;// First sanity check the pCustomRequestInformation
5381
+ */},{key:"projectDataset",value:function projectDataset(pConfiguration,pContext){var tmpInputRecordset=this.fable.manifest.getValueByHash(pContext,pConfiguration.InputRecordsetAddress);if(!Array.isArray(tmpInputRecordset)){throw new Error("EntityBundleRequest failed to project dataset because the input recordset [".concat(pConfiguration.InputRecordsetAddress,"] did not return an array."));}var tmpDefaultOutputRecordset=this.fable.manifest.getValueByHash(pContext,pConfiguration.OutputRecordsetAddress);if(!tmpDefaultOutputRecordset){tmpDefaultOutputRecordset=[];this.fable.manifest.setValueByHash(pContext,pConfiguration.OutputRecordsetAddress,tmpDefaultOutputRecordset);}var _iterator12=_createForOfIteratorHelper(tmpInputRecordset),_step12;try{for(_iterator12.s();!(_step12=_iterator12.n()).done;){var tmpInputRecord=_step12.value;var tmpOutputRecordset=tmpDefaultOutputRecordset;var tmpOutputRecordsetAddressOverride=void 0;if(_typeof(pConfiguration.OutputRecordsetAddressMapping)==='object'){tmpOutputRecordsetAddressOverride=this._resolveOutputRecordsetAddressMapping(pConfiguration,pContext,tmpInputRecord);if(tmpOutputRecordsetAddressOverride){tmpOutputRecordset=this.fable.manifest.getValueByHash(pContext,tmpOutputRecordsetAddressOverride);if(!tmpOutputRecordset){tmpOutputRecordset=[];this.fable.manifest.setValueByHash(pContext,tmpOutputRecordsetAddressOverride,tmpOutputRecordset);}}if(!tmpOutputRecordset||!Array.isArray(tmpOutputRecordset)){tmpOutputRecordset=tmpDefaultOutputRecordset;}}var tmpPrototypeAddress=this.fable.parseTemplate(pConfiguration.RecordPrototypeAddress,Object.assign({InputRecord:tmpInputRecord},pContext));var tmpRecordPrototype=this.fable.manifest.getValueByHash(Object.assign({InputRecord:tmpInputRecord,OutputRecordset:tmpOutputRecordset},pContext),tmpPrototypeAddress);var tmpOutputRecord={};if(Array.isArray(tmpRecordPrototype)&&tmpRecordPrototype.length>0){tmpOutputRecord=tmpRecordPrototype[0];}else{tmpOutputRecordset.push(tmpOutputRecord);}var tmpRecordFieldMapping=pConfiguration.RecordFieldMapping[tmpOutputRecordsetAddressOverride]||pConfiguration.RecordFieldMapping.Default;if(!tmpRecordFieldMapping){tmpRecordFieldMapping=pConfiguration.RecordFieldMapping[Object.keys(pConfiguration.RecordFieldMapping)[0]];}if(!tmpRecordFieldMapping){throw new Error("EntityBundleRequest failed to project dataset because the record field mapping for [".concat(tmpOutputRecordsetAddressOverride,"] did not return a mapping."));}for(var _i64=0,_Object$keys2=Object.keys(tmpRecordFieldMapping);_i64<_Object$keys2.length;_i64++){var tmpInputFieldAddress=_Object$keys2[_i64];var tmpOutputFieldAddress=tmpRecordFieldMapping[tmpInputFieldAddress];var tmpInputFieldValue=this.fable.manifest.getValueByHash(Object.assign({InputRecord:tmpInputRecord},pContext),tmpInputFieldAddress);this.fable.manifest.setValueByHash(Object.assign({OutputRecord:tmpOutputRecord},pContext),tmpOutputFieldAddress,tmpInputFieldValue);}}}catch(err){_iterator12.e(err);}finally{_iterator12.f();}}},{key:"_resolveOutputRecordsetAddressMapping",value:function _resolveOutputRecordsetAddressMapping(pConfiguration,pContext,pInputRecord){var tmpAddressSpace=Object.assign({InputRecord:pInputRecord},pContext);for(var _i65=0,_Object$keys3=Object.keys(pConfiguration.OutputRecordsetAddressMapping);_i65<_Object$keys3.length;_i65++){var tmpRule=_Object$keys3[_i65];var _tmpRule$split=tmpRule.split(','),_tmpRule$split2=_slicedToArray(_tmpRule$split,3),tmpLHSAddress=_tmpRule$split2[0],tmpOperator=_tmpRule$split2[1],tmpMatchValue=_tmpRule$split2[2];var tmpLHS=this.fable.manifest.getValueByHash(tmpAddressSpace,tmpLHSAddress);if(!tmpLHS){if(this.fable.LogNoisiness>0){this.log.warn("EntityBundleRequest failed to project dataset because the LHS address [".concat(tmpLHSAddress,"] did not return a value."));}continue;}switch(tmpOperator){case'AnyContains':if(!Array.isArray(tmpLHS)){//TODO: consider making this use objects as well?
5382
+ this.log.error("EntityBundleRequest failed to project dataset because the LHS address [".concat(tmpLHSAddress,"] did not return an array."));continue;}var _iterator13=_createForOfIteratorHelper(tmpLHS),_step13;try{for(_iterator13.s();!(_step13=_iterator13.n()).done;){var tmpLHSValue=_step13.value;if(String(tmpLHSValue).includes(tmpMatchValue)){return pConfiguration.OutputRecordsetAddressMapping[tmpRule];}}}catch(err){_iterator13.e(err);}finally{_iterator13.f();}}}return null;}},{key:"gatherCustomDataSet",value:function gatherCustomDataSet(pCustomRequestInformation,pContext,fCallback){var _this78=this;// First sanity check the pCustomRequestInformation
5336
5383
  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={};}pContext.StepData=pCustomRequestInformation.URLData;// Parse the filter template
5337
5384
  var tmpURLTemplateString=this.fable.parseTemplate(pCustomRequestInformation.URL,pContext);if(tmpURLTemplateString==''){// We may want to continue, but for now let's say nah and nope out.
5338
5385
  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.
5339
5386
  var tmpCustomURIHost=pCustomRequestInformation.Host?pCustomRequestInformation.Host:false;// If "Host" is set, protocol and port are optional.
5340
5387
  var tmpCustomURIProtocol=pCustomRequestInformation.Protocol?pCustomRequestInformation.Protocol:'https';var tmpCustomURIPort=pCustomRequestInformation.Port?pCustomRequestInformation.Port:false;if(tmpCustomURIHost){tmpURLPrefix="".concat(tmpCustomURIProtocol,"://").concat(tmpCustomURIHost);if(tmpCustomURIPort){tmpURLPrefix+=":".concat(tmpCustomURIPort);}}else{tmpURLPrefix=this.fable.EntityProvider.options.urlPrefix;}// Now get the records
5341
- var callback=function callback(pError,pResponse,pData){if(pError){_this77.log.error("EntityBundleRequest request Error getting data set for [".concat(pCustomRequestInformation.Entity,"] with filter [").concat(tmpURLTemplateString,"]: ").concat(pError),pError);return fCallback(pError,'');}_this77.log.trace("EntityBundleRequest completed request for ".concat(pCustomRequestInformation.Entity," filtered to [").concat(tmpURLTemplateString,"]"));// Since this is a templated endpoint it can be used for logging etc.
5342
- if(pCustomRequestInformation.Destination){_this77.fable.manifest.setValueByHash(pContext,pCustomRequestInformation.Destination,pData);}return fCallback();};var tmpOptions={url:"".concat(tmpURLPrefix).concat(tmpURLTemplateString)};tmpOptions=this.fable.EntityProvider.prepareRequestOptions(tmpOptions);return this.fable.EntityProvider.restClient.getJSON(tmpOptions,callback);}/**
5388
+ var callback=function callback(pError,pResponse,pData){if(pError){_this78.log.error("EntityBundleRequest request Error getting data set for [".concat(pCustomRequestInformation.Entity,"] with filter [").concat(tmpURLTemplateString,"]: ").concat(pError),pError);return fCallback(pError,'');}_this78.log.trace("EntityBundleRequest completed request for ".concat(pCustomRequestInformation.Entity," filtered to [").concat(tmpURLTemplateString,"]"));// Since this is a templated endpoint it can be used for logging etc.
5389
+ if(pCustomRequestInformation.Destination){_this78.fable.manifest.setValueByHash(pContext,pCustomRequestInformation.Destination,pData);}return fCallback();};var tmpOptions={url:"".concat(tmpURLPrefix).concat(tmpURLTemplateString)};tmpOptions=this.fable.EntityProvider.prepareRequestOptions(tmpOptions);return this.fable.EntityProvider.restClient.getJSON(tmpOptions,callback);}/**
5343
5390
  * Local version of gatherDataFromServer that only support synchronous operations.
5344
5391
  *
5345
5392
  * @param {Array<Record<string, any>>} pEntitiesBundleDescription - The entity bundle description object.
5346
- */},{key:"processBundle",value:function processBundle(pEntitiesBundleDescription){if(!Array.isArray(pEntitiesBundleDescription)){this.log.error("EntityBundleRequest failed to parse entity bundle request because the input was not an array.");throw new Error('EntityBundleRequest failed to parse entity bundle request because the input was not an array.');}var tmpStateStack=[];var tmpState={};var _iterator12=_createForOfIteratorHelper(pEntitiesBundleDescription),_step12;try{for(_iterator12.s();!(_step12=_iterator12.n()).done;){var tmpEntityBundleEntry=_step12.value;try{switch(tmpEntityBundleEntry.Type){case'SetStateAddress':tmpStateStack.push(tmpState);tmpState=this.fable.manifest.getValueByHash(this.fable,tmpEntityBundleEntry.StateAddress);if(typeof tmpState==='undefined'){tmpState={};this.fable.manifest.setValueByHash(this.fable,tmpEntityBundleEntry.StateAddress,tmpState);}break;case'PopState':if(tmpStateStack.length>0){tmpState=tmpStateStack.pop();}else{this.log.warn("EntityBundleRequest encountered a PopState without a matching SetStateAddress.");}break;case'MapJoin':this.mapJoin(tmpEntityBundleEntry,this.prepareState(tmpState,tmpEntityBundleEntry));break;case'ProjectDataset':this.projectDataset(tmpEntityBundleEntry,this.prepareState(tmpState,tmpEntityBundleEntry));break;default:this.log.error("EntityBundleRequest encountered an unsupported type [".concat(tmpEntityBundleEntry.Type,"] in the entity bundle description."));}}catch(pError){this.log.error("EntityBundleRequest error gathering entity set: ".concat(pError),{Stack:pError.stack});}}}catch(err){_iterator12.e(err);}finally{_iterator12.f();}}/**
5393
+ */},{key:"processBundle",value:function processBundle(pEntitiesBundleDescription){if(!Array.isArray(pEntitiesBundleDescription)){this.log.error("EntityBundleRequest failed to parse entity bundle request because the input was not an array.");throw new Error('EntityBundleRequest failed to parse entity bundle request because the input was not an array.');}var tmpStateStack=[];var tmpState={};var _iterator14=_createForOfIteratorHelper(pEntitiesBundleDescription),_step14;try{for(_iterator14.s();!(_step14=_iterator14.n()).done;){var tmpEntityBundleEntry=_step14.value;try{switch(tmpEntityBundleEntry.Type){case'SetStateAddress':tmpStateStack.push(tmpState);tmpState=this.fable.manifest.getValueByHash(this.fable,tmpEntityBundleEntry.StateAddress);if(typeof tmpState==='undefined'){tmpState={};this.fable.manifest.setValueByHash(this.fable,tmpEntityBundleEntry.StateAddress,tmpState);}break;case'PopState':if(tmpStateStack.length>0){tmpState=tmpStateStack.pop();}else{this.log.warn("EntityBundleRequest encountered a PopState without a matching SetStateAddress.");}break;case'MapJoin':this.mapJoin(tmpEntityBundleEntry,this.prepareState(tmpState,tmpEntityBundleEntry));break;case'ProjectDataset':this.projectDataset(tmpEntityBundleEntry,this.prepareState(tmpState,tmpEntityBundleEntry));break;default:this.log.error("EntityBundleRequest encountered an unsupported type [".concat(tmpEntityBundleEntry.Type,"] in the entity bundle description."));}}catch(pError){this.log.error("EntityBundleRequest error gathering entity set: ".concat(pError),{Stack:pError.stack});}}}catch(err){_iterator14.e(err);}finally{_iterator14.f();}}/**
5347
5394
  * Gather data from the server returning a promise when it is complete.
5348
5395
  *
5349
5396
  * @param {Array<Record<string, any>>} pEntitiesBundleDescription - The entity bundle description object.
5350
5397
  * @param {(error?: Error) => void} fCallback - The callback function to call when the data gathering is complete.
5351
- */},{key:"gatherDataFromServer",value:function gatherDataFromServer(pEntitiesBundleDescription,fCallback){var _this78=this;if(!Array.isArray(pEntitiesBundleDescription)){this.log.error("EntityBundleRequest failed to parse entity bundle request because the input was not an array.");return fCallback(new Error('EntityBundleRequest failed to parse entity bundle request because the input was not an array.'));}var tmpAnticipate=this.fable.newAnticipate();var tmpStateStack=[];var tmpState={};var _loop3=function _loop3(){var tmpEntityBundleEntry=pEntitiesBundleDescription[i];tmpAnticipate.anticipate(function(fNext){try{switch(tmpEntityBundleEntry.Type){case'SetStateAddress':tmpStateStack.push(tmpState);tmpState=_this78.fable.manifest.getValueByHash(_this78.fable,tmpEntityBundleEntry.StateAddress);if(typeof tmpState==='undefined'){tmpState={};_this78.fable.manifest.setValueByHash(_this78.fable,tmpEntityBundleEntry.StateAddress,tmpState);}return fNext();case'PopState':if(tmpStateStack.length>0){tmpState=tmpStateStack.pop();}else{_this78.log.warn("EntityBundleRequest encountered a PopState without a matching SetStateAddress.");}return fNext();case'Custom':return _this78.gatherCustomDataSet(tmpEntityBundleEntry,_this78.prepareState(tmpState,tmpEntityBundleEntry),fNext);case'MapJoin':_this78.mapJoin(tmpEntityBundleEntry,_this78.prepareState(tmpState,tmpEntityBundleEntry));return fNext();case'ProjectDataset':_this78.projectDataset(tmpEntityBundleEntry,_this78.prepareState(tmpState,tmpEntityBundleEntry));return fNext();// This is the default case, for a meadow entity set or single entity
5352
- case'MeadowEntityCount':return _this78.gatherEntitySetCount(tmpEntityBundleEntry,_this78.prepareState(tmpState,tmpEntityBundleEntry),fNext);case'MeadowEntity':default:return _this78.gatherEntitySet(tmpEntityBundleEntry,_this78.prepareState(tmpState,tmpEntityBundleEntry),fNext);}}catch(pError){_this78.log.error("EntityBundleRequest error gathering entity set: ".concat(pError),{Stack:pError.stack});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
5353
- if(pError){_this78.log.error("EntityBundleRequest error gathering entity set: ".concat(pError),{Stack:pError.stack});return fCallback(pError);}return fCallback();});}/**
5398
+ */},{key:"gatherDataFromServer",value:function gatherDataFromServer(pEntitiesBundleDescription,fCallback){var _this79=this;if(!Array.isArray(pEntitiesBundleDescription)){this.log.error("EntityBundleRequest failed to parse entity bundle request because the input was not an array.");return fCallback(new Error('EntityBundleRequest failed to parse entity bundle request because the input was not an array.'));}var tmpAnticipate=this.fable.newAnticipate();var tmpStateStack=[];var tmpState={};var _loop4=function _loop4(){var tmpEntityBundleEntry=pEntitiesBundleDescription[i];tmpAnticipate.anticipate(function(fNext){try{switch(tmpEntityBundleEntry.Type){case'SetStateAddress':tmpStateStack.push(tmpState);tmpState=_this79.fable.manifest.getValueByHash(_this79.fable,tmpEntityBundleEntry.StateAddress);if(typeof tmpState==='undefined'){tmpState={};_this79.fable.manifest.setValueByHash(_this79.fable,tmpEntityBundleEntry.StateAddress,tmpState);}return fNext();case'PopState':if(tmpStateStack.length>0){tmpState=tmpStateStack.pop();}else{_this79.log.warn("EntityBundleRequest encountered a PopState without a matching SetStateAddress.");}return fNext();case'Custom':return _this79.gatherCustomDataSet(tmpEntityBundleEntry,_this79.prepareState(tmpState,tmpEntityBundleEntry),fNext);case'MapJoin':_this79.mapJoin(tmpEntityBundleEntry,_this79.prepareState(tmpState,tmpEntityBundleEntry));return fNext();case'ProjectDataset':_this79.projectDataset(tmpEntityBundleEntry,_this79.prepareState(tmpState,tmpEntityBundleEntry));return fNext();// This is the default case, for a meadow entity set or single entity
5399
+ case'MeadowEntityCount':return _this79.gatherEntitySetCount(tmpEntityBundleEntry,_this79.prepareState(tmpState,tmpEntityBundleEntry),fNext);case'MeadowEntity':default:return _this79.gatherEntitySet(tmpEntityBundleEntry,_this79.prepareState(tmpState,tmpEntityBundleEntry),fNext);}}catch(pError){_this79.log.error("EntityBundleRequest error gathering entity set: ".concat(pError),{Stack:pError.stack});return fNext();}});};for(var i=0;i<pEntitiesBundleDescription.length;i++){_loop4();}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
5400
+ if(pError){_this79.log.error("EntityBundleRequest error gathering entity set: ".concat(pError),{Stack:pError.stack});return fCallback(pError);}return fCallback();});}/**
5354
5401
  * Creates a wrapper state object to allow referencing common global state in addition to flow-state.
5355
5402
  *
5356
5403
  * @param {Record<string, any>} pState - The state object to prepare.
5357
5404
  * @param {any} [pStepConfiguration] - (optional) The step configuration object provided in the config, if any.
5358
5405
  * @return {Record<string, any>} - The prepared state object.
5359
5406
  */},{key:"prepareState",value:function prepareState(pState,pStepConfiguration){return{State:pState,AppData:this.fable.AppData,Bundle:this.fable.Bundle,Pict:this.fable,Fable:this.fable,StepConfiguration:pStepConfiguration};}},{key:"getEntity",value:function getEntity(pEntity,pIDRecord,fCallback){this.initializeCache(pEntity);// Discard anything from the cache that has expired or is over size.
5360
- this.recordCache[pEntity].prune(function(){var _this79=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){/*
5407
+ this.recordCache[pEntity].prune(function(){var _this80=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){/*
5361
5408
  * 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.
5362
5409
  if (pResponse && pResponse.statusCode && pResponse.statusCode >= 400)
5363
5410
  {
5364
5411
  this.log.error(`Error getting entity [${pEntity}] with ID [${pIDRecord}] from url [${tmpOptions.url}]: ${pResponse.statusCode} ${pResponse.statusMessage}`);
5365
5412
  return fCallback(new Error(`Error getting entity [${pEntity}] with ID [${pIDRecord}] from url [${tmpOptions.url}]: ${pResponse.statusCode} ${JSON.stringify(pBody || {})}`));
5366
5413
  }
5367
- */if(pBody){_this79.recordCache[pEntity].put(pBody,pIDRecord);}return fCallback(pError,pBody);});}.bind(this));}},{key:"getEntitySetPage",value:function getEntitySetPage(pEntity,pMeadowFilterExpression,pRecordStartCursor,pRecordCount,fCallback){var tmpFilterStanza=pMeadowFilterExpression?"/FilteredTo/".concat(pMeadowFilterExpression):'';var tmpURL="".concat(this.options.urlPrefix).concat(pEntity,"s").concat(tmpFilterStanza,"/").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,"] [").concat(pRecordStartCursor,"/").concat(pRecordCount,"] 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,"] [").concat(pRecordStartCursor,"/").concat(pRecordCount,"] 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 tmpFilterStanza=pMeadowFilterExpression?"/FilteredTo/".concat(pMeadowFilterExpression):'';var tmpURL="".concat(this.options.urlPrefix).concat(pEntity,"s/Count").concat(tmpFilterStanza);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?
5414
+ */if(pBody){_this80.recordCache[pEntity].put(pBody,pIDRecord);}return fCallback(pError,pBody);});}.bind(this));}},{key:"getEntitySetPage",value:function getEntitySetPage(pEntity,pMeadowFilterExpression,pRecordStartCursor,pRecordCount,fCallback){var tmpFilterStanza=pMeadowFilterExpression?"/FilteredTo/".concat(pMeadowFilterExpression):'';var tmpURL="".concat(this.options.urlPrefix).concat(pEntity,"s").concat(tmpFilterStanza,"/").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,"] [").concat(pRecordStartCursor,"/").concat(pRecordCount,"] 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,"] [").concat(pRecordStartCursor,"/").concat(pRecordCount,"] 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 tmpFilterStanza=pMeadowFilterExpression?"/FilteredTo/".concat(pMeadowFilterExpression):'';var tmpURL="".concat(this.options.urlPrefix).concat(pEntity,"s/Count").concat(tmpFilterStanza);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?
5368
5415
  // FBL~ID${pDestinationEntity}~INN~${tmpIDRecordsCommaSeparated}
5369
5416
  // If the list is mega-long we can parse it and break it into chunks.
5370
5417
  this.initializeCache(pEntity);// Discard anything from the cache that has expired or is over size.
5371
- this.recordSetCache[pEntity].prune(function(){var _this80=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)){_this80.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=_this80.options.downloadBatchSize;var tmpFilterStanza=pMeadowFilterExpression?"/FilteredTo/".concat(pMeadowFilterExpression):'';for(var i=0;i<tmpRecordCount/tmpDownloadBatchSize;i++){// Generate each of the URI fragments to download
5372
- tmpDownloadURIFragments.push("".concat(_this80.options.urlPrefix).concat(pEntity,"s").concat(tmpFilterStanza,"/").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)
5373
- _this80.fable.Utility.eachLimit(tmpDownloadURIFragments,1,function(pURIFragment,fDownloadCallback){_this80.restClient.getJSON(pURIFragment,function(pDownloadError,pDownloadResponse,pDownloadBody){if(pDownloadResponse&&pDownloadResponse.statusCode&&pDownloadResponse.statusCode>=400){_this80.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?
5374
- return fDownloadCallback(pDownloadError);});},function(pFullDownloadError){if(tmpEntitySet){_this80.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(_libFableServiceBase21){/**
5418
+ this.recordSetCache[pEntity].prune(function(){var _this81=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)){_this81.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=_this81.options.downloadBatchSize;var tmpFilterStanza=pMeadowFilterExpression?"/FilteredTo/".concat(pMeadowFilterExpression):'';for(var i=0;i<tmpRecordCount/tmpDownloadBatchSize;i++){// Generate each of the URI fragments to download
5419
+ tmpDownloadURIFragments.push("".concat(_this81.options.urlPrefix).concat(pEntity,"s").concat(tmpFilterStanza,"/").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)
5420
+ _this81.fable.Utility.eachLimit(tmpDownloadURIFragments,1,function(pURIFragment,fDownloadCallback){_this81.restClient.getJSON(pURIFragment,function(pDownloadError,pDownloadResponse,pDownloadBody){if(pDownloadResponse&&pDownloadResponse.statusCode&&pDownloadResponse.statusCode>=400){_this81.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?
5421
+ return fDownloadCallback(pDownloadError);});},function(pFullDownloadError){if(tmpEntitySet){_this81.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(_libFableServiceBase21){/**
5375
5422
  * @param {Object} pFable - The Fable Framework instance
5376
5423
  * @param {Object} pOptions - The options for the service
5377
5424
  * @param {String} pServiceHash - The hash of the service
5378
- */function PictTemplateProvider(pFable,pOptions,pServiceHash){var _this81;_classCallCheck2(this,PictTemplateProvider);_this81=_callSuper(this,PictTemplateProvider,[pFable,pOptions,pServiceHash]);/** @type {any} */_this81.log;/** @type {string} */_this81.UUID;/** @type {string} */_this81.Hash;_this81.serviceType='PictTemplateProvider';_this81.templates={};_this81.templateSources={};// Default templates are stored by prefix.
5425
+ */function PictTemplateProvider(pFable,pOptions,pServiceHash){var _this82;_classCallCheck2(this,PictTemplateProvider);_this82=_callSuper(this,PictTemplateProvider,[pFable,pOptions,pServiceHash]);/** @type {any} */_this82.log;/** @type {string} */_this82.UUID;/** @type {string} */_this82.Hash;_this82.serviceType='PictTemplateProvider';_this82.templates={};_this82.templateSources={};// Default templates are stored by prefix.
5379
5426
  // The longest prefix match is used.
5380
5427
  // Case sensitive.
5381
- _this81.defaultTemplates=[];/**
5428
+ _this82.defaultTemplates=[];/**
5382
5429
  * @type {(hash?: string) => { template: string, source: string }?} loadTemplateFunction - The function to load a template
5383
- */_this81.loadTemplateFunction=function(){return null;};return _this81;}/**
5430
+ */_this82.loadTemplateFunction=function(){return null;};return _this82;}/**
5384
5431
  * Add a template to the provider.
5385
5432
  *
5386
5433
  * @param {String} pTemplateHash - The hash of the template
@@ -5445,35 +5492,35 @@ if(!(pTemplateHash in this.templates)){this.checkDefaultTemplateHash(pTemplateHa
5445
5492
  * Pict management object.
5446
5493
  */var Pict=/*#__PURE__*/function(_libFable){/**
5447
5494
  * @param {Object<String, any>} pSettings - The settings for the Pict instance.
5448
- */function Pict(pSettings){var _this82;_classCallCheck2(this,Pict);_this82=_callSuper(this,Pict,[pSettings]);/** @type {any} */_this82.settings;_this82.isBrowser=new Function("try {return (this===window);} catch(pError) {return false;}");/** @type {Object} */_this82._PackageFable=_this82._Package;/** @type {Record<string, any>} */_this82._Package=libPackage;_this82.browserAddress="window._Pict";if("BrowserAddress"in _this82.settings){_this82.browserAddress=_this82.settings.BrowserAddress;}_this82.children=[];/** @type {import('pict-application')} */_this82.PictApplication=null;// shim types from fable until we export types properly
5449
- /** @type {any} */_this82.log;//NOTE: This needs to come before any other providers which may instantiate a rest client so we don't proliferate them
5450
- _this82.instantiateServiceProvider("RestClient");/**
5495
+ */function Pict(pSettings){var _this83;_classCallCheck2(this,Pict);_this83=_callSuper(this,Pict,[pSettings]);/** @type {any} */_this83.settings;_this83.isBrowser=new Function("try {return (this===window);} catch(pError) {return false;}");/** @type {Object} */_this83._PackageFable=_this83._Package;/** @type {Record<string, any>} */_this83._Package=libPackage;_this83.browserAddress="window._Pict";if("BrowserAddress"in _this83.settings){_this83.browserAddress=_this83.settings.BrowserAddress;}_this83.children=[];/** @type {import('pict-application')} */_this83.PictApplication=null;// shim types from fable until we export types properly
5496
+ /** @type {any} */_this83.log;//NOTE: This needs to come before any other providers which may instantiate a rest client so we don't proliferate them
5497
+ _this83.instantiateServiceProvider("RestClient");/**
5451
5498
  * The templateProvider provides a basic key->template mapping with default fallback capabilities
5452
5499
  *
5453
5500
  * @type {PictTemplateProvider}
5454
- */_this82.TemplateProvider=null;_this82.addAndInstantiateServiceType("TemplateProvider",PictTemplateProvider);/**
5501
+ */_this83.TemplateProvider=null;_this83.addAndInstantiateServiceType("TemplateProvider",PictTemplateProvider);/**
5455
5502
  * The meadow entity provider.
5456
5503
  *
5457
5504
  * @type {PictMeadowEntityProvider}
5458
- */_this82.EntityProvider=null;_this82.addAndInstantiateServiceType("EntityProvider",PictMeadowEntityProvider);/**
5505
+ */_this83.EntityProvider=null;_this83.addAndInstantiateServiceType("EntityProvider",PictMeadowEntityProvider);/**
5459
5506
  * The data provider.
5460
5507
  *
5461
5508
  * @type {PictDataProvider}
5462
- */_this82.DataProvider=null;_this82.addAndInstantiateServiceType("DataProvider",PictDataProvider);_this82.addServiceTypeIfNotExists('TransactionTracking',libFableServiceTransactionTracking);/**
5509
+ */_this83.DataProvider=null;_this83.addAndInstantiateServiceType("DataProvider",PictDataProvider);_this83.addServiceTypeIfNotExists('TransactionTracking',libFableServiceTransactionTracking);/**
5463
5510
  * The content assignment module.
5464
5511
  *
5465
5512
  * @type {PictContentAssignment}
5466
- */_this82.ContentAssignment=null;_this82.addAndInstantiateServiceType("ContentAssignment",PictContentAssignment);/**
5513
+ */_this83.ContentAssignment=null;_this83.addAndInstantiateServiceType("ContentAssignment",PictContentAssignment);/**
5467
5514
  * The CSS module.
5468
5515
  *
5469
5516
  * @type {PictCSS}
5470
5517
  * @public
5471
- */_this82.CSSMap=null;_this82.addAndInstantiateServiceType("CSSMap",PictCSS);_this82.addServiceType("PictTemplate",require("pict-template"));_this82.instantiateServiceProvider("MetaTemplate");_this82.instantiateServiceProvider("DataGeneration");_this82.manifest=_this82.instantiateServiceProvider("Manifest");/** @type {Record<string, any>} */_this82.AppData={};if("DefaultAppData"in _this82.fable.settings){_this82.AppData=_this82.fable.settings.DefaultAppData;}/** @type {Record<string, any>} */_this82.Bundle={};if("DefaultBundle"in _this82.fable.settings){_this82.Bundle=_this82.fable.settings.DefaultBundle;}// Log noisness goes from 0 - 5, where 5 is show me everything.
5472
- _this82.LogNoisiness=0;// Although we have log noisiness, sometimes we need control flow without all the other noise for hard to diagnose interpreters.
5473
- _this82.LogControlFlow=false;// And an easy way to be introspective about data at various locations
5474
- _this82.LogControlFlowWatchAddressList=[];// Load manifest sets
5475
- if(_this82.settings.Manifests){_this82.loadManifestSet(_this82.settings.Manifests);}_this82._DefaultPictTemplatesInitialized=false;_this82.initializePictTemplateEngine();_this82.addServiceType("PictView",require("pict-view"));_this82.addServiceType("PictProvider",require("pict-provider"));_this82.addServiceType("PictApplication",require("pict-application"));// Expose the named views directly, through a convenience accessor
5476
- /** @type {{ FilterManager: libProviderFilterManager, [key: string]: any }} */_this82.providers=_this82.servicesMap.PictProvider;_this82.views=_this82.servicesMap.PictView;_this82.addProvider('FilterManager',{},libProviderFilterManager);_this82.addProvider('DataBroker',{},libProviderDataBroker);return _this82;}/**
5518
+ */_this83.CSSMap=null;_this83.addAndInstantiateServiceType("CSSMap",PictCSS);_this83.addServiceType("PictTemplate",require("pict-template"));_this83.instantiateServiceProvider("MetaTemplate");_this83.instantiateServiceProvider("DataGeneration");_this83.manifest=_this83.instantiateServiceProvider("Manifest");/** @type {Record<string, any>} */_this83.AppData={};if("DefaultAppData"in _this83.fable.settings){_this83.AppData=_this83.fable.settings.DefaultAppData;}/** @type {Record<string, any>} */_this83.Bundle={};if("DefaultBundle"in _this83.fable.settings){_this83.Bundle=_this83.fable.settings.DefaultBundle;}// Log noisness goes from 0 - 5, where 5 is show me everything.
5519
+ _this83.LogNoisiness=0;// Although we have log noisiness, sometimes we need control flow without all the other noise for hard to diagnose interpreters.
5520
+ _this83.LogControlFlow=false;// And an easy way to be introspective about data at various locations
5521
+ _this83.LogControlFlowWatchAddressList=[];// Load manifest sets
5522
+ if(_this83.settings.Manifests){_this83.loadManifestSet(_this83.settings.Manifests);}_this83._DefaultPictTemplatesInitialized=false;_this83.initializePictTemplateEngine();_this83.addServiceType("PictView",require("pict-view"));_this83.addServiceType("PictProvider",require("pict-provider"));_this83.addServiceType("PictApplication",require("pict-application"));// Expose the named views directly, through a convenience accessor
5523
+ /** @type {{ FilterManager: libProviderFilterManager, [key: string]: any }} */_this83.providers=_this83.servicesMap.PictProvider;_this83.views=_this83.servicesMap.PictView;_this83.addProvider('FilterManager',{},libProviderFilterManager);_this83.addProvider('DataBroker',{},libProviderDataBroker);return _this83;}/**
5477
5524
  * Load manifests in as Hashed services
5478
5525
  *
5479
5526
  * @param {Object<String, String>} pManifestSet - The manifest set to load.
@@ -5583,9 +5630,10 @@ this.addTemplate(require("./templates/debugging/Pict-Template-Breakpoint.js"));t
5583
5630
  * @param {Array<any>} [pContextArray] - The context array to resolve (optional)
5584
5631
  * @param {Record<string, any>} [pRootDataObject] - The root data object to resolve (optional)
5585
5632
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
5633
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
5586
5634
  *
5587
5635
  * @return {any} The value at the given address, or undefined
5588
- */},{key:"resolveStateFromAddress",value:function resolveStateFromAddress(pAddress,pRecord,pContextArray,pRootDataObject,pScope){var tmpContextArray=Array.isArray(pContextArray)?pContextArray:[this];var tmpScope=pScope||this;var tmpRootDataObject=_typeof(pRootDataObject)==='object'&&pRootDataObject!=null?pRootDataObject:{};tmpRootDataObject.Fable=this;tmpRootDataObject.Pict=this;tmpRootDataObject.AppData=this.AppData;tmpRootDataObject.Bundle=this.Bundle;tmpRootDataObject.Context=tmpContextArray;tmpRootDataObject.Record=pRecord;tmpRootDataObject.Scope=tmpScope;return this.manifest.getValueByHash(tmpRootDataObject,pAddress);}/**
5636
+ */},{key:"resolveStateFromAddress",value:function resolveStateFromAddress(pAddress,pRecord,pContextArray,pRootDataObject,pScope,pState){var tmpContextArray=Array.isArray(pContextArray)?pContextArray:[this];var tmpScope=pScope||this;var tmpRootDataObject=_typeof(pRootDataObject)==='object'&&pRootDataObject!=null?pRootDataObject:{};tmpRootDataObject.Fable=this;tmpRootDataObject.Pict=this;tmpRootDataObject.AppData=this.AppData;tmpRootDataObject.Bundle=this.Bundle;tmpRootDataObject.Context=tmpContextArray;tmpRootDataObject.Record=pRecord;tmpRootDataObject.Scope=tmpScope;tmpRootDataObject.__State=pState;return this.manifest.getValueByHash(tmpRootDataObject,pAddress);}/**
5589
5637
  * Set a value from a nested object using a dot notation string.
5590
5638
  *
5591
5639
  * TODO: re-home this in the data broker
@@ -5605,9 +5653,10 @@ this.addTemplate(require("./templates/debugging/Pict-Template-Breakpoint.js"));t
5605
5653
  * @param {Function} [fCallback] - The callback to call when the template is parsed
5606
5654
  * @param {Array<any>} [pContextArray] - The context array to use in the template
5607
5655
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
5656
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
5608
5657
  *
5609
5658
  * @return {String?} The parsed template string, or undefined if a callback was provided
5610
- */},{key:"parseTemplate",value:function parseTemplate(pTemplateString,pData,fCallback,pContextArray,pScope){var _this83=this;var tmpData=_typeof(pData)==="object"?pData:{};var tmpContextArray=Array.isArray(pContextArray)?pContextArray:[this];var tmpScope=pScope||this;var tmpParseUUID;if(this.LogControlFlow){tmpParseUUID=this.fable.getUUID();this.log.info("PICT-ControlFlow parseTemplate ".concat(tmpParseUUID," [").concat(pTemplateString.substring(0,50).replace("\n","\\n"),"...").concat(pTemplateString.length,"] (fCallback: ").concat(_typeof(fCallback),") with data size [").concat(JSON.stringify(tmpData).length,"]"));if(this.LogNoisiness>1){this.log.info("PICT-ControlFlow parseTemplate ".concat(tmpParseUUID," template:\n").concat(pTemplateString));}if(this.LogControlFlowWatchAddressList.length>0){for(var i=0;i<this.LogControlFlowWatchAddressList.length;i++){this.log.info("PICT-ControlFlow parseTemplate ".concat(tmpParseUUID," Watch Value: [").concat(this.LogControlFlowWatchAddressList[i],"]=>[").concat(this.resolveStateFromAddress(this.LogControlFlowWatchAddressList[i],tmpData),"]"));}}}if(typeof fCallback==="function"){this.MetaTemplate.parseString(pTemplateString,tmpData,function(pError,pParsedTemplate){if(_this83.LogControlFlow&&_this83.LogNoisiness>1){_this83.log.info("PICT-ControlFlow parseTemplate ".concat(tmpParseUUID," Template Async Return Value:\n").concat(pParsedTemplate));}return fCallback(pError,pParsedTemplate);},tmpContextArray,tmpScope);}else{var tmpResult=this.MetaTemplate.parseString(pTemplateString,tmpData,null,tmpContextArray,tmpScope);if(this.LogControlFlow&&this.LogNoisiness>1){this.log.info("PICT-ControlFlow parseTemplate ".concat(tmpParseUUID," Template Return Value:\n").concat(tmpResult));}return tmpResult;}}/**
5659
+ */},{key:"parseTemplate",value:function parseTemplate(pTemplateString,pData,fCallback,pContextArray,pScope,pState){var _this84=this;var tmpData=_typeof(pData)==="object"?pData:{};var tmpContextArray=Array.isArray(pContextArray)?pContextArray:[this];var tmpScope=pScope||this;var tmpParseUUID;if(this.LogControlFlow){tmpParseUUID=this.fable.getUUID();this.log.info("PICT-ControlFlow parseTemplate ".concat(tmpParseUUID," [").concat(pTemplateString.substring(0,50).replace("\n","\\n"),"...").concat(pTemplateString.length,"] (fCallback: ").concat(_typeof(fCallback),") with data size [").concat(JSON.stringify(tmpData).length,"]"));if(this.LogNoisiness>1){this.log.info("PICT-ControlFlow parseTemplate ".concat(tmpParseUUID," template:\n").concat(pTemplateString));}if(this.LogControlFlowWatchAddressList.length>0){for(var i=0;i<this.LogControlFlowWatchAddressList.length;i++){this.log.info("PICT-ControlFlow parseTemplate ".concat(tmpParseUUID," Watch Value: [").concat(this.LogControlFlowWatchAddressList[i],"]=>[").concat(this.resolveStateFromAddress(this.LogControlFlowWatchAddressList[i],tmpData),"]"));}}}if(typeof fCallback==="function"){this.MetaTemplate.parseString(pTemplateString,tmpData,function(pError,pParsedTemplate){if(_this84.LogControlFlow&&_this84.LogNoisiness>1){_this84.log.info("PICT-ControlFlow parseTemplate ".concat(tmpParseUUID," Template Async Return Value:\n").concat(pParsedTemplate));}return fCallback(pError,pParsedTemplate);},tmpContextArray,tmpScope,pState);}else{var tmpResult=this.MetaTemplate.parseString(pTemplateString,tmpData,null,tmpContextArray,tmpScope,pState);if(this.LogControlFlow&&this.LogNoisiness>1){this.log.info("PICT-ControlFlow parseTemplate ".concat(tmpParseUUID," Template Return Value:\n").concat(tmpResult));}return tmpResult;}}/**
5611
5660
  * Parse a template by hash.
5612
5661
  *
5613
5662
  * @param {String} pTemplateHash - The hash of the template to parse
@@ -5615,10 +5664,11 @@ this.addTemplate(require("./templates/debugging/Pict-Template-Breakpoint.js"));t
5615
5664
  * @param {Function} [fCallback] - The callback to call when the template is parsed
5616
5665
  * @param {Array<any>} [pContextArray] - The context array to use in the template
5617
5666
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
5667
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
5618
5668
  *
5619
5669
  * @return {String?} The parsed template string, or undefined if a callback was provided
5620
- */},{key:"parseTemplateByHash",value:function parseTemplateByHash(pTemplateHash,pData,fCallback,pContextArray,pScope){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
5621
- if(!tmpTemplateString){tmpTemplateString="";}return this.parseTemplate(tmpTemplateString,pData,fCallback,pContextArray,pScope);}/**
5670
+ */},{key:"parseTemplateByHash",value:function parseTemplateByHash(pTemplateHash,pData,fCallback,pContextArray,pScope,pState){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
5671
+ if(!tmpTemplateString){tmpTemplateString="";}return this.parseTemplate(tmpTemplateString,pData,fCallback,pContextArray,pScope,pState);}/**
5622
5672
  * Parse a template set.
5623
5673
  *
5624
5674
  * @param {String} pTemplateString - The template string to parse
@@ -5626,10 +5676,11 @@ if(!tmpTemplateString){tmpTemplateString="";}return this.parseTemplate(tmpTempla
5626
5676
  * @param {Function} [fCallback] - The callback to call when the template set is parsed
5627
5677
  * @param {Array<any>} [pContextArray] - The context array to use in the template
5628
5678
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
5679
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
5629
5680
  *
5630
5681
  * @return {String?} The parsed template string, or undefined if a callback was provided
5631
- */},{key:"parseTemplateSet",value:function parseTemplateSet(pTemplateString,pDataSet,fCallback,pContextArray,pScope){var _this84=this;// TODO: This will need streaming -- for now janky old string append does the trick
5632
- 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,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,pScope);}}else{var tmpKeys=Object.keys(pDataSet);for(var _i66=0;_i66<tmpKeys.length;_i66++){tmpValue+=this.parseTemplate(pTemplateString,pDataSet[tmpKeys[_i66]],null,pContextArray,pScope);}}return tmpValue;}else{return"";}}}/**
5682
+ */},{key:"parseTemplateSet",value:function parseTemplateSet(pTemplateString,pDataSet,fCallback,pContextArray,pScope,pState){var _this85=this;// TODO: This will need streaming -- for now janky old string append does the trick
5683
+ var tmpValue="";if(typeof fCallback=="function"){if(Array.isArray(pDataSet)||_typeof(pDataSet)=="object"){this.Utility.eachLimit(pDataSet,1,function(pRecord,fRecordTemplateCallback){return _this85.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,pScope,pState);}}else{var tmpKeys=Object.keys(pDataSet);for(var _i66=0;_i66<tmpKeys.length;_i66++){tmpValue+=this.parseTemplate(pTemplateString,pDataSet[tmpKeys[_i66]],null,pContextArray,pScope,pState);}}return tmpValue;}else{return"";}}}/**
5633
5684
  * Parse a template set by hash.
5634
5685
  *
5635
5686
  * @param {String} pTemplateHash - The hash of the template to parse
@@ -5637,10 +5688,11 @@ var tmpValue="";if(typeof fCallback=="function"){if(Array.isArray(pDataSet)||_ty
5637
5688
  * @param {Function} [fCallback] - The callback to call when the template is parsed
5638
5689
  * @param {Array<any>} [pContextArray] - The context array to use in the template
5639
5690
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
5691
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
5640
5692
  *
5641
5693
  * @return {String?} The parsed template string, or undefined if a callback was provided
5642
- */},{key:"parseTemplateSetByHash",value:function parseTemplateSetByHash(pTemplateHash,pDataSet,fCallback,pContextArray,pScope){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
5643
- if(!tmpTemplateString){tmpTemplateString="";}return this.parseTemplateSet(tmpTemplateString,pDataSet,fCallback,pContextArray,pScope);}/**
5694
+ */},{key:"parseTemplateSetByHash",value:function parseTemplateSetByHash(pTemplateHash,pDataSet,fCallback,pContextArray,pScope,pState){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
5695
+ if(!tmpTemplateString){tmpTemplateString="";}return this.parseTemplateSet(tmpTemplateString,pDataSet,fCallback,pContextArray,pScope,pState);}/**
5644
5696
  * Parse a template set.
5645
5697
  *
5646
5698
  * @param {String} pTemplateString - The template string to parse
@@ -5648,10 +5700,11 @@ if(!tmpTemplateString){tmpTemplateString="";}return this.parseTemplateSet(tmpTem
5648
5700
  * @param {Function} [fCallback] - The callback to call when the template set is parsed
5649
5701
  * @param {Array<any>} [pContextArray] - The context array to use in the template
5650
5702
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
5703
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
5651
5704
  *
5652
5705
  * @return {String?} The parsed template string, or undefined if a callback was provided
5653
- */},{key:"parseTemplateSetWithPayload",value:function parseTemplateSetWithPayload(pTemplateString,pDataSet,pPayload,fCallback,pContextArray,pScope){var _this85=this;// TODO: This will need streaming -- for now janky old string append does the trick
5654
- var tmpValue="";if(typeof fCallback=="function"){if(Array.isArray(pDataSet)||_typeof(pDataSet)=="object"){this.Utility.eachLimit(pDataSet,1,function(pRecord,fRecordTemplateCallback){return _this85.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,pScope);}}else{var tmpKeys=Object.keys(pDataSet);for(var _i67=0;_i67<tmpKeys.length;_i67++){tmpValue+=this.parseTemplate(pTemplateString,{Data:pDataSet[tmpKeys[_i67]],Payload:pPayload},null,pContextArray,pScope);}}return tmpValue;}else{return"";}}}/**
5706
+ */},{key:"parseTemplateSetWithPayload",value:function parseTemplateSetWithPayload(pTemplateString,pDataSet,pPayload,fCallback,pContextArray,pScope,pState){var _this86=this;// TODO: This will need streaming -- for now janky old string append does the trick
5707
+ var tmpValue="";if(typeof fCallback=="function"){if(Array.isArray(pDataSet)||_typeof(pDataSet)=="object"){this.Utility.eachLimit(pDataSet,1,function(pRecord,fRecordTemplateCallback){return _this86.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,pScope,pState);}}else{var tmpKeys=Object.keys(pDataSet);for(var _i67=0;_i67<tmpKeys.length;_i67++){tmpValue+=this.parseTemplate(pTemplateString,{Data:pDataSet[tmpKeys[_i67]],Payload:pPayload},null,pContextArray,pScope,pState);}}return tmpValue;}else{return"";}}}/**
5655
5708
  * Parse a template set by hash.
5656
5709
  *
5657
5710
  * @param {String} pTemplateHash - The hash of the template to parse
@@ -5660,10 +5713,11 @@ var tmpValue="";if(typeof fCallback=="function"){if(Array.isArray(pDataSet)||_ty
5660
5713
  * @param {Function} [fCallback] - The callback to call when the template is parsed
5661
5714
  * @param {Array<any>} [pContextArray] - The context array to use in the template
5662
5715
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
5716
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
5663
5717
  *
5664
5718
  * @return {String?} The parsed template string, or undefined if a callback was provided
5665
- */},{key:"parseTemplateSetWithPayloadByHash",value:function parseTemplateSetWithPayloadByHash(pTemplateHash,pDataSet,pPayload,fCallback,pContextArray,pScope){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
5666
- if(!tmpTemplateString){tmpTemplateString="";}return this.parseTemplateSetWithPayload(tmpTemplateString,pDataSet,pPayload,fCallback,pContextArray,pScope);}}]);}(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");module.exports.FilterClauseBase=require('./filters/FilterClauseBase.js');module.exports.FilterClauseLocal=require('./filters/FilterClauseLocal.js');module.exports.FilterClauseInternalJoin=require('./filters/FilterClauseInternalJoin.js');module.exports.FilterClauseExternalJoin=require('./filters/FilterClauseExternalJoin.js');// This is to help understand the type of enivironement we're executing in
5719
+ */},{key:"parseTemplateSetWithPayloadByHash",value:function parseTemplateSetWithPayloadByHash(pTemplateHash,pDataSet,pPayload,fCallback,pContextArray,pScope,pState){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
5720
+ if(!tmpTemplateString){tmpTemplateString="";}return this.parseTemplateSetWithPayload(tmpTemplateString,pDataSet,pPayload,fCallback,pContextArray,pScope,pState);}}]);}(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");module.exports.FilterClauseBase=require('./filters/FilterClauseBase.js');module.exports.FilterClauseLocal=require('./filters/FilterClauseLocal.js');module.exports.FilterClauseInternalJoin=require('./filters/FilterClauseInternalJoin.js');module.exports.FilterClauseExternalJoin=require('./filters/FilterClauseExternalJoin.js');// This is to help understand the type of enivironement we're executing in
5667
5721
  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,"./filters/FilterClauseBase.js":203,"./filters/FilterClauseExternalJoin.js":204,"./filters/FilterClauseInternalJoin.js":205,"./filters/FilterClauseLocal.js":206,"./providers/Provider-DataBroker.js":207,"./providers/Provider-Filter-Manager.js":208,"./services/Fable-Service-TransactionTracking.js":209,"./templates/Pict-Template-Data.js":210,"./templates/Pict-Template-DataValueByKey.js":211,"./templates/Pict-Template-DataWithTemplateFallback.js":212,"./templates/Pict-Template-Entity.js":213,"./templates/Pict-Template-Self.js":214,"./templates/Pict-Template-SolveByReference.js":215,"./templates/Pict-Template-Template.js":216,"./templates/Pict-Template-TemplateByDataAddress.js":217,"./templates/Pict-Template-TemplateByReference.js":218,"./templates/Pict-Template-TemplateFromMap.js":219,"./templates/Pict-Template-TemplateSet.js":220,"./templates/Pict-Template-TemplateSetFromMap.js":221,"./templates/Pict-Template-TemplateSetWithPayload.js":222,"./templates/Pict-Template-TemplateValueSet.js":223,"./templates/Pict-Template-View.js":224,"./templates/data-generation/Pict-Template-RandomNumber.js":225,"./templates/data-generation/Pict-Template-RandomNumberString.js":226,"./templates/data/Pict-Template-DataEncodeJavascriptString.js":227,"./templates/data/Pict-Template-DataJson.js":228,"./templates/data/Pict-Template-DateOnlyFormat.js":229,"./templates/data/Pict-Template-DateOnlyYMD.js":230,"./templates/data/Pict-Template-DateTimeFormat.js":231,"./templates/data/Pict-Template-DateTimeYMD.js":232,"./templates/data/Pict-Template-Digits.js":233,"./templates/data/Pict-Template-Dollars.js":234,"./templates/data/Pict-Template-HtmlCommentEnd.js":235,"./templates/data/Pict-Template-HtmlCommentStart.js":236,"./templates/data/Pict-Template-Join.js":237,"./templates/data/Pict-Template-JoinUnique.js":238,"./templates/data/Pict-Template-PascalCaseIdentifier.js":239,"./templates/data/Pict-Template-PluckJoinUnique.js":240,"./templates/debugging/Pict-Template-Breakpoint.js":241,"./templates/debugging/Pict-Template-DataValueTree.js":242,"./templates/debugging/Pict-Template-LogStatement.js":243,"./templates/debugging/Pict-Template-LogValue.js":244,"./templates/debugging/Pict-Template-LogValueTree.js":245,"./templates/logic/Pict-Template-NotEmpty.js":246,"./templates/logic/Pict-Template-TemplateIf.js":248,"./templates/logic/Pict-Template-TemplateIfAbsolute.js":249,"fable":68,"pict-application":139,"pict-provider":141,"pict-template":143,"pict-view":145}],200:[function(require,module,exports){/**
5668
5722
  * Pict browser shim loader
5669
5723
  * @author <steven@velozo.com>
@@ -5802,7 +5856,7 @@ return this.contentMap[pAddress];}this.pict.log.warn("Mock read from Address ".c
5802
5856
  * @param {import('../Pict.js')} pFable
5803
5857
  */function FilterMeadowStanzaTokenGenerator(pFable){_classCallCheck2(this,FilterMeadowStanzaTokenGenerator);this.fable=pFable;this.pict=pFable;this.log=pFable.log;}/**
5804
5858
  * @param {FilterState} pFilterState
5805
- */return _createClass2(FilterMeadowStanzaTokenGenerator,[{key:"generateMeadowFilterStanzas",value:function generateMeadowFilterStanzas(pFilterState){var tmpResult=[];pFilterState.UserFilters=[];var _iterator13=_createForOfIteratorHelper(pFilterState.FilterConfiguration||[]),_step13;try{for(_iterator13.s();!(_step13=_iterator13.n()).done;){var tmpFilterConfig=_step13.value;/** @type {PreparedFilter} */var tmpFilterResult={GUID:this.pict.getUUID(),Filters:[]};var tmpValuesArray=Array.isArray(tmpFilterConfig.Values)?tmpFilterConfig.Values:tmpFilterConfig.Value!=null&&tmpFilterConfig.Value!=''&&(tmpFilterConfig.Type!='ExternalJoinDateMatch'||tmpFilterConfig.Value!=0)?[tmpFilterConfig.Value]:[];switch(tmpFilterConfig.Type){case'ExternalJoinMatch':case'ExternalJoinStringMatch':case'ExternalJoinDateMatch':case'ExternalJoinNumericMatch':/*
5859
+ */return _createClass2(FilterMeadowStanzaTokenGenerator,[{key:"generateMeadowFilterStanzas",value:function generateMeadowFilterStanzas(pFilterState){var tmpResult=[];pFilterState.UserFilters=[];var _iterator15=_createForOfIteratorHelper(pFilterState.FilterConfiguration||[]),_step15;try{for(_iterator15.s();!(_step15=_iterator15.n()).done;){var tmpFilterConfig=_step15.value;if(tmpFilterConfig.Enabled===false){if(this.pict.LogNoisiness>1){this.log.info("Skipping disabled filter configuration: ".concat(tmpFilterConfig.Type),{FilterConfig:tmpFilterConfig});}continue;}/** @type {PreparedFilter} */var tmpFilterResult={GUID:this.pict.getUUID(),Filters:[]};var tmpValuesArray=Array.isArray(tmpFilterConfig.Values)?tmpFilterConfig.Values:tmpFilterConfig.Value!=null&&tmpFilterConfig.Value!=''&&(tmpFilterConfig.Type!='ExternalJoinDateMatch'||tmpFilterConfig.Value!=0)?[tmpFilterConfig.Value]:[];switch(tmpFilterConfig.Type){case'ExternalJoinMatch':case'ExternalJoinStringMatch':case'ExternalJoinDateMatch':case'ExternalJoinNumericMatch':/*
5806
5860
  "Values": [ "John", "Jane" ],
5807
5861
  "ExternalFilterByColumns": [ "Name" ],
5808
5862
  "ExactMatch": false,
@@ -5815,9 +5869,9 @@ return this.contentMap[pAddress];}this.pict.log.warn("Mock read from Address ".c
5815
5869
 
5816
5870
  "ExternalFilterByTable": "Author",
5817
5871
  "ExternalFilterByTableConnectionColumn": "IDAuthor",
5818
- */var _iterator14=_createForOfIteratorHelper(tmpFilterConfig.ExternalFilterByColumns||(tmpFilterConfig.ExternalFilterByColumn?[tmpFilterConfig.ExternalFilterByColumn]:['Name'])),_step14;try{for(_iterator14.s();!(_step14=_iterator14.n()).done;){var tmpField=_step14.value;var _iterator15=_createForOfIteratorHelper(tmpValuesArray),_step15;try{for(_iterator15.s();!(_step15=_iterator15.n()).done;){var tmpValue=_step15.value;var tmpFilter={Index:-1,Entity:tmpFilterConfig.ExternalFilterByTable,Instruction:'FBVOR',Field:tmpField};if(tmpFilterConfig.ExactMatch||typeof tmpFilterConfig.ExactMatch==='undefined'&&(tmpFilterConfig.Type=='ExternalJoinNumericMatch'||tmpFilterConfig.Type=='ExternalJoinDateMatch')){tmpFilter.Operator='EQ';tmpFilter.Value=tmpValue;}else{tmpFilter.Operator='LK';tmpFilter.Value="%25".concat(tmpValue,"%25");//FIXME: point of URI encoding needs to be addressed
5819
- }tmpFilterResult.Filters.push(tmpFilter);}}catch(err){_iterator15.e(err);}finally{_iterator15.f();}}}catch(err){_iterator14.e(err);}finally{_iterator14.f();}if(!tmpFilterConfig.JoinTable){this.log.error("".concat(tmpFilterConfig.Type," filter missing JoinTable, cannot filter join table."),{FilterConfig:tmpFilterConfig});break;}if(!tmpFilterConfig.JoinTableExternalConnectionColumn){this.log.error("".concat(tmpFilterConfig.Type," filter missing JoinTableExternalConnectionColumn, cannot filter join table [").concat(tmpFilterConfig.JoinTable,"]."));break;}if(tmpFilterResult.Filters.length>0){tmpFilterResult.Filters.push({Index:0,Fulcrum:true,Entity:tmpFilterConfig.JoinTable,Instruction:'FBL',Field:tmpFilterConfig.JoinTableExternalConnectionColumn,Operator:'INN',ValueTemplate:"{~PJU:,^".concat(tmpFilterConfig.JoinTableExternalConnectionColumn,"^Record.State[Step-1]~}")});if(!tmpFilterConfig.CoreConnectionColumn){this.log.error("".concat(tmpFilterConfig.Type," filter missing CoreConnectionColumn, cannot filter core table [").concat(pFilterState.Entity,"]."));break;}tmpFilterResult.JoinConfig={CoreEntity:pFilterState.Entity,Instruction:'FBLOR',Fields:[tmpFilterConfig.CoreConnectionColumn],Operator:'INN',ValueTemplate:"{~PJU:,^".concat(tmpFilterConfig.JoinTableCoreConnectionColumn,"^Record.State[Step0]~}")};}break;case'ExternalJoinStringRange':case'ExternalJoinNumericRange':case'ExternalJoinDateRange':case'ExternalJoinRange':if(!tmpFilterConfig.Values||tmpFilterConfig.Values.Start==null&&tmpFilterConfig.Values.End==null){break;}// do not honor '0' for dates
5820
- if(tmpFilterConfig.Type=='ExternalJoinDateRange'){if((!tmpFilterConfig.Values.Start||tmpFilterConfig.Values.Start=='0')&&(!tmpFilterConfig.Values.End||tmpFilterConfig.Values.End=='0')){break;}}var _iterator16=_createForOfIteratorHelper(tmpFilterConfig.ExternalFilterByColumns||(tmpFilterConfig.ExternalFilterByColumn?[tmpFilterConfig.ExternalFilterByColumn]:['Name'])),_step16;try{for(_iterator16.s();!(_step16=_iterator16.n()).done;){var _tmpField=_step16.value;if(tmpFilterConfig.Values&&tmpFilterConfig.Values.Start&&(tmpFilterConfig.Type!='ExternalJoinDateRange'||tmpFilterConfig.Values.Start!='0')){tmpFilterResult.Filters.push({Index:-1,CoreEntity:true,Entity:pFilterState.Entity,Instruction:'FBV',Field:_tmpField,Operator:tmpFilterConfig.StartExclusive?'GT':'GE',Value:tmpFilterConfig.Values.Start});}if(tmpFilterConfig.Values&&tmpFilterConfig.Values.End&&(tmpFilterConfig.Type!='ExternalJoinDateRange'||tmpFilterConfig.Values.End!='0')){tmpFilterResult.Filters.push({Index:-1,CoreEntity:true,Entity:pFilterState.Entity,Instruction:'FBV',Field:_tmpField,Operator:tmpFilterConfig.EndExclusive?'LT':'LE',Value:tmpFilterConfig.Values.End});}}}catch(err){_iterator16.e(err);}finally{_iterator16.f();}if(!tmpFilterConfig.JoinTable){this.log.error("".concat(tmpFilterConfig.Type," filter missing JoinTable, cannot filter join table."),{FilterConfig:tmpFilterConfig});break;}if(!tmpFilterConfig.JoinTableExternalConnectionColumn){this.log.error("".concat(tmpFilterConfig.Type," filter missing JoinTableExternalConnectionColumn, cannot filter join table [").concat(tmpFilterConfig.JoinTable,"]."));break;}if(tmpFilterResult.Filters.length>0){tmpFilterResult.Filters.push({Index:0,Fulcrum:true,Entity:tmpFilterConfig.JoinTable,Instruction:'FBL',Field:tmpFilterConfig.JoinTableExternalConnectionColumn,Operator:'INN',ValueTemplate:"{~PJU:,^".concat(tmpFilterConfig.JoinTableExternalConnectionColumn,"^Record.State[Step-1]~}")});if(!tmpFilterConfig.CoreConnectionColumn){this.log.error("".concat(tmpFilterConfig.Type," filter missing CoreConnectionColumn, cannot filter core table [").concat(pFilterState.Entity,"]."));break;}if(!tmpFilterConfig.JoinTableCoreConnectionColumn){this.log.error("".concat(tmpFilterConfig.Type," filter missing JoinTableCoreConnectionColumn, cannot filter core table [").concat(pFilterState.Entity,"]."));break;}tmpFilterResult.JoinConfig={CoreEntity:pFilterState.Entity,Instruction:'FBLOR',Fields:[tmpFilterConfig.CoreConnectionColumn],Operator:'INN',ValueTemplate:"{~PJU:,^".concat(tmpFilterConfig.JoinTableCoreConnectionColumn,"^Record.State[Step0]~}")};}break;case'StringRange':case'DateRange':case'NumericRange':case'Range':if(!tmpFilterConfig.Values||tmpFilterConfig.Values.Start==null&&tmpFilterConfig.Values.End==null){break;}// do not honor '0' for dates
5872
+ */var _iterator16=_createForOfIteratorHelper(tmpFilterConfig.ExternalFilterByColumns||(tmpFilterConfig.ExternalFilterByColumn?[tmpFilterConfig.ExternalFilterByColumn]:['Name'])),_step16;try{for(_iterator16.s();!(_step16=_iterator16.n()).done;){var tmpField=_step16.value;var _iterator17=_createForOfIteratorHelper(tmpValuesArray),_step17;try{for(_iterator17.s();!(_step17=_iterator17.n()).done;){var tmpValue=_step17.value;var tmpFilter={Index:-1,Entity:tmpFilterConfig.ExternalFilterByTable,Instruction:'FBVOR',Field:tmpField};if(tmpFilterConfig.ExactMatch||typeof tmpFilterConfig.ExactMatch==='undefined'&&(tmpFilterConfig.Type=='ExternalJoinNumericMatch'||tmpFilterConfig.Type=='ExternalJoinDateMatch')){tmpFilter.Operator='EQ';tmpFilter.Value=tmpValue;}else{tmpFilter.Operator='LK';tmpFilter.Value="%25".concat(tmpValue,"%25");//FIXME: point of URI encoding needs to be addressed
5873
+ }tmpFilterResult.Filters.push(tmpFilter);}}catch(err){_iterator17.e(err);}finally{_iterator17.f();}}}catch(err){_iterator16.e(err);}finally{_iterator16.f();}if(!tmpFilterConfig.JoinTable){this.log.error("".concat(tmpFilterConfig.Type," filter missing JoinTable, cannot filter join table."),{FilterConfig:tmpFilterConfig});break;}if(!tmpFilterConfig.JoinTableExternalConnectionColumn){this.log.error("".concat(tmpFilterConfig.Type," filter missing JoinTableExternalConnectionColumn, cannot filter join table [").concat(tmpFilterConfig.JoinTable,"]."));break;}if(tmpFilterResult.Filters.length>0){tmpFilterResult.Filters.push({Index:0,Fulcrum:true,Entity:tmpFilterConfig.JoinTable,Instruction:'FBL',Field:tmpFilterConfig.JoinTableExternalConnectionColumn,Operator:'INN',ValueTemplate:"{~PJU:,^".concat(tmpFilterConfig.JoinTableExternalConnectionColumn,"^Record.State[Step-1]~}")});if(!tmpFilterConfig.CoreConnectionColumn){this.log.error("".concat(tmpFilterConfig.Type," filter missing CoreConnectionColumn, cannot filter core table [").concat(pFilterState.Entity,"]."));break;}tmpFilterResult.JoinConfig={CoreEntity:pFilterState.Entity,Instruction:'FBLOR',Fields:[tmpFilterConfig.CoreConnectionColumn],Operator:'INN',ValueTemplate:"{~PJU:,^".concat(tmpFilterConfig.JoinTableCoreConnectionColumn,"^Record.State[Step0]~}")};}break;case'ExternalJoinStringRange':case'ExternalJoinNumericRange':case'ExternalJoinDateRange':case'ExternalJoinRange':if(!tmpFilterConfig.Values||tmpFilterConfig.Values.Start==null&&tmpFilterConfig.Values.End==null){break;}// do not honor '0' for dates
5874
+ if(tmpFilterConfig.Type=='ExternalJoinDateRange'){if((!tmpFilterConfig.Values.Start||tmpFilterConfig.Values.Start=='0')&&(!tmpFilterConfig.Values.End||tmpFilterConfig.Values.End=='0')){break;}}var _iterator18=_createForOfIteratorHelper(tmpFilterConfig.ExternalFilterByColumns||(tmpFilterConfig.ExternalFilterByColumn?[tmpFilterConfig.ExternalFilterByColumn]:['Name'])),_step18;try{for(_iterator18.s();!(_step18=_iterator18.n()).done;){var _tmpField=_step18.value;if(tmpFilterConfig.Values&&tmpFilterConfig.Values.Start&&(tmpFilterConfig.Type!='ExternalJoinDateRange'||tmpFilterConfig.Values.Start!='0')){tmpFilterResult.Filters.push({Index:-1,CoreEntity:true,Entity:pFilterState.Entity,Instruction:'FBV',Field:_tmpField,Operator:tmpFilterConfig.StartExclusive?'GT':'GE',Value:tmpFilterConfig.Values.Start});}if(tmpFilterConfig.Values&&tmpFilterConfig.Values.End&&(tmpFilterConfig.Type!='ExternalJoinDateRange'||tmpFilterConfig.Values.End!='0')){tmpFilterResult.Filters.push({Index:-1,CoreEntity:true,Entity:pFilterState.Entity,Instruction:'FBV',Field:_tmpField,Operator:tmpFilterConfig.EndExclusive?'LT':'LE',Value:tmpFilterConfig.Values.End});}}}catch(err){_iterator18.e(err);}finally{_iterator18.f();}if(!tmpFilterConfig.JoinTable){this.log.error("".concat(tmpFilterConfig.Type," filter missing JoinTable, cannot filter join table."),{FilterConfig:tmpFilterConfig});break;}if(!tmpFilterConfig.JoinTableExternalConnectionColumn){this.log.error("".concat(tmpFilterConfig.Type," filter missing JoinTableExternalConnectionColumn, cannot filter join table [").concat(tmpFilterConfig.JoinTable,"]."));break;}if(tmpFilterResult.Filters.length>0){tmpFilterResult.Filters.push({Index:0,Fulcrum:true,Entity:tmpFilterConfig.JoinTable,Instruction:'FBL',Field:tmpFilterConfig.JoinTableExternalConnectionColumn,Operator:'INN',ValueTemplate:"{~PJU:,^".concat(tmpFilterConfig.JoinTableExternalConnectionColumn,"^Record.State[Step-1]~}")});if(!tmpFilterConfig.CoreConnectionColumn){this.log.error("".concat(tmpFilterConfig.Type," filter missing CoreConnectionColumn, cannot filter core table [").concat(pFilterState.Entity,"]."));break;}if(!tmpFilterConfig.JoinTableCoreConnectionColumn){this.log.error("".concat(tmpFilterConfig.Type," filter missing JoinTableCoreConnectionColumn, cannot filter core table [").concat(pFilterState.Entity,"]."));break;}tmpFilterResult.JoinConfig={CoreEntity:pFilterState.Entity,Instruction:'FBLOR',Fields:[tmpFilterConfig.CoreConnectionColumn],Operator:'INN',ValueTemplate:"{~PJU:,^".concat(tmpFilterConfig.JoinTableCoreConnectionColumn,"^Record.State[Step0]~}")};}break;case'StringRange':case'DateRange':case'NumericRange':case'Range':if(!tmpFilterConfig.Values||tmpFilterConfig.Values.Start==null&&tmpFilterConfig.Values.End==null){break;}// do not honor '0' for dates
5821
5875
  if(tmpFilterConfig.Type=='DateRange'){if((!tmpFilterConfig.Values.Start||tmpFilterConfig.Values.Start=='0')&&(!tmpFilterConfig.Values.End||tmpFilterConfig.Values.End=='0')){break;}}/*
5822
5876
  "Values":
5823
5877
  {
@@ -5825,31 +5879,31 @@ if(tmpFilterConfig.Type=='DateRange'){if((!tmpFilterConfig.Values.Start||tmpFilt
5825
5879
  "End": "2024-01-01T00:00:00Z"
5826
5880
  },
5827
5881
  "FilterByColumn": "CreateDate",
5828
- */var _iterator17=_createForOfIteratorHelper(tmpFilterConfig.FilterByColumns||(tmpFilterConfig.FilterByColumn?[tmpFilterConfig.FilterByColumn]:['Name'])),_step17;try{for(_iterator17.s();!(_step17=_iterator17.n()).done;){var _tmpField2=_step17.value;if(tmpFilterConfig.Values&&tmpFilterConfig.Values.Start&&(tmpFilterConfig.Type!='DateRange'||tmpFilterConfig.Values.Start!='0')){tmpFilterResult.Filters.push({Index:0,CoreEntity:true,Entity:pFilterState.Entity,Instruction:'FBV',Field:_tmpField2,Operator:tmpFilterConfig.StartExclusive?'GT':'GE',Value:tmpFilterConfig.Values.Start});}if(tmpFilterConfig.Values&&tmpFilterConfig.Values.End&&(tmpFilterConfig.Type!='DateRange'||tmpFilterConfig.Values.End!='0')){tmpFilterResult.Filters.push({Index:0,CoreEntity:true,Entity:pFilterState.Entity,Instruction:'FBV',Field:_tmpField2,Operator:tmpFilterConfig.EndExclusive?'LT':'LE',Value:tmpFilterConfig.Values.End});}}}catch(err){_iterator17.e(err);}finally{_iterator17.f();}break;case'StringMatch':case'DateMatch':case'NumericMatch':case'Match':/*
5882
+ */var _iterator19=_createForOfIteratorHelper(tmpFilterConfig.FilterByColumns||(tmpFilterConfig.FilterByColumn?[tmpFilterConfig.FilterByColumn]:['Name'])),_step19;try{for(_iterator19.s();!(_step19=_iterator19.n()).done;){var _tmpField2=_step19.value;if(tmpFilterConfig.Values&&tmpFilterConfig.Values.Start&&(tmpFilterConfig.Type!='DateRange'||tmpFilterConfig.Values.Start!='0')){tmpFilterResult.Filters.push({Index:0,CoreEntity:true,Entity:pFilterState.Entity,Instruction:'FBV',Field:_tmpField2,Operator:tmpFilterConfig.StartExclusive?'GT':'GE',Value:tmpFilterConfig.Values.Start});}if(tmpFilterConfig.Values&&tmpFilterConfig.Values.End&&(tmpFilterConfig.Type!='DateRange'||tmpFilterConfig.Values.End!='0')){tmpFilterResult.Filters.push({Index:0,CoreEntity:true,Entity:pFilterState.Entity,Instruction:'FBV',Field:_tmpField2,Operator:tmpFilterConfig.EndExclusive?'LT':'LE',Value:tmpFilterConfig.Values.End});}}}catch(err){_iterator19.e(err);}finally{_iterator19.f();}break;case'StringMatch':case'DateMatch':case'NumericMatch':case'Match':/*
5829
5883
  "Values": [ "John", "Jane" ],
5830
5884
  "FilterByColumn": "Name",
5831
5885
  "ExactMatch": false,
5832
- */var _iterator18=_createForOfIteratorHelper(tmpFilterConfig.FilterByColumns||(tmpFilterConfig.FilterByColumn?[tmpFilterConfig.FilterByColumn]:['Name'])),_step18;try{for(_iterator18.s();!(_step18=_iterator18.n()).done;){var _tmpField3=_step18.value;var _iterator19=_createForOfIteratorHelper(tmpValuesArray),_step19;try{for(_iterator19.s();!(_step19=_iterator19.n()).done;){var _tmpValue5=_step19.value;var _tmpFilter={Index:0,CoreEntity:true,Entity:pFilterState.Entity,Instruction:'FBVOR',Field:_tmpField3};// don't use like for numbers
5886
+ */var _iterator20=_createForOfIteratorHelper(tmpFilterConfig.FilterByColumns||(tmpFilterConfig.FilterByColumn?[tmpFilterConfig.FilterByColumn]:['Name'])),_step20;try{for(_iterator20.s();!(_step20=_iterator20.n()).done;){var _tmpField3=_step20.value;var _iterator21=_createForOfIteratorHelper(tmpValuesArray),_step21;try{for(_iterator21.s();!(_step21=_iterator21.n()).done;){var _tmpValue5=_step21.value;var _tmpFilter={Index:0,CoreEntity:true,Entity:pFilterState.Entity,Instruction:'FBVOR',Field:_tmpField3};// don't use like for numbers
5833
5887
  if(tmpFilterConfig.ExactMatch||typeof tmpFilterConfig.ExactMatch==='undefined'&&(tmpFilterConfig.Type=='NumericMatch'||tmpFilterConfig.Type=='DateMatch')){_tmpFilter.Operator='EQ';_tmpFilter.Value=_tmpValue5;}else{_tmpFilter.Operator='LK';_tmpFilter.Value="%25".concat(_tmpValue5,"%25");//FIXME: figure out a cleaner way to do URL encoding for these - probably, should be downstream, but isn't currently
5834
- }tmpFilterResult.Filters.push(_tmpFilter);}}catch(err){_iterator19.e(err);}finally{_iterator19.f();}}}catch(err){_iterator18.e(err);}finally{_iterator18.f();}break;case'InternalJoinStringRange':case'InternalJoinNumericRange':case'InternalJoinDateRange':case'InternalJoinRange':if(!tmpFilterConfig.Values||tmpFilterConfig.Values.Start==null&&tmpFilterConfig.Values.End==null){break;}// do not honor '0' for dates
5835
- if(tmpFilterConfig.Type=='InternalJoinDateRange'){if((!tmpFilterConfig.Values.Start||tmpFilterConfig.Values.Start=='0')&&(!tmpFilterConfig.Values.End||tmpFilterConfig.Values.End=='0')){break;}}var _iterator20=_createForOfIteratorHelper(tmpFilterConfig.ExternalFilterByColumns||(tmpFilterConfig.ExternalFilterByColumn?[tmpFilterConfig.ExternalFilterByColumn]:['Name'])),_step20;try{for(_iterator20.s();!(_step20=_iterator20.n()).done;){var _tmpField4=_step20.value;if(tmpFilterConfig.Values&&tmpFilterConfig.Values.Start&&(tmpFilterConfig.Type!='InternalJoinDateRange'||tmpFilterConfig.Values.Start!='0')){tmpFilterResult.Filters.push({Index:0,Entity:tmpFilterConfig.RemoteTable,Instruction:'FBV',Field:_tmpField4,Operator:tmpFilterConfig.StartExclusive?'GT':'GE',Value:tmpFilterConfig.Values.Start});}if(tmpFilterConfig.Values&&tmpFilterConfig.Values.End&&(tmpFilterConfig.Type!='InternalJoinDateRange'||tmpFilterConfig.Values.End!='0')){tmpFilterResult.Filters.push({Index:0,Entity:tmpFilterConfig.RemoteTable,Instruction:'FBV',Field:_tmpField4,Operator:tmpFilterConfig.EndExclusive?'LT':'LE',Value:tmpFilterConfig.Values.End});}}}catch(err){_iterator20.e(err);}finally{_iterator20.f();}if(tmpFilterResult.Filters.length>0){if(!tmpFilterConfig.JoinInternalConnectionColumn){this.log.error("".concat(tmpFilterConfig.Type," filter missing JoinInternalConnectionColumn, cannot filter core table [").concat(pFilterState.Entity,"]."));break;}tmpFilterResult.JoinConfig={Instruction:'FBLOR',CoreEntity:pFilterState.Entity,Fields:[tmpFilterConfig.JoinInternalConnectionColumn],Operator:'INN',ValueTemplate:"{~PJU:,^".concat(tmpFilterConfig.JoinExternalConnectionColumn,"^Record.State[Step0]~}")};}break;case'InternalJoinMatch':case'InternalJoinStringMatch':case'InternalJoinDateMatch':case'InternalJoinNumericMatch':/*
5888
+ }tmpFilterResult.Filters.push(_tmpFilter);}}catch(err){_iterator21.e(err);}finally{_iterator21.f();}}}catch(err){_iterator20.e(err);}finally{_iterator20.f();}break;case'InternalJoinStringRange':case'InternalJoinNumericRange':case'InternalJoinDateRange':case'InternalJoinRange':if(!tmpFilterConfig.Values||tmpFilterConfig.Values.Start==null&&tmpFilterConfig.Values.End==null){break;}// do not honor '0' for dates
5889
+ if(tmpFilterConfig.Type=='InternalJoinDateRange'){if((!tmpFilterConfig.Values.Start||tmpFilterConfig.Values.Start=='0')&&(!tmpFilterConfig.Values.End||tmpFilterConfig.Values.End=='0')){break;}}var _iterator22=_createForOfIteratorHelper(tmpFilterConfig.ExternalFilterByColumns||(tmpFilterConfig.ExternalFilterByColumn?[tmpFilterConfig.ExternalFilterByColumn]:['Name'])),_step22;try{for(_iterator22.s();!(_step22=_iterator22.n()).done;){var _tmpField4=_step22.value;if(tmpFilterConfig.Values&&tmpFilterConfig.Values.Start&&(tmpFilterConfig.Type!='InternalJoinDateRange'||tmpFilterConfig.Values.Start!='0')){tmpFilterResult.Filters.push({Index:0,Entity:tmpFilterConfig.RemoteTable,Instruction:'FBV',Field:_tmpField4,Operator:tmpFilterConfig.StartExclusive?'GT':'GE',Value:tmpFilterConfig.Values.Start});}if(tmpFilterConfig.Values&&tmpFilterConfig.Values.End&&(tmpFilterConfig.Type!='InternalJoinDateRange'||tmpFilterConfig.Values.End!='0')){tmpFilterResult.Filters.push({Index:0,Entity:tmpFilterConfig.RemoteTable,Instruction:'FBV',Field:_tmpField4,Operator:tmpFilterConfig.EndExclusive?'LT':'LE',Value:tmpFilterConfig.Values.End});}}}catch(err){_iterator22.e(err);}finally{_iterator22.f();}if(tmpFilterResult.Filters.length>0){if(!tmpFilterConfig.JoinInternalConnectionColumn){this.log.error("".concat(tmpFilterConfig.Type," filter missing JoinInternalConnectionColumn, cannot filter core table [").concat(pFilterState.Entity,"]."));break;}tmpFilterResult.JoinConfig={Instruction:'FBLOR',CoreEntity:pFilterState.Entity,Fields:[tmpFilterConfig.JoinInternalConnectionColumn],Operator:'INN',ValueTemplate:"{~PJU:,^".concat(tmpFilterConfig.JoinExternalConnectionColumn,"^Record.State[Step0]~}")};}break;case'InternalJoinMatch':case'InternalJoinStringMatch':case'InternalJoinDateMatch':case'InternalJoinNumericMatch':/*
5836
5890
  "Values": [ "Bob" ],
5837
5891
  "RemoteTable": "User",
5838
5892
  "ExternalFilterByColumns": [ "NameFirst", "NameLast" ],
5839
5893
  "JoinExternalConnectionColumn": "IDUser",
5840
5894
  "JoinInternalConnectionColumn": "CreatingIDUser",
5841
- */var _iterator21=_createForOfIteratorHelper(tmpFilterConfig.ExternalFilterByColumns||(tmpFilterConfig.ExternalFilterByColumn?[tmpFilterConfig.ExternalFilterByColumn]:['Name'])),_step21;try{for(_iterator21.s();!(_step21=_iterator21.n()).done;){var _tmpField5=_step21.value;var _iterator22=_createForOfIteratorHelper(tmpValuesArray),_step22;try{for(_iterator22.s();!(_step22=_iterator22.n()).done;){var _tmpValue6=_step22.value;var _tmpFilter2={Index:0,Entity:tmpFilterConfig.RemoteTable,Instruction:'FBV',Field:_tmpField5};if(tmpFilterConfig.ExactMatch||typeof tmpFilterConfig.ExactMatch==='undefined'&&(tmpFilterConfig.Type=='InternalJoinNumericMatch'||tmpFilterConfig.Type=='InternalJoinDateMatch')){_tmpFilter2.Operator='EQ';_tmpFilter2.Value=_tmpValue6;}else{_tmpFilter2.Operator='LK';_tmpFilter2.Value="%25".concat(_tmpValue6,"%25");}tmpFilterResult.Filters.push(_tmpFilter2);}}catch(err){_iterator22.e(err);}finally{_iterator22.f();}}}catch(err){_iterator21.e(err);}finally{_iterator21.f();}if(tmpFilterResult.Filters.length>0){if(!tmpFilterConfig.JoinInternalConnectionColumn){this.log.error("".concat(tmpFilterConfig.Type," filter missing JoinInternalConnectionColumn, cannot filter core table [").concat(pFilterState.Entity,"]."));break;}tmpFilterResult.JoinConfig={Instruction:'FBLOR',CoreEntity:pFilterState.Entity,Fields:[tmpFilterConfig.JoinInternalConnectionColumn],Operator:'INN',ValueTemplate:"{~PJU:,^".concat(tmpFilterConfig.JoinExternalConnectionColumn,"^Record.State[Step0]~}")};}break;case'RawFilter':if(!tmpFilterConfig.Value){this.log.warn("RawFilter configuration missing Value, not adding filter.",{FilterConfig:tmpFilterConfig});break;}pFilterState.UserFilters.push(tmpFilterConfig.Value);break;default:this.log.warn("Unknown filter type ".concat(tmpFilterConfig.Type," in filter configuration."),{FilterConfig:tmpFilterConfig});}if(tmpFilterResult.Filters.length>0){tmpResult.push(tmpFilterResult);}}}catch(err){_iterator13.e(err);}finally{_iterator13.f();}pFilterState.PreparedFilters=tmpResult;}/**
5895
+ */var _iterator23=_createForOfIteratorHelper(tmpFilterConfig.ExternalFilterByColumns||(tmpFilterConfig.ExternalFilterByColumn?[tmpFilterConfig.ExternalFilterByColumn]:['Name'])),_step23;try{for(_iterator23.s();!(_step23=_iterator23.n()).done;){var _tmpField5=_step23.value;var _iterator24=_createForOfIteratorHelper(tmpValuesArray),_step24;try{for(_iterator24.s();!(_step24=_iterator24.n()).done;){var _tmpValue6=_step24.value;var _tmpFilter2={Index:0,Entity:tmpFilterConfig.RemoteTable,Instruction:'FBV',Field:_tmpField5};if(tmpFilterConfig.ExactMatch||typeof tmpFilterConfig.ExactMatch==='undefined'&&(tmpFilterConfig.Type=='InternalJoinNumericMatch'||tmpFilterConfig.Type=='InternalJoinDateMatch')){_tmpFilter2.Operator='EQ';_tmpFilter2.Value=_tmpValue6;}else{_tmpFilter2.Operator='LK';_tmpFilter2.Value="%25".concat(_tmpValue6,"%25");}tmpFilterResult.Filters.push(_tmpFilter2);}}catch(err){_iterator24.e(err);}finally{_iterator24.f();}}}catch(err){_iterator23.e(err);}finally{_iterator23.f();}if(tmpFilterResult.Filters.length>0){if(!tmpFilterConfig.JoinInternalConnectionColumn){this.log.error("".concat(tmpFilterConfig.Type," filter missing JoinInternalConnectionColumn, cannot filter core table [").concat(pFilterState.Entity,"]."));break;}tmpFilterResult.JoinConfig={Instruction:'FBLOR',CoreEntity:pFilterState.Entity,Fields:[tmpFilterConfig.JoinInternalConnectionColumn],Operator:'INN',ValueTemplate:"{~PJU:,^".concat(tmpFilterConfig.JoinExternalConnectionColumn,"^Record.State[Step0]~}")};}break;case'RawFilter':if(!tmpFilterConfig.Value){this.log.warn("RawFilter configuration missing Value, not adding filter.",{FilterConfig:tmpFilterConfig});break;}pFilterState.UserFilters.push(tmpFilterConfig.Value);break;default:this.log.warn("Unknown filter type ".concat(tmpFilterConfig.Type," in filter configuration."),{FilterConfig:tmpFilterConfig});}if(tmpFilterResult.Filters.length>0){tmpResult.push(tmpFilterResult);}}}catch(err){_iterator15.e(err);}finally{_iterator15.f();}pFilterState.PreparedFilters=tmpResult;}/**
5842
5896
  * @param {FilterState} pFilterState
5843
- */},{key:"linkPreparedFilters",value:function linkPreparedFilters(pFilterState){var tmpGroupedStanzas=[];var _iterator23=_createForOfIteratorHelper(pFilterState.PreparedFilters||[]),_step23;try{for(_iterator23.s();!(_step23=_iterator23.n()).done;){var tmpPreparedFilter=_step23.value;if(tmpPreparedFilter.JoinConfig){var tmpSubGroup=tmpPreparedFilter.Filters;var tmpJoinConfig=tmpPreparedFilter.JoinConfig;var _iterator24=_createForOfIteratorHelper(tmpJoinConfig.Fields||[]),_step24;try{for(_iterator24.s();!(_step24=_iterator24.n()).done;){var tmpField=_step24.value;var tmpStanza={Index:1,CoreEntity:true,Entity:tmpPreparedFilter.JoinConfig.CoreEntity,Instruction:tmpPreparedFilter.JoinConfig.Instruction||'FBVOR',Field:tmpField,Operator:tmpJoinConfig.Operator,Value:tmpJoinConfig.Value,ValueTemplate:tmpJoinConfig.ValueTemplate};tmpSubGroup.push(tmpStanza);}}catch(err){_iterator24.e(err);}finally{_iterator24.f();}tmpGroupedStanzas.push(tmpSubGroup);}else{tmpGroupedStanzas.push(tmpPreparedFilter.Filters);}}}catch(err){_iterator23.e(err);}finally{_iterator23.f();}return tmpGroupedStanzas;}/**
5897
+ */},{key:"linkPreparedFilters",value:function linkPreparedFilters(pFilterState){var tmpGroupedStanzas=[];var _iterator25=_createForOfIteratorHelper(pFilterState.PreparedFilters||[]),_step25;try{for(_iterator25.s();!(_step25=_iterator25.n()).done;){var tmpPreparedFilter=_step25.value;if(tmpPreparedFilter.JoinConfig){var tmpSubGroup=tmpPreparedFilter.Filters;var tmpJoinConfig=tmpPreparedFilter.JoinConfig;var _iterator26=_createForOfIteratorHelper(tmpJoinConfig.Fields||[]),_step26;try{for(_iterator26.s();!(_step26=_iterator26.n()).done;){var tmpField=_step26.value;var tmpStanza={Index:1,CoreEntity:true,Entity:tmpPreparedFilter.JoinConfig.CoreEntity,Instruction:tmpPreparedFilter.JoinConfig.Instruction||'FBVOR',Field:tmpField,Operator:tmpJoinConfig.Operator,Value:tmpJoinConfig.Value,ValueTemplate:tmpJoinConfig.ValueTemplate};tmpSubGroup.push(tmpStanza);}}catch(err){_iterator26.e(err);}finally{_iterator26.f();}tmpGroupedStanzas.push(tmpSubGroup);}else{tmpGroupedStanzas.push(tmpPreparedFilter.Filters);}}}catch(err){_iterator25.e(err);}finally{_iterator25.f();}return tmpGroupedStanzas;}/**
5844
5898
  * Generate a computed index for each filter in the meadow filter stanzas such that the overall address space is non-overlapping and stable.
5845
5899
  *
5846
5900
  * @param {FilterState} pFilterState
5847
- */},{key:"normalizeMeadowFilterStanzas",value:function normalizeMeadowFilterStanzas(pFilterState){var tmpTotalIndexCount=0;var _iterator25=_createForOfIteratorHelper(pFilterState.PreparedFilters),_step25;try{for(_iterator25.s();!(_step25=_iterator25.n()).done;){var tmpFilterGroup=_step25.value;var tmpLocalIndices=new Set();tmpFilterGroup.Filters.sort(function(a,b){return a.Index-b.Index;});var _iterator27=_createForOfIteratorHelper(tmpFilterGroup.Filters),_step27;try{for(_iterator27.s();!(_step27=_iterator27.n()).done;){var tmpFilter=_step27.value;if(!tmpFilter.CoreEntity){tmpLocalIndices.add(tmpFilter.Index);}}}catch(err){_iterator27.e(err);}finally{_iterator27.f();}tmpTotalIndexCount+=tmpLocalIndices.size;}}catch(err){_iterator25.e(err);}finally{_iterator25.f();}var tmpComputedIndex=-tmpTotalIndexCount-1;var _iterator26=_createForOfIteratorHelper(pFilterState.PreparedFilters),_step26;try{var _loop4=function _loop4(){var tmpFilterGroup=_step26.value;var tmpCurrentIndex=null;var _iterator28=_createForOfIteratorHelper(tmpFilterGroup.Filters),_step28;try{for(_iterator28.s();!(_step28=_iterator28.n()).done;){var _tmpFilter3=_step28.value;if(_tmpFilter3.Index!==tmpCurrentIndex){++tmpComputedIndex;tmpCurrentIndex=_tmpFilter3.Index;}_tmpFilter3.ComputedIndex=tmpComputedIndex;}}catch(err){_iterator28.e(err);}finally{_iterator28.f();}var _iterator29=_createForOfIteratorHelper(tmpFilterGroup.Filters),_step29;try{for(_iterator29.s();!(_step29=_iterator29.n()).done;){var _tmpFilter4=_step29.value;if(_tmpFilter4.ValueTemplate){_tmpFilter4.ValueTemplate=_tmpFilter4.ValueTemplate.replace(/\[([^\]]+)\]/g,function(match){var _tmpFilterGroup$Filte;var tmpLocalIndex=match.substring(5,match.length-1);var tmpGlobalIndex=(_tmpFilterGroup$Filte=tmpFilterGroup.Filters.find(function(f){return f.Index==tmpLocalIndex;}))===null||_tmpFilterGroup$Filte===void 0?void 0:_tmpFilterGroup$Filte.ComputedIndex;if(tmpGlobalIndex==null){throw new Error("Filter index ".concat(tmpLocalIndex," not found in group filters."));}return match.replace(tmpLocalIndex,tmpGlobalIndex);});}}}catch(err){_iterator29.e(err);}finally{_iterator29.f();}};for(_iterator26.s();!(_step26=_iterator26.n()).done;){_loop4();}}catch(err){_iterator26.e(err);}finally{_iterator26.f();}}/**
5901
+ */},{key:"normalizeMeadowFilterStanzas",value:function normalizeMeadowFilterStanzas(pFilterState){var tmpTotalIndexCount=0;var _iterator27=_createForOfIteratorHelper(pFilterState.PreparedFilters),_step27;try{for(_iterator27.s();!(_step27=_iterator27.n()).done;){var tmpFilterGroup=_step27.value;var tmpLocalIndices=new Set();tmpFilterGroup.Filters.sort(function(a,b){return a.Index-b.Index;});var _iterator29=_createForOfIteratorHelper(tmpFilterGroup.Filters),_step29;try{for(_iterator29.s();!(_step29=_iterator29.n()).done;){var tmpFilter=_step29.value;if(!tmpFilter.CoreEntity){tmpLocalIndices.add(tmpFilter.Index);}}}catch(err){_iterator29.e(err);}finally{_iterator29.f();}tmpTotalIndexCount+=tmpLocalIndices.size;}}catch(err){_iterator27.e(err);}finally{_iterator27.f();}var tmpComputedIndex=-tmpTotalIndexCount-1;var _iterator28=_createForOfIteratorHelper(pFilterState.PreparedFilters),_step28;try{var _loop5=function _loop5(){var tmpFilterGroup=_step28.value;var tmpCurrentIndex=null;var _iterator30=_createForOfIteratorHelper(tmpFilterGroup.Filters),_step30;try{for(_iterator30.s();!(_step30=_iterator30.n()).done;){var _tmpFilter3=_step30.value;if(_tmpFilter3.Index!==tmpCurrentIndex){++tmpComputedIndex;tmpCurrentIndex=_tmpFilter3.Index;}_tmpFilter3.ComputedIndex=tmpComputedIndex;}}catch(err){_iterator30.e(err);}finally{_iterator30.f();}var _iterator31=_createForOfIteratorHelper(tmpFilterGroup.Filters),_step31;try{for(_iterator31.s();!(_step31=_iterator31.n()).done;){var _tmpFilter4=_step31.value;if(_tmpFilter4.ValueTemplate){_tmpFilter4.ValueTemplate=_tmpFilter4.ValueTemplate.replace(/\[([^\]]+)\]/g,function(match){var _tmpFilterGroup$Filte;var tmpLocalIndex=match.substring(5,match.length-1);var tmpGlobalIndex=(_tmpFilterGroup$Filte=tmpFilterGroup.Filters.find(function(f){return f.Index==tmpLocalIndex;}))===null||_tmpFilterGroup$Filte===void 0?void 0:_tmpFilterGroup$Filte.ComputedIndex;if(tmpGlobalIndex==null){throw new Error("Filter index ".concat(tmpLocalIndex," not found in group filters."));}return match.replace(tmpLocalIndex,tmpGlobalIndex);});}}}catch(err){_iterator31.e(err);}finally{_iterator31.f();}};for(_iterator28.s();!(_step28=_iterator28.n()).done;){_loop5();}}catch(err){_iterator28.e(err);}finally{_iterator28.f();}}/**
5848
5902
  * @param {FilterState} pFilterState
5849
- */},{key:"compileMeadowFilterStanzas",value:function compileMeadowFilterStanzas(pFilterState){var _this86=this;var tmpBundleConfig=[];//TODO: mathematically solve the number line
5903
+ */},{key:"compileMeadowFilterStanzas",value:function compileMeadowFilterStanzas(pFilterState){var _this87=this;var tmpBundleConfig=[];//TODO: mathematically solve the number line
5850
5904
  // planned synthesized syntax for running on the server
5851
5905
  // FBV-3_Author~Name~LK~%25Ann%25~FBL-2_BookAuthorJoin~IDAuthor~INN~{~PJU:,^State[Step-3]^IDAuthor~}~FBV-1~User~NameFirst~LK~%25Bob%25~FBVOR-1~User~NameLast~LK~%25Bob%25~FBV~CreateDate~GT~2023-01-01T00:00:00Z~FBV~CreateDate~LT~2024-01-01T00:00:00Z~FBL~IDBook~INN~{~PJU:,^State[Step-2]^IDBook~}
5852
- if(!pFilterState.Filter){pFilterState.Filter="".concat(pFilterState.Entity||'Unknown',"-").concat(this.pict.getUUID());}tmpBundleConfig.push({Type:'SetStateAddress',StateAddress:"Bundle[".concat(pFilterState.Filter,"]")});var tmpGroupedFilters={};var tmpGroupedFilterKeys=[];var tmpGroupedCoreFilters=[];var tmpGroupedCoreFilterKeys=[];var tmpCoreEntity;var tmpCoreFilterStrings=[];var _iterator30=_createForOfIteratorHelper(pFilterState.PreparedFilters),_step30;try{for(_iterator30.s();!(_step30=_iterator30.n()).done;){var tmpFilterGroup=_step30.value;var _iterator32=_createForOfIteratorHelper(tmpFilterGroup.Filters),_step32;try{var _loop5=function _loop5(){var tmpFilter=_step32.value;if(tmpFilter.CoreEntity){tmpCoreEntity=tmpFilter.Entity;var tmpFilterGUID="".concat(tmpFilterGroup.GUID,"-").concat(tmpFilter.ComputedIndex);if(!tmpGroupedCoreFilterKeys.find(function(v){return v==tmpFilterGUID;})){tmpGroupedCoreFilterKeys.push(tmpFilterGUID);}if(!tmpGroupedCoreFilters[tmpFilterGUID]){tmpGroupedCoreFilters[tmpFilterGUID]={Stanzas:[],ComputedIndex:tmpFilter.ComputedIndex,Entity:tmpFilter.Entity};}tmpGroupedCoreFilters[tmpFilterGUID].Stanzas.push(_this86._compileSimpleFilterToString(tmpFilter));}else{var tmpFilterGroupGUID="".concat(tmpFilterGroup.GUID,"-").concat(tmpFilter.ComputedIndex);if(!tmpGroupedFilterKeys.find(function(v){return v==tmpFilterGroupGUID;})){tmpGroupedFilterKeys.push(tmpFilterGroupGUID);}if(!tmpGroupedFilters[tmpFilterGroupGUID]){tmpGroupedFilters[tmpFilterGroupGUID]={Stanzas:[],ComputedIndex:tmpFilter.ComputedIndex,Entity:tmpFilter.Entity};}tmpGroupedFilters[tmpFilterGroupGUID].Stanzas.push(_this86._compileSimpleFilterToString(tmpFilter));}};for(_iterator32.s();!(_step32=_iterator32.n()).done;){_loop5();}}catch(err){_iterator32.e(err);}finally{_iterator32.f();}var _iterator33=_createForOfIteratorHelper(tmpGroupedFilterKeys),_step33;try{for(_iterator33.s();!(_step33=_iterator33.n()).done;){var tmpFilterGroupKey=_step33.value;tmpGroupedFilters[tmpFilterGroupKey].Stanzas=tmpGroupedFilters[tmpFilterGroupKey].Stanzas.filter(function(f){return f.length>0;});if(tmpGroupedFilters[tmpFilterGroupKey].Stanzas.length>0){tmpBundleConfig.push({Type:'MeadowEntity',AllRecords:true,Entity:tmpGroupedFilters[tmpFilterGroupKey].Entity,Filter:tmpGroupedFilters[tmpFilterGroupKey].Stanzas.join('~'),Destination:"State[Step".concat(tmpGroupedFilters[tmpFilterGroupKey].ComputedIndex,"]")});}}}catch(err){_iterator33.e(err);}finally{_iterator33.f();}}}catch(err){_iterator30.e(err);}finally{_iterator30.f();}for(var _i68=0,_tmpGroupedCoreFilter=tmpGroupedCoreFilterKeys;_i68<_tmpGroupedCoreFilter.length;_i68++){var tmpCoreFilterKey=_tmpGroupedCoreFilter[_i68];tmpGroupedCoreFilters[tmpCoreFilterKey].Stanzas=tmpGroupedCoreFilters[tmpCoreFilterKey].Stanzas.filter(function(f){return f.length>0;});if(tmpGroupedCoreFilters[tmpCoreFilterKey].Stanzas.length>0){tmpCoreFilterStrings.push(['FOP~0~(~0'].concat(_toConsumableArray(tmpGroupedCoreFilters[tmpCoreFilterKey].Stanzas),['FCP~0~)~0']).join('~'));}}if(!tmpCoreEntity){tmpCoreEntity=pFilterState.Entity;}var tmpCoreLoadStep={Type:pFilterState.Mode==='Count'?'MeadowEntityCount':'MeadowEntity',Entity:tmpCoreEntity,Filter:tmpCoreFilterStrings.join('~'),AllRecords:typeof pFilterState.PageSize==='undefined',RecordStartCursor:pFilterState.RecordOffset,PageSize:pFilterState.PageSize,Destination:pFilterState.ResultDestinationAddress};if(pFilterState.UserFilters.length>0){var tmpAllSorts='';var tmpFilter='';var _iterator31=_createForOfIteratorHelper(pFilterState.UserFilters),_step31;try{for(_iterator31.s();!(_step31=_iterator31.n()).done;){var tmpUserFilter=_step31.value;var tmpSorts=void 0;var tmpSanitizedUserFilter=tmpUserFilter;if(pFilterState.Mode==='Count'){tmpSanitizedUserFilter=this._sanitizeFilterForCount(tmpUserFilter);}else{var _this$_extractSortsFr=this._extractSortsFromFilter(tmpUserFilter);var _this$_extractSortsFr2=_slicedToArray(_this$_extractSortsFr,2);tmpSanitizedUserFilter=_this$_extractSortsFr2[0];tmpSorts=_this$_extractSortsFr2[1];if(tmpSorts){if(tmpAllSorts.length>0){tmpAllSorts+='~';}tmpAllSorts+=tmpSorts;}if(!tmpSanitizedUserFilter){continue;}}if(!tmpSanitizedUserFilter){continue;}if(tmpFilter.length>0){tmpFilter+='~';}tmpFilter+='FOP~0~(~0~';tmpFilter+=tmpSanitizedUserFilter;tmpFilter+='~FCP~0~)~0';}}catch(err){_iterator31.e(err);}finally{_iterator31.f();}if(tmpCoreLoadStep.Filter){if(tmpFilter.length>0){tmpFilter+='~';}tmpFilter+='FOP~0~(~0~';tmpFilter+=tmpCoreLoadStep.Filter;tmpFilter+='~FCP~0~)~0';}if(tmpAllSorts){if(tmpFilter.length>0){tmpFilter+='~';}tmpFilter+=tmpAllSorts;}tmpCoreLoadStep.Filter=tmpFilter;}tmpBundleConfig.push(tmpCoreLoadStep);pFilterState.BundleConfig=tmpBundleConfig;}/**
5906
+ if(!pFilterState.Filter){pFilterState.Filter="".concat(pFilterState.Entity||'Unknown',"-").concat(this.pict.getUUID());}tmpBundleConfig.push({Type:'SetStateAddress',StateAddress:"Bundle[".concat(pFilterState.Filter,"]")});var tmpGroupedFilters={};var tmpGroupedFilterKeys=[];var tmpGroupedCoreFilters=[];var tmpGroupedCoreFilterKeys=[];var tmpCoreEntity;var tmpCoreFilterStrings=[];var _iterator32=_createForOfIteratorHelper(pFilterState.PreparedFilters),_step32;try{for(_iterator32.s();!(_step32=_iterator32.n()).done;){var tmpFilterGroup=_step32.value;var _iterator34=_createForOfIteratorHelper(tmpFilterGroup.Filters),_step34;try{var _loop6=function _loop6(){var tmpFilter=_step34.value;if(tmpFilter.CoreEntity){tmpCoreEntity=tmpFilter.Entity;var tmpFilterGUID="".concat(tmpFilterGroup.GUID,"-").concat(tmpFilter.ComputedIndex);if(!tmpGroupedCoreFilterKeys.find(function(v){return v==tmpFilterGUID;})){tmpGroupedCoreFilterKeys.push(tmpFilterGUID);}if(!tmpGroupedCoreFilters[tmpFilterGUID]){tmpGroupedCoreFilters[tmpFilterGUID]={Stanzas:[],ComputedIndex:tmpFilter.ComputedIndex,Entity:tmpFilter.Entity};}tmpGroupedCoreFilters[tmpFilterGUID].Stanzas.push(_this87._compileSimpleFilterToString(tmpFilter));}else{var tmpFilterGroupGUID="".concat(tmpFilterGroup.GUID,"-").concat(tmpFilter.ComputedIndex);if(!tmpGroupedFilterKeys.find(function(v){return v==tmpFilterGroupGUID;})){tmpGroupedFilterKeys.push(tmpFilterGroupGUID);}if(!tmpGroupedFilters[tmpFilterGroupGUID]){tmpGroupedFilters[tmpFilterGroupGUID]={Stanzas:[],ComputedIndex:tmpFilter.ComputedIndex,Entity:tmpFilter.Entity};}tmpGroupedFilters[tmpFilterGroupGUID].Stanzas.push(_this87._compileSimpleFilterToString(tmpFilter));}};for(_iterator34.s();!(_step34=_iterator34.n()).done;){_loop6();}}catch(err){_iterator34.e(err);}finally{_iterator34.f();}var _iterator35=_createForOfIteratorHelper(tmpGroupedFilterKeys),_step35;try{for(_iterator35.s();!(_step35=_iterator35.n()).done;){var tmpFilterGroupKey=_step35.value;tmpGroupedFilters[tmpFilterGroupKey].Stanzas=tmpGroupedFilters[tmpFilterGroupKey].Stanzas.filter(function(f){return f.length>0;});if(tmpGroupedFilters[tmpFilterGroupKey].Stanzas.length>0){tmpBundleConfig.push({Type:'MeadowEntity',AllRecords:true,Entity:tmpGroupedFilters[tmpFilterGroupKey].Entity,Filter:tmpGroupedFilters[tmpFilterGroupKey].Stanzas.join('~'),Destination:"State[Step".concat(tmpGroupedFilters[tmpFilterGroupKey].ComputedIndex,"]")});}}}catch(err){_iterator35.e(err);}finally{_iterator35.f();}}}catch(err){_iterator32.e(err);}finally{_iterator32.f();}for(var _i68=0,_tmpGroupedCoreFilter=tmpGroupedCoreFilterKeys;_i68<_tmpGroupedCoreFilter.length;_i68++){var tmpCoreFilterKey=_tmpGroupedCoreFilter[_i68];tmpGroupedCoreFilters[tmpCoreFilterKey].Stanzas=tmpGroupedCoreFilters[tmpCoreFilterKey].Stanzas.filter(function(f){return f.length>0;});if(tmpGroupedCoreFilters[tmpCoreFilterKey].Stanzas.length>0){tmpCoreFilterStrings.push(['FOP~0~(~0'].concat(_toConsumableArray(tmpGroupedCoreFilters[tmpCoreFilterKey].Stanzas),['FCP~0~)~0']).join('~'));}}if(!tmpCoreEntity){tmpCoreEntity=pFilterState.Entity;}var tmpCoreLoadStep={Type:pFilterState.Mode==='Count'?'MeadowEntityCount':'MeadowEntity',Entity:tmpCoreEntity,Filter:tmpCoreFilterStrings.join('~'),AllRecords:typeof pFilterState.PageSize==='undefined',RecordStartCursor:pFilterState.RecordOffset,PageSize:pFilterState.PageSize,Destination:pFilterState.ResultDestinationAddress};if(pFilterState.UserFilters.length>0){var tmpAllSorts='';var tmpFilter='';var _iterator33=_createForOfIteratorHelper(pFilterState.UserFilters),_step33;try{for(_iterator33.s();!(_step33=_iterator33.n()).done;){var tmpUserFilter=_step33.value;var tmpSorts=void 0;var tmpSanitizedUserFilter=tmpUserFilter;if(pFilterState.Mode==='Count'){tmpSanitizedUserFilter=this._sanitizeFilterForCount(tmpUserFilter);}else{var _this$_extractSortsFr=this._extractSortsFromFilter(tmpUserFilter);var _this$_extractSortsFr2=_slicedToArray(_this$_extractSortsFr,2);tmpSanitizedUserFilter=_this$_extractSortsFr2[0];tmpSorts=_this$_extractSortsFr2[1];if(tmpSorts){if(tmpAllSorts.length>0){tmpAllSorts+='~';}tmpAllSorts+=tmpSorts;}if(!tmpSanitizedUserFilter){continue;}}if(!tmpSanitizedUserFilter){continue;}if(tmpFilter.length>0){tmpFilter+='~';}tmpFilter+='FOP~0~(~0~';tmpFilter+=tmpSanitizedUserFilter;tmpFilter+='~FCP~0~)~0';}}catch(err){_iterator33.e(err);}finally{_iterator33.f();}if(tmpCoreLoadStep.Filter){if(tmpFilter.length>0){tmpFilter+='~';}tmpFilter+='FOP~0~(~0~';tmpFilter+=tmpCoreLoadStep.Filter;tmpFilter+='~FCP~0~)~0';}if(tmpAllSorts){if(tmpFilter.length>0){tmpFilter+='~';}tmpFilter+=tmpAllSorts;}tmpCoreLoadStep.Filter=tmpFilter;}tmpBundleConfig.push(tmpCoreLoadStep);pFilterState.BundleConfig=tmpBundleConfig;}/**
5853
5907
  * @param {string} pFilter
5854
5908
  *
5855
5909
  * @return {string}
@@ -5930,21 +5984,21 @@ if(!pFilterState.Filter){pFilterState.Filter="".concat(pFilterState.Entity||'Unk
5930
5984
  * Manage filter state for a filter that works on a one level of indirect direct join.
5931
5985
  */var FilterClauseExternalJoin=/*#__PURE__*/function(_libFilterClauseBase){/**
5932
5986
  * @param {import('../Pict.js')} pFable
5933
- */function FilterClauseExternalJoin(pFable){var _this87;_classCallCheck2(this,FilterClauseExternalJoin);_this87=_callSuper(this,FilterClauseExternalJoin,[pFable]);/** @type {import('./Filter.js').FilterType} */_this87.type='ExternalJoinMatch';/** @type {string[] | number[] | { Start?: string | number, End?: string | number }} */_this87.values=[];/** @type {boolean?} */_this87.exactMatch;/** @type {boolean?} */_this87.startExclusive;/** @type {boolean?} */_this87.endExclusive;/** @type {string?} */_this87.externalFilterByColumn;/** @type {string[]?} */_this87.externalFilterByColumns;/** @type {string} */_this87.coreConnectionColumn='';/** @type {string} */_this87.joinTable='';/** @type {string} */_this87.joinTableExternalConnectionColumn='';/** @type {string} */_this87.joinTableCoreConnectionColumn='';/** @type {string} */_this87.externalFilterByTable='';/** @type {string} */_this87.externalFilterByTableConnectionColumn='';return _this87;}/**
5987
+ */function FilterClauseExternalJoin(pFable){var _this88;_classCallCheck2(this,FilterClauseExternalJoin);_this88=_callSuper(this,FilterClauseExternalJoin,[pFable]);/** @type {import('./Filter.js').FilterType} */_this88.type='ExternalJoinMatch';/** @type {string[] | number[] | { Start?: string | number, End?: string | number }} */_this88.values=[];/** @type {boolean?} */_this88.exactMatch;/** @type {boolean?} */_this88.startExclusive;/** @type {boolean?} */_this88.endExclusive;/** @type {string?} */_this88.externalFilterByColumn;/** @type {string[]?} */_this88.externalFilterByColumns;/** @type {string} */_this88.coreConnectionColumn='';/** @type {string} */_this88.joinTable='';/** @type {string} */_this88.joinTableExternalConnectionColumn='';/** @type {string} */_this88.joinTableCoreConnectionColumn='';/** @type {string} */_this88.externalFilterByTable='';/** @type {string} */_this88.externalFilterByTableConnectionColumn='';return _this88;}/**
5934
5988
  * @return {import('./FilterClauseBase.js').FilterClauseConfig}
5935
5989
  */_inherits(FilterClauseExternalJoin,_libFilterClauseBase);return _createClass2(FilterClauseExternalJoin,[{key:"generateFilterClauseConfig",value:function generateFilterClauseConfig(){switch(this.type){case'ExternalJoinMatch':case'ExternalJoinStringMatch':case'ExternalJoinDateMatch':case'ExternalJoinNumericMatch':return{Type:this.type,Values:Array.isArray(this.values)?this.values:[],ExactMatch:this.exactMatch,ExternalFilterByColumn:this.externalFilterByColumn,ExternalFilterByColumns:this.externalFilterByColumns,CoreConnectionColumn:this.coreConnectionColumn,JoinTable:this.joinTable,JoinTableExternalConnectionColumn:this.joinTableExternalConnectionColumn,JoinTableCoreConnectionColumn:this.joinTableCoreConnectionColumn,ExternalFilterByTable:this.externalFilterByTable,ExternalFilterByTableConnectionColumn:this.externalFilterByTableConnectionColumn};case'ExternalJoinRange':case'ExternalJoinStringRange':case'ExternalJoinDateRange':case'ExternalJoinNumericRange':return{Type:this.type,Values:Array.isArray(this.values)?{Start:undefined,End:undefined}:Object.assign({},this.values),StartExclusive:this.startExclusive,EndExclusive:this.endExclusive,ExternalFilterByColumn:this.externalFilterByColumn,ExternalFilterByColumns:this.externalFilterByColumns,CoreConnectionColumn:this.coreConnectionColumn,JoinTable:this.joinTable,JoinTableExternalConnectionColumn:this.joinTableExternalConnectionColumn,JoinTableCoreConnectionColumn:this.joinTableCoreConnectionColumn,ExternalFilterByTable:this.externalFilterByTable,ExternalFilterByTableConnectionColumn:this.externalFilterByTableConnectionColumn};default:throw new Error("Unsupported filter type: ".concat(this.type));}}}]);}(libFilterClauseBase);module.exports=FilterClauseExternalJoin;},{"./FilterClauseBase.js":203}],205:[function(require,module,exports){var libFilterClauseBase=require('./FilterClauseBase.js');/**
5936
5990
  * Manage filter state for a filter that works on a one level of indirect direct join.
5937
5991
  */var FilterClauseInternalJoin=/*#__PURE__*/function(_libFilterClauseBase2){/**
5938
5992
  * @param {import('../Pict.js')} pFable
5939
- */function FilterClauseInternalJoin(pFable){var _this88;_classCallCheck2(this,FilterClauseInternalJoin);_this88=_callSuper(this,FilterClauseInternalJoin,[pFable]);/** @type {import('./Filter.js').FilterType} */_this88.type='None';/** @type {string[] | number[] | { Start?: string | number, End?: string | number }} */_this88.values=[];/** @type {boolean?} */_this88.exactMatch;/** @type {boolean?} */_this88.startExclusive;/** @type {boolean?} */_this88.endExclusive;/** @type {string} */_this88.remoteTable='';/** @type {string?} */_this88.externalFilterByColumn;/** @type {string[]?} */_this88.externalFilterByColumns;/** @type {string} */_this88.joinExternalConnectionColumn='';/** @type {string} */_this88.joinInternalConnectionColumn='';return _this88;}/**
5993
+ */function FilterClauseInternalJoin(pFable){var _this89;_classCallCheck2(this,FilterClauseInternalJoin);_this89=_callSuper(this,FilterClauseInternalJoin,[pFable]);/** @type {import('./Filter.js').FilterType} */_this89.type='None';/** @type {string[] | number[] | { Start?: string | number, End?: string | number }} */_this89.values=[];/** @type {boolean?} */_this89.exactMatch;/** @type {boolean?} */_this89.startExclusive;/** @type {boolean?} */_this89.endExclusive;/** @type {string} */_this89.remoteTable='';/** @type {string?} */_this89.externalFilterByColumn;/** @type {string[]?} */_this89.externalFilterByColumns;/** @type {string} */_this89.joinExternalConnectionColumn='';/** @type {string} */_this89.joinInternalConnectionColumn='';return _this89;}/**
5940
5994
  * @return {import('./FilterClauseBase.js').FilterClauseConfig}
5941
5995
  */_inherits(FilterClauseInternalJoin,_libFilterClauseBase2);return _createClass2(FilterClauseInternalJoin,[{key:"generateFilterClauseConfig",value:function generateFilterClauseConfig(){switch(this._type){case'InternalJoinMatch':case'InternalJoinStringMatch':case'InternalJoinDateMatch':case'InternalJoinNumericMatch':return{Type:this._type,Values:Array.isArray(this.values)?this.values:[],ExactMatch:this.exactMatch,RemoteTable:this.remoteTable,ExternalFilterByColumn:this.externalFilterByColumn,ExternalFilterByColumns:this.externalFilterByColumns,JoinExternalConnectionColumn:this.joinExternalConnectionColumn,JoinInternalConnectionColumn:this.joinInternalConnectionColumn};case'InternalJoinRange':case'InternalJoinStringRange':case'InternalJoinDateRange':case'InternalJoinNumericRange':return{Type:this._type,Values:Array.isArray(this.values)?{Start:undefined,End:undefined}:Object.assign({},this.values),StartExclusive:this.startExclusive,EndExclusive:this.endExclusive,RemoteTable:this.remoteTable,ExternalFilterByColumn:this.externalFilterByColumn,ExternalFilterByColumns:this.externalFilterByColumns,JoinExternalConnectionColumn:this.joinExternalConnectionColumn,JoinInternalConnectionColumn:this.joinInternalConnectionColumn};default:throw new Error("Unsupported filter type: ".concat(this.type));}}}]);}(libFilterClauseBase);module.exports=FilterClauseInternalJoin;},{"./FilterClauseBase.js":203}],206:[function(require,module,exports){var libFilterClauseBase=require('./FilterClauseBase.js');/**
5942
5996
  * Manage filter state for a filter that only works on fields local to the table.
5943
5997
  */var FilterClauseLocal=/*#__PURE__*/function(_libFilterClauseBase3){/**
5944
5998
  * @param {import('../Pict.js')} pFable
5945
- */function FilterClauseLocal(pFable){var _this89;_classCallCheck2(this,FilterClauseLocal);_this89=_callSuper(this,FilterClauseLocal,[pFable]);/** @type {import('./Filter.js').FilterType} */_this89._type='Match';/** @type {string} */_this89.filterByColumn;/** @type {boolean?} */_this89.exactMatch;/** @type {boolean?} */_this89.startExclusive;/** @type {boolean?} */_this89.endExclusive;return _this89;}/**
5999
+ */function FilterClauseLocal(pFable){var _this90;_classCallCheck2(this,FilterClauseLocal);_this90=_callSuper(this,FilterClauseLocal,[pFable]);/** @type {import('./Filter.js').FilterType} */_this90._type='Match';/** @type {string} */_this90.filterByColumn;/** @type {boolean?} */_this90.exactMatch;/** @type {boolean?} */_this90.startExclusive;/** @type {boolean?} */_this90.endExclusive;return _this90;}/**
5946
6000
  * @return {import('./FilterClauseBase.js').FilterClauseConfig}
5947
- */_inherits(FilterClauseLocal,_libFilterClauseBase3);return _createClass2(FilterClauseLocal,[{key:"generateFilterClauseConfig",value:function generateFilterClauseConfig(){switch(this._type){case'Match':case'StringMatch':case'DateMatch':case'NumericMatch':return{Type:this._type,Values:Array.isArray(this.values)?this.values:[],ExactMatch:this.exactMatch,FilterByColumn:this.filterByColumn};case'Range':case'StringRange':case'DateRange':case'NumericRange':return{Type:this._type,Values:Array.isArray(this.values)?{Start:undefined,End:undefined}:Object.assign({},this.values),StartExclusive:this.startExclusive,EndExclusive:this.endExclusive,FilterByColumn:this.filterByColumn};default:throw new Error("Unsupported filter type: ".concat(this.type));}}}]);}(libFilterClauseBase);module.exports=FilterClauseLocal;},{"./FilterClauseBase.js":203}],207:[function(require,module,exports){var libPictProvider=require('pict-provider');/** @type {Record<string, any>} */var _DEFAULT_PROVIDER_CONFIGURATION={ProviderIdentifier:'Pict-Provider-DataBroker',AutoInitialize:true,AutoInitializeOrdinal:0};var PictDataBrokerProvider=/*#__PURE__*/function(_libPictProvider){function PictDataBrokerProvider(pFable,pOptions,pServiceHash){var _this90;_classCallCheck2(this,PictDataBrokerProvider);var tmpOptions=Object.assign({},_DEFAULT_PROVIDER_CONFIGURATION,pOptions);_this90=_callSuper(this,PictDataBrokerProvider,[pFable,tmpOptions,pServiceHash]);/** @type {Record<string, any>} */_this90.options;/** @type {import('../Pict.js')} */_this90.pict;_this90.marshalDestination='AppData';return _this90;}/**
6001
+ */_inherits(FilterClauseLocal,_libFilterClauseBase3);return _createClass2(FilterClauseLocal,[{key:"generateFilterClauseConfig",value:function generateFilterClauseConfig(){switch(this._type){case'Match':case'StringMatch':case'DateMatch':case'NumericMatch':return{Type:this._type,Values:Array.isArray(this.values)?this.values:[],ExactMatch:this.exactMatch,FilterByColumn:this.filterByColumn};case'Range':case'StringRange':case'DateRange':case'NumericRange':return{Type:this._type,Values:Array.isArray(this.values)?{Start:undefined,End:undefined}:Object.assign({},this.values),StartExclusive:this.startExclusive,EndExclusive:this.endExclusive,FilterByColumn:this.filterByColumn};default:throw new Error("Unsupported filter type: ".concat(this.type));}}}]);}(libFilterClauseBase);module.exports=FilterClauseLocal;},{"./FilterClauseBase.js":203}],207:[function(require,module,exports){var libPictProvider=require('pict-provider');/** @type {Record<string, any>} */var _DEFAULT_PROVIDER_CONFIGURATION={ProviderIdentifier:'Pict-Provider-DataBroker',AutoInitialize:true,AutoInitializeOrdinal:0};var PictDataBrokerProvider=/*#__PURE__*/function(_libPictProvider){function PictDataBrokerProvider(pFable,pOptions,pServiceHash){var _this91;_classCallCheck2(this,PictDataBrokerProvider);var tmpOptions=Object.assign({},_DEFAULT_PROVIDER_CONFIGURATION,pOptions);_this91=_callSuper(this,PictDataBrokerProvider,[pFable,tmpOptions,pServiceHash]);/** @type {Record<string, any>} */_this91.options;/** @type {import('../Pict.js')} */_this91.pict;_this91.marshalDestination='AppData';return _this91;}/**
5948
6002
  * @param {string} pHash - The hash of the value to retrieve.
5949
6003
  */_inherits(PictDataBrokerProvider,_libPictProvider);return _createClass2(PictDataBrokerProvider,[{key:"getValue",value:function getValue(pHash){return this.getValueByHash(pHash);}/**
5950
6004
  * @param {string} pHash - The hash of the value to retrieve.
@@ -5963,7 +6017,7 @@ if(!pFilterState.Filter){pFilterState.Filter="".concat(pFilterState.Entity||'Unk
5963
6017
  */},{key:"marshalDestinationObject",get:function get(){var tmpMarshalDestinationAddress=this.marshalDestination;if(!tmpMarshalDestinationAddress){throw new Error("Attempt to access marshal destination object with no marshal destination set.");}//TODO: figure out a clean way to cache this object that sanely invalidates if the destination changes
5964
6018
  var tmpMarshalDestinationObject=this.pict.resolveStateFromAddress(tmpMarshalDestinationAddress);if(!tmpMarshalDestinationObject){this.log.error("Data Broker bootstrapping missing object at marshal destination address: ".concat(tmpMarshalDestinationAddress));this.pict.setStateValueAtAddress(tmpMarshalDestinationAddress,null,{});tmpMarshalDestinationObject=this.pict.resolveStateFromAddress(tmpMarshalDestinationAddress);if(!tmpMarshalDestinationObject){throw new Error("Attempt to access marshal destination object with no marshal destination set.");}}return tmpMarshalDestinationObject;}},{key:"getMarshalDestinationObject",value:function getMarshalDestinationObject(){return this.marshalDestinationObject;}/**
5965
6019
  * @param {string} [pOverrideMarshalDestination] - Optional override for the marshal destination address.
5966
- */},{key:"resolveMarshalDestinationObject",value:function resolveMarshalDestinationObject(pOverrideMarshalDestination){var tmpMarshalDestinationAddress=pOverrideMarshalDestination||this.marshalDestination;if(!tmpMarshalDestinationAddress){throw new Error("Attempt to resolve marshal destination object with no marshal destination set.");}var tmpMarshalDestinationObject;if(pOverrideMarshalDestination){tmpMarshalDestinationObject=this.pict.resolveStateFromAddress(pOverrideMarshalDestination);if(!tmpMarshalDestinationObject){this.log.error("Data Broker bootstrapping missing object at marshal destination address: ".concat(tmpMarshalDestinationAddress));this.pict.setStateValueAtAddress(tmpMarshalDestinationAddress,null,{});}}else{tmpMarshalDestinationObject=this.getMarshalDestinationObject();}return tmpMarshalDestinationObject;}}]);}(libPictProvider);module.exports=PictDataBrokerProvider;module.exports.default_configuration=_DEFAULT_PROVIDER_CONFIGURATION;},{"pict-provider":141}],208:[function(require,module,exports){var libPictProvider=require('pict-provider');var libFilter=require('../filters/Filter.js');/** @type {Record<string, any>} */var _DEFAULT_PROVIDER_CONFIGURATION={ProviderIdentifier:'Pict-RecordSet-FilterManager',AutoInitialize:true,AutoInitializeOrdinal:0};var PictRecordSetFilterManager=/*#__PURE__*/function(_libPictProvider2){function PictRecordSetFilterManager(pFable,pOptions,pServiceHash){var _this91;_classCallCheck2(this,PictRecordSetFilterManager);var tmpOptions=Object.assign({},_DEFAULT_PROVIDER_CONFIGURATION,pOptions);_this91=_callSuper(this,PictRecordSetFilterManager,[pFable,tmpOptions,pServiceHash]);/** @type {Record<string, any>} */_this91.options;/** @type {import('../Pict.js')} */_this91.pict;_this91.filters={};_this91.filterCriteria={};return _this91;}/**
6020
+ */},{key:"resolveMarshalDestinationObject",value:function resolveMarshalDestinationObject(pOverrideMarshalDestination){var tmpMarshalDestinationAddress=pOverrideMarshalDestination||this.marshalDestination;if(!tmpMarshalDestinationAddress){throw new Error("Attempt to resolve marshal destination object with no marshal destination set.");}var tmpMarshalDestinationObject;if(pOverrideMarshalDestination){tmpMarshalDestinationObject=this.pict.resolveStateFromAddress(pOverrideMarshalDestination);if(!tmpMarshalDestinationObject){this.log.error("Data Broker bootstrapping missing object at marshal destination address: ".concat(tmpMarshalDestinationAddress));this.pict.setStateValueAtAddress(tmpMarshalDestinationAddress,null,{});}}else{tmpMarshalDestinationObject=this.getMarshalDestinationObject();}return tmpMarshalDestinationObject;}}]);}(libPictProvider);module.exports=PictDataBrokerProvider;module.exports.default_configuration=_DEFAULT_PROVIDER_CONFIGURATION;},{"pict-provider":141}],208:[function(require,module,exports){var libPictProvider=require('pict-provider');var libFilter=require('../filters/Filter.js');/** @type {Record<string, any>} */var _DEFAULT_PROVIDER_CONFIGURATION={ProviderIdentifier:'Pict-RecordSet-FilterManager',AutoInitialize:true,AutoInitializeOrdinal:0};var PictRecordSetFilterManager=/*#__PURE__*/function(_libPictProvider2){function PictRecordSetFilterManager(pFable,pOptions,pServiceHash){var _this92;_classCallCheck2(this,PictRecordSetFilterManager);var tmpOptions=Object.assign({},_DEFAULT_PROVIDER_CONFIGURATION,pOptions);_this92=_callSuper(this,PictRecordSetFilterManager,[pFable,tmpOptions,pServiceHash]);/** @type {Record<string, any>} */_this92.options;/** @type {import('../Pict.js')} */_this92.pict;_this92.filters={};_this92.filterCriteria={};return _this92;}/**
5967
6021
  * @param {string} pFilterHash
5968
6022
  * @param {Record<string, any>} pFilterConfig
5969
6023
  *
@@ -5985,7 +6039,14 @@ var tmpMarshalDestinationObject=this.pict.resolveStateFromAddress(tmpMarshalDest
5985
6039
  * @param {Array<Record<string, any>>} pFilterConfiguration
5986
6040
  * @param {Record<string, any>} pFilterExperience
5987
6041
  * @param {(pError?: Error) => void} fCallback
5988
- */},{key:"loadRecordsByFilter",value:function loadRecordsByFilter(pFilterConfiguration,pFilterExperience,fCallback){/** @type {import('../filters/Filter.js').FilterState} */var tmpState=JSON.parse(JSON.stringify(pFilterExperience));tmpState.Mode='Records';tmpState.FilterConfiguration=pFilterConfiguration;var tmpFilter=new libFilter(this.pict);tmpFilter.generateMeadowFilterStanzas(tmpState);tmpFilter.linkPreparedFilters(tmpState);tmpFilter.normalizeMeadowFilterStanzas(tmpState);tmpFilter.compileMeadowFilterStanzas(tmpState);this.pict.EntityProvider.gatherDataFromServer(tmpState.BundleConfig,fCallback);}/**
6042
+ */},{key:"loadRecordsByFilter",value:function loadRecordsByFilter(pFilterConfiguration,pFilterExperience,fCallback){return this.loadRecordsByFilterUsingProvider(this.pict.EntityProvider,pFilterConfiguration,pFilterExperience,fCallback);}/**
6043
+ * Run a filter configuration against a filter experience and return ALL matched records.
6044
+ *
6045
+ * @param {import('../Pict-Meadow-EntityProvider.js')} pEntityProvider
6046
+ * @param {Array<Record<string, any>>} pFilterConfiguration
6047
+ * @param {Record<string, any>} pFilterExperience
6048
+ * @param {(pError?: Error) => void} fCallback
6049
+ */},{key:"loadRecordsByFilterUsingProvider",value:function loadRecordsByFilterUsingProvider(pEntityProvider,pFilterConfiguration,pFilterExperience,fCallback){if(!pEntityProvider||typeof pEntityProvider.gatherDataFromServer!=='function'){return fCallback(new Error('loadRecordsByFilter: Missing or invalid EntityProvider.'));}/** @type {import('../filters/Filter.js').FilterState} */var tmpState=JSON.parse(JSON.stringify(pFilterExperience));tmpState.Mode='Records';tmpState.FilterConfiguration=pFilterConfiguration;var tmpFilter=new libFilter(this.pict);tmpFilter.generateMeadowFilterStanzas(tmpState);tmpFilter.linkPreparedFilters(tmpState);tmpFilter.normalizeMeadowFilterStanzas(tmpState);tmpFilter.compileMeadowFilterStanzas(tmpState);pEntityProvider.gatherDataFromServer(tmpState.BundleConfig,fCallback);}/**
5989
6050
  * Run a filter configuration against a filter experience and return a page of records.
5990
6051
  *
5991
6052
  * @param {Array<Record<string, any>>} pFilterConfiguration
@@ -6000,7 +6061,27 @@ tmpPageSize=10000;}/** @type {import('../filters/Filter.js').FilterState} */var
6000
6061
  * @param {Array<Record<string, any>>} pFilterConfiguration
6001
6062
  * @param {Record<string, any>} pFilterExperience
6002
6063
  * @param {(pError?: Error) => void} fCallback
6003
- */},{key:"countRecordsByFilter",value:function countRecordsByFilter(pFilterConfiguration,pFilterExperience,fCallback){/** @type {import('../filters/Filter.js').FilterState} */var tmpState=JSON.parse(JSON.stringify(pFilterExperience));tmpState.Mode='Count';tmpState.FilterConfiguration=pFilterConfiguration;var tmpFilter=new libFilter(this.pict);tmpFilter.generateMeadowFilterStanzas(tmpState);tmpFilter.linkPreparedFilters(tmpState);tmpFilter.normalizeMeadowFilterStanzas(tmpState);tmpFilter.compileMeadowFilterStanzas(tmpState);this.pict.EntityProvider.gatherDataFromServer(tmpState.BundleConfig,fCallback);}},{key:"executeFilter",value:function executeFilter(pFilterConfigurationAddress,pFilterExperienceAddress,fCallback){var tmpFilterConfiguration=this.pict.resolveStateFromAddress(pFilterConfigurationAddress);if(!Array.isArray(tmpFilterConfiguration)){return fCallback(new Error("Filter configuration at address ".concat(pFilterConfigurationAddress," is not an array.")));}var tmpFilterExperience=this.pict.resolveStateFromAddress(pFilterExperienceAddress);if(!tmpFilterExperience||_typeof(tmpFilterExperience)!=='object'){return fCallback(new Error("Filter experience at address ".concat(pFilterExperienceAddress," is not an object.")));}return this.loadRecordsByFilter(tmpFilterConfiguration,tmpFilterExperience,fCallback);}/**
6064
+ */},{key:"countRecordsByFilter",value:function countRecordsByFilter(pFilterConfiguration,pFilterExperience,fCallback){return this.countRecordsByFilterUsingProivider(this.pict.EntityProvider,pFilterConfiguration,pFilterExperience,fCallback);}/**
6065
+ * Run a filter configuration against a filter experience and return the count of records.
6066
+ *
6067
+ * @param {import('../Pict-Meadow-EntityProvider.js')} pEntityProvider
6068
+ * @param {Array<Record<string, any>>} pFilterConfiguration
6069
+ * @param {Record<string, any>} pFilterExperience
6070
+ * @param {(pError?: Error) => void} fCallback
6071
+ */},{key:"countRecordsByFilterUsingProivider",value:function countRecordsByFilterUsingProivider(pEntityProvider,pFilterConfiguration,pFilterExperience,fCallback){/** @type {import('../filters/Filter.js').FilterState} */var tmpState=JSON.parse(JSON.stringify(pFilterExperience));tmpState.Mode='Count';tmpState.FilterConfiguration=pFilterConfiguration;var tmpFilter=new libFilter(this.pict);tmpFilter.generateMeadowFilterStanzas(tmpState);tmpFilter.linkPreparedFilters(tmpState);tmpFilter.normalizeMeadowFilterStanzas(tmpState);tmpFilter.compileMeadowFilterStanzas(tmpState);pEntityProvider.gatherDataFromServer(tmpState.BundleConfig,fCallback);}/**
6072
+ * @param {string} pFilterConfigurationAddress
6073
+ * @param {string} pFilterExperienceAddress
6074
+ * @param {(pError?: Error) => void} fCallback
6075
+ *
6076
+ * @return {void}
6077
+ */},{key:"executeFilter",value:function executeFilter(pFilterConfigurationAddress,pFilterExperienceAddress,fCallback){return this.executeFilterUsingProvider(this.pict.EntityProvider,pFilterConfigurationAddress,pFilterExperienceAddress,fCallback);}/**
6078
+ * @param {import('../Pict-Meadow-EntityProvider.js')} pEntityProvider
6079
+ * @param {string} pFilterConfigurationAddress
6080
+ * @param {string} pFilterExperienceAddress
6081
+ * @param {(pError?: Error) => void} fCallback
6082
+ *
6083
+ * @return {void}
6084
+ */},{key:"executeFilterUsingProvider",value:function executeFilterUsingProvider(pEntityProvider,pFilterConfigurationAddress,pFilterExperienceAddress,fCallback){if(!pEntityProvider||typeof pEntityProvider.gatherDataFromServer!=='function'){return fCallback(new Error('executeFilter: Missing or invalid EntityProvider.'));}var tmpFilterConfiguration=this.pict.resolveStateFromAddress(pFilterConfigurationAddress);if(!Array.isArray(tmpFilterConfiguration)){return fCallback(new Error("Filter configuration at address ".concat(pFilterConfigurationAddress," is not an array.")));}var tmpFilterExperience=this.pict.resolveStateFromAddress(pFilterExperienceAddress);if(!tmpFilterExperience||_typeof(tmpFilterExperience)!=='object'){return fCallback(new Error("Filter experience at address ".concat(pFilterExperienceAddress," is not an object.")));}return this.loadRecordsByFilterUsingProvider(pEntityProvider,tmpFilterConfiguration,tmpFilterExperience,fCallback);}/**
6004
6085
  * Run a filter configuration against a filter experience and return a page of records.
6005
6086
  *
6006
6087
  * @param {string} pFilterConfigurationAddress
@@ -6008,11 +6089,24 @@ tmpPageSize=10000;}/** @type {import('../filters/Filter.js').FilterState} */var
6008
6089
  * @param {number | ((pError?: Error) => void)} pRecordOffset
6009
6090
  * @param {number | ((pError?: Error) => void)} pPageSize
6010
6091
  * @param {(pError?: Error) => void} fCallback
6011
- */},{key:"executeFilterPage",value:function executeFilterPage(pFilterConfigurationAddress,pFilterExperienceAddress,pRecordOffset,pPageSize,fCallback){var tmpCallback=typeof pRecordOffset==='function'?pRecordOffset:typeof pPageSize==='function'?pPageSize:fCallback;var tmpFilterConfiguration=this.pict.resolveStateFromAddress(pFilterConfigurationAddress);if(!Array.isArray(tmpFilterConfiguration)){return tmpCallback(new Error("Filter configuration at address ".concat(pFilterConfigurationAddress," is not an array.")));}var tmpFilterExperience=this.pict.resolveStateFromAddress(pFilterExperienceAddress);if(!tmpFilterExperience||_typeof(tmpFilterExperience)!=='object'){return tmpCallback(new Error("Filter experience at address ".concat(pFilterExperienceAddress," is not an object.")));}return this.loadRecordPageByFilter(tmpFilterConfiguration,tmpFilterExperience,pRecordOffset,pPageSize,fCallback);}},{key:"executeFilterCount",value:function executeFilterCount(pFilterConfigurationAddress,pFilterExperienceAddress,fCallback){var tmpFilterConfiguration=this.pict.resolveStateFromAddress(pFilterConfigurationAddress);if(!Array.isArray(tmpFilterConfiguration)){return fCallback(new Error("Filter configuration at address ".concat(pFilterConfigurationAddress," is not an array.")));}var tmpFilterExperience=this.pict.resolveStateFromAddress(pFilterExperienceAddress);if(!tmpFilterExperience||_typeof(tmpFilterExperience)!=='object'){return fCallback(new Error("Filter experience at address ".concat(pFilterExperienceAddress," is not an object.")));}return this.countRecordsByFilter(tmpFilterConfiguration,tmpFilterExperience,fCallback);}}]);}(libPictProvider);module.exports=PictRecordSetFilterManager;module.exports.default_configuration=_DEFAULT_PROVIDER_CONFIGURATION;},{"../filters/Filter.js":202,"pict-provider":141}],209:[function(require,module,exports){var libFableServiceProviderBase=require('fable-serviceproviderbase');/*
6092
+ */},{key:"executeFilterPage",value:function executeFilterPage(pFilterConfigurationAddress,pFilterExperienceAddress,pRecordOffset,pPageSize,fCallback){var tmpCallback=typeof pRecordOffset==='function'?pRecordOffset:typeof pPageSize==='function'?pPageSize:fCallback;var tmpFilterConfiguration=this.pict.resolveStateFromAddress(pFilterConfigurationAddress);if(!Array.isArray(tmpFilterConfiguration)){return tmpCallback(new Error("Filter configuration at address ".concat(pFilterConfigurationAddress," is not an array.")));}var tmpFilterExperience=this.pict.resolveStateFromAddress(pFilterExperienceAddress);if(!tmpFilterExperience||_typeof(tmpFilterExperience)!=='object'){return tmpCallback(new Error("Filter experience at address ".concat(pFilterExperienceAddress," is not an object.")));}return this.loadRecordPageByFilter(tmpFilterConfiguration,tmpFilterExperience,pRecordOffset,pPageSize,fCallback);}/**
6093
+ * @param {string} pFilterConfigurationAddress
6094
+ * @param {string} pFilterExperienceAddress
6095
+ * @param {(pError?: Error) => void} fCallback
6096
+ *
6097
+ * @return {void}
6098
+ */},{key:"executeFilterCount",value:function executeFilterCount(pFilterConfigurationAddress,pFilterExperienceAddress,fCallback){return this.executeFilterCountUsingProvider(this.pict.EntityProvider,pFilterConfigurationAddress,pFilterExperienceAddress,fCallback);}/**
6099
+ * @param {import('../Pict-Meadow-EntityProvider.js')} pEntityProvider
6100
+ * @param {string} pFilterConfigurationAddress
6101
+ * @param {string} pFilterExperienceAddress
6102
+ * @param {(pError?: Error) => void} fCallback
6103
+ *
6104
+ * @return {void}
6105
+ */},{key:"executeFilterCountUsingProvider",value:function executeFilterCountUsingProvider(pEntityProvider,pFilterConfigurationAddress,pFilterExperienceAddress,fCallback){var tmpFilterConfiguration=this.pict.resolveStateFromAddress(pFilterConfigurationAddress);if(!Array.isArray(tmpFilterConfiguration)){return fCallback(new Error("Filter configuration at address ".concat(pFilterConfigurationAddress," is not an array.")));}var tmpFilterExperience=this.pict.resolveStateFromAddress(pFilterExperienceAddress);if(!tmpFilterExperience||_typeof(tmpFilterExperience)!=='object'){return fCallback(new Error("Filter experience at address ".concat(pFilterExperienceAddress," is not an object.")));}return this.countRecordsByFilterUsingProivider(pEntityProvider,tmpFilterConfiguration,tmpFilterExperience,fCallback);}}]);}(libPictProvider);module.exports=PictRecordSetFilterManager;module.exports.default_configuration=_DEFAULT_PROVIDER_CONFIGURATION;},{"../filters/Filter.js":202,"pict-provider":141}],209:[function(require,module,exports){var libFableServiceProviderBase=require('fable-serviceproviderbase');/*
6012
6106
  * Provides transaction tracking with keys and events, allowing us to block repeat attempts.
6013
6107
  * Once the shape is solidified, will move it back to the fable codebase
6014
- */var TransactionTracking=/*#__PURE__*/function(_libFableServiceProvi1){function TransactionTracking(pFable,pOptions,pServiceHash){var _this92;_classCallCheck2(this,TransactionTracking);// Intersect default options, parent constructor, service information
6015
- _this92=_callSuper(this,TransactionTracking,[pFable,pOptions,pServiceHash]);/** @type {import('pict') & { addAndInstantiateSingletonService: (hash: string, options: any, prototype: any) => any }} */_this92.fable;/** @type {any} */_this92.log;/** @type {string} */_this92.UUID;_this92.transactionMap={};return _this92;}_inherits(TransactionTracking,_libFableServiceProvi1);return _createClass2(TransactionTracking,[{key:"transactions",get:function get(){return this.transactionMap;}},{key:"logToTransaction",value:function logToTransaction(pKey,pMessage,pCategory){var tmpTransaction=this.transactionMap[pKey];if(tmpTransaction==null){this.log.warn("TransactionTracking logToTransaction key [".concat(pKey,"] does not exist; auto creating..."));tmpTransaction=this.registerTransaction(pKey);}var tmpCategory=typeof pCategory==='string'?pCategory:'General';this.transactionMap[pKey].Log.push({TimeStamp:new Date(),Category:tmpCategory,Message:pMessage});//this.log.trace(`TransactionTracking logToTransaction [${pKey}]: (${tmpCategory}) ${pMessage}`);
6108
+ */var TransactionTracking=/*#__PURE__*/function(_libFableServiceProvi1){function TransactionTracking(pFable,pOptions,pServiceHash){var _this93;_classCallCheck2(this,TransactionTracking);// Intersect default options, parent constructor, service information
6109
+ _this93=_callSuper(this,TransactionTracking,[pFable,pOptions,pServiceHash]);/** @type {import('../Pict') & { addAndInstantiateSingletonService: (hash: string, options: any, prototype: any) => any }} */_this93.fable;/** @type {any} */_this93.log;/** @type {string} */_this93.UUID;_this93.transactionMap={};return _this93;}_inherits(TransactionTracking,_libFableServiceProvi1);return _createClass2(TransactionTracking,[{key:"transactions",get:function get(){return this.transactionMap;}},{key:"logToTransaction",value:function logToTransaction(pKey,pMessage,pCategory){var tmpTransaction=this.transactionMap[pKey];if(tmpTransaction==null){this.log.warn("TransactionTracking logToTransaction key [".concat(pKey,"] does not exist; auto creating..."));tmpTransaction=this.registerTransaction(pKey);}var tmpCategory=typeof pCategory==='string'?pCategory:'General';this.transactionMap[pKey].Log.push({TimeStamp:new Date(),Category:tmpCategory,Message:pMessage});//this.log.trace(`TransactionTracking logToTransaction [${pKey}]: (${tmpCategory}) ${pMessage}`);
6016
6110
  return true;}},{key:"registerTransaction",value:function registerTransaction(pKey){if(this.transactionMap[pKey]!=null){//this.log.warn(`TransactionTracking registerTransaction key [${pKey}] already exists... returning existing transaction.`);
6017
6111
  return this.transactionMap[pKey];}this.transactionMap[pKey]={TransactionKey:pKey,Events:{},Log:[],TransactionQueue:[]};return this.transactionMap[pKey];}/**
6018
6112
  * @param {string} pKey
@@ -6042,44 +6136,47 @@ this.logToTransaction(pKey,"Event [".concat(pEvent,"]->[").concat(tmpHash,"] reg
6042
6136
  * @param {Object} pFable - The Fable Framework instance
6043
6137
  * @param {Object} pOptions - The options for the service
6044
6138
  * @param {String} pServiceHash - The hash of the service
6045
- */function PictTemplateProviderData(pFable,pOptions,pServiceHash){var _this93;_classCallCheck2(this,PictTemplateProviderData);_this93=_callSuper(this,PictTemplateProviderData,[pFable,pOptions,pServiceHash]);/** @type {any} */_this93.log;_this93.addPattern('{~Data:','~}');_this93.addPattern('{~D:','~}');return _this93;}/**
6139
+ */function PictTemplateProviderData(pFable,pOptions,pServiceHash){var _this94;_classCallCheck2(this,PictTemplateProviderData);_this94=_callSuper(this,PictTemplateProviderData,[pFable,pOptions,pServiceHash]);/** @type {any} */_this94.log;_this94.addPattern('{~Data:','~}');_this94.addPattern('{~D:','~}');return _this94;}/**
6046
6140
  * Render a template expression, returning a string with the resulting content or an optional default value.
6047
6141
  *
6048
6142
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6049
6143
  * @param {any} pRecord - The json object to be used as the Record for the template render
6050
6144
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6051
6145
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6146
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6052
6147
  *
6053
6148
  * @return {string} The rendered template
6054
- */_inherits(PictTemplateProviderData,_libPictTemplate);return _createClass2(PictTemplateProviderData,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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,null,pScope);}if(tmpValue==null||tmpValue=='undefined'||typeof tmpValue=='undefined'||tmpValue===''){return tmpDefaultValue;}return tmpValue;}}]);}(libPictTemplate);module.exports=PictTemplateProviderData;},{"pict-template":143}],211:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDataValueByKey=/*#__PURE__*/function(_libPictTemplate2){/**
6149
+ */_inherits(PictTemplateProviderData,_libPictTemplate);return _createClass2(PictTemplateProviderData,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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,null,pScope,pState);}if(tmpValue==null||tmpValue=='undefined'||typeof tmpValue=='undefined'||tmpValue===''){return tmpDefaultValue;}return tmpValue;}}]);}(libPictTemplate);module.exports=PictTemplateProviderData;},{"pict-template":143}],211:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDataValueByKey=/*#__PURE__*/function(_libPictTemplate2){/**
6055
6150
  * @param {Object} pFable - The Fable Framework instance
6056
6151
  * @param {Object} pOptions - The options for the service
6057
6152
  * @param {String} pServiceHash - The hash of the service
6058
- */function PictTemplateProviderDataValueByKey(pFable,pOptions,pServiceHash){var _this94;_classCallCheck2(this,PictTemplateProviderDataValueByKey);_this94=_callSuper(this,PictTemplateProviderDataValueByKey,[pFable,pOptions,pServiceHash]);/** @type {any} */_this94.log;_this94.addPattern('{~DataValueByKey:','~}');_this94.addPattern('{~DVBK:','~}');return _this94;}/**
6153
+ */function PictTemplateProviderDataValueByKey(pFable,pOptions,pServiceHash){var _this95;_classCallCheck2(this,PictTemplateProviderDataValueByKey);_this95=_callSuper(this,PictTemplateProviderDataValueByKey,[pFable,pOptions,pServiceHash]);/** @type {any} */_this95.log;_this95.addPattern('{~DataValueByKey:','~}');_this95.addPattern('{~DVBK:','~}');return _this95;}/**
6059
6154
  * Render a template expression, returning a string with the resulting content.
6060
6155
  *
6061
6156
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6062
6157
  * @param {any} pRecord - The json object to be used as the Record for the template render
6063
6158
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6064
6159
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6160
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6065
6161
  *
6066
6162
  * @return {string} The rendered template
6067
- */_inherits(PictTemplateProviderDataValueByKey,_libPictTemplate2);return _createClass2(PictTemplateProviderDataValueByKey,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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,null,pScope);var tmpValueAddress=this.resolveStateFromAddress(tmpHashArray[1],tmpRecord,pContextArray,null,pScope);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}],212:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderData=/*#__PURE__*/function(_libPictTemplate3){/**
6163
+ */_inherits(PictTemplateProviderDataValueByKey,_libPictTemplate2);return _createClass2(PictTemplateProviderDataValueByKey,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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,null,pScope,pState);var tmpValueAddress=this.resolveStateFromAddress(tmpHashArray[1],tmpRecord,pContextArray,null,pScope,pState);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}],212:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderData=/*#__PURE__*/function(_libPictTemplate3){/**
6068
6164
  * @param {Object} pFable - The Fable Framework instance
6069
6165
  * @param {Object} pOptions - The options for the service
6070
6166
  * @param {String} pServiceHash - The hash of the service
6071
- */function PictTemplateProviderData(pFable,pOptions,pServiceHash){var _this95;_classCallCheck2(this,PictTemplateProviderData);_this95=_callSuper(this,PictTemplateProviderData,[pFable,pOptions,pServiceHash]);/** @type {any} */_this95.log;_this95.addPattern('{~DataWithTemplateFallback:','~}');_this95.addPattern('{~DWTF:','~}');return _this95;}/**
6167
+ */function PictTemplateProviderData(pFable,pOptions,pServiceHash){var _this96;_classCallCheck2(this,PictTemplateProviderData);_this96=_callSuper(this,PictTemplateProviderData,[pFable,pOptions,pServiceHash]);/** @type {any} */_this96.log;_this96.addPattern('{~DataWithTemplateFallback:','~}');_this96.addPattern('{~DWTF:','~}');return _this96;}/**
6072
6168
  * Render a template expression, returning a string with the resulting content or an optional default template string from an address.
6073
6169
  *
6074
6170
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6075
6171
  * @param {any} pRecord - The json object to be used as the Record for the template render
6076
6172
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6077
6173
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6174
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6078
6175
  *
6079
6176
  * @return {string} The rendered template
6080
- */_inherits(PictTemplateProviderData,_libPictTemplate3);return _createClass2(PictTemplateProviderData,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){var tmpHash=pTemplateHash.trim();var tmpRecord=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(tmpHash,"] with tmpRecord:"),tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(tmpHash,"]"));}var tmpTemplateFallbackAddress='';if(tmpHash.indexOf(':')>-1){tmpTemplateFallbackAddress=tmpHash.split(':')[1];tmpHash=tmpHash.split(':')[0];}var tmpValue='';if(tmpHash!=null){tmpValue=this.resolveStateFromAddress(tmpHash,tmpRecord,pContextArray,null,pScope);if(tmpValue&&tmpValue!=='undefined'){if(this.pict.LogNoisiness>3){this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(tmpHash,"] - Found value: ").concat(tmpValue));}// If a value is found, return it
6177
+ */_inherits(PictTemplateProviderData,_libPictTemplate3);return _createClass2(PictTemplateProviderData,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){var tmpHash=pTemplateHash.trim();var tmpRecord=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(tmpHash,"] with tmpRecord:"),tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(tmpHash,"]"));}var tmpTemplateFallbackAddress='';if(tmpHash.indexOf(':')>-1){tmpTemplateFallbackAddress=tmpHash.split(':')[1];tmpHash=tmpHash.split(':')[0];}var tmpValue='';if(tmpHash!=null){tmpValue=this.resolveStateFromAddress(tmpHash,tmpRecord,pContextArray,null,pScope,pState);if(tmpValue&&tmpValue!=='undefined'){if(this.pict.LogNoisiness>3){this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(tmpHash,"] - Found value: ").concat(tmpValue));}// If a value is found, return it
6081
6178
  return tmpValue;}}// If the value is not found or is undefined, try to use the fallback template
6082
- var tmpFallbackTemplate=this.pict.parseTemplateByHash(tmpTemplateFallbackAddress,tmpRecord,null,pContextArray,pScope);if(tmpFallbackTemplate==null||tmpFallbackTemplate===''){this.log.warn("PICT DataWithTemplateFallback [fDataRender]::[".concat(tmpHash,"] - No fallback template found at address: ").concat(tmpTemplateFallbackAddress));// If no fallback template is found, return an empty string
6179
+ var tmpFallbackTemplate=this.pict.parseTemplateByHash(tmpTemplateFallbackAddress,tmpRecord,null,pContextArray,pScope,pState);if(tmpFallbackTemplate==null||tmpFallbackTemplate===''){this.log.warn("PICT DataWithTemplateFallback [fDataRender]::[".concat(tmpHash,"] - No fallback template found at address: ").concat(tmpTemplateFallbackAddress));// If no fallback template is found, return an empty string
6083
6180
  return'';}if(this.pict.LogNoisiness>3){this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(tmpHash,"] - Using fallback template from address: ").concat(tmpTemplateFallbackAddress));}return tmpFallbackTemplate;}/**
6084
6181
  * Render a template expression asynchronously, returning a string with the resulting content or an optional fallback template string from an address.
6085
6182
  *
@@ -6088,24 +6185,26 @@ return'';}if(this.pict.LogNoisiness>3){this.log.trace("PICT DataWithTemplateFall
6088
6185
  * @param {(pError?: Error, pResult?: string) => void} fCallback - The callback function to be called with the result
6089
6186
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6090
6187
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6188
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6091
6189
  *
6092
6190
  * @return {void} The result is passed to the callback function
6093
- */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope){var _this96=this;var tmpHash=pTemplateHash.trim();var tmpRecord=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(tmpHash,"] with tmpRecord:"),tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(tmpHash,"]"));}var tmpTemplateFallbackAddress='';if(tmpHash.indexOf(':')>-1){tmpTemplateFallbackAddress=tmpHash.split(':')[1];tmpHash=tmpHash.split(':')[0];}var tmpValue='';if(tmpHash!=null){tmpValue=this.resolveStateFromAddress(tmpHash,tmpRecord,pContextArray,null,pScope);if(tmpValue&&tmpValue!=='undefined'){if(this.pict.LogNoisiness>3){this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(tmpHash,"] - Found value: ").concat(tmpValue));}return tmpCallback(null,tmpValue);}}// If the value is not found or is undefined, try to use the fallback template
6094
- this.pict.parseTemplateByHash(tmpTemplateFallbackAddress,tmpRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}if(pValue==null||pValue===''){_this96.log.warn("PICT DataWithTemplateFallback [fDataRender]::[".concat(tmpHash,"] - No fallback template found at address: ").concat(tmpTemplateFallbackAddress));// If no fallback template is found, return an empty string
6095
- return tmpCallback(null,'');}if(_this96.pict.LogNoisiness>3){_this96.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(tmpHash,"] - Using fallback template from address: ").concat(tmpTemplateFallbackAddress));}return tmpCallback(null,pValue);},pContextArray,pScope);}}]);}(libPictTemplate);module.exports=PictTemplateProviderData;},{"pict-template":143}],213:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderEntity=/*#__PURE__*/function(_libPictTemplate4){/**
6191
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope,pState){var _this97=this;var tmpHash=pTemplateHash.trim();var tmpRecord=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(tmpHash,"] with tmpRecord:"),tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(tmpHash,"]"));}var tmpTemplateFallbackAddress='';if(tmpHash.indexOf(':')>-1){tmpTemplateFallbackAddress=tmpHash.split(':')[1];tmpHash=tmpHash.split(':')[0];}var tmpValue='';if(tmpHash!=null){tmpValue=this.resolveStateFromAddress(tmpHash,tmpRecord,pContextArray,null,pScope,pState);if(tmpValue&&tmpValue!=='undefined'){if(this.pict.LogNoisiness>3){this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(tmpHash,"] - Found value: ").concat(tmpValue));}return tmpCallback(null,tmpValue);}}// If the value is not found or is undefined, try to use the fallback template
6192
+ this.pict.parseTemplateByHash(tmpTemplateFallbackAddress,tmpRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}if(pValue==null||pValue===''){_this97.log.warn("PICT DataWithTemplateFallback [fDataRender]::[".concat(tmpHash,"] - No fallback template found at address: ").concat(tmpTemplateFallbackAddress));// If no fallback template is found, return an empty string
6193
+ return tmpCallback(null,'');}if(_this97.pict.LogNoisiness>3){_this97.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(tmpHash,"] - Using fallback template from address: ").concat(tmpTemplateFallbackAddress));}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}}]);}(libPictTemplate);module.exports=PictTemplateProviderData;},{"pict-template":143}],213:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderEntity=/*#__PURE__*/function(_libPictTemplate4){/**
6096
6194
  * @param {Object} pFable - The Fable Framework instance
6097
6195
  * @param {Object} pOptions - The options for the service
6098
6196
  * @param {String} pServiceHash - The hash of the service
6099
- */function PictTemplateProviderEntity(pFable,pOptions,pServiceHash){var _this97;_classCallCheck2(this,PictTemplateProviderEntity);_this97=_callSuper(this,PictTemplateProviderEntity,[pFable,pOptions,pServiceHash]);/** @type {any} */_this97.log;_this97.addPattern('{~E:','~}');_this97.addPattern('{~Entity:','~}');return _this97;}/**
6197
+ */function PictTemplateProviderEntity(pFable,pOptions,pServiceHash){var _this98;_classCallCheck2(this,PictTemplateProviderEntity);_this98=_callSuper(this,PictTemplateProviderEntity,[pFable,pOptions,pServiceHash]);/** @type {any} */_this98.log;_this98.addPattern('{~E:','~}');_this98.addPattern('{~Entity:','~}');return _this98;}/**
6100
6198
  * Render a template expression, returning a string with the resulting content.
6101
6199
  *
6102
6200
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6103
6201
  * @param {any} pRecord - The json object to be used as the Record for the template render
6104
6202
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6105
6203
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6204
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6106
6205
  *
6107
6206
  * @return {string} The rendered template
6108
- */_inherits(PictTemplateProviderEntity,_libPictTemplate4);return _createClass2(PictTemplateProviderEntity,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){// TODO: Better messaging
6207
+ */_inherits(PictTemplateProviderEntity,_libPictTemplate4);return _createClass2(PictTemplateProviderEntity,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){// TODO: Better messaging
6109
6208
  this.log.error("Pict: Entity Render [".concat(pTemplateHash,"]: Render called in a non-asynchronous fashion. This should not happen."));return'';}/**
6110
6209
  * Render a template expression, deliver a string with the resulting content to a callback function.
6111
6210
  *
@@ -6114,57 +6213,61 @@ this.log.error("Pict: Entity Render [".concat(pTemplateHash,"]: Render called in
6114
6213
  * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
6115
6214
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6116
6215
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6216
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6117
6217
  *
6118
6218
  * @return {void}
6119
- */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope){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.
6219
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope,pState){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.
6120
6220
  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
6121
- tmpEntityID=this.resolveStateFromAddress(String(tmpEntityID),tmpData,pContextArray,null,pScope);}// No Entity or EntityID
6221
+ tmpEntityID=this.resolveStateFromAddress(String(tmpEntityID),tmpData,pContextArray,null,pScope,pState);}// No Entity or EntityID
6122
6222
  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
6123
6223
  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
6124
- if(tmpEntityTemplate){this.pict.parseTemplateByHash(tmpEntityTemplate,pRecord,tmpCallback,pContextArray,pScope);}else{tmpCallback(null,'');}}.bind(this));}}]);}(libPictTemplate);module.exports=PictTemplateProviderEntity;},{"pict-template":143}],214:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderSelf=/*#__PURE__*/function(_libPictTemplate5){/**
6224
+ if(tmpEntityTemplate){this.pict.parseTemplateByHash(tmpEntityTemplate,pRecord,tmpCallback,pContextArray,pScope,pState);}else{tmpCallback(null,'');}}.bind(this));}}]);}(libPictTemplate);module.exports=PictTemplateProviderEntity;},{"pict-template":143}],214:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderSelf=/*#__PURE__*/function(_libPictTemplate5){/**
6125
6225
  * @param {Object} pFable - The Fable Framework instance
6126
6226
  * @param {Object} pOptions - The options for the service
6127
6227
  * @param {String} pServiceHash - The hash of the service
6128
- */function PictTemplateProviderSelf(pFable,pOptions,pServiceHash){var _this98;_classCallCheck2(this,PictTemplateProviderSelf);_this98=_callSuper(this,PictTemplateProviderSelf,[pFable,pOptions,pServiceHash]);_this98.addPattern('{~Pict','~}');_this98.addPattern('{~P','~}');_this98.addPattern('{~p','~}');return _this98;}/**
6228
+ */function PictTemplateProviderSelf(pFable,pOptions,pServiceHash){var _this99;_classCallCheck2(this,PictTemplateProviderSelf);_this99=_callSuper(this,PictTemplateProviderSelf,[pFable,pOptions,pServiceHash]);_this99.addPattern('{~Pict','~}');_this99.addPattern('{~P','~}');_this99.addPattern('{~p','~}');return _this99;}/**
6129
6229
  * Render a template expression, returning a string with the resulting content.
6130
6230
  *
6131
6231
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6132
6232
  * @param {any} pRecord - The json object to be used as the Record for the template render
6133
6233
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6134
6234
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6235
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6135
6236
  *
6136
6237
  * @return {string} The rendered template
6137
- */_inherits(PictTemplateProviderSelf,_libPictTemplate5);return _createClass2(PictTemplateProviderSelf,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){return this.pict.browserAddress;}}]);}(libPictTemplate);module.exports=PictTemplateProviderSelf;},{"pict-template":143}],215:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderSolveByReference=/*#__PURE__*/function(_libPictTemplate6){/**
6238
+ */_inherits(PictTemplateProviderSelf,_libPictTemplate5);return _createClass2(PictTemplateProviderSelf,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){return this.pict.browserAddress;}}]);}(libPictTemplate);module.exports=PictTemplateProviderSelf;},{"pict-template":143}],215:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderSolveByReference=/*#__PURE__*/function(_libPictTemplate6){/**
6138
6239
  * @param {Object} pFable - The Fable Framework instance
6139
6240
  * @param {Object} pOptions - The options for the service
6140
6241
  * @param {String} pServiceHash - The hash of the service
6141
- */function PictTemplateProviderSolveByReference(pFable,pOptions,pServiceHash){var _this99;_classCallCheck2(this,PictTemplateProviderSolveByReference);_this99=_callSuper(this,PictTemplateProviderSolveByReference,[pFable,pOptions,pServiceHash]);/** @type {any} */_this99.log;_this99.addPattern('{~SolveByReference:','~}');_this99.addPattern('{~SBR:','~}');return _this99;}/**
6242
+ */function PictTemplateProviderSolveByReference(pFable,pOptions,pServiceHash){var _this100;_classCallCheck2(this,PictTemplateProviderSolveByReference);_this100=_callSuper(this,PictTemplateProviderSolveByReference,[pFable,pOptions,pServiceHash]);/** @type {any} */_this100.log;_this100.addPattern('{~SolveByReference:','~}');_this100.addPattern('{~SBR:','~}');return _this100;}/**
6142
6243
  * Render a template expression, returning a string with the resulting content.
6143
6244
  *
6144
6245
  * @param {string} pSolveParams - The solver parameters.
6145
6246
  * @param {any} pRecord - The json object to be used as the Record for the template render
6146
6247
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6147
6248
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6249
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6148
6250
  *
6149
6251
  * @return {string} The rendered template
6150
- */_inherits(PictTemplateProviderSolveByReference,_libPictTemplate6);return _createClass2(PictTemplateProviderSolveByReference,[{key:"render",value:function render(pSolveParams,pRecord,pContextArray,pScope){// {~SBR:AppData.Equation:AppData.HomeworkRectangleSize:AppData.HomeworkManifest~}
6151
- var _pSolveParams$trim$sp=pSolveParams.trim().split(':',3),_pSolveParams$trim$sp2=_slicedToArray(_pSolveParams$trim$sp,3),tmpEquationAddress=_pSolveParams$trim$sp2[0],tmpRecordAddress=_pSolveParams$trim$sp2[1],tmpManifestAddress=_pSolveParams$trim$sp2[2];var tmpContextualRecord=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT SolveByReference [fTemplateRender]::[".concat(pSolveParams,"] with tmpData:"),tmpContextualRecord);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT SolveByReference [fTemplateRender]::[".concat(pSolveParams,"]"));}var tmpEquation=this.pict.resolveStateFromAddress(tmpEquationAddress,tmpContextualRecord,pContextArray,null,pScope);if(!tmpEquation){if(this.pict.LogNoisiness>2){this.log.warn("Pict: SolveByReference: Equation not found for [".concat(tmpEquationAddress,"]"));}return'';}var tmpRecord=tmpRecordAddress&&this.pict.resolveStateFromAddress(tmpRecordAddress,tmpContextualRecord,pContextArray,null,pScope)||tmpContextualRecord;var tmpManifest=tmpManifestAddress&&this.pict.resolveStateFromAddress(tmpManifestAddress,tmpContextualRecord,pContextArray,null,pScope)||this.pict.manifest;var expressionParser=this.fable.instantiateServiceProviderIfNotExists('ExpressionParser');var tmpResultObject={};return expressionParser.solve(tmpEquation,tmpRecord,tmpResultObject,tmpManifest,tmpRecord);}}]);}(libPictTemplate);module.exports=PictTemplateProviderSolveByReference;},{"pict-template":143}],216:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplate=/*#__PURE__*/function(_libPictTemplate7){/**
6252
+ */_inherits(PictTemplateProviderSolveByReference,_libPictTemplate6);return _createClass2(PictTemplateProviderSolveByReference,[{key:"render",value:function render(pSolveParams,pRecord,pContextArray,pScope,pState){// {~SBR:AppData.Equation:AppData.HomeworkRectangleSize:AppData.HomeworkManifest~}
6253
+ var _pSolveParams$trim$sp=pSolveParams.trim().split(':',3),_pSolveParams$trim$sp2=_slicedToArray(_pSolveParams$trim$sp,3),tmpEquationAddress=_pSolveParams$trim$sp2[0],tmpRecordAddress=_pSolveParams$trim$sp2[1],tmpManifestAddress=_pSolveParams$trim$sp2[2];var tmpContextualRecord=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT SolveByReference [fTemplateRender]::[".concat(pSolveParams,"] with tmpData:"),tmpContextualRecord);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT SolveByReference [fTemplateRender]::[".concat(pSolveParams,"]"));}var tmpEquation=this.pict.resolveStateFromAddress(tmpEquationAddress,tmpContextualRecord,pContextArray,null,pScope,pState);if(!tmpEquation){if(this.pict.LogNoisiness>2){this.log.warn("Pict: SolveByReference: Equation not found for [".concat(tmpEquationAddress,"]"));}return'';}var tmpRecord=tmpRecordAddress&&this.pict.resolveStateFromAddress(tmpRecordAddress,tmpContextualRecord,pContextArray,null,pScope,pState)||tmpContextualRecord;var tmpManifest=tmpManifestAddress&&this.pict.resolveStateFromAddress(tmpManifestAddress,tmpContextualRecord,pContextArray,null,pScope,pState)||this.pict.manifest;var expressionParser=this.fable.instantiateServiceProviderIfNotExists('ExpressionParser');var tmpResultObject={};return expressionParser.solve(tmpEquation,tmpRecord,tmpResultObject,tmpManifest,tmpRecord);}}]);}(libPictTemplate);module.exports=PictTemplateProviderSolveByReference;},{"pict-template":143}],216:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplate=/*#__PURE__*/function(_libPictTemplate7){/**
6152
6254
  * @param {Object} pFable - The Fable Framework instance
6153
6255
  * @param {Object} pOptions - The options for the service
6154
6256
  * @param {String} pServiceHash - The hash of the service
6155
- */function PictTemplateProviderTemplate(pFable,pOptions,pServiceHash){var _this100;_classCallCheck2(this,PictTemplateProviderTemplate);_this100=_callSuper(this,PictTemplateProviderTemplate,[pFable,pOptions,pServiceHash]);/** @type {any} */_this100.log;_this100.addPattern('{~Template:','~}');_this100.addPattern('{~T:','~}');return _this100;}/**
6257
+ */function PictTemplateProviderTemplate(pFable,pOptions,pServiceHash){var _this101;_classCallCheck2(this,PictTemplateProviderTemplate);_this101=_callSuper(this,PictTemplateProviderTemplate,[pFable,pOptions,pServiceHash]);/** @type {any} */_this101.log;_this101.addPattern('{~Template:','~}');_this101.addPattern('{~T:','~}');return _this101;}/**
6156
6258
  * Render a template expression, returning a string with the resulting content.
6157
6259
  *
6158
6260
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6159
6261
  * @param {any} pRecord - The json object to be used as the Record for the template render
6160
6262
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6161
6263
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6264
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6162
6265
  *
6163
6266
  * @return {string} The rendered template
6164
- */_inherits(PictTemplateProviderTemplate,_libPictTemplate7);return _createClass2(PictTemplateProviderTemplate,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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)
6267
+ */_inherits(PictTemplateProviderTemplate,_libPictTemplate7);return _createClass2(PictTemplateProviderTemplate,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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)
6165
6268
  var tmpHashTemplateSeparator=tmpHash.indexOf(':');tmpTemplateHash=tmpHash.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpHash.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateHash=tmpHash;}// No template hash
6166
6269
  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.
6167
- return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray,pScope);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope),null,pContextArray,pScope);}}/**
6270
+ return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray,pScope,pState);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope,pState),null,pContextArray,pScope,pState);}}/**
6168
6271
  * Render a template expression, deliver a string with the resulting content to a callback function.
6169
6272
  *
6170
6273
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
@@ -6172,29 +6275,31 @@ return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray,
6172
6275
  * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
6173
6276
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6174
6277
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6278
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6175
6279
  *
6176
6280
  * @return {void}
6177
- */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope){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)
6281
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope,pState){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)
6178
6282
  var tmpHashTemplateSeparator=tmpHash.indexOf(':');tmpTemplateHash=tmpHash.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpHash.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateHash=tmpHash;}// No template hash
6179
6283
  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.
6180
6284
  // The async portion of this is a mind bender because of how entry can happen dynamically from templates
6181
- this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplate;},{"pict-template":143}],217:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateByDataAddress=/*#__PURE__*/function(_libPictTemplate8){/**
6285
+ this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope,pState),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplate;},{"pict-template":143}],217:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateByDataAddress=/*#__PURE__*/function(_libPictTemplate8){/**
6182
6286
  * @param {Object} pFable - The Fable Framework instance
6183
6287
  * @param {Object} pOptions - The options for the service
6184
6288
  * @param {String} pServiceHash - The hash of the service
6185
- */function PictTemplateProviderTemplateByDataAddress(pFable,pOptions,pServiceHash){var _this101;_classCallCheck2(this,PictTemplateProviderTemplateByDataAddress);_this101=_callSuper(this,PictTemplateProviderTemplateByDataAddress,[pFable,pOptions,pServiceHash]);/** @type {any} */_this101.log;_this101.addPattern('{~TemplateByDataAddress:','~}');_this101.addPattern('{~TBDA:','~}');return _this101;}/**
6289
+ */function PictTemplateProviderTemplateByDataAddress(pFable,pOptions,pServiceHash){var _this102;_classCallCheck2(this,PictTemplateProviderTemplateByDataAddress);_this102=_callSuper(this,PictTemplateProviderTemplateByDataAddress,[pFable,pOptions,pServiceHash]);/** @type {any} */_this102.log;_this102.addPattern('{~TemplateByDataAddress:','~}');_this102.addPattern('{~TBDA:','~}');return _this102;}/**
6186
6290
  * Render a template expression, returning a string with the resulting content.
6187
6291
  *
6188
6292
  * @param {string} pTemplateDataAddress - The hash contents of the template (what's between the template start and stop tags)
6189
6293
  * @param {any} pRecord - The json object to be used as the Record for the template render
6190
6294
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6191
6295
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6296
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6192
6297
  *
6193
6298
  * @return {string} The rendered template
6194
- */_inherits(PictTemplateProviderTemplateByDataAddress,_libPictTemplate8);return _createClass2(PictTemplateProviderTemplateByDataAddress,[{key:"render",value:function render(pTemplateDataAddress,pRecord,pContextArray,pScope){var tmpDataAddress=pTemplateDataAddress.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateByDataAddress [fTemplateRender]::[".concat(tmpDataAddress,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateByDataAddress [fTemplateRender]::[".concat(tmpDataAddress,"]"));}var tmpTemplateDataAddress;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
6299
+ */_inherits(PictTemplateProviderTemplateByDataAddress,_libPictTemplate8);return _createClass2(PictTemplateProviderTemplateByDataAddress,[{key:"render",value:function render(pTemplateDataAddress,pRecord,pContextArray,pScope,pState){var tmpDataAddress=pTemplateDataAddress.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateByDataAddress [fTemplateRender]::[".concat(tmpDataAddress,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateByDataAddress [fTemplateRender]::[".concat(tmpDataAddress,"]"));}var tmpTemplateDataAddress;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
6195
6300
  var tmpHashTemplateSeparator=tmpDataAddress.indexOf(':');tmpTemplateDataAddress=tmpDataAddress.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpDataAddress.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateDataAddress=tmpDataAddress;}// No template hash
6196
- if(!tmpTemplateDataAddress){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpDataAddress,"]"));return'';}var tmpTemplate=this.pict.resolveStateFromAddress(tmpTemplateDataAddress,pRecord,pContextArray,null,pScope);if(!tmpTemplate){if(this.pict.LogNoisiness>2){this.log.warn("Pict: Template Render: Template not found for [".concat(tmpTemplateDataAddress,"]"));}tmpTemplate='';}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
6197
- return this.pict.parseTemplate(tmpTemplate,pRecord,null,pContextArray,pScope);}else{return this.pict.parseTemplate(tmpTemplate,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope),null,pContextArray);}}/**
6301
+ if(!tmpTemplateDataAddress){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpDataAddress,"]"));return'';}var tmpTemplate=this.pict.resolveStateFromAddress(tmpTemplateDataAddress,pRecord,pContextArray,null,pScope,pState);if(!tmpTemplate){if(this.pict.LogNoisiness>2){this.log.warn("Pict: Template Render: Template not found for [".concat(tmpTemplateDataAddress,"]"));}tmpTemplate='';}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
6302
+ return this.pict.parseTemplate(tmpTemplate,pRecord,null,pContextArray,pScope,pState);}else{return this.pict.parseTemplate(tmpTemplate,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope,pState),null,pContextArray,pScope,pState);}}/**
6198
6303
  * Render a template expression, deliver a string with the resulting content to a callback function.
6199
6304
  *
6200
6305
  * @param {string} pTemplateDataAddress - The hash contents of the template (what's between the template start and stop tags)
@@ -6202,31 +6307,33 @@ return this.pict.parseTemplate(tmpTemplate,pRecord,null,pContextArray,pScope);}e
6202
6307
  * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
6203
6308
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6204
6309
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6310
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6205
6311
  *
6206
6312
  * @return {void}
6207
- */},{key:"renderAsync",value:function renderAsync(pTemplateDataAddress,pRecord,fCallback,pContextArray,pScope){var tmpDataAddress=pTemplateDataAddress.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateByDataAddress [fTemplateRenderAsync]::[".concat(tmpDataAddress,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateByDataAddress [fTemplateRenderAsync]::[".concat(tmpDataAddress,"]"));}var tmpTemplateDataAddress;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
6313
+ */},{key:"renderAsync",value:function renderAsync(pTemplateDataAddress,pRecord,fCallback,pContextArray,pScope,pState){var tmpDataAddress=pTemplateDataAddress.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateByDataAddress [fTemplateRenderAsync]::[".concat(tmpDataAddress,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateByDataAddress [fTemplateRenderAsync]::[".concat(tmpDataAddress,"]"));}var tmpTemplateDataAddress;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
6208
6314
  var tmpHashTemplateSeparator=tmpDataAddress.indexOf(':');tmpTemplateDataAddress=tmpDataAddress.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpDataAddress.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateDataAddress=tmpDataAddress;}// No template hash
6209
- if(!tmpTemplateDataAddress){this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(tmpDataAddress,"]"));return tmpCallback(null,'');}var tmpTemplate=this.pict.resolveStateFromAddress(tmpTemplateDataAddress,pRecord,pContextArray,null,pScope)||'';if(!tmpTemplate){if(this.pict.LogNoisiness>2){this.log.warn("Pict: Template Render: Template not found for [".concat(tmpTemplateDataAddress,"]"));}tmpTemplate='';}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
6315
+ if(!tmpTemplateDataAddress){this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(tmpDataAddress,"]"));return tmpCallback(null,'');}var tmpTemplate=this.pict.resolveStateFromAddress(tmpTemplateDataAddress,pRecord,pContextArray,null,pScope,pState)||'';if(!tmpTemplate){if(this.pict.LogNoisiness>2){this.log.warn("Pict: Template Render: Template not found for [".concat(tmpTemplateDataAddress,"]"));}tmpTemplate='';}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
6210
6316
  // The async portion of this is a mind bender because of how entry can happen dynamically from templates
6211
- this.pict.parseTemplate(tmpTemplate,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}else{this.pict.parseTemplate(tmpTemplate,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateByDataAddress;},{"pict-template":143}],218:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplate=/*#__PURE__*/function(_libPictTemplate9){/**
6317
+ this.pict.parseTemplate(tmpTemplate,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}else{this.pict.parseTemplate(tmpTemplate,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope,pState),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateByDataAddress;},{"pict-template":143}],218:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplate=/*#__PURE__*/function(_libPictTemplate9){/**
6212
6318
  * @param {Object} pFable - The Fable Framework instance
6213
6319
  * @param {Object} pOptions - The options for the service
6214
6320
  * @param {String} pServiceHash - The hash of the service
6215
- */function PictTemplateProviderTemplate(pFable,pOptions,pServiceHash){var _this102;_classCallCheck2(this,PictTemplateProviderTemplate);_this102=_callSuper(this,PictTemplateProviderTemplate,[pFable,pOptions,pServiceHash]);/** @type {any} */_this102.log;_this102.addPattern('{~TemplateByReference:','~}');_this102.addPattern('{~TBR:','~}');return _this102;}/**
6321
+ */function PictTemplateProviderTemplate(pFable,pOptions,pServiceHash){var _this103;_classCallCheck2(this,PictTemplateProviderTemplate);_this103=_callSuper(this,PictTemplateProviderTemplate,[pFable,pOptions,pServiceHash]);/** @type {any} */_this103.log;_this103.addPattern('{~TemplateByReference:','~}');_this103.addPattern('{~TBR:','~}');return _this103;}/**
6216
6322
  * Render a template expression, returning a string with the resulting content.
6217
6323
  *
6218
6324
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6219
6325
  * @param {any} pRecord - The json object to be used as the Record for the template render
6220
6326
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6221
6327
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6328
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6222
6329
  *
6223
6330
  * @return {string} The rendered template
6224
- */_inherits(PictTemplateProviderTemplate,_libPictTemplate9);return _createClass2(PictTemplateProviderTemplate,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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)
6331
+ */_inherits(PictTemplateProviderTemplate,_libPictTemplate9);return _createClass2(PictTemplateProviderTemplate,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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)
6225
6332
  var tmpHashTemplateSeparator=tmpHash.indexOf(':');tmpTemplateHashReferenceLocation=tmpHash.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpHash.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateHashReferenceLocation=tmpHash;}// No template hash
6226
6333
  if(!tmpTemplateHashReferenceLocation){this.log.warn("Pict: Template Render: TemplateHashReferenceLocation not resolved for [".concat(tmpHash,"]"));return'';}// Now look up the template by the reference
6227
- var tmpTemplateHash=this.resolveStateFromAddress(tmpTemplateHashReferenceLocation,pRecord,pContextArray,null,pScope);// No template hash
6334
+ var tmpTemplateHash=this.resolveStateFromAddress(tmpTemplateHashReferenceLocation,pRecord,pContextArray,null,pScope,pState);// No template hash
6228
6335
  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.
6229
- return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray,pScope);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope),null,pContextArray,pScope);}}/**
6336
+ return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray,pScope,pState);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope,pState),null,pContextArray,pScope,pState);}}/**
6230
6337
  * Render a template expression, deliver a string with the resulting content to a callback function.
6231
6338
  *
6232
6339
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
@@ -6234,32 +6341,34 @@ return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray,
6234
6341
  * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
6235
6342
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6236
6343
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6344
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6237
6345
  *
6238
6346
  * @return {void}
6239
- */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope){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)
6347
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope,pState){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)
6240
6348
  var tmpHashTemplateSeparator=tmpHash.indexOf(':');tmpTemplateHashReferenceLocation=tmpHash.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpHash.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateHashReferenceLocation=tmpHash;}// No template hash
6241
6349
  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
6242
- var tmpTemplateHash=this.resolveStateFromAddress(tmpTemplateHashReferenceLocation,pRecord,pContextArray,null,pScope);// No template hash
6350
+ var tmpTemplateHash=this.resolveStateFromAddress(tmpTemplateHashReferenceLocation,pRecord,pContextArray,null,pScope,pState);// No template hash
6243
6351
  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.
6244
6352
  // The async portion of this is a mind bender because of how entry can happen dynamically from templates
6245
- this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplate;},{"pict-template":143}],219:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateFromMap=/*#__PURE__*/function(_libPictTemplate0){/**
6353
+ this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope,pState),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplate;},{"pict-template":143}],219:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateFromMap=/*#__PURE__*/function(_libPictTemplate0){/**
6246
6354
  * @param {Object} pFable - The Fable Framework instance
6247
6355
  * @param {Object} pOptions - The options for the service
6248
6356
  * @param {String} pServiceHash - The hash of the service
6249
- */function PictTemplateProviderTemplateFromMap(pFable,pOptions,pServiceHash){var _this103;_classCallCheck2(this,PictTemplateProviderTemplateFromMap);_this103=_callSuper(this,PictTemplateProviderTemplateFromMap,[pFable,pOptions,pServiceHash]);/** @type {any} */_this103.log;_this103.addPattern('{~TFM:','~}');_this103.addPattern('{~TemplateFromMap:','~}');return _this103;}/**
6357
+ */function PictTemplateProviderTemplateFromMap(pFable,pOptions,pServiceHash){var _this104;_classCallCheck2(this,PictTemplateProviderTemplateFromMap);_this104=_callSuper(this,PictTemplateProviderTemplateFromMap,[pFable,pOptions,pServiceHash]);/** @type {any} */_this104.log;_this104.addPattern('{~TFM:','~}');_this104.addPattern('{~TemplateFromMap:','~}');return _this104;}/**
6250
6358
  * Render a template expression, returning a string with the resulting content.
6251
6359
  *
6252
6360
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6253
6361
  * @param {any} pRecord - The json object to be used as the Record for the template render
6254
6362
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6255
6363
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6364
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6256
6365
  *
6257
6366
  * @return {string} The rendered template
6258
- */_inherits(PictTemplateProviderTemplateFromMap,_libPictTemplate0);return _createClass2(PictTemplateProviderTemplateFromMap,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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
6367
+ */_inherits(PictTemplateProviderTemplateFromMap,_libPictTemplate0);return _createClass2(PictTemplateProviderTemplateFromMap,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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
6259
6368
  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
6260
6369
  if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return'';}// Now resolve the data
6261
- var tmpMap=this.resolveStateFromAddress(tmpAddressOfMap,tmpData,pContextArray,null,pScope);var tmpKey=this.resolveStateFromAddress(tmpAddressOfKey,tmpData,pContextArray,null,pScope);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.
6262
- return this.pict.parseTemplateByHash(tmpTemplateFromMapHash,pRecord,null,pContextArray,pScope);}else{return this.pict.parseTemplateByHash(tmpTemplateFromMapHash,tmpData,null,pContextArray,pScope);}}/**
6370
+ var tmpMap=this.resolveStateFromAddress(tmpAddressOfMap,tmpData,pContextArray,null,pScope,pState);var tmpKey=this.resolveStateFromAddress(tmpAddressOfKey,tmpData,pContextArray,null,pScope,pState);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.
6371
+ return this.pict.parseTemplateByHash(tmpTemplateFromMapHash,pRecord,null,pContextArray,pScope,pState);}else{return this.pict.parseTemplateByHash(tmpTemplateFromMapHash,tmpData,null,pContextArray,pScope,pState);}}/**
6263
6372
  * Render a template expression, deliver a string with the resulting content to a callback function.
6264
6373
  *
6265
6374
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
@@ -6267,30 +6376,32 @@ return this.pict.parseTemplateByHash(tmpTemplateFromMapHash,pRecord,null,pContex
6267
6376
  * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
6268
6377
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6269
6378
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6379
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6270
6380
  *
6271
6381
  * @return {void}
6272
- */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope){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
6382
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope,pState){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
6273
6383
  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
6274
6384
  if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
6275
- var tmpMap=this.resolveStateFromAddress(tmpAddressOfMap,tmpData,pContextArray,null,pScope);var tmpKey=this.resolveStateFromAddress(tmpAddressOfKey,tmpData,pContextArray,null,pScope);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.
6385
+ var tmpMap=this.resolveStateFromAddress(tmpAddressOfMap,tmpData,pContextArray,null,pScope,pState);var tmpKey=this.resolveStateFromAddress(tmpAddressOfKey,tmpData,pContextArray,null,pScope,pState);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.
6276
6386
  // The async portion of this is a mind bender because of how entry can happen dynamically from TemplateFromMaps
6277
- this.pict.parseTemplateByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}else{this.pict.parseTemplateByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateFromMap;},{"pict-template":143}],220:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateSet=/*#__PURE__*/function(_libPictTemplate1){/**
6387
+ this.pict.parseTemplateByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}else{this.pict.parseTemplateByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateFromMap;},{"pict-template":143}],220:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateSet=/*#__PURE__*/function(_libPictTemplate1){/**
6278
6388
  * @param {Object} pFable - The Fable Framework instance
6279
6389
  * @param {Object} pOptions - The options for the service
6280
6390
  * @param {String} pServiceHash - The hash of the service
6281
- */function PictTemplateProviderTemplateSet(pFable,pOptions,pServiceHash){var _this104;_classCallCheck2(this,PictTemplateProviderTemplateSet);_this104=_callSuper(this,PictTemplateProviderTemplateSet,[pFable,pOptions,pServiceHash]);/** @type {any} */_this104.log;_this104.addPattern('{~TemplateSet:','~}');_this104.addPattern('{~TS:','~}');return _this104;}/**
6391
+ */function PictTemplateProviderTemplateSet(pFable,pOptions,pServiceHash){var _this105;_classCallCheck2(this,PictTemplateProviderTemplateSet);_this105=_callSuper(this,PictTemplateProviderTemplateSet,[pFable,pOptions,pServiceHash]);/** @type {any} */_this105.log;_this105.addPattern('{~TemplateSet:','~}');_this105.addPattern('{~TS:','~}');return _this105;}/**
6282
6392
  * Render a template expression, returning a string with the resulting content.
6283
6393
  *
6284
6394
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6285
6395
  * @param {any} pRecord - The json object to be used as the Record for the template render
6286
6396
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6287
6397
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6398
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6288
6399
  *
6289
6400
  * @return {string} The rendered template
6290
- */_inherits(PictTemplateProviderTemplateSet,_libPictTemplate1);return _createClass2(PictTemplateProviderTemplateSet,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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)
6401
+ */_inherits(PictTemplateProviderTemplateSet,_libPictTemplate1);return _createClass2(PictTemplateProviderTemplateSet,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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)
6291
6402
  var tmpHashTemplateSeparator=tmpHash.indexOf(':');tmpTemplateHash=tmpHash.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpHash.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateHash=tmpHash;}// No template hash
6292
6403
  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.
6293
- return this.pict.parseTemplateSetByHash(tmpTemplateHash,pRecord,null,pContextArray,pScope);}else{return this.pict.parseTemplateSetByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope),null,pContextArray,pScope);}}/**
6404
+ return this.pict.parseTemplateSetByHash(tmpTemplateHash,pRecord,null,pContextArray,pScope,pState);}else{return this.pict.parseTemplateSetByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope,pState),null,pContextArray,pScope,pState);}}/**
6294
6405
  * Render a template expression, deliver a string with the resulting content to a callback function.
6295
6406
  *
6296
6407
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
@@ -6298,31 +6409,33 @@ return this.pict.parseTemplateSetByHash(tmpTemplateHash,pRecord,null,pContextArr
6298
6409
  * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
6299
6410
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6300
6411
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6412
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6301
6413
  *
6302
6414
  * @return {void}
6303
- */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope){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
6415
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope,pState){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
6304
6416
  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
6305
6417
  if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
6306
- tmpData=this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope);if(!tmpData){// No address was provided, just render the template with what this template has.
6418
+ tmpData=this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope,pState);if(!tmpData){// No address was provided, just render the template with what this template has.
6307
6419
  // The async portion of this is a mind bender because of how entry can happen dynamically from templates
6308
- this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}else{this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSet;},{"pict-template":143}],221:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateSetFromMap=/*#__PURE__*/function(_libPictTemplate10){/**
6420
+ this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}else{this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSet;},{"pict-template":143}],221:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateSetFromMap=/*#__PURE__*/function(_libPictTemplate10){/**
6309
6421
  * @param {Object} pFable - The Fable Framework instance
6310
6422
  * @param {Object} pOptions - The options for the service
6311
6423
  * @param {String} pServiceHash - The hash of the service
6312
- */function PictTemplateProviderTemplateSetFromMap(pFable,pOptions,pServiceHash){var _this105;_classCallCheck2(this,PictTemplateProviderTemplateSetFromMap);_this105=_callSuper(this,PictTemplateProviderTemplateSetFromMap,[pFable,pOptions,pServiceHash]);/** @type {any} */_this105.log;_this105.addPattern('{~TSFM:','~}');_this105.addPattern('{~TemplateSetFromMap:','~}');return _this105;}/**
6424
+ */function PictTemplateProviderTemplateSetFromMap(pFable,pOptions,pServiceHash){var _this106;_classCallCheck2(this,PictTemplateProviderTemplateSetFromMap);_this106=_callSuper(this,PictTemplateProviderTemplateSetFromMap,[pFable,pOptions,pServiceHash]);/** @type {any} */_this106.log;_this106.addPattern('{~TSFM:','~}');_this106.addPattern('{~TemplateSetFromMap:','~}');return _this106;}/**
6313
6425
  * Render a template expression, returning a string with the resulting content.
6314
6426
  *
6315
6427
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6316
6428
  * @param {any} pRecord - The json object to be used as the Record for the template render
6317
6429
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6318
6430
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6431
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6319
6432
  *
6320
6433
  * @return {string} The rendered template
6321
- */_inherits(PictTemplateProviderTemplateSetFromMap,_libPictTemplate10);return _createClass2(PictTemplateProviderTemplateSetFromMap,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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
6434
+ */_inherits(PictTemplateProviderTemplateSetFromMap,_libPictTemplate10);return _createClass2(PictTemplateProviderTemplateSetFromMap,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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
6322
6435
  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
6323
6436
  if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return'';}// Now resolve the data
6324
- var tmpMap=this.resolveStateFromAddress(tmpAddressOfMap,tmpData,pContextArray,null,pScope);var tmpKey=this.resolveStateFromAddress(tmpAddressOfKey,tmpData,pContextArray,null,pScope);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.
6325
- return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,null,pContextArray,pScope);}else{return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,null,pContextArray,pScope);}}/**
6437
+ var tmpMap=this.resolveStateFromAddress(tmpAddressOfMap,tmpData,pContextArray,null,pScope,pState);var tmpKey=this.resolveStateFromAddress(tmpAddressOfKey,tmpData,pContextArray,null,pScope,pState);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.
6438
+ return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,null,pContextArray,pScope,pState);}else{return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,null,pContextArray,pScope,pState);}}/**
6326
6439
  * Render a template expression, deliver a string with the resulting content to a callback function.
6327
6440
  *
6328
6441
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
@@ -6330,28 +6443,30 @@ return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,null,pCon
6330
6443
  * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
6331
6444
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6332
6445
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6446
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6333
6447
  *
6334
6448
  * @return {void}
6335
- */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope){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
6449
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope,pState){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
6336
6450
  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
6337
6451
  if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMapSet Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
6338
- var tmpMap=this.resolveStateFromAddress(tmpAddressOfMap,tmpData,pContextArray,null,pScope);var tmpKey=this.resolveStateFromAddress(tmpAddressOfKey,tmpData,pContextArray,null,pScope);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.
6452
+ var tmpMap=this.resolveStateFromAddress(tmpAddressOfMap,tmpData,pContextArray,null,pScope,pState);var tmpKey=this.resolveStateFromAddress(tmpAddressOfKey,tmpData,pContextArray,null,pScope,pState);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.
6339
6453
  // The async portion of this is a mind bender because of how entry can happen dynamically from TemplateFromMaps
6340
- this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}else{this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSetFromMap;},{"pict-template":143}],222:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateSetWithPayload=/*#__PURE__*/function(_libPictTemplate11){/**
6454
+ this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}else{this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSetFromMap;},{"pict-template":143}],222:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateSetWithPayload=/*#__PURE__*/function(_libPictTemplate11){/**
6341
6455
  * @param {Object} pFable - The Fable Framework instance
6342
6456
  * @param {Object} pOptions - The options for the service
6343
6457
  * @param {String} pServiceHash - The hash of the service
6344
- */function PictTemplateProviderTemplateSetWithPayload(pFable,pOptions,pServiceHash){var _this106;_classCallCheck2(this,PictTemplateProviderTemplateSetWithPayload);_this106=_callSuper(this,PictTemplateProviderTemplateSetWithPayload,[pFable,pOptions,pServiceHash]);/** @type {any} */_this106.log;_this106.addPattern('{~TemplateSetWithPayload:','~}');_this106.addPattern('{~TSWP:','~}');return _this106;}/**
6458
+ */function PictTemplateProviderTemplateSetWithPayload(pFable,pOptions,pServiceHash){var _this107;_classCallCheck2(this,PictTemplateProviderTemplateSetWithPayload);_this107=_callSuper(this,PictTemplateProviderTemplateSetWithPayload,[pFable,pOptions,pServiceHash]);/** @type {any} */_this107.log;_this107.addPattern('{~TemplateSetWithPayload:','~}');_this107.addPattern('{~TSWP:','~}');return _this107;}/**
6345
6459
  * Render a template expression, returning a string with the resulting content.
6346
6460
  *
6347
6461
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6348
6462
  * @param {any} pRecord - The json object to be used as the Record for the template render
6349
6463
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6350
6464
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6465
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6351
6466
  *
6352
6467
  * @return {string} The rendered template
6353
- */_inherits(PictTemplateProviderTemplateSetWithPayload,_libPictTemplate11);return _createClass2(PictTemplateProviderTemplateSetWithPayload,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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)
6354
- 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,null,pScope);if(!tmpData){tmpData=pRecord;}if(!tmpData){tmpData={};}var tmpPayloadData=this.resolveStateFromAddress(tmpAddressOfPayload,pRecord,pContextArray,null,pScope);if(!tmpPayloadData){tmpPayloadData=pRecord;}if(!tmpPayloadData){tmpPayloadData={};}return this.pict.parseTemplateSetWithPayloadByHash(tmpTemplateHash,tmpData,tmpPayloadData,null,pContextArray,pScope);}/**
6468
+ */_inherits(PictTemplateProviderTemplateSetWithPayload,_libPictTemplate11);return _createClass2(PictTemplateProviderTemplateSetWithPayload,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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)
6469
+ 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,null,pScope,pState);if(!tmpData){tmpData=pRecord;}if(!tmpData){tmpData={};}var tmpPayloadData=this.resolveStateFromAddress(tmpAddressOfPayload,pRecord,pContextArray,null,pScope,pState);if(!tmpPayloadData){tmpPayloadData=pRecord;}if(!tmpPayloadData){tmpPayloadData={};}return this.pict.parseTemplateSetWithPayloadByHash(tmpTemplateHash,tmpData,tmpPayloadData,null,pContextArray,pScope,pState);}/**
6355
6470
  * Render a template expression, deliver a string with the resulting content to a callback function.
6356
6471
  *
6357
6472
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
@@ -6359,26 +6474,28 @@ var tmpTemplateHashes=tmpHash.trim().split(':');if(tmpTemplateHashes.length<3){t
6359
6474
  * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
6360
6475
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6361
6476
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6477
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6362
6478
  *
6363
6479
  * @return {void}
6364
- */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope){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)
6365
- 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,null,pScope);if(!tmpData){tmpData=pRecord;}if(!tmpData){tmpData={};}var tmpPayloadData=this.resolveStateFromAddress(tmpAddressOfPayload,pRecord,pContextArray,null,pScope);if(!tmpPayloadData){tmpPayloadData=pRecord;}if(!tmpPayloadData){tmpPayloadData={};}this.pict.parseTemplateSetWithPayloadByHash(tmpTemplateHash,tmpData,tmpPayloadData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSetWithPayload;},{"pict-template":143}],223:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateValueSet=/*#__PURE__*/function(_libPictTemplate12){/**
6480
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope,pState){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)
6481
+ 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,null,pScope,pState);if(!tmpData){tmpData=pRecord;}if(!tmpData){tmpData={};}var tmpPayloadData=this.resolveStateFromAddress(tmpAddressOfPayload,pRecord,pContextArray,null,pScope,pState);if(!tmpPayloadData){tmpPayloadData=pRecord;}if(!tmpPayloadData){tmpPayloadData={};}this.pict.parseTemplateSetWithPayloadByHash(tmpTemplateHash,tmpData,tmpPayloadData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSetWithPayload;},{"pict-template":143}],223:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateValueSet=/*#__PURE__*/function(_libPictTemplate12){/**
6366
6482
  * @param {Object} pFable - The Fable Framework instance
6367
6483
  * @param {Object} pOptions - The options for the service
6368
6484
  * @param {String} pServiceHash - The hash of the service
6369
- */function PictTemplateProviderTemplateValueSet(pFable,pOptions,pServiceHash){var _this107;_classCallCheck2(this,PictTemplateProviderTemplateValueSet);_this107=_callSuper(this,PictTemplateProviderTemplateValueSet,[pFable,pOptions,pServiceHash]);/** @type {any} */_this107.log;_this107.addPattern('{~TemplateValueSet:','~}');_this107.addPattern('{~TVS:','~}');return _this107;}/**
6485
+ */function PictTemplateProviderTemplateValueSet(pFable,pOptions,pServiceHash){var _this108;_classCallCheck2(this,PictTemplateProviderTemplateValueSet);_this108=_callSuper(this,PictTemplateProviderTemplateValueSet,[pFable,pOptions,pServiceHash]);/** @type {any} */_this108.log;_this108.addPattern('{~TemplateValueSet:','~}');_this108.addPattern('{~TVS:','~}');return _this108;}/**
6370
6486
  * Render a template expression, returning a string with the resulting content.
6371
6487
  *
6372
6488
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6373
6489
  * @param {any} pRecord - The json object to be used as the Record for the template render
6374
6490
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6375
6491
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6492
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6376
6493
  *
6377
6494
  * @return {string} The rendered template
6378
- */_inherits(PictTemplateProviderTemplateValueSet,_libPictTemplate12);return _createClass2(PictTemplateProviderTemplateValueSet,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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)
6495
+ */_inherits(PictTemplateProviderTemplateValueSet,_libPictTemplate12);return _createClass2(PictTemplateProviderTemplateValueSet,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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)
6379
6496
  var tmpHashTemplateSeparator=tmpHash.indexOf(':');tmpTemplateHash=tmpHash.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpHash.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateHash=tmpHash;}// No template hash
6380
- if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return'';}tmpData=this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope);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 _i69=0;_i69<tmpValueKeys.length;_i69++){tmpDataValueSet.push({Value:tmpData[tmpValueKeys[_i69]],Key:tmpValueKeys[_i69]});}}else{tmpDataValueSet.push({Value:tmpData});}tmpData=tmpDataValueSet;if(!tmpData){// No address was provided, just render the template with what this template has.
6381
- return this.pict.parseTemplateSetByHash(tmpTemplateHash,pRecord,null,pContextArray,pScope);}else{return this.pict.parseTemplateSetByHash(tmpTemplateHash,tmpData,null,pContextArray,pScope);}}/**
6497
+ if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return'';}tmpData=this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope,pState);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 _i69=0;_i69<tmpValueKeys.length;_i69++){tmpDataValueSet.push({Value:tmpData[tmpValueKeys[_i69]],Key:tmpValueKeys[_i69]});}}else{tmpDataValueSet.push({Value:tmpData});}tmpData=tmpDataValueSet;if(!tmpData){// No address was provided, just render the template with what this template has.
6498
+ return this.pict.parseTemplateSetByHash(tmpTemplateHash,pRecord,null,pContextArray,pScope,pState);}else{return this.pict.parseTemplateSetByHash(tmpTemplateHash,tmpData,null,pContextArray,pScope,pState);}}/**
6382
6499
  * Render a template expression, deliver a string with the resulting content to a callback function.
6383
6500
  *
6384
6501
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
@@ -6386,27 +6503,29 @@ return this.pict.parseTemplateSetByHash(tmpTemplateHash,pRecord,null,pContextArr
6386
6503
  * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
6387
6504
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6388
6505
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6506
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6389
6507
  *
6390
6508
  * @return {void}
6391
- */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope){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
6509
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope,pState){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
6392
6510
  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
6393
6511
  if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
6394
- tmpData=this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope);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 _i70=0;_i70<tmpValueKeys.length;_i70++){tmpDataValueSet.push({Value:tmpData[tmpValueKeys[_i70]],Key:tmpData[tmpValueKeys[_i70]]});}}else{tmpDataValueSet.push({Value:tmpData});}tmpData=tmpDataValueSet;if(!tmpData){// No address was provided, just render the template with what this template has.
6512
+ tmpData=this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope,pState);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 _i70=0;_i70<tmpValueKeys.length;_i70++){tmpDataValueSet.push({Value:tmpData[tmpValueKeys[_i70]],Key:tmpData[tmpValueKeys[_i70]]});}}else{tmpDataValueSet.push({Value:tmpData});}tmpData=tmpDataValueSet;if(!tmpData){// No address was provided, just render the template with what this template has.
6395
6513
  // The async portion of this is a mind bender because of how entry can happen dynamically from templates
6396
- this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}else{this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateValueSet;},{"pict-template":143}],224:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderView=/*#__PURE__*/function(_libPictTemplate13){/**
6514
+ this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}else{this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateValueSet;},{"pict-template":143}],224:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderView=/*#__PURE__*/function(_libPictTemplate13){/**
6397
6515
  * @param {Object} pFable - The Fable Framework instance
6398
6516
  * @param {Object} pOptions - The options for the service
6399
6517
  * @param {String} pServiceHash - The hash of the service
6400
- */function PictTemplateProviderView(pFable,pOptions,pServiceHash){var _this108;_classCallCheck2(this,PictTemplateProviderView);_this108=_callSuper(this,PictTemplateProviderView,[pFable,pOptions,pServiceHash]);/** @type {any} */_this108.log;_this108.addPattern('{~V:','~}');_this108.addPattern('{~View:','~}');if(!('__TemplateOutputCache'in _this108.pict)){_this108.pict.__TemplateOutputCache={};}return _this108;}/**
6518
+ */function PictTemplateProviderView(pFable,pOptions,pServiceHash){var _this109;_classCallCheck2(this,PictTemplateProviderView);_this109=_callSuper(this,PictTemplateProviderView,[pFable,pOptions,pServiceHash]);/** @type {any} */_this109.log;_this109.addPattern('{~V:','~}');_this109.addPattern('{~View:','~}');if(!('__TemplateOutputCache'in _this109.pict)){_this109.pict.__TemplateOutputCache={};}return _this109;}/**
6401
6519
  * Render a template expression, returning a string with the resulting content.
6402
6520
  *
6403
6521
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6404
6522
  * @param {any} pRecord - The json object to be used as the Record for the template render
6405
6523
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6406
6524
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6525
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6407
6526
  *
6408
6527
  * @return {string} The rendered template
6409
- */_inherits(PictTemplateProviderView,_libPictTemplate13);return _createClass2(PictTemplateProviderView,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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
6528
+ */_inherits(PictTemplateProviderView,_libPictTemplate13);return _createClass2(PictTemplateProviderView,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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();/** @type {import('pict-view')} */var tmpView=this.pict.views[tmpViewHash];tmpView.render('__Virtual',"__TemplateOutputCache.".concat(tmpRenderGUID),pRecord,pState?pState.RootRenderable:undefined);var tmpResult=this.pict.__TemplateOutputCache[tmpRenderGUID];// TODO: Uncomment this when we like how it's working
6410
6529
  //delete this.pict.__TemplateOutputCache[tmpRenderGUID];
6411
6530
  return tmpResult;}/**
6412
6531
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
@@ -6414,76 +6533,82 @@ return tmpResult;}/**
6414
6533
  * @param {(pError?: Error, pResult?: string) => void} fCallback - The callback function to call with the result
6415
6534
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6416
6535
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6536
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6417
6537
  *
6418
6538
  * @return {void}
6419
- */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope){var _this109=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){_this109.log.warn("Pict: View Template Render: Error rendering view [".concat(tmpViewHash,"]"),pError);return fCallback(pError,'');}var tmpResult=_this109.pict.__TemplateOutputCache[tmpRenderGUID];// TODO: Uncomment this when we like how it's working
6539
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope,pState){var _this110=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,pState?pState.RootRenderable:undefined,function(pError,pResult){if(pError){_this110.log.warn("Pict: View Template Render: Error rendering view [".concat(tmpViewHash,"]"),pError);return fCallback(pError,'');}var tmpResult=_this110.pict.__TemplateOutputCache[tmpRenderGUID];// TODO: Uncomment this when we like how it's working
6420
6540
  //delete this.pict.__TemplateOutputCache[tmpRenderGUID];
6421
6541
  return fCallback(null,tmpResult);});}}]);}(libPictTemplate);module.exports=PictTemplateProviderView;},{"pict-template":143}],225:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderRandomNumber=/*#__PURE__*/function(_libPictTemplate14){/**
6422
6542
  * @param {Object} pFable - The Fable Framework instance
6423
6543
  * @param {Object} pOptions - The options for the service
6424
6544
  * @param {String} pServiceHash - The hash of the service
6425
- */function PictTemplateProviderRandomNumber(pFable,pOptions,pServiceHash){var _this110;_classCallCheck2(this,PictTemplateProviderRandomNumber);_this110=_callSuper(this,PictTemplateProviderRandomNumber,[pFable,pOptions,pServiceHash]);/** @type {any} */_this110.log;_this110.addPattern('{~RandomNumber:','~}');_this110.addPattern('{~RN:','~}');return _this110;}/**
6545
+ */function PictTemplateProviderRandomNumber(pFable,pOptions,pServiceHash){var _this111;_classCallCheck2(this,PictTemplateProviderRandomNumber);_this111=_callSuper(this,PictTemplateProviderRandomNumber,[pFable,pOptions,pServiceHash]);/** @type {any} */_this111.log;_this111.addPattern('{~RandomNumber:','~}');_this111.addPattern('{~RN:','~}');return _this111;}/**
6426
6546
  * Render a template expression, returning a string with the resulting content.
6427
6547
  *
6428
6548
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6429
6549
  * @param {any} pRecord - The json object to be used as the Record for the template render
6430
6550
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6431
6551
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6552
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6432
6553
  *
6433
6554
  * @return {string} The rendered template
6434
- */_inherits(PictTemplateProviderRandomNumber,_libPictTemplate14);return _createClass2(PictTemplateProviderRandomNumber,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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}],226:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderRandomNumberString=/*#__PURE__*/function(_libPictTemplate15){/**
6555
+ */_inherits(PictTemplateProviderRandomNumber,_libPictTemplate14);return _createClass2(PictTemplateProviderRandomNumber,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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}],226:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderRandomNumberString=/*#__PURE__*/function(_libPictTemplate15){/**
6435
6556
  * @param {Object} pFable - The Fable Framework instance
6436
6557
  * @param {Object} pOptions - The options for the service
6437
6558
  * @param {String} pServiceHash - The hash of the service
6438
- */function PictTemplateProviderRandomNumberString(pFable,pOptions,pServiceHash){var _this111;_classCallCheck2(this,PictTemplateProviderRandomNumberString);_this111=_callSuper(this,PictTemplateProviderRandomNumberString,[pFable,pOptions,pServiceHash]);/** @type {any} */_this111.log;_this111.addPattern('{~RandomNumberString:','~}');_this111.addPattern('{~RNS:','~}');return _this111;}/**
6559
+ */function PictTemplateProviderRandomNumberString(pFable,pOptions,pServiceHash){var _this112;_classCallCheck2(this,PictTemplateProviderRandomNumberString);_this112=_callSuper(this,PictTemplateProviderRandomNumberString,[pFable,pOptions,pServiceHash]);/** @type {any} */_this112.log;_this112.addPattern('{~RandomNumberString:','~}');_this112.addPattern('{~RNS:','~}');return _this112;}/**
6439
6560
  * Render a template expression, returning a string with the resulting content.
6440
6561
  *
6441
6562
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6442
6563
  * @param {any} pRecord - The json object to be used as the Record for the template render
6443
6564
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6444
6565
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6566
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6445
6567
  *
6446
6568
  * @return {string} The rendered template
6447
- */_inherits(PictTemplateProviderRandomNumberString,_libPictTemplate15);return _createClass2(PictTemplateProviderRandomNumberString,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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}],227:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDataEncodeJavascriptString=/*#__PURE__*/function(_libPictTemplate16){/**
6569
+ */_inherits(PictTemplateProviderRandomNumberString,_libPictTemplate15);return _createClass2(PictTemplateProviderRandomNumberString,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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}],227:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDataEncodeJavascriptString=/*#__PURE__*/function(_libPictTemplate16){/**
6448
6570
  * @param {Object} pFable - The Fable Framework instance
6449
6571
  * @param {Object} pOptions - The options for the service
6450
6572
  * @param {String} pServiceHash - The hash of the service
6451
- */function PictTemplateProviderDataEncodeJavascriptString(pFable,pOptions,pServiceHash){var _this112;_classCallCheck2(this,PictTemplateProviderDataEncodeJavascriptString);_this112=_callSuper(this,PictTemplateProviderDataEncodeJavascriptString,[pFable,pOptions,pServiceHash]);/** @type {any} */_this112.log;_this112.addPattern('{~DataEncodeJavascriptString:','~}');_this112.addPattern('{~DEJS:','~}');return _this112;}/**
6573
+ */function PictTemplateProviderDataEncodeJavascriptString(pFable,pOptions,pServiceHash){var _this113;_classCallCheck2(this,PictTemplateProviderDataEncodeJavascriptString);_this113=_callSuper(this,PictTemplateProviderDataEncodeJavascriptString,[pFable,pOptions,pServiceHash]);/** @type {any} */_this113.log;_this113.addPattern('{~DataEncodeJavascriptString:','~}');_this113.addPattern('{~DEJS:','~}');return _this113;}/**
6452
6574
  * Render a template expression, returning a string with the resulting content.
6453
6575
  *
6454
6576
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6455
6577
  * @param {any} pRecord - The json object to be used as the Record for the template render
6456
6578
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6457
6579
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6580
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6458
6581
  *
6459
6582
  * @return {string} The rendered template
6460
- */_inherits(PictTemplateProviderDataEncodeJavascriptString,_libPictTemplate16);return _createClass2(PictTemplateProviderDataEncodeJavascriptString,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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,null,pScope);return this.pict.DataFormat.stringEncodeForJavascript(tmpDataToEncode);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDataEncodeJavascriptString;},{"pict-template":143}],228:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJSONOutput=/*#__PURE__*/function(_libPictTemplate17){/**
6583
+ */_inherits(PictTemplateProviderDataEncodeJavascriptString,_libPictTemplate16);return _createClass2(PictTemplateProviderDataEncodeJavascriptString,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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,null,pScope,pState);return this.pict.DataFormat.stringEncodeForJavascript(tmpDataToEncode);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDataEncodeJavascriptString;},{"pict-template":143}],228:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJSONOutput=/*#__PURE__*/function(_libPictTemplate17){/**
6461
6584
  * @param {Object} pFable - The Fable Framework instance
6462
6585
  * @param {Object} pOptions - The options for the service
6463
6586
  * @param {String} pServiceHash - The hash of the service
6464
- */function PictTemplateProviderJSONOutput(pFable,pOptions,pServiceHash){var _this113;_classCallCheck2(this,PictTemplateProviderJSONOutput);_this113=_callSuper(this,PictTemplateProviderJSONOutput,[pFable,pOptions,pServiceHash]);/** @type {any} */_this113.log;_this113.addPattern('{~DataJson:','~}');_this113.addPattern('{~DJ:','~}');return _this113;}/**
6587
+ */function PictTemplateProviderJSONOutput(pFable,pOptions,pServiceHash){var _this114;_classCallCheck2(this,PictTemplateProviderJSONOutput);_this114=_callSuper(this,PictTemplateProviderJSONOutput,[pFable,pOptions,pServiceHash]);/** @type {any} */_this114.log;_this114.addPattern('{~DataJson:','~}');_this114.addPattern('{~DJ:','~}');return _this114;}/**
6465
6588
  * Render a template expression, returning a string with the resulting content.
6466
6589
  *
6467
6590
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6468
6591
  * @param {any} pRecord - The json object to be used as the Record for the template render
6469
6592
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6470
6593
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6594
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6471
6595
  *
6472
6596
  * @return {string} The rendered template
6473
- */_inherits(PictTemplateProviderJSONOutput,_libPictTemplate17);return _createClass2(PictTemplateProviderJSONOutput,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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,null,pScope);if(!tmpDataToStringify){tmpDataToStringify=pRecord;}return JSON.stringify(tmpDataToStringify);}}]);}(libPictTemplate);module.exports=PictTemplateProviderJSONOutput;},{"pict-template":143}],229:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateOnlyFormat=/*#__PURE__*/function(_libPictTemplate18){/**
6597
+ */_inherits(PictTemplateProviderJSONOutput,_libPictTemplate17);return _createClass2(PictTemplateProviderJSONOutput,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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,null,pScope,pState);if(!tmpDataToStringify){tmpDataToStringify=pRecord;}return JSON.stringify(tmpDataToStringify);}}]);}(libPictTemplate);module.exports=PictTemplateProviderJSONOutput;},{"pict-template":143}],229:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateOnlyFormat=/*#__PURE__*/function(_libPictTemplate18){/**
6474
6598
  * @param {import('fable')} pFable - The Fable Framework instance
6475
6599
  * @param {any} pOptions - The options for the service
6476
6600
  * @param {String} pServiceHash - The hash of the service
6477
- */function PictTemplateProviderDateOnlyFormat(pFable,pOptions,pServiceHash){var _this114;_classCallCheck2(this,PictTemplateProviderDateOnlyFormat);_this114=_callSuper(this,PictTemplateProviderDateOnlyFormat,[pFable,pOptions,pServiceHash]);/** @type {any} */_this114.options;/** @type {any} */_this114.log;_this114.addPattern('{~DateOnlyFormat:','~}');return _this114;}/**
6601
+ */function PictTemplateProviderDateOnlyFormat(pFable,pOptions,pServiceHash){var _this115;_classCallCheck2(this,PictTemplateProviderDateOnlyFormat);_this115=_callSuper(this,PictTemplateProviderDateOnlyFormat,[pFable,pOptions,pServiceHash]);/** @type {any} */_this115.options;/** @type {any} */_this115.log;_this115.addPattern('{~DateOnlyFormat:','~}');return _this115;}/**
6478
6602
  * Render a template expression, returning a string with the resulting content.
6479
6603
  *
6480
6604
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6481
6605
  * @param {any} pRecord - The json object to be used as the Record for the template render
6482
6606
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6483
6607
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6608
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6484
6609
  *
6485
6610
  * @return {string} The rendered template
6486
- */_inherits(PictTemplateProviderDateOnlyFormat,_libPictTemplate18);return _createClass2(PictTemplateProviderDateOnlyFormat,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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,null,pScope);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
6611
+ */_inherits(PictTemplateProviderDateOnlyFormat,_libPictTemplate18);return _createClass2(PictTemplateProviderDateOnlyFormat,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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,null,pScope,pState);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
6487
6612
  var tmpDayJS=this.fable.Dates.dayJS.utc(tmpDateValue).tz('UTC');return tmpDayJS.format(tmpDateValueSet[1]);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDateOnlyFormat;/*
6488
6613
  # DEAR DEAD CODE DIARY:
6489
6614
 
@@ -6494,33 +6619,35 @@ var tmpDayJS=this.fable.Dates.dayJS.utc(tmpDateValue).tz('UTC');return tmpDayJS.
6494
6619
  * @param {Object} pFable - The Fable Framework instance
6495
6620
  * @param {Object} pOptions - The options for the service
6496
6621
  * @param {String} pServiceHash - The hash of the service
6497
- */function PictTemplateProviderDateOnlyYMD(pFable,pOptions,pServiceHash){var _this115;_classCallCheck2(this,PictTemplateProviderDateOnlyYMD);_this115=_callSuper(this,PictTemplateProviderDateOnlyYMD,[pFable,pOptions,pServiceHash]);/** @type {any} */_this115.options;/** @type {any} */_this115.log;_this115.addPattern('{~DateOnlyYMD:','~}');return _this115;}/**
6622
+ */function PictTemplateProviderDateOnlyYMD(pFable,pOptions,pServiceHash){var _this116;_classCallCheck2(this,PictTemplateProviderDateOnlyYMD);_this116=_callSuper(this,PictTemplateProviderDateOnlyYMD,[pFable,pOptions,pServiceHash]);/** @type {any} */_this116.options;/** @type {any} */_this116.log;_this116.addPattern('{~DateOnlyYMD:','~}');return _this116;}/**
6498
6623
  * Render a template expression, returning a string with the resulting content.
6499
6624
  *
6500
6625
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6501
6626
  * @param {any} pRecord - The json object to be used as the Record for the template render
6502
6627
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6503
6628
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6629
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6504
6630
  *
6505
6631
  * @return {string} The rendered template
6506
- */_inherits(PictTemplateProviderDateOnlyYMD,_libPictTemplate19);return _createClass2(PictTemplateProviderDateOnlyYMD,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray,null,pScope);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
6632
+ */_inherits(PictTemplateProviderDateOnlyYMD,_libPictTemplate19);return _createClass2(PictTemplateProviderDateOnlyYMD,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray,null,pScope,pState);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
6507
6633
  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
6508
6634
  // not even sure showing negative is right; showing the era is probably better (BCE vs CE)
6509
6635
  var prefix=tmpDayJS.valueOf()<-62167219200000?'-':'';return prefix+tmpDayJS.format('YYYY-MM-DD');}}]);}(libPictTemplate);module.exports=PictTemplateProviderDateOnlyYMD;},{"pict-template":143}],231:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateTimeFormat=/*#__PURE__*/function(_libPictTemplate20){/**
6510
6636
  * @param {Object} pFable - The Fable Framework instance
6511
6637
  * @param {Object} pOptions - The options for the service
6512
6638
  * @param {String} pServiceHash - The hash of the service
6513
- */function PictTemplateProviderDateTimeFormat(pFable,pOptions,pServiceHash){var _this116;_classCallCheck2(this,PictTemplateProviderDateTimeFormat);_this116=_callSuper(this,PictTemplateProviderDateTimeFormat,[pFable,pOptions,pServiceHash]);/** @type {any} */_this116.options;/** @type {any} */_this116.log;_this116.addPattern('{~DateTimeFormat:','~}');_this116.addPattern('{~DateFormat:','~}');// for backwards compatibility
6514
- return _this116;}/**
6639
+ */function PictTemplateProviderDateTimeFormat(pFable,pOptions,pServiceHash){var _this117;_classCallCheck2(this,PictTemplateProviderDateTimeFormat);_this117=_callSuper(this,PictTemplateProviderDateTimeFormat,[pFable,pOptions,pServiceHash]);/** @type {any} */_this117.options;/** @type {any} */_this117.log;_this117.addPattern('{~DateTimeFormat:','~}');_this117.addPattern('{~DateFormat:','~}');// for backwards compatibility
6640
+ return _this117;}/**
6515
6641
  * Render a template expression, returning a string with the resulting content.
6516
6642
  *
6517
6643
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6518
6644
  * @param {any} pRecord - The json object to be used as the Record for the template render
6519
6645
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6520
6646
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6647
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6521
6648
  *
6522
6649
  * @return {string} The rendered template
6523
- */_inherits(PictTemplateProviderDateTimeFormat,_libPictTemplate20);return _createClass2(PictTemplateProviderDateTimeFormat,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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,null,pScope);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
6650
+ */_inherits(PictTemplateProviderDateTimeFormat,_libPictTemplate20);return _createClass2(PictTemplateProviderDateTimeFormat,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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,null,pScope,pState);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
6524
6651
  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
6525
6652
  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()}].`);
6526
6653
  // Day.js will try to guess the user's timezone for us
@@ -6534,17 +6661,18 @@ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.
6534
6661
  * @param {Object} pFable - The Fable Framework instance
6535
6662
  * @param {Object} pOptions - The options for the service
6536
6663
  * @param {String} pServiceHash - The hash of the service
6537
- */function PictTemplateProviderDateTimeYMD(pFable,pOptions,pServiceHash){var _this117;_classCallCheck2(this,PictTemplateProviderDateTimeYMD);_this117=_callSuper(this,PictTemplateProviderDateTimeYMD,[pFable,pOptions,pServiceHash]);/** @type {any} */_this117.options;/** @type {any} */_this117.log;_this117.addPattern('{~DateTimeYMD:','~}');_this117.addPattern('{~DateYMD:','~}');// for backwards compatibility
6538
- return _this117;}/**
6664
+ */function PictTemplateProviderDateTimeYMD(pFable,pOptions,pServiceHash){var _this118;_classCallCheck2(this,PictTemplateProviderDateTimeYMD);_this118=_callSuper(this,PictTemplateProviderDateTimeYMD,[pFable,pOptions,pServiceHash]);/** @type {any} */_this118.options;/** @type {any} */_this118.log;_this118.addPattern('{~DateTimeYMD:','~}');_this118.addPattern('{~DateYMD:','~}');// for backwards compatibility
6665
+ return _this118;}/**
6539
6666
  * Render a template expression, returning a string with the resulting content.
6540
6667
  *
6541
6668
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6542
6669
  * @param {any} pRecord - The json object to be used as the Record for the template render
6543
6670
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6544
6671
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6672
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6545
6673
  *
6546
6674
  * @return {string} The rendered template
6547
- */_inherits(PictTemplateProviderDateTimeYMD,_libPictTemplate21);return _createClass2(PictTemplateProviderDateTimeYMD,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray,null,pScope);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
6675
+ */_inherits(PictTemplateProviderDateTimeYMD,_libPictTemplate21);return _createClass2(PictTemplateProviderDateTimeYMD,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray,null,pScope,pState);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
6548
6676
  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
6549
6677
  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()}].`);
6550
6678
  // Day.js will try to guess the user's timezone for us
@@ -6552,96 +6680,103 @@ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.
6552
6680
  * @param {Object} pFable - The Fable Framework instance
6553
6681
  * @param {Object} pOptions - The options for the service
6554
6682
  * @param {String} pServiceHash - The hash of the service
6555
- */function PictTemplateProviderDigits(pFable,pOptions,pServiceHash){var _this118;_classCallCheck2(this,PictTemplateProviderDigits);_this118=_callSuper(this,PictTemplateProviderDigits,[pFable,pOptions,pServiceHash]);/** @type {any} */_this118.options;/** @type {any} */_this118.log;_this118.addPattern('{~Digits:','~}');return _this118;}/**
6683
+ */function PictTemplateProviderDigits(pFable,pOptions,pServiceHash){var _this119;_classCallCheck2(this,PictTemplateProviderDigits);_this119=_callSuper(this,PictTemplateProviderDigits,[pFable,pOptions,pServiceHash]);/** @type {any} */_this119.options;/** @type {any} */_this119.log;_this119.addPattern('{~Digits:','~}');return _this119;}/**
6556
6684
  * Render a template expression, returning a string with the resulting content.
6557
6685
  *
6558
6686
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6559
6687
  * @param {any} pRecord - The json object to be used as the Record for the template render
6560
6688
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6561
6689
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6690
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6562
6691
  *
6563
6692
  * @return {string} The rendered template
6564
- */_inherits(PictTemplateProviderDigits,_libPictTemplate22);return _createClass2(PictTemplateProviderDigits,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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,null,pScope);return this.fable.DataFormat.formatterAddCommasToNumber(this.fable.DataFormat.formatterRoundNumber(tmpColumnData,2));}}]);}(libPictTemplate);module.exports=PictTemplateProviderDigits;},{"pict-template":143}],234:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDollars=/*#__PURE__*/function(_libPictTemplate23){/**
6693
+ */_inherits(PictTemplateProviderDigits,_libPictTemplate22);return _createClass2(PictTemplateProviderDigits,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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,null,pScope,pState);return this.fable.DataFormat.formatterAddCommasToNumber(this.fable.DataFormat.formatterRoundNumber(tmpColumnData,2));}}]);}(libPictTemplate);module.exports=PictTemplateProviderDigits;},{"pict-template":143}],234:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDollars=/*#__PURE__*/function(_libPictTemplate23){/**
6565
6694
  * @param {Object} pFable - The Fable Framework instance
6566
6695
  * @param {Object} pOptions - The options for the service
6567
6696
  * @param {String} pServiceHash - The hash of the service
6568
- */function PictTemplateProviderDollars(pFable,pOptions,pServiceHash){var _this119;_classCallCheck2(this,PictTemplateProviderDollars);_this119=_callSuper(this,PictTemplateProviderDollars,[pFable,pOptions,pServiceHash]);/** @type {any} */_this119.options;/** @type {any} */_this119.log;_this119.addPattern('{~Dollars:','~}');return _this119;}/**
6697
+ */function PictTemplateProviderDollars(pFable,pOptions,pServiceHash){var _this120;_classCallCheck2(this,PictTemplateProviderDollars);_this120=_callSuper(this,PictTemplateProviderDollars,[pFable,pOptions,pServiceHash]);/** @type {any} */_this120.options;/** @type {any} */_this120.log;_this120.addPattern('{~Dollars:','~}');return _this120;}/**
6569
6698
  * Render a template expression, returning a string with the resulting content.
6570
6699
  *
6571
6700
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6572
6701
  * @param {any} pRecord - The json object to be used as the Record for the template render
6573
6702
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6574
6703
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6704
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6575
6705
  *
6576
6706
  * @return {string} The rendered template
6577
- */_inherits(PictTemplateProviderDollars,_libPictTemplate23);return _createClass2(PictTemplateProviderDollars,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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,null,pScope);return this.fable.DataFormat.formatterDollars(tmpColumnData);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDollars;},{"pict-template":143}],235:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderHTMLCommandEnd=/*#__PURE__*/function(_libPictTemplate24){/**
6707
+ */_inherits(PictTemplateProviderDollars,_libPictTemplate23);return _createClass2(PictTemplateProviderDollars,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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,null,pScope,pState);return this.fable.DataFormat.formatterDollars(tmpColumnData);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDollars;},{"pict-template":143}],235:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderHTMLCommandEnd=/*#__PURE__*/function(_libPictTemplate24){/**
6578
6708
  * @param {Object} pFable - The Fable Framework instance
6579
6709
  * @param {Object} pOptions - The options for the service
6580
6710
  * @param {String} pServiceHash - The hash of the service
6581
- */function PictTemplateProviderHTMLCommandEnd(pFable,pOptions,pServiceHash){var _this120;_classCallCheck2(this,PictTemplateProviderHTMLCommandEnd);_this120=_callSuper(this,PictTemplateProviderHTMLCommandEnd,[pFable,pOptions,pServiceHash]);/** @type {any} */_this120.log;_this120.addPattern('{~HtmlCommentEnd:','~}');_this120.addPattern('{~HCE:','~}');return _this120;}/**
6711
+ */function PictTemplateProviderHTMLCommandEnd(pFable,pOptions,pServiceHash){var _this121;_classCallCheck2(this,PictTemplateProviderHTMLCommandEnd);_this121=_callSuper(this,PictTemplateProviderHTMLCommandEnd,[pFable,pOptions,pServiceHash]);/** @type {any} */_this121.log;_this121.addPattern('{~HtmlCommentEnd:','~}');_this121.addPattern('{~HCE:','~}');return _this121;}/**
6582
6712
  * Render a template expression, returning a string with the resulting content.
6583
6713
  *
6584
6714
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6585
6715
  * @param {any} pRecord - The json object to be used as the Record for the template render
6586
6716
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6587
6717
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6718
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6588
6719
  *
6589
6720
  * @return {string} The rendered template
6590
- */_inherits(PictTemplateProviderHTMLCommandEnd,_libPictTemplate24);return _createClass2(PictTemplateProviderHTMLCommandEnd,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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,null,pScope);}if(!tmpValue){return' -->';}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderHTMLCommandEnd;},{"pict-template":143}],236:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderHTMLCommandStart=/*#__PURE__*/function(_libPictTemplate25){/**
6721
+ */_inherits(PictTemplateProviderHTMLCommandEnd,_libPictTemplate24);return _createClass2(PictTemplateProviderHTMLCommandEnd,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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,null,pScope,pState);}if(!tmpValue){return' -->';}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderHTMLCommandEnd;},{"pict-template":143}],236:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderHTMLCommandStart=/*#__PURE__*/function(_libPictTemplate25){/**
6591
6722
  * @param {Object} pFable - The Fable Framework instance
6592
6723
  * @param {Object} pOptions - The options for the service
6593
6724
  * @param {String} pServiceHash - The hash of the service
6594
- */function PictTemplateProviderHTMLCommandStart(pFable,pOptions,pServiceHash){var _this121;_classCallCheck2(this,PictTemplateProviderHTMLCommandStart);_this121=_callSuper(this,PictTemplateProviderHTMLCommandStart,[pFable,pOptions,pServiceHash]);/** @type {any} */_this121.log;_this121.addPattern('{~HtmlCommentStart:','~}');_this121.addPattern('{~HCS:','~}');return _this121;}/**
6725
+ */function PictTemplateProviderHTMLCommandStart(pFable,pOptions,pServiceHash){var _this122;_classCallCheck2(this,PictTemplateProviderHTMLCommandStart);_this122=_callSuper(this,PictTemplateProviderHTMLCommandStart,[pFable,pOptions,pServiceHash]);/** @type {any} */_this122.log;_this122.addPattern('{~HtmlCommentStart:','~}');_this122.addPattern('{~HCS:','~}');return _this122;}/**
6595
6726
  * Render a template expression, returning a string with the resulting content.
6596
6727
  *
6597
6728
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6598
6729
  * @param {any} pRecord - The json object to be used as the Record for the template render
6599
6730
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6600
6731
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6732
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6601
6733
  *
6602
6734
  * @return {string} The rendered template
6603
- */_inherits(PictTemplateProviderHTMLCommandStart,_libPictTemplate25);return _createClass2(PictTemplateProviderHTMLCommandStart,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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,null,pScope);}if(!tmpValue){return'<!-- ';}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderHTMLCommandStart;},{"pict-template":143}],237:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJoin=/*#__PURE__*/function(_libPictTemplate26){/**
6735
+ */_inherits(PictTemplateProviderHTMLCommandStart,_libPictTemplate25);return _createClass2(PictTemplateProviderHTMLCommandStart,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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,null,pScope,pState);}if(!tmpValue){return'<!-- ';}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderHTMLCommandStart;},{"pict-template":143}],237:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJoin=/*#__PURE__*/function(_libPictTemplate26){/**
6604
6736
  * @param {Object} pFable - The Fable Framework instance
6605
6737
  * @param {Object} pOptions - The options for the service
6606
6738
  * @param {String} pServiceHash - The hash of the service
6607
- */function PictTemplateProviderJoin(pFable,pOptions,pServiceHash){var _this122;_classCallCheck2(this,PictTemplateProviderJoin);_this122=_callSuper(this,PictTemplateProviderJoin,[pFable,pOptions,pServiceHash]);/** @type {any} */_this122.options;/** @type {any} */_this122.log;_this122.addPattern('{~Join:','~}');_this122.addPattern('{~J:','~}');return _this122;}/**
6739
+ */function PictTemplateProviderJoin(pFable,pOptions,pServiceHash){var _this123;_classCallCheck2(this,PictTemplateProviderJoin);_this123=_callSuper(this,PictTemplateProviderJoin,[pFable,pOptions,pServiceHash]);/** @type {any} */_this123.options;/** @type {any} */_this123.log;_this123.addPattern('{~Join:','~}');_this123.addPattern('{~J:','~}');return _this123;}/**
6608
6740
  * Render a template expression, returning a string with the resulting content.
6609
6741
  *
6610
6742
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6611
6743
  * @param {any} pRecord - The json object to be used as the Record for the template render
6612
6744
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6613
6745
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6746
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6614
6747
  *
6615
6748
  * @return {string} The rendered template
6616
- */_inherits(PictTemplateProviderJoin,_libPictTemplate26);return _createClass2(PictTemplateProviderJoin,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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
6617
- var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];for(var i=0;i<tmpDataAddresses.length;i++){var tmpValueSet=this.resolveStateFromAddress(tmpDataAddresses[i],tmpData,pContextArray,null,pScope);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}],238:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJoinUnique=/*#__PURE__*/function(_libPictTemplate27){/**
6749
+ */_inherits(PictTemplateProviderJoin,_libPictTemplate26);return _createClass2(PictTemplateProviderJoin,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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
6750
+ var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];for(var i=0;i<tmpDataAddresses.length;i++){var tmpValueSet=this.resolveStateFromAddress(tmpDataAddresses[i],tmpData,pContextArray,null,pScope,pState);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}],238:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJoinUnique=/*#__PURE__*/function(_libPictTemplate27){/**
6618
6751
  * @param {Object} pFable - The Fable Framework instance
6619
6752
  * @param {Object} pOptions - The options for the service
6620
6753
  * @param {String} pServiceHash - The hash of the service
6621
- */function PictTemplateProviderJoinUnique(pFable,pOptions,pServiceHash){var _this123;_classCallCheck2(this,PictTemplateProviderJoinUnique);_this123=_callSuper(this,PictTemplateProviderJoinUnique,[pFable,pOptions,pServiceHash]);/** @type {any} */_this123.options;/** @type {any} */_this123.log;_this123.addPattern('{~JoinUnique:','~}');_this123.addPattern('{~JU:','~}');return _this123;}/**
6754
+ */function PictTemplateProviderJoinUnique(pFable,pOptions,pServiceHash){var _this124;_classCallCheck2(this,PictTemplateProviderJoinUnique);_this124=_callSuper(this,PictTemplateProviderJoinUnique,[pFable,pOptions,pServiceHash]);/** @type {any} */_this124.options;/** @type {any} */_this124.log;_this124.addPattern('{~JoinUnique:','~}');_this124.addPattern('{~JU:','~}');return _this124;}/**
6622
6755
  * Render a template expression, returning a string with the resulting content.
6623
6756
  *
6624
6757
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6625
6758
  * @param {any} pRecord - The json object to be used as the Record for the template render
6626
6759
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6627
6760
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6761
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6628
6762
  *
6629
6763
  * @return {string} The rendered template
6630
- */_inherits(PictTemplateProviderJoinUnique,_libPictTemplate27);return _createClass2(PictTemplateProviderJoinUnique,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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
6631
- var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];var tmpValueMap={};for(var i=0;i<tmpDataAddresses.length;i++){var tmpValueSet=this.resolveStateFromAddress(tmpDataAddresses[i],tmpData,pContextArray,null,pScope);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}],239:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderPascalCaseIdentifier=/*#__PURE__*/function(_libPictTemplate28){/**
6764
+ */_inherits(PictTemplateProviderJoinUnique,_libPictTemplate27);return _createClass2(PictTemplateProviderJoinUnique,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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
6765
+ var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];var tmpValueMap={};for(var i=0;i<tmpDataAddresses.length;i++){var tmpValueSet=this.resolveStateFromAddress(tmpDataAddresses[i],tmpData,pContextArray,null,pScope,pState);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}],239:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderPascalCaseIdentifier=/*#__PURE__*/function(_libPictTemplate28){/**
6632
6766
  * @param {Object} pFable - The Fable Framework instance
6633
6767
  * @param {Object} pOptions - The options for the service
6634
6768
  * @param {String} pServiceHash - The hash of the service
6635
- */function PictTemplateProviderPascalCaseIdentifier(pFable,pOptions,pServiceHash){var _this124;_classCallCheck2(this,PictTemplateProviderPascalCaseIdentifier);_this124=_callSuper(this,PictTemplateProviderPascalCaseIdentifier,[pFable,pOptions,pServiceHash]);/** @type {any} */_this124.options;/** @type {any} */_this124.log;_this124.addPattern('{~PascalCaseIdentifier:','~}');return _this124;}/**
6769
+ */function PictTemplateProviderPascalCaseIdentifier(pFable,pOptions,pServiceHash){var _this125;_classCallCheck2(this,PictTemplateProviderPascalCaseIdentifier);_this125=_callSuper(this,PictTemplateProviderPascalCaseIdentifier,[pFable,pOptions,pServiceHash]);/** @type {any} */_this125.options;/** @type {any} */_this125.log;_this125.addPattern('{~PascalCaseIdentifier:','~}');return _this125;}/**
6636
6770
  * Render a template expression, returning a string with the resulting content.
6637
6771
  *
6638
6772
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6639
6773
  * @param {any} pRecord - The json object to be used as the Record for the template render
6640
6774
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6641
6775
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6776
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6642
6777
  *
6643
6778
  * @return {string} The rendered template
6644
- */_inherits(PictTemplateProviderPascalCaseIdentifier,_libPictTemplate28);return _createClass2(PictTemplateProviderPascalCaseIdentifier,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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,null,pScope);if(tmpValue==null||tmpValue=='undefined'||typeof tmpValue=='undefined'){return'';}return this.pict.DataFormat.cleanNonAlphaCharacters(this.pict.DataFormat.capitalizeEachWord(tmpValue));}}]);}(libPictTemplate);module.exports=PictTemplateProviderPascalCaseIdentifier;/*
6779
+ */_inherits(PictTemplateProviderPascalCaseIdentifier,_libPictTemplate28);return _createClass2(PictTemplateProviderPascalCaseIdentifier,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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,null,pScope,pState);if(tmpValue==null||tmpValue=='undefined'||typeof tmpValue=='undefined'){return'';}return this.pict.DataFormat.cleanNonAlphaCharacters(this.pict.DataFormat.capitalizeEachWord(tmpValue));}}]);}(libPictTemplate);module.exports=PictTemplateProviderPascalCaseIdentifier;/*
6645
6780
  # DEAR DEAD CODE DIARY:
6646
6781
 
6647
6782
  ```javascript
@@ -6651,47 +6786,50 @@ var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];var tmpValueMap={}
6651
6786
  * @param {Object} pFable - The Fable Framework instance
6652
6787
  * @param {Object} pOptions - The options for the service
6653
6788
  * @param {String} pServiceHash - The hash of the service
6654
- */function PictTemplateProviderPluckJoinUnique(pFable,pOptions,pServiceHash){var _this125;_classCallCheck2(this,PictTemplateProviderPluckJoinUnique);_this125=_callSuper(this,PictTemplateProviderPluckJoinUnique,[pFable,pOptions,pServiceHash]);/** @type {any} */_this125.options;/** @type {any} */_this125.log;_this125.addPattern('{~PluckJoinUnique:','~}');_this125.addPattern('{~PJU:','~}');return _this125;}/**
6789
+ */function PictTemplateProviderPluckJoinUnique(pFable,pOptions,pServiceHash){var _this126;_classCallCheck2(this,PictTemplateProviderPluckJoinUnique);_this126=_callSuper(this,PictTemplateProviderPluckJoinUnique,[pFable,pOptions,pServiceHash]);/** @type {any} */_this126.options;/** @type {any} */_this126.log;_this126.addPattern('{~PluckJoinUnique:','~}');_this126.addPattern('{~PJU:','~}');return _this126;}/**
6655
6790
  * Render a template expression, returning a string with the resulting content.
6656
6791
  *
6657
6792
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6658
6793
  * @param {any} pRecord - The json object to be used as the Record for the template render
6659
6794
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6660
6795
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6796
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6661
6797
  *
6662
6798
  * @return {string} The rendered template
6663
- */_inherits(PictTemplateProviderPluckJoinUnique,_libPictTemplate29);return _createClass2(PictTemplateProviderPluckJoinUnique,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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
6664
- 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,null,pScope);if(tmpValueSet&&Array.isArray(tmpValueSet)){// This one only works on arrays of objects.
6799
+ */_inherits(PictTemplateProviderPluckJoinUnique,_libPictTemplate29);return _createClass2(PictTemplateProviderPluckJoinUnique,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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
6800
+ 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,null,pScope,pState);if(tmpValueSet&&Array.isArray(tmpValueSet)){// This one only works on arrays of objects.
6665
6801
  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}],241:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderBreakpoint=/*#__PURE__*/function(_libPictTemplate30){/**
6666
6802
  * @param {Object} pFable - The Fable Framework instance
6667
6803
  * @param {Object} pOptions - The options for the service
6668
6804
  * @param {String} pServiceHash - The hash of the service
6669
- */function PictTemplateProviderBreakpoint(pFable,pOptions,pServiceHash){var _this126;_classCallCheck2(this,PictTemplateProviderBreakpoint);_this126=_callSuper(this,PictTemplateProviderBreakpoint,[pFable,pOptions,pServiceHash]);/** @type {any} */_this126.log;_this126.addPattern('{~Breakpoint','~}');return _this126;}/**
6805
+ */function PictTemplateProviderBreakpoint(pFable,pOptions,pServiceHash){var _this127;_classCallCheck2(this,PictTemplateProviderBreakpoint);_this127=_callSuper(this,PictTemplateProviderBreakpoint,[pFable,pOptions,pServiceHash]);/** @type {any} */_this127.log;_this127.addPattern('{~Breakpoint','~}');return _this127;}/**
6670
6806
  * Render a template expression, returning a string with the resulting content.
6671
6807
  *
6672
6808
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6673
6809
  * @param {any} pRecord - The json object to be used as the Record for the template render
6674
6810
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6675
6811
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6812
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6676
6813
  *
6677
6814
  * @return {string} The rendered template
6678
- */_inherits(PictTemplateProviderBreakpoint,_libPictTemplate30);return _createClass2(PictTemplateProviderBreakpoint,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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;
6815
+ */_inherits(PictTemplateProviderBreakpoint,_libPictTemplate30);return _createClass2(PictTemplateProviderBreakpoint,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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;
6679
6816
  debugger;// eslint-disable-line no-debugger
6680
6817
  return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderBreakpoint;},{"pict-template":143}],242:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDataValueTree=/*#__PURE__*/function(_libPictTemplate31){/**
6681
6818
  * @param {Object} pFable - The Fable Framework instance
6682
6819
  * @param {Object} pOptions - The options for the service
6683
6820
  * @param {String} pServiceHash - The hash of the service
6684
- */function PictTemplateProviderDataValueTree(pFable,pOptions,pServiceHash){var _this127;_classCallCheck2(this,PictTemplateProviderDataValueTree);_this127=_callSuper(this,PictTemplateProviderDataValueTree,[pFable,pOptions,pServiceHash]);/** @type {any} */_this127.log;_this127.addPattern('{~DataTree:','~}');_this127.addPattern('{~DT:','~}');return _this127;}/**
6821
+ */function PictTemplateProviderDataValueTree(pFable,pOptions,pServiceHash){var _this128;_classCallCheck2(this,PictTemplateProviderDataValueTree);_this128=_callSuper(this,PictTemplateProviderDataValueTree,[pFable,pOptions,pServiceHash]);/** @type {any} */_this128.log;_this128.addPattern('{~DataTree:','~}');_this128.addPattern('{~DT:','~}');return _this128;}/**
6685
6822
  * Render a template expression, returning a string with the resulting content.
6686
6823
  *
6687
6824
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6688
6825
  * @param {any} pRecord - The json object to be used as the Record for the template render
6689
6826
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6690
6827
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6828
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6691
6829
  *
6692
6830
  * @return {string} The rendered template
6693
- */_inherits(PictTemplateProviderDataValueTree,_libPictTemplate31);return _createClass2(PictTemplateProviderDataValueTree,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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,null,pScope);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
6694
- 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,pScope);}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,pScope);}/**
6831
+ */_inherits(PictTemplateProviderDataValueTree,_libPictTemplate31);return _createClass2(PictTemplateProviderDataValueTree,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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,null,pScope,pState);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
6832
+ 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,pScope);}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,pScope,pState);}/**
6695
6833
  * Render a template expression, returning a string with the resulting content.
6696
6834
  *
6697
6835
  * @param {Object} pObject - The object to be rendered as a value tree
@@ -6700,63 +6838,68 @@ tmpPictObjectWrapTemplate="<div class=\"PICT PICTObjectSet\">{~D:Record.ObjectVa
6700
6838
  * @param {number} pMaxDepth - The maximum depth to render in the value tree
6701
6839
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6702
6840
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6841
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6703
6842
  *
6704
6843
  * @return {string} The rendered template
6705
- */},{key:"dataValueTreeObjectSet",value:function dataValueTreeObjectSet(pObject,pRootObject,pCurrentDepth,pMaxDepth,pContextArray,pScope){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
6706
- 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,pScope);}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,pScope);}return tmpTemplateResult;}}]);}(libPictTemplate);module.exports=PictTemplateProviderDataValueTree;},{"pict-template":143}],243:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogStatement=/*#__PURE__*/function(_libPictTemplate32){/**
6844
+ */},{key:"dataValueTreeObjectSet",value:function dataValueTreeObjectSet(pObject,pRootObject,pCurrentDepth,pMaxDepth,pContextArray,pScope,pState){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
6845
+ 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,pScope);}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,pScope,pState);}return tmpTemplateResult;}}]);}(libPictTemplate);module.exports=PictTemplateProviderDataValueTree;},{"pict-template":143}],243:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogStatement=/*#__PURE__*/function(_libPictTemplate32){/**
6707
6846
  * @param {Object} pFable - The Fable Framework instance
6708
6847
  * @param {Object} pOptions - The options for the service
6709
6848
  * @param {String} pServiceHash - The hash of the service
6710
- */function PictTemplateProviderLogStatement(pFable,pOptions,pServiceHash){var _this128;_classCallCheck2(this,PictTemplateProviderLogStatement);_this128=_callSuper(this,PictTemplateProviderLogStatement,[pFable,pOptions,pServiceHash]);/** @type {any} */_this128.log;_this128.addPattern('{~LogStatement:','~}');_this128.addPattern('{~LS:','~}');return _this128;}/**
6849
+ */function PictTemplateProviderLogStatement(pFable,pOptions,pServiceHash){var _this129;_classCallCheck2(this,PictTemplateProviderLogStatement);_this129=_callSuper(this,PictTemplateProviderLogStatement,[pFable,pOptions,pServiceHash]);/** @type {any} */_this129.log;_this129.addPattern('{~LogStatement:','~}');_this129.addPattern('{~LS:','~}');return _this129;}/**
6711
6850
  * Render a template expression, returning a string with the resulting content.
6712
6851
  *
6713
6852
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6714
6853
  * @param {any} pRecord - The json object to be used as the Record for the template render
6715
6854
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6716
6855
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6856
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6717
6857
  *
6718
6858
  * @return {string} The rendered template
6719
- */_inherits(PictTemplateProviderLogStatement,_libPictTemplate32);return _createClass2(PictTemplateProviderLogStatement,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){var tmpHash=pTemplateHash.trim();this.log.trace("PICT Template Log Message: ".concat(tmpHash));return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderLogStatement;},{"pict-template":143}],244:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogValue=/*#__PURE__*/function(_libPictTemplate33){/**
6859
+ */_inherits(PictTemplateProviderLogStatement,_libPictTemplate32);return _createClass2(PictTemplateProviderLogStatement,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){var tmpHash=pTemplateHash.trim();this.log.trace("PICT Template Log Message: ".concat(tmpHash));return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderLogStatement;},{"pict-template":143}],244:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogValue=/*#__PURE__*/function(_libPictTemplate33){/**
6720
6860
  * @param {Object} pFable - The Fable Framework instance
6721
6861
  * @param {Object} pOptions - The options for the service
6722
6862
  * @param {String} pServiceHash - The hash of the service
6723
- */function PictTemplateProviderLogValue(pFable,pOptions,pServiceHash){var _this129;_classCallCheck2(this,PictTemplateProviderLogValue);_this129=_callSuper(this,PictTemplateProviderLogValue,[pFable,pOptions,pServiceHash]);/** @type {any} */_this129.log;_this129.addPattern('{~LogValue:','~}');_this129.addPattern('{~LV:','~}');return _this129;}/**
6863
+ */function PictTemplateProviderLogValue(pFable,pOptions,pServiceHash){var _this130;_classCallCheck2(this,PictTemplateProviderLogValue);_this130=_callSuper(this,PictTemplateProviderLogValue,[pFable,pOptions,pServiceHash]);/** @type {any} */_this130.log;_this130.addPattern('{~LogValue:','~}');_this130.addPattern('{~LV:','~}');return _this130;}/**
6724
6864
  * Render a template expression, returning a string with the resulting content.
6725
6865
  *
6726
6866
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6727
6867
  * @param {any} pRecord - The json object to be used as the Record for the template render
6728
6868
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6729
6869
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6870
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6730
6871
  *
6731
6872
  * @return {string} The rendered template
6732
- */_inherits(PictTemplateProviderLogValue,_libPictTemplate33);return _createClass2(PictTemplateProviderLogValue,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray,null,pScope);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}],245:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogValueTree=/*#__PURE__*/function(_libPictTemplate34){/**
6873
+ */_inherits(PictTemplateProviderLogValue,_libPictTemplate33);return _createClass2(PictTemplateProviderLogValue,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray,null,pScope,pState);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}],245:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogValueTree=/*#__PURE__*/function(_libPictTemplate34){/**
6733
6874
  * @param {Object} pFable - The Fable Framework instance
6734
6875
  * @param {Object} pOptions - The options for the service
6735
6876
  * @param {String} pServiceHash - The hash of the service
6736
- */function PictTemplateProviderLogValueTree(pFable,pOptions,pServiceHash){var _this130;_classCallCheck2(this,PictTemplateProviderLogValueTree);_this130=_callSuper(this,PictTemplateProviderLogValueTree,[pFable,pOptions,pServiceHash]);/** @type {any} */_defineProperty2(_this130,"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;}_this130.log.trace("[".concat(pBaseAddress,".").concat(tmpObjectValueKeys[i],"] (").concat(tmpBranchType,"): ").concat(tmpBranchValue));if(pCurrentDepth+1>pMaxDepth){return'';}else if(tmpBranchType=='object'){tmpBranchValue=_this130.logValueTreeObjectSet(pObject[tmpObjectValueKeys[i]],"".concat(pBaseAddress,".").concat(tmpObjectValueKeys[i]),pRootObject,pCurrentDepth+1,pMaxDepth);}}return'';});_this130.log;_this130.addPattern('{~LogValueTree:','~}');_this130.addPattern('{~LVT:','~}');return _this130;}/**
6877
+ */function PictTemplateProviderLogValueTree(pFable,pOptions,pServiceHash){var _this131;_classCallCheck2(this,PictTemplateProviderLogValueTree);_this131=_callSuper(this,PictTemplateProviderLogValueTree,[pFable,pOptions,pServiceHash]);/** @type {any} */_defineProperty2(_this131,"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;}_this131.log.trace("[".concat(pBaseAddress,".").concat(tmpObjectValueKeys[i],"] (").concat(tmpBranchType,"): ").concat(tmpBranchValue));if(pCurrentDepth+1>pMaxDepth){return'';}else if(tmpBranchType=='object'){tmpBranchValue=_this131.logValueTreeObjectSet(pObject[tmpObjectValueKeys[i]],"".concat(pBaseAddress,".").concat(tmpObjectValueKeys[i]),pRootObject,pCurrentDepth+1,pMaxDepth);}}return'';});_this131.log;_this131.addPattern('{~LogValueTree:','~}');_this131.addPattern('{~LVT:','~}');return _this131;}/**
6737
6878
  * Render a template expression, returning a string with the resulting content.
6738
6879
  *
6739
6880
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6740
6881
  * @param {any} pRecord - The json object to be used as the Record for the template render
6741
6882
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6742
6883
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6884
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6743
6885
  *
6744
6886
  * @return {string} The rendered template
6745
- */_inherits(PictTemplateProviderLogValueTree,_libPictTemplate34);return _createClass2(PictTemplateProviderLogValueTree,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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,null,pScope);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}],246:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderNotEmpty=/*#__PURE__*/function(_libPictTemplate35){/**
6887
+ */_inherits(PictTemplateProviderLogValueTree,_libPictTemplate34);return _createClass2(PictTemplateProviderLogValueTree,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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,null,pScope,pState);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}],246:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderNotEmpty=/*#__PURE__*/function(_libPictTemplate35){/**
6746
6888
  * @param {Object} pFable - The Fable Framework instance
6747
6889
  * @param {Object} pOptions - The options for the service
6748
6890
  * @param {String} pServiceHash - The hash of the service
6749
- */function PictTemplateProviderNotEmpty(pFable,pOptions,pServiceHash){var _this131;_classCallCheck2(this,PictTemplateProviderNotEmpty);_this131=_callSuper(this,PictTemplateProviderNotEmpty,[pFable,pOptions,pServiceHash]);/** @type {any} */_this131.log;_this131.addPattern('{~NotEmpty:','~}');_this131.addPattern('{~NE:','~}');return _this131;}/**
6891
+ */function PictTemplateProviderNotEmpty(pFable,pOptions,pServiceHash){var _this132;_classCallCheck2(this,PictTemplateProviderNotEmpty);_this132=_callSuper(this,PictTemplateProviderNotEmpty,[pFable,pOptions,pServiceHash]);/** @type {any} */_this132.log;_this132.addPattern('{~NotEmpty:','~}');_this132.addPattern('{~NE:','~}');return _this132;}/**
6750
6892
  * Render a template expression, returning a string with the resulting content.
6751
6893
  *
6752
6894
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6753
6895
  * @param {any} pRecord - The json object to be used as the Record for the template render
6754
6896
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6755
6897
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6898
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6756
6899
  *
6757
6900
  * @return {string} The rendered template
6758
- */_inherits(PictTemplateProviderNotEmpty,_libPictTemplate35);return _createClass2(PictTemplateProviderNotEmpty,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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.
6759
- if(this.resolveStateFromAddress(tmpHashParts[0],tmpData,pContextArray,null,pScope)){return tmpHashParts[1];}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderNotEmpty;},{"pict-template":143}],247:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateIfBase=/*#__PURE__*/function(_libPictTemplate36){/**
6901
+ */_inherits(PictTemplateProviderNotEmpty,_libPictTemplate35);return _createClass2(PictTemplateProviderNotEmpty,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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.
6902
+ if(this.resolveStateFromAddress(tmpHashParts[0],tmpData,pContextArray,null,pScope,pState)){return tmpHashParts[1];}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderNotEmpty;},{"pict-template":143}],247:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateIfBase=/*#__PURE__*/function(_libPictTemplate36){/**
6760
6903
  * @param {Object} pFable - The Fable Framework instance
6761
6904
  * @param {Object} pOptions - The options for the service
6762
6905
  * @param {String} pServiceHash - The hash of the service
@@ -6764,21 +6907,22 @@ if(this.resolveStateFromAddress(tmpHashParts[0],tmpData,pContextArray,null,pScop
6764
6907
  * @param {Object} pFable - The Fable Framework instance
6765
6908
  * @param {Object} pOptions - The options for the service
6766
6909
  * @param {String} pServiceHash - The hash of the service
6767
- */function PictTemplateProviderTemplateIf(pFable,pOptions,pServiceHash){var _this132;_classCallCheck2(this,PictTemplateProviderTemplateIf);_this132=_callSuper(this,PictTemplateProviderTemplateIf,[pFable,pOptions,pServiceHash]);/** @type {any} */_this132.log;_this132.addPattern('{~TemplateIf:','~}');_this132.addPattern('{~TIf:','~}');return _this132;}/**
6910
+ */function PictTemplateProviderTemplateIf(pFable,pOptions,pServiceHash){var _this133;_classCallCheck2(this,PictTemplateProviderTemplateIf);_this133=_callSuper(this,PictTemplateProviderTemplateIf,[pFable,pOptions,pServiceHash]);/** @type {any} */_this133.log;_this133.addPattern('{~TemplateIf:','~}');_this133.addPattern('{~TIf:','~}');return _this133;}/**
6768
6911
  * Render a template expression, returning a string with the resulting content.
6769
6912
  *
6770
6913
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6771
6914
  * @param {any} pRecord - The json object to be used as the Record for the template render
6772
6915
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6773
6916
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6917
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6774
6918
  *
6775
6919
  * @return {string} The rendered template
6776
- */_inherits(PictTemplateProviderTemplateIf,_libPictTemplateIf);return _createClass2(PictTemplateProviderTemplateIf,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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
6920
+ */_inherits(PictTemplateProviderTemplateIf,_libPictTemplateIf);return _createClass2(PictTemplateProviderTemplateIf,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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
6777
6921
  if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return'';}// No comparison operation
6778
6922
  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...
6779
6923
  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
6780
- try{var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray,null,pScope),tmpComparisonParts[1],this.resolveStateFromAddress(tmpComparisonParts[2],tmpData,pContextArray,null,pScope));if(!tmpComparisonResult){return'';}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
6781
- return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray,pScope);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope),null,pContextArray);}}catch(pError){this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError),pError);return'';}}/**
6924
+ try{var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray,null,pScope,pState),tmpComparisonParts[1],this.resolveStateFromAddress(tmpComparisonParts[2],tmpData,pContextArray,null,pScope,pState));if(!tmpComparisonResult){return'';}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
6925
+ return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray,pScope,pState);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope,pState),null,pContextArray,pScope,pState);}}catch(pError){this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError),pError);return'';}}/**
6782
6926
  * Render a template expression, deliver a string with the resulting content to a callback function.
6783
6927
  *
6784
6928
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
@@ -6786,32 +6930,34 @@ return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray,
6786
6930
  * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
6787
6931
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6788
6932
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6933
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6789
6934
  *
6790
6935
  * @return {void}
6791
- */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope){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
6936
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope,pState){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
6792
6937
  if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return tmpCallback(null,'');}// No comparison operation
6793
6938
  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...
6794
6939
  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
6795
6940
  try{// This is the only thing that's different from the absolute value function above. Collapse these.
6796
- var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray,null,pScope),tmpComparisonParts[1],this.resolveStateFromAddress(tmpComparisonParts[2],tmpData,pContextArray,null,pScope));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,pScope);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}}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":247}],249:[function(require,module,exports){var libPictTemplateIf=require('./Pict-Template-TemplateIf-Base.js');var PictTemplateProviderTemplateIfAbsolute=/*#__PURE__*/function(_libPictTemplateIf2){/**
6941
+ var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray,null,pScope,pState),tmpComparisonParts[1],this.resolveStateFromAddress(tmpComparisonParts[2],tmpData,pContextArray,null,pScope,pState));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,pScope,pState);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope,pState),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}}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":247}],249:[function(require,module,exports){var libPictTemplateIf=require('./Pict-Template-TemplateIf-Base.js');var PictTemplateProviderTemplateIfAbsolute=/*#__PURE__*/function(_libPictTemplateIf2){/**
6797
6942
  * @param {Object} pFable - The Fable Framework instance
6798
6943
  * @param {Object} pOptions - The options for the service
6799
6944
  * @param {String} pServiceHash - The hash of the service
6800
- */function PictTemplateProviderTemplateIfAbsolute(pFable,pOptions,pServiceHash){var _this133;_classCallCheck2(this,PictTemplateProviderTemplateIfAbsolute);_this133=_callSuper(this,PictTemplateProviderTemplateIfAbsolute,[pFable,pOptions,pServiceHash]);/** @type {any} */_this133.log;_this133.addPattern('{~TemplateIfAbsolute:','~}');_this133.addPattern('{~TIfAbs:','~}');return _this133;}/**
6945
+ */function PictTemplateProviderTemplateIfAbsolute(pFable,pOptions,pServiceHash){var _this134;_classCallCheck2(this,PictTemplateProviderTemplateIfAbsolute);_this134=_callSuper(this,PictTemplateProviderTemplateIfAbsolute,[pFable,pOptions,pServiceHash]);/** @type {any} */_this134.log;_this134.addPattern('{~TemplateIfAbsolute:','~}');_this134.addPattern('{~TIfAbs:','~}');return _this134;}/**
6801
6946
  * Render a template expression, returning a string with the resulting content.
6802
6947
  *
6803
6948
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6804
6949
  * @param {any} pRecord - The json object to be used as the Record for the template render
6805
6950
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6806
6951
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6952
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6807
6953
  *
6808
6954
  * @return {string} The rendered template
6809
- */_inherits(PictTemplateProviderTemplateIfAbsolute,_libPictTemplateIf2);return _createClass2(PictTemplateProviderTemplateIfAbsolute,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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
6955
+ */_inherits(PictTemplateProviderTemplateIfAbsolute,_libPictTemplateIf2);return _createClass2(PictTemplateProviderTemplateIfAbsolute,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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
6810
6956
  if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return'';}// No comparison operation
6811
6957
  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...
6812
6958
  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
6813
- try{var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray,null,pScope),tmpComparisonParts[1],tmpComparisonParts[2]);if(!tmpComparisonResult){return'';}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
6814
- return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray,pScope);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope),null,pContextArray);}}catch(pError){this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError),pError);return'';}}/**
6959
+ try{var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray,null,pScope,pState),tmpComparisonParts[1],tmpComparisonParts[2]);if(!tmpComparisonResult){return'';}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
6960
+ return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray,pScope,pState);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope,pState),null,pContextArray,pScope,pState);}}catch(pError){this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError),pError);return'';}}/**
6815
6961
  * Render a template expression, deliver a string with the resulting content to a callback function.
6816
6962
  *
6817
6963
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
@@ -6819,11 +6965,12 @@ return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray,
6819
6965
  * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
6820
6966
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6821
6967
  * @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
6968
+ * @param {any} [pState] - A catchall state object for plumbing data through template processing.
6822
6969
  *
6823
6970
  * @return {void}
6824
- */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope){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
6971
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope,pState){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
6825
6972
  if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return tmpCallback(null,'');}// No comparison operation
6826
6973
  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...
6827
6974
  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
6828
- try{var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray,null,pScope),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,pScope);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}}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":247}]},{},[199])(199);});
6975
+ try{var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray,null,pScope,pState),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,pScope,pState);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope,pState),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}}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":247}]},{},[199])(199);});
6829
6976
  //# sourceMappingURL=pict.compatible.js.map