pict 1.0.217 → 1.0.219
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.
- package/dist/pict.compatible.js +45 -45
- package/dist/pict.compatible.min.js +2 -2
- package/dist/pict.compatible.min.js.map +1 -1
- package/dist/pict.js +44 -44
- package/dist/pict.min.js +1 -1
- package/dist/pict.min.js.map +1 -1
- package/package.json +1 -1
- package/source/Pict.js +1 -1
- package/types/Pict.d.ts.map +1 -1
package/dist/pict.compatible.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r);}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r);}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _defineProperty2(e,r,t){return(r=_toPropertyKey2(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _superPropGet(t,e,o
|
|
1
|
+
"use strict";function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r);}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r);}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _defineProperty2(e,r,t){return(r=_toPropertyKey2(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _superPropGet(t,e,r,o){var p=_get(_getPrototypeOf(1&o?t.prototype:t),e,r);return 2&o?function(t){return p.apply(r,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _classCallCheck2(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey2(o.key),o);}}function _createClass2(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey2(t){var i=_toPrimitive2(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive2(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}(function(f){if((typeof exports==="undefined"?"undefined":_typeof(exports))==="object"&&typeof module!=="undefined"){module.exports=f();}else if(typeof define==="function"&&define.amd){define([],f);}else{var g;if(typeof window!=="undefined"){g=window;}else if(typeof global!=="undefined"){g=global;}else if(typeof self!=="undefined"){g=self;}else{g=this;}g.Pict=f();}})(function(){var define,module,exports;return function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a;}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r);},p,p.exports,r,e,n,t);}return n[i].exports;}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o;}return r;}()({1:[function(require,module,exports){'use strict';var eachOfLimit=require('async.util.eachoflimit');var withoutIndex=require('async.util.withoutindex');module.exports=function eachLimit(arr,limit,iterator,cb){return eachOfLimit(limit)(arr,withoutIndex(iterator),cb);};},{"async.util.eachoflimit":3,"async.util.withoutindex":14}],2:[function(require,module,exports){'use strict';module.exports=function(tasks){function makeCallback(index){function fn(){if(tasks.length){tasks[index].apply(null,arguments);}return fn.next();}fn.next=function(){return index<tasks.length-1?makeCallback(index+1):null;};return fn;}return makeCallback(0);};},{}],3:[function(require,module,exports){var once=require('async.util.once');var noop=require('async.util.noop');var onlyOnce=require('async.util.onlyonce');var keyIterator=require('async.util.keyiterator');module.exports=function eachOfLimit(limit){return function(obj,iterator,cb){cb=once(cb||noop);obj=obj||[];var nextKey=keyIterator(obj);if(limit<=0){return cb(null);}var done=false;var running=0;var errored=false;(function replenish(){if(done&&running<=0){return cb(null);}while(running<limit&&!errored){var key=nextKey();if(key===null){done=true;if(running<=0){cb(null);}return;}running+=1;iterator(obj[key],key,onlyOnce(function(err){running-=1;if(err){cb(err);errored=true;}else{replenish();}}));}})();};};},{"async.util.keyiterator":7,"async.util.noop":9,"async.util.once":10,"async.util.onlyonce":11}],4:[function(require,module,exports){'use strict';var setImmediate=require('async.util.setimmediate');var restParam=require('async.util.restparam');module.exports=function(fn){return restParam(function(args){var callback=args.pop();args.push(function(){var innerArgs=arguments;if(sync){setImmediate(function(){callback.apply(null,innerArgs);});}else{callback.apply(null,innerArgs);}});var sync=true;fn.apply(this,args);sync=false;});};},{"async.util.restparam":12,"async.util.setimmediate":13}],5:[function(require,module,exports){'use strict';module.exports=Array.isArray||function isArray(obj){return Object.prototype.toString.call(obj)==='[object Array]';};},{}],6:[function(require,module,exports){'use strict';var isArray=require('async.util.isarray');module.exports=function isArrayLike(arr){return isArray(arr)||// has a positive integer length property
|
|
2
2
|
typeof arr.length==='number'&&arr.length>=0&&arr.length%1===0;};},{"async.util.isarray":5}],7:[function(require,module,exports){'use strict';var _keys=require('async.util.keys');var isArrayLike=require('async.util.isarraylike');module.exports=function keyIterator(coll){var i=-1;var len;var keys;if(isArrayLike(coll)){len=coll.length;return function next(){i++;return i<len?i:null;};}else{keys=_keys(coll);len=keys.length;return function next(){i++;return i<len?keys[i]:null;};}};},{"async.util.isarraylike":6,"async.util.keys":8}],8:[function(require,module,exports){'use strict';module.exports=Object.keys||function keys(obj){var _keys=[];for(var k in obj){if(obj.hasOwnProperty(k)){_keys.push(k);}}return _keys;};},{}],9:[function(require,module,exports){'use strict';module.exports=function noop(){};},{}],10:[function(require,module,exports){'use strict';module.exports=function once(fn){return function(){if(fn===null)return;fn.apply(this,arguments);fn=null;};};},{}],11:[function(require,module,exports){'use strict';module.exports=function only_once(fn){return function(){if(fn===null)throw new Error('Callback was already called.');fn.apply(this,arguments);fn=null;};};},{}],12:[function(require,module,exports){'use strict';module.exports=function restParam(func,startIndex){startIndex=startIndex==null?func.length-1:+startIndex;return function(){var length=Math.max(arguments.length-startIndex,0);var rest=new Array(length);for(var index=0;index<length;index++){rest[index]=arguments[index+startIndex];}switch(startIndex){case 0:return func.call(this,rest);case 1:return func.call(this,arguments[0],rest);}};};},{}],13:[function(require,module,exports){(function(setImmediate){(function(){'use strict';var _setImmediate=typeof setImmediate==='function'&&setImmediate;var fallback=function fallback(fn){setTimeout(fn,0);};module.exports=function setImmediate(fn){// not a direct alias for IE10 compatibility
|
|
3
3
|
return(_setImmediate||fallback)(fn);};}).call(this);}).call(this,require("timers").setImmediate);},{"timers":167}],14:[function(require,module,exports){'use strict';module.exports=function withoutIndex(iterator){return function(value,index,callback){return iterator(value,callback);};};},{}],15:[function(require,module,exports){'use strict';var once=require('async.util.once');var noop=require('async.util.noop');var isArray=require('async.util.isarray');var restParam=require('async.util.restparam');var ensureAsync=require('async.util.ensureasync');var iterator=require('async.iterator');module.exports=function(tasks,cb){cb=once(cb||noop);if(!isArray(tasks))return cb(new Error('First argument to waterfall must be an array of functions'));if(!tasks.length)return cb();function wrapIterator(iterator){return restParam(function(err,args){if(err){cb.apply(null,[err].concat(args));}else{var next=iterator.next();if(next){args.push(wrapIterator(next));}else{args.push(cb);}ensureAsync(iterator).apply(null,args);}});}wrapIterator(iterator(tasks))();};},{"async.iterator":2,"async.util.ensureasync":4,"async.util.isarray":5,"async.util.noop":9,"async.util.once":10,"async.util.restparam":12}],16:[function(require,module,exports){'use strict';exports.byteLength=byteLength;exports.toByteArray=toByteArray;exports.fromByteArray=fromByteArray;var lookup=[];var revLookup=[];var Arr=typeof Uint8Array!=='undefined'?Uint8Array:Array;var code='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';for(var i=0,len=code.length;i<len;++i){lookup[i]=code[i];revLookup[code.charCodeAt(i)]=i;}// Support decoding URL-safe base64 strings, as Node.js does.
|
|
4
4
|
// See: https://en.wikipedia.org/wiki/Base64#URL_applications
|
|
@@ -15,7 +15,7 @@ if(extraBytes===1){tmp=uint8[len-1];parts.push(lookup[tmp>>2]+lookup[tmp<<4&0x3F
|
|
|
15
15
|
* A small, fast, easy-to-use library for arbitrary-precision decimal arithmetic.
|
|
16
16
|
* Copyright (c) 2024 Michael Mclaughlin
|
|
17
17
|
* https://github.com/MikeMcl/big.js/LICENCE.md
|
|
18
|
-
*/;(function(GLOBAL){'use strict';var Big,/************************************** EDITABLE DEFAULTS
|
|
18
|
+
*/;(function(GLOBAL){'use strict';var Big,/************************************** EDITABLE DEFAULTS *****************************************/ // The default values below must be integers within the stated ranges.
|
|
19
19
|
/*
|
|
20
20
|
* The maximum number of decimal places (DP) of the results of operations involving division:
|
|
21
21
|
* div and sqrt, and pow with negative exponents.
|
|
@@ -47,7 +47,7 @@ MAX_POWER=1E6,// 1 to 1000000
|
|
|
47
47
|
* or if valueOf is called, or if toNumber is called on a Big which cannot be converted to a
|
|
48
48
|
* primitive number without a loss of precision.
|
|
49
49
|
*/STRICT=false,// true or false
|
|
50
|
-
|
|
50
|
+
/**************************************************************************************************/ // Error messages.
|
|
51
51
|
NAME='[big.js] ',INVALID=NAME+'Invalid ',INVALID_DP=INVALID+'decimal places',INVALID_RM=INVALID+'rounding mode',DIV_BY_ZERO=NAME+'Division by zero',// The shared prototype object.
|
|
52
52
|
P={},UNDEFINED=void 0,NUMERIC=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;/*
|
|
53
53
|
* Create and return a Big constructor.
|
|
@@ -258,7 +258,7 @@ if(typeof define==='function'&&define.amd){define(function(){return Big;});// No
|
|
|
258
258
|
*
|
|
259
259
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
260
260
|
* @license MIT
|
|
261
|
-
|
|
261
|
+
*/ /* eslint-disable no-proto */'use strict';var base64=require('base64-js');var ieee754=require('ieee754');exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;var K_MAX_LENGTH=0x7fffffff;exports.kMaxLength=K_MAX_LENGTH;/**
|
|
262
262
|
* If `Buffer.TYPED_ARRAY_SUPPORT`:
|
|
263
263
|
* === true Use Uint8Array implementation (fastest)
|
|
264
264
|
* === false Print warning and recommend using `buffer` v4.x which has an Object
|
|
@@ -447,7 +447,7 @@ _this4.pruneBasedOnLength(fComplete,tmpRemovedRecords);},tmpRemovedRecords);}//
|
|
|
447
447
|
*
|
|
448
448
|
* @author Steven Velozo <steven@velozo.com>
|
|
449
449
|
* @module CashMoney
|
|
450
|
-
|
|
450
|
+
*/ /**
|
|
451
451
|
* Linked List Node Prototype
|
|
452
452
|
*
|
|
453
453
|
* @class LinkedListNode
|
|
@@ -632,7 +632,7 @@ return true;}}]);}(libFableServiceProviderBase);module.exports=BaseLogger;},{"fa
|
|
|
632
632
|
*
|
|
633
633
|
*
|
|
634
634
|
* @author Steven Velozo <steven@velozo.com>
|
|
635
|
-
|
|
635
|
+
*/ // Return the providers that are available without extensions loaded
|
|
636
636
|
var getDefaultProviders=function getDefaultProviders(){var tmpDefaultProviders={};tmpDefaultProviders.console=require('./Fable-Log-Logger-Console.js');tmpDefaultProviders["default"]=tmpDefaultProviders.console;return tmpDefaultProviders;};module.exports=getDefaultProviders();},{"./Fable-Log-Logger-Console.js":50}],49:[function(require,module,exports){module.exports=[{"loggertype":"console","streamtype":"console","level":"trace"}];},{}],50:[function(require,module,exports){var libBaseLogger=require('./Fable-Log-BaseLogger.js');var ConsoleLogger=/*#__PURE__*/function(_libBaseLogger){function ConsoleLogger(pLogStreamSettings,pFableLog){var _this7;_classCallCheck2(this,ConsoleLogger);_this7=_callSuper(this,ConsoleLogger,[pLogStreamSettings]);_this7._ShowTimeStamps='showtimestamps'in _this7._Settings?_this7._Settings.showtimestamps==true:true;_this7._FormattedTimeStamps='formattedtimestamps'in _this7._Settings?_this7._Settings.formattedtimestamps==true:true;_this7._ContextMessage='Context'in _this7._Settings?"(".concat(_this7._Settings.Context,")"):'Product'in pFableLog._Settings?"(".concat(pFableLog._Settings.Product,")"):'Unnamed_Log_Context';// Allow the user to decide what gets output to the console
|
|
637
637
|
_this7._OutputLogLinesToConsole='outputloglinestoconsole'in _this7._Settings?_this7._Settings.outputloglinestoconsole:true;_this7._OutputObjectsToConsole='outputobjectstoconsole'in _this7._Settings?_this7._Settings.outputobjectstoconsole:true;// Precompute the prefix for each level
|
|
638
638
|
_this7.prefixCache={};for(var i=0;i<=_this7.levels.length;i++){_this7.prefixCache[_this7.levels[i]]="[".concat(_this7.levels[i],"] ").concat(_this7._ContextMessage,": ");if(_this7._ShowTimeStamps){// If there is a timestamp we need a to prepend space before the prefixcache string, since the timestamp comes first
|
|
@@ -722,7 +722,7 @@ function autoConstruct(pSettings){return new FableSettings(pSettings);}module.ex
|
|
|
722
722
|
*
|
|
723
723
|
*
|
|
724
724
|
* @author Steven Velozo <steven@velozo.com>
|
|
725
|
-
|
|
725
|
+
*/ // Adapted from node-uuid (https://github.com/kelektiv/node-uuid)
|
|
726
726
|
// Unique ID creation requires a high quality random # generator. In the
|
|
727
727
|
// browser this is a little complicated due to unknown quality of Math.random()
|
|
728
728
|
// and inconsistent support for the `crypto` API. We do the best we can via
|
|
@@ -753,7 +753,7 @@ tmpRandomBytes[6]=tmpRandomBytes[6]&0x0f|0x40;tmpRandomBytes[8]=tmpRandomBytes[8
|
|
|
753
753
|
function autoConstruct(pSettings){return new FableUUID(pSettings);}module.exports=FableUUID;module.exports["new"]=autoConstruct;},{"../package.json":59,"./Fable-UUID-Random.js":60,"fable-serviceproviderbase":54}],62:[function(require,module,exports){module.exports={"name":"fable","version":"3.0.145","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.33"},"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.37","simple-get":"^4.0.1"}};},{}],63:[function(require,module,exports){/**
|
|
754
754
|
* Fable Application Services Support Library
|
|
755
755
|
* @author <steven@velozo.com>
|
|
756
|
-
|
|
756
|
+
*/ // Pre-init services
|
|
757
757
|
var libFableSettings=require('fable-settings');var libFableUUID=require('fable-uuid');var libFableLog=require('fable-log');var libPackage=require('../package.json');var libFableServiceBase=require('fable-serviceproviderbase');var Fable=/*#__PURE__*/function(_libFableServiceBase$){function Fable(pSettings){var _this13;_classCallCheck2(this,Fable);_this13=_callSuper(this,Fable,[pSettings]);// Initialization Phase 0: Set up the lowest level state (fable is a utility service manager at heart)
|
|
758
758
|
_this13.serviceType='ServiceManager';/** @type {Object} */_this13._Package=libPackage;// An array of the types of services available
|
|
759
759
|
_this13.serviceTypes=[];// A map of instantiated services
|
|
@@ -864,7 +864,7 @@ _this16._Regex_formatterAddCommasToNumber=/^([-+]?)(0?)(\d+)(.?)(\d+)$/g;_this16
|
|
|
864
864
|
// TODO: Use locale data for this if it's defaults all the way down.
|
|
865
865
|
_this16._Value_MoneySign_Currency='$';_this16._Value_NaN_Currency='--';_this16._Value_GroupSeparator_Number=',';_this16._Value_Prefix_StringHash='HSH';_this16._Value_Clean_formatterCleanNonAlpha='';_this16._UseEngineStringStartsWith=typeof String.prototype.startsWith==='function';_this16._UseEngineStringEndsWith=typeof String.prototype.endsWith==='function';return _this16;}/*************************************************************************
|
|
866
866
|
* String Manipulation and Comparison Functions
|
|
867
|
-
|
|
867
|
+
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ /**
|
|
868
868
|
* Reverse a string
|
|
869
869
|
*
|
|
870
870
|
* @param {string} pString - The string to reverse
|
|
@@ -930,7 +930,7 @@ if(pString.startsWith(pWrapCharacter)&&pString.endsWith(pWrapCharacter)){return
|
|
|
930
930
|
* @returns
|
|
931
931
|
*/},{key:"cleanNonAlphaCharacters",value:function cleanNonAlphaCharacters(pString){if(typeof pString=='string'&&pString!=''){return pString.replace(this._Regex_formatterCleanNonAlphaChar,this._Value_Clean_formatterCleanNonAlpha);}return'';}/*************************************************************************
|
|
932
932
|
* Number Formatting Functions
|
|
933
|
-
|
|
933
|
+
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ /**
|
|
934
934
|
* Insert commas every 3 characters from the right. Used by formatterAddCommasToNumber().
|
|
935
935
|
*
|
|
936
936
|
* @param {*} pString
|
|
@@ -968,7 +968,7 @@ return"$".concat(this.formatterAddCommasToNumber(tmpDollarAmount));}/**
|
|
|
968
968
|
*/},{key:"stringGeneratePaddingString",value:function stringGeneratePaddingString(pString,pTargetLength,pPadString){var tmpTargetLength=pTargetLength>>0;var tmpPadString=String(typeof pPadString!=='undefined'?pPadString:' ');if(pString.length>pTargetLength){// No padding string if the source string is already longer than the target length, return an empty string
|
|
969
969
|
return'';}else{var tmpPadLength=pTargetLength-pString.length;if(tmpPadLength>tmpPadString.length){tmpPadString+=tmpPadString.repeat(tmpTargetLength/tmpPadString.length);}return tmpPadString.slice(0,tmpPadLength);}}},{key:"formatTimeSpan",value:/*************************************************************************
|
|
970
970
|
* Time Formatting Functions (milliseconds)
|
|
971
|
-
|
|
971
|
+
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ /**
|
|
972
972
|
* Format a time length in milliseconds into a human readable string.
|
|
973
973
|
* @param {number} pTimeSpan
|
|
974
974
|
* @returns {string} - HH:MM:SS.mmm
|
|
@@ -981,7 +981,7 @@ return'';}else{var tmpPadLength=pTargetLength-pString.length;if(tmpPadLength>tmp
|
|
|
981
981
|
*/},{key:"formatTimeDelta",value:function formatTimeDelta(pTimeStart,pTimeEnd){if(typeof pTimeStart!='number'||typeof pTimeEnd!='number'){return'';}return this.formatTimeSpan(pTimeEnd-pTimeStart);}// THE FOLLOWING TERRIBLE FUNCTIONS ARE FOR QT / WKHTMLTOPDF when luxon and moment don't work so well
|
|
982
982
|
},{key:"getMonthFromDate",value:function getMonthFromDate(pJavascriptDate){var tmpMonths=["January","February","March","April","May","June","July","August","September","October","November","December"];return tmpMonths[pJavascriptDate.getMonth()];}},{key:"getMonthAbbreviatedFromDate",value:function getMonthAbbreviatedFromDate(pJavascriptDate){var tmpMonths=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];return tmpMonths[pJavascriptDate.getMonth()];}},{key:"formatMonthDayYearFromDate",value:function formatMonthDayYearFromDate(pJavascriptDate,pStrict){var tmpStrict=typeof pStrict!=='undefined'?pStrict:false;var tmpMonth=pJavascriptDate.getMonth()+1;var tmpDay=pJavascriptDate.getDate();var tmpYear=pJavascriptDate.getFullYear();if(tmpStrict){tmpMonth=this.stringPadStart(tmpMonth,2,'0');tmpDay=this.stringPadStart(tmpDay,2,'0');tmpYear=this.stringPadStart(tmpYear,4,'0');}return"".concat(tmpMonth,"/").concat(tmpDay,"/").concat(tmpYear);}},{key:"formatSortableStringFromDate",value:function formatSortableStringFromDate(pDate){return pDate.getFullYear()+this.stringPadStart(pDate.getMonth(),2,'0')+this.stringPadStart(pDate.getDate(),2,'0');}/*************************************************************************
|
|
983
983
|
* String Tokenization Functions
|
|
984
|
-
|
|
984
|
+
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ /**
|
|
985
985
|
* Return the string before the matched substring.
|
|
986
986
|
*
|
|
987
987
|
* If the substring is not found, the entire string is returned. This only deals with the *first* match.
|
|
@@ -1212,7 +1212,7 @@ if(tmpCharacter in this.ExpressionParser.tokenMap){if(tmpCurrentToken.length>0){
|
|
|
1212
1212
|
/* Per this stack overflow article: https://stackoverflow.com/questions/4434076/best-way-to-alphanumeric-check-in-javascript
|
|
1213
1213
|
* We could use a regex but it is slower than the charCodeAt method.
|
|
1214
1214
|
* This also doesn't solve the problem of unicode characters, but we won't support those for now.
|
|
1215
|
-
|
|
1215
|
+
*/ // if (pExpression.charAt(i) == '.')
|
|
1216
1216
|
// {
|
|
1217
1217
|
// console.log('Found a period')
|
|
1218
1218
|
// }
|
|
@@ -1578,7 +1578,7 @@ var tmpResult=tmpDegreesArbitraryValue.times(Math.PI).div(180);return tmpResult.
|
|
|
1578
1578
|
* on what was requested.
|
|
1579
1579
|
*
|
|
1580
1580
|
* The following functions will likely be broken into their own service.
|
|
1581
|
-
|
|
1581
|
+
*/ /**
|
|
1582
1582
|
* Counts the number of elements in a set.
|
|
1583
1583
|
*
|
|
1584
1584
|
* @param {Array|Object|any} pValueSet - The set to count the elements of.
|
|
@@ -1956,7 +1956,7 @@ if(_typeof(pTranslation)!='object'){this.logError("Hash translation addTranslati
|
|
|
1956
1956
|
// If passed an object, it does all the source keys.
|
|
1957
1957
|
},{key:"removeTranslation",value:function removeTranslation(pTranslation){var _this47=this;if(typeof pTranslation=='string'){this.removeTranslationHash(pTranslation);return true;}else if(_typeof(pTranslation)=='object'){var tmpTranslationSources=Object.keys(pTranslation);tmpTranslationSources.forEach(function(pTranslationSource){_this47.removeTranslation(pTranslationSource);});return true;}else{this.logError("Hash translation removeTranslation expected either a string or an object but the passed-in translation was type ".concat(_typeof(pTranslation)));return false;}}},{key:"clearTranslations",value:function clearTranslations(){this.translationTable={};}},{key:"translate",value:function translate(pTranslation){if(pTranslation in this.translationTable){return this.translationTable[pTranslation];}else{return pTranslation;}}}]);}();module.exports=ManyfestHashTranslation;},{"./Manyfest-LogToConsole.js":108}],108:[function(require,module,exports){/**
|
|
1958
1958
|
* @author <steven@velozo.com>
|
|
1959
|
-
|
|
1959
|
+
*/ /**
|
|
1960
1960
|
* Manyfest simple logging shim (for browser and dependency-free running)
|
|
1961
1961
|
*/var logToConsole=function logToConsole(pLogLine,pLogObject){var tmpLogLine=typeof pLogLine==='string'?pLogLine:'';console.log("[Manyfest] ".concat(tmpLogLine));if(pLogObject)console.log(JSON.stringify(pLogObject));};module.exports=logToConsole;},{}],109:[function(require,module,exports){/**
|
|
1962
1962
|
* @author <steven@velozo.com>
|
|
@@ -2702,7 +2702,7 @@ var tmpDescriptorAddresses=Object.keys(tmpSource);tmpDescriptorAddresses.forEach
|
|
|
2702
2702
|
_this48.logInfo=libSimpleLog;_this48.logError=libSimpleLog;// Create an object address resolver and map in the functions
|
|
2703
2703
|
_this48.objectAddressCheckAddressExists=new libObjectAddressCheckAddressExists(_this48.logInfo,_this48.logError);_this48.objectAddressGetValue=new libObjectAddressGetValue(_this48.logInfo,_this48.logError);_this48.objectAddressSetValue=new libObjectAddressSetValue(_this48.logInfo,_this48.logError);_this48.objectAddressDeleteValue=new libObjectAddressDeleteValue(_this48.logInfo,_this48.logError);if(!('defaultValues'in _this48.options)){_this48.options.defaultValues={"String":"","Number":0,"Float":0.0,"Integer":0,"PreciseNumber":"0.0","Boolean":false,"Binary":0,"DateTime":0,"Array":[],"Object":{},"Null":null};}if(!('strict'in _this48.options)){_this48.options.strict=false;}_this48.scope=undefined;_this48.elementAddresses=undefined;_this48.elementHashes=undefined;_this48.elementDescriptors=undefined;_this48.reset();if(_typeof(_this48.options)==='object'){_this48.loadManifest(_this48.options);}_this48.schemaManipulations=new libSchemaManipulation(_this48.logInfo,_this48.logError);_this48.objectAddressGeneration=new libObjectAddressGeneration(_this48.logInfo,_this48.logError);_this48.hashTranslations=new libHashTranslation(_this48.logInfo,_this48.logError);_this48.numberRegex=/^[+-]?(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?$/;return _assertThisInitialized(_this48);}/*************************************************************************
|
|
2704
2704
|
* Schema Manifest Loading, Reading, Manipulation and Serialization Functions
|
|
2705
|
-
|
|
2705
|
+
*/ // Reset critical manifest properties
|
|
2706
2706
|
_inherits(Manyfest,_libFableServiceProvi10);return _createClass2(Manyfest,[{key:"reset",value:function reset(){this.scope='DEFAULT';this.elementAddresses=[];this.elementHashes={};this.elementDescriptors={};}},{key:"clone",value:function clone(){// Make a copy of the options in-place
|
|
2707
2707
|
var tmpNewOptions=JSON.parse(JSON.stringify(this.options));var tmpNewManyfest=new Manyfest(this.getManifest(),this.logInfo,this.logError,tmpNewOptions);// Import the hash translations
|
|
2708
2708
|
tmpNewManyfest.hashTranslations.addTranslation(this.hashTranslations.translationTable);return tmpNewManyfest;}// Deserialize a Manifest from a string
|
|
@@ -2719,7 +2719,7 @@ this.elementHashes[pAddress]=pAddress;if('Hash'in pDescriptor){// TODO: Check if
|
|
|
2719
2719
|
this.elementHashes[pDescriptor.Hash]=pAddress;}else{pDescriptor.Hash=pAddress;}return true;}else{this.logError("(".concat(this.scope,") Error loading object descriptor for address '").concat(pAddress,"' from manifest object. Expecting an object but property was type ").concat(_typeof(pDescriptor),"."));return false;}}},{key:"getDescriptorByHash",value:function getDescriptorByHash(pHash){return this.getDescriptor(this.resolveHashAddress(pHash));}},{key:"getDescriptor",value:function getDescriptor(pAddress){return this.elementDescriptors[pAddress];}// execute an action function for each descriptor
|
|
2720
2720
|
},{key:"eachDescriptor",value:function eachDescriptor(fAction){var tmpDescriptorAddresses=Object.keys(this.elementDescriptors);for(var i=0;i<tmpDescriptorAddresses.length;i++){fAction(this.elementDescriptors[tmpDescriptorAddresses[i]]);}}/*************************************************************************
|
|
2721
2721
|
* Beginning of Object Manipulation (read & write) Functions
|
|
2722
|
-
|
|
2722
|
+
*/ // Check if an element exists by its hash
|
|
2723
2723
|
},{key:"checkAddressExistsByHash",value:function checkAddressExistsByHash(pObject,pHash){return this.checkAddressExists(pObject,this.resolveHashAddress(pHash));}// Check if an element exists at an address
|
|
2724
2724
|
},{key:"checkAddressExists",value:function checkAddressExists(pObject,pAddress){return this.objectAddressCheckAddressExists.checkAddressExists(pObject,pAddress);}// Turn a hash into an address, factoring in the translation table.
|
|
2725
2725
|
},{key:"resolveHashAddress",value:function resolveHashAddress(pHash){var tmpAddress=undefined;var tmpInElementHashTable=pHash in this.elementHashes;var tmpInTranslationTable=pHash in this.hashTranslations.translationTable;// The most straightforward: the hash exists, no translations.
|
|
@@ -2863,7 +2863,7 @@ IdentifierAddressPrefix:'PICT-'};var PictApplication=/*#__PURE__*/function(_libF
|
|
|
2863
2863
|
_this50.pict=_this50.fable;// Wire in the essential Pict state
|
|
2864
2864
|
_this50.AppData=_this50.fable.AppData;_this50.initializeTimestamp=false;_this50.lastSolvedTimestamp=false;_this50.lastMarshalFromViewsTimestamp=false;_this50.lastMarshalToViewsTimestamp=false;_this50.lastAutoRenderTimestamp=false;// Load all the manifests for the application
|
|
2865
2865
|
var tmpManifestKeys=Object.keys(_this50.options.Manifests);if(tmpManifestKeys.length>0){for(var i=0;i<tmpManifestKeys.length;i++){// Load each manifest
|
|
2866
|
-
var tmpManifestKey=tmpManifestKeys[i];_this50.fable.instantiateServiceProvider('Manifest',_this50.options.Manifests[tmpManifestKey],tmpManifestKey);}}return _this50;}/* --------------------------------------------------------------------------
|
|
2866
|
+
var tmpManifestKey=tmpManifestKeys[i];_this50.fable.instantiateServiceProvider('Manifest',_this50.options.Manifests[tmpManifestKey],tmpManifestKey);}}return _this50;}/* -------------------------------------------------------------------------- */ /* Code Section: Solve All Views */ /* -------------------------------------------------------------------------- */_inherits(PictApplication,_libFableServiceBase14);return _createClass2(PictApplication,[{key:"onPreSolve",value:function onPreSolve(){if(this.pict.LogNoisiness>3){this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onPreSolve:"));}return true;}},{key:"onPreSolveAsync",value:function onPreSolveAsync(fCallback){this.onPreSolve();return fCallback();}},{key:"onBeforeSolve",value:function onBeforeSolve(){if(this.pict.LogNoisiness>3){this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeSolve:"));}return true;}},{key:"onBeforeSolveAsync",value:function onBeforeSolveAsync(fCallback){this.onBeforeSolve();return fCallback();}},{key:"onSolve",value:function onSolve(){if(this.pict.LogNoisiness>3){this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onSolve:"));}return true;}},{key:"onSolveAsync",value:function onSolveAsync(fCallback){this.onSolve();return fCallback();}},{key:"solve",value:function solve(){if(this.pict.LogNoisiness>2){this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing solve() function..."));}// Walk through any loaded providers and solve them as well.
|
|
2867
2867
|
var tmpLoadedProviders=Object.keys(this.pict.providers);var tmpProvidersToSolve=[];for(var i=0;i<tmpLoadedProviders.length;i++){var tmpProvider=this.pict.providers[tmpLoadedProviders[i]];if(tmpProvider.options.AutoSolveWithApp){tmpProvidersToSolve.push(tmpProvider);}}// Sort the views by their priority (if they are all priority 0, it will end up being add order due to JSON Object Property Key order stuff)
|
|
2868
2868
|
tmpProvidersToSolve.sort(function(a,b){return a.options.AutoSolveOrdinal-b.options.AutoSolveOrdinal;});for(var _i35=0;_i35<tmpProvidersToSolve.length;_i35++){tmpProvidersToSolve[_i35].solve(tmpProvidersToSolve[_i35]);}this.onBeforeSolve();// Now walk through any loaded views and initialize them as well.
|
|
2869
2869
|
var tmpLoadedViews=Object.keys(this.pict.views);var tmpViewsToSolve=[];for(var _i36=0;_i36<tmpLoadedViews.length;_i36++){var tmpView=this.pict.views[tmpLoadedViews[_i36]];if(tmpView.options.AutoInitialize){tmpViewsToSolve.push(tmpView);}}// Sort the views by their priority (if they are all priority 0, it will end up being add order due to JSON Object Property Key order stuff)
|
|
@@ -2872,7 +2872,7 @@ var tmpCallback=typeof fCallback==='function'?fCallback:false;if(!tmpCallback){t
|
|
|
2872
2872
|
var tmpLoadedProviders=Object.keys(this.pict.providers);var tmpProvidersToSolve=[];for(var i=0;i<tmpLoadedProviders.length;i++){var tmpProvider=this.pict.providers[tmpLoadedProviders[i]];if(tmpProvider.options.AutoSolveWithApp){tmpProvidersToSolve.push(tmpProvider);}}// Sort the views by their priority (if they are all priority 0, it will end up being add order due to JSON Object Property Key order stuff)
|
|
2873
2873
|
tmpProvidersToSolve.sort(function(a,b){return a.options.AutoSolveOrdinal-b.options.AutoSolveOrdinal;});for(var _i38=0;_i38<tmpProvidersToSolve.length;_i38++){tmpAnticipate.anticipate(tmpProvidersToSolve[_i38].solveAsync.bind(tmpProvidersToSolve[_i38]));}// Walk through any loaded views and solve them as well.
|
|
2874
2874
|
var tmpLoadedViews=Object.keys(this.pict.views);var tmpViewsToSolve=[];for(var _i39=0;_i39<tmpLoadedViews.length;_i39++){var tmpView=this.pict.views[tmpLoadedViews[_i39]];if(tmpView.options.AutoSolveWithApp){tmpViewsToSolve.push(tmpView);}}// Sort the views by their priority (if they are all priority 0, it will end up being add order due to JSON Object Property Key order stuff)
|
|
2875
|
-
tmpViewsToSolve.sort(function(a,b){return a.options.AutoSolveOrdinal-b.options.AutoSolveOrdinal;});for(var _i40=0;_i40<tmpViewsToSolve.length;_i40++){tmpAnticipate.anticipate(tmpViewsToSolve[_i40].solveAsync.bind(tmpViewsToSolve[_i40]));}tmpAnticipate.anticipate(this.onSolveAsync.bind(this));tmpAnticipate.anticipate(this.onAfterSolveAsync.bind(this));tmpAnticipate.wait(function(pError){if(_this51.pict.LogNoisiness>2){_this51.log.trace("PictApp [".concat(_this51.UUID,"]::[").concat(_this51.Hash,"] ").concat(_this51.options.Name," solveAsync() complete."));}_this51.lastSolvedTimestamp=_this51.fable.log.getTimeStamp();return tmpCallback(pError);});}},{key:"onAfterSolve",value:function onAfterSolve(){if(this.pict.LogNoisiness>3){this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterSolve:"));}return true;}},{key:"onAfterSolveAsync",value:function onAfterSolveAsync(fCallback){this.onAfterSolve();return fCallback();}/* --------------------------------------------------------------------------
|
|
2875
|
+
tmpViewsToSolve.sort(function(a,b){return a.options.AutoSolveOrdinal-b.options.AutoSolveOrdinal;});for(var _i40=0;_i40<tmpViewsToSolve.length;_i40++){tmpAnticipate.anticipate(tmpViewsToSolve[_i40].solveAsync.bind(tmpViewsToSolve[_i40]));}tmpAnticipate.anticipate(this.onSolveAsync.bind(this));tmpAnticipate.anticipate(this.onAfterSolveAsync.bind(this));tmpAnticipate.wait(function(pError){if(_this51.pict.LogNoisiness>2){_this51.log.trace("PictApp [".concat(_this51.UUID,"]::[").concat(_this51.Hash,"] ").concat(_this51.options.Name," solveAsync() complete."));}_this51.lastSolvedTimestamp=_this51.fable.log.getTimeStamp();return tmpCallback(pError);});}},{key:"onAfterSolve",value:function onAfterSolve(){if(this.pict.LogNoisiness>3){this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterSolve:"));}return true;}},{key:"onAfterSolveAsync",value:function onAfterSolveAsync(fCallback){this.onAfterSolve();return fCallback();}/* -------------------------------------------------------------------------- */ /* Code Section: Initialize Application */ /* -------------------------------------------------------------------------- */},{key:"onBeforeInitialize",value:function onBeforeInitialize(){if(this.pict.LogNoisiness>3){this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeInitialize:"));}return true;}},{key:"onBeforeInitializeAsync",value:function onBeforeInitializeAsync(fCallback){this.onBeforeInitialize();return fCallback();}},{key:"onInitialize",value:function onInitialize(){if(this.pict.LogNoisiness>3){this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onInitialize:"));}return true;}},{key:"onInitializeAsync",value:function onInitializeAsync(fCallback){this.onInitialize();return fCallback();}},{key:"initialize",value:function initialize(){if(this.pict.LogControlFlow){this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initialize:"));}if(!this.initializeTimestamp){this.onBeforeInitialize();if('ConfigurationOnlyViews'in this.options){// Load all the configuration only views
|
|
2876
2876
|
for(var i=0;i<this.options.ConfigurationOnlyViews.length;i++){var tmpViewIdentifier=typeof this.options.ConfigurationOnlyViews[i].ViewIdentifier==='undefined'?"AutoView-".concat(this.fable.getUUID()):this.options.ConfigurationOnlyViews[i].ViewIdentifier;this.log.info("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," adding configuration only view: ").concat(tmpViewIdentifier));this.pict.addView(tmpViewIdentifier,this.options.ConfigurationOnlyViews[i]);}}this.onInitialize();// Walk through any loaded providers and initialize them as well.
|
|
2877
2877
|
var tmpLoadedProviders=Object.keys(this.pict.providers);var tmpProvidersToInitialize=[];for(var _i41=0;_i41<tmpLoadedProviders.length;_i41++){var tmpProvider=this.pict.providers[tmpLoadedProviders[_i41]];if(tmpProvider.options.AutoInitialize){tmpProvidersToInitialize.push(tmpProvider);}}// Sort the views by their priority (if they are all priority 0, it will end up being add order due to JSON Object Property Key order stuff)
|
|
2878
2878
|
tmpProvidersToInitialize.sort(function(a,b){return a.options.AutoInitializeOrdinal-b.options.AutoInitializeOrdinal;});for(var _i42=0;_i42<tmpProvidersToInitialize.length;_i42++){tmpProvidersToInitialize[_i42].initialize();}// Now walk through any loaded views and initialize them as well.
|
|
@@ -2889,13 +2889,13 @@ tmpProvidersToInitialize.sort(function(a,b){return a.options.AutoInitializeOrdin
|
|
|
2889
2889
|
var tmpLoadedViews=Object.keys(this.pict.views);var tmpViewsToInitialize=[];for(var _i47=0;_i47<tmpLoadedViews.length;_i47++){var tmpView=this.pict.views[tmpLoadedViews[_i47]];if(tmpView.options.AutoInitialize){tmpViewsToInitialize.push(tmpView);}}// Sort the views by their priority
|
|
2890
2890
|
// If they are all the default priority 0, it will end up being add order due to JSON Object Property Key order stuff
|
|
2891
2891
|
tmpViewsToInitialize.sort(function(a,b){return a.options.AutoInitializeOrdinal-b.options.AutoInitializeOrdinal;});for(var _i48=0;_i48<tmpViewsToInitialize.length;_i48++){var _tmpView=tmpViewsToInitialize[_i48];tmpAnticipate.anticipate(_tmpView.initializeAsync.bind(_tmpView));}tmpAnticipate.anticipate(this.onAfterInitializeAsync.bind(this));if(this.options.AutoSolveAfterInitialize){if(this.pict.LogNoisiness>1){this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto solving (asynchronously) after initialization..."));}tmpAnticipate.anticipate(this.solveAsync.bind(this));}if(this.options.AutoRenderMainViewportViewAfterInitialize){if(this.pict.LogNoisiness>1){this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto rendering (asynchronously) after initialization..."));}tmpAnticipate.anticipate(this.renderMainViewportAsync.bind(this));}tmpAnticipate.wait(function(pError){_this52.initializeTimestamp=_this52.fable.log.getTimeStamp();if(_this52.pict.LogNoisiness>2){_this52.log.trace("PictApp [".concat(_this52.UUID,"]::[").concat(_this52.Hash,"] ").concat(_this52.options.Name," initialization complete."));}return tmpCallback();});}else{this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," async initialize called but initialization is already completed. Aborting."));// TODO: Should this be an error?
|
|
2892
|
-
return tmpCallback();}}},{key:"onAfterInitialize",value:function onAfterInitialize(){if(this.pict.LogNoisiness>3){this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterInitialize:"));}return true;}},{key:"onAfterInitializeAsync",value:function onAfterInitializeAsync(fCallback){this.onAfterInitialize();return fCallback();}/* --------------------------------------------------------------------------
|
|
2892
|
+
return tmpCallback();}}},{key:"onAfterInitialize",value:function onAfterInitialize(){if(this.pict.LogNoisiness>3){this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterInitialize:"));}return true;}},{key:"onAfterInitializeAsync",value:function onAfterInitializeAsync(fCallback){this.onAfterInitialize();return fCallback();}/* -------------------------------------------------------------------------- */ /* Code Section: Marshal Data From All Views */ /* -------------------------------------------------------------------------- */},{key:"onBeforeMarshalFromViews",value:function onBeforeMarshalFromViews(){if(this.pict.LogNoisiness>3){this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeMarshalFromViews:"));}return true;}},{key:"onBeforeMarshalFromViewsAsync",value:function onBeforeMarshalFromViewsAsync(fCallback){this.onBeforeMarshalFromViews();return fCallback();}},{key:"onMarshalFromViews",value:function onMarshalFromViews(){if(this.pict.LogNoisiness>3){this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onMarshalFromViews:"));}return true;}},{key:"onMarshalFromViewsAsync",value:function onMarshalFromViewsAsync(fCallback){this.onMarshalFromViews();return fCallback();}},{key:"marshalFromViews",value:function marshalFromViews(){if(this.pict.LogNoisiness>2){this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing marshalFromViews() function..."));}this.onBeforeMarshalFromViews();// Now walk through any loaded views and initialize them as well.
|
|
2893
2893
|
var tmpLoadedViews=Object.keys(this.pict.views);var tmpViewsToMarshalFromViews=[];for(var i=0;i<tmpLoadedViews.length;i++){var tmpView=this.pict.views[tmpLoadedViews[i]];tmpViewsToMarshalFromViews.push(tmpView);}for(var _i49=0;_i49<tmpViewsToMarshalFromViews.length;_i49++){tmpViewsToMarshalFromViews[_i49].marshalFromView();}this.onMarshalFromViews();this.onAfterMarshalFromViews();this.lastMarshalFromViewsTimestamp=this.fable.log.getTimeStamp();return true;}},{key:"marshalFromViewsAsync",value:function marshalFromViewsAsync(fCallback){var _this53=this;var tmpAnticipate=this.fable.instantiateServiceProviderWithoutRegistration('Anticipate');// Allow the callback to be passed in as the last parameter no matter what
|
|
2894
2894
|
var tmpCallback=typeof fCallback==='function'?fCallback:false;if(!tmpCallback){this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions."));tmpCallback=function tmpCallback(pError){if(pError){_this53.log.error("PictApp [".concat(_this53.UUID,"]::[").concat(_this53.Hash,"] ").concat(_this53.options.Name," marshalFromViewsAsync Auto Callback Error: ").concat(pError),pError);}};}tmpAnticipate.anticipate(this.onBeforeMarshalFromViewsAsync.bind(this));// Walk through any loaded views and marshalFromViews them as well.
|
|
2895
|
-
var tmpLoadedViews=Object.keys(this.pict.views);var tmpViewsToMarshalFromViews=[];for(var i=0;i<tmpLoadedViews.length;i++){var tmpView=this.pict.views[tmpLoadedViews[i]];tmpViewsToMarshalFromViews.push(tmpView);}for(var _i50=0;_i50<tmpViewsToMarshalFromViews.length;_i50++){tmpAnticipate.anticipate(tmpViewsToMarshalFromViews[_i50].marshalFromViewAsync.bind(tmpViewsToMarshalFromViews[_i50]));}tmpAnticipate.anticipate(this.onMarshalFromViewsAsync.bind(this));tmpAnticipate.anticipate(this.onAfterMarshalFromViewsAsync.bind(this));tmpAnticipate.wait(function(pError){if(_this53.pict.LogNoisiness>2){_this53.log.trace("PictApp [".concat(_this53.UUID,"]::[").concat(_this53.Hash,"] ").concat(_this53.options.Name," marshalFromViewsAsync() complete."));}_this53.lastMarshalFromViewsTimestamp=_this53.fable.log.getTimeStamp();return tmpCallback(pError);});}},{key:"onAfterMarshalFromViews",value:function onAfterMarshalFromViews(){if(this.pict.LogNoisiness>3){this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterMarshalFromViews:"));}return true;}},{key:"onAfterMarshalFromViewsAsync",value:function onAfterMarshalFromViewsAsync(fCallback){this.onAfterMarshalFromViews();return fCallback();}/* --------------------------------------------------------------------------
|
|
2895
|
+
var tmpLoadedViews=Object.keys(this.pict.views);var tmpViewsToMarshalFromViews=[];for(var i=0;i<tmpLoadedViews.length;i++){var tmpView=this.pict.views[tmpLoadedViews[i]];tmpViewsToMarshalFromViews.push(tmpView);}for(var _i50=0;_i50<tmpViewsToMarshalFromViews.length;_i50++){tmpAnticipate.anticipate(tmpViewsToMarshalFromViews[_i50].marshalFromViewAsync.bind(tmpViewsToMarshalFromViews[_i50]));}tmpAnticipate.anticipate(this.onMarshalFromViewsAsync.bind(this));tmpAnticipate.anticipate(this.onAfterMarshalFromViewsAsync.bind(this));tmpAnticipate.wait(function(pError){if(_this53.pict.LogNoisiness>2){_this53.log.trace("PictApp [".concat(_this53.UUID,"]::[").concat(_this53.Hash,"] ").concat(_this53.options.Name," marshalFromViewsAsync() complete."));}_this53.lastMarshalFromViewsTimestamp=_this53.fable.log.getTimeStamp();return tmpCallback(pError);});}},{key:"onAfterMarshalFromViews",value:function onAfterMarshalFromViews(){if(this.pict.LogNoisiness>3){this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterMarshalFromViews:"));}return true;}},{key:"onAfterMarshalFromViewsAsync",value:function onAfterMarshalFromViewsAsync(fCallback){this.onAfterMarshalFromViews();return fCallback();}/* -------------------------------------------------------------------------- */ /* Code Section: Marshal Data To All Views */ /* -------------------------------------------------------------------------- */},{key:"onBeforeMarshalToViews",value:function onBeforeMarshalToViews(){if(this.pict.LogNoisiness>3){this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeMarshalToViews:"));}return true;}},{key:"onBeforeMarshalToViewsAsync",value:function onBeforeMarshalToViewsAsync(fCallback){this.onBeforeMarshalToViews();return fCallback();}},{key:"onMarshalToViews",value:function onMarshalToViews(){if(this.pict.LogNoisiness>3){this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onMarshalToViews:"));}return true;}},{key:"onMarshalToViewsAsync",value:function onMarshalToViewsAsync(fCallback){this.onMarshalToViews();return fCallback();}},{key:"marshalToViews",value:function marshalToViews(){if(this.pict.LogNoisiness>2){this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing marshalToViews() function..."));}this.onBeforeMarshalToViews();// Now walk through any loaded views and initialize them as well.
|
|
2896
2896
|
var tmpLoadedViews=Object.keys(this.pict.views);var tmpViewsToMarshalToViews=[];for(var i=0;i<tmpLoadedViews.length;i++){var tmpView=this.pict.views[tmpLoadedViews[i]];tmpViewsToMarshalToViews.push(tmpView);}for(var _i51=0;_i51<tmpViewsToMarshalToViews.length;_i51++){tmpViewsToMarshalToViews[_i51].marshalToView();}this.onMarshalToViews();this.onAfterMarshalToViews();this.lastMarshalToViewsTimestamp=this.fable.log.getTimeStamp();return true;}},{key:"marshalToViewsAsync",value:function marshalToViewsAsync(fCallback){var _this54=this;var tmpAnticipate=this.fable.instantiateServiceProviderWithoutRegistration('Anticipate');// Allow the callback to be passed in as the last parameter no matter what
|
|
2897
2897
|
var tmpCallback=typeof fCallback==='function'?fCallback:false;if(!tmpCallback){this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions."));tmpCallback=function tmpCallback(pError){if(pError){_this54.log.error("PictApp [".concat(_this54.UUID,"]::[").concat(_this54.Hash,"] ").concat(_this54.options.Name," marshalToViewsAsync Auto Callback Error: ").concat(pError),pError);}};}tmpAnticipate.anticipate(this.onBeforeMarshalToViewsAsync.bind(this));// Walk through any loaded views and marshalToViews them as well.
|
|
2898
|
-
var tmpLoadedViews=Object.keys(this.pict.views);var tmpViewsToMarshalToViews=[];for(var i=0;i<tmpLoadedViews.length;i++){var tmpView=this.pict.views[tmpLoadedViews[i]];tmpViewsToMarshalToViews.push(tmpView);}for(var _i52=0;_i52<tmpViewsToMarshalToViews.length;_i52++){tmpAnticipate.anticipate(tmpViewsToMarshalToViews[_i52].marshalToViewAsync.bind(tmpViewsToMarshalToViews[_i52]));}tmpAnticipate.anticipate(this.onMarshalToViewsAsync.bind(this));tmpAnticipate.anticipate(this.onAfterMarshalToViewsAsync.bind(this));tmpAnticipate.wait(function(pError){if(_this54.pict.LogNoisiness>2){_this54.log.trace("PictApp [".concat(_this54.UUID,"]::[").concat(_this54.Hash,"] ").concat(_this54.options.Name," marshalToViewsAsync() complete."));}_this54.lastMarshalToViewsTimestamp=_this54.fable.log.getTimeStamp();return tmpCallback(pError);});}},{key:"onAfterMarshalToViews",value:function onAfterMarshalToViews(){if(this.pict.LogNoisiness>3){this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterMarshalToViews:"));}return true;}},{key:"onAfterMarshalToViewsAsync",value:function onAfterMarshalToViewsAsync(fCallback){this.onAfterMarshalToViews();return fCallback();}/* --------------------------------------------------------------------------
|
|
2898
|
+
var tmpLoadedViews=Object.keys(this.pict.views);var tmpViewsToMarshalToViews=[];for(var i=0;i<tmpLoadedViews.length;i++){var tmpView=this.pict.views[tmpLoadedViews[i]];tmpViewsToMarshalToViews.push(tmpView);}for(var _i52=0;_i52<tmpViewsToMarshalToViews.length;_i52++){tmpAnticipate.anticipate(tmpViewsToMarshalToViews[_i52].marshalToViewAsync.bind(tmpViewsToMarshalToViews[_i52]));}tmpAnticipate.anticipate(this.onMarshalToViewsAsync.bind(this));tmpAnticipate.anticipate(this.onAfterMarshalToViewsAsync.bind(this));tmpAnticipate.wait(function(pError){if(_this54.pict.LogNoisiness>2){_this54.log.trace("PictApp [".concat(_this54.UUID,"]::[").concat(_this54.Hash,"] ").concat(_this54.options.Name," marshalToViewsAsync() complete."));}_this54.lastMarshalToViewsTimestamp=_this54.fable.log.getTimeStamp();return tmpCallback(pError);});}},{key:"onAfterMarshalToViews",value:function onAfterMarshalToViews(){if(this.pict.LogNoisiness>3){this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterMarshalToViews:"));}return true;}},{key:"onAfterMarshalToViewsAsync",value:function onAfterMarshalToViewsAsync(fCallback){this.onAfterMarshalToViews();return fCallback();}/* -------------------------------------------------------------------------- */ /* Code Section: Render View */ /* -------------------------------------------------------------------------- */},{key:"onBeforeRender",value:function onBeforeRender(){if(this.pict.LogNoisiness>3){this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeRender:"));}return true;}},{key:"onBeforeRenderAsync",value:function onBeforeRenderAsync(fCallback){this.onBeforeRender();return fCallback();}},{key:"render",value:function render(pViewIdentifier,pRenderableHash,pRenderDestinationAddress,pTemplateDataAddress){var tmpViewIdentifier=typeof pViewIdentifier!=='string'?this.options.MainViewportViewIdentifier:pViewIdentifier;var tmpRenderableHash=typeof pRenderableHash!=='string'?this.options.MainViewportRenderableHash:pRenderableHash;var tmpRenderDestinationAddress=typeof pRenderDestinationAddress!=='string'?this.options.MainViewportDestinationAddress:pRenderDestinationAddress;var tmpTemplateDataAddress=typeof pTemplateDataAddress!=='string'?this.options.MainViewportDefaultDataAddress:pTemplateDataAddress;if(this.pict.LogControlFlow){this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," VIEW Renderable[").concat(tmpRenderableHash,"] Destination[").concat(tmpRenderDestinationAddress,"] TemplateDataAddress[").concat(tmpTemplateDataAddress,"] render:"));}this.onBeforeRender();// Now get the view (by hash) from the loaded views
|
|
2899
2899
|
var tmpView=typeof tmpViewIdentifier==='string'?this.servicesMap.PictView[tmpViewIdentifier]:false;if(!tmpView){this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," could not render from View ").concat(tmpViewIdentifier," because it is not a valid view."));return false;}this.onRender();tmpView.render(tmpRenderableHash,tmpRenderDestinationAddress,tmpTemplateDataAddress);this.onAfterRender();return true;}},{key:"onRender",value:function onRender(){if(this.pict.LogNoisiness>3){this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onRender:"));}return true;}},{key:"onRenderAsync",value:function onRenderAsync(fCallback){this.onRender();return fCallback();}},{key:"renderAsync",value:function renderAsync(pViewIdentifier,pRenderableHash,pRenderDestinationAddress,pTemplateDataAddress,fCallback){var _this55=this;var tmpViewIdentifier=typeof pViewIdentifier!=='string'?this.options.MainViewportViewIdentifier:pViewIdentifier;var tmpRenderableHash=typeof pRenderableHash!=='string'?this.options.MainViewportRenderableHash:pRenderableHash;var tmpRenderDestinationAddress=typeof pRenderDestinationAddress!=='string'?this.options.MainViewportDestinationAddress:pRenderDestinationAddress;var tmpTemplateDataAddress=typeof pTemplateDataAddress!=='string'?this.options.MainViewportDefaultDataAddress:pTemplateDataAddress;// Allow the callback to be passed in as the last parameter no matter what
|
|
2900
2900
|
var tmpCallback=typeof fCallback==='function'?fCallback:typeof pTemplateDataAddress==='function'?pTemplateDataAddress:typeof pRenderDestinationAddress==='function'?pRenderDestinationAddress:typeof pRenderableHash==='function'?pRenderableHash:typeof pViewIdentifier==='function'?pViewIdentifier:false;if(!tmpCallback){this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions."));tmpCallback=function tmpCallback(pError){if(pError){_this55.log.error("PictApp [".concat(_this55.UUID,"]::[").concat(_this55.Hash,"] ").concat(_this55.options.Name," renderAsync Auto Callback Error: ").concat(pError),pError);}};}if(this.pict.LogControlFlow){this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," VIEW Renderable[").concat(tmpRenderableHash,"] Destination[").concat(tmpRenderDestinationAddress,"] TemplateDataAddress[").concat(tmpTemplateDataAddress,"] renderAsync:"));}var tmpRenderAnticipate=this.fable.newAnticipate();tmpRenderAnticipate.anticipate(this.onBeforeRenderAsync.bind(this));var tmpView=typeof tmpViewIdentifier==='string'?this.servicesMap.PictView[tmpViewIdentifier]:false;if(!tmpView){var tmpErrorMessage="PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," could not asynchronously render from View ").concat(tmpViewIdentifier," because it is not a valid view.");if(this.pict.LogNoisiness>3){this.log.error(tmpErrorMessage);}return tmpCallback(new Error(tmpErrorMessage));}tmpRenderAnticipate.anticipate(this.onRenderAsync.bind(this));tmpRenderAnticipate.anticipate(function(fNext){tmpView.renderAsync.call(tmpView,tmpRenderableHash,tmpRenderDestinationAddress,tmpTemplateDataAddress,fNext);});tmpRenderAnticipate.anticipate(this.onAfterRenderAsync.bind(this));return tmpRenderAnticipate.wait(tmpCallback);}},{key:"onAfterRender",value:function onAfterRender(){if(this.pict.LogNoisiness>3){this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterRender:"));}return true;}},{key:"onAfterRenderAsync",value:function onAfterRenderAsync(fCallback){this.onAfterRender();return fCallback();}},{key:"renderMainViewport",value:function renderMainViewport(){if(this.pict.LogControlFlow){this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderMainViewport:"));}return this.render();}},{key:"renderMainViewportAsync",value:function renderMainViewportAsync(fCallback){if(this.pict.LogControlFlow){this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderMainViewportAsync:"));}return this.renderAsync(fCallback);}},{key:"renderAutoViews",value:function renderAutoViews(){var _this56=this;if(this.pict.LogNoisiness>0){this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning renderAutoViews..."));}// Now walk through any loaded views and sort them by the AutoRender ordinal
|
|
2901
2901
|
var tmpLoadedViews=Object.keys(this.pict.views);// Sort the views by their priority
|
|
@@ -2910,7 +2910,7 @@ tmpLoadedViews.sort(function(a,b){return _this57.pict.views[a].options.AutoRende
|
|
|
2910
2910
|
AutoInitialize:true,AutoInitializeOrdinal:0,AutoSolveWithApp:true,AutoSolveOrdinal:0,Manifests:{},Templates:[]};var PictProvider=/*#__PURE__*/function(_libFableServiceBase15){function PictProvider(pFable,pOptions,pServiceHash){var _this58;_classCallCheck2(this,PictProvider);// Intersect default options, parent constructor, service information
|
|
2911
2911
|
var tmpOptions=Object.assign({},JSON.parse(JSON.stringify(defaultPictProviderSettings)),pOptions);_this58=_callSuper(this,PictProvider,[pFable,tmpOptions,pServiceHash]);if(!_this58.options.ProviderIdentifier){_this58.options.ProviderIdentifier="AutoProviderID-".concat(_this58.fable.getUUID());}_this58.serviceType='PictProvider';/** @type {Object} */_this58._Package=libPackage;// Convenience and consistency naming
|
|
2912
2912
|
_this58.pict=_this58.fable;// Wire in the essential Pict application state
|
|
2913
|
-
_this58.AppData=_this58.pict.AppData;_this58.initializeTimestamp=false;_this58.lastSolvedTimestamp=false;for(var i=0;i<_this58.options.Templates.length;i++){var tmpDefaultTemplate=_this58.options.Templates[i];if(!tmpDefaultTemplate.hasOwnProperty('Postfix')||!tmpDefaultTemplate.hasOwnProperty('Template')){_this58.log.error("PictProvider [".concat(_this58.UUID,"]::[").concat(_this58.Hash,"] ").concat(_this58.options.ProviderIdentifier," could not load Default Template ").concat(i," in the options array."),tmpDefaultTemplate);}else{if(!tmpDefaultTemplate.Source){tmpDefaultTemplate.Source="PictProvider [".concat(_this58.UUID,"]::[").concat(_this58.Hash,"] ").concat(_this58.options.ProviderIdentifier," options object.");}_this58.pict.TemplateProvider.addDefaultTemplate(tmpDefaultTemplate.Prefix,tmpDefaultTemplate.Postfix,tmpDefaultTemplate.Template,tmpDefaultTemplate.Source);}}return _this58;}/* --------------------------------------------------------------------------
|
|
2913
|
+
_this58.AppData=_this58.pict.AppData;_this58.initializeTimestamp=false;_this58.lastSolvedTimestamp=false;for(var i=0;i<_this58.options.Templates.length;i++){var tmpDefaultTemplate=_this58.options.Templates[i];if(!tmpDefaultTemplate.hasOwnProperty('Postfix')||!tmpDefaultTemplate.hasOwnProperty('Template')){_this58.log.error("PictProvider [".concat(_this58.UUID,"]::[").concat(_this58.Hash,"] ").concat(_this58.options.ProviderIdentifier," could not load Default Template ").concat(i," in the options array."),tmpDefaultTemplate);}else{if(!tmpDefaultTemplate.Source){tmpDefaultTemplate.Source="PictProvider [".concat(_this58.UUID,"]::[").concat(_this58.Hash,"] ").concat(_this58.options.ProviderIdentifier," options object.");}_this58.pict.TemplateProvider.addDefaultTemplate(tmpDefaultTemplate.Prefix,tmpDefaultTemplate.Postfix,tmpDefaultTemplate.Template,tmpDefaultTemplate.Source);}}return _this58;}/* -------------------------------------------------------------------------- */ /* Code Section: Initialization */ /* -------------------------------------------------------------------------- */_inherits(PictProvider,_libFableServiceBase15);return _createClass2(PictProvider,[{key:"onBeforeInitialize",value:function onBeforeInitialize(){if(this.pict.LogNoisiness>3){this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onBeforeInitialize:"));}return true;}},{key:"onBeforeInitializeAsync",value:function onBeforeInitializeAsync(fCallback){this.onBeforeInitialize();return fCallback();}},{key:"onInitialize",value:function onInitialize(){if(this.pict.LogNoisiness>3){this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onInitialize:"));}return true;}},{key:"onInitializeAsync",value:function onInitializeAsync(fCallback){this.onInitialize();return fCallback();}},{key:"initialize",value:function initialize(){if(this.pict.LogControlFlow){this.log.trace("PICT-ControlFlow PROVIDER [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialize:"));}if(!this.initializeTimestamp){this.onBeforeInitialize();this.onInitialize();this.onAfterInitialize();this.initializeTimestamp=this.pict.log.getTimeStamp();return true;}else{this.log.warn("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialize called but initialization is already completed. Aborting."));return false;}}},{key:"initializeAsync",value:function initializeAsync(fCallback){var _this59=this;if(this.pict.LogControlFlow){this.log.trace("PICT-ControlFlow PROVIDER [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initializeAsync:"));}if(!this.initializeTimestamp){var tmpAnticipate=this.pict.instantiateServiceProviderWithoutRegistration('Anticipate');if(this.pict.LogNoisiness>0){this.log.info("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," beginning initialization..."));}tmpAnticipate.anticipate(this.onBeforeInitializeAsync.bind(this));tmpAnticipate.anticipate(this.onInitializeAsync.bind(this));tmpAnticipate.anticipate(this.onAfterInitializeAsync.bind(this));tmpAnticipate.wait(function(pError){_this59.initializeTimestamp=_this59.pict.log.getTimeStamp();if(_this59.pict.LogNoisiness>0){_this59.log.info("PictProvider [".concat(_this59.UUID,"]::[").concat(_this59.Hash,"] ").concat(_this59.options.ProviderIdentifier," initialization complete."));}return fCallback();});}else{this.log.warn("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," async initialize called but initialization is already completed. Aborting."));// TODO: Should this be an error?
|
|
2914
2914
|
return fCallback();}}},{key:"onAfterInitialize",value:function onAfterInitialize(){if(this.pict.LogNoisiness>3){this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onAfterInitialize:"));}return true;}},{key:"onAfterInitializeAsync",value:function onAfterInitializeAsync(fCallback){this.onAfterInitialize();return fCallback();}},{key:"onPreRender",value:function onPreRender(){if(this.pict.LogNoisiness>3){this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onPreRender:"));}return true;}},{key:"onPreRenderAsync",value:function onPreRenderAsync(fCallback){this.onPreRender();return fCallback();}},{key:"render",value:function render(){return this.onPreRender();}},{key:"renderAsync",value:function renderAsync(fCallback){this.onPreRender();return fCallback();}},{key:"onPreSolve",value:function onPreSolve(){if(this.pict.LogNoisiness>3){this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onPreSolve:"));}return true;}},{key:"onPreSolveAsync",value:function onPreSolveAsync(fCallback){this.onPreSolve();return fCallback();}},{key:"solve",value:function solve(){return this.onPreSolve();}},{key:"solveAsync",value:function solveAsync(fCallback){this.onPreSolve();return fCallback();}}]);}(libFableServiceBase);module.exports=PictProvider;},{"../package.json":123,"fable-serviceproviderbase":54}],125:[function(require,module,exports){module.exports={"name":"pict-template","version":"1.0.7","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":"npx tsc -p . --declaration --allowJs --emitDeclarationOnly --outDir types"},"types":"types/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.215","quackage":"^1.0.33","typescript":"^5.6.2"},"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"}};},{}],126:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');var libPackage=require('../package.json');/**
|
|
2915
2915
|
* @class PictTemplateExpression
|
|
2916
2916
|
* @classdesc The PictTemplateExpression class is a service provider for the pict anti-framework that provides template rendering services.
|
|
@@ -2955,7 +2955,7 @@ return fCallback();}}},{key:"onAfterInitialize",value:function onAfterInitialize
|
|
|
2955
2955
|
// After the App initializes, initialize will be called as soon as it's added.
|
|
2956
2956
|
AutoInitialize:true,AutoInitializeOrdinal:0,// If this is set to true, when the App autorenders (on load) this will.
|
|
2957
2957
|
// After the App initializes, render will be called as soon as it's added.
|
|
2958
|
-
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
|
|
2958
|
+
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 */ /**
|
|
2959
2959
|
* @typedef {Object} Renderable
|
|
2960
2960
|
*
|
|
2961
2961
|
* @property {string} RenderableHash - A unique hash for the renderable.
|
|
@@ -2963,7 +2963,7 @@ AutoRender:true,AutoRenderOrdinal:0,AutoSolveWithApp:true,AutoSolveOrdinal:0,CSS
|
|
|
2963
2963
|
* @property {string} [DefaultTemplateRecordAddress] - The default address for resolving the data record for this renderable.
|
|
2964
2964
|
* @property {string} [ContentDestinationAddress] - The default address (DOM CSS selector) for rendering the content of this renderable.
|
|
2965
2965
|
* @property {string} [RenderMethod] - The method to use when rendering the renderable ('replace', 'append', 'prepend', 'append_once').
|
|
2966
|
-
|
|
2966
|
+
*/ /**
|
|
2967
2967
|
* Represents a view in the Pict ecosystem.
|
|
2968
2968
|
*/var PictView=/*#__PURE__*/function(_libFableServiceBase17){/**
|
|
2969
2969
|
* @param {any} pFable - The Fable object that this service is attached to.
|
|
@@ -2993,7 +2993,7 @@ if(_this61.options.CSS){var tmpCSSHash=_this61.options.CSSHash?_this61.options.C
|
|
|
2993
2993
|
* @param {string} [pRenderMethod] - (optional) The method to use when rendering the renderable (ex. 'replace').
|
|
2994
2994
|
*/_inherits(PictView,_libFableServiceBase17);return _createClass2(PictView,[{key:"addRenderable",value:function addRenderable(pRenderableHash,pTemplateHash,pDefaultTemplateRecordAddress,pDefaultDestinationAddress,pRenderMethod){/** @type {Renderable} */var tmpRenderable;if(_typeof(pRenderableHash)=='object'){// The developer passed in the renderable as an object.
|
|
2995
2995
|
// Use theirs instead!
|
|
2996
|
-
tmpRenderable=pRenderableHash;}else{var tmpRenderMethod=typeof pRenderMethod!=='string'?pRenderMethod:'replace';tmpRenderable={RenderableHash:pRenderableHash,TemplateHash:pTemplateHash,DefaultTemplateRecordAddress:pDefaultTemplateRecordAddress,ContentDestinationAddress:pDefaultDestinationAddress,RenderMethod:tmpRenderMethod};}if(typeof tmpRenderable.RenderableHash!='string'||typeof tmpRenderable.TemplateHash!='string'){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not load Renderable; RenderableHash or TemplateHash are invalid."),tmpRenderable);}else{if(this.pict.LogNoisiness>0){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," adding renderable [").concat(tmpRenderable.RenderableHash,"] pointed to template ").concat(tmpRenderable.TemplateHash,"."));}this.renderables[tmpRenderable.RenderableHash]=tmpRenderable;}}/* --------------------------------------------------------------------------
|
|
2996
|
+
tmpRenderable=pRenderableHash;}else{var tmpRenderMethod=typeof pRenderMethod!=='string'?pRenderMethod:'replace';tmpRenderable={RenderableHash:pRenderableHash,TemplateHash:pTemplateHash,DefaultTemplateRecordAddress:pDefaultTemplateRecordAddress,ContentDestinationAddress:pDefaultDestinationAddress,RenderMethod:tmpRenderMethod};}if(typeof tmpRenderable.RenderableHash!='string'||typeof tmpRenderable.TemplateHash!='string'){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not load Renderable; RenderableHash or TemplateHash are invalid."),tmpRenderable);}else{if(this.pict.LogNoisiness>0){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," adding renderable [").concat(tmpRenderable.RenderableHash,"] pointed to template ").concat(tmpRenderable.TemplateHash,"."));}this.renderables[tmpRenderable.RenderableHash]=tmpRenderable;}}/* -------------------------------------------------------------------------- */ /* Code Section: Initialization */ /* -------------------------------------------------------------------------- */ /**
|
|
2997
2997
|
* Lifecycle hook that triggers before the view is initialized.
|
|
2998
2998
|
*/},{key:"onBeforeInitialize",value:function onBeforeInitialize(){if(this.pict.LogNoisiness>3){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeInitialize:"));}return true;}/**
|
|
2999
2999
|
* Lifecycle hook that triggers before the view is initialized (async flow).
|
|
@@ -3016,7 +3016,7 @@ return fCallback();}}},{key:"onAfterInitialize",value:function onAfterInitialize
|
|
|
3016
3016
|
* Lifecycle hook that triggers after the view is initialized (async flow).
|
|
3017
3017
|
*
|
|
3018
3018
|
* @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.
|
|
3019
|
-
*/},{key:"onAfterInitializeAsync",value:function onAfterInitializeAsync(fCallback){this.onAfterInitialize();return fCallback();}/* --------------------------------------------------------------------------
|
|
3019
|
+
*/},{key:"onAfterInitializeAsync",value:function onAfterInitializeAsync(fCallback){this.onAfterInitialize();return fCallback();}/* -------------------------------------------------------------------------- */ /* Code Section: Render */ /* -------------------------------------------------------------------------- */ /**
|
|
3020
3020
|
* Lifecycle hook that triggers before the view is rendered.
|
|
3021
3021
|
*
|
|
3022
3022
|
* @param {any} [pRenderable] - The renderable that will be rendered.
|
|
@@ -3089,7 +3089,7 @@ var tmpCallback=typeof fCallback==='function'?fCallback:typeof pTemplateRecordAd
|
|
|
3089
3089
|
* Lifecycle hook that triggers after the view is rendered (async flow).
|
|
3090
3090
|
*
|
|
3091
3091
|
* @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.
|
|
3092
|
-
*/},{key:"onAfterRenderAsync",value:function onAfterRenderAsync(fCallback){return fCallback();}/* --------------------------------------------------------------------------
|
|
3092
|
+
*/},{key:"onAfterRenderAsync",value:function onAfterRenderAsync(fCallback){return fCallback();}/* -------------------------------------------------------------------------- */ /* Code Section: Solver */ /* -------------------------------------------------------------------------- */ /**
|
|
3093
3093
|
* Lifecycle hook that triggers before the view is solved.
|
|
3094
3094
|
*/},{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;}/**
|
|
3095
3095
|
* Lifecycle hook that triggers before the view is solved (async flow).
|
|
@@ -3115,7 +3115,7 @@ var tmpCallback=typeof fCallback==='function'?fCallback:typeof pTemplateRecordAd
|
|
|
3115
3115
|
* Lifecycle hook that triggers after the view is solved (async flow).
|
|
3116
3116
|
*
|
|
3117
3117
|
* @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.
|
|
3118
|
-
*/},{key:"onAfterSolveAsync",value:function onAfterSolveAsync(fCallback){this.onAfterSolve();return fCallback();}/* --------------------------------------------------------------------------
|
|
3118
|
+
*/},{key:"onAfterSolveAsync",value:function onAfterSolveAsync(fCallback){this.onAfterSolve();return fCallback();}/* -------------------------------------------------------------------------- */ /* Code Section: Marshal From View */ /* -------------------------------------------------------------------------- */ /**
|
|
3119
3119
|
* Lifecycle hook that triggers before data is marshaled from the view.
|
|
3120
3120
|
*
|
|
3121
3121
|
* @return {boolean} - True if the operation was successful, false otherwise.
|
|
@@ -3143,7 +3143,7 @@ var tmpCallback=typeof fCallback==='function'?fCallback:typeof pTemplateRecordAd
|
|
|
3143
3143
|
* Lifecycle hook that triggers after data is marshaled from the view (async flow).
|
|
3144
3144
|
*
|
|
3145
3145
|
* @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.
|
|
3146
|
-
*/},{key:"onAfterMarshalFromViewAsync",value:function onAfterMarshalFromViewAsync(fCallback){this.onAfterMarshalFromView();return fCallback();}/* --------------------------------------------------------------------------
|
|
3146
|
+
*/},{key:"onAfterMarshalFromViewAsync",value:function onAfterMarshalFromViewAsync(fCallback){this.onAfterMarshalFromView();return fCallback();}/* -------------------------------------------------------------------------- */ /* Code Section: Marshal To View */ /* -------------------------------------------------------------------------- */ /**
|
|
3147
3147
|
* Lifecycle hook that triggers before data is marshaled into the view.
|
|
3148
3148
|
*/},{key:"onBeforeMarshalToView",value:function onBeforeMarshalToView(){if(this.pict.LogNoisiness>3){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeMarshalToView:"));}return true;}/**
|
|
3149
3149
|
* Lifecycle hook that triggers before data is marshaled into the view (async flow).
|
|
@@ -3299,7 +3299,7 @@ process.versions={};function noop(){}process.on=noop;process.addListener=noop;pr
|
|
|
3299
3299
|
delimiter='-',// '\x2D'
|
|
3300
3300
|
/** Regular expressions */regexPunycode=/^xn--/,regexNonASCII=/[^\x20-\x7E]/,// unprintable ASCII chars + non-ASCII chars
|
|
3301
3301
|
regexSeparators=/[\x2E\u3002\uFF0E\uFF61]/g,// RFC 3490 separators
|
|
3302
|
-
/** Error messages */errors={'overflow':'Overflow: input needs wider integers to process','not-basic':'Illegal input >= 0x80 (not a basic code point)','invalid-input':'Invalid input'},/** Convenience shortcuts */baseMinusTMin=base-tMin,floor=Math.floor,stringFromCharCode=String.fromCharCode,/** Temporary variable */key
|
|
3302
|
+
/** Error messages */errors={'overflow':'Overflow: input needs wider integers to process','not-basic':'Illegal input >= 0x80 (not a basic code point)','invalid-input':'Invalid input'},/** Convenience shortcuts */baseMinusTMin=base-tMin,floor=Math.floor,stringFromCharCode=String.fromCharCode,/** Temporary variable */key;/*--------------------------------------------------------------------------*/ /**
|
|
3303
3303
|
* A generic error utility function.
|
|
3304
3304
|
* @private
|
|
3305
3305
|
* @param {String} type The error type.
|
|
@@ -3430,7 +3430,7 @@ for/* no condition */(q=delta,k=base;;k+=base){t=k<=bias?tMin:k>=bias+tMax?tMax:
|
|
|
3430
3430
|
* Unicode string.
|
|
3431
3431
|
* @returns {String} The Punycode representation of the given domain name or
|
|
3432
3432
|
* email address.
|
|
3433
|
-
*/function toASCII(input){return mapDomain(input,function(string){return regexNonASCII.test(string)?'xn--'+encode(string):string;});}
|
|
3433
|
+
*/function toASCII(input){return mapDomain(input,function(string){return regexNonASCII.test(string)?'xn--'+encode(string):string;});}/*--------------------------------------------------------------------------*/ /** Define the public API */punycode={/**
|
|
3434
3434
|
* A string representing the current Punycode.js version number.
|
|
3435
3435
|
* @memberOf punycode
|
|
3436
3436
|
* @type String
|
|
@@ -3440,7 +3440,7 @@ for/* no condition */(q=delta,k=base;;k+=base){t=k<=bias?tMin:k>=bias+tMax?tMax:
|
|
|
3440
3440
|
* @see <https://mathiasbynens.be/notes/javascript-encoding>
|
|
3441
3441
|
* @memberOf punycode
|
|
3442
3442
|
* @type Object
|
|
3443
|
-
*/'ucs2':{'decode':ucs2decode,'encode':ucs2encode},'decode':decode,'encode':encode,'toASCII':toASCII,'toUnicode':toUnicode};/** Expose `punycode`
|
|
3443
|
+
*/'ucs2':{'decode':ucs2decode,'encode':ucs2encode},'decode':decode,'encode':encode,'toASCII':toASCII,'toUnicode':toUnicode};/** Expose `punycode` */ // Some AMD build optimizers, like r.js, check for specific condition patterns
|
|
3444
3444
|
// like the following:
|
|
3445
3445
|
if(typeof define=='function'&&_typeof(define.amd)=='object'&&define.amd){define('punycode',function(){return punycode;});}else if(freeExports&&freeModule){if(module.exports==freeExports){// in Node.js, io.js, or RingoJS v0.8.0+
|
|
3446
3446
|
freeModule.exports=punycode;}else{// in Narwhal or RingoJS v0.7.0-
|
|
@@ -3526,14 +3526,14 @@ if(maxKeys>0&&len>maxKeys){len=maxKeys;}for(var i=0;i<len;++i){var x=qs[i].repla
|
|
|
3526
3526
|
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
3527
3527
|
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
3528
3528
|
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
3529
|
-
'use strict';var stringifyPrimitive=function stringifyPrimitive(v){switch(_typeof(v)){case'string':return v;case'boolean':return v?'true':'false';case'number':return isFinite(v)?v:'';default:return'';}};module.exports=function(obj,sep,eq,name){sep=sep||'&';eq=eq||'=';if(obj===null){obj=undefined;}if(_typeof(obj)==='object'){return map(objectKeys(obj),function(k){var ks=encodeURIComponent(stringifyPrimitive(k))+eq;if(isArray(obj[k])){return map(obj[k],function(v){return ks+encodeURIComponent(stringifyPrimitive(v));}).join(sep);}else{return ks+encodeURIComponent(stringifyPrimitive(obj[k]));}}).join(sep);}if(!name)return'';return encodeURIComponent(stringifyPrimitive(name))+eq+encodeURIComponent(stringifyPrimitive(obj));};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==='[object Array]';};function map(xs,f){if(xs.map)return xs.map(f);var res=[];for(var i=0;i<xs.length;i++){res.push(f(xs[i],i));}return res;}var objectKeys=Object.keys||function(obj){var res=[];for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))res.push(key);}return res;};},{}],141:[function(require,module,exports){'use strict';exports.decode=exports.parse=require('./decode');exports.encode=exports.stringify=require('./encode');},{"./decode":139,"./encode":140}],142:[function(require,module,exports){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource>
|
|
3529
|
+
'use strict';var stringifyPrimitive=function stringifyPrimitive(v){switch(_typeof(v)){case'string':return v;case'boolean':return v?'true':'false';case'number':return isFinite(v)?v:'';default:return'';}};module.exports=function(obj,sep,eq,name){sep=sep||'&';eq=eq||'=';if(obj===null){obj=undefined;}if(_typeof(obj)==='object'){return map(objectKeys(obj),function(k){var ks=encodeURIComponent(stringifyPrimitive(k))+eq;if(isArray(obj[k])){return map(obj[k],function(v){return ks+encodeURIComponent(stringifyPrimitive(v));}).join(sep);}else{return ks+encodeURIComponent(stringifyPrimitive(obj[k]));}}).join(sep);}if(!name)return'';return encodeURIComponent(stringifyPrimitive(name))+eq+encodeURIComponent(stringifyPrimitive(obj));};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==='[object Array]';};function map(xs,f){if(xs.map)return xs.map(f);var res=[];for(var i=0;i<xs.length;i++){res.push(f(xs[i],i));}return res;}var objectKeys=Object.keys||function(obj){var res=[];for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))res.push(key);}return res;};},{}],141:[function(require,module,exports){'use strict';exports.decode=exports.parse=require('./decode');exports.encode=exports.stringify=require('./encode');},{"./decode":139,"./encode":140}],142:[function(require,module,exports){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ /* eslint-disable node/no-deprecated-api */var buffer=require('buffer');var Buffer=buffer.Buffer;// alternative to using Object.keys for old browsers
|
|
3530
3530
|
function copyProps(src,dst){for(var key in src){dst[key]=src[key];}}if(Buffer.from&&Buffer.alloc&&Buffer.allocUnsafe&&Buffer.allocUnsafeSlow){module.exports=buffer;}else{// Copy properties from require('buffer')
|
|
3531
3531
|
copyProps(buffer,exports);exports.Buffer=SafeBuffer;}function SafeBuffer(arg,encodingOrOffset,length){return Buffer(arg,encodingOrOffset,length);}SafeBuffer.prototype=Object.create(Buffer.prototype);// Copy static methods from Buffer
|
|
3532
3532
|
copyProps(Buffer,SafeBuffer);SafeBuffer.from=function(arg,encodingOrOffset,length){if(typeof arg==='number'){throw new TypeError('Argument must not be a number');}return Buffer(arg,encodingOrOffset,length);};SafeBuffer.alloc=function(size,fill,encoding){if(typeof size!=='number'){throw new TypeError('Argument must be a number');}var buf=Buffer(size);if(fill!==undefined){if(typeof encoding==='string'){buf.fill(fill,encoding);}else{buf.fill(fill);}}else{buf.fill(0);}return buf;};SafeBuffer.allocUnsafe=function(size){if(typeof size!=='number'){throw new TypeError('Argument must be a number');}return Buffer(size);};SafeBuffer.allocUnsafeSlow=function(size){if(typeof size!=='number'){throw new TypeError('Argument must be a number');}return buffer.SlowBuffer(size);};},{"buffer":20}],143:[function(require,module,exports){'use strict';var GetIntrinsic=require('get-intrinsic');var define=require('define-data-property');var hasDescriptors=require('has-property-descriptors')();var gOPD=require('gopd');var $TypeError=require('es-errors/type');var $floor=GetIntrinsic('%Math.floor%');/** @type {import('.')} */module.exports=function setFunctionLength(fn,length){if(typeof fn!=='function'){throw new $TypeError('`fn` is not a function');}if(typeof length!=='number'||length<0||length>0xFFFFFFFF||$floor(length)!==length){throw new $TypeError('`length` must be a positive 32-bit integer');}var loose=arguments.length>2&&!!arguments[2];var functionLengthIsConfigurable=true;var functionLengthIsWritable=true;if('length'in fn&&gOPD){var desc=gOPD(fn,'length');if(desc&&!desc.configurable){functionLengthIsConfigurable=false;}if(desc&&!desc.writable){functionLengthIsWritable=false;}}if(functionLengthIsConfigurable||functionLengthIsWritable||!loose){if(hasDescriptors){define(/** @type {Parameters<define>[0]} */fn,'length',length,true,true);}else{define(/** @type {Parameters<define>[0]} */fn,'length',length);}}return fn;};},{"define-data-property":36,"es-errors/type":43,"get-intrinsic":96,"gopd":97,"has-property-descriptors":98}],144:[function(require,module,exports){'use strict';var GetIntrinsic=require('get-intrinsic');var callBound=require('call-bind/callBound');var inspect=require('object-inspect');var $TypeError=require('es-errors/type');var $WeakMap=GetIntrinsic('%WeakMap%',true);var $Map=GetIntrinsic('%Map%',true);var $weakMapGet=callBound('WeakMap.prototype.get',true);var $weakMapSet=callBound('WeakMap.prototype.set',true);var $weakMapHas=callBound('WeakMap.prototype.has',true);var $mapGet=callBound('Map.prototype.get',true);var $mapSet=callBound('Map.prototype.set',true);var $mapHas=callBound('Map.prototype.has',true);/*
|
|
3533
3533
|
* This function traverses the list returning the node corresponding to the given key.
|
|
3534
3534
|
*
|
|
3535
3535
|
* That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list. By doing so, all the recently used nodes can be accessed relatively quickly.
|
|
3536
|
-
|
|
3536
|
+
*/ /** @type {import('.').listGetNode} */var listGetNode=function listGetNode(list,key){// eslint-disable-line consistent-return
|
|
3537
3537
|
/** @type {typeof list | NonNullable<(typeof list)['next']>} */var prev=list;/** @type {(typeof list)['next']} */var curr;for(;(curr=prev.next)!==null;prev=curr){if(curr.key===key){prev.next=curr.next;// eslint-disable-next-line no-extra-parens
|
|
3538
3538
|
curr.next=/** @type {NonNullable<typeof list.next>} */list.next;list.next=curr;// eslint-disable-line no-param-reassign
|
|
3539
3539
|
return curr;}}};/** @type {import('.').listGet} */var listGet=function listGet(objects,key){var node=listGetNode(objects,key);return node&&node.value;};/** @type {import('.').listSet} */var listSet=function listSet(objects,key,value){var node=listGetNode(objects,key);if(node){node.value=value;}else{// Prepend the new node to the beginning of the list
|
|
@@ -3694,7 +3694,7 @@ this._readableState.destroyed=value;this._writableState.destroyed=value;}});}).c
|
|
|
3694
3694
|
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
3695
3695
|
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
3696
3696
|
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
3697
|
-
'use strict';module.exports=Readable;/*<replacement>*/var Duplex;/*</replacement>*/Readable.ReadableState=ReadableState;/*<replacement>*/var EE=require('events').EventEmitter;var EElistenerCount=function EElistenerCount(emitter,type){return emitter.listeners(type).length;};/*</replacement
|
|
3697
|
+
'use strict';module.exports=Readable;/*<replacement>*/var Duplex;/*</replacement>*/Readable.ReadableState=ReadableState;/*<replacement>*/var EE=require('events').EventEmitter;var EElistenerCount=function EElistenerCount(emitter,type){return emitter.listeners(type).length;};/*</replacement>*/ /*<replacement>*/var Stream=require('./internal/streams/stream');/*</replacement>*/var Buffer=require('buffer').Buffer;var OurUint8Array=(typeof global!=='undefined'?global:typeof window!=='undefined'?window:typeof self!=='undefined'?self:{}).Uint8Array||function(){};function _uint8ArrayToBuffer(chunk){return Buffer.from(chunk);}function _isUint8Array(obj){return Buffer.isBuffer(obj)||obj instanceof OurUint8Array;}/*<replacement>*/var debugUtil=require('util');var debug;if(debugUtil&&debugUtil.debuglog){debug=debugUtil.debuglog('stream');}else{debug=function debug(){};}/*</replacement>*/var BufferList=require('./internal/streams/buffer_list');var destroyImpl=require('./internal/streams/destroy');var _require=require('./internal/streams/state'),getHighWaterMark=_require.getHighWaterMark;var _require$codes=require('../errors').codes,ERR_INVALID_ARG_TYPE=_require$codes.ERR_INVALID_ARG_TYPE,ERR_STREAM_PUSH_AFTER_EOF=_require$codes.ERR_STREAM_PUSH_AFTER_EOF,ERR_METHOD_NOT_IMPLEMENTED=_require$codes.ERR_METHOD_NOT_IMPLEMENTED,ERR_STREAM_UNSHIFT_AFTER_END_EVENT=_require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;// Lazy loaded to improve the startup performance.
|
|
3698
3698
|
var StringDecoder;var createReadableStreamAsyncIterator;var from;require('inherits')(Readable,Stream);var errorOrDestroy=destroyImpl.errorOrDestroy;var kProxyEvents=['error','close','destroy','pause','resume'];function prependListener(emitter,event,fn){// Sadly this is not cacheable as some libraries bundle their own
|
|
3699
3699
|
// event emitter implementation with them.
|
|
3700
3700
|
if(typeof emitter.prependListener==='function')return emitter.prependListener(event,fn);// This is a hack to make sure that our error handler is attached before any
|
|
@@ -4037,7 +4037,7 @@ if(stream._writableState.length)throw new ERR_TRANSFORM_WITH_LENGTH_0();if(strea
|
|
|
4037
4037
|
// the drain event emission and buffering.
|
|
4038
4038
|
'use strict';module.exports=Writable;/* <replacement> */function WriteReq(chunk,encoding,cb){this.chunk=chunk;this.encoding=encoding;this.callback=cb;this.next=null;}// It seems a linked list but it is not
|
|
4039
4039
|
// there will be only 2 of these for each stream
|
|
4040
|
-
function CorkedRequest(state){var _this=this;this.next=null;this.entry=null;this.finish=function(){onCorkedFinish(_this,state);};}/* </replacement>
|
|
4040
|
+
function CorkedRequest(state){var _this=this;this.next=null;this.entry=null;this.finish=function(){onCorkedFinish(_this,state);};}/* </replacement> */ /*<replacement>*/var Duplex;/*</replacement>*/Writable.WritableState=WritableState;/*<replacement>*/var internalUtil={deprecate:require('util-deprecate')};/*</replacement>*/ /*<replacement>*/var Stream=require('./internal/streams/stream');/*</replacement>*/var Buffer=require('buffer').Buffer;var OurUint8Array=(typeof global!=='undefined'?global:typeof window!=='undefined'?window:typeof self!=='undefined'?self:{}).Uint8Array||function(){};function _uint8ArrayToBuffer(chunk){return Buffer.from(chunk);}function _isUint8Array(obj){return Buffer.isBuffer(obj)||obj instanceof OurUint8Array;}var destroyImpl=require('./internal/streams/destroy');var _require=require('./internal/streams/state'),getHighWaterMark=_require.getHighWaterMark;var _require$codes=require('../errors').codes,ERR_INVALID_ARG_TYPE=_require$codes.ERR_INVALID_ARG_TYPE,ERR_METHOD_NOT_IMPLEMENTED=_require$codes.ERR_METHOD_NOT_IMPLEMENTED,ERR_MULTIPLE_CALLBACK=_require$codes.ERR_MULTIPLE_CALLBACK,ERR_STREAM_CANNOT_PIPE=_require$codes.ERR_STREAM_CANNOT_PIPE,ERR_STREAM_DESTROYED=_require$codes.ERR_STREAM_DESTROYED,ERR_STREAM_NULL_VALUES=_require$codes.ERR_STREAM_NULL_VALUES,ERR_STREAM_WRITE_AFTER_END=_require$codes.ERR_STREAM_WRITE_AFTER_END,ERR_UNKNOWN_ENCODING=_require$codes.ERR_UNKNOWN_ENCODING;var errorOrDestroy=destroyImpl.errorOrDestroy;require('inherits')(Writable,Stream);function nop(){}function WritableState(options,stream,isDuplex){Duplex=Duplex||require('./_stream_duplex');options=options||{};// Duplex streams are both readable and writable, but share
|
|
4041
4041
|
// the same options object.
|
|
4042
4042
|
// However, some cases require setting options to different
|
|
4043
4043
|
// values for the readable and the writable sides of the duplex stream,
|
|
@@ -4319,10 +4319,10 @@ var simplePath=simplePathPattern.exec(rest);if(simplePath){this.path=rest;this.h
|
|
|
4319
4319
|
* ex:
|
|
4320
4320
|
* http://a@b@c/ => user:a@b host:c
|
|
4321
4321
|
* http://a@b?@c => user:a host:c path:/?@c
|
|
4322
|
-
|
|
4322
|
+
*/ /*
|
|
4323
4323
|
* v0.12 TODO(isaacs): This is not quite how Chrome does things.
|
|
4324
4324
|
* Review our test case against browsers more comprehensively.
|
|
4325
|
-
|
|
4325
|
+
*/ // find the first instance of any hostEndingChars
|
|
4326
4326
|
var hostEnd=-1;for(var i=0;i<hostEndingChars.length;i++){var hec=rest.indexOf(hostEndingChars[i]);if(hec!==-1&&(hostEnd===-1||hec<hostEnd)){hostEnd=hec;}}/*
|
|
4327
4327
|
* at this point, either we have an explicit point where the
|
|
4328
4328
|
* auth portion cannot go past, or the last @ char is the decider.
|
|
@@ -4463,8 +4463,8 @@ try{if(!global.localStorage)return false;}catch(_){return false;}var val=global.
|
|
|
4463
4463
|
// presumably different callback function.
|
|
4464
4464
|
// This makes sure that own properties are retained, so that
|
|
4465
4465
|
// decorations and such are not lost along the way.
|
|
4466
|
-
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;}}},{}],171:[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;}},{}],172:[function(require,module,exports){module.exports={"name":"pict","version":"1.0.
|
|
4467
|
-
/* global Pict, _Pict: writeable
|
|
4466
|
+
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;}}},{}],171:[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;}},{}],172:[function(require,module,exports){module.exports={"name":"pict","version":"1.0.218","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/**","types":"npx -p typescript tsc -p . --declaration --allowJs --emitDeclarationOnly --outDir types"},"types":"types/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.11.1","eslint":"^9.11.1","globals":"^15.9.0","quackage":"^1.0.33"},"dependencies":{"cachetrax":"^1.0.4","fable":"^3.0.145","pict-application":"^1.0.22","pict-provider":"^1.0.3","pict-template":"^1.0.7","pict-view":"^1.0.54","typescript":"^5.6.2"}};},{}],173:[function(require,module,exports){// This assumes Pict has been required in the browser. Delcare these as globals so linter can do its job.
|
|
4467
|
+
/* global Pict, _Pict: writeable */ /**
|
|
4468
4468
|
* Simple function to load a pict Application
|
|
4469
4469
|
*
|
|
4470
4470
|
* @param {import('pict-application')} pPictApplication - The pict application to load.
|
|
@@ -4706,8 +4706,8 @@ var tmpManifestKey=tmpManifestKeys[i];this.instantiateServiceProvider('Manifest'
|
|
|
4706
4706
|
* FIXME: refer to PictView here once it has a type definition
|
|
4707
4707
|
*
|
|
4708
4708
|
* @return {any} The view instance.
|
|
4709
|
-
*/},{key:"addView",value:function addView(pViewHash,pOptions,pViewPrototype){var tmpOptions=_typeof(pOptions)=='object'?pOptions:{};var tmpViewHash=typeof pViewHash=='string'?pViewHash:this.fable.getUUID();if(this.LogControlFlow){if(this.LogNoisiness>1){this.log.info("PICT-ControlFlow addView [".concat(tmpViewHash,"]:"),{Options:tmpOptions});}else{this.log.info("PICT-ControlFlow addView [".concat(tmpViewHash,"]"));}}if(typeof
|
|
4710
|
-
if('default_configuration'in
|
|
4709
|
+
*/},{key:"addView",value:function addView(pViewHash,pOptions,pViewPrototype){var tmpOptions=_typeof(pOptions)=='object'?pOptions:{};var tmpViewHash=typeof pViewHash=='string'?pViewHash:this.fable.getUUID();var tmpViewPrototype=typeof pViewPrototype=='function'?pViewPrototype:undefined;if(this.LogControlFlow){if(this.LogNoisiness>1){this.log.info("PICT-ControlFlow addView [".concat(tmpViewHash,"]:"),{Options:tmpOptions});}else{this.log.info("PICT-ControlFlow addView [".concat(tmpViewHash,"]"));}}if(typeof tmpViewPrototype!='undefined'){// If the prototype has a default_configuration, it will be merged with options.
|
|
4710
|
+
if('default_configuration'in tmpViewPrototype){tmpOptions=this.fable.Utility.extend({},JSON.parse(JSON.stringify(tmpViewPrototype.default_configuration)),tmpOptions);}return this.instantiateServiceProviderFromPrototype('PictView',tmpOptions,tmpViewHash,tmpViewPrototype);}else{return this.instantiateServiceProvider('PictView',tmpOptions,tmpViewHash);}}/**
|
|
4711
4711
|
* Add a provider unless one already exists, then return that one.
|
|
4712
4712
|
*
|
|
4713
4713
|
* Just passing an options will construct one for us.
|
|
@@ -4844,7 +4844,7 @@ module.exports.isBrowser=new Function("try {return (this===window);} catch(pErro
|
|
|
4844
4844
|
* 5. Now you can use your pict as normal, and it will log all of the read/write events out and keep a log of when they occurred.
|
|
4845
4845
|
*/var PictEnvironmentLog=/*#__PURE__*/function(){/**
|
|
4846
4846
|
* @typedef {import('../Pict')} Pict
|
|
4847
|
-
|
|
4847
|
+
*/ /**
|
|
4848
4848
|
* @param {Pict} pPict - The pict object to attach the custom read/write functions to.
|
|
4849
4849
|
* @param {Map<String, any>} pContentMap - The content map to use for custom reads.
|
|
4850
4850
|
*/function PictEnvironmentLog(pPict,pContentMap){_classCallCheck2(this,PictEnvironmentLog);this.contentMap=_typeof(pContentMap)=='object'?pContentMap:{};this.pict=pPict;// If this is set to false, we won't keep an array-based log of every read, assignment, append or get.
|
|
@@ -4912,7 +4912,7 @@ return this.contentMap[pAddress];}this.pict.log.warn("Mock read from Address ".c
|
|
|
4912
4912
|
* 5. Now you can use your pict as normal, and it will log all of the read/write events out and keep a log of when they occurred.
|
|
4913
4913
|
*/var PictEnvironmentObject=/*#__PURE__*/function(){/**
|
|
4914
4914
|
* @typedef {import('../Pict')} Pict
|
|
4915
|
-
|
|
4915
|
+
*/ /**
|
|
4916
4916
|
* @param {Pict} pPict - The pict object to attach the custom read/write functions to.q
|
|
4917
4917
|
* @param {Map<String, any>} pContentMap - The content map to use for custom reads.
|
|
4918
4918
|
*/function PictEnvironmentObject(pPict,pContentMap){_classCallCheck2(this,PictEnvironmentObject);this.contentMap=_typeof(pContentMap)=='object'?pContentMap:{};this.contentMap._ATTRIBUTE_MAP={};this.contentMap._CLASS_MAP={};this.pict=pPict;// If this is set to false, we won't keep an array-based log of every read, assignment, append or get.
|